From 12b126d6acd80f037d1598ba6e0910ab80732c6a Mon Sep 17 00:00:00 2001
From: Endi Sukma Dewata <edewata@redhat.com>
Date: Wed, 3 Oct 2012 19:09:08 -0500
Subject: [PATCH] Renamed "shared" folder to "server".

The "shared" folder in /usr/share/pki has been renamed
to "server" since it contains only server files.

Ticket #353
---
 base/common/CMakeLists.txt                    |  2 +-
 base/deploy/src/scriptlets/instance_layout.py |  8 ++++----
 base/deploy/src/scriptlets/pkiparser.py       | 18 +++++++-----------
 specs/pki-core.spec                           | 11 +++++++----
 4 files changed, 19 insertions(+), 20 deletions(-)

diff --git a/base/common/CMakeLists.txt b/base/common/CMakeLists.txt
index 1a308ebb9284748cd47ff4adc0d20569d8dc5216..c4a4b1d417aca7645405cf655a30b92edc2c2a3f 100644
--- a/base/common/CMakeLists.txt
+++ b/base/common/CMakeLists.txt
@@ -31,7 +31,7 @@ install(
     DIRECTORY
         shared/
     DESTINATION
-        ${DATA_INSTALL_DIR}/shared/
+        ${DATA_INSTALL_DIR}/server/
     PATTERN
         "lib/*" EXCLUDE
 )
diff --git a/base/deploy/src/scriptlets/instance_layout.py b/base/deploy/src/scriptlets/instance_layout.py
index 5b48b87b52d28df49f137a099ad9e3fef0944d14..2f79de83c03c70370c40d32cbdd26f44f957e929 100644
--- a/base/deploy/src/scriptlets/instance_layout.py
+++ b/base/deploy/src/scriptlets/instance_layout.py
@@ -46,7 +46,7 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
         # establish Apache/Tomcat specific instance
         if master['pki_subsystem'] in config.PKI_TOMCAT_SUBSYSTEMS:
             # establish Tomcat instance configuration
-            util.directory.copy(master['pki_source_shared_path'],
+            util.directory.copy(master['pki_source_server_path'],
                                 master['pki_instance_configuration_path'],
                                 overwrite_flag=True)
             # establish Tomcat instance base
@@ -77,7 +77,7 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
             util.directory.copy(
                 os.path.join(
                     config.PKI_DEPLOYMENT_SOURCE_ROOT,
-                    "shared",
+                    "server",
                     "webapps",
                     "ROOT"),
                 master['pki_tomcat_webapps_root_path'],
@@ -185,7 +185,7 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
             util.directory.copy(
                 os.path.join(
                     config.PKI_DEPLOYMENT_SOURCE_ROOT,
-                    "shared",
+                    "server",
                     "webapps",
                     "ROOT"),
                 master['pki_tomcat_webapps_root_path'],
@@ -244,7 +244,7 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
         # update instance convenience symbolic links
         util.symlink.modify(master['pki_instance_database_link'])
         util.symlink.modify(master['pki_instance_conf_link'])
-        util.directory.copy(master['pki_source_shared_path'],
+        util.directory.copy(master['pki_source_server_path'],
                             master['pki_instance_configuration_path'],
                             overwrite_flag=True)
         util.symlink.modify(master['pki_instance_logs_link'])
diff --git a/base/deploy/src/scriptlets/pkiparser.py b/base/deploy/src/scriptlets/pkiparser.py
index a349436ff2ac1ecd8188434c0b238a5c4577afcc..cb419031fd4c94d74eb1f8ff6edcbed837442fd2 100644
--- a/base/deploy/src/scriptlets/pkiparser.py
+++ b/base/deploy/src/scriptlets/pkiparser.py
@@ -358,9 +358,9 @@ def compose_pki_master_dictionary():
         config.pki_master_dict['pki_source_setup_path'] =\
             os.path.join(config.PKI_DEPLOYMENT_SOURCE_ROOT,
                          "setup")
-        config.pki_master_dict['pki_source_shared_path'] =\
+        config.pki_master_dict['pki_source_server_path'] =\
             os.path.join(config.PKI_DEPLOYMENT_SOURCE_ROOT,
-                         "shared",
+                         "server",
                          "conf")
         config.pki_master_dict['pki_source_cs_cfg'] =\
             os.path.join(config.pki_master_dict['pki_source_conf_path'],
@@ -406,24 +406,20 @@ def compose_pki_master_dictionary():
                              "lib")
             config.pki_master_dict['pki_tomcat_systemd'] =\
                 config.PKI_DEPLOYMENT_TOMCAT_SYSTEMD
-            config.pki_master_dict['pki_shared_webapps_path'] =\
-                os.path.join(config.PKI_DEPLOYMENT_SOURCE_ROOT,
-                             "shared",
-                             "webapps")
             config.pki_master_dict['pki_source_catalina_properties'] =\
-                os.path.join(config.pki_master_dict['pki_source_shared_path'],
+                os.path.join(config.pki_master_dict['pki_source_server_path'],
                              "catalina.properties")
             config.pki_master_dict['pki_source_servercertnick_conf'] =\
-                os.path.join(config.pki_master_dict['pki_source_shared_path'],
+                os.path.join(config.pki_master_dict['pki_source_server_path'],
                              "serverCertNick.conf")
             config.pki_master_dict['pki_source_server_xml'] =\
-                os.path.join(config.pki_master_dict['pki_source_shared_path'],
+                os.path.join(config.pki_master_dict['pki_source_server_path'],
                              "server.xml")
             config.pki_master_dict['pki_source_context_xml'] =\
-                os.path.join(config.pki_master_dict['pki_source_shared_path'],
+                os.path.join(config.pki_master_dict['pki_source_server_path'],
                              "context.xml")
             config.pki_master_dict['pki_source_tomcat_conf'] =\
-                os.path.join(config.pki_master_dict['pki_source_shared_path'],
+                os.path.join(config.pki_master_dict['pki_source_server_path'],
                              "tomcat.conf")
             if config.pki_master_dict['pki_subsystem'] == "CA":
                 config.pki_master_dict['pki_source_emails'] =\
diff --git a/specs/pki-core.spec b/specs/pki-core.spec
index 9452f1b0226c04fec4033417f4c51bcc46fea881..0f4ff23a094635df0b67cd5f644f0e45c26805e7 100644
--- a/specs/pki-core.spec
+++ b/specs/pki-core.spec
@@ -14,7 +14,7 @@ distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
 
 Name:             pki-core
 Version:          10.0.0
-Release:          %{?relprefix}38%{?prerel}%{?dist}
+Release:          %{?relprefix}39%{?prerel}%{?dist}
 Summary:          Certificate System - PKI Core Components
 URL:              http://pki.fedoraproject.org/
 License:          GPLv2
@@ -740,7 +740,7 @@ echo "D /var/run/pki/tks 0755 root root -"  >> %{buildroot}%{_sysconfdir}/tmpfil
 %{__rm} -rf %{buildroot}%{_unitdir}
 %endif
 
-%{__rm} -rf %{buildroot}%{_datadir}/pki/shared/lib
+%{__rm} -rf %{buildroot}%{_datadir}/pki/server/lib
 
 # tomcat6 has changed how TOMCAT_LOG is used.
 # Need to adjust accordingly
@@ -1175,8 +1175,8 @@ fi
 %endif
 
 %{_datadir}/pki/setup/
-%dir %{_datadir}/pki/shared
-%{_datadir}/pki/shared/
+%dir %{_datadir}/pki/server
+%{_datadir}/pki/server/
 
 
 %files -n pki-selinux
@@ -1317,6 +1317,9 @@ fi
 
 
 %changelog
+* Fri Oct 5 2012 Endi S. Dewata <edewata@redhat.com> 10.0.0-0.39.a2
+- Renamed "shared" folder to "server".
+
 * Fri Oct 5 2012 Ade Lee <alee@redhat.com> 10.0.0-0.38.a2
 - Added required selinux versions for new policy.
 
-- 
1.7.11.4

