From 2c25c740a6c0867eabef585b4d99e2157b1c5ac6 Mon Sep 17 00:00:00 2001
From: Matthew Harmsen <mharmsen@redhat.com>
Date: Tue, 5 Mar 2013 02:40:24 -0800
Subject: [PATCH] PKI theme changes

* Correct PKI Theme for RA and TPS:
** TRAC Ticket #517 - Clean up theme dependencies
* Make PKI Theme optional for CA, KRA, OCSP, TKS:
** Bugzilla Bug #916134 - unresolved dependency in pki-server: pki-server-theme
** TRAC Ticket #518 - Remove UI dependencies from pkispawn . . .
---
 base/deploy/src/scriptlets/webapp_deployment.py | 16 ++++++------
 specs/dogtag-pki.spec                           | 33 +++++++++----------------
 specs/pki-core.spec                             | 28 ++++++++++++++++-----
 specs/pki-ra.spec                               | 14 ++++++++---
 specs/pki-tps.spec                              | 16 +++++++++---
 5 files changed, 65 insertions(+), 42 deletions(-)

diff --git a/base/deploy/src/scriptlets/webapp_deployment.py b/base/deploy/src/scriptlets/webapp_deployment.py
index 958d5e2..c2f8eb8 100644
--- a/base/deploy/src/scriptlets/webapp_deployment.py
+++ b/base/deploy/src/scriptlets/webapp_deployment.py
@@ -59,13 +59,15 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
 
             # Copy /usr/share/pki/common-ui
             # to <instance>/webapps/pki
-            util.directory.create(master['pki_tomcat_webapps_common_path'])
-            util.directory.copy(
-                os.path.join(
-                    config.PKI_DEPLOYMENT_SOURCE_ROOT,
-                    "common-ui"),
-                master['pki_tomcat_webapps_common_path'],
-                overwrite_flag=True)
+            if os.path.exists( os.path.join( config.PKI_DEPLOYMENT_SOURCE_ROOT,
+                                             "common-ui") ):
+                util.directory.create(master['pki_tomcat_webapps_common_path'])
+                util.directory.copy(
+                    os.path.join(
+                        config.PKI_DEPLOYMENT_SOURCE_ROOT,
+                        "common-ui"),
+                    master['pki_tomcat_webapps_common_path'],
+                    overwrite_flag=True)
 
             # Copy /usr/share/pki/server/webapps/pki/js
             # to <instance>/webapps/pki/js
diff --git a/specs/dogtag-pki.spec b/specs/dogtag-pki.spec
index 95b5275..75696e9 100644
--- a/specs/dogtag-pki.spec
+++ b/specs/dogtag-pki.spec
@@ -1,7 +1,7 @@
 Summary:          Dogtag Public Key Infrastructure (PKI) Suite
 Name:             dogtag-pki
 Version:          10.0.1
-Release:          1%{?dist}
+Release:          2%{?dist}
 # The entire source code is GPLv2 except for 'pki-tps' which is LGPLv2
 License:          GPLv2 and LGPLv2
 URL:              http://pki.fedoraproject.org/
@@ -93,8 +93,6 @@ Requires:         jss-javadoc >= %{jss_version}
 # of ALL Dogtag PKI theme packages
 Requires:         dogtag-pki-server-theme >= %{dogtag_pki_theme_version}
 Requires:         dogtag-pki-console-theme >= %{dogtag_pki_theme_version}
-Requires:         dogtag-pki-ra-theme >= %{dogtag_pki_theme_version}
-Requires:         dogtag-pki-tps-theme >= %{dogtag_pki_theme_version}
 
 # Make certain that this 'meta' package requires the latest version(s)
 # of ALL Dogtag PKI core packages
@@ -130,27 +128,14 @@ Requires:         pki-console >= %{pki_console_version}
 # of ALL Dogtag PKI clients
 Requires:         esc >= %{esc_version}
 
-# NOTE:  Several PKI packages require a "virtual" theme component.  These
-#        "virtual" theme components are "Provided" by various theme "flavors"
-#        including "dogtag", "redhat", and "ipa".  Consequently,
-#        all "dogtag", "redhat", and "ipa" theme components MUST be
-#        mutually exclusive!
+# NOTE:  As a convenience for standalone deployments, this 'dogtag-pki'
+#        top-level meta package supplies Dogtag themes for use by the
+#        certificate server packages:
 #
-#        On Fedora systems, the "dogtag" theme packages are the ONLY available
-#        theme components.
+#          * dogtag-pki-theme (Dogtag Certificate System deployments)
+#            * dogtag-pki-server-theme
+#            * dogtag-pki-console-theme
 #
-#        Similarly, the "ipa" theme packages are ONLY available on RHEL
-#        systems, and represent the default theme components.
-#
-#        Alternatively, on RHEL systems, if the "dogtag" theme packages are
-#        available as EPEL packages, while they may be used as a transparent
-#        replacement for their corresponding "ipa" theme package, they are not
-#        intended to be used as a replacement for their corresponding "redhat"
-#        theme components.
-#
-#        Finally, if available for a RHEL system (e. g. - RHCS subscription),
-#        each "redhat" theme package MUST be used as a transparent replacement
-#        for its corresponding "ipa" theme package or "dogtag" theme package.
 Obsoletes:        ipa-pki
 Conflicts:        redhat-pki
 
@@ -201,6 +186,10 @@ rm -rf %{buildroot}
 %doc README
 
 %changelog
+* Mon Mar  4 2013 Matthew Harmsen <mharmsen@redhat.com> 10.0.1-2
+- TRAC Ticket #517 - Clean up theme dependencies
+- TRAC Ticket #518 - Remove UI dependencies from pkispawn . . .
+
 * Tue Jan 15 2013 Ade Lee <alee@rdhat.com> 10.0.1-1
 - Update for release of 10.0.1 for pki-core
 
diff --git a/specs/pki-core.spec b/specs/pki-core.spec
index d661f41..f41f7aa 100644
--- a/specs/pki-core.spec
+++ b/specs/pki-core.spec
@@ -5,7 +5,7 @@ distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
 
 Name:             pki-core
 Version:          10.0.1
-Release:          1%{?dist}
+Release:          3%{?dist}
 Summary:          Certificate System - PKI Core Components
 URL:              http://pki.fedoraproject.org/
 License:          GPLv2
@@ -124,12 +124,21 @@ PKI Core also includes the following components:                       \
                                                                        \
   * pki-javadoc                                                        \
                                                                        \
-Finally, for deployment purposes, Certificate System requires ONE AND  \
-ONLY ONE of the following "Mutually-Exclusive" PKI Theme packages:     \
+Finally, if Certificate System is being deployed as an individual or   \
+set of standalone rather than embedded server(s)/service(s), it is     \
+strongly recommended (though not explicitly required) to include at    \
+least one PKI Theme package:                                           \
                                                                        \
   * dogtag-pki-theme (Dogtag Certificate System deployments)           \
-  * ipa-pki-theme    (IPA deployments)                                 \
-  * redhat-pki-theme (Red Hat Certificate System deployments)          \
+    * dogtag-pki-server-theme                                          \
+  * redhat-pki-server-theme (Red Hat Certificate System deployments)   \
+    * redhat-pki-server-theme                                          \
+  * customized pki theme (Customized Certificate System deployments)   \
+    * <customized>-pki-server-theme                                    \
+                                                                       \
+  NOTE:  As a convenience for standalone deployments, top-level meta   \
+         packages may be provided which bind a particular theme to     \
+         these certificate server packages.                            \
                                                                        \
 %{nil}
 
@@ -253,7 +262,6 @@ Requires:         perl-Crypt-SSLeay
 Requires:         policycoreutils
 Requires:         openldap-clients
 Requires:         jython >= 2.2.1
-Requires:         pki-server-theme >= 10.0.0
 Requires:         pki-base = %{version}-%{release}
 Requires:         pki-tools = %{version}-%{release}
 
@@ -985,6 +993,14 @@ fi
 
 
 %changelog
+* Mon Mar  4 2013 Matthew Harmsen <mharmsen@redhat.com> 10.0.1-3
+- TRAC Ticket #517 - Clean up theme dependencies
+- TRAC Ticket #518 - Remove UI dependencies from pkispawn . . .
+
+* Fri Mar  1 2013 Matthew Harmsen <mharmsen@redhat.com> 10.0.1-2
+- Removed runtime dependency on 'pki-server-theme' to resolve
+  Bugzilla Bug #916134 - unresolved dependency in pki-server: pki-server-theme
+
 * Tue Jan 15 2013 Ade Lee <alee@redhat.com> 10.0.1-1
 - TRAC Ticket 214 - Missing error description for duplicate user
 - TRAC Ticket 213 - Add nonces for cert revocation
diff --git a/specs/pki-ra.spec b/specs/pki-ra.spec
index 64de4ce..b276d84 100644
--- a/specs/pki-ra.spec
+++ b/specs/pki-ra.spec
@@ -1,6 +1,6 @@
 Name:             pki-ra
 Version:          10.0.0
-Release:          1%{?dist}
+Release:          2%{?dist}
 Summary:          Certificate System - Registration Authority
 URL:              http://pki.fedoraproject.org/
 License:          GPLv2
@@ -18,7 +18,7 @@ Requires:         mod_nss >= 1.0.8
 Requires:         mod_perl >= 1.99_16
 Requires:         mod_revocator >= 1.0.3
 Requires:         pki-server >= 10.0.0
-Requires:         pki-ra-theme >= 10.0.0
+Requires:         pki-server-theme >= 10.0.0
 Requires:         perl-DBD-SQLite
 Requires:         sqlite
 Requires:         /usr/sbin/sendmail
@@ -52,7 +52,11 @@ Additionally, Certificate System requires ONE AND ONLY ONE of the following
 "Mutually-Exclusive" PKI Theme packages:
 
   * dogtag-pki-theme (Dogtag Certificate System deployments)
-  * redhat-pki-theme (Red Hat Certificate System deployments)
+    * dogtag-pki-server-theme
+  * redhat-pki-server-theme (Red Hat Certificate System deployments)
+    * redhat-pki-server-theme
+  * customized pki theme (Customized Certificate System deployments)
+    * <customized>-pki-server-theme
 
 
 %prep
@@ -190,6 +194,10 @@ fi
 
 
 %changelog
+* Mon Mar  4 2013 Matthew Harmsen <mharmsen@redhat.com> 10.0.0-2
+- TRAC Ticket #517 - Clean up theme dependencies
+- TRAC Ticket #518 - Remove UI dependencies from pkispawn . . .
+
 * Fri Dec 7 2012 Ade Lee <alee@redhat.com> 10.0.0-1
 - Update to official release for rc1
 
diff --git a/specs/pki-tps.spec b/specs/pki-tps.spec
index 9eeb241..4489f60 100644
--- a/specs/pki-tps.spec
+++ b/specs/pki-tps.spec
@@ -1,6 +1,6 @@
 Name:             pki-tps
 Version:          10.0.0
-Release:          1%{?dist}
+Release:          2%{?dist}
 Summary:          Certificate System - Token Processing System
 URL:              http://pki.fedoraproject.org/
 License:          LGPLv2
@@ -27,7 +27,7 @@ Requires:         mod_revocator
 Requires:         openldap-clients
 Requires:         perl-Mozilla-LDAP
 Requires:         pki-server >= 10.0.0
-Requires:         pki-tps-theme >= 10.0.0
+Requires:         pki-server-theme >= 10.0.0
 
 Requires(post):   systemd-units
 Requires(preun):  systemd-units
@@ -65,7 +65,11 @@ Additionally, Certificate System requires ONE AND ONLY ONE of the         \
 following "Mutually-Exclusive" PKI Theme packages:                        \
                                                                           \
   * dogtag-pki-theme (Dogtag Certificate System deployments)              \
-  * redhat-pki-theme (Red Hat Certificate System deployments)             \
+    * dogtag-pki-server-theme                                             \
+  * redhat-pki-server-theme (Red Hat Certificate System deployments)      \
+    * redhat-pki-server-theme                                             \
+  * customized pki theme (Customized Certificate System deployments)      \
+    * <customized>-pki-server-theme                                       \
                                                                           \
 %{nil}
 
@@ -74,7 +78,7 @@ following "Mutually-Exclusive" PKI Theme packages:                        \
 
 ==================================
 ||  ABOUT "CERTIFICATE SYSTEM"  ||
-================================== 
+==================================
 ${overview}
 
 
@@ -223,6 +227,10 @@ fi
 
 
 %changelog
+* Mon Mar  4 2013 Matthew Harmsen <mharmsen@redhat.com> 10.0.0-2
+- TRAC Ticket #517 - Clean up theme dependencies
+- TRAC Ticket #518 - Remove UI dependencies from pkispawn . . .
+
 * Fri Dec 7 2012 Ade Lee <alee@redhat.com> 10.0.0-1
 - Update to official release for rc1
 
-- 
1.8.1

