Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] runit-void: update os-release information
@ 2019-06-05  4:58 voidlinux-github
  2019-06-05  5:00 ` [PR PATCH] [Updated] " voidlinux-github
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: voidlinux-github @ 2019-06-05  4:58 UTC (permalink / raw)
  To: ml

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

There is a new 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: 3061 bytes --]

From d6923343488550b72e3898abd373cd1990528fdc 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..010c0f9ee84 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";;
+		armv5te*) arch="armv5tel"; float="+soft-float";;
+		armv6tel*) arch="armv6l"; float="+vfp";;
+		armv7tel*) 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";;
+		mipsel*) 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/

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2019-06-29 19:08 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-05  4:58 [PR PATCH] runit-void: update os-release information 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
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

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).