mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-09-29 00:30:59 +00:00
eb30d2e92a
builddeb-genesis-base built its package list inline, between apt-get update and apt-get install. A test could reach the list only by cutting the REQUIRED_PACKAGES assignment out of the script and evaluating it. It could not reach the choice between renamed packages (bind9-dnsutils or dnsutils, util-linux-extra or util-linux) at all. The payload check in verify-genesis-payload was bash, so a test could only run the script and read its stderr. XCAT::GenesisBuildRoot::required_packages() now returns the list for a dpkg architecture. A code ref says which packages the release carries; the default asks apt-cache. builddeb-genesis-base calls it at the same point in the build and installs the same packages. XCAT::GenesisPayload holds the mandatory-command list and the payload check. verify-genesis-payload runs its main() and keeps the same arguments, exit codes and messages. buildrpms.pl stages the module beside the script. Both modules use core Perl only, because the build root has perl-base and nothing more. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
15 lines
692 B
Bash
Executable File
15 lines
692 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# verify-genesis-payload [--commands-from <module-setup.sh>] <payload-root> [required-path ...]
|
|
#
|
|
# dracut_install() reports a missing binary and returns, so the module install function keeps
|
|
# going and the image ships without it. Check the extracted payload before it is packaged.
|
|
#
|
|
# Paths given on the command line are relative to <payload-root>. --commands-from reads back
|
|
# what the dracut module installs. XCAT::GenesisPayload, in lib/ beside this script, holds
|
|
# the rules, so the unit tests call the same code.
|
|
#
|
|
# Exit status: 0 complete, 1 something missing, 2 usage error.
|
|
|
|
exec perl -I"$(dirname "$0")/lib" -MXCAT::GenesisPayload=main -e 'exit main(@ARGV)' -- "$@"
|