Hello community,

here is the log from the commit of package tomcat.1889 for openSUSE:12.3:Update 
checked in at 2013-08-07 09:34:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.3:Update/tomcat.1889 (Old)
 and      /work/SRC/openSUSE:12.3:Update/.tomcat.1889.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "tomcat.1889"

Changes:
--------
New Changes file:

--- /dev/null   2013-07-23 23:44:04.804033756 +0200
+++ /work/SRC/openSUSE:12.3:Update/.tomcat.1889.new/tomcat.changes      
2013-08-07 09:34:14.000000000 +0200
@@ -0,0 +1,124 @@
+-------------------------------------------------------------------
+Thu Jul 25 11:46:08 UTC 2013 - mvysko...@suse.com
+
+- tomcat-CVE-2013-2071.patch (bnc#831117) 
+- use chown --no-dereference to prevent symlink attacks on log
+  (bnc#822177#c7/prevents CVE-2013-1976)
+
+-------------------------------------------------------------------
+Sat Feb 16 07:29:52 UTC 2013 - m...@mail.ru
+
+- Fix tomcat init scripts generating malformed classpath
+  (http://youtrack.jetbrains.com/issue/JT-18545)
+  bnc#804992
+
+-------------------------------------------------------------------
+Mon Jan 21 13:54:18 UTC 2013 - mvysko...@suse.com
+
+- update to 7.0.35 (bugfix release)
+  require ecj >= 4.2.1, like upstream do
+- make gpg-offline work distros after 12.2
+
+-------------------------------------------------------------------
+Thu Dec 27 17:14:55 UTC 2012 - arc...@dellroad.org
+
+- Ensure tomcat stdout/stderr output ends up in catalina.out
+
+-------------------------------------------------------------------
+Thu Dec 20 22:45:19 UTC 2012 - arc...@dellroad.org
+
+- Recommend libtcnative-1-0 >= 1.1.24
+- /etc/init.d/tomcate init script fixes:
+  * Include /usr/bin and /usr/sbin in the PATH
+  * Fix logic for cleaning the work directories
+  * Fix typo (log_success_msg lsb function name)
+  * Fix typo (reload message)
+- Require log4j
+
+-------------------------------------------------------------------
+Tue Dec 18 09:34:29 UTC 2012 - mvysko...@suse.com
+
+- Require gpg-offline on 12.2+ 
+
+-------------------------------------------------------------------
+Thu Nov 29 19:17:03 CET 2012 - sbra...@suse.cz
+
+- Verify GPG signature.
+
+-------------------------------------------------------------------
+Mon Nov 26 13:01:44 UTC 2012 - mvysko...@suse.com
+
+- update to 7.0.33 (bugfix release)
+
+-------------------------------------------------------------------
+Tue Sep 11 08:24:53 UTC 2012 - mvysko...@suse.cz
+
+- update to 7.0.30 (bugfix release) 
+  * SSI and CGI disabled by default
+- fix bnc#779538: change the working dir to $CATALINA_BASE
+- document the CATALINA_BASE and CATALINA_HOME in tomcat.conf better
+- fix rpmlintrc file
+
+-------------------------------------------------------------------
+Thu Jul 19 08:48:31 UTC 2012 - mvysko...@suse.cz
+
+- fix bnc#771802 - systemd support is broken
+  * change type froking to simple as it does not make a sense run java in a
+    background to emulate that
+  * remove the need of nested wrappers, so /usr/sbin/tomcat-sysd now relies on
+    systemd features like User/EnvironmentFile
+  * workaround the 143 exit code in Stop phase - return 0 in this case
+  * merge the jsvc into tomcat-sysd code, the -jsvc-sysd is a symlink
+  * properly use jsvc with pid file to start and stop
+
+-------------------------------------------------------------------
+Wed Jun 13 12:37:49 UTC 2012 - mvysko...@suse.cz
+
+- update to 7.0.26 (bugfix release)
+- rename package to tomcat in order to emphasise a fact, there is only one
+  major release of tomcat maintained in distribution
+- add manifest files and systemd support (thanks Fedora)
+- create tomcat-jsvc package
+
+-------------------------------------------------------------------
+Thu Feb 23 13:59:10 UTC 2012 - mvysko...@suse.cz
+
+- update to 7.0.26 (bugfix release)
+- fix bnc#747771 - don't use /var/lock/subsys
+  sync tomcat7 init with tomcat6
+
+-------------------------------------------------------------------
+Sun Feb 19 23:02:42 UTC 2012 - witte...@googlemail.com
+
+- update to 7.0.25 (bugfix release)
+
+-------------------------------------------------------------------
+Tue Nov  1 12:36:57 UTC 2011 - mvysko...@suse.cz
+
+- update to 7.0.22 (bugfix release)
+- wrote changes and prepare for inclusion to openSUSE distribution
+- fix bnc#726307
+  /etc/tomcat7 is writtable for tomcat group
+
+-------------------------------------------------------------------
+Mon Sep 19 10:21:29 UTC 2011 - witte...@googlemail.com
+ 
+ - update to version 7.0.21
+
+-------------------------------------------------------------------
+Thu Jul 21 10:21:29 UTC 2011 - mvysko...@suse.cz
+
+ - update to version 7.0.16 (bugfix update)
+
+-------------------------------------------------------------------
+Wed Mar 30 16:29:28 UTC 2011 - jren...@suse.de
+
+ - add rpmlintrc, digest, init and wrapper scripts and config file
+ - build require geronimo apis and wsdl4j
+ - disable webservices in javadoc target
+
+-------------------------------------------------------------------
+Tue Jan 18 12:22:55 UTC 2011 - mvysko...@suse.cz
+
+ - initial packaging of tomcat7 7.0.6
+

New:
----
  apache-tomcat-7.0.35-src.tar.gz
  apache-tomcat-7.0.35-src.tar.gz.asc
  el-api-OSGi-MANIFEST.MF
  jasper-OSGi-MANIFEST.MF
  jasper-el-OSGi-MANIFEST.MF
  jsp-api-OSGi-MANIFEST.MF
  servlet-api-OSGi-MANIFEST.MF
  tomcat-7.0-bootstrap-MANIFEST.MF.patch
  tomcat-7.0-digest.script
  tomcat-7.0-jsvc.service
  tomcat-7.0-log4j.properties
  tomcat-7.0-tomcat-sysd
  tomcat-7.0-tomcat-users-webapp.patch
  tomcat-7.0-tool-wrapper.script
  tomcat-7.0.2-property-build.windows.patch
  tomcat-7.0.conf
  tomcat-7.0.init
  tomcat-7.0.logrotate
  tomcat-7.0.service
  tomcat-7.0.wrapper
  tomcat-CVE-2013-2071.patch
  tomcat-api-OSGi-MANIFEST.MF
  tomcat-juli-OSGi-MANIFEST.MF
  tomcat-rpmlintrc
  tomcat.changes
  tomcat.keyring
  tomcat.spec

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ tomcat.spec ++++++
++++ 726 lines (skipped)

++++++ el-api-OSGi-MANIFEST.MF ++++++
Manifest-Version: 1.0
Export-Package: javax.el;version="2.2.0"
Bundle-Vendor: %bundleProvider
Bundle-ClassPath: .
Bundle-Version: 2.2.0
Bundle-Name: %bundleName
Bundle-Localization: plugin
Bundle-ManifestVersion: 2
Bundle-SymbolicName: javax.el
DynamicImport-Package: org.apache.el
Bundle-RequiredExecutionEnvironment: J2SE-1.4,CDC-1.0/Foundation-1.0,J
 2SE-1.3

++++++ jasper-OSGi-MANIFEST.MF ++++++
Manifest-Version: 1.0
Export-Package: org.apache.jasper;version="7.0.21",org.apache.jasper.c
 ompiler;version="7.0.21",org.apache.jasper.compiler.tagplugin;version
 ="7.0.21",org.apache.jasper.resources;version="7.0.21",org.apache.jas
 per.runtime;version="7.0.21",org.apache.jasper.security;version="7.0.
 19",org.apache.jasper.servlet;version="7.0.21",org.apache.jasper.tagp
 lugins.jstl;version="7.0.21",org.apache.jasper.tagplugins.jstl.core;v
 ersion="7.0.21",org.apache.jasper.util;version="7.0.21",org.apache.ja
 sper.xmlparser;version="7.0.21"
Bundle-Vendor: %bundleProvider
Bundle-ClassPath: .
Bundle-Version: 7.0.21
Bundle-Localization: plugin
Bundle-Name: %bundleName
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.apache.jasper
Import-Package: javax.servlet;version="[2.4.0, 3.0.0]",javax.servlet.h
 ttp;version="[2.4.0, 3.0.0]",javax.servlet.jsp;version="[2.0.0, 2.2.0
 ]",javax.servlet.jsp.el;version="[2.0.0, 2.2.0]",javax.servlet.jsp.re
 sources;version="[2.0.0, 2.2.0]",javax.servlet.jsp.tagext;version="[2
 .0.0, 2.2.0]",javax.servlet.resources;version="[2.4.0, 3.0.0]",javax.
 xml.parsers,org.apache.commons.el;version="[1.0.0,2.0.0)",org.apache.
 commons.logging;version="[1.0.0,2.0.0)",org.apache.tools.ant;resoluti
 on:=optional,org.apache.tools.ant.taskdefs;resolution:=optional,org.a
 pache.tools.ant.types;resolution:=optional,org.apache.tools.ant.util;
 resolution:=optional,org.w3c.dom,org.xml.sax,org.xml.sax.ext,org.xml.
 sax.helpers,org.apache.tomcat;version="7.0.21",org.apache.juli.loggin
 g;version="7.0.21",javax.el;version="2.2.0",org.eclipse.jdt.internal.
 compiler,org.eclipse.jdt.internal.compiler.parser,org.eclipse.jdt.int
 ernal.compiler.parser.diagnose,org.eclipse.jdt.internal.compiler.flow
 ,org.eclipse.jdt.internal.compiler.util,org.eclipse.jdt.internal.comp
 iler.impl,org.eclipse.jdt.internal.compiler.lookup,org.eclipse.jdt.in
 ternal.compiler.codegen,org.eclipse.jdt.internal.compiler.batch,org.e
 clipse.jdt.internal.compiler.classfmt,org.eclipse.jdt.internal.compil
 er.ast,org.eclipse.jdt.internal.compiler.problem,org.eclipse.jdt.inte
 rnal.compiler.env,org.eclipse.jdt.internal.core.util,org.eclipse.jdt.
 core.compiler
Bundle-RequiredExecutionEnvironment: J2SE-1.4,CDC-1.0/Foundation-1.0,J
 2SE-1.3

++++++ jasper-el-OSGi-MANIFEST.MF ++++++
Manifest-Version: 1.0
Export-Package: org.apache.el;version="7.0.21"
Bundle-Vendor: %bundleProvider
Bundle-ClassPath: .
Bundle-Version: 7.0.21
Bundle-Name: %bundleName
Bundle-Localization: plugin
Bundle-ManifestVersion: 2
Import-Package: javax.el;version="2.2"
Bundle-SymbolicName: org.apache.el
Bundle-RequiredExecutionEnvironment: J2SE-1.4,CDC-1.0/Foundation-1.0,J
 2SE-1.3

++++++ jsp-api-OSGi-MANIFEST.MF ++++++
Manifest-Version: 1.0
Bundle-Vendor: %bundleProvider
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0,J2SE-1.3
Bundle-Name: %bundleName
Bundle-SymbolicName: javax.servlet.jsp
Export-Package: javax.servlet.jsp; version=2.2,javax.servlet.jsp.el; v
 ersion=2.2,javax.servlet.jsp.resources; version=2.2,javax.servlet.jsp
 .tagext; version=2.2
Bundle-Version: 2.2.0.v200806031607
Bundle-ManifestVersion: 2
Import-Package: javax.servlet; version=3.0,javax.servlet.http; version
 =3.0,javax.servlet.resources; version=3.0,javax.el;version="2.2.0"
++++++ servlet-api-OSGi-MANIFEST.MF ++++++
Manifest-Version: 1.0
Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,J2SE-1.4
Bundle-SymbolicName: javax.servlet
Bundle-ManifestVersion: 2
Bundle-Name: %bundleName
Bundle-Localization: plugin
Bundle-Version: 3.0.0
Bundle-Vendor: %bundleProvider
Export-Package: javax.servlet;version="3.0",
 javax.servlet;version="2.6",
 javax.servlet.http;version="3.0",
 javax.servlet.http;version="2.6",
 javax.servlet.annotation;version="2.6",
 javax.servlet.descriptor;version="3.0",
 javax.servlet.descriptor;version="2.6",
 javax.servlet.resources;version="3.0",
 javax.servlet.resources;version="2.6"
++++++ tomcat-7.0-bootstrap-MANIFEST.MF.patch ++++++
Index: apache-tomcat-7.0.2-src/res/META-INF/bootstrap.jar.manifest
===================================================================
--- apache-tomcat-7.0.2-src.orig/res/META-INF/bootstrap.jar.manifest    
2010-08-04 01:26:39.000000000 +0200
+++ apache-tomcat-7.0.2-src/res/META-INF/bootstrap.jar.manifest 2010-09-23 
11:25:07.237277450 +0200
@@ -1,6 +1,5 @@
 Manifest-Version: 1.0
 Main-Class: org.apache.catalina.startup.Bootstrap
-Class-Path: commons-daemon.jar
 Specification-Title: Apache Tomcat Bootstrap
 Specification-Version: @VERSION_MAJOR_MINOR@
 Specification-Vendor: Apache Software Foundation
++++++ tomcat-7.0-digest.script ++++++
#!/bin/sh
#
# tomcat-digest script
# JPackage Project <http://www.jpackage.org/>

# Source functions library
if [ -f /usr/share/java-utils/java-functions ] ; then
  . /usr/share/java-utils/java-functions
else
  echo "Can't find functions library, aborting"
  exit 1
fi
 
# Get the tomcat config (use this for environment specific settings)
if [ -z "${TOMCAT_CFG}" ]; then
    TOMCAT_CFG="/etc/tomcat/tomcat.conf"
fi
 
if [ -r "$TOMCAT_CFG" ]; then
    . $TOMCAT_CFG
fi
 
set_javacmd
 
# CLASSPATH munging
if [ -n "$JSSE_HOME" ]; then
  CLASSPATH="${CLASSPATH}:$(build-classpath jcert jnet jsse 2>/dev/null)"
fi
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/bootstrap.jar"
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/tomcat-juli.jar"

#sanitize the classpath - remove double and trailing colons
CLASSPATH="`echo ${CLASSPATH} | sed 's/::+/:/g; s/^://; s/:$//g'`"
export CLASSPATH
 
# Configuration
MAIN_CLASS="org.apache.catalina.startup.Tool"
BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\""
BASE_OPTIONS=""
BASE_JARS="commons-daemon tomcat/catalina servlet"
 
# Set parameters
set_classpath $BASE_JARS
set_flags $BASE_FLAGS
set_options $BASE_OPTIONS
 
# Let's start
run -server org.apache.catalina.realm.RealmBase "$@"
++++++ tomcat-7.0-jsvc.service ++++++
# Systemd unit file for tomcat
# 
# You can clone this service by:
# 1.) Add a new EnvironmentFile declaring the new values for CATALINA_BASE
#     and others
# 2.) Define new Environment=JSVC_PIDFILE=/var/run/tomcat-foo.pid if you want
#     to run more than one service

[Unit]
Description=Apache Tomcat Web Application Container JSVC wrapper
After=network.target

[Service]
Type=simple
EnvironmentFile=/etc/tomcat/tomcat.conf
ExecStart=/usr/sbin/tomcat-jsvc-sysd start
ExecStop=/usr/sbin/tomcat-jsvc-sysd stop

[Install]
WantedBy=multi-user.target
++++++ tomcat-7.0-log4j.properties ++++++
log4j.rootLogger=debug, R 
log4j.appender.R=org.apache.log4j.RollingFileAppender 
log4j.appender.R.File=${catalina.home}/logs/tomcat.log 
log4j.appender.R.MaxFileSize=10MB 
log4j.appender.R.MaxBackupIndex=10 
log4j.appender.R.layout=org.apache.log4j.PatternLayout 
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n 
log4j.logger.org.apache.catalina=DEBUG, R
log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=DEBUG,
 R
log4j.logger.org.apache.catalina.core=DEBUG, R
log4j.logger.org.apache.catalina.session=DEBUG, R
++++++ tomcat-7.0-tomcat-sysd ++++++
#!/bin/bash
#
# This script provides systemd activation of the tomcat service and tomcat
# throught jsvc wrapper

# check the basic environment variables
if [[ -z "${CATALINA_BASE}" || \
    -z "${CATALINA_HOME}" || \
    -z "${CATALINA_TMPDIR}" ]]; then

echo "ERROR: one of CATALINA_BASE, CATALINA_HOME or CATALINA_TMPDIR is not 
defined" >&2
echo "       use proper EnvironmentFile= in your .service file" >&2
exit 1

fi

if [[ "${0}" =~ tomcat-jsvc ]]; then
    if [[ ! -x /usr/bin/jsvc ]]; then
        echo "ERROR: cannot use ${0}, /usr/bin/jsvc does not exists" >&2
        exit 1
    fi
    USE_JSVC=true
    JSVC_PIDFILE=${JSVC_PIDFILE:-/var/run/${0##*/}}
else
    USE_JSVC=false
fi

#### from /usr/sbin/dtomcat
if [[ -r /usr/share/java-utils/java-functions ]]; then
    . /usr/share/java-utils/java-functions
else
    echo "ERROR: Can't read Java functions library, aborting" >&2
    exit 1
fi

set_javacmd
# CLASSPATH munging
if [[ -n "$JSSE_HOME" ]]; then
    CLASSPATH="${CLASSPATH}:$(build-classpath jcert jnet jsse 2>/dev/null)"
fi
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/bootstrap.jar"
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/tomcat-juli.jar"
CLASSPATH="${CLASSPATH}:$(build-classpath commons-daemon 2>/dev/null)"

#sanitize the classpath - remove double and trailing colons
CLASSPATH="`echo ${CLASSPATH} | sed 's/::+/:/g; s/^://; s/:$//g'`"

# See how we were called.
function start() {

    local ret

    # running as root is not allowed if not running with jsvc
    if ! ${USE_JSVC} && [[ $(id -u) == 0 ]]; then
        echo "ERROR: starting tomcat under uid 0 is not supported" >&2
        echo "       use appropriate User/Group settings in service file" >&2
        echo "       see man systemd.exec for details" >&2
        exit 2
    fi

    if [[ "$SECURITY_MANAGER" = "true" ]]; then
        DSECURITY_MANAGER="-Djava.security.manager"
    else
        unset DSECURITY_MANAGER
    fi

    if ${USE_JSVC}; then
        JAVACMD="/usr/bin/jsvc -pidfile ${JSVC_PIDFILE} -nodetach -user 
${TOMCAT_USER:-tomcat}"
    fi

    #bnc#779538
    cd ${CATALINA_BASE}

    ${JAVACMD} $JAVA_OPTS $CATALINA_OPTS \
        -classpath "$CLASSPATH" \
        -Dcatalina.base="$CATALINA_BASE" \
        -Dcatalina.home="$CATALINA_HOME" \
        -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
        -Djava.io.tmpdir="$CATALINA_TMPDIR" ${DSECURITY_MANAGER} \
        
-Djava.util.logging.config.file="${CATALINA_BASE}/conf/logging.properties" \
        -Djava.util.logging.manager="org.apache.juli.ClassLoaderLogManager" \
        org.apache.catalina.startup.Bootstrap start \
        >> ${CATALINA_BASE}/logs/catalina.out 2>&1
    ret=${?}

    return $ret
}

function stop() {

    local ret

    if ${USE_JSVC}; then
        #XXX: foo is needed because of funny jsvc parser needs a class name
        /usr/bin/jsvc -stop -pidfile ${JSVC_PIDFILE} foo
        ret=${?}

        if [[ $ret == 0 ]]; then
            rm -f ${JSVC_PIDFILE}
        fi
    else
        ${JAVACMD} $JAVA_OPTS \
            -classpath "$CLASSPATH" \
            -Dcatalina.base="$CATALINA_BASE" \
            -Dcatalina.home="$CATALINA_HOME" \
            -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
            -Djava.io.tmpdir="$CATALINA_TMPDIR" \
            org.apache.catalina.startup.Bootstrap stop
        ret=${?}

        # workaround the 143 code emmited by jvm in case of sigterm
        # using ExecStart=- will ignore all other failures as well
        if [[ ret == 143 ]]; then
            ret=0
        fi
    fi

    return $ret
}

function version() {

    exec ${JAVACMD} -classpath ${CATALINA_HOME}/lib/catalina.jar \
        org.apache.catalina.util.ServerInfo

}

# See how we were called.
case "$1" in
    start)
        start
        ;;
    stop)
        stop
        ;;
    restart)
        stop
        start
        ;;
    version)
        version
        ;;
    *)
        echo "Usage: $0 {start|stop|restart|version}" >&2
        exit 1
esac

++++++ tomcat-7.0-tomcat-users-webapp.patch ++++++
Index: apache-tomcat-7.0.2-src/conf/tomcat-users.xml
===================================================================
--- apache-tomcat-7.0.2-src/conf/tomcat-users.xml       2010-08-04 
01:26:35.000000000 +0200
+++ apache-tomcat-7.0.2-src/conf/tomcat-users.xml       2010-09-23 
11:27:11.819276755 +0200
@@ -23,4 +23,14 @@
   <user username="both" password="tomcat" roles="tomcat,role1"/>
   <user username="role1" password="tomcat" roles="role1"/>
 -->
+
+<!-- <role rolename="admin"/> -->
+<!-- <role rolename="admin-gui"/> -->
+<!-- <role rolename="admin-script"/> -->
+<!-- <role rolename="manager"/> -->
+<!-- <role rolename="manager-gui"/> -->
+<!-- <role rolename="manager-script"/> -->
+<!-- <role rolename="manager-jmx"/> -->
+<!-- <role rolename="manager-status"/> -->
+<!-- <user name="admin" password="adminadmin" 
roles="admin,manager,admin-gui,admin-script,manager-gui,manager-script,manager-jmx,manager-status"
 /> -->
 </tomcat-users>
++++++ tomcat-7.0-tool-wrapper.script ++++++
#!/bin/sh
#
# tomcat-digest script
# JPackage Project <http://www.jpackage.org/>
 
# Source functions library
if [ -f /usr/share/java-utils/java-functions ] ; then
  . /usr/share/java-utils/java-functions
else
  echo "Can't find functions library, aborting"
  exit 1
fi
 
# Get the tomcat config (use this for environment specific settings)
if [ -z "${TOMCAT_CFG}" ]; then
    TOMCAT_CFG="/etc/tomcat/tomcat.conf"
fi
 
if [ -r "$TOMCAT_CFG" ]; then
    . $TOMCAT_CFG
fi
 
set_javacmd
 
# CLASSPATH munging
if [ -n "$JSSE_HOME" ]; then
  CLASSPATH="${CLASSPATH}:$(build-classpath jcert jnet jsse 2>/dev/null)"
fi
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/bootstrap.jar"
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/tomcat-juli.jar"

#sanitize the classpath - remove double and trailing colons
CLASSPATH="`echo ${CLASSPATH} | sed 's/::+/:/g; s/^://; s/:$//g'`"

export CLASSPATH
 
# Configuration
MAIN_CLASS="org.apache.catalina.startup.Tool"
BASE_OPTIONS=""
BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\""
BASE_JARS="commons-daemon tomcat/catalina servlet"
 
# Set parameters
set_classpath $BASE_JARS
set_flags $BASE_FLAGS
set_options $BASE_OPTIONS
 
# Let's start
run "$@"
++++++ tomcat-7.0.2-property-build.windows.patch ++++++
Index: apache-tomcat-7.0.27-src/build.properties.default
===================================================================
--- apache-tomcat-7.0.27-src.orig/build.properties.default      2012-03-31 
16:46:49.000000000 +0200
+++ apache-tomcat-7.0.27-src/build.properties.default   2012-06-13 
13:56:38.272947593 +0200
@@ -197,3 +197,5 @@
 
dojo-js.loc=http://download.dojotoolkit.org/release-1.1.1/dojo-release-1.1.1.tar.gz
 dojo-js.jar=${dojo-js.home}/dojo/dojo.js
 
+# ----- Build on Windows ----
+build.windows=false
Index: apache-tomcat-7.0.27-src/build.xml
===================================================================
--- apache-tomcat-7.0.27-src.orig/build.xml     2012-03-31 16:46:49.000000000 
+0200
+++ apache-tomcat-7.0.27-src/build.xml  2012-06-13 13:56:38.274947593 +0200
@@ -2341,7 +2341,7 @@
   </target>
 
   <target name="download-dist"
-          description="Download additional components for a distribution" >
+          description="Download additional components for a distribution" 
if="${build.windows}">
 
     <antcall target="downloadzip-2">
       <param name="sourcefile.1" value="${tomcat-native.win.1}"/>
++++++ tomcat-7.0.conf ++++++
# System-wide configuration file for tomcat services
# This will be sourced by tomcat and any secondary service
 
# Where your java installation lives
JAVA_HOME="@@@JAVAHOME@@@"
 
# Where your tomcat installation lives
CATALINA_HOME="@@@TCHOME@@@"
# where the given instance lives
CATALINA_BASE="@@@TCHOME@@@"
# the temp dir of the instance
CATALINA_TMPDIR="@@@TCTEMP@@@"
 
# You can pass some parameters to java here if you wish to
#JAVA_OPTS="-Xminf0.1 -Xmaxf0.3"
 
# Use JAVA_OPTS to set java.library.path for libtcnative.so
#JAVA_OPTS="-Djava.library.path=@@@LIBDIR@@@"
 
# What user should run tomcat
# This value is interpreted differently
# 1.) for systemd units derived from tomcat.service, the User/Group settings is 
used
# 2.) for systemd units derived from tomcat-jsvc.service this value is 
respected (with tomcat as a default)
# 3.) for sysv init script, this value is respected (with tomcat as a default)
#TOMCAT_USER="tomcat"
 
# You can change your tomcat locale here
#LANG="en_US"
 
# Run tomcat under the Java Security Manager
SECURITY_MANAGER="false"
 
# Time to wait in seconds, before killing process
SHUTDOWN_WAIT="30"
 
# Whether to annoy the user with "attempting to shut down" messages or not
SHUTDOWN_VERBOSE="false"
 
# Set the TOMCAT_PID location
# WARNING: does not make any sense for systemd users
#CATALINA_PID="/var/run/tomcat.pid"
 
# Connector port is 8080 for this tomcat instance
#CONNECTOR_PORT="8080"
 
# If you wish to further customize your tomcat environment,
# put your own definitions here
# (i.e. LD_LIBRARY_PATH for some jdbc drivers)
 
# Clear work directory when tomcat is stopped or restarted
CLEAR_WORK="false"
 
# Java runtime options used when the "start", or "run" command is executed
# Use # it if you want:
# Set a location of JAAS config file
# 
CATALINA_OPTS="-Djava.security.auth.login.config=$CATALINA_HOME/conf/jaas.config"
# To collect data on how long garbage collection is taking
# CATALINA_OPTS="-verbose:gc"
# Make jikes error messages compatible with jasper
# CATALINA_OPTS="-Dbuild.compiler.emacs=true"
# Debug the permission (WARNING - This will generate many megabytes of output!)
# CATALINA_OPTS="-Djava.security.debug=all"
++++++ tomcat-7.0.init ++++++
#!/bin/bash
# Copyright (c) 2008 SuSE Linux AG Nuernberg, Germany.
#
# - originally written by Henri Gomez, Keith Irwin, and Nicolas Mailhot
# - heavily rewritten by Deepak Bhole and Jason Corley
# - merged with previous SUSE's rctomcat55 by Petr Mladek and jpackage.org
#   original by Michal Vyskocil
#
# /etc/init.d/tomcat
#
#   and its symbolic link
#
# /usr/sbin/rctomcat
#
# System startup script for the Tomcat servlet container
#
### BEGIN INIT INFO
# Provides: tomcat
# Required-Start: $network $syslog $remote_fs
# Should-Start: $named $syslog $time
# Required-Stop: $network $syslog $remote_fs
# Should-Stop: $named $syslog $time
# Default-Start:  3 5
# Default-Stop:   0 1 2 6
# Short-Description: Tomcat Servlet Container
# Description:    Start and Stop Apache Tomcat
### END INIT INFO
 
# set a minimalist PATH
PATH="/bin:/sbin:/usr/bin:/usr/sbin"
 
# Source LSB function library.
if [ -r /lib/lsb/init-functions ]; then
    . /lib/lsb/init-functions
else
    exit 1
fi
DISTRIB_ID=`lsb_release -i -s 2>/dev/null`
 
NAME="$(basename $0)"
unset ISBOOT
if [ "${NAME:0:1}" = "S" -o "${NAME:0:1}" = "K" ]; then
    NAME="${NAME:3}"
    ISBOOT="1"
fi
 
# remove SUSE's rc name
if [ "${NAME:0:2}" = "rc" ]; then
    NAME="${NAME:2}"
fi
 
# For SELinux we need to use 'runuser' not 'su'
if [ -x "/sbin/runuser" ]; then
    SU="/sbin/runuser"
else
    SU="/bin/su"
fi
 
# Get the tomcat config (use this for environment specific settings)
TOMCAT_CFG="/etc/tomcat/tomcat.conf"
if [ -r "$TOMCAT_CFG" ]; then
    . $TOMCAT_CFG
fi
 
# Define which connector port to use
CONNECTOR_PORT="${CONNECTOR_PORT:-8080}"
 
# Path to the tomcat launch script
TOMCAT_SCRIPT="/usr/sbin/dtomcat"
 
# Tomcat program name
TOMCAT_PROG="${NAME}"
         
# Define the tomcat username
TOMCAT_USER="${TOMCAT_USER:-tomcat}"
 
# Define the tomcat log file
TOMCAT_LOG="${TOMCAT_LOG:-${CATALINA_HOME}/logs/${NAME}-initd.log}"
# Define the tomcat pid file
export CATALINA_PID="/var/run/${NAME}.pid"
 
RETVAL="0"
 
# pulled from RHEL4 /etc/rc.d/init.d/functions
function checkpid() {
    local i
    for i in $* ; do
        if [ -d "/proc/${i}" ]; then
            return 0
        fi
    done
    return 1
}
 
# Shell functions sourced from /etc/rc.status:
#      rc_check         check and set local and overall rc status
#      rc_status        check and set local and overall rc status
#      rc_status -v     ditto but be verbose in local rc status
#      rc_status -v -r  ditto and clear the local rc status
#      rc_failed        set local and overall rc status to failed
#      rc_failed <num>  set local and overall rc status to <num><num>
#      rc_reset         clear local rc status (overall remains)
#      rc_exit          exit appropriate to overall rc status
. /etc/rc.status
 
# First reset status of this service
rc_reset
 
# Return values acc. to LSB for all commands but status:
# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. "reload")
# 4 - insufficient privilege
# 5 - program is not installed
# 6 - program is not configured
# 7 - program is not running
#
# Note that starting an already running service, stopping
# or restarting a not-running service as well as the restart
# with force-reload (in case signalling is not supported) are
# considered a success.
 
# Look for open ports, as the function name might imply
function findFreePorts() {
    local isSet1="false"
    local isSet2="false"
    local isSet3="false"
    local lower="8000"
    randomPort1="0"
    randomPort2="0"
    randomPort3="0"
    local -a listeners="( $(
                        netstat -ntl | \
                        awk '/^tcp/ {gsub("(.)*:", "", $4); print $4}'
                    ) )"
    while [ "$isSet1" = "false" ] || \
          [ "$isSet2" = "false" ] || \
          [ "$isSet3" = "false" ]; do
        let port="${lower}+${RANDOM:0:4}"
        if [ -z `expr " ${listeners[*]} " : ".*\( $port \).*"` ]; then
            if [ "$isSet1" = "false" ]; then
                export randomPort1="$port"
                isSet1="true"
            elif [ "$isSet2" = "false" ]; then
                export randomPort2="$port"
                isSet2="true"
            elif [ "$isSet3" = "false" ]; then
                export randomPort3="$port"
                isSet3="true"
            fi
        fi
    done
}
 
function makeHomeDir() {
    if [ ! -d "$CATALINA_HOME" ]; then
        echo "$CATALINA_HOME does not exist, creating"
        if [ ! -d "/usr/share/${NAME}" ]; then
            mkdir /usr/share/${NAME}
            cp -pLR /usr/share/tomcat/* /usr/share/${NAME}
        fi
        mkdir -p /var/log/${NAME} \
                 /var/cache/${NAME} \
                 /var/tmp/${NAME}
        ln -fs /var/cache/${NAME} ${CATALINA_HOME}/work
        ln -fs /var/tmp/${NAME} ${CATALINA_HOME}/temp
        cp -pLR /usr/share/${NAME}/bin $CATALINA_HOME
        cp -pLR /usr/share/${NAME}/conf $CATALINA_HOME
        ln -fs /usr/share/java/tomcat ${CATALINA_HOME}/lib
        ln -fs /usr/share/tomcat/webapps ${CATALINA_HOME}/webapps
        chown --no-dereference ${TOMCAT_USER}:${TOMCAT_USER} /var/log/${NAME}
    fi
}
 
function parseOptions() {
    options=""
    options="$options $(
                 awk '!/^#/ && !/^$/ { ORS=" "; print "export ", $0, ";" }' \
                 $TOMCAT_CFG
             )"
#    if [ -r "/etc/sysconfig/${NAME}" ]; then
#        options="$options $(
#                     awk '!/^#/ && !/^$/ { ORS=" ";
#                                           print "export ", $0, ";" }' \
#                     /etc/sysconfig/${NAME}
#                 )"
#    fi
    TOMCAT_SCRIPT="$options ${TOMCAT_SCRIPT}"
}
 
# See how we were called.
function start() {
    echo -n "Starting Tomcat ($CATALINA_BASE)"
    if [ -f "/var/run/rc${NAME}" ] ; then
        if [ -f "/var/run/${NAME}.pid" ]; then
            read kpid < /var/run/${NAME}.pid
                if checkpid $kpid 2>&1; then
                    echo "$NAME process already running"
                        rc_failed 0
                    else
                        echo -n "lock file found but no process running for pid 
$kpid, continuing"
                        rc_failed 7
                fi
        fi
    fi
    # fix permissions on the log and pid files
    export CATALINA_PID="/var/run/${NAME}.pid"
    touch $CATALINA_PID
    chown --no-dereference${TOMCAT_USER}:${TOMCAT_USER} $CATALINA_PID
    touch $TOMCAT_LOG
    chown --no-dereference${TOMCAT_USER}:${TOMCAT_USER} $TOMCAT_LOG
    if [ "$CATALINA_HOME" != "/usr/share/tomcat" ]; then
        # Create a tomcat directory if it doesn't exist
        makeHomeDir
        # If CATALINA_HOME doesn't exist modify port number so that
        # multiple instances don't interfere with each other
        findFreePorts
        sed -i -e "s/8005/${randomPort1}/g" -e "s/8080/${CONNECTOR_PORT}/g" \
            -e "s/8009/${randomPort2}/g" -e "s/8443/${randomPort3}/g" \
            ${CATALINA_HOME}/conf/server.xml
    fi
    parseOptions
    if [ "$SECURITY_MANAGER" = "true" ]; then
        $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} start-security" \
            >> $TOMCAT_LOG 2>&1
    else
        $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} start" >> $TOMCAT_LOG 2>&1
    fi
    RETVAL="$?"
    if [ "$RETVAL" -eq 0 ]; then
        rc_failed 0
        touch /var/run/rc${NAME}
    else
        rc_failed 7
    fi
    rc_status -v
}
 
## Check status with checkproc(8), if process is running
## checkproc will return with exit status 0.
 
# Status has a slightly different for the status command:
# 0 - service running
# 1 - service dead, but /var/run/  pid  file exists
# 2 - service dead, but /var/lock/ lock file exists
# 3 - service not running
 
# NOTE: checkproc returns LSB compliant status values.
function status() {
    echo -n "Checking for Tomcat ($CATALINA_BASE)"
    if [ -f "/var/run/${NAME}.pid" ]; then
        read kpid < /var/run/${NAME}.pid
        if checkpid $kpid 2>&1; then
            rc_failed 0
        else
            rc_failed 2
        fi
    else
        #don't be dependent on procps
        #pid="$(/usr/bin/pgrep -u tomcat java)"
        pid="$(ps U tomcat o pid,cmd | grep java | grep -v 'grep java')"
        if [ -n "$pid" ]; then
            echo "$0 running (${pid}) but no PID file exists"
            rc_failed 0
        else
            rc_failed 3
        fi
    fi
    rc_status -v
}
 
function stop() {
    echo -n "Shutting down Tomcat ($CATALINA_BASE)"
    if [ -f "/var/run/rc${NAME}" ]; then
        parseOptions
        $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} stop" >> $TOMCAT_LOG 2>&1
        RETVAL="$?"
        if [ "$RETVAL" -eq "0" ]; then
            count="0"
            if [ -f "/var/run/${NAME}.pid" ]; then
                read kpid < /var/run/${NAME}.pid
                until [ "$(ps --pid $kpid | grep -c $kpid)" -eq "0" ] || \
                      [ "$count" -gt "$SHUTDOWN_WAIT" ]; do
                    if [ "$SHUTDOWN_VERBOSE" = "true" ]; then
                        echo "waiting for processes $kpid to exit"
                    fi
                    sleep 1
                    let count="${count}+1"
                done
                if [ "$count" -gt "$SHUTDOWN_WAIT" ]; then
                    if [ "$SHUTDOWN_VERBOSE" = "true" ]; then
                        echo "killing processes which didn't stop after 
$SHUTDOWN_WAIT seconds"
                        echo -n -e "after "
                        echo -n "$SHUTDOWN_WAIT seconds"
                    fi
                    kill -9 $kpid
                fi
                rc_failed 0
                if [ "$count" -gt "0" ]; then
                    echo -n -e "\n"
                fi
            fi
            rm -f /var/run/rc${NAME} /var/run/${NAME}.pid
            if [ "${CLEAR_WORK}" = "true" ]; then
                echo -n "Cleaning work directory: "
                find ${CATALINA_HOME}/work/{Catalina,temp} -mindepth 2 -type d 
-print0 | xargs -0 rm -rf
                if [ "$?" -eq "0" ]; then
                        log_success_msg
                        echo -n -e "\n"
                fi
             fi
 
        else
            rc_failed 1
        fi
    fi
    rc_status -v
}
 
 
# See how we were called.
case "$1" in
    start)
        start
        ;;
    stop)
        stop
        ;;
    try-restart)
    ## Stop the service and if this succeeds (i.e. the
    ## service was running before), start it again.
        ## Note: try-restart is not (yet) part of LSB (as of 0.7.5)
        $0 status >/dev/null &&  $0 restart
     
    # Remember status and be quiet
    rc_status
    ;;
    restart)
        stop
        sleep 2   
        start
        rc_status
        ;;
    force-reload)
    ## Signal the daemon to reload its config. Most daemons
    ## do this on signal 1 (SIGHUP).
    ## If it does not support it, restart.
 
    echo -n "Reload service Tomcat ($CATALINA_BASE)"
    ## if it supports it:
    #killproc -HUP $TOMCAT_BIN
    #touch /var/run/FOO.pid
    #rc_status -v
 
    ## Otherwise:
    $0 stop  &&  $0 start
    rc_status
    ;;
    reload)
    ## Like force-reload, but if daemon does not support
    ## signalling, do nothing (!)
 
    # If it supports signalling:
    #echo -n "Reload service FOO"
    #killproc -HUP $TOMCAT_BIN
    #touch /var/run/FOO.pid
    #rc_status -v
     
    ## Otherwise if it does not support reload:
    rc_failed 3
    rc_status -v
    ;;
    status)
        status
        ;;
    probe)
        ## Optional: Probe for the necessity of a reload,
        ## give out the argument which is required for a reload.
        ;;
    *)
    echo "Usage: $0 
{start|stop|status|try-restart|restart|force-reload|reload|probe}"
    exit 1
    ;;
esac
rc_exit
++++++ tomcat-7.0.logrotate ++++++
@@@TCLOG@@@/catalina.out {
    copytruncate
    weekly
    rotate 52
    compress
    missingok
    create 0644 tomcat tomcat
}
++++++ tomcat-7.0.service ++++++
# Systemd unit file for tomcat
#
# You can clone this service by:
# 1.) Add a new EnvironmentFile declaring the new values for CATALINA_BASE
#     and others

[Unit]
Description=Apache Tomcat Web Application Container
After=network.target

[Service]
Type=simple
EnvironmentFile=/etc/tomcat/tomcat.conf
User=tomcat
Group=tomcat
ExecStart=/usr/sbin/tomcat-sysd start
ExecStop=/usr/sbin/tomcat-sysd stop

[Install]
WantedBy=multi-user.target
++++++ tomcat-7.0.wrapper ++++++
#!/bin/bash
 
if [ -r /usr/share/java-utils/java-functions ]; then
  . /usr/share/java-utils/java-functions
else
  echo "Can't read Java functions library, aborting"
  exit 1
fi
 
# Get the tomcat config (use this for environment specific settings)
if [ -z "${TOMCAT_CFG}" ]; then
    TOMCAT_CFG="/etc/tomcat/tomcat.conf"
fi
 
if [ -r "$TOMCAT_CFG" ]; then
    . $TOMCAT_CFG
fi
 
set_javacmd
 
# CLASSPATH munging
if [ -n "$JSSE_HOME" ]; then
  CLASSPATH="${CLASSPATH}:$(build-classpath jcert jnet jsse 2>/dev/null)"
fi
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/bootstrap.jar"
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/tomcat-juli.jar"
CLASSPATH="${CLASSPATH}:$(build-classpath commons-daemon 2>/dev/null)"

#sanitize the classpath - remove double and trailing colons
CLASSPATH="`echo ${CLASSPATH} | sed 's/::+/:/g; s/^://; s/:$//g'`"
 
if [ "$1" = "start" ]; then
  ${JAVACMD} $JAVA_OPTS $CATALINA_OPTS \
    -classpath "$CLASSPATH" \
    -Dcatalina.base="$CATALINA_BASE" \
    -Dcatalina.home="$CATALINA_HOME" \
    -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
    -Djava.io.tmpdir="$CATALINA_TMPDIR" \
    -Djava.util.logging.config.file="${CATALINA_BASE}/conf/logging.properties" \
    -Djava.util.logging.manager="org.apache.juli.ClassLoaderLogManager" \
    org.apache.catalina.startup.Bootstrap start \
    >> ${CATALINA_BASE}/logs/catalina.out 2>&1 &
    if [ ! -z "$CATALINA_PID" ]; then
      echo $! > $CATALINA_PID
    fi
elif [ "$1" = "start-security" ]; then
  ${JAVACMD} $JAVA_OPTS $CATALINA_OPTS \
    -classpath "$CLASSPATH" \
    -Dcatalina.base="$CATALINA_BASE" \
    -Dcatalina.home="$CATALINA_HOME" \
    -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
    -Djava.io.tmpdir="$CATALINA_TMPDIR" \
    -Djava.security.manager \
    -Djava.security.policy="${CATALINA_BASE}/conf/catalina.policy" \
    -Djava.util.logging.config.file="${CATALINA_BASE}/conf/logging.properties" \
    -Djava.util.logging.manager="org.apache.juli.ClassLoaderLogManager" \
    org.apache.catalina.startup.Bootstrap start \
    >> ${CATALINA_BASE}/logs/catalina.out 2>&1 &
    if [ ! -z "$CATALINA_PID" ]; then
      echo $! > $CATALINA_PID
    fi
elif [ "$1" = "stop" ]; then
  ${JAVACMD} $JAVA_OPTS \
    -classpath "$CLASSPATH" \
    -Dcatalina.base="$CATALINA_BASE" \
    -Dcatalina.home="$CATALINA_HOME" \
    -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
    -Djava.io.tmpdir="$CATALINA_TMPDIR" \
    org.apache.catalina.startup.Bootstrap stop \
    >> ${CATALINA_BASE}/logs/catalina.out 2>&1
elif [ "$1" = "version" ]; then
  ${JAVACMD} -classpath ${CATALINA_HOME}/lib/catalina.jar \
    org.apache.catalina.util.ServerInfo
else
  echo "Usage: $0 {start|start-security|stop|version}"
  exit 1
fi
++++++ tomcat-CVE-2013-2071.patch ++++++
commit f505d993d47d75d762c632cef6a622928ed4bcd6
Author: Mark Emlyn David Thomas <ma...@apache.org>
Date:   Wed Apr 24 11:43:30 2013 +0000

    Protect against AsyncListeners that throw RuntimeExceptions (they should 
normally only throw IOExceptions).
    Includes a test case.
    
    git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk@1471372 
13f79535-47bb-0310-9956-ffa450edef68

Index: 
apache-tomcat-7.0.35-src/java/org/apache/catalina/core/AsyncContextImpl.java
===================================================================
--- 
apache-tomcat-7.0.35-src.orig/java/org/apache/catalina/core/AsyncContextImpl.java
+++ apache-tomcat-7.0.35-src/java/org/apache/catalina/core/AsyncContextImpl.java
@@ -117,9 +117,10 @@ public class AsyncContextImpl implements
             for (AsyncListenerWrapper listener : listenersCopy) {
                 try {
                     listener.fireOnComplete(event);
-                } catch (IOException ioe) {
+                } catch (Throwable t) {
+                    ExceptionUtils.handleThrowable(t);
                     log.warn("onComplete() failed for listener of type [" +
-                            listener.getClass().getName() + "]", ioe);
+                            listener.getClass().getName() + "]", t);
                 }
             }
         } finally {
@@ -148,9 +149,10 @@ public class AsyncContextImpl implements
                 for (AsyncListenerWrapper listener : listenersCopy) {
                     try {
                         listener.fireOnTimeout(event);
-                    } catch (IOException ioe) {
+                    } catch (Throwable t) {
+                        ExceptionUtils.handleThrowable(t);
                         log.warn("onTimeout() failed for listener of type [" +
-                                listener.getClass().getName() + "]", ioe);
+                                listener.getClass().getName() + "]", t);
                     }
                 }
                 request.getCoyoteRequest().action(
@@ -328,9 +330,10 @@ public class AsyncContextImpl implements
         for (AsyncListenerWrapper listener : listenersCopy) {
             try {
                 listener.fireOnStartAsync(event);
-            } catch (IOException ioe) {
+            } catch (Throwable t) {
+                ExceptionUtils.handleThrowable(t);
                 log.warn("onStartAsync() failed for listener of type [" +
-                        listener.getClass().getName() + "]", ioe);
+                        listener.getClass().getName() + "]", t);
             }
         }
         listeners.clear();
@@ -393,9 +396,10 @@ public class AsyncContextImpl implements
             for (AsyncListenerWrapper listener : listenersCopy) {
                 try {
                     listener.fireOnError(errorEvent);
-                } catch (IOException ioe) {
+                } catch (Throwable t2) {
+                    ExceptionUtils.handleThrowable(t);
                     log.warn("onError() failed for listener of type [" +
-                            listener.getClass().getName() + "]", ioe);
+                            listener.getClass().getName() + "]", t2);
                 }
             }
         }
Index: 
apache-tomcat-7.0.35-src/test/org/apache/catalina/core/TestAsyncContextImpl.java
===================================================================
--- 
apache-tomcat-7.0.35-src.orig/test/org/apache/catalina/core/TestAsyncContextImpl.java
+++ 
apache-tomcat-7.0.35-src/test/org/apache/catalina/core/TestAsyncContextImpl.java
@@ -1190,7 +1190,7 @@ public class TestAsyncContextImpl extend
 
         private static final long serialVersionUID = 1L;
 
-        private int status = 200;
+        private int status;
 
         public AsyncStatusServlet(int status) {
             this.status = status;
@@ -1630,4 +1630,108 @@ public class TestAsyncContextImpl extend
             }
         }
     }
+
+    @Test
+    public void testBug54178() throws Exception {
+        // Setup Tomcat instance
+        Tomcat tomcat = getTomcatInstance();
+
+        // Must have a real docBase - just use temp
+        File docBase = new File(System.getProperty("java.io.tmpdir"));
+
+        Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+
+        Bug54178ServletA bug54178ServletA = new Bug54178ServletA();
+        Wrapper wrapper =
+            Tomcat.addServlet(ctx, "bug54178ServletA", bug54178ServletA);
+        wrapper.setAsyncSupported(true);
+        ctx.addServletMapping("/bug54178ServletA", "bug54178ServletA");
+
+        Bug54178ServletB bug54178ServletB = new Bug54178ServletB();
+        Tomcat.addServlet(ctx, "bug54178ServletB", bug54178ServletB);
+        ctx.addServletMapping("/bug54178ServletB", "bug54178ServletB");
+
+        tomcat.start();
+
+        ByteChunk body = new ByteChunk();
+        int rc = -1;
+
+        try {
+            rc = getUrl("http://localhost:"; + getPort() + "/bug54178ServletA?" 
+
+                    Bug54178ServletA.PARAM_NAME + "=bar",
+                    body, null);
+        } catch (IOException ioe) {
+            // This may happen if test fails. Output the exception in case it 
is
+            // useful and let asserts handle the failure
+            ioe.printStackTrace();
+        }
+
+        assertEquals(HttpServletResponse.SC_OK, rc);
+
+        body.recycle();
+
+        rc = getUrl("http://localhost:"; + getPort() + "/bug54178ServletB",
+                body, null);
+
+        assertEquals(HttpServletResponse.SC_OK, rc);
+        assertEquals("OK", body.toString());
+    }
+
+    private static class Bug54178ServletA extends HttpServlet {
+
+        public static final String PARAM_NAME = "foo";
+        private static final long serialVersionUID = 1L;
+
+        @Override
+        protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+                throws ServletException, IOException {
+
+            req.getParameter(PARAM_NAME);
+            AsyncContext actxt = req.startAsync();
+            actxt.addListener(new Bug54178AsyncListener());
+            actxt.complete();
+        }
+    }
+
+    private static class Bug54178ServletB extends HttpServlet {
+
+        private static final long serialVersionUID = 1L;
+
+        @Override
+        protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+                throws ServletException, IOException {
+
+            resp.setContentType("text/plain");
+            PrintWriter pw = resp.getWriter();
+            String result = req.getParameter(Bug54178ServletA.PARAM_NAME);
+            if (result == null) {
+                pw.write("OK");
+            } else {
+                pw.write("FAIL");
+            }
+        }
+    }
+
+    private static class Bug54178AsyncListener implements AsyncListener {
+
+        @Override
+        public void onComplete(AsyncEvent event) throws IOException {
+            throw new RuntimeException("Testing Bug54178");
+        }
+
+        @Override
+        public void onTimeout(AsyncEvent event) throws IOException {
+            // NO-OP
+        }
+
+        @Override
+        public void onError(AsyncEvent event) throws IOException {
+            // NO-OP
+        }
+
+        @Override
+        public void onStartAsync(AsyncEvent event) throws IOException {
+            // NO-OP
+        }
+    }
 }
++++++ tomcat-api-OSGi-MANIFEST.MF ++++++
Manifest-Version: 1.0
Export-Package: org.apache.tomcat;version="7.0.21"
Bundle-Vendor: %bundleProvider
Bundle-ClassPath: .
Bundle-Version: 7.0.21
Bundle-Name: %bundleName
Bundle-Localization: plugin
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.apache.tomcat
Bundle-RequiredExecutionEnvironment: J2SE-1.4,CDC-1.0/Foundation-1.0,J
 2SE-1.3

++++++ tomcat-juli-OSGi-MANIFEST.MF ++++++
Manifest-Version: 1.0
Export-Package: org.apache.juli;version="7.0.21",org.apache.juli.loggi
 ng;version="7.0.21"
Bundle-Vendor: %bundleProvider
Bundle-ClassPath: .
Bundle-Version: 7.0.21
Bundle-Name: %bundleName
Bundle-Localization: plugin
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.apache.juli
Bundle-RequiredExecutionEnvironment: J2SE-1.4,CDC-1.0/Foundation-1.0,J
 2SE-1.3

++++++ tomcat-rpmlintrc ++++++
#fix of bnc#520532
addFilter(".*non-etc-or-var-file-marked-as-conffile /srv/tomcat/webapps/ROOT.*")
++++++ tomcat.keyring ++++++
pub   4096R/2F6059E7 2009-09-18
uid                  Mark E D Thomas <ma...@apache.org>
sub   4096R/5E763BEC 2009-09-18

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2.0.19 (GNU/Linux)

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
=8gQ0
-----END PGP PUBLIC KEY BLOCK-----
-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to