trailofbits / trailofbits/coop
Offline rootfs image build (without S3 CI assets)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 243
- Forks
- 13
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 30
Description
Context
scripts/build-rootfs.sh was removed in #293 (see that issue for rationale). It had been kept as a "documented manual fallback" but had drifted into effectively dead code:
- It duplicated provisioning logic that now lives in
scripts/guest/guest-config.sh. - It omitted the CI-kernel workarounds applied on the squashfs path (iptables-legacy, static
resolv.conf, Docker'sDOCKER_INSECURE_NO_IPTABLES_RAW). - It produced a finished ext4 image that the current
coop setupflow (download CI squashfs → unpack →guest-config.sh→ pack ext4) does not consume. - It shipped no kernel, so it couldn't actually unblock a user cut off from the Firecracker CI S3 bucket.
Today, image creation depends entirely on the Firecracker CI S3 bucket being reachable and publishing assets for a recent enough Firecracker minor. If that bucket is unavailable, there is no supported way to build a rootfs locally.
What we'd want
A genuine offline / from-scratch image-build path, if we decide it's worth supporting. Requirements that the old script did not meet:
- Reuse
scripts/guest/guest-config.sh(single source of provisioning truth) rather than duplicating package/tool installation. - Apply the same CI-kernel workarounds, or document/provide a kernel where they aren't needed.
- Produce (or point
coop setupat) an artifact in the shape the current flow expects, end-to-end. - Provide a kernel as well, since the rootfs alone can't boot.
Decision needed
Whether an offline build path is worth the maintenance cost at all, or whether relying on the CI S3 bucket (with the existing older-minor fallback) is sufficient. This issue tracks that decision and any follow-up implementation.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading scripts/guest/guest-config.sh, the current coop setup flow, and issue #293 for the rationale behind removing scripts/build-rootfs.sh. Determine whether an offline path is worth maintaining and how it would provide the expected rootfs artifact and a bootable kernel. Done means a clear decision, followed by an end-to-end implementation only if the path is accepted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- build-system, cli, infrastructure, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100