From 67ab6f1fad46a3f0b88b89a4bdadf86d72d54c6e Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Wed, 2 Sep 2026 17:06:36 -0300 Subject: [PATCH] test(xcat-dep): capture a manifest pin drifting from its changelog The Ubuntu build fails at the end, after compiling every package: FATAL: manifest validation failed: [noble-amd64] grub2-xcat: built 2.12-2, manifest pins 2.12-1 debs-manifest.conf pins the exact deb version each package must produce, and that version comes from the package's own debian/changelog. Bumping the changelog without the pin costs a whole build to discover a one-line edit. The test compares every non-glob pin with the first line of that package's debian/changelog. Globbed pins are deliberate -- goconserver's revision is the CD stamp and xcat-genesis-base is not versioned by xcat-dep -- and are skipped. It fails on grub2-xcat today. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> --- t/sbuild-all.t | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/t/sbuild-all.t b/t/sbuild-all.t index 5f24826..c78c64d 100644 --- a/t/sbuild-all.t +++ b/t/sbuild-all.t @@ -646,4 +646,41 @@ STUB } } +# ---- every non-glob manifest pin must match the package's own debian/changelog -------------- +# debs-manifest.conf pins the exact deb version each package must produce, and the version comes +# from that package's debian/changelog. Bumping the changelog without the pin does not fail the +# build -- it fails the manifest VALIDATION, at the end, after every package has been compiled: +# FATAL: manifest validation failed: +# [noble-amd64] grub2-xcat: built 2.12-2, manifest pins 2.12-1 +# which is a whole build's worth of time to learn about a one-line edit. grub2-xcat drifted exactly +# that way when the riscv64 UEFI image was added. Globbed pins are deliberate (goconserver's +# revision is the CD stamp; xcat-genesis-base is not versioned by xcat-dep) and are skipped. +{ + my $root = "$FindBin::Bin/.."; + my %dir_of = ( + 'ipmitool-xcat' => 'ipmitool', + 'conserver-xcat' => 'conserver', + 'syslinux-xcat' => 'syslinux', + 'grub2-xcat' => 'grub2-xcat', + 'elilo-xcat' => 'elilo', + 'xnba-undi' => 'xnba', + ); + my %manifest = read_manifest("$root/debs-manifest.conf"); + my %seen; + for my $section (sort keys %manifest) { + for my $pkg (sort keys %{ $manifest{$section} }) { + my $pin = $manifest{$section}{$pkg}; + next if !defined $pin || $pin =~ /[*?]/; + my $dir = $dir_of{$pkg} or next; + my $cl = "$root/$dir/debian/changelog"; + next unless -f $cl; + open my $fh, '<', $cl or next; + my $first = <$fh>; close $fh; + my ($ver) = $first =~ /^\S+\s+\(([^)]+)\)/; + next if $seen{"$pkg=$pin=$ver"}++; + is($pin, $ver, "manifest pin $pkg=$pin matches $dir/debian/changelog"); + } + } +} + done_testing;