From df5c83c0bf6eaf9880e74110b7d5876c130cd5ac Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Sat, 12 Sep 2026 14:23:55 -0300 Subject: [PATCH] test(xcat-core): the Ubuntu ppc64le install drops the bootloader package The Subiquity apt configuration sets APT::Install-Recommends "false" for every architecture. On ppc64el the target gets grub-ieee1275 only as a recommended package of the kernel image, so the setting removes it and curtin fails. The test renders the apt block for osarch ppc64el, online and offline, and requires that it does not disable the recommended packages. Both assertions fail before the fix. Evidence: reg_linux_diskfull_installation_flat on Ubuntu 24.04 ppc64le, xcat-core-devel-ubuntu-cd build 122, cluster xcat25. curtin-install.log: "dpkg-query: package 'grub-ieee1275' is not installed", from ['unshare', '--fork', '--pid', '--mount-proc=/target/proc', '--', 'chroot', '/target', 'dpkg-reconfigure', 'grub-ieee1275']. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> --- xCAT-test/unit/ubuntu_subiquity_pkglist.t | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/xCAT-test/unit/ubuntu_subiquity_pkglist.t b/xCAT-test/unit/ubuntu_subiquity_pkglist.t index 05d15c361..3daf4ac49 100644 --- a/xCAT-test/unit/ubuntu_subiquity_pkglist.t +++ b/xCAT-test/unit/ubuntu_subiquity_pkglist.t @@ -193,8 +193,21 @@ is( $render->( $pkglist, environvar => 'ACCEPT_EULA=Y' ), $without, }; like( $apt_render->(), qr{URIs: http://mirror\.example/ubuntu}, 'the pkgdir mirror joins the installer sources' ); like( $apt_render->(), qr{^ conf: 'APT::Install-Recommends "false";'$}m, 'the installer installs without recommended packages, as ospkgs does' ); + # On a PReP machine curtin installs no bootloader package of its own: install_missing_packages + # covers UEFI and s390x only, and install_grub then runs "dpkg-reconfigure grub-ieee1275". + # The Ubuntu kernel image recommends grub-ieee1275, so the package reaches the target only + # when the installer keeps recommended packages. + unlike( $apt_render->( osarch => 'ppc64el' ), qr{APT::Install-Recommends}, + 'except on ppc64el, where the bootloader the installer configures is a recommended package' ); unlike( $apt_render->( environvar => 'http_proxy=http://proxy.example:3128' ), qr{mirror\.example|xcat-pkgdir}, 'but not for an osimage with environvar, whose mirrors may need those variables' ); + + # The offline configuration installs from the media alone and carries the same setting. + local *xCAT::Template::ubuntu_subiquity_apt_mirror = sub { '' }; + like( $apt_render->(), qr{^ conf: 'APT::Install-Recommends "false";'$}m, + 'an offline install drops the recommended packages as well' ); + unlike( $apt_render->( osarch => 'ppc64el' ), qr{APT::Install-Recommends}, + 'and keeps them on ppc64el for the same reason' ); } done_testing();