From 0f14b3f0b00e52fce112ce5777964f893ed1550e5aa97b95e1d4def9907e2e57 Mon Sep 17 00:00:00 2001 From: Andrei Borzenkov Date: Fri, 28 Oct 2016 09:04:35 +0000 Subject: [PATCH] Accepting request 437593 from home:michael-chang:branches:Base:System - Fix new line character in distributor (bsc#1007212) * modified grub2-default-distributor.patch OBS-URL: https://build.opensuse.org/request/show/437593 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=238 --- grub2-default-distributor.patch | 9 ++++++--- grub2.changes | 6 ++++++ grub2.spec | 3 +-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/grub2-default-distributor.patch b/grub2-default-distributor.patch index 3247955..0eda6ab 100644 --- a/grub2-default-distributor.patch +++ b/grub2-default-distributor.patch @@ -2,7 +2,7 @@ Index: grub-2.02~beta3/grub-core/osdep/unix/config.c =================================================================== --- grub-2.02~beta3.orig/grub-core/osdep/unix/config.c +++ grub-2.02~beta3/grub-core/osdep/unix/config.c -@@ -61,6 +61,140 @@ grub_util_get_localedir (void) +@@ -61,6 +61,143 @@ grub_util_get_localedir (void) return LOCALEDIR; } @@ -94,6 +94,9 @@ Index: grub-2.02~beta3/grub-core/osdep/unix/config.c + + while (fgets (buf, sizeof (buf), fp)) + { ++ if (buf[grub_strlen(buf) - 1] == '\n') ++ buf[grub_strlen(buf) - 1] = '\0'; ++ + if (!os_pretty_name + && (os_pretty_name = os_release_get_val (buf, "PRETTY_NAME"))) + continue; @@ -143,7 +146,7 @@ Index: grub-2.02~beta3/grub-core/osdep/unix/config.c void grub_util_load_config (struct grub_util_config *cfg) { -@@ -125,7 +259,17 @@ grub_util_load_config (struct grub_util_ +@@ -125,7 +262,17 @@ grub_util_load_config (struct grub_util_ waitpid (pid, NULL, 0); } if (f) @@ -162,7 +165,7 @@ Index: grub-2.02~beta3/grub-core/osdep/unix/config.c f = grub_util_fopen (cfgfile, "r"); if (f) -@@ -136,4 +280,13 @@ grub_util_load_config (struct grub_util_ +@@ -136,4 +283,13 @@ grub_util_load_config (struct grub_util_ else grub_util_warn (_("cannot open configuration file `%s': %s"), cfgfile, strerror (errno)); diff --git a/grub2.changes b/grub2.changes index 88815dd..baeb394 100644 --- a/grub2.changes +++ b/grub2.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Oct 28 04:08:19 UTC 2016 - mchang@suse.com + +- Fix new line character in distributor (bsc#1007212) + * modified grub2-default-distributor.patch + ------------------------------------------------------------------- Fri Oct 21 09:34:58 UTC 2016 - mchang@suse.com diff --git a/grub2.spec b/grub2.spec index c59ec26..fa7b6f5 100644 --- a/grub2.spec +++ b/grub2.spec @@ -14,10 +14,9 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - - # needssslcertforbuild + Name: grub2 %ifarch x86_64 ppc64 BuildRequires: gcc-32bit