AGENTS.md, .agents/rules: rewrite as target states, add QA lessons
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>
This commit is contained in:
1 parent
9b7d8d027d
commit
a55f0925b0
14 files changed
+251
-385
No files matched your search
@@ -2,23 +2,21 @@
|
||||
|
||||
Read with: `ebuild-construction.md` for USE-controlled dependencies; `qa.md` for scanning.
|
||||
|
||||
- Every atom traces to evidence here: a linked SONAME, a build-file `dependency()`, `find_package`, or `pkg-config` call, a `dlopen`ed library, or a program a phase runs.
|
||||
- A launcher or `bwrap` script's external commands outside `@system` count as that evidence: find each command's provider with `qfile` on an installed system or by searching the repository. `xdg-user-dir` belongs to `x11-misc/xdg-user-dirs`, not `x11-misc/xdg-utils`.
|
||||
- Another distro's control file is not evidence.
|
||||
- Do not declare what the environment provides: `@system` members, tools an inherited eclass pulls in, or a compiler or libc floor the profile guarantees.
|
||||
- One atom per package: fold the version bound, `SLOT`, and USE constraints into a single entry.
|
||||
- Carry the build system's own version floors into the atom, and do not invent floors it does not state. Add an upper bound only for a verified incompatibility with no available fix.
|
||||
- Before adding a slot operator (`:=` or `:slot=`), check that the provider declares a subslot. Without one it binds `slot/slot`, so consumers rebuild when the slot changes but never on an ABI break inside it.
|
||||
- Revbump when a Gentoo-side change can alter an existing installation or runtime dependency decision.
|
||||
- That includes installed output or behavior, runtime dependencies, subslot binding, and default USE changes.
|
||||
- Also revbump for an affected non-free or soon-to-be-removed license and for a non-trivial EAPI change.
|
||||
- Skip the revbump when a descriptive, copyright, keyword, message, test, build-failure, or build-dependency-relaxation change cannot leave an installed result wrong.
|
||||
- In EAPI 8+, put host tools that must execute while the package is merged, such as post-install cache generators, in `IDEPEND`.
|
||||
- For a verified direct ABI consumer, put `:=` or `:slot=` on every `DEPEND` or `RDEPEND` atom that models that linkage. Never copy it to transitive dependencies.
|
||||
- Identical prebuilt bytes cannot adapt to a new ABI. Constrain verified provider slots or versions instead of assuming a reinstall fixes them.
|
||||
- `:=` and `:slot=` are invalid in `PDEPEND` and must stay outside `|| ( )`. Inside an any-of group, list only supported providers, preferred first.
|
||||
- Before adding or retaining any dependency or alternative provider, check removal entries in both this overlay's and the main Gentoo tree's `profiles/package.mask`.
|
||||
- When a package is removed or renamed, update dependency atoms plus `elog` and `optfeature` recommendation strings.
|
||||
- A provider subslot represents an ABI that requires consumer rebuilds. Re-check SONAMEs, private-header ABI, and library renames on every bump.
|
||||
- Never derive a sibling package version from `${PV}` without verifying that it exists and resolves.
|
||||
- Never replace a `files/` input still referenced by a surviving ebuild; give its replacement a version- or revision-specific name.
|
||||
- Each atom needs linked SONAME, build-file `dependency()`/`find_package`/`pkg-config`, `dlopen`, or executed-program evidence from this package; another distro's control file is not evidence. Declare linked libraries previously supplied only through the toolchain, e.g. libbfd from `sys-libs/binutils-libs`.
|
||||
- Resolve launcher and `bwrap` commands outside `@system` with `qfile` or repository search. `xdg-user-dir` comes from `x11-misc/xdg-user-dirs`, distinct from `x11-misc/xdg-utils`.
|
||||
- Declare only dependencies beyond `@system`, inherited-eclass inputs, and profile-guaranteed compiler/libc floors. Combine each package's version, slot, and USE constraints in one atom.
|
||||
- Carry the build system's stated minimums; upper bounds require verified incompatibility with no available fix.
|
||||
- Before `:=` or `:slot=`, verify the provider declares a subslot. Otherwise `slot/slot` binding rebuilds on slot changes only, missing ABI breaks within the slot.
|
||||
- Revbump Gentoo-side changes affecting existing installations or runtime dependency decisions: output, behavior, runtime dependencies, subslot binding, default USE, affected non-free or soon-removed licenses, and non-trivial EAPI changes. Overriding an eclass phase without calling its implementation (e.g. `linux-mod-r1_pkg_postinst`) changes installed behavior and needs a revbump.
|
||||
- Skip revbumps for descriptive, copyright, keyword, message, test, build-failure, or build-dependency-relaxation changes that cannot leave an installed result wrong. Dropping a dependency whose package already left the tree needs none.
|
||||
- In EAPI 8+, merge-time host executables such as post-install cache generators belong in `IDEPEND`.
|
||||
- For direct ABI consumers, apply `:=` or `:slot=` to every `DEPEND`/`RDEPEND` atom modeling that linkage; transitive dependencies stay unbound.
|
||||
- Immutable prebuilt bytes need verified provider slot/version constraints; reinstalling identical bytes cannot adapt their ABI.
|
||||
- Keep `:=` and `:slot=` in valid dependency classes outside `PDEPEND` and `|| ( )`. Any-of groups list supported providers in preference order.
|
||||
- Before adding or retaining any dependency or alternative provider, check removal entries in both trees' `profiles/package.mask`.
|
||||
- Package removals and renames update atoms and `elog`/`optfeature` recommendations.
|
||||
- Provider subslots represent consumer-rebuild ABIs. Recheck SONAMEs, private-header ABI, and library renames on every bump.
|
||||
- Derive sibling versions from `${PV}` only after verifying existence and resolution.
|
||||
- Preserve `files/` inputs used by surviving ebuilds; give replacements version- or revision-specific names.
|
||||
- `fowners` targeting an `acct-user` in `src_install` requires that package in both `BDEPEND` and `RDEPEND`, per `acct-user.eclass`.
|
||||
- On Python bumps, compare wheel core `Requires-Dist` entries (without `extra ==`) with `RDEPEND`/`PDEPEND`.
|
||||
@@ -2,9 +2,7 @@
|
||||
|
||||
Read with: `prebuilt-binaries.md` when the application ships prebuilt; `dependencies.md` for the revbump a changed desktop file or icon needs.
|
||||
|
||||
- A window gets a default icon when its Wayland `app_id` or X11 `WM_CLASS` matches no installed desktop file's basename.
|
||||
- Measure that `app_id` or `WM_CLASS` on a running instance; KWin reports it through `workspace.windowList()`. Then rename the file or add `StartupWMClass`.
|
||||
- Toolkits derive it differently: GTK3 sends `g_get_prgname()`, not the `GApplication` id, so `org.example.App.desktop` still reports `app`.
|
||||
- `--ozone-platform-hint=auto` and `--ozone-platform=wayland` are not interchangeable, and either can be the one that fails. Before changing an ozone switch, launch both ways and check which platform the build took.
|
||||
- A bundled Chromium silently ignores switches its version predates; confirm each one exists in the shipped binary.
|
||||
- `wayland` is a desktop-profile default, so a `wayland?`-guarded switch also reaches X11 users. Prefer a switch that resolves the platform at runtime over one that forces it.
|
||||
- Match the installed desktop basename to the measured Wayland `app_id` or X11 `WM_CLASS`, or add `StartupWMClass`; an unmatched window gets a default icon. Measure a running instance, using KWin's `workspace.windowList()` where available.
|
||||
- GTK3 uses `g_get_prgname()` for this identity rather than the `GApplication` id: `org.example.App.desktop` can report `app`.
|
||||
- Before changing ozone flags, launch with both `--ozone-platform-hint=auto` and `--ozone-platform=wayland` and verify the selected platform; either can fail. Confirm every switch exists in the bundled Chromium version, which silently ignores newer switches.
|
||||
- Because desktop profiles enable `wayland` by default, a `wayland?` switch reaches X11 users too. Prefer runtime platform selection.
|
||||
@@ -2,29 +2,27 @@
|
||||
|
||||
Read with: `AGENTS.md` § Ebuild Policy for install, keyword and precedent gates; `dependencies.md` for atoms and revbumps.
|
||||
|
||||
- Keep release and `9999` behavior distinct. Port applicable dependency, QA, EAPI, and phase fixes to the live ebuild.
|
||||
- A live ebuild must sort above every release the package has. `9999` is lower than a date version, so a package versioned `20240203` needs `99999999`; confirm with `python3 -c 'from portage.versions import vercmp; print(vercmp("9999", "20240203"))'` before naming the file.
|
||||
- Every `${FILESDIR}` reference must name a committed file.
|
||||
- If `PATCHES` coexists with a custom `src_prepare`, call `default` or apply the patches explicitly. `eapply_user` alone does not apply `PATCHES`.
|
||||
- Keep global scope metadata-invariant and side-effect-free. Do not run external programs, emit uncaptured output, modify system state, or depend on system, profile, repository, or phase data.
|
||||
- Do not use pipes, process substitution, heredocs, or herestrings there. Bash may back the latter two with temporary files that the metadata sandbox forbids.
|
||||
- Deterministic package-manager helpers and pure shell expansion are valid in global scope. Put work requiring declared build context in phases.
|
||||
- Declare external build and test inputs through `SRC_URI`/`Manifest` or an eclass vendor mechanism. Enforce offline operation without warm caches.
|
||||
- Each USE state must control every applicable option, dependency, source selection, and install cleanup consistently. Disable automagic.
|
||||
- When a package adds, removes, or renames a local USE flag, update its `metadata.xml` flag description in the same change.
|
||||
- Prune only what `src_install` would otherwise install. Deleting a path it never reaches is dead code, as is a branch that only removes files that USE state does not install.
|
||||
- `${ED}` already carries the offset; never append `${EPREFIX}` to it. `${D}` does not carry it. Use a bare `${EPREFIX}` only in installed content read at runtime, and only where that consumer runs under Prefix.
|
||||
- Verify package and bundled-component licenses, Gentoo license names, and redistribution terms; they determine `RESTRICT=mirror` or `bindist`. Separately, `LICENSE` must list the license of every component compiled or statically linked into installed files, not only the top-level project.
|
||||
- A license absent from `::gentoo` needs its full text in `licenses/` and `RESTRICT` set from its own distribution terms. One that forbids redistribution sets both `mirror`, which covers the distfile, and `bindist`, which covers what is built from it. Add it to `profiles/license_groups` when it belongs to one of those groups; a license that fits none stays ungrouped.
|
||||
- A backport records its upstream commit, PR, or bug URL and applicable and tested versions.
|
||||
- A security fix covers every still-keyworded vulnerable branch and relevant sibling or fork. Revbump when installed content or behavior changes.
|
||||
- A package move updates `profiles/updates` atomically with every affected reference.
|
||||
- Prefer the package and its history, a comparable current package, eclass and upstream source, then official Gentoo documentation and gentoo.git. Never substitute memory or superficial similarity for evidence.
|
||||
- Preserve package-local style and user/toolchain flags. Keep patches and refactors narrow; remove forced optimization, hardening, LTO, stripping, and blanket `-Werror`. Go builds leave stripping and debug splitting to Portage: `-ldflags` carries no `-s` or `-w`, and keeps its `-X` flags.
|
||||
- Keep release and live behavior distinct; port applicable dependency, QA, EAPI, and phase fixes to the live ebuild.
|
||||
- A live version sorts above every release: date-versioned `20240203` needs `99999999`, because `9999` sorts lower. Verify ordering with Portage's `vercmp` before naming it.
|
||||
- Every `${FILESDIR}` reference names a committed file.
|
||||
- With `PATCHES` and custom `src_prepare`, call `default` or apply patches explicitly; `eapply_user` handles user patches only.
|
||||
- Global scope is metadata-invariant and side-effect-free: deterministic package-manager helpers and pure shell expansion only. External programs, uncaptured output, state changes, system/profile/repository/phase-dependent work, pipes, process substitution, heredocs, and herestrings belong in phases. Bash can back heredocs and herestrings with files forbidden by the metadata sandbox.
|
||||
- Declare external build/test inputs through `SRC_URI`/`Manifest` or an eclass vendor mechanism. Operation stays offline with cold caches.
|
||||
- Each USE state controls its options, dependencies, sources, and install cleanup consistently; disable automagic. Update `metadata.xml` descriptions when adding, removing, or renaming local USE flags.
|
||||
- Prune only paths the selected USE state would install through `src_install`; remove unreachable cleanup.
|
||||
- `${ED}` includes the Prefix offset; `${D}` excludes it. Use bare `${EPREFIX}` only in installed runtime content whose consumer runs under Prefix.
|
||||
- Verify package and bundled-component licenses, Gentoo license names, and redistribution terms. Set `RESTRICT=mirror`/`bindist` from those terms; `LICENSE` includes every component compiled or statically linked into installed files.
|
||||
- For licenses absent from `::gentoo`, add full text under `licenses/` and apply their distribution terms. A redistribution ban requires both `mirror` for distfiles and `bindist` for built output. Add fitting licenses to `profiles/license_groups`; leave others ungrouped.
|
||||
- Backports record the upstream commit, PR, or bug URL and applicable/tested versions.
|
||||
- Security fixes cover every still-keyworded vulnerable branch and relevant sibling or fork; apply `dependencies.md` for revbumps.
|
||||
- Package moves update `profiles/updates` and all affected references atomically.
|
||||
|
||||
### Code Style
|
||||
|
||||
- Keep code concise. Prefer clear naming, established helpers, direct control flow, and simple structure over explanatory comments or complex shell code.
|
||||
- Implement logic near the relevant code rather than adding a separate script. Use functions only when they materially reduce local complexity or duplication.
|
||||
- Keep comments only when they explain non-obvious intent, constraints, trade-offs, or workarounds that the code cannot express and a future maintainer needs to preserve.
|
||||
- Do not add comments that restate eclass-documented variable assignments, configuration, declarations, option values, function calls, commands, or standard settings.
|
||||
- Do not add comments to justify QA suppressions, including `QA_PREBUILT` and `QA_SONAME`.
|
||||
- Preserve existing useful comments unless they are outdated or incorrect.
|
||||
- Prefer concise code, clear names, established helpers, direct control flow, and simple structure. Keep logic near its use; functions justify their cost by reducing complexity or duplication.
|
||||
- Keep useful, accurate comments explaining non-obvious intent, constraints, trade-offs, or workarounds a maintainer must preserve. Code and eclass documentation carry ordinary assignments, configuration, declarations, options, calls, commands, and standard settings. Record QA-suppression rationale in review text, outside code comments.
|
||||
- Cargo ebuilds installing ELF binaries set `QA_FLAGS_IGNORED` for those binaries; recheck when a bump adds one. Go ebuilds use go-module.eclass's existing `QA_FLAGS_IGNORED='.*'`.
|
||||
- Gate ISA-dependent binaries with `REQUIRED_USE="amd64? ( cpu_flags_x86_* )"` following `::gentoo` precedent. Retain the gate when baseline CI cannot satisfy it; CI gives the target package the runner's CPU flags.
|
||||
- Follow `skel.ebuild` variable order: `DESCRIPTION`, `HOMEPAGE`, `SRC_URI`, `S`, `LICENSE`, `SLOT`, `KEYWORDS`, `IUSE`, `REQUIRED_USE`, `RESTRICT`, then dependencies. Reordering alone needs no revbump.
|
||||
@@ -2,12 +2,11 @@
|
||||
|
||||
Read with: `AGENTS.md` § Ebuild Policy for how to find precedent; `version-bumps.md` when an EAPI bump rides on a version bump.
|
||||
|
||||
- Prefer the local main tree at `/var/db/repos/gentoo` when present.
|
||||
- Before inheriting, read each eclass's supported EAPIs, deprecation status, pre-inherit and call-time variables, exports, phases, and defaults.
|
||||
- On an EAPI bump, re-audit the whole ebuild, including disabled USE branches, generated dependencies, dead helpers, and changed eclass defaults.
|
||||
- Define phase composition explicitly when eclasses export the same phase.
|
||||
- An override calls the eclass implementation when its documented behavior must remain. `default` invokes the EAPI default, not an eclass-exported phase.
|
||||
- Do not inherit an eclass for one helper when clear phase code and current precedent agree.
|
||||
- Do not repeat an assignment an inherited eclass owns: `git-r3` appends `PROPERTIES="live"`; `cargo` owns `CARGO_HOME`, `go-module` owns `GOCACHE`, `GOMODCACHE`, and `GOPROXY`.
|
||||
- `cargo.eclass` `GIT_CRATES` writes `[patch.'<git url>']`, which cannot override an upstream `[patch.crates-io] name = { git = … }`. Keep `GIT_CRATES` for `SRC_URI` and rewrite that upstream entry to `path = "${WORKDIR}/<repo>-<commit>"` in `src_prepare`. Write the URL as `Cargo.lock` spells it, even after upstream renamed the organization and pkgcheck reports `RedirectedUrl`; cargo resolves offline sources by that string.
|
||||
- The tree's `metadata/install-qa-check.d/60go-module-eclass` takes the highest `go` directive from every `go.mod` under `${WORKDIR}`, including a sub-module the build never compiles. When no build, test, or install path uses that sub-module, remove it in `src_prepare`; otherwise raise the floor to what it needs.
|
||||
- Prefer the local main tree when available; resolve it with `portageq get_repo_path / gentoo`.
|
||||
- Search current eclass/construct usage and gentoo.git pickaxe (`-S`) history for adoption or removal; the skill supplies runnable searches.
|
||||
- Before inheriting, read supported EAPIs, deprecation status, pre-inherit/call-time variables, exports, phases, and defaults.
|
||||
- On EAPI bumps, audit the whole ebuild, including disabled USE branches, generated dependencies, dead helpers, and changed eclass defaults.
|
||||
- Compose overlapping exported phases explicitly. Overrides call the eclass implementation where its behavior must remain; `default` invokes the EAPI implementation.
|
||||
- Prefer clear phase code over inheriting an eclass for one helper when current precedent agrees. Leave eclass-owned assignments to the eclass: `git-r3` appends `PROPERTIES="live"`; `cargo` owns `CARGO_HOME`; `go-module` owns `GOCACHE`, `GOMODCACHE`, and `GOPROXY`.
|
||||
- `cargo.eclass` `GIT_CRATES` writes `[patch.'<git url>']`, which cannot override upstream `[patch.crates-io] name = { git = … }`. Keep `GIT_CRATES` for `SRC_URI`; rewrite that upstream entry to `path = "${WORKDIR}/<repo>-<commit>"` in `src_prepare`. Match `Cargo.lock`'s URL exactly, including renamed organizations and `RedirectedUrl` findings: Cargo keys offline sources by that string.
|
||||
- `metadata/install-qa-check.d/60go-module-eclass` takes the highest `go` directive across all `${WORKDIR}` modules. Remove an unused sub-module in `src_prepare` only when no build, test, or install path uses it; otherwise raise the floor.
|
||||
@@ -2,37 +2,13 @@
|
||||
|
||||
Read with: `AGENTS.md` § Git Workflow for the PR-scope rules; `pr-text.md` before committing.
|
||||
|
||||
Complete preflight before the first edit, and repeat it only if the state is no longer known.
|
||||
Complete preflight before editing; repeat when state becomes uncertain. `master` is an upstream-sync branch.
|
||||
|
||||
Treat `master` only as an upstream-sync branch.
|
||||
|
||||
- Start with `git status --short --branch`.
|
||||
- Use one topic branch per logical PR. Create new work from local `master` freshly synced with `<canonical>/master`; prefer `category-package-version` for bumps.
|
||||
- When resuming, reuse the correct topic branch.
|
||||
- Before preparing a PR, fetch the canonical remote and rebase the topic branch onto `<canonical>/master`. A stale base makes GitHub report the PR out of date.
|
||||
- Re-fetch the canonical remote before stating that a commit or PR is merged, and before basing follow-up work on it. A stale ref reports the opposite.
|
||||
- Compare and open against `<canonical>/master`, never the personal fork's `master`. The fork lags and inflates the diff with unrelated commits.
|
||||
- When fresh state is needed, find an existing remote for one of these, matching the GitHub owner and repository case-insensitively.
|
||||
|
||||
```text
|
||||
git@github.com:gentoo-zh/overlay.git
|
||||
https://github.com/gentoo-zh/overlay.git
|
||||
git@github.com:microcai/gentoo-zh.git
|
||||
https://github.com/microcai/gentoo-zh.git
|
||||
```
|
||||
|
||||
- Support both fork clones (`origin` is personal) and direct clones (`origin` is canonical). Use the existing canonical remote, whatever its name is.
|
||||
- If neither remote exists, add `upstream` as `https://github.com/gentoo-zh/overlay.git`.
|
||||
- Fetch the canonical remote before using its state, and ensure `<canonical>/HEAD` resolves; run `git remote set-head <canonical> master` if it does not.
|
||||
- pkgcheck's git checks depend on that head independently of any explicit commit range.
|
||||
- If the fetch fails, stop and report the current URL and error; do not rewrite or bypass it.
|
||||
- Push only topic branches to an unambiguous personal fork, never `master` or the canonical remote. Use `--force-with-lease` after a rebase.
|
||||
- A missing or ambiguous personal fork blocks publishing, not local editing.
|
||||
- For non-ebuild changes, check `scripts/emerge-targets.sh` `ignore_list` so paths are not interpreted as package atoms.
|
||||
- Stop before editing if any of these holds:
|
||||
|
||||
- The canonical remote is ambiguous.
|
||||
- A required `master` sync fails.
|
||||
- A branch cannot be created safely.
|
||||
- Unrelated changes make staging ambiguous.
|
||||
- The request spans unrelated PRs.
|
||||
- Start with `git status --short --branch`. Use one topic branch per logical PR from local `master` freshly synced to `<canonical>/master`; prefer `category-package-version` for bumps. Resume on the existing correct topic branch.
|
||||
- Before preparing a PR, fetch canonical and rebase onto `<canonical>/master`. Fetch again before declaring a commit/PR merged or basing follow-up work on it. Compare and open against `<canonical>/master` so a stale personal fork cannot inflate the diff.
|
||||
- Resolve an existing canonical remote by case-insensitive GitHub owner/repository match: `gentoo-zh/overlay` or `microcai/gentoo-zh`, using SSH or HTTPS.
|
||||
- Reuse that remote's name in both fork and direct clones. If absent, add `upstream` at `https://github.com/gentoo-zh/overlay.git`.
|
||||
- Fetch before using canonical state. Ensure `<canonical>/HEAD` resolves; set it with `git remote set-head <canonical> master` if needed. pkgcheck requires that head independently of the scan range. On fetch failure, stop and report the existing URL and error; do not rewrite or bypass the remote.
|
||||
- Apply `AGENTS.md` § Git Workflow for push targets; use `--force-with-lease` after rebasing. A missing or ambiguous personal fork blocks publishing only; local editing may continue.
|
||||
- Repository metadata lives in `metadata/` and `profiles/`; CI lives in `.github/`. For non-ebuild changes, check `scripts/emerge-targets.sh` `ignore_list` so paths stay outside package targets.
|
||||
- Stop before editing on an ambiguous canonical remote, failed required `master` sync, unsafe branch creation, ambiguous staging caused by unrelated changes, or a request spanning unrelated PRs.
|
||||
+15
-15
@@ -1,30 +1,30 @@
|
||||
## Kernel Packages
|
||||
|
||||
Read with: `version-bumps.md` for a bump; `new-packages.md` for a new kernel package; `prebuilt-binaries.md` for a `-kernel-bin`; `pr-text.md` before committing.
|
||||
Read with: `version-bumps.md` for release, source-host, and retention policy; `new-packages.md` for tracking entries; `prebuilt-binaries.md` for `-kernel-bin`; `pr-text.md` before committing.
|
||||
|
||||
The overlay carries seven kernel packages, all inheriting `cjktty`: `gentoo-cjk-sources`, `gentoo-cjk-kernel`, and `gentoo-cjk-kernel-bin` (the dist-kernel source, self-built, and prebuilt forms); `cachyos-sources`, `xanmod-sources`, and `liquorix-sources` (downstream source kernels); and `xanmod-kernel` (a dist-kernel built from the XanMod patch). Every one of them carries `CJKTTY_PV` and is coupled to cjktty's live bytes.
|
||||
The seven kernel packages below inherit `cjktty`, carry `CJKTTY_PV`, and share its live patch bytes. `gentoo-cjk-*` are source, self-built, and prebuilt dist-kernel forms; CachyOS, XanMod, and Liquorix provide downstream sources; `xanmod-kernel` builds a dist-kernel from XanMod patches.
|
||||
|
||||
- Each kernel package follows its own upstream, not kernel.org: `gentoo-cjk-*` follows `::gentoo`'s `gentoo-kernel` and `gentoo-sources` on the branches this overlay already carries; `cachyos-sources` follows CachyOS, `xanmod-*` follows XanMod, `liquorix-sources` follows Liquorix. Decide a bump from that upstream's newest release on the branch.
|
||||
- Copy per-version variables from the same-version upstream ebuild or release; never derive them from the version number. `PATCHSET` in particular lags its branch.
|
||||
- `CJKTTY_PV` is the version suffix of the cjktty patch file the package applies. It changes whenever the patch changes, inside a branch as well as across branches.
|
||||
- A point release reuses the current cjktty patch unless upstream touched a file the patch touches. Take the file list from the patch itself (`grep '^+++ b/' cjktty-code-${CJKTTY_PV}.patch`), intersect it with the incremental `.../incr/patch-A-B.xz`, and keep the patch and `CJKTTY_PV` only when the intersection is empty. Do not keep a hand-written path list.
|
||||
- `cjktty.eclass` points `SRC_URI` at raw addresses on `cjktty-patches` `master`, so those distfiles are live bytes: a change in that repository stales every Manifest that names them. Regenerate them together, after confirming the distdir copy equals `master`'s current bytes; `pkgdev manifest` rehashes whatever is in the distdir, and mirrors cache old copies.
|
||||
- The downstream kernels pin commit- or release-specific bytes: CachyOS patch, config, and rebase inputs by commit, XanMod's SourceForge `patch-<ver>-xanmod<N>.xz`, Liquorix's zen-kernel `v<ver>-lqx<N>.patch.xz`. Reuse the exact host and naming the existing `SRC_URI` uses; never switch source or invent a filename.
|
||||
- For a `-bin` gpkg, regenerate the Manifest from a real download and cross-check each entry's size against the source's HTTP `content-length`; never paste a hash from elsewhere.
|
||||
- A `-bin` gpkg is built after the fact, so a source bump usually lands before its binary exists. Land the source, kernel, and virtual first, the virtual listing only the source provider; add `-bin` and its virtual entry in a second PR once the gpkg is published. A `-bin` trailing its source sibling by one point release is expected, not a retention that needs explaining.
|
||||
- In a `virtual/dist-kernel-*-r100` `||` group the order is the preference order: list `-bin` first so portage installs the prebuilt kernel, then the source package, then any other provider such as `xanmod-kernel`.
|
||||
- A new kernel package takes its shape from the row below that matches its model: `kernel-2` + `cjktty` for a `-sources`, `kernel-build` for a self-built dist-kernel, `kernel-install` for a `-bin`. It gets its own `overlay.toml` entry, a dist-kernel provider gets its `virtual/dist-kernel-*` entry, and this table gets a row.
|
||||
- Gentoo's personal mirrors (`dev.gentoo.org/~<dev>`) can lag `distfiles.gentoo.org` for a new genpatches, so a `DeadUrl` there is often mirror lag. Re-check the primary mirror before acting.
|
||||
- Follow each package's upstream: `gentoo-cjk-*` uses `::gentoo`'s `gentoo-kernel`/`gentoo-sources` on existing overlay branches; `cachyos-sources` uses CachyOS, `xanmod-*` XanMod, and `liquorix-sources` Liquorix. Choose that upstream's newest release on the branch.
|
||||
- `CJKTTY_PV` is the applied patch filename's version suffix; update it when the patch changes, including within a branch.
|
||||
- On point releases, derive touched paths from the cjktty patch and intersect them with upstream's incremental `.../incr/patch-A-B.xz`. Reuse the patch and `CJKTTY_PV` only for an empty intersection.
|
||||
- `cjktty.eclass` fetches raw `cjktty-patches` `master` bytes. A change stales every referencing Manifest: regenerate them together after verifying cached distfiles equal current `master`. `pkgdev manifest` rehashes the distdir copy, and mirrors can cache old bytes.
|
||||
- Pin downstream bytes: CachyOS patch/config/rebase inputs by commit, XanMod SourceForge `patch-<ver>-xanmod<N>.xz`, and Liquorix zen-kernel `v<ver>-lqx<N>.patch.xz`. Apply `version-bumps.md` source-host policy.
|
||||
- For `-bin` gpkg Manifests, use a real download and verify each size against HTTP `content-length`; never paste a hash from elsewhere; apply `qa.md` § Manifest.
|
||||
- Because gpkg follows the source build, land source, kernel, and virtual first with only the source provider listed. Add published `-bin` and its virtual entry in a second PR. A one-point-release lag is expected retention.
|
||||
- Each new dist-kernel appears in that version's `virtual/dist-kernel-*-r100` `||` list; create the virtual for new versions. Otherwise Portage can satisfy `PDEPEND` by installing a second kernel. List only published providers, in order: `-bin`, source, then other providers such as `xanmod-kernel`.
|
||||
- One version's source, binary, and virtual land in one commit because their mutual references must resolve for pkgcheck.
|
||||
- Match the model below for new kernels: `kernel-2` + `cjktty` for `-sources`, `kernel-build` for self-built dist-kernels, `kernel-install` for `-bin`. Add a table row and tracking entry per `new-packages.md`; apply the virtual-provider rule above.
|
||||
- Personal Gentoo mirrors (`dev.gentoo.org/~<dev>`) may lag `distfiles.gentoo.org` for new genpatches; verify the primary mirror before acting on `DeadUrl`.
|
||||
|
||||
### What each bump checks
|
||||
|
||||
Every variable below is compared with the same-version upstream ebuild or release on every bump and copied when it differs; the last column names values that only change when upstream changes its scheme.
|
||||
Copy variable values from the same-version upstream ebuild or release on every bump; `PATCHSET` can lag its branch. The final column changes only with upstream's scheme.
|
||||
|
||||
| Package | Check against the same version of | Variables | Fixed by design |
|
||||
| --- | --- | --- | --- |
|
||||
| `gentoo-cjk-sources` | `gentoo-sources` | `K_GENPATCHES_VER`, `K_WANT_GENPATCHES`, `CJKTTY_PV` | the all-arch `KEYWORDS` |
|
||||
| `gentoo-cjk-kernel` | `gentoo-kernel` | `PATCHSET`, `CONFIG_VER`, `GENTOO_CONFIG_P`, `SHA256SUM_DATE`, `DEBIAN_COMMIT`, `CJKTTY_PV` | |
|
||||
| `gentoo-cjk-kernel-bin` | `gentoo-kernel-bin`; gpkg on `distfiles.gentoozh.org/gentoo-cjk-kernel/amd64/<major.minor>/` | `PATCHSET`, `SHA256SUM_DATE`, `CJKTTY_PV`; Manifest from the real download | |
|
||||
| `gentoo-cjk-kernel-bin` | `gentoo-kernel-bin`; gpkg on `distfiles.gentoozh.org/gentoo-cjk-kernel/amd64/<major.minor>/` | `PATCHSET`, `SHA256SUM_DATE`, `CJKTTY_PV`; gpkg checks above | |
|
||||
| `cachyos-sources` | CachyOS repositories; `gentoo-sources` for genpatches | `CACHYOS_PATCHES_COMMIT`, `CACHYOS_CONFIGS_COMMIT`, `CACHYOS_PR`, `ZFS_COMMIT`, `K_GENPATCHES_VER`, `CJKTTY_PV`; the version path embedded in the rebase URI | `UNIPATCH_EXCLUDE`, `K_NO_VERSION_CHECK` |
|
||||
| `xanmod-sources` | XanMod on SourceForge; `gentoo-sources` for genpatches | `K_GENPATCHES_VER`, `CJKTTY_PV`, `XANMOD_VERSION` (the spin number in `patch-<PV>-xanmod<N>.xz`) | |
|
||||
| `xanmod-kernel` | `gentoo-kernel` on the same branch; XanMod on SourceForge | `PATCHSET`, `CJKTTY_PV`, `XV` (the XanMod spin number), `LLVM_COMPAT` when upstream's clang support changed; the matching `virtual/dist-kernel` entry | |
|
||||
|
||||
@@ -2,25 +2,15 @@
|
||||
|
||||
Read with: `eclass-discovery.md` before choosing an eclass; `prebuilt-binaries.md` for a prebuilt payload; `desktop-integration.md` for a desktop application; `openrc-systemd.md` for a service; `kernels.md` for a kernel package; `pr-text.md` before committing.
|
||||
|
||||
- Before drafting, search this overlay and the main tree for the same project, former names, forks, and truly comparable packages.
|
||||
- Start a fork of a `::gentoo` package from its current ebuild, preserve its explanatory comments, and justify every remaining difference. Do not reintroduce patches, USE flags, or workarounds that `::gentoo` has dropped.
|
||||
- Identify its fixed source artifact, license, build system, runtime files, and tested arches before drafting.
|
||||
- Take the shape from that precedent—metadata order, dependency layout, phase set, eclass stack. When upstream ships several packages, a sibling already in the main tree is the closest precedent.
|
||||
- Update `.github/workflows/overlay.toml` in the same PR for every new package, inserting the entry in `category/package` alphabetical order.
|
||||
- A dist-kernel package added at a version must appear in that version's `virtual/dist-kernel-*-r100` `||` list, and a new version needs that virtual created.
|
||||
- Leaving it out makes Portage satisfy the `PDEPEND` from a provider that is listed and install a second kernel.
|
||||
- One version's source, binary, and virtual land in one commit. They name each other, so any half alone fails `pkgcheck`.
|
||||
- List a provider only after its artifact is published. `kernels.md` gives the provider order inside `||` and the two-PR sequence for a `-bin`.
|
||||
- Add an active `["category/package"]` table in `.github/workflows/overlay.toml` when releases are trackable, otherwise a commented `#["category/package"]` block giving the reason: live-only or synced elsewhere.
|
||||
- When tracking tags and the repository's tags include other packages or other version schemes, add `use_max_tag = true` and an `include_regex` that matches only this package's versions, as `app-editors/xed` does.
|
||||
- `acct-*`, `virtual` and `app-alternatives` packages are commented entries too, without a reason.
|
||||
- Field conventions: `use_latest_release = true` when upstream publishes releases, `use_latest_tag = true` when it only tags; `prefix = "v"` when tags carry a `v` the ebuild version does not; `github_account = "<GitHub login>"` of the packager, so the nvchecker issue reaches them; `autobump = true` only when the packager opts in and a bump is a rename plus `pkgdev manifest`. An entry preceded by `# autobump off:` stays without `autobump = true` until the comment's reason is resolved.
|
||||
- A package whose `SRC_URI` downloads a per-version bundle from `gentoo-zh/gentoo-deps` adds `deps = "<LANG>"` to its table, with `vendordir`, `workdir` or `modules` when the generator needs them; a `gentoo-zh-drafts` producer uses the full `bundle` form. `scripts/autobump.md` describes both.
|
||||
- Before drafting, search both trees for the project, former names, forks, and comparable packages. Identify fixed source, license, build system, runtime files, and tested arches.
|
||||
- Base a `::gentoo` fork on its current ebuild, preserving explanatory comments and justifying every difference. Keep patches, USE flags, and workarounds aligned with what the current main-tree ebuild retains.
|
||||
- Follow precedent for metadata order, dependency layout, phases, and eclasses; a main-tree sibling is closest for multi-package upstreams.
|
||||
- Apply `kernels.md` for dist-kernel virtuals, provider order, commit grouping, and publication sequence.
|
||||
- Add every new package to `.github/workflows/overlay.toml` in the same PR, sorted by `category/package`.
|
||||
- Trackable releases get an active `["category/package"]` table. Live-only or externally synced packages get a commented `#["category/package"]` block with the reason; `acct-*`, `virtual`, and `app-alternatives` get commented entries without a reason.
|
||||
- For tag repositories mixing packages or version schemes, use `use_max_tag = true` and a package-specific `include_regex`, as in `app-editors/xed`.
|
||||
- Set `use_latest_release = true` for releases or `use_latest_tag = true` for tags only; `prefix = "v"` strips upstream's tag prefix from ebuild versions. `github_account = "<GitHub login>"` identifies the packager receiving nvchecker issues. `autobump = true` requires opt-in and a rename-plus-Manifest bump; resolve a preceding `# autobump off:` reason before enabling it.
|
||||
- For per-version `gentoo-zh/gentoo-deps` bundles, set `deps = "<LANG>"` with `vendordir`, `workdir`, or `modules` as needed. For `gentoo-zh-drafts`, use the full `bundle` form. Set these when introducing such downloads on bumps too; `scripts/autobump.md` defines both forms for future bundle preparation. Go vendor bundles unpack to `${P}/vendor/` so go-module finds `${S}/vendor`; top-level `./vendor/` is a layout error.
|
||||
- Add `files/` assets only when phases cannot generate them cleanly.
|
||||
- Check version overlap with `::gentoo` before masking: this overlay's `profiles/package.mask` is repository-scoped, so masking a version also carried by `::gentoo` makes Portage pick that copy.
|
||||
- Stop when any of these holds:
|
||||
|
||||
- Licensing or redistribution is unclear.
|
||||
- Downloads require credentials or click-through terms.
|
||||
- Naming or category is ambiguous.
|
||||
- Substantial patching or vendoring needs a maintainer decision.
|
||||
- Check version overlap with `::gentoo` before masking. This overlay's `profiles/package.mask` is repository-scoped, so masking a shared version selects the main-tree copy.
|
||||
- Stop for unclear licensing/redistribution, downloads requiring credentials or click-through terms, ambiguous names/categories, or substantial patching/vendoring needing a maintainer decision.
|
||||
@@ -2,21 +2,18 @@
|
||||
|
||||
Read with: `dependencies.md` for the revbump a changed unit or script needs; `new-packages.md` or `version-bumps.md` for the change itself.
|
||||
|
||||
- On OpenRC, depend on `virtual/udev` or `virtual/tmpfiles` for those helpers. Neither provider ships `systemctl` or a service manager.
|
||||
- Depend on `sys-apps/systemd` only for what `systemd-utils` does not ship, such as `systemctl` or `libsystemd`.
|
||||
- That dependency blocks `elogind` and `systemd-utils`, which an OpenRC install normally has. Say so instead of restoring an any-of that `systemd-utils` cannot satisfy.
|
||||
- Do not default a `systemd` USE flag on; the profile decides, and forcing it drags systemd into an OpenRC install for an optional hook.
|
||||
- A package that installs a unit for a long-running service installs an OpenRC script too. A variant that only differs by a flag becomes a conf.d variable.
|
||||
- A template unit is one script, not one per instance: install it under the plain name and read the instance from `${RC_SVCNAME#*.}`. The admin symlinks `/etc/init.d/<name>.<instance>` to it, as `net-analyzer/nfdump` documents in its own script.
|
||||
- That one script also serves the plain unit of the same name. Without a suffix `${RC_SVCNAME#*.}` returns the service name itself, so give that case a default or refuse it with a message.
|
||||
- Take the script's shape from `net-dns/knot-resolver/files/kresd.initd-r2`: conf.d variables with defaults, `command_background` with a `pidfile`, `command_user`, `capabilities`, and `checkpath` in `start_pre`.
|
||||
- Do not add `supervisor=supervise-daemon` to emulate `Restart=`. OpenRC does not supervise by default, and a unit that says `Restart=no` must not be restarted automatically.
|
||||
- Map the unit's fields: `AmbientCapabilities` to `capabilities`, `LimitNOFILE` to `rc_ulimit`, `Environment` to `export`, `WorkingDirectory` to `directory`.
|
||||
- `RuntimeDirectory` becomes `checkpath -d` in `start_pre`; an `ExecStartPost` that waits for a path becomes `ewaitfile` in `start_post`.
|
||||
- Remove the socket in `stop_post`, as `sys-apps/dbus` does. A `start_post` that fixes its mode otherwise lands on a stale file the daemon then replaces.
|
||||
- `capabilities` takes cap_iab(3) text: `^cap_x` grants it in the ambient set and `!cap_x` drops it from the bounding set.
|
||||
- Use `required_files` for a config the daemon cannot start without. Do not require one the daemon creates itself on first run.
|
||||
- Do not set `umask` to fix one file's mode; it applies to everything the daemon creates. Fix the specific path instead.
|
||||
- `output_log` is not the default. Under `command_user`, put the file in a directory that user owns, because `start-stop-daemon` opens the redirection after dropping privilege.
|
||||
- An installed unit's `ExecStart` must name the path the ebuild installs to. `newsbin` puts the program in `/usr/sbin` while the upstream unit still says `/usr/bin`.
|
||||
- Start the service and exercise what it does: a port that answers, a socket the CLI talks to, traffic that reaches the far end. `rc-service start` returning `[ ok ]` says nothing about whether the daemon stayed up. Without an OpenRC system, install the package, record the script as untested in the completion report, and fix problems reported back against it.
|
||||
- On OpenRC, use `virtual/udev` and `virtual/tmpfiles` for those helpers; their providers supply neither `systemctl` nor a service manager.
|
||||
- Require `sys-apps/systemd` only for features absent from `systemd-utils`, such as `systemctl` or `libsystemd`. That blocks the `elogind` and `systemd-utils` an OpenRC install normally has: report the conflict instead of restoring an any-of that `systemd-utils` cannot satisfy.
|
||||
- Leave the `systemd` USE default to profiles, so optional hooks remain optional on OpenRC.
|
||||
- Long-running service units include an OpenRC script. Express flag-only variants as conf.d variables.
|
||||
- A template and plain unit share one plain-named script. Read `${RC_SVCNAME#*.}` for instances; admins symlink `/etc/init.d/<name>.<instance>` to it, as in `net-analyzer/nfdump`. Without a suffix it returns the service name: provide a default or refuse with a message.
|
||||
- Follow `net-dns/knot-resolver/files/kresd.initd-r2`: conf.d defaults, `command_background` with `pidfile`, `command_user`, `capabilities`, and `checkpath` in `start_pre`.
|
||||
- Preserve OpenRC's unsupervised default when translating `Restart=`; leave `supervisor` unset for that purpose. `Restart=no` stays without automatic restarts.
|
||||
- Map `AmbientCapabilities` to `capabilities`, `LimitNOFILE` to `rc_ulimit`, `Environment` to `export`, and `WorkingDirectory` to `directory`.
|
||||
- Map `RuntimeDirectory` to `checkpath -d` in `start_pre`; use `ewaitfile` in `start_post` for an `ExecStartPost` path wait.
|
||||
- Remove sockets in `stop_post`, as `sys-apps/dbus` does, so `start_post` mode fixes target the new socket.
|
||||
- `capabilities` uses cap_iab(3): `^cap_x` grants ambient capabilities; `!cap_x` drops bounding-set capabilities.
|
||||
- `required_files` lists only startup prerequisites, excluding files the daemon creates on first run. Fix individual path modes directly; `umask` affects all daemon-created files.
|
||||
- Add `output_log` only when needed. Under `command_user`, its directory belongs to that user because `start-stop-daemon` opens redirection after dropping privilege.
|
||||
- Installed `ExecStart` paths match ebuild destinations, including `/usr/sbin` for `newsbin`.
|
||||
- Start the service and exercise its function: a responsive port, CLI socket, or end-to-end traffic. Verify the daemon stays running after startup. Without OpenRC, install the package, report the script untested, and fix reported problems.
|
||||
+57
-98
@@ -4,120 +4,79 @@ Read with: `git-workflow.md` for branch, rebase, and push; `version-bumps.md` §
|
||||
|
||||
### Subject
|
||||
|
||||
- Take `pkgdev`'s final English subject verbatim as the PR title. Never translate or reword it.
|
||||
- Where a PR carries more than one commit, use the subject of the commit carrying its main change.
|
||||
- A package subject is `category/package: summary`. A bump is `category/package: add NEW`, with `, drop OLD` only when dropping.
|
||||
- A package's first commit is `category/package: new package, add NEW`. Later versions of it drop the `new package` clause.
|
||||
- A non-package change instead names an eclass (`name.eclass:`) or the affected path or filename—`profiles:`, `licenses:`, `package.mask:`, this overlay's own `AGENTS.md:`—whatever lets a reader identify what changed.
|
||||
- The subject is one unwrapped line, at most 69 characters (GLEP 66) where the prefix permits.
|
||||
- Use pkgdev's final English subject verbatim as PR title; for multiple commits, choose the main change's subject.
|
||||
- Use `category/package: summary`; bumps use `category/package: add NEW`, adding `, drop OLD` only when dropping. First package commits use `category/package: new package, add NEW`; later versions omit `new package`.
|
||||
|
||||
```text
|
||||
category/package: new package, add NEW
|
||||
category/package: add NEW
|
||||
category/package: add NEW, drop OLD
|
||||
```
|
||||
|
||||
- Prefix non-package subjects with the affected eclass/path/file, e.g. `name.eclass:`, `profiles:`, `licenses:`, `package.mask:`, or `AGENTS.md:`. Keep one unwrapped line, at most 69 characters where the prefix permits (GLEP 66).
|
||||
|
||||
### Commit body
|
||||
|
||||
- Add a body only when the subject cannot carry the reason; use subject / blank line / body.
|
||||
- The commit body carries only the reason. Do not narrate steps, restate the diff, or report a passing build, test, or scan.
|
||||
- Do not lecture on a mechanism a Gentoo reviewer already knows; link the upstream source instead.
|
||||
- The subject already carries the package, version, and add/drop. The body repeats none of them and states each value once.
|
||||
- Do not open the body by restating the title (no `更新到 <version>` line).
|
||||
- Give each changed dependency, phase function, patch, USE flag, `RESTRICT`, or revbump its own line, applying the causality rule in § Writing below.
|
||||
- Do not invent causality the evidence lacks, or fold an unrelated fact into a parenthetical.
|
||||
- For a large rewrite or upstream restructure, name the rewritten scope instead of enumerating per change. Add a line only for an unexpected behavioral shift.
|
||||
- When upstream drove that rewrite, give one line in the form 因为上游修改了 X,所以重写 Y.
|
||||
- Put variables, atoms, commands, options, and `FEATURES` values in backticks.
|
||||
- Add a body only for rationale the subject cannot carry, separated by a blank line. State each value once; keep package/version/add-drop in the subject and routine passing results in the completion report. Do not open the body by restating the subject (no `更新到 <version>` line). Link upstream evidence for mechanisms Gentoo reviewers already know.
|
||||
- Give each changed dependency, phase, patch, USE flag, `RESTRICT`, or revbump its own evidence-backed causal line per § Writing. Keep unrelated facts separate.
|
||||
- For large rewrites or upstream restructuring, name the rewritten scope and its cause in one line; add lines only for unexpected behavior changes.
|
||||
|
||||
### PR body
|
||||
|
||||
- Write the PR body in Chinese when the human directing the current work item writes in Chinese; otherwise use English. Never use both languages.
|
||||
- The PR body carries the same rationale as the commit body.
|
||||
- Do not report passing tests or which arches were tested; the checklist and CI attest those. A test earns a mention only when it forced a change.
|
||||
- A routine or behavior-neutral change needs only `Closes #N` when it closes an overlay issue.
|
||||
- Use Chinese when the directing human writes in Chinese; otherwise English. Keep one language and the commit body's rationale.
|
||||
- Keep the reason paragraph to rationale; mention tests there only when they forced a change. Record actual execution per § Opening the PR.
|
||||
- For a routine or behavior-neutral change closing an overlay issue, use `Closes #N` followed by the template.
|
||||
|
||||
Illustrative completed templates: a routine bump, then two dependency changes. These examples assume the explicit-range scan and stated checks passed.
|
||||
|
||||
```text
|
||||
因为上游修复了启动失败,所以更新版本。
|
||||
|
||||
Closes #N
|
||||
|
||||
Tested: amd64 OpenRC 和 systemd:`emerge` 安装;启动一次。
|
||||
|
||||
- [x] `pkgcheck scan --commits=<merge-base>..HEAD --net` is clean, or the PR changes no ebuild
|
||||
- [x] AI-assisted work, if any, follows AGENTS.md and I tested its output
|
||||
```
|
||||
|
||||
```text
|
||||
因为程序通过 `dlopen` 加载 libcurl,所以增加 `net-misc/curl` 运行依赖。
|
||||
因为程序直接链接 libfmt,所以使用 `dev-libs/libfmt:=`,使 subslot 变化触发重建。
|
||||
|
||||
Closes #N
|
||||
|
||||
Tested: amd64 OpenRC:`emerge` 安装;启动一次。
|
||||
|
||||
- [x] `pkgcheck scan --commits=<merge-base>..HEAD --net` is clean, or the PR changes no ebuild
|
||||
- [x] AI-assisted work, if any, follows AGENTS.md and I tested its output
|
||||
```
|
||||
|
||||
### Issue references and trailers
|
||||
|
||||
- Keep overlay GitHub issues as bare `Closes #N` in the PR body; never pass their number or URL to `pkgdev commit -b/--bug` or `-c/--closes`, or rewrite them as Gentoo Bugzilla URLs.
|
||||
- For those `pkgdev` options, a bare number means a Gentoo Bugzilla ID; a non-numeric value requires a full HTTP(S) URL. `FIXED`, `OBSOLETE`, and `PKGREMOVED` apply only to Gentoo Bugzilla bugs.
|
||||
- Let `pkgdev` generate trailers. Sign off with the contributor's real identity and email, never a GitHub noreply address such as `<id>+<user>@users.noreply.github.com`.
|
||||
- Do not add AI, generated-by, or `Co-Authored-By` attribution.
|
||||
- Place overlay issues as bare `Closes #N` on a separate line after the reason in the PR body. Never pass an overlay issue number or URL to `pkgdev commit -b/--bug` or `-c/--closes`, or rewrite it as a Bugzilla URL. For those options, bare numbers denote Gentoo Bugzilla; non-numeric values require full HTTP(S) URLs. `FIXED`, `OBSOLETE`, and `PKGREMOVED` apply only to Gentoo Bugzilla.
|
||||
- Let pkgdev generate trailers. Sign off with the contributor's real identity and email, excluding GitHub noreply addresses. Attribution is human-only, without AI, generated-by, or `Co-Authored-By` additions.
|
||||
|
||||
### Commits
|
||||
|
||||
- Land each logical change as one clean squashed commit. In a multi-package PR that means one commit per package, never two packages combined.
|
||||
- Every commit stands alone and leaves the tree installable: keep an ebuild with its `Manifest`, `metadata.xml`, and any new `licenses/`, `files/`, or eclass it references in that same commit.
|
||||
- In a multi-commit PR, order commits so a shared prerequisite lands in or before the first commit that uses it: a new license, eclass, or depended-on package.
|
||||
- Commit with `pkgdev commit --scan false --signoff --gpg-sign`; if GPG is unavailable, omit `--gpg-sign`. Never use raw `git commit`.
|
||||
- Squash each logical change into one clean commit; multi-package PRs use one commit per package, except that `kernels.md` lands one kernel version's source, binary, and virtual in one commit.
|
||||
- Each commit leaves the tree installable: include its ebuild, `metadata.xml`, and referenced new `licenses/`, `files/`, or eclasses. Apply `AGENTS.md` § Git Workflow for the Manifest. Shared prerequisites land in or before their first consumer commit.
|
||||
- Never substitute `git commit` for pkgdev; use `pkgdev commit --scan false --signoff --gpg-sign`, omitting `--gpg-sign` if GPG is unavailable.
|
||||
|
||||
### Opening the PR
|
||||
|
||||
- Keep the PR template: put the description above its marker, leave the checklist intact, and tick only checks that ran.
|
||||
- Before opening or updating a PR (`gh pr create`/`gh pr edit`), show the human the exact title, body, and files, and get confirmation for that specific PR.
|
||||
- A blanket or batch go-ahead is not per-PR confirmation, drafts included.
|
||||
- Open the PR yourself only for a routine bump: an ebuild rename plus `pkgdev manifest`, or a version variable such as a build id, with nothing else changed.
|
||||
- Any other change stops at the fork. Push the topic branch, hand the human the drafted subject and body with its compare link against `<canonical>/master`, and let them open the PR.
|
||||
|
||||
```text
|
||||
https://github.com/gentoo-zh/overlay/compare/master...<fork-owner>:<fork-repo>:<branch>
|
||||
```
|
||||
|
||||
- Watch CI and fix failures from their logs rather than guessing.
|
||||
|
||||
Non-version-bump commit example:
|
||||
|
||||
```text
|
||||
category/package: short description
|
||||
|
||||
Essential reason, only when the subject cannot carry it.
|
||||
Reference related bugs or issues when relevant.
|
||||
```
|
||||
|
||||
Version-bump subjects (choose one):
|
||||
|
||||
```text
|
||||
category/package: new package, add new_version
|
||||
```
|
||||
|
||||
```text
|
||||
category/package: add new_version
|
||||
```
|
||||
|
||||
```text
|
||||
category/package: add new_version, drop old_version
|
||||
```
|
||||
|
||||
PR body examples—a routine bump, a single change, one change with two reasons, then several changes:
|
||||
|
||||
```text
|
||||
Closes #<issue>
|
||||
```
|
||||
|
||||
```text
|
||||
在 `RDEPEND` 中增加 `dev-libs/libfoo`,因为已安装的文件需要 `libfoo.so`。Closes #<issue>
|
||||
```
|
||||
|
||||
```text
|
||||
因为测试会导入 `media-sound/feeluown`,但将它加入测试依赖会造成循环依赖;测试还需联网访问 YouTube Music API,无法在 `FEATURES=network-sandbox` 下运行,所以增加 `RESTRICT=test`。Closes #<issue>
|
||||
```
|
||||
|
||||
```text
|
||||
上游 `FindLibCURL.cmake` 会在构建时通过 `FetchContent` 下载固定版本的 curl 头文件。Closes #<issue>
|
||||
|
||||
1. 因为该下载会被 `FEATURES=network-sandbox` 阻止,所以改为离线提供:在 `SRC_URI` 加入该版本的 curl 头文件包,并通过 `-DFETCHCONTENT_SOURCE_DIR_LIBCURLHEADERS` 指向解包目录。
|
||||
2. 因为程序运行时通过 `dlopen` 加载 libcurl,所以 `RDEPEND` 增加 `net-misc/curl`。
|
||||
3. 因为程序直接链接 libfmt,所以将依赖改为 `dev-libs/libfmt:=`,使当前包在 libfmt 的 subslot 变化时重新构建。
|
||||
```
|
||||
- Replace the first template comment with the reason. Fill `Tested:` with the actual emerge, profiles/arches, and smoke test, or `not run: reason`. Keep both checkboxes and tick each only when its statement is true for this PR. Tick pkgcheck only after the explicit-range commit scan in `qa.md` passes, or when no ebuild changed.
|
||||
- Before `gh pr create`/`gh pr edit`, show the exact title, body, and files and obtain confirmation for that specific PR, including drafts. Batch authorization requires per-PR confirmation.
|
||||
- Open only routine bumps yourself: ebuild rename plus `pkgdev manifest`, or a version variable such as a build id, with no other change. For other changes, push the fork topic branch and hand over the drafted subject/body and canonical compare link for the human to open.
|
||||
`https://github.com/gentoo-zh/overlay/compare/master...<fork-owner>:<fork-repo>:<branch>`
|
||||
- Watch CI and fix failures using its logs.
|
||||
|
||||
## Writing
|
||||
|
||||
Use one standard for commit messages, PRs, comments, notes, and replies: precise, plain, and short.
|
||||
Use precise, plain, short prose for commits, PRs, comments, notes, and replies.
|
||||
|
||||
- Name concrete variables, phases, USE flags, `FEATURES`, eclasses, and commands, not a vague paraphrase or adjective. Use current Gentoo terminology.
|
||||
- Avoid colloquial wording, needless language mixing, unsupported absolutes, marketing, and filler.
|
||||
- Name a thing by its ecosystem's term or concrete behavior, never an ad-hoc coinage.
|
||||
- State a reason as an explicit because/so (因为…所以…) cause and effect. Never a vague linker like "correspondingly"/相应.
|
||||
- A reason is not a restatement of `name = value` metadata.
|
||||
- Chinese may use Traditional or Simplified characters. Use standard Mandarin wording readily understood across regions; avoid region-specific terms.
|
||||
- Do not set off Chinese words with full-width brackets (`「」`, `『』`); state the term plainly and use backticks only for code and literal values.
|
||||
- Write each language natively: professional but plainly worded, fluent, and causal. Stilted phrasing usually comes from translating the other language word for word—avoid it.
|
||||
|
||||
| Reads naturally | Does not |
|
||||
| --- | --- |
|
||||
| 原生可执行文件移到各平台子包 | 拆成薄 loader |
|
||||
| 因为上游变更了 Go 模块路径,所以 `-ldflags` 中的导入路径需同步更新,否则注入的版本号不正确 | module 改名,相应更新 ldflags |
|
||||
- Name concrete variables, phases, USE flags, `FEATURES`, eclasses, and commands. Use established technical terms and concrete behavior. Keep wording professional and factual; mix languages only where necessary; back absolute claims with evidence. Never coin an ad-hoc term.
|
||||
- State evidence-backed cause and effect explicitly with because/so (因为…所以…), never a vague linker such as correspondingly/相应. Explain the reason beyond metadata values.
|
||||
- Chinese may be Traditional or Simplified; use standard Mandarin understood across regions. Write ordinary words plainly and each language natively, professionally, and fluently.
|
||||
- Do not set off Chinese words with full-width brackets (`「」`, `『』`).
|
||||
- Put variables, atoms, commands, options, `FEATURES`, and other code/literal values in backticks.
|
||||
@@ -1,20 +1,18 @@
|
||||
## Bundled and Prebuilt Binaries
|
||||
|
||||
Read with: `version-bumps.md` or `new-packages.md` for the change itself; `desktop-integration.md` for a desktop application; `openrc-systemd.md` for a service; `kernels.md` for a `-kernel-bin`.
|
||||
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`.
|
||||
|
||||
- For each upstream binary artifact, whitelist only shipped arches (for example `KEYWORDS="-* ~amd64 ~arm64"`) and use per-arch `SRC_URI`. Do not keyword or reference unpublished artifacts.
|
||||
- Set `RESTRICT` from verified stripping and redistribution needs; `strip` and `splitdebug` are distinct.
|
||||
- `QA_PREBUILT` suppresses broad checks, including DT_NEEDED, executable-stack, textrel/W+X, flags, pre-stripped files, and SONAME.
|
||||
- Use `QA_PREBUILT` only for manually reviewed, immutable upstream blobs, scoped to exact installed paths. `RESTRICT=strip`, not `QA_PREBUILT`, prevents stripping.
|
||||
- Audit every installed object: ELF class and machine, interpreter, `NEEDED`, SONAME, RPATH, installed path, required libc/libstdc++ symbol floors, and CPU ISA baseline. Inspect each arch's archive layout and `NEEDED` separately because builds of one release can differ, including linking OpenSSL on only one arch.
|
||||
- Smoke-test amd64. If upstream ships an `arm64` artifact for the same release, add `~arm64` untested. Record the unverified arch in the completion report and fix arch-specific problems on report.
|
||||
- Depend only on what blobs actually link or invoke.
|
||||
- Set each arch's glibc floor in `RDEPEND` as `>=sys-libs/glibc-X`, using the highest `GLIBC_` symbol version from `objdump -T` on that arch's binaries. A static-PIE binary has no `GLIBC_` symbols and needs no floor. Do not use `REQUIRED_USE="elibc_glibc"` because pkgcheck reports error-level `RequiredUseUnsatisfiableInDev` on musl profiles, failing CI for a new package.
|
||||
- An unresolved `NEEDED` entry is a runtime defect even when QA is suppressed. Resolve it through a verified bundled layout or genuine system `RDEPEND`; never suppress it.
|
||||
- A private module may legitimately lack SONAME, but every unusual RPATH needs object-specific justification.
|
||||
- For source-built objects, fix the build, link, and install system first. Use `patchelf` only as an evidence-backed fallback and add it to `BDEPEND`.
|
||||
- A retained private blob may use a verified literal `'$ORIGIN/...'` RPATH.
|
||||
- Replace a bundled component with a system one only after verifying ABI, functionality, and launcher or configuration integration; otherwise stop.
|
||||
- `REQUIRES_EXCLUDE` only filters the generated `REQUIRES`; it does not make a file loadable. Use it for a `NEEDED` that the unresolved-soname QA reports as a false positive: the provider in `RDEPEND` installs the requested filename under a different SONAME (`libbz2.so.1.0` from `app-arch/bzip2`), or the entry belongs to an optional plugin the program never loads without its provider. Otherwise fix the dependency or the layout; do not patch the binary to hide it.
|
||||
- A program that checks its own hash at runtime breaks when stripped. Exclude that file with `dostrip -x <path>`, as `net-proxy/flclash-bin` does; do not set `RESTRICT=strip` for the package.
|
||||
- A prebuilt .NET payload built with `dotnet-pkg-base` needs `DOTNET_PKG_COMPAT` matching the framework its `*.runtimeconfig.json` names; `games-server/vintagestory-server` installed and then failed to start on a mismatch.
|
||||
- Whitelist published artifact arches, e.g. `KEYWORDS="-* ~amd64 ~arm64"`, with per-arch `SRC_URI`. Never keyword or reference an unpublished artifact.
|
||||
- Set `RESTRICT` from verified stripping and redistribution needs; `strip` and `splitdebug` differ.
|
||||
- Scope `QA_PREBUILT` to 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=strip` controls 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 `~arm64` when upstream ships that release's arm64 artifact; report it unverified and fix arch-specific problems on report.
|
||||
- Apply `dependencies.md` for evidence-backed dependencies and immutable-byte ABI constraints.
|
||||
- Set per-arch `RDEPEND` glibc floors as `>=sys-libs/glibc-X` from the highest binary `GLIBC_` symbol version. Static-PIE has no such symbols and needs no floor. Express glibc needs through dependencies, leaving `elibc_glibc` out of `REQUIRED_USE`: musl profiles otherwise produce error-level `RequiredUseUnsatisfiableInDev` and fail new-package CI.
|
||||
- Resolve every `NEEDED` through verified bundled layout or genuine system `RDEPEND`, 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 `patchelf` only as fallback, with `BDEPEND`.
|
||||
- Replace bundled components with system ones only after verifying ABI, functionality, and launcher/configuration integration; otherwise stop.
|
||||
- `REQUIRES_EXCLUDE` filters metadata only. Use it for verified unresolved-soname false positives: an `RDEPEND` provider installs the requested filename with a different SONAME (`app-arch/bzip2` provides `libbz2.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>`, as `net-proxy/flclash-bin` does; retain stripping for the rest of the package.
|
||||
- For prebuilt `dotnet-pkg-base` payloads, match `DOTNET_PKG_COMPAT` to each `*.runtimeconfig.json` framework.
|
||||
+23
-26
@@ -2,51 +2,48 @@
|
||||
|
||||
Read with: `AGENTS.md` § Ebuild Policy for the install gate; `pr-text.md` before committing.
|
||||
|
||||
- `dev-util/pkgdev` and `dev-util/pkgcheck` are required. When either is missing, stop and tell the human to `emerge` them; do not substitute `git commit`, hand-written Manifests, or a custom lint. `dev-util/github-cli` is optional: without `gh`, hand the human the compare link and let them open the PR.
|
||||
- Before treating a finding as yours, read the package's history, the previous version's result, and the pkgcheck bot's report on the PR. A finding that predates your change is pre-existing, and the completion report says so.
|
||||
- `ebuild <file> install` resolves no dependencies, so it cannot show a missing `BDEPEND`. A `fowners` to an `acct-user` in `src_install` needs that package in `BDEPEND` and in `RDEPEND`, as `acct-user.eclass` documents.
|
||||
- Iterate with the narrowest relevant package checks, and re-run the command exposing each failure.
|
||||
- Do not repeat a check that already passed on the same tree: no rebuilding what already built clean, no rerunning a scan that already passed. A rebase or a new commit makes a previous commit scan stale, and this never excuses a gate the Ebuild Policy requires.
|
||||
- Require `dev-util/pkgdev` and `dev-util/pkgcheck`. If either is missing, stop and ask the human to emerge it; never substitute `git commit`, a hand-written Manifest, or a custom lint. `dev-util/github-cli` is optional: without `gh`, hand over the compare link for the human to open. Apply `pr-text.md` for commits.
|
||||
- Before attributing findings, read package history, the previous version's result, and the PR pkgcheck report's commit, packages, and status. Report pre-existing findings as such.
|
||||
- `ebuild <file> install` resolves no dependencies and cannot expose missing `BDEPEND`; apply `dependencies.md` for `fowners` inputs.
|
||||
- Iterate with the narrowest relevant checks; rerun the command exposing a failure. Reuse passes on the same tree. A rebase or new commit invalidates the commit scan; retain every gate in `AGENTS.md` § Ebuild Policy.
|
||||
|
||||
### Install and CI
|
||||
|
||||
- emerge-on-PR clears elog after `--onlydeps`, then fails on every `qa`, `warn`, or `error` elog from the package emerge, including dependencies built in that step. Elog from a dependency is not a defect in the change: report it and leave the ebuild unchanged.
|
||||
- After every push, emerge-on-PR installs on amd64 OpenRC and systemd, plus arm64 systemd for arm64-keyworded packages. arm64 OpenRC and other arches remain unverified; local install obligations remain in `AGENTS.md` § Ebuild Policy.
|
||||
|
||||
### Manifest
|
||||
|
||||
- Run `pkgdev manifest` when distfiles change. Pass `--distdir <writable-dir>` if the system `DISTDIR` is not user-writable.
|
||||
- Before the first download of a package payload in a work item, whether a distfile, a vendor bundle, or a release asset, report the URL and the size upstream states, and wait for approval.
|
||||
- Never write a hand-made Manifest; run `pkgdev manifest` when distfiles change, with `--distdir <writable-dir>` when system `DISTDIR` is unwritable.
|
||||
- Before the first package-payload download in a work item (distfile, vendor bundle, or release asset), report its URL and upstream-stated size and wait for approval.
|
||||
|
||||
### Scanning
|
||||
|
||||
- Before the PR, complete required clean installs.
|
||||
- After those installs pass, scope the commit scan to this branch with an explicit merge-base range. A bare `--commits` compares against whatever `origin` points at, which need not be the base you branched from.
|
||||
- After required installs pass, scan the explicit merge-base-to-HEAD range against `<canonical>/master` with `--net` and `--git-remote <canonical>`. The range selects targets; the remote selects commit-check provenance. Bare `--commits` uses `origin`, which may differ from the branch base.
|
||||
|
||||
```bash
|
||||
pkgcheck scan --git-remote <canonical> --commits="$(git merge-base <canonical>/master HEAD)..HEAD" --net
|
||||
```
|
||||
|
||||
- The range selects the targets. `--git-remote` sets the canonical source for the commit-only checks.
|
||||
- If cross-package noise still remains, confirm your own change with a package-scoped `pkgcheck scan <category>/<package> --net`. That is ground truth, but does not replace the commit scan.
|
||||
- Resolve cross-package noise with a package-scoped network scan as ground truth, alongside the required commit scan.
|
||||
|
||||
### Tests
|
||||
|
||||
- Exercise every USE state affected by the change. Run upstream tests with `FEATURES=test` where available.
|
||||
- Tests use the build tree, not an installed or system copy. Gate and declare test-only inputs, dependencies, and resources.
|
||||
- Preserve the largest reliable subset and skip individual failures with reasons. Use `RESTRICT=test` only after proving no reliable subset can be retained, and record why.
|
||||
- Use conditional `PROPERTIES="test? ( test_network )"` only with `IUSE=test`; otherwise use `PROPERTIES="test_network"`.
|
||||
- Exercise every affected USE state; run available upstream tests with `FEATURES=test`. Tests use the build tree, with test-only inputs, dependencies, and resources declared and gated.
|
||||
- Keep the largest reliable test subset; skip individual failures with reasons. `RESTRICT=test` requires proof that no reliable subset remains and a recorded reason.
|
||||
- Use `PROPERTIES="test? ( test_network )"` only with `IUSE=test`; otherwise use `PROPERTIES="test_network"`.
|
||||
|
||||
### QA notices
|
||||
|
||||
- The pkgcheck bot's report on the PR names the commit and packages it scanned and the status; read it instead of guessing what CI saw.
|
||||
- Fix genuine QA defects at the root cause.
|
||||
- Retain only a documented false positive or unavoidable notice, with its rationale and remaining risk. Before calling an emerge-on-PR elog notice benign, reproduce the exact condition that produced it, such as a `CONFIG_CHECK` warning with no kernel sources in the container or a foreign-ABI ELF skipped under `ABI_X86=64`; do not maintain a list of ignorable notices.
|
||||
- Never rewrite working behavior merely to silence a checker.
|
||||
- Fix genuine defects at their cause; preserve working behavior when a checker is wrong.
|
||||
- Retain only documented false positives or unavoidable notices, with rationale and residual risk. Reproduce each exact condition before calling an emerge-on-PR elog benign, e.g. `CONFIG_CHECK` without kernel sources or foreign-ABI ELF skipped under `ABI_X86=64`; keep no list of ignorable notices.
|
||||
|
||||
### Network results
|
||||
|
||||
- GitHub rate limits can cause false `DeadUrl` or `RedirectedUrl` results; re-verify flagged URLs.
|
||||
- A network result is evidence about your host only. An edge that returns 403 here may serve the same URL elsewhere, so re-check from a second vantage point, such as another mirror or a fetch through a different route, before calling a URL dead.
|
||||
- CI's `pkgcheck` runs without `--net`, so no network keyword fires there.
|
||||
- A dead `HOMEPAGE` does not block installation. A dead overlay `SRC_URI` is unfetchable because overlay distfiles are not mirrored on `distfiles.gentoo.org`.
|
||||
- Reverify `DeadUrl`/`RedirectedUrl`, including GitHub rate limits. A result describes one host's route; verify a second mirror or route before declaring a URL dead, including HTTP 403.
|
||||
- CI pkgcheck omits `--net`, so network keywords stay untested there.
|
||||
- A dead `HOMEPAGE` leaves installation possible. A dead overlay `SRC_URI` prevents fetching because `distfiles.gentoo.org` does not mirror overlay distfiles.
|
||||
|
||||
### Reviewing the change
|
||||
|
||||
- Review the staged diff and diffstat. Reject unrelated hunks, debug output, missing `files/` assets, or unintended `Manifest` entries.
|
||||
- Verify patches, substitutions, generators, and manual or glob installs against the intended release source and final files, modes, and license notices—not command exit status alone.
|
||||
- Review staged diff and diffstat for intended changes, clean output, complete `files/` assets, and intended Manifest entries. Apply `AGENTS.md` § Git Workflow for unrelated changes.
|
||||
- Verify patches, substitutions, generators, and manual/glob installs against release source and final files, modes, and license notices; require file evidence beyond exit status.
|
||||
@@ -2,42 +2,30 @@
|
||||
|
||||
Read with: `pr-text.md` before committing; `prebuilt-binaries.md` when the package installs a prebuilt payload; `kernels.md` for a kernel package; `openrc-systemd.md` when a unit or init script changes; `desktop-integration.md` when a desktop file or launcher changes; `eclass-discovery.md` when the bump changes EAPI or an eclass.
|
||||
|
||||
- Compare existing ebuilds and history with upstream notes and build metadata for dependency, toolchain, option, license, layout, and installed-file changes. On every bump, re-check bundled or vendored components, including static libraries, amalgamations such as `sqlite3.c`, and header-only copies, and update `LICENSE` to match.
|
||||
- The `go.mod` `go` directive and `Cargo.toml` `rust-version` are real minimum versions, and no eclass reads them for you.
|
||||
- When one exceeds what the profile toolchain guarantees, raise the matching `>=dev-lang/go` `BDEPEND` or `RUST_MIN_VER`.
|
||||
- If the raised floor is not yet in the tree, hand over the compare link stating the PR must be opened as a draft.
|
||||
- Cite the upstream `go.mod` and the tree state on packages.gentoo.org, for example `>=dev-lang/go-1.26.5` when `go.mod` says `go 1.26.5`.
|
||||
- The `go.mod` `toolchain` line is only a suggestion under `GOTOOLCHAIN=local` and sets no floor.
|
||||
- Re-check patches and assets. Update the ebuild, `SRC_URI`, version variables, checksums, and `Manifest` together; stop when required evidence is unavailable.
|
||||
- A GitHub tag archive has no `.git`, so a build that derives its version with `git describe` fails or gets no usable version. Pass the version explicitly, as `sys-kernel/mkinitcpio` does for `meson.build`.
|
||||
- A `files/` copy of an upstream hook, unit, or script drifts. On every bump diff it against upstream's current file; `mkinitcpio`'s copied base hook installed `/init` without the executable bit until someone booted the image.
|
||||
- When the `::gentoo` snapshot emerge-on-PR uses does not yet carry a version the change depends on, keep the atom, open the PR as a draft, and rerun CI once that snapshot carries it.
|
||||
- For a library bump, compare the new release's dependency minimums with versions available in this overlay and `::gentoo`, and check in-overlay reverse dependencies. Because emerge-on-PR neither runs the package nor rebuilds its consumers, a passing install can leave an unmet minimum undetected.
|
||||
- When a bump exposes a defect, fix it in the existing ebuild and change only what the new release invalidates. Rewrite it only when the release leaves it unusable, and say what made it so.
|
||||
- Normalize the ebuild version by Gentoo rules. Preserve the literal upstream tag through `MY_PV` or an equivalent variable when needed.
|
||||
- Tracker output is only a hint: verify the real tag, artifact, and URL. `-rN` is a Gentoo revision; never derive upstream tags or filenames from `${PVR}` or `${PF}`.
|
||||
- Never guess `RDEPEND`, `IUSE`, pins, generated dependency sets, build options, or vendor artifacts merely to obtain a green build.
|
||||
- A versioned deps/vendor/crates/`node_modules` artifact must already exist for the new version, or the fetch 404s.
|
||||
- That artifact is often not upstream but in an overlay or contributor repo: commonly `gentoo-zh-drafts/<PN>`, sometimes `gentoo-zh/gentoo-deps` or a contributor's repo.
|
||||
- When a bump starts downloading a bundle from `gentoo-zh/gentoo-deps` or a `gentoo-zh-drafts` workflow, add `deps` or `bundle` to the package's `.github/workflows/overlay.toml` table, as `scripts/autobump.md` describes, so autobump prepares the bundle of later versions.
|
||||
- Reuse the exact host and naming the existing `SRC_URI` uses; do not assume upstream, invent a host, or switch repos on your own. Change host only under a verified, maintainer-directed migration.
|
||||
- Cross-check a large distfile's size against its source, so a truncated download cannot produce a plausible but invalid `Manifest`.
|
||||
- When upstream moves, update `HOMEPAGE`, `metadata.xml` `remote-id`, and version-tracking URLs to the current project.
|
||||
- Keep `SRC_URI` on the real artifact, and provenance variables on the repository that produced that release.
|
||||
- For an in-place tarball replacement, verify provenance, contents, tag or commit, signatures, and licenses. Use a distinct distfile name and revbump.
|
||||
- Remove or update only state made obsolete when a version, implementation, USE flag, provider, or package name is removed.
|
||||
- Scope cleanup to affected ebuild conditionals, assets, metadata and profile entries, reverse-dependency references, and live or twin variants.
|
||||
- Preserve everything required by surviving ebuilds or providers.
|
||||
- Compare ebuilds/history with release notes and build metadata for dependency, toolchain, option, license, layout, and installed-file changes. Recheck bundled/vendor components every bump, including static libraries, amalgamations such as `sqlite3.c`, and header-only copies; apply `ebuild-construction.md` license policy.
|
||||
- Read `go.mod` `go` and `Cargo.toml` `rust-version` as minimums yourself. Raise `>=dev-lang/go` in `BDEPEND` or `RUST_MIN_VER` above the profile guarantee when required. Cite upstream `go.mod` and packages.gentoo.org tree state. Under `GOTOOLCHAIN=local`, `toolchain` is a suggestion only. Every cargo ebuild sets `RUST_MIN_VER` at least as high as the highest `rust-version` across unpacked workspace members and vendored crates.
|
||||
- If a raised floor is absent from the tree, the PR must be a draft: hand over the compare link and say so. If emerge-on-PR's `::gentoo` snapshot lacks a dependency version, retain its atom, open as draft, and rerun CI when that snapshot catches up. Apply the same draft policy to eclass-required provider slots absent from `::gentoo`, e.g. zig or opencc; preserve eclass-managed dependencies and `*_OPTIONAL` settings when resolving `NonexistentDeps`.
|
||||
- Recheck patches and assets; update ebuild, `SRC_URI`, version variables, checksums, and Manifest together under `AGENTS.md` § Git Workflow. Stop when required evidence is unavailable. Diff old/new `PATCHES`: every `files/*.patch` has a surviving consumer and every entry resolves. Carry downstream-only patches forward; remove backports only after confirming their fixes in the release. Rebased patches get new version-prefixed filenames.
|
||||
- Pass versions explicitly for tag archives lacking `.git`, e.g. `sys-kernel/mkinitcpio`'s Meson build; `git describe` cannot recover the release there.
|
||||
- Diff copied upstream hooks, units, and scripts in `files/` against the new release on every bump.
|
||||
- For library bumps, compare dependency minimums with available overlay/`::gentoo` versions and check in-overlay reverse dependencies. emerge-on-PR installs only: it neither runs the package nor rebuilds consumers, so passing CI can miss an unmet minimum.
|
||||
- Fix exposed defects within the existing ebuild, changing what the release invalidates. Rewrite only when the release leaves it unusable, with the reason.
|
||||
- Normalize Gentoo versions and preserve literal upstream tags through `MY_PV` or equivalent. Verify tracker hints against real tags, artifacts, and URLs; derive upstream tags and filenames from upstream versions, never from `${PVR}` or `${PF}`, which carry Gentoo revisions.
|
||||
- Take `RDEPEND`, `IUSE`, pins, generated dependencies, build options, and vendor artifacts from release evidence; never guess them to get a green build.
|
||||
- Versioned deps/vendor/crates/`node_modules` bundles exist before use. Common producers are `gentoo-zh-drafts/<PN>`, `gentoo-zh/gentoo-deps`, or contributor repositories. Apply `new-packages.md` for bundle tracking fields.
|
||||
- Preserve existing `SRC_URI` host and naming; change host only for a verified, maintainer-directed migration. Cross-check large distfile sizes against the source before manifesting.
|
||||
- On upstream moves, update `HOMEPAGE`, `metadata.xml` `remote-id`, and tracking URLs. Keep artifact URLs and provenance variables tied to the actual release and its producing repository.
|
||||
- For in-place tarball replacements, verify provenance, contents, tag/commit, signatures, and licenses; use a distinct distfile name and revbump.
|
||||
- Removing versions, implementations, USE flags, providers, or names cleans up only obsolete ebuild conditionals, assets, metadata/profiles, reverse dependencies, and live/twin variants. Preserve inputs required by surviving ebuilds/providers; apply `dependencies.md` for replacement filenames.
|
||||
|
||||
## Keeping Old Versions
|
||||
|
||||
A bump replaces the version it supersedes—`add NEW, drop OLD`. Retention is the exception and needs one of the reasons below.
|
||||
A bump normally replaces its superseded version: `add NEW, drop OLD`. Retention requires a reason below.
|
||||
|
||||
- Keep the prior version across a major version jump, large rewrite, or build-system migration, even for a `-bin` package and even when history rolls the latest. Drop it once the new branch has held.
|
||||
- Keep any version a reverse-dependency pin, `SLOT`, or profile entry still resolves against. Check the overlay and the main tree per `SLOT` and per retained arch before dropping.
|
||||
- Keep a version whose replacement is unverified: an arch upstream skipped this release, or a security fix not yet on every keyworded branch.
|
||||
- Otherwise drop. A package with no cross-version state, no reverse dependencies, and nothing worth downgrading to keeps exactly one version. Being prebuilt is not a reason to keep the old one.
|
||||
- Follow the package's own history where it shows an explicit pattern; otherwise apply the rules above and state the choice. Never keep a version merely because the previous commit did.
|
||||
- Stop for direction when an old version loses its immutable source bytes, or when a replacement in place is unexplained.
|
||||
- `autobump = N` in `.github/workflows/overlay.toml` applies the same policy to autobump: set a number only for a package meeting a reason above, and return it to `true` when the reason lapses.
|
||||
- A kernel `-kernel-bin` one point release behind its source package is expected retention; `kernels.md` says why and how it catches up.
|
||||
- Keep the prior version through major jumps, large rewrites, or build-system migrations, including `-bin` and packages normally rolling latest. Drop it after the new branch has held.
|
||||
- Retain versions resolving reverse-dependency pins, slots, or profile entries. Before dropping, check both trees per slot and retained arch.
|
||||
- Retain versions with unverified replacements, including skipped upstream arches and security fixes absent from a keyworded branch.
|
||||
- Otherwise drop the old version: with no cross-version state, reverse dependencies, or useful downgrade target, keep exactly one. Apply an explicit package-history pattern where present; otherwise apply these criteria and state the choice. A previous retention or prebuilt format alone is insufficient.
|
||||
- Stop for direction when immutable old source bytes disappear or an in-place replacement is unexplained.
|
||||
- Set `autobump = N` in `.github/workflows/overlay.toml` only for a retention reason above; restore `true` when it lapses.
|
||||
- Apply `kernels.md` for expected `-kernel-bin` lag and catch-up sequence.
|
||||
@@ -1,10 +1,6 @@
|
||||
<!-- Please put the pull request description above -->
|
||||
<!-- Why this change, in one or two sentences. Then what you tested. -->
|
||||
|
||||
---
|
||||
Tested: <!-- e.g. clean emerge on amd64 openrc and systemd; launched once -->
|
||||
|
||||
Please check all the boxes that apply:
|
||||
|
||||
- [ ] I have run `pkgcheck scan --commits --net` to check for issues with my commits.
|
||||
- [ ] If I used AI: it followed AGENTS.md, I checked and tested its output, and the description shows tested results, not guesses.
|
||||
|
||||
Please note that all boxes must be checked for the pull request to be merged.
|
||||
- [ ] `pkgcheck scan --commits=<merge-base>..HEAD --net` is clean, or the PR changes no ebuild
|
||||
- [ ] AI-assisted work, if any, follows AGENTS.md and I tested its output
|
||||
@@ -1,77 +1,49 @@
|
||||
# Repository Guidelines
|
||||
|
||||
Reload this file at the start of a work item, and again whenever the conversation has grown long or context was trimmed, so its rules stay in force.
|
||||
|
||||
This repository is a Gentoo overlay fork. Use skills and official Gentoo sources for generic ebuild knowledge; keep repository policy and non-obvious correctness gates here.
|
||||
|
||||
These rules are the default, not a veto. An explicit instruction from the human directing the work overrides them for that item: carry it out and record the deviation.
|
||||
|
||||
Stop only where this file or `.agents/rules/` says to, or where continuing would discard work or publish something unreviewed.
|
||||
|
||||
Prefer the package and its history, a genuinely comparable current package, eclass and upstream source, then official Gentoo documentation and gentoo.git.
|
||||
|
||||
Never substitute memory or superficial similarity for evidence.
|
||||
|
||||
## Repository Layout
|
||||
|
||||
Packages live under `category/package/` with ebuilds, `metadata.xml`, optional `Manifest`, and optional `files/`.
|
||||
|
||||
Repository metadata is under `metadata/` and `profiles/`. CI is under `.github/`.
|
||||
This Gentoo overlay fork keeps repository policy and non-obvious gates here; skills and official Gentoo sources cover generic packaging knowledge.
|
||||
Reload this file at each work item and after long or trimmed context.
|
||||
Explicit human instructions override these defaults for that item; carry them out and record the deviation.
|
||||
|
||||
## Task routing
|
||||
|
||||
Reading order: this file; then `git-workflow.md` before the first edit; for any ebuild change `ebuild-construction.md` and `dependencies.md`; then `version-bumps.md` or `new-packages.md` for the change itself; then every surface file the change touches; then `qa.md` before scanning and `pr-text.md` before committing. Each rule file opens with a `Read with` line naming what to read next from there. These files carry repository policy that used to sit in this one.
|
||||
Read this file, then `git-workflow.md` before editing. For ebuilds, read `ebuild-construction.md` and `dependencies.md`, then `version-bumps.md` or `new-packages.md`, then each affected surface below. Read `qa.md` before scanning and `pr-text.md` before committing. Rule files start with `Read with:` links.
|
||||
|
||||
- Writing or editing an ebuild: `.agents/rules/ebuild-construction.md`.
|
||||
- Dependency atoms, slots, subslots, revbumps: `.agents/rules/dependencies.md`.
|
||||
- Manifest, scanning, tests, QA notices, network results, reviewing: `.agents/rules/qa.md`.
|
||||
- Version bumps and keeping old versions: `.agents/rules/version-bumps.md`.
|
||||
- New packages, `virtual/`, `overlay.toml` entries: `.agents/rules/new-packages.md`.
|
||||
- Prebuilt or bundled binaries: `.agents/rules/prebuilt-binaries.md`.
|
||||
- Desktop files, icons, Wayland flags: `.agents/rules/desktop-integration.md`.
|
||||
- Units, init scripts, service or `systemd` dependencies: `.agents/rules/openrc-systemd.md`.
|
||||
- Kernel packages (`sys-kernel/*-sources`, `*-kernel`, `*-kernel-bin`, `virtual/dist-kernel-*`): `.agents/rules/kernels.md`.
|
||||
- Choosing or reading an eclass: `.agents/rules/eclass-discovery.md`.
|
||||
- Branch preflight, remotes, rebasing, pushing: `.agents/rules/git-workflow.md`.
|
||||
- Commit subject and body, PR title and body, and writing style: `.agents/rules/pr-text.md`.
|
||||
- Ebuild edits: `.agents/rules/ebuild-construction.md`.
|
||||
- Atoms, slots, subslots, revbumps: `.agents/rules/dependencies.md`.
|
||||
- Manifest, scans, tests, QA, network, review: `.agents/rules/qa.md`.
|
||||
- Bumps and retention: `.agents/rules/version-bumps.md`.
|
||||
- New packages, virtuals, `overlay.toml`: `.agents/rules/new-packages.md`.
|
||||
- Bundled or prebuilt binaries: `.agents/rules/prebuilt-binaries.md`.
|
||||
- Desktop files, icons, Wayland: `.agents/rules/desktop-integration.md`.
|
||||
- Units, init scripts, service dependencies: `.agents/rules/openrc-systemd.md`.
|
||||
- `sys-kernel/*-sources`, `*-kernel`, `*-kernel-bin`, `virtual/dist-kernel-*`: `.agents/rules/kernels.md`.
|
||||
- Eclasses and EAPI: `.agents/rules/eclass-discovery.md`.
|
||||
- Preflight, remotes, rebasing, pushing: `.agents/rules/git-workflow.md`.
|
||||
- Commit and PR text, writing: `.agents/rules/pr-text.md`.
|
||||
|
||||
Runnable steps and checks for bumps, new packages and reviews: the `gentoo-zh` skill from https://github.com/gentoo-zh/skills (`npx skills add gentoo-zh/skills -g`). It applies these rules and adds none. When it is not installed, read `.agents/skills/gentoo-zh/references/checks.md` from that repository before the first edit and run the sections your change touches.
|
||||
|
||||
## Git Workflow
|
||||
|
||||
Every repository modification is PR-bound unless the current request explicitly says otherwise. Read-only inspection is exempt. Before the first edit, complete the preflight in `.agents/rules/git-workflow.md`, which also covers remotes, rebasing, and pushing.
|
||||
Repository edits are PR-bound unless explicitly exempted; read-only inspection is exempt. Complete `.agents/rules/git-workflow.md` preflight before editing.
|
||||
|
||||
- One bump or one fix is one PR.
|
||||
- Packages share a PR only when they must land together: one dependency chain, a coordinated bump, or a fix that spans them. A batch of unrelated bumps never does.
|
||||
- Never split an ebuild from its `Manifest`.
|
||||
- Preserve unrelated changes; never overwrite, revert, stage, or commit them.
|
||||
- One bump or fix per PR. Packages share a PR only for a dependency chain, coordinated bump, or spanning fix; a batch of unrelated bumps never does.
|
||||
- Never split an ebuild from its `Manifest`; keep them together.
|
||||
- Never overwrite, revert, stage, or commit unrelated changes; preserve them.
|
||||
- Never push `master` or the canonical remote; publish topic branches to an unambiguous personal fork.
|
||||
|
||||
## Ebuild Policy
|
||||
|
||||
- Install every changed ebuild cleanly; a compile alone is insufficient. emerge-on-PR discards the elog its `--onlydeps` pass leaves, then fails on any `qa`, `warn`, or `error` elog from the emerge of the package itself, including a dependency that step happens to build.
|
||||
- Where the environment cannot run a real merge, such as an unprivileged sandbox that cannot chown to the portage group, record the install as skipped.
|
||||
- An elog from the dependency rather than the package is not a defect in the change. Report it; do not edit the ebuild to clear it.
|
||||
- The emerge-on-PR CI installs the changed packages after each push: on both amd64 profiles, openrc and systemd, and on the arm64 systemd profile when the package is keyworded arm64. There is no arm64 openrc run, every other arch stays unverified, and a green run does not replace your own clean install.
|
||||
- Build every newly added `KEYWORDS` arch of a source package; never keyword one you did not build. A prebuilt package follows the arm64 exception in `.agents/rules/prebuilt-binaries.md`.
|
||||
- Carrying the prior version's keywords forward is retention—do not narrow them to the one arch you built.
|
||||
- For an arch-independent package, keep the inherited keywords and note the arches you did not verify in the completion report; use `~arch`.
|
||||
- When removing an arch, update affected reverse dependencies and virtual/meta packages in the same change.
|
||||
- A virtual's keywords cannot exceed its providers'. `pkgcheck PotentialStable` is informational.
|
||||
- Preserve package-local style and user/toolchain flags. Keep patches and refactors narrow; remove forced optimization, hardening, LTO, stripping, and blanket `-Werror`.
|
||||
- For non-trivial work, use precedent matching the source or prebuilt model, build system, eclass stack, and runtime layout. Re-verify it against the current release.
|
||||
- Before writing the fix, find how `::gentoo` or this overlay already solves the same problem and take that form. A construct with no precedent in either tree needs a stated reason.
|
||||
- Search for that precedent instead of recalling it: `grep -rl '<eclass or construct>' "$(portageq get_repo_path / gentoo)" --include='*.ebuild'` shows who uses it today, and `git log -S'<construct>' -- '*.ebuild'` in gentoo.git shows why the tree adopted or dropped it.
|
||||
- Install every changed ebuild cleanly before the PR; compilation and CI alone are insufficient. If a real merge is unavailable, record the skip and reason. Apply `.agents/rules/qa.md` for elog attribution and CI coverage.
|
||||
- Never keyword a source arch you did not build; build each newly added arch. Prebuilt arm64 follows `.agents/rules/prebuilt-binaries.md`.
|
||||
- Retain inherited keywords. For arch-independent packages use `~arch` and report unverified arches.
|
||||
- An arch removal updates affected reverse dependencies and virtual/meta packages together. Virtual keywords stay within their providers' keywords; `pkgcheck PotentialStable` is informational. Every atom resolves on each keyworded arch through a package keyworded there; fix `DependencyMissingKeywords` by dropping that arch from the reverse dependency.
|
||||
- Before a fix, search `::gentoo` and this overlay for precedent and use its form; explain constructs absent from both. For non-trivial work, match source/prebuilt model, build system, eclasses, and runtime layout, then verify against the release.
|
||||
|
||||
## Stopping
|
||||
|
||||
- Stop after at most three attempts, or after the same failure repeats twice. Report the failed phase and attempts before asking how to continue.
|
||||
Stop only at a stated gate here or in `.agents/rules/`, or before discarding work or publishing unreviewed work. Stop after three attempts at most or two repetitions of the same failure; report the phase and attempts before asking how to continue.
|
||||
|
||||
## Completion Report
|
||||
|
||||
Every completed change reports:
|
||||
|
||||
- the topic branch, the canonical remote and its fetch status, and the base and sync status;
|
||||
- files changed;
|
||||
- commands with pass/fail results;
|
||||
- skipped checks and reasons;
|
||||
- remaining warnings, risks, or limitations.
|
||||
Report topic branch; canonical remote and fetch status; base and sync status; changed files; commands and pass/fail results; skipped checks and reasons; remaining warnings, risks, and limitations.
|
||||
Reference in new issue
Block a user