forked from pool/grub2
Accepting request 76157 from devel:openSUSE:Factory
Only run preun when deinstalling package (forwarded request 76120 from a_jaeger) OBS-URL: https://build.opensuse.org/request/show/76157 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grub2?expand=0&rev=16
This commit is contained in:
parent
d9a1845a3c
commit
dc5ad4ab6c
@ -46,3 +46,31 @@ Support channels
|
|||||||
If you find a bug in this package, report them to the openSUSE Bugzilla [2].
|
If you find a bug in this package, report them to the openSUSE Bugzilla [2].
|
||||||
|
|
||||||
[2] http://bugzilla.novell.com/
|
[2] http://bugzilla.novell.com/
|
||||||
|
|
||||||
|
Installation
|
||||||
|
------------
|
||||||
|
|
||||||
|
There is not yet any support in openSUSE to configure and install
|
||||||
|
grub2. To install it for the first time, run (replace /dev/sdaX with
|
||||||
|
your boot partition or use /dev/sda for the MBR):
|
||||||
|
|
||||||
|
# grub2-install --no-floppy /dev/sdaX
|
||||||
|
# grub2-mkconfig -o /boot/grub2/grub.cfg
|
||||||
|
|
||||||
|
To just update the configuration after the kernel changes, run
|
||||||
|
# grub2-mkconfig -o /boot/grub2/grub.cfg
|
||||||
|
|
||||||
|
For testing, you might want to pass --grub-setup=/bin/true to
|
||||||
|
grub2-install - this way, grub2 is not setup in the MBR and you can
|
||||||
|
use grub to chainload a grub2 configuration.
|
||||||
|
|
||||||
|
In the grub menu.lst, just add (after changing the hd0,1 parameter):
|
||||||
|
title GNU GRUB 2 -- openSUSE 12.1 - GNU GRUB 2
|
||||||
|
kernel (hd0,1)/boot/grub2/core.img
|
||||||
|
|
||||||
|
Warning
|
||||||
|
-------
|
||||||
|
Currently, perl-Bootloader does not support grub2 as bootloader.
|
||||||
|
|
||||||
|
Therefore you need to run the following after each kernel change:
|
||||||
|
# grub2-mkconfig -o /boot/grub2/grub.cfg
|
||||||
|
@ -3,8 +3,10 @@
|
|||||||
grub-core/lib/libgcrypt/cipher/camellia.c | 3 +--
|
grub-core/lib/libgcrypt/cipher/camellia.c | 3 +--
|
||||||
2 files changed, 2 insertions(+), 4 deletions(-)
|
2 files changed, 2 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
--- a/grub-core/lib/libgcrypt-grub/cipher/camellia.c
|
Index: grub-1.99/grub-core/lib/libgcrypt-grub/cipher/camellia.c
|
||||||
+++ b/grub-core/lib/libgcrypt-grub/cipher/camellia.c
|
===================================================================
|
||||||
|
--- grub-1.99.orig/grub-core/lib/libgcrypt-grub/cipher/camellia.c
|
||||||
|
+++ grub-1.99/grub-core/lib/libgcrypt-grub/cipher/camellia.c
|
||||||
@@ -29,9 +29,8 @@ GRUB_MOD_LICENSE ("GPLv3+");
|
@@ -29,9 +29,8 @@ GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
|
|
||||||
|
|
||||||
@ -16,8 +18,10 @@
|
|||||||
typedef unsigned char u8;
|
typedef unsigned char u8;
|
||||||
|
|
||||||
/* key constants */
|
/* key constants */
|
||||||
--- a/grub-core/lib/libgcrypt/cipher/camellia.c
|
Index: grub-1.99/grub-core/lib/libgcrypt/cipher/camellia.c
|
||||||
+++ b/grub-core/lib/libgcrypt/cipher/camellia.c
|
===================================================================
|
||||||
|
--- grub-1.99.orig/grub-core/lib/libgcrypt/cipher/camellia.c
|
||||||
|
+++ grub-1.99/grub-core/lib/libgcrypt/cipher/camellia.c
|
||||||
@@ -26,10 +26,9 @@
|
@@ -26,10 +26,9 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
26
grub2-linux-submenu.patch
Normal file
26
grub2-linux-submenu.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
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,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jul 12 14:03:05 UTC 2011 - aj@suse.de
|
||||||
|
|
||||||
|
- Create submenu for all besides primary Linux kernels.
|
||||||
|
- Only run preun section during package install but not during
|
||||||
|
upgrade.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jul 12 11:48:08 UTC 2011 - aj@suse.de
|
||||||
|
|
||||||
|
- Update README.openSUSE
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue May 31 10:42:29 CEST 2011 - jslaby@suse.de
|
Tue May 31 10:42:29 CEST 2011 - jslaby@suse.de
|
||||||
|
|
||||||
|
18
grub2.spec
18
grub2.spec
@ -51,6 +51,7 @@ Source5: translations-20110531.tar.bz2
|
|||||||
Patch0: gcc46-fixes.patch
|
Patch0: gcc46-fixes.patch
|
||||||
Patch2: grub2-linux.patch
|
Patch2: grub2-linux.patch
|
||||||
Patch3: gccwarn.patch
|
Patch3: gccwarn.patch
|
||||||
|
Patch4: grub2-linux-submenu.patch
|
||||||
PreReq: perl-Bootloader
|
PreReq: perl-Bootloader
|
||||||
Requires: gettext-runtime
|
Requires: gettext-runtime
|
||||||
Requires(post): /sbin/install-info
|
Requires(post): /sbin/install-info
|
||||||
@ -81,6 +82,7 @@ sed -i 's,grub.texi,grub2.texi,' docs/Makefile.am
|
|||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch2 -p0
|
%patch2 -p0
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
|
%patch4 -p1
|
||||||
|
|
||||||
# README.openSUSE
|
# README.openSUSE
|
||||||
cp %{SOURCE3} .
|
cp %{SOURCE3} .
|
||||||
@ -148,30 +150,18 @@ fi
|
|||||||
if [ $1 = 0 ]; then
|
if [ $1 = 0 ]; then
|
||||||
/sbin/install-info --delete %{_infodir}/grub-dev.info %{_infodir}/dir || :
|
/sbin/install-info --delete %{_infodir}/grub-dev.info %{_infodir}/dir || :
|
||||||
/sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
|
/sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
|
||||||
fi
|
|
||||||
|
|
||||||
exec >/dev/null
|
exec >/dev/null
|
||||||
if [ -e /boot/%{name}/core.img ] ; then
|
if [ -e /boot/%{name}/core.img ] ; then
|
||||||
/sbin/update-bootloader --remove --image /boot/%{name}/core.img --name="GNU GRUB 2" || :
|
/sbin/update-bootloader --remove --image /boot/%{name}/core.img --name="GNU GRUB 2" || :
|
||||||
/sbin/update-bootloader --refresh || :
|
/sbin/update-bootloader --refresh || :
|
||||||
## XXX Ugly
|
fi
|
||||||
|
# Cleanup installed files
|
||||||
rm -f /boot/%{name}/*.mod
|
rm -f /boot/%{name}/*.mod
|
||||||
rm -f /boot/%{name}/*.img
|
rm -f /boot/%{name}/*.img
|
||||||
rm -f /boot/%{name}/*.lst
|
rm -f /boot/%{name}/*.lst
|
||||||
rm -f /boot/%{name}/device.map
|
rm -f /boot/%{name}/device.map
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#%%triggerin -- kernel, kernel-PAE
|
|
||||||
#exec >/dev/null 2>&1
|
|
||||||
## Generate grub.cfg
|
|
||||||
#%%{name}-mkconfig
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#%%triggerun -- kernel, kernel-PAE
|
|
||||||
#exec >/dev/null 2>&1
|
|
||||||
## Generate grub.cfg
|
|
||||||
#%%{name}-mkconfig
|
|
||||||
|
|
||||||
%files -f grub.lang
|
%files -f grub.lang
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%{_libdir}/%{name}
|
%{_libdir}/%{name}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user