
Code: Select all
ct85711@Oate ~ $ cat /etc/portage/repos.conf/gentoo.conf
[DEFAULT]
main-repo = gentoo
[gentoo]
location = /usr/portage
#sync-type = rsync
sync-type = git
auto-sync = yes
#sync-uri = rsync://rsync3.us.gentoo.org/gentoo-portage
sync-uri = https://github.com/gentoo/gentoo-portage-rsync-mirror

Code: Select all
[DEFAULT]
main-repo = gentoo
[gentoo]
location = /usr/portage
sync-type = rsync
sync-uri = rsync://rsync.gentoo.org/gentoo-portage
auto-sync = yes
Code: Select all
# clone the main tree with history stripped to the last 50 commits
git clone --depth=50 git@github.com:gentoo/gentoo.git
cd gentoo
# clone a tree mirror which holds pre-generated cache (it might not be 100% in sync with the real tree though, we update the cache later)
git clone --depth=1 git@github.com:gentoo-mirror/gentoo.git metadata-mirror
# move the cache to the right place
mv metadata-mirror/metadata/md5-cache metadata/
# remove remaining files
rm -rf metadata-mirror
Code: Select all
egencache --jobs=8 --repo=gentoo --update --update-use-local-descCode: Select all
git pull --ff origin master
# this does NOT take long, because it just updates the existing cache
egencache --jobs=8 --repo=gentoo --update --update-use-local-descCode: Select all
[ -z "$(git show -q --pretty="format:%G?" $(git rev-list --first-parent master) | grep -v G)" ] && echo "verification success" || echo "verification failure"Code: Select all
git show -q --pretty="format:%h %an %G?" $(git rev-list --first-parent master) | grep '.* [NBU]$'There is no change, because rsync just continues to work for users as it has always been...Tony0945 wrote:1. Why wasn't there a news item alerting all users to this substantial change? At least when the environmental variables changed to repos.conf, the change was automatic.
Portage supports git as a sync type, see https://wiki.gentoo.org/wiki/Project:Po ... #Migrationct85711 wrote:to identify like the part hasufell posted on updating the tree to find out you don't need to do git pull and egencache when emerge --sync works just fine...
Code: Select all
location = /usr/portage
sync-type = git
sync-uri = git@github.com:gentoo/gentoo.git
auto-sync = yes
Code: Select all
emerge --sync
egencache --jobs=8 --repo=gentoo --update --update-use-local-desc

Returns:hasufell wrote:
My steps just showed how you fetch that pre-generated cache into the real repo. Instead, you can probably just do (although I cannot test, since I don't use portage) in /etc/portage/repos.conf/gentoo.confThen doCode: Select all
location = /usr/portage sync-type = git sync-uri = git@github.com:gentoo/gentoo.git auto-sync = yesnot much of a difference there, reallyCode: Select all
emerge --sync egencache --jobs=8 --repo=gentoo --update --update-use-local-desc
Code: Select all
~$ sudo emerge --sync
>>> Syncing repository 'gentoo' into '/usr/portage'...
/usr/bin/git clone --depth 1 git@github.com:gentoo/gentoo.git .
fatal: destination path '.' already exists and is not an empty directory.
!!! git clone error in /usr/portage
That's what repo.postsync.d is for.hasufell wrote:Code: Select all
egencache --jobs=8 --repo=gentoo --update --update-use-local-desc
hasufell wrote:Portage supports git as a sync type, see https://wiki.gentoo.org/wiki/Project:Po ... #Migrationct85711 wrote:to identify like the part hasufell posted on updating the tree to find out you don't need to do git pull and egencache when emerge --sync works just fine...
So you don't really have to manually do "git pull". That means you do your regular emerge --sync, but generate the cache on top of it (as said: that problem will be solved with another mirror that has pregenerated cache).
My steps just showed how you fetch that pre-generated cache into the real repo. Instead, you can probably just do (although I cannot test, since I don't use portage) in /etc/portage/repos.conf/gentoo.confThen doCode: Select all
location = /usr/portage sync-type = git sync-uri = git@github.com:gentoo/gentoo.git auto-sync = yesnot much of a difference there, reallyCode: Select all
emerge --sync egencache --jobs=8 --repo=gentoo --update --update-use-local-desc
Code: Select all
>>> Syncing repository 'gentoo' into '/usr/portage'...
/usr/bin/git clone --depth 1 git@github.com:gentoo/gentoo.git .
Cloning into '.'...
Warning: Permanently added the RSA host key for IP address '192.30.252.131' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
!!! git clone error in /usr/portageNo, please don't. That might cause trouble for the infra server if every user out there pulls the whole tree directly from infra.yngwin wrote:You will want to use git://anongit.gentoo.org/repo/gentoo.git
If I have a github account what link should I use?hasufell wrote:No, please don't. That might cause trouble for the infra server if every user out there pulls the whole tree directly from infra.yngwin wrote:You will want to use git://anongit.gentoo.org/repo/gentoo.git
If you don't have a github account, just use https://github.com/gentoo/gentoo.git. They can handle the load.
Then you can either use the https link or the ssh clone url git@github.com:gentoo/gentoo.gitKollin wrote:If I have a github account what link should I use?hasufell wrote:No, please don't. That might cause trouble for the infra server if every user out there pulls the whole tree directly from infra.yngwin wrote:You will want to use git://anongit.gentoo.org/repo/gentoo.git
If you don't have a github account, just use https://github.com/gentoo/gentoo.git. They can handle the load.