Alon Bar-Lev has uploaded a new change for review.

Change subject: packaging: engine-service: fix systemd packaging per fedora 
requirements
......................................................................

packaging: engine-service: fix systemd packaging per fedora requirements

Change-Id: I84d290d2cc389450be183cd85fb91ee1e58e4e9a
Signed-off-by: Alon Bar-Lev <[email protected]>
---
M packaging/fedora/spec/ovirt-engine.spec.in
1 file changed, 28 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/47/13647/1

diff --git a/packaging/fedora/spec/ovirt-engine.spec.in 
b/packaging/fedora/spec/ovirt-engine.spec.in
index e84d507..258451f 100644
--- a/packaging/fedora/spec/ovirt-engine.spec.in
+++ b/packaging/fedora/spec/ovirt-engine.spec.in
@@ -145,6 +145,10 @@
 # Require JBoss AS 7:
 Requires: jboss-as >= 7.1.1-9.3
 
+%if %{install_systemd}
+BuildRequires: systemd
+%endif
+
 # We can't require exactly the same version and release of the
 # setup package because it needs to be updated independely as part
 # of the update process implemented in the engine-upgrade script:
@@ -183,6 +187,12 @@
 Requires: java
 Requires: openssh
 Requires: openssl
+
+%if %{install_systemd}
+Requires(post): systemd
+Requires(preun): systemd
+Requires(postun): systemd
+%endif
 
 
 %description backend
@@ -377,6 +387,12 @@
 fi
 
 
+%preun backend
+%if %{install_systemd}
+%systemd_preun ovirt-engine.service
+%endif
+
+
 %postun
 if [ "$1" -eq 0 ]
 then
@@ -388,6 +404,12 @@
         sed -i '/%{name}/d' %{_sysconfdir}/yum/pluginconf.d/versionlock.list
     fi
 fi
+
+
+%postun backend
+%if %{install_systemd}
+%systemd_postun ovirt-engine.service
+%endif
 
 
 %pre
@@ -406,6 +428,12 @@
 %create_engine_user
 
 
+%post backend
+%if %{install_systemd}
+%systemd_post ovirt-engine.service
+%endif
+
+
 %files
 
 # The main package owns most of the directories:


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I84d290d2cc389450be183cd85fb91ee1e58e4e9a
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to