Import tomcat-7.0.22.

Tested by shadchin@
Tested & OK ian@
This commit is contained in:
dcoppa 2011-10-31 08:23:38 +00:00
parent f3ff557a0a
commit e32e907757
9 changed files with 2802 additions and 0 deletions

91
www/tomcat/v7/Makefile Normal file
View File

@ -0,0 +1,91 @@
# $OpenBSD: Makefile,v 1.1.1.1 2011/10/31 08:23:38 dcoppa Exp $
COMMENT-main= Java servlet 2.5 and Java server pages 2.1 server
COMMENT-examples=example applications and full documentation
V= 7.0.22
DISTNAME= apache-tomcat-${V}
PKGNAME= tomcat-${V}
PKGNAME-main= tomcat-${V}
PKGNAME-examples=tomcat-examples-${V}
CATEGORIES= www
DISTFILES= ${DISTNAME}.tar.gz \
${DISTNAME}-fulldocs.tar.gz
MASTER_SITES= ${MASTER_SITE_APACHE:=tomcat/tomcat-7/v$V/bin/} \
http://archive.apache.org/dist/tomcat/tomcat-7/archive/v${V}/bin/
HOMEPAGE= http://tomcat.apache.org/
MULTI_PACKAGES= -main -examples
MODULES= java
MODJAVA_VER= 1.6+
MODJAVA_JRERUN= Yes
BUILD_DEPENDS= archivers/gtar
RUN_DEPENDS= java/javaPathHelper
RUN_DEPENDS-examples= tomcat->=7:www/tomcat/v7,-main
PREFIX-examples= ${CATALINA_BASE}
# Apache Software License 2.0
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
TAR= ${LOCALBASE}/bin/gtar
NO_BUILD= Yes
NO_REGRESS= Yes
CONFDIR= ${SYSCONFDIR}/tomcat
CATALINA_BASE= /var/tomcat
SAMPLEDIR= ${PREFIX}/share/examples/tomcat
SUBST_VARS+= CONFDIR CATALINA_BASE
post-extract:
@rm -rf ${WRKDIST}/webapps/docs
mv ${WRKDIR}/tomcat-7.0-doc ${WRKDIST}/webapps/docs
do-install:
${INSTALL_DATA_DIR} ${PREFIX}/tomcat \
${PREFIX}/tomcat/webapps \
${SAMPLEDIR} \
${WRKINST}/${CATALINA_BASE} \
${WRKINST}/${CATALINA_BASE}/webapps
cd ${WRKDIST} && \
tar cf - bin lib `find * -prune -type f` | \
tar -C ${PREFIX}/tomcat -xf -
cd ${WRKDIST}/webapps && \
tar cf - host-manager manager | \
tar -C ${PREFIX}/tomcat/webapps -xf -
${INSTALL_DATA} `find ${WRKDIST}/conf/* -prune -type f` ${SAMPLEDIR}
${SUBST_CMD} ${SAMPLEDIR}/server.xml
${INSTALL_DATA} ${WRKDIST}/webapps/host-manager/manager.xml \
${SAMPLEDIR}
${INSTALL_DATA} ${WRKDIST}/webapps/host-manager/manager.xml \
${SAMPLEDIR}/host-manager.xml
@perl -pi -e 's/manager/host-manager/' ${SAMPLEDIR}/host-manager.xml
cd ${WRKDIST}/webapps && \
tar cf - ROOT docs examples | \
tar -C ${WRKINST}/${CATALINA_BASE}/webapps -xf -
${INSTALL_DATA_DIR} ${WRKINST}/${CONFDIR}/Catalina/localhost
${INSTALL_DATA} ${WRKDIST}/webapps/host-manager/manager.xml \
${WRKINST}/${CONFDIR}/Catalina/localhost
${INSTALL_DATA} ${WRKDIST}/webapps/host-manager/manager.xml \
${WRKINST}/${CONFDIR}/Catalina/localhost/host-manager.xml
@perl -pi -e 's/manager/host-manager/' \
${WRKINST}/${CONFDIR}/Catalina/localhost/host-manager.xml
find ${WRKINST} \
-name \*.beforesubst -or \
-name \*.orig -or \
-name \*.bat -or \
-name \*.exe -or \
-name \*.dll \
| xargs rm
.include <bsd.port.mk>

10
www/tomcat/v7/distinfo Normal file
View File

@ -0,0 +1,10 @@
MD5 (apache-tomcat-7.0.22-fulldocs.tar.gz) = cEBZ+9RXoM5fvDLEmWMO2w==
MD5 (apache-tomcat-7.0.22.tar.gz) = 5knrQuGJBWZYRkmf855yvg==
RMD160 (apache-tomcat-7.0.22-fulldocs.tar.gz) = ggl/4JP4ExJ9tzmsWR68qAgAM48=
RMD160 (apache-tomcat-7.0.22.tar.gz) = UaqTXocJDfWevJELVyuSpnvzRrs=
SHA1 (apache-tomcat-7.0.22-fulldocs.tar.gz) = GT4vzQ8tI9nMEmJNQf8LRU0m7rw=
SHA1 (apache-tomcat-7.0.22.tar.gz) = Y3H+THY2EZRZdA1ubgLOGI6fcmI=
SHA256 (apache-tomcat-7.0.22-fulldocs.tar.gz) = IrGrXweZtmu6121hIjXxyh9YBl6oy84kwFxgPAniH9M=
SHA256 (apache-tomcat-7.0.22.tar.gz) = OBaNl9zYKGmLsWH6fAUdjCKcfp1gnuXhEyAR+fto7I4=
SIZE (apache-tomcat-7.0.22-fulldocs.tar.gz) = 4650064
SIZE (apache-tomcat-7.0.22.tar.gz) = 7421415

View File

@ -0,0 +1,43 @@
$OpenBSD: patch-conf_server_xml,v 1.1.1.1 2011/10/31 08:23:38 dcoppa Exp $
--- conf/server.xml.orig Tue Sep 27 22:43:22 2011
+++ conf/server.xml Fri Oct 14 12:58:00 2011
@@ -67,12 +67,12 @@
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL HTTP/1.1 Connector on port 8080
-->
- <Connector port="8080" protocol="HTTP/1.1"
+ <Connector address="0.0.0.0" port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
<!-- A "Connector" using the shared thread pool-->
<!--
- <Connector executor="tomcatThreadPool"
+ <Connector executor="tomcatThreadPool" address="0.0.0.0"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
@@ -82,13 +82,13 @@
connector should be using the OpenSSL style configuration
described in the APR documentation -->
<!--
- <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
+ <Connector address="0.0.0.0" port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
-->
<!-- Define an AJP 1.3 Connector on port 8009 -->
- <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
+ <Connector address="0.0.0.0" port="8009" protocol="AJP/1.3" redirectPort="8443" />
<!-- An Engine represents the entry point (within Catalina) that processes
@@ -120,7 +120,7 @@
resourceName="UserDatabase"/>
</Realm>
- <Host name="localhost" appBase="webapps"
+ <Host name="localhost" appBase="${CATALINA_BASE}/webapps"
unpackWARs="true" autoDeploy="true">
<!-- SingleSignOn valve, share authentication between web applications

View File

@ -0,0 +1 @@
Example web applications and full documentation for Tomcat.

View File

@ -0,0 +1,7 @@
Tomcat 7 is a Servlet/JSP container that implements the Servlet 2.5
and JavaServer Pages 2.1 specifications from the Java Community
Process. Tomcat includes many additional features that make it a
useful platform for developing and deploying web applications and
web services. Tomcat can be run as a standalone web server with
Servlet and JSP support, or using Apache HTTP Server as its web
server via the mod_jk Apache module (the www/mod_jk package).

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,156 @@
@comment $OpenBSD: PLIST-main,v 1.1.1.1 2011/10/31 08:23:38 dcoppa Exp $
@conflict jakarta-tomcat-*
@pkgpath www/tomcat/v7
@newgroup _tomcat:526
@newuser _tomcat:526:_tomcat:daemon:Tomcat Account:/nonexistent:/sbin/nologin
share/doc/pkg-readmes/${FULLPKGNAME}
share/examples/tomcat/
@owner _tomcat
@group _tomcat
@sample ${SYSCONFDIR}/tomcat/
@owner
@group
share/examples/tomcat/catalina.policy
@owner _tomcat
@group _tomcat
@sample ${SYSCONFDIR}/tomcat/catalina.policy
@owner
@group
share/examples/tomcat/catalina.properties
@owner _tomcat
@group _tomcat
@sample ${SYSCONFDIR}/tomcat/catalina.properties
@owner
@group
share/examples/tomcat/context.xml
@owner _tomcat
@group _tomcat
@sample ${SYSCONFDIR}/tomcat/context.xml
@owner
@group
share/examples/tomcat/host-manager.xml
share/examples/tomcat/logging.properties
@owner _tomcat
@group _tomcat
@sample ${SYSCONFDIR}/tomcat/logging.properties
@owner
@group
share/examples/tomcat/manager.xml
share/examples/tomcat/server.xml
@owner _tomcat
@group _tomcat
@sample ${SYSCONFDIR}/tomcat/server.xml
@owner
@group
share/examples/tomcat/tomcat-users.xml
@mode 600
@owner _tomcat
@group _tomcat
@sample ${SYSCONFDIR}/tomcat/tomcat-users.xml
@mode
@owner
@group
share/examples/tomcat/web.xml
@owner _tomcat
@group _tomcat
@sample ${SYSCONFDIR}/tomcat/web.xml
@sample ${CATALINA_BASE}/
@sample ${CATALINA_BASE}/logs/
@sample ${CATALINA_BASE}/shared/
@sample ${CATALINA_BASE}/shared/classes/
@sample ${CATALINA_BASE}/shared/lib/
@sample ${CATALINA_BASE}/temp/
@sample ${CATALINA_BASE}/webapps/
@sample ${CATALINA_BASE}/work/
@exec if [ ! -e ${CATALINA_BASE}/conf ]; then ln -sf ${CONFDIR} ${CATALINA_BASE}/conf; fi
@unexec if [ -h ${CATALINA_BASE}/conf ]; then rm ${CATALINA_BASE}/conf; fi
@owner
@group
tomcat/
tomcat/LICENSE
tomcat/NOTICE
tomcat/RELEASE-NOTES
tomcat/RUNNING.txt
tomcat/bin/
tomcat/bin/bootstrap.jar
tomcat/bin/catalina-tasks.xml
tomcat/bin/catalina.sh
tomcat/bin/commons-daemon-native.tar.gz
tomcat/bin/commons-daemon.jar
tomcat/bin/configtest.sh
tomcat/bin/digest.sh
tomcat/bin/setclasspath.sh
tomcat/bin/shutdown.sh
tomcat/bin/startup.sh
tomcat/bin/tomcat-juli.jar
tomcat/bin/tomcat-native.tar.gz
tomcat/bin/tool-wrapper.sh
tomcat/bin/version.sh
tomcat/lib/
tomcat/lib/annotations-api.jar
tomcat/lib/catalina-ant.jar
tomcat/lib/catalina-ha.jar
tomcat/lib/catalina-tribes.jar
tomcat/lib/catalina.jar
tomcat/lib/ecj-3.7.jar
tomcat/lib/el-api.jar
tomcat/lib/jasper-el.jar
tomcat/lib/jasper.jar
tomcat/lib/jsp-api.jar
tomcat/lib/servlet-api.jar
tomcat/lib/tomcat-api.jar
tomcat/lib/tomcat-coyote.jar
tomcat/lib/tomcat-dbcp.jar
tomcat/lib/tomcat-i18n-es.jar
tomcat/lib/tomcat-i18n-fr.jar
tomcat/lib/tomcat-i18n-ja.jar
tomcat/lib/tomcat-jdbc.jar
tomcat/lib/tomcat-util.jar
tomcat/webapps/
tomcat/webapps/host-manager/
tomcat/webapps/host-manager/META-INF/
tomcat/webapps/host-manager/META-INF/context.xml
tomcat/webapps/host-manager/WEB-INF/
tomcat/webapps/host-manager/WEB-INF/jsp/
tomcat/webapps/host-manager/WEB-INF/jsp/401.jsp
tomcat/webapps/host-manager/WEB-INF/jsp/403.jsp
tomcat/webapps/host-manager/WEB-INF/jsp/404.jsp
tomcat/webapps/host-manager/WEB-INF/web.xml
tomcat/webapps/host-manager/images/
tomcat/webapps/host-manager/images/add.gif
tomcat/webapps/host-manager/images/asf-logo.gif
tomcat/webapps/host-manager/images/code.gif
tomcat/webapps/host-manager/images/design.gif
tomcat/webapps/host-manager/images/docs.gif
tomcat/webapps/host-manager/images/fix.gif
tomcat/webapps/host-manager/images/tomcat.gif
tomcat/webapps/host-manager/images/update.gif
tomcat/webapps/host-manager/images/void.gif
tomcat/webapps/host-manager/index.jsp
tomcat/webapps/host-manager/manager.xml
tomcat/webapps/manager/
tomcat/webapps/manager/META-INF/
tomcat/webapps/manager/META-INF/context.xml
tomcat/webapps/manager/WEB-INF/
tomcat/webapps/manager/WEB-INF/jsp/
tomcat/webapps/manager/WEB-INF/jsp/401.jsp
tomcat/webapps/manager/WEB-INF/jsp/403.jsp
tomcat/webapps/manager/WEB-INF/jsp/404.jsp
tomcat/webapps/manager/WEB-INF/jsp/sessionDetail.jsp
tomcat/webapps/manager/WEB-INF/jsp/sessionsList.jsp
tomcat/webapps/manager/WEB-INF/web.xml
tomcat/webapps/manager/images/
tomcat/webapps/manager/images/add.gif
tomcat/webapps/manager/images/asf-logo.gif
tomcat/webapps/manager/images/code.gif
tomcat/webapps/manager/images/design.gif
tomcat/webapps/manager/images/docs.gif
tomcat/webapps/manager/images/fix.gif
tomcat/webapps/manager/images/tomcat.gif
tomcat/webapps/manager/images/update.gif
tomcat/webapps/manager/images/void.gif
tomcat/webapps/manager/index.jsp
tomcat/webapps/manager/status.xsd
tomcat/webapps/manager/xform.xsl
@rcscript ${RCDIR}/tomcat
@extraunexec rm -rf ${CATALINA_BASE}/logs/* ${CATALINA_BASE}/work/*

View File

@ -0,0 +1,35 @@
$OpenBSD: README-main,v 1.1.1.1 2011/10/31 08:23:38 dcoppa Exp $
+-----------------------------------------------------------------------
| Running ${FULLPKGNAME} on OpenBSD
+-----------------------------------------------------------------------
The tomcat package does not install the example webapps and
documentation. You must supply your own webapps and configuration or
install the tomcat-examples package for the example webapps and
documentation. Sample config files for the host-manager and manager
webapps can be found in ${TRUEPREFIX}/share/examples/tomcat.
The tomcat-examples package includes the examples, full documentation
and the localhost config files for the host-manager and manager webapps.
The packages are structured this way to facilitate maintaining a server
which normally would not contain the examples and documentation webapp.
Tomcat on OpenBSD uses the `${SYSCONFDIR}/tomcat' directory for its
configuration files. `$CATALINA_BASE' is `${CATALINA_BASE}'. All files
contained within these directories should be owned by the _tomcat user.
If you want Tomcat to serve on privileged ports (e.g. 80), redirect all
tcp traffic to port 80 to Tomcat's default listener port 8080 using a
pf.conf(5) rule like:
pass in quick on $NIC proto tcp to port 80 rdr-to 127.0.0.1 port 8080
or use relayd(8) to forward the connection.
If you are upgrading and use database drivers, don't forget to copy them
into ${TRUEPREFIX}/tomcat/lib. You must also delete any work files in
`${CATALINA_BASE}/work' unless you are reinstalling the same full
version of Tomcat. When upgrading from older major versions of Tomcat,
config files in ${SYSCONFDIR}/tomcat should be updated as well.

29
www/tomcat/v7/pkg/tomcat.rc Executable file
View File

@ -0,0 +1,29 @@
#!/bin/sh
#
# $OpenBSD: tomcat.rc,v 1.1.1.1 2011/10/31 08:23:38 dcoppa Exp $
daemon="${TRUEPREFIX}/tomcat/bin/catalina.sh"
daemon_flags="-server"
daemon_user="_tomcat"
. /etc/rc.d/rc.subr
pexp="$(${LOCALBASE}/bin/javaPathHelper -h tomcat).*-Dcatalina.base=${CATALINA_BASE}.*org.apache.catalina.startup.Bootstrap.*"
rc_reload=NO
rc_start() {
${rcexec} \
"CATALINA_BASE=\"${CATALINA_BASE}\" \
CATALINA_OPTS=\"${daemon_flags}\" \
JAVA_HOME=\"$(${LOCALBASE}/bin/javaPathHelper -h tomcat)\" ${daemon} start"
}
rc_stop() {
CATALINA_BASE="${CATALINA_BASE}" \
CATALINA_OPTS="${daemon_flags}" \
JAVA_HOME="$(${LOCALBASE}/bin/javaPathHelper -h tomcat)" \
${daemon} stop
}
rc_cmd $1