From bb08d0e676f557f42b4af5be159f93b476afce8a Mon Sep 17 00:00:00 2001
From: Endi Sukma Dewata <edewata@redhat.com>
Date: Thu, 22 Nov 2012 02:23:24 -0500
Subject: [PATCH] Removed RA and TPS theme packages.

The RA and TPS theme packages are no longer necessary due to the
reorganization of the theme files. The build and deployment
scripts have been updated accordingly.

Ticket #407
---
 base/ra/CMakeLists.txt      | 14 ++++----
 base/setup/pkicreate        |  7 +---
 base/tps/CMakeLists.txt     | 19 +++--------
 dogtag/CMakeLists.txt       |  2 --
 specs/dogtag-pki-theme.spec | 83 ++++++++++-----------------------------------
 5 files changed, 29 insertions(+), 96 deletions(-)

diff --git a/base/ra/CMakeLists.txt b/base/ra/CMakeLists.txt
index 79152e2915eb9b3130d618316ab23fb87161c468..ece6713c65e100d975ccabd37eb96053fa67c11a 100644
--- a/base/ra/CMakeLists.txt
+++ b/base/ra/CMakeLists.txt
@@ -37,6 +37,13 @@ install(
 
 install(
     DIRECTORY
+        apache/docroot
+    DESTINATION
+        ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME}
+)
+
+install(
+    DIRECTORY
         emails/
     DESTINATION
         ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME}/conf
@@ -44,13 +51,6 @@ install(
 
 install(
     DIRECTORY
-        forms/
-    DESTINATION
-        ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME}/docroot
-)
-
-install(
-    DIRECTORY
         lib/
     DESTINATION
         ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME}/lib
diff --git a/base/setup/pkicreate b/base/setup/pkicreate
index 6f63e96e85bc461960031aa59ab75ffd46446dc1..a9ac1890e3656e82267892f00d611637e3d1e8b5 100755
--- a/base/setup/pkicreate
+++ b/base/setup/pkicreate
@@ -2061,12 +2061,7 @@ sub process_pki_directories
                                     $default_dir_permissions, $default_file_permissions,
                                     $pki_user, $pki_group);
 
-        return 0 if !copy_directory($ui_subsystem_path, $pki_instance_path,
-                                    $default_dir_permissions, $default_file_permissions,
-                                    $pki_user, $pki_group);
-
-        # Copy /usr/share/pki/common-ui
-        # to <instance>/docroot/pki
+        # Copy /usr/share/pki/common-ui to <instance>/docroot/pki
         return 0 if !copy_directory(
             $common_ui_subsystem_path,
             "$docroot_instance_path/pki",
diff --git a/base/tps/CMakeLists.txt b/base/tps/CMakeLists.txt
index 10c4d8efd8fb9a5986bf106ca47d950233677c00..954146cb4428e501a84c938aedc009f44ab9204d 100644
--- a/base/tps/CMakeLists.txt
+++ b/base/tps/CMakeLists.txt
@@ -79,7 +79,7 @@ install(
 
 install(
     DIRECTORY
-        forms/esc/cgi-bin
+        apache/cgi-bin
     DESTINATION
         ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME}
 )
@@ -92,21 +92,10 @@ install(
 )
 
 install(
-    FILES
-        forms/index.html
+    DIRECTORY
+        apache/docroot
     DESTINATION
-        ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME}/docroot
-)
-
-install(
-    FILES
-        forms/index.cgi
-    DESTINATION
-        ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME}/docroot
-    PERMISSIONS
-        OWNER_EXECUTE OWNER_WRITE OWNER_READ
-        GROUP_EXECUTE GROUP_READ
-        WORLD_EXECUTE WORLD_READ
+        ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME}
 )
 
 install(
diff --git a/dogtag/CMakeLists.txt b/dogtag/CMakeLists.txt
index aa4f2fc839ed194df1fe664673775a23ba848a3c..2561495e1be141a36cd585f0ac58ab9b9e916525 100644
--- a/dogtag/CMakeLists.txt
+++ b/dogtag/CMakeLists.txt
@@ -5,7 +5,5 @@ if (APPLICATION_FLAVOR_IPA_PKI_THEME)
 endif (APPLICATION_FLAVOR_IPA_PKI_THEME)
 if (APPLICATION_FLAVOR_DOGTAG_PKI_THEME)
     add_subdirectory(common-ui)
-    add_subdirectory(ra-ui)
-    add_subdirectory(tps-ui)
     add_subdirectory(console-ui)
 endif (APPLICATION_FLAVOR_DOGTAG_PKI_THEME)
diff --git a/specs/dogtag-pki-theme.spec b/specs/dogtag-pki-theme.spec
index 5e10a200e2a88c5399f6700c9ae38a8acd72c655..934dc423dbbbf8dc3e27c3d60bdbd458640af6ea 100644
--- a/specs/dogtag-pki-theme.spec
+++ b/specs/dogtag-pki-theme.spec
@@ -7,7 +7,7 @@
 
 Name:             dogtag-pki-theme
 Version:          10.0.0
-Release:          %{?relprefix}8%{?prerel}%{?dist}
+Release:          %{?relprefix}9%{?prerel}%{?dist}
 Summary:          Certificate System - Dogtag PKI Theme Components
 URL:              http://pki.fedoraproject.org/
 License:          GPLv2
@@ -75,6 +75,10 @@ Conflicts:        redhat-pki-ocsp-theme
 Conflicts:        redhat-pki-ocsp-ui
 Conflicts:        redhat-pki-tks-theme
 Conflicts:        redhat-pki-tks-ui
+Conflicts:        redhat-pki-ra-theme
+Conflicts:        redhat-pki-ra-ui
+Conflicts:        redhat-pki-tps-theme
+Conflicts:        redhat-pki-tps-ui
 
 # EPEL version of Dogtag "theme" ALWAYS replaces ALL versions of IPA "theme"
 Obsoletes:        ipa-pki-server-theme <= 9999
@@ -98,6 +102,10 @@ Obsoletes:        dogtag-pki-ocsp-theme <= %{version}-%{release}
 Obsoletes:        dogtag-pki-ocsp-ui
 Obsoletes:        dogtag-pki-tks-theme <= %{version}-%{release}
 Obsoletes:        dogtag-pki-tks-ui
+Obsoletes:        dogtag-pki-ra-theme <= %{version}-%{release}
+Obsoletes:        dogtag-pki-ra-ui
+Obsoletes:        dogtag-pki-tps-theme <= %{version}-%{release}
+Obsoletes:        dogtag-pki-tps-ui
 
 Provides:         dogtag-pki-common-theme = %{version}-%{release}
 Provides:         pki-server-theme = %{version}-%{release}
@@ -120,61 +128,17 @@ Provides:         dogtag-pki-tks-theme = %{version}-%{release}
 Provides:         pki-tks-theme = %{version}-%{release}
 Provides:         pki-tks-ui = %{version}-%{release}
 
-%description -n   dogtag-pki-server-theme
-This PKI Server Framework User Interface contains
-the Dogtag textual and graphical user interface for the PKI Server Framework.
-
-This package is used by the Dogtag Certificate System.
-
-%{overview}
-
-
-%package -n       dogtag-pki-ra-theme
-Summary:          Certificate System - Registration Authority User Interface
-Group:            System Environment/Base
-
-Requires:         dogtag-pki-server-theme = %{version}-%{release}
-
-%if 0%{?rhel}
-# EPEL version of Dogtag "theme" conflicts with all versions of Red Hat "theme"
-Conflicts:        redhat-pki-ra-theme
-Conflicts:        redhat-pki-ra-ui
-%endif
-
-Obsoletes:        dogtag-pki-ra-ui <= 9
-
+Provides:         dogtag-pki-ra-theme = %{version}-%{release}
 Provides:         pki-ra-theme = %{version}-%{release}
 Provides:         pki-ra-ui = %{version}-%{release}
 
-%description -n   dogtag-pki-ra-theme
-This Registration Authority (RA) User Interface contains
-the Dogtag textual and graphical user interface for the RA.
-
-This package is used by the Dogtag Certificate System.
-
-%{overview}
-
-
-%package -n       dogtag-pki-tps-theme
-Summary:          Certificate System - Token Processing System User Interface
-Group:            System Environment/Base
-
-Requires:         dogtag-pki-server-theme = %{version}-%{release}
-
-%if 0%{?rhel}
-# EPEL version of Dogtag "theme" conflicts with all versions of Red Hat "theme"
-Conflicts:        redhat-pki-tps-theme
-Conflicts:        redhat-pki-tps-ui
-%endif
-
-Obsoletes:        dogtag-pki-tps-ui <= 9
-
+Provides:         dogtag-pki-tps-theme = %{version}-%{release}
 Provides:         pki-tps-theme = %{version}-%{release}
 Provides:         pki-tps-ui = %{version}-%{release}
 
-%description -n   dogtag-pki-tps-theme
-This Token Processing System (TPS) User Interface contains
-the Dogtag textual and graphical user interface for the TPS.
+%description -n   dogtag-pki-server-theme
+This PKI Server Framework User Interface contains
+the Dogtag textual and graphical user interface for the PKI Server Framework.
 
 This package is used by the Dogtag Certificate System.
 
@@ -233,8 +197,6 @@ cd build
 cd build
 %{__make} install DESTDIR=%{buildroot} INSTALL="install -p"
 
-chmod 755 %{buildroot}%{_datadir}/pki/tps-ui/cgi-bin/sow/cfg.pl
-
 
 # NOTE:  Several "theme" packages require ownership of the "/usr/share/pki"
 #        directory because the PKI subsystems (CA, DRM, OCSP, TKS, RA, TPS)
@@ -255,20 +217,6 @@ chmod 755 %{buildroot}%{_datadir}/pki/tps-ui/cgi-bin/sow/cfg.pl
 %{_datadir}/pki/common-ui/
 
 
-%files -n dogtag-pki-ra-theme
-%defattr(-,root,root,-)
-%doc dogtag/ra-ui/LICENSE
-%dir %{_datadir}/pki
-%{_datadir}/pki/ra-ui/
-
-
-%files -n dogtag-pki-tps-theme
-%defattr(-,root,root,-)
-%doc dogtag/tps-ui/LICENSE
-%dir %{_datadir}/pki
-%{_datadir}/pki/tps-ui/
-
-
 %files -n dogtag-pki-console-theme
 %defattr(-,root,root,-)
 %doc dogtag/console-ui/LICENSE
@@ -276,6 +224,9 @@ chmod 755 %{buildroot}%{_datadir}/pki/tps-ui/cgi-bin/sow/cfg.pl
 
 
 %changelog
+* Wed Nov 21 2012 Endi S. Dewata <edewata@redhat.com> 10.0.0-0.9.b3
+- Removed Dogtag RA and TPS packages.
+
 * Tue Nov 13 2012 Ade Lee <alee@redhat.com> 10.0.0-0.8.b3
 - Added needed Requires for dogtag-pki-common-theme
 
-- 
1.7.12.1

