Import Jakarta Tomcat 5.0.28; submitted by Kurt Miller <truk@apache.org>.

Tomcat 5 is a Servlet/JSP container that implements the Servlet 2.4
and JavaServer Pages 2.0 specifications from the Java Community 
Process.  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).
This commit is contained in:
naddy 2004-11-04 21:46:04 +00:00
parent f65c29122d
commit 9c6849964a
11 changed files with 2232 additions and 0 deletions

View File

@ -0,0 +1,63 @@
# $OpenBSD: Makefile,v 1.1.1.1 2004/11/04 21:46:04 naddy Exp $
COMMENT= "Java servlet 2.4 and Java server pages 2.0 server"
# Requires a JVM
ONLY_FOR_ARCHS= i386
V= 5.0.28
DISTNAME= jakarta-tomcat-${V}
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_APACHE:=jakarta/tomcat-5/v$V/bin/} \
http://archive.apache.org/dist/jakarta/tomcat-5/archive/v${V}/bin/
HOMEPAGE= http://jakarta.apache.org/
MAINTAINER= Kurt Miller <truk@apache.org>
BUILD_DEPENDS= ::archivers/gtar
JAVA_HOME= ${LOCALBASE}/jdk1.3.1-linux
RUN_DEPENDS= :jdk*->=1.3:devel/jdk/1.3-linux
# 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+= PKGNAME CONFDIR CATALINA_BASE SAMPLEDIR
do-install:
${INSTALL_DATA_DIR} ${PREFIX}/${PKGNAME}
cd ${WRKDIST} && \
tar cf - bin common server `find * -prune -type f` | \
tar -C ${PREFIX}/${PKGNAME} -xf -
${INSTALL_DATA_DIR} ${SAMPLEDIR}
cd ${WRKDIST} && \
tar cf - conf webapps | \
tar -C ${SAMPLEDIR} -xf -
find ${WRKINST} -name *.orig -or -name *.bat -or -name *.exe | \
xargs rm
@perl -pi -e 's,%%SYSCONFDIR%%,${SYSCONFDIR},' \
${PREFIX}/${PKGNAME}/bin/setclasspath.sh
@sed -e 's,%%PREFIX%%,${TRUEPREFIX},' \
-e 's,%%PKGNAME%%,${PKGNAME},' \
-e 's,%%SYSCONFDIR%%,${SYSCONFDIR},' \
< ${FILESDIR}/README.OpenBSD \
> ${PREFIX}/${PKGNAME}/README.OpenBSD
@sed -e 's,%%PREFIX%%,${TRUEPREFIX},' \
-e 's,%%PKGNAME%%,${PKGNAME},' \
-e 's,%%JAVA_HOME%%,${JAVA_HOME},' \
< ${FILESDIR}/tomcat.rc > ${SAMPLEDIR}/conf/tomcat.rc
.include "bsd.port.mk"

View File

@ -0,0 +1,3 @@
MD5 (jakarta-tomcat-5.0.28.tar.gz) = 2a189b6be6d8d6801097d4a658edfa05
RMD160 (jakarta-tomcat-5.0.28.tar.gz) = b7af574ef99d19809581679845d790bf222f2556
SHA1 (jakarta-tomcat-5.0.28.tar.gz) = 00dc6526db0a8a75c2f4944b7253ea230b31ab70

View File

@ -0,0 +1,18 @@
$OpenBSD: README.OpenBSD,v 1.1.1.1 2004/11/04 21:46:04 naddy Exp $
Jakarta Tomcat on OpenBSD uses `%%SYSCONFDIR%%/tomcat' for its configuration files.
With the following command tomcat is started as user `_tomcat':
$ sudo -u _tomcat %%PREFIX%%/%%PKGNAME%%/bin/startup.sh
As `sudo' doesn't pass environment variables, you should define
environment variables in `%%SYSCONFDIR%%/tomcat/tomcat.rc'.
If you want Jakarta Tomcat to serve on privileged ports (e.g. 80),
then either edit `%%SYSCONFDIR%%/tomcat/server.xml' and change the Connector port
to 80, or even more secure: redirect all tcp traffic to port 80
to tomcat's default listener port 8080 using a pf.conf(5) rule like:
rdr on $NIC proto tcp from any to any port 80 -> 127.0.0.1 port 8080
`$CATALINA_BASE' (formerly `$TOMCAT_HOME') is `/var/tomcat'.

View File

@ -0,0 +1,18 @@
# $OpenBSD: tomcat.rc,v 1.1.1.1 2004/11/04 21:46:04 naddy Exp $
#
# sudo doesn't pass environment variables, so
# define JAVA_HOME for _tomcat here
# Start tomcat with following command:
# $ sudo -u _tomcat %%PREFIX%%/%%PKGNAME%%/bin/startup.sh
#
JAVA_HOME=%%JAVA_HOME%%
# override other environment options:
#CATALINA_HOME=%%PREFIX%%/%%PKGNAME%%
#CATALINA_BASE=/var/tomcat
#CATALINA_TMPDIR=$CATALINA_BASE/temp
#JAVA_OPTS=-Djava.net.preferIPv4Stack=true
#JPDA_TRANSPORT=
#JPDA_ADDRESS=
#JSSE_HOME=

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-bin_catalina_sh,v 1.1.1.1 2004/11/04 21:46:04 naddy Exp $
--- bin/catalina.sh.orig Sat Aug 28 20:02:20 2004
+++ bin/catalina.sh Thu Oct 14 09:14:40 2004
@@ -107,7 +107,7 @@ fi
CLASSPATH="$CLASSPATH":"$CATALINA_HOME"/bin/bootstrap.jar:"$CATALINA_HOME"/bin/commons-logging-api.jar
if [ -z "$CATALINA_BASE" ] ; then
- CATALINA_BASE="$CATALINA_HOME"
+ CATALINA_BASE="/var/tomcat"
fi
if [ -z "$CATALINA_TMPDIR" ] ; then

View File

@ -0,0 +1,20 @@
$OpenBSD: patch-bin_setclasspath_sh,v 1.1.1.1 2004/11/04 21:46:04 naddy Exp $
--- bin/setclasspath.sh.orig Sat Aug 28 20:02:20 2004
+++ bin/setclasspath.sh Thu Oct 14 09:58:53 2004
@@ -4,10 +4,16 @@
# $Id: patch-bin_setclasspath_sh,v 1.1.1.1 2004/11/04 21:46:04 naddy Exp $
# -----------------------------------------------------------------------------
+# Read $JAVA_HOME - sudo doesn't pass environment variables
+if [ -r "%%SYSCONFDIR%%/tomcat/tomcat.rc" ]; then
+ . %%SYSCONFDIR%%/tomcat/tomcat.rc
+fi
+
# Make sure prerequisite environment variables are set
if [ -z "$JAVA_HOME" ]; then
echo "The JAVA_HOME environment variable is not defined"
echo "This environment variable is needed to run this program"
+ echo "Edit \`%%SYSCONFDIR%%/tomcat/tomcat.rc' to point to your \$JAVA_HOME"
exit 1
fi
if $os400; then

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-conf_server_xml,v 1.1.1.1 2004/11/04 21:46:04 naddy Exp $
--- conf/server.xml.orig 2003-11-30 10:06:16.000000000 -0500
+++ conf/server.xml 2004-01-12 22:59:56.000000000 -0500
@@ -211,7 +211,7 @@
<!-- Define the default virtual host
Note: XML Schema validation will not work with Xerces 2.2.
-->
- <Host name="localhost" debug="0" appBase="webapps"
+ <Host name="localhost" debug="0" appBase="/var/tomcat/webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">

View File

@ -0,0 +1,10 @@
Tomcat 5 is a Servlet/JSP container that implements the Servlet 2.4
and JavaServer Pages 2.0 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).
See ${PREFIX}/${DISTNAME}/conf/README.OpenBSD for
information on running Jakarta Tomcat on OpenBSD.

View File

@ -0,0 +1,49 @@
#!/bin/sh
# $OpenBSD: INSTALL,v 1.1.1.1 2004/11/04 21:46:09 naddy Exp $
#
# Pre/post-installation setup of jakarta-tomcat
# use a sane path and install prefix
#
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
CONFDIR=${CONFDIR}
CATALINA_BASE=${CATALINA_BASE}
SAMPLEDIR=${SAMPLEDIR}
#
# Function: post install webapp install and chown
#
do_post_install()
{
if [ -z "`ls ${CATALINA_BASE}/webapps/`" ]; then
echo "Empty ${CATALINA_BASE}/webapps detected."
echo "Installing example webapps from ${SAMPLEDIR}/webapps."
cd ${SAMPLEDIR}/webapps && \
tar cf - * | tar -C ${CATALINA_BASE}/webapps -xf -
chown -RP _tomcat:_tomcat ${CATALINA_BASE}/webapps
fi
}
# Verify proper execution
#
if [ $# -ne 2 ]; then
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
fi
# Verify/process the command
#
case $2 in
PRE-INSTALL)
;;
POST-INSTALL)
do_post_install "$1"
;;
*)
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
;;
esac
exit 0

View File

@ -0,0 +1,16 @@
For detailed instructions on how to run Tomcat see:
${SAMPLEDIR}/webapps/tomcat-docs/index.html
For more information on application development with Tomcat, see
${SAMPLEDIR}/webapps/tomcat-docs/appdev/index.html
Note that Tomcat may be started with the following command:
$ sudo -u _tomcat ${PREFIX}/${PKGNAME}/bin/startup.sh
Configuration files are in `${SYSCONFDIR}/tomcat' (use tomcat.rc
for setting environment variables like JAVA_HOME/JAVA_OPTS/...)
`$CATALINA_BASE' is `/var/tomcat'.
See also ${PREFIX}/${PKGNAME}/README.OpenBSD for information
on running Jakarta Tomcat on OpenBSD.

File diff suppressed because it is too large Load Diff