summaryrefslogtreecommitdiffstats
path: root/base/java-tools/templates
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2016-06-16 17:23:22 -0500
committerEndi S. Dewata <edewata@redhat.com>2016-06-17 20:19:09 +0200
commitfc96c05922d1a42d0fbaaa02a67a31e69c667f84 (patch)
treeb0a1fd07d733888cbda0480439859e1af752ff17 /base/java-tools/templates
parent502e9ee5eb52bda8cb5bdf4ac4ef1d32dbded98f (diff)
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
Diffstat (limited to 'base/java-tools/templates')
-rw-r--r--base/java-tools/templates/pki_java_command_wrapper.in11
-rw-r--r--base/java-tools/templates/pretty_print_cert_command_wrapper.in8
-rw-r--r--base/java-tools/templates/pretty_print_crl_command_wrapper.in8
3 files changed, 21 insertions, 6 deletions
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`