[Pki-devel] [PATCH] 588 Fixed problem deploying without theme.

Endi Sukma Dewata edewata at redhat.com
Fri Apr 24 16:59:26 UTC 2015


The deployment tool has been modified to deploy the pki.xml only
if the theme package is installed.

https://fedorahosted.org/pki/ticket/499

-- 
Endi S. Dewata
-------------- next part --------------
From 57e96f0a298ab7cfd9ff935016f4347b5cc8bf9c Mon Sep 17 00:00:00 2001
From: "Endi S. Dewata" <edewata at redhat.com>
Date: Fri, 24 Apr 2015 12:52:22 -0400
Subject: [PATCH] Fixed problem deploying without theme.

The deployment tool has been modified to deploy the pki.xml only
if the theme package is installed.

https://fedorahosted.org/pki/ticket/499
---
 .../deployment/scriptlets/instance_layout.py       | 25 +++++++++++-----------
 1 file changed, 13 insertions(+), 12 deletions(-)

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 ebcedc2e0de428b141d6a7a0f1f84c740193ca0c..8938057aeb20406931f41ecb74589b553ed61529 100644
--- a/base/server/python/pki/server/deployment/scriptlets/instance_layout.py
+++ b/base/server/python/pki/server/deployment/scriptlets/instance_layout.py
@@ -49,8 +49,8 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
             # establish instance logs
             deployer.directory.create(deployer.mdict['pki_instance_log_path'])
 
-            # establish Tomcat instance configuration
-            # don't copy over the common ldif files to etc instance path
+            # copy /usr/share/pki/server/conf tree into /var/lib/pki/<instance>/conf
+            # except common ldif files and theme deployment descriptor
             deployer.directory.copy(
                 deployer.mdict['pki_source_server_path'],
                 deployer.mdict['pki_instance_configuration_path'],
@@ -70,15 +70,16 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
                     "localhost",
                     "ROOT.xml"))
 
-            # Deploy theme web application
-            deployer.deploy_webapp(
-                "pki",
-                deployer.mdict['pki_theme_server_dir'],
-                os.path.join(
-                    deployer.mdict['pki_source_server_path'],
-                    "Catalina",
-                    "localhost",
-                    "pki.xml"))
+            if os.path.exists(deployer.mdict['pki_theme_server_dir']):
+                # Deploy theme web application if available
+                deployer.deploy_webapp(
+                    "pki",
+                    deployer.mdict['pki_theme_server_dir'],
+                    os.path.join(
+                        deployer.mdict['pki_source_server_path'],
+                        "Catalina",
+                        "localhost",
+                        "pki.xml"))
 
             # Deploy admin templates
             deployer.deploy_webapp(
@@ -333,5 +334,5 @@ def file_ignore_callback_src_server(src, names):
     config.pki_log.info(log.FILE_EXCLUDE_CALLBACK_2, src, names,
                         extra=config.PKI_INDENTATION_LEVEL_1)
 
-    excludes = {'schema.ldif', 'database.ldif', 'manager.ldif'}
+    excludes = {'schema.ldif', 'database.ldif', 'manager.ldif', 'pki.xml'}
     return excludes
-- 
1.9.3



More information about the Pki-devel mailing list