Gentoo Archives: gentoo-user

From: Rich Freeman <rich0@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] local mirrors
Date: Thu, 25 Apr 2019 22:36:04
Message-Id: CAGfcS_=wKUrOzRCEGCWie5FmXKn1mueDUG+5cvYuUAGXighdLg@mail.gmail.com
In Reply to: [gentoo-user] local mirrors by n952162@web.de
1 On Thu, Apr 25, 2019 at 5:44 PM <n952162@×××.de> wrote:
2 >
3 > So, I set up the rsync deamon on my "mirror server" host and the /etc/portage/repos.conf/gentoo.conf file on the client machine, run the recommended test and everything is just as described. I sync my client, and am very happy.
4 >
5 > By coincidence, I happen to look in /var/log/emerge-fetch.log on the client and discover that everything got fetched remotely, from, like gentoo.org and rubygems.org, etc.
6 >
7 > What a disappointment! Is there something I still have to do?
8 >
9
10 The repository and distfiles both need to be separately mirrored.
11 Maintaining a distfiles mirror is a bit more complex as all your hosts
12 probably don't have the same packages installed, and fetching
13 distfiles for all the packages would use a ton of space (and
14 bandwidth). For Gentoo official mirrors this is exactly what is done,
15 but of course they get used by many users.
16
17 What I have done at times is run apache on one host and serve out its
18 local distfiles cache, and then list this as the first mirror in the
19 list for my other hosts. So, they try to fetch from that host before
20 going out to the internet. However, that doesn't do anything to
21 ensure that the needed files are on that host. It just helps with
22 @system packages and other packages the hosts have in common. That is
23 an approach that doesn't really cost you anything and probably
24 provides 75% of the benefit. It is also easy to do if you have a
25 bunch of identical hosts and then yields 100% of the benefit (if
26 they're truly identical I'd go a step further and set up a binpkg
27 mirror as there is no point in building the same thing many times with
28 the same flags).
29
30 If you really want to run a full distfiles mirror I'm sure the infra
31 scripts are floating around somewhere. It probably just amounts to
32 running an ebuild fetch on every ebuild in the repo.
33
34 --
35 Rich

Replies

Subject Author
Aw: Re: [gentoo-user] local mirrors n952162@×××.de