/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.conf
Gentoo 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
git
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.
Syncing via git requires git (dev-vcs/git) to be installed prior to the initial sync! Be sure it is installed before moving onward.
To configure the ::gentoo ebuild repository to sync using git as the sync protocol, the following configuration can be used.
root #
eselect repository enable gentoo git
--2023-03-24 09:32:49-- https://qa-reports.gentoo.org/output/repos/repositories.xml Resolving qa-reports.gentoo.org... 151.101.129.91, 151.101.193.91, 151.101.1.91, ... Connecting to qa-reports.gentoo.org|151.101.129.91|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 253938 (248K) [text/xml] Saving to: '/root/.cache/eselect-repo/repositories.xml' repositories.xml 100%[=======================================================>] 247.99K --.-KB/s in 0.06s 2023-03-24 09:32:50 (4.20 MB/s) - '/root/.cache/eselect-repo/repositories.xml' saved [253938/253938] Adding gentoo to /etc/portage/repos.conf ... error: git: repository not in repositories.xml 1 repositories enabled
FILE
/etc/portage/repos.conf/gentoo.conf
Gentoo ebuild repository sync via git[gentoo] location = /var/db/repos/gentoo sync-type = git # Official "sync-friendly git mirror of repo/gentoo with caches and metadata" # Currently not suggested for production use. # sync-uri = https://anongit.gentoo.org/git/repo/sync/gentoo.git # GitHub mirror which saves the Gentoo project bandwidth. *This* sync-friendly git mirror is preferred) sync-uri = https://github.com/gentoo-mirror/gentoo.git sync-git-verify-commit-signature = yes # Default clone-depth setting does a shallow clone of the git repository. # For a full clone and ability to view git log/changes, set clone-depth = 0. # NOTE: A full clone of the gentoo repo is in excess of 6GB. # clone-depth = 0
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:
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
This will also be necessary if you change the clone-depth
configuration value from the default of 1
.