From 0edc8509932ab5c684c007e35bdb4e46adbd2fad1fa0da02fe4aba07b9654a4f Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Mon, 30 Jul 2012 18:27:32 +0000 Subject: [PATCH] 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 --- grub2-enable-theme-for-terminal-window.patch | 14 ++++++++++ grub2-stdio.in.patch | 27 ++++++++++++++++++++ grub2.changes | 10 ++++++++ grub2.spec | 4 +++ 4 files changed, 55 insertions(+) create mode 100644 grub2-enable-theme-for-terminal-window.patch create mode 100644 grub2-stdio.in.patch diff --git a/grub2-enable-theme-for-terminal-window.patch b/grub2-enable-theme-for-terminal-window.patch new file mode 100644 index 0000000..5b4dff6 --- /dev/null +++ b/grub2-enable-theme-for-terminal-window.patch @@ -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 ;; diff --git a/grub2-stdio.in.patch b/grub2-stdio.in.patch new file mode 100644 index 0000000..96ad43d --- /dev/null +++ b/grub2-stdio.in.patch @@ -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@ diff --git a/grub2.changes b/grub2.changes index 108ee42..7bffbc0 100644 --- a/grub2.changes +++ b/grub2.changes @@ -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 diff --git a/grub2.spec b/grub2.spec index 20e5aec..1644cd0 100644 --- a/grub2.spec +++ b/grub2.spec @@ -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