summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2012-11-20 23:34:32 -0500
committerAde Lee <alee@redhat.com>2012-11-21 00:04:32 -0500
commit40e58f937d49f1a0029a226ab714cb54f12a9239 (patch)
tree74220b09ecb3554044caae086c9695569b248709 /base
parent96af71db61acac4adb3a1c8a73391467b3572a49 (diff)
downloadpki-40e58f937d49f1a0029a226ab714cb54f12a9239.tar.gz
pki-40e58f937d49f1a0029a226ab714cb54f12a9239.tar.xz
pki-40e58f937d49f1a0029a226ab714cb54f12a9239.zip
Link to resteasy-base on rhel systems when running pkispawnalee-91
Diffstat (limited to 'base')
-rw-r--r--base/deploy/scripts/operations8
-rw-r--r--base/deploy/src/scriptlets/pkiconfig.py15
-rw-r--r--base/deploy/src/scriptlets/pkihelper.py1
-rw-r--r--base/deploy/src/scriptlets/pkijython.py24
4 files changed, 35 insertions, 13 deletions
diff --git a/base/deploy/scripts/operations b/base/deploy/scripts/operations
index be5053ba2..0a768fb1b 100644
--- a/base/deploy/scripts/operations
+++ b/base/deploy/scripts/operations
@@ -943,9 +943,15 @@ verify_symlinks()
# Dogtag 10 Symbolic Link Target Variables
java_dir="/usr/share/java"
pki_systemd_service="pki-${PKI_WEB_SERVER_TYPE}d@.service"
- resteasy_java_dir="/usr/share/java/resteasy"
systemd_dir="/lib/systemd/system"
+ grep "Red Hat Enterprise Linux" /etc/redhat-release
+ if [ $? == 0 ]; then
+ resteasy_java_dir="/usr/share/java/resteasy-base"
+ else
+ resteasy_java_dir="/usr/share/java/resteasy"
+ fi
+
# Dogtag 10 Symbolic Link Variables
pki_common_jar_dir="${PKI_INSTANCE_PATH}/common/lib"
pki_registry_dir="/etc/sysconfig/pki/${PKI_WEB_SERVER_TYPE}/${PKI_INSTANCE_ID}"
diff --git a/base/deploy/src/scriptlets/pkiconfig.py b/base/deploy/src/scriptlets/pkiconfig.py
index e8e65970e..92e46d045 100644
--- a/base/deploy/src/scriptlets/pkiconfig.py
+++ b/base/deploy/src/scriptlets/pkiconfig.py
@@ -18,6 +18,17 @@
# Copyright (C) 2012 Red Hat, Inc.
# All rights reserved.
#
+import re
+
+def is_rhel():
+ try:
+ f = open("/etc/redhat-release")
+ for line in f:
+ if re.search("Red Hat Enterprise Linux", line):
+ return True
+ except IOError, e:
+ pass
+ return False
# PKI Deployment Constants
PKI_DEPLOYMENT_DEFAULT_CLIENT_DIR_PERMISSIONS = 00755
@@ -59,7 +70,11 @@ PKI_DEPLOYMENT_INTERRUPT_BANNER = "-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+"\
PKI_DEPLOYMENT_JAR_SOURCE_ROOT = "/usr/share/java"
PKI_DEPLOYMENT_HTTPCOMPONENTS_JAR_SOURCE_ROOT = "/usr/share/java/httpcomponents"
PKI_DEPLOYMENT_PKI_JAR_SOURCE_ROOT = "/usr/share/java/pki"
+
PKI_DEPLOYMENT_RESTEASY_JAR_SOURCE_ROOT = "/usr/share/java/resteasy"
+if is_rhel():
+ PKI_DEPLOYMENT_RESTEASY_JAR_SOURCE_ROOT = "/usr/share/java/resteasy-base"
+
PKI_DEPLOYMENT_SOURCE_ROOT = "/usr/share/pki"
PKI_DEPLOYMENT_SYSTEMD_ROOT = "/lib/systemd/system"
PKI_DEPLOYMENT_SYSTEMD_CONFIGURATION_ROOT = "/etc/systemd/system"
diff --git a/base/deploy/src/scriptlets/pkihelper.py b/base/deploy/src/scriptlets/pkihelper.py
index ba67465ef..b95269431 100644
--- a/base/deploy/src/scriptlets/pkihelper.py
+++ b/base/deploy/src/scriptlets/pkihelper.py
@@ -121,7 +121,6 @@ def pki_copytree(src, dst, symlinks=False, ignore=None):
if errors:
raise Error, errors
-
# PKI Deployment Identity Class
class identity:
def __add_gid(self, pki_group):
diff --git a/base/deploy/src/scriptlets/pkijython.py b/base/deploy/src/scriptlets/pkijython.py
index 8d027f91a..e6098b01a 100644
--- a/base/deploy/src/scriptlets/pkijython.py
+++ b/base/deploy/src/scriptlets/pkijython.py
@@ -77,6 +77,9 @@ class classPathHacker:
b = method.invoke(sysloader, jar_a)
return u
+# PKI Python Imports
+import pkiconfig as config
+import pkimessages as log
# Dynamically Load Additional Java Jars ('append' to existing classpath)
jarLoad = classPathHacker()
@@ -87,13 +90,18 @@ jarLoad.addFile("/usr/share/java/apache-commons-cli.jar")
jarLoad.addFile("/usr/share/java/apache-commons-codec.jar")
jarLoad.addFile("/usr/share/java/apache-commons-logging.jar")
jarLoad.addFile("/usr/share/java/istack-commons-runtime.jar")
+
# Resteasy Jars
+RESTEASY_ROOT = "resteasy"
+if config.is_rhel():
+ RESTEASY_ROOT = "resteasy-base"
+
jarLoad.addFile("/usr/share/java/glassfish-jaxb/jaxb-impl.jar")
-jarLoad.addFile("/usr/share/java/resteasy/jaxrs-api.jar")
-jarLoad.addFile("/usr/share/java/resteasy/resteasy-atom-provider.jar")
-jarLoad.addFile("/usr/share/java/resteasy/resteasy-jaxb-provider.jar")
-jarLoad.addFile("/usr/share/java/resteasy/resteasy-jaxrs.jar")
-jarLoad.addFile("/usr/share/java/resteasy/resteasy-jettison-provider.jar")
+jarLoad.addFile("/usr/share/java/" + RESTEASY_ROOT + "/jaxrs-api.jar")
+jarLoad.addFile("/usr/share/java/" + RESTEASY_ROOT + "/resteasy-atom-provider.jar")
+jarLoad.addFile("/usr/share/java/" + RESTEASY_ROOT + "/resteasy-jaxb-provider.jar")
+jarLoad.addFile("/usr/share/java/" + RESTEASY_ROOT + "/resteasy-jaxrs.jar")
+jarLoad.addFile("/usr/share/java/" + RESTEASY_ROOT + "/resteasy-jettison-provider.jar")
jarLoad.addFile("/usr/share/java/scannotation.jar")
# PKI Jars
jarLoad.addFile("/usr/share/java/pki/pki-certsrv.jar")
@@ -148,12 +156,6 @@ from com.netscape.certsrv.system import ConfigurationResponse
from com.netscape.cmsutil.util import Utils
from netscape.security.x509 import X500Name
-
-# PKI Python Imports
-import pkiconfig as config
-import pkimessages as log
-
-
# PKI Deployment Jython Helper Functions
def generateCRMFRequest(token, keysize, subjectdn, dualkey):
kg = token.getKeyPairGenerator(KeyPairAlgorithm.RSA)