From 416f9767cbae26fd58840cbd92e27993a4797da3 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 29 May 2010 02:09:03 +0000 Subject: [PATCH] update to 1.98 --- .cvsignore | 2 +- grub-1.96-garbage.patch | 52 ------- grub-1.97-cfgmode.patch | 17 --- grub-1.98-follow-dev-mapper-symlinks.patch | 60 ++++++++ grub-1.98-linuxsort.patch | 36 ----- grub-1.98-os.patch | 22 --- grub-1.98-persistent.patch | 82 ----------- grub-1.98-prototypes.patch | 59 -------- grub-1.98-transform.patch | 162 --------------------- grub2-dlsym-v4.patch | 30 ---- grub2-preserve-symbols-v4.1.patch | 38 ----- grub2.spec | 43 ++++-- sources | 2 +- 13 files changed, 95 insertions(+), 510 deletions(-) delete mode 100644 grub-1.96-garbage.patch delete mode 100644 grub-1.97-cfgmode.patch create mode 100644 grub-1.98-follow-dev-mapper-symlinks.patch delete mode 100644 grub-1.98-linuxsort.patch delete mode 100644 grub-1.98-os.patch delete mode 100644 grub-1.98-persistent.patch delete mode 100644 grub-1.98-prototypes.patch delete mode 100644 grub-1.98-transform.patch delete mode 100644 grub2-dlsym-v4.patch delete mode 100644 grub2-preserve-symbols-v4.1.patch diff --git a/.cvsignore b/.cvsignore index 2f4cb47..691b1cb 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -grub-1.97.1.tar.gz +grub-1.98.tar.gz diff --git a/grub-1.96-garbage.patch b/grub-1.96-garbage.patch deleted file mode 100644 index 991ab92..0000000 --- a/grub-1.96-garbage.patch +++ /dev/null @@ -1,52 +0,0 @@ -http://lists.gnu.org/archive/html/grub-devel/2008-04/msg00079.html - -Self-explainable. Make update-grub ignore rpm leftover files and VIM -swap files. - -2008-04-15 Lubomir Kundrak - - * util/update-grub.in: replace the junk file switch with - unconditional call to grub_file_is_not_garbage - * util/update-grub_lib.in (grub_file_is_not_garbage): ignore - also rpm leftover files and editor backup files - -diff -urp grub-1.96.orig/util/update-grub.in grub-1.96/util/update-grub.in ---- grub-1.96.orig/util/update-grub.in 2008-04-15 00:16:12.000000000 +0200 -+++ grub-1.96/util/update-grub.in 2008-04-15 00:17:06.000000000 +0200 -@@ -145,18 +145,12 @@ cat << EOF - EOF - - for i in ${update_grub_dir}/* ; do -- case "$i" in -- # emacsen backup files. FIXME: support other editors -- *~) ;; -- *) -- if grub_file_is_not_garbage "$i" && test -x "$i" ; then -- echo -- echo "### BEGIN $i ###" -- "$i" -- echo "### END $i ###" -- fi -- ;; -- esac -+ if grub_file_is_not_garbage "$i" && test -x "$i" ; then -+ echo -+ echo "### BEGIN $i ###" -+ "$i" -+ echo "### END $i ###" -+ fi - done - - # none of the children aborted with error, install the new grub.cfg -diff -urp grub-1.96.orig/util/update-grub_lib.in grub-1.96/util/update-grub_lib.in ---- grub-1.96.orig/util/update-grub_lib.in 2008-04-15 00:16:12.000000000 +0200 -+++ grub-1.96/util/update-grub_lib.in 2008-04-15 00:15:04.000000000 +0200 -@@ -115,6 +115,8 @@ grub_file_is_not_garbage () - if test -f "$1" ; then - case "$1" in - *.dpkg-dist|*.dpkg-old|*.dpkg-tmp) return 1 ;; # debian dpkg -+ *.rpmnew|*.rpmsave) return 1 ;; # Fedora rpm -+ *.bak|*~|.*.swp) return 1 ;; # backup and swap files from editors - esac - else - return 1 diff --git a/grub-1.97-cfgmode.patch b/grub-1.97-cfgmode.patch deleted file mode 100644 index fad5ce5..0000000 --- a/grub-1.97-cfgmode.patch +++ /dev/null @@ -1,17 +0,0 @@ -The configuration file can potentially contain sensitive data, ... -well, passwords are not yet implemented. - -Lubomir Rintel - -diff -urp grub2.orig/util/update-grub.in grub2/util/update-grub.in ---- grub2.orig/util/update-grub.in 2008-08-07 21:58:17.000000000 +0200 -+++ grub2/util/update-grub.in 2008-08-07 22:01:44.000000000 +0200 -@@ -170,7 +170,7 @@ exec > ${grub_cfg}.new - - # Allow this to fail, since /boot/grub/ might need to be fatfs to support some - # firmware implementations (e.g. OFW or EFI). --chmod 444 ${grub_cfg}.new || true -+chmod 600 ${grub_cfg}.new || true - - echo "Updating ${grub_cfg} ..." >&2 - diff --git a/grub-1.98-follow-dev-mapper-symlinks.patch b/grub-1.98-follow-dev-mapper-symlinks.patch new file mode 100644 index 0000000..b1e691f --- /dev/null +++ b/grub-1.98-follow-dev-mapper-symlinks.patch @@ -0,0 +1,60 @@ +--- a/util/getroot.c 2010-03-06 20:51:37.000000000 +0000 ++++ b/util/getroot.c 2010-05-28 18:23:19.892788564 +0100 +@@ -180,7 +180,8 @@ grub_get_prefix (const char *dir) + + static char * + find_root_device (const char *dir __attribute__ ((unused)), +- dev_t dev __attribute__ ((unused))) ++ dev_t dev __attribute__ ((unused)) ++ int depth __attribute__ ((unused))) + { + return 0; + } +@@ -188,7 +189,7 @@ find_root_device (const char *dir __attr + #elif ! defined(__CYGWIN__) + + static char * +-find_root_device (const char *dir, dev_t dev) ++find_root_device (const char *dir, dev_t dev, int depth) + { + DIR *dp; + char *saved_cwd; +@@ -222,16 +223,27 @@ find_root_device (const char *dir, dev_t + /* Ignore any error. */ + continue; + +- if (S_ISLNK (st.st_mode)) ++ if (S_ISLNK (st.st_mode)) { ++#ifdef __linux__ ++ /* If we're in /dev/mapper, follow symbolic links. */ ++ if (depth == 1 && strcmp(dir, "mapper") == 0) { ++ if (stat(ent->d_name, &st) == -1) ++ continue; ++ if (S_ISDIR (st.st_mode)) ++ continue; ++ } ++#else + /* Don't follow symbolic links. */ + continue; ++#endif ++ } + + if (S_ISDIR (st.st_mode)) + { + /* Find it recursively. */ + char *res; + +- res = find_root_device (ent->d_name, dev); ++ res = find_root_device (ent->d_name, dev, depth + 1); + + if (res) + { +@@ -454,7 +466,7 @@ grub_guess_root_device (const char *dir) + #else + + /* This might be truly slow, but is there any better way? */ +- os_dev = find_root_device ("/dev", st.st_dev); ++ os_dev = find_root_device ("/dev", st.st_dev, 0); + #endif + #endif /* !__GNU__ */ + diff --git a/grub-1.98-linuxsort.patch b/grub-1.98-linuxsort.patch deleted file mode 100644 index 84c6a49..0000000 --- a/grub-1.98-linuxsort.patch +++ /dev/null @@ -1,36 +0,0 @@ -Until we're able to decide which kernel to make default (e.g with grubby), -pick the most recent one. - -Lubomir Rintel - -Index: util/grub.d/10_linux.in -=================================================================== ---- util/grub.d/10_linux.in (revision 1797) -+++ util/grub.d/10_linux.in (working copy) -@@ -82,23 +82,9 @@ - return $? - } - --find_latest () --{ -- local a="" -- for i in $@ ; do -- if test_gt "$i" "$a" ; then -- a="$i" -- fi -- done -- echo "$a" --} -- --list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do -- if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi -- done` -- --while [ "x$list" != "x" ] ; do -- linux=`find_latest $list` -+ls -c /boot/vmlinu[xz]-* /vmlinu[xz]-* 2>/dev/null |while read linux -+do -+ grub_file_is_not_garbage "$linux" || continue - echo "Found linux image: $linux" >&2 - basename=`basename $linux` - dirname=`dirname $linux` diff --git a/grub-1.98-os.patch b/grub-1.98-os.patch deleted file mode 100644 index a495c05..0000000 --- a/grub-1.98-os.patch +++ /dev/null @@ -1,22 +0,0 @@ -We're not GNU/Linux. Tell them. - -Lubomir Rintel - -diff -urp grub2.orig/util/grub.d/10_linux.in grub2/util/grub.d/10_linux.in ---- grub2.orig/util/grub.d/10_linux.in 2008-08-08 07:12:30.000000000 +0200 -+++ grub2/util/grub.d/10_linux.in 2008-08-08 07:12:53.000000000 +0200 -@@ -23,11 +23,9 @@ exec_prefix=@exec_prefix@ - libdir=@libdir@ - . ${libdir}/`echo grub | sed ${transform}`/update-grub_lib - --if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then -- OS=GNU/Linux --else -- OS="${GRUB_DISTRIBUTOR} GNU/Linux" --fi -+OS=$(sed 's/ release.*//' /etc/redhat-release) -+[ -z "$OS" ] && OS=$(uname -o) -+[ -z "$OS" ] && OS=Linux - - # loop-AES arranges things so that /dev/loop/X can be our root device, but - # the initrds that Linux uses don't like that. diff --git a/grub-1.98-persistent.patch b/grub-1.98-persistent.patch deleted file mode 100644 index c3dddc0..0000000 --- a/grub-1.98-persistent.patch +++ /dev/null @@ -1,82 +0,0 @@ -This adds a section to the configuration file that persists the updates, -so that it's not only grub2-update itself that decides what's in the -configuration. - -Lubomir Rintel - -diff -up grub2/conf/common.rmk.persistent grub2/conf/common.rmk ---- grub2/conf/common.rmk.persistent 2008-08-27 10:49:16.000000000 +0200 -+++ grub2/conf/common.rmk 2008-08-27 13:51:33.000000000 +0200 -@@ -138,6 +138,12 @@ endif - - CLEANFILES += $(update-grub_SCRIPTS) - -+90_persistent: util/grub.d/90_persistent.in config.status -+ ./config.status --file=$@:$< -+ chmod +x $@ -+update-grub_SCRIPTS += 90_persistent -+CLEANFILES += 90_persistent -+ - update-grub_DATA += util/grub.d/README - - -diff -up /dev/null grub2/util/grub.d/90_persistent.in ---- /dev/null 2008-08-24 16:09:23.777049452 +0200 -+++ grub2/util/grub.d/90_persistent.in 2008-08-27 13:51:33.000000000 +0200 -@@ -0,0 +1,37 @@ -+#! /bin/sh -e -+ -+# update-grub helper script. -+# Copyright (C) 2008 Free Software Foundation, Inc. -+# -+# GRUB is free software: you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation, either version 3 of the License, or -+# (at your option) any later version. -+# -+# GRUB is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with GRUB. If not, see . -+ -+# The output of this script is copied from part of grub.cfg -+# that correspond to itself. The achievement is that user can -+# modify that part of grub.cfg directly, and it will be persistent -+# across update-grub runs. -+ -+transform="@program_transform_name@" -+ -+ME=$(echo $0 |sed 's,/,\\/,g') -+GRUBCFG=/boot/`echo grub | sed ${transform}`/grub.cfg -+ -+# Exit gracefully if there's no configuration file yet -+[ -f ${GRUBCFG} ] || exit 0 -+ -+awk " -+ BEGIN {echo = 0} -+ /### BEGIN $ME ###/ {echo = 1; next} -+ /### END $ME ###/ {echo = 0; next} -+ {if (echo) print} -+" ${GRUBCFG} -diff -up grub2/util/update-grub.in.persistent grub2/util/update-grub.in ---- grub2/util/update-grub.in.persistent 2008-08-27 13:51:33.000000000 +0200 -+++ grub2/util/update-grub.in 2008-08-27 13:51:33.000000000 +0200 -@@ -176,11 +176,12 @@ echo "Updating ${grub_cfg} ..." >&2 - - cat << EOF - # --# DO NOT EDIT THIS FILE --# --# It is automatically generated by $0 using templates -+# This is automatically generated by $0 using templates - # from ${update_grub_dir} and settings from ${sysconfdir}/default/grub - # -+# If you want your changes to persist across updates, add them -+# to 90_persistent section -+# - EOF - - for i in ${update_grub_dir}/* ; do diff --git a/grub-1.98-prototypes.patch b/grub-1.98-prototypes.patch deleted file mode 100644 index 5b5c0bf..0000000 --- a/grub-1.98-prototypes.patch +++ /dev/null @@ -1,59 +0,0 @@ -According to POSIX memmove and memcpy can actually be macros or whatever -(IIRC). We'd better not play with those in code that uses libc's headers -and is to be linked with libc. - -2008-08-08 Lubomir Rintel - - * include/grub/misc.h: Surround memmove and memcpy prototypes with - #ifndef GRUB_UTIL - * kern/misc.c: Surround memmove, memcpy and memset prototypes with - #ifndef GRUB_UTIL - -Index: kern/misc.c -=================================================================== ---- kern/misc.c (revision 1797) -+++ kern/misc.c (working copy) -@@ -44,11 +44,15 @@ - - return dest; - } -+#ifdef GRUB_UTIL -+#include -+#else - void *memmove (void *dest, const void *src, grub_size_t n) - __attribute__ ((alias ("grub_memmove"))); - /* GCC emits references to memcpy() for struct copies etc. */ - void *memcpy (void *dest, const void *src, grub_size_t n) - __attribute__ ((alias ("grub_memmove"))); -+#endif - - char * - grub_strcpy (char *dest, const char *src) -@@ -514,8 +518,10 @@ - - return s; - } -+#ifndef GRUB_UTIL - void *memset (void *s, int c, grub_size_t n) - __attribute__ ((alias ("grub_memset"))); -+#endif - - grub_size_t - grub_strlen (const char *s) -Index: include/grub/misc.h -=================================================================== ---- include/grub/misc.h (revision 1797) -+++ include/grub/misc.h (working copy) -@@ -39,8 +39,12 @@ - char *EXPORT_FUNC(grub_strncat) (char *dest, const char *src, int c); - - /* Prototypes for aliases. */ -+#ifdef GRUB_UTIL -+#include -+#else - void *EXPORT_FUNC(memmove) (void *dest, const void *src, grub_size_t n); - void *EXPORT_FUNC(memcpy) (void *dest, const void *src, grub_size_t n); -+#endif - - int EXPORT_FUNC(grub_memcmp) (const void *s1, const void *s2, grub_size_t n); - int EXPORT_FUNC(grub_strcmp) (const char *s1, const char *s2); diff --git a/grub-1.98-transform.patch b/grub-1.98-transform.patch deleted file mode 100644 index dbc3710..0000000 --- a/grub-1.98-transform.patch +++ /dev/null @@ -1,162 +0,0 @@ -Transformations. Anyone, please tell upstream it's useful not to have -them half-baked. This is so that we do not conflict with grub. - -Lubomir Rintel - -diff -urp grub2.orig/Makefile.in grub2/Makefile.in ---- grub2.orig/Makefile.in 2008-08-07 21:37:29.000000000 +0200 -+++ grub2/Makefile.in 2008-08-08 07:43:10.000000000 +0200 -@@ -215,12 +215,12 @@ install-local: all - dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \ - $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(sysconfdir)/grub.d/$$dest; \ - done -- $(mkinstalldirs) $(DESTDIR)$(libdir)/grub -+ $(mkinstalldirs) $(DESTDIR)$(libdir)/`echo grub | sed '$(transform)'` - @list='$(lib_DATA)'; \ - for file in $$list; do \ - if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \ - dest="`echo $$file | sed 's,.*/,,'`"; \ -- $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(libdir)/grub/$$dest; \ -+ $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(libdir)/`echo grub | sed '$(transform)'`/$$dest; \ - done - - install-strip: -diff -urp grub2.orig/util/grub.d/00_header.in grub2/util/grub.d/00_header.in ---- grub2.orig/util/grub.d/00_header.in 2008-08-07 21:37:28.000000000 +0200 -+++ grub2/util/grub.d/00_header.in 2008-08-08 07:43:10.000000000 +0200 -@@ -23,7 +23,7 @@ exec_prefix=@exec_prefix@ - libdir=@libdir@ - grub_prefix=`echo /boot/grub | sed ${transform}` - --. ${libdir}/grub/update-grub_lib -+. ${libdir}/`echo grub | sed ${transform}`/update-grub_lib - - # Do this as early as possible, since other commands might depend on it. - # (e.g. the `font' command might need lvm or raid modules) -diff -urp grub2.orig/util/grub.d/10_hurd.in grub2/util/grub.d/10_hurd.in ---- grub2.orig/util/grub.d/10_hurd.in 2008-08-07 21:37:28.000000000 +0200 -+++ grub2/util/grub.d/10_hurd.in 2008-08-08 07:44:29.000000000 +0200 -@@ -16,10 +16,12 @@ - # You should have received a copy of the GNU General Public License - # along with GRUB. If not, see . - -+transform="@program_transform_name@" -+ - prefix=@prefix@ - exec_prefix=@exec_prefix@ - libdir=@libdir@ --. ${libdir}/grub/update-grub_lib -+. ${libdir}/`echo grub |sed ${transform}`/update-grub_lib - - if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then - OS=GNU -diff -urp grub2.orig/util/grub.d/10_linux.in grub2/util/grub.d/10_linux.in ---- grub2.orig/util/grub.d/10_linux.in 2008-08-07 21:37:28.000000000 +0200 -+++ grub2/util/grub.d/10_linux.in 2008-08-08 07:43:10.000000000 +0200 -@@ -16,10 +16,12 @@ - # You should have received a copy of the GNU General Public License - # along with GRUB. If not, see . - -+transform="@program_transform_name@" -+ - prefix=@prefix@ - exec_prefix=@exec_prefix@ - libdir=@libdir@ --. ${libdir}/grub/update-grub_lib -+. ${libdir}/`echo grub | sed ${transform}`/update-grub_lib - - if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then - OS=GNU/Linux -diff -urp grub2.orig/util/grub.d/10_windows.in grub2/util/grub.d/10_windows.in ---- grub2.orig/util/grub.d/10_windows.in 2008-08-07 21:37:27.000000000 +0200 -+++ grub2/util/grub.d/10_windows.in 2008-08-08 07:44:13.000000000 +0200 -@@ -16,10 +16,12 @@ - # You should have received a copy of the GNU General Public License - # along with GRUB. If not, see . - -+transform="@program_transform_name@" -+ - prefix=@prefix@ - exec_prefix=@exec_prefix@ - libdir=@libdir@ --. ${libdir}/grub/update-grub_lib -+. ${libdir}/`echo grub |sed ${transform}`/update-grub_lib - - case "`uname 2>/dev/null`" in - CYGWIN*) ;; -diff -urp grub2.orig/util/i386/pc/grub-install.in grub2/util/i386/pc/grub-install.in ---- grub2.orig/util/i386/pc/grub-install.in 2008-08-07 21:37:28.000000000 +0200 -+++ grub2/util/i386/pc/grub-install.in 2008-08-08 07:43:10.000000000 +0200 -@@ -36,7 +36,7 @@ grub_mkimage=${bindir}/`echo grub-mkimag - grub_mkdevicemap=${sbindir}/`echo grub-mkdevicemap | sed ${transform}` - grub_probe=${sbindir}/`echo grub-probe | sed ${transform}` - rootdir= --grub_prefix=`echo /boot/grub | sed ${transform}` -+grub_prefix=/boot/`echo grub | sed ${transform}` - modules= - - install_device= -@@ -118,7 +118,7 @@ for option in "$@"; do - done - - # for make_system_path_relative_to_its_root() --. ${libdir}/grub/update-grub_lib -+. ${libdir}/`echo grub | sed ${transform}`/update-grub_lib - - if test "x$install_device" = x; then - echo "install_device not specified." 1>&2 -diff -urp grub2.orig/util/powerpc/ieee1275/grub-mkrescue.in grub2/util/powerpc/ieee1275/grub-mkrescue.in ---- grub2.orig/util/powerpc/ieee1275/grub-mkrescue.in 2008-08-07 21:37:27.000000000 +0200 -+++ grub2/util/powerpc/ieee1275/grub-mkrescue.in 2008-08-08 07:43:10.000000000 +0200 -@@ -100,7 +100,7 @@ grub.img Raw 'UNIX' 'tbxi' - EOF - - iso_dir=`mktemp -d` --boot_dir=${iso_dir}/boot/grub -+boot_dir=${iso_dir}/boot/`echo grub | sed ${transform}` - mkdir ${iso_dir}/boot - mkdir ${boot_dir} - core_img=${boot_dir}/grub.img -diff -urp grub2.orig/util/update-grub.in grub2/util/update-grub.in ---- grub2.orig/util/update-grub.in 2008-08-07 21:37:28.000000000 +0200 -+++ grub2/util/update-grub.in 2008-08-08 07:43:10.000000000 +0200 -@@ -23,7 +23,7 @@ exec_prefix=@exec_prefix@ - sbindir=@sbindir@ - libdir=@libdir@ - sysconfdir=@sysconfdir@ --grub_prefix=`echo /boot/grub | sed ${transform}` -+grub_prefix=/boot/`echo /grub | sed ${transform}` - grub_cfg=${grub_prefix}/grub.cfg - update_grub_dir=${sysconfdir}/grub.d - -@@ -65,7 +65,7 @@ for option in "$@"; do - esac - done - --. ${libdir}/grub/update-grub_lib -+. ${libdir}/`echo grub | sed ${transform}`/update-grub_lib - - if [ "x$EUID" = "x" ] ; then - EUID=`id -u` -@@ -107,7 +107,7 @@ fi - mkdir -p ${grub_prefix} - - if test -e ${grub_prefix}/device.map ; then : ; else -- grub-mkdevicemap -+ ${grub_mkdevicemap} - fi - - # Device containing our userland. Typically used for root= parameter. -diff -urp grub2.orig/util/update-grub_lib.in grub2/util/update-grub_lib.in ---- grub2.orig/util/update-grub_lib.in 2008-08-07 21:37:28.000000000 +0200 -+++ grub2/util/update-grub_lib.in 2008-08-08 07:43:10.000000000 +0200 -@@ -145,7 +145,8 @@ prepare_grub_to_access_device () - - font_path () - { -- for dir in ${pkgdatadir} /boot/grub /usr/share/grub ; do -+ for dir in ${pkgdatadir} ${pkgdatadir}/`echo grub | sed ${transform}` \ -+ /boot/`echo grub | sed ${transform}`; do - # FIXME: We prefer ascii because loading complete fonts is too slow (and - # we don't yet provide the gettext magic that would make unicode useful). - for basename in ascii unicode unifont ; do diff --git a/grub2-dlsym-v4.patch b/grub2-dlsym-v4.patch deleted file mode 100644 index 8e35246..0000000 --- a/grub2-dlsym-v4.patch +++ /dev/null @@ -1,30 +0,0 @@ -2008-05-07: Lubomir Rintel - - * kern/dl.c (grub_dl_resolve_symbols): Let the - grub_gdb_trapvec symbol be resolved correctly (instead of 0). - ---- grub2/kern/dl.c 2008-01-26 21:34:58.000000000 +0100 -+++ grub2-gdb/kern/dl.c 2008-05-07 09:27:08.000000000 +0200 -@@ -352,16 +352,18 @@ grub_dl_resolve_symbols (grub_dl_t mod, - { - case STT_NOTYPE: - /* Resolve a global symbol. */ -- if (sym->st_name != 0 && sym->st_shndx == 0) -+ if (sym->st_name == 0) -+ break; -+ -+ if (sym->st_shndx == 0) /* external */ - { - sym->st_value = (Elf_Addr) grub_dl_resolve_symbol (name); - if (! sym->st_value) - return grub_error (GRUB_ERR_BAD_MODULE, - "the symbol `%s' not found", name); -- } -- else -- sym->st_value = 0; - break; -+ } -+ /* nonexternal, same as STT_OBJECT */ - - case STT_OBJECT: - sym->st_value += (Elf_Addr) grub_dl_get_section_addr (mod, diff --git a/grub2-preserve-symbols-v4.1.patch b/grub2-preserve-symbols-v4.1.patch deleted file mode 100644 index 2d7e15b..0000000 --- a/grub2-preserve-symbols-v4.1.patch +++ /dev/null @@ -1,38 +0,0 @@ -2008-05-07: Lubomir Rintel - - * genmk.rb: replace strip with objcopy, so unstripped files are - left untouched for debugging purposes. - -diff -urp grub2.orig/genmk.rb grub2/genmk.rb ---- grub2.orig/genmk.rb 2008-08-07 21:37:29.000000000 +0200 -+++ grub2/genmk.rb 2008-08-07 23:31:19.000000000 +0200 -@@ -101,10 +101,11 @@ class PModule - mod_obj = mod_src.suffix('o') - defsym = 'def-' + @name.suffix('lst') - undsym = 'und-' + @name.suffix('lst') -+ exec = @name.suffix('elf') - mod_name = File.basename(@name, '.mod') - symbolic_name = mod_name.sub(/\.[^\.]*$/, '') - -- "CLEANFILES += #{@name} #{mod_obj} #{mod_src} #{pre_obj} #{objs_str} #{undsym} -+ "CLEANFILES += #{@name} #{mod_obj} #{mod_src} #{pre_obj} #{objs_str} #{undsym} #{exec} - ifneq ($(#{prefix}_EXPORTS),no) - CLEANFILES += #{defsym} - DEFSYMFILES += #{defsym} -@@ -112,11 +113,14 @@ endif - MOSTLYCLEANFILES += #{deps_str} - UNDSYMFILES += #{undsym} - --#{@name}: #{pre_obj} #{mod_obj} $(TARGET_OBJ2ELF) -+#{@name}: #{exec} -+ -rm -f $@ -+ $(OBJCOPY) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $^ $@ -+ -+#{exec}: #{pre_obj} #{mod_obj} $(TARGET_OBJ2ELF) - -rm -f $@ - $(TARGET_CC) $(#{prefix}_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ #{pre_obj} #{mod_obj} - if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi -- $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@ - - #{pre_obj}: $(#{prefix}_DEPENDENCIES) #{objs_str} - -rm -f $@ diff --git a/grub2.spec b/grub2.spec index 0892239..78b2d90 100644 --- a/grub2.spec +++ b/grub2.spec @@ -13,8 +13,8 @@ Name: grub2 Epoch: 1 -Version: 1.97.1 -Release: 3%{?dist} +Version: 1.98 +Release: 2%{?dist} Summary: Bootloader with support for Linux, Multiboot and more Group: System Environment/Base @@ -25,7 +25,8 @@ Source1: 90_persistent Source2: grub.default Source3: README.Fedora Patch0: grub-1.95-grubdir.patch -Patch1: http://fedorapeople.org/~lkundrak/grub2/grub2-dlsym-v4.patch +Patch1: grub-1.97.1-initramfs.patch +Patch2: grub-1.98-follow-dev-mapper-symlinks.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -37,11 +38,11 @@ BuildRequires: /usr/lib64/crt1.o glibc-static %else BuildRequires: /usr/lib/crt1.o glibc-static %endif -BuildRequires: autoconf automake +BuildRequires: autoconf automake gettext-devel # grubby -Requires(pre): mkinitrd dracut -Requires(post): mkinitrd dracut +Requires(pre): dracut +Requires(post): dracut # TODO: ppc ExclusiveArch: %{ix86} x86_64 %{sparc} @@ -63,7 +64,8 @@ file that is part of this package's documentation for more information. %setup -q -n grub-%{version} %patch0 -p1 -b .grubdir -%patch1 -p1 -b .dlsym +%patch1 -p1 -b .initramfs +%patch2 -p1 -b .follow-symlinks # README.Fedora cp %{SOURCE3} . @@ -79,7 +81,6 @@ sh autogen.sh %else --with-platform=pc \ %endif - --enable-grub-emu \ --program-transform-name=s,grub,%{name}, # TODO: Other platforms. Use alternatives system? # --with-platform=ieee1275 \ @@ -124,6 +125,7 @@ done # Defaults install -m 644 -D %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/default/grub +%find_lang grub %clean rm -rf $RPM_BUILD_ROOT @@ -166,21 +168,27 @@ exec >/dev/null 2>&1 %{name}-mkconfig -%files +%files -f grub.lang %defattr(-,root,root,-) %{_libdir}/%{name} %{_libdir}/grub/ %{_sbindir}/%{name}-mkdevicemap %{_sbindir}/%{name}-install -%{_sbindir}/%{name}-emu %{_sbindir}/%{name}-probe %{_sbindir}/%{name}-setup %{_sbindir}/%{name}-mkconfig +%{_sbindir}/%{name}-reboot +%{_sbindir}/%{name}-set-default %{_bindir}/%{name}-mkimage %{_bindir}/%{name}-mkelfimage %{_bindir}/%{name}-editenv %{_bindir}/%{name}-fstest %{_bindir}/%{name}-mkfont +%{_bindir}/%{name}-bin2h +%{_bindir}/%{name}-mkisofs +%{_bindir}/%{name}-mkpasswd-pbkdf2 +%{_bindir}/%{name}-mkrelpath +%{_bindir}/%{name}-script-check %ifnarch %{sparc} %{_bindir}/%{name}-mkrescue %endif @@ -202,6 +210,21 @@ exec >/dev/null 2>&1 %changelog +* Fri May 28 2010 Dennis Gilmore - 1:1.98-2 +- add patch so grub2-probe works with lvm to detect devices correctly + +* Wed Apr 21 2010 Dennis Gilmore - 1:1.98-1 +- update to 1.98 + +* Fri Feb 12 2010 Dennis Gilmore - 1:1.97.2-1 +- update to 1.97.2 + +* Wed Jan 20 2010 Dennis Gilmore - 1:1.97.1-5 +- drop requires on mkinitrd + +* Tue Dec 01 2009 Dennis Gilmore - 1:1.97.1-4 +- add patch so that grub2 finds fedora's initramfs + * Tue Nov 10 2009 Dennis Gilmore - 1:1.97.1-3 - no mkrescue on sparc arches - ofpathname on sparc arches diff --git a/sources b/sources index 9d673a8..60b73e8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -66fe18cd9318e3d67a34d7b7a8e7b1f6 grub-1.97.1.tar.gz +c0bcf60e524739bb64e3a2d4e3732a59 grub-1.98.tar.gz