Repository navigation
Template hardcoded version literals (perl @INC, cups.pc, pkgconf docdir were stale) - #1403
Conversation
Derive version-keyed strings from `version` (build.ncl) or MINIMAL_ARG_VERSION (build.sh) instead of spelling them out. Most render to exactly today's value; three were already stale and now render the correct current value: - perl: @inc dirs were /usr/lib/perl5/5.42/* on perl 5.44.0; now 5.44. - cups: fallback cups.pc said Version: 2.4.13 on 2.4.20. - pkgconf: --docdir was pkgconf-2.5.1 on 3.0.10. Unchanged renders: ruby /pub/ruby/4.0/, gnutls /v3.8/, tree and guile version tests, guile's 3.0 module dirs, bzip2's tarball/dir and libbz2.so.1.0.8 symlink, perl's tarball/dir, tcl's tclsh8.6 glob and test and /usr/lib/tcl8.6. tcl's output key "tclsh8.6" becomes tclsh_versioned (no consumer references it). bzip2, perl, cups and pkgconf gain build_args = { include version }. automake is left to pkgs#1399. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reached
This review includes 15 billable files and costs up to $3.75.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 53 minutes for your next included review. View limit details
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
cups and pkgconf would otherwise render an empty version silently (a cups.pc "Version: " / a docdir "pkgconf-"); guard every build.sh this PR templated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
agent-137
left a comment
There was a problem hiding this comment.
Review on Karl's behalf. This is a comment, not an approval. Nothing was built for it. The findings come from reading the declarations and fetching upstream sources, and each one says how it was checked. The CI rollup on this head is now SUCCESS.
CI: all green, including minimal build. Standalone tests passed on amd64 and arm64 for bzip2, cups, gnutls, guile, perl, pkgconf, ruby, tcl, tree, and for the perl and tcl consumers stow and expect. stow's smoke test runs stow -S, which loads Stow.pm, so the new 5.44/site_perl @inc works.
Should-fix: none.
Nit:
packages/pkgconf/build.sh:16: no pkgconf output captures the--docdir(outputs atbuild.ncl:31-39have nousr/share/docglob). Fixing the stale value therefore changes nothing that ships, only a build-time path. The PR body lists it next to the perl and cups fixes as "stale", but unlike those two it has no effect.
Checked:
- Every template uses the right variable:
api= major.minor throughstd.array.slice 0 2(end exclusive) in gnutls, ruby and tcl.${MINIMAL_ARG_VERSION%.*}gives 5.44, 3.0 and 8.6 in perl, guile and tcl.- The bzip2 tarball name matches its Source URL
bzip2-%{version}.tar.gz.
- Every newly templated build.sh gets
build_args = { include version }. - Rendered paths match what each build installs:
- Guile uses its effective-version dirs.
- Tcl installs
tclsh8.6and/usr/lib/tcl8.6from its ownTCL_VERSION. - The upstream Makefile names
libbz2.so.1.0.8after the version. - The cups fallback
.pcalways fires, because 2.4.x generatescups.pcat the top level, not incups/. That last point is from upstream layout knowledge and was not checked in a build.
- Stale-literal grep across all 9 package dirs on the PR head: the only version strings left are SPDX ids, prose comments and ruby's test gem
0.0.1. - Tree-wide
git grepfor5\.42|perl5/|core_perl|site_perl|vendor_perl|INSTALLDIRS|-MConfigfinds hits only in perl's own-Dlines. No package installs perl modules. tclsh8.6has no remaining references besides a comment, so renaming the output key breaks nothing.
# Conflicts: # packages/tcl/build.ncl
An audit turned up version-keyed strings in nine recipes that were written out by hand. This PR derives each one from
versionin build.ncl or fromMINIMAL_ARG_VERSIONin build.sh, so a future bump can't leave them behind. Most render to exactly the value they have today. Three had already gone stale and now render the correct current value.In build.ncl the major.minor series is
let api = std.string.join "." (std.array.slice 0 2 (std.string.split "." version)) in. These std functions are already used in-tree (llvm/versioned.ncl). In build.sh it is${MINIMAL_ARG_VERSION%.*}, which is POSIX and works under#!/bin/sh.Rendered values, before and after
…/pub/ruby/4.0/ruby-4.0.9.tar.gz…/pub/ruby/4.0/ruby-4.0.9.tar.gz(same)…/gnutls/v3.8/gnutls-3.8.13.tar.xz…/gnutls/v3.8/gnutls-3.8.13.tar.xz(same)grep -q 2.3.2grep -q 2.3.2(same)= 3.0.11= 3.0.11(same)usr/share/guile/3.0,usr/lib/guile/3.0/ccachetar -xof bzip2-1.0.8.tar.gz,cd bzip2-1.0.8,ln -sv libbz2.so.1.0.8usr/bin/tclsh8.6usr/bin/tclsh8.6(same)/usr/bin/tclsh8.6/usr/bin/tclsh8.6(same)/usr/lib/tcl8.6/usr/lib/tcl8.6(same)perl-5.44.0.tar.xz,cd perl-5.44.0-Dprivlib, archlib, sitelib, sitearch, vendorlib, vendorarch/usr/lib/perl5/5.42/{core,site,vendor}_perl(stale)/usr/lib/perl5/5.44/{core,site,vendor}_perlVersion: 2.4.13(stale)Version: 2.4.20--docdir/usr/share/doc/pkgconf-2.5.1(stale)/usr/share/doc/pkgconf-3.0.10How these were checked:
nickel eval/nickel export(Nickel 1.18.0), using the file's ownlet version/let apilines and the field text copied unchanged. A full export is blocked by theminimal.nclimport.nickel formatwas run on every edited .ncl file, andsh -npasses on perl/build.sh.Other changes:
build_args = { include version }. ruby, tree, guile and tcl already had it."tclsh8.6"is renamed totclsh_versioned. Output keys are identifiers, so the key stays literal and only the glob is templated. Nothing in the tree references that key: the only importer, expect, imports all of tcl, and nosubsetOf tclexists. tcl stays pinned to the 8.6 series; this just makes a future move to 9.x mechanical.perl: the @inc move from 5.42 to 5.44
This is the one change in behavior. perl 5.44.0 has been installing its core, site and vendor libraries under
/usr/lib/perl5/5.42/, and after this PR it installs them under/usr/lib/perl5/5.44/. Consumers checked:perl_data = usr/lib/perl*/**/*.{pl,pm,pod}andperl_libexec = usr/lib/perl*/**/*.soare not tied to a version, so both match the new directory.git grep '5\.42'across the repo: the only hits are the six perl-Dlines (and unrelated glibc-bedrock-2.42 names). No other package hardcodes the perl5 path.git grepforvendor_perl|site_perl|core_perl|usr/lib/perl|Makefile.PL|INSTALLDIRS|PERL5LIB|Build.PL: no hits outside perl itself.runtime_deps: autoconf, automake, groff, stow./usr/share/<pkg>libraries. They never install into perl's @inc.Stow.pm. Its configure asks perl'sConfigat build time where to put it, and its output is ausr/**catch-all. stow has perl as a build dep, so it rebuilds against the new perl and lands under 5.44/site_perl, which is in the new @inc. No edit was needed.Packages touched for the perl move: only perl. No consumer needed an edit.
Not changed
"aclocal-1.19", build.ncl:38) is left alone because pkgs#1399, the still-open 1.20 bump, hand-fixes it. Editing it here would conflict. gominimal/pkgmgr-rs#1268 (merged) teaches the updater to move a versioned output like this one along with the version, so future bumps handle this shape..so.600(series-pinned for odin), opencv4, the bun and mrustc guards, lpeg's lua 5.1, zig's libLLVM.so.22, rust stage0, the bedrock URLs, glibc-bedrock, openjdk-N, and the libusb-1.0 / glib-2.0 API names.Rebuild impact: large
These packages' spec hashes change because both build.sh and build.ncl change:
baseandbase-bootstrap(and directly by 27 recipes). This is effectively a world rebuild.Nothing was built locally. The build-bot builds it.
🤖 Generated with Claude Code
Summary by CodeRabbit