2
0
mirror of https://github.com/xcat2/xcat-dep.git synced 2026-10-15 16:22:06 +00:00
Files
xcat-dep/syslinux/syslinux-xcat.spec
T
Timothy Middelkoop b4ee060226 feat(xcat-dep): build the EL10 aarch64 dependency repository
xCAT already treats aarch64 as a target: BootPolicy hands an aarch64 node
boot/grub2/grub2.aarch64, and grub2.pm aborts the node's grub configuration
when that file is missing. xcat-dep neither ships the loader nor has an
aarch64 manifest section, so mockbuild-all.pl stops at "no manifest section
for target 'alma+epel-10-aarch64'" and an aarch64 node cannot netboot.

grub2-xcat generates grub2.aarch64. riscv64 ships the distro grub2 UEFI
image unchanged, but the EL grubaa64.efi carries the distro prefix
(/EFI/<vendor>) and never finds the boot/grub2/grub.cfg-<HEXIP> that
nodeset writes. %build runs grub2-mkimage -O arm64-efi -p /boot/grub2, the
prefix grub2.ppc uses, from the noarch grub2-efi-aa64-modules, so every EL
build host produces it. efi_uga stays out of the module list: it is x86
only and grub2-mkimage fails on it for arm64-efi. The image ships as
aarch64-efi/grubaa64.efi and %post copies it to grub2.aarch64, the boot file
of DHCP client architecture 11. The openEuler x86_64 repositories carry no
grub2-efi-aa64-modules and openEuler has no aarch64 target, so that build
ships without the image. mockbuild.pl checks the payload holds an AArch64
PE image. Release 3 -> 4.

[alma+epel-10-aarch64] is a native EPEL target like x86_64 and ppc64le, not
a forcearch cross-build like riscv64, and lists what [alma+epel-10-x86_64]
lists: the EL10 service node perl set (t/servicenode_perl_deps.t), and the
noarch x86 boot loaders, because an aarch64 management node serves the x86
nodes of a mixed cluster as a ppc64le one does.

Those loaders now build natively on aarch64 the way they do on ppc64le.
elilo-xcat ships its tracked prebuilt EFI payload, as on ppc64le: elilo
cannot compile on aarch64. syslinux-xcat admits aarch64 in ExclusiveArch and
takes the ppc64le path, installing the prebuilt bootloader blobs of the
release tarball. Both noarch rpms built on aarch64 carry the same payload,
byte for byte, as the published rh10/ppc64le ones. x86_64 and ppc64le
builds are unchanged.

t/aarch64_target.t holds the manifest cell to the EL10 x86_64 one and the
loader pins to EL10 ppc64le, checks how the spec generates, ships, installs
and removes grub2.aarch64, and where grub2-mkimage and the arm64-efi
modules are installed, runs the spec's own command, checks the image is
AArch64 with a /boot/grub2 prefix, and checks that adding efi_uga fails.

aarch64 is EL10 only and is not in the --finalize-xcat-dep cross-arch
genesis copy; BUILD.md says so.

Validated: a full mockbuild-all.pl --target alma+epel-10-aarch64 on an EL10
aarch64 host builds and verifies all 22 required packages (7 minutes).

Signed-off-by: Timothy Middelkoop <tmiddelkoop@internet2.edu>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 11:26:17 -05:00

306 lines
9.1 KiB
RPMSpec

# -*- rpm -*-
%define RPMVERSION 6.03
%define VERSION 6.03
# The syslinux-xcat subpackage is BuildArch: noarch but deliberately ships the
# arch-dependent PXELINUX/SYSLINUX bootloader blobs (pxelinux.0, *.c32) under
# /opt/xcat/share/xcat/netboot/syslinux. Newer rpm (EL10) does not flag these
# real-mode/COM32 binaries, but EL8/EL9 rpm aborts the build with
# "Arch dependent binaries in noarch package". Disable that QA gate so the
# self-contained xcat netboot payload builds across EL8/EL9/EL10.
%global _binaries_in_noarch_packages_terminate_build 0
Summary: Kernel loader which uses a FAT, ext2/3 or iso9660 filesystem or a PXE network
Name: syslinux
Version: %{RPMVERSION}
Release: 1
License: GPL
Group: System/Boot
Source0: https://www.kernel.org/pub/linux/utils/boot/syslinux/%{name}-%{VERSION}.tar.xz
Patch0: syslinux-6.03-multibootif.patch
ExclusiveArch: i386 i486 i586 i686 athlon pentium4 x86_64 ppc64le aarch64
Packager: H. Peter Anvin <hpa@zytor.com>
Buildroot: %{_tmppath}/%{name}-%{VERSION}-root
Autoreq: 0
BuildRequires: nasm >= 2.03, perl
BuildRequires: mtools, libc.so.6()(64bit), python3
BuildRequires: git
BuildRequires: libuuid-devel
%define my_cc gcc
# NOTE: extlinux belongs in /sbin, not in /usr/sbin, since it is typically
# a system bootloader, and may be necessary for system recovery.
%define _sbindir /sbin
%ifnarch ppc64le aarch64
%package devel
Summary: Development environment for SYSLINUX add-on modules
Group: Development/Libraries
Requires: syslinux
%endif
%description
SYSLINUX is a suite of bootloaders, currently supporting DOS FAT
filesystems, Linux ext2/ext3 filesystems (EXTLINUX), PXE network boots
(PXELINUX), or ISO 9660 CD-ROMs (ISOLINUX). It also includes a tool,
MEMDISK, which loads legacy operating systems from these media.
%ifnarch ppc64le aarch64
%description devel
The SYSLINUX boot loader contains an API, called COM32, for writing
sophisticated add-on modules. This package contains the libraries
necessary to compile such modules.
%endif
%package extlinux
Summary: The EXTLINUX bootloader, for booting the local system.
Group: System/Boot
Requires: syslinux
%description extlinux
The EXTLINUX bootloader, for booting the local system, as well as all
the SYSLINUX/PXELINUX modules in /boot.
%package xcat
BuildArch: noarch
Summary: SYSLINUX modules in /opt/xcat/share/xcat/netboot/syslinux, available for network booting
Group: Applications/Internet
%description xcat
All the SYSLINUX/PXELINUX modules directly available for network
booting in the /opt/xcat/share/xcat/netboot/syslinux directory.
%prep
%setup -q -n syslinux-%{VERSION}
%patch0 -p1
# Source tarballs do not include .git metadata; skip submodule refresh in that case.
sed -i 's/^[[:space:]]*git submodule update --init$/[ -d .git ] \&\& git submodule update --init || :/' efi/clean-gnu-efi.sh
# GCC/glibc compatibility for major()/minor() declarations.
sed -i '/#include <sys\/types.h>/a #include <sys/sysmacros.h>' extlinux/main.c
# GCC14 strict prototype fix in COM32 syslinux debug helper.
sed -i '/#include <stdbool.h>/a #include <stdio.h>' com32/lib/syslinux/debug.c
# GCC >= 10 defaults to -fno-common; legacy syslinux code expects common symbols.
for f in mk/lib.mk mk/com32.mk mk/elf.mk mk/embedded.mk; do \
sed -i '/fno-strict-aliasing/a GCCOPT += $(call gcc_ok,-fcommon,)' "$f"; \
done
%build
make CC='%{my_cc}' PYTHON=python3 clean
make CC='%{my_cc}' PYTHON=python3 installer
%install
rm -rf %{buildroot}
%ifarch ppc64le aarch64
make CC='%{my_cc}' PYTHON=python3 install \
INSTALLROOT=%{buildroot} BINDIR=%{_bindir} SBINDIR=%{_sbindir} \
LIBDIR=%{_libdir} DATADIR=%{_datadir} \
MANDIR=%{_mandir} INCDIR=%{_includedir} \
INSTALLSUBDIRS=
%else
make CC='%{my_cc}' PYTHON=python3 install \
INSTALLROOT=%{buildroot} BINDIR=%{_bindir} SBINDIR=%{_sbindir} \
LIBDIR=%{_libdir} DATADIR=%{_datadir} \
MANDIR=%{_mandir} INCDIR=%{_includedir}
%endif
make CC='%{my_cc}' PYTHON=python3 netinstall \
INSTALLROOT=%{buildroot} TFTPBOOT=/opt/xcat/share/xcat/netboot/syslinux
if make -n extbootinstall >/dev/null 2>&1; then \
make CC='%{my_cc}' PYTHON=python3 extbootinstall \
INSTALLROOT=%{buildroot} EXTLINUXDIR=/boot/extlinux; \
else \
mkdir -p %{buildroot}/boot/extlinux; \
fi
mkdir -p %{buildroot}/etc
( cd %{buildroot}/etc && ln -s ../boot/extlinux/extlinux.conf . )
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%doc COPYING NEWS doc/*
%doc sample
%{_mandir}/man*/*
%{_bindir}/*
%{_datadir}/syslinux/*.com
%{_datadir}/syslinux/*.exe
%{_datadir}/syslinux/*.c32
%{_datadir}/syslinux/*.bin
%{_datadir}/syslinux/*.0
%{_datadir}/syslinux/memdisk
%ifnarch ppc64le aarch64
%{_datadir}/syslinux/dosutil/*
%endif
%{_datadir}/syslinux/diag/*
%{_datadir}/syslinux/efi32
%{_datadir}/syslinux/efi64
%ifnarch ppc64le aarch64
%files devel
%{_datadir}/syslinux/com32
%endif
%files extlinux
%{_sbindir}/extlinux
/boot/extlinux
%config /etc/extlinux.conf
%files xcat
/opt/xcat/share/xcat/netboot/syslinux
%post extlinux
# If we have a /boot/extlinux.conf file, assume extlinux is our bootloader
# and update it.
if [ -f /boot/extlinux/extlinux.conf ]; then \
extlinux --update /boot/extlinux ; \
elif [ -f /boot/extlinux.conf ]; then \
mkdir -p /boot/extlinux && \
mv /boot/extlinux.conf /boot/extlinux/extlinux.conf && \
extlinux --update /boot/extlinux ; \
fi
%postun
%changelog
* Thu May 29 2008 H. Peter Anvin <hpa@zytor.com>
- Use install targets; clean up various paths.
* Thu Jan 10 2008 H. Peter Anvin <hpa@zytor.com>
- Add man pages.
* Mon Nov 19 2007 Bernard Li <bernard@vanhpc.org>
- Added netpbm-progs (provides pngtopnm) to BuildPrereq (this should be
changed to BuildRequires since it is deprecated...)
* Thu Mar 15 2007 H. Peter Anvin <hpa@zytor.com>
- Move extlinux /boot stuff into /boot/extlinux.
* Thu Jan 25 2007 H. Peter Anvin <hpa@zytor.com>
- Hacks to make the 32-bit version build correctly on 64-bit machines.
* Mon Sep 19 2006 H. Peter Anvin <hpa@zytor.com>
- Add a syslinux-tftpboot module.
- Factor extlinux into its own package.
- Move to %{_datadir} (/usr/share).
* Wed Sep 21 2005 H. Peter Anvin <hpa@zytor.com>
- If /boot/extlinux.conf exist, run extlinux --update.
* Fri Sep 9 2005 H. Peter Anvin <hpa@zytor.com>
- Copy, don't link, *.c32 into /boot; rpm doesn't like breaking links.
* Tue Aug 23 2005 H. Peter Anvin <hpa@zytor.com>
- Put *.c32 into /boot.
* Thu Dec 30 2004 H. Peter Anvin <hpa@zytor.com>
- libsyslinux dropped in syslinux 3.00.
- Additional documentation.
- Add extlinux.
* Tue Dec 14 2004 H. Peter Anvin <hpa@zytor.com>
- Add a devel package for the com32 library added in 2.12.
* Wed Apr 16 2003 H. Peter Anvin <hpa@zytor.com> 2.04-1
- 2.04 release
- Add support for libsyslinux.so*
- Templatize for inclusion in CVS tree
* Thu Apr 10 2003 H. Peter Anvin <hpa@zytor.com>
- 2.03 release
- Add support for libsyslinux.a
- Add keytab-lilo.pl to the /usr/lib/syslinux directory
- Modernize syntax
- Support building on x86-64
* Thu Feb 13 2003 H. Peter Anvin <hpa@zytor.com>
- 2.02 release; no longer setuid
* Thu Jan 30 2003 H. Peter Anvin <hpa@zytor.com>
- Prepare for 2.01 release; make /usr/bin/syslinux setuid root
* Fri Oct 25 2002 H. Peter Anvin <hpa@zytor.com>
- Upgrade to 2.00.
* Tue Aug 27 2002 H. Peter Anvin <hpa@zytor.com>
- Upgrade to 1.76.
* Fri Jun 14 2002 H. Peter Anvin <hpa@zytor.com>
- Upgrade to 1.75.
* Sat Jun 1 2002 H. Peter Anvin <hpa@zytor.com>
- Upgrade to 1.74.
* Sun May 26 2002 H. Peter Anvin <hpa@zytor.com>
- Upgrade to 1.73.
* Tue Apr 23 2002 H. Peter Anvin <hpa@zytor.com>
- Upgrade to 1.72.
* Wed Apr 17 2002 H. Peter Anvin <hpa@zytor.com>
- Upgrade to 1.71.
- Update the title.
* Wed Apr 17 2002 H. Peter Anvin <hpa@zytor.com>
- Upgrade to 1.70.
* Sat Feb 3 2002 H. Peter Anvin <hpa@zytor.com>
- Upgrade to 1.67.
* Tue Jan 1 2002 H. Peter Anvin <hpa@zytor.com>
- Upgrade to 1.66.
* Sat Dec 15 2001 H. Peter Anvin <hpa@zytor.com>
- Upgrade to 1.65; make appropriate changes.
* Sat Aug 24 2001 H. Peter Anvin <hpa@zytor.com>
- Upgrade to 1.64.
* Mon Aug 6 2001 H. Peter Anvin <hpa@zytor.com>
- Upgrade to 1.63.
- Use make install since the stock SYSLINUX distribution now supports
INSTALLROOT.
* Sat Apr 24 2001 H. Peter Anvin <hpa@zytor.com>
- Upgrade to 1.62.
* Sat Apr 14 2001 H. Peter Anvin <hpa@zytor.com>
- Fix missing %files; correct modes.
* Fri Apr 13 2001 H. Peter Anvin <hpa@zytor.com>
- Upgrade to 1.61
- Install auxilliary programs in /usr/lib/syslinux
* Sat Feb 10 2001 Matt Wilson <msw@redhat.com>
- 1.52
* Wed Jan 24 2001 Matt Wilson <msw@redhat.com>
- 1.51pre7
* Mon Jan 22 2001 Matt Wilson <msw@redhat.com>
- 1.51pre5
* Fri Jan 19 2001 Matt Wilson <msw@redhat.com>
- 1.51pre3, with e820 detection
* Tue Dec 12 2000 Than Ngo <than@redhat.com>
- rebuilt with fixed fileutils
* Thu Nov 9 2000 Than Ngo <than@redhat.com>
- update to 1.49
- update ftp site
- clean up specfile
- add some useful documents
* Tue Jul 18 2000 Nalin Dahyabhai <nalin@redhat.com>
- add %%defattr (release 4)
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild
* Thu Jul 06 2000 Trond Eivind Glomsrod <teg@redhat.com>
- use %%{_tmppath}
- change application group (Applications/Internet doesn't seem
right to me)
- added BuildRequires
* Tue Apr 04 2000 Erik Troan <ewt@redhat.com>
- initial packaging