Accepting request 129226 from devel:openSUSE:Factory

Fix build with missing gets declaration (glibc 2.16) (forwarded request 129225 from a_jaeger)

OBS-URL: https://build.opensuse.org/request/show/129226
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grub2?expand=0&rev=42
This commit is contained in:
Stephan Kulow 2012-07-30 18:27:32 +00:00 committed by Git OBS Bridge
parent ecac8f86f6
commit 0edc850993
4 changed files with 55 additions and 0 deletions

View File

@ -0,0 +1,14 @@
--- a/util/grub.d/00_header.in 2012-03-27 21:45:08.992732967 -0400
+++ b/util/grub.d/00_header.in 2012-03-27 21:45:08.992732967 -0400
@@ -253,8 +253,9 @@
set theme=(\$root)`make_system_path_relative_to_its_root $GRUB_THEME`
export theme
EOF
- elif [ "x$GRUB_BACKGROUND" != x ] && [ -f "$GRUB_BACKGROUND" ] \
- && is_path_readable_by_grub "$GRUB_BACKGROUND"; then
+ fi
+ if [ "x$GRUB_BACKGROUND" != x ] && [ -f "$GRUB_BACKGROUND" ] \
+ && is_path_readable_by_grub "$GRUB_BACKGROUND"; then
gettext_printf "Found background: %s\n" "$GRUB_BACKGROUND" >&2
case "$GRUB_BACKGROUND" in
*.png) reader=png ;;

27
grub2-stdio.in.patch Normal file
View File

@ -0,0 +1,27 @@
From: Andreas Jaeger
Date: Sat Jul 28 14:17:56 UTC 2012
Subject: [PATCH] Fix stdio.in.h with glibc 2.16
stdio.in.h expects that gets is declared but this is not the
case with ISO C11 anymore which glibc 2.16 follows.
This is a patch to a file that grub takes from gnulib - and is
fixed in upstream gnulib and will thus be in grub2 once this
file gets regenerated with a newer grub release.
Patch-Mainline: no
Index: grub-2.00/grub-2.00/grub-core/gnulib/stdio.in.h
===================================================================
--- grub-2.00.orig/grub-2.00/grub-core/gnulib/stdio.in.h
+++ grub-2.00/grub-2.00/grub-core/gnulib/stdio.in.h
@@ -141,7 +141,9 @@ _GL_WARN_ON_USE (fflush, "fflush is not
so any use of gets warrants an unconditional warning. Assume it is
always declared, since it is required by C89. */
#undef gets
+#if HAVE_RAW_DECL_GETS
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+#endif
#if @GNULIB_FOPEN@
# if @REPLACE_FOPEN@

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Sat Jul 28 14:17:56 UTC 2012 - aj@suse.de
- Fix build with missing gets declaration (glibc 2.16)
-------------------------------------------------------------------
Fri Jul 27 13:22:24 UTC 2012 - tittiatcoke@gmail.com
- Add grub2-enable-theme-for-terminal-window.patch (bnc#770107)
-------------------------------------------------------------------
Thu Jul 19 11:03:37 UTC 2012 - mchang@suse.com

View File

@ -88,6 +88,8 @@ Patch9: grub2-GRUB_CMDLINE_LINUX_RECOVERY-for-recovery-mode.patch
Patch10: grub2-fix-error-terminal-gfxterm-isn-t-found.patch
Patch11: grub2-fix-mo-not-copied-to-grubdir-locale.patch
Patch12: grub2-fix-menu-in-xen-host-server.patch
Patch13: grub2-enable-theme-for-terminal-window.patch
Patch14: grub2-stdio.in.patch
Patch99: use-grub2-efi-as-a-package-name.patch
PreReq: perl-Bootloader
Requires: gettext-runtime
@ -147,6 +149,8 @@ cd grub-%{version}
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p2
cd ..
# README.openSUSE