From 9a95f795c63dad8066181d05d895d90f63912e6f Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Fri, 23 Oct 2026 01:18:47 -0300 Subject: [PATCH 1/6] test(xcat-dep): the goconserver go directive is above the oldest target Go goconserver/gomod/go.mod declares go 1.25.12, and goconserver/mockbuild.pl compiles in the chroot with BuildRequires: golang and GOTOOLCHAIN=local, so Go never fetches a newer toolchain. A Leap 15.6 chroot reports: go: go.mod requires go >= 1.25.12 (running go 1.25.8; GOTOOLCHAIN=local) The test reads the directive and compares it with the oldest Go any target provides, and asserts the two conditions that make the directive binding: GOTOOLCHAIN=local, and golang taken from the target repositories. It also checks its own comparator against three known pairs, so a passing result cannot come from a comparison that answers the same way every time. It fails one of eight on this commit. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> --- t/goconserver_gomod_floor.t | 56 +++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 t/goconserver_gomod_floor.t diff --git a/t/goconserver_gomod_floor.t b/t/goconserver_gomod_floor.t new file mode 100644 index 0000000..66c2250 --- /dev/null +++ b/t/goconserver_gomod_floor.t @@ -0,0 +1,56 @@ +#!/usr/bin/env perl +# The go directive of the pinned goconserver module graph must not exceed the oldest Go any +# xcat-dep target provides. +# +# goconserver/mockbuild.pl compiles inside the chroot with BuildRequires: golang and +# GOTOOLCHAIN=local, so Go never downloads a newer toolchain: a directive above the chroot's Go +# stops the build before the compiler starts. Measured in a Leap 15.6 chroot on 2026-10-23: +# +# go: go.mod requires go >= 1.25.12 (running go 1.25.8; GOTOOLCHAIN=local) +# +# 1.25.12 was the patch level of the toolchain that regenerated go.mod, not a requirement of the +# code. go.mod and mockbuild.pl are the artifacts, so this reads them and runs no Go. +use strict; +use warnings; + +use FindBin qw($RealBin); +use File::Slurper qw(read_text); +use Test::More; + +my $repo = "$RealBin/.."; + +# The oldest Go a target resolves BuildRequires: golang to. Leap 15.6 is the floor today; EL 10 +# and openEuler are newer. Raise this only with the chroot that reports the new value. +my $FLOOR = '1.25.8'; + +sub as_tuple { return [ map { $_ + 0 } (split /\./, $_[0], 3), 0, 0 ]; } +sub cmp_ver { + my ($a, $b) = map { as_tuple($_) } @_; + return $a->[0] <=> $b->[0] || $a->[1] <=> $b->[1] || $a->[2] <=> $b->[2]; +} + +is(cmp_ver('1.25.8', '1.25.12'), -1, 'the comparison reads 1.25.8 as older than 1.25.12'); +is(cmp_ver('1.25.0', '1.25.8'), -1, '... and 1.25.0 as older than 1.25.8'); +is(cmp_ver('1.25.12', '1.25.12'), 0, '... and equal versions as equal'); + +my $gomod = read_text("$repo/goconserver/gomod/go.mod"); +my ($directive) = $gomod =~ /^go\s+(\d+\.\d+(?:\.\d+)?)\s*$/m; +ok(defined $directive, 'goconserver/gomod/go.mod declares a go directive') or done_testing(), exit; + +cmp_ok(cmp_ver($directive, $FLOOR), '<=', 0, + "the go directive $directive is within the oldest target Go $FLOOR"); + +# The directive still has to be high enough for the pinned graph, so this is a window and not a +# race to the bottom. +cmp_ok(cmp_ver($directive, '1.25.0'), '>=', 0, + "the go directive $directive is at or above the 1.25.0 the pinned graph needs"); + +# The floor binds only because the build refuses to fetch a newer toolchain. If this changes, the +# directive stops mattering and this test is measuring nothing. +my $mockbuild = read_text("$repo/goconserver/mockbuild.pl"); +like($mockbuild, qr/GOTOOLCHAIN=local/, + 'the chroot build pins the chroot Go, which is what makes the directive binding'); +like($mockbuild, qr/\$go_requires\s*=\s*'golang'/, + '... and takes its Go from the target repositories'); + +done_testing(); From 0cbf0e0d64247fa7c105cdc76d57ac0329706a91 Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Fri, 23 Oct 2026 01:18:53 -0300 Subject: [PATCH 2/6] fix(xcat-dep): goconserver cannot build in a Leap chroot goconserver/gomod/go.mod declared go 1.25.12 while Leap 15.6 resolves BuildRequires: golang to 1.25.8, and the build runs GOTOOLCHAIN=local, so Go refuses rather than fetching a toolchain: go: go.mod requires go >= 1.25.12 (running go 1.25.8; GOTOOLCHAIN=local) 1.25.12 was the patch level of the toolchain that regenerated the file, not a requirement of the code. The highest directive in the pinned graph is 1.25.0, which every target meets, so the directive is lowered to that. The fix existed on the uftp-suse lineage and was never proposed here. t/goconserver_gomod_floor.t fails on the parent commit. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> --- goconserver/gomod/go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/goconserver/gomod/go.mod b/goconserver/gomod/go.mod index da985d9..6d36b7d 100644 --- a/goconserver/gomod/go.mod +++ b/goconserver/gomod/go.mod @@ -1,6 +1,6 @@ module github.com/xcat2/goconserver -go 1.25.12 +go 1.25.0 replace github.com/kr/pty => github.com/creack/pty v1.1.21 From 1e711055ca7be29e00ac60ea2f3dbf0ce71afc01 Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Fri, 23 Oct 2026 01:19:29 -0300 Subject: [PATCH 3/6] test(xcat-dep): the perl packages cannot resolve their BuildRequires on Leap The Fedora perl source rpms BuildRequire perl-generators and perl-interpreter. openSUSE has neither: there perl provides the interpreter and rpm generates the perl dependencies itself. dnf builddep stops before the build, and all four perl packages fail that way in a Leap chroot. The test asks MockBuildUtils for the decision, the compat spec and the mock configuration text, and asserts that a SUSE target gets the compat repository, an EL target does not, and a SUSE target given no repository is refused rather than built without it. It fails 3 of 6 on this commit: MockBuildUtils has none of the three. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> --- t/perl_buildreq_compat.t | 71 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 t/perl_buildreq_compat.t diff --git a/t/perl_buildreq_compat.t b/t/perl_buildreq_compat.t new file mode 100644 index 0000000..6aff6ae --- /dev/null +++ b/t/perl_buildreq_compat.t @@ -0,0 +1,71 @@ +#!/usr/bin/env perl +# The Fedora perl source rpms BuildRequire perl-generators and perl-interpreter. openSUSE has +# neither: there `perl` provides the interpreter and rpm generates the perl dependencies itself, +# so `dnf builddep` stops before the build. Every one of the four perl packages fails that way in +# a Leap chroot. +# +# The answer is a build-only compat rpm that provides those names, in a local repository injected +# into the mock configuration for SUSE targets alone. The configuration text and the decision +# behind it are pure, so this writes no rpm and runs no mock. +use strict; +use warnings; + +use FindBin qw($RealBin); +use Test::More; + +use lib $RealBin, "$RealBin/..", "$RealBin/../lib"; +use MockBuildUtils (); + +my $needed = MockBuildUtils->can('perl_buildreq_compat_needed'); +my $spec = MockBuildUtils->can('perl_buildreq_compat_spec'); +my $text = MockBuildUtils->can('perl_mock_cfg_text'); +ok($needed, 'MockBuildUtils decides which targets need the perl BuildRequires compat'); +ok($spec, 'MockBuildUtils carries the compat spec'); +ok($text, 'MockBuildUtils writes the perl mock configuration'); + +subtest 'only a SUSE target needs the compat' => sub { + plan skip_all => 'MockBuildUtils has no perl_buildreq_compat_needed' unless $needed; + ok($needed->($_), "$_ needs the compat") for qw( + opensuse-leap-15.6-x86_64 opensuse-leap-42.3-x86_64 opensuse-leap-15.6-ppc64le + ); + ok(!$needed->($_), "$_ does not need the compat") for qw( + alma+epel-8-x86_64 alma+epel-10-x86_64 openeuler-24.03sp4-x86_64 + openeuler-24.03-ppc64le rocky-10-riscv64-xcat + ); +}; + +subtest 'the compat package provides the names and nothing else' => sub { + plan skip_all => 'MockBuildUtils has no perl_buildreq_compat_spec' unless $spec; + my $s = $spec->(); + like($s, qr/^BuildArch:\s+noarch$/m, 'the compat rpm is noarch'); + like($s, qr/^Provides:\s+perl-generators$/m, '... provides perl-generators'); + like($s, qr/^Provides:\s+perl-interpreter$/m, '... provides perl-interpreter'); + like($s, qr/^Provides:\s+perl-devel$/m, '... provides perl-devel'); + like($s, qr/^Requires:\s+perl$/m, '... and pulls the real perl'); + like($s, qr/^%files\n%changelog\n/m, + '... and lists no file between %files and %changelog, so it installs nothing'); +}; + +subtest 'the configuration carries the repository only for a SUSE target' => sub { + plan skip_all => 'MockBuildUtils has no perl_mock_cfg_text' unless $text; + my $suse = $text->('opensuse-leap-15.6-x86_64', '1700000000', '/work/compat/repo'); + like($suse, qr{^include\('/etc/mock/opensuse-leap-15\.6-x86_64\.cfg'\)$}m, + 'the SUSE configuration includes its base'); + like($suse, qr/SOURCE_DATE_EPOCH'\] = '1700000000'/, + '... and keeps the deterministic epoch'); + like($suse, qr{\[xcat-buildreq-compat\]}, '... and adds the compat repository'); + like($suse, qr{baseurl=file:///work/compat/repo}, '... at the directory it was given'); + like($suse, qr/gpgcheck=0/, '... unsigned, because it is built locally for this build'); + + my $el = $text->('alma+epel-10-x86_64', '1700000000', undef); + like($el, qr{^include\('/etc/mock/alma\+epel-10-x86_64\.cfg'\)$}m, + 'the EL configuration includes its base'); + unlike($el, qr/xcat-buildreq-compat/, '... and adds no compat repository'); + + # A SUSE target with no repository is a programming error, not a build without the compat. + my $missed = eval { $text->('opensuse-leap-15.6-x86_64', '1700000000', undef); 1 }; + ok(!$missed, 'a SUSE target with no compat repository is refused'); + like($@, qr/compat repository/, '... and says what was missing'); +}; + +done_testing(); From baf4226096814eb6bfa715cebb2767d99e7b516f Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Fri, 23 Oct 2026 01:20:26 -0300 Subject: [PATCH 4/6] fix(xcat-dep): the perl packages cannot resolve their BuildRequires on Leap The four perl packages are rebuilt from Fedora source rpms, which BuildRequire perl-generators and perl-interpreter. openSUSE has neither: there perl provides the interpreter and rpm generates the perl dependencies itself. dnf builddep stops before the build, so every one of them fails in a Leap chroot and the repository ships without perl-IO-Stty, perl-HTTP-Async, perl-Net-HTTPS-NB and perl-Net-Telnet, all of which xCAT requires. A build-only rpm provides those three names and pulls the real perl, in a local repository the mock configuration of a SUSE target reads. It is never shipped. The decision, the spec and the configuration text move into MockBuildUtils so a test can exercise them in process; mockbuild-perl-packages.pl keeps the rpmbuild and createrepo_c calls and builds the repository under the caller's own per-package directory, so parallel perl builds cannot race on it. perl_mock_cfg_text refuses a SUSE target with no compat repository rather than writing a configuration without it, because building without the compat is the failure this prevents. The fix existed on the uftp-suse lineage and was never proposed here. t/perl_buildreq_compat.t fails 3 of 6 on the parent commit. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> --- MockBuildUtils.pm | 50 ++++++++++++++++++++++++++++++++++++++ mockbuild-perl-packages.pl | 32 +++++++++++++++++++++--- 2 files changed, 79 insertions(+), 3 deletions(-) diff --git a/MockBuildUtils.pm b/MockBuildUtils.pm index 603aaa1..bb8140e 100644 --- a/MockBuildUtils.pm +++ b/MockBuildUtils.pm @@ -26,6 +26,7 @@ our @EXPORT_OK = qw( createrepo_c_cmd sign_and_index_repo build_mock_uniqueext rpm_in_cell resolve_mock_cfg mock_chroot_uid mock_result_dirs make_traversable_path epel_target_profile epel_cell_path cell_lock_path + perl_buildreq_compat_needed perl_buildreq_compat_spec perl_mock_cfg_text native_owner_command NATIVE_BUILD_GID openeuler_build_target openeuler_repo_subdir recover_common_repository @@ -955,6 +956,55 @@ sub resolve_mock_cfg { . "(tried $cfg_dir/${os_id}+epel-${rel}-${arch}.cfg and $cfg_dir/${short}+epel-${rel}-${arch}.cfg)\n"; } +# The Fedora perl source rpms BuildRequire perl-generators and perl-interpreter. openSUSE has +# neither: there perl provides the interpreter and rpm generates the perl dependencies itself, so +# dnf builddep stops before the build. A build-only rpm provides those names and pulls the real +# perl. It is never shipped: only the mock configuration of a SUSE target sees its repository. +sub perl_buildreq_compat_needed { + my ($base_cfg) = @_; + return 0 unless defined $base_cfg; + return $base_cfg =~ /opensuse|sles|suse/i ? 1 : 0; +} + +sub perl_buildreq_compat_spec { + return <<'SPEC'; +Name: xcat-perl-buildreq-compat +Version: 1 +Release: 1 +Summary: Build-only compat: provide Fedora perl BuildRequires names on SUSE +License: MIT +BuildArch: noarch +Provides: perl-generators +Provides: perl-interpreter +Provides: perl-devel +Requires: perl +%description +Satisfies the perl-generators, perl-interpreter and perl-devel BuildRequires of +Fedora perl source rpms in an openSUSE chroot. SUSE ships the perl development +headers inside perl itself. Never shipped. +%files +%changelog +SPEC +} + +# The deterministic mock configuration one perl build uses. $compat_repo is the directory +# perl_buildreq_compat_needed asked the caller to build; a SUSE target without one is refused, +# because building without the compat is the failure this exists to prevent. +sub perl_mock_cfg_text { + my ($base_cfg, $epoch, $compat_repo) = @_; + my $text = "include('/etc/mock/${base_cfg}.cfg')\n" + . "config_opts['environment']['SOURCE_DATE_EPOCH'] = '$epoch'\n"; + return $text unless perl_buildreq_compat_needed($base_cfg); + die "perl_mock_cfg_text: $base_cfg needs the perl BuildRequires" + . " compat repository and none was given\n" + unless defined $compat_repo && length $compat_repo; + # priority=1 so the compat rpm wins over anything of the same name in the target repositories. + $text .= "config_opts['dnf.conf'] += \"\"\"\n[xcat-buildreq-compat]\n" + . "name=xcat perl BuildRequires compat\n" + . "baseurl=file://$compat_repo\nenabled=1\ngpgcheck=0\npriority=1\n\"\"\"\n"; + return $text; +} + # mock's own loader reads the configuration, so include() and the assignments around it resolve as # they do in a build. With no chrootuid, the loader returns the caller, as mock does: as root, the # user that SUDO_UID, USERHELPER_UID or PKEXEC_UID names. diff --git a/mockbuild-perl-packages.pl b/mockbuild-perl-packages.pl index 8d16aee..8db345a 100755 --- a/mockbuild-perl-packages.pl +++ b/mockbuild-perl-packages.pl @@ -10,7 +10,8 @@ use FindBin qw($RealBin); use Getopt::Long qw(GetOptions); use Parallel::ForkManager; use lib $RealBin, "$RealBin/lib"; -use MockBuildUtils qw(mock_result_dirs make_traversable_path); +use MockBuildUtils qw(mock_result_dirs make_traversable_path + perl_buildreq_compat_needed perl_buildreq_compat_spec perl_mock_cfg_text); my $repo_root = abs_path(dirname(__FILE__)); my $work_dir = '/tmp/perl-list6-mockbuild'; @@ -965,13 +966,38 @@ sub resolve_mock_cfg { sub create_deterministic_mock_cfg { my ($base_cfg, $epoch, $dir) = @_; my $cfg_path = "$dir/mock-deterministic.cfg"; + my $compat = perl_buildreq_compat_needed($base_cfg) + ? suse_buildreq_compat_repo($dir) : undef; open my $fh, '>', $cfg_path or die "Cannot write $cfg_path: $!\n"; - print $fh "include('/etc/mock/${base_cfg}.cfg')\n"; - print $fh "config_opts['environment']['SOURCE_DATE_EPOCH'] = '$epoch'\n"; + print $fh perl_mock_cfg_text($base_cfg, $epoch, $compat); close $fh; return $cfg_path; } +# Build the compat rpm named by perl_buildreq_compat_spec and leave it in a local createrepo'd +# directory; return that directory. It is built UNDER the caller's per-package build directory, +# never a shared path: each build_package fork runs this once for its own package, and +# mockbuild-all gives every (run, target, arch) its own work directory, so parallel perl builds +# cannot race on it. Idempotent within a directory. +sub suse_buildreq_compat_repo { + my ($base_dir) = @_; + my $base = "$base_dir/suse-buildreq-compat"; + return "$base/repo" if -f "$base/repo/repodata/repomd.xml"; + my $rpmroot = "$base/rpmbuild"; + make_path("$rpmroot/SPECS", "$base/repo"); + my $spec = "$rpmroot/SPECS/xcat-perl-buildreq-compat.spec"; + open my $s, '>', $spec or die "Cannot write $spec: $!\n"; + print {$s} perl_buildreq_compat_spec(); + close $s; + system("rpmbuild --define " . sh_quote("_topdir $rpmroot") . " -bb " . sh_quote($spec) + . " >/dev/null 2>&1") == 0 + or die "FATAL: could not build the perl BuildRequires compat rpm\n"; + system("cp " . sh_quote("$rpmroot/RPMS/noarch/") . "xcat-perl-buildreq-compat-*.noarch.rpm " + . sh_quote("$base/repo/") . " && createrepo_c " . sh_quote("$base/repo") . " >/dev/null 2>&1") == 0 + or die "FATAL: could not index the perl BuildRequires compat repository\n"; + return "$base/repo"; +} + sub resolve_source_urls { my ($spec_path) = @_; open my $fh, '<', $spec_path or return (); From 88bb19d75112bd058fb826f7fef1642a8b88ef32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Tue, 20 Oct 2026 17:47:07 -0300 Subject: [PATCH 5/6] fix(grub2-xcat): build the openSUSE package without the aarch64 image The merge of master brought the aarch64 grub2 image, which grub2-xcat builds with the EL packages grub2-tools and grub2-efi-aa64-modules. openSUSE packages grub2 under other names, so the Leap build of grub2-xcat stopped at its build dependencies. Build the openSUSE package without the image, as openEuler does and as this branch did before the merge. (cherry picked from commit 3f7213e2ef67794e702654275da0839d67f79638) --- grub2-xcat/grub2-xcat.spec | 9 +++++---- grub2-xcat/mockbuild.pl | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/grub2-xcat/grub2-xcat.spec b/grub2-xcat/grub2-xcat.spec index 866957a..c6f86a3 100644 --- a/grub2-xcat/grub2-xcat.spec +++ b/grub2-xcat/grub2-xcat.spec @@ -26,7 +26,8 @@ Source2: grubriscv64.efi # and the /boot/grub2 prefix grub2.ppc uses. grub2-efi-aa64-modules is noarch, so the # image builds on every EL build host. The openEuler x86_64 repositories carry no # grub2-efi-aa64-modules and openEuler has no aarch64 target, so it ships without the image. -%if ! 0%{?openEuler} +# openSUSE packages grub2 under other names, so its package ships without the image too. +%if ! 0%{?openEuler} && ! 0%{?suse_version} BuildRequires: grub2-tools BuildRequires: grub2-efi-aa64-modules %endif @@ -57,7 +58,7 @@ aarch64 nodes, which boot through UEFI and grub2 only. #%endif %build -%if ! 0%{?openEuler} +%if ! 0%{?openEuler} && ! 0%{?suse_version} # The aarch64 network loader: net search finds the boot/grub2/grub.cfg- that # nodeset links. efi_uga is left out: it is x86 only, and grub2-mkimage aborts on it # for arm64-efi. @@ -83,7 +84,7 @@ tar -xf grub2-res.tar %endif mkdir -p $RPM_BUILD_ROOT/%{prefix}/riscv64-efi install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT/%{prefix}/riscv64-efi/grubriscv64.efi -%if ! 0%{?openEuler} +%if ! 0%{?openEuler} && ! 0%{?suse_version} mkdir -p $RPM_BUILD_ROOT/%{prefix}/aarch64-efi install -m 0644 %{_builddir}/grubaa64.efi $RPM_BUILD_ROOT/%{prefix}/aarch64-efi/grubaa64.efi %endif @@ -111,7 +112,7 @@ exit 0 # one for sles, one for rhel. yes, it's ugly... %{prefix}/powerpc-ieee1275/ %{prefix}/riscv64-efi/ -%if ! 0%{?openEuler} +%if ! 0%{?openEuler} && ! 0%{?suse_version} %{prefix}/aarch64-efi/ %endif %defattr(-,root,root) diff --git a/grub2-xcat/mockbuild.pl b/grub2-xcat/mockbuild.pl index 670cde8..2b708fb 100755 --- a/grub2-xcat/mockbuild.pl +++ b/grub2-xcat/mockbuild.pl @@ -208,8 +208,9 @@ run( "rpm -qpl " . sh_quote($main_rpm) . " | grep -Fx /tftpboot/boot/grub2/riscv64-efi/grubriscv64.efi >/dev/null" ); -# The aarch64 image is generated in %build (grub2-mkimage -O arm64-efi); openEuler ships without it. -if ($mock_cfg !~ /^openeuler-/) { +# The aarch64 image is generated in %build (grub2-mkimage -O arm64-efi); openEuler and openSUSE +# ship without it. +if ($mock_cfg !~ /^(?:openeuler|opensuse)-/) { run( "rpm -qpl " . sh_quote($main_rpm) . " | grep -Fx /tftpboot/boot/grub2/aarch64-efi/grubaa64.efi >/dev/null" From 5082089b73f192432a8f0adc7f55408ec36ac3a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Tue, 20 Oct 2026 17:47:07 -0300 Subject: [PATCH 6/6] test(grub2-xcat): the openSUSE package is built without the aarch64 image (cherry picked from commit 61efa3b5e3e111ec32cb852438e548acca7c03fd) --- t/aarch64_target.t | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/t/aarch64_target.t b/t/aarch64_target.t index f88c92c..cd1f341 100644 --- a/t/aarch64_target.t +++ b/t/aarch64_target.t @@ -112,7 +112,7 @@ my $grub_spec = slurp($grub_spec_file); '%postun removes grub2.aarch64'); SKIP: { - skip 'rpmspec not available', 4 unless $have_rpmspec; + skip 'rpmspec not available', 6 unless $have_rpmspec; my $el = parsed_spec($grub_spec_file, rhel => 10); ok(defined $el, 'rpmspec parses grub2-xcat.spec for EL10') or $el = ''; like($el, qr/^BuildRequires:\s*grub2-efi-aa64-modules\s*$/m, '... and EL keeps the aarch64 image'); @@ -124,6 +124,13 @@ my $grub_spec = slurp($grub_spec_file); 'openEuler builds without the aarch64 image'); like($oe // '', qr{if \[ -f /tftpboot/boot/grub2/aarch64-efi/grubaa64\.efi \]}, '... and its %post copies grub2.aarch64 only when the image exists'); + + # openSUSE packages grub2 under other names: its package is built without the image too. + my $suse = parsed_spec($grub_spec_file, suse_version => 1500); + ok(defined $suse && $suse !~ /grub2-tools|grub2-efi-aa64-modules|grub2-mkimage|aarch64-efi\/$/m, + 'openSUSE builds without the aarch64 image'); + like($suse // '', qr{if \[ -f /tftpboot/boot/grub2/aarch64-efi/grubaa64\.efi \]}, + '... and its %post copies grub2.aarch64 only when the image exists'); } # Run the spec's own command where the arm64-efi modules are installed: a module the grub