[pki-kra] Bugzilla Bug #734590 - Refactor JNI libraries for Fedora 16+ . . . Bugzilla Bug #699809 - Convert CS

kwright kwright at fedoraproject.org
Tue Sep 13 08:54:01 UTC 2011


commit db52cdd94cc5d23603ed9ab0a0f3b371178b9713
Author: Kevin Wright <kwright at redhat.com>
Date:   Tue Sep 13 01:53:49 2011 -0700

    Bugzilla Bug #734590 - Refactor JNI libraries for Fedora 16+ . . .
    Bugzilla Bug #699809 - Convert CS to use systemd (alee)

 .gitignore   |    1 +
 clog         |   13 +---------
 pki-kra.spec |   70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 sources      |    2 +-
 4 files changed, 72 insertions(+), 14 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 270dfec..a83c0fc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@ pki-kra-1.3.4.tar.gz
 /pki-kra-9.0.2.tar.gz
 /pki-kra-9.0.3.tar.gz
 /pki-kra-9.0.4.tar.gz
+/pki-kra-9.0.7.tar.gz
diff --git a/clog b/clog
index c922727..77317ae 100644
--- a/clog
+++ b/clog
@@ -1,11 +1,2 @@
-Bugzilla Bug #693815 - /var/log/tomcat6/catalina.out owned by pkiuser
-(jdennis)
-Bugzilla Bug #699837 - service command is not fully backwards
-compatible with Dogtag pki subsystems (mharmsen)
-Bugzilla Bug #649910 - Console: an auditor or agent can be added to an
-administrator group. (jmagne)
-Bugzilla Bug #707416 - CC_LAB_EVAL: Security Domain: missing audit msgs
-for modify/add (alee)
-Bugzilla Bug #714068 - KRA: remove monitor servlet from kra (alee)
-Bugzilla Bug #669226 - Remove Legacy Build System (mharmsen)
-Updated release of 'jss'
+Bugzilla Bug #734590 - Refactor JNI libraries for Fedora 16+ . . .
+Bugzilla Bug #699809 - Convert CS to use systemd (alee)
diff --git a/pki-kra.spec b/pki-kra.spec
index ee7ec89..b0a0aa9 100644
--- a/pki-kra.spec
+++ b/pki-kra.spec
@@ -1,5 +1,5 @@
 Name:             pki-kra
-Version:          9.0.4
+Version:          9.0.7
 Release:          1%{?dist}
 Summary:          Certificate System - Data Recovery Manager
 URL:              http://pki.fedoraproject.org/
@@ -12,21 +12,35 @@ BuildRoot:        %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:    cmake
 BuildRequires:    java-devel >= 1:1.6.0
+%if 0%{?fedora} >= 16
+BuildRequires:    jpackage-utils >= 0:1.7.5-10
+%else
 BuildRequires:    jpackage-utils
+%endif
 BuildRequires:    jss >= 4.2.6-17
 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:
 #
@@ -94,7 +108,7 @@ Additionally, Certificate System requires ONE AND ONLY ONE of the following
 %build
 %{__mkdir_p} build
 cd build
-%cmake -DVAR_INSTALL_DIR:PATH=/var -DBUILD_PKI_KRA:BOOL=ON ..
+%cmake -DVAR_INSTALL_DIR:PATH=/var -DBUILD_PKI_KRA:BOOL=ON -DJAVA_LIB_INSTALL_DIR=%{_jnidir} ..
 %{__make} VERBOSE=1 %{?_smp_mflags}
 
 
@@ -117,7 +131,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%{?rhel} || 0%{?fedora} < 16
 %post
 # This adds the proper /etc/rc*.d links for the script
 /sbin/chkconfig --add pki-krad || :
@@ -134,12 +155,46 @@ fi
 if [ "$1" -ge "1" ] ; then
     /sbin/service pki-krad condrestart >/dev/null 2>&1 || :
 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 at .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
+    /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
+%if 0%{?fedora} >= 16
+%dir %{_sysconfdir}/systemd/system/pki-krad.target.wants
+%{_unitdir}/pki-krad at .service
+%{_unitdir}/pki-krad.target
+%else 
 %{_initrddir}/pki-krad
+%endif
 %{_javadir}/pki/pki-kra-%{version}.jar
 %{_javadir}/pki/pki-kra.jar
 %dir %{_datadir}/pki/kra
@@ -159,6 +214,17 @@ fi
 
 
 %changelog
+* Mon Sep 12 2011 Matthew Harmsen <mharmsen at 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 at redhat.com> 9.0.6-1
+- Bugzilla Bug #699809 - Convert CS to use systemd (alee)
+
+* Tue Aug 23 2011 Ade Lee <alee at redhat.com> 9.0.5-1
+- Bugzilla Bug #712931 - CS requires too many ports
+  to be open in the FW
+
 * Thu Jul 14 2011 Matthew Harmsen <mharmsen at redhat.com> 9.0.4-1
 - Bugzilla Bug #693815 - /var/log/tomcat6/catalina.out owned by pkiuser
   (jdennis)
diff --git a/sources b/sources
index 0678dbe..3c520f6 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-c7d8176f90cfea1d0c993ebb1848bd96  pki-kra-9.0.4.tar.gz
+503a674dd06c114c429fa0085ec54d79  pki-kra-9.0.7.tar.gz


More information about the scm-commits mailing list