Add element-manifest

Add an element that writes a manifest of all the elements used in the
image build.

Change-Id: Icd1863fa9ece1c303208d20b2da46f59c23d7512
This commit is contained in:
James Slagle 2014-09-02 16:39:46 -04:00
parent 3bff0ab543
commit d4bbc30a11
3 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,7 @@
element-manifest
================
Writes a manifest file that is the full list of elements that were used to
build the image. The file path can be overriden by setting
$DIB\_ELEMENT\_MANIFEST\_PATH, and defaults to
/etc/dib-manifests/element-manifest.

View File

@ -0,0 +1 @@
manifests

View File

@ -0,0 +1,8 @@
#!/bin/bash
set -eux
set -o pipefail
DIB_ELEMENT_MANIFEST_PATH=${DIB_ELEMENT_MANIFEST_PATH:-"$DIB_MANIFEST_IMAGE_DIR/dib-element-manifest"}
sudo mkdir -p $TMP_MOUNT_PATH/$(dirname $DIB_ELEMENT_MANIFEST_PATH)
sudo /bin/bash -c "echo $IMAGE_ELEMENT | tr ' ' '\n' > $TMP_MOUNT_PATH/$DIB_ELEMENT_MANIFEST_PATH"