Skip to content

Commit

Permalink
doc: document bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
rhubert committed Jan 14, 2025
1 parent 6c13135 commit 6dbf755
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 0 deletions.
12 changes: 12 additions & 0 deletions doc/manpages/bob-build-dev.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ Options

This is the default unless the user changed it in ``default.yaml``.

``--bundle BUNDLE``
Bundle all the sources needed to build the package. The output of this is a
tar-file containing one tar-file for each source workspace needed to build
the package. This also enables `--always-checkout`.

``--bundle-exclude RE``
Do not add packages matching (fnmatch) RE to the bundle.

``--clean``
Do clean builds by clearing the build directory before executing the build
commands. It will *not* clean all build results (e.g. like ``make clean``)
Expand Down Expand Up @@ -360,6 +368,10 @@ Options
``-q, --quiet``
Decrease verbosity (may be specified multiple times)

``--unbundle``
Use bundle specified by ``--bundle`` but unbundle the sources from the
bundle.

``-v, --verbose``
Increase verbosity (may be specified multiple times)

Expand Down
1 change: 1 addition & 0 deletions doc/manpages/bob-build.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Synopsis
[--install | --no-install]
[--sandbox | --slim-sandbox | --dev-sandbox | --strict-sandbox | --no-sandbox]
[--clean-checkout] [--attic | --no-attic]
[--bundle BUNDLE] [--bundle-exclude BUNDLE_EXCLUDE] [--unbundle]
PACKAGE [PACKAGE ...]

Description
Expand Down
1 change: 1 addition & 0 deletions doc/manpages/bob-dev.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Synopsis
[--install | --no-install]
[--sandbox | --slim-sandbox | --dev-sandbox | --strict-sandbox | --no-sandbox]
[--clean-checkout] [--attic | --no-attic]
[--bundle BUNDLE] [--bundle-exclude BUNDLE_EXCLUDE] [--unbundle]
PACKAGE [PACKAGE ...]

Description
Expand Down
28 changes: 28 additions & 0 deletions doc/tutorial/compile.rst
Original file line number Diff line number Diff line change
Expand Up @@ -350,3 +350,31 @@ the zlib packages: ::
.. raw:: html

<iframe src="../_static/sandbox.html" height="500px" width="100%"></iframe>

Using source bundles
====================

A source code bundle is a tar file with all the sources needed to build a
package included. This bundle can be used to compile on a air gapped system, to
archive the build input, to transfer the sources to a reviewer, ...

To bundle a all the input for a given package you need to build it using
:ref:`manpage-dev` or :ref:`manpage-build` with the ``--bundle`` option. This
option takes one argument specifying the name of the bundle file.
There is also a ``--bundle-exclude`` option which allows it to exclude the
sources of packages to be excluded from the bundle.

For example to bundle the sources needed to build my_package without the packges
matching `foo**` use: ::

$ bob build my_package --bundle my_package_bundle.tar --bundle-exclude foo*

After that you can take the my_package_bundle.tar to another system and use: ::

$ bob build my_package --bundle my_package_bundle.tar --unbundle

to build `my_package` without having access to the sources in the recipes.

.. note::
The recipes and `bob` are not part of the bundle and need to be handled
seperately.

0 comments on commit 6dbf755

Please sign in to comment.