Date: Sat, 4 Feb 2006 01:10:56 +1100 From: Sam Lawrance <lawrance@FreeBSD.org> To: java@FreeBSD.org Cc: Kang Liu <liukang@cn.freebsd.org>, hq@FreeBSD.org Subject: tomcat ports cleanup Message-ID: <9ABDB680-33F2-4890-B95D-D4739A327404@FreeBSD.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9ABDB680-33F2-4890-B95D-D4739A327404>