Ebuild repository/ja

An ebuild repository, colloquially known as an overlay, is Article description::a structure of directories and files used to add and extend packages for a Gentoo-based system's package manager. Ebuild repositories can contain ebuilds conforming to one or more Ebuild APIs.

The main repository on a Gentoo system is known as the Gentoo ebuild repository. It contains ebuilds maintained by official Gentoo developers and members of the community (through the Proxy Maintainers project). System administrators can add additional ebuild repositories to the system using various utilities and methods described below.

リポジトリ
Ebuild repositories are nothing more (or less) than a set of files (ebuilds, metadata files, ...). These can be pulled in from public repositories (git, CVS, SVN ...) or downloaded as tarballs and extracted manually onto the system. It is advised to use managed repositories by trusted third parties; any installed ebuild repository will cause Portage to look through the overlaid files when deciding which software to install. If compromised code is in the ebuild repository, then compromised packages could be installed on the system.

The now default approach for handling repositories is through which, like many other Portage related locations, can be a directory as well.

Repository definitions inside also inform Portage if and how the repository can be updated. With it, calling will automatically update the repositories as well.

A deprecated, yet still supported method is to use the PORTDIR_OVERLAY variable inside. This variable can point to one or more additional locations on the file system where repositories are available. The use of the directory is highly preferred.

より詳しくは、 /etc/portage/repos.conf 及び Portage/Sync の記事を参照してください

優先順位について
Each ebuild repository has a unique priority to the package manager. This ensures that in the case of a specific version being found in several ebuild repositories, the resolution is unambiguous. Ebuilds from repositories with higher priority numbers (for example 60) will take precedence over ebuilds from repositories with lower priorities (such as 50).

優先度を含んだebuildリポジトリのリストは、以下のコマンドの出力で得られます（"Repositories"の欄を探してください）:

The Gentoo ebuild repository will have a priority of -1000 which means that all other repositories generally take precedence if they are assigned a higher priority. This is the default behavior, because ebuild repositories are designed to "lay over" or "on top" of the Gentoo repository.

各種ソフトウェア
多くのツールがebuildリポジトリをサポート、または統合的に扱っています.

Layman
アプリケーションは、複数の追加ebuildリポジトリを更新・管理することを容易にします. はコマンドラインアプリケーションで、を通じて公に利用可能なebuildリポジトリを一覧表示、購読、購読解除、更新することができます.

It supports both the as well as  method.
 * When using the method,  manages a dedicated configuration file which should be sourced in by
 * When using, manages the  file directly

より詳しくは Layman の記事及びProject:Portage/Sync を参照してください.

emaint
Sync (Portage project) 記事および を参照してください.

eix
is a wrapper starting (which in turn starts ) followed by. For further details see the Eix article and.

eselect-repository
maintains entries for Portage to access and synchronize. See Eselect/Repository article for details.

Emerging a duplicate package
When working with ebuild repositories it is possible to encounter a situation where multiple versions of the same package are available from different ebuild repositories. Instruct Portage to install a specific package from a specific ebuild repository with the  notation:

The same notation can be used for different emerge instructions, including uninstalling a package through.

キャッシュの生成について
portage は、ebuildリポジトリが多量にインストールされている場合には、パッケージの前提関係を解決するような処理に長い時間を要するかもしれません. これは、ebuildリポジトリには一般的に、メタデータキャッシュが含まれていないためです.

ローカルのメタデータキャッシュを生成するには、ebuildリポジトリとの同期後に を実行してください:

Be careful, because takes a lot of time and it's not recommended for rsync users as rsync updates the cache using server-side caches (most of users of portage are rsync users). Rsync users should simply run (or ) to regenerate the cache. It's probably only users of very large ebuild repositories should try.

Masking installed but unsafe ebuild repositories
When using large ebuild repositories or those with unknown/low quality it is best practice to hardmask the whole ebuild repository and only accept specific ebuilds on a case-by-case basis:

その後に、インストールするパッケージのマスクを外します.

参考

 * Overlays project - The official Gentoo project for ebuild repositories' support.
 * Overlays guide (Overlay project) - A user guide written by the Overlay project.
 * Developer's guide to Gentoo overlays - This document is kept only for historical purposes. The current guide is maintained as Project:Overlays/Overlays guide.
 * Defining a custom repository - Section in the Gentoo Handbook

外部の情報

 * https://repos.gentoo.org
 * https://github.com/gentoo/
 * https://gpo.zugaina.org/Overlays