[Git][java-team/tomcat8][master] Backport upstream bugfix for catalina.sh

mirabilos gitlab at salsa.debian.org
Tue Feb 26 22:43:24 GMT 2019


mirabilos pushed to branch master at Debian Java Maintainers / tomcat8


Commits:
10ecef77 by mirabilos at 2019-02-26T20:38:59Z
Backport upstream bugfix for catalina.sh

With much debugging and review by Dominik George <natureshadow at d.o>

- - - - -


3 changed files:

- debian/changelog
- + debian/patches/0027-fix-catalina_sh.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+tomcat8 (8.5.38-2) unstable; urgency=high
+
+  * Team upload.
+  * Apply upstream patch to unbreak the startup script (Closes: #922863)
+
+ -- Thorsten Glaser <tg at mirbsd.de>  Tue, 26 Feb 2019 21:37:51 +0100
+
 tomcat8 (8.5.38-1) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/patches/0027-fix-catalina_sh.patch
=====================================
@@ -0,0 +1,97 @@
+Description: Unbreak startup script
+ Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63041
+ Revert the changes for BZ 53930 that added support for the
+ CATALINA_OUT_CMD environment variable as they prevented correct
+ operation with systemd configurations that did not explicitly
+ specify a PID file.
+Origin: upstream, commit:r1853509
+Bug: https://bz.apache.org/bugzilla/show_bug.cgi?id=63063
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=922863
+Author: markt
+
+--- a/bin/catalina.sh
++++ b/bin/catalina.sh
+@@ -33,14 +33,6 @@
+ #                   will be redirected.
+ #                   Default is $CATALINA_BASE/logs/catalina.out
+ #
+-#   CATALINA_OUT_CMD (Optional) Command which will be executed and receive
+-#                   as its stdin the stdout and stderr from the Tomcat java
+-#                   process. If CATALINA_OUT_CMD is set, the value of
+-#                   CATALINA_OUT will be ignored.
+-#                   No default.
+-#                   Example (all one line)
+-#                   CATALINA_OUT_CMD="cronolog $CATALINA_BASE/logs/catalina.%Y-%m-%d.out >/dev/null 2>&1"
+-#
+ #   CATALINA_OPTS   (Optional) Java runtime options used when the "start",
+ #                   "run" or "debug" command is executed.
+ #                   Include here and not in JAVA_OPTS all options, that should
+@@ -451,23 +443,13 @@ elif [ "$1" = "start" ] ; then
+   fi
+ 
+   shift
+-  if [ -z "$CATALINA_OUT_CMD" ] ; then
+-    touch "$CATALINA_OUT"
+-    catalina_out_command=">> \"$CATALINA_OUT\" 2>&1"
+-  else
+-    catalina_out_command="| $CATALINA_OUT_CMD"
+-  fi
+-  if [ ! -z "$CATALINA_PID" ]; then
+-    catalina_pid_file="$CATALINA_PID"
+-  else
+-    catalina_pid_file=/dev/null
+-  fi
++  touch "$CATALINA_OUT"
+   if [ "$1" = "-security" ] ; then
+     if [ $have_tty -eq 1 ]; then
+       echo "Using Security Manager"
+     fi
+     shift
+-    eval \{ $_NOHUP "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
++    eval $_NOHUP "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
+       -D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
+       -classpath "\"$CLASSPATH\"" \
+       -Djava.security.manager \
+@@ -476,20 +458,24 @@ elif [ "$1" = "start" ] ; then
+       -Dcatalina.home="\"$CATALINA_HOME\"" \
+       -Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
+       org.apache.catalina.startup.Bootstrap "$@" start \
+-      2\>\&1 \&\& echo \$! \>\"$catalina_pid_file\" \; \} $catalina_out_command "&"
++      >> "$CATALINA_OUT" 2>&1 "&"
+ 
+   else
+-    eval \{ $_NOHUP "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
++    eval $_NOHUP "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
+       -D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
+       -classpath "\"$CLASSPATH\"" \
+       -Dcatalina.base="\"$CATALINA_BASE\"" \
+       -Dcatalina.home="\"$CATALINA_HOME\"" \
+       -Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
+       org.apache.catalina.startup.Bootstrap "$@" start \
+-      2\>\&1 \&\& echo \$! \>\"$catalina_pid_file\" \; \} $catalina_out_command "&"
++      >> "$CATALINA_OUT" 2>&1 "&"
+ 
+   fi
+ 
++  if [ ! -z "$CATALINA_PID" ]; then
++    echo $! > "$CATALINA_PID"
++  fi
++
+   echo "Tomcat started."
+ 
+ elif [ "$1" = "stop" ] ; then
+--- a/webapps/docs/changelog.xml
++++ b/webapps/docs/changelog.xml
+@@ -360,6 +360,12 @@
+         environment variable that defines a command to which captured stdout and
+         stderr will be redirected. Patch provided by Casey Lucas. (markt)
+       </add>
++      <fix>
++        <bug>63041</bug>: Revert the changes for <bug>53930</bug> that added
++        support for the <code>CATALINA_OUT_CMD</code> environment variable as
++        they prevented correct operation with systemd configurations that did
++        not explicitly specify a PID file. (markt)
++      </fix>
+     </changelog>
+   </subsection>
+ </section>


=====================================
debian/patches/series
=====================================
@@ -12,3 +12,4 @@
 0024-systemd-log-formatter.patch
 0025-invalid-configuration-exit-status.patch
 0026-easymock4-compatibility.patch
+0027-fix-catalina_sh.patch



View it on GitLab: https://salsa.debian.org/java-team/tomcat8/commit/10ecef773ff43635f0cd3e33593abff5bc1b5a79

-- 
View it on GitLab: https://salsa.debian.org/java-team/tomcat8/commit/10ecef773ff43635f0cd3e33593abff5bc1b5a79
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20190226/5eaa9256/attachment.html>


More information about the pkg-java-commits mailing list