Fix some efi modules bugs

- Fix grub2-efi-modules provides/obsoletes generation
  Resolves: rhbz#1506704
- *Also* build grub-efi-ia32{,-*,!-modules} packages for i686 builds
  Resolves: rhbz#1502312

Signed-off-by: Peter Jones <pjones@redhat.com>
This commit is contained in:
Peter Jones 2018-01-18 14:03:23 -05:00
parent fa8b2484d0
commit dc3a93bf0e
2 changed files with 36 additions and 10 deletions

View file

@ -61,15 +61,9 @@
%global platform ieee1275 %global platform ieee1275
%endif %endif
%ifarch %{ix86}
%global target_cpu_name %{_arch}
%global legacy_target_cpu_name i386
%global legacy_package_arch pc
%global platform pc
%endif
%global efi_only aarch64 %{arm} %global efi_only aarch64 %{arm}
%global efi_arch x86_64 ia64 %{efi_only} %global efi_arch x86_64 %{ix86} ia64 %{efi_only}
%ifarch %{efi_arch} %ifarch %{efi_arch}
%global with_efi_arch 1 %global with_efi_arch 1
%else %else
@ -96,6 +90,17 @@
%global legacy_provides -l %global legacy_provides -l
%endif %endif
%ifarch %{ix86}
%global efiarch ia32
%global target_cpu_name i386
%global grub_target_name i386-efi
%global package_arch efi-ia32
%global legacy_target_cpu_name i386
%global legacy_package_arch pc
%global platform pc
%endif
%ifarch x86_64 %ifarch x86_64
%global efiarch x64 %global efiarch x64
%global target_cpu_name %{_arch} %global target_cpu_name %{_arch}
@ -140,6 +145,13 @@
%global grubefiname grub%{efiarch}.efi %global grubefiname grub%{efiarch}.efi
%global grubeficdname gcd%{efiarch}.efi %global grubeficdname gcd%{efiarch}.efi
%global grubefiarch %{target_cpu_name}-efi %global grubefiarch %{target_cpu_name}-efi
%ifarch %{ix86}
%global with_efi_modules 0
%global without_efi_modules 1
%else
%global with_efi_modules 1
%global without_efi_modules 0
%endif
%endif %endif
%if 0%{?alt_efi_arch:1} %if 0%{?alt_efi_arch:1}
@ -233,16 +245,18 @@ Provides: %{name}-efi = %{evr} \
This subpackage provides support for %{1} systems. \ This subpackage provides support for %{1} systems. \
\ \
%{expand:%%{?!buildsubdir:%%define buildsubdir grub-%{1}-%{tarversion}}}\ %{expand:%%{?!buildsubdir:%%define buildsubdir grub-%{1}-%{tarversion}}}\
%{expand:%if 0%{?with_efi_modules} \
%{expand:%%package %{1}-modules} \ %{expand:%%package %{1}-modules} \
Summary: Modules used to build custom grub.efi images \ Summary: Modules used to build custom grub.efi images \
Group: System Environment/Base \ Group: System Environment/Base \
BuildArch: noarch \ BuildArch: noarch \
Requires: %{name}-common = %{evr} \ Requires: %{name}-common = %{evr} \
%{-p:Provides: %{name}-efi-modules = %{evr}} \ Provides: %{name}-efi-modules = %{evr} \
%{-p:Obsoletes: %{name}-efi-modules < %{evr}} \ Obsoletes: %{name}-efi-modules < %{evr} \
%{expand:%%description %{1}-modules} \ %{expand:%%description %{1}-modules} \
%{desc} \ %{desc} \
This subpackage provides support for rebuilding your own grub.efi. \ This subpackage provides support for rebuilding your own grub.efi. \
%endif} \
\ \
%{expand:%%package %{1}-cdboot} \ %{expand:%%package %{1}-cdboot} \
Summary: Files used to boot removeable media with EFI \ Summary: Files used to boot removeable media with EFI \
@ -480,12 +494,18 @@ touch ${RPM_BUILD_ROOT}/boot/%{name}/grub.cfg \
%ghost %config(noreplace) /boot/efi/EFI/%{efidir}/grub.cfg \ %ghost %config(noreplace) /boot/efi/EFI/%{efidir}/grub.cfg \
/boot/grub2/grubenv \ /boot/grub2/grubenv \
%ghost %config(noreplace) %attr(0700,root,root)/boot/efi/EFI/%{efidir}/grubenv \ %ghost %config(noreplace) %attr(0700,root,root)/boot/efi/EFI/%{efidir}/grubenv \
%{expand:%if 0%{?without_efi_modules} \
%exclude %{_libdir}/grub/%{6} \
%exclude %{_libdir}/grub/%{6}/* \
%endif} \
\ \
%{expand:%if 0%{?with_efi_modules} \
%{expand:%%files %{1}-modules} \ %{expand:%%files %{1}-modules} \
%defattr(-,root,root,-) \ %defattr(-,root,root,-) \
%dir %{_libdir}/grub/%{6}/ \ %dir %{_libdir}/grub/%{6}/ \
%{_libdir}/grub/%{6}/* \ %{_libdir}/grub/%{6}/* \
%exclude %{_libdir}/grub/%{6}/*.module \ %exclude %{_libdir}/grub/%{6}/*.module \
%endif} \
\ \
%{expand:%%files %{1}-cdboot} \ %{expand:%%files %{1}-cdboot} \
%defattr(-,root,root,-) \ %defattr(-,root,root,-) \

View file

@ -7,7 +7,7 @@
Name: grub2 Name: grub2
Epoch: 1 Epoch: 1
Version: 2.02 Version: 2.02
Release: 20%{?dist} Release: 21%{?dist}
Summary: Bootloader with support for Linux, Multiboot and more Summary: Bootloader with support for Linux, Multiboot and more
Group: System Environment/Base Group: System Environment/Base
License: GPLv3+ License: GPLv3+
@ -454,6 +454,12 @@ fi
%endif %endif
%changelog %changelog
* Thu Jan 18 2018 Peter Jones <pjones@redhat.com> - 2.02-21
- Fix grub2-efi-modules provides/obsoletes generation
Resolves: rhbz#1506704
- *Also* build grub-efi-ia32{,-*,!-modules} packages for i686 builds
Resolves: rhbz#1502312
* Wed Jan 17 2018 Peter Jones <pjones@redhat.com> - 2.02-20 * Wed Jan 17 2018 Peter Jones <pjones@redhat.com> - 2.02-20
- Pull in patches for Apollo Lake hardware - Pull in patches for Apollo Lake hardware
Resolves: rhbz#1519311 Resolves: rhbz#1519311