fix(build): Build xcat-dep across the full CD matrix: EL 8/9/10, Ubuntu 20.04–26.04, SUSE Leap 15/16#62
fix(build): Build xcat-dep across the full CD matrix: EL 8/9/10, Ubuntu 20.04–26.04, SUSE Leap 15/16#62dhilst wants to merge 10 commits into
Conversation
Append .snap<epoch>.<build_number> to every xcat-dep package spec Release so each CD run publishes a fresh, monotonic NVR (deploy's additive rsync is a no-op on an unchanged NVR). Applied before any child builder; genesis-base lives under xcat-core and is untouched, keeping it in lockstep with the deployed core's genesis-scripts.
Two parallel per-arch builds share the NFS source tree; the second finds every spec already stamped with the identical .snap<epoch>.<build_number> suffix. Treat all-already-stamped as the normal idempotent case (fail only when NO spec has a Release: line at all), and write specs atomically (temp + rename) so a concurrent arch never reads a torn spec.
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.
…-evaluates)
EL8/EL9 mock chroots run an older rpm that does not evaluate an || between a
string compare and an arithmetic test like EL10's rpm, so use_prebuilt stayed
unset on el9-ppc and the gnu-efi BuildRequires (absent on ppc) broke the build.
Use two independent %ifarch ppc64le / %if 0%{?rhel}==8 blocks instead.
…powerpc64le)
The mock chroot's %{_host_cpu} is 'powerpc64le' on AlmaLinux ppc chroots but
'ppc64le' on Rocky, so the single ppc64le compare left use_prebuilt unset on
alma and pulled in the ppc-absent gnu-efi BuildRequires. Match both spellings.
Adds the missing focal (20.04) codename and switches the default apt signing identity from the legacy xcat@megware.com key to the xCAT Signing Key (64C82A868D818E69) so xcat-dep apt InRelease is signed by the same key as xcat-core apt.
…ning mock mock --print-root-path can fail transiently (bootstrap chroot setup, a concurrent mock holding a lock), which made el10 flakily resolve to the long os_id form that has no .cfg and then die 'Could not find mock config for almalinux+epel-10-...'. Check /etc/mock/<cfg>.cfg existence instead -- deterministic and fast.
…arch>)
Add target_osdir() so a build target maps to its deploy subdir + family:
alma+epel-10-* -> (el, rh10), opensuse-leap-15.6-* -> (suse, sles15). Thread the
osdir + family through deploy_target + write_dep_repo_metadata (sles/devel zypper
baseurl for SUSE, yum for EL). Lets --target opensuse-leap-{15.6,16.0}-<arch>
build the dep set into sles{15,16}/<arch>.
… repo
- elilo: add %if 0%{?suse_version} to use_prebuilt (openSUSE lacks the gnu-efi
linker inputs elilo compiles against, same as EL8/ppc).
- mockbuild-perl-packages: on openSUSE mock, inject a tiny local repo whose one
noarch rpm Provides perl-generators + perl-interpreter (Requires perl), so
'dnf builddep' on the Fedora perl srpms resolves those (SUSE-absent) names.
perl-Sys-Virt / perl-Crypt-SSLeay (XS modules) BuildRequire perl-devel, absent on openSUSE (the dev headers live in the perl package). Add perl-devel to the compat provides so dnf builddep resolves it.
viniciusferrao
left a comment
There was a problem hiding this comment.
@dhilst there are some details here:
-
The release bump misses some packages: HTML-Form, IO-Stty, and Net-Telnet are rebuilt from committed SRPMs, so changing their checked-out spec files has no effect. Sys-Virt is missed too because it uses lowercase
release:. These packages keep their old NVR and may still be skipped during publishing. -
The SUSE workaround only applies to the
xcat-depPerl builds.mockbuild-all.plalso buildsxcat-coreunless--skip-xcatis used, and the core build still requires perl-generators, which Leap does not provide. So the normal SUSE build would still fail. -
/tmp/xcat-suse-buildreq-compat is used by everyone so it may lead to multiple build running at the same time. Not sure that was the original intent.
CD version bump (
mockbuild-all.pl)--build-number Nflag: appends.snap<epoch>.Nto every dep package'sRelease, so each CD run publishes a fresh, monotonic NVR (an additivepublish is a no-op on an unchanged NVR).
concurrency-safe (safe under parallel per-arch builds sharing a source tree).
xCAT-genesis-baseis intentionally not bumped — it lives under xcat-coreand must stay in lockstep with the deployed core's
xCAT-genesis-scripts.SUSE support (
mockbuild-all.pl,mockbuild-perl-packages.pl)opensuse-leap-<ver>-<arch>mock targets and emits the dep repounder
sles<N>/<arch>..cfgfile on disk rather than byinvoking mock (the EPEL
<id>+epel-<rel>naming is EL-only).perl-Sys-Virt,perl-Crypt-SSLeay, …) BuildRequire namesthat don't exist on openSUSE (
perl-generators,perl-interpreter,perl-devel). On a SUSE mock target we inject a tiny local compat repo whose onenoarch rpm Provides those names (Requires
perl), sodnf builddepon theFedora perl srpms resolves cleanly.
elilo (
elilo/elilo-xcat.spec)%if 0%{?suse_version}), which lack the gnu-efi linker inputs elilo compilesagainst; requires
elilo-xcat.use_prebuiltvia%ifarch+%if(older rpm mis-evaluates the||form), and matches both
ppc64leandpowerpc64le(Alma reports the latter).Ubuntu (
build-apt-repo.sh)ubuntu20.04 → focalcodename mapping.