diff --git a/ocspd.spec b/ocspd.spec index d384ac5..61bfacc 100644 --- a/ocspd.spec +++ b/ocspd.spec @@ -4,7 +4,7 @@ Name: ocspd Version: 1.5.1 -Release: 0.11.%{alphatag}%{?dist} +Release: 0.12.%{alphatag}%{?dist} Summary: OpenCA OCSP Daemon License: ASL 1.0 Group: System Environment/Daemons @@ -18,10 +18,10 @@ URL: http://www.openca.org/projects/ocspd Obsoletes: openca-ocspd <= %{version}-%{release} Provides: openca-ocspd = %{version}-%{release} Requires(pre): shadow-utils -Requires(post): systemd-units +Requires(post): systemd Requires(post): systemd-sysv -Requires(preun):systemd-units -Requires(postun):systemd-units +Requires(preun):systemd +Requires(postun):systemd BuildRequires: openssl-devel BuildRequires: openldap-devel BuildRequires: automake autoconf @@ -106,33 +106,21 @@ exit 0 %post #------------------------------------------------------------------------------- -if [ "${1}" = "1" ] -then # Initial installation. - /bin/systemctl daemon-reload > /dev/null 2>&1 || : -fi +%systemd_post ocspd.service #------------------------------------------------------------------------------- %preun #------------------------------------------------------------------------------- -if [ "${1}" = "0" ] -then # Package removal, not upgrade. - /bin/systemctl --no-reload disable ocspd.service > /dev/null 2>&1 || : - /bin/systemctl stop ocspd.service > /dev/null 2>&1 || : -fi +%systemd_preun ocspd.service #------------------------------------------------------------------------------- %postun #------------------------------------------------------------------------------- -/bin/systemctl daemon-reload > /dev/null 2>&1 || : - -if [ "${1}" -gt "0" ] -then # Package upgrade, not uninstall. - /bin/systemctl try-restart ocspd.service > /dev/null 2>&1 || : -fi +%systemd_postun_with_restart ocspd.service #------------------------------------------------------------------------------- @@ -162,14 +150,18 @@ fi #------------------------------------------------------------------------------- %changelog +#------------------------------------------------------------------------------- + +* Fri Nov 16 2012 Patrick Monnerat 1.5.1-0.12.rc1 +- Use new systemd scriptlet macros. + https://bugzilla.redhat.com/show_bug.cgi?id=850238 + * Fri Jul 20 2012 Fedora Release Engineering - 1.5.1-0.11.rc1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Fri Jan 13 2012 Fedora Release Engineering - 1.5.1-0.10.rc1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild -#------------------------------------------------------------------------------- - * Tue Jul 12 2011 Patrick Monnerat 1.5.1-0.9.rc1 - Migration from SysV daemon handling to systemd (BZ# 720521).