Hello Marcus,

I've been working on this issue for the Ubuntu version of tomcat5.5 to
try to make sure it would run with openjdk-6-jre-headless which is our
target for default java server runtime environment.

Since Tomcat uses libecj-java to compile JSPs, it doesn't really need a
JDK. So I removed the JDK test in the init script and adjusted deps in
the control file to use the new java-common virtuals (and moved the
depends to libtomcat5.5-java as it is in debian policy to have the
lib*-java depend on a runtime).

I also adjusted the JDK_DIRS list to preferably use the one in
/usr/lib/jvm/default-java.

Please see attached patch, applies to current 5.5.26-3.
Hoping this helps, let me know what you think of it.

-- 
Thierry Carrez
Ubuntu server team
diff -u tomcat5.5-5.5.26/debian/control tomcat5.5-5.5.26/debian/control
--- tomcat5.5-5.5.26/debian/control
+++ tomcat5.5-5.5.26/debian/control
@@ -12,8 +13,8 @@
 
 Package: tomcat5.5
 Architecture: all
-Depends: java-gcj-compat-dev (>= 1.0.30-5) | java2-runtime, libtomcat5.5-java (>= ${source:Version}), adduser (>= 3.34), libecj-java, jsvc (>= 1.0.2~svn20061127-6)
-Suggests: java-virtual-machine, libapache2-mod-jk, tomcat5.5-webapps (>= ${source:Version}), tomcat5.5-admin (>= ${source:Version})
+Depends: libtomcat5.5-java (>= ${source:Version}), adduser (>= 3.34), jsvc (>= 1.0.2~svn20061127-6)
+Suggests: libapache2-mod-jk, tomcat5.5-webapps (>= ${source:Version}), tomcat5.5-admin (>= ${source:Version})
 Conflicts: tomcat5.5-admin (<= 5.5.20-5)
 Description: Servlet and JSP engine
  Apache Tomcat is the reference implementation for the Java Servlet
@@ -25,7 +26,7 @@
 
 Package: libtomcat5.5-java
 Architecture: all
-Depends: libxerces2-java, libservlet2.4-java, libcommons-el-java, ant, libcommons-launcher-java, libcommons-logging-java, libcommons-modeler-java (>= 2.0), libmx4j-java, libcommons-collections3-java, libcommons-dbcp-java, libcommons-pool-java
+Depends: default-jre-headless | java2-runtime-headless, libecj-java, libxerces2-java, libservlet2.4-java, libcommons-el-java, ant, libcommons-launcher-java, libcommons-logging-java, libcommons-modeler-java (>= 2.0), libmx4j-java, libcommons-collections3-java, libcommons-dbcp-java, libcommons-pool-java
 Suggests: tomcat5.5 
 Description: Java Servlet engine -- core libraries
  Apache Tomcat is the reference implementation for the Java Servlet
diff -u tomcat5.5-5.5.26/debian/tomcat5.5.init tomcat5.5-5.5.26/debian/tomcat5.5.init
--- tomcat5.5-5.5.26/debian/tomcat5.5.init
+++ tomcat5.5-5.5.26/debian/tomcat5.5.init
@@ -48,17 +48,12 @@
 
 # The first existing directory is used for JAVA_HOME (if JAVA_HOME is not
 # defined in $DEFAULT)
-JDK_DIRS="/usr/lib/jvm/java-6-sun /usr/lib/jvm/java-1.5.0-sun /usr/lib/j2sdk1.5-sun /usr/lib/j2sdk1.5-ibm /usr/lib/j2sdk1.4-sun /usr/lib/j2sdk1.4-blackdown /usr/lib/j2se/1.4 /usr/lib/j2sdk1.4-ibm /usr/lib/j2sdk1.3-sun /usr/lib/j2sdk1.3-blackdown /usr/lib/jvm/java-gcj /usr/lib/kaffe"
+JDK_DIRS="/usr/lib/jvm/default-java /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-cacao /usr/lib/jvm/java-6-sun /usr/lib/jvm/java-1.5.0-sun /usr/lib/jvm/java-gcj"
 
 # Look for the right JVM to use
 for jdir in $JDK_DIRS; do
     if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then
-	JAVA_HOME_TMP="$jdir"
-	# checks for a real JDK like environment, needed to check if 
-	# really the java-gcj-compat-dev package is installed
-	if [ -r "$jdir/bin/jdb" ]; then
-	    JAVA_HOME="$JAVA_HOME_TMP"
-	fi
+	JAVA_HOME="$jdir"
     fi
 done
 export JAVA_HOME
_______________________________________________
pkg-java-maintainers mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/pkg-java-maintainers

Reply via email to