This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.

Please visit our production wiki at https://wiki.gentoo.org

/etc/portage/repos.conf

From Gentoo Wiki (test)
Jump to:navigation Jump to:search
This page is a translated version of the page /etc/portage/repos.conf and the translation is 100% complete.

/etc/portage/repos.conf は、現在のシステムに用いられる、リポジトリの所在や設定を記載するファイルまたはディレクトリです。Gentoo リポジトリ や、ときには ebuild リポジトリ も記載されるでしょう。

記法

注意
Portage は、repos.conf がファイル形式でもディレクトリ形式でも処理可能です。しかし、ディレクトリ を推奨します. laymanmirrorselect のようなツールは、ディレクトリ形式であることを要したり、想定していたりします。Layman は、Portage にインストール済 ebuild リポジトリを登録するために、独自に layman.conf ファイルを作成し管理しています。mirrorselect は、Gentoo リポジトリ用の設定としてrepos.conf/gentoo.conf ファイルがあることを想定し、そのファイル内の sync-uri パラメータを変更しようとします。
  • ファイル名は、任意の文字列で、サフィックスの有無も問いません。ただし、repos.conf/gentoo.conf は例外で、mirrorselect がファイル名を想定しています。
  • コメントは#で開始します(インラインコメントはありません)。
  • 各リポジトリの設定は、別々のファイルか[リポジトリ名]で始まるセクションで指定されます。[リポジトリ名]は、repo_nameファイルで与えられた名前と同じものにすることを推奨します。
  • 属性は属性 = 値の形式で指定します。

default セクション内に記載可能な属性

main-repo
Specifies main repository.
eclass-overrides
Makes all repositories inherit eclasses from the specified repositories. Setting this attribute is generally not recommended since resulting changes in eclass inheritance may trigger performance issues due to invalidation of metadata cache.
The egencache, emirrordist and repoman tools ignore this parameter by default as their operations are generally not site-specific (their operations are focused on the global, non-customized aspects of portage and the Gentoo repository). This behavior can be overruled by setting force = eclass-overrides.
force
Specifies names of attributes, which should be forcefully respected by egencache, emirrordist, and repoman. Valid values: aliases, eclass-overrides, and masters.

リポジトリごとのセクションに記載可能な属性

aliases
Specifies aliases of given repository. Setting this attribute is generally not recommended since resulting changes in eclass inheritance may trigger performance issues due to invalidation of metadata cache.
The egencache, emirrordist and repoman tools ignore this parameter by default as their operations are generally not site-specific (their operations are focused on the global, non-customized aspects of portage and the Gentoo repository). This behavior can be overruled by setting force = aliases.
auto-sync
This setting determines if the repo will be synced during emerge --sync or emaint sync --auto runs. This allows for repositories to be synced only when desired via emaint sync --repo foo. Valid values: yes, no, true, false. If unset, the repo will be treated as set yes, true.
eclass-overrides
Makes all repositories inherit eclasses from specified repositories. Setting this attribute is generally not recommended since resulting changes in eclass inheritance may trigger performance issues due to invalidation of metadata cache.
The egencache, emirrordist and repoman tools ignore this parameter by default as their operations are generally not site-specific (their operations are focused on the global, non-customized aspects of portage and the Gentoo repository). This behavior can be overruled by setting force = eclass-overrides.
force
Specifies names of attributes, which should be forcefully respected by egencache, emirrordist, and repoman. Valid values: aliases, eclass-overrides, and masters.
location
Specifies location of given repository.
masters
Specifies master repositories of given repository. Setting this attribute is generally not recommended since resulting changes in eclass inheritance may trigger performance issues due to invalidation of metadata cache.
The egencache, emirrordist and repoman tools ignore this parameter by default as their operations are generally not site-specific (their operations are focused on the global, non-customized aspects of portage and the Gentoo repository). This behavior can be overruled by setting force = masters.
priority
Specifies priority of given repository.
sync-cvs-repo
Specifies CVS repository.
clone-depth
Specifies clone depth to use for DVCS repositories. Defaults to 1 (only the newest commit). If set to 0, the depth is unlimited.
sync-type
Specifies type of synchronization performed by emerge --sync. Valid non-empty values: cvs, git, rsync, svn, websync (<=portage-2.2.18), webrsync (>=portage-2.2.19). This attribute can be set to empty value to disable synchronization of given repository. Empty value is default.
sync-umask
Specifies umask used to synchronize the repository. Takes an octal permission mask, e.g. 022.
sync-uri
Specifies URI of repository used for synchronization performed by emerge --sync. This attribute can be set to empty value to disable synchronization of given repository. Empty value is default.
Syntax:
cvs: [cvs://]:access_method:[username@]hostname[:port]:/path
git: (git|git+ssh|http|https)://[username@]hostname[:port]/path
rsync: (rsync|ssh)://[username@]hostname[:port]/(module|path)
sync-user
Specifies the credentials used to perform the synchronization. If only user is provided, the primary group of the user will be used. If only group is provided, the current user will be preserved and only the group id will be changed. This key takes precedence over FEATURES=userpriv. If user or group id is provided, Portage no longer uses owner of the directory.
Syntax: [user][:group]

メイン Gentoo リポジトリ

rsync

The example below shows the default set up of the main Gentoo repository. However, there is no need for having this file unless its content deviates from the file found at /usr/share/portage/config/repos.conf.

FILE /etc/portage/repos.conf/gentoo.confRsync example
[DEFAULT]
main-repo = gentoo

[gentoo]
location = /usr/portage
sync-type = rsync
sync-uri = rsync://rsync.gentoo.org/gentoo-portage
auto-sync = yes
sync-rsync-verify-jobs = 1
sync-rsync-verify-metamanifest = yes
sync-rsync-verify-max-age = 24
sync-openpgp-key-path = /usr/share/openpgp-keys/gentoo-release.asc
sync-openpgp-key-refresh-retry-count = 40
sync-openpgp-key-refresh-retry-overall-timeout = 1200
sync-openpgp-key-refresh-retry-delay-exp-base = 2
sync-openpgp-key-refresh-retry-delay-max = 60
sync-openpgp-key-refresh-retry-delay-mult = 4

# for daily squashfs snapshots
#sync-type = squashdelta
#sync-uri = mirror://gentoo/../snapshots/squashfs

For a setup using sync-type websync (<=portage-2.2.18), webrsync (>=portage-2.2.19), see the webrsync.conf article.

カスタム ebuild リポジトリ

[NameOfYourEbuildRepository]
location = /usr/local/portage
masters = gentoo
auto-sync = no

さらなる情報はカスタム リポジトリにあります。

外部の ebuild リポジトリ

FILE /etc/portage/repos.conf/brother-overlay.confAdding the brother-overlay ebuild repository
[brother-overlay]
location = /usr/local/overlay/brother-overlay
sync-type = git
sync-uri = https://github.com/stefan-langenmaier/brother-overlay.git
auto-sync = yes

repos.conf を単一ファイルにするには

repos.conf を単一ファイル形式で設定する例としては、以下のコマンドを実行して repos.conf セクションを検索してください: (訳注: portage(5)の和訳ファイルはずっと更新されていないので、ロケールに C を設定して英語版を閲覧すること ( $ LC_ALL=C man 5 portage ))

user $man 5 portage

リポジトリの一覧表示

リポジトリの簡潔な一覧を、優先度の昇順でソートし、読み易く整形して見るには:

user $emerge --info --verbose | sed -n '/^Repo/,/^ABI/p' | head -n -1

リポジトリの詳細な一覧を整形なしで見るには:

user $portageq repos_config /

参考

外部の情報