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

fix(xcat-core): the Genesis deb version never advances past snap000000000000

Every Genesis deb the Ubuntu dep pipeline publishes is versioned
2.19.0-snap000000000000. apt never upgrades an installed
xcat-genesis-base, so the channel cannot ship a Genesis fix.

Release is a tracked placeholder that buildrpms.pl overwrites with the
commit time. The dep job clones xcat-core only to build the Genesis
debs, so buildrpms.pl never runs there and builddebs.pl reads the
placeholder as an authoritative release.

builddebs.pl now treats an all-zero Release as an unstamped tree and
falls back to the commit time. snap_release() renders a real time, so
no build ever writes that value.

builddebs_release_placeholder.t covers it. The test fails on the
unfixed tree with snap000000000000.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
This commit is contained in:
Daniel Hilst
2026-09-12 14:06:24 -03:00
parent 5d090ec2a2
commit 54ac0915d0
+4 -1
View File
@@ -93,9 +93,12 @@ my $VERSION = read_line("$ROOT/Version") // die "Cannot read $ROOT/Version\n";
my $EPOCH = source_date_epoch();
# A Release file, when present, is authoritative: buildrpms.pl writes one, and a
# pipeline that builds both must stamp the rpms and the debs with the same release.
# The tracked file holds snap000000000000, which no build writes -- snap_release()
# renders a real time. A tree where buildrpms.pl has not run still carries it, so
# treat the placeholder as an unstamped tree and derive the release from the commit.
my $FILE_RELEASE = do {
my $r = read_line("$ROOT/Release");
($r && $r =~ /\S/) ? $r : undef;
($r && $r =~ /\S/ && $r !~ /\Asnap0+\z/) ? $r : undef;
};
my $RELEASE = $opts{release} || $FILE_RELEASE || snap_release($EPOCH);
my $PKGVER = deb_version($VERSION, $RELEASE);