Gentoo Archives: gentoo-catalyst

From: Brian Dolbec <dolsen@g.o>
To: gentoo-catalyst@l.g.o
Subject: Re: [gentoo-catalyst] [PATCH 6/7] defaults.py: Update all repository, DISTDIR, PKGDIR settings to new /var paths
Date: Fri, 10 Mar 2017 21:02:18
Message-Id: 20170310130210.5fc9f3d2.dolsen@gentoo.org
In Reply to: Re: [gentoo-catalyst] [PATCH 6/7] defaults.py: Update all repository, DISTDIR, PKGDIR settings to new /var paths by Brian Dolbec
1 On Fri, 10 Mar 2017 12:36:06 -0800
2 Brian Dolbec <dolsen@g.o> wrote:
3
4 > On Fri, 10 Mar 2017 11:51:07 -0800
5 > Zac Medico <zmedico@g.o> wrote:
6 >
7 > > On Fri, Mar 10, 2017 at 11:23 AM, Brian Dolbec <dolsen@g.o>
8 > > wrote:
9 > > > @@ -75,8 +75,8 @@ TARGET_MOUNT_DEFAULTS = {
10 > > > "distdir": "/usr/portage/distfiles",
11 > > > "icecream": "/usr/lib/icecc/bin",
12 > > > "kerncache": "/tmp/kerncache",
13 > > > - "packagedir": "/usr/portage/packages",
14 > > > - "portdir": "/usr/portage",
15 > > > + "packagedir": "/var/portage/packages",
16 > > > + "portdir": "/var/portage/repos",
17 > > > "port_tmpdir": "/var/tmp/portage",
18 > > > "port_logdir": "/var/log/portage",
19 > > > "proc": "/proc",
20 > > > @@ -86,8 +86,8 @@ TARGET_MOUNT_DEFAULTS = {
21 > > > SOURCE_MOUNT_DEFAULTS = {
22 > > > "dev": "/dev",
23 > > > "devpts": "/dev/pts",
24 > > > - "distdir": "/usr/portage/distfiles",
25 > > > - "portdir": "/usr/portage",
26 > > > + "distdir": "/var/portage/distfiles",
27 > > > + "portdir": "/var/portage/repos",
28 > > > "port_tmpdir": "tmpfs",
29 > > > "proc": "/proc",
30 > > > "shm": "shmfs",
31 > >
32 > > Shouldn't those portdir settings be /var/portage/repos/gentoo or
33 > > something like that?
34 >
35 > No, that is the base directory for it to unpack or rsync the repo to.
36 > It is a little confusing because of the way the code was written
37 > before. I'll have to get in there and rename that to 'reposdir' to
38 > better reflect the way it is used.
39 >
40 > Note, those settings were only temporary for testing that the code was
41 > ready for relocation. I think I'll change them to /var/gentoo as the
42 > base for now. Then we can change them when the council has decreed
43 > the final location.
44 >
45
46 Also, with these code changes, it completely separates the source host
47 system source tree used to generate the snapshot and the target
48 location and name of the snapshot tree and it's new location during
49 stage generation. The new stage will end up with the new settings in
50 its make.conf. This makes it possible for a host with
51 traditional /usr/portage or any other location or name to generate a
52 snapshot with a completely different base repo name. This will make it
53 possible for the infra severs generating the snapshot and stages to not
54 need to be migrated to the new defaults in order to generate the
55 snapshots and stages with the new settings. In fact, using an
56 alternate config, the same servers could generate both old (portage) and
57 new (gentoo) snapshots for an interim if desired. Well, I think the
58 snapshots should be to give time for users to migrate their systems for
59 the new tree directory name. That is if this code is used to generate
60 the daily tree snapshots.
61
62 One thing to note is that you must first edit the catalyst.conf to
63 add/edit the new config variables, then generate a new snapshot before
64 doing stage runs.
65
66 repo_basedir="/usr"
67 repo_name="portage"
68 target_distdir="/usr/portage/distfiles"
69 target_pkgdir="/usr/portage/packages"
70
71 Using these settings, creates a snapshot and make.conf with the
72 traditional locations directory names. And completely overrides the
73 new defaults.
74
75 Changing the reponame to "gentoo" requires you first generate a
76 snapshot (the repo_name is used as the target dir and in the final
77 tarball name). The stage building process will look for the snapshot
78 with that same name and specified version.
79
80 So, derivative distros could more easily use catalyst to generate their
81 own stages and snapshots. Not to mention gentoo change locations and
82 repo names to something new without needing code changes to do so. It
83 would be a simple config edit.
84 --
85 Brian Dolbec <dolsen>