mock_build_owner parsed chrootuid and chrootgid from the text of the
rendered configuration. A value set in an included file, an assignment
with an inline comment or a double-quoted key, and an include after an
assignment all gave a uid that mock does not build as. Also, a root
build that stopped part way left root-owned 0644 logs in the result
directories, and the next build, as uid 1000, could not append to them.
mock_build_owner now asks mock's own loader, mockbuild.config.load_config,
for chrootuid and chrootgid of the chroot that buildrpms.pl passes to
mock -r. It fails with a clear message when mock is not installed.
prepare_mock_resultdirs moves to XCAT::BuildUtils. It also gives the
files already in both result directories to that owner, so a retry can
append to the old logs and replace a package of the same version. When
mock builds as the caller, nothing changes owner.
native/mock_resultdir_owner.t gave the wrong uid for four of its
configuration cases, and failed the 11 retry checks, before this change.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
mock_build_owner reads chrootuid and chrootgid from the text of the
rendered configuration. It does not see a value set in an included file,
an assignment with an inline comment or a double-quoted key, or an
include that overrides an earlier assignment. prepare_mock_resultdirs
then gives the result directories to the wrong uid, or to none.
prepare_mock_resultdirs changes only the two directories. A root build
that stopped part way leaves root-owned 0644 logs in them, and mock,
running as uid 1000, cannot append to them on the next run.
native/mock_resultdir_owner.t runs mock's loader on each configuration
case, and checks as root that uid 1000 can append to the stale logs in
both directories. Ubuntu ships no mock, so the workflow runs it in a
Fedora container and fails when it skips. The unit test checks, with
chown recorded, which owner the directories and their files get.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
PR #7897 made mock create its result directory as root by appending
config_opts['chrootuid'] = 0 to every per-package configuration. chrootuid
also selects the uid rpmbuild runs as, so every target now builds as root,
and the 1000 that openeuler-24.03-ppc64le declares no longer applies inside
the chroot.
Remove the assignment and give the result directory to the uid the target
declares. mock_build_owner reads chrootuid and chrootgid from the rendered
configuration, and prepare_mock_resultdirs creates dist/<target>/rpms and its
SRPMS subdirectory and chowns both before the build starts. openeuler-24.03-ppc64le
is the only target that declares a uid; elsewhere mock builds as the caller and
the directories are left alone.
buildrpms_source_only.t records the stages buildall runs, so it now expects the
new one between createmockconfig and buildsources.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
PR #7897 appends config_opts['chrootuid'] = 0 to every per-package mock
configuration so that mock creates its result directory as root. That also
moves rpmbuild to uid 0 for the whole build.
Assert the opposite: mock_config_text preserves the uid and gid the target
declares, and mock_build_owner reports the owner the result directory needs.
A target that declares no uid reports none, because mock then uses the caller.
Two assertions fail on the unfixed tree: the rendered configuration reports
chrootuid 0 for openeuler-24.03-ppc64le, and 0 for a target that declares
nothing.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Run complete rendered installers and their emitted postboot scripts in
private Linux filesystems. Cover service selection, flag aliases, defaults,
debug output, ordering and failures, and select the test in CI.
Exercise the complete ospkgs and otherpkgs scripts with recorded package
commands. Check unattended options, pkglist environment, failure status,
and CUDA architecture handling without extracting source fragments.
Use the production repository probes and package names. Check that
missing repositories and failed queries stop both installers before any
package transaction, and that similar package names do not satisfy EPEL.
Run OS detection in a private filesystem with the real release parser.
Remove the rewritten-source Perl harness and require GNU awk for the
legacy Red Hat fallback.
xCAT/postscripts/bmcsetup had drifted behind
xCAT-genesis-scripts/usr/bin/bmcsetup: four recent BMC fixes were applied
to the genesis copy only. Bring them over, so the two copies differ only in
log_label:
- skip BMC LAN settings that already match (verify before set) - 8d7ccc2d8
- enable BMC setup for Lenovo SR635/SR655 - 6dbc16c21
- support Intel Walker Pass (S9200WK) BMC LAN - 49c3e94a0
- settle after an IBM BMC port change; support long BMC passwords - 563a08362
A mechanical sync of already-reviewed code, not new logic; not tested on
hardware.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
reg_linux_diskless_installation_flat fails on aarch64 at the check
"lsdef $$CN | grep vmothersetting" matched against "machine". The case
stops there, so the diskless provisioning it exists to measure is never
asserted.
The case sets vmothersetting to machine:invalid, confirms the node still
provisions, then replaces it with a valid machine type and confirms
again. The second step selects that type by architecture and knows only
ppc64, x86_64 and riscv64. On aarch64 the variable stays empty, chdef
clears vmothersetting, and the check that looks for the word "machine"
returns 1.
Give aarch64 the machine type QEMU uses for it, which is virt, the same
value riscv64 already gets. The other three architectures keep the value
they had.
Measured on xcat-ci/xcat-test-el10-aarch64 #9: the case reported Failed
at this check, 08:36:51Z, while genimage and packimage returned 0 and
the node reached status=booted with rootfs on / type tmpfs and
IMAGENAME alma10.2-aarch64-netboot-compute.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>