[oddjob] update to 0.31.3

Nalin Dahyabhai nalin at fedoraproject.org
Thu Jan 17 22:00:21 UTC 2013


commit 82d11d1e54b5ab8d1c08650db8bb6f87f5401178
Author: Nalin Dahyabhai <nalin at redhat.com>
Date:   Thu Jan 17 16:59:26 2013 -0500

    update to 0.31.3

 .gitignore  |    2 +
 oddjob.spec |   71 ++++++++++++++++++++++++++++++++++++++++++++---------------
 sources     |    4 +-
 3 files changed, 57 insertions(+), 20 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 2081e58..f723a7b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,5 @@ oddjob-0.30.1.tar.gz
 /oddjob-0.31.1.tar.gz
 /oddjob-0.31.2.tar.gz
 /oddjob-0.31.2.tar.gz.sig
+/oddjob-0.31.3.tar.gz
+/oddjob-0.31.3.tar.gz.sig
diff --git a/oddjob.spec b/oddjob.spec
index 4d40887..b13154f 100644
--- a/oddjob.spec
+++ b/oddjob.spec
@@ -1,10 +1,14 @@
 %global build_sample_subpackage 0
 %global dbus_send /bin/dbus-send
-%if 0%{?fedora} > 17 || 0%{?rhel} > 6
+
+%if 0%{?fedora} > 18 || 0%{?rhel} > 6
 %global systemd 1
+%global sysvinit 0
 %else
 %global systemd 0
+%global sysvinit 1
 %endif
+
 %if 0%{?fedora} > 16 || 0%{?rhel} > 6
 %global separate_usr 0
 %else
@@ -12,9 +16,10 @@
 %endif
 
 Name: oddjob
-Version: 0.31.2
-Release: 3%{?dist}
-Source: http://fedorahosted.org/released/oddjob/oddjob-%{version}.tar.gz
+Version: 0.31.3
+Release: 1%{?dist}
+Source0: http://fedorahosted.org/released/oddjob/oddjob-%{version}.tar.gz
+Source1: http://fedorahosted.org/released/oddjob/oddjob-%{version}.tar.gz.sig
 Summary: A D-Bus service which runs odd jobs on behalf of client applications
 License: BSD
 Group: System Environment/Daemons
@@ -40,6 +45,20 @@ Requires(post): psmisc
 Obsoletes: oddjob-devel < 0.30, oddjob-libs < 0.30, oddjob-python < 0.30
 URL: http://www.fedorahosted.org/oddjob
 
+%if %{systemd}
+BuildRequires:  systemd-units
+Requires(post): systemd-units
+Requires(preun): systemd-units
+Requires(postun): systemd-units
+Requires(post): systemd-sysv
+%endif
+
+%if %{sysvinit}
+Requires(post): /sbin/chkconfig, /sbin/service
+Requires(preun): /sbin/chkconfig, /sbin/service
+%endif
+
+
 %description
 oddjob is a D-Bus service which performs particular tasks for clients which
 connect to it and issue requests using the system-wide message bus.
@@ -167,34 +186,47 @@ if test $1 -eq 1 ; then
 	killall -HUP dbus-daemon 2>&1 > /dev/null
 fi
 %if %{systemd}
-if test $1 -eq 1 ; then
-	/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
-%else
+%systemd_post oddjobd.service
+%endif
+%if %{sysvinit}
 /sbin/chkconfig --add oddjobd
 %endif
 
 %postun
-if [ $1 -gt 0 ] ; then
 %if %{systemd}
-	/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-	/bin/systemctl try-restart oddjobd.service >/dev/null 2>&1 || :
-%else
-	/sbin/service oddjobd condrestart 2>&1 > /dev/null || :
+%systemd_postun oddjobd.service
 %endif
+%if %{sysvinit}
+if [ $1 -gt 0 ] ; then
+	/sbin/service oddjobd condrestart 2>&1 > /dev/null || :
 fi
+%endif
 exit 0
 
 %preun
-if [ $1 -eq 0 ] ; then
 %if %{systemd}
-	/bin/systemctl --no-reload disable oddjob.service > /dev/null 2>&1 || :
-	/bin/systemctl stop oddjob.service > /dev/null 2>&1 || :
-%else
+%systemd_preun oddjobd.service
+%endif
+%if %{sysvinit}
+if [ $1 -eq 0 ] ; then
 	/sbin/service oddjobd stop > /dev/null 2>&1
 	/sbin/chkconfig --del oddjobd
-%endif
 fi
+%endif
+exit 0
+
+%if %{systemd}
+%triggerun -- oddjobd < 0.31.3
+# Save the current service runlevel info, in case the user wants to apply
+# the enabled status manually later, by running
+#   "systemd-sysv-convert --apply oddjobd".
+%{_bindir}/systemd-sysv-convert --save oddjobd >/dev/null 2>&1 ||:
+# Do this because the old package's %%postun doesn't know we need to do it.
+/sbin/chkconfig --del oddjobd >/dev/null 2>&1 || :
+# Do this because the old package's %%postun wouldn't have tried.
+/bin/systemctl try-restart oddjobd.service >/dev/null 2>&1 || :
+exit 0
+%endif
 
 %post mkhomedir
 # Adjust older configuration files that may have been modified so that they
@@ -212,6 +244,9 @@ fi
 exit 0
 
 %changelog
+* Thu Jan 17 2013 Nalin Dahyabhai <nalin at redhat.com> 0.31.3-1
+- use newer systemd macros (#857375)
+
 * Wed Nov 21 2012 Nalin Dahyabhai <nalin at redhat.com> 0.31.2-3
 - add that dependency to the right subpackage
 
diff --git a/sources b/sources
index 106d758..27b4cc0 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-41b5fa6cd0220371a63f212b04d1ca92  oddjob-0.31.2.tar.gz
-bd3ae9a5007f0c9141b49c116b88b6cd  oddjob-0.31.2.tar.gz.sig
+3026931d37f414c30a71702f54a77d14  oddjob-0.31.3.tar.gz
+1d432202730ab463082f985f4cdc1d8d  oddjob-0.31.3.tar.gz.sig


More information about the scm-commits mailing list