2
0
mirror of https://github.com/xcat2/xcat-dep.git synced 2026-12-03 15:47:02 +00:00

1254 Commits

Author SHA1 Message Date
Daniel Hilst ac057774a3 Merge pull request #105 from VersatusHPC/fix/ksh-sigchld-hang
fix(xcat-dep): ksh %check hangs in the SIGCHLD queueing test
2026-11-12 14:34:22 -03:00
Daniel Hilst 0a5094bf71 fix(xcat-dep): ksh %check hangs in the SIGCHLD queueing test
The openEuler 24.03 ppc64le native ksh build stopped in %check for more
than three hours, in the sigchld.sh trap queueing test. The test loops on
"sleep -s" until the CHLD trap empties its job table. A lost SIGCHLD
leaves the table not empty, and the shell waits in pause() forever.

The spec patch now gives "sleep -s" a 1 second timeout, ends the loop
after 60 seconds, and turns the check after the loop into a no-op. The
rest of %check still runs. The inputs file pins the new patch hash.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-11 20:58:09 -03:00
Daniel Hilst 9a6b2d5bd7 test(xcat-dep): ksh %check hangs in the SIGCHLD queueing test
The openEuler 24.03 ppc64le native ksh build stopped in %check for more
than three hours. The sigchld.sh trap queueing test waits with "sleep -s"
until the CHLD trap has reaped all three children. When one SIGCHLD is
lost, the test shell stays in pause() and nothing stops it.

This test requires the ksh spec patch to bound that wait loop and to turn
the check after it into a no-op. It fails on the current patch.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-11 20:58:09 -03:00
Daniel Hilst 72bdd202a2 Merge pull request #104 from VersatusHPC/fix/ksh-racy-timing-checks
fix(xcat-dep): racy ksh %check timing tests fail the openEuler ppc64le build
2026-11-11 15:43:56 -03:00
Daniel Hilst c4342afed3 fix(xcat-dep): racy ksh %check timing tests fail the openEuler ppc64le cell
The openEuler 24.03 ppc64le dep cell fails at random in the ksh native
prerequisite with "Bad exit status from ... (%check)". Four timing
checks in the ksh test suite race on a loaded ppc64le build host:
signal.sh "parent does not wait" and "parent completes early", the
subshell.sh 4 s kill timer, and the sigchld.sh JOBMAX check.

The native input catalog rebuilt ksh with its full %check, and xcat-dep
publishes that ksh, so %check must stay on.

Add a ksh spec patch, pinned in the ppc64le catalog. In %prep it turns
those four err_exit calls into no-ops, and fails the build if any edit
does not match exactly once. The rest of %check runs.
t/openeuler_native_ksh_racy_checks.t passes.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
(cherry picked from commit fdf12caac493900b3b8d242f1140b79e798b9f0f)
2026-11-11 15:08:24 -03:00
Daniel Hilst a75b2c2b41 test(xcat-dep): racy ksh %check timing tests fail the openEuler ppc64le cell
The openEuler 24.03 ppc64le dep cell fails at random in the ksh native
prerequisite, in about one run of five. The failure is always one of
four timing checks in the ksh %check suite: signal.sh "parent does not
wait" and "parent completes early", the subshell.sh 4 s kill timer, and
the sigchld.sh JOBMAX check ("test sigchld failed ... [ 14 tests 1
error ]"). xcat-dep publishes this ksh, so %check must stay on.

t/openeuler_native_ksh_racy_checks.t expects a ksh spec patch in the
native input catalog that neutralizes only those four checks and keeps
%check. It fails until the fix commit.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
(cherry picked from commit 380432a04399d72a47370ebba09cf6c8abaa0192)
2026-11-11 15:08:24 -03:00
Daniel Hilst 195665e85a Merge pull request #103 from VersatusHPC/fix/goconserver-scrub-keeps-bootstrap-cache
fix(goconserver): the bootstrap scrub removes the cache the next package needs
2026-11-09 17:57:19 -03:00
Daniel Hilst 133d501354 test(goconserver): the native fixture cannot write the host mock cache
mockbuild.pl recreates the bootstrap cache that mock --scrub=bootstrap removes,
and it built the path from a literal /var/cache/mock. goconserver-openeuler.t
runs the builder under unshare --user --map-root-user, which maps root but leaves
the host cache unwritable, so the builder died in make_path and 12 of 160
assertions failed with "mkdir /var/cache/mock/<cfg>-bootstrap: Permission denied".

The path moved into MockBuildUtils::mock_bootstrap_cache_dirs, which takes the
cache root from XCAT_MOCK_CACHE_ROOT and falls back to /var/cache/mock, so the
production default does not change. run_case points it at a directory of each
case's own, and the builder now writes nothing outside the test's temporary tree.

Each of the six configurations asserts all three directories are present after the
scrub. Removing the recreate loop from mockbuild.pl fails exactly those six and
nothing else, so the assertions measure the fix rather than the fixture.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-08 18:16:10 -03:00
Daniel Hilst 42d9e634ed fix(goconserver): the bootstrap scrub removes the cache the next package needs
goconserver reclaims its own build chroot with --scrub=chroot --scrub=bootstrap.
The bootstrap scrub also removes the shared /var/cache/mock/<cfg>-bootstrap
cache, and mock does not put it back. The next package in the run binds that
cache into its own bootstrap and fails before it compiles anything:

  /bin/mount -n -o bind /var/cache/mock/alma+epel-10-x86_64-bootstrap/yum_cache
      /var/lib/mock/alma+epel-10-x86_64-bootstrap-<uniqueext>/root/var/cache/yum

mock exits 32. conserver-xcat builds immediately after goconserver, so
xcat-dep-build-el10-x86_64 build 143 failed there after five packages had built,
and took the EL family with it. Only the el10 bootstrap is container based and
binds that cache, which is why el8 and el9 finished the same run.

The three cache directories are recreated after the scrub. The scrub itself is
left alone: mock knows the order to unmount this build's bootstrap tree in, and
removing it by hand is what propagates an unmount to the host.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-07 21:12:24 -03:00
Daniel Hilst 3631efab99 Merge pull request #100 from VersatusHPC/fix/dep-genesis-release-three-suites
fix(xcat-dep): a Genesis release cannot be published to a repository with three suites
2026-10-29 14:49:48 -03:00
Daniel Hilst ae70ae1e89 fix(xcat-dep): a Genesis release strands a suite that arrives while the publisher queues
The suite check for --genesis-release runs where the option is resolved, which is before the
publish lock. A --dists noble run can pass it, queue behind another publisher, and reach the pool
after that publisher has published jammy. publish_repo then copies jammy's index into the side
tree verbatim and wipes the shared pool it names, so jammy is left naming a DEB the new release
retired. Both runs exit 0, and the completeness gate sees nothing, because it checks the suites in
--dists.

The check now runs twice. refuse_stranded_suites holds the comparison; publish_repo calls it again
once the publish lock is held, which is the only point where no other publisher can change the
tree. The call before the build stays, so a hopeless run still fails before it builds.

The refusal happens before the side tree is created, so the published repository keeps its
contents.

test_publish_race_adds_suite in t/genesis_openembedded_consumer.t captures the sequence. Without
this commit 4 of its 9 assertions fail: the run publishes, names no stranded suite, deletes the
DEB jammy's index names, and installs the arriving release. The 5 that stay green include the
positive control, which publishes through the same lock handoff with no suite arriving.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-26 21:07:50 -03:00
Daniel Hilst 09f559d0d1 test(xcat-dep): a suite added while a publisher queues is left indexing a retired release
sbuild-all.pl resolves --genesis-release, and reads the suites the apt tree carries, before it
takes the publish lock. Nothing holds the tree still in between.

A --dists noble run against a tree that carries only noble passes that reading, queues behind
another publisher, and reaches the pool after that publisher has published jammy. publish_repo
seeds its side tree from the published tree, so jammy's index is copied in verbatim, while
install_genesis_release_debs wipes and refills the shared pool every suite indexes. jammy is then
left naming a DEB the new release retired. The completeness gate does not catch it: it checks the
suites in --dists.

test_publish_race_adds_suite drives that sequence. It holds the publish lock, so the run queues;
it waits for the RUN locks, which the run takes after --genesis-release is resolved, so the
pre-lock reading has provably happened and saw no jammy; only then does jammy appear in the tree.
It asserts the run reaches the lock, refuses, names jammy, leaves the DEB that jammy's index names
in the pool, and publishes nothing. A positive control runs the same hold-queue-release sequence
with no suite arriving and must publish, so the refusal cannot come from the lock handoff.

spawn_apt_consumer, reap_spawned and wait_for_path start a run without waiting for it.
apt_consumer_command is the command run_apt_consumer already built, moved out so both callers
share it.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-26 21:07:42 -03:00
Daniel Hilst bf032e1327 Merge pull request #101 from VersatusHPC/fix/dep-sles12-xnba-undi
fix(xcat-dep): the sles12 cell cannot install xnba-undi
2026-10-26 20:51:29 -03:00
Daniel Hilst b22720fb17 Merge pull request #99 from VersatusHPC/fix/dep-leap423-goconserver-pinned-go-v2
fix(xcat-dep): the sles12 cell cannot build goconserver
2026-10-26 20:51:09 -03:00
Daniel Hilst 966123c71c Merge pull request #98 from VersatusHPC/fix/genesis-oe-payload-no-strip
fix(genesis-openembedded): ppc64 Genesis packaging fails in rpm's strip pass
2026-10-26 20:50:51 -03:00
Daniel Hilst 5d343fa155 Merge pull request #97 from VersatusHPC/fix/dep-leap-chroot-builds
fix(xcat-dep): three packages cannot build in an openSUSE Leap chroot
2026-10-26 11:26:59 -03:00
Daniel Hilst 565c68364b test(xcat-dep): xnba_payload_compressor.t is never run
The workflow runs an explicit list of test files and never `prove -r t/`, so a test
that is not named in that list does not run. The file is now in the prove list and
the perlcritic list, beside t/goconserver_pinned_go.t.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-26 10:29:07 -03:00
Daniel Hilst 12f9a0710e fix(xcat-dep): the sles12 cell cannot install xnba-undi
zypper reaches package 120 of 138 on the sles12 management node and aborts:

  (120/138) Installing: xnba-undi-1.21.1-1.el10.noarch [...error]
  error: unpacking of archive failed: cpio: Bad magic

xnba-undi only repackages two pre-built iPXE binaries, so xnba/mockbuild.pl
runs rpmbuild on the build host rather than in the target chroot. The host is
EL10 and its rpm writes a zstd payload. The node is openSUSE 42.3 and its rpm
is 4.11, which predates zstd and reads the payload as a bad cpio archive.

A host-built package therefore has to choose a payload for the TARGET's rpm
rather than take the host default. host_build_payload_compressor() names it,
and xnba/mockbuild.pl passes it to rpmbuild. xz is readable by every rpm these
targets ship and is what the openSUSE core packages already use.

Measured: the rpm built for opensuse-leap-42.3-x86_64 now carries an xz
payload and rpm2cpio lists both files from it, where the published one carries
zstd; the rpm built for alma+epel-10-x86_64 still carries zstd, so EL is
unchanged.

t/xnba_payload_compressor.t fails on the commit before this one.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-26 10:28:22 -03:00
Daniel Hilst 1d821ac180 test(xcat-dep): the sles12 cell cannot install xnba-undi
zypper reaches package 120 of 138 on the sles12 management node and aborts:

  (120/138) Installing: xnba-undi-1.21.1-1.el10.noarch [...error]
  error: unpacking of archive failed: cpio: Bad magic
  error: xnba-undi-1.21.1-1.el10.noarch: install failed

xnba/mockbuild.pl runs rpmbuild on the build host rather than in the target
chroot, because the package only repackages two pre-built iPXE binaries. The
host is EL10, whose rpm writes a zstd payload. The node is openSUSE 42.3 and
its rpm is 4.11, which predates zstd and reads the payload as a bad cpio
archive.

In the published sles12 dep repository 13 of the 14 rpms are built by rpm
4.11.2 with an lzma payload, and xnba-undi alone by rpm 4.19.1.1 with zstd.

The test states which targets need a payload chosen for them. It fails because
nothing in MockBuildUtils answers that yet.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-26 10:28:22 -03:00
Daniel Hilst 0c00117052 fix(xcat-dep): a Genesis release cannot be published to a repository with three suites
sbuild-all.pl refuses --genesis-release unless --dists covers every codename
known_codenames() names:

  FATAL: --genesis-release updates the shared Genesis pool every suite indexes, so it must
         cover all of them; --dists omits: focal

The reason behind the guard is sound. A release lands once in
pool/main/xcat-genesis-openembedded and every suite's Packages indexes that one copy, so a
suite this run does not rebuild keeps indexing files the release retired.

But it compares against the wrong set. known_codenames() is the codenames this build system
can build -- focal, jammy, noble and resolute -- not the suites a given repository contains,
and those differ by design. An apt tree assembled from a manifest with no 20.04 cell carries
jammy, noble and resolute, and focal has no dists/focal at all. Demanding focal there
protects nothing, because a suite that does not exist cannot be left indexing anything, and
it refuses the publication outright: the Genesis payload could not be published to that tree
at any --dists. A CI dep build verified a release and then died on this, and a dead publish
stage blocks every test that installs from the repository.

BuildUtils::stranded_suites reads the suites from the tree's own dists/ and returns the ones
this run does not rebuild. The property the guard exists for is unchanged: a tree that
carries focal and omits it from --dists still refuses, and still names it.

Evidence, since this replaces a rule rather than adding one: restoring the comparison against
known_codenames() fails 5 of the 8 new assertions in t/sbuild-all.t, returning an empty list
fails 3, and counting a plain file under dists/ as a suite fails 1. The whole xcat-dep suite
passes: 32 files, 1431 tests.

t/genesis_openembedded_consumer.t gains the end-to-end pair: a tree carrying three of the four
known suites publishes the release for those three and creates no fourth suite, and the same
tree still refuses a release published for one suite, naming the two it would strand and not
naming the one it never carried.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-26 10:24:26 -03:00
Daniel Hilst 6b1392e349 test(xcat-dep): goconserver_pinned_go.t is never run
The workflow runs an explicit list of test files and never `prove -r t/`, so a test
that is not named in that list does not run at all. t/goconserver_pinned_go.t was
named in neither the prove list nor the perlcritic list, so the evidence this branch
claims could not be reproduced by a CI run.

The file is now in both lists, beside t/goconserver_cross_build.t.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-26 10:01:58 -03:00
Daniel Hilst bfaa4998f7 fix(xcat-dep): goconserver cannot fetch its modules in a Leap chroot
With the toolchain dependency resolved, the Leap 42.3 build reaches the Go
compile and every module fetch fails:

  x509: certificate signed by unknown authority

openSUSE splits its CA trust. 'ca-certificates' is the tooling and carries no
root certificate; the roots are in 'ca-certificates-mozilla'. The pinned-Go
path asks for the tooling alone, which is worse than asking for nothing:
installing it hands the trust store to a package that does not fill it.

Measured in a Leap 42.3 chroot, Go's system pool holds 146 roots before
'ca-certificates' is installed, 0 after it, and 201 once
'ca-certificates-mozilla' is added. The middle reading is the build failure.
EL and openEuler keep their roots in 'ca-certificates' itself, which is why
only openSUSE needs a second package.

goconserver_pinned_go_buildrequires() now names what a pinned-Go chroot needs,
and adds the roots package on openSUSE.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-24 10:20:02 -03:00
Daniel Hilst 3cb2939747 fix(xcat-dep): the sles12 cell cannot build goconserver
xcat-dep-build-opensuse12-x86_64 fails after seven minutes:

  No matching package to install: 'golang'
  Error: Some packages could not be found.

goconserver/mockbuild.pl writes "BuildRequires: golang" for every target that
is not openEuler. Leap 42.3, which builds the sles12 cell, has no package of
that name and nothing that provides one. Renaming the dependency does not help
either: Leap 42.3 calls the compiler 'go' and its newest is go1.11, while
goconserver's go.mod asks for 1.25 and GOTOOLCHAIN=local never steps above the
Go the chroot has. Leap 15.6 resolves 'golang' to go1.25 and is unaffected,
which is why only the sles12 cell fails.

openEuler is already in this position and already has the answer: fetch the
pinned, checksum-verified Go toolchain archive and build with that. This moves
the decision out of the script into MockBuildUtils as
goconserver_needs_pinned_go(), which now names Leap 42.3 alongside openEuler,
and has mockbuild.pl take the toolchain path from it.

The openEuler changelog entry stays keyed on the openEuler repository subdir,
so the openEuler package is unchanged.

t/goconserver_pinned_go.t states where each target gets its Go. It fails on the
commit before this one.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-24 10:01:08 -03:00
Daniel Hilst b78e3e99ac test(xcat-dep): the sles12 cell cannot build goconserver
xcat-dep-build-opensuse12-x86_64 fails after seven minutes:

  No matching package to install: 'golang'
  Error: Some packages could not be found.

goconserver/mockbuild.pl writes "BuildRequires: golang" for every target that
is not openEuler. Leap 42.3, which builds the sles12 cell, has no package of
that name and nothing that provides one.

The test names, per target, where goconserver gets its Go, and asserts that
Leap 42.3 is in the same position as openEuler. It fails because nothing in
MockBuildUtils answers the question yet.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-24 10:00:56 -03:00
Daniel Hilst 91ce842dc3 fix(genesis-openembedded): ppc64 Genesis packaging fails in rpm's strip pass
xcat-genesis-oe-build-ubuntu-amd64 #78 finished the eight-architecture
OpenEmbedded build, packaged x86 and x86_64, then stopped on ppc64 with
"strip: Unable to recognise the format of the input file .../ppc64/kernel"
and "Bad exit status from /var/tmp/rpm-tmp.a79IE5 (%install)".

xCAT-genesis-openembedded.spec is noarch with AutoReqProv off, but it leaves
__os_install_post at rpm's default, so rpm runs brp-strip over the payload it
is about to package. The ppc64 and ppc64le kernels are ELF vmlinux images and
the riscv64 firmware is an ELF, and the build host's strip reads only x86_64.
Where strip does succeed it changes bytes that the shipped SHA256SUMS no
longer describes.

Set __os_install_post and debug_package to nil, so rpm packages the payload
unchanged. t/genesis_oe_payload_verbatim.t passes with this change and fails
without it. The x86_64 package is unaffected: built from the same export
before and after, it carries the same paths and the same file digests.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-24 04:49:07 -03:00
Daniel Hilst 5c4e870b50 test(genesis-openembedded): rpm rewrites the shipped Genesis payload
The Genesis OpenEmbedded package ships a pre-built netboot payload verbatim,
beside the SHA256SUMS the export carries. The spec leaves __os_install_post at
rpm's default, so rpm runs brp-strip over the buildroot. The ppc64 and ppc64le
kernels and the riscv64 firmware are ELF, and an x86_64 build host cannot strip
them, so the pass fails and takes %install with it.

t/genesis_oe_payload_verbatim.t drives the packager over a ppc64 export and
asserts three things: the build completes, rpm runs no install-post pass, and
every payload file reaches the package with the export bytes. On this tree it
fails on the first two under Ubuntu 24.04, which is where the CI runs it, and
on the install-post assertion alone under EL 10, where brp-strip swallows the
strip failure.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-24 04:48:59 -03:00
Daniel Hilst 3989c785e9 Merge pull request #93 from VersatusHPC/fix/nfslock-borrow-recovery-rebased
fix(nfslock): a taker that dies holding lock.borrow blocks the lock for ever
2026-10-23 15:04:40 -03:00
Daniel Hilst 56f8402503 Merge upstream/master into fix/dep-leap-chroot-builds
One conflict in MockBuildUtils.pm, and both sides end INSIDE a sub and share the
single closing brace that follows: this branch adds the perl BuildRequires
compat helpers, ending in perl_mock_cfg_text, and master added the forcearch
target table, target_profile and dep_repo_label from xcat-dep/#95. Resolved as
the union with master's block first and its own closing brace, so the shared
brace closes perl_mock_cfg_text. Every sub is defined exactly once.

prove -j4 t/ passes 33 files and 1341 tests.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-23 14:35:33 -03:00
Daniel Hilst 084bee313d Merge pull request #95 from VersatusHPC/feat/dep-opensuse-targets
fix(xcat-dep): no openSUSE dep target can be built
2026-10-23 10:15:33 -03:00
Daniel Hilst f8c62486da Merge pull request #94 from VersatusHPC/fix/ipxe-xcat-opensuse-doc-path
fix(xcat-dep): ipxe-xcat cannot build in an openSUSE chroot
2026-10-23 10:14:31 -03:00
Vinícius Ferrão 5082089b73 test(grub2-xcat): the openSUSE package is built without the aarch64 image
(cherry picked from commit 61efa3b5e3e111ec32cb852438e548acca7c03fd)
2026-10-23 01:24:10 -03:00
Vinícius Ferrão 88bb19d751 fix(grub2-xcat): build the openSUSE package without the aarch64 image
The merge of master brought the aarch64 grub2 image, which grub2-xcat
builds with the EL packages grub2-tools and grub2-efi-aa64-modules.
openSUSE packages grub2 under other names, so the Leap build of
grub2-xcat stopped at its build dependencies. Build the openSUSE package
without the image, as openEuler does and as this branch did before the
merge.

(cherry picked from commit 3f7213e2ef67794e702654275da0839d67f79638)
2026-10-23 01:24:10 -03:00
Daniel Hilst baf4226096 fix(xcat-dep): the perl packages cannot resolve their BuildRequires on Leap
The four perl packages are rebuilt from Fedora source rpms, which BuildRequire
perl-generators and perl-interpreter. openSUSE has neither: there perl provides
the interpreter and rpm generates the perl dependencies itself. dnf builddep
stops before the build, so every one of them fails in a Leap chroot and the
repository ships without perl-IO-Stty, perl-HTTP-Async, perl-Net-HTTPS-NB and
perl-Net-Telnet, all of which xCAT requires.

A build-only rpm provides those three names and pulls the real perl, in a local
repository the mock configuration of a SUSE target reads. It is never shipped.
The decision, the spec and the configuration text move into MockBuildUtils so a
test can exercise them in process; mockbuild-perl-packages.pl keeps the rpmbuild
and createrepo_c calls and builds the repository under the caller's own
per-package directory, so parallel perl builds cannot race on it.

perl_mock_cfg_text refuses a SUSE target with no compat repository rather than
writing a configuration without it, because building without the compat is the
failure this prevents.

The fix existed on the uftp-suse lineage and was never proposed here.

t/perl_buildreq_compat.t fails 3 of 6 on the parent commit.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-23 01:20:26 -03:00
Daniel Hilst 1e711055ca test(xcat-dep): the perl packages cannot resolve their BuildRequires on Leap
The Fedora perl source rpms BuildRequire perl-generators and perl-interpreter.
openSUSE has neither: there perl provides the interpreter and rpm generates the
perl dependencies itself. dnf builddep stops before the build, and all four perl
packages fail that way in a Leap chroot.

The test asks MockBuildUtils for the decision, the compat spec and the mock
configuration text, and asserts that a SUSE target gets the compat repository,
an EL target does not, and a SUSE target given no repository is refused rather
than built without it.

It fails 3 of 6 on this commit: MockBuildUtils has none of the three.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-23 01:19:56 -03:00
Daniel Hilst 0cbf0e0d64 fix(xcat-dep): goconserver cannot build in a Leap chroot
goconserver/gomod/go.mod declared go 1.25.12 while Leap 15.6 resolves
BuildRequires: golang to 1.25.8, and the build runs GOTOOLCHAIN=local, so Go
refuses rather than fetching a toolchain:

  go: go.mod requires go >= 1.25.12 (running go 1.25.8; GOTOOLCHAIN=local)

1.25.12 was the patch level of the toolchain that regenerated the file, not a
requirement of the code. The highest directive in the pinned graph is 1.25.0,
which every target meets, so the directive is lowered to that.

The fix existed on the uftp-suse lineage and was never proposed here.

t/goconserver_gomod_floor.t fails on the parent commit.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-23 01:18:53 -03:00
Daniel Hilst 9a95f795c6 test(xcat-dep): the goconserver go directive is above the oldest target Go
goconserver/gomod/go.mod declares go 1.25.12, and goconserver/mockbuild.pl
compiles in the chroot with BuildRequires: golang and GOTOOLCHAIN=local, so Go
never fetches a newer toolchain. A Leap 15.6 chroot reports:

  go: go.mod requires go >= 1.25.12 (running go 1.25.8; GOTOOLCHAIN=local)

The test reads the directive and compares it with the oldest Go any target
provides, and asserts the two conditions that make the directive binding:
GOTOOLCHAIN=local, and golang taken from the target repositories. It also
checks its own comparator against three known pairs, so a passing result cannot
come from a comparison that answers the same way every time.

It fails one of eight on this commit.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-23 01:18:47 -03:00
Daniel Hilst dd233b3331 fix(nfslock): a cleanup that cannot finish destroys the lock it was freeing
release deleted the owner metadata and marked the guard released before it
knew the removal could finish. With a live attached worker the rmdir failed
on the non-empty directory, and the lock was left holding workers and no
owner. acquire refuses that for ever, correctly, because there is nothing
to validate, and the guard was already marked released, so nothing retried.
A lock still HELD is better: it is refused with a reason, and it recovers
when its owner dies.

_remove had the same ordering. It deleted the metadata, then failed on the
workers directory, reported "kept", and left the same wreck. A take-over
recovers a dead owner's lock with completed worker records by itself, so
the sweep was leaving that lock in a worse state than doing nothing.

Both now clear the records of completed workers first, then ask whether the
directory holds anything besides its metadata, and delete the metadata only
when it does not. _only_metadata asks that question, because the unlink
cannot be undone.

release retries while something still blocks the removal, and marks the
guard released only when nothing is left on disk. DESTROY and the signal
handler that calls release_build_locks can therefore finish the job once
the workers are gone.

sweep_stranded's signature and its report fields are unchanged.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-23 01:00:41 -03:00
Daniel Hilst 9f406f6e86 test(xcat-dep): nothing shows that a blocked cleanup leaves the lock whole
release deletes the owner metadata and marks the guard released before it
knows the removal can finish. With a live attached worker the rmdir fails,
and the lock is left holding workers and no owner. acquire then refuses it
for ever, correctly, because there is nothing there to validate. The sweep
has the same ordering: _remove deletes the metadata and then fails on the
workers directory, reports "kept", and leaves the same wreck. A take-over
recovers that very lock by itself, so the sweep was leaving it worse than
doing nothing.

A held lock is better than a half-released one. It is refused with a reason
and it recovers when its owner dies; the half-released one is permanent.

Four checks cover it, and each pair carries the half that keeps it honest.
release with a live worker: the lock and its metadata survive, and once the
worker exits the SAME guard finishes the release and a later acquire
succeeds. An owner that exits without releasing: the metadata it left is
intact, a later acquire is refused while the worker group exists and names
that group, and once both are gone the lock is recovered. The sweep with
completed worker records: the lock is removed, and a later acquire
succeeds. And a lock the sweep keeps must still carry its metadata, or
refusing to remove it is the same damage by another route.

Without the second assertion in each pair, a release that frees nothing and
a sweep that removes nothing would both pass.

Against 2fa0e8b1c, the revision this was reviewed at, 11 of the 98 checks
fail.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-23 01:00:26 -03:00
Daniel Hilst aaa4003157 fix(xcat-dep): finalize refuses two valid SUSE repository layouts
The cross-arch Genesis finalize collected every OS directory except openEuler,
then demanded that each one carry both architectures and that each architecture
hold its own xCAT-genesis-base rpm. A SUSE cell satisfies neither: cells.tsv
gives the sles12 cell x86_64 alone, so its ppc64le peer will never exist, and
openSUSE ships no legacy Genesis, so no openSUSE target builds a payload. So
sles12/x86_64 failed for a missing peer and a two-arch sles15 failed for an
absent payload, and a SUSE cell beside a valid EL pair stopped the whole
finalize.

A sles* directory is now collected like an openeuler* one: outside the cross-arch
copy and outside the peer and payload requirements. The skip line names the
directories it passed over, so a cell left out is visible rather than implied.

What still runs for a SUSE cell: the repository cell lock, and the manifest
completeness and repomd signature gate, which mockbuild-all.pl applies to every
finalized cell and already globs sles* beside rh*. What no longer runs: the
foreign-architecture Genesis copy, the peer requirement and the payload
requirement, none of which a family without a legacy payload can satisfy.

The EL cases keep dying for both reasons, which the cases beside the new ones
assert. native/openeuler-srpm.t asserted the old skip message; it now asserts
that the message names the skipped directory and the skip, which is the stronger
claim.

t/mockbuild-all.t fails 3 of 235 on the parent commit. prove -j4 t/ and
prove -j4 native/ pass: 29 and 9 files, 1308 and 874 tests.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-23 00:55:04 -03:00
Daniel Hilst 9e0a15e926 test(xcat-dep): finalize refuses two valid SUSE repository layouts
The cross-arch Genesis finalize requires every OS directory to carry both
architectures and each one to hold its own xCAT-genesis-base rpm, before it
reaches the SUSE verification loop. Both demands are wrong for a SUSE cell:
cells.tsv gives the sles12 cell x86_64 alone, so its ppc64le peer will never
exist, and openSUSE ships no legacy Genesis, so no openSUSE target builds a
payload.

The test adds a one-arch SUSE cell with no peer and a two-arch SUSE cell with no
Genesis, beside the EL cases that must keep dying for both reasons, and puts a
SUSE cell into the mixed-roots tree so a valid EL finalize is not stopped by one.

It fails 3 of 235 on this commit: the two new cases die on the peer and the
Genesis requirement, and the mixed-roots finalize dies on the SUSE cell.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-23 00:51:25 -03:00
Daniel Hilst 84c844bebd fix(xcat-dep): openEuler builds no uftp and then fails its own gate
Moving target_profile into MockBuildUtils took the lists from a branch that
predates the openEuler UFTP work, so the openEuler build plan lost uftp while
every openEuler manifest section still pins uftp=5.0.4. A clean openEuler build
skips the package, and the completeness gate then stops the deploy naming the
manifest. native/uftp-openeuler.t fails 2 of 15 on the parent commit.

uftp is restored to the openEuler dep_builders. The exclusion stays where it
was meant to be: openSUSE, whose uftp.spec change is not in this tree.

t/target_build_plan.t fails on the parent commit for both openEuler targets and
passes for EL, the forcearch target and both openSUSE releases, so uftp was the
only entry the move lost. prove -j4 t/ and prove -j4 native/ both pass: 29 and
9 files, 1304 and 873 tests.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-23 00:50:34 -03:00
Daniel Hilst 9441e243a9 test(xcat-dep): the openEuler build plan lost uftp in the refactor
Moving target_profile into MockBuildUtils carried the dep_builders lists with
it, and openEuler came away without uftp while every openEuler manifest section
still pins uftp=5.0.4. A build then skips the package and the completeness gate
fails afterwards, naming the manifest rather than the plan.

The test holds every target's dep_builders and required sets down package by
package, at the values mockbuild-all.pl carried before the move, and asserts
that a target pins uftp exactly when it builds it. It covers EL native and
cross-built, openEuler x86_64 and ppc64le, and both openSUSE releases, because
one list moved and any entry could have been lost.

It fails on this commit for the two openEuler targets.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-23 00:49:27 -03:00
Daniel Hilst b614a59cd2 feat(xcat-dep): build the sles12 cell in a Leap 42.3 chroot
cells.tsv gives the opensuse12 cell the subpath sles12/x86_64 and nothing builds
it, so xcat-dep-build-opensuse12-x86_64 has never produced a package. The
openSUSE arm derived the cell from the Leap major, which is correct for 15.x by
coincidence, so Leap 42.3 resolved to sles42 and the completeness gate then
stopped on a missing manifest section.

%LEAP_SLE_MAJOR maps a Leap release to the SLE family its packages serve: 42.3
to 12, 15.6 to 15, 16.0 to 16. Leap 42.3 carries SLE 12 SP3's base -- rpm
4.11.2, perl 5.18.2, glibc 2.22. %SUSE_BUILD_TARGET is derived from that one
table, so the forward and reverse answers cannot disagree. A Leap release the
table does not name now dies instead of publishing into sles<leap major>.

mock-configs/opensuse-leap-42.3-x86_64.cfg is the chroot. Leap 42.3 is end of
life, so mock ships no configuration for it and the openSUSE discontinued
archive serves the tree, with the rpm-md metadata under repo/oss/suse/ rather
than repo/oss/ -- the live mirror answers 404 for 42.3. 42.3 packages no
python3-dnf, so mock cannot build a bootstrap chroot and the config installs
straight into the chroot. install_mock_cfg needs no change: it already copies
mock-configs/<target>.cfg and refuses a host copy that differs.

The manifest section omits xCAT-genesis-base, because openSUSE ships no legacy
Genesis, and omits uftp, because UFTP 5 for Leap needs its own spec change.

t/opensuse_dep_target.t and t/mockbuild-all.t fail on the parent commit.
prove -j4 t/ passes: 28 files, 1301 tests.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-22 23:28:52 -03:00
Daniel Hilst d1af41e1a0 test(xcat-dep): the sles12 cell has no chroot and no manifest section
cells.tsv gives the opensuse12 cell the subpath sles12/x86_64, and nothing
builds it. The openSUSE arm derives the cell from the Leap major, which is
right for 15.x by coincidence, so Leap 42.3 resolves to sles42.

The test names the Leap 42.3 target, the sles12 directory the gates must map
back to it, the manifest section the completeness gate reads, and the mock
configuration install_mock_cfg copies. It also asserts that no openSUSE section
pins xCAT-genesis-base, with an EL section as the control.

It fails on this commit: 42.3 yields sles42, /repo/sles12/x86_64 derives
nothing, and neither the manifest section nor the chroot exists.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-22 23:27:00 -03:00
Daniel Hilst fed89a1f04 fix(xcat-dep): no openSUSE dep target can be built
target_profile resolved a target through openEuler, the forcearch table, then
/epel-(\d+)-/, and died on anything else. The pipeline has run
mockbuild-all.pl --target opensuse-leap-15.6-x86_64 since the SUSE cells were
added, so both openSUSE dep cells stop before the first build step.

The capability is not new. It was written on feature/uftp-suse, where
xcat-dep-build-opensuse15-x86_64 build 42 ran it and built seven packages, and
it was never proposed upstream. This carries over only the part that drives a
target: target_profile and the forcearch table move into MockBuildUtils and
gain a cell key, an openSUSE arm maps opensuse-leap-<major>.<minor> to
sles<major>/<arch>, and dep_repo_baseurl and dep_repo_label pick the channel a
cell advertises, because xcat.org serves Leap from sles and everything else
from yum. target_cell and write_dep_repo_metadata read the cell instead of
composing rh<rel> themselves.

derive_target_from_repo_path maps a sles<N> directory back to its chroot through
%SUSE_BUILD_TARGET, and the cross-arch finalize globs sles* beside rh*. Without
both, the completeness and signature gates are handed a SUSE cell, derive
nothing, and the cell publishes a missing or unsigned package in silence.

packages-manifest.conf gains the two Leap 15.6 sections. Neither pins
xCAT-genesis-base: openSUSE ships no legacy Genesis, so no openSUSE target
builds the payload, and the gate is zero tolerance. Neither pins uftp either,
because UFTP 5 for Leap needs its own spec change that this branch does not
carry; t/mockbuild-all.t excludes the Leap sections from that assertion and says
why.

t/opensuse_dep_target.t fails 4 of 8 on the parent commit. prove -j4 t/ passes:
28 files, 1299 tests.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-22 23:25:28 -03:00
Daniel Hilst 9411c03b54 test(xcat-dep): mockbuild-all cannot build an openSUSE target
The pipeline runs mockbuild-all.pl --target opensuse-leap-15.6-x86_64, and
target_profile falls through to /epel-(\d+)-/ and dies with "Could not parse EL
release". No openSUSE dep cell on this lineage has ever completed a real build.

The test asks MockBuildUtils for the build plan of each openSUSE target, for the
channel a cell advertises, and for the manifest section the completeness gate
reads. It fails 4 of 8 on this commit: MockBuildUtils has no target_profile, no
dep_repo_baseurl and no dep_repo_label, and packages-manifest.conf has no
openSUSE section.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-22 23:23:55 -03:00
Daniel Hilst 2fa0e8b1c8 fix(nfslock): a dead owner does not mean the work it started has stopped
The ownership identity is one process, and what a lock protects outlives
it. A build wrapper starts each command in its own process group, so
SIGKILL on the wrapper leaves that group running. acquire proved the owner
dead and took the lock, and two builds then wrote one checkout. The build
wrapper's own cancellation path keeps the lock when a group survives
cleanup, and this recovery undid that retention: it read a dead owner and
took the lock the retention had kept.

A holder now ATTACHES each process group it starts and DETACHES it once
the group is gone. attach records lock.d/workers/<pgid>.<leader pstart>.
An owner is recoverable only when it is provably dead AND every attached
group is gone, so the retention is a fact recovery reads rather than a
directory it has to guess about.

A group is gone only when kill(0, -pgid) answers ESRCH, which is the test
the cancellation path already uses before it releases. The two now agree.
Reaping the LEADER is not enough, because its children inherit the group,
so the test is on the group and not on the leader's pid. detach applies the
same test and refuses while any process is in the group.

Reuse windows. The entry name carries the leader's start time, so removing
a record by name cannot remove that of a later group which reused the pgid.
The group test itself cannot tell a recycled pgid from the original group
and reads live for both, which costs a wait rather than admitting a second
writer. Neither can tell a worker that left its group by calling setpgid
itself; the cancellation path has the same limit, and the two agree.

An exclusive claim on the root does not override a live group. The claim
asserts no build is running, and a live group is evidence that one is.

release drops the records of groups that are gone and keeps the rest, so a
worker killed before its reap cannot make a lock unreleasable, and a live
one stops the release because rmdir refuses a non-empty directory.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-22 14:43:01 -03:00
Daniel Hilst 429d993d54 test(xcat-dep): nothing shows that a dead owner's workers still hold the lock
The ownership identity is one process. What a lock protects outlives it: a
build wrapper starts each command in its OWN process group, so SIGKILL on
the wrapper leaves that group running. An owner proven dead therefore says
nothing about the work it started, and recovery admits a second writer. No
check covered it, because every holder the existing checks kill has no
worker under it.

attach, detach and live_workers arrive here with the checks that drive
them. A caller records each process group it starts, and a group is gone
only when kill(0, -pgid) answers ESRCH, which is the test the build
wrapper's own cancellation path already uses before it releases.

BOTH halves are asserted, and the second is the one that keeps the first
honest: a lock that recovers nothing at all satisfies "the second build
stays blocked" perfectly. So the worker exits and the same lock must then
be recovered.

Three more checks pin what "the group" means. A group outlives its leader,
because children inherit it, so a check reaps the leader and asserts the
group still counts as live. detach must refuse while any process is in the
group, which makes the retention a property of what is on disk rather than
of which call site remembered to run. And an exclusive claim on the root
does not override a live group: the claim asserts no build is running, and
a live group is evidence one is.

Against the unfixed predicate 8 of the 75 checks fail.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-22 14:42:17 -03:00
Daniel Hilst af2a271fdd fix(nfslock): reclaiming a borrow by path can put two processes in one lock
_reap_borrow validated a borrow's metadata and then removed the borrow by
path. rmdir names a path and not the inode that was validated, so a
contender stopped between the two steps removes whatever is at the path
when it resumes. Measured: it validated inode 157 and removed inode
33554970, a borrow a live taker held. Both contenders then took the lock,
and the ordered pair of children in the test reports 11 where it must
report 01.

The borrow is now numbered. lock.borrow is generation 0 and lock.borrow.N
is generation N, the taker is whoever holds the highest generation, and a
transition whose taker is provably dead is ended by creating the NEXT
generation rather than by removing the one that was validated. mkdir is
exclusive, so one contender wins a generation, and a process removes only
a generation it created and still holds. No process can delete another
process's claim, which is the property the old shape could not have.

The rule that reclaimed a borrow with no metadata, when two attempts found
it unchanged, is withdrawn. Its argument covered a healthy participant, not
one that pauses: a live taker can wait any length of time between its mkdir
and its first write, and superseding it puts two processes in the
transition. A generation with no valid metadata now blocks, and
sweep_stranded removes it under an exclusive claim on the root, which is
the disposition a lock.d with no metadata already has.

acquire set identity before writing the replacement lock metadata. A write
that left partial metadata and threw therefore gave DESTROY a lock to
release, and release retried for ever because lock.d existed and its
metadata could not be validated. identity is now set only after that write
succeeds, so a failed acquire leaves the destructor nothing to act on, and
release stops after R retries.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-22 13:35:38 -03:00
Daniel Hilst 5018b90829 test(xcat-dep): nothing shows that reclaiming a borrow keeps one taker
_reap_borrow validates a borrow and then removes it by path. rmdir names a
path, not the inode that was validated, so a contender stopped between
those two steps removes whatever is at the path when it resumes. That can
be a live taker's borrow, and two processes then take over one lock. No
check covered it, because the existing ones drive one process at a time.

The new checks fork Perl children and stop them at named points in the
protocol, through an _at hook this commit adds to the module. The
interleaving is a pipe barrier and not a delay, so a fast machine cannot
hide the defect, and every child is reaped with its stdio detached. A
contender that validated the borrow is released only after another one
holds it, which is the order that reaches the defect: released together,
the two race one mkdir, which is exclusive either way.

A second check covers a live taker that has not written its metadata yet.
An earlier revision reclaimed a borrow that two attempts found unchanged,
and that rule cannot cover this case, because a live participant can pause
for any length of time between two writes.

Two more cover the destructor. An acquire whose commit write fails must
return that write error and leave nothing for DESTROY to clean up, and
release must stop after R retries rather than wait for metadata that
cannot be validated. The sleep stub is capped, so a retry loop that lost
its bound fails a named check instead of hanging the suite.

Against the unfixed protocol 17 of the 56 checks fail, the ordered pair
reporting that both contenders took the lock.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-22 13:35:25 -03:00