From 7e20f33c006aba169e2fc86f7bb55197d84400a4 Mon Sep 17 00:00:00 2001 From: Endi Sukma Dewata Date: Mon, 6 May 2013 20:12:47 -0400 Subject: Fixed incorrect JNI_JAR_DIR. The JNI_JAR_DIR is supposed to be architecture-specific but the pki-base package is architecture-neutral. So, to ensure it has the correct value, the variable will be set at post installation. Also, to simplify the upgrade process, the variable has been moved from /etc/pki/pki.conf into /usr/share/pki/etc/pki.conf. The build, deployment, startup, and upgrade scripts have been modified accordingly. --- specs/pki-core.spec | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'specs') diff --git a/specs/pki-core.spec b/specs/pki-core.spec index 003981411..6b729dac1 100644 --- a/specs/pki-core.spec +++ b/specs/pki-core.spec @@ -5,7 +5,7 @@ distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} Name: pki-core Version: 10.0.2 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Certificate System - PKI Core Components URL: http://pki.fedoraproject.org/ License: GPLv2 @@ -500,15 +500,6 @@ cd build -DRESTEASY_LIB=/usr/share/java/resteasy-base \ %else -DRESTEASY_LIB=/usr/share/java/resteasy \ -%endif -%if 0%{?fedora} <= 18 -%ifarch x86_64 - -DJNI_JAR_DIR=/usr/lib64/java \ -%else - -DJNI_JAR_DIR=/usr/lib/java \ -%endif -%else - -DJNI_JAR_DIR=/usr/lib/java \ %endif %{?_without_javadoc:-DWITH_JAVADOC:BOOL=OFF} \ %if ! 0%{?rhel} && 0%{?fedora} <= 17 @@ -615,6 +606,17 @@ end %post -n pki-base +%if 0%{?fedora} <= 18 +if [ "`uname -i`" == "x86_64" ] +then + sed -i -e 's/^JNI_JAR_DIR=.*$/JNI_JAR_DIR=\/usr\/lib64\/java/' %{_datadir}/pki/etc/pki.conf +else + sed -i -e 's/^JNI_JAR_DIR=.*$/JNI_JAR_DIR=\/usr\/lib\/java/' %{_datadir}/pki/etc/pki.conf +fi +%else + sed -i -e 's/^JNI_JAR_DIR=.*$/JNI_JAR_DIR=\/usr\/lib\/java/' %{_datadir}/pki/etc/pki.conf +%endif + if [ $1 -eq 1 ] then # On RPM installation create system upgrade tracker @@ -623,6 +625,7 @@ then else # On RPM upgrade run system upgrade echo "Upgrading system at `/bin/date`." >> /var/log/pki/pki-upgrade-%{version}.log 2>&1 + /sbin/pki-upgrade --remove-tracker >> /var/log/pki/pki-upgrade-%{version}.log 2>&1 /sbin/pki-upgrade --silent >> /var/log/pki/pki-upgrade-%{version}.log 2>&1 echo >> /var/log/pki/pki-upgrade-%{version}.log 2>&1 fi @@ -1071,6 +1074,9 @@ fi %changelog +* Mon May 6 2013 Endi S. Dewata 10.0.2-5 +- Fixed incorrect JNI_JAR_DIR. + * Sat May 4 2013 Ade Lee 10.0.2-4 - TRAC Ticket 605 Junit internal function used in TestRunner, breaks F19 build -- cgit