GentooThis forum is for the discussion of Gentoo Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Coming from other distros such as Debian and Arch, I don't really understand the purpose of rsync. In other distros I select one (or a few [such as security updates]) mirror location and syncronize with the mirror location itself.
Why am I required to set a sync as well as a mirror server?
What is the difference between the GENTOO-MIRRORS and SYNC?
rsync is not in the slightest bit gentoo specific. You have rsync on EVERY distro out there. They just don't use it the way gentoo does.
rsync here is being used to mirror a location using the rsync transfer method instead of http or ftp. It's just another way to obtain local copies of files, but here it keeps them up to date more effectively as it will compare the two locations explicitly.
The rsync command has been included with every distro I've installed, including Debian, but just as a command that you could use or not use as fits your needs.
Its most common use, I think, is to back up stuff, usually to another computer or drive. That's how I use it, at least.
Last edited by frankbell; 02-01-2013 at 10:10 PM.
Reason: clarity
The rsync command is used to make one directory contain exactly the same than another directory, with a minimum of data transfer required, which is especially useful if the "template" (or "source") directory is located on an externel server in the internet.
rsync copies files you don't have, deletes files the other server does no longer have, and also checks if files have changed (using hashes) and updates your files accordingly. It's a fast & convenient method of synchronizing the contents of two given directories. So rsync is used to create a local 1:1 copy of the recent list of available packages to your machine.
The other "mirror" thing is not used together with rsync because you don't want to download all the tenthousands of software packages that are available for possible install. It only specifies a server address where you can download packages from, which is then used whenever you install [a] software package[s].
Mmm, it seems your concern is that Gentoo uses rsync instead of curl or wget... well, assume it, your neighbour probably has a different car, a different pet, and a different wife. It's the way life is :P
Being that said, let's clarify some things.
In first place, as said above, rsync has nothing to do with Gentoo. Gentoo uses rsync just like it uses gcc or glibc. Each distro picks whatever suits.
Secondly, there are two separate kinds of data at package manager level: the ebuilds which conform the portage tree on one side; and the source (and a few binary) packages on the other side.
Gentoo uses rsync for portage, which is kind-of the package database. But it also uses a plethora of other tools to fetch the actual packages. Most tarballs are downloaded using wget, but some ebuilds use other tools, even RCSs like svn, git, bazaar, cvs... It just depends on the nature of the package.
Note that in any case, wget can be changed for whatever suits you by setting $FETCHCOMMAND in make.conf. I don't recommend it, though.
Thirdly, you *don't need* to set neither the mirrors nor the rsync server. There are defaults. Maybe the handbook misguided you in that, I don't know. It's been years since I used it.
rsync just happens to be the most efficient way to keep in sync the portage tree using the minimum bandwidth and cutting drastically the sync times. An RCS like git could be used as well, but it would introduce lots of control files in the tree which is, in my opinion, an unnecessary overhead (and in any case would not bring any advantage over rsync).
If you feel that picky about using rsync for some obscure and mysterious reason, then just use whatever tool you prefer to reguarly download a portage snapshot, remove your old portage tree and uncompress the new one in the same location.
Other than that, is there any real problem that you are trying to solve?
Last edited by i92guboj; 02-28-2013 at 05:53 AM.
Reason: typos
Thank you for all your posts. I am still confused about the GENTOO_MIRROR variable.
Quote:
A second important setting is the SYNC setting in make.conf. This variable contains the rsync server you want to use when updating your Portage tree (the collection of ebuilds, scripts containing all the information Portage needs to download and install software).
Is SYNC for synchronizing the portage database and GENTOO_MIRROR for downloading the actual packages.
Is this a rough equivalent?
SYNC ~= aptitude update (SYNC would be where the package manager goes to update the package database)
GENTOO_MIRROR ~= aptitude get <software> (GENTOO_MIRROR would be where the package manager goes to get the actual package)
Last edited by snmcdonald; 02-28-2013 at 04:15 PM.
Yes. You can actually just paste the url into a browser and take a look to see what it contains
Interesting. Thank you. At first I thought it was redundant to separate the list from the software, but on second thought its nice to have a finer control.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.