docs: 移除多余的文档文件并更新贡献指南
删除不再需要的英文和繁体中文贡献指南文件,更新简体中文贡献指南的内容,包括修复不再维护软件包移除条件的描述、更新AI辅助提交的示例命令、清理过时的AI政策相关说明。 Signed-off-by: microcai <microcaicai@gmail.com>
This commit is contained in:
1 parent
86ee7e6888
commit
b16a8fbfc6
3 files changed
+2
-393
No files matched your search
@@ -1,204 +0,0 @@
|
||||
<div align="right">
|
||||
|
||||
English | [简体中文](./CONTRIBUTING.md) | [正體中文](./CONTRIBUTING.zh-TW.md)
|
||||
|
||||
</div>
|
||||
|
||||
# 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 removed from the
|
||||
> organization, and all packages they maintain are treecleaned. This applies to
|
||||
> all maintainers, including owners and members.
|
||||
|
||||
## Packages
|
||||
|
||||
- Ebuilds use `~arch` keywords only.
|
||||
- Dependencies that `::gentoo` already provides are not duplicated here, and a
|
||||
package with the same name as one in `::gentoo` is not added unless there is a
|
||||
specific reason.
|
||||
- Every package has a `metadata.xml` that names its maintainer.
|
||||
- `LICENSE` matches the license declared by the packaged software; add licenses
|
||||
missing from `::gentoo` to `licenses/` and `profiles/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 by `category/package`; comment the reason for any that
|
||||
nvchecker cannot track.
|
||||
- For packages that can be bumped automatically, see
|
||||
[scripts/autobump.md](./scripts/autobump.md).
|
||||
- Test ebuilds before committing.
|
||||
- For a package you no longer maintain, find a new maintainer in the issues. If
|
||||
nobody takes it, remove it through
|
||||
[last rites](https://devmanual.gentoo.org/ebuild-maintenance/removal/): add an
|
||||
entry at the top of `profiles/package.mask` with 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](https://devmanual.gentoo.org/)
|
||||
- [GLEP 66](https://www.gentoo.org/glep/glep-0066.html): git workflow and commit messages
|
||||
- [GLEP 76](https://www.gentoo.org/glep/glep-0076.html): copyright policy and `Signed-off-by`
|
||||
- [pkgdev](https://pkgcore.github.io/pkgdev/), [pkgcheck](https://pkgcore.github.io/pkgcheck/)
|
||||
|
||||
## Commits
|
||||
|
||||
All changes go through pull requests. Do not push to master or bypass CI.
|
||||
|
||||
Commits follow the
|
||||
[Gentoo git workflow](https://wiki.gentoo.org/wiki/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 --signoff` adds 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`, not
|
||||
`git 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 -b` and `-c` refer 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 #N` to the description.
|
||||
- If you changed a package, `eclass/`, `profiles/` or `licenses/`, 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 -->
|
||||
|
||||
---
|
||||
|
||||
Please check all the boxes that apply:
|
||||
|
||||
- [x] I have run `pkgcheck scan --commits --net` to check for issues with my commits.
|
||||
- [x] If I used AI: I understand every change, tested it and take responsibility for it; commits with AI-written changes carry `Assisted-by:`.
|
||||
|
||||
Please note that all boxes must be checked for the pull request to be merged.
|
||||
```
|
||||
|
||||
> [!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](./AGENTS.md);
|
||||
- the contributor understands what the AI writes;
|
||||
- contributors add `Signed-off-by` themselves; 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](https://docs.kernel.org/process/coding-assistants.html),
|
||||
`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 add `Co-authored-by:`; CI rejects it.
|
||||
|
||||
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
|
||||
|
||||
- Pull requests, pushes or comments published by a tool before the contributor
|
||||
has reviewed and approved each one.
|
||||
- Opening pull requests in bulk from a tool's output without building and
|
||||
testing each one.
|
||||
- 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](https://github.com/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](https://github.com/openwrt/packages/blob/master/CONTRIBUTING.md#ai-policy).
|
||||
+2
-24
@@ -1,16 +1,11 @@
|
||||
<div align="right">
|
||||
|
||||
[English](./CONTRIBUTING.en.md) | 简体中文 | [正體中文](./CONTRIBUTING.zh-TW.md)
|
||||
|
||||
</div>
|
||||
|
||||
# 贡献指南
|
||||
|
||||
gentoo-zh 是 Gentoo 的 overlay(第三方 ebuild 仓库),依赖 `::gentoo`(`metadata/layout.conf` 中 `masters = gentoo`)。
|
||||
|
||||
> [!NOTE]
|
||||
> 故意绕过本文规定者将被移出组织,其维护的全部软件包将被 treeclean。此规则适用于全部维护者,包括 owner 和 member。
|
||||
|
||||
## 软件包
|
||||
|
||||
- ebuild 只使用 `~arch` 关键字;
|
||||
@@ -21,7 +16,7 @@ gentoo-zh 是 Gentoo 的 overlay(第三方 ebuild 仓库),依赖 `::gentoo
|
||||
- 软件包须登记到 `.github/workflows/overlay.toml`,依 `category/package` 的字母顺序插入,不适合 nvchecker 的须注释原因;
|
||||
- 可自动更新版本的软件包见 [scripts/autobump.zh.md](./scripts/autobump.zh.md);
|
||||
- ebuild 提交前须进行测试;
|
||||
- 不再维护的软件包,须在 issue 中寻找接手者。无人接手的,依据 [last rites](https://devmanual.gentoo.org/ebuild-maintenance/removal/) 流程移除:在 `profiles/package.mask` 顶部加入条目,写明作者、邮箱、日期(UTC)、原因和移除日期,至少 30 天后移除。范例:
|
||||
- 不再维护的软件包,须在 issue 中寻找接手者。无人接手的且无法通过编译的,依据 [last rites](https://devmanual.gentoo.org/ebuild-maintenance/removal/) 流程移除:在 `profiles/package.mask` 顶部加入条目,写明作者、邮箱、日期(UTC)、原因和移除日期,至少 30 天后移除。范例:
|
||||
|
||||
```
|
||||
# Zakk <zakk@gentoozh.org> (2026-11-18)
|
||||
@@ -113,12 +108,8 @@ Please note that all boxes must be checked for the pull request to be merged.
|
||||
- 添加 `Signed-off-by` 前,贡献者须确认 AI 生成的部分没有复制许可证不兼容的代码;
|
||||
- AI 生成的提交信息和 pull request 描述须准确、精简、不重复,所述内容须经验证。
|
||||
|
||||
### 声明
|
||||
|
||||
含 AI 生成改动的提交,须在 `Signed-off-by:` 之上添加 `Assisted-by:` 行,格式同 [Linux 内核](https://docs.kernel.org/process/coding-assistants.html),为 `Assisted-by: 工具名:模型名`。用 `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
|
||||
pkgdev commit --signoff -m "fix build with GCC 16" -m "Add a missing include." -T Assisted-by:Deepseek-v4.1-Flash
|
||||
```
|
||||
|
||||
生成的提交信息:
|
||||
@@ -132,9 +123,6 @@ Assisted-by: Claude:claude-opus-5-5
|
||||
Signed-off-by: A Developer <example@gentoo.org>
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> 不得使用 `Co-authored-by:`,CI 将拒绝。
|
||||
|
||||
以下情况无需声明:
|
||||
|
||||
- 小改动或机械性改动;
|
||||
@@ -152,14 +140,4 @@ autobump、nvchecker 等本仓库自有的 bot 不受上述规则限制。
|
||||
|
||||
AI 生成的改动与其他改动适用相同的测试要求,ebuild 须经过冒烟测试。不得声称执行了实际未执行的测试。
|
||||
|
||||
### 执行
|
||||
|
||||
如果怀疑贡献中使用了 AI 却未声明,我们会要求说明,贡献者须如实回答;拒绝说明的,我们会关闭该 pull request 或 issue。本规则同样适用于维护者。
|
||||
|
||||
agent 可以使用 [gentoo-zh/skills](https://github.com/gentoo-zh/skills) 打包、更新版本和审查。它只执行 AGENTS.md 的规则,不另立规则。安装命令:
|
||||
|
||||
```
|
||||
npx skills add gentoo-zh/skills -g
|
||||
```
|
||||
|
||||
本节参考 [OpenWrt packages 的 AI 政策](https://github.com/openwrt/packages/blob/master/CONTRIBUTING.md#ai-policy)。
|
||||
@@ -1,165 +0,0 @@
|
||||
<div align="right">
|
||||
|
||||
[English](./CONTRIBUTING.en.md) | [简体中文](./CONTRIBUTING.md) | 正體中文
|
||||
|
||||
</div>
|
||||
|
||||
# 貢獻指南
|
||||
|
||||
gentoo-zh 是 Gentoo 的 overlay(第三方 ebuild 儲存庫),依賴 `::gentoo`(`metadata/layout.conf` 中 `masters = gentoo`)。
|
||||
|
||||
> [!NOTE]
|
||||
> 故意繞過本文規定者將被移出組織,其維護的全部套件將被 treeclean。此規則適用於全部維護者,包括 owner 和 member。
|
||||
|
||||
## 套件
|
||||
|
||||
- ebuild 只使用 `~arch` 關鍵字;
|
||||
- `::gentoo` 已有的相依套件不在本儲存庫重複新增;除特殊情況外,不新增與 `::gentoo` 同名的套件;
|
||||
- 每個套件須有 `metadata.xml`,並寫明維護者;
|
||||
- `LICENSE` 須與所打包軟體聲明的授權條款一致,`::gentoo` 沒有的授權條款須加入 `licenses/` 和 `profiles/license_groups`;
|
||||
- 除特殊情況外,同一套件的改動須在同一個提交中;
|
||||
- 套件須登記到 `.github/workflows/overlay.toml`,依 `category/package` 的字母順序插入,不適合 nvchecker 的須註解原因;
|
||||
- 可自動更新版本的套件見 [scripts/autobump.zh.md](./scripts/autobump.zh.md);
|
||||
- ebuild 提交前須進行測試;
|
||||
- 不再維護的套件,須在 issue 中尋找接手者。無人接手的,依據 [last rites](https://devmanual.gentoo.org/ebuild-maintenance/removal/) 流程移除:在 `profiles/package.mask` 最上方加入條目,寫明作者、電子郵件、日期(UTC)、原因和移除日期,至少 30 天後移除。範例:
|
||||
|
||||
```
|
||||
# Zakk <zakk@gentoozh.org> (2026-11-18)
|
||||
# Upstream archived.
|
||||
# Removal on 2026-12-18.
|
||||
net-proxy/daed
|
||||
```
|
||||
|
||||
參考:
|
||||
|
||||
- [Devmanual](https://devmanual.gentoo.org/)
|
||||
- [GLEP 66](https://www.gentoo.org/glep/glep-0066.html):git 工作流程與提交訊息
|
||||
- [GLEP 76](https://www.gentoo.org/glep/glep-0076.html):著作權政策與 `Signed-off-by`
|
||||
- [pkgdev](https://pkgcore.github.io/pkgdev/)、[pkgcheck](https://pkgcore.github.io/pkgcheck/)
|
||||
|
||||
## 提交
|
||||
|
||||
所有改動經 pull request 合併,禁止直接推送 master 或繞過 CI。
|
||||
|
||||
提交遵循 [Gentoo git workflow](https://wiki.gentoo.org/wiki/Gentoo_git_workflow):
|
||||
|
||||
- 第一行為摘要行,格式為 `category/package: 摘要`,不超過 69 個字元;
|
||||
- 內文可選;如有內文,須與摘要行之間空一行;
|
||||
- 須附 `Signed-off-by:`,可用 `pkgdev commit --signoff` 新增;
|
||||
- 版本更新的格式為 `category/package: add 0.5, drop 0.4`;
|
||||
- pull request 中不得有 merge commit,同步 master 時使用 `git rebase`,不使用 `git merge`。
|
||||
|
||||
範例:
|
||||
|
||||
```
|
||||
app-misc/foo: fix build with GCC 16
|
||||
|
||||
Add a missing include.
|
||||
|
||||
Signed-off-by: A Developer <example@gentoo.org>
|
||||
```
|
||||
|
||||
常用指令:
|
||||
|
||||
```
|
||||
pkgdev manifest # 更新 Manifest
|
||||
pkgcheck scan --net # 檢查目前的改動
|
||||
pkgdev commit --signoff # 提交,產生摘要行並附 Signed-off-by
|
||||
pkgdev commit --signoff -m "fix build with GCC 16" -m "Add a missing include."
|
||||
# 自訂摘要行和內文
|
||||
pkgcheck scan --commits --net # 發起 pull request 前檢查本分支的提交
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> `pkgdev commit` 的 `-b` 和 `-c` 會引用到 bugs.gentoo.org,不要用於本儲存庫的 issue。
|
||||
|
||||
### pull request 描述
|
||||
|
||||
須使用 pull request 範本:
|
||||
|
||||
- 描述寫在 `<!-- Please put the pull request description above -->` 之上;
|
||||
- 關閉本儲存庫的 issue 時,在描述中加入 `Closes #N`;
|
||||
- 改動了套件、`eclass/`、`profiles/` 或 `licenses/` 時,須勾選 pkgcheck;如果使用了 AI,須勾選 AI。
|
||||
|
||||
範例:
|
||||
|
||||
```
|
||||
Because upstream 1.2.3 fixes a crash on Wayland, add it.
|
||||
|
||||
Closes #12345
|
||||
|
||||
<!-- Please put the pull request description above -->
|
||||
|
||||
---
|
||||
|
||||
Please check all the boxes that apply:
|
||||
|
||||
- [x] I have run `pkgcheck scan --commits --net` to check for issues with my commits.
|
||||
- [x] If I used AI: I understand every change, tested it and take responsibility for it; commits with AI-written changes carry `Assisted-by:`.
|
||||
|
||||
Please note that all boxes must be checked for the pull request to be merged.
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> 發起 pull request 後,須修復 pkgcheck 報告和 CI 發現的問題,包括 QA 提示。
|
||||
|
||||
## AI 政策
|
||||
|
||||
允許使用 AI,但須滿足以下要求:
|
||||
|
||||
- 使用 AI 輔助時須遵守 [AGENTS.md](./AGENTS.md);
|
||||
- 貢獻者須理解 AI 生成的內容;
|
||||
- `Signed-off-by` 須由貢獻者本人新增,不得由工具新增;
|
||||
- 新增 `Signed-off-by` 前,貢獻者須確認 AI 生成的部分沒有複製授權條款不相容的程式碼;
|
||||
- AI 生成的提交訊息和 pull request 描述須準確、精簡、不重複,所述內容須經驗證。
|
||||
|
||||
### 聲明
|
||||
|
||||
含 AI 生成改動的提交,須在 `Signed-off-by:` 之上新增 `Assisted-by:` 行,格式同 [Linux 核心](https://docs.kernel.org/process/coding-assistants.html),為 `Assisted-by: 工具名:模型名`。用 `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
|
||||
```
|
||||
|
||||
產生的提交訊息:
|
||||
|
||||
```
|
||||
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]
|
||||
> 不得使用 `Co-authored-by:`,CI 將拒絕。
|
||||
|
||||
以下情況無需聲明:
|
||||
|
||||
- 小改動或機械性改動;
|
||||
- 僅使用 AI 審查貢獻者自己的改動,並由貢獻者自行修復 AI 發現的問題。
|
||||
|
||||
### 禁止
|
||||
|
||||
- 由工具發出 pull request、推送或留言,而貢獻者未逐條閱讀並批准。
|
||||
- 根據工具輸出批次發起 pull request,而未逐一建置和測試。
|
||||
- 隱瞞或淡化 AI 的參與程度。
|
||||
|
||||
autobump、nvchecker 等本儲存庫自有的 bot 不受上述規則限制。
|
||||
|
||||
### 測試
|
||||
|
||||
AI 生成的改動與其他改動適用相同的測試要求,ebuild 須經過冒煙測試。不得聲稱執行了實際未執行的測試。
|
||||
|
||||
### 執行
|
||||
|
||||
如果懷疑貢獻中使用了 AI 卻未聲明,我們會要求說明,貢獻者須如實回答;拒絕說明的,我們會關閉該 pull request 或 issue。本規則同樣適用於維護者。
|
||||
|
||||
agent 可以使用 [gentoo-zh/skills](https://github.com/gentoo-zh/skills) 打包、更新版本和審查。它只執行 AGENTS.md 的規則,不另立規則。安裝指令:
|
||||
|
||||
```
|
||||
npx skills add gentoo-zh/skills -g
|
||||
```
|
||||
|
||||
本節參考 [OpenWrt packages 的 AI 政策](https://github.com/openwrt/packages/blob/master/CONTRIBUTING.md#ai-policy)。
|
||||
Reference in new issue
Block a user