Re: [Pki-devel] [PATCH] 919 Merged /pki webapps.

2017-01-30 Thread Endi Sukma Dewata

On 1/27/2017 5:27 PM, Matthew Harmsen wrote:

ACK (with CAVEAT) if tested to work.

CAVEAT:  This should be separated into three separate patches (one for
base changes, one for dogtag changes, and a separate one containing the
spec file change) prior to check-in:

  * Patch 1:
  o base/server/python/pki/server/deployment/scriptlets/instance_layout.py
  o base/server/tomcat7/conf/Catalina/localhost/pki#admin.xml
  o base/server/tomcat7/conf/Catalina/localhost/pki#js.xml
  o base/server/tomcat7/conf/Catalina/localhost/pki.xml
  o base/server/tomcat8/conf/Catalina/localhost/pki#admin.xml
  o base/server/tomcat8/conf/Catalina/localhost/pki#js.xml
  o base/server/tomcat8/conf/Catalina/localhost/pki.xml
  o base/server/upgrade/10.4.0/02-MergePKIWebapps
  o delete mode 100644
base/server/tomcat7/conf/Catalina/localhost/pki#admin.xml
  o delete mode 100644
base/server/tomcat7/conf/Catalina/localhost/pki#js.xml
  o delete mode 100644
base/server/tomcat8/conf/Catalina/localhost/pki#admin.xml
  o delete mode 100644
base/server/tomcat8/conf/Catalina/localhost/pki#js.xml
  o create mode 100755 base/server/upgrade/10.4.0/02-MergePKIWebapps
  * Patch 2:
  o dogtag/common-ui/CMakeLists.txt
  * Patch 3:
  o specs/dogtag-pki-theme.spec



Thanks! Pushed to master.

--
Endi S. Dewata

___
Pki-devel mailing list
Pki-devel@redhat.com
https://www.redhat.com/mailman/listinfo/pki-devel


Re: [Pki-devel] [PATCH] 919 Merged /pki webapps.

2017-01-27 Thread Matthew Harmsen

On 01/25/2017 04:35 PM, Endi Sukma Dewata wrote:

Previously the /pki webapp was only added if the theme was present
during installation, and there were separate webapps for /pki/admin
and /pki/js. If the theme was installed later, the /pki webapp had
to be configured manually.

To simplify the installation and to support other developments
(e.g. login banner), the /pki webapp will always be added during
installation regardless of theme, and the /pki/admin and /pki/js
webapps are merged into /pki webapp. When the theme package is
installed, it will create links in /pki webapp so the theme files
will become available without additional configuration.

An upgrade script has been added to merge the /pki webapp in
existing instances.

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



___
Pki-devel mailing list
Pki-devel@redhat.com
https://www.redhat.com/mailman/listinfo/pki-devel


ACK (with CAVEAT) if tested to work.

CAVEAT:  This should be separated into three separate patches (one for 
base changes, one for dogtag changes, and a separate one containing the 
spec file change) prior to check-in:


 * Patch 1:
 o base/server/python/pki/server/deployment/scriptlets/instance_layout.py
 o base/server/tomcat7/conf/Catalina/localhost/pki#admin.xml
 o base/server/tomcat7/conf/Catalina/localhost/pki#js.xml
 o base/server/tomcat7/conf/Catalina/localhost/pki.xml
 o base/server/tomcat8/conf/Catalina/localhost/pki#admin.xml
 o base/server/tomcat8/conf/Catalina/localhost/pki#js.xml
 o base/server/tomcat8/conf/Catalina/localhost/pki.xml
 o base/server/upgrade/10.4.0/02-MergePKIWebapps
 o delete mode 100644
   base/server/tomcat7/conf/Catalina/localhost/pki#admin.xml
 o delete mode 100644
   base/server/tomcat7/conf/Catalina/localhost/pki#js.xml
 o delete mode 100644
   base/server/tomcat8/conf/Catalina/localhost/pki#admin.xml
 o delete mode 100644
   base/server/tomcat8/conf/Catalina/localhost/pki#js.xml
 o create mode 100755 base/server/upgrade/10.4.0/02-MergePKIWebapps
 * Patch 2:
 o dogtag/common-ui/CMakeLists.txt
 * Patch 3:
 o specs/dogtag-pki-theme.spec

___
Pki-devel mailing list
Pki-devel@redhat.com
https://www.redhat.com/mailman/listinfo/pki-devel

[Pki-devel] [PATCH] 919 Merged /pki webapps.

2017-01-25 Thread Endi Sukma Dewata

Previously the /pki webapp was only added if the theme was present
during installation, and there were separate webapps for /pki/admin
and /pki/js. If the theme was installed later, the /pki webapp had
to be configured manually.

To simplify the installation and to support other developments
(e.g. login banner), the /pki webapp will always be added during
installation regardless of theme, and the /pki/admin and /pki/js
webapps are merged into /pki webapp. When the theme package is
installed, it will create links in /pki webapp so the theme files
will become available without additional configuration.

An upgrade script has been added to merge the /pki webapp in
existing instances.

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

--
Endi S. Dewata
>From 877897468366da577969eeac44268abe0e12b629 Mon Sep 17 00:00:00 2001
From: "Endi S. Dewata" 
Date: Thu, 19 Jan 2017 20:50:42 +0100
Subject: [PATCH] Merged /pki webapps.

Previously the /pki webapp was only added if the theme was present
during installation, and there were separate webapps for /pki/admin
and /pki/js. If the theme was installed later, the /pki webapp had
to be configured manually.

To simplify the installation and to support other developments
(e.g. login banner), the /pki webapp will always be added during
installation regardless of theme, and the /pki/admin and /pki/js
webapps are merged into /pki webapp. When the theme package is
installed, it will create links in /pki webapp so the theme files
will become available without additional configuration.

An upgrade script has been added to merge the /pki webapp in
existing instances.

https://fedorahosted.org/pki/ticket/2582
---
 .../deployment/scriptlets/instance_layout.py   | 36 ++
 .../tomcat7/conf/Catalina/localhost/pki#admin.xml  | 30 
 .../tomcat7/conf/Catalina/localhost/pki#js.xml | 30 
 .../server/tomcat7/conf/Catalina/localhost/pki.xml |  2 +-
 .../tomcat8/conf/Catalina/localhost/pki#admin.xml  | 32 -
 .../tomcat8/conf/Catalina/localhost/pki#js.xml | 32 -
 .../server/tomcat8/conf/Catalina/localhost/pki.xml |  2 +-
 base/server/upgrade/10.4.0/02-MergePKIWebapps  | 79 ++
 dogtag/common-ui/CMakeLists.txt| 23 +++
 specs/dogtag-pki-theme.spec|  9 +++
 10 files changed, 118 insertions(+), 157 deletions(-)
 delete mode 100644 base/server/tomcat7/conf/Catalina/localhost/pki#admin.xml
 delete mode 100644 base/server/tomcat7/conf/Catalina/localhost/pki#js.xml
 delete mode 100644 base/server/tomcat8/conf/Catalina/localhost/pki#admin.xml
 delete mode 100644 base/server/tomcat8/conf/Catalina/localhost/pki#js.xml
 create mode 100755 base/server/upgrade/10.4.0/02-MergePKIWebapps

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 330aa46f718b1783dcd04cab1e72a952b74df381..a9a2840c77db032219930364d67a764e67b04b7a 100644
--- a/base/server/python/pki/server/deployment/scriptlets/instance_layout.py
+++ b/base/server/python/pki/server/deployment/scriptlets/instance_layout.py
@@ -88,46 +88,20 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
 "localhost",
 "ROOT.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
+# Deploy pki web application which includes themes,
+# admin templates, and JS libraries
 deployer.deploy_webapp(
-"pki#admin",
+"pki",
 os.path.join(
 config.PKI_DEPLOYMENT_SOURCE_ROOT,
 "server",
 "webapps",
-"pki",
-"admin"),
+"pki"),
 os.path.join(
 deployer.mdict['pki_source_server_path'],
 "Catalina",
 "localhost",
-"pki#admin.xml"))
-
-# Deploy JS library
-deployer.deploy_webapp(
-"pki#js",
-os.path.join(
-config.PKI_DEPLOYMENT_SOURCE_ROOT,
-"server",
-"webapps",
-"pki",
-"js"),
-os.path.join(
-deployer.mdict['pki_source_server_path'],
-"Catalina",
-"localhost",
-"pki#js.xml"))
+