Twelve conflicts, all from xcat-core/#7970 landing.
Eleven are the one sed line in the netboot postinstall profiles, where #7970 and
this branch replaced the same line with different patterns. Master's wins: it
anchors on optional leading blanks and preserves a trailing comment, which this
branch's `s/^SELINUX=.*$/SELINUX=disabled/` would have eaten. This branch's own
postinstall_selinux_config.bats asserts "the comment that names permissive keeps
its text", so the better pattern is the one its test already wanted -- 6 of 6
pass on master's version. What master's pattern does not catch is a value
outside enforcing|permissive, which nothing here tests and no stock config
ships.
The twelfth is .github/workflows/xcat_test.yml: master added a step to the
existing job and this branch adds a whole selinux_policy_test job after it.
Resolved as the union, with master's step where it put it; the file still parses
and names three jobs.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
The SELinux page documents a recursive chcon to repair a published artifact
that carries the wrong type. No case runs that procedure, so nothing measures
what it does to the guest trees of the image root, and nothing measures whether
the repair survives a later relabel.
selinux_image_repair.t starts with default_t on every published artifact of an
image root and with valid types in both rootimg and rootimg-statelite. It runs
the repair, then reads the labels back after a recursive relabel and after a
reinstall of the module. It covers the standard publication directory and one
that site.installdir moved, because the packaged mappings name /install.
semanage writes to the policy store of the host, so the case refuses to run
where SELinux is enabled and removes every mapping it adds. restorecon is a
no-op where SELinux is disabled, so the case applies the mappings with setfiles
and asserts that the merged file_contexts answers what the store answers for
each path.
selinux_docs.t gains the checks that keep the page and the xcat.fc comment from
describing a chcon repair. 7 of its 26 checks fail on this commit.
With the chcon of the page in place of the documented procedure,
selinux_image_repair.t fails 101 of its 170 checks, 36 of them guest labels that
the recursive chcon overwrote.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Execute the complete postscript and check the daemon UID before real UDP
log delivery. Cover fresh and repeated MN/SN setup, restricted directories,
legacy ownership and modes, and a blocked directory path. Keep the upgrade
wrapper and forwarding cases as compatibility controls.
Select older configuration branches through their version-report boundary;
use the installed daemon, without claiming old-daemon qualification.
Run the isolated native cases in CI.
Execute each profile through /bin/sh. Check both firewalld entries as
regular files, valid links, dangling links, directories and missing paths.
Preserve unit targets, unrelated links and the older profiles without this
cleanup.
Execute all affected owners and their aliases in isolated image roots. Check
policy contents and metadata, missing files, repeated runs and host
sentinels. Run the cases in Ubuntu and EL CI.
xcatd_service_direct_exec.t reads the shipped unit on a default install,
where the prefix in the unit and the prefix of the installation are the
same path. It cannot fail when they differ, which is the case the
systemd startup has to get right.
xcatd_relocated_startup.t installs the built xCAT-server package twice,
once with the default prefix and once with rpm --prefix /srv/xcat. For
each one it composes the environment the unit gives ExecStart, in the
order the unit lists Environment and EnvironmentFile, then asserts
XCATROOT, that every xCAT directory on PATH is under that prefix, and
that the daemon the start command runs receives the prefix. The
/srv/xcat subtest fails 3 of its 11 checks before the next commit; the
/opt/xcat subtest passes either way.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Run the complete discovery postscript in the shared shell sandbox. Keep the
key-generation, exit-status and listener side-effect checks. Preserve the
dedicated CI step and its cancellation condition.
The listener must send the requests for one archive with one sender. It
must refuse paths outside the image roots, archives without a checksum,
and digests that the checksum file does not list. A queued batch must
keep its archive after the next publication. The limits on
connections, queued jobs, senders, receivers and time must hold. Package
removal must stop and disable the service, and an upgrade must leave it
alone.
The unit test calls the listener subs of xCAT::UFTP in process, with a
fixed clock and a sender start that it records. native/uftp_listener.t
runs the listener script with uftp and uftp_keymgt fixtures. It covers
key creation, a read-only log directory, sender processes, shutdown and
connection limits. The pull-request workflow runs it.
Two files needed a resolution. Both are unions of independent additions.
XCAT::Test::Lifecycle::build_deb takes master's new $source argument and its
-xpf extraction, and keeps the control-$arch selection this branch adds for
xCAT-genesis-scripts. $source defaults to the repository root, so the branch
behaviour does not change.
.github/workflows/xcat_test.yml keeps master's profile_package_payload.t on
both lifecycle prove lines and master's Perl module list, and keeps this
branch's FIPS steps, bzip2 and openssl.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Run the complete postscripts with controlled credential replies and native
SSH key generation. Check successful and empty replies, server errors,
retry limits, flow-control differences and password logging.
Source the unchanged selector with explicit partition and udev fixtures.
Bound awk discovery to the fixture so runner filesystem size cannot delay
selection. Keep rendered-installer coverage and independent CI failures.
The image caller tests create the run directory in their fixture
image, so they did not see a bind mount to a missing mount point.
Run rh/genimage on a new and on an existing image directory. The mount
fixture fails like mount(8) when the mount point is missing, and the
package manager fixture records the mounts in place when the packages
install. Cover EL9 through the rh and rocky entry points, and EL6,
which does not mount /proc and /sys. The pull-request workflow runs
the test.
Render Subiquity configuration with real database rows and execute the emitted commands in private namespaces. Check resulting files, failure ordering and the install-monitor handshake without rewriting shell fragments.
Build a real package and repository, then execute the generated helper with representative host architectures and releases. Check its apt configuration and preserve unrelated sources.
Run each selected postinstall script in an isolated filesystem. Check SELinux settings and fstab after repeated execution instead of comparing shell source.
Render the selected profiles with an isolated database. Check the installer data and run the emitted post-install blocks against a private filesystem, including the EFI fallback and missing-loader paths.
Run the native case from the source snapshot preserved before CI package builds.
xcat.fc excludes a rootimg from the /install relabel only at the default
depth, /install/netboot/<os>/<arch>/<profile>/rootimg. An osimage with
rootimgdir=/install/netboot/custom-image resolves rootimg/etc/shadow to
public_content_t, so the restorecon -R /install in %posttrans overwrites
the labels of the guest operating system.
The new native test builds xcat.pp, installs it into a private copy of the
targeted store, and asks matchpathcon for the label of each path. Then it
labels a copy of /install, relabels it with setfiles after the install and
after a reinstall of the module, and reads the labels back. The test fails
for the custom roots. The unit test no longer compares the fc lines as
text.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
The liteimg archive test runs real cpio and gzip, and puts compressor
and ctorrent fixtures in PATH. That is a native test, so it moves out
of the unit suite. The pull-request workflow runs it explicitly.
A missing Linux tool now fails the test instead of skipping it. An
ilitefile fixture replaces the runcmd override, so liteimg runs its
commands through the real runcmd.