Gentoo Archives: gentoo-catalyst

From: Brian Dolbec <dolsen@g.o>
To: gentoo-catalyst@l.g.o
Subject: Re: [gentoo-catalyst] [PATCH] New default PORTDIR, PKGDIR, and DISTDIR settings approved by council
Date: Fri, 03 May 2019 03:18:16
Message-Id: 20190502201742.7db1673b@professor-x
In Reply to: [gentoo-catalyst] [PATCH] New default PORTDIR, PKGDIR, and DISTDIR settings approved by council by Zac Medico
1 On Wed, 1 May 2019 20:00:52 -0700
2 Zac Medico <zmedico@g.o> wrote:
3
4 > The locations approved by the council:
5 >
6 > DISTDIR="/var/cache/distfiles"
7 > PKGDIR="/var/cache/binpkgs"
8 > PORTDIR="/var/db/repos/gentoo"
9 >
10 > Bug: https://bugs.gentoo.org/684908
11 > Signed-off-by: Zac Medico <zmedico@g.o>
12 > ---
13 > README | 2 +-
14 > catalyst/base/stagebase.py | 2 +-
15 > doc/catalyst-config.5.txt | 25 ++++++++++++-------------
16 > etc/catalyst.conf | 14 +++++++-------
17 > examples/generic_stage_template.spec | 2 +-
18 > examples/grp_template.spec | 2 +-
19 > examples/livecd-stage1_template.spec | 2 +-
20 > examples/livecd-stage2_template.spec | 4 ++--
21 > examples/netboot_template.spec | 2 +-
22 > examples/stage4_template.spec | 4 ++--
23 > examples/tinderbox_template.spec | 2 +-
24 > livecd/files/livecd-local.start | 4 ++--
25 > 12 files changed, 32 insertions(+), 33 deletions(-)
26 >
27 > diff --git a/README b/README
28 > index 7be176c3..63156373 100644
29 > --- a/README
30 > +++ b/README
31 > @@ -52,7 +52,7 @@ distribution tarball's files directory.
32 >
33 > Example catalyst.conf:
34 >
35 > -distdir="/usr/portage/distfiles"
36 > +distdir="/var/cache/distfiles"
37 > options="pkgcache kerncache"
38 > sharedir="/usr/share/catalyst"
39 >
40 > diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
41 > index 54a1f389..4e81a9b1 100644
42 > --- a/catalyst/base/stagebase.py
43 > +++ b/catalyst/base/stagebase.py
44 > @@ -1020,7 +1020,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
45 > ouch = 1
46 > log.warning("Couldn't umount
47 > bind mount: %s", target)
48 > - if "snapcache" in self.settings["options"]
49 > and x == "/usr/portage":
50 > + if "snapcache" in self.settings["options"]
51 > and x == "/var/db/repos/gentoo": try:
52 >
53
54
55 Damn, I missed seeing this one when converting to a single source
56 global variable definition. easy fix...
57
58
59 > # It's possible the
60 > snapshot lock object isn't created yet. # This is because mount
61 > safety check calls unbind before the diff --git
62 > a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt index
63 > 957ab0e6..76ac4a29 100644 --- a/doc/catalyst-config.5.txt
64 > +++ b/doc/catalyst-config.5.txt
65 > @@ -31,14 +31,14 @@ envscript="/etc/catalyst/catalystrc"
66 > options="autoresume bindist kerncache pkgcache seedcache snapcache"
67 >
68 > # source repo settings
69 > -distdir="/usr/portage/distfiles"
70 > -portdir="/usr/portage"
71 > +distdir="/var/cache/distfiles"
72 > +portdir="/var/db/repos/gentoo"
73 >
74 > # target repo info
75 > -repo_basedir="/usr"
76 > -repo_name="portage"
77 > -target_distdir="/usr/portage/distfiles"
78 > -target_pkgdir="/usr/portage/packages"
79 > +repo_basedir="/var/db/repos"
80 > +repo_name="gentoo"
81 > +target_distdir="/var/cache/distfiles"
82 > +target_pkgdir="/var/cache/binpkgs"
83 >
84 > # other catalyst settings
85 > sharedir="/usr/share/catalyst"
86 > @@ -156,17 +156,16 @@ Repository settings
87 >
88 > *distdir*::
89 > Source distfiles location used in generation of the stages. This is
90 > usually the -hosts distfiles location. `/usr/portage/distfiles`
91 > should work for most +hosts distfiles location.
92 > `/var/cache/distfiles` should work for most default installations,
93 > but it should be set to match your hosts configuration.
94 > *portdir*::
95 > -Source Gentoo tree location (primary repo). `/usr/portage/` should
96 > work for most +Source Gentoo tree location (primary repo).
97 > `/var/db/repos/gentoo/` should work for most default installations.
98 >
99 > *repo_basedir*::
100 > -The target repository directory to contain the rimary repo (gentoo
101 > repo) and -any overlays. `/usr` is the historical location. But that
102 > is in the process of -changing. `/var/gentoo/repos` is an option.
103 > +The target repository directory to contain the primary repo (gentoo
104 > repo) and +any overlays. The default location is `/var/db/repos`.
105 >
106 > *repo_name*::
107 > The name of the main repository (ie: gentoo). This has had a
108 > directory name @@ -180,12 +179,12 @@ internal repo_name value should
109 > be the same. This is the target distfiles directory location for the
110 > stage being created. This is important because this value will be
111 > stored in the stage's make.conf and will become the default location
112 > used if it is not edited by users. -The default location is
113 > `/usr/portage/distfiles`. +The default location is
114 > `/var/cache/distfiles`.
115 > *target_pkgdir*::
116 > This is the target packages directory for storing binpkgs in the
117 > stage being built. This location is stored in the make.conf of the
118 > stage being built. -The default location for this has typically been
119 > `/usr/portage/packages` +The default location for this has typically
120 > been `/var/cache/binpkgs`
121 > Other settings
122 > ~~~~~~~~~~~~~~
123 > diff --git a/etc/catalyst.conf b/etc/catalyst.conf
124 > index 7d7f7aba..5a5eedba 100644
125 > --- a/etc/catalyst.conf
126 > +++ b/etc/catalyst.conf
127 > @@ -28,7 +28,7 @@ contents="auto"
128 >
129 > # distdir specifies where your distfiles are located. This setting
130 > should # work fine for most default installations.
131 > -distdir="/usr/portage/distfiles"
132 > +distdir="/var/cache/distfiles"
133 >
134 > # envscript allows users to set options such as http proxies,
135 > MAKEOPTS, # GENTOO_MIRRORS, or any other environment variables needed
136 > for building. @@ -84,18 +84,18 @@ hash_function="crc32"
137 > options="autoresume bindist kerncache pkgcache seedcache snapcache"
138 >
139 > # Source portdir specifies the source portage tree used by the
140 > snapshot target. -portdir="/usr/portage"
141 > +portdir="/var/db/repos/gentoo"
142 >
143 > # Target portdir setting. It needs to be in 2 parts.
144 > # They will be used separately, then added together where needed.
145 > # eg:
146 > -# repo_basedir="/var/lib/repos"
147 > +# repo_basedir="/var/db/repos"
148 > # repo_name="gentoo"
149 > #
150 > -repo_basedir="/usr"
151 > -repo_name="portage"
152 > -target_distdir="/usr/portage/distfiles"
153 > -target_pkgdir="/usr/portage/packages"
154 > +repo_basedir="/var/db/repos"
155 > +repo_name="gentoo"
156 > +target_distdir="/var/cache/distfiles"
157 > +target_pkgdir="/var/cache/binpkgs"
158 >
159 > # sharedir specifies where all of the catalyst runtime executables
160 > # and other shared lib objects are.
161 > diff --git a/examples/generic_stage_template.spec
162 > b/examples/generic_stage_template.spec index 40a3d5c0..01c37789 100644
163 > --- a/examples/generic_stage_template.spec
164 > +++ b/examples/generic_stage_template.spec
165 > @@ -28,7 +28,7 @@ target:
166 > rel_type:
167 >
168 > # This is the system profile to be used by catalyst to build this
169 > target. It is -# specified as a relative path
170 > from /usr/portage/profiles. +# specified as a relative path
171 > from /var/db/repos/gentoo/profiles. # example:
172 > # profile: default-linux/x86/2006.1
173 > profile:
174 > diff --git a/examples/grp_template.spec b/examples/grp_template.spec
175 > index 71160266..3a0e15a8 100644
176 > --- a/examples/grp_template.spec
177 > +++ b/examples/grp_template.spec
178 > @@ -28,7 +28,7 @@ target: grp
179 > rel_type:
180 >
181 > # This is the system profile to be used by catalyst to build this
182 > target. It is -# specified as a relative path
183 > from /usr/portage/profiles. +# specified as a relative path
184 > from /var/db/repos/gentoo/profiles. # example:
185 > # profile: default-linux/x86/2006.1
186 > profile:
187 > diff --git a/examples/livecd-stage1_template.spec
188 > b/examples/livecd-stage1_template.spec index 90ae1990..c7086c91 100644
189 > --- a/examples/livecd-stage1_template.spec
190 > +++ b/examples/livecd-stage1_template.spec
191 > @@ -28,7 +28,7 @@ target:
192 > rel_type:
193 >
194 > # This is the system profile to be used by catalyst to build this
195 > target. It is -# specified as a relative path
196 > from /usr/portage/profiles. +# specified as a relative path
197 > from /var/db/repos/gentoo/profiles. # example:
198 > # profile: default-linux/x86/2006.1
199 > profile:
200 > diff --git a/examples/livecd-stage2_template.spec
201 > b/examples/livecd-stage2_template.spec index 8aa454c9..cc5cf00e 100644
202 > --- a/examples/livecd-stage2_template.spec
203 > +++ b/examples/livecd-stage2_template.spec
204 > @@ -28,7 +28,7 @@ target:
205 > rel_type:
206 >
207 > # This is the system profile to be used by catalyst to build this
208 > target. It is -# specified as a relative path
209 > from /usr/portage/profiles. +# specified as a relative path
210 > from /var/db/repos/gentoo/profiles. # example:
211 > # profile: default-linux/x86/2006.1
212 > profile:
213 > @@ -354,7 +354,7 @@ livecd/unmerge:
214 > # rid of files that don't belong to a particular package, or
215 > removing files from # a package that you wish to keep, but won't need
216 > the full functionality. # example:
217 > -#
218 > livecd/empty: /var/tmp /var/cache /var/db /var/empty /var/lock /var/log /var/run /var/spool /var/state /tmp /usr/portage /usr/share/man /usr/share/info /usr/share/unimaps /usr/include /usr/share/zoneinfo /usr/share/dict /usr/share/doc /usr/share/ss /usr/share/state /usr/share/texinfo /usr/lib/python2.2 /usr/lib/portage /usr/share/gettext /usr/share/i18n /usr/share/rfc /usr/lib/X11/config /usr/lib/X11/etc /usr/lib/X11/doc /usr/src /usr/share/doc /usr/share/man /etc/cron.daily /etc/cron.hourly /etc/cron.monthly /etc/cron.weekly /etc/logrotate.d /etc/rsync /usr/lib/awk /usr/lib/ccache /usr/lib/gcc-config /usr/lib/nfs /usr/local /usr/diet/include /usr/diet/man /usr/share/consolefonts/partialfonts /usr/share/consoletrans /usr/share/emacs /usr/share/gcc-data /usr/share/genkernel /etc/bootsplash/gentoo /etc/bootsplash/gentoo-highquality /etc/splash/gentoo /etc/splash/emergence /usr/share/gnuconfig /usr/share/lcms /usr/share/locale /etc/skel
219 > +#
220 > livecd/empty: /var/tmp /var/cache /var/db /var/empty /var/lock /var/log /var/run /var/spool /var/state /tmp /var/db/repos/gentoo /usr/share/man /usr/share/info /usr/share/unimaps /usr/include /usr/share/zoneinfo /usr/share/dict /usr/share/doc /usr/share/ss /usr/share/state /usr/share/texinfo /usr/lib/python2.2 /usr/lib/portage /usr/share/gettext /usr/share/i18n /usr/share/rfc /usr/lib/X11/config /usr/lib/X11/etc /usr/lib/X11/doc /usr/src /usr/share/doc /usr/share/man /etc/cron.daily /etc/cron.hourly /etc/cron.monthly /etc/cron.weekly /etc/logrotate.d /etc/rsync /usr/lib/awk /usr/lib/ccache /usr/lib/gcc-config /usr/lib/nfs /usr/local /usr/diet/include /usr/diet/man /usr/share/consolefonts/partialfonts /usr/share/consoletrans /usr/share/emacs /usr/share/gcc-data /usr/share/genkernel /etc/bootsplash/gentoo /etc/bootsplash/gentoo-highquality /etc/splash/gentoo /etc/splash/emergence /usr/share/gnuconfig /usr/share/lcms /usr/share/locale /etc/skel
221 > livecd/empty: # This option tells catalyst to clean specific files
222 > from the filesystem and is diff --git
223 > a/examples/netboot_template.spec b/examples/netboot_template.spec
224 > index 0cffc661..c1726103 100644 --- a/examples/netboot_template.spec
225 > +++ b/examples/netboot_template.spec
226 > @@ -28,7 +28,7 @@ target:
227 > rel_type:
228 >
229 > # This is the system profile to be used by catalyst to build this
230 > target. It is -# specified as a relative path
231 > from /usr/portage/profiles. +# specified as a relative path
232 > from /var/db/repos/gentoo/profiles. # example:
233 > # profile: default-linux/x86/2006.1
234 > profile:
235 > diff --git a/examples/stage4_template.spec
236 > b/examples/stage4_template.spec index 4066bf5b..fe394f3e 100644
237 > --- a/examples/stage4_template.spec
238 > +++ b/examples/stage4_template.spec
239 > @@ -28,7 +28,7 @@ target:
240 > rel_type:
241 >
242 > # This is the system profile to be used by catalyst to build this
243 > target. It is -# specified as a relative path
244 > from /usr/portage/profiles. +# specified as a relative path
245 > from /var/db/repos/gentoo/profiles. # example:
246 > # profile: default-linux/x86/2006.1
247 > profile:
248 > @@ -252,7 +252,7 @@ stage4/unmerge:
249 > # rid of files that don't belong to a particular package, or
250 > removing files from # a package that you wish to keep, but won't need
251 > the full functionality. # example:
252 > -#
253 > stage4/empty: /var/tmp /var/cache /var/db /var/empty /var/lock /var/log /var/run /var/spool /var/state /tmp /usr/portage /usr/share/man /usr/share/info /usr/share/unimaps /usr/include /usr/share/zoneinfo /usr/share/dict /usr/share/doc /usr/share/ss /usr/share/state /usr/share/texinfo /usr/lib/python2.2 /usr/lib/portage /usr/share/gettext /usr/share/i18n /usr/share/rfc /usr/lib/X11/config /usr/lib/X11/etc /usr/lib/X11/doc /usr/src /usr/share/doc /usr/share/man /etc/cron.daily /etc/cron.hourly /etc/cron.monthly /etc/cron.weekly /etc/logrotate.d /etc/rsync /usr/lib/awk /usr/lib/ccache /usr/lib/gcc-config /usr/lib/nfs /usr/local /usr/diet/include /usr/diet/man /usr/share/consolefonts/partialfonts /usr/share/consoletrans /usr/share/emacs /usr/share/gcc-data /usr/share/genkernel /etc/splash/gentoo /etc/splash/emergence /usr/share/gnuconfig /usr/share/lcms /usr/share/locale /etc/skel
254 > +#
255 > stage4/empty: /var/tmp /var/cache /var/db /var/empty /var/lock /var/log /var/run /var/spool /var/state /tmp /var/db/repos/gentoo /usr/share/man /usr/share/info /usr/share/unimaps /usr/include /usr/share/zoneinfo /usr/share/dict /usr/share/doc /usr/share/ss /usr/share/state /usr/share/texinfo /usr/lib/python2.2 /usr/lib/portage /usr/share/gettext /usr/share/i18n /usr/share/rfc /usr/lib/X11/config /usr/lib/X11/etc /usr/lib/X11/doc /usr/src /usr/share/doc /usr/share/man /etc/cron.daily /etc/cron.hourly /etc/cron.monthly /etc/cron.weekly /etc/logrotate.d /etc/rsync /usr/lib/awk /usr/lib/ccache /usr/lib/gcc-config /usr/lib/nfs /usr/local /usr/diet/include /usr/diet/man /usr/share/consolefonts/partialfonts /usr/share/consoletrans /usr/share/emacs /usr/share/gcc-data /usr/share/genkernel /etc/splash/gentoo /etc/splash/emergence /usr/share/gnuconfig /usr/share/lcms /usr/share/locale /etc/skel
256 > stage4/empty: # This option tells catalyst to clean specific files
257 > from the filesystem and is diff --git
258 > a/examples/tinderbox_template.spec b/examples/tinderbox_template.spec
259 > index f1af09c8..d5575b4a 100644 --- a/examples/tinderbox_template.spec
260 > +++ b/examples/tinderbox_template.spec
261 > @@ -26,7 +26,7 @@ target: tinderbox
262 > rel_type:
263 >
264 > # This is the system profile to be used by catalyst to build this
265 > target. It is -# specified as a relative path
266 > from /usr/portage/profiles. +# specified as a relative path
267 > from /var/db/repos/gentoo/profiles. # example:
268 > # profile: default-linux/x86/2006.1
269 > profile:
270 > diff --git a/livecd/files/livecd-local.start
271 > b/livecd/files/livecd-local.start index 11a7d28a..3615569c 100644
272 > --- a/livecd/files/livecd-local.start
273 > +++ b/livecd/files/livecd-local.start
274 > @@ -16,10 +16,10 @@
275 >
276 > if [ -d /usr/livecd/profiles ]
277 > then
278 > - ln -sf /usr/livecd/profiles /usr/portage/profiles
279 > + ln -sf /usr/livecd/profiles /var/db/repos/gentoo/profiles
280 > fi
281 >
282 > if [ -d /usr/livecd/eclass ]
283 > then
284 > - ln -sf /usr/livecd/eclass /usr/portage/eclass
285 > + ln -sf /usr/livecd/eclass /var/db/repos/gentoo/eclass
286 > fi