From f5a029c4481290f0fde6c05a966911403f36c87a Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Thu, 22 Oct 2026 22:33:55 -0300 Subject: [PATCH 1/2] test(xcat-core): assert openSUSE builds and installs without legacy Genesis Nothing holds the openSUSE Genesis scope down. xCAT-genesis-base is built for every target the dep pipeline names, and xCAT-genesis-scripts requires the payload on every family. The test reads the build-plan decision and the payload requirement in the spec. It fails on this commit: the build plan keeps xCAT-genesis-base for openSUSE, and the requirement carries no condition. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> --- xCAT-test/unit/opensuse_no_legacy_genesis.t | 75 +++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 xCAT-test/unit/opensuse_no_legacy_genesis.t diff --git a/xCAT-test/unit/opensuse_no_legacy_genesis.t b/xCAT-test/unit/opensuse_no_legacy_genesis.t new file mode 100644 index 0000000000..0447d49bbc --- /dev/null +++ b/xCAT-test/unit/opensuse_no_legacy_genesis.t @@ -0,0 +1,75 @@ +#!/usr/bin/env perl +use strict; +use warnings; + +use FindBin; +use File::Slurper qw(read_lines); +use Test::More; + +use lib "$FindBin::Bin/../../build-utils/lib"; +use XCAT::BuildUtils (); + +# openSUSE ships no legacy Genesis. Operator decision, 2026-10-22, the same decision taken for +# openEuler on 2026-10-01. +# +# Two artifacts carry it. The build plan decides the (package, target) pairs buildrpms.pl +# builds, and xCAT-genesis-scripts carries the payload requirement that makes an install fail +# when the payload is absent. +# +# Measured 2026-10-22: sles/devel/xcat-dep has no common/ tree (repomd.xml 404, against 200 for +# the EL one), so no OpenEmbedded payload is published for the family either. Nothing in the +# openSUSE graph can satisfy the payload name. +my @opensuse_targets = qw( + opensuse-leap-15.6-x86_64 + opensuse-leap-42.3-x86_64 + opensuse-leap-15.6-ppc64le +); +my @payload_targets = qw( + alma+epel-8-x86_64 + alma+epel-9-x86_64 + alma+epel-10-x86_64 + alma+epel-10-ppc64le + openeuler-22.03sp4-x86_64 +); + +my $decides = XCAT::BuildUtils->can('package_skip_reason'); +ok($decides, 'BuildUtils decides which packages a target builds'); + +SKIP: { + skip 'BuildUtils has no build-plan decision', 17 unless $decides; + + foreach my $target (@opensuse_targets) { + ok($decides->('xCAT-genesis-base', $target), + "xCAT-genesis-base is not built for $target"); + } + + foreach my $target (@payload_targets) { + is($decides->('xCAT-genesis-base', $target), undef, + "xCAT-genesis-base is built for $target"); + } + + # The gate names one package. openSUSE keeps every other package, including the scripts + # half of Genesis: xCAT requires it, and dropping it would be a second decision. + foreach my $pkg (qw(perl-xCAT xCAT xCATsn xCAT-client xCAT-server xCAT-probe + xCAT-genesis-scripts xCAT-test xCAT-release)) { + is($decides->($pkg, 'opensuse-leap-15.6-x86_64'), undef, + "$pkg is built for openSUSE"); + } +} + +# zypper install xCAT reaches this requirement through xCAT-genesis-scripts. An openSUSE core +# that states it cannot install at all, because no repository the family reads carries the +# payload. +my $root = "$FindBin::Bin/../.."; +my @lines = read_lines("$root/xCAT-genesis-scripts/xCAT-genesis-scripts.spec"); +my ($index) = grep { + $lines[$_] =~ /^Requires:\s*xCAT-genesis-base-%\{tarch\}\s*>=\s*2:2\.18\.0\s*$/ +} 0 .. $#lines; +ok(defined $index, 'xCAT-genesis-scripts requires the legacy Genesis payload'); + +my $if = defined $index ? $lines[$index - 1] : ''; +like($if, qr/^%if\b/, '... behind a condition'); +like($if, qr/\Q0%{?suse_version}\E/, '... that reads suse_version'); +like($if, qr/^%if\s*!/, '... and excludes openSUSE rather than selecting it'); + +done_testing(); From c9ec8b427966159849a42a964cb22b328af61478 Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Thu, 22 Oct 2026 23:44:31 -0300 Subject: [PATCH 2/2] fix(xcat-core): openSUSE builds a Genesis payload its manifest cannot describe xcat-dep-build-opensuse15-x86_64 fails its xCAT-genesis-base step. BuildRequires resolve, and verify-genesis-payload then reports 566 missing zoneinfo/posix paths, etc/redhat-release, and 45 EL paths and tool names -- net-tools-deprecated, kmod-compat, iputils, systemd-sysvinit, timezone, nc, mkdosfs and the lvm symlinks. The manifest is written for EL, so the package cannot be built on openSUSE. openSUSE ships no legacy Genesis, so it does not need to be. package_skip_reason names the pairs a target does not build and why, buildrpms.pl prints each skipped pair, and a plan that skips everything returns 0 rather than failing: the dep pipeline asks for xCAT-genesis-base alone, so on openSUSE its whole plan is empty and an empty plan is the plan. Dropping the package alone would make xCAT unresolvable there. xCAT-genesis-scripts.spec requires xCAT-genesis-base-%{tarch} unconditionally and xCAT requires xCAT-genesis-scripts, so zypper install xCAT would fail on a missing package -- later than the build and looking like something else. That Requires now stands behind %if ! 0%{?suse_version}; the Leap chroot's /usr/lib/rpm/suse/macros sets %suse_version 1500, and no EL or openEuler target defines it. xCAT-test/unit/opensuse_no_legacy_genesis.t covers the skip, the empty plan and the conditional Requires. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> --- build-utils/lib/XCAT/BuildUtils.pm | 27 +++++++++++++++++++ buildrpms.pl | 14 +++++++++- .../xCAT-genesis-scripts.spec | 7 +++++ 3 files changed, 47 insertions(+), 1 deletion(-) diff --git a/build-utils/lib/XCAT/BuildUtils.pm b/build-utils/lib/XCAT/BuildUtils.pm index c5268a109c..684231c62d 100644 --- a/build-utils/lib/XCAT/BuildUtils.pm +++ b/build-utils/lib/XCAT/BuildUtils.pm @@ -49,6 +49,7 @@ our @EXPORT_OK = qw( genesis_log_errors genesis_log_deny_rules deb_belongs_to_dist genesis_dists genesis_dist_reason fips_policy_artifacts fips_policy_plan sync_fips_policy + package_skip_reason ); # Both builders echo the commands they run under --verbose. Set once, after @@ -806,6 +807,32 @@ sub cancel_build { sub DESTROY { shift->release } } +# The packages a target does not build, and why. Each rule names the package and +# the target-name prefixes that do not build it. +# +# openSUSE ships no legacy Genesis. Operator decision, 2026-10-22. The payload manifest +# verify-genesis-payload checks is written for EL: on opensuse-leap-15.6-x86_64 it reports 566 +# missing zoneinfo/posix paths, etc/redhat-release and 45 EL paths and tool names, so the package +# cannot be built there and under that decision does not need to be. +my @PACKAGE_SKIPS = ( + { package => 'xCAT-genesis-base', + prefixes => ['opensuse-'], + reason => 'openSUSE ships no legacy Genesis', + }, +); + +# Why $pkg is not built for $target, or undef when the pair is built. +sub package_skip_reason { + my ($pkg, $target) = @_; + return undef unless defined($pkg) && defined($target); + for my $skip (@PACKAGE_SKIPS) { + next unless $pkg eq $skip->{package}; + return $skip->{reason} + if grep { index($target, $_) == 0 } @{ $skip->{prefixes} }; + } + return undef; +} + sub openeuler_build_target { my ($os, $arch) = @_; return undef unless lc($os->{ID} // '') eq 'openeuler'; diff --git a/buildrpms.pl b/buildrpms.pl index 3cdec4d62e..5ad53288aa 100755 --- a/buildrpms.pl +++ b/buildrpms.pl @@ -60,6 +60,7 @@ use XCAT::BuildUtils qw(git_revision source_date_epoch sh sh_or_die usage buildi stage_genesis_base_sources write_script read_line targetarch_from_target openeuler_build_target openeuler_repo_subdir + package_skip_reason mock_config_text); use POSIX (); # EEXIST, for the directory build lock (see main()) use Getopt::Long qw(GetOptions); @@ -1027,7 +1028,18 @@ sub main { # A builder killed with SIGKILL together with this parent leaves its directory behind. sweep_build_sources_dirs($SOURCES_BASE); - my @rpms = product($opts{packages}, $opts{targets}); + my @rpms; + for my $pair (product($opts{packages}, $opts{targets})) { + my $why = package_skip_reason($pair->@*); + $why ? print "Skipping $pair->[0] for $pair->[1]: $why\n" : push @rpms, $pair; + } + # An empty plan is the plan, not a failure. The dep pipeline asks for + # xCAT-genesis-base alone, and no openSUSE target builds it. + if (!@rpms) { + print "Nothing to build: every requested package is out of scope for the" + . " requested targets\n"; + return; + } my $pm = Parallel::ForkManager->new($opts{nproc}); # Track which mock chroot each live child is building so abort_builds can scrub it. diff --git a/xCAT-genesis-scripts/xCAT-genesis-scripts.spec b/xCAT-genesis-scripts/xCAT-genesis-scripts.spec index 6ec302e6fb..629b66785e 100644 --- a/xCAT-genesis-scripts/xCAT-genesis-scripts.spec +++ b/xCAT-genesis-scripts/xCAT-genesis-scripts.spec @@ -48,7 +48,14 @@ Source1: xCAT-genesis-scripts.tar.bz2 # so floor it at the 2.18.0 baseline: any 2.18.0-or-newer genesis-base snap satisfies it, # and core version bumps no longer force a genesis-base re-publish. (RPM ignores release # when the dependency omits it.) +# +# openSUSE is excluded. Operator decision, 2026-10-22: openSUSE ships no legacy Genesis, so +# no openSUSE target builds xCAT-genesis-base. No OpenEmbedded payload is published for the +# family either, so nothing an openSUSE management node reads can satisfy this name, and +# stating it stops zypper install xCAT. +%if ! 0%{?suse_version} Requires: xCAT-genesis-base-%{tarch} >= 2:2.18.0 +%endif Buildroot: %{_localstatedir}/tmp/xCAT-genesis Packager: IBM Corp.