[node-patches] Change in ovirt-node[node-3.0]: spec: Only build igor plugin on Fedora

fabiand at fedoraproject.org fabiand at fedoraproject.org
Tue Apr 1 19:06:23 UTC 2014


Fabian Deutsch has uploaded a new change for review.

Change subject: spec: Only build igor plugin on Fedora
......................................................................

spec: Only build igor plugin on Fedora

Change-Id: I555a59a0537ce2e2687108f8f9a15d1b58007f76
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M ovirt-node.spec.in
1 file changed, 40 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/40/26340/1

diff --git a/ovirt-node.spec.in b/ovirt-node.spec.in
index 9d85e07..a9ee25b 100644
--- a/ovirt-node.spec.in
+++ b/ovirt-node.spec.in
@@ -11,6 +11,9 @@
 %define dracutdir %(test -e /usr/share/dracut && echo "/usr/share/dracut/modules.d" || echo "/usr/lib/dracut/modules.d")
 %define is_el6 %(test 0%{?centos} -eq 06 || test 0%{?rhel} -eq 06 && echo 1 || echo 0)
 
+# Igor can only be shipped on Fedora (because of python-uinput)
+%define with_igor 0%{?is_min_f19}
+
 
 Summary:        The %{product_family} daemons/scripts
 Name:           ovirt-node
@@ -298,11 +301,13 @@
 #
 # Igor service subpackage
 #
+%if 0%{?with_igor}
 %package plugin-igor-slave
 Summary:        Igor slave plugin for %{product_family}
 Group:          Applications/System
 
-%if %{is_systemd}
+Requires:       igor-common
+%if 0%{?is_systemd}
 BuildRequires:  systemd-units
 Requires:       systemd
 %else
@@ -320,7 +325,7 @@
 
 
 %post plugin-igor-slave
-%if %{is_systemd}
+%if 0%{?is_systemd}
 if [ $1 -eq 1 ] ; then
     # Initial installation
     /bin/systemctl daemon-reload >/dev/null 2>&1 || :
@@ -328,6 +333,24 @@
 fi
 %else
 /sbin/chkconfig --add ovirt-node-igor-slave >/dev/null 2>&1 || :
+%endif
+
+
+%preun plugin-igor-slave
+%if ! %{is_systemd}
+if [ $1 = 0 ] ; then
+    /sbin/service ovirt-node-igor-slave stop >/dev/null 2>&1
+    /sbin/chkconfig --del ovirt-node-igor-slave
+fi
+%else
+if [ $1 -eq 0 ] ; then
+    # Package removal, not upgrade
+    /bin/systemctl --no-reload disable ovirt-node-igor-slave.service > /dev/null 2>&1 || :
+    /bin/systemctl stop ovirt-node-igor-slave.service > /dev/null
+fi
+%endif
+
+# </Igor service subpackage>
 %endif
 
 
@@ -394,6 +417,12 @@
 
 /usr/sbin/hardlink -cv %{buildroot}%{_datadir}/selinux
 
+# Remove igor stuff if not needed
+%if ! 0%{?with_igor}
+rm -vf %{buildroot}/etc/rc.d/init.d/ovirt-node-igor-slave \
+       %{buildroot}/usr/libexec/ovirt-node-igor-slave
+%endif
+
 
 %clean
 %{__rm} -rf %{buildroot}
@@ -444,6 +473,13 @@
 rm -f /etc/system-release
 echo "%{product_family} release %{product_release}" > /etc/system-release
 
+# Remove igor stuff if not needed
+%if ! 0%{?with_igor}
+rm -v %{buildroot}/etc/rc.d/init.d/ovirt-node-igor-slave \
+      %{buildroot}/usr/libexec/ovirt-node-igor-slave
+%endif
+
+
 
 %preun
 /sbin/chkconfig --level 35 netconsole off
@@ -485,21 +521,6 @@
     # Package removal, not upgrade
     /bin/systemctl --no-reload disable ovirt-cim.service > /dev/null 2>&1 || :
     /bin/systemctl stop ovirt-cim.service > /dev/null
-fi
-%endif
-
-
-%preun plugin-igor-slave
-%if ! %{is_systemd}
-if [ $1 = 0 ] ; then
-    /sbin/service ovirt-node-igor-slave stop >/dev/null 2>&1
-    /sbin/chkconfig --del ovirt-node-igor-slave
-fi
-%else
-if [ $1 -eq 0 ] ; then
-    # Package removal, not upgrade
-    /bin/systemctl --no-reload disable ovirt-node-igor-slave.service > /dev/null 2>&1 || :
-    /bin/systemctl stop ovirt-node-igor-slave.service > /dev/null
 fi
 %endif
 
@@ -555,7 +576,7 @@
 %{_initrddir}/ovirt-cim
 %endif
 
-
+%if 0%{?with_igor}
 %files plugin-igor-slave
 %{_libexecdir}/ovirt-node-igor-slave
 %if %{is_systemd}
@@ -563,6 +584,7 @@
 %else
 %{_initrddir}/ovirt-node-igor-slave
 %endif
+%endif
 
 
 %files selinux


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

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



More information about the node-patches mailing list