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

next in thread | previous in thread | raw e-mail | index | archive | help
Heya,

> > Uhm, will javac be in the path? I don't think you get javac in the path
> > if you install a JDK. The JDK's just install into a subdir of ${PREFIX}.
> > The scripts and binaries are then in the bin/ subdir, they are *not*
> > copied to /usr/local/bin nor is a symlink placed there, AFAIK.
>
> 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.

> 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.

> > > 2] makes files/patch-aa correctly set java_home in workers.properties
> > > (dependant on JAVA_HOME; I have a symlink, /usr/java, that I repoint to
> > > /usr/local/jdk1,1,8, /usr/local/linux-jdk1.3.1 or whatever other JDK
> > > I'm using that day)
> >
> > Well, this is specific to your situation. It's not official that
> > /usr/java points to a JDK. And I would not want to introduce that
> > either... *If* some directory like that would be introduced, then it
> > would at *least* be below ${PREFIX} (normally /usr/local/)
>
> Sure - that's why you can override it to point to wherever your JDK lives.

No, you should not have to override something in order to make it work. A 
port should work out of the box, and it should comply to the rules for ports. 
One of the rules is that everything goes below ${PREFIX}.

> > > 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.

> > Do you replace it? I haven't looked at the diff yet,
>
> Have a look - I'm horribly hungover today, so I'm not in any state
> to explain it properly.
>
> > don't really have time yet....
> > Hope this helps :-)
>
> Sure - the more feedback the better.
> 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.

Ernst


-- 
Ernst de Haan
EuroNet Internet B.V.

    "Come to me all who are weary and burdened
        and I will give you rest" -- Jesus Christ

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?200111221137.fAMBb1n10075>