2
0
mirror of https://github.com/xcat2/xcat-dep.git synced 2026-09-12 12:36:23 +00:00
Commit Graph

1055 Commits

Author SHA1 Message Date
Daniel Hilst 201a6b1a6d Merge pull request #70 from VersatusHPC/fix/riscv64-deb-loaders
fix(xcat-dep): carry the x86 boot loaders in the riscv64 repositories
2026-09-11 18:57:58 -03:00
Daniel Hilst acb7311d0b Merge pull request #68 from VersatusHPC/feat/genesis-s390x
feat(genesis): package s390x images
2026-09-11 18:52:19 -03:00
Vinícius Ferrão fbf7a5be2a docs(BUILD): riscv64 repositories carry the x86 boot loaders 2026-09-08 17:19:41 -03:00
Vinícius Ferrão a7c122b113 fix(mockbuild-all): scrub the chroot a noarch step built in
A noarch builder of a forcearch target runs in the native chroot of the
release, but its cleanup step was registered against the target
configuration. The step scrubbed a chroot that did not exist and left the
native bootstrap behind on every run, one per noarch step.

Compute the configuration once per step and scrub the same one it built in.
2026-09-08 17:19:40 -03:00
Vinícius Ferrão a17df594c9 test(mockbuild-all): cover the per-cell rpm architecture rule 2026-09-08 17:19:40 -03:00
Vinícius Ferrão 030259d7f6 fix(mockbuild-all): keep rpms of another architecture out of a target's cell
collect_rpms copied every binary rpm a builder produced. The syslinux builder
also produces syslinux, syslinux-extlinux and their debug rpms for the chroot
it runs in, so a forcearch target that builds the noarch boot loaders in the
native x86_64 chroot would have published x86_64 rpms in the riscv64 cell.
The completeness gate checks names and pins only, so it would have passed.

Keep an rpm only when it is noarch or carries the cell's architecture, read
from the rpm header. The rule lives in MockBuildUtils as rpm_in_cell.
2026-09-08 17:19:40 -03:00
Vinícius Ferrão 76ec6e081a test(mockbuild-all): pin the riscv64 boot loaders to the ppc64le pins
The riscv64 cell must carry elilo-xcat, grub2-xcat, syslinux-xcat and
xnba-undi at the pins of the EL10 ppc64le cell. 3 assertions fail against
the previous manifest.
2026-09-08 17:19:40 -03:00
Vinícius Ferrão 2b49e07c28 fix(mockbuild-all): build the x86 boot loaders for the riscv64 target
The forcearch riscv64 profile built grub2-xcat but not elilo-xcat,
syslinux-xcat or xnba-undi, and the rocky-10-riscv64-xcat cell did not list
them, so a riscv64 management node could not serve the x86 nodes of a mixed
cluster, unlike a ppc64le one.

Add the three to the profile and the cell, at the pins the EL10 ppc64le cell
uses. They are noarch and are built in the native x86_64 chroot, like
grub2-xcat. syslinux-xcat is marked noarch in the builder table, as its spec
declares, so the forcearch target does not try it in the emulated chroot,
where its ExclusiveArch excludes it. The target is now cross-built on x86_64
only, which the mock config states: a native riscv64 host could not build
syslinux-xcat either.
2026-09-08 17:19:40 -03:00
Vinícius Ferrão aef1d117d5 test(xcat-dep): require the boot loaders on the riscv64 deb sections
The manifest consistency check covered the amd64 and ppc64el sections. It
now covers the riscv64 sections too, so the 4 boot components must be listed
there. 12 assertions fail against the previous manifest.
2026-09-08 16:39:20 -03:00
Vinícius Ferrão 8b98ae9539 fix(xcat-dep): carry the x86 boot loaders in the riscv64 deb sections
The riscv64 sections of debs-manifest.conf listed grub2-xcat only. A riscv64
management node serves the x86 nodes of a mixed cluster, so its repository
must carry syslinux-xcat, elilo-xcat and xnba-undi, as the ppc64el sections
already require.

List the three in every riscv64 section. They are Architecture: all, built
once on amd64 and assembled into every index, so the build phase is
unchanged and the publish gate now verifies the riscv64 index carries them.
2026-09-08 16:39:20 -03:00
Daniel Hilst 35132a0c7d Merge pull request #67 from VersatusHPC/feat/ubuntu-riscv64-deps-v2
Build the Ubuntu dependency packages for riscv64
2026-09-08 12:08:28 -03:00
Vinícius Ferrão 5ed8fd5799 test(xcat-dep): capture a descendant outliving its killed leader
The probe starts a descendant, kills the leader with SIGKILL, and asserts the
descendant is gone when the call returns. It fails against the previous
run_bounded, where the descendant survived.
2026-09-06 15:55:23 -03:00
Vinícius Ferrão 754567ec6c fix(xcat-dep): clear the build process group when its leader dies
run_bounded signalled the process group on a timeout and on a cancellation, but
not when the leader itself died. A SIGKILL, or the OOM killer, takes the shell
and leaves schroot and qemu in the group, holding the chroot and writing into
staging after the call reports the build finished.

Those processes are not children of this one, so there is nothing to wait for.
Signal the group on the way out.
2026-09-06 15:55:23 -03:00
Vinícius Ferrão afffcf39c9 test(xcat-dep): pin the exit status of a signalled child
The assertions cover a normal exit, the highest exit code, and death by TERM,
KILL and a core-dumping signal. run_bounded is driven through the same helper,
so the decoding and its caller cannot disagree.
2026-09-06 15:39:04 -03:00
Vinícius Ferrão ccbf05e758 fix(xcat-dep): record a worker the kernel killed as failed
A child killed by a signal leaves 0 in the high byte of its wait status. The
per-codename worker loop read only that byte, so a cancelled or OOM-killed
codename was counted as built, and the run could reach validation with the
staging tree that worker never finished.

One helper decodes a wait status for both the worker loop and run_bounded, and
reports 128 plus the signal for a child the kernel killed.
2026-09-06 15:39:03 -03:00
Vinícius Ferrão 043a7f6039 test(genesis): correct packager skip counts 2026-09-06 11:43:10 -03:00
Vinícius Ferrão 0e3e2461c3 fix(genesis): centralize package name prefixes 2026-09-06 11:43:10 -03:00
Vinícius Ferrão 55a9a6968e test(genesis): cover early manifest rejection 2026-09-06 11:30:42 -03:00
Vinícius Ferrão d063e86860 fix(genesis): validate repository manifests early 2026-09-06 11:30:42 -03:00
Vinícius Ferrão 09e068419b test(genesis): cover release capability ordering 2026-09-06 11:15:33 -03:00
Vinícius Ferrão 6828df8d67 fix(genesis): order release capability checks 2026-09-06 11:15:33 -03:00
Vinícius Ferrão 99d60459e7 docs(genesis): explain release formats 2026-09-06 10:54:29 -03:00
Vinícius Ferrão c8def3dc02 test(genesis): cover release compatibility 2026-09-06 10:54:29 -03:00
Vinícius Ferrão bea6826ac5 fix(genesis): preserve release compatibility 2026-09-06 10:54:28 -03:00
Vinícius Ferrão 22c26a5d57 fix(xcat-dep): block cancellation across ForkManager worker registration
ForkManager records a worker in run_on_start, which runs after the fork, so a
signal arriving in between reached a handler that did not know the worker. Both
worker pools now hold INT, TERM and HUP across start() and release them once the
parent has the pid.

The wait for a free slot happens before the mask is taken, or a cancellation
would stay pending for as long as the pool is full. With a single worker
ForkManager does not fork at all, so only a real child drops the inherited
forwarder, whose copy names siblings the parent already signals.
2026-09-06 04:56:53 -03:00
Vinícius Ferrão 412b556449 test(xcat-dep): capture a signal delivered inside the critical section
The probe sends itself a signal while the mask is held and asserts it arrives
only once the mask is restored, which is what makes the fork and the pid
registration a single uninterruptible step.
2026-09-06 03:21:53 -03:00
Vinícius Ferrão 476024485c fix(xcat-dep): block cancellation across worker registration
The forwarding handler was in place before the fork, but the parent recorded the
worker pid after it. A signal in between reached a handler that did not know the
worker, so the orchestrator died while the worker kept building for hours and
held the per-architecture lock.

The mask discipline run_bounded already used is now a pair of helpers, and the
worker loop blocks the handled signals across both the fork and the
registration. The worker resets the inherited handlers before restoring the mask.
2026-09-06 03:21:53 -03:00
Vinícius Ferrão 04a2b677cb test(xcat-dep): follow the debs through the private build directory
The stub session now leaves its deb where a real one would, so the assertions
read what reaches the result directory: nothing until the smoke passes.
2026-09-06 03:21:53 -03:00
Vinícius Ferrão 44073ecf35 fix(xcat-dep): publish a deb only after it passes its smoke
The build wrote its debs straight into the directory a publish assembles from,
and the smoke ran afterwards. A cancellation during the smoke, which reaches the
builder as a signal, left an unverified deb there with no cleanup, and the
publish gate gets no further than names and versions.

Each package now builds into a private directory under the result directory and
its debs are moved out only after every check passes. A leftover directory from
an interrupted run is removed before the next build of that package.
2026-09-06 03:21:52 -03:00
Vinícius Ferrão 0c99bc8e51 test(xcat-dep): pin the signal mask around a bounded build
The race itself is not reproducible without a hook in the production path, so
the assertions pin the invariants the fix establishes: the build starts with the
handled signals unblocked, and the caller keeps them unblocked afterwards.
2026-09-06 02:44:58 -03:00
Vinícius Ferrão 88412a8a83 fix(xcat-dep): block cancellation across the fork
The handlers were installed after fork(), so a signal arriving in between killed
the wrapper under its inherited handler and left the new process group running.
INT, TERM and HUP are now blocked around the fork and delivered once the handler
is in place. The child restores the mask before exec, or the build would inherit
a blocked TERM and ignore the signal the forwarding depends on.
2026-09-06 02:44:58 -03:00
Vinícius Ferrão 796f7c174b test(xcat-dep): capture a rejected deb left in staging
Both assertions fail against the previous build_deb_in_chroot, which left the
deb in the result directory after the smoke rejected it.
2026-09-06 02:44:58 -03:00
Vinícius Ferrão 651243fbf3 fix(xcat-dep): drop a deb that fails its smoke
The debs land in staging before the smoke runs, and the publish gate checks
names and versions only. A deb whose binary could not run therefore stayed in
staging and was eligible for publication, which is the case the smoke exists to
catch. The failure now removes the debs it rejected and says so.
2026-09-06 02:44:58 -03:00
Vinícius Ferrão 4395cb9536 fix(xcat-dep): reach the per-package builder when a build is cancelled
The worker spawned the builder with system(), so the builder, its schroot
session and qemu were in the worker's process group but owned by nobody: a
cancelled worker died and left them running, holding the chroot and writing
into staging. Only the build inside the builder was protected, and nothing
signalled the builder.

The builder now runs through run_bounded, which gives it its own process group
and forwards the signal, so one cancellation unwinds the whole chain. The
wall-clock bound stays with the builder, which derives it from the chroot arch.
A forked worker also drops the parent's forwarder, whose copy names siblings the
parent already signals.
2026-09-06 01:57:19 -03:00
Vinícius Ferrão 3c6ec97417 test(xcat-dep): capture workers surviving a signalled orchestrator
Two real processes stand in for a worker and the build it runs. The probe fails
when the handler forwards to nobody, which is what the orchestrators did.
2026-09-06 01:52:17 -03:00
Vinícius Ferrão 4345371142 fix(xcat-dep): forward cancellation to the forked build workers
Both orchestrators fork a worker per codename or per build step, so a signal
sent to the orchestrator never reached the builds: run_bounded's forwarding
covers the build inside one worker, not the workers themselves. The
orchestrator exited and released its locks while its workers kept building,
and the next run raced processes it could not see.

One handler now passes INT, TERM and HUP to the live workers, waits for them
and re-raises the signal, shared by the sbuild loop and both ForkManager pools.
2026-09-06 01:52:17 -03:00
Vinícius Ferrão 3223963af2 test(xcat-dep): capture an unbounded build outliving its orchestrator
The probe fails against the previous helper, where terminating the wrapper
left the build running.
2026-09-06 01:52:17 -03:00
Vinícius Ferrão 7fc348eb09 fix(xcat-dep): give an unbounded build its own process group
With no deadline the helper called system(), which leaves the build in the
orchestrator's process group and installs no signal handler. A cancellation
then killed the orchestrator, which released its locks while the build kept
writing into staging, and a build killed by a signal was reported as rc=0.
Both paths now fork; a timeout of 0 removes the deadline, nothing else.
2026-09-06 01:52:17 -03:00
Vinícius Ferrão 286a63d6f4 docs(xcat-dep): describe the riscv64 Ubuntu dependency build
BUILD.md covered the EL10 riscv64 cross-build but said nothing about the apt
side, which now builds riscv64 too. Record the binfmt prerequisite, the ports
mirror, what each package does on that arch, the post-build smoke and the
measured build times.
2026-09-06 01:52:17 -03:00
Vinícius Ferrão 551d99c817 fix(ipmitool-xcat): depend on the libraries the binary links against
The package declared libc6 and libssl by hand and never used
${shlibs:Depends}, so it named neither readline nor ncurses. The riscv64 deb
installed and then failed with "error while loading shared libraries:
libreadline.so.8". dpkg-shlibdeps now supplies the list from the built binary,
and the manifest pins follow the new revision.
2026-09-06 01:16:28 -03:00
Vinícius Ferrão 8961ce1441 test(xcat-dep): capture a cross-built deb whose binary never runs
Six of the assertions fail against the previous build_deb_in_chroot, which
accepted a smoke argument it never acted on: a wrong version, a binary that
exits non-zero, and a smoke naming a deb the build never produced all passed.
2026-09-06 00:33:47 -03:00
Vinícius Ferrão 9f102879fb feat(xcat-dep): run the packaged ipmitool binary in the chroot that built it
A cross-built deb links against the target's loader and libraries, neither of
which exists on the build host, so a binary that cannot run still produces a
green build. The rpm side installs the package into the mock chroot and runs -V
there; the deb side had no smoke at all.

build_deb_in_chroot now takes an optional smoke: it installs the produced deb
with apt-get inside the chroot that built it, runs the named command and matches
its output. apt-get rather than dpkg -i, so a wrong or missing Depends fails
here instead of on a node. --skip-install drops the smoke.
2026-09-06 00:32:22 -03:00
Vinícius Ferrão 17eee22fc7 build(ci): run the sbuild orchestrator tests
t/sbuild-all.t covers the deb build path, the staged-architecture scan and the
control-file architecture lists, and nothing ran it in CI.
2026-09-06 00:26:59 -03:00
Vinícius Ferrão 5651e75875 test(xcat-dep): capture --install-deps skipping the emulation packages
The two assertions fail against the previous package list and pass with it,
so a later edit cannot drop the binfmt handler that a foreign chroot needs.
2026-09-06 00:26:59 -03:00
Vinícius Ferrão 4e71c71a55 fix(xcat-dep): install the emulation packages a foreign chroot needs
--install-deps named no qemu-user-static and no binfmt-support, so on a host
without them the mode reported success and the next command still refused to
create the riscv64 chroot. The message tells the operator to install those two
packages, which the mode meant to do.
2026-09-06 00:24:36 -03:00
Vinícius Ferrão 3c137bd133 test(xcat-dep): capture a cancelled build outliving its orchestrator
The command records its own pid and sleeps well inside the budget, so the
bound cannot be what ends it; the wrapper is then terminated and the pid
probed. Without the forwarding the build survives.
2026-09-06 00:24:13 -03:00
Vinícius Ferrão 1c223b881c fix(xcat-dep): reap the build when the orchestrator is signalled
The bounded build ran in its own process group, but a signal to the
orchestrator was not forwarded to it. On cancellation the orchestrator
exited and released its locks while schroot, mock and qemu kept running and
writing into staging, so the next run raced an orphan it could not see.
INT, TERM and HUP now reap the group before the process dies by the same
signal, which keeps the exit status honest.
2026-09-06 00:24:13 -03:00
Vinícius Ferrão 66af6b368f test(xcat-dep): capture a foreign build with no binfmt handler
Drives the check extracted from sbuild-all.pl with the handler node
redirected into a temporary tree, covering the native case, a foreign
target with no handler, and the same target once one is registered.
2026-09-06 00:24:12 -03:00
Vinícius Ferrão 1d64a64bda fix(xcat-dep): report a missing binfmt handler before bootstrapping
A chroot for another architecture is bootstrapped and built through
qemu-user: debootstrap's second stage and every later build run the
target's own binaries. Without a registered handler that failed deep inside
debootstrap, on a builder that had never been prepared for the new riscv64
target. The handler is now checked before the chroot is created, and the
message names what to install. The release recipe in the manual gains the
riscv64 staging run and names the architecture where it publishes and
verifies, because an explicit --expect-arch bypasses staged discovery.
2026-09-06 00:24:12 -03:00
Vinícius Ferrão 553e966565 fix(xcat-dep): keep the dependency bootstrap free of File::Slurper
The build timeout helper was imported at compile time, and it pulls in
XCAT::BuildUtils, which needs File::Slurper. The Ubuntu build hosts do not
all carry that module, so every caller began to depend on it -- including
--install-deps, whose whole job is to install it on a host that lacks it.
The helper is now loaded where it is used.
2026-09-06 00:24:12 -03:00