[gentoo-commits] proj/baselayout:master commit in: /, etc.Linux/, etc.BSD/

2021-09-24 Thread William Hubbs
commit: 57c250e24c70f8f9581860654cdec0d049345292
Author: William Hubbs  gentoo  org>
AuthorDate: Fri Sep 24 23:05:36 2021 +
Commit: William Hubbs  gentoo  org>
CommitDate: Fri Sep 24 23:05:36 2021 +
URL:https://gitweb.gentoo.org/proj/baselayout.git/commit/?id=57c250e2

generate /usr/lib/os-release dynamically

This allows the os name and version to be dynamic.

Bug: https://bugs.gentoo.org/788190

Signed-off-by: William Hubbs  gentoo.org>

 Makefile |  3 +++
 etc.BSD/os-release   |  7 ---
 etc.Linux/os-release |  7 ---
 make_os_release  | 15 +++
 4 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/Makefile b/Makefile
index a0204748..8d74853e 100644
--- a/Makefile
+++ b/Makefile
@@ -66,6 +66,9 @@ install:
echo "Gentoo Base System release ${PV}" > ${DESTDIR}/etc/gentoo-release
$(INSTALL_DIR) $(DESTDIR)/usr/share/baselayout
cp -pPR share.$(OS)/* $(DESTDIR)/usr/share/baselayout/
+   $(INSTALL_DIR) $(DESTDIR)/usr/lib
+   ./make_os_release $(OS) $(PV) > $(DESTDIR)/usr/lib/os-release
+   ln -snf ../usr/lib/os-release ${DESTDIR}/etc/os-release
 
 layout-dirs:
# Create base filesytem layout

diff --git a/etc.BSD/os-release b/etc.BSD/os-release
deleted file mode 100644
index d1d93391..
--- a/etc.BSD/os-release
+++ /dev/null
@@ -1,7 +0,0 @@
-NAME=Gentoo
-ID=gentoo
-PRETTY_NAME="Gentoo/BSD"
-ANSI_COLOR="1;32"
-HOME_URL="https://www.gentoo.org/;
-SUPPORT_URL="https://www.gentoo.org/support/;
-BUG_REPORT_URL="https://bugs.gentoo.org/;

diff --git a/etc.Linux/os-release b/etc.Linux/os-release
deleted file mode 100644
index b8274bc8..
--- a/etc.Linux/os-release
+++ /dev/null
@@ -1,7 +0,0 @@
-NAME=Gentoo
-ID=gentoo
-PRETTY_NAME="Gentoo Linux"
-ANSI_COLOR="1;32"
-HOME_URL="https://www.gentoo.org/;
-SUPPORT_URL="https://www.gentoo.org/support/;
-BUG_REPORT_URL="https://bugs.gentoo.org/;

diff --git a/make_os_release b/make_os_release
new file mode 100755
index ..f764309c
--- /dev/null
+++ b/make_os_release
@@ -0,0 +1,15 @@
+#!/bin/sh
+if [ -z "${1}" ] || [ -z "${2}" ]; then
+   printf 'usage: %s [os] [version]' "${0##*/}" >&2
+   exit 1
+fi
+cat 

[gentoo-commits] proj/baselayout:master commit in: etc.Linux/, etc.BSD/

2016-08-28 Thread William Hubbs
commit: e302b8402399f18ecfe856c854a3d247cc2c646f
Author: William Hubbs  gentoo  org>
AuthorDate: Sun Aug 28 16:52:37 2016 +
Commit: William Hubbs  gentoo  org>
CommitDate: Sun Aug 28 16:52:37 2016 +
URL:https://gitweb.gentoo.org/proj/baselayout.git/commit/?id=e302b840

os-release: Update Gentoo web site and support URLs

https://bugs.gentoo.org/show_bug.cgi?id=545516

 etc.BSD/os-release   | 4 ++--
 etc.Linux/os-release | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/etc.BSD/os-release b/etc.BSD/os-release
index d15cc51..d1d9339 100644
--- a/etc.BSD/os-release
+++ b/etc.BSD/os-release
@@ -2,6 +2,6 @@ NAME=Gentoo
 ID=gentoo
 PRETTY_NAME="Gentoo/BSD"
 ANSI_COLOR="1;32"
-HOME_URL="http://www.gentoo.org/;
-SUPPORT_URL="http://www.gentoo.org/main/en/support.xml;
+HOME_URL="https://www.gentoo.org/;
+SUPPORT_URL="https://www.gentoo.org/support/;
 BUG_REPORT_URL="https://bugs.gentoo.org/;

diff --git a/etc.Linux/os-release b/etc.Linux/os-release
index 44ff8fb..2a75fec 100644
--- a/etc.Linux/os-release
+++ b/etc.Linux/os-release
@@ -2,6 +2,6 @@ NAME=Gentoo
 ID=gentoo
 PRETTY_NAME="Gentoo/Linux"
 ANSI_COLOR="1;32"
-HOME_URL="http://www.gentoo.org/;
-SUPPORT_URL="http://www.gentoo.org/main/en/support.xml;
+HOME_URL="https://www.gentoo.org/;
+SUPPORT_URL="https://www.gentoo.org/support/;
 BUG_REPORT_URL="https://bugs.gentoo.org/;