Accepting request 128513 from devel:openSUSE:Factory
Hi, Please help to review the patches. Thanks. (forwarded request 128468 from michael-chang) OBS-URL: https://build.opensuse.org/request/show/128513 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grub2?expand=0&rev=41
This commit is contained in:
parent
7ba8f33512
commit
ecac8f86f6
36
grub2-fix-error-terminal-gfxterm-isn-t-found.patch
Normal file
36
grub2-fix-error-terminal-gfxterm-isn-t-found.patch
Normal file
@ -0,0 +1,36 @@
|
||||
From e2e0fe44cf2a03744e96f886f95ab2c2a8aed331 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Chang <mchang@suse.com>
|
||||
Date: Wed, 18 Jul 2012 14:54:32 +0800
|
||||
Subject: [PATCH] fix error: terminal 'gfxterm' isn't found
|
||||
|
||||
References: bnc#771393
|
||||
Patch-Mainline: no
|
||||
|
||||
If set GRUB_TERMINAL="gfxterm", the error message "terminal
|
||||
'gfxterm' isn't found" will be logged to screen. This is caused
|
||||
by GRUB_TERMINAL_INPUT erroneously set to gfxterm. This patch
|
||||
fixes the issue by not setting it.
|
||||
---
|
||||
util/grub-mkconfig.in | 6 +++++-
|
||||
1 files changed, 5 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
|
||||
index f61796f..ca62e9f 100644
|
||||
--- a/util/grub-mkconfig.in
|
||||
+++ b/util/grub-mkconfig.in
|
||||
@@ -146,7 +146,11 @@ fi
|
||||
|
||||
# XXX: should this be deprecated at some point?
|
||||
if [ "x${GRUB_TERMINAL}" != "x" ] ; then
|
||||
- GRUB_TERMINAL_INPUT="${GRUB_TERMINAL}"
|
||||
+# bnc#771393 - fix error: terminal 'gfxterm' isn't found.
|
||||
+# by not specifying 'gfxterm' to GRUB_TERMINAL_INPUT
|
||||
+ if [ "x${GRUB_TERMINAL}" != "xgfxterm" ]; then
|
||||
+ GRUB_TERMINAL_INPUT="${GRUB_TERMINAL}"
|
||||
+ fi
|
||||
GRUB_TERMINAL_OUTPUT="${GRUB_TERMINAL}"
|
||||
fi
|
||||
|
||||
--
|
||||
1.7.3.4
|
||||
|
88
grub2-fix-menu-in-xen-host-server.patch
Normal file
88
grub2-fix-menu-in-xen-host-server.patch
Normal file
@ -0,0 +1,88 @@
|
||||
From b411dc88b46890400a2e1ba0aa8650e00f738c23 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Chang <mchang@suse.com>
|
||||
Date: Thu, 19 Jul 2012 18:43:55 +0800
|
||||
Subject: [PATCH] fix menu in xen host server
|
||||
|
||||
References: bnc#771689, bnc#757895
|
||||
Patch-Mainline: no
|
||||
|
||||
When system is configred as "Xen Virtual Machines Host Server", the
|
||||
grub2 menu is not well organized. We could see some issues on it.
|
||||
|
||||
- Many duplicated xen entries generated by links to xen hypervisor
|
||||
- Non bootable kernel entries trying to boot xen kernel natively
|
||||
- The -dbg xen hypervisor takes precedence over release version
|
||||
|
||||
This patch fixes above three issues.
|
||||
---
|
||||
util/grub-mkconfig_lib.in | 5 +++++
|
||||
util/grub.d/10_linux.in | 12 ++++++++++--
|
||||
util/grub.d/20_linux_xen.in | 6 ++++--
|
||||
3 files changed, 19 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
|
||||
index 76133b4..defc364 100644
|
||||
--- a/util/grub-mkconfig_lib.in
|
||||
+++ b/util/grub-mkconfig_lib.in
|
||||
@@ -239,6 +239,11 @@ version_test_gt ()
|
||||
*.old:*.old) ;;
|
||||
*.old:*) version_test_gt_a="`echo -n "$version_test_gt_a" | sed -e 's/\.old$//'`" ; version_test_gt_cmp=gt ;;
|
||||
*:*.old) version_test_gt_b="`echo -n "$version_test_gt_b" | sed -e 's/\.old$//'`" ; version_test_gt_cmp=ge ;;
|
||||
+# bnc#757895 - Grub2 menu items incorrect when "Xen Virtual Machines Host Server" selected
|
||||
+# The dbg version should be placed after release version
|
||||
+ dbg-*:dbg-*) ;;
|
||||
+ dbg-*:*) version_test_gt_a="" ;;
|
||||
+ *:dbg-*) version_test_gt_b="" ;;
|
||||
esac
|
||||
version_test_numeric "$version_test_gt_a" "$version_test_gt_cmp" "$version_test_gt_b"
|
||||
return "$?"
|
||||
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
||||
index e7a180e..a02bf17 100644
|
||||
--- a/util/grub.d/10_linux.in
|
||||
+++ b/util/grub.d/10_linux.in
|
||||
@@ -150,15 +150,23 @@ EOF
|
||||
EOF
|
||||
}
|
||||
|
||||
+# bnc#757895 - Grub2 menu items incorrect when "Xen Virtual Machines Host Server" selected
|
||||
+# check kernel's flavor to prevent xen kernel from booting natively without hypervisor
|
||||
+is_not_xen ()
|
||||
+{
|
||||
+ flavor=`echo $1 | sed -e "s,.*-,,g"`
|
||||
+ test "x$flavor" != xxen
|
||||
+}
|
||||
+
|
||||
machine=`uname -m`
|
||||
case "x$machine" in
|
||||
xi?86 | xx86_64)
|
||||
list=`for i in /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* ; do
|
||||
- if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
|
||||
+ if grub_file_is_not_garbage "$i" && is_not_xen "$i" ; then echo -n "$i " ; fi
|
||||
done` ;;
|
||||
*)
|
||||
list=`for i in /boot/vmlinuz-* /boot/vmlinux-* /vmlinuz-* /vmlinux-* /boot/kernel-* ; do
|
||||
- if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
|
||||
+ if grub_file_is_not_garbage "$i" && is_not_xen "$i" ; then echo -n "$i " ; fi
|
||||
done` ;;
|
||||
esac
|
||||
|
||||
diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
|
||||
index 1d94502..fd103f1 100644
|
||||
--- a/util/grub.d/20_linux_xen.in
|
||||
+++ b/util/grub.d/20_linux_xen.in
|
||||
@@ -166,8 +166,10 @@ file_is_not_sym () {
|
||||
esac
|
||||
}
|
||||
|
||||
-xen_list=`for i in /boot/xen*; do
|
||||
- if grub_file_is_not_garbage "$i" && file_is_not_sym "$i" ; then echo -n "$i " ; fi
|
||||
+# bnc#757895 - Grub2 menu items incorrect when "Xen Virtual Machines Host Server" selected
|
||||
+# wildcard expasion with correct suffix (.gz) and exclude symlinks for not generating many duplicated menu entries
|
||||
+xen_list=`for i in /boot/xen*.gz; do
|
||||
+ if grub_file_is_not_garbage "$i" && test ! -L "$i" ; then echo -n "$i " ; fi
|
||||
done`
|
||||
prepare_boot_cache=
|
||||
boot_device_id=
|
||||
--
|
||||
1.7.3.4
|
||||
|
35
grub2-fix-mo-not-copied-to-grubdir-locale.patch
Normal file
35
grub2-fix-mo-not-copied-to-grubdir-locale.patch
Normal file
@ -0,0 +1,35 @@
|
||||
From 4b5567de4546b48e5911a45eba184c92ec45eed0 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Chang <mchang@suse.com>
|
||||
Date: Wed, 18 Jul 2012 15:11:59 +0800
|
||||
Subject: [PATCH] fix mo not copied to ${grubdir}/locale/
|
||||
|
||||
References: bnc#771393
|
||||
Patch-Mainline: no
|
||||
|
||||
The hard-coded grub.mo should be replaced by @PACKAGE@.mo. For
|
||||
people who configure to use other package name, the hard-coded
|
||||
grub.mo is not matched thus not copied to ${grubdir}/locale. This
|
||||
patch fixes the issue by using @PACKAGE@.mo to correct match the
|
||||
file name.
|
||||
---
|
||||
util/grub-install.in | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/util/grub-install.in b/util/grub-install.in
|
||||
index 3a7d332..af4e2e2 100644
|
||||
--- a/util/grub-install.in
|
||||
+++ b/util/grub-install.in
|
||||
@@ -545,8 +545,8 @@ fi
|
||||
# Copy gettext files
|
||||
mkdir -p "${grubdir}"/locale/
|
||||
for dir in "${localedir}"/*; do
|
||||
- if test -f "$dir/LC_MESSAGES/grub.mo"; then
|
||||
- cp -f "$dir/LC_MESSAGES/grub.mo" "${grubdir}/locale/${dir##*/}.mo"
|
||||
+ if test -f "$dir/LC_MESSAGES/@PACKAGE@.mo"; then
|
||||
+ cp -f "$dir/LC_MESSAGES/@PACKAGE@.mo" "${grubdir}/locale/${dir##*/}.mo"
|
||||
fi
|
||||
done
|
||||
|
||||
--
|
||||
1.7.3.4
|
||||
|
@ -1,5 +1,23 @@
|
||||
References: bnc#750897
|
||||
From: Michael Chang <mchang@suse.com>
|
||||
|
||||
To be able to install grub on an extended partition, user, if they are
|
||||
convinced it is a good idea, has to use --skip-fs-probe for grub-setup.
|
||||
|
||||
For convenience, let us support --skip-fs-probe directly in
|
||||
grub-install and pass it to grub-setup internally.
|
||||
|
||||
Otherwise with such a setup:
|
||||
Device Boot Start End Blocks Id System
|
||||
/dev/sda1 2048 4208639 2103296 82 Linux swap / Solaris
|
||||
/dev/sda2 * 4208640 213921791 104856576 f W95 Ext'd (LBA)
|
||||
/dev/sda5 4210688 46153727 20971520 83 Linux
|
||||
|
||||
This fails:
|
||||
$ grub2-install --force /dev/sda2
|
||||
/usr/sbin/grub2-probe: error: cannot find a GRUB drive for /dev/sda2. Check your device.map.
|
||||
|
||||
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
|
||||
References: https://bugzilla.novell.com/show_bug.cgi?id=750897
|
||||
---
|
||||
|
||||
Index: grub-1.99/util/grub-install.in
|
||||
|
@ -1,5 +1,13 @@
|
||||
References: bnc#750897
|
||||
From: Michael Chang <mchang@suse.com>
|
||||
|
||||
The same as in the previous patch, add a support for installing grub
|
||||
into an extended partition.
|
||||
|
||||
Here, we do not ignore extended partitions anymore. Instead we call a
|
||||
hook that makes sure we have the partition when installing.
|
||||
|
||||
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
|
||||
References: https://bugzilla.novell.com/show_bug.cgi?id=750897
|
||||
---
|
||||
Index: grub-1.99/grub-core/partmap/msdos.c
|
||||
===================================================================
|
||||
|
@ -1,26 +0,0 @@
|
||||
Index: grub-1.99/util/grub.d/10_linux.in
|
||||
===================================================================
|
||||
--- grub-1.99.orig/util/grub.d/10_linux.in
|
||||
+++ grub-1.99/util/grub.d/10_linux.in
|
||||
@@ -144,6 +144,7 @@ esac
|
||||
prepare_boot_cache=
|
||||
prepare_root_cache=
|
||||
|
||||
+in_submenu=false
|
||||
while [ "x$list" != "x" ] ; do
|
||||
linux=`version_find_latest $list`
|
||||
echo "Found linux image: $linux" >&2
|
||||
@@ -196,4 +197,13 @@ while [ "x$list" != "x" ] ; do
|
||||
fi
|
||||
|
||||
list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
|
||||
+
|
||||
+ if [ "$list" ] && ! $in_submenu; then
|
||||
+ echo "submenu \"Previous Linux versions\" {"
|
||||
+ in_submenu=:
|
||||
+ fi
|
||||
done
|
||||
+
|
||||
+if $in_submenu; then
|
||||
+ echo "}"
|
||||
+fi
|
@ -1,3 +1,24 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 19 11:03:37 UTC 2012 - mchang@suse.com
|
||||
|
||||
- add grub2-fix-menu-in-xen-host-server.patch (bnc#757895)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 18 08:29:53 UTC 2012 - mchang@suse.com
|
||||
|
||||
- add grub2-fix-error-terminal-gfxterm-isn-t-found.patch
|
||||
- add grub2-fix-mo-not-copied-to-grubdir-locale.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 18 08:12:19 UTC 2012 - aj@suse.de
|
||||
|
||||
- We only need makeinfo, not texinfo for building.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 17 21:12:26 CEST 2012 - jslaby@suse.de
|
||||
|
||||
- fix build by adding texinfo to buildrequires.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 6 08:09:16 UTC 2012 - mchang@suse.com
|
||||
|
||||
|
@ -42,6 +42,7 @@ BuildRequires: flex
|
||||
BuildRequires: fuse-devel
|
||||
BuildRequires: gnu-unifont
|
||||
BuildRequires: lzma
|
||||
BuildRequires: makeinfo
|
||||
BuildRequires: python
|
||||
BuildRequires: ruby
|
||||
BuildRequires: xz-devel
|
||||
@ -80,11 +81,13 @@ Patch0: grub2-correct-font-path.patch
|
||||
Patch1: rename-grub-info-file-to-grub2.patch
|
||||
Patch2: grub2-linux.patch
|
||||
Patch3: use-grub2-as-a-package-name.patch
|
||||
Patch4: grub2-linux-submenu.patch
|
||||
Patch6: grub2-iterate-and-hook-for-extended-partition.patch
|
||||
Patch7: grub2-install-opt-skip-fs-probe.patch
|
||||
Patch8: grub2-ppc-terminfo.patch
|
||||
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
|
||||
Patch99: use-grub2-efi-as-a-package-name.patch
|
||||
PreReq: perl-Bootloader
|
||||
Requires: gettext-runtime
|
||||
@ -137,11 +140,13 @@ cd grub-%{version}
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
#%%patch4 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
cd ..
|
||||
|
||||
# README.openSUSE
|
||||
|
Loading…
Reference in New Issue
Block a user