2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-09-21 16:39:30 +00:00

Merge pull request #7842 from VersatusHPC/fix/ubuntu-ppc64el-netboot-dig

fix(xcat-core): the Ubuntu ppc64el netboot image has no dig
This commit is contained in:
Daniel Hilst
2026-09-17 11:38:29 -03:00
committed by GitHub
5 changed files with 126 additions and 0 deletions
@@ -0,0 +1,20 @@
bash
ifupdown
nfs-common
openssl
isc-dhcp-client
libc-bin
linux-image-generic
openssh-server
openssh-client
wget
vim
rsync
busybox-static
gawk
bind9-dnsutils
tar
gzip
xz-utils
cpio
chrony
@@ -0,0 +1,20 @@
bash
ifupdown
nfs-common
openssl
isc-dhcp-client
libc-bin
linux-image-generic
openssh-server
openssh-client
wget
vim
rsync
busybox-static
gawk
bind9-dnsutils
tar
gzip
xz-utils
cpio
chrony
@@ -0,0 +1,20 @@
bash
ifupdown
nfs-common
openssl
isc-dhcp-client
libc-bin
linux-image-generic
openssh-server
openssh-client
wget
vim
rsync
busybox-static
gawk
bind9-dnsutils
tar
gzip
xz-utils
cpio
chrony
@@ -0,0 +1,20 @@
bash
ifupdown
nfs-common
openssl
isc-dhcp-client
libc-bin
linux-image-generic
openssh-server
openssh-client
wget
vim
rsync
busybox-static
gawk
bind9-dnsutils
tar
gzip
xz-utils
cpio
chrony
+46
View File
@@ -0,0 +1,46 @@
#!/usr/bin/env perl
use strict;
use warnings;
use FindBin;
use Test::More;
# genimage builds the netboot initrd for ppc64el with mkinitrd, not dracut, and mkinitrd
# copies usr/bin/dig out of the rootimg. A release with no ppc64el package list falls back
# to compute.pkglist, which installs no dig, and genimage stops with
# "Failed to find usr/bin/dig". The package that holds dig changed name in 22.04.
use lib "$FindBin::Bin/../lib";
use XCAT::Test::File qw(repo_path);
my $netboot = 'xCAT-server/share/xcat/netboot/ubuntu';
sub packages {
my ($path) = @_;
my $full = repo_path($path);
return unless -r $full;
open(my $fh, '<', $full) or die "cannot read $full: $!";
my @packages = grep { length && !/^#/ } map { my $l = $_; chomp $l; $l =~ s/\s+//g; $l } <$fh>;
close($fh);
return \@packages;
}
foreach my $release (qw(20.04 22.04 24.04 26.04)) {
my $list = packages("$netboot/compute.ubuntu$release.ppc64el.pkglist");
ok($list, "$release has a ppc64el netboot package list");
SKIP: {
skip "no $release ppc64el package list to inspect", 4 unless $list;
ok(scalar(grep { $_ eq 'dnsutils' || $_ eq 'bind9-dnsutils' } @{$list}),
"the $release ppc64el image installs the dig that mkinitrd copies");
ok(scalar(grep { $_ eq 'linux-image-generic' } @{$list}),
"the $release ppc64el image installs a kernel");
ok(scalar(grep { $_ eq 'nfs-common' } @{$list}),
"the $release ppc64el image can mount its root over NFS");
is_deeply(packages("$netboot/compute.ubuntu$release.ppc64le.pkglist"), $list,
"the $release ppc64le list matches the ppc64el list");
}
}
done_testing();