Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 149451 - www-servers/resin-3.0.21 default config missing GENTOO_VM
Summary: www-servers/resin-3.0.21 default config missing GENTOO_VM
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Krzysztof Pawlik (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on: 149460
Blocks:
  Show dependency tree
 
Reported: 2006-09-28 14:06 UTC by unlord
Modified: 2006-09-28 16:50 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
resin-3.0.21_missing-GENTOO_VM.patch (resin-3.0.21_missing-GENTOO_VM.patch,365 bytes, patch)
2006-09-28 14:08 UTC, unlord
Details | Diff
resin-init.dconf.d.patch (resin-init.dconf.d.patch,1.80 KB, patch)
2006-09-28 15:20 UTC, Krzysztof Pawlik (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description unlord 2006-09-28 14:06:32 UTC
In order to change the VM that a java based service uses, you need to do the following in the conf.d file:

export GENTOO_VM=<VM>

It would be really useful if the config file for resin had an example of this, e.g.

#export GENTOO_VM=sun-jdk-1.5

In the case of resin-3.0.21, the normal install requires you to use a 1.5 jvm (1.4 can work, but effort would be needed like with tomcat to separate out the java5 modules).
Comment 1 unlord 2006-09-28 14:08:55 UTC
Created attachment 98338 [details, diff]
resin-3.0.21_missing-GENTOO_VM.patch
Comment 2 Krzysztof Pawlik (RETIRED) gentoo-dev 2006-09-28 14:23:09 UTC
To me $(java-config --select-vm=<whatever you want> -O) looks better. I'm about to add this as an example around JAVA_HOME. Opinions?
Comment 3 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-09-28 14:45:56 UTC
I've already seen bugs about calling java-config in conf.d files breaking when /usr is not mounted yet. Not sure if that was baselayout failure or we just shouldn't do that. IMHO just setting static variables (GENTOO_VM) in conf.d files and having JAVA_HOME (if the service reliese on it) derived from it using java-config (which honours GENTOO_VM) inside init.d script is cleaner approach.
Comment 4 Krzysztof Pawlik (RETIRED) gentoo-dev 2006-09-28 15:20:28 UTC
Created attachment 98343 [details, diff]
resin-init.dconf.d.patch

Ok, what about this approach? If GENTOO_VM is in conf.d/resin there's no need to duplicate it in as JAVA_HOME.
Comment 5 Krzysztof Pawlik (RETIRED) gentoo-dev 2006-09-28 15:36:11 UTC
Applied to 3.0.21
Comment 6 unlord 2006-09-28 16:36:36 UTC
Thanks for the quick turn around on this.  I like that solution and its probably what other Java services should base themselves on.
Comment 7 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-09-28 16:46:09 UTC
I think you should omit the --select-vm after all, so you don't need a fixed java-config to avoid bug 149460. java-config honours GENTOO_VM setting in the env automatically, no need to pass it explicitly like this.
Comment 8 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-09-28 16:49:54 UTC
Oh, but as unlord pointed out, GENTOO_VM would need to be exported. Sorry then.