From a2bb9ceb3b5d480ecfecb2efc63c17217db995bb Mon Sep 17 00:00:00 2001 From: Jacek Konieczny Date: Wed, 31 Oct 2012 14:27:11 +0100 Subject: [PATCH] Moved to /lib/efi/%{efi_arch}/elilo.efi Root directory of the EFI system partition is not a good place for a boot loader. And putting it there via RPM is probably not very reliable. --- elilo.spec | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/elilo.spec b/elilo.spec index 9c523c6..f101691 100644 --- a/elilo.spec +++ b/elilo.spec @@ -2,7 +2,7 @@ Summary: ELILO: EFI Linux Boot Loader Summary(pl.UTF-8): ELILO - linuksowy bootloader dla platform EFI Name: elilo Version: 3.14 -Release: 1 +Release: 1.1 License: GPL v2+ Group: Applications/System Source0: http://downloads.sourceforge.net/elilo/%{name}-%{version}-all.tar.gz @@ -12,6 +12,16 @@ BuildRequires: gnu-efi >= 3.0d ExclusiveArch: %{ix86} %{x8664} ia64 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) +%ifarch %{ix86} +%define efi_arch ia32 +%endif +%ifarch %{x8664} +%define efi_arch x64 +%endif +%ifarch ia64 +%define efi_arch ia64 +%endif + %description ELILO is the EFI Linux boot loader for IA-64 (IPF), IA-32 (x86) and x86_64 EFI-based platforms. @@ -36,10 +46,17 @@ tar xf elilo-%{version}-source.tar.gz %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT{%{_sbindir},/boot/efi} +install -d $RPM_BUILD_ROOT{%{_sbindir},/lib/efi/%{efi_arch}} install elilo/tools/eliloalt $RPM_BUILD_ROOT%{_sbindir} -install elilo/elilo.efi $RPM_BUILD_ROOT/boot/efi +install elilo/elilo.efi $RPM_BUILD_ROOT/lib/efi/%{efi_arch}/elilo.efi + +%triggerpostun -- %{name} < 3.14-1.1 +# someone may have boot configured from this misplaced location +# better put elilo.efi copy there too +echo "Upgrade detected, copying elilo.efi to /boot/efi/elilo.efi..." +cp --preserve=ship,timestamps /lib/efi/%{efi_arch}/elilo.efi /boot/efi/elilo.efi || : +echo "Remove /boot/efi/elilo.efi if you don't need it." %clean rm -rf $RPM_BUILD_ROOT @@ -48,4 +65,4 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %doc %{version}-release-notes.txt elilo/{ChangeLog,README*,TODO} elilo/docs/*.txt elilo/examples %attr(755,root,root) %{_sbindir}/eliloalt -/boot/efi/elilo.efi +/lib/efi/%{efi_arch}/elilo.efi -- 2.44.0