diskimage-builder/elements/manifests
Andreas Florath 870374c8da Move generation of dib_[environment|args] to manifest element
dib_[environment|args] manifest files are currently generated by the
base element and then moved by the manifest element.

This creates too many corner cases -- if you don't include the base
element (we are trying to empty it ATM) you don't get the env/args
saved at all; if you include base but don't include the manifest
element they're saved to /etc, but if you do have the manifest element
they're moved to the manifest dir.

Move generation of these into the manifest element directly and update
the documentation to reflect this.  In practice this doesn't change
things, because the "manifests" element gets pulled in via deps for
most builds.

Change-Id: I3f23037058137d166b29f0b70fd1a02c22c07fc8
Signed-off-by: Andreas Florath <andreas@florath.net>
2017-02-07 11:33:16 +11:00
..
cleanup.d Move generation of dib_[environment|args] to manifest element 2017-02-07 11:33:16 +11:00
environment.d elements: Drop executable bits from environment files 2016-12-01 23:06:56 +00:00
extra-data.d Standarise tracing for scripts 2015-02-12 10:41:32 +11:00
README.rst Move generation of dib_[environment|args] to manifest element 2017-02-07 11:33:16 +11:00

=========
manifests
=========

An framework for saving manifest information generated during the
build for later inspection.  Manifests are kept in the final image and
also copied to the build area post-image creation.

Elements that wish to save any form of manifest should depend on this
element and can save their data to into the ``DIB_MANIFEST_IMAGE_DIR`` (
which defaults to ``/etc/dib-manifests``).  Note this is created in
``extra-data.d`` rather than ``pre-install.d`` to allow the
``source-repositories`` element to make use of it

The manifests are copied to ``DIB_MANIFEST_SAVE_DIR``, which defaults
to ``${IMAGE_NAME}.d/``, resulting in the manifests being available as
``${IMAGE_NAME}.d/dib-manifests`` by default after the build.

Extra status
------------

This element will also add the files ``dib_environment`` and
``dib_arguments`` to the manifest recording the ``diskimage-builder``
specific environment (``DIB_*`` variables) and command-line arguments
respectively.