Update to 2.4: - Add a MKVARS variable to pass arbitrary variables to build.sh through -V. E.g. MKVARS="MKDEBUG=yes". - Move the documentation of the configuration file to a new sysbuild.conf(5).diff -r1.21 -r1.22 pkgsrc/sysutils/sysbuild/Makefile
(jmmv)
@@ -1,16 +1,16 @@ | @@ -1,16 +1,16 @@ | |||
1 | # $NetBSD: Makefile,v 1.21 2012/08/25 19:20:53 jmmv Exp $ | 1 | # $NetBSD: Makefile,v 1.22 2012/10/13 18:40:33 jmmv Exp $ | |
2 | 2 | |||
3 | DISTNAME= sysbuild-2.3 | 3 | DISTNAME= sysbuild-2.4 | |
4 | CATEGORIES= sysutils | 4 | CATEGORIES= sysutils | |
5 | MASTER_SITES= # empty | 5 | MASTER_SITES= # empty | |
6 | DISTFILES= # empty | 6 | DISTFILES= # empty | |
7 | 7 | |||
8 | MAINTAINER= jmmv@NetBSD.org | 8 | MAINTAINER= jmmv@NetBSD.org | |
9 | COMMENT= Automates builds of NetBSD and manages source trees | 9 | COMMENT= Automates builds of NetBSD and manages source trees | |
10 | LICENSE= modified-bsd | 10 | LICENSE= modified-bsd | |
11 | 11 | |||
12 | PKG_INSTALLATION_TYPES= overwrite pkgviews | 12 | PKG_INSTALLATION_TYPES= overwrite pkgviews | |
13 | PKG_DESTDIR_SUPPORT= user-destdir | 13 | PKG_DESTDIR_SUPPORT= user-destdir | |
14 | 14 | |||
15 | WRKSRC= ${WRKDIR} | 15 | WRKSRC= ${WRKDIR} | |
16 | NO_CONFIGURE= YES | 16 | NO_CONFIGURE= YES | |
@@ -58,36 +58,38 @@ install-tests: | @@ -58,36 +58,38 @@ install-tests: | |||
58 | do-test: | 58 | do-test: | |
59 | cd ${WRKSRC} && PATH="${WRKSRC}:${PATH}" \ | 59 | cd ${WRKSRC} && PATH="${WRKSRC}:${PATH}" \ | |
60 | SYSBUILD_SHAREDIR="${WRKSRC}" kyua test | 60 | SYSBUILD_SHAREDIR="${WRKSRC}" kyua test | |
61 | .else | 61 | .else | |
62 | PLIST_SUBST+= TESTS=@comment | 62 | PLIST_SUBST+= TESTS=@comment | |
63 | .endif | 63 | .endif | |
64 | 64 | |||
65 | do-build: | 65 | do-build: | |
66 | .for file in sysbuild sysbuild4cron | 66 | .for file in sysbuild sysbuild4cron | |
67 | sed ${BUILD_SUBST} ${FILESDIR}/${file}.sh \ | 67 | sed ${BUILD_SUBST} ${FILESDIR}/${file}.sh \ | |
68 | | ${BUILDLINK_PREFIX.shtk}/bin/shtk build \ | 68 | | ${BUILDLINK_PREFIX.shtk}/bin/shtk build \ | |
69 | -s ${SH} -m ${file}_main -o ${WRKSRC}/${file} - | 69 | -s ${SH} -m ${file}_main -o ${WRKSRC}/${file} - | |
70 | .endfor | 70 | .endfor | |
71 | .for file in sysbuild.1 sysbuild4cron.1 default.conf | 71 | .for file in sysbuild.1 sysbuild4cron.1 sysbuild.conf.5 default.conf | |
72 | sed ${BUILD_SUBST} <${FILESDIR}/${file} >${WRKSRC}/${file} | 72 | sed ${BUILD_SUBST} <${FILESDIR}/${file} >${WRKSRC}/${file} | |
73 | .endfor | 73 | .endfor | |
74 | cp ${FILESDIR}/env.sh ${WRKSRC} | 74 | cp ${FILESDIR}/env.sh ${WRKSRC} | |
75 | chmod +x ${WRKSRC}/env.sh | 75 | chmod +x ${WRKSRC}/env.sh | |
76 | 76 | |||
77 | INSTALLATION_DIRS+= bin ${PKGMANDIR}/man1 \ | 77 | INSTALLATION_DIRS+= bin ${PKGMANDIR}/man1 ${PKGMANDIR}/man5 \ | |
78 | share/examples/sysbuild share/sysbuild | 78 | share/examples/sysbuild share/sysbuild | |
79 | 79 | |||
80 | do-install: | 80 | do-install: | |
81 | ${INSTALL_SCRIPT} ${WRKSRC}/sysbuild ${DESTDIR}${PREFIX}/bin/ | 81 | ${INSTALL_SCRIPT} ${WRKSRC}/sysbuild ${DESTDIR}${PREFIX}/bin/ | |
82 | ${INSTALL_SCRIPT} ${WRKSRC}/sysbuild4cron ${DESTDIR}${PREFIX}/bin/ | 82 | ${INSTALL_SCRIPT} ${WRKSRC}/sysbuild4cron ${DESTDIR}${PREFIX}/bin/ | |
83 | ${INSTALL_MAN} ${WRKSRC}/sysbuild.1 \ | 83 | ${INSTALL_MAN} ${WRKSRC}/sysbuild.1 \ | |
84 | ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/ | 84 | ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/ | |
85 | ${INSTALL_MAN} ${WRKSRC}/sysbuild4cron.1 \ | 85 | ${INSTALL_MAN} ${WRKSRC}/sysbuild4cron.1 \ | |
86 | ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/ | 86 | ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/ | |
87 | ${INSTALL_MAN} ${WRKSRC}/sysbuild.conf.5 \ | |||
88 | ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5/ | |||
87 | .for file in default.conf | 89 | .for file in default.conf | |
88 | ${INSTALL_DATA} ${WRKSRC}/${file} ${DESTDIR}${EGDIR} | 90 | ${INSTALL_DATA} ${WRKSRC}/${file} ${DESTDIR}${EGDIR} | |
89 | .endfor | 91 | .endfor | |
90 | ${INSTALL_SCRIPT} ${WRKSRC}/env.sh ${DESTDIR}${PREFIX}/share/sysbuild | 92 | ${INSTALL_SCRIPT} ${WRKSRC}/env.sh ${DESTDIR}${PREFIX}/share/sysbuild | |
91 | 93 | |||
92 | .include "../../devel/shtk/buildlink3.mk" | 94 | .include "../../devel/shtk/buildlink3.mk" | |
93 | .include "../../mk/bsd.pkg.mk" | 95 | .include "../../mk/bsd.pkg.mk" |
@@ -1,10 +1,11 @@ | @@ -1,10 +1,11 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.6 2012/08/25 19:20:53 jmmv Exp $ | 1 | @comment $NetBSD: PLIST,v 1.7 2012/10/13 18:40:33 jmmv Exp $ | |
2 | bin/sysbuild | 2 | bin/sysbuild | |
3 | bin/sysbuild4cron | 3 | bin/sysbuild4cron | |
4 | man/man1/sysbuild.1 | 4 | man/man1/sysbuild.1 | |
5 | man/man1/sysbuild4cron.1 | 5 | man/man1/sysbuild4cron.1 | |
6 | man/man5/sysbuild.conf.5 | |||
6 | share/examples/sysbuild/default.conf | 7 | share/examples/sysbuild/default.conf | |
7 | share/sysbuild/env.sh | 8 | share/sysbuild/env.sh | |
8 | ${TESTS}tests/sysbuild/Kyuafile | 9 | ${TESTS}tests/sysbuild/Kyuafile | |
9 | ${TESTS}tests/sysbuild/sysbuild_test | 10 | ${TESTS}tests/sysbuild/sysbuild_test | |
10 | ${TESTS}tests/sysbuild/sysbuild4cron_test | 11 | ${TESTS}tests/sysbuild/sysbuild4cron_test |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | .\" $NetBSD: sysbuild.1,v 1.5 2012/08/25 19:20:53 jmmv Exp $ | 1 | .\" $NetBSD: sysbuild.1,v 1.6 2012/10/13 18:40:33 jmmv Exp $ | |
2 | .\" Copyright 2012 Google Inc. | 2 | .\" Copyright 2012 Google Inc. | |
3 | .\" All rights reserved. | 3 | .\" All rights reserved. | |
4 | .\" | 4 | .\" | |
5 | .\" Redistribution and use in source and binary forms, with or without | 5 | .\" Redistribution and use in source and binary forms, with or without | |
6 | .\" modification, are permitted provided that the following conditions are | 6 | .\" modification, are permitted provided that the following conditions are | |
7 | .\" met: | 7 | .\" met: | |
8 | .\" | 8 | .\" | |
9 | .\" * Redistributions of source code must retain the above copyright | 9 | .\" * Redistributions of source code must retain the above copyright | |
10 | .\" notice, this list of conditions and the following disclaimer. | 10 | .\" notice, this list of conditions and the following disclaimer. | |
11 | .\" * Redistributions in binary form must reproduce the above copyright | 11 | .\" * Redistributions in binary form must reproduce the above copyright | |
12 | .\" notice, this list of conditions and the following disclaimer in the | 12 | .\" notice, this list of conditions and the following disclaimer in the | |
13 | .\" documentation and/or other materials provided with the distribution. | 13 | .\" documentation and/or other materials provided with the distribution. | |
14 | .\" * Neither the name of Google Inc. nor the names of its contributors | 14 | .\" * Neither the name of Google Inc. nor the names of its contributors | |
@@ -16,27 +16,27 @@ | @@ -16,27 +16,27 @@ | |||
16 | .\" without specific prior written permission. | 16 | .\" without specific prior written permission. | |
17 | .\" | 17 | .\" | |
18 | .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | 18 | .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
19 | .\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | 19 | .\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
20 | .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | 20 | .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
21 | .\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 21 | .\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
22 | .\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 22 | .\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
23 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
24 | .\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 | .\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
25 | .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 | .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
26 | .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 | .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
27 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
28 | .\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 | .\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
29 | .Dd August 25, 2012 | 29 | .Dd October 13, 2012 | |
30 | .Dt SYSBUILD 1 | 30 | .Dt SYSBUILD 1 | |
31 | .Os | 31 | .Os | |
32 | .Sh NAME | 32 | .Sh NAME | |
33 | .Nm sysbuild | 33 | .Nm sysbuild | |
34 | .Nd performs fully automatic builds of NetBSD | 34 | .Nd performs fully automatic builds of NetBSD | |
35 | .Sh SYNOPSIS | 35 | .Sh SYNOPSIS | |
36 | .Nm | 36 | .Nm | |
37 | .Op Fl c Ar config_name | 37 | .Op Fl c Ar config_name | |
38 | .Op Fl o Ar variable=value | 38 | .Op Fl o Ar variable=value | |
39 | build | 39 | build | |
40 | .Op Fl f | 40 | .Op Fl f | |
41 | .Op Ar build_targets | 41 | .Op Ar build_targets | |
42 | .Nm | 42 | .Nm | |
@@ -99,54 +99,55 @@ rebuilds by adding a single line to your | @@ -99,54 +99,55 @@ rebuilds by adding a single line to your | |||
99 | .Pp | 99 | .Pp | |
100 | As you can see in the | 100 | As you can see in the | |
101 | .Sx SYNOPSIS | 101 | .Sx SYNOPSIS | |
102 | section, | 102 | section, | |
103 | .Nm | 103 | .Nm | |
104 | provides a subcommand-interface: the tool has several modes of operation, | 104 | provides a subcommand-interface: the tool has several modes of operation, | |
105 | and the particular mode to use for a given run is selected by the first | 105 | and the particular mode to use for a given run is selected by the first | |
106 | non-option argument in the command line. | 106 | non-option argument in the command line. | |
107 | .Pp | 107 | .Pp | |
108 | The following options apply to all commands: | 108 | The following options apply to all commands: | |
109 | .Bl -tag -width XXXX | 109 | .Bl -tag -width XXXX | |
110 | .It Fl c Ar config_name | 110 | .It Fl c Ar config_name | |
111 | Specifies the configuration file to use. | 111 | Specifies the configuration file to use. | |
112 | The format of the file is described in | |||
113 | .Xr sysbuild.conf 5 . | |||
112 | .Pp | 114 | .Pp | |
113 | If | 115 | If | |
114 | .Ar config_name | 116 | .Ar config_name | |
115 | includes any directory separator (aka, one or more slashes) or the | 117 | includes any directory separator (aka, one or more slashes) or the | |
116 | .Sq .conf | 118 | .Sq .conf | |
117 | suffix, then this specifies the path of the configuration file to load. | 119 | suffix, then this specifies the path of the configuration file to load. | |
118 | .Pp | 120 | .Pp | |
119 | .If | 121 | .If | |
120 | .Ar config_name | 122 | .Ar config_name | |
121 | is a plain name without any directory components nor extension, then this | 123 | is a plain name without any directory components nor extension, then this | |
122 | specifies the name of the configuration. | 124 | specifies the name of the configuration. | |
123 | .Nm | 125 | .Nm | |
124 | will first look for a configuration file in | 126 | will first look for a configuration file in | |
125 | .Pa ~/.sysbuild/<config_name>.conf | 127 | .Pa ~/.sysbuild/<config_name>.conf | |
126 | and, if not found, will use | 128 | and, if not found, will use | |
127 | .Pa @SYSBUILD_ETCDIR@/<config_name>.conf . | 129 | .Pa @SYSBUILD_ETCDIR@/<config_name>.conf . | |
128 | Any of the two files must exist, or else | 130 | Any of the two files must exist, or else | |
129 | .Nm | 131 | .Nm | |
130 | will exit with an error. | 132 | will exit with an error. | |
131 | .It Fl o Ar variable=value | 133 | .It Fl o Ar variable=value | |
132 | Applies an override to the loaded configuration. | 134 | Applies an override to the loaded configuration. | |
133 | .Pp | 135 | .Pp | |
134 | The | 136 | The | |
135 | .Ar variable | 137 | .Ar variable | |
136 | part of the argument must be any of the recognized configuration variables | 138 | part of the argument must be any of the recognized configuration variables | |
137 | described in | 139 | described in | |
138 | .Sx Configuration file | 140 | .Xr sysbuild.conf 5 . | |
139 | below. | |||
140 | The | 141 | The | |
141 | .Ar value , | 142 | .Ar value , | |
142 | if not empty, specifies the value to set the configuration variable to. | 143 | if not empty, specifies the value to set the configuration variable to. | |
143 | If | 144 | If | |
144 | .Ar value | 145 | .Ar value | |
145 | is empty, then the configuration variable is unset. | 146 | is empty, then the configuration variable is unset. | |
146 | .El | 147 | .El | |
147 | .Ss The build command | 148 | .Ss The build command | |
148 | The build command provides the main functionality of | 149 | The build command provides the main functionality of | |
149 | .Nm . | 150 | .Nm . | |
150 | It performs the following steps: | 151 | It performs the following steps: | |
151 | .Bl -enum | 152 | .Bl -enum | |
152 | .It | 153 | .It | |
@@ -272,158 +273,43 @@ Consider that you wish to use the standa | @@ -272,158 +273,43 @@ Consider that you wish to use the standa | |||
272 | and | 273 | and | |
273 | .Pa /usr/xsrc | 274 | .Pa /usr/xsrc | |
274 | for your source trees, and that you would like to keep these owned by root | 275 | for your source trees, and that you would like to keep these owned by root | |
275 | while, at the same time, you run your | 276 | while, at the same time, you run your | |
276 | .Nx | 277 | .Nx | |
277 | builds as an unprivileged user. | 278 | builds as an unprivileged user. | |
278 | In this situation, you can use the | 279 | In this situation, you can use the | |
279 | .Sq fetch | 280 | .Sq fetch | |
280 | command as root only, set | 281 | command as root only, set | |
281 | .Va UPDATE_SOURCES | 282 | .Va UPDATE_SOURCES | |
282 | to | 283 | to | |
283 | .Sq false | 284 | .Sq false | |
284 | in your user configuration files, and do your builds as another user. | 285 | in your user configuration files, and do your builds as another user. | |
285 | .Ss Configuration file | |||
286 | Configuration files for | |||
287 | .Nm | |||
288 | are plain shell scripts that define a set of recognized variables. | |||
289 | .Pp | |||
290 | As scripts, they can perform any magic they desire to deduce the value of | |||
291 | the configuration variables. | |||
292 | For example, the default configuration file shipped with | |||
293 | .Nm | |||
294 | automatically deduces the value of the | |||
295 | .Va NJOBS | |||
296 | variable by looking at how many CPUs are available in the system. | |||
297 | .Pp | |||
298 | The following variables configure the source trees: | |||
299 | .Bl -tag -width INCREMENTAL_BUILD | |||
300 | .It Va CVSROOT | |||
301 | Location of the CVS root from which to check out or update the src and xsrc | |||
302 | modules. | |||
303 | .Pp | |||
304 | Default: | |||
305 | .Sq :ext:anoncvs@anoncvs.NetBSD.org:/cvsroot | |||
306 | .It Va CVSTAG | |||
307 | CVS tag to use during checkouts or updates of the src and xsrc modules. | |||
308 | .Pp | |||
309 | Default: not defined. | |||
310 | .It Va SRCDIR | |||
311 | Path to the src module. | |||
312 | If you want | |||
313 | .Nm | |||
314 | to perform an update of this directory before every build, you will need | |||
315 | write access to it. | |||
316 | Otherwise, you can use a read-only directory. | |||
317 | .Pp | |||
318 | Default: | |||
319 | .Pa /usr/src . | |||
320 | .It Va UPDATE_SOURCES | |||
321 | Whether to perform an update of the source tree before every build or not. | |||
322 | .Pp | |||
323 | Default: | |||
324 | .Sq true . | |||
325 | .It Va XSRCDIR | |||
326 | Path to the xsrc module. | |||
327 | If you want | |||
328 | .Nm | |||
329 | to perform an update of this directory before every build, you will need | |||
330 | write access to it. | |||
331 | Otherwise, you can use a read-only directory. | |||
332 | .Pp | |||
333 | Defining this variable causes | |||
334 | .Nm | |||
335 | to build the X Window System as part of the build of | |||
336 | .Nx . | |||
337 | .Pp | |||
338 | Default: not defined. | |||
339 | .El | |||
340 | .Pp | |||
341 | The following variables configure the location of the build files: | |||
342 | .Bl -tag -width INCREMENTAL_BUILD | |||
343 | .It Va BUILD_ROOT | |||
344 | Path to the directory in which to place build files. | |||
345 | These include the obj tree, the destdir and the cross-build tools generated | |||
346 | by the | |||
347 | .Nm build.sh | |||
348 | script. | |||
349 | The contents of this directory are sorted by machine type so that it can be | |||
350 | shared across builds for different machines. | |||
351 | .Pp | |||
352 | Default: | |||
353 | .Pa ~/sysbuild/ . | |||
354 | .It Va RELEASEDIR | |||
355 | Path to the directory that will contain the build products (aka the release | |||
356 | files). | |||
357 | The contents of this directory are sorted by machine type so that it can be | |||
358 | shared across builds for different machines. | |||
359 | .Pp | |||
360 | Default: | |||
361 | .Pa ~/sysbuild/release . | |||
362 | .El | |||
363 | .Pp | |||
364 | The following variables configure the build process: | |||
365 | .Bl -tag -width INCREMENTAL_BUILD | |||
366 | .It Va BUILD_TARGETS | |||
367 | Whitespace-separated list of targets to pass to | |||
368 | .Nm build.sh | |||
369 | during builds. | |||
370 | Targets can be prefixed by a machine name and a colon, in which case they only | |||
371 | apply to that machine; for example, | |||
372 | .Sq macppc:kernel=${HOME}/CUSTOM macppc:releasekernel=${HOME}/CUSTOM . | |||
373 | .Pp | |||
374 | Default: | |||
375 | .Sq release . | |||
376 | .It Va INCREMENTAL_BUILD | |||
377 | Whether to perform update builds or not. | |||
378 | An update build reuses existing obj, destdir and tools trees. | |||
379 | .Pp | |||
380 | Of special note is that | |||
381 | .Nm | |||
382 | will take care of pruning files likely to cause breakage during update | |||
383 | builds before performing the build itself. | |||
384 | As an example, this includes deleting all the modules from | |||
385 | .Pa destdir/stand/<platform>/ . | |||
386 | .Pp | |||
387 | Default: | |||
388 | .Sq false . | |||
389 | .It Va MACHINES | |||
390 | Whitespace-separated list of machine types to build for. | |||
391 | .Pp | |||
392 | Default: the name of the host machine type. | |||
393 | .It Va NJOBS | |||
394 | Number of parallel jobs to use during the build. | |||
395 | If not set, disables parallel builds (which, due to | |||
396 | .Nm make 1 | |||
397 | semantics, is not the same as setting this to 1). | |||
398 | .Pp | |||
399 | Default: not defined. | |||
400 | .El | |||
401 | .Sh FILES | 286 | .Sh FILES | |
402 | .Bl -tag -width XXXX | 287 | .Bl -tag -width XXXX | |
403 | .It Pa @SYSBUILD_ETCDIR@/ | 288 | .It Pa @SYSBUILD_ETCDIR@/ | |
404 | Directory containing all system-wide configuration files. | 289 | Directory containing all system-wide configuration files. | |
405 | .It Pa @SYSBUILD_ETCDIR@/default.conf | 290 | .It Pa @SYSBUILD_ETCDIR@/default.conf | |
406 | Default configuration file to load if the user does not have a | 291 | Default configuration file to load if the user does not have a | |
407 | corresponding | 292 | corresponding | |
408 | .Pa ~/.sysbuild/default.conf | 293 | .Pa ~/.sysbuild/default.conf | |
409 | file and the | 294 | file and the | |
410 | .Fl c | 295 | .Fl c | |
411 | flag is not provided. | 296 | flag is not provided. | |
412 | .It Pa ~/.sysbuild/ | 297 | .It Pa ~/.sysbuild/ | |
413 | Directory containing all user-specific configuration files. | 298 | Directory containing all user-specific configuration files. | |
414 | .It Pa ~/.sysbuild/default.conf | 299 | .It Pa ~/.sysbuild/default.conf | |
415 | Default configuration file to load when the | 300 | Default configuration file to load when the | |
416 | .Fl c | 301 | .Fl c | |
417 | flag is not provided. | 302 | flag is not provided. | |
418 | .El | 303 | .El | |
419 | .Sh SEE ALSO | 304 | .Sh SEE ALSO | |
420 | .Xr cvs 1 , | 305 | .Xr cvs 1 , | |
421 | .Xr sysbuild4cron 1 , | 306 | .Xr sysbuild4cron 1 , | |
307 | .Xr sysbuild.conf 5 , | |||
422 | .Xr hier 7 , | 308 | .Xr hier 7 , | |
423 | .Pa /usr/src/BUILDING | 309 | .Pa /usr/src/BUILDING | |
424 | .Sh AUTHORS | 310 | .Sh AUTHORS | |
425 | The | 311 | The | |
426 | .Nm | 312 | .Nm | |
427 | utility was developed by | 313 | utility was developed by | |
428 | .An Julio Merino | 314 | .An Julio Merino | |
429 | .Aq jmmv@NetBSD.org . | 315 | .Aq jmmv@NetBSD.org . |
.\" $NetBSD: sysbuild.conf.5,v 1.1 2012/10/13 18:40:33 jmmv Exp $
.\" Copyright 2012 Google Inc.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions are
.\" met:
.\"
.\" * Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" * Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" * Neither the name of Google Inc. nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.Dd October 13, 2012
.Dt SYSBUILD.CONF 5
.Os
.Sh NAME
.Nm sysbuild.conf
.Nd configuration file format for the sysbuild tool
.Sh DESCRIPTION
Configuration files for
.Xr sysbuild 1
are plain shell scripts that define a set of recognized variables.
.Pp
As scripts, they can perform any magic they desire to deduce the value of
the configuration variables.
For example, the default configuration file shipped with
.Xr sysbuild 1
automatically deduces the value of the
.Va NJOBS
variable by looking at how many CPUs are available in the system.
.Pp
The following variables configure the source trees:
.Bl -tag -width INCREMENTAL_BUILD
.It Va CVSROOT
Location of the CVS root from which to check out or update the src and xsrc
modules.
.Pp
Default:
.Sq :ext:anoncvs@anoncvs.NetBSD.org:/cvsroot
.It Va CVSTAG
CVS tag to use during checkouts or updates of the src and xsrc modules.
.Pp
Default: not defined.
.It Va SRCDIR
Path to the src module.
If you want
.Xr sysbuild 1
to perform an update of this directory before every build, you will need
write access to it.
Otherwise, you can use a read-only directory.
.Pp
Default:
.Pa /usr/src .
.It Va UPDATE_SOURCES
Whether to perform an update of the source tree before every build or not.
.Pp
Default:
.Sq true .
.It Va XSRCDIR
Path to the xsrc module.
If you want
.Xr sysbuild 1
to perform an update of this directory before every build, you will need
write access to it.
Otherwise, you can use a read-only directory.
.Pp
Defining this variable causes
.Xr sysbuild 1
to build the X Window System as part of the build of
.Nx .
.Pp
Default: not defined.
.El
.Pp
The following variables configure the location of the build files:
.Bl -tag -width INCREMENTAL_BUILD
.It Va BUILD_ROOT
Path to the directory in which to place build files.
These include the obj tree, the destdir and the cross-build tools generated
by the
.Nm build.sh
script.
The contents of this directory are sorted by machine type so that it can be
shared across builds for different machines.
.Pp
Default:
.Pa ~/sysbuild/ .
.It Va RELEASEDIR
Path to the directory that will contain the build products (aka the release
files).
The contents of this directory are sorted by machine type so that it can be
shared across builds for different machines.
.Pp
Default:
.Pa ~/sysbuild/release .
.El
.Pp
The following variables configure the build process:
.Bl -tag -width INCREMENTAL_BUILD
.It Va BUILD_TARGETS
Whitespace-separated list of targets to pass to
.Nm build.sh
during builds.
Targets can be prefixed by a machine name and a colon, in which case they only
apply to that machine; for example,
.Sq macppc:kernel=${HOME}/CUSTOM macppc:releasekernel=${HOME}/CUSTOM .
.Pp
Default:
.Sq release .
.It Va INCREMENTAL_BUILD
Whether to perform update builds or not.
An update build reuses existing obj, destdir and tools trees.
.Pp
Of special note is that
.Xr sysbuild 1
will take care of pruning files likely to cause breakage during update
builds before performing the build itself.
As an example, this includes deleting all the modules from
.Pa destdir/stand/<platform>/ .
.Pp
Default:
.Sq false .
.It Va MACHINES
Whitespace-separated list of machine types to build for.
.Pp
Default: the name of the host machine type.
.It Va MKVARS
Whitespace-separated list of
.Sq VARIABLE=value
.Xr make 1
variable definitions to be set during the build.
A useful example would be:
.Sq MKVARS="MKDEBUG=yes" .
.Pp
Default: not defined.
.It Va NJOBS
Number of parallel jobs to use during the build.
If not set, disables parallel builds (which, due to
.Nm make 1
semantics, is not the same as setting this to 1).
.Pp
Default: not defined.
.El
.Sh SEE ALSO
.Xr sysbuild 1
@@ -30,27 +30,28 @@ | @@ -30,27 +30,28 @@ | |||
30 | # Entry point and main program logic. | 30 | # Entry point and main program logic. | |
31 | 31 | |||
32 | shtk_import cli | 32 | shtk_import cli | |
33 | shtk_import config | 33 | shtk_import config | |
34 | shtk_import cvs | 34 | shtk_import cvs | |
35 | shtk_import list | 35 | shtk_import list | |
36 | shtk_import process | 36 | shtk_import process | |
37 | 37 | |||
38 | 38 | |||
39 | # List of valid configuration variables. | 39 | # List of valid configuration variables. | |
40 | # | 40 | # | |
41 | # Please remember to update sysbuild(1) if you change this list. | 41 | # Please remember to update sysbuild(1) if you change this list. | |
42 | SYSBUILD_CONFIG_VARS="BUILD_ROOT BUILD_TARGETS CVSROOT CVSTAG INCREMENTAL_BUILD | 42 | SYSBUILD_CONFIG_VARS="BUILD_ROOT BUILD_TARGETS CVSROOT CVSTAG INCREMENTAL_BUILD | |
43 | MACHINES NJOBS RELEASEDIR SRCDIR UPDATE_SOURCES XSRCDIR" | 43 | MACHINES MKVARS NJOBS RELEASEDIR SRCDIR UPDATE_SOURCES | |
44 | XSRCDIR" | |||
44 | 45 | |||
45 | 46 | |||
46 | # Paths to installed files. | 47 | # Paths to installed files. | |
47 | # | 48 | # | |
48 | # Can be overriden for test purposes only. | 49 | # Can be overriden for test purposes only. | |
49 | : ${SYSBUILD_ETCDIR="@SYSBUILD_ETCDIR@"} | 50 | : ${SYSBUILD_ETCDIR="@SYSBUILD_ETCDIR@"} | |
50 | : ${SYSBUILD_SHAREDIR="@SYSBUILD_SHAREDIR@"} | 51 | : ${SYSBUILD_SHAREDIR="@SYSBUILD_SHAREDIR@"} | |
51 | 52 | |||
52 | 53 | |||
53 | # Sets defaults for configuration variables that need a value. | 54 | # Sets defaults for configuration variables that need a value. | |
54 | # | 55 | # | |
55 | # This function should be before the configuration file has been loaded. This | 56 | # This function should be before the configuration file has been loaded. This | |
56 | # means that the user can undefine a required configuration variable, but we let | 57 | # means that the user can undefine a required configuration variable, but we let | |
@@ -85,26 +86,31 @@ do_one_build() { | @@ -85,26 +86,31 @@ do_one_build() { | |||
85 | if shtk_config_get_bool INCREMENTAL_BUILD; then | 86 | if shtk_config_get_bool INCREMENTAL_BUILD; then | |
86 | uflag=-u | 87 | uflag=-u | |
87 | 88 | |||
88 | # Get rid of any possibly-old modules; they are a constant source of | 89 | # Get rid of any possibly-old modules; they are a constant source of | |
89 | # update-build problems. | 90 | # update-build problems. | |
90 | rm -rf "${basedir}/destdir/stand"/* | 91 | rm -rf "${basedir}/destdir/stand"/* | |
91 | else | 92 | else | |
92 | shtk_cli_info "Cleaning up previous build files" | 93 | shtk_cli_info "Cleaning up previous build files" | |
93 | rm -rf "${basedir}/destdir" | 94 | rm -rf "${basedir}/destdir" | |
94 | rm -rf "${basedir}/obj" | 95 | rm -rf "${basedir}/obj" | |
95 | rm -rf "${basedir}/tools" | 96 | rm -rf "${basedir}/tools" | |
96 | fi | 97 | fi | |
97 | 98 | |||
99 | local Vflags= | |||
100 | for Vflag in $(shtk_config_get_default MKVARS ""); do | |||
101 | Vflags="${Vflags} -V${Vflag}" | |||
102 | done | |||
103 | ||||
98 | local xflag= | 104 | local xflag= | |
99 | local Xflag= | 105 | local Xflag= | |
100 | if shtk_config_has XSRCDIR; then | 106 | if shtk_config_has XSRCDIR; then | |
101 | xflag=-x | 107 | xflag=-x | |
102 | Xflag="-X$(shtk_config_get XSRCDIR)" | 108 | Xflag="-X$(shtk_config_get XSRCDIR)" | |
103 | fi | 109 | fi | |
104 | 110 | |||
105 | local targets= | 111 | local targets= | |
106 | for target in $(shtk_config_get BUILD_TARGETS); do | 112 | for target in $(shtk_config_get BUILD_TARGETS); do | |
107 | case "${target}" in | 113 | case "${target}" in | |
108 | *:*) | 114 | *:*) | |
109 | local submachine="$(echo "${target}" | cut -d : -f 1)" | 115 | local submachine="$(echo "${target}" | cut -d : -f 1)" | |
110 | local subtarget="$(echo "${target}" | cut -d : -f 2-)" | 116 | local subtarget="$(echo "${target}" | cut -d : -f 2-)" | |
@@ -120,26 +126,27 @@ do_one_build() { | @@ -120,26 +126,27 @@ do_one_build() { | |||
120 | *) | 126 | *) | |
121 | targets="${targets} ${target}" | 127 | targets="${targets} ${target}" | |
122 | ;; | 128 | ;; | |
123 | esac | 129 | esac | |
124 | done | 130 | done | |
125 | 131 | |||
126 | ( cd "$(shtk_config_get SRCDIR)" && shtk_process_run ./build.sh \ | 132 | ( cd "$(shtk_config_get SRCDIR)" && shtk_process_run ./build.sh \ | |
127 | -D"${basedir}/destdir" \ | 133 | -D"${basedir}/destdir" \ | |
128 | -M"${basedir}/obj" \ | 134 | -M"${basedir}/obj" \ | |
129 | -N2 \ | 135 | -N2 \ | |
130 | -R"$(shtk_config_get RELEASEDIR)" \ | 136 | -R"$(shtk_config_get RELEASEDIR)" \ | |
131 | -T"${basedir}/tools" \ | 137 | -T"${basedir}/tools" \ | |
132 | -U \ | 138 | -U \ | |
139 | ${Vflags} \ | |||
133 | ${Xflag} \ | 140 | ${Xflag} \ | |
134 | ${jflag} \ | 141 | ${jflag} \ | |
135 | -m"${machine}" \ | 142 | -m"${machine}" \ | |
136 | ${uflag} \ | 143 | ${uflag} \ | |
137 | ${xflag} \ | 144 | ${xflag} \ | |
138 | ${targets} ) | 145 | ${targets} ) | |
139 | } | 146 | } | |
140 | 147 | |||
141 | 148 | |||
142 | # Builds the system. | 149 | # Builds the system. | |
143 | # | 150 | # | |
144 | # \params ... The options and arguments to the command. | 151 | # \params ... The options and arguments to the command. | |
145 | sysbuild_build() { | 152 | sysbuild_build() { | |
@@ -260,27 +267,27 @@ EOF | @@ -260,27 +267,27 @@ EOF | |||
260 | # \params ... The options and arguments to the command. | 267 | # \params ... The options and arguments to the command. | |
261 | sysbuild_fetch() { | 268 | sysbuild_fetch() { | |
262 | [ ${#} -eq 0 ] || shtk_cli_usage_error "fetch does not take any arguments" | 269 | [ ${#} -eq 0 ] || shtk_cli_usage_error "fetch does not take any arguments" | |
263 | 270 | |||
264 | local cvsroot="$(shtk_config_get CVSROOT)" | 271 | local cvsroot="$(shtk_config_get CVSROOT)" | |
265 | 272 | |||
266 | shtk_cli_info "Updating base source tree" | 273 | shtk_cli_info "Updating base source tree" | |
267 | shtk_cvs_fetch "${cvsroot}" src "$(shtk_config_get_default CVSTAG '')" \ | 274 | shtk_cvs_fetch "${cvsroot}" src "$(shtk_config_get_default CVSTAG '')" \ | |
268 | "$(shtk_config_get SRCDIR)" | 275 | "$(shtk_config_get SRCDIR)" | |
269 | 276 | |||
270 | if shtk_config_has XSRCDIR; then | 277 | if shtk_config_has XSRCDIR; then | |
271 | shtk_cli_info "Updating X11 source tree" | 278 | shtk_cli_info "Updating X11 source tree" | |
272 | shtk_cvs_fetch "${cvsroot}" xsrc \ | 279 | shtk_cvs_fetch "${cvsroot}" xsrc \ | |
273 | "$(shtk_config_get_default CVSTAG '')" "$(shtk_config_get XSRCDIR)" | 280 | "$(shtk_config_get_default CVSTAG '')" "$(shtk_config_get XSRCDIR)" | |
274 | fi | 281 | fi | |
275 | } | 282 | } | |
276 | 283 | |||
277 | 284 | |||
278 | # Loads the configuration file specified in the command line. | 285 | # Loads the configuration file specified in the command line. | |
279 | # | 286 | # | |
280 | # \param config_name Name of the desired configuration. It can be either a | 287 | # \param config_name Name of the desired configuration. It can be either a | |
281 | # configuration name (no slashes) or a path. | 288 | # configuration name (no slashes) or a path. | |
282 | sysbuild_config_load() { | 289 | sysbuild_config_load() { | |
283 | local config_name="${1}"; shift | 290 | local config_name="${1}"; shift | |
284 | 291 | |||
285 | local config_file= | 292 | local config_file= | |
286 | case "${config_name}" in | 293 | case "${config_name}" in |
@@ -386,26 +386,55 @@ build__machine_targets__unmatched_body() | @@ -386,26 +386,55 @@ build__machine_targets__unmatched_body() | |||
386 | 386 | |||
387 | cat >experr <<EOF | 387 | cat >experr <<EOF | |
388 | sysbuild: E: The 'macpp:kernel=/foo/bar a:b' targets do not match any machine in 'amd64 macppc shark' | 388 | sysbuild: E: The 'macpp:kernel=/foo/bar a:b' targets do not match any machine in 'amd64 macppc shark' | |
389 | EOF | 389 | EOF | |
390 | atf_check -s exit:1 -o empty -e file:experr sysbuild \ | 390 | atf_check -s exit:1 -o empty -e file:experr sysbuild \ | |
391 | -c /dev/null -o CVSROOT="${MOCK_CVSROOT}" \ | 391 | -c /dev/null -o CVSROOT="${MOCK_CVSROOT}" \ | |
392 | -o MACHINES="amd64 macppc shark" -o NJOBS=2 build \ | 392 | -o MACHINES="amd64 macppc shark" -o NJOBS=2 build \ | |
393 | tools macpp:kernel=/foo/bar a:b release | 393 | tools macpp:kernel=/foo/bar a:b release | |
394 | 394 | |||
395 | test ! -f commands.log || atf_fail "cvs should not have been executed" | 395 | test ! -f commands.log || atf_fail "cvs should not have been executed" | |
396 | } | 396 | } | |
397 | 397 | |||
398 | 398 | |||
399 | atf_test_case build__mkvars | |||
400 | build__mkvars_body() { | |||
401 | mkdir -p sysbuild/src | |||
402 | create_mock_binary sysbuild/src/build.sh | |||
403 | ||||
404 | atf_check -o save:stdout -e save:stderr sysbuild \ | |||
405 | -c /dev/null -o CVSROOT="${MOCK_CVSROOT}" \ | |||
406 | -o MKVARS="MKDEBUG=yes FOO=bar" build -f | |||
407 | ||||
408 | cat >expout <<EOF | |||
409 | Command: build.sh | |||
410 | Directory: ${HOME}/sysbuild/src | |||
411 | Arg: -D${HOME}/sysbuild/$(uname -m)/destdir | |||
412 | Arg: -M${HOME}/sysbuild/$(uname -m)/obj | |||
413 | Arg: -N2 | |||
414 | Arg: -R${HOME}/sysbuild/release | |||
415 | Arg: -T${HOME}/sysbuild/$(uname -m)/tools | |||
416 | Arg: -U | |||
417 | Arg: -VMKDEBUG=yes | |||
418 | Arg: -VFOO=bar | |||
419 | Arg: -m$(uname -m) | |||
420 | Arg: -u | |||
421 | Arg: release | |||
422 | ||||
423 | EOF | |||
424 | atf_check -o file:expout cat commands.log | |||
425 | } | |||
426 | ||||
427 | ||||
399 | atf_test_case build__with_x11 | 428 | atf_test_case build__with_x11 | |
400 | build__with_x11_body() { | 429 | build__with_x11_body() { | |
401 | create_mock_cvsroot "${MOCK_CVSROOT}" | 430 | create_mock_cvsroot "${MOCK_CVSROOT}" | |
402 | 431 | |||
403 | create_mock_binary cvs yes | 432 | create_mock_binary cvs yes | |
404 | PATH="$(pwd):${PATH}" | 433 | PATH="$(pwd):${PATH}" | |
405 | 434 | |||
406 | atf_check -o save:stdout -e save:stderr sysbuild \ | 435 | atf_check -o save:stdout -e save:stderr sysbuild \ | |
407 | -c /dev/null -o CVSROOT="${MOCK_CVSROOT}" \ | 436 | -c /dev/null -o CVSROOT="${MOCK_CVSROOT}" \ | |
408 | -o XSRCDIR="${HOME}/sysbuild/xsrc" build | 437 | -o XSRCDIR="${HOME}/sysbuild/xsrc" build | |
409 | 438 | |||
410 | cat >expout <<EOF | 439 | cat >expout <<EOF | |
411 | Command: cvs | 440 | Command: cvs | |
@@ -478,26 +507,27 @@ EOF | @@ -478,26 +507,27 @@ EOF | |||
478 | atf_check -o file:expout cat commands.log | 507 | atf_check -o file:expout cat commands.log | |
479 | } | 508 | } | |
480 | 509 | |||
481 | 510 | |||
482 | atf_test_case config__builtins | 511 | atf_test_case config__builtins | |
483 | config__builtins_body() { | 512 | config__builtins_body() { | |
484 | cat >expout <<EOF | 513 | cat >expout <<EOF | |
485 | BUILD_ROOT = ${HOME}/sysbuild | 514 | BUILD_ROOT = ${HOME}/sysbuild | |
486 | BUILD_TARGETS = release | 515 | BUILD_TARGETS = release | |
487 | CVSROOT = :ext:anoncvs@anoncvs.NetBSD.org:/cvsroot | 516 | CVSROOT = :ext:anoncvs@anoncvs.NetBSD.org:/cvsroot | |
488 | CVSTAG is undefined | 517 | CVSTAG is undefined | |
489 | INCREMENTAL_BUILD = false | 518 | INCREMENTAL_BUILD = false | |
490 | MACHINES = $(uname -m) | 519 | MACHINES = $(uname -m) | |
520 | MKVARS is undefined | |||
491 | NJOBS is undefined | 521 | NJOBS is undefined | |
492 | RELEASEDIR = ${HOME}/sysbuild/release | 522 | RELEASEDIR = ${HOME}/sysbuild/release | |
493 | SRCDIR = ${HOME}/sysbuild/src | 523 | SRCDIR = ${HOME}/sysbuild/src | |
494 | UPDATE_SOURCES = true | 524 | UPDATE_SOURCES = true | |
495 | XSRCDIR is undefined | 525 | XSRCDIR is undefined | |
496 | EOF | 526 | EOF | |
497 | atf_check -o file:expout sysbuild -c /dev/null config | 527 | atf_check -o file:expout sysbuild -c /dev/null config | |
498 | } | 528 | } | |
499 | 529 | |||
500 | 530 | |||
501 | atf_test_case config__path__components | 531 | atf_test_case config__path__components | |
502 | config__path__components_body() { | 532 | config__path__components_body() { | |
503 | mkdir .sysbuild | 533 | mkdir .sysbuild | |
@@ -561,26 +591,27 @@ atf_test_case config__overrides | @@ -561,26 +591,27 @@ atf_test_case config__overrides | |||
561 | config__overrides_body() { | 591 | config__overrides_body() { | |
562 | cat >custom.conf <<EOF | 592 | cat >custom.conf <<EOF | |
563 | BUILD_ROOT=/tmp/test | 593 | BUILD_ROOT=/tmp/test | |
564 | CVSTAG=the-tag-override | 594 | CVSTAG=the-tag-override | |
565 | EOF | 595 | EOF | |
566 | 596 | |||
567 | cat >expout <<EOF | 597 | cat >expout <<EOF | |
568 | BUILD_ROOT = /tmp/test | 598 | BUILD_ROOT = /tmp/test | |
569 | BUILD_TARGETS = release | 599 | BUILD_TARGETS = release | |
570 | CVSROOT = foo bar | 600 | CVSROOT = foo bar | |
571 | CVSTAG = the-new-tag | 601 | CVSTAG = the-new-tag | |
572 | INCREMENTAL_BUILD = false | 602 | INCREMENTAL_BUILD = false | |
573 | MACHINES = $(uname -m) | 603 | MACHINES = $(uname -m) | |
604 | MKVARS is undefined | |||
574 | NJOBS is undefined | 605 | NJOBS is undefined | |
575 | RELEASEDIR = ${HOME}/sysbuild/release | 606 | RELEASEDIR = ${HOME}/sysbuild/release | |
576 | SRCDIR is undefined | 607 | SRCDIR is undefined | |
577 | UPDATE_SOURCES = true | 608 | UPDATE_SOURCES = true | |
578 | XSRCDIR is undefined | 609 | XSRCDIR is undefined | |
579 | EOF | 610 | EOF | |
580 | atf_check -o file:expout sysbuild -c custom.conf -o CVSROOT="foo bar" \ | 611 | atf_check -o file:expout sysbuild -c custom.conf -o CVSROOT="foo bar" \ | |
581 | -o CVSTAG=the-new-tag -o SRCDIR= config | 612 | -o CVSTAG=the-new-tag -o SRCDIR= config | |
582 | } | 613 | } | |
583 | 614 | |||
584 | 615 | |||
585 | atf_test_case config__too_many_args | 616 | atf_test_case config__too_many_args | |
586 | config__too_many_args_body() { | 617 | config__too_many_args_body() { | |
@@ -860,26 +891,27 @@ Type 'man sysbuild' for help | @@ -860,26 +891,27 @@ Type 'man sysbuild' for help | |||
860 | EOF | 891 | EOF | |
861 | atf_check -s exit:1 -e file:experr sysbuild -Z | 892 | atf_check -s exit:1 -e file:experr sysbuild -Z | |
862 | } | 893 | } | |
863 | 894 | |||
864 | 895 | |||
865 | atf_init_test_cases() { | 896 | atf_init_test_cases() { | |
866 | atf_add_test_case build__custom_dirs | 897 | atf_add_test_case build__custom_dirs | |
867 | atf_add_test_case build__defaults | 898 | atf_add_test_case build__defaults | |
868 | atf_add_test_case build__remove_all | 899 | atf_add_test_case build__remove_all | |
869 | atf_add_test_case build__fast_mode | 900 | atf_add_test_case build__fast_mode | |
870 | atf_add_test_case build__many_machines | 901 | atf_add_test_case build__many_machines | |
871 | atf_add_test_case build__machine_targets__ok | 902 | atf_add_test_case build__machine_targets__ok | |
872 | atf_add_test_case build__machine_targets__unmatched | 903 | atf_add_test_case build__machine_targets__unmatched | |
904 | atf_add_test_case build__mkvars | |||
873 | atf_add_test_case build__with_x11 | 905 | atf_add_test_case build__with_x11 | |
874 | atf_add_test_case build__some_args | 906 | atf_add_test_case build__some_args | |
875 | 907 | |||
876 | atf_add_test_case config__builtins | 908 | atf_add_test_case config__builtins | |
877 | atf_add_test_case config__path__components | 909 | atf_add_test_case config__path__components | |
878 | atf_add_test_case config__path__extension | 910 | atf_add_test_case config__path__extension | |
879 | atf_add_test_case config__name__system_directory | 911 | atf_add_test_case config__name__system_directory | |
880 | atf_add_test_case config__name__user_directory | 912 | atf_add_test_case config__name__user_directory | |
881 | atf_add_test_case config__name__not_found | 913 | atf_add_test_case config__name__not_found | |
882 | atf_add_test_case config__overrides | 914 | atf_add_test_case config__overrides | |
883 | atf_add_test_case config__too_many_args | 915 | atf_add_test_case config__too_many_args | |
884 | 916 | |||
885 | atf_add_test_case env__src_only | 917 | atf_add_test_case env__src_only |