mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-09-21 16:39:30 +00:00
fix(xcat-core): the Ubuntu Genesis image ships without a DHCP client
builddeb-genesis-base installs its build root from REQUIRED_PACKAGES. That list has no isc-dhcp-client, no ifenslave and no util-linux-extra, so dracut cannot find dhclient, ifenslave or hwclock. dracut_install prints one line for each and returns, the script never reads dracut's result, and the .deb is packaged with three holes. A Genesis image with no dhclient never obtains a provisioning lease. Add the three packages, and run verify-genesis-payload on the extracted payload before dpkg-buildpackage. --commands-from reads the command names back from the module that is about to be built, so a later addition to the module is checked too. This is what xCAT-genesis-base.spec already does for EL. genesis_ubuntu_build_root.t fails five of its eight assertions without this change. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
This commit is contained in:
@@ -30,6 +30,7 @@ REQUIRED_PACKAGES="
|
||||
nfs-common rpcbind pciutils usbutils parted
|
||||
dosfstools e2fsprogs lvm2 mdadm net-tools
|
||||
bc psmisc rsync wget cpio
|
||||
isc-dhcp-client ifenslave util-linux-extra
|
||||
dpkg-dev debhelper fakeroot devscripts vim-tiny
|
||||
"
|
||||
if [ "$BUILDARCH" = "amd64" ]; then
|
||||
@@ -141,6 +142,11 @@ fi
|
||||
echo "Adding kernel $KERNEL_IMAGE"
|
||||
cp "$KERNEL_IMAGE" "$GENESIS_ROOT/kernel"
|
||||
|
||||
# dracut_install reports a missing command and returns, so a hole reaches the .deb with
|
||||
# nothing in the log but one line. Read the commands back from the module and check them
|
||||
# against the payload, the way xCAT-genesis-base.spec does for EL.
|
||||
bash "$DIR/verify-genesis-payload" --commands-from "$DRACUTMODDIR/module-setup.sh" "$GENESIS_FS"
|
||||
|
||||
find "$GENESIS_TMPDIR" -type c -delete
|
||||
|
||||
# Stage for dpkg-buildpackage
|
||||
|
||||
Reference in New Issue
Block a user