2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-28 13:22:16 +00:00
Files
xcat-core/build-utils
Daniel Hilst 107117b90d fix(xcat-core): a build worker can run before the build lock records it
The build lock is recovered from a dead owner when no recorded process
group is alive. sh() let the command exec before the parent recorded
its group, and attach_build_workers() ignored a failed record, so a
parent killed in that window left a running command on a lock that the
next build recovers. buildrpms.pl kept its Perl builders only in
%MOCK_INFLIGHT, so between two sh() calls a builder had no record and
a killed parent freed the lock under it.

start_build_worker() forks the worker into its own process group and
holds it on a pipe. The parent records the group on every held lock
and only then writes to the pipe. A failed record, or a parent that
dies first, makes the worker exit with status 127 before it runs.
sh() and both ForkManager loops in buildrpms.pl start their workers
this way, and run_on_finish detaches a builder once it is reaped.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-29 14:46:34 -03:00
..
2024-05-07 16:31:30 +02:00

Shared FIPS shell policy

Edit fips-policy.sh, then run:

perl build-utils/sync-fips-policy --write
perl build-utils/sync-fips-policy --check

Commit the source and both updated runtime libraries together. The generated blocks in Genesis usr/lib/xcat/fips.sh and postscripts xcatlib.sh stay tracked so source-checkout callers and standalone packages need no generation step. The RPM and Debian builders reject stale blocks before building either package.

Keep caller-specific helpers outside the generated block. The policy source must remain POSIX shell. It must not depend on the other package at runtime.