[Ovirt-devel] [PATCH REPOST node-image] Build process creates a manifest tar that can be used in comparing builds of the node
Perry Myers
pmyers at redhat.com
Wed Nov 19 18:19:07 UTC 2008
Incorporated some changes from Alan, Dan and Jim to provide:
1. directory manifests suitable for xdu
2. srpm manifests
3. Remove manifests from built node to save space
4. Fix du cmd to use absolute paths
Signed-off-by: Perry Myers <pmyers at redhat.com>
---
.gitignore | 1 +
ovirt-node-image.ks | 35 +++++++++++++++++++++++++++++++++++
2 files changed, 36 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..c974173 100644
--- a/ovirt-node-image.ks
+++ b/ovirt-node-image.ks
@@ -16,6 +16,17 @@ touch /.autorelabel
%end
+%post
+# Create initial manifests
+manifests=/tmp/manifests
+mkdir -p $manifests
+rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}\n' | sort \
+ > $manifests/rpm-manifest.txt
+rpm -qa --qf '%{sourcerpm}\n' | sort -u > $manifests/srpm-manifest.txt
+du -akx --exclude=/var/cache/yum / > $manifests/file-manifest.txt
+du -x --exclude=/var/cache/yum / > $manifests/dir-manifest.txt
+%end
+
%include common-blacklist.ks
%post --nochroot
@@ -47,3 +58,27 @@ linux0=1 && /append / { append0=$0 }
mv $LIVE_ROOT/isolinux/isolinux.cfg.standalone $LIVE_ROOT/isolinux/isolinux.cfg
%end
+
+%post
+# Create post-image processing manifests
+manifests=/tmp/manifests
+mkdir -p $manifests
+rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}\n' | sort \
+ > $manifests/rpm-manifest-post.txt
+rpm -qa --qf '%{sourcerpm}\n' | sort -u > $manifests/srpm-manifest-post.txt
+du -akx --exclude=/var/cache/yum / > $manifests/file-manifest-post.txt
+du -x --exclude=/var/cache/yum / > $manifests/dir-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" > $manifests/ovirt-release
+tar -cvf ovirt-node-image-manifests-$ver-$rel.$arch.tar -C /tmp manifests
+rm -Rf $manifests
+%end
+
+%post --nochroot
+# Move manifest tar to build directory
+mv $INSTALL_ROOT/ovirt-node-image-manifests-*.tar .
+%end
+
--
1.6.0.3
More information about the ovirt-devel
mailing list