diff options
| author | aur-build <aur-build@localhost> | 2026-11-19 11:17:27 +0000 |
|---|---|---|
| committer | aur-build <aur-build@localhost> | 2026-11-19 11:17:27 +0000 |
| commit | bc8f069d18c5de3dee04ae303227a255248efc1e (patch) | |
| tree | 35143f64346a2a555672789ae33cbf0905bffc0b /src/config.rs | |
| parent | 99ad2034be8fc5b107205199e19da831596a6791 (diff) | |
| download | aur-build-bc8f069d18c5de3dee04ae303227a255248efc1e.tar.gz aur-build-bc8f069d18c5de3dee04ae303227a255248efc1e.zip | |
pipeline: replace the devtools chroot with pinned pacman -U provisioning
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.
Diffstat (limited to 'src/config.rs')
| -rw-r--r-- | src/config.rs | 33 |
1 files changed, 6 insertions, 27 deletions
diff --git a/src/config.rs b/src/config.rs index 8e303d4..e544b2d 100644 --- a/src/config.rs +++ b/src/config.rs @@ -33,17 +33,10 @@ pub struct Config { pub git_bin: String, /// Path to the makepkg executable. pub makepkg_bin: String, - /// Path to makechrootpkg. - pub makechrootpkg_bin: String, - /// Path to mkarchroot. - pub mkarchroot_bin: String, - /// Package list handed to `mkarchroot` after the working directory, i.e. - /// what goes into the warm root. The default is the real devtools usage - /// (`mkarchroot <dir> base`); there is no `-N` flag on the real tool, so - /// hardcoding one would make the first real-chroot run fail on its first - /// step. Kept configurable because a site may want a smaller seed. - #[serde(default = "default_mkarchroot_args")] - pub mkarchroot_args: Vec<String>, + /// Path to pacman. The provisioning step installs the pinned lease set + /// with `pacman -U` inside the sandbox (§8); nothing resolves against a + /// live mirror at build time. + pub pacman_bin: String, /// Path to repo-add. pub repo_add_bin: String, /// Path to gpg. @@ -96,7 +89,7 @@ pub struct TestHooks { /// Abort publish at a named point so I4 (atomic publish) can be exercised /// for real: `before-rename` or `after-rename`. pub publish_fault: Option<String>, - /// The named shim must fail, e.g. `makechrootpkg`. + /// The named shim must fail, e.g. `makepkg`. pub shim_fail: Option<String>, /// The named shim SIGKILLs its parent — the process running the pipeline — /// mid-step. This is how a real crash is reproduced for I5: not a caught @@ -134,9 +127,7 @@ impl Default for Config { build_profile: "extra-x86_64".into(), git_bin: "git".into(), makepkg_bin: "makepkg".into(), - makechrootpkg_bin: "makechrootpkg".into(), - mkarchroot_bin: "mkarchroot".into(), - mkarchroot_args: default_mkarchroot_args(), + pacman_bin: "pacman".into(), repo_add_bin: "repo-add".into(), gpg_bin: "gpg".into(), build_user: String::new(), @@ -228,7 +219,6 @@ impl Config { self.store_dir(), self.log_dir(), self.repo_dir(), - self.chroot_dir(), ] { std::fs::create_dir_all(d)?; } @@ -295,20 +285,9 @@ impl Config { pub fn repo_db_name(&self) -> String { format!("{}.db", self.repo_name) } - /// Warm chroot seeds, one per profile (§8.3). - pub fn chroot_dir(&self) -> PathBuf { - self.root.join("chroot") - } - pub fn chroot_seed(&self, profile: &str) -> PathBuf { - self.chroot_dir().join(profile) - } } /// Filesystem-safe slug for a URL, used in cache filenames. -fn default_mkarchroot_args() -> Vec<String> { - vec!["base".to_string()] -} - pub fn slug(url: &str) -> String { url.chars() .map(|c| { |
