summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Šulc <fordfrog@gentoo.org>2011-12-24 20:21:51 +0000
committerMiroslav Šulc <fordfrog@gentoo.org>2011-12-24 20:21:51 +0000
commit1dbabed16564945109e83e331279269258494913 (patch)
tree1a4e8552f58163d84fde45b1d9ebfec7487dbc1d /www-servers/tomcat
parentVersion bump (diff)
downloadgentoo-2-1dbabed16564945109e83e331279269258494913.tar.gz
gentoo-2-1dbabed16564945109e83e331279269258494913.tar.bz2
gentoo-2-1dbabed16564945109e83e331279269258494913.zip
www-servers/tomcat: tomcat 5.5 moved to java-overlay
(Portage version: 2.1.10.43/cvs/Linux x86_64)
Diffstat (limited to 'www-servers/tomcat')
-rw-r--r--www-servers/tomcat/ChangeLog14
-rw-r--r--www-servers/tomcat/files/5.5/26-main_tomcat_catalina_jasper_build_xml.patch429
-rw-r--r--www-servers/tomcat/files/5.5/5.5.27-dynamic-JSSE13Factory.patch45
-rw-r--r--www-servers/tomcat/files/5.5/build-jspc-classpath.patch42
-rw-r--r--www-servers/tomcat/files/5.5/catalina.policy261
-rw-r--r--www-servers/tomcat/files/5.5/examples-cal.patch11
-rw-r--r--www-servers/tomcat/files/5.5/jsr152_jsr154_examples_build_xml.patch71
-rw-r--r--www-servers/tomcat/files/5.5/tomcat.conf.279
-rwxr-xr-xwww-servers/tomcat/files/5.5/tomcat.init.2111
-rw-r--r--www-servers/tomcat/metadata.xml3
-rw-r--r--www-servers/tomcat/tomcat-5.5.27-r4.ebuild310
-rw-r--r--www-servers/tomcat/tomcat-5.5.27-r5.ebuild311
12 files changed, 13 insertions, 1674 deletions
diff --git a/www-servers/tomcat/ChangeLog b/www-servers/tomcat/ChangeLog
index d214671006ba..1c8b90a33c66 100644
--- a/www-servers/tomcat/ChangeLog
+++ b/www-servers/tomcat/ChangeLog
@@ -1,6 +1,18 @@
# ChangeLog for www-servers/tomcat
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v 1.274 2011/12/24 19:50:24 fordfrog Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v 1.275 2011/12/24 20:21:51 fordfrog Exp $
+
+ 24 Dec 2011; Miroslav Šulc <fordfrog@gentoo.org>
+ -files/5.5/26-main_tomcat_catalina_jasper_build_xml.patch,
+ -tomcat-5.5.27-r5.ebuild, -files/5.5/5.5.27-dynamic-JSSE13Factory.patch,
+ -files/5.5/build-jspc-classpath.patch, -files/5.5/catalina.policy,
+ -files/5.5/examples-cal.patch,
+ -files/5.5/jsr152_jsr154_examples_build_xml.patch, -files/5.5/tomcat.conf.2,
+ -files/5.5/tomcat.init.2, -tomcat-5.5.27-r4.ebuild, metadata.xml:
+ Tomcat 5.5 moved from main tree to java-overlay because it's heading towards
+ its EOL in 2012-09-30. Also the current version (5.5.27) is affected by
+ several security issues and it is unmaintained in our main tree. If you need
+ to use Tomcat 5.5, please use the ebuilds from java-overlay.
*tomcat-7.0.23-r3 (24 Dec 2011)
diff --git a/www-servers/tomcat/files/5.5/26-main_tomcat_catalina_jasper_build_xml.patch b/www-servers/tomcat/files/5.5/26-main_tomcat_catalina_jasper_build_xml.patch
deleted file mode 100644
index 80f211d1c45e..000000000000
--- a/www-servers/tomcat/files/5.5/26-main_tomcat_catalina_jasper_build_xml.patch
+++ /dev/null
@@ -1,429 +0,0 @@
-diff -Naur apache-tomcat-5.5.26-src_orig/build/build.xml apache-tomcat-5.5.26-src/build/build.xml
---- apache-tomcat-5.5.26-src_orig/build/build.xml 2008-02-05 12:47:08.000000000 -0500
-+++ apache-tomcat-5.5.26-src/build/build.xml 2008-02-05 13:06:06.000000000 -0500
-@@ -161,6 +161,7 @@
-
- <!-- ====================== DEPLOY: Copy Static Files =================== -->
- <target name="deploy-static" depends="init">
-+<!--
- <copy file="${jsp-api.jar}" todir="${tomcat.build}/common/lib"/>
- <copy file="${servlet-api.jar}" todir="${tomcat.build}/common/lib"/>
-
-@@ -179,9 +180,10 @@
- <copy tofile="${tomcat.build}/bin/tomcat-native.tar.gz"
- file="${tomcat-native.tar.gz}" />
-
-- <!-- <copy todir="${tomcat.build}/common/lib" file="${ant.jar}"/>
-- <copy todir="${tomcat.build}/common/lib" file="${ant-launcher.jar}"/> -->
-+ <copy todir="${tomcat.build}/common/lib" file="${ant.jar}"/>
-+ <copy todir="${tomcat.build}/common/lib" file="${ant-launcher.jar}"/>
- <copy todir="${tomcat.build}/common/lib" file="${jasper-compiler-jdt.jar}"/>
-+-->
- </target>
-
- <!-- ====================== Build all components =================== -->
-@@ -413,15 +415,14 @@
- <target name="build-webapps-precompile"
- depends="init" description="Precompile webapps" >
-
-+ <antcall target="build-webapp-precompile-admin" />
-+ <antcall target="build-webapp-precompile-examples" />
-+
- <!-- JSPC -->
-- <property name="admin.base" location="${tomcat.build}/server/webapps/admin" />
- <property name="ROOT.base" location="${tomcat.build}/webapps/ROOT" />
-- <property name="jsp-examples.base" location="${tomcat.build}/webapps/jsp-examples" />
-
-- <mkdir dir="${admin.base}/WEB-INF/src/admin" />
- <mkdir dir="${ROOT.base}/WEB-INF/src" />
- <mkdir dir="${ROOT.base}/WEB-INF/classes" />
-- <mkdir dir="${jsp-examples.base}/WEB-INF/src" />
-
- <path id="jspc.classpath">
- <pathelement location="${java.home}/../lib/tools.jar"/>
-@@ -455,23 +456,6 @@
- addWebXmlMappings="true"
- outputDir="${ROOT.base}/WEB-INF/src" />
-
-- <jasper2
-- compile="false"
-- validateXml="false"
-- uriroot="${jsp-examples.base}"
-- webXmlFragment="${jsp-examples.base}/WEB-INF/generated_web.xml"
-- addWebXmlMappings="true"
-- outputDir="${jsp-examples.base}/WEB-INF/src" />
--
-- <jasper2
-- package="admin"
-- compile="false"
-- validateXml="false"
-- uriroot="${admin.base}"
-- webXmlFragment="${admin.base}/WEB-INF/generated_web.xml"
-- addWebXmlMappings="true"
-- outputDir="${admin.base}/WEB-INF/src/admin" />
--
- <javac destdir="${ROOT.base}/WEB-INF/classes"
- optimize="off"
- debug="${compile.debug}"
-@@ -492,64 +476,92 @@
- </classpath>
- <include name="**" />
- </javac>
-+ </target>
-+
-+ <target name="build-webapp-precompile-admin" unless="admin.precompile.notrequired">
-+ <property name="admin.base" location="${tomcat.build}/server/webapps/admin" />
-+ <mkdir dir="${admin.base}/WEB-INF/src/admin" />
-+ <taskdef classname="org.apache.jasper.JspC" name="jasper2" >
-+ <classpath refid="jspc.classpath"/>
-+ </taskdef>
-+ <jasper2
-+ package="admin"
-+ compile="false"
-+ validateXml="false"
-+ uriroot="${admin.base}"
-+ webXmlFragment="${admin.base}/WEB-INF/generated_web.xml"
-+ addWebXmlMappings="true"
-+ outputDir="${admin.base}/WEB-INF/src/admin" />
-+ <javac destdir="${admin.base}/WEB-INF/classes"
-+ optimize="off"
-+ debug="${compile.debug}"
-+ deprecation="${compile.deprecation}"
-+ source="${compile.source}"
-+ failonerror="false"
-+ srcdir="${admin.base}/WEB-INF/src"
-+ excludes="**/*.smap">
-+ <classpath>
-+ <pathelement location="${java.home}/../lib/tools.jar"/>
-+ <fileset dir="${tomcat.build}/server/lib">
-+ <include name="*.jar"/>
-+ </fileset>
-+ <fileset dir="${admin.base}/WEB-INF/lib">
-+ <include name="*.jar"/>
-+ </fileset>
-+ <fileset dir="${tomcat.build}/common/lib">
-+ <include name="*.jar"/>
-+ </fileset>
-+ <pathelement location="${tomcat.build}/classes"/>
-+ </classpath>
-+ <include name="admin/**" />
-+ </javac>
-+ </target>
-
-+ <target name="build-webapp-precompile-examples" unless="examples.precompile.notrequired">
-+ <property name="jsp-examples.base" location="${tomcat.build}/webapps/jsp-examples" />
-+ <mkdir dir="${jsp-examples.base}/WEB-INF/src" />
-+ <taskdef classname="org.apache.jasper.JspC" name="jasper2" >
-+ <classpath refid="jspc.classpath"/>
-+ </taskdef>
-+ <jasper2
-+ compile="false"
-+ validateXml="false"
-+ uriroot="${jsp-examples.base}"
-+ webXmlFragment="${jsp-examples.base}/WEB-INF/generated_web.xml"
-+ addWebXmlMappings="true"
-+ outputDir="${jsp-examples.base}/WEB-INF/src" />
- <mkdir dir="${jsp-examples.base}/WEB-INF/src/tags"/>
- <copy todir="${jsp-examples.base}/WEB-INF/classes">
- <fileset dir="${jsp-examples.base}/WEB-INF/src">
- <include name="**/*.class" />
- </fileset>
- </copy>
--
- <javac destdir="${jsp-examples.base}/WEB-INF/classes"
-- optimize="off"
-- debug="${compile.debug}"
-- deprecation="${compile.deprecation}"
-- source="${compile.source}"
-- failonerror="false"
-+ optimize="off"
-+ debug="${compile.debug}"
-+ deprecation="${compile.deprecation}"
-+ source="${compile.source}"
-+ failonerror="false"
- srcdir="${jsp-examples.base}/WEB-INF/src"
-- excludes="**/*.smap">
-- <classpath>
-- <pathelement location="${java.home}/../lib/tools.jar"/>
-- <fileset dir="${tomcat.build}/server/lib">
-- <include name="*.jar"/>
-- </fileset>
-+ excludes="**/*.smap">
-+ <classpath>
-+ <pathelement location="${java.home}/../lib/tools.jar"/>
-+ <fileset dir="${tomcat.build}/server/lib">
-+ <include name="*.jar"/>
-+ </fileset>
- <fileset dir="${jsp-examples.base}/WEB-INF/lib">
-- <include name="*.jar"/>
-- </fileset>
-- <fileset dir="${tomcat.build}/common/lib">
-- <include name="*.jar"/>
-- </fileset>
-- <pathelement location="${tomcat.build}/classes"/>
-+ <include name="*.jar"/>
-+ </fileset>
-+ <fileset dir="${tomcat.build}/common/lib">
-+ <include name="*.jar"/>
-+ </fileset>
-+ <pathelement location="${tomcat.build}/classes"/>
- <pathelement location="${jsp-examples.base}/WEB-INF/classes"/>
-- </classpath>
-+ </classpath>
- <include name="**" />
- <exclude name="tags/**" />
-- </javac>
--
-- <javac destdir="${admin.base}/WEB-INF/classes"
-- optimize="off"
-- debug="${compile.debug}"
-- deprecation="${compile.deprecation}"
-- source="${compile.source}"
-- failonerror="false"
-- srcdir="${admin.base}/WEB-INF/src"
-- excludes="**/*.smap">
-- <classpath>
-- <pathelement location="${java.home}/../lib/tools.jar"/>
-- <fileset dir="${tomcat.build}/server/lib">
-- <include name="*.jar"/>
-- </fileset>
-- <fileset dir="${admin.base}/WEB-INF/lib">
-- <include name="*.jar"/>
-- </fileset>
-- <fileset dir="${tomcat.build}/common/lib">
-- <include name="*.jar"/>
-- </fileset>
-- <pathelement location="${tomcat.build}/classes"/>
-- </classpath>
-- <include name="admin/**" />
-- </javac>
-- </target>
-+ </javac>
-+ </target>
-
- <target name="build-catalina" depends="init"
- description="Builds catalina">
-@@ -676,7 +688,7 @@
- <param name="sourcefile" value="${commons-collections-src.loc}"/>
- <param name="destfile" value="${tomcat-dbcp.jar}" />
- </antcall>
-- -->
-+
- <antcall target="downloadgz">
- <param name="sourcefile" value="${commons-pool-src.loc}"/>
- <param name="destfile" value="${tomcat-dbcp.jar}" />
-@@ -694,6 +706,7 @@
- <param name="destdir" value="${base.path}"/>
- </antcall>
- <antcall target="build-jasper-compiler-jdt" />
-+-->
- </target>
-
- <target name="build-tomcat-dbcp">
-@@ -773,14 +786,7 @@
- </jar>
- </target>
-
-- <target name="build-webapps" depends="init"
-- description="build webapps">
--
-- <echo>========== Building: webapps </echo>
--
-- <mkdir dir="${tomcat.build}/webapps" />
-- <mkdir dir="${tomcat.build}/server/webapps" />
--
-+ <target name="build-examples" unless="examples.build.notrequired">
- <!-- The build files are far too difficult to hack - just build it and copy -->
- <ant dir="${api.home}/jsr154" target="dist">
- </ant>
-@@ -798,6 +804,17 @@
- <exclude name="WEB-INF/tagPlugins.xml" />
- </fileset>
- </copy>
-+ </target>
-+
-+ <target name="build-webapps" depends="init"
-+ description="build webapps">
-+
-+ <echo>========== Building: webapps </echo>
-+
-+ <mkdir dir="${tomcat.build}/webapps" />
-+ <mkdir dir="${tomcat.build}/server/webapps" />
-+
-+ <antcall target="build-examples" />
-
- <ant dir="${catalina.home}/webapps/ROOT" target="build-main">
- <property name="webapps.build" value="${tomcat.build}/webapps" />
-@@ -869,14 +886,7 @@
- filtering="true" />
-
- <!-- Build JARs for webapps classes -->
-- <mkdir dir="${tomcat.build}/server/webapps/admin/WEB-INF/lib" />
-- <jar jarfile="${tomcat.build}/server/webapps/admin/WEB-INF/lib/catalina-admin.jar"
-- index="true">
-- <fileset dir="${tomcat.build}/server/webapps/admin/WEB-INF/classes">
-- <include name="**/*.class" />
-- <include name="**/*.properties" />
-- </fileset>
-- </jar>
-+ <antcall target="fix-admin-webapp" />
- <mkdir dir="${tomcat.build}/server/webapps/manager/WEB-INF/lib" />
- <jar jarfile="${tomcat.build}/server/webapps/manager/WEB-INF/lib/catalina-manager.jar"
- index="true">
-@@ -915,9 +925,19 @@
- todir="${tomcat.build}/conf/Catalina/localhost" />
- <copy file="${tomcat.build}/server/webapps/host-manager/host-manager.xml"
- todir="${tomcat.build}/conf/Catalina/localhost" />
-+ </target>
-+
-+ <target name="fix-admin-webapp" unless="admin.build.notrequired">
-+ <mkdir dir="${tomcat.build}/server/webapps/admin/WEB-INF/lib" />
-+ <jar jarfile="${tomcat.build}/server/webapps/admin/WEB-INF/lib/catalina-admin.jar"
-+ index="true">
-+ <fileset dir="${tomcat.build}/server/webapps/admin/WEB-INF/classes">
-+ <include name="**/*.class" />
-+ <include name="**/*.properties" />
-+ </fileset>
-+ </jar>
- <copy file="${tomcat.build}/server/webapps/admin/admin.xml"
- todir="${tomcat.build}/conf/Catalina/localhost" />
--
- </target>
-
- <!-- ====================== Embed target =================== -->
-@@ -1060,11 +1080,11 @@
- <!-- ====================== Compat target =================== -->
-
- <target name="compat" description="Create compatibility binaries for JREs before 1.5" >
--
-+<!--
- <copy todir="${tomcat.compat}/common/endorsed" file="${xercesImpl.jar}"/>
- <copy todir="${tomcat.compat}/common/endorsed" file="${xml-apis.jar}"/>
- <copy tofile="${tomcat.compat}/bin/jmx.jar" file="${jmx.jar}"/>
--
-+-->
- </target>
-
- <!-- ====================== DEPLOY: Deploy Components =================== -->
-@@ -1108,11 +1128,11 @@
- <fileset dir="${api.home}/jsr154/build/examples"/>
- </copy>
-
-- <!-- Copy Unix JSVC from commons-daemon -->
-+ <!-- Copy Unix JSVC from commons-daemon
- <copy file="${commons-daemon.jsvc.tar.gz}"
- tofile="${tomcat.dist}/bin/jsvc.tar.gz" />
- <copy todir="${tomcat.build}/bin" file="${commons-daemon.jar}" />
--
-+ -->
- <echo>Target: Webapps precompilation ...</echo>
-
- <antcall target="build-admin"/>
-@@ -1213,11 +1233,11 @@
- <target name="run-tester"
- description="Catalina Tests" depends="dist-tester">
-
-- <!-- For Java 1.4 -->
-+ <!-- For Java 1.4
- <copy file="${jmx.jar}" tofile="${tomcat.build}/bin/jmx.jar" />
- <copy todir="${tomcat.build}/common/endorsed" file="${xercesImpl.jar}"/>
- <copy todir="${tomcat.build}/common/endorsed" file="${xml-apis.jar}"/>
--
-+ -->
- <parallel>
-
- <java classname="LauncherBootstrap" fork="yes">
-@@ -1898,7 +1918,7 @@
- description="Download binary packages" >
- <mkdir dir="${base.path}" />
-
-- <!-- Download any sub package or tools needed. -->
-+ <!-- Download any sub package or tools needed.
- <antcall target="downloadgz">
- <param name="sourcefile" value="${commons-beanutils.loc}"/>
- <param name="destfile" value="${commons-beanutils.jar}"/>
-@@ -1935,7 +1955,6 @@
- </antcall>
-
- <antcall target="downloadgz">
-- <!-- xerces2 brings 2 files, test for one of them -->
- <param name="sourcefile" value="${xerces.loc}"/>
- <param name="destfile" value="${xml-apis.jar}"/>
- </antcall>
-@@ -1977,7 +1996,7 @@
- <param name="destfile" value="${tomcat-native.tar.gz}"/>
- <param name="destdir" value="${tomcat-native.home}"/>
- </antcall>
--
-+ -->
- <!-- Build the dependencies that are not yet released -->
- <antcall target="build-depends"/>
-
-diff -Naur apache-tomcat-5.5.26-src_orig/build.xml apache-tomcat-5.5.26-src/build.xml
---- apache-tomcat-5.5.26-src_orig/build.xml 2008-02-05 12:47:07.000000000 -0500
-+++ apache-tomcat-5.5.26-src/build.xml 2008-02-05 13:06:35.000000000 -0500
-@@ -81,13 +81,10 @@
-
- <target name="checkout"
- description="Update or checkout required sources from SVN">
--
-+<!--
- <echo level="info"
- message="If the checkout fails, see http://tomcat.apache.org/svn.html and http://subversion.tigris.org/faq.html#proxy" />
-
-- <!-- Bugzilla 37977: http://issues.apache.org/bugzilla/show_bug.cgi?id=37977 -->
-- <!-- hackish: inputstring="t${line.separator}" is t+<enter> for svn -->
-- <!-- to temporarily accept the certificate of svn.apache.org. -->
- <exec dir="${basedir}"
- executable="svn"
- inputstring="t${line.separator}"
-@@ -96,7 +93,7 @@
- <arg value="${svnroot}/${current.loc}" />
- <arg value="${basedir}" />
- </exec>
--
-+-->
- </target>
-
- <!-- *************** UTILITY TARGETS *************** -->
-diff -Naur apache-tomcat-5.5.26-src_orig/container/catalina/build.xml apache-tomcat-5.5.26-src/container/catalina/build.xml
---- apache-tomcat-5.5.26-src_orig/container/catalina/build.xml 2008-02-05 12:47:08.000000000 -0500
-+++ apache-tomcat-5.5.26-src/container/catalina/build.xml 2008-02-05 13:14:29.000000000 -0500
-@@ -77,6 +77,7 @@
- <pathelement location="${jaas.jar}"/>
- <pathelement location="${javagroups.jar}"/>
- <pathelement location="${jcert.jar}"/>
-+ <pathelement location="${jdt.jar}"/>
- <pathelement location="${jmx.jar}"/>
- <pathelement location="${jmx-remote.jar}"/>
- <pathelement location="${jndi.jar}"/>
-@@ -108,6 +109,7 @@
- <pathelement location="${commons-modeler.jar}"/>
- <pathelement location="${jaas.jar}"/>
- <pathelement location="${jcert.jar}"/>
-+ <pathelement location="${jdt.jar}"/>
- <pathelement location="${jmx.jar}"/>
- <pathelement location="${jndi.jar}"/>
- <pathelement location="${jnet.jar}"/>
-@@ -565,9 +567,9 @@
- file="${commons-logging-api.jar}"/>
- <!--
- <copy todir="${catalina.build}/common/lib" file="${servlet-api.jar}"/>
---->
- <copy todir="${catalina.build}/common/lib"
- file="${tomcat-dbcp.jar}" />
-+-->
-
- <!-- Configuration Files -->
- <copy todir="${catalina.build}/conf">
-diff -Naur apache-tomcat-5.5.26-src_orig/jasper/build.xml apache-tomcat-5.5.26-src/jasper/build.xml
---- apache-tomcat-5.5.26-src_orig/jasper/build.xml 2008-02-05 12:47:07.000000000 -0500
-+++ apache-tomcat-5.5.26-src/jasper/build.xml 2008-02-05 13:14:58.000000000 -0500
-@@ -47,6 +47,7 @@
- <pathelement location="${jsp-api.jar}"/>
- <pathelement location="${tools.jar}"/>
- <pathelement location="${jasper-compiler-jdt.jar}"/>
-+ <pathelement location="${jdt.jar}"/>
- <pathelement location="${xerces.jar}"/>
- <pathelement location="${xercesImpl.jar}"/>
- <pathelement location="${xml-apis.jar}"/>
diff --git a/www-servers/tomcat/files/5.5/5.5.27-dynamic-JSSE13Factory.patch b/www-servers/tomcat/files/5.5/5.5.27-dynamic-JSSE13Factory.patch
deleted file mode 100644
index 6dd5d7519ef2..000000000000
--- a/www-servers/tomcat/files/5.5/5.5.27-dynamic-JSSE13Factory.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-Index: util/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java
-===================================================================
---- connectors/util/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java (revision 696420)
-+++ connectors/util/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java (working copy)
-@@ -49,27 +49,22 @@
- public JSSEImplementation() throws ClassNotFoundException {
- // Check to see if JSSE is floating around somewhere
- Class.forName(SSLSocketClass);
-+ String className;
- if( JdkCompat.isJava15() ) {
-- try {
-- Class factcl = Class.forName(JSSE15Factory);
-- factory = (JSSEFactory)factcl.newInstance();
-- } catch(Exception ex) {
-- if(logger.isDebugEnabled())
-- logger.debug("Error getting factory: " + JSSE15Factory, ex);
-- }
-+ className = JSSE15Factory;
- }
-- if(factory == null && JdkCompat.isJava14() ) {
-- try {
-- Class factcl = Class.forName(JSSE14Factory);
-- factory = (JSSEFactory)factcl.newInstance();
-- } catch(Exception ex) {
-- if(logger.isDebugEnabled()) {
-- logger.debug("Error getting factory: " + JSSE14Factory, ex);
-- }
-- }
-- } if(factory == null) {
-- factory = new JSSE13Factory();
-+ else if( JdkCompat.isJava14() ) {
-+ className = JSSE14Factory;
-+ } else {
-+ className = JSSE13Factory;
- }
-+
-+ try {
-+ factory = (JSSEFactory) Class.forName(className).newInstance();
-+ } catch(Exception ex) {
-+ if(logger.isDebugEnabled())
-+ logger.debug("Error getting factory: " + className, ex);
-+ }
- }
-
-
diff --git a/www-servers/tomcat/files/5.5/build-jspc-classpath.patch b/www-servers/tomcat/files/5.5/build-jspc-classpath.patch
deleted file mode 100644
index 3c34001428fd..000000000000
--- a/www-servers/tomcat/files/5.5/build-jspc-classpath.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-Index: apache-tomcat-5.5.27-src/build/build.xml
-===================================================================
---- apache-tomcat-5.5.27-src.orig/build/build.xml
-+++ apache-tomcat-5.5.27-src/build/build.xml
-@@ -412,18 +412,6 @@
- <touch file="${tomcat.build}/server/webapps/admin/WEB-INF/web.xml" />
- </target>
-
-- <target name="build-webapps-precompile"
-- depends="init" description="Precompile webapps" >
--
-- <antcall target="build-webapp-precompile-admin" />
-- <antcall target="build-webapp-precompile-examples" />
--
-- <!-- JSPC -->
-- <property name="ROOT.base" location="${tomcat.build}/webapps/ROOT" />
--
-- <mkdir dir="${ROOT.base}/WEB-INF/src" />
-- <mkdir dir="${ROOT.base}/WEB-INF/classes" />
--
- <path id="jspc.classpath">
- <pathelement location="${java.home}/../lib/tools.jar"/>
- <pathelement location="${commons-logging.jar}"/>
-@@ -444,6 +432,18 @@
- </fileset>
- </path>
-
-+ <target name="build-webapps-precompile"
-+ depends="init" description="Precompile webapps" >
-+
-+ <antcall target="build-webapp-precompile-admin" />
-+ <antcall target="build-webapp-precompile-examples" />
-+
-+ <!-- JSPC -->
-+ <property name="ROOT.base" location="${tomcat.build}/webapps/ROOT" />
-+
-+ <mkdir dir="${ROOT.base}/WEB-INF/src" />
-+ <mkdir dir="${ROOT.base}/WEB-INF/classes" />
-+
- <taskdef classname="org.apache.jasper.JspC" name="jasper2" >
- <classpath refid="jspc.classpath"/>
- </taskdef>
diff --git a/www-servers/tomcat/files/5.5/catalina.policy b/www-servers/tomcat/files/5.5/catalina.policy
deleted file mode 100644
index 8392623ae4ab..000000000000
--- a/www-servers/tomcat/files/5.5/catalina.policy
+++ /dev/null
@@ -1,261 +0,0 @@
-// ============================================================================
-// catalina.corepolicy - Security Policy Permissions for Tomcat 5
-//
-// This file contains a default set of security policies to be enforced (by the
-// JVM) when Catalina is executed with the "-security" option. In addition
-// to the permissions granted here, the following additional permissions are
-// granted to the codebase specific to each web application:
-//
-// * Read access to the document root directory
-//
-// $Id: catalina.policy,v 1.1 2007/05/15 04:37:21 wltjr Exp $
-// ============================================================================
-
-
-// ========== SYSTEM CODE PERMISSIONS =========================================
-
-
-// These permissions apply to javac
-grant codeBase "file:${java.home}/lib/-" {
- permission java.security.AllPermission;
-};
-
-// These permissions apply to all shared system extensions
-grant codeBase "file:${java.home}/jre/lib/ext/-" {
- permission java.security.AllPermission;
-};
-
-// These permissions apply to javac when ${java.home] points at $JAVA_HOME/jre
-grant codeBase "file:${java.home}/../lib/-" {
- permission java.security.AllPermission;
-};
-
-// These permissions apply to all shared system extensions when
-// ${java.home} points at $JAVA_HOME/jre
-grant codeBase "file:${java.home}/lib/ext/-" {
- permission java.security.AllPermission;
-};
-
-
-// ========== CATALINA CODE PERMISSIONS =======================================
-
-
-// These permissions apply to the launcher code
-grant codeBase "file:${catalina.home}/bin/commons-launcher.jar" {
- permission java.security.AllPermission;
-};
-
-// These permissions apply to the daemon code
-grant codeBase "file:${catalina.home}/bin/commons-daemon.jar" {
- permission java.security.AllPermission;
-};
-
-// These permissions apply to the commons-logging API
-grant codeBase "file:${catalina.home}/bin/commons-logging-api.jar" {
- permission java.security.AllPermission;
-};
-
-// These permissions apply to the server startup code
-grant codeBase "file:${catalina.home}/bin/bootstrap.jar" {
- permission java.security.AllPermission;
-};
-
-// These permissions apply to JULI
-grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {
- permission java.security.AllPermission;
-};
-
-// These permissions apply to the servlet API classes
-// and those that are shared across all class loaders
-// located in the "common" directory
-grant codeBase "file:${catalina.home}/common/-" {
- permission java.security.AllPermission;
-};
-
-grant codeBase "file:${catalina.home}/-" {
- permission java.security.AllPermission;
-};
-// symlinks must be written separately (?)
-grant codeBase "file:${catalina.home}/common/lib/ant-bootstrap.jar" {
- permission java.security.AllPermission;
-};
-grant codeBase "file:${catalina.home}/common/lib/ant.jar" {
- permission java.security.AllPermission;
-};
-grant codeBase "file:${catalina.home}/common/lib/ant-launcher.jar" {
- permission java.security.AllPermission;
-};
-grant codeBase "file:${catalina.home}/common/lib/commons-collections.jar" {
- permission java.security.AllPermission;
-};
-grant codeBase "file:${catalina.home}/common/lib/commons-dbcp.jar" {
- permission java.security.AllPermission;
-};
-grant codeBase "file:${catalina.home}/common/lib/commons-el.jar" {
- permission java.security.AllPermission;
-};
-grant codeBase "file:${catalina.home}/common/lib/commons-pool.jar" {
- permission java.security.AllPermission;
-};
-grant codeBase "file:${catalina.home}/common/lib/jasper-compiler.jar" {
- permission java.security.AllPermission;
-};
-grant codeBase "file:${catalina.home}/common/lib/jasper-runtime.jar" {
- permission java.security.AllPermission;
-};
-grant codeBase "file:${catalina.home}/common/lib/jsp-api.jar" {
- permission java.security.AllPermission;
-};
-grant codeBase "file:${catalina.home}/common/lib/naming-factory.jar" {
- permission java.security.AllPermission;
-};
-grant codeBase "file:${catalina.home}/common/lib/naming-resources.jar" {
- permission java.security.AllPermission;
-};
-grant codeBase "file:${catalina.home}/common/lib/servlet-api.jar" {
- permission java.security.AllPermission;
-};
-
-// These permissions apply to the container's core code, plus any additional
-// libraries installed in the "server" directory
-grant codeBase "file:${catalina.home}/server/-" {
- permission java.security.AllPermission;
-};
-// symlinks must be written separately (?)
-grant codeBase "file:${catalina.home}/server/lib/catalina-ant.jar" {
- permission java.security.AllPermission;
-};
-grant codeBase "file:${catalina.home}/server/lib/catalina-ant-jmx.jar" {
- permission java.security.AllPermission;
-};
-grant codeBase "file:${catalina.home}/server/lib/catalina-cluster.jar" {
- permission java.security.AllPermission;
-};
-grant codeBase "file:${catalina.home}/server/lib/catalina.jar" {
- permission java.security.AllPermission;
-};
-grant codeBase "file:${catalina.home}/server/lib/catalina-optional.jar" {
- permission java.security.AllPermission;
-};
-grant codeBase "file:${catalina.home}/server/lib/catalina-storeconfig.jar" {
- permission java.security.AllPermission;
-};
-grant codeBase "file:${catalina.home}/server/lib/commons-beanutils.jar" {
- permission java.security.AllPermission;
-};
-grant codeBase "file:${catalina.home}/server/lib/commons-digester.jar" {
- permission java.security.AllPermission;
-};
-grant codeBase "file:${catalina.home}/server/lib/commons-modeler.jar" {
- permission java.security.AllPermission;
-};
-grant codeBase "file:${catalina.home}/server/lib/servlets-default.jar" {
- permission java.security.AllPermission;
-};
-grant codeBase "file:${catalina.home}/server/lib/servlets-invoker.jar" {
- permission java.security.AllPermission;
-};
-grant codeBase "file:${catalina.home}/server/lib/servlets-webdav.jar" {
- permission java.security.AllPermission;
-};
-grant codeBase "file:${catalina.home}/server/lib/tomcat-ajp.jar" {
- permission java.security.AllPermission;
-};
-grant codeBase "file:${catalina.home}/server/lib/tomcat-apr.jar" {
- permission java.security.AllPermission;
-};
-grant codeBase "file:${catalina.home}/server/lib/tomcat-coyote.jar" {
- permission java.security.AllPermission;
-};
-grant codeBase "file:${catalina.home}/server/lib/tomcat-http.jar" {
- permission java.security.AllPermission;
-};
-grant codeBase "file:${catalina.home}/server/lib/tomcat-jkstatus-ant.jar" {
- permission java.security.AllPermission;
-};
-grant codeBase "file:${catalina.home}/server/lib/tomcat-util.jar" {
- permission java.security.AllPermission;
-};
-
-// ========== WEB APPLICATION PERMISSIONS =====================================
-
-
-// These permissions are granted by default to all web applications
-// In addition, a web application will be given a read FilePermission
-// and JndiPermission for all files and directories in its document root.
-grant {
- // Required for JNDI lookup of named JDBC DataSource's and
- // javamail named MimePart DataSource used to send mail
- permission java.util.PropertyPermission "java.home", "read";
- permission java.util.PropertyPermission "java.naming.*", "read";
- permission java.util.PropertyPermission "javax.sql.*", "read";
-
- // OS Specific properties to allow read access
- permission java.util.PropertyPermission "os.name", "read";
- permission java.util.PropertyPermission "os.version", "read";
- permission java.util.PropertyPermission "os.arch", "read";
- permission java.util.PropertyPermission "file.separator", "read";
- permission java.util.PropertyPermission "path.separator", "read";
- permission java.util.PropertyPermission "line.separator", "read";
-
- // JVM properties to allow read access
- permission java.util.PropertyPermission "java.version", "read";
- permission java.util.PropertyPermission "java.vendor", "read";
- permission java.util.PropertyPermission "java.vendor.url", "read";
- permission java.util.PropertyPermission "java.class.version", "read";
- permission java.util.PropertyPermission "java.specification.version", "read";
- permission java.util.PropertyPermission "java.specification.vendor", "read";
- permission java.util.PropertyPermission "java.specification.name", "read";
-
- permission java.util.PropertyPermission "java.vm.specification.version", "read";
- permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
- permission java.util.PropertyPermission "java.vm.specification.name", "read";
- permission java.util.PropertyPermission "java.vm.version", "read";
- permission java.util.PropertyPermission "java.vm.vendor", "read";
- permission java.util.PropertyPermission "java.vm.name", "read";
-
- // Required for OpenJMX
- permission java.lang.RuntimePermission "getAttribute";
-
- // Allow read of JAXP compliant XML parser debug
- permission java.util.PropertyPermission "jaxp.debug", "read";
-
- // Precompiled JSPs need access to this package.
- permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime";
- permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime.*";
-
-};
-
-
-// You can assign additional permissions to particular web applications by
-// adding additional "grant" entries here, based on the code base for that
-// application, /WEB-INF/classes/, or /WEB-INF/lib/ jar files.
-//
-// Different permissions can be granted to JSP pages, classes loaded from
-// the /WEB-INF/classes/ directory, all jar files in the /WEB-INF/lib/
-// directory, or even to individual jar files in the /WEB-INF/lib/ directory.
-//
-// For instance, assume that the standard "examples" application
-// included a JDBC driver that needed to establish a network connection to the
-// corresponding database and used the scrape taglib to get the weather from
-// the NOAA web server. You might create a "grant" entries like this:
-//
-// The permissions granted to the context root directory apply to JSP pages.
-// grant codeBase "file:${catalina.home}/webapps/examples/-" {
-// permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
-// permission java.net.SocketPermission "*.noaa.gov:80", "connect";
-// };
-//
-// The permissions granted to the context WEB-INF/classes directory
-// grant codeBase "file:${catalina.home}/webapps/examples/WEB-INF/classes/-" {
-// };
-//
-// The permission granted to your JDBC driver
-// grant codeBase "jar:file:${catalina.home}/webapps/examples/WEB-INF/lib/driver.jar!/-" {
-// permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
-// };
-// The permission granted to the scrape taglib
-// grant codeBase "jar:file:${catalina.home}/webapps/examples/WEB-INF/lib/scrape.jar!/-" {
-// permission java.net.SocketPermission "*.noaa.gov:80", "connect";
-// };
-
diff --git a/www-servers/tomcat/files/5.5/examples-cal.patch b/www-servers/tomcat/files/5.5/examples-cal.patch
deleted file mode 100644
index 2ede06dc3ff0..000000000000
--- a/www-servers/tomcat/files/5.5/examples-cal.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- servletapi/jsr152/examples/cal/cal2.jsp 2008-08-28 20:14:05.000000000 -0700
-+++ servletapi/jsr152/examples/cal/cal2-new.jsp 2009-03-06 08:39:44.000000000 -0800
-@@ -35,7 +35,7 @@
- <FORM METHOD=POST ACTION=cal1.jsp>
- <BR>
- <BR> <INPUT NAME="date" TYPE=HIDDEN VALUE="current">
--<BR> <INPUT NAME="time" TYPE=HIDDEN VALUE=<%= util.HTMLFilter.filter(time) %>
-+<BR> <INPUT NAME="time" TYPE=HIDDEN VALUE="<%= util.HTMLFilter.filter(time) %>">
- <BR> <h2> Description of the event <INPUT NAME="description" TYPE=TEXT SIZE=20> </h2>
- <BR> <INPUT TYPE=SUBMIT VALUE="submit">
- </FORM>
diff --git a/www-servers/tomcat/files/5.5/jsr152_jsr154_examples_build_xml.patch b/www-servers/tomcat/files/5.5/jsr152_jsr154_examples_build_xml.patch
deleted file mode 100644
index 9f3a3a2f429d..000000000000
--- a/www-servers/tomcat/files/5.5/jsr152_jsr154_examples_build_xml.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-diff -Naur apache-tomcat-5.5.25-src_orig/servletapi/jsr152/build.xml apache-tomcat-5.5.25-src/servletapi/jsr152/build.xml
---- apache-tomcat-5.5.25-src_orig/servletapi/jsr152/build.xml 2007-09-08 12:24:17.000000000 -0400
-+++ apache-tomcat-5.5.25-src/servletapi/jsr152/build.xml 2007-09-08 14:14:30.000000000 -0400
-@@ -37,6 +37,7 @@
-
- <path id="examples.classpath">
- <pathelement location="${jsp-api.build}/classes"/>
-+ <pathelement location="${jsp-api.jar}"/>
- <pathelement location="${servlet-api.jar}"/>
- <pathelement location="${mail.jar}"/>
- </path>
-@@ -244,7 +245,7 @@
- <target name="jar" depends="compile"
- description="Create jar">
-
-- <!-- Prepare Manifest -->
-+ <!-- Prepare Manifest
- <copy tofile="${jsp-api.build}/manifest"
- file="src/etc/manifest" overwrite="yes">
- <filterset>
-@@ -253,13 +254,12 @@
- </filterset>
- </copy>
-
-- <!-- Create JAR file -->
- <jar jarfile="${jsp-api.jar}"
- basedir="${jsp-api.build}/classes"
- manifest="${jsp-api.build}/manifest">
- <include name="javax/servlet/jsp/**" />
- </jar>
--
-+-->
- </target>
-
- <target name="dist" depends="compile,examples,javadoc,jar"
-diff -Naur apache-tomcat-5.5.25-src_orig/servletapi/jsr154/build.xml apache-tomcat-5.5.25-src/servletapi/jsr154/build.xml
---- apache-tomcat-5.5.25-src_orig/servletapi/jsr154/build.xml 2007-09-08 12:24:17.000000000 -0400
-+++ apache-tomcat-5.5.25-src/servletapi/jsr154/build.xml 2007-09-08 14:10:08.000000000 -0400
-@@ -34,6 +34,7 @@
- <property name="servlet-api.jar" value="${servlet-api.dist}/lib/servlet-api.jar"/>
- <path id="examples.classpath">
- <pathelement location="${servlet-api.build}/classes"/>
-+ <pathelement location="${servlet-api.jar}"/>
- </path>
-
-
-@@ -142,7 +143,7 @@
- <target name="jar" depends="compile"
- description="Create the jar">
-
-- <!-- Prepare Manifest -->
-+ <!-- Prepare Manifest
- <copy tofile="${servlet-api.build}/manifest"
- file="src/etc/manifest" overwrite="yes">
- <filterset>
-@@ -151,14 +152,13 @@
- </filterset>
- </copy>
-
-- <!-- Create JAR file -->
- <jar jarfile="${servlet-api.jar}"
- basedir="${servlet-api.build}/classes"
- manifest="${servlet-api.build}/manifest">
- <include name="javax/servlet/**"/>
- <exclude name="javax/servlet/jsp/**"/>
- </jar>
--
-+-->
- </target>
-
- <target name="dist" depends="compile,examples,javadoc,jar"
diff --git a/www-servers/tomcat/files/5.5/tomcat.conf.2 b/www-servers/tomcat/files/5.5/tomcat.conf.2
deleted file mode 100644
index 88e00c7d613b..000000000000
--- a/www-servers/tomcat/files/5.5/tomcat.conf.2
+++ /dev/null
@@ -1,79 +0,0 @@
-# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/files/5.5/tomcat.conf.2,v 1.4 2008/12/19 20:48:47 ali_bush Exp $
-
-# JVM Runtime
-# Using the default setting, it will determine your JVM from the system-vm
-# set using java-config.
-# See java-config(1) manual page for assistance in determining this value.
-#
-# You can override this value with whatever path you wish.
-# Example: export GENTOO_VM="sun-jdk-1.5"
-
-#export GENTOO_VM="sun-jdk-1.5"
-
-# (Optional) Java runtime options used when the "start", "stop", or "run"
-# commands are executed.
-# Example to set library path for tomcat-native
-# JAVA_OPTS="-Djava.library.path=/usr/lib"
-# JAVA_OPTS=""
-
-# Where your web applications are located
-CATALINA_HOME=/usr/share/tomcat-5.5/
-CATALINA_BASE=/var/lib/tomcat-5.5/
-
-# Tomcat's User/Group
-# Change these at your own risk!!! These are not supported so if it
-# breaks something, you are on your own.
-CATALINA_USER=tomcat
-CATALINA_GROUP=tomcat
-
-# Location of the Tomcat JARs and classes
-CATALINA_LIBDIR=/usr/share/tomcat-5.5/server/lib/
-
-# The CLASSPATH for Tomcat to use, plus any others you need.
-CLASSPATH=${CATALINA_LIBDIR}
-
-# (Optional) Directory path location of temporary directory the JVM should
-# use (java.io.tmpdir). Defaults to $CATALINA_BASE/temp.
-# Note: This directory must exist and be read/writable by tomcat.
-# See #246362 as an example where /var/tmp was deleted on shutdown.
-CATALINA_TMPDIR="/var/tmp/tomcat-5.5/"
-
-# TOMCAT STARTUP/SHUTDOWN
-# debug Start Catalina in a debugger
-# -security debug Debug Catalina with a security manager
-# jpda start Start Catalina under JPDA debugger
-# start Start Catalina in a separate window
-# -security start Start in a separate window with security manager
-# stop Stop Catalina"
-#
-# NOTE: -security requires JSSE (see below)
-# NOTE: jpda requires JPDA (see below)
-TOMCAT_START="start"
-TOMCAT_STOP="stop"
-
-# (Optional) Java runtime options used when the "start", "stop", or "run"
-# commands are executed.
-# CATALINA_OPTS=""
-
-# Java Platform Debugger Architecture (JPDA)
-# http://java.sun.com/products/jpda/
-# Included with Java SDK 1.3 and later. No need to specify location.
-#
-# JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start"
-# command is executed. The default is "dt_socket".
-#
-# JPDA_ADDRESS (Optional) Java runtime options used when the "jpda start"
-# command is executed. The default is 8000.
-#
-# JPDA_TRANSPORT="dt_socket"
-# JPDA_ADDRESS="8000"
-
-# Java Secure Socket Extension (JSSE)
-# http://java.sun.com/products/jsse/
-# Included with Java SDK 1.4 and later.
-#
-# JSSE_HOME (Optional) May point at your Java Secure Sockets Extension
-# (JSSE) installation, whose JAR files will be added to the
-# system class path used to start Tomcat.
-#
-# JSSE_HOME="/opt/sun-jdk-1.4.1.02/jre/lib/"
diff --git a/www-servers/tomcat/files/5.5/tomcat.init.2 b/www-servers/tomcat/files/5.5/tomcat.init.2
deleted file mode 100755
index 8a3ea514a17c..000000000000
--- a/www-servers/tomcat/files/5.5/tomcat.init.2
+++ /dev/null
@@ -1,111 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/files/5.5/tomcat.init.2,v 1.8 2008/12/20 18:12:23 serkan Exp $
-
-init_env_vars() {
- if [ "$(gjl -p tomcat-5.5 --get-vm)" ] ; then
- eerror "Tomcat has been compiled with java5 USE flag set."
- eerror "Tomcat now requires a VM >=1.5 to run."
- eerror "Please check your VM version, and restart Tomcat."
- eend 1
- fi
-
- # Populate JAVA_HOME
- JAVA_HOME=`java-config --jre-home`
-
- # Set some sane defaults
- if [ -z "${CATALINA_TMPDIR}" ] ; then
- CATALINA_TMPDIR="${CATALINA_BASE}"/temp
- fi
- JPDA_TRANSPORT=${JPDA_TRANSPORT:="dt_socket"}
- JPDA_ADDRESS=${JPDA_ADDRESS:="8000"}
- JPDA_OPTS=${JPDA_OPTS="-Xdebug -Xrunjdwp:transport=${JPDA_TRANSPORT},address=${JPDA_ADDRESS},server=y,suspend=n"}
-
- # Activate Logging
- if [ -r "${CATALINA_HOME}"/bin/tomcat-juli.jar ]; then
- JAVA_OPTS="${JAVA_OPTS} -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
- -Djava.util.logging.config.file=${CATALINA_BASE}/conf/logging.properties"
- fi
-
- # Populate the classpath
- CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/server/lib:${JAVA_HOME}/lib/tools.jar"
- if [ -n "${JSSE_HOME}" ]; then
- CLASSPATH="${CLASSPATH}:${JSSE_HOME}/lib/jcert.jar:${JSSE_HOME}/lib/jnet.jar:${JSSE_HOME}/lib/jsse.jar"
- fi
- CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/bootstrap.jar:${CATALINA_HOME}/bin/commons-logging-api.jar"
-
- OPTS_CP="${JAVA_OPTS} ${CATALINA_OPTS} \
- -Djava.endorsed.dirs=${CATALINA_HOME}/common/endorsed \
- -classpath ${CLASSPATH}"
-
- CATALINA_ARGS="-Dcatalina.base=${CATALINA_BASE} \
- -Dcatalina.home=${CATALINA_HOME} \
- -Djava.io.tmpdir=${CATALINA_TMPDIR} \
- org.apache.catalina.startup.Bootstrap "
-
- if [ ! -f "${CATALINA_BASE}logs/catalina.out" ]; then
- touch "${CATALINA_BASE}logs/catalina.out"
- chown tomcat:tomcat "${CATALINA_BASE}logs/catalina.out"
- fi
-}
-
-start_helper() {
- local executor=${1}
- shift
- local arguments="--start --quiet \
- --chdir "${CATALINA_TMPDIR}" \
- --chuid ${CATALINA_USER}:${CATALINA_GROUP} \
- --make-pidfile --pidfile /var/run/tomcat-5.5.pid"
- start-stop-daemon ${arguments} --exec ${executor} -- ${OPTS_CP} "$@" \
- ${CATALINA_ARGS} ${TOMCAT_START} >> "${CATALINA_BASE}"/logs/catalina.out 2>&1 &
- return $?
-}
-
-depend() {
- use dns logger net
-}
-
-start() {
- ebegin "Starting Tomcat"
- init_env_vars
-
- if [ ! -e "${CATALINA_TMPDIR}" ]; then
- eerror "CATALINA_TMPDIR does not exist. Unable to start tomcat."
- eerror "Please see /etc/conf.d/tomcat-6 for more information."
- eend 1
- fi
-
- # Figure out what arguments to pass start_helper based on TOMCAT_START
- if [ "${TOMCAT_START}" = "debug" ] ; then
- start_helper ${JAVA_HOME}/bin/jdb \
- -sourcepath ${CATALINA_HOME}/../../jakarta-tomcat-catalina/catalina/src/share
- elif [ "${TOMCAT_START}" = "-security debug" ] ; then
- start_helper ${JAVA_HOME}/bin/jdb \
- -sourcepath ${CATALINA_HOME}/../../jakarta-tomcat-catalina/catalina/src/share \
- -Djava.security.manager \
- -Djava.security.policy=${CATALINA_BASE}/conf/catalina.policy
- elif [ "${TOMCAT_START}" = "jpda start" ] ; then
- start_helper ${JAVA_HOME}/bin/java ${JPDA_OPTS}
- elif [ "${TOMCAT_START}" = "start" ] ; then
- start_helper ${JAVA_HOME}/bin/java
- elif [ "${TOMCAT_START}" = "-security start" ] ; then
- start_helper ${JAVA_HOME}/bin/java \
- -Djava.security.manager \
- -Djava.security.policy=${CATALINA_BASE}/conf/catalina.policy
- else
- eerror "Invalid TOMCAT_START variable value, or one is not set"
- eerror "Please see /etc/conf.d/tomcat-5.5 for more information"
- eend 1
- fi
- eend $?
-}
-
-stop() {
- ebegin "Stopping Tomcat"
- init_env_vars
- start-stop-daemon --stop --quiet \
- --pidfile /var/run/tomcat-5.5.pid \
- --exec ${JAVA_HOME}/bin/java -- ${OPTS_CP} ${CATALINA_ARGS} ${STD_OUT} stop
- eend $?
-}
diff --git a/www-servers/tomcat/metadata.xml b/www-servers/tomcat/metadata.xml
index a570037ceb4a..349379c953f8 100644
--- a/www-servers/tomcat/metadata.xml
+++ b/www-servers/tomcat/metadata.xml
@@ -8,7 +8,4 @@
The Java Servlet and JavaServer Pages specifications are developed by
Sun under the Java Community Process.
</longdescription>
- <use>
- <flag name='admin'>Enable Tomcat admin webapp</flag>
- </use>
</pkgmetadata>
diff --git a/www-servers/tomcat/tomcat-5.5.27-r4.ebuild b/www-servers/tomcat/tomcat-5.5.27-r4.ebuild
deleted file mode 100644
index fdd2dbf463f6..000000000000
--- a/www-servers/tomcat/tomcat-5.5.27-r4.ebuild
+++ /dev/null
@@ -1,310 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/tomcat-5.5.27-r4.ebuild,v 1.3 2011/11/03 00:46:33 vapier Exp $
-
-EAPI="2"
-JAVA_PKG_IUSE="doc source"
-WANT_ANT_TASKS="ant-trax"
-
-inherit eutils java-pkg-2 java-ant-2 user
-
-DESCRIPTION="Tomcat Servlet-2.4/JSP-2.0 Container"
-
-MY_P="apache-${P}-src"
-SLOT="5.5"
-SRC_URI="mirror://apache/${PN}/${PN}-5/v${PV}/src/${MY_P}.tar.gz"
-HOMEPAGE="http://tomcat.apache.org/"
-KEYWORDS="amd64 -ppc -ppc64 x86 ~x86-fbsd"
-LICENSE="Apache-2.0"
-
-IUSE="admin examples test"
-
-RDEPEND="dev-java/eclipse-ecj:3.3
- dev-java/ant-eclipse-ecj:3.3
- dev-java/commons-beanutils:1.7
- >=dev-java/commons-collections-3.1
- >=dev-java/commons-daemon-1.0.1
- >=dev-java/commons-dbcp-1.2.1
- >=dev-java/commons-digester-1.7
- >=dev-java/commons-fileupload-1.1
- dev-java/commons-httpclient:0
- >=dev-java/commons-io-1.1
- >=dev-java/commons-el-1.0
- >=dev-java/commons-launcher-0.9
- >=dev-java/commons-logging-1.0.4
- >=dev-java/commons-modeler-2.0
- >=dev-java/commons-pool-1.2
- =dev-java/junit-3*
- >=dev-java/log4j-1.2.9
- >=dev-java/saxpath-1.0
- >=dev-java/tomcat-servlet-api-${PV}-r1:2.4
- dev-java/ant-core
- admin? ( dev-java/struts:1.2 )
- dev-java/sun-javamail
- >=virtual/jre-1.5"
-DEPEND=">=virtual/jdk-1.5
- ${RDEPEND}"
-
-S=${WORKDIR}/${MY_P}
-
-TOMCAT_NAME="${PN}-${SLOT}"
-WEBAPPS_DIR="/var/lib/${TOMCAT_NAME}/webapps"
-
-pkg_setup() {
- java-pkg-2_pkg_setup
- # new user for tomcat
- enewgroup tomcat
- enewuser tomcat -1 -1 /dev/null tomcat
-
- java-pkg_filter-compiler ecj-3.1 ecj-3.2
-}
-
-java_prepare() {
- epatch "${FILESDIR}/${SLOT}/26-main_tomcat_catalina_jasper_build_xml.patch"
- # https://issues.apache.org/bugzilla/show_bug.cgi?id=45827
- epatch "${FILESDIR}/${SLOT}/5.5.27-dynamic-JSSE13Factory.patch"
- epatch "${FILESDIR}/${SLOT}/examples-cal.patch"
-
- use examples && epatch "${FILESDIR}/${SLOT}/jsr152_jsr154_examples_build_xml.patch"
-
- sed -i -e 's:${struts.lib}:/usr/share/struts-1.2:' \
- "${S}/container/webapps/admin/build.xml"
-
- einfo "Removing 1.3 factories to so we don't need com.sun.*"
- rm -v connectors/util/java/org/apache/tomcat/util/net/jsse/*13* || die
-
- # avoid packed jars :-)
- mkdir -p "${S}"/build/build/common
- cd "${S}"/build/build
-
- mkdir ./bin && cd ./bin
- java-pkg_jar-from commons-logging commons-logging-api.jar
- java-pkg_jar-from commons-daemon
-
- mkdir "${S}"/build/build/common/lib && cd "${S}"/build/build/common/lib
- java-pkg_jar-from ant-core
- java-pkg_jar-from commons-collections
- java-pkg_jar-from commons-dbcp
- java-pkg_jar-from commons-el
- java-pkg_jar-from commons-pool
- java-pkg_jar-from tomcat-servlet-api-2.4
-
- mkdir -p "${S}"/build/build/server/lib && cd "${S}"/build/build/server/lib
- java-pkg_jar-from commons-beanutils-1.7 commons-beanutils.jar
- java-pkg_jar-from commons-digester
- java-pkg_jar-from commons-modeler
-
-}
-
-src_compile(){
- local antflags="-Dbase.path=${T}"
-
- antflags="${antflags} -Dservletapi.build.notrequired=true"
- antflags="${antflags} -Djspapi.build.notrequired=true"
- antflags="${antflags} -Dcommons-beanutils.jar=$(java-pkg_getjar commons-beanutils-1.7 commons-beanutils.jar)"
- antflags="${antflags} -Dcommons-collections.jar=$(java-pkg_getjars commons-collections)"
- antflags="${antflags} -Dcommons-daemon.jar=$(java-pkg_getjars commons-daemon)"
- antflags="${antflags} -Dcommons-digester.jar=$(java-pkg_getjars commons-digester)"
- antflags="${antflags} -Dcommons-dbcp.jar=$(java-pkg_getjars commons-dbcp)"
- antflags="${antflags} -Dcommons-el.jar=$(java-pkg_getjars commons-el)"
- antflags="${antflags} -Dcommons-fileupload.jar=$(java-pkg_getjars commons-fileupload)"
- antflags="${antflags} -Dcommons-httpclient.jar=$(java-pkg_getjars commons-httpclient)"
- antflags="${antflags} -Dcommons-io.jar=$(java-pkg_getjars commons-io-1)"
- antflags="${antflags} -Dcommons-launcher.jar=$(java-pkg_getjars commons-launcher)"
- antflags="${antflags} -Dcommons-logging.jar=$(java-pkg_getjar commons-logging commons-logging.jar)"
- antflags="${antflags} -Dcommons-logging-api.jar=$(java-pkg_getjar commons-logging commons-logging-api.jar)"
- antflags="${antflags} -Dcommons-pool.jar=$(java-pkg_getjars commons-pool)"
- antflags="${antflags} -Dcommons-modeler.jar=$(java-pkg_getjars commons-modeler)"
- antflags="${antflags} -Djdt.jar=$(java-pkg_getjar eclipse-ecj-3.3 ecj.jar)"
- antflags="${antflags} -Djsp-api.jar=$(java-pkg_getjar tomcat-servlet-api-2.4 jsp-api.jar)"
- antflags="${antflags} -Djunit.jar=$(java-pkg_getjars junit)"
- antflags="${antflags} -Dlog4j.jar=$(java-pkg_getjars log4j)"
- antflags="${antflags} -Dmail.jar=$(java-pkg_getjar sun-javamail mail.jar)"
- antflags="${antflags} -Dsaxpath.jar=$(java-pkg_getjar saxpath saxpath.jar)"
- antflags="${antflags} -Dservlet-api.jar=$(java-pkg_getjar tomcat-servlet-api-2.4 servlet-api.jar)"
- if use admin; then
- antflags="${antflags} -Dstruts.jar=$(java-pkg_getjar struts-1.2 struts.jar)"
- antflags="${antflags} -Dstruts.home=/usr/share/struts"
- else
- antflags="${antflags} -Dadmin.build.notrequired=true"
- antflags="${antflags} -Dadmin.precompile.notrequired=true"
- fi
- if ! use examples; then
- antflags="${antflags} -Dexamples.build.notrequired=true"
- antflags="${antflags} -Dexamples.precompile.notrequired=true"
- fi
- antflags="${antflags} -Djasper.home=${S}/jasper"
-
- eant ${antflags}
-}
-
-src_install() {
- cd "${S}"/build/build
-
- # init.d, conf.d
- newinitd "${FILESDIR}"/${SLOT}/tomcat.init.2 ${TOMCAT_NAME}
- newconfd "${FILESDIR}"/${SLOT}/tomcat.conf.2 ${TOMCAT_NAME}
-
- # create dir structure
- diropts -m755 -o tomcat -g tomcat
- dodir /usr/share/${TOMCAT_NAME}
- keepdir /var/log/${TOMCAT_NAME}/
- keepdir /var/tmp/${TOMCAT_NAME}/
- keepdir /var/run/${TOMCAT_NAME}/
-
- local CATALINA_BASE=/var/lib/${TOMCAT_NAME}/
- dodir ${CATALINA_BASE}
- keepdir ${CATALINA_BASE}/shared/lib
- keepdir ${CATALINA_BASE}/shared/classes
-
- keepdir /usr/share/${TOMCAT_NAME}/common/lib
-
- dodir /etc/${TOMCAT_NAME}
- fperms 750 /etc/${TOMCAT_NAME}
-
- diropts -m0755
-
- # we don't need dos scripts
- rm -f bin/*.bat
-
- # copy the manager and admin context's to the right position
- mkdir -p conf/Catalina/localhost
- if use admin; then
- cp "${S}"/container/webapps/admin/admin.xml \
- conf/Catalina/localhost
- fi
- cp "${S}"/container/webapps/manager/manager.xml \
- conf/Catalina/localhost
-
- # make the jars available via java-pkg_getjar and jar-from, etc
- base=$(pwd)
- libdirs="common/lib server/lib"
- for dir in ${libdirs}
- do
- cd "${dir}"
-
- for jar in *.jar;
- do
- # replace the file with a symlink
- if [ ! -L ${jar} ]; then
- java-pkg_dojar ${jar}
- rm -f ${jar}
- ln -s ${DESTTREE}/share/${TOMCAT_NAME}/lib/${jar} ${jar}
- fi
- done
-
- cd ${base}
- done
-
- # replace a packed struts.jar
- if use admin; then
- cd server/webapps/admin/WEB-INF/lib
- rm -f struts.jar
- java-pkg_jar-from struts-1.2 struts.jar
- cd ${base}
- else
- rm -fR server/webapps/admin
- fi
-
- cd server/webapps/manager/WEB-INF/lib
- java-pkg_jar-from commons-fileupload
- java-pkg_jar-from commons-io-1
- cd ${base}
-
- # replace the default pw with a random one, see #92281
- local randpw=$(echo ${RANDOM}|md5sum|cut -c 1-15)
- sed -e s:SHUTDOWN:${randpw}: -i conf/{server,server-minimal}.xml
-
- # copy over the directories
- chown -R tomcat:tomcat webapps/* conf/*
- cp -pR conf/* "${D}"/etc/${TOMCAT_NAME} || die "failed to copy conf"
- cp -HR bin common server "${D}"/usr/share/${TOMCAT_NAME} || die "failed to copy"
-
- # replace catalina.policy with gentoo specific one bug #176701
- cp "${FILESDIR}"/${SLOT}/catalina.policy "${D}"/etc/${TOMCAT_NAME} || die "failed to replace catalina.policy"
-
- keepdir ${WEBAPPS_DIR}
- set_webapps_perms "${D}"/${WEBAPPS_DIR}
-
- # Copy over webapps, some controlled by use flags
- cp -p ../RELEASE-NOTES webapps/ROOT/RELEASE-NOTES.txt
- cp -pr webapps/ROOT "${D}"${CATALINA_BASE}/webapps
- if use doc; then
- cp -pr webapps/tomcat-docs "${D}"${CATALINA_BASE}/webapps
- fi
- if use examples; then
- cp -pr webapps/{jsp-examples,servlets-examples,webdav} \
- "${D}"${CATALINA_BASE}/webapps
- fi
-
- # symlink the directories to make CATALINA_BASE possible
- dosym /etc/${TOMCAT_NAME} ${CATALINA_BASE}/conf
- dosym /var/log/${TOMCAT_NAME} ${CATALINA_BASE}/logs
- dosym /var/tmp/${TOMCAT_NAME} ${CATALINA_BASE}/temp
- dosym /var/run/${TOMCAT_NAME} ${CATALINA_BASE}/work
-
- dodoc "${S}"/build/{RELEASE-NOTES,RUNNING.txt}
- fperms 640 /etc/${TOMCAT_NAME}/tomcat-users.xml
-}
-
-pkg_postinst() {
- #due to previous ebuild bloopers, make sure everything is correct
- chown root:root /etc/init.d/${TOMCAT_NAME}
- chown root:root /etc/conf.d/${TOMCAT_NAME}
-
- elog
- elog " This ebuild implements a new filesystem layout for tomcat"
- elog " please read http://www.gentoo.org/proj/en/java/tomcat-guide.xml"
- elog " for more information!."
- elog
- ewarn "naming-factory-dbcp.jar is not built at this time. Please fetch"
- ewarn "jar from upstream binary if you need it. Gentoo Bug # 144276"
- elog
- elog " Please file any bugs at http://bugs.gentoo.org/ or else it"
- elog " may not get seen. Thank you."
- elog
-}
-
-#helpers
-set_webapps_perms() {
- chown tomcat:tomcat ${1} || die "Failed to change owner off ${1}."
- chmod 750 ${1} || die "Failed to change permissions off ${1}."
-}
-
-pkg_config() {
- # Better suggestions are welcome
- local currentdir=$(egethome tomcat)
-
- elog "The default home directory for Tomcat is /dev/null."
- elog "You need to change it if your applications needs it to"
- elog "be an actual directory. Current home directory:"
- elog "${currentdir}"
- elog ""
- elog "Do you want to change it [yes/no]?"
-
- local answer
- read answer
-
- if [[ "${answer}" == "yes" ]]; then
- elog ""
- elog "Suggestions:"
- elog "${WEBAPPS_DIR}"
- elog ""
- elog "If you want to suggest a directory, file a bug to"
- elog "http://bugs.gentoo.org"
- elog ""
- elog "Enter home directory:"
-
- local homedir
- read homedir
-
- elog ""
- elog "Setting home directory to: ${homedir}"
-
- /usr/sbin/usermod -d"${homedir}" tomcat
-
- elog "You can run emerge --config =${PF}"
- elog "again to change to homedir"
- elog "at any time."
- fi
-}
diff --git a/www-servers/tomcat/tomcat-5.5.27-r5.ebuild b/www-servers/tomcat/tomcat-5.5.27-r5.ebuild
deleted file mode 100644
index 2a3bbcc5f430..000000000000
--- a/www-servers/tomcat/tomcat-5.5.27-r5.ebuild
+++ /dev/null
@@ -1,311 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/tomcat-5.5.27-r5.ebuild,v 1.2 2011/11/03 00:46:33 vapier Exp $
-
-EAPI="2"
-JAVA_PKG_IUSE="doc source"
-WANT_ANT_TASKS="ant-trax"
-
-inherit eutils java-pkg-2 java-ant-2 user
-
-DESCRIPTION="Tomcat Servlet-2.4/JSP-2.0 Container"
-
-MY_P="apache-${P}-src"
-SLOT="5.5"
-SRC_URI="mirror://apache/${PN}/${PN}-5/v${PV}/src/${MY_P}.tar.gz"
-HOMEPAGE="http://tomcat.apache.org/"
-KEYWORDS="~amd64 -ppc -ppc64 ~x86 ~x86-fbsd"
-LICENSE="Apache-2.0"
-
-IUSE="admin examples test"
-
-RDEPEND="dev-java/eclipse-ecj:3.3
- dev-java/ant-eclipse-ecj:3.3
- dev-java/commons-beanutils:1.7
- >=dev-java/commons-collections-3.1
- >=dev-java/commons-daemon-1.0.1
- >=dev-java/commons-dbcp-1.2.1
- >=dev-java/commons-digester-1.7
- >=dev-java/commons-fileupload-1.1
- dev-java/commons-httpclient:0
- >=dev-java/commons-io-1.1
- >=dev-java/commons-el-1.0
- >=dev-java/commons-launcher-0.9
- >=dev-java/commons-logging-1.0.4
- >=dev-java/commons-modeler-2.0
- >=dev-java/commons-pool-1.2
- =dev-java/junit-3*
- >=dev-java/log4j-1.2.9
- >=dev-java/saxpath-1.0
- >=dev-java/tomcat-servlet-api-${PV}-r1:2.4
- dev-java/ant-core
- admin? ( dev-java/struts:1.2 )
- dev-java/sun-javamail
- >=virtual/jre-1.5"
-DEPEND=">=virtual/jdk-1.5
- ${RDEPEND}"
-
-S=${WORKDIR}/${MY_P}
-
-TOMCAT_NAME="${PN}-${SLOT}"
-WEBAPPS_DIR="/var/lib/${TOMCAT_NAME}/webapps"
-
-pkg_setup() {
- java-pkg-2_pkg_setup
- # new user for tomcat
- enewgroup tomcat
- enewuser tomcat -1 -1 /dev/null tomcat
-
- java-pkg_filter-compiler ecj-3.1 ecj-3.2
-}
-
-java_prepare() {
- epatch "${FILESDIR}/${SLOT}/26-main_tomcat_catalina_jasper_build_xml.patch"
- # https://issues.apache.org/bugzilla/show_bug.cgi?id=45827
- epatch "${FILESDIR}/${SLOT}/5.5.27-dynamic-JSSE13Factory.patch"
- epatch "${FILESDIR}/${SLOT}/examples-cal.patch"
- epatch "${FILESDIR}/${SLOT}/build-jspc-classpath.patch"
-
- use examples && epatch "${FILESDIR}/${SLOT}/jsr152_jsr154_examples_build_xml.patch"
-
- sed -i -e 's:${struts.lib}:/usr/share/struts-1.2:' \
- "${S}/container/webapps/admin/build.xml"
-
- einfo "Removing 1.3 factories to so we don't need com.sun.*"
- rm -v connectors/util/java/org/apache/tomcat/util/net/jsse/*13* || die
-
- # avoid packed jars :-)
- mkdir -p "${S}"/build/build/common
- cd "${S}"/build/build
-
- mkdir ./bin && cd ./bin
- java-pkg_jar-from commons-logging commons-logging-api.jar
- java-pkg_jar-from commons-daemon
-
- mkdir "${S}"/build/build/common/lib && cd "${S}"/build/build/common/lib
- java-pkg_jar-from ant-core
- java-pkg_jar-from commons-collections
- java-pkg_jar-from commons-dbcp
- java-pkg_jar-from commons-el
- java-pkg_jar-from commons-pool
- java-pkg_jar-from tomcat-servlet-api-2.4
-
- mkdir -p "${S}"/build/build/server/lib && cd "${S}"/build/build/server/lib
- java-pkg_jar-from commons-beanutils-1.7 commons-beanutils.jar
- java-pkg_jar-from commons-digester
- java-pkg_jar-from commons-modeler
-
-}
-
-src_compile(){
- local antflags="-Dbase.path=${T}"
-
- antflags="${antflags} -Dservletapi.build.notrequired=true"
- antflags="${antflags} -Djspapi.build.notrequired=true"
- antflags="${antflags} -Dcommons-beanutils.jar=$(java-pkg_getjar commons-beanutils-1.7 commons-beanutils.jar)"
- antflags="${antflags} -Dcommons-collections.jar=$(java-pkg_getjars commons-collections)"
- antflags="${antflags} -Dcommons-daemon.jar=$(java-pkg_getjars commons-daemon)"
- antflags="${antflags} -Dcommons-digester.jar=$(java-pkg_getjars commons-digester)"
- antflags="${antflags} -Dcommons-dbcp.jar=$(java-pkg_getjars commons-dbcp)"
- antflags="${antflags} -Dcommons-el.jar=$(java-pkg_getjars commons-el)"
- antflags="${antflags} -Dcommons-fileupload.jar=$(java-pkg_getjars commons-fileupload)"
- antflags="${antflags} -Dcommons-httpclient.jar=$(java-pkg_getjars commons-httpclient)"
- antflags="${antflags} -Dcommons-io.jar=$(java-pkg_getjars commons-io-1)"
- antflags="${antflags} -Dcommons-launcher.jar=$(java-pkg_getjars commons-launcher)"
- antflags="${antflags} -Dcommons-logging.jar=$(java-pkg_getjar commons-logging commons-logging.jar)"
- antflags="${antflags} -Dcommons-logging-api.jar=$(java-pkg_getjar commons-logging commons-logging-api.jar)"
- antflags="${antflags} -Dcommons-pool.jar=$(java-pkg_getjars commons-pool)"
- antflags="${antflags} -Dcommons-modeler.jar=$(java-pkg_getjars commons-modeler)"
- antflags="${antflags} -Djdt.jar=$(java-pkg_getjar eclipse-ecj-3.3 ecj.jar)"
- antflags="${antflags} -Djsp-api.jar=$(java-pkg_getjar tomcat-servlet-api-2.4 jsp-api.jar)"
- antflags="${antflags} -Djunit.jar=$(java-pkg_getjars junit)"
- antflags="${antflags} -Dlog4j.jar=$(java-pkg_getjars log4j)"
- antflags="${antflags} -Dmail.jar=$(java-pkg_getjar sun-javamail mail.jar)"
- antflags="${antflags} -Dsaxpath.jar=$(java-pkg_getjar saxpath saxpath.jar)"
- antflags="${antflags} -Dservlet-api.jar=$(java-pkg_getjar tomcat-servlet-api-2.4 servlet-api.jar)"
- if use admin; then
- antflags="${antflags} -Dstruts.jar=$(java-pkg_getjar struts-1.2 struts.jar)"
- antflags="${antflags} -Dstruts.home=/usr/share/struts"
- else
- antflags="${antflags} -Dadmin.build.notrequired=true"
- antflags="${antflags} -Dadmin.precompile.notrequired=true"
- fi
- if ! use examples; then
- antflags="${antflags} -Dexamples.build.notrequired=true"
- antflags="${antflags} -Dexamples.precompile.notrequired=true"
- fi
- antflags="${antflags} -Djasper.home=${S}/jasper"
-
- eant ${antflags}
-}
-
-src_install() {
- cd "${S}"/build/build
-
- # init.d, conf.d
- newinitd "${FILESDIR}"/${SLOT}/tomcat.init.2 ${TOMCAT_NAME}
- newconfd "${FILESDIR}"/${SLOT}/tomcat.conf.2 ${TOMCAT_NAME}
-
- # create dir structure
- diropts -m755 -o tomcat -g tomcat
- dodir /usr/share/${TOMCAT_NAME}
- keepdir /var/log/${TOMCAT_NAME}/
- keepdir /var/tmp/${TOMCAT_NAME}/
- keepdir /var/run/${TOMCAT_NAME}/
-
- local CATALINA_BASE=/var/lib/${TOMCAT_NAME}/
- dodir ${CATALINA_BASE}
- keepdir ${CATALINA_BASE}/shared/lib
- keepdir ${CATALINA_BASE}/shared/classes
-
- keepdir /usr/share/${TOMCAT_NAME}/common/lib
-
- dodir /etc/${TOMCAT_NAME}
- fperms 750 /etc/${TOMCAT_NAME}
-
- diropts -m0755
-
- # we don't need dos scripts
- rm -f bin/*.bat
-
- # copy the manager and admin context's to the right position
- mkdir -p conf/Catalina/localhost
- if use admin; then
- cp "${S}"/container/webapps/admin/admin.xml \
- conf/Catalina/localhost
- fi
- cp "${S}"/container/webapps/manager/manager.xml \
- conf/Catalina/localhost
-
- # make the jars available via java-pkg_getjar and jar-from, etc
- base=$(pwd)
- libdirs="common/lib server/lib"
- for dir in ${libdirs}
- do
- cd "${dir}"
-
- for jar in *.jar;
- do
- # replace the file with a symlink
- if [ ! -L ${jar} ]; then
- java-pkg_dojar ${jar}
- rm -f ${jar}
- ln -s ${DESTTREE}/share/${TOMCAT_NAME}/lib/${jar} ${jar}
- fi
- done
-
- cd ${base}
- done
-
- # replace a packed struts.jar
- if use admin; then
- cd server/webapps/admin/WEB-INF/lib
- rm -f struts.jar
- java-pkg_jar-from struts-1.2 struts.jar
- cd ${base}
- else
- rm -fR server/webapps/admin
- fi
-
- cd server/webapps/manager/WEB-INF/lib
- java-pkg_jar-from commons-fileupload
- java-pkg_jar-from commons-io-1
- cd ${base}
-
- # replace the default pw with a random one, see #92281
- local randpw=$(echo ${RANDOM}|md5sum|cut -c 1-15)
- sed -e s:SHUTDOWN:${randpw}: -i conf/{server,server-minimal}.xml
-
- # copy over the directories
- chown -R tomcat:tomcat webapps/* conf/*
- cp -pR conf/* "${D}"/etc/${TOMCAT_NAME} || die "failed to copy conf"
- cp -HR bin common server "${D}"/usr/share/${TOMCAT_NAME} || die "failed to copy"
-
- # replace catalina.policy with gentoo specific one bug #176701
- cp "${FILESDIR}"/${SLOT}/catalina.policy "${D}"/etc/${TOMCAT_NAME} || die "failed to replace catalina.policy"
-
- keepdir ${WEBAPPS_DIR}
- set_webapps_perms "${D}"/${WEBAPPS_DIR}
-
- # Copy over webapps, some controlled by use flags
- cp -p ../RELEASE-NOTES webapps/ROOT/RELEASE-NOTES.txt
- cp -pr webapps/ROOT "${D}"${CATALINA_BASE}/webapps
- if use doc; then
- cp -pr webapps/tomcat-docs "${D}"${CATALINA_BASE}/webapps
- fi
- if use examples; then
- cp -pr webapps/{jsp-examples,servlets-examples,webdav} \
- "${D}"${CATALINA_BASE}/webapps
- fi
-
- # symlink the directories to make CATALINA_BASE possible
- dosym /etc/${TOMCAT_NAME} ${CATALINA_BASE}/conf
- dosym /var/log/${TOMCAT_NAME} ${CATALINA_BASE}/logs
- dosym /var/tmp/${TOMCAT_NAME} ${CATALINA_BASE}/temp
- dosym /var/run/${TOMCAT_NAME} ${CATALINA_BASE}/work
-
- dodoc "${S}"/build/{RELEASE-NOTES,RUNNING.txt}
- fperms 640 /etc/${TOMCAT_NAME}/tomcat-users.xml
-}
-
-pkg_postinst() {
- #due to previous ebuild bloopers, make sure everything is correct
- chown root:root /etc/init.d/${TOMCAT_NAME}
- chown root:root /etc/conf.d/${TOMCAT_NAME}
-
- elog
- elog " This ebuild implements a new filesystem layout for tomcat"
- elog " please read http://www.gentoo.org/proj/en/java/tomcat-guide.xml"
- elog " for more information!."
- elog
- ewarn "naming-factory-dbcp.jar is not built at this time. Please fetch"
- ewarn "jar from upstream binary if you need it. Gentoo Bug # 144276"
- elog
- elog " Please file any bugs at http://bugs.gentoo.org/ or else it"
- elog " may not get seen. Thank you."
- elog
-}
-
-#helpers
-set_webapps_perms() {
- chown tomcat:tomcat ${1} || die "Failed to change owner off ${1}."
- chmod 750 ${1} || die "Failed to change permissions off ${1}."
-}
-
-pkg_config() {
- # Better suggestions are welcome
- local currentdir=$(egethome tomcat)
-
- elog "The default home directory for Tomcat is /dev/null."
- elog "You need to change it if your applications needs it to"
- elog "be an actual directory. Current home directory:"
- elog "${currentdir}"
- elog ""
- elog "Do you want to change it [yes/no]?"
-
- local answer
- read answer
-
- if [[ "${answer}" == "yes" ]]; then
- elog ""
- elog "Suggestions:"
- elog "${WEBAPPS_DIR}"
- elog ""
- elog "If you want to suggest a directory, file a bug to"
- elog "http://bugs.gentoo.org"
- elog ""
- elog "Enter home directory:"
-
- local homedir
- read homedir
-
- elog ""
- elog "Setting home directory to: ${homedir}"
-
- /usr/sbin/usermod -d"${homedir}" tomcat
-
- elog "You can run emerge --config =${PF}"
- elog "again to change to homedir"
- elog "at any time."
- fi
-}