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
/etc/portage/repos.conf é um arquivo diretório que especifica a localização e configurações dos repositórios usados pelo sistema. Ele refere-se ao repositório Gentoo e possivelmente ao repositórios ebuild usados em um sistema.
Formato
Portage pode lidar com repos.conf enquanto como um arquivo ou um diretório de arquivos. O método preferido para ser usado é um diretório. Outras ferramentas como layman e mirrorselect exigem e esperam que seja um diretório. Layman cria e gerencia seu próprio arquivo layman.conf para registrar os overlays instalados com o Portage. mirrorselect procura pelo arquivo repos.conf/gentoo.conf a fim de modificar o parâmetro
sync-uri
para o repositório Gentoo.- Os nomes dos arquivos podem ser cordas arbitrárias de caracteres com ou sem sufixo, exceto para repos.conf / gentoo.conf esperado por mirrorselect.
- Comentários começam com
#
(não há comentários incorporados). - A configuração de cada repositório é especificada em um arquivo ou seção separada começando com
[repository_name]
. Recomenda-se que[repository_name]
seja o mesmo que o nome fornecido no arquivo repo_name. - Atributos são especificados no formato
attribute = value
.
Atributos suportados na seção 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
, andmasters
.
Atributos suportados na seção de repositórios
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 setyes
,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
, andmasters
. 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 to0
, the depth is unlimited. sync-git-verify-commit-signature
- Require the top commit in the repository to contain a good OpenPGP signature. Defaults to false.
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]
Exemplos
Repositório principal do 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.
/etc/portage/repos.conf/gentoo.conf
Rsync 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.
Repositório ebuild customizado
[NameOfYourEbuildRepository] location = /usr/local/portage masters = gentoo auto-sync = no
Para maiores informações veja o artigo custom repository.
Repositório ebuild externo
/etc/portage/repos.conf/brother-overlay.conf
Adding 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 como um único arquivo
Para um exemplo de repos.conf como um arquivo monolítico, execute este comando e procure pela seção repos.conf:
user $
man 5 portage
Listando repositórios
Para ver uma lista compacta de repositórios, classificados por números prioritários ascendentes e formatados para facilitar a leitura:
user $
emerge --info --verbose | sed -n '/^Repo/,/^ABI/p' | head -n -1
Para ver uma lista detalhada de repositórios, sem qualquer formatação:
user $
portageq repos_config /
Veja também
- Validated Gentoo repository snapshots in the Gentoo Handbook
- Overview over the new Portage sync system
- Layman - Using 'repos.conf' method no artigo Layman
- Overlays user guide
- Repository format
- Repository mirror and Continuous Integration
- Query repository information no artigo Portageq
- Using the gentoo git checkout as your local tree
- Masking installed but unsafe ebuild repositories
- eselect-repository, uma ferramenta para gerenciar repositórios de terceiros em repos.conf