Files
w3cjandClaude Opus 5.5 9cde4abf2e fix(build): refuse a recorded base package older than a newer pocket lists
The host checked that each package a first build of base recorded is
the archive's, but root in the recording build VM chose which signed
lists to hand back: it could return only the release pocket's and
record an older version than -updates or -security have. Now:

- a recording must hand back resolute-updates' and resolute-security's
  signed InRelease files with lists for the architectures whose lists
  have the recorded packages (another archive's InRelease, such as
  archive.ubuntu.com's on arm64, doesn't count), and every non-empty
  list each InRelease it hands back gives for those architectures, in
  every component (packages_lists_missing);
- a recorded package that the release pocket, -updates or -security
  lists a newer version of, for its architecture, is refused, naming
  the package, both versions and the suite (packages_not_newest);
  -backports doesn't count, as apt installs from it only when asked;
- a list's SHA-256 is checked against the verified InRelease files
  before it's read, so only signed lists are parsed;
- apt.sh's recording takes phased updates
  (APT::Get::Always-Include-Phased-Updates), so apt installs the newest
  version the lists have.

- internal/ubuntu: CompareVersions, dpkg --compare-versions in Go
  (epoch, upstream, revision, ~ and letters' order; ErrVersion for one
  that isn't a version); Release.Lists gives the matching lists with
  their paths, ListsFor, List.Arch, Backports, RequiredSuites.
- internal/build: signedEntries returns a signed (entries, each
  package's architectures, the newest version by architecture and name
  and its suite); verified, complete, checkNewest, newer; readArchiveList
  returns an archiveList.
- Messages: packages_lists_missing, packages_not_newest.
- Tests: CompareVersions' table (Debian policy's ordering and dpkg's
  cases, invalid versions); ListsFor and Backports on Ubuntu's real
  InRelease; a recording refused for an older version than -updates
  has, for a missing -updates or -security InRelease, a missing list,
  another archive's -security, a missing backports list; kept for the
  newer version, a newer one in backports, an older one in -security;
  checkNewest's table. The gpg-made fixtures are signed again by a new
  test key, with Packages-newer, Packages-security and InRelease-newer,
  -security, -security-amd64 and -backports added.
- Docs: images.md's Base's packages, design.md's trust note (the
  pocket choice closed; what root in the recording VM still chooses).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-04 16:50:31 -07:00
..