diff options
author | mharmsen <mharmsen@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2011-09-13 05:48:46 +0000 |
---|---|---|
committer | mharmsen <mharmsen@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2011-09-13 05:48:46 +0000 |
commit | 3ae3ff74051159e8ee2e2708b83741f7342e08c2 (patch) | |
tree | 24e56b1cd08e70108c8bd17471abc02f887876aa | |
parent | 9eccf374c78ce34fd488792b3a1a82a2032bb162 (diff) | |
download | pki-3ae3ff74051159e8ee2e2708b83741f7342e08c2.tar.gz pki-3ae3ff74051159e8ee2e2708b83741f7342e08c2.tar.xz pki-3ae3ff74051159e8ee2e2708b83741f7342e08c2.zip |
Bugzilla Bug #699809 - Convert certificate system to use systemd (migration scripts)
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@2198 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
-rw-r--r-- | pki/specs/pki-core.spec | 20 | ||||
-rw-r--r-- | pki/specs/pki-kra.spec | 18 | ||||
-rw-r--r-- | pki/specs/pki-ocsp.spec | 16 | ||||
-rw-r--r-- | pki/specs/pki-tks.spec | 16 |
4 files changed, 65 insertions, 5 deletions
diff --git a/pki/specs/pki-core.spec b/pki/specs/pki-core.spec index a0422bd1f..4ec05d963 100644 --- a/pki/specs/pki-core.spec +++ b/pki/specs/pki-core.spec @@ -425,6 +425,10 @@ cd build cd build %{__make} install DESTDIR=%{buildroot} INSTALL="install -p" +%if 0%{?rhel} || 0%{?fedora} < 16 +%{__rm} %{buildroot}%{_bindir}/pkicontrol +%endif + cd %{buildroot}%{_libdir}/symkey %{__rm} symkey.jar %if 0%{?fedora} >= 16 @@ -483,7 +487,7 @@ if [ $1 = 0 ]; then %relabel targeted fi -%if 0%{?fedora} < 16 +%if 0%{?rhel} || 0%{?fedora} < 16 %post -n pki-ca # This adds the proper /etc/rc*.d links for the script /sbin/chkconfig --add pki-cad || : @@ -503,7 +507,20 @@ fi %else %post -n pki-ca +# Attempt to update ALL old "CA" instances to "systemd" +#for inst in `ls /etc/sysconfig/pki/ca`; do +# if [ ! -e "/etc/systemd/system/pki-cad.target.wants/pki-cad@${inst}.service" ]; then +# ln -s "/lib/systemd/system/pki-cad@.service" "/etc/systemd/system/pki-cad.target.wants/pki-cad@${inst}.service" +# [ -e /var/lib/${inst}/${inst} ] && unlink /var/lib/${inst}/${inst} +# ln -s /usr/sbin/tomcat6-sysd /var/lib/${inst}/${inst} +# echo "pkicreate.systemd.servicename=pki-cad@${inst}.service" >> /var/lib/${inst}/conf/CS.cfg +# fi +#done /bin/systemctl daemon-reload >/dev/null 2>&1 || : +# Attempt to restart ALL updated "CA" instances +#if [ $1 = 2 ] ; then +# /bin/systemctl try-restart pki-cad.target >/dev/null 2>&1 || : +#fi %preun -n pki-ca if [ $1 = 0 ] ; then @@ -681,6 +698,7 @@ fi - 'pki-selinux' - 'pki-ca' - Bugzilla Bug #734590 - Refactor JNI libraries for Fedora 16+ . . . +- Bugzilla Bug #699809 - Convert CS to use systemd (alee) - 'pki-silent' - Bugzilla Bug #734590 - Refactor JNI libraries for Fedora 16+ . . . diff --git a/pki/specs/pki-kra.spec b/pki/specs/pki-kra.spec index 59402b490..b0a0aa9d7 100644 --- a/pki/specs/pki-kra.spec +++ b/pki/specs/pki-kra.spec @@ -138,7 +138,7 @@ echo "D /var/run/pki/kra 0755 root root -" >> %{buildroot}%{_sysconfdir}/tmpfil %{__rm} -rf %{buildroot}%{_unitdir} %endif -%if 0%{?fedora} < 16 +%if 0%{?rhel} || 0%{?fedora} < 16 %post # This adds the proper /etc/rc*.d links for the script /sbin/chkconfig --add pki-krad || : @@ -157,7 +157,20 @@ if [ "$1" -ge "1" ] ; then fi %else %post +# Attempt to update ALL old "KRA" instances to "systemd" +#for inst in `ls /etc/sysconfig/pki/kra`; do +# if [ ! -e "/etc/systemd/system/pki-krad.target.wants/pki-krad@${inst}.service" ]; then +# ln -s "/lib/systemd/system/pki-krad@.service" "/etc/systemd/system/pki-krad.target.wants/pki-krad@${inst}.service" +# [ -e /var/lib/${inst}/${inst} ] && unlink /var/lib/${inst}/${inst} +# ln -s /usr/sbin/tomcat6-sysd /var/lib/${inst}/${inst} +# echo "pkicreate.systemd.servicename=pki-krad@${inst}.service" >> /var/lib/${inst}/conf/CS.cfg +# fi +#done /bin/systemctl daemon-reload >/dev/null 2>&1 || : +# Attempt to restart ALL updated "KRA" instances +#if [ $1 = 2 ] ; then +# /bin/systemctl try-restart pki-krad.target >/dev/null 2>&1 || : +#fi %preun if [ $1 = 0 ] ; then @@ -180,7 +193,7 @@ fi %{_unitdir}/pki-krad@.service %{_unitdir}/pki-krad.target %else -%{_initrddir}/pki-cad +%{_initrddir}/pki-krad %endif %{_javadir}/pki/pki-kra-%{version}.jar %{_javadir}/pki/pki-kra.jar @@ -203,6 +216,7 @@ fi %changelog * Mon Sep 12 2011 Matthew Harmsen <mharmsen@redhat.com> 9.0.7-1 - Bugzilla Bug #734590 - Refactor JNI libraries for Fedora 16+ . . . +- Bugzilla Bug #699809 - Convert CS to use systemd (alee) * Tue Sep 6 2011 Ade Lee <alee@redhat.com> 9.0.6-1 - Bugzilla Bug #699809 - Convert CS to use systemd (alee) diff --git a/pki/specs/pki-ocsp.spec b/pki/specs/pki-ocsp.spec index a056c689b..9693a780f 100644 --- a/pki/specs/pki-ocsp.spec +++ b/pki/specs/pki-ocsp.spec @@ -146,7 +146,7 @@ echo "D /var/run/pki/ocsp 0755 root root -" >> %{buildroot}%{_sysconfdir}/tmpfi %{__rm} -rf %{buildroot}%{_unitdir} %endif -%if 0%{?fedora} < 16 +%if 0%{?rhel} || 0%{?fedora} < 16 %post # This adds the proper /etc/rc*.d links for the script /sbin/chkconfig --add pki-ocspd || : @@ -166,7 +166,20 @@ fi %else %post +# Attempt to update ALL old "OCSP" instances to "systemd" +#for inst in `ls /etc/sysconfig/pki/ocsp`; do +# if [ ! -e "/etc/systemd/system/pki-ocspd.target.wants/pki-ocspd@${inst}.service" ]; then +# ln -s "/lib/systemd/system/pki-ocspd@.service" "/etc/systemd/system/pki-ocspd.target.wants/pki-ocspd@${inst}.service" +# [ -e /var/lib/${inst}/${inst} ] && unlink /var/lib/${inst}/${inst} +# ln -s /usr/sbin/tomcat6-sysd /var/lib/${inst}/${inst} +# echo "pkicreate.systemd.servicename=pki-ocspd@${inst}.service" >> /var/lib/${inst}/conf/CS.cfg +# fi +#done /bin/systemctl daemon-reload >/dev/null 2>&1 || : +# Attempt to restart ALL updated "OCSP" instances +#if [ $1 = 2 ] ; then +# /bin/systemctl try-restart pki-ocspd.target >/dev/null 2>&1 || : +#fi %preun if [ $1 = 0 ] ; then @@ -214,6 +227,7 @@ fi %changelog * Mon Sep 12 2011 Matthew Harmsen <mharmsen@redhat.com> 9.0.6-1 - Bugzilla Bug #734590 - Refactor JNI libraries for Fedora 16+ . . . +- Bugzilla Bug #699809 - Convert CS to use systemd (alee) * Tue Sep 6 2011 Ade Lee <alee@redhat.com> 9.0.5-1 - Bugzilla Bug #699809 - Convert CS to use systemd (alee) diff --git a/pki/specs/pki-tks.spec b/pki/specs/pki-tks.spec index 8aee0d624..7c151bce3 100644 --- a/pki/specs/pki-tks.spec +++ b/pki/specs/pki-tks.spec @@ -139,7 +139,7 @@ echo "D /var/run/pki/tks 0755 root root -" >> %{buildroot}%{_sysconfdir}/tmpfil %{__rm} -rf %{buildroot}%{_unitdir} %endif -%if 0%{?fedora} < 16 +%if 0%{?rhel} || 0%{?fedora} < 16 %post # This adds the proper /etc/rc*.d links for the script /sbin/chkconfig --add pki-tksd || : @@ -156,7 +156,20 @@ if [ "$1" -ge "1" ] ; then fi %else %post +# Attempt to update ALL old "TKS" instances to "systemd" +#for inst in `ls /etc/sysconfig/pki/tks`; do +# if [ ! -e "/etc/systemd/system/pki-tksd.target.wants/pki-tksd@${inst}.service" ]; then +# ln -s "/lib/systemd/system/pki-tksd@.service" "/etc/systemd/system/pki-tksd.target.wants/pki-tksd@${inst}.service" +# [ -e /var/lib/${inst}/${inst} ] && unlink /var/lib/${inst}/${inst} +# ln -s /usr/sbin/tomcat6-sysd /var/lib/${inst}/${inst} +# echo "pkicreate.systemd.servicename=pki-tksd@${inst}.service" >> /var/lib/${inst}/conf/CS.cfg +# fi +#done /bin/systemctl daemon-reload >/dev/null 2>&1 || : +# Attempt to restart ALL updated "TKS" instances +#if [ $1 = 2 ] ; then +# /bin/systemctl try-restart pki-tksd.target >/dev/null 2>&1 || : +#fi %preun if [ $1 = 0 ] ; then @@ -203,6 +216,7 @@ fi %changelog * Mon Sep 12 2011 Matthew Harmsen <mharmsen@redhat.com> 9.0.6-1 - Bugzilla Bug #734590 - Refactor JNI libraries for Fedora 16+ . . . +- Bugzilla Bug #699809 - Convert CS to use systemd (alee) * Tue Sep 6 2011 Ade Lee <alee@redhat.com> 9.0.5-1 - Bugzilla Bug #699809 - Convert CS to use systemd |