From 99ad2034be8fc5b107205199e19da831596a6791 Mon Sep 17 00:00:00 2001 From: aur-build Date: Wed, 18 Nov 2026 22:45:28 +0000 Subject: pipeline: signing moves from the build step to hub-side ingest The build step used to pass -si through makechrootpkg, which meant whatever machine ran the build had to hold the signing key - fine for a chroot on the hub, disqualifying for a remote sandbox. The build now produces unsigned bytes; ingest signs the exact bytes that entered the store, with the same key and code path that signs the database, and a gpg failure fails the build closed. verify() no longer checks for a build-made signature: the meaningful guarantee moved to 'ingest produced one or the build failed'. The shim makechrootpkg now only emits .sig when -si is passed, like the real tool, so the suite cannot accidentally test a signing path that no longer exists. --- src/shims/mod.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/shims/mod.rs') diff --git a/src/shims/mod.rs b/src/shims/mod.rs index a34cf7d..c1b169c 100644 --- a/src/shims/mod.rs +++ b/src/shims/mod.rs @@ -247,7 +247,7 @@ pub fn mkarchroot(args: &[String]) -> Result { Ok(0) } -/// `makechrootpkg -c -r -- -si -f`, run with cwd = the build dir. +/// `makechrootpkg -c -r -- -f`, run with cwd = the build dir. /// /// Emits one `.pkg.tar.zst` per package in the manifest into the current /// directory, exactly where the real tool leaves them. @@ -281,10 +281,15 @@ pub fn makechrootpkg(args: &[String], m: &Manifest) -> Result { )); } let pkgs = packages_to_emit(m, &startdir); + // Sign only when the caller asked for it, like the real tool: signing is + // `-si`/`-i`, and the pipeline stopped passing it when signing moved + // hub-side to ingest. A shim that signed anyway would hide that move from + // every test in the suite. + let wants_sig = args.iter().any(|a| a.starts_with("-si") || a == "-i" || a == "--sign"); for p in &pkgs { let path = write_package(&startdir, p, m)?; println!("==> Creating package '{}'", path.file_name().unwrap().to_string_lossy()); - if m.sig { + if m.sig && wants_sig { if let Ok(bytes) = std::fs::read(&path) { let sig = path.with_extension("pkg.tar.zst.sig"); let _ = std::fs::write(&sig, fake_sig(&bytes)); -- cgit v1.2.3