[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Pki-devel] [PATCH] pki-cfu-0073-Ticket-867-Need-to-support-TPS-as-a-separate-tomcat-.patch



Attached please find the patch that addresses the last issue reported in:

https://fedorahosted.org/pki/ticket/867#comment:11 Need to support TPS as a separate tomcat instance

symkey.jar symlink is missing from the instance layout when TPS is on a separate tomcat instance.

After the fix, I was able to do a simple format and enrollment.
I also tested creating a TPS instance that is on a shared Tomcat instance to make sure it doesn't break that.

Christina
>From d12a0f0bf16b01ee9710f48e1031b3768c29bb57 Mon Sep 17 00:00:00 2001
From: Christina Fu <cfu redhat com>
Date: Fri, 29 May 2015 15:47:02 -0700
Subject: [PATCH] Ticket 867 Need to support TPS as a separate tomcat instance
 This patch addressed the issue that TPS on independent Tomcat is missing
 symlink to symkey.jar

---
 .../pki/server/deployment/scriptlets/instance_layout.py     | 13 +++++++++++++
 base/tps/src/CMakeLists.txt                                 |  2 +-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/base/server/python/pki/server/deployment/scriptlets/instance_layout.py b/base/server/python/pki/server/deployment/scriptlets/instance_layout.py
index 62e3879425ffafeb78eeec3ec2c0db6a24f0627c..9aa636f523449012a84c5e60193e9bf1ab16d838 100644
--- a/base/server/python/pki/server/deployment/scriptlets/instance_layout.py
+++ b/base/server/python/pki/server/deployment/scriptlets/instance_layout.py
@@ -291,6 +291,15 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
                 deployer.mdict['pki_symkey_jar'],
                 deployer.mdict['pki_symkey_jar_link'])
 
+        # TKS would have to have been installed before one installs TPS.
+        # in case of TPS on independent Tomcat instance, symlink needs
+        # to be created separately.
+        if deployer.mdict['pki_subsystem'] == 'TPS':
+            if not os.path.exists(deployer.mdict['pki_symkey_jar_link']):
+                deployer.symlink.create(
+                    deployer.mdict['pki_symkey_jar'],
+                    deployer.mdict['pki_symkey_jar_link'])
+
         return self.rv
 
     def destroy(self, deployer):
@@ -301,6 +310,10 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
         if deployer.mdict['pki_subsystem'] == 'TKS':
             deployer.symlink.delete(deployer.mdict['pki_symkey_jar_link'])
 
+        if deployer.mdict['pki_subsystem'] == 'TPS':
+            if os.path.exists(deployer.mdict['pki_symkey_jar_link']):
+                deployer.symlink.delete(deployer.mdict['pki_symkey_jar_link'])
+
         if len(deployer.instance.tomcat_instance_subsystems()) == 0:
             # remove Tomcat instance base
             deployer.directory.delete(deployer.mdict['pki_instance_path'])
diff --git a/base/tps/src/CMakeLists.txt b/base/tps/src/CMakeLists.txt
index b36a01526613937e9e60e7ca4d26ae9db4946e2c..b8b13a9934b376cf283b7c6d35c3c4548ce843eb 100644
--- a/base/tps/src/CMakeLists.txt
+++ b/base/tps/src/CMakeLists.txt
@@ -137,7 +137,7 @@ javac(pki-tps-classes
     OUTPUT_DIR
         ${CMAKE_BINARY_DIR}/classes
     DEPENDS
-        pki-nsutil-jar pki-cmsutil-jar pki-certsrv-jar pki-cms-jar pki-cmscore-jar
+        symkey-jar pki-nsutil-jar pki-cmsutil-jar pki-certsrv-jar pki-cms-jar pki-cmscore-jar
 )
 
 configure_file(
-- 
1.8.4.2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]