GentooThis forum is for the discussion of Gentoo Linux.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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 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.
Thank you for all your posts. I am still confused about the GENTOO_MIRROR variable.
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.