diskimage-builder/diskimage_builder/elements/manifests
Mark Goddard 9767cd564f Fix manifest element with non-root user
When building an image with the manifests element as a non-root user,
the image can fail to build. This affects the Ironic Python Agent (IPA)
image.

The issue was permission denied when copying the manifests from the
image build directory due to them being owned by the root user.

This change fixes the issue by copying the files using sudo, and
changing their ownership later.

Change-Id: I5fcdd9d47f97f32a5b4b8246e8b57ead41b0bdd9
Closes-Bug: #2069956
2024-06-21 09:53:56 +00:00
..
cleanup.d Fix manifest element with non-root user 2024-06-21 09:53:56 +00:00
environment.d Release 1.25.2 2017-02-02 11:20:00 +11:00
extra-data.d Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
README.rst Merge branch 'master' into merge-branch 2017-02-09 13:35:53 +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.