From bc8f069d18c5de3dee04ae303227a255248efc1e Mon Sep 17 00:00:00 2001 From: aur-build Date: Thu, 19 Nov 2026 11:17:27 +0000 Subject: pipeline: replace the devtools chroot with pinned pacman -U provisioning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The chroot step existed to run mkarchroot/makechrootpkg, whose sudo requirement was the whole reason a build had to run on the hub under root-adjacent rules. The sandbox model makes the chroot redundant: the sandbox boots from a base that already carries the official packages, and step 2 now provisions it with a lease manifest instead — every dependency we publish, pinned to the exact version and digest of the artifact the index serves. The hub re-hashes every blob before staging it, installs with pacman -U (no -Sy, no live resolution, no mirror at build time), and the sandbox's own pacman -Q must confirm the pinned world landed before a build may start. A byte that hashes differently, or a world that drifted, fails closed. The build step is now plain makepkg -c -f: no -s (dependencies arrive installed; resolving at build time is what the pinning model forbids) and no -si (ingest signs). mkarchroot/makechrootpkg are gone from the pipeline and the config; their shims stay as stand-ins for the real devtools so the shim protocol itself remains exercised. The shim pacman grew a real fake installed-database: -U refuses bytes that do not hash to the digest their name claims, -Q reports what landed, so the world check is a test and not a no-op. --- src/db/queries.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/db') diff --git a/src/db/queries.rs b/src/db/queries.rs index 62c1045..fe0518f 100644 --- a/src/db/queries.rs +++ b/src/db/queries.rs @@ -679,6 +679,24 @@ pub fn index_version(db: &Db, name: &str) -> Result> { }) } +/// The exact artifact we serve for a package name: `(version, digest)` of the +/// in-index row's artifact. This is what a build's lease manifest pins — the +/// dependency arrives as these bytes or the build fails closed (§8, +/// provisioning); nothing about it is re-resolved at build time. +pub fn index_artifact(db: &Db, name: &str) -> Result> { + db.read(|c| { + c.query_row( + "SELECT p.version, a.digest FROM package p + JOIN artifact a ON a.id = p.artifact_id + WHERE p.name=?1 AND p.state='in_index' ORDER BY p.id DESC LIMIT 1", + params![name], + |r| Ok((r.get(0)?, r.get(1)?)), + ) + .optional() + .map_err(Into::into) + }) +} + /// Is `name` one of the packages we publish? Used to filter world snapshots /// down to our own packages (§10.1). pub fn is_ours(db: &Db, name: &str) -> Result { -- cgit v1.2.3