mirror of
https://github.com/xcat2/xcat-dep.git
synced 2026-09-12 04:26:25 +00:00
fix(elilo): use tracked prebuilt payload on EL8 too; require elilo-xcat
EL8's gnu-efi-devel places elf_x86_64_efi.lds where elilo's Makefile can't find it, so elilo failed to compile on EL8 -- yet xCAT hard-requires elilo-xcat on every arch, so the whole dep repo became uninstallable. Reuse the same tracked prebuilt elilo-x64.efi (SOURCE4) that ppc64le already uses (elilo-x64.efi is a noarch artifact). Also add elilo-xcat to assert_required_deps so a missing elilo fails the build loudly instead of surfacing later as a dnf depsolve error. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
This commit is contained in:
+12
-5
@@ -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
|
||||
|
||||
+4
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user