1 |
The catalyst-auto automation scripts live in a repo separate from |
2 |
catalyst. That increases the difficulty of changing catalyst's |
3 |
interface, and it doesn't seem to offer any advantages otherwise. |
4 |
(Keeping build specs in a separate repo allows them to be updated |
5 |
independent of catalyst and that is valuable). Additionally, since the |
6 |
primary way catalyst is used is via this automation, it makes sense to |
7 |
support this workflow in catalyst directly. |
8 |
|
9 |
But to get there, there are some changes to catalyst that I think are |
10 |
improvements on their own and simplify the path to integrating |
11 |
automation capabilities directly into catalyst. That's what I'd like |
12 |
to discuss here. |
13 |
|
14 |
I'd like to: |
15 |
|
16 |
1) Replace the custom .spec file format with TOML |
17 |
|
18 |
2) Combine .spec file sequences (e.g., stage1 -> stage2 -> stage3 -> |
19 |
livecd-stage1 -> livecd-stage2) into a single file. I suggest naming |
20 |
this a ".build" file. This will also allow us to remove the redundant |
21 |
information that currently has to be specified in stage1.spec, |
22 |
stage2.spec, stage3.spec, like rel_type, version, profile, etc. It |
23 |
also means that we remove the nonsensical ability to change settings |
24 |
from one stage to the next that should not change (e.g., rel_type, |
25 |
version). |
26 |
|
27 |
3) Add ability to denote which stage builds produce artifacts we care |
28 |
about (and want to save and/or upload) and which are just temporary. |
29 |
If they're temporary (e.g., a stage1 build) we can delete the artifact |
30 |
after the build sequence has no further use of it, and we can skip |
31 |
compressing the result, etc. |
32 |
|
33 |
|
34 |
To that end, I'm starting by figuring out what I would like the new |
35 |
spec file format to look like. Below are some open questions and then |
36 |
a strawman new-style spec file. |
37 |
|
38 |
• The .spec files in releng.git are really templates that are not |
39 |
directly usable without sed'ing @REPO_DIR@ and @TIMESTAMP@. It would |
40 |
be nice if they were directly usable as that would reduce confusion |
41 |
from users. |
42 |
• Can we make them directly usable? |
43 |
• Perhaps we can make catalyst handle the replacements directly? |
44 |
• Calculating @TIMESTAMP@ is trivially doable—we do it today (see below) |
45 |
• We could configure @REPO_DIR@ in catalyst.conf and let catalyst |
46 |
do the replacement, or we could just make the field relative to some |
47 |
path specified in catalyst.conf? |
48 |
|
49 |
• In the current automation scripts, we generate a value for |
50 |
@TIMESTAMP@ from the git HEAD used in creating the snapshot. |
51 |
• Would be nice to remove the dependence on the squashfs snapshot |
52 |
generation—not difficult to do |
53 |
|
54 |
• Can we generate and upload a .build file with replacements done to |
55 |
make stage builds more easily reproducible? Seems easy. |
56 |
|
57 |
Thoughts? Are there advantages to the current system I'm not considering? |
58 |
|
59 |
ppc.build: |
60 |
|
61 |
[build] |
62 |
arch = "ppc" |
63 |
subarch = "ppc" |
64 |
|
65 |
version = "@TIMESTAMP@" |
66 |
rel_type = "default" |
67 |
profile = "default/linux/powerpc/ppc32/17.0" |
68 |
source_subpath = "default/stage3-ppc-latest" |
69 |
portage_confdir = "@REPO_DIR@/releases/portage/stages" |
70 |
|
71 |
[build.snapshot] |
72 |
snapshot = "@TIMESTAMP@" |
73 |
|
74 |
[build.stage1] |
75 |
update_seed = "yes" |
76 |
update_seed_command = "--update --deep --newuse @world" |
77 |
|
78 |
[build.stage2] |
79 |
skip = true # Stage3 will be built directly from stage1 |
80 |
|
81 |
[build.stage3] |
82 |
compression = "xz" |
83 |
|
84 |
[build.iso] |
85 |
portage_confdir = "@REPO_DIR@/releases/portage/isos" |
86 |
|
87 |
[build.iso.stage1] |
88 |
use = [ |
89 |
"compile-locales", |
90 |
"fbcon", |
91 |
"ipv6", |
92 |
"livecd", |
93 |
"modules", |
94 |
"ncurses", |
95 |
"nls", |
96 |
"nptl", |
97 |
"pam", |
98 |
"readline", |
99 |
"socks5", |
100 |
"ssl", |
101 |
"static-libs", |
102 |
"unicode", |
103 |
"xml", |
104 |
] |
105 |
|
106 |
packages = [ |
107 |
"app-admin/pwgen", |
108 |
"app-admin/syslog-ng", |
109 |
"app-arch/unzip", |
110 |
"app-crypt/gnupg", |
111 |
"app-laptop/pbbuttonsd", |
112 |
"app-misc/livecd-tools", |
113 |
"app-misc/screen", |
114 |
"app-portage/mirrorselect", |
115 |
"app-text/wgetpaste", |
116 |
"net-analyzer/tcptraceroute", |
117 |
"net-analyzer/traceroute", |
118 |
"net-dialup/mingetty", |
119 |
"net-dialup/pptpclient", |
120 |
"net-dialup/rp-pppoe", |
121 |
"net-fs/cifs-utils", |
122 |
"net-fs/nfs-utils", |
123 |
"net-irc/irssi", |
124 |
"net-misc/dhcpcd", |
125 |
"net-misc/iputils", |
126 |
"net-misc/ntp", |
127 |
"net-misc/openssh", |
128 |
"net-misc/rdate", |
129 |
"net-misc/rsync", |
130 |
"net-wireless/wireless-tools", |
131 |
"net-wireless/wpa_supplicant", |
132 |
"sys-apps/busybox", |
133 |
"sys-apps/ethtool", |
134 |
"sys-apps/fxload", |
135 |
"sys-apps/hdparm", |
136 |
"sys-apps/hwsetup", |
137 |
"sys-apps/ibm-powerpc-utils", |
138 |
"sys-apps/iproute2", |
139 |
"sys-apps/lm-sensors", |
140 |
"sys-apps/memtester", |
141 |
"sys-apps/pcmciautils", |
142 |
"sys-apps/powerpc-utils", |
143 |
"sys-apps/sdparm", |
144 |
"sys-block/parted", |
145 |
"sys-boot/grub", |
146 |
"sys-firmware/b43-firmware", |
147 |
"sys-firmware/b43legacy-firmware", |
148 |
"sys-fs/btrfs-progs", |
149 |
"sys-fs/dosfstools", |
150 |
"sys-fs/e2fsprogs", |
151 |
"sys-fs/hfsplusutils", |
152 |
"sys-fs/hfsutils", |
153 |
"sys-fs/iprutils", |
154 |
"sys-fs/jfsutils", |
155 |
"sys-fs/lvm2", |
156 |
"sys-fs/mac-fdisk", |
157 |
"sys-fs/mdadm", |
158 |
"sys-fs/ntfs3g", |
159 |
"sys-fs/reiserfsprogs", |
160 |
"sys-fs/xfsprogs", |
161 |
"sys-libs/gpm", |
162 |
"www-client/links", |
163 |
] |
164 |
|
165 |
[build.iso.stage2] |
166 |
fstype = "squashfs" |
167 |
iso = "/var/tmp/catalyst/builds/default/install-powerpc-minimal-@TIMESTAMP@.iso" |
168 |
type = "gentoo-release-minimal" |
169 |
|
170 |
rcadd = [ |
171 |
["pbbuttonsd", "default"], |
172 |
] |
173 |
|
174 |
unmerge = [ |
175 |
"app-admin/eselect", |
176 |
"app-admin/eselect-ctags", |
177 |
"app-admin/eselect-vi", |
178 |
"app-admin/perl-cleaner", |
179 |
"app-admin/python-updater", |
180 |
"app-arch/cpio", |
181 |
"dev-libs/gmp", |
182 |
"dev-libs/libxml2", |
183 |
"dev-libs/mpfr", |
184 |
"dev-libs/popt", |
185 |
"dev-python/pycrypto", |
186 |
"dev-util/pkgconfig", |
187 |
"perl-core/PodParser", |
188 |
"perl-core/Test-Harness", |
189 |
"sys-apps/debianutils", |
190 |
"sys-apps/diffutils", |
191 |
"sys-apps/groff", |
192 |
"sys-apps/man-db", |
193 |
"sys-apps/man-pages", |
194 |
"sys-apps/miscfiles", |
195 |
"sys-apps/sandbox", |
196 |
"sys-apps/texinfo", |
197 |
"sys-devel/autoconf", |
198 |
"sys-devel/autoconf-wrapper", |
199 |
"sys-devel/automake", |
200 |
"sys-devel/automake-wrapper", |
201 |
"sys-devel/binutils", |
202 |
"sys-devel/binutils-config", |
203 |
"sys-devel/bison", |
204 |
"sys-devel/flex", |
205 |
"sys-devel/gcc", |
206 |
"sys-devel/gcc-config", |
207 |
"sys-devel/gettext", |
208 |
"sys-devel/gnuconfig", |
209 |
"sys-devel/libtool", |
210 |
"sys-devel/m4", |
211 |
"sys-devel/make", |
212 |
"sys-devel/patch", |
213 |
"sys-libs/db", |
214 |
"sys-libs/gdbm", |
215 |
"sys-libs/libkudzu", |
216 |
"sys-kernel/genkernel", |
217 |
"sys-kernel/linux-headers", |
218 |
] |
219 |
|
220 |
empty = [ |
221 |
"/boot", |
222 |
"/boot/initr*", |
223 |
"/boot/kernel*", |
224 |
"/boot/System*", |
225 |
"/etc/*-", |
226 |
"/etc/cron.daily", |
227 |
"/etc/cron.hourly", |
228 |
"/etc/cron.monthly", |
229 |
"/etc/cron.weekly", |
230 |
"/etc/default/audioctl", |
231 |
"/etc/dispatch-conf.conf", |
232 |
"/etc/env.d/05binutils", |
233 |
"/etc/env.d/05gcc", |
234 |
"/etc/etc-update.conf", |
235 |
"/etc/genkernel.conf", |
236 |
"/etc/hosts.bck", |
237 |
"/etc/issue*", |
238 |
"/etc/logrotate.d", |
239 |
"/etc/make.conf*", |
240 |
"/etc/make.globals", |
241 |
"/etc/make.profile", |
242 |
"/etc/man.conf", |
243 |
"/etc/modules.autoload.d", |
244 |
"/etc/*.old", |
245 |
"/etc/resolv.conf", |
246 |
"/etc/runlevels/single", |
247 |
"/etc/skel", |
248 |
"/lib64/dev-state", |
249 |
"/lib64/udev-state", |
250 |
"/lib*/*.a", |
251 |
"/lib*/cpp", |
252 |
"/lib/dev-state", |
253 |
"/lib*/*.la", |
254 |
"/lib/udev-state", |
255 |
"/root/.bash_history", |
256 |
"/root/.ccache", |
257 |
"/root/.viminfo", |
258 |
"/sbin/fsck.cramfs", |
259 |
"/sbin/fsck.minix", |
260 |
"/sbin/mkfs.bfs", |
261 |
"/sbin/mkfs.cramfs", |
262 |
"/sbin/mkfs.minix", |
263 |
"/sbin/*.static", |
264 |
"/tmp", |
265 |
"/usr/bin/addr2line", |
266 |
"/usr/bin/ar", |
267 |
"/usr/bin/as", |
268 |
"/usr/bin/audioctl", |
269 |
"/usr/bin/c++*", |
270 |
"/usr/bin/cc", |
271 |
"/usr/bin/cjpeg", |
272 |
"/usr/bin/cpp", |
273 |
"/usr/bin/djpeg", |
274 |
"/usr/bin/ebuild", |
275 |
"/usr/bin/egencache", |
276 |
"/usr/bin/elftoaout", |
277 |
"/usr/bin/emerge", |
278 |
"/usr/bin/emerge-webrsync", |
279 |
"/usr/bin/emirrordist", |
280 |
"/usr/bin/f77", |
281 |
"/usr/bin/g++*", |
282 |
"/usr/bin/g77", |
283 |
"/usr/bin/gcc*", |
284 |
"/usr/bin/genkernel", |
285 |
"/usr/bin/gprof", |
286 |
"/usr/bin/jpegtran", |
287 |
"/usr/bin/ld", |
288 |
"/usr/bin/libpng*", |
289 |
"/usr/bin/nm", |
290 |
"/usr/bin/objcopy", |
291 |
"/usr/bin/objdump", |
292 |
"/usr/bin/piggyback*", |
293 |
"/usr/bin/portageq", |
294 |
"/usr/bin/powerpc64-unknown-linux-gnu-*", |
295 |
"/usr/bin/powerpc-unknown-linux-gnu-*", |
296 |
"/usr/bin/ranlib", |
297 |
"/usr/bin/readelf", |
298 |
"/usr/bin/repoman", |
299 |
"/usr/bin/size", |
300 |
"/usr/bin/strings", |
301 |
"/usr/bin/strip", |
302 |
"/usr/bin/tbz2tool", |
303 |
"/usr/bin/xpak", |
304 |
"/usr/bin/yacc", |
305 |
"/usr/diet/include", |
306 |
"/usr/diet/man", |
307 |
"/usr/include", |
308 |
"/usr/lib64/awk", |
309 |
"/usr/lib64/ccache", |
310 |
"/usr/lib64/gcc-config", |
311 |
"/usr/lib64/gconv", |
312 |
"/usr/lib64/nfs", |
313 |
"/usr/lib64/perl5/site_perl", |
314 |
"/usr/lib64/portage", |
315 |
"/usr/lib64/python*/test", |
316 |
"/usr/lib64/X11/config", |
317 |
"/usr/lib64/X11/doc", |
318 |
"/usr/lib64/X11/etc", |
319 |
"/usr/lib*/*.a", |
320 |
"/usr/lib*/gcc-lib/*/*/libgcj*", |
321 |
"/usr/lib*/*.la", |
322 |
"/usr/lib*/perl5/site_perl", |
323 |
"/usr/local", |
324 |
"/usr/portage", |
325 |
"/usr/powerpc64-unknown-linux-gnu", |
326 |
"/usr/powerpc-unknown-linux-gnu", |
327 |
"/usr/sbin/archive-conf", |
328 |
"/usr/sbin/dispatch-conf", |
329 |
"/usr/sbin/emaint", |
330 |
"/usr/sbin/env-update", |
331 |
"/usr/sbin/etc-update", |
332 |
"/usr/sbin/fb*", |
333 |
"/usr/sbin/fixpackages", |
334 |
"/usr/sbin/quickpkg", |
335 |
"/usr/sbin/regenworld", |
336 |
"/usr/share/aclocal", |
337 |
"/usr/share/baselayout", |
338 |
"/usr/share/binutils-data", |
339 |
"/usr/share/consolefonts/1*", |
340 |
"/usr/share/consolefonts/7*", |
341 |
"/usr/share/consolefonts/8*", |
342 |
"/usr/share/consolefonts/9*", |
343 |
"/usr/share/consolefonts/a*", |
344 |
"/usr/share/consolefonts/A*", |
345 |
"/usr/share/consolefonts/c*", |
346 |
"/usr/share/consolefonts/C*", |
347 |
"/usr/share/consolefonts/dr*", |
348 |
"/usr/share/consolefonts/E*", |
349 |
"/usr/share/consolefonts/g*", |
350 |
"/usr/share/consolefonts/G*", |
351 |
"/usr/share/consolefonts/i*", |
352 |
"/usr/share/consolefonts/k*", |
353 |
"/usr/share/consolefonts/l*", |
354 |
"/usr/share/consolefonts/L*", |
355 |
"/usr/share/consolefonts/M*", |
356 |
"/usr/share/consolefonts/partialfonts", |
357 |
"/usr/share/consolefonts/r*", |
358 |
"/usr/share/consolefonts/R*", |
359 |
"/usr/share/consolefonts/s*", |
360 |
"/usr/share/consolefonts/t*", |
361 |
"/usr/share/consolefonts/v*", |
362 |
"/usr/share/consoletrans", |
363 |
"/usr/share/dict", |
364 |
"/usr/share/doc", |
365 |
"/usr/share/emacs", |
366 |
"/usr/share/et", |
367 |
"/usr/share/gcc-data", |
368 |
"/usr/share/genkernel", |
369 |
"/usr/share/gettext", |
370 |
"/usr/share/glib-2.0", |
371 |
"/usr/share/gnuconfig", |
372 |
"/usr/share/gtk-doc", |
373 |
"/usr/share/i18n", |
374 |
"/usr/share/info", |
375 |
"/usr/share/lcms", |
376 |
"/usr/share/libtool", |
377 |
"/usr/share/locale", |
378 |
"/usr/share/man", |
379 |
"/usr/share/misc/*.old", |
380 |
"/usr/share/rfc", |
381 |
"/usr/share/ss", |
382 |
"/usr/share/state", |
383 |
"/usr/share/texinfo", |
384 |
"/usr/share/unimaps", |
385 |
"/usr/share/zoneinfo", |
386 |
"/usr/src", |
387 |
"/var/cache", |
388 |
"/var/empty", |
389 |
"/var/lib/portage", |
390 |
"/var/log", |
391 |
"/var/spool", |
392 |
"/var/state", |
393 |
"/var/tmp", |
394 |
] |
395 |
|
396 |
# Just for bootloader ordering purposes |
397 |
kernel = ["ppc64", "ppc32", "ibmpower",] |
398 |
|
399 |
[build.iso.stage2.kernel.ibmpower] |
400 |
sources = "sys-kernel/gentoo-sources" |
401 |
config = "../../../kconfig/powerpc/installcd-ibm-4.19.config" |
402 |
console = ["ttyS0,9600", "hvc0", "hvsi0",] |
403 |
gk_kernargs = [ |
404 |
"--kernel-cc='gcc -m64'", |
405 |
"--kernel-ld='ld -m elf64ppc'", |
406 |
"--kernel-as='as -a64'", |
407 |
] |
408 |
|
409 |
[build.iso.stage2.kernel.ppc64] |
410 |
sources = "sys-kernel/gentoo-sources" |
411 |
config = "../../../kconfig/powerpc/ppc64.config" |
412 |
console = ["ttyS0,57600",] |
413 |
gk_kernargs = [ |
414 |
"--kernel-cc='gcc -m64'", |
415 |
"--kernel-ld='ld -m elf64ppc'", |
416 |
"--kernel-as='as -a64'", |
417 |
] |
418 |
|
419 |
[build.iso.stage2.kernel.ppc32] |
420 |
sources = "sys-kernel/gentoo-sources" |
421 |
config = "../../../kconfig/powerpc/ppc32.config" |