Browse Source

setenv.sh in tomcat9-user and the service startup script now share the same JDK detection logic

tags/debian/9.0.13-1
Emmanuel Bourg 2 years ago
parent
commit
281033a84b
4 changed files with 9 additions and 17 deletions
  1. +2
    -0
      debian/changelog
  2. +2
    -16
      debian/setenv.sh
  3. +2
    -0
      debian/tomcat9-common.install
  4. +3
    -1
      debian/tomcat9.install

+ 2
- 0
debian/changelog View File

@@ -36,6 +36,8 @@ tomcat9 (9.0.13-1) UNRELEASED; urgency=medium
Tomcat already embeds its own version of these libraries
* Support three-way merge when upgrading the configuration files
* Use the G1 garbage collector by default instead of Concurrent Mark Sweep
* The setenv.sh script in tomcat9-user and the service startup script now
share the same JDK detection logic

-- Emmanuel Bourg <ebourg@apache.org> Tue, 07 Aug 2018 15:39:03 +0200



+ 2
- 16
debian/setenv.sh View File

@@ -3,24 +3,10 @@

CATALINA_HOME=/usr/share/tomcat9

# The first existing directory is used for JAVA_HOME (if JAVA_HOME is not
# defined in $DEFAULT)
JDK_DIRS="/usr/lib/jvm/java-7-openjdk-amd64 /usr/lib/jvm/jre-7-oracle-x64"

# 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
# Find the Java runtime and set JAVA_HOME
. /usr/libexec/tomcat9/tomcat-locate-java.sh

# Default Java options
if [ -z "$JAVA_OPTS" ]; then
JAVA_OPTS="-Djava.awt.headless=true -XX:+UseG1GC"
fi


+ 2
- 0
debian/tomcat9-common.install View File

@@ -1,2 +1,4 @@
output/build/bin/bootstrap.jar /usr/share/tomcat9/bin/
bin/* /usr/share/tomcat9/bin/

debian/libexec/tomcat-locate-java.sh /usr/libexec/tomcat9/

+ 3
- 1
debian/tomcat9.install View File

@@ -3,8 +3,10 @@ conf/catalina.properties /usr/share/tomcat9/etc/
debian/logging.properties /usr/share/tomcat9/etc/
conf/*.xml /usr/share/tomcat9/etc/
debian/policy/*.policy /etc/tomcat9/policy.d/
debian/libexec/* /usr/libexec/tomcat9/
debian/default_root /usr/share/tomcat9-root/
debian/default.template /usr/share/tomcat9/
debian/logrotate.template /usr/share/tomcat9/
debian/sysusers/*.conf /usr/lib/sysusers.d/

debian/libexec/tomcat-start.sh /usr/libexec/tomcat9/
debian/libexec/tomcat-update-policy.sh /usr/libexec/tomcat9/

Loading…
Cancel
Save