diff --git a/elilo/elilo-xcat.spec b/elilo/elilo-xcat.spec index 3cbd284..b8a9156 100644 --- a/elilo/elilo-xcat.spec +++ b/elilo/elilo-xcat.spec @@ -19,10 +19,17 @@ Patch1: elilo-xcat.patch Patch2: elilo-big-bzimage-limit.patch Patch3: elilo-gnu-efi-strncpy-conflict.patch Source4: elilo-xcat-3.14-6.noarch.rpm +# Ship the tracked prebuilt EFI payload (SOURCE4) instead of compiling on targets where the +# gnu-efi toolchain layout does not support elilo's build: ppc64le (no x86 EFI toolchain) and +# EL8 (gnu-efi-devel places elf_x86_64_efi.lds under a path elilo's Makefile does not find). +# elilo-x64.efi is a noarch artifact, so the prebuilt is byte-identical to the compiled one. +%if "%{_host_cpu}" == "ppc64le" || 0%{?rhel} == 8 +%global use_prebuilt 1 +%endif BuildRequires: gcc BuildRequires: make BuildRequires: cpio -%if "%{_host_cpu}" != "ppc64le" +%if ! 0%{?use_prebuilt} BuildRequires: gnu-efi BuildRequires: gnu-efi-devel %endif @@ -48,8 +55,8 @@ sed -i 's|^GNUEFILIB[[:space:]]*=.*|GNUEFILIB = /usr/lib64|' Make.defaults sed -i 's|^EFILIB[[:space:]]*=.*|EFILIB = /usr/lib64|' Make.defaults sed -i 's|^EFICRT0[[:space:]]*=.*|EFICRT0 = /usr/lib|' Make.defaults %endif -%if "%{_host_cpu}" == "ppc64le" -# On ppc64le, reuse the prebuilt EFI payload from the tracked noarch package. +%if 0%{?use_prebuilt} +# Reuse the prebuilt EFI payload from the tracked noarch package (ppc64le / EL8). mkdir -p prebuilt rpm2cpio %{SOURCE4} | (cd prebuilt && cpio -idm --quiet) test -f prebuilt/tftpboot/xcat/elilo-x64.efi @@ -59,7 +66,7 @@ test -f prebuilt/tftpboot/xcat/elilo-x64.efi rm -rf %{buildroot} -%if "%{_host_cpu}" != "ppc64le" +%if ! 0%{?use_prebuilt} make %endif @@ -67,7 +74,7 @@ make %install mkdir -p %{buildroot}/tftpboot/xcat -%if "%{_host_cpu}" == "ppc64le" +%if 0%{?use_prebuilt} cp prebuilt/tftpboot/xcat/elilo-x64.efi %{buildroot}/tftpboot/xcat/elilo-x64.efi %else cp elilo.efi %{buildroot}/tftpboot/xcat/elilo-x64.efi diff --git a/mockbuild-all.pl b/mockbuild-all.pl index 104cb40..f3659a9 100755 --- a/mockbuild-all.pl +++ b/mockbuild-all.pl @@ -931,7 +931,10 @@ sub assert_required_deps { # xCAT Requires all of these on every arch, and every one of them builds natively on every # arch (the noarch deps -- grub2-xcat, xnba-undi -- just repackage committed artifacts), so # a self-sufficient per-arch build produces the whole set with no cross-arch import. - my @req = qw(ipmitool-xcat syslinux-xcat grub2-xcat xnba-undi + # elilo-xcat is noarch but xCAT hard-requires it (Requires: elilo-xcat >= 3.14-6) on EVERY arch, + # so a missing elilo makes the whole dep repo uninstallable -- it MUST be required here, not + # silently tolerated (it builds from a tracked prebuilt on ppc64le/EL8, compiled elsewhere). + my @req = qw(elilo-xcat ipmitool-xcat syslinux-xcat grub2-xcat xnba-undi perl-IO-Stty perl-HTTP-Async perl-Net-HTTPS-NB); push @req, 'xCAT-genesis-base' unless $skip_genesis; my @missing = grep { !have_rpm($dir, $_) } @req;