diff options
| author | aur-build <aur-build@localhost> | 2026-11-19 14:15:16 +0000 |
|---|---|---|
| committer | aur-build <aur-build@localhost> | 2026-11-19 14:15:16 +0000 |
| commit | 153e72cc797c1e45a60f4896d00163fb4bdf3056 (patch) | |
| tree | 7e2308552e5f5a33f4ddad07eba7a816e28e8568 /README.md | |
| parent | 43a2bfaaac60bc378135ad90c46c9d42777aeb1e (diff) | |
| download | aur-build-153e72cc797c1e45a60f4896d00163fb4bdf3056.tar.gz aur-build-153e72cc797c1e45a60f4896d00163fb4bdf3056.zip | |
publish: repo-add decides the database filename
Publishing renders the index before the DB commits and renames it into place
after, so a crash between the two leaves the old index serving (I4). The way
that was written did it at `<db>.tar.gz.tmp` beside the live file — a filename
real repo-add refuses, because its database argument has to be a name pacman
would accept. Every publish test passed; the first real package anyone tried to
publish died at the last step with the release already committed.
`render_db` now renders into a scratch directory under the served directory,
under the name a consumer will download. Same filesystem, so the rename is still
the atomic swap, and the live database is never the file repo-add is writing
into. `publish`, `reconcile` and `withdraw_package` all had the bug and all share
the helper now; `reconcile` sweeps scratch directories a crash left behind.
`run_repo_add` drops `-s` too: repo-add would sign into scratch space that is
about to be deleted, and `publish::sign` already signs the renamed file.
The reason 238 tests missed this is that the shim would write the database
anywhere it was told. It now enforces the accepted set — measured against
`repo-add (pacman) 7.1.0`, not read out of its docs — with the real tool's
wording and exit status, and a gated test re-derives the set against the
installed tool, in the shape of the vercmp oracle. A shim that is more
permissive than its tool is not a test of the tool.
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -83,7 +83,10 @@ make that possible (§16a): `.pkg.tar.zst` files with real `.PKGINFO` and `.BUILDINFO` inside them, and the fake `pacman -U` refuses bytes that do not hash to the digest their name claims. The step machine cannot tell it is not in a sandbox, - which is the point. + which is the point. Each shim is as strict as the tool it replaces — the + fake `repo-add` refuses a database filename the real one refuses — because a + shim that accepts more than its tool is how a broken publish path passes 200 + tests and then fails on a real package. * **The fixture corpus.** `testcorpus/` holds ~20 synthetic packages, each with a `PKGBUILD` and a manifest describing what the shims should emit: a split pkgbase, a build that fails, a recipe whose payload drifts under a `SKIP` |
