summaryrefslogtreecommitdiffstats
path: root/pki/specs/pki-ocsp.spec
diff options
context:
space:
mode:
Diffstat (limited to 'pki/specs/pki-ocsp.spec')
-rw-r--r--pki/specs/pki-ocsp.spec47
1 files changed, 46 insertions, 1 deletions
diff --git a/pki/specs/pki-ocsp.spec b/pki/specs/pki-ocsp.spec
index c72511dce..3467d042a 100644
--- a/pki/specs/pki-ocsp.spec
+++ b/pki/specs/pki-ocsp.spec
@@ -1,5 +1,5 @@
Name: pki-ocsp
-Version: 9.0.4
+Version: 9.0.5
Release: 1%{?dist}
Summary: Certificate System - Online Certificate Status Protocol Manager
URL: http://pki.fedoraproject.org/
@@ -18,15 +18,26 @@ BuildRequires: nspr-devel
BuildRequires: nss-devel
BuildRequires: pki-common
BuildRequires: pki-util
+%if 0%{?fedora} >= 16
+BuildRequires: systemd-units
+%endif
Requires: java >= 1:1.6.0
Requires: pki-common
Requires: pki-ocsp-theme
Requires: pki-selinux
+
+%if 0%{?fedora} >= 16
+Requires(post): systemd-units
+Requires(preun): systemd-units
+Requires(postun): systemd-units
+%else
Requires(post): chkconfig
Requires(preun): chkconfig
Requires(preun): initscripts
Requires(postun): initscripts
+%endif
+
%if 0%{?fedora} >= 15
# Details:
#
@@ -124,7 +135,14 @@ echo "D /var/run/pki 0755 root root -" >> %{buildroot}%{_sysconfdir}/tmpfi
echo "D /var/run/pki/ocsp 0755 root root -" >> %{buildroot}%{_sysconfdir}/tmpfiles.d/pki-ocsp.conf
%endif
+%if 0%{?fedora} >= 16
+%{__rm} %{buildroot}%{_initrddir}/pki-ocspd
+%else
+%{__rm} -rf %{buildroot}%{_sysconfdir}/systemd/system/pki-ocspd.target.wants
+%{__rm} -rf %{buildroot}%{_unitdir}
+%endif
+%if 0%{?fedora} < 16
%post
# This adds the proper /etc/rc*.d links for the script
/sbin/chkconfig --add pki-ocspd || :
@@ -142,11 +160,35 @@ if [ "$1" -ge "1" ] ; then
/sbin/service pki-ocspd condrestart >/dev/null 2>&1 || :
fi
+%else
+%post
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+
+%preun
+if [ $1 = 0 ] ; then
+ /bin/systemctl --no-reload disable pki-ocspd.target > /dev/null 2>&1 || :
+ /bin/systemctl stop pki-ocspd.target > /dev/null 2>&1 || :
+fi
+
+
+%postun
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ "$1" -ge "1" ] ; then
+ /bin/systemctl try-restart pki-ocspd.target >/dev/null 2>&1 || :
+fi
+%endif
+
%files
%defattr(-,root,root,-)
%doc base/ocsp/LICENSE
+%if 0%{?fedora} >= 16
+%dir %{_sysconfdir}/systemd/system/pki-ocspd.target.wants
+%{_unitdir}/pki-ocspd@.service
+%{_unitdir}/pki-ocspd.target
+%else
%{_initrddir}/pki-ocspd
+%endif
%{_javadir}/pki/pki-ocsp-%{version}.jar
%{_javadir}/pki/pki-ocsp.jar
%dir %{_datadir}/pki/ocsp
@@ -166,6 +208,9 @@ fi
%changelog
+* Tue Sep 6 2011 Ade Lee <alee@redhat.com> 9.0.5-1
+- Bugzilla Bug #699809 - Convert CS to use systemd (alee)
+
* Tue Aug 23 2011 Ade Lee <alee@redhat.com> 9.0.4-1
- Bugzilla Bug #712931 - CS requires too many ports
to be open in the FW