Date: Monday, June 24, 2013 @ 19:25:09 Author: tpowa Revision: 188896
upgpkg: grub 2.00.5043-1 build latest bzr snapshot, fixes gcc issues on efi boot Modified: grub/trunk/PKGBUILD grub/trunk/archlinux_grub_mkconfig_fixes.patch Deleted: grub/trunk/0069-Backport-gnulib-fixes-for-C11.-Fixes-Savannah-bug-37.patch grub/trunk/grub-2.00-fix-docs.patch -----------------------------------------------------------------+ 0069-Backport-gnulib-fixes-for-C11.-Fixes-Savannah-bug-37.patch | 50 ------ PKGBUILD | 75 ++++------ archlinux_grub_mkconfig_fixes.patch | 14 - grub-2.00-fix-docs.patch | 21 -- 4 files changed, 38 insertions(+), 122 deletions(-) Deleted: 0069-Backport-gnulib-fixes-for-C11.-Fixes-Savannah-bug-37.patch =================================================================== --- 0069-Backport-gnulib-fixes-for-C11.-Fixes-Savannah-bug-37.patch 2013-06-24 14:42:37 UTC (rev 188895) +++ 0069-Backport-gnulib-fixes-for-C11.-Fixes-Savannah-bug-37.patch 2013-06-24 17:25:09 UTC (rev 188896) @@ -1,50 +0,0 @@ -From d09689a5a2863043d007c1acb9bf0a8d1d3b776d Mon Sep 17 00:00:00 2001 -From: Colin Watson <[email protected]> -Date: Fri, 28 Dec 2012 06:43:35 +0000 -Subject: [PATCH 069/364] Backport gnulib fixes for C11. Fixes Savannah bug - #37738. - -* grub-core/gnulib/stdio.in.h (gets): Warn on use only if -HAVE_RAW_DECL_GETS. -* m4/stdio_h.m4 (gl_STDIO_H): Check for gets. ---- - ChangeLog | 8 ++++++++ - grub-core/gnulib/stdio.in.h | 6 ++++-- - m4/stdio_h.m4 | 2 +- - 3 files changed, 13 insertions(+), 3 deletions(-) - -diff --git a/grub-core/gnulib/stdio.in.h b/grub-core/gnulib/stdio.in.h -index 80b9dbf..a8b00c6 100644 ---- a/grub-core/gnulib/stdio.in.h -+++ b/grub-core/gnulib/stdio.in.h -@@ -138,10 +138,12 @@ _GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " - #endif - - /* It is very rare that the developer ever has full control of stdin, -- so any use of gets warrants an unconditional warning. Assume it is -- always declared, since it is required by C89. */ -+ so any use of gets warrants an unconditional warning; besides, C11 -+ removed it. */ - #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/m4/stdio_h.m4 b/m4/stdio_h.m4 -index f5650cd..8458bec 100644 ---- a/m4/stdio_h.m4 -+++ b/m4/stdio_h.m4 -@@ -37,7 +37,7 @@ AC_DEFUN([gl_STDIO_H], - dnl corresponding gnulib module is not in use, and which is not - dnl guaranteed by C89. - gl_WARN_ON_USE_PREPARE([[#include <stdio.h> -- ]], [dprintf fpurge fseeko ftello getdelim getline popen renameat -+ ]], [dprintf fpurge fseeko ftello getdelim getline gets popen renameat - snprintf tmpfile vdprintf vsnprintf]) - ]) - --- -1.8.1.4 - Modified: PKGBUILD =================================================================== --- PKGBUILD 2013-06-24 14:42:37 UTC (rev 188895) +++ PKGBUILD 2013-06-24 17:25:09 UTC (rev 188896) @@ -2,14 +2,16 @@ # Maintainer : Ronald van Haren <ronald.archlinux.org> # Contributor: Keshav Padram (the.ridikulus.rat) (aatt) (gemmaeiil) (ddoott) (ccoomm)> -## grub-extras lua and gpxe fail to build +_GRUB_BZR_REV="5043" +## grub-extras lua and gpxe fail to build with grub bzr rev 5043 + [[ "${CARCH}" == "x86_64" ]] && _EFI_ARCH="x86_64" [[ "${CARCH}" == "i686" ]] && _EFI_ARCH="i386" pkgname=grub pkgdesc="GNU GRand Unified Bootloader (2)" -pkgver=2.00 +pkgver=2.00.${_GRUB_BZR_REV} pkgrel=1 url="https://www.gnu.org/software/grub/" arch=('x86_64' 'i686') @@ -18,7 +20,7 @@ install="${pkgname}.install" options=('!makeflags') -conflicts=('grub-legacy' 'grub-common' 'grub-bios' "grub-efi-${_EFI_ARCH}") +conflicts=('grub-common' 'grub-bios' "grub-efi-${_EFI_ARCH}" 'grub-legacy') replaces=('grub-common' 'grub-bios' "grub-efi-${_EFI_ARCH}") provides=('grub-common' 'grub-bios' "grub-efi-${_EFI_ARCH}") @@ -27,51 +29,44 @@ depends=('sh' 'xz' 'gettext' 'device-mapper') optdepends=('freetype2: For grub-mkfont usage' 'fuse: For grub-mount usage' - 'dosfstools: For EFI support' + 'dosfstools: For grub-mkrescue FAT FS and EFI support' 'efibootmgr: For grub-install EFI support' 'libisoburn: Provides xorriso for generating grub rescue iso using grub-mkrescue' 'os-prober: To detect other OSes when generating grub.cfg in BIOS systems' 'mtools: For grub-mkrescue FAT FS support') -source=("http://ftp.gnu.org/gnu/grub/grub-${pkgver}.tar.xz" - '0069-Backport-gnulib-fixes-for-C11.-Fixes-Savannah-bug-37.patch' - 'grub-2.00-fix-docs.patch' +# source=("http://ftp.gnu.org/gnu/grub/grub-${pkgver}.tar.xz" +source=("grub-${pkgver}::bzr+bzr://bzr.savannah.gnu.org/grub/trunk/grub/#revision=${_GRUB_BZR_REV}" 'archlinux_grub_mkconfig_fixes.patch' '60_memtest86+' 'grub.default' 'grub.cfg') for _DIR_ in 915resolution ntldr-img ; do - source+=("grub-extras-${_DIR_}::bzr+bzr://bzr.savannah.gnu.org/grub-extras/${_DIR_}/") + source+=("grub-extras-${_DIR_}::bzr+bzr://bzr.savannah.gnu.org/grub-extras/${_DIR_}/#revision=") done -source+=("grub-extras-lua::bzr+bzr://bzr.savannah.gnu.org/grub-extras/lua/#revision=24" - "grub-extras-gpxe::bzr+bzr://bzr.savannah.gnu.org/grub-extras/gpxe/#revision=13") - -sha1sums=('274d91e96b56a5b9dd0a07accff69dbb6dfb596b' - 'b68565bc155094bade390c257c3f31bc55ae244b' - '1dc08391bb13f8e23faa21a76cc4cc4b25467702' - '26e4e946190bea1f03632658cf08ba90e11dec57' +# sha1sums=('274d91e96b56a5b9dd0a07accff69dbb6dfb596b' +sha1sums=('SKIP' + 'e7fd9161057411b1adc22977d4b3e7c06116239d' '2aa2deeb7d7dc56f389aa1487b7a57b0d44ce559' 'dbf493dec4722feb11f0b5c71ad453a18daf0fc5' '5b7fcb0718a23035c039eb2fda9e088bb13ae611' 'SKIP' - 'SKIP' - 'SKIP' 'SKIP') _build_grub-common_and_bios() { ## Copy the source for building the common/bios package - cp -r "${srcdir}/grub-${pkgver}" "${srcdir}/grub-bios-${pkgver}" - cd "${srcdir}/grub-bios-${pkgver}/" + cp -r "${srcdir}/grub-${pkgver}" "${srcdir}/grub-${pkgver}-bios" + cd "${srcdir}/grub-${pkgver}-bios/" ## Add the grub-extra sources - export GRUB_CONTRIB="${srcdir}/grub-bios-${pkgver}/grub-extras/" + export GRUB_CONTRIB="${srcdir}/grub-${pkgver}-bios/grub-extras/" - install -d "${srcdir}/grub-bios-${pkgver}/grub-extras" - for _DIR_ in 915resolution ntldr-img lua gpxe ; do - cp -r "${srcdir}/grub-extras-${_DIR_}" "${srcdir}/grub-bios-${pkgver}/grub-extras/${_DIR_}" + install -d "${srcdir}/grub-${pkgver}-bios/grub-extras" + for _DIR_ in 915resolution ntldr-img ; do + cp -r "${srcdir}/grub-extras-${_DIR_}" "${srcdir}/grub-${pkgver}-bios/grub-extras/${_DIR_}" done ## Unset all compiler FLAGS for bios build @@ -82,11 +77,11 @@ unset MAKEFLAGS ## Start the actual build process - cd "${srcdir}/grub-bios-${pkgver}/" + cd "${srcdir}/grub-${pkgver}-bios/" ./autogen.sh echo - CFLAGS="-fno-stack-protector" ./configure \ + ./configure \ --with-platform="pc" \ --target="i386" \ "${_EFIEMU}" \ @@ -116,15 +111,15 @@ _build_grub-efi() { ## Copy the source for building the efi package - cp -r "${srcdir}/grub-${pkgver}" "${srcdir}/grub-efi-${pkgver}" - cd "${srcdir}/grub-efi-${pkgver}/" + cp -r "${srcdir}/grub-${pkgver}" "${srcdir}/grub-${pkgver}-efi" + cd "${srcdir}/grub-${pkgver}-efi/" - export GRUB_CONTRIB="${srcdir}/grub-efi-${pkgver}/grub-extras/" + # export GRUB_CONTRIB="${srcdir}/grub-${pkgver}-efi/grub-extras/" - install -d "${srcdir}/grub-efi-${pkgver}/grub-extras/" - for _DIR_ in lua gpxe ; do - cp -r "${srcdir}/grub-extras-${_DIR_}" "${srcdir}/grub-bios-${pkgver}/grub-extras/${_DIR_}" - done + # install -d "${srcdir}/grub-${pkgver}-efi/grub-extras/" + # for _DIR_ in lua gpxe ; do + # cp -r "${srcdir}/grub-extras-${_DIR_}" "${srcdir}/grub-${pkgver}-bios/grub-extras/${_DIR_}" + # done ## Unset all compiler FLAGS for efi build unset CFLAGS @@ -133,7 +128,7 @@ unset LDFLAGS unset MAKEFLAGS - cd "${srcdir}/grub-efi-${pkgver}/" + cd "${srcdir}/grub-${pkgver}-efi/" ./autogen.sh echo @@ -176,14 +171,6 @@ cd "${srcdir}/grub-${pkgver}/" - ## Fix compiling with gcc48 - patch -Np1 -i "${srcdir}/0069-Backport-gnulib-fixes-for-C11.-Fixes-Savannah-bug-37.patch" - echo - - ## Fix docs compiling - patch -Np1 -i "${srcdir}/grub-2.00-fix-docs.patch" - echo - ## Apply Archlinux specific fixes to enable grub-mkconfig detect Arch kernels and initramfs patch -Np1 -i "${srcdir}/archlinux_grub_mkconfig_fixes.patch" echo @@ -207,7 +194,7 @@ _package_grub-common_and_bios() { - cd "${srcdir}/grub-bios-${pkgver}/" + cd "${srcdir}/grub-${pkgver}-bios/" make DESTDIR="${pkgdir}/" bashcompletiondir="/usr/share/bash-completion/completions" install echo @@ -232,8 +219,8 @@ _package_grub-efi() { - cd "${srcdir}/grub-efi-${pkgver}/" - make DESTDIR="${pkgdir}/" install + cd "${srcdir}/grub-${pkgver}-efi/" + make DESTDIR="${pkgdir}/" bashcompletiondir="/usr/share/bash-completion/completions" install echo ## remove gdb debugging related files Modified: archlinux_grub_mkconfig_fixes.patch =================================================================== --- archlinux_grub_mkconfig_fixes.patch 2013-06-24 14:42:37 UTC (rev 188895) +++ archlinux_grub_mkconfig_fixes.patch 2013-06-24 17:25:09 UTC (rev 188896) @@ -1,8 +1,8 @@ diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in -index 516be86..5f37db2 100644 +index 8decc1d..170047f 100644 --- a/util/grub-mkconfig.in +++ b/util/grub-mkconfig.in -@@ -213,6 +213,8 @@ export GRUB_DEFAULT \ +@@ -212,6 +212,8 @@ export GRUB_DEFAULT \ GRUB_THEME \ GRUB_GFXPAYLOAD_LINUX \ GRUB_DISABLE_OS_PROBER \ @@ -12,10 +12,10 @@ GRUB_SAVEDEFAULT \ GRUB_ENABLE_CRYPTODISK \ diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in -index 765bfdc..b148558 100644 +index 2c4bb0a..c7120d2 100644 --- a/util/grub.d/00_header.in +++ b/util/grub.d/00_header.in -@@ -115,6 +115,14 @@ cat <<EOF +@@ -125,6 +125,14 @@ cat <<EOF EOF @@ -31,7 +31,7 @@ gfxterm=0; for x in ${GRUB_TERMINAL_INPUT} ${GRUB_TERMINAL_OUTPUT}; do diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in -index 14402e8..64c9bb5 100644 +index 0724e16..a8119bd 100644 --- a/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in @@ -87,6 +87,8 @@ linux_entry () @@ -49,7 +49,7 @@ fi - if [ x$type != xrecovery ] ; then + if [ x$type != xrecovery ] && [ x$type != xfallback ] ; then - save_default_entry | sed -e "s/^/\t/" + save_default_entry | grub_add_tab fi @@ -132,7 +134,8 @@ linux_entry () @@ -60,7 +60,7 @@ + + message="$(gettext_printf "Loading Linux %s ..." "${version}")" sed "s/^/$submenu_indentation/" << EOF - echo '$message' + echo '$(echo "$message" | grub_quote)' linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args} @@ -190,7 +193,22 @@ while [ "x$list" != "x" ] ; do alt_version=`echo $version | sed -e "s,\.old$,,g"` Deleted: grub-2.00-fix-docs.patch =================================================================== --- grub-2.00-fix-docs.patch 2013-06-24 14:42:37 UTC (rev 188895) +++ grub-2.00-fix-docs.patch 2013-06-24 17:25:09 UTC (rev 188896) @@ -1,21 +0,0 @@ -From 40d6b00fa48ae9c1cecf143da5c6061f6ffcb719 Mon Sep 17 00:00:00 2001 -From: Ray Strode <[email protected] -Date: Tue, 12 Mar 2013 15:23:02 -0400 -Subject: [PATCH] Fix docs - -I think the doc generation tools got stricter, so fix up the .texi file -to work. - -diff --git a/docs/grub-dev.texi b/docs/grub-dev.texi ---- a/docs/grub-dev.texi -+++ b/docs/grub-dev.texi -@@ -1394,8 +1394,8 @@ grub_video_blit_glyph (&glyph, color, 0, - - @node Bitmap API - @section Bitmap API --@itemize - @subsection grub_video_bitmap_create -+@itemize - @item Prototype: - @example - grub_err_t grub_video_bitmap_create (struct grub_video_bitmap **bitmap, unsigned int width, unsigned int height, enum grub_video_blit_format blit_format)
