From fc96c05922d1a42d0fbaaa02a67a31e69c667f84 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Thu, 16 Jun 2016 17:23:22 -0500 Subject: Fixed Java dependency. The code has been modified to use the JAVA_HOME path specified in the pki.conf. The spec file has been modified to depend specifically on OpenJDK 1.8.0 and to provide the default JAVA_HOME path for the pki.conf. https://fedorahosted.org/pki/ticket/2363 --- base/java-tools/templates/pki_java_command_wrapper.in | 11 +++++++---- .../java-tools/templates/pretty_print_cert_command_wrapper.in | 8 +++++++- base/java-tools/templates/pretty_print_crl_command_wrapper.in | 8 +++++++- 3 files changed, 21 insertions(+), 6 deletions(-) (limited to 'base/java-tools/templates') diff --git a/base/java-tools/templates/pki_java_command_wrapper.in b/base/java-tools/templates/pki_java_command_wrapper.in index c6dfc6409..fcf3b3a2e 100644 --- a/base/java-tools/templates/pki_java_command_wrapper.in +++ b/base/java-tools/templates/pki_java_command_wrapper.in @@ -19,6 +19,12 @@ # --- END COPYRIGHT BLOCK --- # +# Read default PKI configuration. +. /usr/share/pki/etc/pki.conf + +# Read user-defined PKI configuration. +. /etc/pki/pki.conf + # Check to insure that this script's original invocation directory # has not been deleted! CWD=`/bin/pwd > /dev/null 2>&1` @@ -68,7 +74,7 @@ OS=`uname -s` if [ "${OS}" = "Linux" ] ; then ARCHITECTURE=`arch` - JAVA="java" + JAVA="${JAVA_HOME}/bin/java" JAVA_OPTIONS="" elif [ "${OS}" = "SunOS" ] ; then ARCHITECTURE=`uname -p` @@ -110,7 +116,6 @@ fi ## order this command wrapper uses to find jar files. ## ############################################################################### -JNI_JAR_DIR=`. /usr/share/pki/etc/pki.conf && . /etc/pki/pki.conf && echo $JNI_JAR_DIR` CP=${JNI_JAR_DIR}/jss4.jar CP=/usr/share/java/commons-cli.jar:${CP} CP=/usr/share/java/commons-codec.jar:${CP} @@ -124,8 +129,6 @@ CP=/usr/share/java/${PRODUCT}/pki-cmsutil.jar:${CP} CP=/usr/share/java/${PRODUCT}/pki-tools.jar:${CP} export CP -LOGGING_CONFIG=`. /usr/share/pki/etc/pki.conf && . /etc/pki/pki.conf && echo $LOGGING_CONFIG` - ############################################################################### ## (6) Execute the java command specified by this java command wrapper ## ## based upon the preset LD_LIBRARY_PATH and CP environment variables. ## diff --git a/base/java-tools/templates/pretty_print_cert_command_wrapper.in b/base/java-tools/templates/pretty_print_cert_command_wrapper.in index 6dc86de27..63451d0c5 100644 --- a/base/java-tools/templates/pretty_print_cert_command_wrapper.in +++ b/base/java-tools/templates/pretty_print_cert_command_wrapper.in @@ -19,6 +19,12 @@ # --- END COPYRIGHT BLOCK --- # +# Read default PKI configuration. +. /usr/share/pki/etc/pki.conf + +# Read user-defined PKI configuration. +. /etc/pki/pki.conf + # Check to insure that this script's original invocation directory # has not been deleted! CWD=`/bin/pwd > /dev/null 2>&1` @@ -68,7 +74,7 @@ OS=`uname -s` if [ "${OS}" = "Linux" ] ; then ARCHITECTURE=`arch` - JAVA="java" + JAVA="${JAVA_HOME}/bin/java" JAVA_OPTIONS="" elif [ "${OS}" = "SunOS" ] ; then ARCHITECTURE=`uname -p` diff --git a/base/java-tools/templates/pretty_print_crl_command_wrapper.in b/base/java-tools/templates/pretty_print_crl_command_wrapper.in index 2a74d4d60..0c518ced3 100644 --- a/base/java-tools/templates/pretty_print_crl_command_wrapper.in +++ b/base/java-tools/templates/pretty_print_crl_command_wrapper.in @@ -19,6 +19,12 @@ # --- END COPYRIGHT BLOCK --- # +# Read default PKI configuration. +. /usr/share/pki/etc/pki.conf + +# Read user-defined PKI configuration. +. /etc/pki/pki.conf + # Check to insure that this script's original invocation directory # has not been deleted! CWD=`/bin/pwd > /dev/null 2>&1` @@ -68,7 +74,7 @@ OS=`uname -s` if [ "${OS}" = "Linux" ] ; then ARCHITECTURE=`arch` - JAVA="java" + JAVA="${JAVA_HOME}/bin/java" JAVA_OPTIONS="" elif [ "${OS}" = "SunOS" ] ; then ARCHITECTURE=`uname -p` -- cgit