AGENTS.md is read on every task, so it keeps routing, the hard stops, the install and keyword gates and the completion report, and drops to 514 words; all rule files together drop from 7546 to 5783 words. Rules state the result to reach, and keep a prohibition only where a mistake is hard to undo or a reviewer has caught it before. Lessons from reviewed PRs: PATCHES carried over a bump, Go -ldflags without -s or -w, RUST_MIN_VER from the highest rust-version, cargo QA_FLAGS_IGNORED, ISA gating through cpu_flags, Python Requires-Dist, draft PRs for eclass provider slots missing from ::gentoo, skel.ebuild variable order, DependencyMissingKeywords, and the Go vendor layout. The PR template asks for the reason, a Tested: line and two checks, and names the merge-base scan range so it is not read as a bare --commits. Signed-off-by: Zakk <zakk@gentoozh.org>
2.7 KiB
2.7 KiB
Bundled and Prebuilt Binaries
Read with: version-bumps.md or new-packages.md for the change; dependencies.md for linkage evidence; desktop-integration.md for desktop apps; openrc-systemd.md for services; kernels.md for -kernel-bin.
- Whitelist published artifact arches, e.g.
KEYWORDS="-* ~amd64 ~arm64", with per-archSRC_URI. Never keyword or reference an unpublished artifact. - Set
RESTRICTfrom verified stripping and redistribution needs;stripandsplitdebugdiffer. - Scope
QA_PREBUILTto exact installed paths of manually reviewed, immutable blobs. It suppresses DT_NEEDED, executable-stack, textrel/W+X, flags, pre-stripped-file, and SONAME checks;RESTRICT=stripcontrols stripping. - Audit each installed object's ELF class/machine, interpreter,
NEEDED, SONAME, RPATH, installed path, libc/libstdc++ floors, and CPU ISA baseline. Inspect every arch's archive layout and linkage separately; same-release builds may differ, including OpenSSL linkage. - Smoke-test amd64. Add untested
~arm64when upstream ships that release's arm64 artifact; report it unverified and fix arch-specific problems on report. - Apply
dependencies.mdfor evidence-backed dependencies and immutable-byte ABI constraints. - Set per-arch
RDEPENDglibc floors as>=sys-libs/glibc-Xfrom the highest binaryGLIBC_symbol version. Static-PIE has no such symbols and needs no floor. Express glibc needs through dependencies, leavingelibc_glibcout ofREQUIRED_USE: musl profiles otherwise produce error-levelRequiredUseUnsatisfiableInDevand fail new-package CI. - Resolve every
NEEDEDthrough verified bundled layout or genuine systemRDEPEND, including QA-suppressed objects. An unresolved entry is a runtime defect. - Private modules may lack SONAME; justify unusual RPATH per object. A retained private blob may use verified literal
'$ORIGIN/...'. - For source-built objects, fix build/link/install behavior first. Use evidence-backed
patchelfonly as fallback, withBDEPEND. - Replace bundled components with system ones only after verifying ABI, functionality, and launcher/configuration integration; otherwise stop.
REQUIRES_EXCLUDEfilters metadata only. Use it for verified unresolved-soname false positives: anRDEPENDprovider installs the requested filename with a different SONAME (app-arch/bzip2provideslibbz2.so.1.0), or an optional plugin stays unloaded without its provider. Otherwise fix the dependency or layout; never patch the binary to hide the notice.- Exclude runtime self-hashing files from stripping individually with
dostrip -x <path>, asnet-proxy/flclash-bindoes; retain stripping for the rest of the package. - For prebuilt
dotnet-pkg-basepayloads, matchDOTNET_PKG_COMPATto each*.runtimeconfig.jsonframework.