/etc/portage/repos.conf/gentoo.conf

From Gentoo Wiki
< /etc/portage‎ | repos.conf(Redirected from Gentoo.conf)
Jump to:navigation Jump to:search

This article provides detailed examples of different repos.conf sync-type configurations.

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.confGentoo ebuild repository sync via rsync
[DEFAULT]
main-repo = gentoo

[gentoo]
location = /var/db/repos/gentoo
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

websync

For a setup using sync-type websync (<=portage-2.2.18), webrsync (>=portage-2.2.19), see the Validated Gentoo repository snapshots section in the Handbook.

git

To configure the ::gentoo ebuild repository to sync using git as the sync protocol, the following configuration can be used.

Important
Syncing via git requires git (dev-vcs/git) to be installed prior to the initial sync! Be sure it is installed before moving onward.
Note
Systems that are transitioning from the rsync sync method to git will refuse the initial sync. This is because git will want to sync into an empty directory. It is best practice to rename the rsync target directory and then perform the git checkout. For example:

root #mv /var/db/repos/gentoo /var/db/repos/gentoo.old-rsync
root #emaint sync -r gentoo
root #rm -r /var/db/repos/gentoo.old-rsync
FILE /etc/portage/repos.conf/gentoo.confGentoo ebuild repository sync via git
[DEFAULT]
main-repo = gentoo

[gentoo]
location = /var/db/repos/gentoo
sync-type = git
# Official "sync-friendly git mirror of repo/gentoo with caches and metadata"
# sync-uri = https://anongit.gentoo.org/git/repo/sync/gentoo.git
# GitHub mirror (saves the Gentoo project bandwidth - of *this* sync-friendly git mirror is preferred)
sync-uri = https://github.com/gentoo-mirror/gentoo.git
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