From 1dbabed16564945109e83e331279269258494913 Mon Sep 17 00:00:00 2001 From: Miroslav Šulc Date: Sat, 24 Dec 2011 20:21:51 +0000 Subject: www-servers/tomcat: tomcat 5.5 moved to java-overlay (Portage version: 2.1.10.43/cvs/Linux x86_64) --- www-servers/tomcat/ChangeLog | 14 +- .../26-main_tomcat_catalina_jasper_build_xml.patch | 429 --------------------- .../files/5.5/5.5.27-dynamic-JSSE13Factory.patch | 45 --- .../tomcat/files/5.5/build-jspc-classpath.patch | 42 -- www-servers/tomcat/files/5.5/catalina.policy | 261 ------------- www-servers/tomcat/files/5.5/examples-cal.patch | 11 - .../5.5/jsr152_jsr154_examples_build_xml.patch | 71 ---- www-servers/tomcat/files/5.5/tomcat.conf.2 | 79 ---- www-servers/tomcat/files/5.5/tomcat.init.2 | 111 ------ www-servers/tomcat/metadata.xml | 3 - www-servers/tomcat/tomcat-5.5.27-r4.ebuild | 310 --------------- www-servers/tomcat/tomcat-5.5.27-r5.ebuild | 311 --------------- 12 files changed, 13 insertions(+), 1674 deletions(-) delete mode 100644 www-servers/tomcat/files/5.5/26-main_tomcat_catalina_jasper_build_xml.patch delete mode 100644 www-servers/tomcat/files/5.5/5.5.27-dynamic-JSSE13Factory.patch delete mode 100644 www-servers/tomcat/files/5.5/build-jspc-classpath.patch delete mode 100644 www-servers/tomcat/files/5.5/catalina.policy delete mode 100644 www-servers/tomcat/files/5.5/examples-cal.patch delete mode 100644 www-servers/tomcat/files/5.5/jsr152_jsr154_examples_build_xml.patch delete mode 100644 www-servers/tomcat/files/5.5/tomcat.conf.2 delete mode 100755 www-servers/tomcat/files/5.5/tomcat.init.2 delete mode 100644 www-servers/tomcat/tomcat-5.5.27-r4.ebuild delete mode 100644 www-servers/tomcat/tomcat-5.5.27-r5.ebuild (limited to 'www-servers/tomcat') 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 + -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 @@ - - - -+ -+ -+ - -+--> - - - -@@ -413,15 +415,14 @@ - - -+ -+ -+ - -- - -- - -- - - -- - - - -@@ -455,23 +456,6 @@ - addWebXmlMappings="true" - outputDir="${ROOT.base}/WEB-INF/src" /> - -- -- -- -- - - - -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - -+ -+ -+ -+ -+ -+ -+ - - - - - - -- - -- -- -- -- -- -+ excludes="**/*.smap"> -+ -+ -+ -+ -+ - -- -- -- -- -- -- -+ -+ -+ -+ -+ -+ - -- -+ - - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -+ -+ - - -@@ -676,7 +688,7 @@ - - - -- --> -+ - - - -@@ -694,6 +706,7 @@ - - - -+--> - - - -@@ -773,14 +786,7 @@ - - - -- -- -- ========== Building: webapps -- -- -- -- -+ - - - -@@ -798,6 +804,17 @@ - - - -+ -+ -+ -+ -+ ========== Building: webapps -+ -+ -+ -+ -+ - - - -@@ -869,14 +886,7 @@ - filtering="true" /> - - -- -- -- -- -- -- -- -+ - - -@@ -915,9 +925,19 @@ - todir="${tomcat.build}/conf/Catalina/localhost" /> - -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - -- - - - -@@ -1060,11 +1080,11 @@ - - - -- -+ - - - -@@ -1108,11 +1128,11 @@ - - - -- -+ - Target: Webapps precompilation ... - - -@@ -1213,11 +1233,11 @@ - - -- -+ - - - -@@ -1898,7 +1918,7 @@ - description="Download binary packages" > - - -- -+ - - - -@@ -1977,7 +1996,7 @@ - - - -- -+ --> - - - -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 @@ - - -- -+ -- -- - - - -- -+--> - - - -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 @@ - - - -+ - - - -@@ -108,6 +109,7 @@ - - - -+ - - - -@@ -565,9 +567,9 @@ - file="${commons-logging-api.jar}"/> - - -+--> - - - -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 @@ - - - -+ - - - 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 @@ - - - -- -- -- -- -- -- -- -- -- -- -- - - - -@@ -444,6 +432,18 @@ - - - -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - - - 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 @@ -
-
-
--
-+
-

Description of the event

-
-
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 @@ - - - -+ - - - -@@ -244,7 +245,7 @@ - - -- -+ - - - -- -+--> - - - - - -+ - - - -@@ -142,7 +143,7 @@ - - -- -+ - - - - -- -+--> - - - =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. - - Enable Tomcat admin webapp - 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 -} -- cgit v1.2.3-65-gdbad