[wallaby/f19] BZ850363

William Benton willb at fedoraproject.org
Thu Feb 13 13:37:39 UTC 2014


commit 9f931b845106d0857f1da1a00f21c7faefc1af16
Author: William Benton <willb at redhat.com>
Date:   Thu Feb 13 07:38:10 2014 -0600

    BZ850363

 0001-new-systemd-macros-BZ850363.patch |   76 ++++++++++++++++++++++++++++++++
 wallaby.spec                           |   36 ++++++---------
 2 files changed, 91 insertions(+), 21 deletions(-)
---
diff --git a/0001-new-systemd-macros-BZ850363.patch b/0001-new-systemd-macros-BZ850363.patch
new file mode 100644
index 0000000..cad1b2b
--- /dev/null
+++ b/0001-new-systemd-macros-BZ850363.patch
@@ -0,0 +1,76 @@
+From 635555319326e48d07d0dca8f9e7bc39c122a1af Mon Sep 17 00:00:00 2001
+From: William Benton <self at willbenton.com>
+Date: Thu, 13 Feb 2014 07:29:40 -0600
+Subject: [PATCH] new systemd macros; BZ850363
+
+---
+ wallaby.spec.in | 31 ++++++++++++-------------------
+ 1 file changed, 12 insertions(+), 19 deletions(-)
+
+diff --git a/wallaby.spec.in b/wallaby.spec.in
+index bf5f55c..35960a2 100644
+--- a/wallaby.spec.in
++++ b/wallaby.spec.in
+@@ -1,4 +1,4 @@
+-%if 0%{?fedora} >= 15
++%if 0%{?fedora} >= 18
+ %global want_systemd 1
+ %global wallaby_agent_environment sysconfig/wallaby-agent-env
+ %else
+@@ -70,10 +70,10 @@ Requires: ruby-rhubarb >= 0.4.3
+ Requires: ruby-wallaby = %{version}-%{release}
+ Requires: logrotate >= 0.3
+ %if %{want_systemd}
+-Requires(post): systemd-units
+-Requires(preun): systemd-units
+-Requires(postun): systemd-units
+-BuildRequires: systemd-units
++Requires(post): systemd
++Requires(preun): systemd
++Requires(postun): systemd
++BuildRequires: systemd
+ %else
+ Requires(post): chkconfig
+ Requires(preun): chkconfig
+@@ -233,24 +233,14 @@ exit 0
+ 
+ %if %{want_systemd}
+ %post
+-if [ $1 -eq 1 ] ; then 
+-    # Initial installation 
+-    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+-fi
++%systemd_post wallaby.service
+ 
+ %preun
+-if [ $1 -eq 0 ] ; then
+-    # Package removal, not upgrade
+-    /bin/systemctl --no-reload disable wallaby.service > /dev/null 2>&1 || :
+-    /bin/systemctl stop wallaby.service > /dev/null 2>&1 || :
+-fi
++%systemd_preun wallaby.service
+ 
+ %postun
+-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+-if [ $1 -ge 1 ] ; then
+-    # Package upgrade, not uninstall
+-    /bin/systemctl try-restart wallaby.service >/dev/null 2>&1 || :
+-fi
++%systemd_postun_with_restart wallaby.service
++
+ %else
+ %post
+ # This adds the proper /etc/rc*.d links for the script
+@@ -300,6 +290,9 @@ fi
+ 
+ %changelog
+ 
++* Thu Feb 13 2014 willb <willb at redhat> - 0.16.4-2
++- uses new-style systemd macros (BZ850363)
++
+ * Sat Oct 5 2013 willb <willb at redhat> - 0.16.4-1
+ - Fixes issues related to case-insensitivity of parameter names
+ - Fixes issues with inventory constraints on 32-bit systems
+-- 
+1.8.3.1
+
diff --git a/wallaby.spec b/wallaby.spec
index d047d9c..5c7a706 100644
--- a/wallaby.spec
+++ b/wallaby.spec
@@ -1,4 +1,4 @@
-%if 0%{?fedora} >= 15
+%if 0%{?fedora} >= 18
 %global want_systemd 1
 %global wallaby_agent_environment sysconfig/wallaby-agent-env
 %else
@@ -50,12 +50,12 @@
 Summary: HTCondor pool configuration service with QMF interface
 Name: wallaby
 Version: 0.16.4
-Release: 1%{?dist}
+Release: 2%{?dist}
 Group: Applications/System
 License: ASL 2.0
 URL: http://git.fedorahosted.org/git/grid/wallaby.git
 Source0: https://fedorahosted.org/releases/g/r/grid/%{name}-%{version}.tar.gz
-
+Patch0: 0001-new-systemd-macros-BZ850363.patch
 %if %{building_for_el5}
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 %endif
@@ -70,10 +70,10 @@ Requires: ruby-rhubarb >= 0.4.3
 Requires: ruby-wallaby = %{version}-%{release}
 Requires: logrotate >= 0.3
 %if %{want_systemd}
-Requires(post): systemd-units
-Requires(preun): systemd-units
-Requires(postun): systemd-units
-BuildRequires: systemd-units
+Requires(post): systemd
+Requires(preun): systemd
+Requires(postun): systemd
+BuildRequires: systemd
 %else
 Requires(post): chkconfig
 Requires(preun): chkconfig
@@ -152,6 +152,7 @@ Wallaby.
 %prep
 %setup -q
 
+%patch0 -p1
 %build
 
 sed 's/^export //' < etc/sysconfig/wallaby-agent > etc/sysconfig/wallaby-agent-env
@@ -232,24 +233,14 @@ exit 0
 
 %if %{want_systemd}
 %post
-if [ $1 -eq 1 ] ; then 
-    # Initial installation 
-    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
+%systemd_post wallaby.service
 
 %preun
-if [ $1 -eq 0 ] ; then
-    # Package removal, not upgrade
-    /bin/systemctl --no-reload disable wallaby.service > /dev/null 2>&1 || :
-    /bin/systemctl stop wallaby.service > /dev/null 2>&1 || :
-fi
+%systemd_preun wallaby.service
 
 %postun
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ] ; then
-    # Package upgrade, not uninstall
-    /bin/systemctl try-restart wallaby.service >/dev/null 2>&1 || :
-fi
+%systemd_postun_with_restart wallaby.service
+
 %else
 %post
 # This adds the proper /etc/rc*.d links for the script
@@ -299,6 +290,9 @@ fi
 
 %changelog
 
+* Thu Feb 13 2014 willb <willb at redhat> - 0.16.4-2
+- uses new-style systemd macros (BZ850363)
+
 * Sat Oct 5 2013 willb <willb at redhat> - 0.16.4-1
 - Fixes issues related to case-insensitivity of parameter names
 - Fixes issues with inventory constraints on 32-bit systems


More information about the scm-commits mailing list