summaryrefslogtreecommitdiffstats
path: root/pki/specs
diff options
context:
space:
mode:
authorvakwetu <vakwetu@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2011-09-09 20:42:46 +0000
committervakwetu <vakwetu@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2011-09-09 20:42:46 +0000
commit78a301689d984401ad7098049ddb2f6e5504d957 (patch)
treea5d9b21416785e6558300001a3c8dafece76c8a3 /pki/specs
parent4ee4f5ae0e627ab89499844f95f0bc4b8cd4cd2e (diff)
downloadpki-78a301689d984401ad7098049ddb2f6e5504d957.tar.gz
pki-78a301689d984401ad7098049ddb2f6e5504d957.tar.xz
pki-78a301689d984401ad7098049ddb2f6e5504d957.zip
Bugzilla BZ# 699809 - Convert certificate system to use systemd
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@2196 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/specs')
-rw-r--r--pki/specs/pki-core.spec63
-rw-r--r--pki/specs/pki-kra.spec45
-rw-r--r--pki/specs/pki-ocsp.spec47
-rw-r--r--pki/specs/pki-tks.spec46
4 files changed, 189 insertions, 12 deletions
diff --git a/pki/specs/pki-core.spec b/pki/specs/pki-core.spec
index 3547e8abd..eaf0ee232 100644
--- a/pki/specs/pki-core.spec
+++ b/pki/specs/pki-core.spec
@@ -1,5 +1,5 @@
Name: pki-core
-Version: 9.0.12
+Version: 9.0.13
Release: 1%{?dist}
Summary: Certificate System - PKI Core Components
URL: http://pki.fedoraproject.org/
@@ -32,6 +32,9 @@ BuildRequires: tomcatjss >= 2.0.0
BuildRequires: velocity
BuildRequires: xalan-j2
BuildRequires: xerces-j2
+%if 0%{?fedora} >= 16
+BuildRequires: systemd-units
+%endif
Source0: http://pki.fedoraproject.org/pki/sources/%{name}/%{name}-%{version}.tar.gz
@@ -323,10 +326,17 @@ Requires: java >= 1:1.6.0
Requires: pki-ca-theme >= 9.0.0
Requires: pki-common = %{version}-%{release}
Requires: pki-selinux = %{version}-%{release}
+%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:
#
@@ -420,6 +430,13 @@ echo "D /var/run/pki 0755 root root -" >> %{buildroot}%{_sysconfdir}/tmpfile
echo "D /var/run/pki/ca 0755 root root -" >> %{buildroot}%{_sysconfdir}/tmpfiles.d/pki-ca.conf
%endif
+%if 0%{?fedora} >= 16
+%{__rm} %{buildroot}%{_initrddir}/pki-cad
+%else
+%{__rm} -rf %{buildroot}%{_sysconfdir}/systemd/system/pki-cad.target.wants
+%{__rm} -rf %{buildroot}%{_unitdir}
+%endif
+
%pre -n pki-selinux
%saveFileContext targeted
@@ -442,8 +459,8 @@ if [ $1 = 0 ]; then
%relabel targeted
fi
-
-%post -n pki-ca
+%if 0%{?fedora} < 16
+%post -n pki-ca
# This adds the proper /etc/rc*.d links for the script
/sbin/chkconfig --add pki-cad || :
@@ -460,6 +477,24 @@ if [ "$1" -ge "1" ] ; then
/sbin/service pki-cad condrestart >/dev/null 2>&1 || :
fi
+%else
+%post -n pki-ca
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+
+%preun -n pki-ca
+if [ $1 = 0 ] ; then
+ /bin/systemctl --no-reload disable pki-cad.target > /dev/null 2>&1 || :
+ /bin/systemctl stop pki-cad.target > /dev/null 2>&1 || :
+fi
+
+
+%postun -n pki-ca
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ "$1" -ge "1" ] ; then
+ /bin/systemctl try-restart pki-cad.target >/dev/null 2>&1 || :
+fi
+%endif
+
%files -n pki-setup
%defattr(-,root,root,-)
@@ -469,8 +504,13 @@ fi
%dir %{_datadir}/pki
%dir %{_datadir}/pki/scripts
%{_datadir}/pki/scripts/pkicommon.pm
+%{_datadir}/pki/scripts/functions
+%{_datadir}/pki/scripts/pki_apache_initscript
%dir %{_localstatedir}/lock/pki
%dir %{_localstatedir}/run/pki
+%if 0%{?fedora} >= 16
+%{_bindir}/pkicontrol
+%endif
%files -n pki-symkey
@@ -479,7 +519,6 @@ fi
%{_jnidir}/symkey.jar
%{_libdir}/symkey/
-
%files -n pki-native-tools
%defattr(-,root,root,-)
%doc base/native-tools/LICENSE base/native-tools/doc/README
@@ -549,8 +588,6 @@ fi
%{_javadir}/pki/pki-cmsbundle.jar
%{_javadir}/pki/pki-cmscore-%{version}.jar
%{_javadir}/pki/pki-cmscore.jar
-%{_datadir}/pki/scripts/functions
-%{_datadir}/pki/scripts/pki_apache_initscript
%{_datadir}/pki/setup/
%files -n pki-common-javadoc
@@ -567,7 +604,13 @@ fi
%files -n pki-ca
%defattr(-,root,root,-)
%doc base/ca/LICENSE
+%if 0%{?fedora} >= 16
+%dir %{_sysconfdir}/systemd/system/pki-cad.target.wants
+%{_unitdir}/pki-cad@.service
+%{_unitdir}/pki-cad.target
+%else
%{_initrddir}/pki-cad
+%endif
%{_javadir}/pki/pki-ca-%{version}.jar
%{_javadir}/pki/pki-ca.jar
%dir %{_datadir}/pki/ca
@@ -599,6 +642,14 @@ fi
%changelog
+* Tue Sep 6 2011 Ade Lee <alee@redhat.com> 9.0.13-1
+- 'pki-setup'
+- Bugzilla Bug #699809 - Convert CS to use systemd (alee)
+- 'pki-ca'
+- Bugzilla Bug #699809 - Convert CS to use systemd (alee)
+- 'pki-common'
+- Bugzilla Bug #699809 - Convert CS to use systemd (alee)
+
* Tue Aug 23 2011 Matthew Harmsen <mharmsen@redhat.com> 9.0.12-1
- 'pki-setup'
- Bugzilla Bug #712931 - CS requires too many ports
diff --git a/pki/specs/pki-kra.spec b/pki/specs/pki-kra.spec
index ea79c29f2..ef8c2c434 100644
--- a/pki/specs/pki-kra.spec
+++ b/pki/specs/pki-kra.spec
@@ -1,5 +1,5 @@
Name: pki-kra
-Version: 9.0.5
+Version: 9.0.6
Release: 1%{?dist}
Summary: Certificate System - Data Recovery Manager
URL: http://pki.fedoraproject.org/
@@ -18,15 +18,25 @@ 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-kra-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:
#
@@ -117,7 +127,14 @@ echo "D /var/run/pki 0755 root root -" >> %{buildroot}%{_sysconfdir}/tmpfil
echo "D /var/run/pki/kra 0755 root root -" >> %{buildroot}%{_sysconfdir}/tmpfiles.d/pki-kra.conf
%endif
+%if 0%{?fedora} >= 16
+%{__rm} %{buildroot}%{_initrddir}/pki-krad
+%else
+%{__rm} -rf %{buildroot}%{_sysconfdir}/systemd/system/pki-krad.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-krad || :
@@ -134,12 +151,33 @@ fi
if [ "$1" -ge "1" ] ; then
/sbin/service pki-krad 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-krad.target > /dev/null 2>&1 || :
+ /bin/systemctl stop pki-krad.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-krad.target >/dev/null 2>&1 || :
+fi
+%endif
%files
%defattr(-,root,root,-)
%doc base/kra/LICENSE
-%{_initrddir}/pki-krad
+%if 0%{?fedora} >= 16
+%dir %{_sysconfdir}/systemd/system/pki-krad.target.wants
+%{_unitdir}/pki-krad@.service
+%{_unitdir}/pki-krad.target
+%else
+%{_initrddir}/pki-cad
+%endif
%{_javadir}/pki/pki-kra-%{version}.jar
%{_javadir}/pki/pki-kra.jar
%dir %{_datadir}/pki/kra
@@ -159,6 +197,9 @@ fi
%changelog
+* Tue Sep 6 2011 Ade Lee <alee@redhat.com> 9.0.6-1
+- Bugzilla Bug #699809 - Convert CS to use systemd (alee)
+
* Tue Aug 23 2011 Ade Lee <alee@redhat.com> 9.0.5-1
- Bugzilla Bug #712931 - CS requires too many ports
to be open in the FW
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
diff --git a/pki/specs/pki-tks.spec b/pki/specs/pki-tks.spec
index b5eb11cdd..3001b5c53 100644
--- a/pki/specs/pki-tks.spec
+++ b/pki/specs/pki-tks.spec
@@ -1,5 +1,5 @@
Name: pki-tks
-Version: 9.0.4
+Version: 9.0.5
Release: 1%{?dist}
Summary: Certificate System - Token Key Service
URL: http://pki.fedoraproject.org/
@@ -18,15 +18,25 @@ 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-selinux
Requires: pki-tks-theme
+%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:
#
@@ -118,29 +128,56 @@ echo "D /var/run/pki 0755 root root -" >> %{buildroot}%{_sysconfdir}/tmpfil
echo "D /var/run/pki/tks 0755 root root -" >> %{buildroot}%{_sysconfdir}/tmpfiles.d/pki-tks.conf
%endif
+%if 0%{?fedora} >= 16
+%{__rm} %{buildroot}%{_initrddir}/pki-tksd
+%else
+%{__rm} -rf %{buildroot}%{_sysconfdir}/systemd/system/pki-tksd.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-tksd || :
-
%preun
if [ $1 = 0 ] ; then
/sbin/service pki-tksd stop >/dev/null 2>&1
/sbin/chkconfig --del pki-tksd || :
fi
-
%postun
if [ "$1" -ge "1" ] ; then
/sbin/service pki-tksd 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-tksd.target > /dev/null 2>&1 || :
+ /bin/systemctl stop pki-tksd.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-tksd.target >/dev/null 2>&1 || :
+fi
+%endif
%files
%defattr(-,root,root,-)
%doc base/tks/LICENSE
+%if 0%{?fedora} >= 16
+%dir %{_sysconfdir}/systemd/system/pki-tksd.target.wants
+%{_unitdir}/pki-tksd@.service
+%{_unitdir}/pki-tksd.target
+%else
%{_initrddir}/pki-tksd
+%endif
%{_javadir}/pki/pki-tks-%{version}.jar
%{_javadir}/pki/pki-tks.jar
%dir %{_datadir}/pki/tks
@@ -160,6 +197,9 @@ fi
%changelog
+* Tue Sep 6 2011 Ade Lee <alee@redhat.com> 9.0.5-1
+- Bugzilla Bug #699809 - Convert CS to use systemd
+
* 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