From 9aaf52235b40f5cb18bd375e75468bc634eae177 Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Wed, 9 Sep 2026 13:50:02 -0300 Subject: [PATCH] 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> --- xCAT-genesis-builder/builddeb-genesis-base | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xCAT-genesis-builder/builddeb-genesis-base b/xCAT-genesis-builder/builddeb-genesis-base index 8a687a60a..5c4091a69 100755 --- a/xCAT-genesis-builder/builddeb-genesis-base +++ b/xCAT-genesis-builder/builddeb-genesis-base @@ -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