From d3b2f55279c540f70d468cd969a4ae16d0f2fbb3 Mon Sep 17 00:00:00 2001
From: Matthew Harmsen <mharmsen@redhat.com>
Date: Wed, 19 Nov 2014 14:57:43 -0700
Subject: [PATCH] Remove legacy multilib JNI_JAR_DIR logic
* Bugzilla Bug #1165351 - Errata TPS test fails due to dependent packages not
found
---
base/common/share/etc/pki.conf | 2 +-
base/java-tools/templates/pki_java_command_wrapper.in | 2 ++
.../templates/pretty_print_cert_command_wrapper.in | 2 ++
.../templates/pretty_print_crl_command_wrapper.in | 2 ++
base/server/python/pki/server/deployment/pkiparser.py | 3 ++-
base/server/scripts/operations | 2 ++
6 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/base/common/share/etc/pki.conf b/base/common/share/etc/pki.conf
index f352344..a43d1d6 100644
--- a/base/common/share/etc/pki.conf
+++ b/base/common/share/etc/pki.conf
@@ -1,2 +1,2 @@
# JNI jar file location
-JNI_JAR_DIR=${JNI_JAR_DIR}
+JNI_JAR_DIR=/usr/lib/java
diff --git a/base/java-tools/templates/pki_java_command_wrapper.in b/base/java-tools/templates/pki_java_command_wrapper.in
index e9ff005..e9bea58 100644
--- a/base/java-tools/templates/pki_java_command_wrapper.in
+++ b/base/java-tools/templates/pki_java_command_wrapper.in
@@ -126,6 +126,8 @@ fi
###############################################################################
JNI_JAR_DIR=`source /usr/share/pki/etc/pki.conf && echo $JNI_JAR_DIR`
+# Override JNI_JAR_DIR using a user-defined value if one exists
+JNI_JAR_DIR=`source /etc/pki/pki.conf && echo $JNI_JAR_DIR`
CP=${JNI_JAR_DIR}/jss4.jar
CP=/usr/share/java/commons-codec.jar:${CP}
CP=/usr/share/java/ldapjdk.jar:${CP}
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 811935e..0c15184 100644
--- a/base/java-tools/templates/pretty_print_cert_command_wrapper.in
+++ b/base/java-tools/templates/pretty_print_cert_command_wrapper.in
@@ -126,6 +126,8 @@ fi
###############################################################################
JNI_JAR_DIR=`source /usr/share/pki/etc/pki.conf && echo $JNI_JAR_DIR`
+# Override JNI_JAR_DIR using a user-defined value if one exists
+JNI_JAR_DIR=`source /etc/pki/pki.conf && echo $JNI_JAR_DIR`
CP=${JNI_JAR_DIR}/jss4.jar
CP=/usr/share/java/commons-codec.jar:${CP}
CP=/usr/share/java/ldapjdk.jar:${CP}
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 e70b9ab..02e223c 100644
--- a/base/java-tools/templates/pretty_print_crl_command_wrapper.in
+++ b/base/java-tools/templates/pretty_print_crl_command_wrapper.in
@@ -126,6 +126,8 @@ fi
###############################################################################
JNI_JAR_DIR=`source /usr/share/pki/etc/pki.conf && echo $JNI_JAR_DIR`
+# Override JNI_JAR_DIR using a user-defined value if one exists
+JNI_JAR_DIR=`source /etc/pki/pki.conf && echo $JNI_JAR_DIR`
CP=${JNI_JAR_DIR}/jss4.jar
CP=/usr/share/java/commons-codec.jar:${CP}
diff --git a/base/server/python/pki/server/deployment/pkiparser.py b/base/server/python/pki/server/deployment/pkiparser.py
index df636d4..971cb45 100644
--- a/base/server/python/pki/server/deployment/pkiparser.py
+++ b/base/server/python/pki/server/deployment/pkiparser.py
@@ -170,7 +170,8 @@ class PKIConfigParser:
# JNI jar location
jni_jar_dir = subprocess.check_output(
- 'source /usr/share/pki/etc/pki.conf && echo $JNI_JAR_DIR',
+ '. /usr/share/pki/etc/pki.conf && . /etc/pki/pki.conf '
+ '&& echo $JNI_JAR_DIR',
shell=True)
# workaround for pylint error E1103
jni_jar_dir = str(jni_jar_dir).strip()
diff --git a/base/server/scripts/operations b/base/server/scripts/operations
index 7d026fe..e89f1f6 100644
--- a/base/server/scripts/operations
+++ b/base/server/scripts/operations
@@ -1060,6 +1060,8 @@ verify_symlinks()
# Dogtag 10 Conditional Variables
jni_jar_dir=`source /usr/share/pki/etc/pki.conf && echo $JNI_JAR_DIR`
+ # Override jni_jar_dir using a user-defined value if one exists
+ jni_jar_dir=`source /etc/pki/pki.conf && echo $JNI_JAR_DIR`
# Dogtag 10 Symbolic Link Target Variables
java_dir="/usr/share/java"