stagex-wak workspace: verified bitbaker build pipeline (prime main) #1

Merged
william-admin merged 11 commits from william/stagex-wak-workspace into main 2026-11-06 01:47:58 -08:00 AGit
Member

What this is

WAK's downstream workspace for building on StageX with per-image source-provenance verification. The stagex/ submodule is pristine upstream (codeberg, pinned at aa27e5b9a = Release 2026.10.0, tracks main); nothing downstream ever lands inside it.

Contents

  • containers/ — Containerfile-bitbaker (canonical WAK build container: musl + clang + rust + go + bitbake tools, 41 digest-pinned verified layers) plus mold/xattr reproduction recipes proving upstream bytes from scratch.
  • tools/ — reproducible podman build pipeline (podman-build.sh, A/B pairs), verification (gate.py: hard iid equality + soft upstream diff_id match; fetch-upstream-ref.py), recipe fingerprints + reuse cache (recipe.py, reuse.py — pull verified upstream revs instead of rebuilding), shared path convention (wak-paths.sh/wak_paths.py, $WAK_WORK override, podman pinned to $WAK_WORK/podman-store).
  • trust/ — ledger.txt (130 append-only gate results, all PASS), verified.json (machine cache: recipe + host + upstream OCI revs), pins.txt (41 bitbaker pins with gate status), trust manifest. See docs/TRUST-MODEL.md.
  • docs/ — trust model + bootstrap plan.
  • AGENTS.md — working rules: no pin without a gate, NEAR-MATCH only with root-caused zero-code diffs, mold in build stages only (never in output images), three-way digest agreement.

Verification status

41/41 bitbaker layers A/B-verified reproducible; 130/130 ledger entries PASS; all NEAR-MATCHes root-caused (hostname strings, debug-line paths, tar markers — zero code-section diffs).

Notes

  • work/ is a gitignored symlink to shared artifact storage ($WAK_WORK on other machines).
  • First PR to prime main; merge expected to be a fast-forward (6 commits on top of the init commit).
## What this is WAK's downstream workspace for building on StageX with per-image source-provenance verification. The `stagex/` submodule is **pristine upstream** (codeberg, pinned at `aa27e5b9a` = Release 2026.10.0, tracks `main`); nothing downstream ever lands inside it. ## Contents - **`containers/`** — `Containerfile-bitbaker` (canonical WAK build container: musl + clang + rust + go + bitbake tools, 41 digest-pinned verified layers) plus mold/xattr reproduction recipes proving upstream bytes from scratch. - **`tools/`** — reproducible podman build pipeline (`podman-build.sh`, A/B pairs), verification (`gate.py`: hard iid equality + soft upstream diff_id match; `fetch-upstream-ref.py`), recipe fingerprints + reuse cache (`recipe.py`, `reuse.py` — pull verified upstream revs instead of rebuilding), shared path convention (`wak-paths.sh`/`wak_paths.py`, `$WAK_WORK` override, podman pinned to `$WAK_WORK/podman-store`). - **`trust/`** — `ledger.txt` (130 append-only gate results, all PASS), `verified.json` (machine cache: recipe + host + upstream OCI revs), `pins.txt` (41 bitbaker pins with gate status), trust manifest. See `docs/TRUST-MODEL.md`. - **`docs/`** — trust model + bootstrap plan. - **`AGENTS.md`** — working rules: no pin without a gate, NEAR-MATCH only with root-caused zero-code diffs, mold in build stages only (never in output images), three-way digest agreement. ## Verification status 41/41 bitbaker layers A/B-verified reproducible; 130/130 ledger entries PASS; all NEAR-MATCHes root-caused (hostname strings, debug-line paths, tar markers — zero code-section diffs). ## Notes - `work/` is a gitignored symlink to shared artifact storage (`$WAK_WORK` on other machines). - First PR to prime `main`; merge expected to be a fast-forward (6 commits on top of the init commit).
- stagex/: upstream codeberg submodule pinned aa27e5b9a (Release 2026.10.0),
  kept pristine; out/ + fetch/ are gitignored symlinks to repo-root artifacts
- containers/: Containerfile-bitbaker (canonical; 41 digest-pinned,
  A/B+upstream-gated layers) + mold/xattr source-repro recipes
- tools/: reproducible build + gate pipeline (wak-paths.sh / wak_paths.py)
- trust/: gate ledger (130 entries, all PASS), trust manifests, bitbaker pins
- signatures/: upstream lookaside signatures + keyring (not committed)
- docs/: bootstrap plan + trust model
gate.py appends host= and recipe= columns; trust/verified.json caches per-package
iid+recipe+hosts+upstream OCI revs (captured at gate). reuse.py answers
VERIFIED-CURRENT/STALE/LEGACY, prints digest-pinned pull commands for verified
revs (no rebuild needed), and sweeps the stale backlog. 129 ledger entries
backfilled (122 with pull refs); legacy entries flagged VERIFIED-LEGACY.
No podman-bootstrap branch exists upstream; main is the vanilla branch and
aa27e5b9a is an ancestor of it. Branch tracking set so 'git submodule update
--remote' is meaningful; the gitlink stays at the exact hash everything was
built and gated from.
william changed title from submodule: track main (pinned at aa27e5b9a, Release 2026.10.0) to stagex-wak workspace: verified bitbaker build pipeline (prime main) 2026-11-05 23:51:48 -08:00
busybox bakes /usr/bin/{xz,unxz,xzcat,lzma,unlzma,lzcat} symlinks into its
layer; core-xz COPYed earlier had its real binaries replaced by the applet
(no -T/--format=raw/--robot). Full audit of all 10 pre-busybox layers: xz is
the ONLY collision; every other GNU/coreutils layer already lands below.
Rebuilt: localhost/stagex/bitbaker:latest = 6924810895b5 (also wak/ tag).
Verified: xz 5.8.3 real binary, GNU tools intact, shims intact, unique
busybox applets intact, 41/41 pins unchanged (digests are layer-content,
reordering does not alter them). meta-wak/tools/Containerfile synced.
- mold/onetbb back exactly where upstream pallet-clang puts them (digests
  from digests/core.txt, ledger PASS MATCH-UPSTREAM). The 'minus mold'
  deviation was the root cause of the patch/cpio/chrpath soft-DIFFs and
  left core-profile's LD=ld.mold dangling. Bitbaker composition now
  matches upstream pallet-clang line for line, plus bash + bitbake tools.
- Delete Containerfile-user-{patch,cpio,chrpath}-mold: they only replayed
  upstream's own mold build (upstream binaries literally embed 'mold
  2.42.0'); the proof lives in the ledger + work/out/*-mold.iid-*. Pins
  were already the upstream manifests, so shipped content is unchanged in
  intent and byte-identical by pin.
- Delete Containerfile-core-coreutils-xattr (rejected deviation; never
  pinned; ledger seq 128 keeps the record).
- pins.txt regenerated mechanically from Containerfile+ledger: 42 pins,
  all PASS. New image e1c5f9118f18 (stagex+wak tags); verified mold 2.42.0
  + libtbb present, ld.mold resolves, shims/xz intact, no busybox-applet
  collisions (mold/tbb not applet names). meta-wak Containerfile synced.
core-llvm bakes /usr/bin/ld -> ld.lld, but core-binutils (bitbake tool
layer, lands later) ships hardlinked GNU ld/ld.bfd and replaces it. The
final RUN (our symlinks, after all pins) now relinks ld -> ld.lld; GNU
ld stays reachable as ld.bfd. Verified: ld --version = LLD 22.1.8, clang
invokes /usr/bin/ld -> lld, compile+link ok, mold/xz/shims intact.
Image 1abb0043e826 (stagex+wak tags). meta-wak Containerfile synced.
- podman-build-stage0.sh no longer hardcodes 12 version/source args: it
  feeds podman-target.py (upstream src/targets.py) exactly like
  podman-build.sh does for every other package. Proven equivalent:
  fresh build run-C iid == ledgered bootstrap-stage0 04e293c8.
- Fix cd-then-$0 bugs in all 4 scripts I touched earlier (wak-paths.sh
  source + podman-target.py broke when invoked with a relative path);
  now SD is resolved before cd. Verified queue-build.sh from /tmp.
- fetch copy falls back cp -lR -> cp -R: work/ moved to /fdata, so the
  hardlink into packages/*/fetch is cross-device (broke every build
  from cache since the move; found via busybox dry-run).
- queue-build.sh: ledger path resolved via SD (broke once any package
  actually needed a build) and invoke podman-build.sh by absolute path.
- Containerfile-bitbaker + PLAN docs: bootstrap-ledger.txt -> trust/ledger.txt
  (file was renamed at the trust/ restructure); PLAN header now describes
  the submodule-on-main layout instead of the retired podman-bootstrap branch.
- Verified: queue-build from /tmp OK; bitbaker tags clean (only latest
  pair, 1abb0043e826); no bare-podman or /fdata hardcodes remain in tools/.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
wak/stagex-wak!1
No description provided.