Question

RSync is traditionally used to update Gentoo portage tree.

But it's somewhat slow when dealing with a large number of files.

So, I want to try to replace RSync with Git.

I know that Funtoo have Git-based portage tree, but is there a Gentoo-specific official one?

Was it helpful?

Solution

As a Gentoo developer I can say that there is no official git repository for the portage tree. There are plans to switch from what is currently used, CVS, to git, but that may still take a while.

Currently, there are three ways to get the tree:

  1. Via rsync, as you mentioned.

  2. Via CVS, commands for anonymous access and online browsing can be found here. Updating is done with cvs update which is probably slower than rsync.

  3. By downloading a tarball of a portage snapshot from your nearest mirror, generated daily.

All other ways aren't official (such as the funtoo git repository mentioned in another answer), although they may be what you're looking for.

OTHER TIPS

Funtoo has not only it's own Funtoo portage tree via Git, but they also keep a plain Gentoo portage tree via Git, as well. You can configure Funtoo to use the Gentoo branch, and then you basically have an "official" Gentoo portage tree via Git.

As of 9th Aug, 2015, Gentoo has migrated their portage history to Git. You can check it at:

https://gitweb.gentoo.org/repo/gentoo.git

Or clone it at:

https://anongit.gentoo.org/git/repo/gentoo.git

However, there are a few things to point out:

  1. The repository does not include any commits before the migration. A "git replace --graft" is proposed [1].
  2. The Git portage tree does not contain metadata cache. You might need to generate by yourself using egencache or "emerge --regen".
  3. The Git portage tree does not contain any news or GLSA information. They are stored at:

[1] https://wiki.gentoo.org/wiki/Project:Infrastructure/Git_migration

For anyone interested in it nowadays: it comes out that after one of latest portage updates (2.2.16) it's possible to change to https://github.com/gentoo/gentoo-portage-rsync-mirror.

Another Gentoo dev here, and pretty much just seconding spatz' comments. Rsync is actually faster than you might realize, as a large git tree can take a while to sync. Have you tried forcing Portage to use a different rsync mirror? Some mirrors can be slower than others. There's been spots where I found a European mirror to be better than a US mirror. YMMV.

See the gentoo-scm list for up to date information on the git migration of portage: http://archives.gentoo.org/gentoo-scm/msg_57eaa893711e1b63faa4502e8921376b.xml

Short: Not yet, but they are working on switching to git.

Difference to funtoo: The tree will have the whole cvs history.

Agree to dev that rsync is stil faster.

On addition, if you think http download is faster, most Gentoo mirror maintain a portage snapshot for http/ftp download. Use emerge-webrsync to download or just discover the url matching your current mirror setting in make.conf. Once you get the url, you can use sth fast on http like aria2. Which might fetch files from more than one url.

From what I can see, the Gentoo repository doesn't come with a (D)VCS repo.
The only exception being this godin-gentoo-repository, which is actually only his copy of my local overlay/repository.

So that leave you with a list of Git repos hosting to chose from, and an initial import of a rsync of that tree in your very own Git repo.
The update process would still be slow (rsynch + git add -A + git commit -m) for you, but would be a lot quicker for your Git Gentoo repo followers ;)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top