0002-FSDG-os-release-Default-PRETTY_NAME-to-GNU-Linux-ins.patch 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. From 301445311b5161c61270163c8921b729ab9e10d8 Mon Sep 17 00:00:00 2001
  2. From: Luke Shumaker <lukeshu@parabola.nu>
  3. Date: Wed, 25 May 2016 12:23:40 -0400
  4. Subject: [PATCH 2/7] FSDG: os-release: Default PRETTY_NAME to "GNU/Linux"
  5. instead of "Linux"
  6. ---
  7. man/kernel-install.xml | 2 +-
  8. man/os-release.xml | 2 +-
  9. src/analyze/analyze.c | 2 +-
  10. src/core/main.c | 4 ++--
  11. src/firstboot/firstboot.c | 2 +-
  12. src/kernel-install/90-loaderentry.install | 2 +-
  13. 6 files changed, 7 insertions(+), 7 deletions(-)
  14. diff --git a/man/kernel-install.xml b/man/kernel-install.xml
  15. index 34bb5d2f1e..d22945b5c4 100644
  16. --- a/man/kernel-install.xml
  17. +++ b/man/kernel-install.xml
  18. @@ -94,7 +94,7 @@
  19. <filename>$BOOT/loader/entries/<replaceable>MACHINE-ID</replaceable>-<replaceable>KERNEL-VERSION</replaceable>.conf</filename>.
  20. The title of the entry is the <replaceable>PRETTY_NAME</replaceable> parameter specified in
  21. <filename>/etc/os-release</filename> or <filename>/usr/lib/os-release</filename> (if the former is
  22. - missing), or "Linux <replaceable>KERNEL-VERSION</replaceable>", if unset.</para>
  23. + missing), or "GNU/Linux <replaceable>KERNEL-VERSION</replaceable>", if unset.</para>
  24. <para>If the entry directory
  25. <filename>$BOOT/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/</filename>
  26. diff --git a/man/os-release.xml b/man/os-release.xml
  27. index 5a5e318f75..1afaa679c9 100644
  28. --- a/man/os-release.xml
  29. +++ b/man/os-release.xml
  30. @@ -184,7 +184,7 @@
  31. suitable for presentation to the user. May or may not contain
  32. a release code name or OS version of some kind, as suitable.
  33. If not set, defaults to
  34. - <literal>PRETTY_NAME="Linux"</literal>. Example:
  35. + <literal>PRETTY_NAME="GNU/Linux"</literal>. Example:
  36. <literal>PRETTY_NAME="Fedora 17 (Beefy
  37. Miracle)"</literal>.</para></listitem>
  38. </varlistentry>
  39. diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c
  40. index 4d81026084..f18bd92289 100644
  41. --- a/src/analyze/analyze.c
  42. +++ b/src/analyze/analyze.c
  43. @@ -747,7 +747,7 @@ static int analyze_plot(int argc, char *argv[], void *userdata) {
  44. svg("<text x=\"20\" y=\"50\">%s</text>", pretty_times);
  45. if (host)
  46. svg("<text x=\"20\" y=\"30\">%s %s (%s %s %s) %s %s</text>",
  47. - isempty(host->os_pretty_name) ? "Linux" : host->os_pretty_name,
  48. + isempty(host->os_pretty_name) ? "GNU/Linux" : host->os_pretty_name,
  49. strempty(host->hostname),
  50. strempty(host->kernel_name),
  51. strempty(host->kernel_release),
  52. diff --git a/src/core/main.c b/src/core/main.c
  53. index bcce7178a8..7bebcc9e28 100644
  54. --- a/src/core/main.c
  55. +++ b/src/core/main.c
  56. @@ -1242,11 +1242,11 @@ static int status_welcome(void) {
  57. return status_printf(NULL, 0,
  58. "\nWelcome to \x1B[%sm%s\x1B[0m!\n",
  59. isempty(ansi_color) ? "1" : ansi_color,
  60. - isempty(pretty_name) ? "Linux" : pretty_name);
  61. + isempty(pretty_name) ? "GNU/Linux" : pretty_name);
  62. else
  63. return status_printf(NULL, 0,
  64. "\nWelcome to %s!\n",
  65. - isempty(pretty_name) ? "Linux" : pretty_name);
  66. + isempty(pretty_name) ? "GNU/Linux" : pretty_name);
  67. }
  68. static int write_container_id(void) {
  69. diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c
  70. index c9fc8dd5cd..ffaa1c1c13 100644
  71. --- a/src/firstboot/firstboot.c
  72. +++ b/src/firstboot/firstboot.c
  73. @@ -112,7 +112,7 @@ static void print_welcome(void) {
  74. log_full_errno(r == -ENOENT ? LOG_DEBUG : LOG_WARNING, r,
  75. "Failed to read os-release file, ignoring: %m");
  76. - pn = isempty(pretty_name) ? "Linux" : pretty_name;
  77. + pn = isempty(pretty_name) ? "GNU/Linux" : pretty_name;
  78. ac = isempty(ansi_color) ? "0" : ansi_color;
  79. if (colors_enabled())
  80. diff --git a/src/kernel-install/90-loaderentry.install b/src/kernel-install/90-loaderentry.install
  81. index 47a0cd224a..9ff48a9d5c 100644
  82. --- a/src/kernel-install/90-loaderentry.install
  83. +++ b/src/kernel-install/90-loaderentry.install
  84. @@ -42,7 +42,7 @@ elif [[ -f /usr/lib/os-release ]]; then
  85. fi
  86. if ! [[ $PRETTY_NAME ]]; then
  87. - PRETTY_NAME="Linux $KERNEL_VERSION"
  88. + PRETTY_NAME="GNU/Linux $KERNEL_VERSION"
  89. fi
  90. if [[ -f /etc/kernel/cmdline ]]; then
  91. --
  92. 2.18.0