7.0 KiB
Contributing
gentoo-zh is a Gentoo overlay (a third-party ebuild repository) that depends on
::gentoo (masters = gentoo in metadata/layout.conf).
Note
Anyone who deliberately bypasses the rules in this file is barred from committing. This applies to all maintainers, including owners and members.
Packages
-
Ebuilds use
~archkeywords only. -
Unless there is a specific reason, packages that
::gentooalready provides are not added here again. -
Every package has a
metadata.xmlthat names its maintainer. -
LICENSEmatches the license declared by the packaged software; add licenses missing from::gentootolicenses/andprofiles/license_groups. -
Unless there is a specific reason, keep the changes to one package in one commit.
-
Register packages in
.github/workflows/overlay.toml, inserted in alphabetical order bycategory/package; comment the reason for any that nvchecker cannot track. -
For packages that can be bumped automatically, see scripts/autobump.md.
-
Test locally before committing, and open a pull request only after the tests pass.
-
For a package you no longer maintain, find a new maintainer in the issues. If nobody takes it, remove it through last rites: add an entry at the top of
profiles/package.maskwith your name, email, date (UTC), reason and removal date, and remove the package after 30 days or more, for example:# Zakk <zakk@gentoozh.org> (2026-11-18) # Upstream archived. # Removal on 2026-12-18. net-proxy/daed
References:
- Devmanual
- GLEP 66: git workflow and commit messages
- GLEP 76: copyright policy and
Signed-off-by - pkgdev, pkgcheck
Commits
All changes go through pull requests. Do not push to master or bypass CI.
Commits follow the Gentoo git workflow:
- The first line is the summary line,
category/package: summary, at most 69 characters. - The body is optional; if present, separate it from the summary line with a blank line.
- Add
Signed-off-by:;pkgdev commit --signoffadds it. - Version bumps are written as
category/package: add 0.5, drop 0.4. - No merge commits in a pull request; sync with master using
git rebase, notgit merge.
Example:
app-misc/foo: fix build with GCC 16
Add a missing include.
Signed-off-by: A Developer <example@gentoo.org>
Common commands:
pkgdev manifest # update the Manifest
pkgcheck scan --net # check the current changes
pkgdev commit --signoff # commit with a generated summary and Signed-off-by
pkgdev commit --signoff -m "fix build with GCC 16" -m "Add a missing include."
# custom summary and body
pkgcheck scan --commits --net # check the branch's commits before the pull request
Note
pkgdev commit -band-crefer to bugs.gentoo.org; do not use them for this repository's issues.
Pull request descriptions
Use the pull request template:
- Write the description above
<!-- Please put the pull request description above -->. - To close an issue of this repository, add
Closes #Nto the description. - If you changed a package,
eclass/,profiles/orlicenses/, you must check the pkgcheck box; if you used AI, you must check the AI box.
Example:
Because upstream 1.2.3 fixes a crash on Wayland, add it.
Closes #12345
<!-- Please put the pull request description above / 请把描述写在本行上方 -->
---
Do not delete this template, or the pull request will be rejected.
请勿删除本模板,否则 Pull Request 会被拒绝。
Please check all the boxes that apply:
请按情况勾选:
- [x] I have run `pkgcheck scan --commits --net` to check for issues with my commits.
我已运行 `pkgcheck scan --commits --net` 检查本分支的提交。
- [x] If I used AI: I understand every change, tested it and take responsibility for it; commits with AI-written changes carry `Assisted-by:`.
如果使用了 AI 辅助:我理解每一处改动,已经测试并对其负责,并且添加了 `Assisted-by:`。
Note
After opening the pull request, fix the problems reported by pkgcheck and CI, including QA warnings.
AI policy
AI may be used, provided that:
- work done with AI follows AGENTS.md;
- the contributor understands what the AI writes;
- contributors add
Signed-off-bythemselves; a tool must never add it; - before adding
Signed-off-by, the contributor confirms that the AI-written parts copy no code under an incompatible license; - AI-written commit messages and pull request descriptions are accurate, concise and free of repetition, with every claim verified.
Disclosure
A commit containing AI-written changes must carry an Assisted-by: trailer in
the Linux kernel format,
Assisted-by: AGENT:MODEL, above Signed-off-by:. Add it with
pkgdev commit -T:
pkgdev commit --signoff -m "fix build with GCC 16" -m "Add a missing include." -T Assisted-by:Claude:claude-opus-5-5
The resulting commit message:
app-misc/foo: fix build with GCC 16
Add a missing include.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: A Developer <example@gentoo.org>
Note
Do not credit AI with
Co-authored-by:; CI rejects it. Human co-authors may useCo-authored-by:.
Disclosure is not required for:
- small or mechanical changes;
- using AI only to review the contributor's own change, when the contributor fixes the issues it finds.
Forbidden usage
- Having an automated tool directly open pull requests or post comments before a human contributor has confirmed a successful build, verified that the tests pass and reviewed each piece of tool-generated content.
- Hiding or understating the extent of AI involvement.
This repository's own bots, such as autobump and nvchecker, are not covered by these rules.
Testing
AI-written changes are subject to the same testing requirements as any other change, and ebuilds must be smoke-tested. Do not claim to have run a test that was not run.
Enforcement
If we suspect that AI was used without disclosure, we will ask for an explanation, and the contributor must answer truthfully. If they refuse, we will close the pull request or issue. This rule also applies to maintainers.
Agents can use gentoo-zh/skills for packaging, version bumps and reviews. They apply AGENTS.md and add no rules of their own. Install them with:
npx skills add gentoo-zh/skills -g
This section is adapted from OpenWrt packages' AI policy.