From 153e72cc797c1e45a60f4896d00163fb4bdf3056 Mon Sep 17 00:00:00 2001 From: aur-build Date: Thu, 19 Nov 2026 14:15:16 +0000 Subject: publish: repo-add decides the database filename MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 `.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. --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 1ee56e3..c68d0e3 100644 --- a/README.md +++ b/README.md @@ -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` -- cgit v1.2.3