2
0
mirror of https://github.com/xcat2/xcat-dep.git synced 2026-09-12 12:36:23 +00:00

Merge pull request #69 from VersatusHPC/fix/riscv64-perl-html-form

Pin perl-HTML-Form in the riscv64 dependency cell
This commit is contained in:
Daniel Hilst
2026-09-11 19:19:46 -03:00
committed by GitHub
4 changed files with 56 additions and 4 deletions
@@ -60,4 +60,5 @@ jobs:
prove -v t/sbuild-all.t
prove -v -It/lib t/genesis_openembedded_release.t
sudo -E prove -v -It/lib t/genesis_openembedded_consumer.t
prove -v t/riscv64_perl_cell.t
sudo -E prove -v -It/lib t/common-repo-gate.t
+17 -2
View File
@@ -26,6 +26,7 @@ my $build_timestamp;
# Net-Telnet), which build from a committed .src.rpm and so are NOT covered by mockbuild-all's
# in-tree spec bump. Spec-mode packages get bumped in-tree upstream, so we leave those alone.
my $release_suffix = '';
my $list_packages = 0;
GetOptions(
'work-dir=s' => \$work_dir,
@@ -41,11 +42,20 @@ GetOptions(
'jobs=i' => \$jobs,
'build-timestamp=i' => \$build_timestamp,
'release-suffix=s' => \$release_suffix,
'list-packages!' => \$list_packages,
) or die usage();
die "Run as root (current uid=$>)\n" if $> != 0;
# --list-packages prints the set a run would build and exits before any host requirement, so a
# test can hold the manifest to it without root, mock or a chroot. The host detection below
# traces its commands on STDOUT; keep that off the list by sending it to STDERR until the list.
my $list_out;
if ($list_packages) {
open($list_out, '>&', \*STDOUT) or die "dup STDOUT: $!\n";
open(STDOUT, '>&', \*STDERR) or die "redirect STDOUT: $!\n";
}
die "Run as root (current uid=$>)\n" if $> != 0 && !$list_packages;
for my $bin (qw(mock rpmbuild rpm dnf perl bash grep)) {
for my $bin ($list_packages ? () : qw(mock rpmbuild rpm dnf perl bash grep)) {
run("command -v " . sh_quote($bin) . " >/dev/null 2>&1");
}
@@ -296,6 +306,11 @@ for my $pkg (@packages) {
die "Unknown package in --packages: $pkg\n" if !exists $meta{$pkg};
}
if ($list_packages) {
print {$list_out} "$_\n" for @packages;
exit 0;
}
if ($jobs <= 0) {
$jobs = scalar(@packages);
}
+5 -2
View File
@@ -47,7 +47,8 @@
# where neither the base OS nor EPEL provides it; on the other releases EPEL/OS
# supplies it (so `dnf install xCAT` pulls the OS/EPEL copy, not xcat-dep's).
# perl-Sys-Virt omitted on el8 -- provided by EPEL on AlmaLinux 8.
# perl-HTML-Form only on el8 -- provided by the OS/EPEL on el9/el10.
# perl-HTML-Form on el8, and on el10 for riscv64 only -- provided by EPEL on el9/el10
# x86_64 and ppc64le; riscv64 has no EPEL, and perl-xCAT requires it.
# perl-Crypt-SSLeay only on el10 -- provided by the OS/EPEL on el8/el9.
# perl-Net-Telnet only on el10 -- provided by the OS/EPEL on el8/el9.
#
@@ -148,7 +149,8 @@ xCAT-genesis-base=>= 2:2.18.0
# perl-Path-Class below). perl-Path-Class is a build dep of perl-Crypt-SSLeay only. The x86 boot
# loaders (elilo-xcat, syslinux-xcat, xnba-undi) are noarch and are listed like on ppc64le: a
# riscv64 management node serves the x86 nodes of a mixed cluster.
# The per-EL perl set is the EL10 one, so perl-HTML-Form is absent here as well.
# The per-EL perl set is the EL10 one plus perl-HTML-Form: EPEL supplies it on the other
# architectures, nothing supplies it on riscv64, and perl-xCAT requires perl(HTML::Form).
# xCAT-genesis-base is deliberately not listed: the riscv64 repo is built with --skip-genesis.
[rocky-10-riscv64-xcat]
conserver-xcat=8.2.1
@@ -159,6 +161,7 @@ ipmitool-xcat=>= 1.8.18-4
syslinux-xcat=>= 6.03-1
xnba-undi=>= 1.21.1-1
perl-Crypt-SSLeay=0.72
perl-HTML-Form=6.07
perl-HTTP-Async=>= 0.30-3
perl-IO-Stty=>= 0.04-5
perl-Net-HTTPS-NB=>= 0.14-3
+33
View File
@@ -0,0 +1,33 @@
#!/usr/bin/env perl
use strict;
use warnings;
use FindBin qw($RealBin);
use Test::More;
use lib $RealBin, "$RealBin/..";
use MockBuildUtils qw(read_manifest);
# EL10 riscv64 has no EPEL, so every perl package the builder exists to supply must be pinned in
# the riscv64 cell: an omission there is not filled in by any other repository. perl-HTML-Form
# was missing, and perl-xCAT hard-requires perl(HTML::Form), so `dnf install xCAT` could not
# resolve on riscv64 at all. The set comes from the builder itself, so a package added to it later
# fails here until the cell names it.
my $builder = "$RealBin/../mockbuild-perl-packages.pl";
plan skip_all => 'mockbuild-perl-packages.pl not found' unless -f $builder;
plan skip_all => 'Parallel::ForkManager is not available' unless eval { require Parallel::ForkManager; 1 };
my @built = grep { length } split /\n/, `perl -I "$RealBin/.." -I "$RealBin/../lib" "$builder" --epel-gap --list-packages 2>/dev/null`;
is( $?, 0, 'the builder lists the packages an --epel-gap run would build' );
cmp_ok( scalar(@built), '>=', 10, '... and the list is the real one, not an empty run' );
my %m = read_manifest("$RealBin/../packages-manifest.conf");
my $cell = $m{'rocky-10-riscv64-xcat'};
ok( $cell, 'the manifest has the riscv64 cell' );
my @unpinned = grep { !defined $cell->{$_} } @built;
is_deeply( \@unpinned, [], 'every package the builder supplies is pinned in the riscv64 cell' )
or diag( "missing from [rocky-10-riscv64-xcat]: @unpinned" );
done_testing;