docs(AGENTS): add concise reproducibility recipes for build.sh#259
Conversation
Step 3's build.sh patterns (autotools/cmake/go/rust) carried no determinism flags, so packages authored from them defaulted to non-reproducible. Add a "Reproducibility (required)" subsection with the per-language one-liners (build-id, path remap, deterministic ar, SOURCE_DATE_EPOCH, kernel KBUILD_BUILD_*) and a build-twice verify step, plus a pointer from the top of Step 3. Links to reproducible-builds.org for background; kept tool-agnostic (no private/internal tooling refs). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds 30 lines to ChangesReproducibility Documentation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
What
Adds a concise Reproducibility (required) subsection to the "Creating packages workflow → Step 3: Write build.sh" section of
AGENTS.md(whichCLAUDE.mdsymlinks to).Why
Step 3's existing
build.shpatterns (Autotools / CMake / Go / Rust) include no determinism flags — so a package authored by copying them defaults to non-reproducible. Reproducibility was mentioned only abstractly elsewhere in the doc (no actionable recipes). The build cache is content-addressed, so non-reproducible outputs undermine cache trust and cross-machine verification.What's in it
A self-contained, tool-agnostic recipe per build system:
-ffile-prefix-map,-gno-record-gcc-switches,-Wl,--build-id=none,ARFLAGS=Drc(+--enable-deterministic-archives)-trimpath -ldflags "-buildid="(+-buildvcs=falsewhen a.gitdir is present)--remap-path-prefix(build dir + cargo registry);-C codegen-units=1+CONST_RANDOM_SEED=0for the deeper codegen/compile-time-RNG casesKBUILD_BUILD_TIMESTAMP/_USER/_HOSTSOURCE_DATE_EPOCH=0(+PYTHONHASHSEED=0).laarchives$OUTPUT_DIRbyte-for-bytePlus a pointer at the top of Step 3 so the patterns aren't taken as complete on their own. Links to https://reproducible-builds.org/ for background. No references to private/internal tooling.
🤖 Generated with Claude Code
Summary by CodeRabbit