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.
mount_chroot bind-mounts the host /run into the image root before the
run directory exists there. On the first build of a new image, mount
fails with "mount point does not exist". genimage does not check the
result, so the packages install without the host /run.
Create the directory first, as mount_chroot already does for /proc,
/sys and /dev. The mount also uses the subroutine argument instead of
the global image path. Both have the same value at every call site.
buildall now calls prepare_mock_resultdirs before the cache checks, so a
cached build also loads the mock configuration through mockbuild.config.
release_repository.t builds xCAT-release in a user namespace on a host
without mock, and the build stopped with "mock is not installed: cannot
import mockbuild.config".
The namespace fixture already stands in for /etc/mock. It now also puts a
stand-in mockbuild package on PYTHONPATH. Its load_config fails when the
chroot configuration is missing, and reports the caller as chrootuid, as
mock does when no chrootuid is set. buildrpms.pl is unchanged.
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.
delete_rows must delete the rows of the keys from every table that
opens. When a named table does not open, first, last or between two
tables, it must return that table and delete no row.
chtab -d called delEntries on each table that it named without a check
that the table opened. A table name that xCAT does not know made chtab
die after it had deleted the rows of the tables named before it. The
error was "Can't call method delEntries on an undefined value".
The delete moves to xCAT::TableUtils->delete_rows, which opens every
named table first. When a table does not open, it deletes no row and
returns the table name. chtab -d reports that table with the error of
the update form.
tabrestore must restore a row with one field for each column, fewer
fields, or a quoted field that holds a comma. It must refuse a row with
an empty, 0 or text field after the last column, and roll back the
restore.
The Debian package set the xCAT helper directory to 0644, preventing
unprivileged users from loading the probe modules.
Set library directories to 0755 and regular files to 0644. Repair the old
helper-directory mode during configuration because dpkg preserves existing
modes. Leave administrator overrides, other modes, and symlinks unchanged.