| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ran the gated tier as far as this host allows, with real devtools, real root and
real network, and it paid for itself immediately.
`mkarchroot` has no `-N` option. The pipeline was calling `mkarchroot -N <seed>`;
the shim ignored the unknown flag, so every test passed, and the real tool
answered with a usage error. The first real chroot build would have died on its
first step in a code path the shim harness structurally cannot exercise. The
seed's package list is now configuration (`mkarchroot_args`, default `base`) and
the call follows the real usage: `mkarchroot <working-dir> <packages...>`.
What else the attempt verified, with the real binaries rather than the shims: a
generated GPG key detached-signed the artifact the pipeline produced and
`gpg --verify` reported a good signature; real `repo-add -s -k` built and signed
a pacman database over it, and that signature verified too. So "both the packages
and the .db are signed" now rests on real crypto.
Where it stops: `mkarchroot <dir> base` downloaded and installed the base set into
the chroot (437 MB, 14 packages, install scripts ran) and then failed in
devtools' init stage with `Failed to parse --bind(-ro)= argument` from
systemd-nspawn 262 inside an unprivileged container. DECISIONS.md records exactly
what was run, what passed, what failed and why, and what therefore remains
modelled rather than crossed — a silent skip would have hidden all of the above,
including the flag bug.
Also fixes the I9 test's expectation: a refused build is an `Outcome::Failed` at
the `collect` step, not an `Err` from the runner, which is the correct shape (the
build failed closed and said why) and the test now asserts the step name.
171 tests pass, clippy clean.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
README and the invariant index
Three things.
**A real hole, closed.** `collect` scans the build's srcdir for
`*.pkg.tar.zst`, and `ingest` copies whatever those paths resolve to into the
content-addressed store — from where the bytes are served from our repo and
signed with our key. The paths are generated by our own scan, but their *targets*
are not: a PKGBUILD that drops a symlink called `evil.pkg.tar.zst` pointing at
the signing keyring, the database, or anyone's home directory would have its
target copied in, published and signed by us. The chroot is supposed to be the
layer that prevents that, and the chroot tier is gated — but two protection
layers must not be load-bearing on each other, and the control plane should not
depend on isolation for the safety of its own secrets.
`collect` now rejects symlinks and rejects anything whose canonicalized target
escapes the build's own staging directory, failing the build closed with the path
in the message. `i9_a_build_cannot_smuggle_bytes_in_from_outside_its_own_staging_dir`
acts the attack out — the shim plants a symlink to the database file — and
asserts the build fails, the store is byte-for-byte untouched, and nothing
publishes. This is the last §2 invariant that had no named test; docs/INVARIANTS.md
says plainly which part of I9 this covers and which part belongs to the gated
chroot tier.
**README.md**, written for the person who has to operate this at 3am: the rule
everything else follows, the quick start, the layout, how the shim harness makes
the whole pipeline testable without root or network, the ops commands, the route
table, and the §14 constraints stated as the hard edges they are.
**docs/INVARIANTS.md**, mapping I1-I12 to the named tests that hold them, with
corroborating tests listed, and an explicit note on the two invariants enforced
by the schema (the partial unique index for I7, the append-only triggers for
I10/I7) so a future code path cannot forget them.
Also recorded in DECISIONS.md: metrics served without a session and why,
retention recording a purge instead of deleting the row, and the real-chroot tier
being explicitly skipped with what stands in for it and how to actually run it.
.gitignore already covered .pi/ but the goal-tracker files were tracked from
before the rule existed; untracked now so they stop appearing in every diff.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(§10.1)
Ingest decides what the index claims about a package and what the world
snapshot records by reading two text files out of a tar inside a zstd stream.
That code was living in src/shims — the test harness — which meant production
depended on the harness for its view of a package's own metadata. Moved to
src/pkginfo.rs, with the shim now delegating to it so the harness and the
production path cannot disagree about what a package says about itself.
Still no libalpm: tar + zstd + eighty lines of key = value parsing. Unknown keys
are ignored rather than rejected, because makepkg adds fields over time and a new
one must not stop us publishing.
**The parser had a real bug.** A .BUILDINFO installed block puts its first entry
on the same line as the key:
installed = glibc 2.39-1 x86_64 -
gmp 6.3.0-1 x86_64 -
The old code skipped the header line, so the first dependency was silently
dropped from every snapshot — exactly the kind of gap that makes staleness
quietly wrong. The header line is parsed now.
tests/world.rs builds real .pkg.tar.zst files and asserts the fields come out of
the archive: repeated keys stay lists, an archive with no .PKGINFO is refused
rather than defaulted from the filename, and the world snapshot contains our own
packages and none of glibc/pacman/binutils. The empty-snapshot case for a first
build is asserted too — nothing of ours existed yet, and recording that honestly
beats inventing a world.
Split pkgbases produce one approval, one release and N index rows each with its
own artifact, asserted directly here. 143 tests pass, clippy clean.
|
|
|
materialize -> plan -> chroot -> sources -> pkgver -> build -> collect ->
verify -> ingest -> publish, each checkpointed in build_step so a worker
that dies resumes at the next incomplete step without repeating the
expensive one (I5).
Step 0 materializes from the local mirror only and re-hashes the tree:
there is no path from 'AUR moved since the review' to 'we built it
anyway' (I3). Step 4 re-resolves a VCS pkgver and refuses when it no
longer matches the approved identity. Publish renders the index to .tmp,
fsyncs, commits release + package rows and the accepted pointer under a
compare-and-swap, then renames over the served database and signs it, so
a crash leaves the old index byte-for-byte intact (I4) and every index
entry traces back to an approval (I1). Ingest records the world
snapshot as the BUILDINFO installed set intersected with our own
packages, which is what keeps staleness meaningful (I12).
17 shim-driven end-to-end tests, including kill-mid-publish and
crash-resume, with no root, network, or real chroot.
|