Perry Myers
2008-Nov-19 16:10 UTC
[Ovirt-devel] [PATCH node-image] Build process creates a manifest tar that can be used in comparing builds of the node
Signed-off-by: Perry Myers <pmyers at redhat.com> --- .gitignore | 1 + ovirt-node-image.ks | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 0 deletions(-) diff --git a/.gitignore b/.gitignore index 83fe611..62670cd 100644 --- a/.gitignore +++ b/.gitignore @@ -16,5 +16,6 @@ ovirt-node-image-*-*iso ovirt-node-image-*-*iso.sha1sum ovirt-node-image.iso ovirt-node-image.spec +ovirt-node-image-manifests*.tar repos.ks stamp-h1 diff --git a/ovirt-node-image.ks b/ovirt-node-image.ks index 3a6f399..6d6fd16 100644 --- a/ovirt-node-image.ks +++ b/ovirt-node-image.ks @@ -16,6 +16,13 @@ touch /.autorelabel %end +%post +# Create initial manifests +mkdir -p /etc/manifests +rpm -qa > /etc/manifests/package-manifest.txt +du -akx --exclude=./var/cache/yum > /etc/manifests/file-manifest.txt +%end + %include common-blacklist.ks %post --nochroot @@ -47,3 +54,21 @@ linux0=1 && /append / { append0=$0 } mv $LIVE_ROOT/isolinux/isolinux.cfg.standalone $LIVE_ROOT/isolinux/isolinux.cfg %end + +%post +# Create post-image processing manifests +rpm -qa > /etc/manifests/package-manifest-post.txt +du -akx --exclude=./var/cache/yum > /etc/manifests/file-manifest-post.txt + +ver=$(rpm -q --qf '%{version}' ovirt-node) +rel=$(rpm -q --qf '%{release}' ovirt-node) +arch=$(rpm -q --qf '%{arch}' ovirt-node) +echo "oVirt Node release $ver-$rel-$arch" > /etc/manifests/ovirt-release +tar -cvf ovirt-node-image-manifests-$ver-$rel.$arch.tar -C /etc manifests +%end + +%post --nochroot +# Move manifest tar to build directory +mv $INSTALL_ROOT/ovirt-node-image-manifests-*.tar . +%end + -- 1.6.0.3