- update to latest tomcat 5.5.
- use ${SUBST_CMD}
- add rc script
- kurt@ drops maintainership

Detailed changelog is here:
http://tomcat.apache.org/tomcat-5.5-doc/changelog.html


Index: Makefile
===================================================================
RCS file: /cvs/ports/www/tomcat/v5/Makefile,v
retrieving revision 1.14
diff -u -r1.14 Makefile
--- Makefile    22 Nov 2010 08:36:54 -0000      1.14
+++ Makefile    23 Nov 2010 07:34:19 -0000
@@ -4,28 +4,23 @@
 COMMENT-admin= administration web application
 COMMENT-examples=example applications and documentation
 
-V=             5.5.27
+V=             5.5.31
 DISTNAME=      apache-tomcat-${V}
 PKGNAME=       tomcat-${V}
 PKGNAME-main=  tomcat-${V}
 PKGNAME-admin= tomcat-admin-${V}
 PKGNAME-examples=tomcat-examples-${V}
-REVISION-main= 2
-REVISION-admin=        0
-REVISION-examples= 1
 CATEGORIES=    www
 
 DISTFILES=     ${DISTNAME}.tar.gz \
                ${DISTNAME}-admin.tar.gz \
                ${DISTNAME}-fulldocs.tar.gz
 
-MASTER_SITES=  ${MASTER_SITE_APACHE:=tomcat/tomcat-5/v$V/bin/} \
+MASTER_SITES=  ${MASTER_SITE_APACHE:=tomcat/tomcat-5/v${V}/bin/} \
                
http://archive.apache.org/dist/tomcat/tomcat-5/archive/v${V}/bin/
 
 HOMEPAGE=      http://tomcat.apache.org/
 
-MAINTAINER=    Kurt Miller <k...@openbsd.org>
-
 MULTI_PACKAGES=        -main -admin -examples
 
 MODULES=       java
@@ -76,12 +71,18 @@
        ${INSTALL_DATA_DIR} ${WRKINST}/${CONFDIR}/Catalina/localhost
        ${INSTALL_DATA} ${WRKDIST}/conf/Catalina/localhost/* \
                ${WRKINST}/${CONFDIR}/Catalina/localhost
-       find ${WRKINST} -name \*.orig -or -name \*.bat -or -name \*.exe | \
-               xargs rm
-       @perl -pi -e 's,%%SYSCONFDIR%%,${SYSCONFDIR},' \
+       @${SUBST_CMD} -o ${BINOWN} -g ${BINGRP} \
                ${PREFIX}/tomcat/bin/setclasspath.sh
-       @sed -e 's,%%PREFIX%%,${TRUEPREFIX},' \
-               -e 's,%%CATALINA_BASE%%,${CATALINA_BASE},' \
-               < ${FILESDIR}/tomcat.rc > ${SAMPLEDIR}/tomcat.rc
+       @${SUBST_CMD} -o ${SHAREOWN} -g ${SHAREGRP} -c \
+               ${FILESDIR}/tomcat.rc \
+               ${SAMPLEDIR}/tomcat.rc
+       rm -r ${PREFIX}/tomcat/bin/[xi]64
+       find ${WRKINST} \
+               -name \*.beforesubt -or \
+               -name \*.orig -or \
+               -name \*.bat -or \
+               -name \*.exe -or \
+               -name \*.dll \
+               | xargs rm
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/www/tomcat/v5/distinfo,v
retrieving revision 1.6
diff -u -r1.6 distinfo
--- distinfo    4 Jan 2009 23:28:59 -0000       1.6
+++ distinfo    23 Nov 2010 05:53:15 -0000
@@ -1,15 +1,15 @@
-MD5 (apache-tomcat-5.5.27-admin.tar.gz) = npbHCZ0pfBt0G3RKMNtT2A==
-MD5 (apache-tomcat-5.5.27-fulldocs.tar.gz) = aG7v4+PyLY6bE7kMs2t5VA==
-MD5 (apache-tomcat-5.5.27.tar.gz) = 5Xb+2M5mwy7lKV1fdyexOA==
-RMD160 (apache-tomcat-5.5.27-admin.tar.gz) = z8CgUsruyvHlYU3aTvuiAvG2QQI=
-RMD160 (apache-tomcat-5.5.27-fulldocs.tar.gz) = RpfGwmaOiH2Qa0kwxKadm4T0rjY=
-RMD160 (apache-tomcat-5.5.27.tar.gz) = VHm7fdnAovnjep7t1f78YqVxiKY=
-SHA1 (apache-tomcat-5.5.27-admin.tar.gz) = sFjgxDYQx8upXSem8iKViAt/vkI=
-SHA1 (apache-tomcat-5.5.27-fulldocs.tar.gz) = ZS8oD8pd0u3Wqa6sf6zi1lBuvVI=
-SHA1 (apache-tomcat-5.5.27.tar.gz) = Zs9+GmfXpUw9MeW/RfBtQXOvjO4=
-SHA256 (apache-tomcat-5.5.27-admin.tar.gz) = 
gmUcU8xEG/rWFx7IeVVng+Powj1IHk5JeSmGfdAucBQ=
-SHA256 (apache-tomcat-5.5.27-fulldocs.tar.gz) = 
yz2pK2Yw4stvoC4m6jG4SY8syETVqdeGzwK+9IYCW5U=
-SHA256 (apache-tomcat-5.5.27.tar.gz) = 
sfqIFogZY86UhrDUXtDZRsuYueBNvcb9MfxUtq83iro=
-SIZE (apache-tomcat-5.5.27-admin.tar.gz) = 2401560
-SIZE (apache-tomcat-5.5.27-fulldocs.tar.gz) = 3062903
-SIZE (apache-tomcat-5.5.27.tar.gz) = 6478912
+MD5 (apache-tomcat-5.5.31-admin.tar.gz) = ua1YTX1F+XWNo0PfkUyL+A==
+MD5 (apache-tomcat-5.5.31-fulldocs.tar.gz) = rti7PlcAIZWDQzT8QckJOQ==
+MD5 (apache-tomcat-5.5.31.tar.gz) = mrBzhuI/TD38OwpeKbX4VA==
+RMD160 (apache-tomcat-5.5.31-admin.tar.gz) = 4kqzwGaBmTVKnrpcvUAGVKXQX9g=
+RMD160 (apache-tomcat-5.5.31-fulldocs.tar.gz) = VQefm5OGK4jU0LwJ/LHjUilx6R8=
+RMD160 (apache-tomcat-5.5.31.tar.gz) = xQtEQXLxWKhy2IxcHQ9jgSfWDBQ=
+SHA1 (apache-tomcat-5.5.31-admin.tar.gz) = ifE348wjfedai5MPL80NvxYuJNQ=
+SHA1 (apache-tomcat-5.5.31-fulldocs.tar.gz) = 9FtWOZyhAnoNfUJ3XK9g2KEzZbA=
+SHA1 (apache-tomcat-5.5.31.tar.gz) = zgYRZ1gkkM4ZTDjw6EA5FVWzRhs=
+SHA256 (apache-tomcat-5.5.31-admin.tar.gz) = 
bxPrDnvrkWIHCP2MbUEWJdRnlt4IyUFU+SEBeSEId88=
+SHA256 (apache-tomcat-5.5.31-fulldocs.tar.gz) = 
Ob7B9ClNlz3OX+spPL2ADg1yxJuGzKyOvgDu9IAbUZM=
+SHA256 (apache-tomcat-5.5.31.tar.gz) = 
nwL0fSzzUbz/TA0BOiU8llrQzA/AMF0Iby9lMCLM+oI=
+SIZE (apache-tomcat-5.5.31-admin.tar.gz) = 2395782
+SIZE (apache-tomcat-5.5.31-fulldocs.tar.gz) = 3131660
+SIZE (apache-tomcat-5.5.31.tar.gz) = 8277017
Index: files/tomcat.rc
===================================================================
RCS file: /cvs/ports/www/tomcat/v5/files/tomcat.rc,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 tomcat.rc
--- files/tomcat.rc     25 Oct 2006 18:10:18 -0000      1.1.1.1
+++ files/tomcat.rc     23 Nov 2010 06:03:26 -0000
@@ -2,7 +2,7 @@
 #
 # Define JAVA_HOME for _tomcat here
 # Start tomcat with following command:
-# $ sudo -u _tomcat %%PREFIX%%/tomcat/bin/startup.sh
+# $ sudo -u _tomcat ${TRUEPREFIX}/tomcat/bin/startup.sh
 #
 
 # javaPathHelper will pickup JAVA_HOME from the env. if
@@ -12,9 +12,9 @@
 JAVA_OPTS=-server
 
 # override other environment options:
-#CATALINA_HOME=%%PREFIX%%/tomcat
-#CATALINA_BASE=%%CATALINA_BASE%%
-#CATALINA_TMPDIR=$CATALINA_BASE/temp
+#CATALINA_HOME=${TRUEPREFIX}/tomcat
+#CATALINA_BASE=${CATALINA_BASE}
+#CATALINA_TMPDIR=${CATALINA_BASE}/temp
 #JAVA_OPTS="-server -Djava.net.preferIPv4Stack=true"
 #JPDA_TRANSPORT=
 #JPDA_ADDRESS=
Index: patches/patch-bin_catalina_sh
===================================================================
RCS file: /cvs/ports/www/tomcat/v5/patches/patch-bin_catalina_sh,v
retrieving revision 1.3
diff -u -r1.3 patch-bin_catalina_sh
--- patches/patch-bin_catalina_sh       13 Feb 2008 13:48:22 -0000      1.3
+++ patches/patch-bin_catalina_sh       23 Nov 2010 05:53:15 -0000
@@ -1,12 +1,12 @@
 $OpenBSD: patch-bin_catalina_sh,v 1.3 2008/02/13 13:48:22 kurt Exp $
---- bin/catalina.sh.orig       Mon Jan 28 15:38:25 2008
-+++ bin/catalina.sh    Sun Feb 10 21:21:27 2008
-@@ -137,7 +137,7 @@ fi
- 
CLASSPATH="$CLASSPATH":"$CATALINA_HOME"/bin/bootstrap.jar:"$CATALINA_HOME"/bin/commons-logging-api.jar
+--- bin/catalina.sh.orig       Thu Jul  1 11:19:40 2010
++++ bin/catalina.sh    Tue Aug  3 04:52:30 2010
+@@ -156,7 +156,7 @@ fi
+ CLASSPATH="$CLASSPATH""$CATALINA_HOME"/bin/bootstrap.jar
  
  if [ -z "$CATALINA_BASE" ] ; then
 -  CATALINA_BASE="$CATALINA_HOME"
 +  CATALINA_BASE="/var/tomcat"
  fi
  
- if [ -z "$CATALINA_TMPDIR" ] ; then
+ if [ -z "$CATALINA_OUT" ] ; then
Index: patches/patch-bin_setclasspath_sh
===================================================================
RCS file: /cvs/ports/www/tomcat/v5/patches/patch-bin_setclasspath_sh,v
retrieving revision 1.2
diff -u -r1.2 patch-bin_setclasspath_sh
--- patches/patch-bin_setclasspath_sh   10 Apr 2007 19:10:54 -0000      1.2
+++ patches/patch-bin_setclasspath_sh   23 Nov 2010 06:04:32 -0000
@@ -1,23 +1,22 @@
 $OpenBSD: patch-bin_setclasspath_sh,v 1.2 2007/04/10 19:10:54 kurt Exp $
---- bin/setclasspath.sh.orig   Mon Mar  5 10:26:01 2007
-+++ bin/setclasspath.sh        Tue Mar 27 13:37:25 2007
-@@ -8,6 +8,11 @@
- # First clear out the user classpath
- CLASSPATH=
+--- bin/setclasspath.sh.orig   Thu Jul  1 11:19:40 2010
++++ bin/setclasspath.sh        Tue Aug  3 04:52:30 2010
+@@ -22,5 +22,10 @@
+ # 
-----------------------------------------------------------------------------
  
 +# Read $JAVA_HOME - sudo doesn't pass environment variables
-+if [ -r "%%SYSCONFDIR%%/tomcat/tomcat.rc" ]; then     
-+  . %%SYSCONFDIR%%/tomcat/tomcat.rc
++if [ -r "${SYSCONFDIR}/tomcat/tomcat.rc" ]; then     
++  . ${SYSCONFDIR}/tomcat/tomcat.rc
 +fi
 +
  # Make sure prerequisite environment variables are set
  if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then
    # Bugzilla 37284
-@@ -16,6 +21,7 @@ if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then
+@@ -29,6 +34,7 @@ if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then
    else
      echo "Neither the JAVA_HOME nor the JRE_HOME environment variable is 
defined"
      echo "At least one of these environment variable is needed to run this 
program"
-+    echo "Edit \`%%SYSCONFDIR%%/tomcat/tomcat.rc' to point to your 
\$JAVA_HOME"
++    echo "Edit \`${SYSCONFDIR}/tomcat/tomcat.rc' to point to your \$JAVA_HOME"
      exit 1
    fi
  fi
Index: pkg/PLIST-admin
===================================================================
RCS file: /cvs/ports/www/tomcat/v5/pkg/PLIST-admin,v
retrieving revision 1.2
diff -u -r1.2 PLIST-admin
--- pkg/PLIST-admin     13 Feb 2008 13:48:22 -0000      1.2
+++ pkg/PLIST-admin     23 Nov 2010 05:53:15 -0000
@@ -40,7 +40,6 @@
 tomcat/server/webapps/admin/images/Roles.gif
 tomcat/server/webapps/admin/images/Server.gif
 tomcat/server/webapps/admin/images/Service.gif
-tomcat/server/webapps/admin/images/Thumbs.db
 tomcat/server/webapps/admin/images/TomcatBanner.jpg
 tomcat/server/webapps/admin/images/Users.gif
 tomcat/server/webapps/admin/images/Valve.gif
Index: pkg/PLIST-examples
===================================================================
RCS file: /cvs/ports/www/tomcat/v5/pkg/PLIST-examples,v
retrieving revision 1.6
diff -u -r1.6 PLIST-examples
--- pkg/PLIST-examples  15 Nov 2010 10:45:53 -0000      1.6
+++ pkg/PLIST-examples  23 Nov 2010 05:53:15 -0000
@@ -802,6 +802,7 @@
 
webapps/tomcat-docs/catalina/docs/api/org/apache/catalina/loader/StandardClassLoader.html
 
webapps/tomcat-docs/catalina/docs/api/org/apache/catalina/loader/StandardClassLoaderMBean.html
 
webapps/tomcat-docs/catalina/docs/api/org/apache/catalina/loader/WebappClassLoader.PrivilegedFindResource.html
+webapps/tomcat-docs/catalina/docs/api/org/apache/catalina/loader/WebappClassLoader.PrivilegedFindResourceByName.html
 
webapps/tomcat-docs/catalina/docs/api/org/apache/catalina/loader/WebappClassLoader.PrivilegedGetClassLoader.html
 
webapps/tomcat-docs/catalina/docs/api/org/apache/catalina/loader/WebappClassLoader.html
 
webapps/tomcat-docs/catalina/docs/api/org/apache/catalina/loader/WebappLoader.html
Index: pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/www/tomcat/v5/pkg/PLIST-main,v
retrieving revision 1.6
diff -u -r1.6 PLIST-main
--- pkg/PLIST-main      15 Nov 2010 10:45:53 -0000      1.6
+++ pkg/PLIST-main      23 Nov 2010 07:12:27 -0000
@@ -88,12 +88,11 @@
 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/commons-logging-api-1.1.1.jar
 tomcat/bin/digest.sh
-tomcat/bin/jkstatus-tasks.xml
 tomcat/bin/jmxaccessor-tasks.xml
-tomcat/bin/jsvc.tar.gz
 tomcat/bin/setclasspath.sh
 tomcat/bin/shutdown.sh
 tomcat/bin/startup.sh
@@ -138,7 +137,6 @@
 tomcat/server/lib/tomcat-apr.jar
 tomcat/server/lib/tomcat-coyote.jar
 tomcat/server/lib/tomcat-http.jar
-tomcat/server/lib/tomcat-jkstatus-ant.jar
 tomcat/server/lib/tomcat-util.jar
 tomcat/server/webapps/
 tomcat/server/webapps/host-manager/
@@ -180,4 +178,5 @@
 tomcat/server/webapps/manager/manager.xml
 tomcat/server/webapps/manager/status.xsd
 tomcat/server/webapps/manager/xform.xsl
+...@rcscript ${RCDIR}/tomcat5
 @extraunexec rm -rf ${CATALINA_BASE}/logs/* ${CATALINA_BASE}/work/*
Index: pkg/README-main
===================================================================
RCS file: /cvs/ports/www/tomcat/v5/pkg/README-main,v
retrieving revision 1.1
diff -u -r1.1 README-main
--- pkg/README-main     15 Nov 2010 10:45:53 -0000      1.1
+++ pkg/README-main     23 Nov 2010 07:19:59 -0000
@@ -1,19 +1,19 @@
 $OpenBSD: README-main,v 1.1 2010/11/15 10:45:53 sthen Exp $
 
 The tomcat package does not install the example webapps, documentation
-or admin webapp.  You must supply your own webapps and configuration or
+or admin webapp. 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
+documentation. Sample config files for the host-manager and manager
 webapps can be found in ${TRUEPREFIX}/share/examples/tomcat.
 
 The tomcat-admin package contains the admin webapp but you must supply
-your own configuration for it or use the tomcat-examples package.  A
+your own configuration for it or use the tomcat-examples package. A
 sample config file can be found in ${TRUEPREFIX}/share/examples/tomcat.
 
 The tomcat-examples package includes the examples, full documentation
 and localhost config files for admin, host-manager and manager webapps.
 
-The packages are structured this way to facilate mantaining a server
+The packages are structured this way to facilitate maintaining a server
 which normally would not contain the examples and documentation webapp
 and optionally contain the admin webapp.
 
@@ -25,8 +25,11 @@
 variables from `${SYSCONFDIR}/tomcat/tomcat.rc'. You should define environment
 variables such as JAVA_HOME and JAVA_OPTS in `${SYSCONFDIR}/tomcat/tomcat.rc'.
 
-With the following command Tomcat is started as user `_tomcat':
-$ sudo -u _tomcat ${TRUEPREFIX}/tomcat/bin/startup.sh
+To start Tomcat, use the standard rc script:
+$ /etc/rc.d/tomcat5 start
+
+Stopping Tomcat is done in a similar way:
+$ /etc/rc.d/tomcat5 stop
 
 If you want Tomcat to serve on privileged ports (e.g. 80), then makes
 sure the Connector port is 80 in your `${SYSCONFDIR}/tomcat/server.xml', or 
even
Index: pkg/tomcat5.rc
===================================================================
RCS file: pkg/tomcat5.rc
diff -N pkg/tomcat5.rc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/tomcat5.rc      23 Nov 2010 06:59:40 -0000
@@ -0,0 +1,21 @@
+#!/bin/sh
+#
+# $OpenBSD$
+
+. /etc/rc.d/rc.subr
+
+daemon="${TRUEPREFIX}/tomcat/bin/startup.sh"
+
+rc_start() {
+       sudo -u _tomcat ${daemon}
+}
+
+rc_reload() {
+       rc_err "$0: reload is not supported"
+}
+
+rc_stop() {
+        sudo -u _tomcat ${TRUEPREFIX}/tomcat/bin/shutdown.sh
+}
+
+rc_cmd $1

Reply via email to