Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Nov 2001 12:01:56 +0000
From:      Rasputin <rasputin@submonkey.net>
To:        Ernst de Haan <znerd@freebsd.org>
Cc:        java@freebsd.org
Subject:   Re: tomcat port (PATCH)
Message-ID:  <20011122120156.A14463@shikima.mine.nu>
In-Reply-To: <200111221137.fAMBb1n10075@zaphod.euronet.nl>; from znerd@freebsd.org on Thu, Nov 22, 2001 at 12:37:00PM %2B0100
References:  <20011119161722.A56021@shikima.mine.nu> <200111221108.fAMB8Ne07123@zaphod.euronet.nl> <20011122113154.A14283@shikima.mine.nu> <200111221137.fAMBb1n10075@zaphod.euronet.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
* Ernst de Haan <znerd@freebsd.org> [011122 11:40]:

> > I'm sort of assuming that if you've installed a JDK you'll have added the
> > toolchain to your path?
> 
> Nope. You should not. Even if we could assume that the JDK bin directory is 
> in the path, it would be in the path for specific users, not necessarily for 
> root. The port should not break because such an assumption is not met.

Good point.

> > The alternative is setting a dependency for
> > JAVA_HOME/bin/javac, but again this assumes that you set
> > JAVA_HOME (or JDK_HOME, JRE_HOME, whatever is decided on)....
> 
> Well, you can use someting like:
> 
>    JAVA_HOME?= ${PREFIX}/jdk1.1.8
> 
> so it can be overridden but has a default value (using something like 'make 
> JAVA_HOME=/usr/local/jdk1.3.1 install'). Right now you should select a JDK 
> yourself, as the default JDK. See the www/orion port for an example.

That's pretty much what I do, it's just my default is a personal one.
I'll edit that to point to ${LOCALBASE}/jdk1.3.1
(which is all /usr/java really is anyway on this box)
My concern is making it configurable, not what the default is.
That's a whole other kettle of fish (called bsd.port.mk, I think :) )

> > > > 2] makes files/patch-aa correctly set java_home in workers.properties
> > > > (dependant on JAVA_HOME)

[Snip: sorry I mentioned /usr/java now]

> ...port should work out of the box, and it should comply to the rules for ports. 

Sure, but we all know ${PORTSDIR}/java is having trouble conforming to the
'fire and forget' design...

> > > > 3] Makes tomcat.sh rc script correctly read JAVA_HOME
> > > > (overridable by 'make JAVA_HOME=/usr/local/jdk1.1.8' or whatever)
> > >
> > > 'read'? Where from?
> >
> > Uh, the environment?
> 
> Well, then where is it set? This again is a vague dependency.

Remember it's set to an arbitrary value in the port, so
it's no more vague than any other port, really..
(although my default doesn't exist on any other box, probably)

Again, port writers have to choose a personal default, and make it tweakable,
but that still means a standard 'make install' can end up attempting to
pull down odd JDKs. See the other thread.

I'm not trying to fix that here, although I'd be
interested in helping with that effort when the time comes.

> > I was also wondering if there was any reason why tomcat needs to run as
> > root? I managed to get it to run happily over here as user 'tomcat', but
> > I've only be running it about 4 days, so does anyone else know a reason it
> > needs to be root? Only thing I can think of is if you want it as your
> > standard webserver, you'd need root to bind to port 80 - but that could be
> > got around with a port forwarder...
> 
> It could run as a separate user. See the www/orion port for an example.

Cheers - I'll pinch that wholesale if I may, reset that JAVA_HOME to a
more conventional one, and then send-pr it
(or should I mail it over to the maintainer?)

-- 
If God is dead, who will save the Queen?
Rasputin :: Jack of All Trades - Master of Nuns ::

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011122120156.A14463>