source: rtems-docs/user/rsb/commands.rst

Last change on this file was 967999b, checked in by Chris Johns <chrisj@…>, on 08/11/20 at 03:40:41

user: Add the RSB sb-track command

Updates #4036

  • Property mode set to 100644
File size: 14.7 KB
Line 
1.. SPDX-License-Identifier: CC-BY-SA-4.0
2
3.. Copyright (C) 2012, 2016 Chris Johns <chrisj@rtems.org>
4
5Commands
6--------
7
8Checker (sb-check)
9^^^^^^^^^^^^^^^^^^
10
11This commands checks your system is set up correctly. Most options are ignored:
12
13.. code-block:: none
14
15    $ ../source-builder/sb-check --help
16    sb-check: [options] [args]
17    RTEMS Source Builder, an RTEMS Tools Project (c) 2012-2013 Chris Johns
18    Options and arguments:
19    --force                : Force the build to proceed
20    --quiet                : Quiet output (not used)
21    --trace                : Trace the execution
22    --dry-run              : Do everything but actually run the build
23    --warn-all             : Generate warnings
24    --no-clean             : Do not clean up the build tree
25    --always-clean         : Always clean the build tree, even with an error
26    --jobs                 : Run with specified number of jobs, default: num CPUs.
27    --host                 : Set the host triplet
28    --build                : Set the build triplet
29    --target               : Set the target triplet
30    --prefix path          : Tools build prefix, ie where they are installed
31    --topdir path          : Top of the build tree, default is $PWD
32    --configdir path       : Path to the configuration directory, default: ./config
33    --builddir path        : Path to the build directory, default: ./build
34    --sourcedir path       : Path to the source directory, default: ./source
35    --patchdir path        : Path to the patches directory, default: ./patches
36    --tmppath path         : Path to the temp directory, default: ./tmp
37    --macros file[,[file]  : Macro format files to load after the defaults
38    --log file             : Log file where all build out is written too
39    --url url[,url]        : URL to look for source
40    --no-download          : Disable the source downloader
41    --targetcflags flags   : List of C flags for the target code
42    --targetcxxflags flags : List of C++ flags for the target code
43    --libstdcxxflags flags : List of C++ flags to build the target libstdc++ code
44    --with-<label>         : Add the --with-<label> to the build
45    --without-<label>      : Add the --without-<label> to the build
46    --regression           : Set --no-install, --keep-going and --always-clean
47    $ ../source-builder/sb-check
48    RTEMS Source Builder - Check, v0.2.0
49    Environment is ok
50
51Defaults (sb-defaults)
52^^^^^^^^^^^^^^^^^^^^^^
53
54This commands outputs and the default macros for your when given no
55arguments. Most options are ignored:
56
57.. code-block:: none
58
59    $ ../source-builder/sb-defaults --help
60    sb-defaults: [options] [args]
61    RTEMS Source Builder, an RTEMS Tools Project (c) 2012-2013 Chris Johns
62    Options and arguments:
63    --force                : Force the build to proceed
64    --quiet                : Quiet output (not used)
65    --trace                : Trace the execution
66    --dry-run              : Do everything but actually run the build
67    --warn-all             : Generate warnings
68    --no-clean             : Do not clean up the build tree
69    --always-clean         : Always clean the build tree, even with an error
70    --jobs                 : Run with specified number of jobs, default: num CPUs.
71    --host                 : Set the host triplet
72    --build                : Set the build triplet
73    --target               : Set the target triplet
74    --prefix path          : Tools build prefix, ie where they are installed
75    --topdir path          : Top of the build tree, default is $PWD
76    --configdir path       : Path to the configuration directory, default: ./config
77    --builddir path        : Path to the build directory, default: ./build
78    --sourcedir path       : Path to the source directory, default: ./source
79    --patchdir path        : Path to the patches directory, default: ./patches
80    --tmppath path         : Path to the temp directory, default: ./tmp
81    --macros file[,[file]  : Macro format files to load after the defaults
82    --log file             : Log file where all build out is written too
83    --url url[,url]        : URL to look for source
84    --no-download          : Disable the source downloader
85    --targetcflags flags   : List of C flags for the target code
86    --targetcxxflags flags : List of C++ flags for the target code
87    --libstdcxxflags flags : List of C++ flags to build the target libstdc++ code
88    --with-<label>         : Add the --with-<label> to the build
89    --without-<label>      : Add the --without-<label> to the build
90    --regression           : Set --no-install, --keep-going and --always-clean
91
92Set Builder (sb-set-builder)
93^^^^^^^^^^^^^^^^^^^^^^^^^^^^
94
95This command builds a set:
96
97.. code-block:: none
98
99    $ ../source-builder/sb-set-builder --help
100    RTEMS Source Builder, an RTEMS Tools Project (c) 2012-2013 Chris Johns
101    Options and arguments:
102    --force                : Force the build to proceed
103    --quiet                : Quiet output (not used)
104    --trace                : Trace the execution
105    --dry-run              : Do everything but actually run the build
106    --warn-all             : Generate warnings
107    --no-clean             : Do not clean up the build tree
108    --always-clean         : Always clean the build tree, even with an error
109    --regression           : Set --no-install, --keep-going and --always-clean
110    ---jobs                 : Run with specified number of jobs, default: num CPUs.
111    --host                 : Set the host triplet
112    --build                : Set the build triplet
113    --target               : Set the target triplet
114    --prefix path          : Tools build prefix, ie where they are installed
115    --topdir path          : Top of the build tree, default is $PWD
116    --configdir path       : Path to the configuration directory, default: ./config
117    --builddir path        : Path to the build directory, default: ./build
118    --sourcedir path       : Path to the source directory, default: ./source
119    --patchdir path        : Path to the patches directory, default: ./patches
120    --tmppath path         : Path to the temp directory, default: ./tmp
121    --macros file[,[file]  : Macro format files to load after the defaults
122    --log file             : Log file where all build out is written too
123    --url url[,url]        : URL to look for source
124    --no-download          : Disable the source downloader
125    --no-install           : Do not install the packages to the prefix
126    --targetcflags flags   : List of C flags for the target code
127    --targetcxxflags flags : List of C++ flags for the target code
128    --libstdcxxflags flags : List of C++ flags to build the target libstdc++ code
129    --with-<label>         : Add the --with-<label> to the build
130    --without-<label>      : Add the --without-<label> to the build
131    --mail-from            : Email address the report is from.
132    --mail-to              : Email address to send the email too.
133    --mail                 : Send email report or results.
134    --smtp-host            : SMTP host to send via.
135    --no-report            : Do not create a package report.
136    --report-format        : The report format (text, html, asciidoc).
137    --bset-tar-file        : Create a build set tar file
138    --pkg-tar-files        : Create package tar files
139    --list-bsets           : List available build sets
140    --list-configs         : List available configurations
141    --list-deps            : List the dependent files.
142
143The ``arguments`` are a list of build sets to build.
144
145**Options**:
146
147``--force``:
148  Force the build to proceed even if the host check fails. Typically this
149  happens if executable files are found in the path at a different location to
150  the host defaults.
151
152``--trace``:
153  Trace enable printing of debug information to stdout. It is really only of
154  use to RTEMS Source Builder's developers.
155
156``--dry-run``:
157  Do everything but actually run the build commands. This is useful when
158  checking a new configuration parses cleanly.
159
160``--warn-all``:
161  Generate warnings.
162
163``--no-clean``:
164  Do not clean up the build tree during the cleaning phase of the build. This
165  leaves the source and the build output on disk so you can make changes, or
166  amend or generate new patches. It also allows you to review configure type
167  output such as ``config.log``.
168
169``--always-clean``:
170  Clean away the results of a build even if the build fails. This is normally
171  used with ``--keep-going`` when regression testing to see which build sets
172  fail to build. It keeps the disk usage down.
173
174``--jobs``:
175  Control the number of jobs make is given. The jobs can be ``none`` for only 1
176  job, ``half`` so the number of jobs is half the number of detected cores, a
177  fraction such as ``0.25`` so the number of jobs is a quarter of the number of
178  detected cores and a number such as ``25`` which forces the number of jobs to
179  that number.
180
181``--host``:
182  Set the host triplet value. Be careful with this option.
183
184``--build``:
185  Set the build triplet. Be careful with this option.
186
187``--target``:
188  Set the target triplet. Be careful with this option. This is useful if you
189  have a generic configuration script that can work for a range of
190  architectures.
191
192``--prefix path``:
193  Tools build prefix, ie where they are installed.
194
195``--topdir path``:
196  Top of the build tree, that is the current directory you are in.
197
198``--configdir path``:
199  Path to the configuration directory. This overrides the built in defaults.
200
201``--builddir path``:
202  Path to the build directory. This overrides the default of `build`.
203
204``--sourcedir path``:
205  Path to the source directory. This overrides the default of `source`.
206
207``--patchdir path``:
208  Path to the patches directory. This overrides the default of `patches`.
209
210``--tmppath path``:
211  Path to the temporary directory. This overrides the default of `tmp`.
212
213``--macros files``:
214  Macro files to load. The configuration directory path is searched.
215
216``--log file``:
217  Log all the output from the build process. The output is directed to `stdout`
218  if no log file is provided.
219
220``--url url``:
221  URL to look for source when downloading. This is can be comma separate list.
222
223``--no-download``:
224  Disable downloading of source and patches. If the source is not found an
225  error is raised.
226
227``--targetcflags flags``:
228  List of C flags for the target code. This allows for specific local
229  customisation when testing new variations.
230
231``--targetcxxflags flags``:
232  List of C++ flags for the target code. This allows for specific local
233  customisation when testing new variations.
234
235``--libstdcxxflags flags``:
236  List of C++ flags to build the target libstdc++ code. This allows for
237  specific local customisation when testing new variations.
238
239``--with-<label>``:
240  Add the ``--with-<label>`` to the build. This can be tested for in a script
241  with the ``%bconf_with`` macro.
242
243``--without-<label>``:
244  Add the ``--without-<label>`` to the build. This can be tested for in a
245  script with the ``%bconf_without`` macro.
246
247``--mail-from``:
248  Set the from mail address if report mailing is enabled.
249
250``--mail-to``:
251  Set the to mail address if report mailing is enabled. The report is mailed to
252  this address.
253
254``--mail``:
255  Mail the build report to the mail to address.
256
257``--smtp-host``:
258  The SMTP host to use to send the email. The default is ``localhost``.
259
260``--no-report``:
261  Do not create a report format.
262
263``--report-format format``:
264  The report format can be ``text`` or ``html``. The default is ``html``.
265
266``--keep-going``:
267  Do not stop on error. This is useful if your build sets performs a large
268  number of testing related builds and there are errors.
269
270``--always-clean``:
271  Always clean the build tree even with a failure.
272
273``--no-install``:
274  Do not install the packages to the prefix. Use this if you are only after the
275  tar files.
276
277``--regression``:
278  A convenience option which is the same as ``--no-install``, ``--keep-going``
279  and ``--always-clean``.
280
281``--bset-tar-file``:
282  Create a build set tar file. This is a single tar file of all the packages in
283  the build set.
284
285``--pkg-tar-files``:
286  Create package tar files. A tar file will be created for each package built
287  in a build set.
288
289``--list-bsets``:
290  List available build sets.
291
292``--list-configs``:
293  List available configurations.
294
295``--list-deps``:
296  Print a list of dependent files used by a build set. Dependent files have a
297  ``dep[?]` prefix where ``?`` is a number. The files are listed alphabetically.
298
299Track (sb-track)
300^^^^^^^^^^^^^^^^^^^^^^^^^^^^
301
302This command checks build sets and configurations reporting any errors, the
303dependencies and which files are referenced. The command can list all the
304configuration files not referenced. If this option is used when checking all
305build set files a list of all configuration files not referenced can be
306found. The list can be used to purge the RSB of old and unused configurations.
307
308The check runs a build set through a number of host configurations. This
309checks any logic that is specific to a host.
310
311The command reports a dependency tree for a build set in the output
312report. For example the dependency tree for the ``database/sqlite`` build set
313is:
314
315.. code-block:: none
316
317  +-- rtems/config/databases/sqlite.bset
318       +-- rtems/config/databases/sqlite-3.31.1-1.cfg
319            +-- rtems/config/rtems-bsp.cfg
320            +-- source-builder/config/sqlite-3-1.cfg
321       +-- rtems/config/rtems-package.bset
322            +-- rtems/config/rtems-urls.bset
323            +-- rtems/config/rtems-version.bset
324
325The comnmand is:
326
327.. code-block:: none
328
329    $ ../source-builder/sb-track --help
330    usage: sb-dep-check [-h] [--rtems-version RTEMS_VERSION] [--list-hosts]
331                        [--list-bsets] [--output OUTPUT] [--log LOG] [--trace]
332                        [--not-referenced]
333                        [bsets [bsets ...]]
334
335    RTEMS Track Dependencies a build set has for all hosts.
336
337    positional arguments:
338      bsets                 Build sets.
339
340    optional arguments:
341      -h, --help            show this help message and exit
342      --rtems-version RTEMS_VERSION
343                            Set the RTEMS version.
344      --list-hosts          List the hosts.
345      --list-bsets          List the hosts.
346      --output OUTPUT       Output file.
347      --log LOG             Log file.
348      --trace               Enable trace logging for debugging.
349      --not-referenced      Write out the list of config files not referenced.
350
351The ``bsets`` are a list of build sets to check. If none are provided all
352build sets are checked.
353
354**Options**:
355
356``-h, --help``:
357  The command's help.
358
359``--rtems-version``:
360  Set the RTEMS version number.
361
362``--list-hosts``:
363  List the hosts each build set of check against.
364
365``--list-bsets``:
366  List all the build set files.
367
368``--output``:
369  Write the report to the output file.
370
371``--log``:
372  The log file the build set check processing is written too.
373
374``--trace``:
375  Enable trace debugging.
376
377``--not-referenced``:
378  List the configration files not referenced by a build set in the output.
Note: See TracBrowser for help on using the repository browser.