[SCM] tomcat7: Servlet and JSP engine branch, master, updated. debian/7.0.23-1-15-g8eed63c

tony mancill tmancill at debian.org
Mon Feb 27 19:32:20 UTC 2012


The following commit has been merged in the master branch:
commit 07db4002711c889777993ad3a7e2b79e31911bbc
Author: tony mancill <tmancill at debian.org>
Date:   Sun Feb 26 22:52:59 2012 -0800

    update init script to find multiarch openjdks (closes: #651487)

diff --git a/debian/tomcat7.init b/debian/tomcat7.init
index 4fb4b9a..fb11566 100644
--- a/debian/tomcat7.init
+++ b/debian/tomcat7.init
@@ -27,7 +27,7 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin
 NAME=tomcat7
 DESC="Tomcat servlet engine"
 DEFAULT=/etc/default/$NAME
-JVM_TMP=/tmp/tomcat7-tmp
+JVM_TMP=/tmp/tomcat7-$NAME-tmp
 
 if [ `id -u` -ne 0 ]; then
 	echo "You need root privileges to run this script"
@@ -53,9 +53,32 @@ fi
 TOMCAT7_USER=tomcat7
 TOMCAT7_GROUP=tomcat7
 
+# this is a work-around until there is a suitable runtime replacement 
+# for dpkg-architecture for arch:all packages
+# this function sets the variable OPENJDKS
+find_openjdks()
+{
+        for jvmdir in /usr/lib/jvm/java-7-openjdk-*
+        do
+                if [ -d "${jvmdir}" -a "${jvmdir}" != "/usr/lib/jvm/java-7-openjdk-common" ]
+                then
+                        OPENJDKS=$jvmdir
+                fi
+        done
+        for jvmdir in /usr/lib/jvm/java-6-openjdk-*
+        do
+                if [ -d "${jvmdir}" -a "${jvmdir}" != "/usr/lib/jvm/java-6-openjdk-common" ]
+                then
+                        OPENJDKS="${OPENJDKS} ${jvmdir}"
+                fi
+        done
+}
+
+OPENJDKS=""
+find_openjdks
 # The first existing directory is used for JAVA_HOME (if JAVA_HOME is not
 # defined in $DEFAULT)
-JDK_DIRS="/usr/lib/jvm/default-java /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-sun /usr/lib/jvm/java-1.5.0-sun /usr/lib/j2sdk1.5-sun /usr/lib/j2sdk1.5-ibm"
+JDK_DIRS="/usr/lib/jvm/default-java ${OPENJDKS} /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-sun"
 
 # Look for the right JVM to use
 for jdir in $JDK_DIRS; do

-- 
tomcat7: Servlet and JSP engine



More information about the pkg-java-commits mailing list