Bug#754942: jtreg uses /usr/lib/jvm/default-java/ but does not depend on default-jre-headless

2014-07-16 Thread Thomas Klute
Package: jtreg
Version: 4.1-2
Severity: important

While trying to compile the experimental openjdk-8 package from
source, the jtreg test suite completely failed to run with the error
message Cannot determine version of java to run jtreg.

I found that the reason was that jtreg expects to find a usable JVM in
/usr/lib/jvm/default-java/, unless $JAVA_HOME provides a different
path. However, this default value will fail if default-jre-headless is
not installed, as may well be the case (e.g., I had manually installed
openjdk-7-jdk without any of the default-(jre|jdk)* packages).

Without default-jre-headless:

$ jtreg -version
Cannot determine version of java to run jtreg

With default-jre-headless:

$ jtreg -version
jtreg, version 4.1 src b02
Installed in /usr/share/java/jtreg.jar
Running on platform version 1.6.0_31 from
/usr/lib/jvm/java-6-openjdk-amd64/jre.
Built with 1.6.0_18 on 07/07/2011 03:57 AM.
Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.

Since jtreg can still be used without default-jre-headless by setting
JAVA_HOME as appropriate, a Depends relationship is not warranted,
but Recommends or Suggests seems reasonable. An alternative
approach would be to simply use the first java binary found in $PATH
by default, which will usually be whatever the administrator has
selected using update-java-alternatives, which also seems reasonable.

The problem also exists in sid (jtreg_4.1-b09-1), although the error
message is more useful because it directly points at the missing
java binary:

$ jtreg -version
/usr/bin/jtreg: 86: /usr/bin/jtreg: /usr/lib/jvm/default-java/bin/java:
not found


-- System Information:
Debian Release: 7.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/32 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages jtreg depends on:
ii  javahelp2  2.0.05.ds1-6
ii  libjtharness-java  4.4.0-MR1-Rel-b19-1
ii  libxalan2-java 2.7.1-7+deb7u1

jtreg recommends no packages.

jtreg suggests no packages.

-- no debconf information

__
This is the maintainer address of Debian's Java team
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-maintainers. 
Please use
debian-j...@lists.debian.org for discussions and questions.


Bug#754942: jtreg uses /usr/lib/jvm/default-java/ but does not depend on default-jre-headless

2014-07-16 Thread Emmanuel Bourg
Hi Thomas,

jtreg doesn't depend on a Java runtime because it can use the JDK being
tested to run. This is done by setting the JT_JAVA environment variable
(or JAVA_HOME with jtreg 4.1-2 in Wheezy).

The best we could do would be to add a suggested dependency, but this
can't be a hard dependency.

Also note that you'll have to backport jtreg 4.1-b09-1 from unstable if
you want to run the openjdk-8 tests in Wheezy, jtreg 4.1-2 doesn't work.

Emmanuel Bourg

__
This is the maintainer address of Debian's Java team
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-maintainers. 
Please use
debian-j...@lists.debian.org for discussions and questions.


Bug#754942: jtreg uses /usr/lib/jvm/default-java/ but does not depend on default-jre-headless

2014-07-16 Thread Thomas Klute
Hi Emmanuel!

Am 16.07.2014 11:15, schrieb Emmanuel Bourg:
 jtreg doesn't depend on a Java runtime because it can use the JDK being
 tested to run. This is done by setting the JT_JAVA environment variable
 (or JAVA_HOME with jtreg 4.1-2 in Wheezy).

I know, but the openjdk-8 build doesn't do that (which admittedly is not
a failure of jtreg), even on Sid. Remove default-jre-headless and give
it a try. ;-)

 The best we could do would be to add a suggested dependency, but this
 can't be a hard dependency.

As I've written in the report, I know that a hard dependency would not
be appropriate. I'm not sure if suggested or recommended is more
suitable, but I'm not going to complain either way. :-)

 Also note that you'll have to backport jtreg 4.1-b09-1 from unstable if
 you want to run the openjdk-8 tests in Wheezy, jtreg 4.1-2 doesn't work.

Actually, it does. I haven't checked if some of the reported failures
and errors are due to the older version, but the test suite runs on my
wheezy system – as long as default-jre-headless is installed.

Kind regards,
Thomas

__
This is the maintainer address of Debian's Java team
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-maintainers. 
Please use
debian-j...@lists.debian.org for discussions and questions.