Github messages for voidlinux
 help / color / mirror / Atom feed
From: voidlinux-github@inbox.vuxu.org
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] runit-void: update os-release information
Date: Wed, 05 Jun 2019 07:09:05 +0200	[thread overview]
Message-ID: <20190605050905.JWZpTnBTLJ4lUJddojgxXAKaWsfgHvbLwDTzFF6Pfxg@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-12160@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 980 bytes --]

There is an updated pull request by pullmoll against master on the void-packages repository

https://github.com/pullmoll/void-packages osrel
https://github.com/void-linux/void-packages/pull/12160

runit-void: update os-release information
The file /etc/os-release is used by e.g. os-prober (for grub) to extract
information for both, grub labels and user information.
For multiple boot partitions like glibc vs. musl libc, big vs. little
endian the user could not tell which partition contained which variant
because their names was always just "void".

This update creates an individual /etc/os-release containing information
about the libc (glibc or musl), the CPU architecture and endianness, and
the floating point options, if they are relevant.

The variable DISTRIB_ID is not defined in the description at:
https://www.freedesktop.org/software/systemd/man/os-release.html

A patch file from https://github.com/void-linux/void-packages/pull/12160.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-osrel-12160.patch --]
[-- Type: application/text/x-diff, Size: 3048 bytes --]

From 80a070be7048ee62e8e1e73a9b1d01123975beb1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= <pullmoll@t-online.de>
Date: Wed, 5 Jun 2019 06:47:37 +0200
Subject: [PATCH] runit-void: update os-release information

The file /etc/os-release is used by e.g. os-prober (for grub) to extract
information for both, grub labels and user information.
For multiple boot partitions like glibc vs. musl libc, big vs. little
endian the user could not tell which partition contained which variant
because their names was always just "void".

This update creates an individual /etc/os-release containing information
about the libc (glibc or musl), the CPU architecture and endianness, and
the floating point options, if they are relevant.

The variable DISTRIB_ID is not defined in the description at:
https://www.freedesktop.org/software/systemd/man/os-release.html
---
 srcpkgs/runit-void/files/os-release |  8 +++----
 srcpkgs/runit-void/template         | 33 +++++++++++++++++++++++++++--
 2 files changed, 35 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/runit-void/files/os-release b/srcpkgs/runit-void/files/os-release
index 12dcabd1f3e..2c20e5b24a8 100644
--- a/srcpkgs/runit-void/files/os-release
+++ b/srcpkgs/runit-void/files/os-release
@@ -1,4 +1,4 @@
-NAME="void"
-ID="void"
-DISTRIB_ID="void"
-PRETTY_NAME="void"
+NAME="VoidLinux"
+VERSION="rolling"
+ID="void_@arch@_@libc@"
+PRETTY_NAME="VoidLinux (@arch@@float@ @libc@)"
diff --git a/srcpkgs/runit-void/template b/srcpkgs/runit-void/template
index 4b322b6a189..805ccc992e4 100644
--- a/srcpkgs/runit-void/template
+++ b/srcpkgs/runit-void/template
@@ -1,7 +1,7 @@
 # Template file for 'runit-void'
 pkgname=runit-void
 version=20180623
-revision=2
+revision=3
 wrksrc="void-runit-${version}"
 build_style=gnu-makefile
 homepage="https://github.com/void-linux/void-runit"
@@ -27,10 +27,39 @@ make_dirs="
  /etc/zzz.d/resume 0755 root root"
 
 post_install() {
+	local arch="x86_64" libc="glibc" float
+
+	case "$XBPS_TARGET_MACHINE" in
+		*-musl) libc="musl";;
+		*) libc="glibc";;
+	esac
+
+	case "$XBPS_TARGET_MACHINE" in
+		i686*) arch="x86_32";;
+		x86_64*) arch="x86_64";;
+		aarch64*) arch="arm64"; float="+neon";;
+		armv5*) arch="armv5tel"; float="+soft-float";;
+		armv6*) arch="armv6l"; float="+vfp";;
+		armv7*) arch="armv7l"; float="+neon";;
+		ppc64le*) arch="powerpc64le";;
+		ppc64*) arch="powerpc64";;
+		ppc*) arch="powerpc";;
+		mipselhf*) arch="mipsel"; float="+hard-float";;
+		mipsel*) arch="mipsel"; float="+soft-float";;
+		mipshf*) arch="mips"; float="+hard-float";;
+		mips*) arch="mips"; float="+soft-float";;
+	esac
+
+	sed ${FILESDIR}/os-release \
+		-e "s;@arch@;$arch;" \
+		-e "s;@float@;$float;" \
+		-e "s;@libc@;$libc;" \
+		> os-release
+
 	vmkdir usr/bin
 	mv ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin
 	vconf ${FILESDIR}/hostname
-	vconf ${FILESDIR}/os-release
+	vconf os-release
 	vconf ${FILESDIR}/locale.conf
 	vinstall ${FILESDIR}/apparmor 644 /etc/default/
 	vinstall ${FILESDIR}/09-apparmor.sh 644 /etc/runit/core-services/

  parent reply	other threads:[~2019-06-05  5:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-05  4:58 [PR PATCH] " voidlinux-github
2019-06-05  5:00 ` [PR PATCH] [Updated] " voidlinux-github
2019-06-05  5:00 ` voidlinux-github
2019-06-05  5:04 ` voidlinux-github
2019-06-05  5:04 ` voidlinux-github
2019-06-05  5:09 ` voidlinux-github [this message]
2019-06-05  5:09 ` voidlinux-github
2019-06-05  5:13 ` voidlinux-github
2019-06-05  5:13 ` voidlinux-github
2019-06-05  6:54 ` voidlinux-github
2019-06-05  6:54 ` voidlinux-github
2019-06-05 15:45 ` voidlinux-github
2019-06-05 15:45 ` voidlinux-github
2019-06-05 15:56 ` voidlinux-github
2019-06-06  8:48 ` [PR PATCH] [Updated] [NOMERGE] " voidlinux-github
2019-06-06  8:48 ` voidlinux-github
2019-06-22 16:28 ` voidlinux-github
2019-06-22 16:28 ` voidlinux-github
2019-06-29 19:08 ` [PR PATCH] [Closed]: " voidlinux-github

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190605050905.JWZpTnBTLJ4lUJddojgxXAKaWsfgHvbLwDTzFF6Pfxg@z \
    --to=voidlinux-github@inbox.vuxu.org \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).