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
This commit is contained in:
Andrei Borzenkov 2016-10-28 09:04:35 +00:00 committed by Git OBS Bridge
parent 8da1cb3353
commit 0f14b3f0b0
3 changed files with 13 additions and 5 deletions

View File

@ -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));

View File

@ -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

View File

@ -14,10 +14,9 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# needssslcertforbuild
Name: grub2
%ifarch x86_64 ppc64
BuildRequires: gcc-32bit