diff options
| author | aur-build <aur-build@localhost> | 2026-11-17 21:57:58 +0000 |
|---|---|---|
| committer | aur-build <aur-build@localhost> | 2026-11-17 21:57:58 +0000 |
| commit | 4ac1d19ca5dc540db0478943a0cd70a5353307da (patch) | |
| tree | 6d3a5192ea3bf9a4eae2f141dba5f8ffcc398f6d /src/config.rs | |
| parent | a6f69962e85ccf0f0cfd86f7c85bf0f9a2c8c09e (diff) | |
| download | aur-build-4ac1d19ca5dc540db0478943a0cd70a5353307da.tar.gz aur-build-4ac1d19ca5dc540db0478943a0cd70a5353307da.zip | |
pipeline: ten-step build machine with atomic signed publish
materialize -> plan -> chroot -> sources -> pkgver -> build -> collect ->
verify -> ingest -> publish, each checkpointed in build_step so a worker
that dies resumes at the next incomplete step without repeating the
expensive one (I5).
Step 0 materializes from the local mirror only and re-hashes the tree:
there is no path from 'AUR moved since the review' to 'we built it
anyway' (I3). Step 4 re-resolves a VCS pkgver and refuses when it no
longer matches the approved identity. Publish renders the index to .tmp,
fsyncs, commits release + package rows and the accepted pointer under a
compare-and-swap, then renames over the served database and signs it, so
a crash leaves the old index byte-for-byte intact (I4) and every index
entry traces back to an approval (I1). Ingest records the world
snapshot as the BUILDINFO installed set intersected with our own
packages, which is what keeps staleness meaningful (I12).
17 shim-driven end-to-end tests, including kill-mid-publish and
crash-resume, with no root, network, or real chroot.
Diffstat (limited to 'src/config.rs')
| -rw-r--r-- | src/config.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs index 05f9a74..5bcb5aa 100644 --- a/src/config.rs +++ b/src/config.rs @@ -50,6 +50,11 @@ pub struct Config { pub shim_manifest: Option<PathBuf>, /// Where shims record their invocations, exported as `AUR_SHIM_DIR`. pub shim_dir: Option<PathBuf>, + /// Test hook: abort publish at a named point so I4 (atomic publish) can be + /// exercised for real. Never set in production. + pub publish_fault: Option<String>, + /// Test hook: the named shim must fail, e.g. `makechrootpkg`. + pub shim_fail: Option<String>, } impl Default for Config { @@ -73,6 +78,8 @@ impl Default for Config { path_prepend: None, shim_manifest: None, shim_dir: None, + publish_fault: None, + shim_fail: None, } } } @@ -115,6 +122,9 @@ impl Config { if let Some(d) = &self.shim_dir { cmd.env("AUR_SHIM_DIR", d); } + if let Some(f) = &self.shim_fail { + cmd.env("AUR_SHIM_FAIL", f); + } } /// Create the directory tree the server needs. Idempotent. |
