From 69798d00e9812cc7c09b1fe721af683888382e98190a95d17de6a553bd3e8919 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Wed, 13 Oct 2010 22:54:11 +0000 Subject: [PATCH] Accepting request 50469 from devel:openSUSE:Factory Copy from devel:openSUSE:Factory/grub2 based on submit request 50469 from user a_jaeger OBS-URL: https://build.opensuse.org/request/show/50469 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grub2?expand=0&rev=7 --- grub-1.98-follow-dev-mapper-symlinks.patch | 60 ++++++++++++++++++++++ grub-1.98.tar.bz2 | 3 ++ grub-1.98.tar.gz | 3 -- grub.default | 32 +++++++++++- grub2-linux.patch | 32 ++++++++++++ grub2.changes | 17 ++++++ grub2.spec | 6 ++- 7 files changed, 147 insertions(+), 6 deletions(-) create mode 100644 grub-1.98-follow-dev-mapper-symlinks.patch create mode 100644 grub-1.98.tar.bz2 delete mode 100644 grub-1.98.tar.gz 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..8ba54ab --- /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.tar.bz2 b/grub-1.98.tar.bz2 new file mode 100644 index 0000000..423e73f --- /dev/null +++ b/grub-1.98.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8e96e824b4c53ee8c0efca360789f0531b625369e648760eab4829726ec3a82b +size 1858208 diff --git a/grub-1.98.tar.gz b/grub-1.98.tar.gz deleted file mode 100644 index b49d91d..0000000 --- a/grub-1.98.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bef2c1892e052967b65aab6aa62ac702c0e50ef8848506eacf3c0b2f5007c614 -size 2449386 diff --git a/grub.default b/grub.default index 638d4e5..729038a 100644 --- a/grub.default +++ b/grub.default @@ -1,2 +1,32 @@ -GRUB_CMDLINE_LINUX="quiet" +# If you change this file, run 'grub2-mkconfig -o /boot/grub2/grub.cfg' afterwards to update +# /boot/grub2/grub.cfg. GRUB_DISTRIBUTOR="openSUSE" + +GRUB_DEFAULT=0 +GRUB_HIDDEN_TIMEOUT=0 +GRUB_HIDDEN_TIMEOUT_QUIET=true +GRUB_TIMEOUT=10 +GRUB_CMDLINE_LINUX_DEFAULT="quiet splash=silent" +GRUB_CMDLINE_LINUX=" + +# Uncomment to enable BadRAM filtering, modify to suit your needs +# This works with Linux (no patch required) and with any kernel that obtains +# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) +#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef" + +# Uncomment to disable graphical terminal (grub-pc only) +#GRUB_TERMINAL=console + +# The resolution used on graphical terminal +# note that you can use only modes which your graphic card supports via VBE +# you can see them in real GRUB with the command `vbeinfo' +#GRUB_GFXMODE=640x480 + +# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux +#GRUB_DISABLE_LINUX_UUID=true + +# Uncomment to disable generation of recovery mode menu entries +#GRUB_DISABLE_LINUX_RECOVERY="true" + +# Uncomment to get a beep at grub start +#GRUB_INIT_TUNE="480 440 1" diff --git a/grub2-linux.patch b/grub2-linux.patch index bbec0b2..9397c6d 100644 --- a/grub2-linux.patch +++ b/grub2-linux.patch @@ -2,6 +2,15 @@ Index: util/grub.d/10_linux.in =================================================================== --- util/grub.d/10_linux.in.orig +++ util/grub.d/10_linux.in +@@ -30,7 +30,7 @@ CLASS="--class gnu-linux --class gnu --c + if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then + OS=GNU/Linux + else +- OS="${GRUB_DISTRIBUTOR} GNU/Linux" ++ OS="${GRUB_DISTRIBUTOR}" + CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]') ${CLASS}" + fi + @@ -84,7 +84,7 @@ EOF printf '%s\n' "${prepare_boot_cache}" cat << EOF @@ -11,3 +20,26 @@ Index: util/grub.d/10_linux.in EOF if test -n "${initrd}" ; then cat << EOF +@@ -97,9 +97,20 @@ EOF + EOF + } + ++# do not output vmlinux if vmlinuz of same version exists + list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do +- if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi +- done` ++ if grub_file_is_not_garbage "$i" ; then ++ case $i in ++ */vmlinux*) ++ j=${i/vmlinux/vmlinuz} ++ k=${j/.gz/} ++ if test ! -e $k ; then echo -n "$i "; fi ++ ;; ++ *) ++ echo -n "$i " ++ ;; ++ esac ++ done` + prepare_boot_cache= + + while [ "x$list" != "x" ] ; do diff --git a/grub2.changes b/grub2.changes index 41a2045..47fec2c 100644 --- a/grub2.changes +++ b/grub2.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Mon Oct 11 22:29:27 CEST 2010 - jslaby@suse.de + +- repack gz to bz2 (0.5M saving) + +------------------------------------------------------------------- +Sat Oct 9 19:16:51 UTC 2010 - aj@suse.de + +- Do not output vmlinux if vmlinuz of same version exists. +- Update default grub file. + +------------------------------------------------------------------- +Sat Oct 9 13:58:31 UTC 2010 - aj@suse.de + +- Add patch grub-1.98-follow-dev-mapper-symlinks.patch from Fedora + for grub2-probe to detect lvm devices correctly + ------------------------------------------------------------------- Sat Sep 11 23:55:54 CEST 2010 - jslaby@suse.de diff --git a/grub2.spec b/grub2.spec index a0dd149..f40d0aa 100644 --- a/grub2.spec +++ b/grub2.spec @@ -34,12 +34,12 @@ BuildRequires: bison flex ruby %define _target_platform i386-%{_vendor}-%{_target_os}%{?_gnu} %endif Version: 1.98 -Release: 6 +Release: 7 Summary: Bootloader with support for Linux, Multiboot and more Group: System/Boot License: GPLv3+ Url: http://www.gnu.org/software/grub/ -Source0: ftp://alpha.gnu.org/gnu/grub/grub-%{version}.tar.gz +Source0: ftp://alpha.gnu.org/gnu/grub/grub-%{version}.tar.bz2 Source1: 90_persistent Source2: grub.default Source3: README.openSUSE @@ -47,6 +47,7 @@ Source4: grub2.rpmlintrc Patch0: grub-1.95-grubdir.patch Patch2: grub2-linux.patch Patch3: gccwarn.patch +Patch4: grub-1.98-follow-dev-mapper-symlinks.patch PreReq: perl-Bootloader Requires: gettext-runtime @@ -73,6 +74,7 @@ file that is part of this package's documentation for more information. %patch0 -p0 -b .grubdir %patch2 -p0 -b .linux %patch3 -p0 -b .gccwarn +%patch4 -p1 -b .dev-mapper # README.openSUSE cp %{SOURCE3} .