Gentoo Archives: gentoo-user

From: Rich Freeman <rich0@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Recommended location of the Gentoo ebuild repository
Date: Wed, 16 Dec 2020 14:55:43
Message-Id: CAGfcS_mCGS-2gQs8y54PwB6ZXwL64Zw-14Gbupv48mCCqAm0GQ@mail.gmail.com
In Reply to: Re: [gentoo-user] Recommended location of the Gentoo ebuild repository by gevisz
1 On Wed, Dec 16, 2020 at 9:45 AM gevisz <gevisz@×××××.com> wrote:
2 >
3 > Nevertheless, the explanation why /var/db/repos/gentoo is better than
4 > /usr/portage is still welcomed. :)
5 >
6
7 There is a lengthy discussion on gentoo-dev on this, and my personal
8 first choice didn't win. :)
9
10 There is little dispute that /var makes more sense than /usr other
11 than legacy reasons. /usr is generally used for static data - on some
12 distros it might even be read-only, a squashfs, signed using crypto,
13 and so on. On a rolling release distro like Gentoo it might get
14 changed often by updates, but other than system updates nothing in it
15 should change. On a more release-based distro only security updates
16 or major releases would touch it.
17
18 /var on the other hand is used for application data and other things
19 that change all the time. That includes things like databases, which
20 the Gentoo repo basically is. Mail spools, print spools, caches, and
21 so on all go on there.
22
23 FHS formalizes all this stuff.
24
25 Now, where exactly in /var it goes is more a matter of debate.
26 /var/db is not specified in FHS, but it is used by FreeBSD which I
27 think was one of the selling points. Personally I stick it in
28 /var/cache as (IMO) it just contains a local copy of a repository that
29 is entirely stored elsewhere. Some would certainly disagree with
30 that. I think /var/lib would be an alternative place that keeps more
31 to FHS.
32
33 However, moving it out of /usr was a move with near-universal support.
34 And you can really put it anywhere you want by editing one line in
35 your portage config. I don't think the directory even exists in the
36 base install - it gets created the first time you sync so it is
37 entirely user-configurable.
38
39 --
40 Rich

Replies