[node-patches] Change in ovirt-node[master]: spec: Add minimizer subpackage

fabiand at fedoraproject.org fabiand at fedoraproject.org
Thu Mar 27 09:46:00 UTC 2014


Fabian Deutsch has uploaded a new change for review.

Change subject: spec: Add minimizer subpackage
......................................................................

spec: Add minimizer subpackage

This subpackage bundles the image-minimizer tool to make it available on
el6.

Change-Id: I1de0066fdc7bf5ca9c441f6a65b495eb73754c40
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M ovirt-node.spec.in
M tools/Makefile.am
M tools/edit-node
3 files changed, 33 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/44/26144/1

diff --git a/ovirt-node.spec.in b/ovirt-node.spec.in
index e5e12a4..dd9f6e0 100644
--- a/ovirt-node.spec.in
+++ b/ovirt-node.spec.in
@@ -15,6 +15,9 @@
 # Igor can only be shipped on Fedora (because of python-uinput)
 %define with_igor %{is_min_f19}
 
+# The minimizer is only bundled on el6, because it is available on Fedora
+%define with_minimizer %{is_el6}
+
 
 Summary:        The %{product_family} daemons/scripts
 Name:           ovirt-node
@@ -126,7 +129,7 @@
 %else
 Requires:       livecd-tools >= 1:16.0
 %endif
-Requires:       appliance-tools-minimizer
+Requires:       ovirt-node-minimizer
 Requires:       libselinux-python
 
 %define tools_root %{_datadir}/ovirt-node-tools
@@ -364,6 +367,24 @@
 %endif
 
 
+#
+# minimizer subpackage
+#
+%if {with_minimizer}
+%package minimizer
+Summary:        The image-minimizer tool
+Group:          Applications/System
+Obsoletes:      appliance-tools-minimizer
+
+
+%description minimizer
+This package ships the image-minimizer tool.
+This tool is used to remove unneeded rpms and files from a filesystem tree.
+
+# </minimizer subpackage>
+%endif
+
+
 %prep
 %setup -q
 
@@ -597,6 +618,12 @@
 %{_datadir}/selinux/*/%{selinux_modulename}.pp
 
 
+%if %{with_minimizer}
+%files minimizer
+%{_sbindir}/image-minimizer
+%endif
+
+
 %files
 %defattr(-,root,root)
 %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/default/ovirt
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 600353d..ddcb01a 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -17,7 +17,8 @@
 
 dist_sbin_SCRIPTS = \
   edit-node \
-  testable-node
+  testable-node \
+  image-minimizer
 
 EXTRA_DIST = \
   edit-node.8
diff --git a/tools/edit-node b/tools/edit-node
index 7c229d2..cb69fa3 100755
--- a/tools/edit-node
+++ b/tools/edit-node
@@ -1047,8 +1047,9 @@
 
     def _minimize(self):
         print "Running Minimizer"
-        minimizer = "/usr/bin/image-minimizer"
-        if os.path.exists(minimizer):
+        minimizer = "image-minimizer"
+        if (os.path.exists("/usr/bin/" + minimizer) or
+            os.path.exists("/usr/sbin/" + minimizer)):
             print glob.glob("%s/etc/ovirt-plugins.d/*.minimize"
                             % self._instroot)
             for f in glob.glob("%s/etc/ovirt-plugins.d/*.minimize"


-- 
To view, visit http://gerrit.ovirt.org/26144
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1de0066fdc7bf5ca9c441f6a65b495eb73754c40
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>



More information about the node-patches mailing list