[pkg-java] r3376 - branches/tomcat5.5/feature/debian/debian
Marcus Better
marcusb-guest at alioth.debian.org
Fri Apr 27 05:46:03 UTC 2007
Author: marcusb-guest
Date: 2007-04-27 05:46:00 +0000 (Fri, 27 Apr 2007)
New Revision: 3376
Modified:
branches/tomcat5.5/feature/debian/debian/README.Debian
branches/tomcat5.5/feature/debian/debian/changelog
branches/tomcat5.5/feature/debian/debian/tomcat5.5.default
branches/tomcat5.5/feature/debian/debian/tomcat5.5.init
Log:
Log a warning when running under GCJ with security manager enabled,
since this configuration is currently broken due to libgcj bugs.
Modified: branches/tomcat5.5/feature/debian/debian/README.Debian
===================================================================
--- branches/tomcat5.5/feature/debian/debian/README.Debian 2007-04-26 20:56:56 UTC (rev 3375)
+++ branches/tomcat5.5/feature/debian/debian/README.Debian 2007-04-27 05:46:00 UTC (rev 3376)
@@ -1,6 +1,18 @@
Apache Tomcat 5.5 for Debian
============================
+- WARNING: Currently Tomcat cannot use a security manager while
+ running under the current versions of java-gcj-compat-dev due to bug
+ #399595 in libgcj. Until this is fixed, Tomcat will crash at startup
+ with this message in the system log:
+
+ jsvc.exec[2648]: Service killed by signal 6
+
+ You can either install a non-free JDK such as sun-java6-jdk, or
+ disable the security manager (see TOMCAT_SECURITY in
+ /etc/default/tomcat5.5). Do not run without a security manager unless
+ you understand the consequences.
+
- The home directory (CATALINA_HOME) for Tomcat 5.5 (a.k.a. Catalina) is
/usr/share/tomcat5.5, the base directory (CATALINA_BASE) is
/var/lib/tomcat5.5 but some files in there are just symlinks to the
@@ -25,17 +37,8 @@
- Tomcat 5.5 needs a full Java Development Kit (JDK), a Java Runtime
Environment (JRE) is not sufficient because javac is needed for translating
- JavaServer Pages (JSP) into Java classes. A non-free JDK can be installed
- with help of the java-package tool by transforming a downloaded .bin JDK
- file from SUN or Blackdown into a deb package. Tomcat5.5 also works
- with free runtimes like java-gcj-compat-dev or kaffe.
+ JavaServer Pages (JSP) into Java classes.
- WARNING: Currently Tomcat cannot use a security manager while
- running under java-gcj-compat-dev. Do not run without a security
- manager unless you understand the consequences. See
- http://localhost:8180/tomcat-docs/security-manager-howto.html
- for more information.
-
- You can test if Tomcat is working properly by pointing your favourite web
browser to http://localhost:8180/ and testing some of the Servlet and JSP
examples. This requires installation of the tomcat5.5-webapps package.
@@ -77,4 +80,4 @@
- This package is heavily based on the great work of Stephan Gybas on
the tomcat4 package.
- -- Marcus Better <marcus at better.se>, Wed, 22 Nov 2006 11:49:16 +0100
+ -- Marcus Better <marcus at better.se>, Fri, 27 Apr 2007 07:39:01 +0200
Modified: branches/tomcat5.5/feature/debian/debian/changelog
===================================================================
--- branches/tomcat5.5/feature/debian/debian/changelog 2007-04-26 20:56:56 UTC (rev 3375)
+++ branches/tomcat5.5/feature/debian/debian/changelog 2007-04-27 05:46:00 UTC (rev 3376)
@@ -2,6 +2,9 @@
* Messages are now logged to the system log instead of the pipe
"/var/log/tomcat5.5/catalina.out". (Closes: #402603, #402879)
+ * The security manager is enabled by default. A warning is logged to the
+ syslog when running under GCJ, which doesn't work in this mode
+ currently. (Closes: #411137)
* debian/rules: Set SHELL=/bin/bash as required. Thanks to David
Pashley. (Closes: #413845)
* Webapps are now permitted to read the properties "catalina.base" and
Modified: branches/tomcat5.5/feature/debian/debian/tomcat5.5.default
===================================================================
--- branches/tomcat5.5/feature/debian/debian/tomcat5.5.default 2007-04-26 20:56:56 UTC (rev 3375)
+++ branches/tomcat5.5/feature/debian/debian/tomcat5.5.default 2007-04-27 05:46:00 UTC (rev 3376)
@@ -6,7 +6,7 @@
# JDK version 1.4. If JAVA_HOME is not set, some common directories for
# the Sun JDK, various J2SE 1.4 versions, and the free runtimes
# java-gcj-compat-dev and kaffe are tried.
-#JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun
+#JAVA_HOME=/usr/lib/jvm/java-6-sun
# Directory for per-instance configuration files and webapps. It contain the
# directories conf, logs, webapps, work and temp. See RUNNING.txt for details.
Modified: branches/tomcat5.5/feature/debian/debian/tomcat5.5.init
===================================================================
--- branches/tomcat5.5/feature/debian/debian/tomcat5.5.init 2007-04-26 20:56:56 UTC (rev 3375)
+++ branches/tomcat5.5/feature/debian/debian/tomcat5.5.init 2007-04-27 05:46:00 UTC (rev 3376)
@@ -39,6 +39,19 @@
# defined in $DEFAULT)
JDK_DIRS="/usr/lib/jvm/java-1.5.0-sun /usr/lib/j2sdk1.4-sun /usr/lib/j2sdk1.4-blackdown /usr/lib/j2se/1.4 /usr/lib/j2sdk1.5-sun /usr/lib/j2sdk1.3-sun /usr/lib/j2sdk1.3-blackdown /usr/lib/j2sdk1.5-ibm /usr/lib/j2sdk1.4-ibm /usr/lib/jvm/java-gcj /usr/lib/kaffe"
+# 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
+ fi
+done
+export JAVA_HOME
+
# Directory for per-instance configuration files and webapps
CATALINA_BASE=/var/lib/tomcat5.5
@@ -59,19 +72,15 @@
[ -z "$TOMCAT5_USER" ] && TOMCAT5_USER=tomcat55
-# 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
- fi
-done
-export JAVA_HOME
+# Check if we use gij
+gij=no
+"$JAVA_HOME/bin/java" -version 2>&1 | grep -q "^gij (GNU libgcj)" && gij=yes
+# gij doesn't support a security manager yet (see bug #399595)
+if [ "$gij" = "yes" ]; then
+ echo -e "The java-gcj-compat-dev environment currently doesn't\nsupport a security manager. See README.Debian." | logger -p daemon.warning -t $NAME
+fi
+
# Set java.awt.headless=true if JAVA_OPTS is not set so the
# Xalan XSL transformer can work without X11 display on JDK 1.4+
# It also looks like the default heap size of 64M is not enough for most cases
@@ -91,11 +100,9 @@
JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djava.security.policy=$CATALINA_BASE/conf/catalina.policy"
fi
-# juli LogManager disabled if running under libgcj (see bug #395167)
-gcj=no
-"$JAVA_HOME/bin/java" -version 2>&1 | grep -q "^gij (GNU libgcj)" && gcj=yes
-if [ "$gcj" != "yes" ]; then
- JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties"
+# juli LogManager disabled if running under gij (see bug #395167)
+if [ "$gij" != "yes" ]; then
+ JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties"
fi
# Define other required variables
More information about the pkg-java-commits
mailing list