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
This commit is contained in:
parent
2bd5c809b5
commit
69798d00e9
60
grub-1.98-follow-dev-mapper-symlinks.patch
Normal file
60
grub-1.98-follow-dev-mapper-symlinks.patch
Normal file
@ -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__ */
|
||||||
|
|
3
grub-1.98.tar.bz2
Normal file
3
grub-1.98.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:8e96e824b4c53ee8c0efca360789f0531b625369e648760eab4829726ec3a82b
|
||||||
|
size 1858208
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:bef2c1892e052967b65aab6aa62ac702c0e50ef8848506eacf3c0b2f5007c614
|
|
||||||
size 2449386
|
|
32
grub.default
32
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_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"
|
||||||
|
@ -2,6 +2,15 @@ Index: util/grub.d/10_linux.in
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- util/grub.d/10_linux.in.orig
|
--- util/grub.d/10_linux.in.orig
|
||||||
+++ util/grub.d/10_linux.in
|
+++ 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
|
@@ -84,7 +84,7 @@ EOF
|
||||||
printf '%s\n' "${prepare_boot_cache}"
|
printf '%s\n' "${prepare_boot_cache}"
|
||||||
cat << EOF
|
cat << EOF
|
||||||
@ -11,3 +20,26 @@ Index: util/grub.d/10_linux.in
|
|||||||
EOF
|
EOF
|
||||||
if test -n "${initrd}" ; then
|
if test -n "${initrd}" ; then
|
||||||
cat << EOF
|
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
|
||||||
|
@ -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
|
Sat Sep 11 23:55:54 CEST 2010 - jslaby@suse.de
|
||||||
|
|
||||||
|
@ -34,12 +34,12 @@ BuildRequires: bison flex ruby
|
|||||||
%define _target_platform i386-%{_vendor}-%{_target_os}%{?_gnu}
|
%define _target_platform i386-%{_vendor}-%{_target_os}%{?_gnu}
|
||||||
%endif
|
%endif
|
||||||
Version: 1.98
|
Version: 1.98
|
||||||
Release: 6
|
Release: 7
|
||||||
Summary: Bootloader with support for Linux, Multiboot and more
|
Summary: Bootloader with support for Linux, Multiboot and more
|
||||||
Group: System/Boot
|
Group: System/Boot
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Url: http://www.gnu.org/software/grub/
|
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
|
Source1: 90_persistent
|
||||||
Source2: grub.default
|
Source2: grub.default
|
||||||
Source3: README.openSUSE
|
Source3: README.openSUSE
|
||||||
@ -47,6 +47,7 @@ Source4: grub2.rpmlintrc
|
|||||||
Patch0: grub-1.95-grubdir.patch
|
Patch0: grub-1.95-grubdir.patch
|
||||||
Patch2: grub2-linux.patch
|
Patch2: grub2-linux.patch
|
||||||
Patch3: gccwarn.patch
|
Patch3: gccwarn.patch
|
||||||
|
Patch4: grub-1.98-follow-dev-mapper-symlinks.patch
|
||||||
PreReq: perl-Bootloader
|
PreReq: perl-Bootloader
|
||||||
Requires: gettext-runtime
|
Requires: gettext-runtime
|
||||||
|
|
||||||
@ -73,6 +74,7 @@ file that is part of this package's documentation for more information.
|
|||||||
%patch0 -p0 -b .grubdir
|
%patch0 -p0 -b .grubdir
|
||||||
%patch2 -p0 -b .linux
|
%patch2 -p0 -b .linux
|
||||||
%patch3 -p0 -b .gccwarn
|
%patch3 -p0 -b .gccwarn
|
||||||
|
%patch4 -p1 -b .dev-mapper
|
||||||
|
|
||||||
# README.openSUSE
|
# README.openSUSE
|
||||||
cp %{SOURCE3} .
|
cp %{SOURCE3} .
|
||||||
|
Loading…
Reference in New Issue
Block a user