From owner-freebsd-java@FreeBSD.ORG Fri Feb 3 14:11:17 2006 Return-Path: X-Original-To: java@FreeBSD.org Delivered-To: freebsd-java@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 05DC516A420; Fri, 3 Feb 2006 14:11:17 +0000 (GMT) (envelope-from lawrance@FreeBSD.org) Received: from mailout1.pacific.net.au (mailout1.pacific.net.au [61.8.0.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0656943D8A; Fri, 3 Feb 2006 14:11:09 +0000 (GMT) (envelope-from lawrance@FreeBSD.org) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.0.86]) by mailout1.pacific.net.au (8.13.4/8.13.4/Debian-3) with ESMTP id k13EAsbF009793; Sat, 4 Feb 2006 01:10:54 +1100 Received: from [61.8.39.99] (ppp2763.dyn.pacific.net.au [61.8.39.99]) by mailproxy1.pacific.net.au (8.13.4/8.13.4/Debian-3) with ESMTP id k13EAmWP019024; Sat, 4 Feb 2006 01:10:49 +1100 Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <9ABDB680-33F2-4890-B95D-D4739A327404@FreeBSD.org> Content-Transfer-Encoding: 7bit From: Sam Lawrance Date: Sat, 4 Feb 2006 01:10:56 +1100 To: java@FreeBSD.org X-Mailer: Apple Mail (2.746.2) Cc: Kang Liu , hq@FreeBSD.org Subject: tomcat ports cleanup X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2006 14:11:17 -0000 Hello folks. In response to PRs 38018, 38020, 83434, 74344, and 75143 and a bunch of suggestions from Herve and #tomcat on FreeNode (thanks jasonb), here's a patch to simplify and improve the tomcat55 port. I have similar patches in the pipeline for tomcat41 and tomcat5 which also backport Herve's rc script to those ports. For maintainer and general review, here's the patch: http://people.freebsd.org/~lawrance/patch-jakarta-tomcat55 The changes: - Rename from jakarta-tomcat to tomcat, since tomcat is no longer a subproject of jakarta. The jakarta-tomcat55 port will be moved to www/tomcat55. - Bump PORTREVISION because new files are installed. - Remove "USE_RC_SUBR=yes" in favour of "USE_RC_SUBR=tomcat55.sh". which will automatically do substitutions in, and install, the rc script. - Remove the build and installation of "tomcat55ctl" (daemonctl). The rc script is a much better mechanism and is far more flexible configuration-wise than daemonctl. The change means that an ordinary user cannot run the startup script simply by adding them into the "www" group, as was the case with daemonctl. If you need this functionality, consider using a general-purpose tool such as sudo. - Remove some unused STARTUP_* variables from the makefile that are no longer used. - Remove the AUTO_START variable. Auto start functionality has been removed. - Remove the STOP_TIMEOUT variable. STOP_TIMEOUT previously defined the maximum time daemonctl would wait before killing the tomcat java process. Equivalent functionality is now available from the rc.conf variable "tomcat55_stop_timeout". - Remove a long list of substitutions from the post-patch target and add them to SUB_LIST. Where SUB_FILES is insufficient, REPLACE_FILES is still used. The post-patch target which reads REPLACE_FILES now applies SUB_LIST. - Rename files/pkg-[de]install to files/pkg-[de]install.in. Remove them from REPLACE_FILES and add them to SUB_FILES. - pkg-deinstall.in now includes the %%PID_FILE%% substitution instead of hardcoding it. Substitutions are now assigned to variables at the beginning of the script. - pkg-install.in substitutions are now assigned to variables at the beginning of the script. - The existing rc.d script in files/tomcat.sh.in has been renamed to files/tomcat55.sh.in. USE_RC_SUBR doesn't allow us to share the rc script between ports; so each port will get its own copy with the correct name. - The rc script now includes the tomcat55_stop_timeout parameter, allowing us to specify how long the rc script should wait for shutdown before killing the JVM. The default is 10 seconds. - Some slight brokenness regarding the rc script start and stop commands has been fixed. The rc script now writes a PID file and correctly waits for shutdown. - The ownership of installed files has changed. All files are installed with default uid/gid (root:wheel) except for the conf/, logs/, temp/ and work/ directories. All of these directories must be writable by tomcat and so are installed with ${TOMCAT_USER}:$ {TOMCAT_GROUP}. Anyone who wants to make this more fine-grained, if feasible, should send patches ;-) The resulting port is a bit more straightforward now. It's reasonable to expect there may be some problems; so I ask that you please test and give feedback if possible. I'm all ears. Really. It's hard to type using earlobes for fingers, but I'll try. Cheers Sam