Gentoo-zh 下载

Gentoo 中文社区的 overlay 指南、distfiles、binhost、Live ISO 与镜像服务。

Overlay

gentoo-zh 是 Gentoo 中文社区维护的 overlay,前身为 2003 年的 gentoo-tw 与 gentoo-china,收录中文用户常用的软件包。

选择 Git 镜像后,下方的配置会随之更新。

添加 overlay

这些镜像仅通过 Git 同步 gentoo-zh overlay 的 ebuild 仓库,不包含软件源代码文件。

安装 eselect-repository,再使用所选镜像添加并同步 overlay:

同步源
sudo emerge --ask app-eselect/eselect-repository
sudo eselect repository add gentoo-zh git https://mirrors.cernet.edu.cn/gentoo-zh.git
sudo emaint sync -r gentoo-zh
手动配置或更换镜像

首次配置时,创建 /etc/portage/repos.conf/gentoo-zh.conf。更换 Git 镜像时,只需编辑 /etc/portage/repos.conf/ 中包含 [gentoo-zh] 的配置文件。通过 eselect-repository 生成的配置位于 /etc/portage/repos.conf/eselect-repo.conf。

完整配置示例:

# /etc/portage/repos.conf/gentoo-zh.conf
[gentoo-zh]
location = /var/db/repos/gentoo-zh
sync-type = git
sync-uri = https://mirrors.cernet.edu.cn/gentoo-zh.git
auto-sync = yes

更换镜像后,删除现有的本地仓库并重新同步:

sudo rm -rf /var/db/repos/gentoo-zh
sudo emaint sync -r gentoo-zh

接受测试关键字

gentoo-zh 软件包仅提供 ~ARCH(测试)关键字,没有 stable 关键字。已全局使用 ~amd64 的系统可跳过此步骤;使用 stable 关键字的系统需要先接受 ~amd64。

关于 ~ARCH 的说明见 Gentoo Wiki。

::gentoo-zh 将设置限定于该 overlay。由于其中的软件包均使用 ~ARCH,可接受整个 overlay 的 ~amd64 关键字,Gentoo 主仓库的软件包不受影响:

# /etc/portage/package.accept_keywords/gentoo-zh
*/*::gentoo-zh ~amd64

也可逐个接受软件包的测试关键字:

# /etc/portage/package.accept_keywords/gentoo-zh
net-im/tencent-qq ~amd64

安装软件包

sudo emerge --ask net-im/tencent-qq

列出 overlay 提供的软件包:eix -RO gentoo-zh。

distfiles 镜像与 binary package

distfiles 镜像用于下载源码,见配置 distfiles。

binary package 用于安装预编译软件包,可独立启用,见配置 binary package。

注意事项

旧同步地址、重定向与版本差异见 Overlay FAQ 和镜像 FAQ。