Skip to content

fix(build): Build xcat-dep across the full CD matrix: EL 8/9/10, Ubuntu 20.04–26.04, SUSE Leap 15/16#62

Open
dhilst wants to merge 10 commits into
xcat2:masterfrom
VersatusHPC:fix/xcat-dep-matrix-build
Open

fix(build): Build xcat-dep across the full CD matrix: EL 8/9/10, Ubuntu 20.04–26.04, SUSE Leap 15/16#62
dhilst wants to merge 10 commits into
xcat2:masterfrom
VersatusHPC:fix/xcat-dep-matrix-build

Conversation

@dhilst

@dhilst dhilst commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

CD version bump (mockbuild-all.pl)

  • New --build-number N flag: appends .snap<epoch>.N to every dep package's
    Release, so each CD run publishes a fresh, monotonic NVR (an additive
    publish is a no-op on an unchanged NVR).
  • The bump is applied once, before any child builder, and is idempotent +
    concurrency-safe (safe under parallel per-arch builds sharing a source tree).
  • xCAT-genesis-base is intentionally not bumped — it lives under xcat-core
    and must stay in lockstep with the deployed core's xCAT-genesis-scripts.

SUSE support (mockbuild-all.pl, mockbuild-perl-packages.pl)

  • Recognizes opensuse-leap-<ver>-<arch> mock targets and emits the dep repo
    under sles<N>/<arch>.
  • Resolves the mock config by checking for the .cfg file on disk rather than by
    invoking mock (the EPEL <id>+epel-<rel> naming is EL-only).
  • Perl XS modules (perl-Sys-Virt, perl-Crypt-SSLeay, …) BuildRequire names
    that don't exist on openSUSE (perl-generators, perl-interpreter,
    perl-devel). On a SUSE mock target we inject a tiny local compat repo whose one
    noarch rpm Provides those names (Requires perl), so dnf builddep on the
    Fedora perl srpms resolves cleanly.

elilo (elilo/elilo-xcat.spec)

  • Uses the tracked prebuilt payload on EL8 as well (and on openSUSE, via
    %if 0%{?suse_version}), which lack the gnu-efi linker inputs elilo compiles
    against; requires elilo-xcat.
  • Selects use_prebuilt via %ifarch + %if (older rpm mis-evaluates the ||
    form), and matches both ppc64le and powerpc64le (Alma reports the latter).

Ubuntu (build-apt-repo.sh)

  • Adds the missing ubuntu20.04 → focal codename mapping.
  • Defaults apt-repo signing to the xCAT Signing Key, so dep matches core.

dhilst added 10 commits July 16, 2026 15:00
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.
@dhilst
dhilst requested a review from viniciusferrao July 17, 2026 09:39

@viniciusferrao viniciusferrao left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dhilst there are some details here:

  1. 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.

  2. The SUSE workaround only applies to the xcat-dep Perl builds. mockbuild-all.pl also builds xcat-core unless --skip-xcat is used, and the core build still requires perl-generators, which Leap does not provide. So the normal SUSE build would still fail.

  3. /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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants