Gentoo Archives: gentoo-dev

From: Drake Wyrm <wyrm@×××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] /usr/portage --> /var/portage
Date: Mon, 19 Jan 2004 06:21:26
Message-Id: 20040119062722.GD31459@phaenix.haell.com
In Reply to: Re: [gentoo-dev] /usr/portage --> /var/portage by Jeremy Maitin-Shepard
1 On Thu, Jan 15, 2004 at 04:54:24PM -0500, in <874quwyj1r.fsf@××××××××.cx>, Jeremy Maitin-Shepard <jbms@g.o> wrote:
2 > Matthew Kennedy <mkennedy@g.o> writes:
3 > > IMHO we should go with the following as a default:
4 >
5 > > /usr/portage/packages -> /var/cache/packages
6 > > /usr/portage -> /usr/share/portage
7 >
8 > I agree packages should go to /var/cache/, but perhaps in a
9 > subdirectory in /var/cache/portage, such as
10 > /var/cache/portage/packages.
11 >
12 > The portage ebuild tree also qualifies as cache data, however, since it
13 ...snip...
14
15 My two yen:
16
17 '/usr/portage' is the wrong place for the Portage tree. The data is
18 certainly sharable, but certainly *not* static. Furthermore, FHS states
19 "Large software packages must not use a direct subdirectory under the
20 /usr hierarchy." The Portage tree should be moved, for FHS compliance,
21 for the reasons listed in the FHS rationale, and for the reasons discussed
22 elsewhere in this thread.
23
24 But to where?
25
26 The catch is this: if the machine in question is running on a network that
27 actually *shares* its sharable data (e.g. the /usr hierarchy), it makes
28 sense to put the the Portage tree somewhere under /usr. Except during sync
29 operations (which would be performed by the host serving the /usr tree),
30 the Portage tree remains generally unmodified, so it fits the requirement
31 of "...read-only data ... must not be written to." Even though many
32 files in the Portage tree are architecture-specific, _the_tree_itself_
33 is architecture- and host-independent.
34
35 Unfortunately, a Gentoo machine is a very dynamic environment. The Portage
36 tree changes drastically and often. On a machine which maintains its own
37 Portage tree, '/var' is absolutely the right place to look. FHS provides
38 two likely options: '/var/cache' (application cache data) and '/var/lib'
39 (variable state data). The DISTDIR, on the other hand, is much less
40 dynamic and could still find a home under '/usr'.
41
42 The latest version of FHS also provides another beautiful option:
43 '/srv'. The intent of this addition seems to be a "/home" tree for
44 "users" that are really services/daemons. Something to keep in mind when
45 we start upgrading to the new FHS.
46
47 I propose the following be adopted as "reasonable defaults" for Portage.
48 PORTDIR=/var/cache/portage # change to /usr/share/portage on
49 # a network which shares /usr
50 DISTDIR=/usr/src/distfiles
51 PKGDIR=/usr/share/package/portage # Any suggestions on pkgdir and rpmdir?
52 RPMDIR=/usr/share/package/rpm # These don't seem quite right
53 PORTAGE_TMPDIR=/var/tmp
54 PORT_LOGDIR=/var/log/portage
55
56 Also, move the contents of '/var/cache/edb' and '/var/db/pkg' to
57 '/var/lib/portage'. FHS specifically mentions '/var/db' as a BSDism
58 that should be moved to '/var/lib'; '/var/cache/edb' contains state
59 data, rather than cache data. This change should not be too difficult
60 to effect. Only 57 lines of code specifically mention '/var/cache/edb'
61 and 75 mention '/var/db'. To be painfully honest, there are a number of
62 Python constructs I do not yet understand, but I think I have a reasonable
63 grasp of how Portage actually works.
64
65 --
66 Batou: Hey, Major... You ever hear of "human rights"?
67 Kusanagi: I understand the concept, but I've never seen it in action.
68 --Ghost in the Shell

Replies

Subject Author
Re: [gentoo-dev] /usr/portage --> /var/portage Jeremy Maitin-Shepard <jbms@g.o>
Re: [gentoo-dev] /usr/portage --> /var/portage Paul de Vrieze <pauldv@g.o>