diff --git a/grub2.changes b/grub2.changes index 294dd33..322c6ba 100644 --- a/grub2.changes +++ b/grub2.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Feb 19 15:38:04 UTC 2013 - duwe@suse.com + + Fix up bogus items from the previous merge: + - efi_libdir = _libdir = /usr/lib + - package /usr/lib/grub2 dir only once + - move grub.efi to /usr/lib/grub2/%{grubefiarch}/ + - create a symlink so that scripts can find it there. + ------------------------------------------------------------------- Thu Feb 14 11:42:40 UTC 2013 - duwe@suse.com diff --git a/grub2.spec b/grub2.spec index a38cac1..52b0e2a 100644 --- a/grub2.spec +++ b/grub2.spec @@ -51,16 +51,9 @@ BuildRequires: pesign-obs-integration %endif %endif -# Modules always contain just 32-bit code +# Modules code is dynamically loaded and collected from a _fixed_ path. %define _libdir %{_exec_prefix}/lib -%ifarch x86_64 -# x86_64-efi is 64-bit code, though .. -%define efi_libdir %{_exec_prefix}/lib64 -%else -%define efi_libdir %{_libdir} -%endif - %ifarch ppc ppc64 %define grubcpu powerpc %define platform ieee1275 @@ -305,7 +298,7 @@ cd build-efi --prefix=%{_prefix} \ --sysconfdir=%{_sysconfdir} \ --target=%{_target_platform} \ - --libdir=%{efi_libdir} \ + --libdir=%{_libdir} \ --with-platform=efi \ --program-transform-name=s,grub,%{name}, make %{?_smp_mflags} @@ -363,14 +356,24 @@ make %{?_smp_mflags} %ifarch %{efi} %ifarch x86_64 %if 0%{?suse_version} >= 1230 || 0%{?sles_version} >= 11 -export BRP_PESIGN_FILES="%{efi_libdir}/efi/grub.efi" +export BRP_PESIGN_FILES="%{_libdir}/%{name}/%{grubefiarch}/grub.efi" %endif %endif cd build-efi make DESTDIR=$RPM_BUILD_ROOT install -install -m 755 -d $RPM_BUILD_ROOT%{efi_libdir}/efi -install -m 644 grub.efi $RPM_BUILD_ROOT%{efi_libdir}/efi/grub.efi +install -m 644 grub.efi $RPM_BUILD_ROOT%{_libdir}/%{name}/%{grubefiarch}/. + +# Create grub.efi link to system efi directory +# This is for tools like kiwi not fiddling with the path +%if "%{grubefiarch}" == "x86_64-efi" +%define sysefidir %{_exec_prefix}/lib64/efi +%else +%define sysefidir %{_libdir}/efi +%endif +install -d $RPM_BUILD_ROOT%{sysefidir} +ln -sf ../../../%{_libdir}/%{name}/%{grubefiarch}/grub.efi $RPM_BUILD_ROOT%{sysefidir}/grub.efi + cd .. %endif @@ -392,14 +395,7 @@ install -d $RPM_BUILD_ROOT/boot/%{name} touch $RPM_BUILD_ROOT/boot/%{name}/grub.cfg # Remove devel files -%ifarch x86_64 -%if ! 0%{?only_efi:1} rm $RPM_BUILD_ROOT/%{_libdir}/%{name}/*/*.h -%endif -rm $RPM_BUILD_ROOT/%{efi_libdir}/%{name}/*/*.h -%else -rm $RPM_BUILD_ROOT/%{_libdir}/%{name}/*/*.h -%endif %if 0%{?suse_version} >= 1140 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/*.h %endif @@ -610,6 +606,7 @@ fi %{_bindir}/%{name}-mkstandalone %{_bindir}/%{name}-mount %{_bindir}/%{name}-script-check +%dir %{_libdir}/%{name} %dir %{_datadir}/%{name} %if 0%{?suse_version} >= 1140 %{_datadir}/%{name}/*.pf2 @@ -622,7 +619,6 @@ fi %files %{grubarch} %defattr(-,root,root,-) -%dir %{_libdir}/%{name} %dir %{_libdir}/%{name}/%{grubarch} %ifnarch ppc ppc64 %{_libdir}/%{name}/%{grubarch}/*.image @@ -655,18 +651,18 @@ fi %files %{grubefiarch} %defattr(-,root,root,-) -%dir %{efi_libdir}/efi -%dir %{efi_libdir}/%{name} -%dir %{efi_libdir}/%{name}/%{grubefiarch} -%{efi_libdir}/efi/grub.efi -%{efi_libdir}/%{name}/%{grubefiarch}/*.img -%{efi_libdir}/%{name}/%{grubefiarch}/*.lst -%{efi_libdir}/%{name}/%{grubefiarch}/*.mod -%{efi_libdir}/%{name}/%{grubefiarch}/*.module -%{efi_libdir}/%{name}/%{grubefiarch}/gdb_grub2 -%{efi_libdir}/%{name}/%{grubefiarch}/gmodule.pl -%{efi_libdir}/%{name}/%{grubefiarch}/kernel.exec -%{efi_libdir}/%{name}/%{grubefiarch}/modinfo.sh +%dir %{_libdir}/%{name}/%{grubefiarch} +%{_libdir}/%{name}/%{grubefiarch}/grub.efi +%{_libdir}/%{name}/%{grubefiarch}/*.img +%{_libdir}/%{name}/%{grubefiarch}/*.lst +%{_libdir}/%{name}/%{grubefiarch}/*.mod +%{_libdir}/%{name}/%{grubefiarch}/*.module +%{_libdir}/%{name}/%{grubefiarch}/gdb_grub2 +%{_libdir}/%{name}/%{grubefiarch}/gmodule.pl +%{_libdir}/%{name}/%{grubefiarch}/kernel.exec +%{_libdir}/%{name}/%{grubefiarch}/modinfo.sh +%dir %{sysefidir} +%{sysefidir}/grub.efi %endif %changelog