Commit graph

7 commits

Author SHA1 Message Date
49db816186 gwmirror publish: refuse to delete a series from the share
publish mirrors the staged tree with rsync --delete-after, and the share
holds the only copy of series that are no longer built (26.1). A staging
tree rebuilt after /scratch was lost, holding only the current series,
would have deleted 26.1 from the live mirror. publish now stops, before
verifying, when the destination has a directory in its top two levels
(an ABI, a series, releases/<series>) that the staged tree lacks; names
are printed quoted. Retiring a series means deleting it from the share
by hand.

RELEASE.md documents the guard and how to restore the staged tree from
the share.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 01:32:15 -05:00
3277066c5a Release tooling: commit lock per release, escaping symlinks, doc fixes
- K2: config/lock-<version> gives tools, src, ports, plugins and core
  their exact commits; build stops when a checkout differs (a tag moved
  upstream, or src moved on), and fetches tags without --force.
  build.sh lock resolves and writes them. lock-26.7.9 is what 26.7.9 was
  built from, checked against the upstream tags.
- K3: verify --root reports symlinks that lead outside the tree or
  nowhere, which publish (rsync -L) would follow; such a path is now
  reported instead of crashing verify.
- K6: RELEASE.md no longer says core trusts only our key (it also trusts
  upstream's, for changelog and bogons), and names no host or user.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 21:30:15 -05:00
2e67937271 gwmirror-verify: check the published 26.7 tree daily as well
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 18:35:49 -05:00
f34695776d gwmirror: verify pkg 2.8 catalogues and the major upgrade's set
- pkg 2.8 (26.7) writes a package's catalogue checksum as "2$" and its
  BLAKE2b-512 in pkg's base32; accept it next to pkg 2.3's SHA-256 hex
  and check each against its own digest, read once for both. Latest/
  signatures stay over the SHA-256: a BLAKE2b catalogue checks them when
  deep, and only their key when shallow, as for the sets.
- TarSource members share the set's file object, which every read
  seeks, and verify_repo reads them from eight threads: the 26.7.9
  upgrade set failed at random packages. Reads now take turns.
- Report the upgrade set's results under its path, not ".".
- Clean up the trust objects' temporary directories.

Tests: the root and URL verify tests run again with BLAKE2b catalogues,
a pkg 2.8.4 checksum pins the encoding, and the upgrade set gets its
own tests (parallel reads of large packages, a tampered package in a
signed set, a bad .abi_hint).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 16:33:59 -05:00
0342256eb9 verify: no Latest/ in the aux repo; Go's source tree is cross-platform
Tools makes Latest/ for the main repository only, and upstream's aux
repository has none either, so verify no longer requires it there. The Go
toolchain in aux ships ELF test data and race-detector objects for every
platform under /usr/local/go<N>/src/; that tree is exempt from the aarch64
check, nothing else of the Go packages is.

The first real 26.1.11 mirror now verifies clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 18:30:09 -05:00
5665956249 mirror: store the tree under names an SMB share can hold
The mirror share refuses ":" in names, ignores case, and lists device
names such as "aux" under a mangled 8.3 name, which rsync would delete as
an unknown file (the real directory). So FreeBSD:<N>:aarch64 is stored
as FreeBSD_<N>_aarch64 and a series' aux repository as aux-repo, in the
staged tree and on the share alike; nginx rewrites the client URLs onto
them, and gwmirror reads and writes through the same mapping.

verify --root, and therefore publish, now fails on any other name the
share cannot store (reserved characters, device names, trailing dot or
space, names differing only in case).

Checked with the real nginx image in podman: a deep verify --url of a
staged fixture passes, aux included, with the live changelog/bogons proxy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 14:49:20 -05:00
ab6b52207f mirror: gwmirror stage/verify/publish, nginx stack, release docs
- gwmirror.py: lay a build into the mirror tree, verify it (signatures,
  catalogues, sizes, hashes, aarch64-only ELF, and over HTTPS also TLS
  expiry, Content-Length, redirects) and publish it with rsync only when
  it verifies; tests cover tampering, untrusted and revoked keys,
  traversal and decompression limits
- server/: unprivileged nginx for a Portainer stack serving the SMB share
  read-only, GET/HEAD only, proxying changelog/bogons from upstream
- monitor/: daily systemd user timer running verify --url
- RELEASE.md: design and runbook; README.md points to it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 18:56:54 -05:00