Accepting request 160299 from Base:System
Please review this v2. version. Thanks. v2. Renaming of grub2-efi unconditionally. - remove all compatible links in grub2-efi as now all concerned utilities are fixed - superseding grub2-efi by grub2-x86_64-efi and grub2-i386-efi on x86_64 and ix86 respectively - make grub2-x86_64-efi and grub2-i386-efi providing grub2-efi capability to not break package dependency - handle upgrade from 12.2 by preseving grubenv and custom.cfg to new directory /boot/grub2, rename /boot/grub2-efi to /boot/grub2-efi.rpmsave to avoid confusion. (forwarded request 160165 from michael-chang) OBS-URL: https://build.opensuse.org/request/show/160299 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grub2?expand=0&rev=62
This commit is contained in:
commit
fab2335336
@ -1,3 +1,31 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 13 11:30:52 UTC 2013 - mchang@suse.com
|
||||
|
||||
- remove all compatible links in grub2-efi as now all concerned
|
||||
utilities are fixed
|
||||
- superseding grub2-efi by grub2-x86_64-efi and grub2-i386-efi on
|
||||
x86_64 and ix86 respectively
|
||||
- make grub2-x86_64-efi and grub2-i386-efi providing grub2-efi
|
||||
capability to not break package dependency
|
||||
- handle upgrade from 12.2 by preseving grubenv and custom.cfg to
|
||||
new directory /boot/grub2, rename /boot/grub2-efi to
|
||||
/boot/grub2-efi.rpmsave to avoid confusion.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 11 16:02:26 UTC 2013 - arvidjaar@gmail.com
|
||||
|
||||
- move post scripts into corresponding subpackages to ensure they are
|
||||
run after updated binaries are installed. Currently it may happen
|
||||
that update-bootlader picks up old binaries.
|
||||
- move requires for perl-Bootloader to target subpackages. Make sure
|
||||
efi requires minimal version that supports /boot/grub2.
|
||||
- add requires(post) to force order of installation: grub2 => grub2-arch
|
||||
=> grub2-efi
|
||||
- split efi post in two parts. One that updates configuration and is part
|
||||
of grub2-efiarch and second that migrates settings and is part of
|
||||
grub2-efi. Only custom.cfg and grubenv may need migration. device.map
|
||||
is not relevant for EFI and new grub.cfg had been created at this point.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 11 06:52:58 UTC 2013 - mchang@suse.com
|
||||
|
||||
|
115
grub2.spec
115
grub2.spec
@ -135,7 +135,6 @@ Patch30: grub2-cdpath.patch
|
||||
Patch31: efidisk-ahci-workaround
|
||||
Patch32: grub2-grub-mount-return-failure-if-FUSE-failed.patch
|
||||
Patch33: grub2-fix-tftp-endianness.patch
|
||||
PreReq: perl-Bootloader
|
||||
Requires: gettext-runtime
|
||||
%if 0%{?suse_version} >= 1140
|
||||
Requires: os-prober
|
||||
@ -176,6 +175,10 @@ Authors:
|
||||
|
||||
Summary: Bootloader with support for Linux, Multiboot and more
|
||||
Group: System/Boot
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires(post): %{name} = %{version}-%{release}
|
||||
Requires: perl-Bootloader
|
||||
Requires(post): perl-Bootloader
|
||||
|
||||
%description %{grubarch}
|
||||
The GRand Unified Bootloader (GRUB) is a highly configurable and customizable
|
||||
@ -184,32 +187,6 @@ file systems, computer architectures and hardware devices. This subpackage
|
||||
provides support for %{platform} systems.
|
||||
|
||||
%ifarch %{efi}
|
||||
%if 0%{?suse_version} == 1220 || 0%{?suse_version} == 1230
|
||||
%package efi
|
||||
|
||||
Summary: Bootloader with support for Linux, Multiboot and more
|
||||
Group: System/Boot
|
||||
PreReq: %{name} = %{version}-%{release}
|
||||
PreReq: %{name}-%{grubefiarch} = %{version}-%{release}
|
||||
|
||||
%description efi
|
||||
This is the second version of the GRUB (Grand Unified Bootloader), a
|
||||
highly configurable and customizable bootloader with modular
|
||||
architecture. It support rich scale of kernel formats, file systems,
|
||||
computer architectures and hardware devices.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Gordon Matzigkeit
|
||||
Yoshinori K. Okuji
|
||||
Colin Watson
|
||||
Colin D. Bennett
|
||||
Vesa Jääskeläinen
|
||||
Robert Millan
|
||||
Carles Pina
|
||||
%endif
|
||||
|
||||
%package %{grubefiarch}
|
||||
|
||||
@ -218,7 +195,14 @@ Group: System/Boot
|
||||
%ifarch ia64 x86_64
|
||||
#Package is available on ia64 and x86_64 only and not necessarily needed
|
||||
Requires: efibootmgr
|
||||
Requires(post): efibootmgr
|
||||
%endif
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires(post): %{name} = %{version}-%{release}
|
||||
Requires: perl-Bootloader >= 0.706
|
||||
Requires(post): perl-Bootloader >= 0.706
|
||||
Provides: %{name}-efi = %{version}-%{release}
|
||||
Obsoletes: %{name}-efi < %{version}-%{release}
|
||||
|
||||
%description %{grubefiarch}
|
||||
The GRand Unified Bootloader (GRUB) is a highly configurable and customizable
|
||||
@ -405,17 +389,6 @@ rm $RPM_BUILD_ROOT/%{_libdir}/%{name}/*/*.h
|
||||
rm $RPM_BUILD_ROOT%{_datadir}/%{name}/*.h
|
||||
%endif
|
||||
|
||||
%ifarch %{efi}
|
||||
%if 0%{?suse_version} == 1220 || 0%{?suse_version} == 1230
|
||||
# grub2-efi compatibility links until other packages are fixed
|
||||
ln -sf %{name}-editenv $RPM_BUILD_ROOT%{_bindir}/%{name}-efi-editenv
|
||||
ln -sf %{name}-set-default $RPM_BUILD_ROOT%{_sbindir}/%{name}-efi-set-default
|
||||
ln -sf %{name}-mkconfig $RPM_BUILD_ROOT%{_sbindir}/%{name}-efi-mkconfig
|
||||
ln -sf %{name}-install $RPM_BUILD_ROOT%{_sbindir}/%{name}-efi-install
|
||||
ln -sf %{name} $RPM_BUILD_ROOT/boot/%{name}-efi
|
||||
%endif
|
||||
%endif
|
||||
|
||||
# Defaults
|
||||
install -m 644 -D %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/default/grub
|
||||
install -m 755 -D %{SOURCE6} $RPM_BUILD_ROOT%{_sbindir}/grub2-once
|
||||
@ -427,6 +400,8 @@ install -m 755 -D %{SOURCE6} $RPM_BUILD_ROOT%{_sbindir}/grub2-once
|
||||
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
|
||||
|
||||
%if ! 0%{?only_efi:1}
|
||||
|
||||
%post %{grubarch}
|
||||
# To check by current loader settings
|
||||
if [ -f %{_sysconfdir}/sysconfig/bootloader ]; then
|
||||
. %{_sysconfdir}/sysconfig/bootloader
|
||||
@ -467,38 +442,8 @@ fi
|
||||
%endif
|
||||
|
||||
%ifarch %{efi}
|
||||
%if 0%{?suse_version} == 1220 || 0%{?suse_version} == 1230
|
||||
|
||||
%triggerpostun -- %{name}-efi
|
||||
|
||||
# It is needed on update only
|
||||
if [ $2 -gt 0 ]; then
|
||||
|
||||
# Workaround for lost /boot/grub2/grub.cfg and possibly /boot/grub2-efi
|
||||
# after old grub2-efi deinstallation
|
||||
if [ -f /boot/%{name}/grub.cfg.migrated ]; then
|
||||
mv /boot/%{name}/grub.cfg.migrated /boot/%{name}/grub.cfg
|
||||
fi
|
||||
[ -h /boot/%{name}-efi ] || ln -sf %{name} /boot/%{name}-efi
|
||||
|
||||
fi
|
||||
exit 0
|
||||
|
||||
%post efi
|
||||
|
||||
if [ $1 -eq 1 ]; then
|
||||
|
||||
# If this is new install, just create compatibility link
|
||||
ln -sf grub2 /boot/grub2-efi
|
||||
|
||||
else
|
||||
|
||||
# Always create compatibility link even if current loader is not grub2-efi
|
||||
if [ -h /boot/%{name}-efi ]; then
|
||||
migrate_grub2_efi=
|
||||
else
|
||||
migrate_grub2_efi=yes
|
||||
fi
|
||||
%post %{grubefiarch}
|
||||
|
||||
# To check by current loader settings
|
||||
if [ -f %{_sysconfdir}/sysconfig/bootloader ]; then
|
||||
@ -507,33 +452,24 @@ else
|
||||
|
||||
if [ "x${LOADER_TYPE}" = "xgrub2-efi" ]; then
|
||||
|
||||
if [ "$migrate_grub2_efi" ]; then
|
||||
if [ -d /boot/%{name}-efi ]; then
|
||||
# Migrate settings to standard prefix /boot/grub2
|
||||
for i in custom.cfg device.map grub.cfg grubenv; do
|
||||
for i in custom.cfg grubenv; do
|
||||
[ -f /boot/%{name}-efi/$i ] && cp -a /boot/%{name}-efi/$i /boot/%{name} || :
|
||||
done
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if [ "$migrate_grub2_efi" ]; then
|
||||
mv /boot/%{name}-efi /boot/%{name}-efi.rpmsave
|
||||
ln -sf %{name} /boot/%{name}-efi
|
||||
fi
|
||||
|
||||
if [ "x${LOADER_TYPE}" = "xgrub2-efi" ]; then
|
||||
# It's enough to call update-bootloader --refesh to install grub2 and update it's config
|
||||
/sbin/update-bootloader --refresh || true
|
||||
|
||||
# Uninstallation of previous grub2-efi versions will remove
|
||||
# /boot/grub2-efi/grub.cfg and possibly /boot/grub2-efi itself.
|
||||
# Preserve grub2.cfg and use it as migration flag in postun trigger
|
||||
[ "$migrate_grub2_efi" ] && mv /boot/%{name}/grub.cfg /boot/%{name}/grub.cfg.migrated
|
||||
fi
|
||||
|
||||
if [ -d /boot/%{name}-efi ]; then
|
||||
mv /boot/%{name}-efi /boot/%{name}-efi.rpmsave
|
||||
fi
|
||||
|
||||
exit 0
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%preun
|
||||
if [ $1 = 0 ]; then
|
||||
@ -643,17 +579,6 @@ fi
|
||||
|
||||
%ifarch %{efi}
|
||||
|
||||
%if 0%{?suse_version} == 1220 || 0%{?suse_version} == 1230
|
||||
%files efi
|
||||
%defattr(-,root,root,-)
|
||||
%doc README
|
||||
%ghost /boot/grub2-efi
|
||||
%{_sbindir}/grub2-efi-install
|
||||
%{_sbindir}/grub2-efi-mkconfig
|
||||
%{_sbindir}/grub2-efi-set-default
|
||||
%{_bindir}/grub2-efi-editenv
|
||||
%endif
|
||||
|
||||
%files %{grubefiarch}
|
||||
%defattr(-,root,root,-)
|
||||
%dir %{_libdir}/%{name}/%{grubefiarch}
|
||||
|
Loading…
Reference in New Issue
Block a user