summaryrefslogtreecommitdiff
path: root/libre/systemd/0002-FSDG-os-release-Default-PRETTY_NAME-to-GNU-Linux-ins.patch
blob: 86a70146cf794ebe8cfedbcdd2fe2ff46d8c0256 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
From 293085b65a8b11ce0be42c78e9deeaa36b4ff1ec Mon Sep 17 00:00:00 2001
From: Luke Shumaker <lukeshu@parabola.nu>
Date: Wed, 25 May 2016 12:23:40 -0400
Subject: [PATCH 2/7] FSDG: os-release: Default PRETTY_NAME to "GNU/Linux"
 instead of "Linux"

---
 man/check-os-release-simple.py               | 2 +-
 man/check-os-release.py                      | 2 +-
 man/check-os-release.sh                      | 2 +-
 man/kernel-install.xml                       | 2 +-
 man/os-release.xml                           | 2 +-
 src/basic/os-util.c                          | 2 +-
 src/kernel-install/90-loaderentry.install.in | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/man/check-os-release-simple.py b/man/check-os-release-simple.py
index ce73c77b14..9ad899a814 100644
--- a/man/check-os-release-simple.py
+++ b/man/check-os-release-simple.py
@@ -4,7 +4,7 @@
 import platform
 os_release = platform.freedesktop_os_release()
 
-pretty_name = os_release.get('PRETTY_NAME', 'Linux')
+pretty_name = os_release.get('PRETTY_NAME', 'GNU/Linux')
 print(f'Running on {pretty_name!r}')
 
 if 'fedora' in [os_release.get('ID', 'linux'),
diff --git a/man/check-os-release.py b/man/check-os-release.py
index 19b193ec76..373b77ed06 100644
--- a/man/check-os-release.py
+++ b/man/check-os-release.py
@@ -29,7 +29,7 @@ def read_os_release():
 
 os_release = dict(read_os_release())
 
-pretty_name = os_release.get('PRETTY_NAME', 'Linux')
+pretty_name = os_release.get('PRETTY_NAME', 'GNU/Linux')
 print(f'Running on {pretty_name!r}')
 
 if 'debian' in [os_release.get('ID', 'linux'),
diff --git a/man/check-os-release.sh b/man/check-os-release.sh
index 12f7ee12cc..084647a38b 100644
--- a/man/check-os-release.sh
+++ b/man/check-os-release.sh
@@ -4,7 +4,7 @@
 test -e /etc/os-release && os_release='/etc/os-release' || os_release='/usr/lib/os-release'
 . "${os_release}"
 
-echo "Running on ${PRETTY_NAME:-Linux}"
+echo "Running on ${PRETTY_NAME:-GNU/Linux}"
 
 if [ "${ID:-linux}" = "debian" ] || [ "${ID_LIKE#*debian*}" != "${ID_LIKE}" ]; then
     echo "Looks like Debian!"
diff --git a/man/kernel-install.xml b/man/kernel-install.xml
index c05176a5dc..df8b11b4ee 100644
--- a/man/kernel-install.xml
+++ b/man/kernel-install.xml
@@ -135,7 +135,7 @@
             <filename>$BOOT/loader/entries/<replaceable>ENTRY-TOKEN</replaceable>-<replaceable>KERNEL-VERSION</replaceable>.conf</filename>.
             The title of the entry is the <replaceable>PRETTY_NAME</replaceable> parameter specified in
             <filename>/etc/os-release</filename> or <filename>/usr/lib/os-release</filename> (if the former
-            is missing), or "Linux <replaceable>KERNEL-VERSION</replaceable>", if unset.</para>
+            is missing), or "GNU/Linux <replaceable>KERNEL-VERSION</replaceable>", if unset.</para>
 
             <para>If <varname>$KERNEL_INSTALL_LAYOUT</varname> is not "bls", this plugin does nothing.</para></listitem>
 
diff --git a/man/os-release.xml b/man/os-release.xml
index f2e0f3ecb7..4aad523fa4 100644
--- a/man/os-release.xml
+++ b/man/os-release.xml
@@ -188,7 +188,7 @@
 
           <listitem><para>A pretty operating system name in a format suitable for presentation to the
           user. May or may not contain a release code name or OS version of some kind, as suitable. If not
-          set, a default of <literal>PRETTY_NAME="Linux"</literal> may be used</para>
+          set, a default of <literal>PRETTY_NAME="GNU/Linux"</literal> may be used</para>
 
           <para>Example: <literal>PRETTY_NAME="Fedora 17 (Beefy Miracle)"</literal>.</para></listitem>
         </varlistentry>
diff --git a/src/basic/os-util.c b/src/basic/os-util.c
index dbd067fd44..c03a76862d 100644
--- a/src/basic/os-util.c
+++ b/src/basic/os-util.c
@@ -438,5 +438,5 @@ const char *os_release_pretty_name(const char *pretty_name, const char *name) {
          * exists mostly to ensure we use the same logic wherever possible. */
 
         return empty_to_null(pretty_name) ?:
-                empty_to_null(name) ?: "Linux";
+                empty_to_null(name) ?: "GNU/Linux";
 }
diff --git a/src/kernel-install/90-loaderentry.install.in b/src/kernel-install/90-loaderentry.install.in
index a52dd812e4..00b4c6917d 100755
--- a/src/kernel-install/90-loaderentry.install.in
+++ b/src/kernel-install/90-loaderentry.install.in
@@ -66,7 +66,7 @@ elif [ -f /usr/lib/os-release ]; then
     . /usr/lib/os-release
 fi
 
-[ -n "$PRETTY_NAME" ] || PRETTY_NAME="Linux $KERNEL_VERSION"
+[ -n "$PRETTY_NAME" ] || PRETTY_NAME="GNU/Linux $KERNEL_VERSION"
 
 SORT_KEY="$IMAGE_ID"
 [ -z "$SORT_KEY" ] && SORT_KEY="$ID"
-- 
2.44.0