From bdf0cac45f0ef9585a19d40999ae328e5a034056 Mon Sep 17 00:00:00 2001 From: Endi Sukma Dewata Date: Tue, 5 Feb 2013 19:57:38 -0500 Subject: Deploying webapps from shared folder. --- base/ca/shared/conf/Catalina/localhost/ca.xml | 3 +- .../common/shared/conf/Catalina/localhost/ROOT.xml | 3 +- base/deploy/src/scriptlets/webapp_deployment.py | 52 ---------------------- base/kra/shared/conf/Catalina/localhost/kra.xml | 3 +- base/ocsp/shared/conf/Catalina/localhost/ocsp.xml | 3 +- base/tks/shared/conf/Catalina/localhost/tks.xml | 3 +- specs/pki-core.spec | 14 ++++++ 7 files changed, 24 insertions(+), 57 deletions(-) diff --git a/base/ca/shared/conf/Catalina/localhost/ca.xml b/base/ca/shared/conf/Catalina/localhost/ca.xml index 975ecabf1..bb3fc1bc9 100644 --- a/base/ca/shared/conf/Catalina/localhost/ca.xml +++ b/base/ca/shared/conf/Catalina/localhost/ca.xml @@ -22,7 +22,8 @@ See the License for the specific language governing permissions and limitations under the License. --> - + diff --git a/base/common/shared/conf/Catalina/localhost/ROOT.xml b/base/common/shared/conf/Catalina/localhost/ROOT.xml index c29b4586e..2634dbb98 100644 --- a/base/common/shared/conf/Catalina/localhost/ROOT.xml +++ b/base/common/shared/conf/Catalina/localhost/ROOT.xml @@ -22,6 +22,7 @@ See the License for the specific language governing permissions and limitations under the License. --> - + diff --git a/base/deploy/src/scriptlets/webapp_deployment.py b/base/deploy/src/scriptlets/webapp_deployment.py index a3b459ab3..19ff00f0e 100644 --- a/base/deploy/src/scriptlets/webapp_deployment.py +++ b/base/deploy/src/scriptlets/webapp_deployment.py @@ -64,18 +64,6 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet): "localhost"), overwrite_flag=True) - # Copy /usr/share/pki/server/webapps/ROOT - # to /webapps/ROOT - util.directory.create(master['pki_tomcat_webapps_root_path']) - util.directory.copy( - os.path.join( - config.PKI_DEPLOYMENT_SOURCE_ROOT, - "server", - "webapps", - "ROOT"), - master['pki_tomcat_webapps_root_path'], - overwrite_flag=True) - # Copy /usr/share/pki/common-ui # to /webapps/pki util.directory.create(master['pki_tomcat_webapps_common_path']) @@ -132,46 +120,6 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet): "localhost"), overwrite_flag=True) - # Copy /usr/share/pki//webapps/ - # to /webapps/ - util.directory.copy( - os.path.join( - config.PKI_DEPLOYMENT_SOURCE_ROOT, - master['pki_subsystem'].lower(), - "webapps", - master['pki_subsystem'].lower()), - master['pki_tomcat_webapps_subsystem_path'], - overwrite_flag=True) - - util.directory.create( - master['pki_tomcat_webapps_subsystem_webinf_classes_path']) - util.directory.create( - master['pki_tomcat_webapps_subsystem_webinf_lib_path']) - # establish Tomcat webapps subsystem WEB-INF lib symbolic links - util.symlink.create(master['pki_certsrv_jar'], - master['pki_certsrv_jar_link']) - util.symlink.create(master['pki_cmsbundle'], - master['pki_cmsbundle_jar_link']) - util.symlink.create(master['pki_cmscore'], - master['pki_cmscore_jar_link']) - util.symlink.create(master['pki_cms'], - master['pki_cms_jar_link']) - util.symlink.create(master['pki_cmsutil'], - master['pki_cmsutil_jar_link']) - util.symlink.create(master['pki_nsutil'], - master['pki_nsutil_jar_link']) - if master['pki_subsystem'] == "CA": - util.symlink.create(master['pki_ca_jar'], - master['pki_ca_jar_link']) - elif master['pki_subsystem'] == "KRA": - util.symlink.create(master['pki_kra_jar'], - master['pki_kra_jar_link']) - elif master['pki_subsystem'] == "OCSP": - util.symlink.create(master['pki_ocsp_jar'], - master['pki_ocsp_jar_link']) - elif master['pki_subsystem'] == "TKS": - util.symlink.create(master['pki_tks_jar'], - master['pki_tks_jar_link']) # set ownerships, permissions, and acls util.directory.set_mode(master['pki_tomcat_webapps_subsystem_path']) return self.rv diff --git a/base/kra/shared/conf/Catalina/localhost/kra.xml b/base/kra/shared/conf/Catalina/localhost/kra.xml index 975ecabf1..8e8627c48 100644 --- a/base/kra/shared/conf/Catalina/localhost/kra.xml +++ b/base/kra/shared/conf/Catalina/localhost/kra.xml @@ -22,7 +22,8 @@ See the License for the specific language governing permissions and limitations under the License. --> - + diff --git a/base/ocsp/shared/conf/Catalina/localhost/ocsp.xml b/base/ocsp/shared/conf/Catalina/localhost/ocsp.xml index 975ecabf1..5e8e1e77b 100644 --- a/base/ocsp/shared/conf/Catalina/localhost/ocsp.xml +++ b/base/ocsp/shared/conf/Catalina/localhost/ocsp.xml @@ -22,7 +22,8 @@ See the License for the specific language governing permissions and limitations under the License. --> - + diff --git a/base/tks/shared/conf/Catalina/localhost/tks.xml b/base/tks/shared/conf/Catalina/localhost/tks.xml index 975ecabf1..56e4e2133 100644 --- a/base/tks/shared/conf/Catalina/localhost/tks.xml +++ b/base/tks/shared/conf/Catalina/localhost/tks.xml @@ -22,7 +22,8 @@ See the License for the specific language governing permissions and limitations under the License. --> - + diff --git a/specs/pki-core.spec b/specs/pki-core.spec index d661f4131..058ffe898 100644 --- a/specs/pki-core.spec +++ b/specs/pki-core.spec @@ -503,6 +503,20 @@ cd build cd build %{__make} install DESTDIR=%{buildroot} INSTALL="install -p" +# Create links in each webapp +for subsystem in ca kra ocsp tks +do + %{__mkdir_p} %{buildroot}/usr/share/pki/$subsystem/webapps/$subsystem/WEB-INF/lib + cd %{buildroot}/usr/share/pki/$subsystem/webapps/$subsystem/WEB-INF/lib + ln -s "%{_javadir}/pki/pki-$subsystem.jar" + ln -s "%{_javadir}/pki/pki-certsrv.jar" + ln -s "%{_javadir}/pki/pki-cmsbundle.jar" + ln -s "%{_javadir}/pki/pki-cmscore.jar" + ln -s "%{_javadir}/pki/pki-cms.jar" + ln -s "%{_javadir}/pki/pki-cmsutil.jar" + ln -s "%{_javadir}/pki/pki-nsutil.jar" +done + # Fedora 18 and 17: Substitute 'tomcat7jss.jar' for 'tomcatjss.jar' %if 0%{?fedora} <= 18 sed -i -e 's/grant codeBase "file:\/usr\/share\/java\/tomcatjss.jar" {/grant codeBase "file:\/usr\/share\/java\/tomcat7jss.jar" {/' %{buildroot}%{_datadir}/pki/server/conf/pki.policy -- cgit