From owner-freebsd-java@FreeBSD.ORG Wed Dec 22 00:26:53 2004 Return-Path: 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 A874416A4CE for ; Wed, 22 Dec 2004 00:26:53 +0000 (GMT) Received: from morla.lan.homeboyz.com (morla.lan.homeboyz.com [38.119.239.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3911543D41 for ; Wed, 22 Dec 2004 00:26:53 +0000 (GMT) (envelope-from tduffey@homeboyz.org) Received: (qmail 97988 invoked from network); 22 Dec 2004 00:20:12 -0000 Received: from hbi-int87.lan.homeboyz.com (HELO ?192.168.1.87?) (tduffey@192.168.1.87) by morla.lan.homeboyz.com with AES256-SHA encrypted SMTP; 22 Dec 2004 00:20:12 -0000 Message-ID: <41C8BDBC.4050801@homeboyz.org> Date: Tue, 21 Dec 2004 18:20:12 -0600 From: Thomas Duffey User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 Cc: freebsd-java@freebsd.org References: <200412211740.iBLHeUcw090127@freefall.freebsd.org> <20041221184340.GA14170@rcfile.org> <37919c31041221110775dc0396@mail.gmail.com> <20041221193221.GA14792@rcfile.org> <41C87FC4.4070803@homeboyz.org> <20041221234347.GA16825@rcfile.org> In-Reply-To: <20041221234347.GA16825@rcfile.org> X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: ports/75348: Tomcat port overwrites server.xml config file X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Dec 2004 00:26:53 -0000 Hi Brent, Brent Verner wrote: > Thomas, thanks for reminding me of CATALINA_BASE :-) > > This might well be the best solution. Keep all user >configured files away from the port-managed files. Many >other systems package/install tomcat in this manner, FWIW. > > Where could a directory be created to hold more than one >CATALINA_BASE directory? In that directory could be >directories with names based on the package's ${ORIGIN}... > > ${SITE_BASE}/tomcat4 > ${SITE_BASE}/tomcat41 > ${SITE_BASE}/tomcat5 > >where SITE_BASE could default to something like >/usr/local/www-java or /usr/local/www/catalina-base. > > I'm not sure I follow you. Are you trying to declare a default location for individual "instances" of specific versions of Tomcat? > The do-install target would check for existence of the >CATALINA_BASE directory. If not present, the directory >is created and populated with the necessary files. If >the catalina.sh were used to start/stop the tomcat, we >could simply create/supply a setenv.sh file (next to >catalina.sh) that defined the external CATALINA_BASE if >not already defined in the environment. > > When I build a Tomcat port, then, would I need to build/install it once for each instance? Suppose I have three instances, would I need to do: # CATALINA_BASE=/home/appserver1/tomcat make && make install # CATALINA_BASE=/home/appserver2/tomcat make && make install # CATALINA_BASE=/home/appserver3/tomcat make && make install This seems like more work to me than just understanding how CATALINA_BASE works, configuring your Tomcat instances however they best suit your needs and then assuming the FreeBSD port will always just install the latest and greatest to /usr/local/jakarta-tomcatXX and leave your instances files alone. Although I typically use daemontools to start/stop my Tomcat instances, I would be interested in a more intelligent startup/shutdown script that references /etc/rc.conf to determine whether or not Tomcat should even be started at boot (e.g. tomcat41_enable="YES"). Whatever you come up with, please keep things simple for those of us who expect the port to install a standard Tomcat setup, including the latest default configuration files. Best Regards, Tom Duffey