Re: Packaging scm-manager

James Le Cuirot <chewi-Yn+4UywRBy5n8C+U7lyxXlpr/1R2p/[email protected]> Fri, 9 Aug 2013 08:04:02 +0100
Newsgroups gmane.linux.gentoo.java
Message-ID <[email protected]>
On Thu, 08 Aug 2013 18:48:24 -0500
Taahir Ahmed <[email protected]> wrote:

> I'm starting by writing an init script for my existing install
> (attached). I've got it mostly working, I think, but I am wondering
> if there's a gentoo- approved way of setting a proper value for
> JAVA_HOME in the init script. Right now I'm just using a
> sub-shell call to java-config to detect the active system vm.

That's what the Tomcat init script does and I don't think there's
anything wrong with that. It does effectively the same thing as
sourcing /etc/profile.d/java-config-2.sh would do but I don't think
there's any point in doing that because you will always want the system
VM in this case. Simple use /etc/java-config-2/current-system-vm as
your JAVA_HOME and you will get the same result. This location is a
symlinked directory.

I was going to suggest that you install a launcher wrapper in the
ebuild using java-pkg_dolauncher but this doesn't allow you to start
the process with jsvc because the wrapper is hardcoded to use "java". I
remember running into this issue before but decided not to use jsvc in
the end anyway.

Regards,
James