From 36c4ac2b1f357f138833a9af73f12879848dae30 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Mon, 7 Apr 2008 22:04:55 +0000 Subject: [PATCH 001/273] Setup of module tomcat6 --- .cvsignore | 0 Makefile | 21 +++++++++++++++++++++ sources | 0 3 files changed, 21 insertions(+) create mode 100644 .cvsignore create mode 100644 Makefile create mode 100644 sources diff --git a/.cvsignore b/.cvsignore new file mode 100644 index 0000000..e69de29 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..35e4a57 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +# Makefile for source rpm: tomcat6 +# $Id$ +NAME := tomcat6 +SPECFILE = $(firstword $(wildcard *.spec)) + +define find-makefile-common +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +endef + +MAKEFILE_COMMON := $(shell $(find-makefile-common)) + +ifeq ($(MAKEFILE_COMMON),) +# attept a checkout +define checkout-makefile-common +test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 +endef + +MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) +endif + +include $(MAKEFILE_COMMON) diff --git a/sources b/sources new file mode 100644 index 0000000..e69de29 From 30340fbc12ff5698f0b97646af4a736589ce00a9 Mon Sep 17 00:00:00 2001 From: dwalluck Date: Mon, 7 Apr 2008 22:37:26 +0000 Subject: [PATCH 002/273] initial import of 6.0.16-1jpp.7%{?dist} (rhbz #435829) --- .cvsignore | 1 + sources | 1 + tomcat6-6.0-bootstrap-MANIFEST.MF.patch | 8 + tomcat6-6.0-digest.script | 45 +++ tomcat6-6.0-tomcat-users-webapp.patch | 12 + tomcat6-6.0-tool-wrapper.script | 45 +++ tomcat6-6.0.conf | 50 +++ tomcat6-6.0.init | 269 +++++++++++++ tomcat6-6.0.logrotate | 8 + tomcat6-6.0.sysconfig | 56 +++ tomcat6-6.0.wrapper | 74 ++++ tomcat6.spec | 504 ++++++++++++++++++++++++ 12 files changed, 1073 insertions(+) create mode 100644 tomcat6-6.0-bootstrap-MANIFEST.MF.patch create mode 100644 tomcat6-6.0-digest.script create mode 100644 tomcat6-6.0-tomcat-users-webapp.patch create mode 100644 tomcat6-6.0-tool-wrapper.script create mode 100644 tomcat6-6.0.conf create mode 100644 tomcat6-6.0.init create mode 100644 tomcat6-6.0.logrotate create mode 100644 tomcat6-6.0.sysconfig create mode 100644 tomcat6-6.0.wrapper create mode 100644 tomcat6.spec diff --git a/.cvsignore b/.cvsignore index e69de29..5ae6bfe 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +apache-tomcat-6.0.16-src.tar.gz diff --git a/sources b/sources index e69de29..7c10ac4 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +b2e42e8a875339e655d92975729717e5 apache-tomcat-6.0.16-src.tar.gz diff --git a/tomcat6-6.0-bootstrap-MANIFEST.MF.patch b/tomcat6-6.0-bootstrap-MANIFEST.MF.patch new file mode 100644 index 0000000..9b3ba48 --- /dev/null +++ b/tomcat6-6.0-bootstrap-MANIFEST.MF.patch @@ -0,0 +1,8 @@ +--- apache-tomcat-6.0.16-src/res/bootstrap.jar.manifest.orig 2007-06-21 11:02:18.000000000 -0400 ++++ apache-tomcat-6.0.16-src/res/bootstrap.jar.manifest 2007-06-21 11:02:26.000000000 -0400 +@@ -1,5 +1,4 @@ + Manifest-Version: 1.0 + Main-Class: org.apache.catalina.startup.Bootstrap +-Class-Path: commons-daemon.jar commons-logging-api.jar tomcat-juli.jar tomcat-coyote.jar + Specification-Title: Catalina + Specification-Version: 6.0 diff --git a/tomcat6-6.0-digest.script b/tomcat6-6.0-digest.script new file mode 100644 index 0000000..41ef58e --- /dev/null +++ b/tomcat6-6.0-digest.script @@ -0,0 +1,45 @@ +#!/bin/sh +# +# tomcat6-digest script +# JPackage Project + +# 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/tomcat6/tomcat6.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" +export CLASSPATH + +# Configuration +MAIN_CLASS="org.apache.catalina.startup.Tool" +BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\"" +BASE_OPTIONS="" +BASE_JARS="commons-daemon tomcat6/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 "$@" diff --git a/tomcat6-6.0-tomcat-users-webapp.patch b/tomcat6-6.0-tomcat-users-webapp.patch new file mode 100644 index 0000000..f2030b2 --- /dev/null +++ b/tomcat6-6.0-tomcat-users-webapp.patch @@ -0,0 +1,12 @@ +--- apache-tomcat-6.0.16-src/conf/tomcat-users.xml~ 2008-01-28 17:41:06.000000000 -0500 ++++ apache-tomcat-6.0.16-src/conf/tomcat-users.xml 2008-03-07 19:40:07.000000000 -0500 +@@ -23,4 +23,9 @@ + + + --> ++ ++ ++ ++ ++ + diff --git a/tomcat6-6.0-tool-wrapper.script b/tomcat6-6.0-tool-wrapper.script new file mode 100644 index 0000000..bcd7561 --- /dev/null +++ b/tomcat6-6.0-tool-wrapper.script @@ -0,0 +1,45 @@ +#!/bin/sh +# +# tomcat6-digest script +# JPackage Project + +# 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/tomcat6/tomcat6.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" +export CLASSPATH + +# Configuration +MAIN_CLASS="org.apache.catalina.startup.Tool" +BASE_OPTIONS="" +BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\"" +BASE_JARS="commons-daemon tomcat6/catalina servlet" + +# Set parameters +set_classpath $BASE_JARS +set_flags $BASE_FLAGS +set_options $BASE_OPTIONS + +# Let's start +run "$@" diff --git a/tomcat6-6.0.conf b/tomcat6-6.0.conf new file mode 100644 index 0000000..dae17f6 --- /dev/null +++ b/tomcat6-6.0.conf @@ -0,0 +1,50 @@ +# System-wide configuration file for tomcat6 services +# This will be sourced by tomcat6 and any secondary service +# Values will be overridden by service-specific configuration +# files in /etc/sysconfig +# +# Use this one to change default values for all services +# Change the service specific ones to affect only one service +# (see, for instance, /etc/sysconfig/tomcat6) +# + +# Where your java installation lives +#JAVA_HOME="/usr/lib/jvm/java" + +# Where your tomcat installation lives +CATALINA_BASE="@@@TCHOME@@@" +CATALINA_HOME="@@@TCHOME@@@" +JASPER_HOME="@@@TCHOME@@@" +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 +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 +CATALINA_PID="/var/run/tomcat6.pid" + +# Connector port is 8080 for this tomcat6 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) + diff --git a/tomcat6-6.0.init b/tomcat6-6.0.init new file mode 100644 index 0000000..1d3ee42 --- /dev/null +++ b/tomcat6-6.0.init @@ -0,0 +1,269 @@ +#!/bin/bash +# +# tomcat6 This shell script takes care of starting and stopping Tomcat +# +# chkconfig: - 80 20 +# +### BEGIN INIT INFO +# Provides: tomcat6 +# Required-Start: $network $syslog +# Required-Stop: $network $syslog +# Default-Start: +# Default-Stop: +# Description: Release implementation for Servlet 2.5 and JSP 2.1 +# Short-Description: start and stop tomcat +### END INIT INFO +# +# - originally written by Henri Gomez, Keith Irwin, and Nicolas Mailhot +# - heavily rewritten by Deepak Bhole and Jason Corley +# + +# Source function library. +. /etc/rc.d/init.d/functions + +NAME="$(basename $0)" +unset ISBOOT +if [ "${NAME:0:1}" = "S" -o "${NAME:0:1}" = "K" ]; then + NAME="${NAME:3}" + ISBOOT="1" +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/tomcat6/tomcat6.conf" +if [ -r "$TOMCAT_CFG" ]; then + . $TOMCAT_CFG +fi + +# Get instance specific config file +if [ -r "/etc/sysconfig/${NAME}" ]; then + . /etc/sysconfig/${NAME} +fi + +# Define which connector port to use +CONNECTOR_PORT="${CONNECTOR_PORT:-8080}" + +# Path to the tomcat launch script +TOMCAT_SCRIPT="/usr/sbin/tomcat6" + +# Tomcat program name +TOMCAT_PROG="${NAME}" + +# Define the tomcat username +TOMCAT_USER="${TOMCAT_USER:-tomcat}" + +# Define the tomcat log file +TOMCAT_LOG="${TOMCAT_LOG:-/var/log/tomcat6/catalina.out}" + +RETVAL="0" + +# 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/tomcat6/* /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/tomcat6 ${CATALINA_HOME}/lib + ln -fs /usr/share/tomcat6/webapps ${CATALINA_HOME}/webapps + chown ${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_PROG}: " + if [ -f "/var/lock/subsys/${NAME}" ] ; then + if [ -f "/var/run/${NAME}.pid" ]; then + read kpid < /var/run/${NAME}.pid + if checkpid $kpid 2>&1; then + echo_success + echo + return 0 + fi + fi + fi + # fix permissions on the log and pid files + export CATALINA_PID="/var/run/${NAME}.pid" + touch $CATALINA_PID + chown ${TOMCAT_USER}:${TOMCAT_USER} $CATALINA_PID + touch $TOMCAT_LOG + chown ${TOMCAT_USER}:${TOMCAT_USER} $TOMCAT_LOG + if [ "$CATALINA_HOME" != "/usr/share/tomcat6" ]; 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 + echo_success + touch /var/lock/subsys/${NAME} + else + echo_failure + fi + echo + return $RETVAL +} + +function stop() { + RETVAL="0" + echo -n "Stopping ${TOMCAT_PROG}: " + if [ -f "/var/lock/subsys/${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" + fi + kill -9 $kpid + fi + echo_success + fi + rm -f /var/lock/subsys/${NAME} /var/run/${NAME}.pid + else + echo_failure + fi + else + echo_success + fi + echo + return $RETVAL +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + stop + start + ;; + condrestart|try-restart) + if [ -f "/var/run/${NAME}.pid" ]; then + stop + start + fi + ;; + reload) + RETVAL="3" + ;; + force-reload) + if [ -f "/var/run/${NAME}.pid" ]; then + stop + start + fi + ;; + status) + if [ -f "/var/run/${NAME}.pid" ]; then + status ${NAME} + RETVAL="$?" + else + pid="$(/usr/bin/pgrep -d , -u tomcat -G tomcat java)" + if [ -z "$pid" ]; then + status ${NAME} + RETVAL="$?" + else + echo "${NAME} (pid $pid) is running..." + RETVAL="0" + fi + fi + ;; + version) + ${TOMCAT_SCRIPT} version + ;; + *) + echo -n "Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status|version}" + RETVAL="2" +esac + +exit $RETVAL diff --git a/tomcat6-6.0.logrotate b/tomcat6-6.0.logrotate new file mode 100644 index 0000000..a87b4c0 --- /dev/null +++ b/tomcat6-6.0.logrotate @@ -0,0 +1,8 @@ +@@@TCLOG@@@/catalina.out { + copytruncate + weekly + rotate 52 + compress + missingok + create 0644 tomcat tomcat +} diff --git a/tomcat6-6.0.sysconfig b/tomcat6-6.0.sysconfig new file mode 100644 index 0000000..caefeed --- /dev/null +++ b/tomcat6-6.0.sysconfig @@ -0,0 +1,56 @@ +# Service-specific configuration file for tomcat6. This will be sourced by +# the SysV init script after the global configuration file +# /etc/tomcat6/tomcat6.conf, thus allowing values to be overridden in +# a per-service manner. +# +# NEVER change the init script itself. To change values for all services make +# your changes in /etc/tomcat6/tomcat6.conf +# +# To change values for a specific service make your edits here. +# To create a new service create a link from /etc/init.d/ to +# /etc/init.d/tomcat6 (do not copy the init script) and make a copy of the +# /etc/sysconfig/tomcat6 file to /etc/sysconfig/ and change +# the property values so the two services won't conflict. Register the new +# service in the system as usual (see chkconfig and similars). +# + +# Where your java installation lives +#JAVA_HOME="/usr/lib/jvm/java" + +# Where your tomcat installation lives +#CATALINA_BASE="@@@TCHOME@@@" +#CATALINA_HOME="@@@TCHOME@@@" +#JASPER_HOME="@@@TCHOME@@@" +#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 +#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 +#CATALINA_PID="/var/run/tomcat6.pid" + +# Connector port is 8080 for this tomcat6 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) + diff --git a/tomcat6-6.0.wrapper b/tomcat6-6.0.wrapper new file mode 100644 index 0000000..9c02a73 --- /dev/null +++ b/tomcat6-6.0.wrapper @@ -0,0 +1,74 @@ +#!/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/tomcat6/tomcat6.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)" + +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 $CATALINA_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 diff --git a/tomcat6.spec b/tomcat6.spec new file mode 100644 index 0000000..30d4ffb --- /dev/null +++ b/tomcat6.spec @@ -0,0 +1,504 @@ +# Copyright (c) 2000-2008, JPackage Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the +# distribution. +# 3. Neither the name of the JPackage Project nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +%define section free + +%define jspspec 2.1 +%define macro_version 16 +%define major_version 6 +%define minor_version 0 +%define packdname apache-tomcat-%{version}-src +%define servletspec 2.5 +%define tcuid 91 + +# FHS 2.3 compliant tree structure - http://www.pathname.com/fhs/2.3/ +%define appdir %{_var}/lib/%{name}/webapps +%define bindir %{_datadir}/%{name}/bin +%define confdir %{_sysconfdir}/%{name} +%define homedir %{_datadir}/%{name} +%define libdir %{_javadir}/%{name} +%define logdir %{_var}/log/%{name} +%define tempdir %{_var}/tmp/%{name} +%define workdir %{_var}/cache/%{name} + +Name: tomcat6 +Epoch: 0 +Version: %{major_version}.%{minor_version}.%{macro_version} +Release: 1jpp.7%{?dist} +Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API + +Group: Networking/Daemons +License: ASL 2.0 +URL: http://tomcat.apache.org/ +Source0: http://www.apache.org/dist/tomcat/tomcat-6/v%{version}/src/%{packdname}.tar.gz +Source1: %{name}-%{major_version}.%{minor_version}.conf +Source2: %{name}-%{major_version}.%{minor_version}.init +Source3: %{name}-%{major_version}.%{minor_version}.sysconfig +Source4: %{name}-%{major_version}.%{minor_version}.wrapper +Source5: %{name}-%{major_version}.%{minor_version}.logrotate +Source6: %{name}-%{major_version}.%{minor_version}-digest.script +Source7: %{name}-%{major_version}.%{minor_version}-tool-wrapper.script +Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch +Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root +BuildArch: noarch + +BuildRequires: ant +BuildRequires: ant-trax +BuildRequires: eclipse-ecj >= 0:3.2.2 +BuildRequires: findutils +BuildRequires: jakarta-commons-collections +BuildRequires: jakarta-commons-daemon +BuildRequires: java-devel >= 0:1.6.0 +BuildRequires: jpackage-utils >= 0:1.7.0 +BuildRequires: junit +Requires(pre): shadow-utils +Requires(pre): shadow-utils +Requires: jakarta-commons-daemon +Requires: jakarta-commons-logging +Requires: java >= 0:1.6.0 +Requires: procps +Requires: %{name}-lib = %{epoch}:%{version}-%{release} +Requires(post): /sbin/chkconfig +Requires(preun): /sbin/chkconfig +Requires(preun): /sbin/service + +%description +Tomcat is the servlet container that is used in the official Reference +Implementation for the Java Servlet and JavaServer Pages technologies. +The Java Servlet and JavaServer Pages specifications are developed by +Sun under the Java Community Process. + +Tomcat is developed in an open and participatory environment and +released under the Apache Software License version 2.0. Tomcat is intended +to be a collaboration of the best-of-breed developers from around the world. + +%package admin-webapps +Group: System Environment/Applications +Summary: The host-manager and manager web applications for Apache Tomcat +Requires: %{name} = %{epoch}:%{version}-%{release} + +%description admin-webapps +The host-manager and manager web applications for Apache Tomcat + +%package docs-webapp +Group: System Environment/Applications +Summary: The docs web application for Apache Tomcat +Requires: %{name} = %{epoch}:%{version}-%{release} + +%description docs-webapp +The docs web application for Apache Tomcat + +%package javadoc +Group: Documentation +Summary: Javadoc generated documentation for Apache Tomcat + +%description javadoc +Javadoc generated documentation for Apache Tomcat + +%package jsp-%{jspspec}-api +Group: Internet/WWW/Dynamic Content +Summary: Apache Tomcat JSP API implementation classes +Provides: jsp = %{jspspec} +Provides: jsp21 +Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} +Requires(post): chkconfig +Requires(postun): chkconfig + +%description jsp-%{jspspec}-api +Apache Tomcat JSP API implementation classes + +%package lib +Group: Development/Compilers +Summary: Libraries needed to run the Tomcat Web container +Requires: %{name}-jsp-%{jspspec}-api = %{epoch}:%{version}-%{release} +Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} +Requires(post): eclipse-ecj >= 0:3.2.2 +Requires(post): jakarta-commons-collections-tomcat5 +Requires(post): jakarta-commons-dbcp-tomcat5 +Requires(post): jakarta-commons-pool-tomcat5 +Requires(preun): coreutils + +%description lib +Libraries needed to run the Tomcat Web container + +%package servlet-%{servletspec}-api +Group: Internet/WWW/Dynamic Content +Summary: Apache Tomcat Servlet API implementation classes +Provides: servlet = %{servletspec} +Provides: servlet6 +Provides: servlet25 +Requires(post): chkconfig +Requires(postun): chkconfig + +%description servlet-%{servletspec}-api +Apache Tomcat Servlet API implementation classes + +%package webapps +Group: System Environment/Applications +Summary: The ROOT and examples web applications for Apache Tomcat +Requires: %{name} = %{epoch}:%{version}-%{release} +Requires(post): jakarta-taglibs-standard >= 0:1.1 + +%description webapps +The ROOT and examples web applications for Apache Tomcat + +%prep +%setup -q -c -T -a 0 +# remove pre-built binaries and windows files +find . \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name "*.gz" -o \ + -name "*.jar" -o -name "*.war" -o -name "*.zip" \) | xargs -t %{__rm} -f +%patch0 -p0 +%patch1 -p0 + +%build +export CLASSPATH= +export OPT_JAR_LIST="ant/ant-trax" +pushd %{packdname} + # we don't care about the tarballs and we're going to replace + # tomcat-dbcp.jar with jakarta-commons-{collections,dbcp,pool}-tomcat5.jar + # so just create a dummy file for later removal + touch HACK + # who needs a build.properties file anyway + %{ant} -Dbase.path="." \ + -Dbuild.compiler="modern" \ + -Dcommons-collections.jar="$(build-classpath commons-collections)" \ + -Dcommons-daemon.jar="$(build-classpath commons-daemon)" \ + -Dcommons-daemon.jsvc.tar.gz="HACK" \ + -Djasper-jdt.jar="$(build-classpath eclipse-ecj)" \ + -Djdt.jar="$(build-classpath eclipse-ecj)" \ + -Dtomcat-dbcp.jar="HACK" \ + -Dtomcat-native.tar.gz="HACK" \ + -Dversion="%{version}" \ + -Dversion.build="%{macro_version}" + # javadoc generation + %{ant} -f dist.xml dist-prepare + %{ant} -f dist.xml dist-source + %{ant} -f dist.xml dist-javadoc + # remove some jars that we'll replace with symlinks later + %{__rm} output/build/bin/commons-daemon.jar \ + output/build/lib/eclipse-ecj.jar + # remove the cruft we created + %{__rm} output/build/bin/HACK \ + output/build/bin/tomcat-native.tar.gz \ + output/build/lib/HACK +popd +pushd %{packdname}/output/dist/src/webapps/docs/appdev/sample/src +%{__mkdir_p} ../web/WEB-INF/classes +%{javac} -cp ../../../../../../../../output/build/lib/servlet-api.jar -d ../web/WEB-INF/classes mypackage/Hello.java +pushd ../web +%{jar} cf ../../../../../../../../output/build/webapps/docs/appdev/sample/sample.war * +popd +popd + +%install +%{__rm} -rf $RPM_BUILD_ROOT +# build initial path structure +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_bindir} +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sbindir} +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_javadocdir}/%{name} +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_initrddir} +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{appdir} +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{bindir} +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{confdir} +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{confdir}/Catalina/localhost +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{libdir} +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{logdir} +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{homedir} +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{tempdir} +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{workdir} +# move things into place +pushd %{packdname}/output/build + %{__cp} -a bin/*.{jar,xml} ${RPM_BUILD_ROOT}%{bindir} + %{__cp} -a conf/*.{policy,properties,xml} ${RPM_BUILD_ROOT}%{confdir} + %{__cp} -a lib/*.jar ${RPM_BUILD_ROOT}%{libdir} + %{__cp} -a webapps/* ${RPM_BUILD_ROOT}%{appdir} +popd +# remove admin webapp directory since it is not shipped and not available +%{__rm} -r ${RPM_BUILD_ROOT}%{appdir}/ROOT/admin +# javadoc +pushd %{packdname}/output/dist/webapps + %{__cp} -a docs/api/* ${RPM_BUILD_ROOT}%{_javadocdir}/%{name} +popd +%{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ + -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ + -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE1} \ + > ${RPM_BUILD_ROOT}%{confdir}/%{name}.conf +%{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ + -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ + -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE3} \ + > ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/%{name} +%{__install} -m 0644 %{SOURCE2} \ + ${RPM_BUILD_ROOT}%{_initrddir}/%{name} +%{__install} -m 0644 %{SOURCE4} \ + ${RPM_BUILD_ROOT}%{_sbindir}/%{name} +%{__ln_s} %{name} ${RPM_BUILD_ROOT}%{_sbindir}/d%{name} +%{__sed} -e "s|\@\@\@TCLOG\@\@\@|%{logdir}|g" %{SOURCE5} \ + > ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/%{name} +%{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ + -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ + -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE6} \ + > ${RPM_BUILD_ROOT}%{_bindir}/%{name}-digest +%{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ + -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ + -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE7} \ + > ${RPM_BUILD_ROOT}%{_bindir}/%{name}-tool-wrapper +# create jsp and servlet API symlinks +pushd ${RPM_BUILD_ROOT}%{_javadir} + %{__mv} %{name}/jsp-api.jar %{name}-jsp-%{jspspec}-api-%{version}.jar + %{__mv} %{name}/servlet-api.jar \ + %{name}-servlet-%{servletspec}-api-%{version}.jar + %{__ln_s} %{name}-jsp-%{jspspec}-api-%{version}.jar \ + %{name}-jsp-%{jspspec}-api.jar + %{__ln_s} %{name}-servlet-%{servletspec}-api-%{version}.jar \ + %{name}-servlet-%{servletspec}-api.jar +popd +pushd ${RPM_BUILD_ROOT}%{libdir} + # fix up jars to include version number + for i in *.jar; do + j="$(echo $i | %{__sed} -e 's,\.jar$,,')" + %{__mv} ${j}.jar ${j}-%{version}.jar + %{__ln_s} ${j}-%{version}.jar ${j}.jar + done + # symlink JSP and servlet API jars + %{__ln_s} ../%{name}-jsp-%{jspspec}-api-%{version}.jar . + %{__ln_s} ../%{name}-servlet-%{servletspec}-api-%{version}.jar . +popd +pushd ${RPM_BUILD_ROOT}%{bindir} + # fix up jars to include version number + for i in *.jar; do + j="$(echo $i | %{__sed} -e 's,\.jar$,,')" + %{__mv} ${j}.jar ${j}-%{version}.jar + %{__ln_s} ${j}-%{version}.jar ${j}.jar + done +popd +# symlink to the FHS locations where we've installed things +pushd ${RPM_BUILD_ROOT}%{homedir} + %{__ln_s} %{appdir} webapps + %{__ln_s} %{confdir} conf + %{__ln_s} %{libdir} lib + %{__ln_s} %{logdir} logs + %{__ln_s} %{tempdir} temp + %{__ln_s} %{workdir} work +popd + +# install sample webapp +%{__mkdir_p} ${RPM_BUILD_ROOT}%{appdir}/sample +pushd ${RPM_BUILD_ROOT}%{appdir}/sample +%{jar} xf ${RPM_BUILD_ROOT}%{appdir}/docs/appdev/sample/sample.war +popd +%{__rm} ${RPM_BUILD_ROOT}%{appdir}/docs/appdev/sample/sample.war + +%clean +%{__rm} -rf $RPM_BUILD_ROOT + +%pre +# add the tomcat user and group +%{_sbindir}/groupadd -g %{tcuid} -r tomcat 2>/dev/null || : +%{_sbindir}/useradd -c "Apache Tomcat" -u %{tcuid} -g tomcat \ + -s /bin/sh -r -d %{homedir} tomcat 2>/dev/null || : + +%post +# install but don't activate +/sbin/chkconfig --add %{name} + +%post jsp-%{jspspec}-api +%{_sbindir}/update-alternatives --install %{_javadir}/jsp.jar jsp \ + %{_javadir}/%{name}-jsp-%{jspspec}-api.jar 20100 + +%post lib +%{_bindir}/build-jar-repository %{libdir} commons-collections-tomcat5 \ + commons-dbcp-tomcat5 commons-pool-tomcat5 eclipse-ecj 2>&1 + +%post servlet-%{servletspec}-api +%{_sbindir}/update-alternatives --install %{_javadir}/servlet.jar servlet \ + %{_javadir}/%{name}-servlet-%{servletspec}-api.jar 20500 + +%post webapps +%{_bindir}/build-jar-repository %{appdir}/examples/WEB-INF/lib \ + taglibs-core.jar taglibs-standard.jar 2>&1 + +%preun +# clean tempdir and workdir on removal or upgrade +%{__rm} -rf %{workdir}/* %{tempdir}/* +if [ "$1" = "0" ]; then + /sbin/service %{name} stop >/dev/null 2>&1 + /sbin/chkconfig --del %{name} +fi + +%preun lib +if [ "$1" = "0" ]; then + %{__rm} -f %{libdir}/\[commons-collections-tomcat5\].jar \ + %{libdir}/\[commons-dbcp-tomcat5\].jar \ + %{libdir}/\[commons-pool-tomcat5\].jar \ + %{libdir}/\[eclipse-ecj\].jar >/dev/null 2>&1 +fi + +%postun jsp-%{jspspec}-api +if [ "$1" = "0" ]; then + %{_sbindir}/update-alternatives --remove jsp \ + %{_javadir}/%{name}-jsp-%{jspspec}-api.jar +fi + +%postun servlet-%{servletspec}-api +if [ "$1" = "0" ]; then + %{_sbindir}/update-alternatives --remove servlet \ + %{_javadir}/%{name}-servlet-%{servletspec}-api.jar +fi + +%files +%defattr(0644,root,root,0755) +%doc %{packdname}/{LICENSE,NOTICE,RELEASE*} +%attr(0755,root,root) %{_bindir}/%{name}-digest +%attr(0755,root,root) %{_bindir}/%{name}-tool-wrapper +%attr(0755,root,root) %{_sbindir}/d%{name} +%attr(0755,root,root) %{_sbindir}/%{name} +%attr(0775,root,tomcat) %dir %{logdir} +%attr(0755,root,root) %{_initrddir}/%{name} +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} +%config(noreplace) %{_sysconfdir}/sysconfig/%{name} +%attr(0775,root,tomcat) %dir %{appdir} +%dir %{confdir} +%dir %{confdir}/Catalina +%attr(0775,root,tomcat) %dir %{confdir}/Catalina/localhost +%config(noreplace) %{confdir}/%{name}.conf +%config(noreplace) %{confdir}/*.policy +%config(noreplace) %{confdir}/*.properties +%config(noreplace) %{confdir}/context.xml +%config(noreplace) %{confdir}/server.xml +%attr(0660,root,tomcat) %config(noreplace) %{confdir}/tomcat-users.xml +%config(noreplace) %{confdir}/web.xml +%attr(0775,root,tomcat) %dir %{tempdir} +%attr(0775,root,tomcat) %dir %{workdir} +%{homedir} + +%files admin-webapps +%defattr(0644,root,root,0755) +%{appdir}/host-manager +%{appdir}/manager + +%files docs-webapp +%defattr(0644,root,root,0755) +%{appdir}/docs + +%files javadoc +%defattr(0644,root,root,0755) +%{_javadocdir}/%{name} + +%files jsp-%{jspspec}-api +%defattr(0644,root,root,0755) +%{_javadir}/%{name}-jsp*.jar + +%files lib +%defattr(0644,root,root,0755) +%{libdir} + +%files servlet-%{servletspec}-api +%defattr(0644,root,root,0755) +%{_javadir}/%{name}-servlet*.jar + +%files webapps +%defattr(0644,root,root,0755) +%{appdir}/ROOT +%{appdir}/examples +%{appdir}/sample + +%changelog +* Fri Apr 04 2008 David Walluck 0:6.0.16-1jpp.7.fc9 +- version jsp and servlet Provides with their spec versions +- remove Obsoletes/Provides for servletapi6 package as it can co-exist +- check for java-functions existence in wrapper script +- move d%%{name} to %%{name} and create symlink for d%%{name} +- improve status function in initscript +- change license to ASL 2.0 again as per Fedora guidelines + +* Mon Mar 24 2008 David Walluck 0:6.0.16-1jpp.6.fc9 +- remove Requires: tomcat-native +- put back original JPackage Group (except javadoc) and License tags +- add Provides for jsp and servlet +- use ant macro +- build and install sample webapp +- call /sbin/service to stop service on uninstall +- remove references to $RPM_BUILD_DIR +- use copy instead of move to fix short-circuit install build +- remove prebuilt sample.war +- remove Thumbs.db files +- add Requires: java >= 0:1.6.0 + +* Wed Mar 19 2008 David Walluck 0:6.0.16-1jpp.5.fc9 +- explicitly unset CLASSPATH +- explicitly set OPT_JAR_LIST to include ant/ant-trax + +* Tue Mar 18 2008 David Walluck 0:6.0.16-1jpp.4.fc9 +- remove BuildRequires: sed +- remove specific references to icedtea + +* Mon Mar 17 2008 David Walluck 0:6.0.16-1jpp.3.fc9 +- add digest and tool-wrapper scripts +- Requires: tomcat-native + +* Fri Mar 7 2008 David Walluck 0:6.0.16-1jpp.2.fc9 +- use %%{_var} for appdir instead of /srv +- use ${JAVACMD} for java executable in wrapper script +- use built-in status function in initscript where possible +- add missing require on procps for status function +- fix java.library.path setting in %%{_sysconfdir}/sysconfig/%%{name} +- add patch to document webapps in %%{_sysconfdir}/%%{name}/tomcat-users.xml +- remove %%{appdir}/ROOT/admin +- move %%{_bindir}/d%%{name} to %%{_sbindir}/d%%{name} + +* Mon Mar 3 2008 David Walluck 0:6.0.16-1jpp.1.fc9 +- use %%{_initrddir} macro instead of %%{_sysconfdir}/init.d (rhbz #153187) +- fix java.library.path setting in %%{name}.conf (rhbz #253605) +- fix incorrect initscript output (rhbz #380921) +- update initscript (rhbz #247077) +- add logrotate support +- fix strange-permission +- fix %%prep +- replace /var with %%{_var} +- replace %%{_localstatedir} with %%{_var} +- use %%{logdir} where possible +- call build-jar-repository with full path in scriptlets +- remove file-based requires +- build with icedtea and set as the default JAVA_HOME in %%{name}.conf +- fix non-standard-group +- change ecj references to eclipse-ecj +- change Apache Software License 2.0 to ASL 2.0 for rpmlint + +* Fri Feb 8 2008 Jason Corley - 0:6.0.16-1jpp +- update to 6.0.16 + +* Sun Dec 2 2007 Jason Corley - 0:6.0.14-2jpp +- add /etc/tomcat6/Catalina/localhost (Alexander Kurtakov) + +* Tue Aug 14 2007 Jason Corley 0:6.0.14-1jpp +- first JPackage release From 372ace32adc5348fdb3209f43505e0ab713b1d84 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Thu, 10 Jul 2008 19:42:58 +0000 Subject: [PATCH 003/273] fix repotag --- tomcat6.spec | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tomcat6.spec b/tomcat6.spec index 30d4ffb..b596b45 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -51,7 +51,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{macro_version} -Release: 1jpp.7%{?dist} +Release: 1.8%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -86,9 +86,10 @@ Requires: jakarta-commons-logging Requires: java >= 0:1.6.0 Requires: procps Requires: %{name}-lib = %{epoch}:%{version}-%{release} -Requires(post): /sbin/chkconfig -Requires(preun): /sbin/chkconfig -Requires(preun): /sbin/service +Requires(post): chkconfig +Requires(preun): chkconfig +# for /sbin/service +Requires(preun): initscripts %description Tomcat is the servlet container that is used in the official Reference @@ -433,6 +434,9 @@ fi %{appdir}/sample %changelog +* Thu Jul 10 2008 Tom "spot" Callaway - 0:6.0.16-1.8 +- drop repotag + * Fri Apr 04 2008 David Walluck 0:6.0.16-1jpp.7.fc9 - version jsp and servlet Provides with their spec versions - remove Obsoletes/Provides for servletapi6 package as it can co-exist From f2e782275fbe39c454b853254ad9eb075f3f3ee2 Mon Sep 17 00:00:00 2001 From: dwalluck Date: Fri, 5 Sep 2008 17:14:04 +0000 Subject: [PATCH 004/273] - 6.0.18 - Resolves: CVE-2008-1232, CVE-2008-1947, CVE-2008-2370, CVE-2008-2938 - fix definition of java.security.policy with d%%{name} start-security - don't pass $CATALINA_OPTS with d%%{name} stop - redefine tempdir and workdir for tmpwatch workaround - change eclipse-ecj references to ecj --- .cvsignore | 2 +- sources | 2 +- tomcat6-6.0-bootstrap-MANIFEST.MF.patch | 4 +- tomcat6-6.0-tomcat-users-webapp.patch | 4 +- tomcat6-6.0.wrapper | 4 +- tomcat6.spec | 60 ++++++++++++++----------- 6 files changed, 42 insertions(+), 34 deletions(-) diff --git a/.cvsignore b/.cvsignore index 5ae6bfe..6565d01 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -apache-tomcat-6.0.16-src.tar.gz +apache-tomcat-6.0.18-src.tar.gz diff --git a/sources b/sources index 7c10ac4..a967ad7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b2e42e8a875339e655d92975729717e5 apache-tomcat-6.0.16-src.tar.gz +9bdbb1c1d79302c80057a70b18fe6721 apache-tomcat-6.0.18-src.tar.gz diff --git a/tomcat6-6.0-bootstrap-MANIFEST.MF.patch b/tomcat6-6.0-bootstrap-MANIFEST.MF.patch index 9b3ba48..e0651b4 100644 --- a/tomcat6-6.0-bootstrap-MANIFEST.MF.patch +++ b/tomcat6-6.0-bootstrap-MANIFEST.MF.patch @@ -1,5 +1,5 @@ ---- apache-tomcat-6.0.16-src/res/bootstrap.jar.manifest.orig 2007-06-21 11:02:18.000000000 -0400 -+++ apache-tomcat-6.0.16-src/res/bootstrap.jar.manifest 2007-06-21 11:02:26.000000000 -0400 +--- res/bootstrap.jar.manifest.orig 2007-06-21 11:02:18.000000000 -0400 ++++ res/bootstrap.jar.manifest 2007-06-21 11:02:26.000000000 -0400 @@ -1,5 +1,4 @@ Manifest-Version: 1.0 Main-Class: org.apache.catalina.startup.Bootstrap diff --git a/tomcat6-6.0-tomcat-users-webapp.patch b/tomcat6-6.0-tomcat-users-webapp.patch index f2030b2..6e750f9 100644 --- a/tomcat6-6.0-tomcat-users-webapp.patch +++ b/tomcat6-6.0-tomcat-users-webapp.patch @@ -1,5 +1,5 @@ ---- apache-tomcat-6.0.16-src/conf/tomcat-users.xml~ 2008-01-28 17:41:06.000000000 -0500 -+++ apache-tomcat-6.0.16-src/conf/tomcat-users.xml 2008-03-07 19:40:07.000000000 -0500 +--- conf/tomcat-users.xml~ 2008-01-28 17:41:06.000000000 -0500 ++++ conf/tomcat-users.xml 2008-03-07 19:40:07.000000000 -0500 @@ -23,4 +23,9 @@ diff --git a/tomcat6-6.0.wrapper b/tomcat6-6.0.wrapper index 9c02a73..979f0a7 100644 --- a/tomcat6-6.0.wrapper +++ b/tomcat6-6.0.wrapper @@ -48,7 +48,7 @@ elif [ "$1" = "start-security" ]; then -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \ -Djava.io.tmpdir="$CATALINA_TMPDIR" \ -Djava.security.manager \ - -Djava.security.policy="${CATALINA_BASE}/conf/catalina.policy" \ + -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 \ @@ -57,7 +57,7 @@ elif [ "$1" = "start-security" ]; then echo $! > $CATALINA_PID fi elif [ "$1" = "stop" ]; then - ${JAVACMD} $JAVA_OPTS $CATALINA_OPTS \ + ${JAVACMD} $JAVA_OPTS \ -classpath "$CLASSPATH" \ -Dcatalina.base="$CATALINA_BASE" \ -Dcatalina.home="$CATALINA_HOME" \ diff --git a/tomcat6.spec b/tomcat6.spec index b596b45..fb1bcec 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -31,9 +31,9 @@ %define section free %define jspspec 2.1 -%define macro_version 16 %define major_version 6 %define minor_version 0 +%define micro_version 18 %define packdname apache-tomcat-%{version}-src %define servletspec 2.5 %define tcuid 91 @@ -45,13 +45,13 @@ %define homedir %{_datadir}/%{name} %define libdir %{_javadir}/%{name} %define logdir %{_var}/log/%{name} -%define tempdir %{_var}/tmp/%{name} -%define workdir %{_var}/cache/%{name} +%define tempdir %{_var}/cache/%{name}/temp +%define workdir %{_var}/cache/%{name}/work Name: tomcat6 Epoch: 0 -Version: %{major_version}.%{minor_version}.%{macro_version} -Release: 1.8%{?dist} +Version: %{major_version}.%{minor_version}.%{micro_version} +Release: 1.1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -72,18 +72,18 @@ BuildArch: noarch BuildRequires: ant BuildRequires: ant-trax -BuildRequires: eclipse-ecj >= 0:3.2.2 +BuildRequires: ecj BuildRequires: findutils BuildRequires: jakarta-commons-collections BuildRequires: jakarta-commons-daemon -BuildRequires: java-devel >= 0:1.6.0 +BuildRequires: java-1.6.0-devel BuildRequires: jpackage-utils >= 0:1.7.0 BuildRequires: junit Requires(pre): shadow-utils Requires(pre): shadow-utils Requires: jakarta-commons-daemon Requires: jakarta-commons-logging -Requires: java >= 0:1.6.0 +Requires: java-1.6.0 Requires: procps Requires: %{name}-lib = %{epoch}:%{version}-%{release} Requires(post): chkconfig @@ -107,7 +107,7 @@ Summary: The host-manager and manager web applications for Apache Tomcat Requires: %{name} = %{epoch}:%{version}-%{release} %description admin-webapps -The host-manager and manager web applications for Apache Tomcat +The host-manager and manager web applications for Apache Tomcat. %package docs-webapp Group: System Environment/Applications @@ -115,14 +115,14 @@ Summary: The docs web application for Apache Tomcat Requires: %{name} = %{epoch}:%{version}-%{release} %description docs-webapp -The docs web application for Apache Tomcat +The docs web application for Apache Tomcat. %package javadoc Group: Documentation Summary: Javadoc generated documentation for Apache Tomcat %description javadoc -Javadoc generated documentation for Apache Tomcat +Javadoc generated documentation for Apache Tomcat. %package jsp-%{jspspec}-api Group: Internet/WWW/Dynamic Content @@ -134,21 +134,21 @@ Requires(post): chkconfig Requires(postun): chkconfig %description jsp-%{jspspec}-api -Apache Tomcat JSP API implementation classes +Apache Tomcat JSP API implementation classes. %package lib Group: Development/Compilers Summary: Libraries needed to run the Tomcat Web container Requires: %{name}-jsp-%{jspspec}-api = %{epoch}:%{version}-%{release} Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} -Requires(post): eclipse-ecj >= 0:3.2.2 +Requires(post): ecj Requires(post): jakarta-commons-collections-tomcat5 Requires(post): jakarta-commons-dbcp-tomcat5 Requires(post): jakarta-commons-pool-tomcat5 Requires(preun): coreutils %description lib -Libraries needed to run the Tomcat Web container +Libraries needed to run the Tomcat Web container. %package servlet-%{servletspec}-api Group: Internet/WWW/Dynamic Content @@ -160,7 +160,7 @@ Requires(post): chkconfig Requires(postun): chkconfig %description servlet-%{servletspec}-api -Apache Tomcat Servlet API implementation classes +Apache Tomcat Servlet API implementation classes. %package webapps Group: System Environment/Applications @@ -169,15 +169,17 @@ Requires: %{name} = %{epoch}:%{version}-%{release} Requires(post): jakarta-taglibs-standard >= 0:1.1 %description webapps -The ROOT and examples web applications for Apache Tomcat +The ROOT and examples web applications for Apache Tomcat. %prep %setup -q -c -T -a 0 # remove pre-built binaries and windows files -find . \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name "*.gz" -o \ - -name "*.jar" -o -name "*.war" -o -name "*.zip" \) | xargs -t %{__rm} -f +find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name "*.gz" -o \ + -name "*.jar" -o -name "*.war" -o -name "*.zip" \) | xargs -t %{__rm} +pushd %{packdname} %patch0 -p0 %patch1 -p0 +popd %build export CLASSPATH= @@ -193,19 +195,19 @@ pushd %{packdname} -Dcommons-collections.jar="$(build-classpath commons-collections)" \ -Dcommons-daemon.jar="$(build-classpath commons-daemon)" \ -Dcommons-daemon.jsvc.tar.gz="HACK" \ - -Djasper-jdt.jar="$(build-classpath eclipse-ecj)" \ - -Djdt.jar="$(build-classpath eclipse-ecj)" \ + -Djasper-jdt.jar="$(build-classpath ecj)" \ + -Djdt.jar="$(build-classpath ecj)" \ -Dtomcat-dbcp.jar="HACK" \ -Dtomcat-native.tar.gz="HACK" \ -Dversion="%{version}" \ - -Dversion.build="%{macro_version}" + -Dversion.build="%{micro_version}" # javadoc generation %{ant} -f dist.xml dist-prepare %{ant} -f dist.xml dist-source %{ant} -f dist.xml dist-javadoc # remove some jars that we'll replace with symlinks later %{__rm} output/build/bin/commons-daemon.jar \ - output/build/lib/eclipse-ecj.jar + output/build/lib/ecj.jar # remove the cruft we created %{__rm} output/build/bin/HACK \ output/build/bin/tomcat-native.tar.gz \ @@ -244,8 +246,6 @@ pushd %{packdname}/output/build %{__cp} -a lib/*.jar ${RPM_BUILD_ROOT}%{libdir} %{__cp} -a webapps/* ${RPM_BUILD_ROOT}%{appdir} popd -# remove admin webapp directory since it is not shipped and not available -%{__rm} -r ${RPM_BUILD_ROOT}%{appdir}/ROOT/admin # javadoc pushd %{packdname}/output/dist/webapps %{__cp} -a docs/api/* ${RPM_BUILD_ROOT}%{_javadocdir}/%{name} @@ -338,7 +338,7 @@ popd %post lib %{_bindir}/build-jar-repository %{libdir} commons-collections-tomcat5 \ - commons-dbcp-tomcat5 commons-pool-tomcat5 eclipse-ecj 2>&1 + commons-dbcp-tomcat5 commons-pool-tomcat5 ecj 2>&1 %post servlet-%{servletspec}-api %{_sbindir}/update-alternatives --install %{_javadir}/servlet.jar servlet \ @@ -361,7 +361,7 @@ if [ "$1" = "0" ]; then %{__rm} -f %{libdir}/\[commons-collections-tomcat5\].jar \ %{libdir}/\[commons-dbcp-tomcat5\].jar \ %{libdir}/\[commons-pool-tomcat5\].jar \ - %{libdir}/\[eclipse-ecj\].jar >/dev/null 2>&1 + %{libdir}/\[ecj\].jar >/dev/null 2>&1 fi %postun jsp-%{jspspec}-api @@ -434,6 +434,14 @@ fi %{appdir}/sample %changelog +* Tue Aug 26 2008 David Walluck 0:6.0.18-1.1 +- 6.0.18 +- Resolves: CVE-2008-1232, CVE-2008-1947, CVE-2008-2370, CVE-2008-2938 +- fix definition of java.security.policy with d%%{name} start-security +- don't pass $CATALINA_OPTS with d%%{name} stop +- redefine tempdir and workdir for tmpwatch workaround +- change eclipse-ecj references to ecj + * Thu Jul 10 2008 Tom "spot" Callaway - 0:6.0.16-1.8 - drop repotag From 41ff5cd14d1efbcc9a9be2f64ae2186a680f6c2f Mon Sep 17 00:00:00 2001 From: dwalluck Date: Mon, 13 Oct 2008 20:15:33 +0000 Subject: [PATCH 005/273] - use lsb_release instead of lsb-release to get the distributor 6.0.18-5 - fix initscript messages on Mandriva Linux - fix help message in initscript 6.0.18-4 - redefine %%_initrddir for FHS-compliance - make initscript LSB-complaint 6.0.18-3 - fix status in initscript 6.0.18-2 - remove initscripts and /sbin/service requirement - call initscript directly without using /sbin/service - require /sbin/chkconfig instead of chkconfig - remove chkconfig requirement from packages that don't require it --- tomcat6-6.0.init | 58 +++++++++++++++++++++++++++++++++--------------- tomcat6.spec | 44 +++++++++++++++++++++++++----------- 2 files changed, 71 insertions(+), 31 deletions(-) diff --git a/tomcat6-6.0.init b/tomcat6-6.0.init index 1d3ee42..930c0fc 100644 --- a/tomcat6-6.0.init +++ b/tomcat6-6.0.init @@ -18,8 +18,16 @@ # - heavily rewritten by Deepak Bhole and Jason Corley # -# Source function library. -. /etc/rc.d/init.d/functions +## Source function library. +#. /etc/rc.d/init.d/functions +# 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 @@ -137,9 +145,12 @@ function start() { if [ -f "/var/lock/subsys/${NAME}" ] ; then if [ -f "/var/run/${NAME}.pid" ]; then read kpid < /var/run/${NAME}.pid - if checkpid $kpid 2>&1; then - echo_success - echo +# if checkpid $kpid 2>&1; then + if [ -d "/proc/${kpid}" ]; then + log_success_msg + if [ "$DISTRIB_ID" = "MandrivaLinux" ]; then + echo + fi return 0 fi fi @@ -169,12 +180,14 @@ function start() { fi RETVAL="$?" if [ "$RETVAL" -eq 0 ]; then - echo_success + log_success_msg touch /var/lock/subsys/${NAME} else - echo_failure + log_failure_msg + fi + if [ "$DISTRIB_ID" = "MandrivaLinux" ]; then + echo fi - echo return $RETVAL } @@ -203,16 +216,18 @@ function stop() { fi kill -9 $kpid fi - echo_success + log_success_msg fi rm -f /var/lock/subsys/${NAME} /var/run/${NAME}.pid else - echo_failure + log_failure_msg fi else - echo_success + log_success_msg + fi + if [ "$DISTRIB_ID" = "MandrivaLinux" ]; then + echo fi - echo return $RETVAL } @@ -245,13 +260,20 @@ case "$1" in ;; status) if [ -f "/var/run/${NAME}.pid" ]; then - status ${NAME} - RETVAL="$?" +# status ${NAME} +# RETVAL="$?" + read kpid < /var/run/${NAME}.pid + if [ -d "/proc/${kpid}" ]; then + echo "${NAME} (pid ${kpid}) is running..." + RETVAL="0" + fi else - pid="$(/usr/bin/pgrep -d , -u tomcat -G tomcat java)" + pid="$(/usr/bin/pgrep -d , -u ${TOMCAT_USER} -G ${TOMCAT_USER} java)" if [ -z "$pid" ]; then - status ${NAME} - RETVAL="$?" +# status ${NAME} +# RETVAL="$?" + echo "${NAME} is stopped" + RETVAL="3" else echo "${NAME} (pid $pid) is running..." RETVAL="0" @@ -262,7 +284,7 @@ case "$1" in ${TOMCAT_SCRIPT} version ;; *) - echo -n "Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status|version}" + echo "Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status|version}" RETVAL="2" esac diff --git a/tomcat6.spec b/tomcat6.spec index fb1bcec..32564f4 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -47,11 +47,12 @@ %define logdir %{_var}/log/%{name} %define tempdir %{_var}/cache/%{name}/temp %define workdir %{_var}/cache/%{name}/work +%define _initrddir %{_sysconfdir}/init.d Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1.1%{?dist} +Release: 6.1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -76,20 +77,20 @@ BuildRequires: ecj BuildRequires: findutils BuildRequires: jakarta-commons-collections BuildRequires: jakarta-commons-daemon -BuildRequires: java-1.6.0-devel +BuildRequires: java-devel BuildRequires: jpackage-utils >= 0:1.7.0 BuildRequires: junit Requires(pre): shadow-utils Requires(pre): shadow-utils Requires: jakarta-commons-daemon Requires: jakarta-commons-logging -Requires: java-1.6.0 +Requires: java Requires: procps Requires: %{name}-lib = %{epoch}:%{version}-%{release} -Requires(post): chkconfig -Requires(preun): chkconfig -# for /sbin/service -Requires(preun): initscripts +Requires(post): /sbin/chkconfig +Requires(preun): /sbin/chkconfig +Requires(post): /lib/lsb/init-functions +Requires(preun): /lib/lsb/init-functions %description Tomcat is the servlet container that is used in the official Reference @@ -130,8 +131,6 @@ Summary: Apache Tomcat JSP API implementation classes Provides: jsp = %{jspspec} Provides: jsp21 Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} -Requires(post): chkconfig -Requires(postun): chkconfig %description jsp-%{jspspec}-api Apache Tomcat JSP API implementation classes. @@ -142,6 +141,7 @@ Summary: Libraries needed to run the Tomcat Web container Requires: %{name}-jsp-%{jspspec}-api = %{epoch}:%{version}-%{release} Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} Requires(post): ecj +Requires(post): %{_javadir}/ecj.jar Requires(post): jakarta-commons-collections-tomcat5 Requires(post): jakarta-commons-dbcp-tomcat5 Requires(post): jakarta-commons-pool-tomcat5 @@ -156,8 +156,6 @@ Summary: Apache Tomcat Servlet API implementation classes Provides: servlet = %{servletspec} Provides: servlet6 Provides: servlet25 -Requires(post): chkconfig -Requires(postun): chkconfig %description servlet-%{servletspec}-api Apache Tomcat Servlet API implementation classes. @@ -352,7 +350,7 @@ popd # clean tempdir and workdir on removal or upgrade %{__rm} -rf %{workdir}/* %{tempdir}/* if [ "$1" = "0" ]; then - /sbin/service %{name} stop >/dev/null 2>&1 + %{_initrddir}/%{name} stop >/dev/null 2>&1 /sbin/chkconfig --del %{name} fi @@ -434,7 +432,27 @@ fi %{appdir}/sample %changelog -* Tue Aug 26 2008 David Walluck 0:6.0.18-1.1 +* Tue Oct 07 2008 David Walluck 0:6.0.18-6.1 +- use lsb_release instead of lsb-release to get the distributor + +* Tue Oct 07 2008 David Walluck 0:6.0.18-5 +- fix initscript messages on Mandriva Linux +- fix help message in initscript + +* Wed Oct 01 2008 David Walluck 0:6.0.18-4 +- redefine %%_initrddir for FHS-compliance +- make initscript LSB-complaint + +* Fri Sep 26 2008 David Walluck 0:6.0.18-3 +- fix status in initscript + +* Thu Sep 25 2008 David Walluck 0:6.0.18-2 +- remove initscripts and /sbin/service requirement +- call initscript directly without using /sbin/service +- require /sbin/chkconfig instead of chkconfig +- remove chkconfig requirement from packages that don't require it + +* Tue Aug 26 2008 David Walluck 0:6.0.18-1 - 6.0.18 - Resolves: CVE-2008-1232, CVE-2008-1947, CVE-2008-2370, CVE-2008-2938 - fix definition of java.security.policy with d%%{name} start-security From a2e53886a12ad7564c508764e0bbc7d691698bc9 Mon Sep 17 00:00:00 2001 From: dwalluck Date: Mon, 13 Oct 2008 20:37:31 +0000 Subject: [PATCH 006/273] - use Fedora-specific changes to force java 1.6.0 --- tomcat6-6.0.conf | 2 +- tomcat6.spec | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tomcat6-6.0.conf b/tomcat6-6.0.conf index dae17f6..668f81a 100644 --- a/tomcat6-6.0.conf +++ b/tomcat6-6.0.conf @@ -9,7 +9,7 @@ # # Where your java installation lives -#JAVA_HOME="/usr/lib/jvm/java" +JAVA_HOME="/usr/lib/jvm/java-1.6.0" # Where your tomcat installation lives CATALINA_BASE="@@@TCHOME@@@" diff --git a/tomcat6.spec b/tomcat6.spec index 32564f4..aaf38f7 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -52,7 +52,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 6.1%{?dist} +Release: 6.2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -77,14 +77,14 @@ BuildRequires: ecj BuildRequires: findutils BuildRequires: jakarta-commons-collections BuildRequires: jakarta-commons-daemon -BuildRequires: java-devel +BuildRequires: java-1.6.0-devel BuildRequires: jpackage-utils >= 0:1.7.0 BuildRequires: junit Requires(pre): shadow-utils Requires(pre): shadow-utils Requires: jakarta-commons-daemon Requires: jakarta-commons-logging -Requires: java +Requires: java-1.6.0 Requires: procps Requires: %{name}-lib = %{epoch}:%{version}-%{release} Requires(post): /sbin/chkconfig @@ -432,6 +432,9 @@ fi %{appdir}/sample %changelog +* Mon Oct 13 2008 David Walluck 0:6.0.18-6.2 +- use Fedora-specific changes to force java 1.6.0 + * Tue Oct 07 2008 David Walluck 0:6.0.18-6.1 - use lsb_release instead of lsb-release to get the distributor From 75f506cc0116c081bb606b2a4f52bc926a048bc9 Mon Sep 17 00:00:00 2001 From: dwalluck Date: Tue, 2 Dec 2008 16:26:49 +0000 Subject: [PATCH 007/273] - build 0:6.0.18-8 for Fedora --- tomcat6.spec | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/tomcat6.spec b/tomcat6.spec index aaf38f7..2a79b8e 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -39,20 +39,22 @@ %define tcuid 91 # FHS 2.3 compliant tree structure - http://www.pathname.com/fhs/2.3/ -%define appdir %{_var}/lib/%{name}/webapps +%define basedir %{_var}/lib/%{name} +%define appdir %{basedir}/webapps %define bindir %{_datadir}/%{name}/bin %define confdir %{_sysconfdir}/%{name} %define homedir %{_datadir}/%{name} %define libdir %{_javadir}/%{name} %define logdir %{_var}/log/%{name} -%define tempdir %{_var}/cache/%{name}/temp -%define workdir %{_var}/cache/%{name}/work +%define cachedir %{_var}/cache/%{name} +%define tempdir %{cachedir}/temp +%define workdir %{cachedir}/work %define _initrddir %{_sysconfdir}/init.d Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 6.2%{?dist} +Release: 8.1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -131,6 +133,8 @@ Summary: Apache Tomcat JSP API implementation classes Provides: jsp = %{jspspec} Provides: jsp21 Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} +Requires(post): %{_sbindir}/update-alternatives +Requires(postun): %{_sbindir}/update-alternatives %description jsp-%{jspspec}-api Apache Tomcat JSP API implementation classes. @@ -156,6 +160,8 @@ Summary: Apache Tomcat Servlet API implementation classes Provides: servlet = %{servletspec} Provides: servlet6 Provides: servlet25 +Requires(post): %{_sbindir}/update-alternatives +Requires(postun): %{_sbindir}/update-alternatives %description servlet-%{servletspec}-api Apache Tomcat Servlet API implementation classes. @@ -385,6 +391,7 @@ fi %attr(0755,root,root) %{_initrddir}/%{name} %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %config(noreplace) %{_sysconfdir}/sysconfig/%{name} +%dir %{basedir} %attr(0775,root,tomcat) %dir %{appdir} %dir %{confdir} %dir %{confdir}/Catalina @@ -396,6 +403,7 @@ fi %config(noreplace) %{confdir}/server.xml %attr(0660,root,tomcat) %config(noreplace) %{confdir}/tomcat-users.xml %config(noreplace) %{confdir}/web.xml +%attr(0775,root,tomcat) %dir %{cachedir} %attr(0775,root,tomcat) %dir %{tempdir} %attr(0775,root,tomcat) %dir %{workdir} %{homedir} @@ -432,10 +440,16 @@ fi %{appdir}/sample %changelog -* Mon Oct 13 2008 David Walluck 0:6.0.18-6.2 -- use Fedora-specific changes to force java 1.6.0 +* Tue Dec 02 2008 David Walluck 0:6.0.18-8.1 +- build for Fedora -* Tue Oct 07 2008 David Walluck 0:6.0.18-6.1 +* Tue Dec 02 2008 David Walluck 0:6.0.18-8 +- fix directory ownership + +* Thu Nov 13 2008 David Walluck 0:6.0.18-7 +- add Requires for update-alternatives + +* Tue Oct 07 2008 David Walluck 0:6.0.18-6 - use lsb_release instead of lsb-release to get the distributor * Tue Oct 07 2008 David Walluck 0:6.0.18-5 From 94f127f90a278f1a4259798118d6da79cabbea2a Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 25 Feb 2009 21:17:27 +0000 Subject: [PATCH 008/273] - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild --- tomcat6.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tomcat6.spec b/tomcat6.spec index 2a79b8e..c776460 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -54,7 +54,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 8.1%{?dist} +Release: 9.1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -440,6 +440,9 @@ fi %{appdir}/sample %changelog +* Wed Feb 25 2009 Fedora Release Engineering - 0:6.0.18-9.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + * Tue Dec 02 2008 David Walluck 0:6.0.18-8.1 - build for Fedora From f999669ccb45265d815f783001864652e64fc652 Mon Sep 17 00:00:00 2001 From: Alexander Kurtakov Date: Wed, 1 Apr 2009 20:29:13 +0000 Subject: [PATCH 009/273] Add OSGi manifest for servlet-api. --- servlet-api-OSGi-MANIFEST.MF | 10 ++++++++++ tomcat6.spec | 12 +++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 servlet-api-OSGi-MANIFEST.MF diff --git a/servlet-api-OSGi-MANIFEST.MF b/servlet-api-OSGi-MANIFEST.MF new file mode 100644 index 0000000..957cb38 --- /dev/null +++ b/servlet-api-OSGi-MANIFEST.MF @@ -0,0 +1,10 @@ +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: 2.5.0.v200806031605 +Bundle-Vendor: %bundleProvider +Export-Package: javax.servlet;version="2.5",javax.servlet.http;version + ="2.5",javax.servlet.resources;version="2.5" diff --git a/tomcat6.spec b/tomcat6.spec index c776460..3b5f1e7 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -54,7 +54,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 9.1%{?dist} +Release: 9.2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -68,6 +68,7 @@ Source4: %{name}-%{major_version}.%{minor_version}.wrapper Source5: %{name}-%{major_version}.%{minor_version}.logrotate Source6: %{name}-%{major_version}.%{minor_version}-digest.script Source7: %{name}-%{major_version}.%{minor_version}-tool-wrapper.script +Source8: servlet-api-OSGi-MANIFEST.MF Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root @@ -225,6 +226,12 @@ pushd ../web popd popd +# inject OSGi manifests +mkdir -p META-INF +cp -p %{SOURCE8} META-INF/MANIFEST.MF +touch META-INF/MANIFEST.MF +zip -u %{packdname}/output/build/lib/servlet-api.jar META-INF/MANIFEST.MF + %install %{__rm} -rf $RPM_BUILD_ROOT # build initial path structure @@ -440,6 +447,9 @@ fi %{appdir}/sample %changelog +* Wed Apr 1 2009 akurtakov 0:6.0.18-9.2 +- Add OSGi manifest for servlet-api. + * Wed Feb 25 2009 Fedora Release Engineering - 0:6.0.18-9.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild From e486acaad48c113ddb41f51a93ff652ec82dd9cc Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Mon, 27 Jul 2009 06:05:36 +0000 Subject: [PATCH 010/273] - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild --- tomcat6.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tomcat6.spec b/tomcat6.spec index 3b5f1e7..61c8ca9 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -54,7 +54,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 9.2%{?dist} +Release: 10.2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -447,6 +447,9 @@ fi %{appdir}/sample %changelog +* Sun Jul 26 2009 Fedora Release Engineering - 0:6.0.18-10.2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + * Wed Apr 1 2009 akurtakov 0:6.0.18-9.2 - Add OSGi manifest for servlet-api. From 13cd2e8dd257050a2cc0d5dbdc0fa968404cdfdd Mon Sep 17 00:00:00 2001 From: Alexander Kurtakov Date: Mon, 9 Nov 2009 20:31:26 +0000 Subject: [PATCH 011/273] Update to 6.0.20. Fixes CVE-2009-0033,CVE-2009-0580. --- .cvsignore | 1 + sources | 2 +- tomcat6-6.0-bootstrap-MANIFEST.MF.patch | 2 +- tomcat6.spec | 9 ++++++--- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index 6565d01..0d3513f 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1,2 @@ apache-tomcat-6.0.18-src.tar.gz +apache-tomcat-6.0.20-src.tar.gz diff --git a/sources b/sources index a967ad7..2621202 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9bdbb1c1d79302c80057a70b18fe6721 apache-tomcat-6.0.18-src.tar.gz +44f49e7e14028b6a53c3c346bd18c72f apache-tomcat-6.0.20-src.tar.gz diff --git a/tomcat6-6.0-bootstrap-MANIFEST.MF.patch b/tomcat6-6.0-bootstrap-MANIFEST.MF.patch index e0651b4..7b278dc 100644 --- a/tomcat6-6.0-bootstrap-MANIFEST.MF.patch +++ b/tomcat6-6.0-bootstrap-MANIFEST.MF.patch @@ -3,6 +3,6 @@ @@ -1,5 +1,4 @@ Manifest-Version: 1.0 Main-Class: org.apache.catalina.startup.Bootstrap --Class-Path: commons-daemon.jar commons-logging-api.jar tomcat-juli.jar tomcat-coyote.jar +-Class-Path: commons-daemon.jar tomcat-juli.jar tomcat-coyote.jar Specification-Title: Catalina Specification-Version: 6.0 diff --git a/tomcat6.spec b/tomcat6.spec index 61c8ca9..365d0f6 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -33,7 +33,7 @@ %define jspspec 2.1 %define major_version 6 %define minor_version 0 -%define micro_version 18 +%define micro_version 20 %define packdname apache-tomcat-%{version}-src %define servletspec 2.5 %define tcuid 91 @@ -54,7 +54,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 10.2%{?dist} +Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -447,10 +447,13 @@ fi %{appdir}/sample %changelog +* Mon Nov 9 2009 Alexander Kurtakov 0:6.0.20-1 +- Update to 6.0.20. Fixes CVE-2009-0033,CVE-2009-0580. + * Sun Jul 26 2009 Fedora Release Engineering - 0:6.0.18-10.2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild -* Wed Apr 1 2009 akurtakov 0:6.0.18-9.2 +* Wed Apr 1 2009 Alexander Kurtakov 0:6.0.18-9.2 - Add OSGi manifest for servlet-api. * Wed Feb 25 2009 Fedora Release Engineering - 0:6.0.18-9.1 From 107267ad97bbf071d77496383396291e36cbddcf Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 25 Nov 2009 22:52:24 +0000 Subject: [PATCH 012/273] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 35e4a57..e83f26f 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ NAME := tomcat6 SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From 82d42b11449a4e8cb6899832eb3fe081cb2b94d7 Mon Sep 17 00:00:00 2001 From: Alexander Kurtakov Date: Tue, 22 Dec 2009 10:19:57 +0000 Subject: [PATCH 013/273] Drop file requires on /usr/share/java/ecj.jar. --- tomcat6.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tomcat6.spec b/tomcat6.spec index 365d0f6..df04f65 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -54,7 +54,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -146,7 +146,6 @@ Summary: Libraries needed to run the Tomcat Web container Requires: %{name}-jsp-%{jspspec}-api = %{epoch}:%{version}-%{release} Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} Requires(post): ecj -Requires(post): %{_javadir}/ecj.jar Requires(post): jakarta-commons-collections-tomcat5 Requires(post): jakarta-commons-dbcp-tomcat5 Requires(post): jakarta-commons-pool-tomcat5 @@ -447,6 +446,9 @@ fi %{appdir}/sample %changelog +* Tue Dec 22 2009 Alexander Kurtakov 0:6.0.20-2 +- Drop file requires on /usr/share/java/ecj.jar. + * Mon Nov 9 2009 Alexander Kurtakov 0:6.0.20-1 - Update to 6.0.20. Fixes CVE-2009-0033,CVE-2009-0580. From 3652da78293d8c5c1ba37fb1f9c26c8f5f14c395 Mon Sep 17 00:00:00 2001 From: Alexander Kurtakov Date: Mon, 1 Mar 2010 14:44:21 +0000 Subject: [PATCH 014/273] Update to 6.0.24. --- .cvsignore | 1 + jsp-api-OSGi-MANIFEST.MF | 13 +++++++++++++ sources | 2 +- tomcat6-6.0-bootstrap-MANIFEST.MF.patch | 7 ++++--- tomcat6.spec | 15 ++++++++++++--- 5 files changed, 31 insertions(+), 7 deletions(-) create mode 100644 jsp-api-OSGi-MANIFEST.MF diff --git a/.cvsignore b/.cvsignore index 0d3513f..ddf7ad7 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,3 @@ apache-tomcat-6.0.18-src.tar.gz apache-tomcat-6.0.20-src.tar.gz +apache-tomcat-6.0.24-src.tar.gz diff --git a/jsp-api-OSGi-MANIFEST.MF b/jsp-api-OSGi-MANIFEST.MF new file mode 100644 index 0000000..d5ecf7e --- /dev/null +++ b/jsp-api-OSGi-MANIFEST.MF @@ -0,0 +1,13 @@ +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.0,javax.servlet.jsp.el; v + ersion=2.0,javax.servlet.jsp.resources; version=2.0,javax.servlet.jsp + .tagext; version=2.0 +Bundle-Version: 2.0.0.v200806031607 +Bundle-ManifestVersion: 2 +Import-Package: javax.servlet; version=2.4,javax.servlet.http; version + =2.4,javax.servlet.resources; version=2.4 diff --git a/sources b/sources index 2621202..27e80a8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -44f49e7e14028b6a53c3c346bd18c72f apache-tomcat-6.0.20-src.tar.gz +543218290008e0dd6a329f69136973ca apache-tomcat-6.0.24-src.tar.gz diff --git a/tomcat6-6.0-bootstrap-MANIFEST.MF.patch b/tomcat6-6.0-bootstrap-MANIFEST.MF.patch index 7b278dc..85ee302 100644 --- a/tomcat6-6.0-bootstrap-MANIFEST.MF.patch +++ b/tomcat6-6.0-bootstrap-MANIFEST.MF.patch @@ -1,8 +1,9 @@ ---- res/bootstrap.jar.manifest.orig 2007-06-21 11:02:18.000000000 -0400 -+++ res/bootstrap.jar.manifest 2007-06-21 11:02:26.000000000 -0400 +--- res/META-INF/bootstrap.jar.manifest.orig 2010-01-19 15:43:41.000000000 +0200 ++++ res/META-INF/bootstrap.jar.manifest 2010-03-01 12:42:57.993559599 +0200 @@ -1,5 +1,4 @@ Manifest-Version: 1.0 Main-Class: org.apache.catalina.startup.Bootstrap --Class-Path: commons-daemon.jar tomcat-juli.jar tomcat-coyote.jar +-Class-Path: commons-daemon.jar tomcat-juli.jar Specification-Title: Catalina Specification-Version: 6.0 +\ No newline at end of file diff --git a/tomcat6.spec b/tomcat6.spec index df04f65..fe474e0 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -33,7 +33,7 @@ %define jspspec 2.1 %define major_version 6 %define minor_version 0 -%define micro_version 20 +%define micro_version 24 %define packdname apache-tomcat-%{version}-src %define servletspec 2.5 %define tcuid 91 @@ -54,7 +54,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 2%{?dist} +Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -69,6 +69,7 @@ Source5: %{name}-%{major_version}.%{minor_version}.logrotate Source6: %{name}-%{major_version}.%{minor_version}-digest.script Source7: %{name}-%{major_version}.%{minor_version}-tool-wrapper.script Source8: servlet-api-OSGi-MANIFEST.MF +Source9: jsp-api-OSGi-MANIFEST.MF Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root @@ -230,6 +231,9 @@ mkdir -p META-INF cp -p %{SOURCE8} META-INF/MANIFEST.MF touch META-INF/MANIFEST.MF zip -u %{packdname}/output/build/lib/servlet-api.jar META-INF/MANIFEST.MF +cp -p %{SOURCE9} META-INF/MANIFEST.MF +touch META-INF/MANIFEST.MF +zip -u %{packdname}/output/build/lib/jsp-api.jar META-INF/MANIFEST.MF %install %{__rm} -rf $RPM_BUILD_ROOT @@ -355,7 +359,9 @@ popd %{_javadir}/%{name}-servlet-%{servletspec}-api.jar 20500 %post webapps -%{_bindir}/build-jar-repository %{appdir}/examples/WEB-INF/lib \ +# need to use -p here with b-j-r otherwise the examples webapp fails to +# load with a java.io.IOException +%{_bindir}/build-jar-repository -p %{appdir}/examples/WEB-INF/lib \ taglibs-core.jar taglibs-standard.jar 2>&1 %preun @@ -446,6 +452,9 @@ fi %{appdir}/sample %changelog +* Mon Mar 1 2010 Alexander Kurtakov 0:6.0.24-1 +- Update to 6.0.24. + * Tue Dec 22 2009 Alexander Kurtakov 0:6.0.20-2 - Drop file requires on /usr/share/java/ecj.jar. From 2ed3aec4c697aa19531e2b702490050b06ebc097 Mon Sep 17 00:00:00 2001 From: mef Date: Fri, 26 Mar 2010 17:07:32 +0000 Subject: [PATCH 015/273] Add maven metadata and copy tomcat-juli.jar into /usr/share/java/tomcat6 --- tomcat6.spec | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/tomcat6.spec b/tomcat6.spec index fe474e0..5289d57 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -54,7 +54,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -95,6 +95,8 @@ Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig Requires(post): /lib/lsb/init-functions Requires(preun): /lib/lsb/init-functions +Requires(post): jpackage-utils +Requires(postun): jpackage-utils %description Tomcat is the servlet container that is used in the official Reference @@ -258,6 +260,8 @@ pushd %{packdname}/output/build %{__cp} -a bin/*.{jar,xml} ${RPM_BUILD_ROOT}%{bindir} %{__cp} -a conf/*.{policy,properties,xml} ${RPM_BUILD_ROOT}%{confdir} %{__cp} -a lib/*.jar ${RPM_BUILD_ROOT}%{libdir} + # Put the juli jar under /usr/share/java/ too + %{__cp} -a bin/tomcat-juli*.jar ${RPM_BUILD_ROOT}%{libdir} %{__cp} -a webapps/* ${RPM_BUILD_ROOT}%{appdir} popd # javadoc @@ -333,6 +337,43 @@ pushd ${RPM_BUILD_ROOT}%{appdir}/sample popd %{__rm} ${RPM_BUILD_ROOT}%{appdir}/docs/appdev/sample/sample.war +# Install the maven metadata +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_mavenpomdir} +pushd %{packdname}/output/dist/src/res/maven +for file in *.pom; do + base=`basename $file .pom` + # Some POMs don't actually have corresponding jar files in the current RPM + if [ $base != 'dbcp' -a $base != 'juli-adapters' -a $base != 'juli-extras' ] + then + sed -i 's/@MAVEN.DEPLOY.VERSION@/%{version}/g' $file + %{__cp} -a $file ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-%{name}-$file + # Some jar files have tomcat6 prepended and some don't, and some have their + # canonical home outside of the tomcat6 subdirectory + jppdir="JPP/%{name}" + if [ $base = 'coyote' -o $base = 'jsp-api' -o $base = 'servlet-api' ]; then + jpp="%{name}-$base" + jppdir="JPP" + else + if [ $base = 'tribes' ]; then + jpp=catalina-$base + else + if [ $base = 'juli' -o $base = 'coyote' ]; then + jpp=tomcat-$base + else + jpp=$base + fi + fi + fi + + if [ $base = 'jasper-jdt' ]; then + %add_to_maven_depmap org.apache.tomcat $base %{version} JPP ecj 3.4.2 + else + %add_to_maven_depmap org.apache.tomcat $base %{version} $jppdir $jpp %{version} + fi + fi +done + + %clean %{__rm} -rf $RPM_BUILD_ROOT @@ -345,6 +386,7 @@ popd %post # install but don't activate /sbin/chkconfig --add %{name} +%update_maven_depmap %post jsp-%{jspspec}-api %{_sbindir}/update-alternatives --install %{_javadir}/jsp.jar jsp \ @@ -380,6 +422,9 @@ if [ "$1" = "0" ]; then %{libdir}/\[ecj\].jar >/dev/null 2>&1 fi +%postun +%update_maven_depmap + %postun jsp-%{jspspec}-api if [ "$1" = "0" ]; then %{_sbindir}/update-alternatives --remove jsp \ @@ -419,6 +464,10 @@ fi %attr(0775,root,tomcat) %dir %{tempdir} %attr(0775,root,tomcat) %dir %{workdir} %{homedir} +%{_mavendepmapfragdir}/* +%{_mavenpomdir}/*.pom +# Exclude the POMs that are in sub-packages +%exclude %{_mavenpomdir}/*api* %files admin-webapps %defattr(0644,root,root,0755) @@ -436,6 +485,7 @@ fi %files jsp-%{jspspec}-api %defattr(0644,root,root,0755) %{_javadir}/%{name}-jsp*.jar +%{_mavenpomdir}/JPP-%{name}-jsp-api.pom %files lib %defattr(0644,root,root,0755) @@ -444,6 +494,7 @@ fi %files servlet-%{servletspec}-api %defattr(0644,root,root,0755) %{_javadir}/%{name}-servlet*.jar +%{_mavenpomdir}/JPP-%{name}-servlet-api.pom %files webapps %defattr(0644,root,root,0755) @@ -452,6 +503,10 @@ fi %{appdir}/sample %changelog +* Fri Mar 26 2010 Mary Ellen Foster 0:6.0.24-2 +- Add maven POMs and metadata +- Copy tomcat6-juli into /usr/share/java/tomcat6 + * Mon Mar 1 2010 Alexander Kurtakov 0:6.0.24-1 - Update to 6.0.24. From 850f211a6449b2a5b331ecb93c936b9930c4af6e Mon Sep 17 00:00:00 2001 From: mef Date: Fri, 26 Mar 2010 17:12:38 +0000 Subject: [PATCH 016/273] Linking tomcat-juli instead of copying --- tomcat6.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tomcat6.spec b/tomcat6.spec index 5289d57..1f76dda 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -260,8 +260,6 @@ pushd %{packdname}/output/build %{__cp} -a bin/*.{jar,xml} ${RPM_BUILD_ROOT}%{bindir} %{__cp} -a conf/*.{policy,properties,xml} ${RPM_BUILD_ROOT}%{confdir} %{__cp} -a lib/*.jar ${RPM_BUILD_ROOT}%{libdir} - # Put the juli jar under /usr/share/java/ too - %{__cp} -a bin/tomcat-juli*.jar ${RPM_BUILD_ROOT}%{libdir} %{__cp} -a webapps/* ${RPM_BUILD_ROOT}%{appdir} popd # javadoc @@ -337,6 +335,11 @@ pushd ${RPM_BUILD_ROOT}%{appdir}/sample popd %{__rm} ${RPM_BUILD_ROOT}%{appdir}/docs/appdev/sample/sample.war +# Link the juli jars into /usr/share/java/tomcat6 +pushd ${RPM_BUILD_ROOT}%{libdir} +%{__ln_s} %{bindir}/tomcat-juli* . +popd + # Install the maven metadata %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_mavenpomdir} pushd %{packdname}/output/dist/src/res/maven @@ -505,7 +508,7 @@ fi %changelog * Fri Mar 26 2010 Mary Ellen Foster 0:6.0.24-2 - Add maven POMs and metadata -- Copy tomcat6-juli into /usr/share/java/tomcat6 +- Link tomcat6-juli into /usr/share/java/tomcat6 * Mon Mar 1 2010 Alexander Kurtakov 0:6.0.24-1 - Update to 6.0.24. From 2cdbc959211863f63e3b1d45d6baf1d554c266f0 Mon Sep 17 00:00:00 2001 From: Dave Knox Date: Mon, 29 Mar 2010 17:59:55 +0000 Subject: [PATCH 017/273] Source0 updated to tomcat 6.0.26. OSGi manifests for servlet-api and jsp-api. --- .cvsignore | 1 + sources | 1 + tomcat6.spec | 78 +++++++++++++++++++++++++++++++--------------------- 3 files changed, 48 insertions(+), 32 deletions(-) diff --git a/.cvsignore b/.cvsignore index ddf7ad7..15a50ac 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,3 +1,4 @@ apache-tomcat-6.0.18-src.tar.gz apache-tomcat-6.0.20-src.tar.gz apache-tomcat-6.0.24-src.tar.gz +apache-tomcat-6.0.26-src.tar.gz diff --git a/sources b/sources index 27e80a8..ddb95cc 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ 543218290008e0dd6a329f69136973ca apache-tomcat-6.0.24-src.tar.gz +83b46d9346bcbc517dbf6f1cac9ef8b1 apache-tomcat-6.0.26-src.tar.gz diff --git a/tomcat6.spec b/tomcat6.spec index 1f76dda..6835cb2 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -28,28 +28,28 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -%define section free +%global section free -%define jspspec 2.1 -%define major_version 6 -%define minor_version 0 -%define micro_version 24 -%define packdname apache-tomcat-%{version}-src -%define servletspec 2.5 -%define tcuid 91 +%global jspspec 2.1 +%global major_version 6 +%global minor_version 0 +%global micro_version 26 +%global packdname apache-tomcat-%{version}-src +%global servletspec 2.5 +%global tcuid 91 # FHS 2.3 compliant tree structure - http://www.pathname.com/fhs/2.3/ -%define basedir %{_var}/lib/%{name} -%define appdir %{basedir}/webapps -%define bindir %{_datadir}/%{name}/bin -%define confdir %{_sysconfdir}/%{name} -%define homedir %{_datadir}/%{name} -%define libdir %{_javadir}/%{name} -%define logdir %{_var}/log/%{name} -%define cachedir %{_var}/cache/%{name} -%define tempdir %{cachedir}/temp -%define workdir %{cachedir}/work -%define _initrddir %{_sysconfdir}/init.d +%global basedir %{_var}/lib/%{name} +%global appdir %{basedir}/webapps +%global bindir %{_datadir}/%{name}/bin +%global confdir %{_sysconfdir}/%{name} +%global homedir %{_datadir}/%{name} +%global libdir %{_javadir}/%{name} +%global logdir %{_var}/log/%{name} +%global cachedir %{_var}/cache/%{name} +%global tempdir %{cachedir}/temp +%global workdir %{cachedir}/work +%global _initrddir %{_sysconfdir}/init.d Name: tomcat6 Epoch: 0 @@ -255,8 +255,16 @@ zip -u %{packdname}/output/build/lib/jsp-api.jar META-INF/MANIFEST.MF %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{homedir} %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{tempdir} %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{workdir} + # move things into place +# First copy supporting libs to tomcat lib pushd %{packdname}/output/build + %{_bindir}/build-jar-repository lib commons-collections-tomcat5 \ + commons-dbcp-tomcat5 commons-pool-tomcat5 ecj 2>&1 +# need to use -p here with b-j-r otherwise the examples webapp fails to +# load with a java.io.IOException + %{_bindir}/build-jar-repository -p webapps/examples/WEB-INF/lib \ + taglibs-core.jar taglibs-standard.jar 2>&1 %{__cp} -a bin/*.{jar,xml} ${RPM_BUILD_ROOT}%{bindir} %{__cp} -a conf/*.{policy,properties,xml} ${RPM_BUILD_ROOT}%{confdir} %{__cp} -a lib/*.jar ${RPM_BUILD_ROOT}%{libdir} @@ -395,19 +403,19 @@ done %{_sbindir}/update-alternatives --install %{_javadir}/jsp.jar jsp \ %{_javadir}/%{name}-jsp-%{jspspec}-api.jar 20100 -%post lib -%{_bindir}/build-jar-repository %{libdir} commons-collections-tomcat5 \ - commons-dbcp-tomcat5 commons-pool-tomcat5 ecj 2>&1 +#%post lib +#%{_bindir}/build-jar-repository %{libdir} commons-collections-tomcat5 \ +# commons-dbcp-tomcat5 commons-pool-tomcat5 ecj 2>&1 %post servlet-%{servletspec}-api %{_sbindir}/update-alternatives --install %{_javadir}/servlet.jar servlet \ %{_javadir}/%{name}-servlet-%{servletspec}-api.jar 20500 -%post webapps +#%post webapps # need to use -p here with b-j-r otherwise the examples webapp fails to # load with a java.io.IOException -%{_bindir}/build-jar-repository -p %{appdir}/examples/WEB-INF/lib \ - taglibs-core.jar taglibs-standard.jar 2>&1 +#%{_bindir}/build-jar-repository -p %{appdir}/examples/WEB-INF/lib \ +# taglibs-core.jar taglibs-standard.jar 2>&1 %preun # clean tempdir and workdir on removal or upgrade @@ -417,13 +425,13 @@ if [ "$1" = "0" ]; then /sbin/chkconfig --del %{name} fi -%preun lib -if [ "$1" = "0" ]; then - %{__rm} -f %{libdir}/\[commons-collections-tomcat5\].jar \ - %{libdir}/\[commons-dbcp-tomcat5\].jar \ - %{libdir}/\[commons-pool-tomcat5\].jar \ - %{libdir}/\[ecj\].jar >/dev/null 2>&1 -fi +#%preun lib +#if [ "$1" = "0" ]; then +# %{__rm} -f %{libdir}/\[commons-collections-tomcat5\].jar \ +# %{libdir}/\[commons-dbcp-tomcat5\].jar \ +# %{libdir}/\[commons-pool-tomcat5\].jar \ +# %{libdir}/\[ecj\].jar >/dev/null 2>&1 +#fi %postun %update_maven_depmap @@ -506,6 +514,12 @@ fi %{appdir}/sample %changelog +* Mon Mar 29 2010 David Knox 0:6.0.26-2 +- Update source to tomcat6.0.26 +- Bugzilla 572357 - Please retest. +- OSGi manifests for servlet-api and jsp-api + + * Fri Mar 26 2010 Mary Ellen Foster 0:6.0.24-2 - Add maven POMs and metadata - Link tomcat6-juli into /usr/share/java/tomcat6 From ec08b5cb2f55e363df39b82f405ad1df9529c068 Mon Sep 17 00:00:00 2001 From: Dave Knox Date: Tue, 6 Apr 2010 17:03:31 +0000 Subject: [PATCH 018/273] Had to rework this patch because of changes to the manifest between 6.0.24 and 6.0.26. --- tomcat6-6.0-bootstrap-MANIFEST.MF.patch | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tomcat6-6.0-bootstrap-MANIFEST.MF.patch b/tomcat6-6.0-bootstrap-MANIFEST.MF.patch index 85ee302..ac94aac 100644 --- a/tomcat6-6.0-bootstrap-MANIFEST.MF.patch +++ b/tomcat6-6.0-bootstrap-MANIFEST.MF.patch @@ -1,9 +1,9 @@ ---- res/META-INF/bootstrap.jar.manifest.orig 2010-01-19 15:43:41.000000000 +0200 -+++ res/META-INF/bootstrap.jar.manifest 2010-03-01 12:42:57.993559599 +0200 -@@ -1,5 +1,4 @@ +--- res/META-INF/bootstrap.jar.manifest.orig 2010-04-06 10:11:09.000000000 -0600 ++++ res/META-INF/bootstrap.jar.manifest 2010-04-06 10:45:56.000000000 -0600 +@@ -1,6 +1,5 @@ Manifest-Version: 1.0 Main-Class: org.apache.catalina.startup.Bootstrap -Class-Path: commons-daemon.jar tomcat-juli.jar - Specification-Title: Catalina - Specification-Version: 6.0 -\ No newline at end of file + Specification-Title: Apache Tomcat Bootstrap + Specification-Version: @VERSION_MAJOR_MINOR@ + Specification-Vendor: Apache Software Foundation From d71f0340a9b0c7870cba754246f1acb5ec954dd0 Mon Sep 17 00:00:00 2001 From: Dave Knox Date: Tue, 6 Apr 2010 19:02:40 +0000 Subject: [PATCH 019/273] Adding Requires and BuildRequires for taglibs-standard. --- tomcat6.spec | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/tomcat6.spec b/tomcat6.spec index 6835cb2..2eb8bf0 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -54,7 +54,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 2%{?dist} +Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -80,7 +80,11 @@ BuildRequires: ant-trax BuildRequires: ecj BuildRequires: findutils BuildRequires: jakarta-commons-collections +BuildRequires: jakarta-commons-collections-tomcat5 BuildRequires: jakarta-commons-daemon +BuildRequires: jakarta-commons-dbcp-tomcat5 +BuildRequires: jakarta-commons-pool-tomcat5 +BuildRequires: jakarta-taglibs-standard BuildRequires: java-1.6.0-devel BuildRequires: jpackage-utils >= 0:1.7.0 BuildRequires: junit @@ -148,10 +152,10 @@ Group: Development/Compilers Summary: Libraries needed to run the Tomcat Web container Requires: %{name}-jsp-%{jspspec}-api = %{epoch}:%{version}-%{release} Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} -Requires(post): ecj -Requires(post): jakarta-commons-collections-tomcat5 -Requires(post): jakarta-commons-dbcp-tomcat5 -Requires(post): jakarta-commons-pool-tomcat5 +Requires: ecj +Requires: jakarta-commons-collections-tomcat5 +Requires: jakarta-commons-dbcp-tomcat5 +Requires: jakarta-commons-pool-tomcat5 Requires(preun): coreutils %description lib @@ -173,7 +177,7 @@ Apache Tomcat Servlet API implementation classes. Group: System Environment/Applications Summary: The ROOT and examples web applications for Apache Tomcat Requires: %{name} = %{epoch}:%{version}-%{release} -Requires(post): jakarta-taglibs-standard >= 0:1.1 +Requires: jakarta-taglibs-standard >= 0:1.1 %description webapps The ROOT and examples web applications for Apache Tomcat. @@ -514,7 +518,12 @@ fi %{appdir}/sample %changelog -* Mon Mar 29 2010 David Knox 0:6.0.26-2 +* Tue Apr 06 2010 David Knox 0:6.0.26-1 +- Solved packaging problems involving taglibs-standard +- Solved packaging problems involving jakarta-commons +- Corrected Requires(post) to Requires and checked companion BuildRequires + +* Mon Mar 29 2010 David Knox 0:6.0.26-1 - Update source to tomcat6.0.26 - Bugzilla 572357 - Please retest. - OSGi manifests for servlet-api and jsp-api From 41fbc279fedc9d456dd6bef82af910a7356a43b3 Mon Sep 17 00:00:00 2001 From: Dave Knox Date: Tue, 6 Apr 2010 19:21:45 +0000 Subject: [PATCH 020/273] Incrementing the Release tag to 3 and avoid any confusion about which is the most recent. --- tomcat6.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tomcat6.spec b/tomcat6.spec index 2eb8bf0..ee41815 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -54,7 +54,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 3%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -518,12 +518,16 @@ fi %{appdir}/sample %changelog +* Tue Apr 06 2010 David Knox 0:6.0.26-3 +- Incremented the Release tag to 3 to avoid any confusion about which +- is the most recent + * Tue Apr 06 2010 David Knox 0:6.0.26-1 - Solved packaging problems involving taglibs-standard - Solved packaging problems involving jakarta-commons - Corrected Requires(post) to Requires and checked companion BuildRequires -* Mon Mar 29 2010 David Knox 0:6.0.26-1 +* Mon Mar 29 2010 David Knox 0:6.0.26-2 - Update source to tomcat6.0.26 - Bugzilla 572357 - Please retest. - OSGi manifests for servlet-api and jsp-api From fa747cfad599ae948c275cda9d174a23daf1b84f Mon Sep 17 00:00:00 2001 From: Dave Knox Date: Thu, 8 Apr 2010 23:50:29 +0000 Subject: [PATCH 021/273] Moved build-jar-repository to later in the install process --- tomcat6.spec | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/tomcat6.spec b/tomcat6.spec index ee41815..12aac3e 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -54,7 +54,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 3%{?dist} +Release: 4%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -263,12 +263,6 @@ zip -u %{packdname}/output/build/lib/jsp-api.jar META-INF/MANIFEST.MF # move things into place # First copy supporting libs to tomcat lib pushd %{packdname}/output/build - %{_bindir}/build-jar-repository lib commons-collections-tomcat5 \ - commons-dbcp-tomcat5 commons-pool-tomcat5 ecj 2>&1 -# need to use -p here with b-j-r otherwise the examples webapp fails to -# load with a java.io.IOException - %{_bindir}/build-jar-repository -p webapps/examples/WEB-INF/lib \ - taglibs-core.jar taglibs-standard.jar 2>&1 %{__cp} -a bin/*.{jar,xml} ${RPM_BUILD_ROOT}%{bindir} %{__cp} -a conf/*.{policy,properties,xml} ${RPM_BUILD_ROOT}%{confdir} %{__cp} -a lib/*.jar ${RPM_BUILD_ROOT}%{libdir} @@ -311,6 +305,16 @@ pushd ${RPM_BUILD_ROOT}%{_javadir} %{__ln_s} %{name}-servlet-%{servletspec}-api-%{version}.jar \ %{name}-servlet-%{servletspec}-api.jar popd + +pushd %{packdname}/output/build + %{_bindir}/build-jar-repository lib commons-collections-tomcat5 \ + commons-dbcp-tomcat5 commons-pool-tomcat5 ecj 2>&1 +# need to use -p here with b-j-r otherwise the examples webapp fails to +# load with a java.io.IOException + %{_bindir}/build-jar-repository -p webapps/examples/WEB-INF/lib \ + taglibs-core.jar taglibs-standard.jar 2>&1 +popd + pushd ${RPM_BUILD_ROOT}%{libdir} # fix up jars to include version number for i in *.jar; do @@ -518,6 +522,9 @@ fi %{appdir}/sample %changelog +* Tue Apr 08 2010 David Knox 0:6.0.26-4 +- Moved build-jar-repository to later in the install process. + * Tue Apr 06 2010 David Knox 0:6.0.26-3 - Incremented the Release tag to 3 to avoid any confusion about which - is the most recent From d2e4841496d051ae61740cfe562800c8a69ff4e8 Mon Sep 17 00:00:00 2001 From: Dave Knox Date: Tue, 29 Jun 2010 21:51:36 +0000 Subject: [PATCH 022/273] Added missing packages. Filled out %%files sections. Fixed directory permissions. --- tomcat6-6.0-log4j.properties | 11 ++ tomcat6.spec | 295 ++++++++++++++++++++++------------- 2 files changed, 200 insertions(+), 106 deletions(-) create mode 100644 tomcat6-6.0-log4j.properties diff --git a/tomcat6-6.0-log4j.properties b/tomcat6-6.0-log4j.properties new file mode 100644 index 0000000..1252a64 --- /dev/null +++ b/tomcat6-6.0-log4j.properties @@ -0,0 +1,11 @@ +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 diff --git a/tomcat6.spec b/tomcat6.spec index 12aac3e..1697745 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -36,6 +36,7 @@ %global micro_version 26 %global packdname apache-tomcat-%{version}-src %global servletspec 2.5 +%global elspec 2.1 %global tcuid 91 # FHS 2.3 compliant tree structure - http://www.pathname.com/fhs/2.3/ @@ -54,7 +55,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 4%{?dist} +Release: 6%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -70,11 +71,11 @@ Source6: %{name}-%{major_version}.%{minor_version}-digest.script Source7: %{name}-%{major_version}.%{minor_version}-tool-wrapper.script Source8: servlet-api-OSGi-MANIFEST.MF Source9: jsp-api-OSGi-MANIFEST.MF +Source10: %{name}-%{major_version}.%{minor_version}-log4j.properties Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildArch: noarch - BuildRequires: ant BuildRequires: ant-trax BuildRequires: ecj @@ -88,10 +89,12 @@ BuildRequires: jakarta-taglibs-standard BuildRequires: java-1.6.0-devel BuildRequires: jpackage-utils >= 0:1.7.0 BuildRequires: junit +BuildRequires: log4j Requires(pre): shadow-utils Requires(pre): shadow-utils Requires: jakarta-commons-daemon Requires: jakarta-commons-logging +Requires: jakarta-commons-collections Requires: java-1.6.0 Requires: procps Requires: %{name}-lib = %{epoch}:%{version}-%{release} @@ -147,11 +150,21 @@ Requires(postun): %{_sbindir}/update-alternatives %description jsp-%{jspspec}-api Apache Tomcat JSP API implementation classes. + +%package log4j +Group: Internet/WWW/Dynamic Content +Summary: Log4j support for Apache Tomcat +Requires: jakarta-commons-logging + +%description log4j +Log4j support for Apache Tomcat + %package lib Group: Development/Compilers Summary: Libraries needed to run the Tomcat Web container Requires: %{name}-jsp-%{jspspec}-api = %{epoch}:%{version}-%{release} Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} +Requires: %{name}-el-%{elspec}-api = %{epoch}:%{version}-%{release} Requires: ecj Requires: jakarta-commons-collections-tomcat5 Requires: jakarta-commons-dbcp-tomcat5 @@ -173,6 +186,17 @@ Requires(postun): %{_sbindir}/update-alternatives %description servlet-%{servletspec}-api Apache Tomcat Servlet API implementation classes. +%package el-%{elspec}-api +Group: Development/Libraries/Java +Summary: Expression Language v1.0 API +Provides: el_1_0_api = %{epoch}:%{version}-%{release} +Provides: el_api = %{elspec} +Requires(post): %{_sbindir}/update-alternatives +Requires(postun): %{_sbindir}/update-alternatives + +%description el-%{elspec}-api +Expression Language 1.0. + %package webapps Group: System Environment/Applications Summary: The ROOT and examples web applications for Apache Tomcat @@ -186,43 +210,45 @@ The ROOT and examples web applications for Apache Tomcat. %setup -q -c -T -a 0 # remove pre-built binaries and windows files find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name "*.gz" -o \ - -name "*.jar" -o -name "*.war" -o -name "*.zip" \) | xargs -t %{__rm} + -name "*.jar" -o -name "*.war" -o -name "*.zip" \) | xargs -t %{__rm} pushd %{packdname} %patch0 -p0 %patch1 -p0 +%{__ln_s} $(build-classpath jakarta-taglibs-core) webapps/examples/WEB-INF/lib/jstl.jar +%{__ln_s} $(build-classpath jakarta-taglibs-standard) webapps/examples/WEB-INF/lib/standard.jar popd %build export CLASSPATH= export OPT_JAR_LIST="ant/ant-trax" pushd %{packdname} - # we don't care about the tarballs and we're going to replace - # tomcat-dbcp.jar with jakarta-commons-{collections,dbcp,pool}-tomcat5.jar - # so just create a dummy file for later removal - touch HACK - # who needs a build.properties file anyway - %{ant} -Dbase.path="." \ - -Dbuild.compiler="modern" \ - -Dcommons-collections.jar="$(build-classpath commons-collections)" \ - -Dcommons-daemon.jar="$(build-classpath commons-daemon)" \ - -Dcommons-daemon.jsvc.tar.gz="HACK" \ - -Djasper-jdt.jar="$(build-classpath ecj)" \ - -Djdt.jar="$(build-classpath ecj)" \ - -Dtomcat-dbcp.jar="HACK" \ - -Dtomcat-native.tar.gz="HACK" \ - -Dversion="%{version}" \ - -Dversion.build="%{micro_version}" - # javadoc generation - %{ant} -f dist.xml dist-prepare - %{ant} -f dist.xml dist-source - %{ant} -f dist.xml dist-javadoc + # we don't care about the tarballs and we're going to replace + # tomcat-dbcp.jar with jakarta-commons-{collections,dbcp,pool}-tomcat5.jar + # so just create a dummy file for later removal + touch HACK + # who needs a build.properties file anyway + %{ant} -Dbase.path="." \ + -Dbuild.compiler="modern" \ + -Dcommons-collections.jar="$(build-classpath commons-collections)" \ + -Dcommons-daemon.jar="$(build-classpath commons-daemon)" \ + -Dcommons-daemon.jsvc.tar.gz="HACK" \ + -Djasper-jdt.jar="$(build-classpath ecj)" \ + -Djdt.jar="$(build-classpath ecj)" \ + -Dtomcat-dbcp.jar="HACK" \ + -Dtomcat-native.tar.gz="HACK" \ + -Dversion="%{version}" \ + -Dversion.build="%{micro_version}" + # javadoc generation + %{ant} -f dist.xml dist-prepare + %{ant} -f dist.xml dist-source + %{ant} -f dist.xml dist-javadoc # remove some jars that we'll replace with symlinks later - %{__rm} output/build/bin/commons-daemon.jar \ - output/build/lib/ecj.jar + %{__rm} output/build/bin/commons-daemon.jar \ + output/build/lib/ecj.jar # remove the cruft we created - %{__rm} output/build/bin/HACK \ - output/build/bin/tomcat-native.tar.gz \ - output/build/lib/HACK + %{__rm} output/build/bin/HACK \ + output/build/bin/tomcat-native.tar.gz \ + output/build/lib/HACK popd pushd %{packdname}/output/dist/src/webapps/docs/appdev/sample/src %{__mkdir_p} ../web/WEB-INF/classes @@ -252,18 +278,19 @@ zip -u %{packdname}/output/build/lib/jsp-api.jar META-INF/MANIFEST.MF %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{appdir} %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{bindir} -%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{confdir} -%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{confdir}/Catalina/localhost +%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{confdir} +%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{confdir}/Catalina/localhost %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{libdir} -%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{logdir} -%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{homedir} -%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{tempdir} -%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{workdir} +%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{logdir} +%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{homedir} +%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{tempdir} +%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{workdir} # move things into place # First copy supporting libs to tomcat lib pushd %{packdname}/output/build %{__cp} -a bin/*.{jar,xml} ${RPM_BUILD_ROOT}%{bindir} + %{__cp} %{SOURCE10} conf/log4j.properties %{__cp} -a conf/*.{policy,properties,xml} ${RPM_BUILD_ROOT}%{confdir} %{__cp} -a lib/*.jar ${RPM_BUILD_ROOT}%{libdir} %{__cp} -a webapps/* ${RPM_BUILD_ROOT}%{appdir} @@ -273,12 +300,12 @@ pushd %{packdname}/output/dist/webapps %{__cp} -a docs/api/* ${RPM_BUILD_ROOT}%{_javadocdir}/%{name} popd %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ - -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ - -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE1} \ + -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ + -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE1} \ > ${RPM_BUILD_ROOT}%{confdir}/%{name}.conf %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ - -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ - -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE3} \ + -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ + -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE3} \ > ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/%{name} %{__install} -m 0644 %{SOURCE2} \ ${RPM_BUILD_ROOT}%{_initrddir}/%{name} @@ -288,22 +315,24 @@ popd %{__sed} -e "s|\@\@\@TCLOG\@\@\@|%{logdir}|g" %{SOURCE5} \ > ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/%{name} %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ - -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ - -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE6} \ + -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ + -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE6} \ > ${RPM_BUILD_ROOT}%{_bindir}/%{name}-digest %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ - -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ - -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE7} \ + -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ + -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE7} \ > ${RPM_BUILD_ROOT}%{_bindir}/%{name}-tool-wrapper # create jsp and servlet API symlinks pushd ${RPM_BUILD_ROOT}%{_javadir} - %{__mv} %{name}/jsp-api.jar %{name}-jsp-%{jspspec}-api-%{version}.jar - %{__mv} %{name}/servlet-api.jar \ - %{name}-servlet-%{servletspec}-api-%{version}.jar - %{__ln_s} %{name}-jsp-%{jspspec}-api-%{version}.jar \ - %{name}-jsp-%{jspspec}-api.jar - %{__ln_s} %{name}-servlet-%{servletspec}-api-%{version}.jar \ - %{name}-servlet-%{servletspec}-api.jar + %{__mv} %{name}/jsp-api.jar %{name}-jsp-%{jspspec}-api-%{version}.jar + %{__mv} %{name}/servlet-api.jar \ + %{name}-servlet-%{servletspec}-api-%{version}.jar + %{__mv} %{name}/el-api.jar %{name}-el-%{elspec}-api-%{version}.jar + %{__ln_s} %{name}-jsp-%{jspspec}-api-%{version}.jar \ + %{name}-jsp-%{jspspec}-api.jar + %{__ln_s} %{name}-servlet-%{servletspec}-api-%{version}.jar \ + %{name}-servlet-%{servletspec}-api.jar + %{__ln_s} %{name}-el-%{elspec}-api-%{version}.jar %{name}-el-%{elspec}-api.jar popd pushd %{packdname}/output/build @@ -316,23 +345,30 @@ pushd %{packdname}/output/build popd pushd ${RPM_BUILD_ROOT}%{libdir} - # fix up jars to include version number - for i in *.jar; do - j="$(echo $i | %{__sed} -e 's,\.jar$,,')" - %{__mv} ${j}.jar ${j}-%{version}.jar - %{__ln_s} ${j}-%{version}.jar ${j}.jar + # fix up jars to include version number + for i in *.jar; do + j="$(echo $i | %{__sed} -e 's,\.jar$,,')" + %{__mv} ${j}.jar ${j}-%{version}.jar + %{__ln_s} ${j}-%{version}.jar ${j}.jar done # symlink JSP and servlet API jars %{__ln_s} ../%{name}-jsp-%{jspspec}-api-%{version}.jar . %{__ln_s} ../%{name}-servlet-%{servletspec}-api-%{version}.jar . + %{__ln_s} ../%{name}-el-%{elspec}-api-%{version}.jar + %{__cp} -p $(build-classpath commons-collections-tomcat5) . + %{__cp} -p $(build-classpath log4j) . + %{__ln_s} log4j log4j-%{version}.jar + %{__ln_s} $(build-classpath commons-dbcp-tomcat5) . + %{__ln_s} $(build-classpath commons-pool-tomcat5) . + %{__ln_s} $(build-classpath ecj) jasper-jdt.jar popd pushd ${RPM_BUILD_ROOT}%{bindir} - # fix up jars to include version number - for i in *.jar; do - j="$(echo $i | %{__sed} -e 's,\.jar$,,')" - %{__mv} ${j}.jar ${j}-%{version}.jar - %{__ln_s} ${j}-%{version}.jar ${j}.jar - done + # fix up jars to include version number + for i in *.jar; do + j="$(echo $i | %{__sed} -e 's,\.jar$,,')" + %{__mv} ${j}.jar ${j}-%{version}.jar + %{__ln_s} ${j}-%{version}.jar ${j}.jar + done popd # symlink to the FHS locations where we've installed things pushd ${RPM_BUILD_ROOT}%{homedir} @@ -360,36 +396,35 @@ popd %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_mavenpomdir} pushd %{packdname}/output/dist/src/res/maven for file in *.pom; do - base=`basename $file .pom` - # Some POMs don't actually have corresponding jar files in the current RPM - if [ $base != 'dbcp' -a $base != 'juli-adapters' -a $base != 'juli-extras' ] - then - sed -i 's/@MAVEN.DEPLOY.VERSION@/%{version}/g' $file - %{__cp} -a $file ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-%{name}-$file - # Some jar files have tomcat6 prepended and some don't, and some have their - # canonical home outside of the tomcat6 subdirectory - jppdir="JPP/%{name}" - if [ $base = 'coyote' -o $base = 'jsp-api' -o $base = 'servlet-api' ]; then - jpp="%{name}-$base" - jppdir="JPP" - else - if [ $base = 'tribes' ]; then - jpp=catalina-$base - else - if [ $base = 'juli' -o $base = 'coyote' ]; then - jpp=tomcat-$base - else - jpp=$base - fi - fi - fi + base=`basename $file .pom` + # Some POMs don't actually have corresponding jar files in the current RPM + if [ $base != 'dbcp' -a $base != 'juli-adapters' -a $base != 'juli-extras' ]; then + sed -i 's/@MAVEN.DEPLOY.VERSION@/%{version}/g' $file + %{__cp} -a $file ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-%{name}-$file + # Some jar files have tomcat6 prepended and some don't, and some have their + # canonical home outside of the tomcat6 subdirectory + jppdir="JPP/%{name}" + if [ $base = 'coyote' -o $base = 'jsp-api' -o $base = 'servlet-api' ]; then + jpp="%{name}-$base" + jppdir="JPP" + else + if [ $base = 'tribes' ]; then + jpp=catalina-$base + else + if [ $base = 'juli' -o $base = 'coyote' ]; then + jpp=tomcat-$base + else + jpp=$base + fi + fi + fi - if [ $base = 'jasper-jdt' ]; then - %add_to_maven_depmap org.apache.tomcat $base %{version} JPP ecj 3.4.2 - else - %add_to_maven_depmap org.apache.tomcat $base %{version} $jppdir $jpp %{version} - fi - fi + if [ $base = 'jasper-jdt' ]; then + %add_to_maven_depmap org.apache.tomcat $base %{version} JPP ecj 3.4.2 + else + %add_to_maven_depmap org.apache.tomcat $base %{version} $jppdir $jpp %{version} + fi + fi done @@ -419,6 +454,10 @@ done %{_sbindir}/update-alternatives --install %{_javadir}/servlet.jar servlet \ %{_javadir}/%{name}-servlet-%{servletspec}-api.jar 20500 +%post el-%{elspec}-api +%{_sbindir}/update-alternatives --install %{_javadir}/el.jar elspec \ + %{_javadir}/%{name}-el-%{elspec}-api.jar 20250 + #%post webapps # need to use -p here with b-j-r otherwise the examples webapp fails to # load with a java.io.IOException @@ -427,7 +466,7 @@ done %preun # clean tempdir and workdir on removal or upgrade -%{__rm} -rf %{workdir}/* %{tempdir}/* +%{__rm} -rf %{workdir} %{tempdir} if [ "$1" = "0" ]; then %{_initrddir}/%{name} stop >/dev/null 2>&1 /sbin/chkconfig --del %{name} @@ -443,6 +482,9 @@ fi %postun %update_maven_depmap +%{__rm} -rf %{appdir} +%{__rm} -rf %{confdir} +%{__rm} -rf %{libdir} %postun jsp-%{jspspec}-api if [ "$1" = "0" ]; then @@ -456,40 +498,61 @@ if [ "$1" = "0" ]; then %{_javadir}/%{name}-servlet-%{servletspec}-api.jar fi +%postun el-%{elspec}-api +if [ "$1" = "0" ]; then + %{_sbindir}/update-alternatives --remove elspec \ + %{_javadir}/%{name}-el-%{elspec}-api.jar +el-%{elspec}-api.jar +fi + %files -%defattr(0644,root,root,0755) +%defattr(0644,root,tomcat,0775) %doc %{packdname}/{LICENSE,NOTICE,RELEASE*} %attr(0755,root,root) %{_bindir}/%{name}-digest %attr(0755,root,root) %{_bindir}/%{name}-tool-wrapper %attr(0755,root,root) %{_sbindir}/d%{name} %attr(0755,root,root) %{_sbindir}/%{name} -%attr(0775,root,tomcat) %dir %{logdir} %attr(0755,root,root) %{_initrddir}/%{name} %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %config(noreplace) %{_sysconfdir}/sysconfig/%{name} -%dir %{basedir} -%attr(0775,root,tomcat) %dir %{appdir} -%dir %{confdir} -%dir %{confdir}/Catalina -%attr(0775,root,tomcat) %dir %{confdir}/Catalina/localhost +%attr(0765,root,tomcat) %dir %{basedir} +%attr(0765,root,tomcat) %dir %{appdir} +%attr(0765,root,tomcat) %dir %{confdir} +%attr(0765,root,tomcat) %dir %{confdir}/Catalina +#%dir %{confdir} +#%dir %{confdir}/Catalina +%attr(0765,root,tomcat) %dir %{confdir}/Catalina/localhost %config(noreplace) %{confdir}/%{name}.conf %config(noreplace) %{confdir}/*.policy %config(noreplace) %{confdir}/*.properties %config(noreplace) %{confdir}/context.xml %config(noreplace) %{confdir}/server.xml -%attr(0660,root,tomcat) %config(noreplace) %{confdir}/tomcat-users.xml +%attr(0664,root,tomcat) %config(noreplace) %{confdir}/tomcat-users.xml %config(noreplace) %{confdir}/web.xml -%attr(0775,root,tomcat) %dir %{cachedir} -%attr(0775,root,tomcat) %dir %{tempdir} -%attr(0775,root,tomcat) %dir %{workdir} -%{homedir} +%attr(0765,tomcat,root) %dir %{cachedir} +%attr(0765,tomcat,root) %dir %{tempdir} +%attr(0765,tomcat,root) %dir %{workdir} +%attr(0765,root,tomcat) %dir %{logdir} +%dir %{homedir} +#%attr(0765,root,tomcat) %{homedir}/conf +%{bindir}/bootstrap-%{version}.jar +%{bindir}/bootstrap.jar +%{bindir}/catalina-tasks.xml +%{bindir}/tomcat-juli-%{version}.jar +%{bindir}/tomcat-juli.jar +%{homedir}/lib +%{homedir}/temp +%{homedir}/webapps +%{homedir}/work +%{homedir}/logs +%{homedir}/conf %{_mavendepmapfragdir}/* %{_mavenpomdir}/*.pom # Exclude the POMs that are in sub-packages %exclude %{_mavenpomdir}/*api* %files admin-webapps -%defattr(0644,root,root,0755) +%defattr(0644,root,root,0775) %{appdir}/host-manager %{appdir}/manager @@ -503,25 +566,45 @@ fi %files jsp-%{jspspec}-api %defattr(0644,root,root,0755) -%{_javadir}/%{name}-jsp*.jar +%{_javadir}/%{name}-jsp-%{jspspec}*.jar %{_mavenpomdir}/JPP-%{name}-jsp-api.pom +%files log4j +%defattr(0644,root,tomcat,0775) +%config(noreplace) %{confdir}/log4j.properties +%{libdir}/log4j.jar +%{libdir}/log4j-%{version}.jar + %files lib %defattr(0644,root,root,0755) %{libdir} %files servlet-%{servletspec}-api %defattr(0644,root,root,0755) -%{_javadir}/%{name}-servlet*.jar +%{_javadir}/%{name}-servlet-%{servletspec}*.jar %{_mavenpomdir}/JPP-%{name}-servlet-api.pom +%files el-%{elspec}-api +%defattr(0665,root,root,0755) +%{_javadir}/%{name}-el-%{elspec}-api-%{version}.jar +%{_javadir}/%{name}-el-%{elspec}-api.jar +%{_javadir}/%{name}/%{name}-el-%{elspec}-api-%{version}.jar +%{_mavenpomdir}/JPP-%{name}-el-api.pom + %files webapps -%defattr(0644,root,root,0755) +%defattr(0644,root,tomcat,0775) %{appdir}/ROOT %{appdir}/examples %{appdir}/sample %changelog +* Tue Jun 29 2010 David Knox 0:6.0.26-6 +- Completed package and file sections. Added el-spec. Fixed +- directory permission problems. + +* Thu May 6 2010 David Knox 0:6.0.26-5 +- Working on 589145. Tomcat can't find java compiler for java. + * Tue Apr 08 2010 David Knox 0:6.0.26-4 - Moved build-jar-repository to later in the install process. From 431c79f46fd315b3399bc659b12a91939a8aa18b Mon Sep 17 00:00:00 2001 From: Dave Knox Date: Thu, 1 Jul 2010 18:04:47 +0000 Subject: [PATCH 023/273] Made elspec the standard for elspec %post and %postun --- tomcat6.spec | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tomcat6.spec b/tomcat6.spec index 1697745..a36b2c4 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -55,7 +55,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 6%{?dist} +Release: 7%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -455,7 +455,7 @@ done %{_javadir}/%{name}-servlet-%{servletspec}-api.jar 20500 %post el-%{elspec}-api -%{_sbindir}/update-alternatives --install %{_javadir}/el.jar elspec \ +%{_sbindir}/update-alternatives --install %{_javadir}/elspec.jar elspec \ %{_javadir}/%{name}-el-%{elspec}-api.jar 20250 #%post webapps @@ -502,7 +502,6 @@ fi if [ "$1" = "0" ]; then %{_sbindir}/update-alternatives --remove elspec \ %{_javadir}/%{name}-el-%{elspec}-api.jar -el-%{elspec}-api.jar fi %files @@ -598,6 +597,9 @@ fi %{appdir}/sample %changelog +* Thu Jul 01 2010 David Knox 0:6.0.26-7 +- Made elspec the standard for elspec %post and %postun + * Tue Jun 29 2010 David Knox 0:6.0.26-6 - Completed package and file sections. Added el-spec. Fixed - directory permission problems. From 186acca061cd9d6c390704cc7b26a6a75eed9e90 Mon Sep 17 00:00:00 2001 From: Dave Knox Date: Thu, 1 Jul 2010 20:55:12 +0000 Subject: [PATCH 024/273] corrections for LSB compliance --- tomcat6-6.0.init | 91 +++++++++++++++++++++++++++++++----------------- 1 file changed, 59 insertions(+), 32 deletions(-) diff --git a/tomcat6-6.0.init b/tomcat6-6.0.init index 930c0fc..e4e9517 100644 --- a/tomcat6-6.0.init +++ b/tomcat6-6.0.init @@ -141,8 +141,13 @@ function parseOptions() { # See how we were called. function start() { - echo -n "Starting ${TOMCAT_PROG}: " - if [ -f "/var/lock/subsys/${NAME}" ] ; then + + echo -n "Starting ${TOMCAT_PROG}: " + if [ "$RETVAL" != "0" ]; then + log_failure_msg + return + fi + if [ -f "/var/lock/subsys/${NAME}" ]; then if [ -f "/var/run/${NAME}.pid" ]; then read kpid < /var/run/${NAME}.pid # if checkpid $kpid 2>&1; then @@ -157,11 +162,15 @@ function start() { fi # fix permissions on the log and pid files export CATALINA_PID="/var/run/${NAME}.pid" - touch $CATALINA_PID - chown ${TOMCAT_USER}:${TOMCAT_USER} $CATALINA_PID - touch $TOMCAT_LOG - chown ${TOMCAT_USER}:${TOMCAT_USER} $TOMCAT_LOG - if [ "$CATALINA_HOME" != "/usr/share/tomcat6" ]; then + touch $CATALINA_PID 2>&1 || RETVAL="4" + if [ "$RETVAL" -eq "0" -a "$?" -eq "0" ]; then + chown ${TOMCAT_USER}:${TOMCAT_USER} $CATALINA_PID + fi + [ "$RETVAL" -eq "0" ] && touch $TOMCAT_LOG 2>&1 || RETVAL="4" + if [ "$RETVAL" -eq "0" -a "$?" -eq "0" ]; then + chown ${TOMCAT_USER}:${TOMCAT_USER} $TOMCAT_LOG + fi + if [ "$CATALINA_HOME" != "/usr/share/tomcat6" -a "$RETVAL" -eq "0" ]; then # Create a tomcat directory if it doesn't exist makeHomeDir # If CATALINA_HOME doesn't exist modify port number so that @@ -172,37 +181,37 @@ function start() { ${CATALINA_HOME}/conf/server.xml fi parseOptions - if [ "$SECURITY_MANAGER" = "true" ]; then + if [ "$RETVAL" -eq "0" -a "$SECURITY_MANAGER" = "true" ]; then $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} start-security" \ - >> $TOMCAT_LOG 2>&1 + >> $TOMCAT_LOG 2>&1 || RETVAL="4" else - $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} start" >> $TOMCAT_LOG 2>&1 + + [ "$RETVAL" -eq "0" ] && $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} start" >> $TOMCAT_LOG 2>&1 || RETVAL="4" fi - RETVAL="$?" - if [ "$RETVAL" -eq 0 ]; then + if [ "$RETVAL" -eq "0" ]; then log_success_msg touch /var/lock/subsys/${NAME} else - log_failure_msg + log_failure_msg "Error code ${RETVAL}" fi if [ "$DISTRIB_ID" = "MandrivaLinux" ]; then echo fi - return $RETVAL } function stop() { - RETVAL="0" echo -n "Stopping ${TOMCAT_PROG}: " if [ -f "/var/lock/subsys/${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" ] || \ + parseOptions + if [ "$RETVAL" -eq "0" ]; then + touch /var/lock/subsys/${NAME} 2>&1 || RETVAL="4" + [ "$RETVAL" -eq "0" ] && $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} stop" >> $TOMCAT_LOG 2>&1 || RETVAL="4" + fi + 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" @@ -212,7 +221,7 @@ function stop() { done if [ "$count" -gt "$SHUTDOWN_WAIT" ]; then if [ "$SHUTDOWN_VERBOSE" = "true" ]; then - echo "killing processes which didn't stop after $SHUTDOWN_WAIT seconds" + log_warning_msg "killing processes which did not stop after ${SHUTDOWN_WAIT} seconds" fi kill -9 $kpid fi @@ -221,17 +230,25 @@ function stop() { rm -f /var/lock/subsys/${NAME} /var/run/${NAME}.pid else log_failure_msg + RETVAL="4" fi else log_success_msg + RETVAL="0" fi if [ "$DISTRIB_ID" = "MandrivaLinux" ]; then echo fi - return $RETVAL +} + +function usage() +{ + echo "Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status|version}" + RETVAL="2" } # See how we were called. +RETVAL="0" case "$1" in start) start @@ -260,32 +277,42 @@ case "$1" in ;; status) if [ -f "/var/run/${NAME}.pid" ]; then -# status ${NAME} -# RETVAL="$?" read kpid < /var/run/${NAME}.pid if [ -d "/proc/${kpid}" ]; then - echo "${NAME} (pid ${kpid}) is running..." + log_success_msg "${NAME} (pid ${kpid}) is running..." RETVAL="0" + else +# The pid file exists but the process is not running + log_warning_msg "PID file exists, but process is not running" + RETVAL="1" fi else pid="$(/usr/bin/pgrep -d , -u ${TOMCAT_USER} -G ${TOMCAT_USER} java)" if [ -z "$pid" ]; then # status ${NAME} # RETVAL="$?" - echo "${NAME} is stopped" + log_success_msg "${NAME} is stopped" RETVAL="3" else - echo "${NAME} (pid $pid) is running..." + log_success_msg "${NAME} (pid $pid) is running..." RETVAL="0" fi fi + if [ -f /var/lock/subsys/${NAME} ]; then + pid="$(/usr/bin/pgrep -d , -u ${TOMCAT_USER} -G ${TOMCAT_USER} java)" +# The lockfile exists but the process is not running + if [ -z "$pid" ]; then + log_failure_msg "${NAME} lockfile exists but process is not running" + RETVAL="2" + fi + fi ;; version) ${TOMCAT_SCRIPT} version ;; *) - echo "Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status|version}" - RETVAL="2" + usage + ;; esac exit $RETVAL From 5a3944a0f0bfcf6a8928b03095da8d13d50a6dba Mon Sep 17 00:00:00 2001 From: Dave Knox Date: Thu, 1 Jul 2010 20:57:57 +0000 Subject: [PATCH 025/273] corrections for LSB compliance. Increment tag. --- tomcat6.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tomcat6.spec b/tomcat6.spec index a36b2c4..6b7559a 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -55,7 +55,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 7%{?dist} +Release: 8%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -597,8 +597,11 @@ fi %{appdir}/sample %changelog +* Fri Jul 02 2010 David Knox 0:6.0.26-8 +- LSB initscript compliance + * Thu Jul 01 2010 David Knox 0:6.0.26-7 -- Made elspec the standard for elspec %post and %postun +- Made elspec the standard for elspec %post and %postun. * Tue Jun 29 2010 David Knox 0:6.0.26-6 - Completed package and file sections. Added el-spec. Fixed From 429e8523eb83f206c43d5fb0dc3e643c899c6f46 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 14:19:54 +0000 Subject: [PATCH 026/273] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- 2 files changed, 21 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index e83f26f..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: tomcat6 -# $Id$ -NAME := tomcat6 -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) From e4a58621528a50e8e2ae5d6feb865a1a09146487 Mon Sep 17 00:00:00 2001 From: david knox Date: Wed, 29 Sep 2010 14:31:33 -0600 Subject: [PATCH 027/273] Resolves rhbz575341 --- tomcat6-6.0.wrapper | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tomcat6-6.0.wrapper b/tomcat6-6.0.wrapper index 979f0a7..0e95331 100644 --- a/tomcat6-6.0.wrapper +++ b/tomcat6-6.0.wrapper @@ -8,13 +8,13 @@ else fi # Get the tomcat config (use this for environment specific settings) -if [ -z "${TOMCAT_CFG}" ]; then - TOMCAT_CFG="/etc/tomcat6/tomcat6.conf" -fi +#if [ -z "${TOMCAT_CFG}" ]; then +# TOMCAT_CFG="/etc/tomcat6/tomcat6.conf" +#fi -if [ -r "$TOMCAT_CFG" ]; then - . $TOMCAT_CFG -fi +#if [ -r "$TOMCAT_CFG" ]; then +# . $TOMCAT_CFG +#fi set_javacmd From fdab6896a4105dada0259928f8fbd747aa8e2e24 Mon Sep 17 00:00:00 2001 From: david knox Date: Wed, 29 Sep 2010 14:50:41 -0600 Subject: [PATCH 028/273] Changelog entry for rhbz#575341 --- tomcat6.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tomcat6.spec b/tomcat6.spec index 6b7559a..f3a0241 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -597,6 +597,10 @@ fi %{appdir}/sample %changelog +* Fri Jul 02 2010 David Knox 0:6.0.26-9 +- Resolves rhbz#575341 - Additionally created instances of Tomcat +- are broken + * Fri Jul 02 2010 David Knox 0:6.0.26-8 - LSB initscript compliance From 0d7ab63ad4478086850184086b62ad521de71f9d Mon Sep 17 00:00:00 2001 From: david knox Date: Wed, 29 Sep 2010 15:27:41 -0600 Subject: [PATCH 029/273] Change the release this time. --- tomcat6.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tomcat6.spec b/tomcat6.spec index f3a0241..bab33f6 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -55,7 +55,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 8%{?dist} +Release: 9%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons From 1bb926e7cc43b48aafd7309cbd64eaa25f372d13 Mon Sep 17 00:00:00 2001 From: david knox Date: Tue, 5 Oct 2010 09:34:55 -0600 Subject: [PATCH 030/273] adding cve-2010-2227.patch and resolving rhbz#575341 --- tomcat6-6.0-CVE-2010-2227.patch | 138 ++++++++++++++++++++++++++++++++ tomcat6.spec | 14 +++- 2 files changed, 148 insertions(+), 4 deletions(-) create mode 100644 tomcat6-6.0-CVE-2010-2227.patch diff --git a/tomcat6-6.0-CVE-2010-2227.patch b/tomcat6-6.0-CVE-2010-2227.patch new file mode 100644 index 0000000..4f00c89 --- /dev/null +++ b/tomcat6-6.0-CVE-2010-2227.patch @@ -0,0 +1,138 @@ +--- java/org/apache/coyote/http11/Http11AprProcessor.java.orig 2010-07-12 11:52:05.981133000 -0400 ++++ java/org/apache/coyote/http11/Http11AprProcessor.java 2010-07-12 11:59:39.205913000 -0400 +@@ -78,6 +78,12 @@ + protected static StringManager sm = + StringManager.getManager(Constants.Package); + ++ /** ++ * Tracks how many internal filters are in the filter library so they ++ * are skipped whe looking for pluggable filters ++ */ ++ private int pluggableFilterIndex = Integer.MAX_VALUE; ++ + + // ----------------------------------------------------------- Constructors + +@@ -1736,6 +1742,8 @@ + //inputBuffer.addFilter(new GzipInputFilter()); + outputBuffer.addFilter(new GzipOutputFilter()); + ++ pluggableFilterIndex = inputBuffer.filterLibrary.length; ++ + } + + +@@ -1754,7 +1762,7 @@ + (inputFilters[Constants.CHUNKED_FILTER]); + contentDelimitation = true; + } else { +- for (int i = 2; i < inputFilters.length; i++) { ++ for (int i = pluggableFilterIndex; i < inputFilters.length; i++) { + if (inputFilters[i].getEncodingName() + .toString().equals(encodingName)) { + inputBuffer.addActiveFilter(inputFilters[i]); +--- java/org/apache/coyote/http11/Http11NioProcessor.java.orig 2010-07-12 12:00:05.720580000 -0400 ++++ java/org/apache/coyote/http11/Http11NioProcessor.java 2010-07-12 12:19:36.465303000 -0400 +@@ -81,6 +81,12 @@ + */ + protected SSLSupport sslSupport; + ++ /** ++ * Tracks how many internal filters are in the filter library so they ++ * are skipped whe looking for pluggable filters ++ */ ++ private int pluggableFilterIndex = Integer.MAX_VALUE; ++ + // ----------------------------------------------------------- Constructors + + +@@ -1763,6 +1769,8 @@ + //inputBuffer.addFilter(new GzipInputFilter()); + outputBuffer.addFilter(new GzipOutputFilter()); + ++ pluggableFilterIndex = inputBuffer.filterLibrary.length; ++ + } + + +@@ -1781,7 +1789,7 @@ + (inputFilters[Constants.CHUNKED_FILTER]); + contentDelimitation = true; + } else { +- for (int i = 2; i < inputFilters.length; i++) { ++ for (int i = pluggableFilterIndex; i < inputFilters.length; i++) { + if (inputFilters[i].getEncodingName() + .toString().equals(encodingName)) { + inputBuffer.addActiveFilter(inputFilters[i]); +--- java/org/apache/coyote/http11/Http11Processor.java.orig 2010-07-12 12:20:42.784634000 -0400 ++++ java/org/apache/coyote/http11/Http11Processor.java 2010-07-12 12:23:14.996732000 -0400 +@@ -76,6 +76,11 @@ + protected static boolean isSecurityEnabled = + org.apache.coyote.Constants.IS_SECURITY_ENABLED; + ++ /** ++ * Tracks how many internal filters are in the filter library so they ++ * are skipped whe looking for pluggable filters ++ */ ++ private int pluggableFilterIndex = Integer.MAX_VALUE; + // ------------------------------------------------------------ Constructor + + +@@ -1642,6 +1647,7 @@ + //inputBuffer.addFilter(new GzipInputFilter()); + outputBuffer.addFilter(new GzipOutputFilter()); + ++ pluggableFilterIndex = inputBuffer.filterLibrary.length; + } + + +@@ -1660,7 +1666,7 @@ + (inputFilters[Constants.CHUNKED_FILTER]); + contentDelimitation = true; + } else { +- for (int i = 2; i < inputFilters.length; i++) { ++ for (int i = pluggableFilterIndex; i < inputFilters.length; i++) { + if (inputFilters[i].getEncodingName() + .toString().equals(encodingName)) { + inputBuffer.addActiveFilter(inputFilters[i]); +--- java/org/apache/coyote/http11/filters/BufferedInputFilter.java.orig 2010-01-19 08:43:40.000000000 -0500 ++++ java/org/apache/coyote/http11/filters/BufferedInputFilter.java 2010-07-12 13:00:50.374586000 -0400 +@@ -102,10 +102,14 @@ + } + + public void recycle() { +- if (buffered.getBuffer().length > 65536) { +- buffered = null; +- } else { +- buffered.recycle(); ++ if (buffered != null) ++ { ++ if (buffered.getBuffer().length > 65536) ++ { ++ buffered = null; ++ } else { ++ buffered.recycle(); ++ } + } + tempRead.recycle(); + hasRead = false; + +--- webapps/docs/changelog.xml.orig 2010-07-12 16:08:24.000000000 -0600 ++++ webapps/docs/changelog.xml 2010-07-12 16:12:43.000000000 -0600 +@@ -40,6 +40,16 @@ + Correct TCK failures with security manager caused by the original fix + for 47774. (markt) + ++ ++ Arange filter logic (jgclere) ++ Several flaws in the handling of the 'Transfer-Encoding' header ++ were found that prevented the recycling of a buffer. A remote ++ attacker could trigger this flaw which would cause subsequent ++ requests to fail and/or information to leak between requests. ++ This flaw is mitigated if Tomcat is behind a reverse proxy ++ (such as Apache httpd 2.2) as the proxy should reject the ++ invalid transfer encoding header. ++ + + + diff --git a/tomcat6.spec b/tomcat6.spec index bab33f6..2b79798 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -55,7 +55,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 9%{?dist} +Release: 10%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -74,10 +74,11 @@ Source9: jsp-api-OSGi-MANIFEST.MF Source10: %{name}-%{major_version}.%{minor_version}-log4j.properties Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch +Patch2: %{name}-%{major_version}.%{minor_version}-CVE-2010-2227.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildArch: noarch BuildRequires: ant -BuildRequires: ant-trax +BuildRequires: ant-nodeps BuildRequires: ecj BuildRequires: findutils BuildRequires: jakarta-commons-collections @@ -214,13 +215,14 @@ find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name " pushd %{packdname} %patch0 -p0 %patch1 -p0 +%patch2 -p0 %{__ln_s} $(build-classpath jakarta-taglibs-core) webapps/examples/WEB-INF/lib/jstl.jar %{__ln_s} $(build-classpath jakarta-taglibs-standard) webapps/examples/WEB-INF/lib/standard.jar popd %build export CLASSPATH= -export OPT_JAR_LIST="ant/ant-trax" +export OPT_JAR_LIST="ant/ant-nodeps" pushd %{packdname} # we don't care about the tarballs and we're going to replace # tomcat-dbcp.jar with jakarta-commons-{collections,dbcp,pool}-tomcat5.jar @@ -597,7 +599,11 @@ fi %{appdir}/sample %changelog -* Fri Jul 02 2010 David Knox 0:6.0.26-9 +* Mon Oct 04 2010 David Knox 0:6.0.26-10 +- ant-nodeps is breaking the build. Put ant-nodeps on the +- OPT_JAR_LIST + +* Fri Oct 01 2010 David Knox 0:6.0.26-9 - Resolves rhbz#575341 - Additionally created instances of Tomcat - are broken From 5fa3921fdca7da13ee4307e5d66e08e48309fd6b Mon Sep 17 00:00:00 2001 From: david knox Date: Thu, 7 Oct 2010 12:25:50 -0600 Subject: [PATCH 031/273] resolves: rhbz#640837 --- tomcat6-6.0.init | 4 ++-- tomcat6.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tomcat6-6.0.init b/tomcat6-6.0.init index e4e9517..4123f1c 100644 --- a/tomcat6-6.0.init +++ b/tomcat6-6.0.init @@ -38,9 +38,9 @@ fi # For SELinux we need to use 'runuser' not 'su' if [ -x "/sbin/runuser" ]; then - SU="/sbin/runuser" + SU="/sbin/runuser -s /bin/sh" else - SU="/bin/su" + SU="/bin/su -s /bin/sh" fi # Get the tomcat config (use this for environment specific settings) diff --git a/tomcat6.spec b/tomcat6.spec index 2b79798..06c1f98 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -55,7 +55,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 10%{?dist} +Release: 11%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -599,6 +599,9 @@ fi %{appdir}/sample %changelog +* Thu Oct 07 2010 David Knox 0L6.0.26-11 +- resolves rhbz#640837 - tomcat user requires login shell + * Mon Oct 04 2010 David Knox 0:6.0.26-10 - ant-nodeps is breaking the build. Put ant-nodeps on the - OPT_JAR_LIST From e7dc4cc4dac9414424e8e5794c9ee3e096759097 Mon Sep 17 00:00:00 2001 From: david knox Date: Thu, 14 Oct 2010 14:11:37 -0600 Subject: [PATCH 032/273] - Resolves rhbz#640686 - Upgrade of tomcat6 wipes out directories WARNING - Back up all files that need to be preserved before package update or uninstall - WARNING - Resolves: rhbz#638914 - update versions of commons-collections, commons-dbcp, and commons-pool --- tomcat6.spec | 46 +++++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/tomcat6.spec b/tomcat6.spec index 06c1f98..92b8a67 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -82,10 +82,12 @@ BuildRequires: ant-nodeps BuildRequires: ecj BuildRequires: findutils BuildRequires: jakarta-commons-collections -BuildRequires: jakarta-commons-collections-tomcat5 +#BuildRequires: jakarta-commons-collections-tomcat5 BuildRequires: jakarta-commons-daemon -BuildRequires: jakarta-commons-dbcp-tomcat5 -BuildRequires: jakarta-commons-pool-tomcat5 +#BuildRequires: jakarta-commons-dbcp-tomcat5 +#BuildRequires: jakarta-commons-pool-tomcat5 +BuildRequires: jakarta-commons-dbcp +BuildRequires: jakarta-commons-pool BuildRequires: jakarta-taglibs-standard BuildRequires: java-1.6.0-devel BuildRequires: jpackage-utils >= 0:1.7.0 @@ -167,9 +169,9 @@ Requires: %{name}-jsp-%{jspspec}-api = %{epoch}:%{version}-%{release} Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} Requires: %{name}-el-%{elspec}-api = %{epoch}:%{version}-%{release} Requires: ecj -Requires: jakarta-commons-collections-tomcat5 -Requires: jakarta-commons-dbcp-tomcat5 -Requires: jakarta-commons-pool-tomcat5 +Requires: jakarta-commons-collections +Requires: jakarta-commons-dbcp +Requires: jakarta-commons-pool Requires(preun): coreutils %description lib @@ -231,12 +233,12 @@ pushd %{packdname} # who needs a build.properties file anyway %{ant} -Dbase.path="." \ -Dbuild.compiler="modern" \ - -Dcommons-collections.jar="$(build-classpath commons-collections)" \ + -Dcommons-collections.jar="$(build-classpath jakarata-commons-collections)" \ -Dcommons-daemon.jar="$(build-classpath commons-daemon)" \ -Dcommons-daemon.jsvc.tar.gz="HACK" \ -Djasper-jdt.jar="$(build-classpath ecj)" \ -Djdt.jar="$(build-classpath ecj)" \ - -Dtomcat-dbcp.jar="HACK" \ + -Dtomcat-dbcp.jar="$(build-classpath commons-dbcp)" \ -Dtomcat-native.tar.gz="HACK" \ -Dversion="%{version}" \ -Dversion.build="%{micro_version}" @@ -249,8 +251,7 @@ pushd %{packdname} output/build/lib/ecj.jar # remove the cruft we created %{__rm} output/build/bin/HACK \ - output/build/bin/tomcat-native.tar.gz \ - output/build/lib/HACK + output/build/bin/tomcat-native.tar.gz popd pushd %{packdname}/output/dist/src/webapps/docs/appdev/sample/src %{__mkdir_p} ../web/WEB-INF/classes @@ -338,8 +339,8 @@ pushd ${RPM_BUILD_ROOT}%{_javadir} popd pushd %{packdname}/output/build - %{_bindir}/build-jar-repository lib commons-collections-tomcat5 \ - commons-dbcp-tomcat5 commons-pool-tomcat5 ecj 2>&1 + %{_bindir}/build-jar-repository lib commons-collections \ + commons-dbcp commons-pool ecj 2>&1 # need to use -p here with b-j-r otherwise the examples webapp fails to # load with a java.io.IOException %{_bindir}/build-jar-repository -p webapps/examples/WEB-INF/lib \ @@ -357,11 +358,11 @@ pushd ${RPM_BUILD_ROOT}%{libdir} %{__ln_s} ../%{name}-jsp-%{jspspec}-api-%{version}.jar . %{__ln_s} ../%{name}-servlet-%{servletspec}-api-%{version}.jar . %{__ln_s} ../%{name}-el-%{elspec}-api-%{version}.jar - %{__cp} -p $(build-classpath commons-collections-tomcat5) . + %{__cp} -p $(build-classpath commons-collections) . %{__cp} -p $(build-classpath log4j) . %{__ln_s} log4j log4j-%{version}.jar - %{__ln_s} $(build-classpath commons-dbcp-tomcat5) . - %{__ln_s} $(build-classpath commons-pool-tomcat5) . +# %{__ln_s} $(build-classpath commons-dbcp) . +# %{__ln_s} $(build-classpath commons-pool) . %{__ln_s} $(build-classpath ecj) jasper-jdt.jar popd pushd ${RPM_BUILD_ROOT}%{bindir} @@ -484,9 +485,9 @@ fi %postun %update_maven_depmap -%{__rm} -rf %{appdir} -%{__rm} -rf %{confdir} -%{__rm} -rf %{libdir} +#%{__rm} -rf %{appdir} +#%{__rm} -rf %{confdir} +#%{__rm} -rf %{libdir} %postun jsp-%{jspspec}-api if [ "$1" = "0" ]; then @@ -599,7 +600,14 @@ fi %{appdir}/sample %changelog -* Thu Oct 07 2010 David Knox 0L6.0.26-11 +* Thu Oct 14 2010 David Knox 0:6.0.26-12 +- Resolves rhbz#640686 - Upgrade of tomcat6 wipes out directories +- WARNING - Back up all files that need to be preserved before +- package update or uninstall - WARNING +- Resolves: rhbz#638914 - update versions of commons-collections, +- commons-dbcp, and commons-pool + +* Thu Oct 07 2010 David Knox 0:6.0.26-11 - resolves rhbz#640837 - tomcat user requires login shell * Mon Oct 04 2010 David Knox 0:6.0.26-10 From 1bb32f30d880ff7f9f3fc12c47c04058e200fac9 Mon Sep 17 00:00:00 2001 From: david knox Date: Thu, 14 Oct 2010 14:13:53 -0600 Subject: [PATCH 033/273] Update Release this time --- tomcat6.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tomcat6.spec b/tomcat6.spec index 92b8a67..00f979d 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -55,7 +55,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 11%{?dist} +Release: 12%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons From efc584784e505043d8264a63098d3a55723fd5bc Mon Sep 17 00:00:00 2001 From: spike Date: Tue, 9 Nov 2010 16:37:01 +0100 Subject: [PATCH 034/273] Added javax.servlet:servlet-api depmap entry to servlet-2.5-api subpackage --- tomcat6.spec | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tomcat6.spec b/tomcat6.spec index 00f979d..20497b4 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -55,7 +55,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 12%{?dist} +Release: 13%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -395,6 +395,11 @@ pushd ${RPM_BUILD_ROOT}%{libdir} %{__ln_s} %{bindir}/tomcat-juli* . popd +# Generate a depmap fragment javax.servlet:servlet-api pointing to +# tomcat6-servlet-2.5-api for backwards compatibility +%add_to_maven_depmap javax.servlet servlet-api %{servletspec} JPP %{name}-servlet-%{servletspec}-api +mv %{buildroot}%{_mavendepmapfragdir}/%{name} %{buildroot}%{_mavendepmapfragdir}/%{name}-servlet-api + # Install the maven metadata %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_mavenpomdir} pushd %{packdname}/output/dist/src/res/maven @@ -456,6 +461,7 @@ done %post servlet-%{servletspec}-api %{_sbindir}/update-alternatives --install %{_javadir}/servlet.jar servlet \ %{_javadir}/%{name}-servlet-%{servletspec}-api.jar 20500 +%update_maven_depmap %post el-%{elspec}-api %{_sbindir}/update-alternatives --install %{_javadir}/elspec.jar elspec \ @@ -499,6 +505,7 @@ fi if [ "$1" = "0" ]; then %{_sbindir}/update-alternatives --remove servlet \ %{_javadir}/%{name}-servlet-%{servletspec}-api.jar + %update_maven_depmap fi %postun el-%{elspec}-api @@ -548,7 +555,7 @@ fi %{homedir}/work %{homedir}/logs %{homedir}/conf -%{_mavendepmapfragdir}/* +%{_mavendepmapfragdir}/%{name} %{_mavenpomdir}/*.pom # Exclude the POMs that are in sub-packages %exclude %{_mavenpomdir}/*api* @@ -584,6 +591,7 @@ fi %files servlet-%{servletspec}-api %defattr(0644,root,root,0755) %{_javadir}/%{name}-servlet-%{servletspec}*.jar +%{_mavendepmapfragdir}/%{name}-servlet-api %{_mavenpomdir}/JPP-%{name}-servlet-api.pom %files el-%{elspec}-api @@ -600,6 +608,9 @@ fi %{appdir}/sample %changelog +* Tue Nov 9 2010 Chris Spike 0:6.0.26-13 +- Added javax.servlet:servlet-api depmap entry to servlet-2.5-api subpackage + * Thu Oct 14 2010 David Knox 0:6.0.26-12 - Resolves rhbz#640686 - Upgrade of tomcat6 wipes out directories - WARNING - Back up all files that need to be preserved before From ae16f6ac6e4d3af8d09e8e99599b511e0e805cd1 Mon Sep 17 00:00:00 2001 From: david knox Date: Wed, 1 Dec 2010 09:47:50 -0700 Subject: [PATCH 035/273] Resolves rhbz 604686 --- tomcat6.spec | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/tomcat6.spec b/tomcat6.spec index 20497b4..fa2fbbf 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -55,7 +55,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 13%{?dist} +Release: 14%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -439,11 +439,18 @@ done %clean %{__rm} -rf $RPM_BUILD_ROOT + %pre # add the tomcat user and group %{_sbindir}/groupadd -g %{tcuid} -r tomcat 2>/dev/null || : %{_sbindir}/useradd -c "Apache Tomcat" -u %{tcuid} -g tomcat \ -s /bin/sh -r -d %{homedir} tomcat 2>/dev/null || : +# Save the conf, app, and lib dirs +# due to rbgz 640686. Copy them to the _tmppath so we don't pollute +# the tomcat file structure +[ -d %{appdir} ] && %{__cp} -rp %{appdir} %{_tmppath}/%{name}-webapps.bak || : +[ -d %{confdir} ] && %{__cp} -rp %{confdir} %{_tmppath}/%{name}-confdir.bak || : +[ -d %{libdir} ] && %{__cp} -rp %{libdir} %{_tmppath}/%{name}-libdir.bak || : %post # install but don't activate @@ -473,6 +480,22 @@ done #%{_bindir}/build-jar-repository -p %{appdir}/examples/WEB-INF/lib \ # taglibs-core.jar taglibs-standard.jar 2>&1 +# move the temporary backups to the correct tomcat directory +# due to rhbz 640686 +%posttrans +if [ -d %{_tmppath}/%{name}-webapps.bak ]; then + %{__cp} -rp %{_tmppath}/%{name}-webapps.bak/* %{appdir} + %{__rm} -rf %{_tmppath}/%{name}-webapps.bak +fi +if [ -d %{_tmppath}/%{name}-libdir.bak ]; then + %{__cp} -rp %{_tmppath}/%{name}-libdir.bak/* %{libdir} + %{__rm} -rf %{_tmppath}/%{name}-libdir.bak +fi +if [ -d %{_tmppath}/%{name}-confdir.bak ]; then + %{__cp} -rp %{_tmppath}/%{name}-confdir.bak/* %{confdir} + %{__rm} -rf %{_tmppath}/%{name}-confdir.bak +fi + %preun # clean tempdir and workdir on removal or upgrade %{__rm} -rf %{workdir} %{tempdir} @@ -608,6 +631,12 @@ fi %{appdir}/sample %changelog +* Mon Nov 29 2010 David Knox 0:6.0.26-14 +- Resolving rhbz 640686: save appdir, confdir, and libdir during +- pre and copy them back during posttrans. The directories are +- copied to /var/tmp. They are copied back during posttrans and +- removed from /var/tmp. + * Tue Nov 9 2010 Chris Spike 0:6.0.26-13 - Added javax.servlet:servlet-api depmap entry to servlet-2.5-api subpackage From 980e758c3200a2317d455a83595646c43de533c7 Mon Sep 17 00:00:00 2001 From: Stanislav Ochotnicky Date: Thu, 2 Dec 2010 15:04:43 +0100 Subject: [PATCH 036/273] Fix log4j symlink (Resolves rhbz#654660) --- tomcat6.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tomcat6.spec b/tomcat6.spec index fa2fbbf..8eb219e 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -55,7 +55,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 14%{?dist} +Release: 15%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -360,7 +360,7 @@ pushd ${RPM_BUILD_ROOT}%{libdir} %{__ln_s} ../%{name}-el-%{elspec}-api-%{version}.jar %{__cp} -p $(build-classpath commons-collections) . %{__cp} -p $(build-classpath log4j) . - %{__ln_s} log4j log4j-%{version}.jar + %{__ln_s} log4j.jar log4j-%{version}.jar # %{__ln_s} $(build-classpath commons-dbcp) . # %{__ln_s} $(build-classpath commons-pool) . %{__ln_s} $(build-classpath ecj) jasper-jdt.jar @@ -631,6 +631,9 @@ fi %{appdir}/sample %changelog +* Thu Dec 2 2010 Stanislav Ochotnicky - 0:6.0.26-15 +- Fix log4j symlink (Resolves rhbz#654660) + * Mon Nov 29 2010 David Knox 0:6.0.26-14 - Resolving rhbz 640686: save appdir, confdir, and libdir during - pre and copy them back during posttrans. The directories are From 02259b07eac2259ee623661a49592861cf09fa83 Mon Sep 17 00:00:00 2001 From: Stanislav Ochotnicky Date: Thu, 2 Dec 2010 17:04:52 +0100 Subject: [PATCH 037/273] Simplify pom installation by splitting to more steps Originally 'coyote' pom was in 2 different if branches, only first could ever be reached. There were also problems with pom names being different than suggested by add_to_maven_depmap calls --- tomcat6.spec | 55 ++++++++++++++++++++++++---------------------------- 1 file changed, 25 insertions(+), 30 deletions(-) diff --git a/tomcat6.spec b/tomcat6.spec index 8eb219e..2f3f8f3 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -403,38 +403,33 @@ mv %{buildroot}%{_mavendepmapfragdir}/%{name} %{buildroot}%{_mavendepmapfragdir} # Install the maven metadata %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_mavenpomdir} pushd %{packdname}/output/dist/src/res/maven -for file in *.pom; do - base=`basename $file .pom` - # Some POMs don't actually have corresponding jar files in the current RPM - if [ $base != 'dbcp' -a $base != 'juli-adapters' -a $base != 'juli-extras' ]; then - sed -i 's/@MAVEN.DEPLOY.VERSION@/%{version}/g' $file - %{__cp} -a $file ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-%{name}-$file - # Some jar files have tomcat6 prepended and some don't, and some have their - # canonical home outside of the tomcat6 subdirectory - jppdir="JPP/%{name}" - if [ $base = 'coyote' -o $base = 'jsp-api' -o $base = 'servlet-api' ]; then - jpp="%{name}-$base" - jppdir="JPP" - else - if [ $base = 'tribes' ]; then - jpp=catalina-$base - else - if [ $base = 'juli' -o $base = 'coyote' ]; then - jpp=tomcat-$base - else - jpp=$base - fi - fi - fi - - if [ $base = 'jasper-jdt' ]; then - %add_to_maven_depmap org.apache.tomcat $base %{version} JPP ecj 3.4.2 - else - %add_to_maven_depmap org.apache.tomcat $base %{version} $jppdir $jpp %{version} - fi - fi +for pom in *.pom; do + # fix-up version in all pom files + sed -i 's/@MAVEN.DEPLOY.VERSION@/%{version}/g' $pom done +# we won't install dbcp, juli-adapters and juli-extras pom files +for pom in annotations-api.pom catalina.pom jasper-el.pom jasper.pom \ + catalina-ha.pom el-api.pom jasper-jdt.pom; do + %{__cp} -a $pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-$pom + base=`basename $pom .pom` + %add_to_maven_depmap org.apache.tomcat $base %{version} JPP/%{name} $base +done + +# servlet-api jsp-api and el-api are not in tomcat6 subdir, since they are widely re-used elsewhere +for pom in jsp-api.pom servlet-api.pom el-api.pom;do + %{__cp} -a $pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-%{name}-$pom + base=`basename $pom .pom` + %add_to_maven_depmap org.apache.tomcat $base %{version} JPP %{name}-$base +done + +# two special pom where jar files have different names +%{__cp} -a tribes.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-catalina-tribes.pom +%add_to_maven_depmap org.apache.tomcat tribes %{version} JPP/%{name} catalina-tribes + +%{__cp} -a juli.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-juli.pom +%add_to_maven_depmap org.apache.tomcat juli %{version} JPP/%{name} tomcat-juli + %clean %{__rm} -rf $RPM_BUILD_ROOT From 8ebe6511f36b6c411540c607be1ed33378ff8d21 Mon Sep 17 00:00:00 2001 From: Stanislav Ochotnicky Date: Thu, 2 Dec 2010 17:10:02 +0100 Subject: [PATCH 038/273] Formatting cleanups and jakarta-commons->apache-commons rename - Removed comments (no need for them, we have git history) - Indentation --- tomcat6.spec | 129 +++++++++++++++++++++------------------------------ 1 file changed, 53 insertions(+), 76 deletions(-) diff --git a/tomcat6.spec b/tomcat6.spec index 2f3f8f3..969b8b4 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -52,60 +52,58 @@ %global workdir %{cachedir}/work %global _initrddir %{_sysconfdir}/init.d -Name: tomcat6 -Epoch: 0 -Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 15%{?dist} -Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API +Name: tomcat6 +Epoch: 0 +Version: %{major_version}.%{minor_version}.%{micro_version} +Release: 16%{?dist} +Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API + +Group: Networking/Daemons +License: ASL 2.0 +URL: http://tomcat.apache.org/ +Source0: http://www.apache.org/dist/tomcat/tomcat-6/v%{version}/src/%{packdname}.tar.gz +Source1: %{name}-%{major_version}.%{minor_version}.conf +Source2: %{name}-%{major_version}.%{minor_version}.init +Source3: %{name}-%{major_version}.%{minor_version}.sysconfig +Source4: %{name}-%{major_version}.%{minor_version}.wrapper +Source5: %{name}-%{major_version}.%{minor_version}.logrotate +Source6: %{name}-%{major_version}.%{minor_version}-digest.script +Source7: %{name}-%{major_version}.%{minor_version}-tool-wrapper.script +Source8: servlet-api-OSGi-MANIFEST.MF +Source9: jsp-api-OSGi-MANIFEST.MF +Source10: %{name}-%{major_version}.%{minor_version}-log4j.properties +Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch +Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch +Patch2: %{name}-%{major_version}.%{minor_version}-CVE-2010-2227.patch + +BuildArch: noarch -Group: Networking/Daemons -License: ASL 2.0 -URL: http://tomcat.apache.org/ -Source0: http://www.apache.org/dist/tomcat/tomcat-6/v%{version}/src/%{packdname}.tar.gz -Source1: %{name}-%{major_version}.%{minor_version}.conf -Source2: %{name}-%{major_version}.%{minor_version}.init -Source3: %{name}-%{major_version}.%{minor_version}.sysconfig -Source4: %{name}-%{major_version}.%{minor_version}.wrapper -Source5: %{name}-%{major_version}.%{minor_version}.logrotate -Source6: %{name}-%{major_version}.%{minor_version}-digest.script -Source7: %{name}-%{major_version}.%{minor_version}-tool-wrapper.script -Source8: servlet-api-OSGi-MANIFEST.MF -Source9: jsp-api-OSGi-MANIFEST.MF -Source10: %{name}-%{major_version}.%{minor_version}-log4j.properties -Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch -Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch -Patch2: %{name}-%{major_version}.%{minor_version}-CVE-2010-2227.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -BuildArch: noarch BuildRequires: ant BuildRequires: ant-nodeps BuildRequires: ecj BuildRequires: findutils BuildRequires: jakarta-commons-collections -#BuildRequires: jakarta-commons-collections-tomcat5 -BuildRequires: jakarta-commons-daemon -#BuildRequires: jakarta-commons-dbcp-tomcat5 -#BuildRequires: jakarta-commons-pool-tomcat5 -BuildRequires: jakarta-commons-dbcp -BuildRequires: jakarta-commons-pool +BuildRequires: apache-commons-daemon +BuildRequires: apache-commons-dbcp +BuildRequires: apache-commons-pool BuildRequires: jakarta-taglibs-standard BuildRequires: java-1.6.0-devel BuildRequires: jpackage-utils >= 0:1.7.0 BuildRequires: junit BuildRequires: log4j -Requires(pre): shadow-utils -Requires(pre): shadow-utils -Requires: jakarta-commons-daemon -Requires: jakarta-commons-logging -Requires: jakarta-commons-collections -Requires: java-1.6.0 -Requires: procps -Requires: %{name}-lib = %{epoch}:%{version}-%{release} -Requires(post): /sbin/chkconfig -Requires(preun): /sbin/chkconfig -Requires(post): /lib/lsb/init-functions -Requires(preun): /lib/lsb/init-functions -Requires(post): jpackage-utils +Requires: apache-commons-daemon +Requires: apache-commons-logging +Requires: apache-commons-collections +Requires: java-1.6.0 +Requires: procps +Requires: %{name}-lib = %{epoch}:%{version}-%{release} +Requires(pre): shadow-utils +Requires(pre): shadow-utils +Requires(post): /sbin/chkconfig +Requires(preun): /sbin/chkconfig +Requires(post): /lib/lsb/init-functions +Requires(preun): /lib/lsb/init-functions +Requires(post): jpackage-utils Requires(postun): jpackage-utils %description @@ -169,9 +167,9 @@ Requires: %{name}-jsp-%{jspspec}-api = %{epoch}:%{version}-%{release} Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} Requires: %{name}-el-%{elspec}-api = %{epoch}:%{version}-%{release} Requires: ecj -Requires: jakarta-commons-collections -Requires: jakarta-commons-dbcp -Requires: jakarta-commons-pool +Requires: apache-commons-collections +Requires: apache-commons-dbcp +Requires: apache-commons-pool Requires(preun): coreutils %description lib @@ -227,18 +225,18 @@ export CLASSPATH= export OPT_JAR_LIST="ant/ant-nodeps" pushd %{packdname} # we don't care about the tarballs and we're going to replace - # tomcat-dbcp.jar with jakarta-commons-{collections,dbcp,pool}-tomcat5.jar + # tomcat-dbcp.jar with apache-commons-{collections,dbcp,pool}-tomcat5.jar # so just create a dummy file for later removal touch HACK # who needs a build.properties file anyway %{ant} -Dbase.path="." \ -Dbuild.compiler="modern" \ - -Dcommons-collections.jar="$(build-classpath jakarata-commons-collections)" \ - -Dcommons-daemon.jar="$(build-classpath commons-daemon)" \ + -Dcommons-collections.jar="$(build-classpath apache-commons-collections)" \ + -Dcommons-daemon.jar="$(build-classpath apache-commons-daemon)" \ -Dcommons-daemon.jsvc.tar.gz="HACK" \ -Djasper-jdt.jar="$(build-classpath ecj)" \ -Djdt.jar="$(build-classpath ecj)" \ - -Dtomcat-dbcp.jar="$(build-classpath commons-dbcp)" \ + -Dtomcat-dbcp.jar="$(build-classpath apache-commons-dbcp)" \ -Dtomcat-native.tar.gz="HACK" \ -Dversion="%{version}" \ -Dversion.build="%{micro_version}" @@ -339,11 +337,11 @@ pushd ${RPM_BUILD_ROOT}%{_javadir} popd pushd %{packdname}/output/build - %{_bindir}/build-jar-repository lib commons-collections \ - commons-dbcp commons-pool ecj 2>&1 -# need to use -p here with b-j-r otherwise the examples webapp fails to -# load with a java.io.IOException - %{_bindir}/build-jar-repository -p webapps/examples/WEB-INF/lib \ + %{_bindir}/build-jar-repository lib apache-commons-collections \ + apache-commons-dbcp apache-commons-pool ecj 2>&1 + # need to use -p here with b-j-r otherwise the examples webapp fails to + # load with a java.io.IOException + %{_bindir}/build-jar-repository -p webapps/examples/WEB-INF/lib \ taglibs-core.jar taglibs-standard.jar 2>&1 popd @@ -456,10 +454,6 @@ done %{_sbindir}/update-alternatives --install %{_javadir}/jsp.jar jsp \ %{_javadir}/%{name}-jsp-%{jspspec}-api.jar 20100 -#%post lib -#%{_bindir}/build-jar-repository %{libdir} commons-collections-tomcat5 \ -# commons-dbcp-tomcat5 commons-pool-tomcat5 ecj 2>&1 - %post servlet-%{servletspec}-api %{_sbindir}/update-alternatives --install %{_javadir}/servlet.jar servlet \ %{_javadir}/%{name}-servlet-%{servletspec}-api.jar 20500 @@ -469,11 +463,6 @@ done %{_sbindir}/update-alternatives --install %{_javadir}/elspec.jar elspec \ %{_javadir}/%{name}-el-%{elspec}-api.jar 20250 -#%post webapps -# need to use -p here with b-j-r otherwise the examples webapp fails to -# load with a java.io.IOException -#%{_bindir}/build-jar-repository -p %{appdir}/examples/WEB-INF/lib \ -# taglibs-core.jar taglibs-standard.jar 2>&1 # move the temporary backups to the correct tomcat directory # due to rhbz 640686 @@ -499,19 +488,9 @@ if [ "$1" = "0" ]; then /sbin/chkconfig --del %{name} fi -#%preun lib -#if [ "$1" = "0" ]; then -# %{__rm} -f %{libdir}/\[commons-collections-tomcat5\].jar \ -# %{libdir}/\[commons-dbcp-tomcat5\].jar \ -# %{libdir}/\[commons-pool-tomcat5\].jar \ -# %{libdir}/\[ecj\].jar >/dev/null 2>&1 -#fi %postun %update_maven_depmap -#%{__rm} -rf %{appdir} -#%{__rm} -rf %{confdir} -#%{__rm} -rf %{libdir} %postun jsp-%{jspspec}-api if [ "$1" = "0" ]; then @@ -546,8 +525,6 @@ fi %attr(0765,root,tomcat) %dir %{appdir} %attr(0765,root,tomcat) %dir %{confdir} %attr(0765,root,tomcat) %dir %{confdir}/Catalina -#%dir %{confdir} -#%dir %{confdir}/Catalina %attr(0765,root,tomcat) %dir %{confdir}/Catalina/localhost %config(noreplace) %{confdir}/%{name}.conf %config(noreplace) %{confdir}/*.policy From 5746174c039169deb2a1032b2b03bada4dc77f75 Mon Sep 17 00:00:00 2001 From: Stanislav Ochotnicky Date: Thu, 2 Dec 2010 17:13:44 +0100 Subject: [PATCH 039/273] Removed log4j sub-package with bundled log4j (replaced by system symlink) --- tomcat6.spec | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/tomcat6.spec b/tomcat6.spec index 969b8b4..666ca62 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -106,6 +106,9 @@ Requires(preun): /lib/lsb/init-functions Requires(post): jpackage-utils Requires(postun): jpackage-utils +# added after log4j sub-package was removed +Provides: %{name}-log4j = %{epoch}:%{version}-%{release} + %description Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServer Pages technologies. @@ -152,14 +155,6 @@ Requires(postun): %{_sbindir}/update-alternatives Apache Tomcat JSP API implementation classes. -%package log4j -Group: Internet/WWW/Dynamic Content -Summary: Log4j support for Apache Tomcat -Requires: jakarta-commons-logging - -%description log4j -Log4j support for Apache Tomcat - %package lib Group: Development/Compilers Summary: Libraries needed to run the Tomcat Web container @@ -531,6 +526,7 @@ fi %config(noreplace) %{confdir}/*.properties %config(noreplace) %{confdir}/context.xml %config(noreplace) %{confdir}/server.xml +%config(noreplace) %{confdir}/log4j.properties %attr(0664,root,tomcat) %config(noreplace) %{confdir}/tomcat-users.xml %config(noreplace) %{confdir}/web.xml %attr(0765,tomcat,root) %dir %{cachedir} @@ -573,12 +569,6 @@ fi %{_javadir}/%{name}-jsp-%{jspspec}*.jar %{_mavenpomdir}/JPP-%{name}-jsp-api.pom -%files log4j -%defattr(0644,root,tomcat,0775) -%config(noreplace) %{confdir}/log4j.properties -%{libdir}/log4j.jar -%{libdir}/log4j-%{version}.jar - %files lib %defattr(0644,root,root,0755) %{libdir} From 89cd8cabea43b22f4efd84e7e0fa320cbeadc646 Mon Sep 17 00:00:00 2001 From: Stanislav Ochotnicky Date: Thu, 2 Dec 2010 17:15:01 +0100 Subject: [PATCH 040/273] Fixes according to guidelines - versionless jars - no defattrs with random permissions --- tomcat6.spec | 85 +++++++++++++++++++--------------------------------- 1 file changed, 30 insertions(+), 55 deletions(-) diff --git a/tomcat6.spec b/tomcat6.spec index 666ca62..0a66a04 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -206,7 +206,8 @@ The ROOT and examples web applications for Apache Tomcat. %setup -q -c -T -a 0 # remove pre-built binaries and windows files find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name "*.gz" -o \ - -name "*.jar" -o -name "*.war" -o -name "*.zip" \) | xargs -t %{__rm} + -name "*.jar" -o -name "*.war" -o -name "*.zip" \) -delete + pushd %{packdname} %patch0 -p0 %patch1 -p0 @@ -240,8 +241,8 @@ pushd %{packdname} %{ant} -f dist.xml dist-source %{ant} -f dist.xml dist-javadoc # remove some jars that we'll replace with symlinks later - %{__rm} output/build/bin/commons-daemon.jar \ - output/build/lib/ecj.jar + %{__rm} output/build/bin/apache-commons-daemon.jar \ + output/build/lib/ecj.jar # remove the cruft we created %{__rm} output/build/bin/HACK \ output/build/bin/tomcat-native.tar.gz @@ -292,9 +293,8 @@ pushd %{packdname}/output/build %{__cp} -a webapps/* ${RPM_BUILD_ROOT}%{appdir} popd # javadoc -pushd %{packdname}/output/dist/webapps - %{__cp} -a docs/api/* ${RPM_BUILD_ROOT}%{_javadocdir}/%{name} -popd +%{__cp} -a %{packdname}/output/dist/webapps/docs/api/* ${RPM_BUILD_ROOT}%{_javadocdir}/%{name} + %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE1} \ @@ -320,15 +320,9 @@ popd > ${RPM_BUILD_ROOT}%{_bindir}/%{name}-tool-wrapper # create jsp and servlet API symlinks pushd ${RPM_BUILD_ROOT}%{_javadir} - %{__mv} %{name}/jsp-api.jar %{name}-jsp-%{jspspec}-api-%{version}.jar - %{__mv} %{name}/servlet-api.jar \ - %{name}-servlet-%{servletspec}-api-%{version}.jar - %{__mv} %{name}/el-api.jar %{name}-el-%{elspec}-api-%{version}.jar - %{__ln_s} %{name}-jsp-%{jspspec}-api-%{version}.jar \ - %{name}-jsp-%{jspspec}-api.jar - %{__ln_s} %{name}-servlet-%{servletspec}-api-%{version}.jar \ - %{name}-servlet-%{servletspec}-api.jar - %{__ln_s} %{name}-el-%{elspec}-api-%{version}.jar %{name}-el-%{elspec}-api.jar + %{__mv} %{name}/jsp-api.jar %{name}-jsp-%{jspspec}-api.jar + %{__mv} %{name}/servlet-api.jar %{name}-servlet-%{servletspec}-api.jar + %{__mv} %{name}/el-api.jar %{name}-el-%{elspec}-api.jar popd pushd %{packdname}/output/build @@ -341,31 +335,19 @@ pushd %{packdname}/output/build popd pushd ${RPM_BUILD_ROOT}%{libdir} - # fix up jars to include version number - for i in *.jar; do - j="$(echo $i | %{__sed} -e 's,\.jar$,,')" - %{__mv} ${j}.jar ${j}-%{version}.jar - %{__ln_s} ${j}-%{version}.jar ${j}.jar - done # symlink JSP and servlet API jars - %{__ln_s} ../%{name}-jsp-%{jspspec}-api-%{version}.jar . - %{__ln_s} ../%{name}-servlet-%{servletspec}-api-%{version}.jar . - %{__ln_s} ../%{name}-el-%{elspec}-api-%{version}.jar - %{__cp} -p $(build-classpath commons-collections) . - %{__cp} -p $(build-classpath log4j) . - %{__ln_s} log4j.jar log4j-%{version}.jar -# %{__ln_s} $(build-classpath commons-dbcp) . -# %{__ln_s} $(build-classpath commons-pool) . + %{__ln_s} ../%{name}-jsp-%{jspspec}-api.jar . + %{__ln_s} ../%{name}-servlet-%{servletspec}-api.jar . + %{__ln_s} ../%{name}-el-%{elspec}-api.jar + %{__ln_s} $(build-classpath apache-commons-collections) commons-collections.jar + %{__ln_s} $(build-classpath apache-commons-dbcp) commons-dbcp.jar + %{__ln_s} $(build-classpath log4j) log4j.jar %{__ln_s} $(build-classpath ecj) jasper-jdt.jar + + # Link the juli jar into /usr/share/java/tomcat6 + %{__ln_s} %{bindir}/tomcat-juli.jar . popd -pushd ${RPM_BUILD_ROOT}%{bindir} - # fix up jars to include version number - for i in *.jar; do - j="$(echo $i | %{__sed} -e 's,\.jar$,,')" - %{__mv} ${j}.jar ${j}-%{version}.jar - %{__ln_s} ${j}-%{version}.jar ${j}.jar - done -popd + # symlink to the FHS locations where we've installed things pushd ${RPM_BUILD_ROOT}%{homedir} %{__ln_s} %{appdir} webapps @@ -383,10 +365,6 @@ pushd ${RPM_BUILD_ROOT}%{appdir}/sample popd %{__rm} ${RPM_BUILD_ROOT}%{appdir}/docs/appdev/sample/sample.war -# Link the juli jars into /usr/share/java/tomcat6 -pushd ${RPM_BUILD_ROOT}%{libdir} -%{__ln_s} %{bindir}/tomcat-juli* . -popd # Generate a depmap fragment javax.servlet:servlet-api pointing to # tomcat6-servlet-2.5-api for backwards compatibility @@ -507,7 +485,7 @@ if [ "$1" = "0" ]; then fi %files -%defattr(0644,root,tomcat,0775) +%defattr(-,root,tomcat,-) %doc %{packdname}/{LICENSE,NOTICE,RELEASE*} %attr(0755,root,root) %{_bindir}/%{name}-digest %attr(0755,root,root) %{_bindir}/%{name}-tool-wrapper @@ -534,11 +512,8 @@ fi %attr(0765,tomcat,root) %dir %{workdir} %attr(0765,root,tomcat) %dir %{logdir} %dir %{homedir} -#%attr(0765,root,tomcat) %{homedir}/conf -%{bindir}/bootstrap-%{version}.jar %{bindir}/bootstrap.jar %{bindir}/catalina-tasks.xml -%{bindir}/tomcat-juli-%{version}.jar %{bindir}/tomcat-juli.jar %{homedir}/lib %{homedir}/temp @@ -552,42 +527,42 @@ fi %exclude %{_mavenpomdir}/*api* %files admin-webapps -%defattr(0644,root,root,0775) +%defattr(-,root,root,-) %{appdir}/host-manager %{appdir}/manager %files docs-webapp -%defattr(0644,root,root,0755) +%defattr(-,root,root,-) %{appdir}/docs %files javadoc -%defattr(0644,root,root,0755) +%defattr(-,root,root,-) %{_javadocdir}/%{name} %files jsp-%{jspspec}-api -%defattr(0644,root,root,0755) +%defattr(-,root,root,-) %{_javadir}/%{name}-jsp-%{jspspec}*.jar %{_mavenpomdir}/JPP-%{name}-jsp-api.pom %files lib -%defattr(0644,root,root,0755) +%defattr(-,root,root,-) %{libdir} %files servlet-%{servletspec}-api -%defattr(0644,root,root,0755) +%defattr(-,root,root,-) %{_javadir}/%{name}-servlet-%{servletspec}*.jar %{_mavendepmapfragdir}/%{name}-servlet-api %{_mavenpomdir}/JPP-%{name}-servlet-api.pom %files el-%{elspec}-api -%defattr(0665,root,root,0755) -%{_javadir}/%{name}-el-%{elspec}-api-%{version}.jar +%defattr(-,root,root,-) %{_javadir}/%{name}-el-%{elspec}-api.jar -%{_javadir}/%{name}/%{name}-el-%{elspec}-api-%{version}.jar +%{_javadir}/%{name}-el-%{elspec}-api.jar +%{_javadir}/%{name}/%{name}-el-%{elspec}-api.jar %{_mavenpomdir}/JPP-%{name}-el-api.pom %files webapps -%defattr(0644,root,tomcat,0775) +%defattr(-,root,tomcat,-) %{appdir}/ROOT %{appdir}/examples %{appdir}/sample From 9f57789c2fa99fd99a1efae6017086db1be26265 Mon Sep 17 00:00:00 2001 From: Stanislav Ochotnicky Date: Thu, 2 Dec 2010 17:18:47 +0100 Subject: [PATCH 041/273] Add changelog entry for past changes --- tomcat6.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tomcat6.spec b/tomcat6.spec index 0a66a04..700f85d 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -568,6 +568,12 @@ fi %{appdir}/sample %changelog +* Thu Dec 2 2010 Stanislav Ochotnicky - 0:6.0.26-16 +- Fixes according to guidelines (versionless jars, no random defattrs) +- Simplify pom installation by splitting to more steps +- Formatting cleanups +- Removed log4j subpackage (used bundled log4j, replaced by symlink) + * Thu Dec 2 2010 Stanislav Ochotnicky - 0:6.0.26-15 - Fix log4j symlink (Resolves rhbz#654660) From 3c9662b6608d548d4e0ed4d191211f5cb44f8b70 Mon Sep 17 00:00:00 2001 From: Stanislav Ochotnicky Date: Mon, 6 Dec 2010 10:24:18 +0100 Subject: [PATCH 042/273] Add jetty to servlet-api depmap --- tomcat6.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tomcat6.spec b/tomcat6.spec index 700f85d..d9a2c5c 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -55,7 +55,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 16%{?dist} +Release: 17%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -369,7 +369,9 @@ popd # Generate a depmap fragment javax.servlet:servlet-api pointing to # tomcat6-servlet-2.5-api for backwards compatibility %add_to_maven_depmap javax.servlet servlet-api %{servletspec} JPP %{name}-servlet-%{servletspec}-api -mv %{buildroot}%{_mavendepmapfragdir}/%{name} %{buildroot}%{_mavendepmapfragdir}/%{name}-servlet-api +# also provide jetty depmap (originally in jetty package, but it's cleaner to have it here) +%add_to_maven_depmap org.mortbay.jetty servlet-api %{servletspec} JPP %{name}-servlet-%{servletspec}-api +mv %{buildroot}%{_mavendepmapfragdir}/%{name} %{buildroot}%{_mavendepmapfragdir}/%{name}-servlet-api # Install the maven metadata %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_mavenpomdir} @@ -568,6 +570,9 @@ fi %{appdir}/sample %changelog +* Mon Dec 6 2010 Stanislav Ochotnicky - 0:6.0.26-17 +- Add jetty to servlet-api depmap + * Thu Dec 2 2010 Stanislav Ochotnicky - 0:6.0.26-16 - Fixes according to guidelines (versionless jars, no random defattrs) - Simplify pom installation by splitting to more steps From fb3cd5e3cea29c30110bd687e4fef9fee6bae195 Mon Sep 17 00:00:00 2001 From: Stanislav Ochotnicky Date: Wed, 8 Dec 2010 10:41:11 +0100 Subject: [PATCH 043/273] Add api jars without spec version symlinks - Remove clean section - Remove whitespaces at the EOLs --- tomcat6.spec | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/tomcat6.spec b/tomcat6.spec index d9a2c5c..2ffe8cd 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -55,7 +55,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 17%{?dist} +Release: 18%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -245,7 +245,7 @@ pushd %{packdname} output/build/lib/ecj.jar # remove the cruft we created %{__rm} output/build/bin/HACK \ - output/build/bin/tomcat-native.tar.gz + output/build/bin/tomcat-native.tar.gz popd pushd %{packdname}/output/dist/src/webapps/docs/appdev/sample/src %{__mkdir_p} ../web/WEB-INF/classes @@ -265,7 +265,6 @@ touch META-INF/MANIFEST.MF zip -u %{packdname}/output/build/lib/jsp-api.jar META-INF/MANIFEST.MF %install -%{__rm} -rf $RPM_BUILD_ROOT # build initial path structure %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_bindir} %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sbindir} @@ -321,8 +320,11 @@ popd # create jsp and servlet API symlinks pushd ${RPM_BUILD_ROOT}%{_javadir} %{__mv} %{name}/jsp-api.jar %{name}-jsp-%{jspspec}-api.jar + %{__ln_s} %{name}-jsp-%{jspspec}-api.jar %{name}-jsp-api.jar %{__mv} %{name}/servlet-api.jar %{name}-servlet-%{servletspec}-api.jar + %{__ln_s} %{name}-servlet-%{servletspec}-api.jar %{name}-servlet-api.jar %{__mv} %{name}/el-api.jar %{name}-el-%{elspec}-api.jar + %{__ln_s} %{name}-el-%{elspec}-api.jar %{name}-el-api.jar popd pushd %{packdname}/output/build @@ -338,7 +340,7 @@ pushd ${RPM_BUILD_ROOT}%{libdir} # symlink JSP and servlet API jars %{__ln_s} ../%{name}-jsp-%{jspspec}-api.jar . %{__ln_s} ../%{name}-servlet-%{servletspec}-api.jar . - %{__ln_s} ../%{name}-el-%{elspec}-api.jar + %{__ln_s} ../%{name}-el-%{elspec}-api.jar . %{__ln_s} $(build-classpath apache-commons-collections) commons-collections.jar %{__ln_s} $(build-classpath apache-commons-dbcp) commons-dbcp.jar %{__ln_s} $(build-classpath log4j) log4j.jar @@ -366,7 +368,7 @@ popd %{__rm} ${RPM_BUILD_ROOT}%{appdir}/docs/appdev/sample/sample.war -# Generate a depmap fragment javax.servlet:servlet-api pointing to +# Generate a depmap fragment javax.servlet:servlet-api pointing to # tomcat6-servlet-2.5-api for backwards compatibility %add_to_maven_depmap javax.servlet servlet-api %{servletspec} JPP %{name}-servlet-%{servletspec}-api # also provide jetty depmap (originally in jetty package, but it's cleaner to have it here) @@ -404,17 +406,13 @@ done %add_to_maven_depmap org.apache.tomcat juli %{version} JPP/%{name} tomcat-juli -%clean -%{__rm} -rf $RPM_BUILD_ROOT - - %pre # add the tomcat user and group %{_sbindir}/groupadd -g %{tcuid} -r tomcat 2>/dev/null || : %{_sbindir}/useradd -c "Apache Tomcat" -u %{tcuid} -g tomcat \ -s /bin/sh -r -d %{homedir} tomcat 2>/dev/null || : # Save the conf, app, and lib dirs -# due to rbgz 640686. Copy them to the _tmppath so we don't pollute +# due to rbgz 640686. Copy them to the _tmppath so we don't pollute # the tomcat file structure [ -d %{appdir} ] && %{__cp} -rp %{appdir} %{_tmppath}/%{name}-webapps.bak || : [ -d %{confdir} ] && %{__cp} -rp %{confdir} %{_tmppath}/%{name}-confdir.bak || : @@ -544,6 +542,7 @@ fi %files jsp-%{jspspec}-api %defattr(-,root,root,-) %{_javadir}/%{name}-jsp-%{jspspec}*.jar +%{_javadir}/%{name}-jsp-api.jar %{_mavenpomdir}/JPP-%{name}-jsp-api.pom %files lib @@ -553,13 +552,14 @@ fi %files servlet-%{servletspec}-api %defattr(-,root,root,-) %{_javadir}/%{name}-servlet-%{servletspec}*.jar +%{_javadir}/%{name}-servlet-api.jar %{_mavendepmapfragdir}/%{name}-servlet-api %{_mavenpomdir}/JPP-%{name}-servlet-api.pom %files el-%{elspec}-api %defattr(-,root,root,-) %{_javadir}/%{name}-el-%{elspec}-api.jar -%{_javadir}/%{name}-el-%{elspec}-api.jar +%{_javadir}/%{name}-el-api.jar %{_javadir}/%{name}/%{name}-el-%{elspec}-api.jar %{_mavenpomdir}/JPP-%{name}-el-api.pom @@ -570,6 +570,11 @@ fi %{appdir}/sample %changelog +* Wed Dec 8 2010 Stanislav Ochotnicky - 0:6.0.26-18 +- Add api jars without spec version symlinks +- Remove clean section +- Remove whitespaces at the EOLs + * Mon Dec 6 2010 Stanislav Ochotnicky - 0:6.0.26-17 - Add jetty to servlet-api depmap @@ -585,7 +590,7 @@ fi * Mon Nov 29 2010 David Knox 0:6.0.26-14 - Resolving rhbz 640686: save appdir, confdir, and libdir during - pre and copy them back during posttrans. The directories are -- copied to /var/tmp. They are copied back during posttrans and +- copied to /var/tmp. They are copied back during posttrans and - removed from /var/tmp. * Tue Nov 9 2010 Chris Spike 0:6.0.26-13 @@ -593,7 +598,7 @@ fi * Thu Oct 14 2010 David Knox 0:6.0.26-12 - Resolves rhbz#640686 - Upgrade of tomcat6 wipes out directories -- WARNING - Back up all files that need to be preserved before +- WARNING - Back up all files that need to be preserved before - package update or uninstall - WARNING - Resolves: rhbz#638914 - update versions of commons-collections, - commons-dbcp, and commons-pool @@ -602,15 +607,15 @@ fi - resolves rhbz#640837 - tomcat user requires login shell * Mon Oct 04 2010 David Knox 0:6.0.26-10 -- ant-nodeps is breaking the build. Put ant-nodeps on the +- ant-nodeps is breaking the build. Put ant-nodeps on the - OPT_JAR_LIST * Fri Oct 01 2010 David Knox 0:6.0.26-9 -- Resolves rhbz#575341 - Additionally created instances of Tomcat +- Resolves rhbz#575341 - Additionally created instances of Tomcat - are broken * Fri Jul 02 2010 David Knox 0:6.0.26-8 -- LSB initscript compliance +- LSB initscript compliance * Thu Jul 01 2010 David Knox 0:6.0.26-7 - Made elspec the standard for elspec %post and %postun. @@ -623,7 +628,7 @@ fi - Working on 589145. Tomcat can't find java compiler for java. * Tue Apr 08 2010 David Knox 0:6.0.26-4 -- Moved build-jar-repository to later in the install process. +- Moved build-jar-repository to later in the install process. * Tue Apr 06 2010 David Knox 0:6.0.26-3 - Incremented the Release tag to 3 to avoid any confusion about which @@ -636,7 +641,7 @@ fi * Mon Mar 29 2010 David Knox 0:6.0.26-2 - Update source to tomcat6.0.26 -- Bugzilla 572357 - Please retest. +- Bugzilla 572357 - Please retest. - OSGi manifests for servlet-api and jsp-api @@ -651,7 +656,7 @@ fi - Drop file requires on /usr/share/java/ecj.jar. * Mon Nov 9 2009 Alexander Kurtakov 0:6.0.20-1 -- Update to 6.0.20. Fixes CVE-2009-0033,CVE-2009-0580. +- Update to 6.0.20. Fixes CVE-2009-0033,CVE-2009-0580. * Sun Jul 26 2009 Fedora Release Engineering - 0:6.0.18-10.2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild From 7f5f5fa0ddf1ac6da2ed2b4ccba009515cea928a Mon Sep 17 00:00:00 2001 From: Alexander Kurtakov Date: Mon, 3 Jan 2011 10:54:46 +0200 Subject: [PATCH 044/273] Update to new upstream. - Simplify buildroot. - Don't require files but packages. --- .gitignore | 1 + sources | 3 +- tomcat6-6.0-CVE-2010-2227.patch | 138 -------------------------------- tomcat6.spec | 65 +++++++-------- 4 files changed, 32 insertions(+), 175 deletions(-) delete mode 100644 tomcat6-6.0-CVE-2010-2227.patch diff --git a/.gitignore b/.gitignore index 15a50ac..6590968 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ apache-tomcat-6.0.18-src.tar.gz apache-tomcat-6.0.20-src.tar.gz apache-tomcat-6.0.24-src.tar.gz apache-tomcat-6.0.26-src.tar.gz +apache-tomcat-6.0.29-src.tar.gz diff --git a/sources b/sources index ddb95cc..8f99d1e 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -543218290008e0dd6a329f69136973ca apache-tomcat-6.0.24-src.tar.gz -83b46d9346bcbc517dbf6f1cac9ef8b1 apache-tomcat-6.0.26-src.tar.gz +260de5ae62f415b9c085c5aeed4ef24c apache-tomcat-6.0.29-src.tar.gz diff --git a/tomcat6-6.0-CVE-2010-2227.patch b/tomcat6-6.0-CVE-2010-2227.patch deleted file mode 100644 index 4f00c89..0000000 --- a/tomcat6-6.0-CVE-2010-2227.patch +++ /dev/null @@ -1,138 +0,0 @@ ---- java/org/apache/coyote/http11/Http11AprProcessor.java.orig 2010-07-12 11:52:05.981133000 -0400 -+++ java/org/apache/coyote/http11/Http11AprProcessor.java 2010-07-12 11:59:39.205913000 -0400 -@@ -78,6 +78,12 @@ - protected static StringManager sm = - StringManager.getManager(Constants.Package); - -+ /** -+ * Tracks how many internal filters are in the filter library so they -+ * are skipped whe looking for pluggable filters -+ */ -+ private int pluggableFilterIndex = Integer.MAX_VALUE; -+ - - // ----------------------------------------------------------- Constructors - -@@ -1736,6 +1742,8 @@ - //inputBuffer.addFilter(new GzipInputFilter()); - outputBuffer.addFilter(new GzipOutputFilter()); - -+ pluggableFilterIndex = inputBuffer.filterLibrary.length; -+ - } - - -@@ -1754,7 +1762,7 @@ - (inputFilters[Constants.CHUNKED_FILTER]); - contentDelimitation = true; - } else { -- for (int i = 2; i < inputFilters.length; i++) { -+ for (int i = pluggableFilterIndex; i < inputFilters.length; i++) { - if (inputFilters[i].getEncodingName() - .toString().equals(encodingName)) { - inputBuffer.addActiveFilter(inputFilters[i]); ---- java/org/apache/coyote/http11/Http11NioProcessor.java.orig 2010-07-12 12:00:05.720580000 -0400 -+++ java/org/apache/coyote/http11/Http11NioProcessor.java 2010-07-12 12:19:36.465303000 -0400 -@@ -81,6 +81,12 @@ - */ - protected SSLSupport sslSupport; - -+ /** -+ * Tracks how many internal filters are in the filter library so they -+ * are skipped whe looking for pluggable filters -+ */ -+ private int pluggableFilterIndex = Integer.MAX_VALUE; -+ - // ----------------------------------------------------------- Constructors - - -@@ -1763,6 +1769,8 @@ - //inputBuffer.addFilter(new GzipInputFilter()); - outputBuffer.addFilter(new GzipOutputFilter()); - -+ pluggableFilterIndex = inputBuffer.filterLibrary.length; -+ - } - - -@@ -1781,7 +1789,7 @@ - (inputFilters[Constants.CHUNKED_FILTER]); - contentDelimitation = true; - } else { -- for (int i = 2; i < inputFilters.length; i++) { -+ for (int i = pluggableFilterIndex; i < inputFilters.length; i++) { - if (inputFilters[i].getEncodingName() - .toString().equals(encodingName)) { - inputBuffer.addActiveFilter(inputFilters[i]); ---- java/org/apache/coyote/http11/Http11Processor.java.orig 2010-07-12 12:20:42.784634000 -0400 -+++ java/org/apache/coyote/http11/Http11Processor.java 2010-07-12 12:23:14.996732000 -0400 -@@ -76,6 +76,11 @@ - protected static boolean isSecurityEnabled = - org.apache.coyote.Constants.IS_SECURITY_ENABLED; - -+ /** -+ * Tracks how many internal filters are in the filter library so they -+ * are skipped whe looking for pluggable filters -+ */ -+ private int pluggableFilterIndex = Integer.MAX_VALUE; - // ------------------------------------------------------------ Constructor - - -@@ -1642,6 +1647,7 @@ - //inputBuffer.addFilter(new GzipInputFilter()); - outputBuffer.addFilter(new GzipOutputFilter()); - -+ pluggableFilterIndex = inputBuffer.filterLibrary.length; - } - - -@@ -1660,7 +1666,7 @@ - (inputFilters[Constants.CHUNKED_FILTER]); - contentDelimitation = true; - } else { -- for (int i = 2; i < inputFilters.length; i++) { -+ for (int i = pluggableFilterIndex; i < inputFilters.length; i++) { - if (inputFilters[i].getEncodingName() - .toString().equals(encodingName)) { - inputBuffer.addActiveFilter(inputFilters[i]); ---- java/org/apache/coyote/http11/filters/BufferedInputFilter.java.orig 2010-01-19 08:43:40.000000000 -0500 -+++ java/org/apache/coyote/http11/filters/BufferedInputFilter.java 2010-07-12 13:00:50.374586000 -0400 -@@ -102,10 +102,14 @@ - } - - public void recycle() { -- if (buffered.getBuffer().length > 65536) { -- buffered = null; -- } else { -- buffered.recycle(); -+ if (buffered != null) -+ { -+ if (buffered.getBuffer().length > 65536) -+ { -+ buffered = null; -+ } else { -+ buffered.recycle(); -+ } - } - tempRead.recycle(); - hasRead = false; - ---- webapps/docs/changelog.xml.orig 2010-07-12 16:08:24.000000000 -0600 -+++ webapps/docs/changelog.xml 2010-07-12 16:12:43.000000000 -0600 -@@ -40,6 +40,16 @@ - Correct TCK failures with security manager caused by the original fix - for 47774. (markt) - -+ -+ Arange filter logic (jgclere) -+ Several flaws in the handling of the 'Transfer-Encoding' header -+ were found that prevented the recycling of a buffer. A remote -+ attacker could trigger this flaw which would cause subsequent -+ requests to fail and/or information to leak between requests. -+ This flaw is mitigated if Tomcat is behind a reverse proxy -+ (such as Apache httpd 2.2) as the proxy should reject the -+ invalid transfer encoding header. -+ - - - diff --git a/tomcat6.spec b/tomcat6.spec index 2ffe8cd..f6eba5c 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -28,12 +28,10 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -%global section free - %global jspspec 2.1 %global major_version 6 %global minor_version 0 -%global micro_version 26 +%global micro_version 29 %global packdname apache-tomcat-%{version}-src %global servletspec 2.5 %global elspec 2.1 @@ -55,7 +53,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 18%{?dist} +Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -74,7 +72,6 @@ Source9: jsp-api-OSGi-MANIFEST.MF Source10: %{name}-%{major_version}.%{minor_version}-log4j.properties Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch -Patch2: %{name}-%{major_version}.%{minor_version}-CVE-2010-2227.patch BuildArch: noarch @@ -99,10 +96,10 @@ Requires: procps Requires: %{name}-lib = %{epoch}:%{version}-%{release} Requires(pre): shadow-utils Requires(pre): shadow-utils -Requires(post): /sbin/chkconfig -Requires(preun): /sbin/chkconfig -Requires(post): /lib/lsb/init-functions -Requires(preun): /lib/lsb/init-functions +Requires(post): chkconfig +Requires(preun): chkconfig +Requires(post): redhat-lsb +Requires(preun): redhat-lsb Requires(post): jpackage-utils Requires(postun): jpackage-utils @@ -148,8 +145,8 @@ Summary: Apache Tomcat JSP API implementation classes Provides: jsp = %{jspspec} Provides: jsp21 Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} -Requires(post): %{_sbindir}/update-alternatives -Requires(postun): %{_sbindir}/update-alternatives +Requires(post): chkconfig +Requires(postun): chkconfig %description jsp-%{jspspec}-api Apache Tomcat JSP API implementation classes. @@ -176,8 +173,8 @@ Summary: Apache Tomcat Servlet API implementation classes Provides: servlet = %{servletspec} Provides: servlet6 Provides: servlet25 -Requires(post): %{_sbindir}/update-alternatives -Requires(postun): %{_sbindir}/update-alternatives +Requires(post): chkconfig +Requires(postun): chkconfig %description servlet-%{servletspec}-api Apache Tomcat Servlet API implementation classes. @@ -187,8 +184,8 @@ Group: Development/Libraries/Java Summary: Expression Language v1.0 API Provides: el_1_0_api = %{epoch}:%{version}-%{release} Provides: el_api = %{elspec} -Requires(post): %{_sbindir}/update-alternatives -Requires(postun): %{_sbindir}/update-alternatives +Requires(post): chkconfig +Requires(postun): chkconfig %description el-%{elspec}-api Expression Language 1.0. @@ -203,23 +200,18 @@ Requires: jakarta-taglibs-standard >= 0:1.1 The ROOT and examples web applications for Apache Tomcat. %prep -%setup -q -c -T -a 0 +%setup -q -n %{packdname} # remove pre-built binaries and windows files find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name "*.gz" -o \ -name "*.jar" -o -name "*.war" -o -name "*.zip" \) -delete -pushd %{packdname} %patch0 -p0 %patch1 -p0 -%patch2 -p0 %{__ln_s} $(build-classpath jakarta-taglibs-core) webapps/examples/WEB-INF/lib/jstl.jar %{__ln_s} $(build-classpath jakarta-taglibs-standard) webapps/examples/WEB-INF/lib/standard.jar -popd %build -export CLASSPATH= -export OPT_JAR_LIST="ant/ant-nodeps" -pushd %{packdname} +export OPT_JAR_LIST="xalan-j2-serializer" # we don't care about the tarballs and we're going to replace # tomcat-dbcp.jar with apache-commons-{collections,dbcp,pool}-tomcat5.jar # so just create a dummy file for later removal @@ -229,7 +221,7 @@ pushd %{packdname} -Dbuild.compiler="modern" \ -Dcommons-collections.jar="$(build-classpath apache-commons-collections)" \ -Dcommons-daemon.jar="$(build-classpath apache-commons-daemon)" \ - -Dcommons-daemon.jsvc.tar.gz="HACK" \ + -Dcommons-daemon.native.src.tgz="HACK" \ -Djasper-jdt.jar="$(build-classpath ecj)" \ -Djdt.jar="$(build-classpath ecj)" \ -Dtomcat-dbcp.jar="$(build-classpath apache-commons-dbcp)" \ @@ -241,13 +233,11 @@ pushd %{packdname} %{ant} -f dist.xml dist-source %{ant} -f dist.xml dist-javadoc # remove some jars that we'll replace with symlinks later - %{__rm} output/build/bin/apache-commons-daemon.jar \ + %{__rm} output/build/bin/commons-daemon.jar \ output/build/lib/ecj.jar # remove the cruft we created - %{__rm} output/build/bin/HACK \ - output/build/bin/tomcat-native.tar.gz -popd -pushd %{packdname}/output/dist/src/webapps/docs/appdev/sample/src + %{__rm} output/build/bin/tomcat-native.tar.gz +pushd output/dist/src/webapps/docs/appdev/sample/src %{__mkdir_p} ../web/WEB-INF/classes %{javac} -cp ../../../../../../../../output/build/lib/servlet-api.jar -d ../web/WEB-INF/classes mypackage/Hello.java pushd ../web @@ -259,10 +249,10 @@ popd mkdir -p META-INF cp -p %{SOURCE8} META-INF/MANIFEST.MF touch META-INF/MANIFEST.MF -zip -u %{packdname}/output/build/lib/servlet-api.jar META-INF/MANIFEST.MF +zip -u output/build/lib/servlet-api.jar META-INF/MANIFEST.MF cp -p %{SOURCE9} META-INF/MANIFEST.MF touch META-INF/MANIFEST.MF -zip -u %{packdname}/output/build/lib/jsp-api.jar META-INF/MANIFEST.MF +zip -u output/build/lib/jsp-api.jar META-INF/MANIFEST.MF %install # build initial path structure @@ -284,7 +274,7 @@ zip -u %{packdname}/output/build/lib/jsp-api.jar META-INF/MANIFEST.MF # move things into place # First copy supporting libs to tomcat lib -pushd %{packdname}/output/build +pushd output/build %{__cp} -a bin/*.{jar,xml} ${RPM_BUILD_ROOT}%{bindir} %{__cp} %{SOURCE10} conf/log4j.properties %{__cp} -a conf/*.{policy,properties,xml} ${RPM_BUILD_ROOT}%{confdir} @@ -292,7 +282,7 @@ pushd %{packdname}/output/build %{__cp} -a webapps/* ${RPM_BUILD_ROOT}%{appdir} popd # javadoc -%{__cp} -a %{packdname}/output/dist/webapps/docs/api/* ${RPM_BUILD_ROOT}%{_javadocdir}/%{name} +%{__cp} -a output/dist/webapps/docs/api/* ${RPM_BUILD_ROOT}%{_javadocdir}/%{name} %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ @@ -327,7 +317,7 @@ pushd ${RPM_BUILD_ROOT}%{_javadir} %{__ln_s} %{name}-el-%{elspec}-api.jar %{name}-el-api.jar popd -pushd %{packdname}/output/build +pushd output/build %{_bindir}/build-jar-repository lib apache-commons-collections \ apache-commons-dbcp apache-commons-pool ecj 2>&1 # need to use -p here with b-j-r otherwise the examples webapp fails to @@ -377,7 +367,7 @@ mv %{buildroot}%{_mavendepmapfragdir}/%{name} %{buildroot}%{_mavendepmapfragdir} # Install the maven metadata %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_mavenpomdir} -pushd %{packdname}/output/dist/src/res/maven +pushd output/dist/src/res/maven for pom in *.pom; do # fix-up version in all pom files sed -i 's/@MAVEN.DEPLOY.VERSION@/%{version}/g' $pom @@ -486,7 +476,7 @@ fi %files %defattr(-,root,tomcat,-) -%doc %{packdname}/{LICENSE,NOTICE,RELEASE*} +%doc {LICENSE,NOTICE,RELEASE*} %attr(0755,root,root) %{_bindir}/%{name}-digest %attr(0755,root,root) %{_bindir}/%{name}-tool-wrapper %attr(0755,root,root) %{_sbindir}/d%{name} @@ -570,6 +560,11 @@ fi %{appdir}/sample %changelog +* Mon Jan 3 2011 Alexander Kurtakov 0:6.0.29-1 +- Update to new upstream. +- Simplify buildroot. +- Don't require files but packages. + * Wed Dec 8 2010 Stanislav Ochotnicky - 0:6.0.26-18 - Add api jars without spec version symlinks - Remove clean section From 6b3301f8ed03fbf720655cf1bdb9ab81424e0c3e Mon Sep 17 00:00:00 2001 From: david knox Date: Mon, 17 Jan 2011 12:01:02 -0700 Subject: [PATCH 045/273] Resolves: rhbz#66969 - tomcat-jdbc missing. Resolves problem running multiple instances of tomcat services. References to hardcoded directory locations in tomcat6-6.0.init have been changed to . --- tomcat6-6.0.init | 14 +++++++------- tomcat6.spec | 8 +++++++- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/tomcat6-6.0.init b/tomcat6-6.0.init index 4123f1c..43f53a4 100644 --- a/tomcat6-6.0.init +++ b/tomcat6-6.0.init @@ -43,17 +43,17 @@ else SU="/bin/su -s /bin/sh" fi -# Get the tomcat config (use this for environment specific settings) -TOMCAT_CFG="/etc/tomcat6/tomcat6.conf" -if [ -r "$TOMCAT_CFG" ]; then - . $TOMCAT_CFG -fi - # Get instance specific config file if [ -r "/etc/sysconfig/${NAME}" ]; then . /etc/sysconfig/${NAME} fi +# Get the tomcat config (use this for environment specific settings) +TOMCAT_CFG="${CATALINA_HOME}/conf/tomcat6.conf" +if [ -r "$TOMCAT_CFG" ]; then + . $TOMCAT_CFG +fi + # Define which connector port to use CONNECTOR_PORT="${CONNECTOR_PORT:-8080}" @@ -67,7 +67,7 @@ TOMCAT_PROG="${NAME}" TOMCAT_USER="${TOMCAT_USER:-tomcat}" # Define the tomcat log file -TOMCAT_LOG="${TOMCAT_LOG:-/var/log/tomcat6/catalina.out}" +TOMCAT_LOG="${TOMCAT_LOG:-${CATALINA_HOME}/logs/catalina.out}" RETVAL="0" diff --git a/tomcat6.spec b/tomcat6.spec index f6eba5c..d7de59a 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -53,7 +53,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -560,6 +560,12 @@ fi %{appdir}/sample %changelog +* Mon Jan 17 2011 David Knox 0:6.0.29-2 +- Resolves: rhbz# 669969 - tomcat-jdbc missing +- Resolves problem with multiple instances of tomcat services. References to +- hardcoded directory locations have been changed to ${CATALINA_HOME] +- to avoid confusion + * Mon Jan 3 2011 Alexander Kurtakov 0:6.0.29-1 - Update to new upstream. - Simplify buildroot. From 0e9407e9b063b8f4fc7e8339201f31ca04f03af0 Mon Sep 17 00:00:00 2001 From: david knox Date: Wed, 2 Feb 2011 16:09:02 -0700 Subject: [PATCH 046/273] Resolves rhbz 674601 JDK Double.parseDouble DoS --- tomcat6.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tomcat6.spec b/tomcat6.spec index d7de59a..1e2c8a6 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -53,7 +53,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -72,7 +72,7 @@ Source9: jsp-api-OSGi-MANIFEST.MF Source10: %{name}-%{major_version}.%{minor_version}-log4j.properties Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch - +Patch2: %{name}-%{major_version}.%{minor_version}-rhbz-674601.patch BuildArch: noarch BuildRequires: ant @@ -207,6 +207,7 @@ find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name " %patch0 -p0 %patch1 -p0 +%patch2 -p0 %{__ln_s} $(build-classpath jakarta-taglibs-core) webapps/examples/WEB-INF/lib/jstl.jar %{__ln_s} $(build-classpath jakarta-taglibs-standard) webapps/examples/WEB-INF/lib/standard.jar @@ -560,6 +561,9 @@ fi %{appdir}/sample %changelog +* Wed Feb 2 2011 David Knox 0:6.0.29-3 +- Resolves rhbz# 674601 - JDK Double.parseDouble DoS + * Mon Jan 17 2011 David Knox 0:6.0.29-2 - Resolves: rhbz# 669969 - tomcat-jdbc missing - Resolves problem with multiple instances of tomcat services. References to From a1884b94375af74c5ba92ce4393d60c66cc9deda Mon Sep 17 00:00:00 2001 From: david knox Date: Wed, 2 Feb 2011 16:34:58 -0700 Subject: [PATCH 047/273] Adding the patch --- tomcat6-6.0-rhbz-674601.patch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tomcat6-6.0-rhbz-674601.patch diff --git a/tomcat6-6.0-rhbz-674601.patch b/tomcat6-6.0-rhbz-674601.patch new file mode 100644 index 0000000..64b927f --- /dev/null +++ b/tomcat6-6.0-rhbz-674601.patch @@ -0,0 +1,18 @@ +--- ./java/org/apache/catalina/connector/Request.java.orig 2011-02-02 15:50:25.623469439 -0700 ++++ ./java/org/apache/catalina/connector/Request.java 2011-02-02 15:51:58.832219055 -0700 +@@ -2717,8 +2717,14 @@ + int semi = entry.indexOf(";q="); + if (semi >= 0) { + try { +- quality = Double.parseDouble(entry.substring(semi + 3)); ++ String strQuality = entry.substring(semi + 3); ++ if (strQuality.length() <= 5) { ++ quality = Double.parseDouble(strQuality); ++ } else { ++ quality = 0.0; ++ } + } catch (NumberFormatException e) { ++ + quality = 0.0; + } + entry = entry.substring(0, semi); From 477b5e91d18ad52eb845b5c3426e1e8faaec8b3e Mon Sep 17 00:00:00 2001 From: Alexander Kurtakov Date: Thu, 3 Feb 2011 09:43:54 +0200 Subject: [PATCH 048/273] Update to 6.0.30. Drop jdt-core.pom which is gone upstream now. --- .gitignore | 1 + sources | 2 +- tomcat6.spec | 10 +++++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 6590968..aeb3228 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ apache-tomcat-6.0.20-src.tar.gz apache-tomcat-6.0.24-src.tar.gz apache-tomcat-6.0.26-src.tar.gz apache-tomcat-6.0.29-src.tar.gz +apache-tomcat-6.0.30-src.tar.gz diff --git a/sources b/sources index 8f99d1e..3290f93 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -260de5ae62f415b9c085c5aeed4ef24c apache-tomcat-6.0.29-src.tar.gz +7b811c9092bcb7779bd8df772744ac15 apache-tomcat-6.0.30-src.tar.gz diff --git a/tomcat6.spec b/tomcat6.spec index 1e2c8a6..74d7245 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -31,7 +31,7 @@ %global jspspec 2.1 %global major_version 6 %global minor_version 0 -%global micro_version 29 +%global micro_version 30 %global packdname apache-tomcat-%{version}-src %global servletspec 2.5 %global elspec 2.1 @@ -53,7 +53,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 3%{?dist} +Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -376,7 +376,7 @@ done # we won't install dbcp, juli-adapters and juli-extras pom files for pom in annotations-api.pom catalina.pom jasper-el.pom jasper.pom \ - catalina-ha.pom el-api.pom jasper-jdt.pom; do + catalina-ha.pom el-api.pom; do %{__cp} -a $pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-$pom base=`basename $pom .pom` %add_to_maven_depmap org.apache.tomcat $base %{version} JPP/%{name} $base @@ -561,6 +561,10 @@ fi %{appdir}/sample %changelog +* Thu Feb 3 2011 Alexander Kurtakov 0:6.0.30-1 +- Update to 6.0.30. +- Drop jdt-core.pom which is gone upstream now. + * Wed Feb 2 2011 David Knox 0:6.0.29-3 - Resolves rhbz# 674601 - JDK Double.parseDouble DoS From b6cdbc0ffa6fbd7e741f710740ffba427db3e346 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 9 Feb 2011 13:55:51 -0600 Subject: [PATCH 049/273] - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild --- tomcat6.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tomcat6.spec b/tomcat6.spec index 74d7245..960b4a7 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -53,7 +53,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -561,6 +561,9 @@ fi %{appdir}/sample %changelog +* Wed Feb 09 2011 Fedora Release Engineering - 0:6.0.30-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Thu Feb 3 2011 Alexander Kurtakov 0:6.0.30-1 - Update to 6.0.30. - Drop jdt-core.pom which is gone upstream now. From 3cb34c719a6e6042afb64eb8f76a391c8c67cb48 Mon Sep 17 00:00:00 2001 From: david knox Date: Mon, 28 Feb 2011 15:48:39 -0700 Subject: [PATCH 050/273] Rebased on tomcat 6.0.32. Corrected order of config files in tomcat6-init. Adjusted permissions on logs and confdir to get it to work. --- .gitignore | 1 + sources | 1 + tomcat6-6.0.init | 17 +++++++++-------- tomcat6.spec | 49 +++++++++++++++++++++++++++++------------------- 4 files changed, 41 insertions(+), 27 deletions(-) diff --git a/.gitignore b/.gitignore index aeb3228..5ff9c77 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ apache-tomcat-6.0.24-src.tar.gz apache-tomcat-6.0.26-src.tar.gz apache-tomcat-6.0.29-src.tar.gz apache-tomcat-6.0.30-src.tar.gz +/apache-tomcat-6.0.32-src.tar.gz diff --git a/sources b/sources index 3290f93..f1dcb10 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ 7b811c9092bcb7779bd8df772744ac15 apache-tomcat-6.0.30-src.tar.gz +19a1eaa9c9938b520d3c360d8cf4af22 apache-tomcat-6.0.32-src.tar.gz diff --git a/tomcat6-6.0.init b/tomcat6-6.0.init index 43f53a4..ae5d80d 100644 --- a/tomcat6-6.0.init +++ b/tomcat6-6.0.init @@ -43,22 +43,22 @@ else SU="/bin/su -s /bin/sh" fi +# Get the tomcat config (use this for environment specific settings) +TOMCAT_CFG="/etc/tomcat6/tomcat6.conf" +if [ -r "$TOMCAT_CFG" ]; then + . $TOMCAT_CFG +fi + # Get instance specific config file if [ -r "/etc/sysconfig/${NAME}" ]; then . /etc/sysconfig/${NAME} fi -# Get the tomcat config (use this for environment specific settings) -TOMCAT_CFG="${CATALINA_HOME}/conf/tomcat6.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/tomcat6" +TOMCAT_SCRIPT="/usr/sbin/${NAME}" # Tomcat program name TOMCAT_PROG="${NAME}" @@ -67,7 +67,8 @@ TOMCAT_PROG="${NAME}" TOMCAT_USER="${TOMCAT_USER:-tomcat}" # Define the tomcat log file -TOMCAT_LOG="${TOMCAT_LOG:-${CATALINA_HOME}/logs/catalina.out}" +TOMCAT_LOG="${TOMCAT_LOG:-/var/log/tomcat6/catalina.out}" + RETVAL="0" diff --git a/tomcat6.spec b/tomcat6.spec index 74d7245..18cceb0 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -31,7 +31,7 @@ %global jspspec 2.1 %global major_version 6 %global minor_version 0 -%global micro_version 30 +%global micro_version 32 %global packdname apache-tomcat-%{version}-src %global servletspec 2.5 %global elspec 2.1 @@ -72,7 +72,8 @@ Source9: jsp-api-OSGi-MANIFEST.MF Source10: %{name}-%{major_version}.%{minor_version}-log4j.properties Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch -Patch2: %{name}-%{major_version}.%{minor_version}-rhbz-674601.patch +# In 6.0.32 source +#Patch2: %{name}-%{major_version}.%{minor_version}-rhbz-674601.patch BuildArch: noarch BuildRequires: ant @@ -80,17 +81,19 @@ BuildRequires: ant-nodeps BuildRequires: ecj BuildRequires: findutils BuildRequires: jakarta-commons-collections -BuildRequires: apache-commons-daemon -BuildRequires: apache-commons-dbcp -BuildRequires: apache-commons-pool +BuildRequires: jakarta-commons-daemon +BuildRequires: jakarta-commons-dbcp +BuildRequires: jakarta-commons-pool BuildRequires: jakarta-taglibs-standard BuildRequires: java-1.6.0-devel BuildRequires: jpackage-utils >= 0:1.7.0 BuildRequires: junit BuildRequires: log4j -Requires: apache-commons-daemon -Requires: apache-commons-logging -Requires: apache-commons-collections +Requires: jakarta-commons-daemon +Requires: jakarta-commons-logging +Requires: jakarta-commons-collections +Requires: jakarta-commons-dbcp +Requires: jakarta-commons-pool Requires: java-1.6.0 Requires: procps Requires: %{name}-lib = %{epoch}:%{version}-%{release} @@ -159,9 +162,9 @@ Requires: %{name}-jsp-%{jspspec}-api = %{epoch}:%{version}-%{release} Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} Requires: %{name}-el-%{elspec}-api = %{epoch}:%{version}-%{release} Requires: ecj -Requires: apache-commons-collections -Requires: apache-commons-dbcp -Requires: apache-commons-pool +Requires: jakarta-commons-collections +Requires: jakarta-commons-dbcp +Requires: jakarta-commons-pool Requires(preun): coreutils %description lib @@ -207,7 +210,7 @@ find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name " %patch0 -p0 %patch1 -p0 -%patch2 -p0 +# %patch2 -p0 %{__ln_s} $(build-classpath jakarta-taglibs-core) webapps/examples/WEB-INF/lib/jstl.jar %{__ln_s} $(build-classpath jakarta-taglibs-standard) webapps/examples/WEB-INF/lib/standard.jar @@ -269,6 +272,8 @@ zip -u output/build/lib/jsp-api.jar META-INF/MANIFEST.MF %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{confdir}/Catalina/localhost %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{libdir} %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{logdir} +/bin/touch ${RPM_BUILD_ROOT}%{logdir}/catalina.out +chmod 775 ${RPM_BUILD__ROOT}%{logdir}/catalina.out %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{homedir} %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{tempdir} %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{workdir} @@ -476,7 +481,7 @@ if [ "$1" = "0" ]; then fi %files -%defattr(-,root,tomcat,-) +%defattr(-,root,tomcat,0775) %doc {LICENSE,NOTICE,RELEASE*} %attr(0755,root,root) %{_bindir}/%{name}-digest %attr(0755,root,root) %{_bindir}/%{name}-tool-wrapper @@ -486,22 +491,23 @@ fi %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %attr(0765,root,tomcat) %dir %{basedir} -%attr(0765,root,tomcat) %dir %{appdir} -%attr(0765,root,tomcat) %dir %{confdir} -%attr(0765,root,tomcat) %dir %{confdir}/Catalina -%attr(0765,root,tomcat) %dir %{confdir}/Catalina/localhost +%attr(0775,tomcat,root) %dir %{appdir} +%attr(0775,tomcat,root) %dir %{confdir} +%attr(0775,tomcat,root) %dir %{confdir}/Catalina +%attr(0775,tomcat,root) %dir %{confdir}/Catalina/localhost %config(noreplace) %{confdir}/%{name}.conf %config(noreplace) %{confdir}/*.policy %config(noreplace) %{confdir}/*.properties %config(noreplace) %{confdir}/context.xml %config(noreplace) %{confdir}/server.xml %config(noreplace) %{confdir}/log4j.properties -%attr(0664,root,tomcat) %config(noreplace) %{confdir}/tomcat-users.xml +%attr(0664,tomcat,root) %config(noreplace) %{confdir}/tomcat-users.xml %config(noreplace) %{confdir}/web.xml %attr(0765,tomcat,root) %dir %{cachedir} %attr(0765,tomcat,root) %dir %{tempdir} %attr(0765,tomcat,root) %dir %{workdir} -%attr(0765,root,tomcat) %dir %{logdir} +%attr(0775,tomcat,root) %dir %{logdir} +%attr(0664,tomcat,tomcat) %{logdir}/catalina.out %dir %{homedir} %{bindir}/bootstrap.jar %{bindir}/catalina-tasks.xml @@ -561,6 +567,11 @@ fi %{appdir}/sample %changelog +* Mon Feb 7 2011 David Knox 0:6.0.32-1 +- Rebase on 6.0.32 with several bug fixes and security fixes +- changed apache-commons to jakarta-commons to fix missing +- dependencies during install. + * Thu Feb 3 2011 Alexander Kurtakov 0:6.0.30-1 - Update to 6.0.30. - Drop jdt-core.pom which is gone upstream now. From 4aa2b84fe7b9caad8ed72c50539aafe25191b6ed Mon Sep 17 00:00:00 2001 From: david knox Date: Mon, 28 Feb 2011 16:58:35 -0700 Subject: [PATCH 051/273] resolves rhbz 640134 --- tomcat6-6.0.conf | 2 +- tomcat6.spec | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tomcat6-6.0.conf b/tomcat6-6.0.conf index 668f81a..f2fe56e 100644 --- a/tomcat6-6.0.conf +++ b/tomcat6-6.0.conf @@ -9,7 +9,7 @@ # # Where your java installation lives -JAVA_HOME="/usr/lib/jvm/java-1.6.0" +JAVA_HOME="/usr/lib/jvm/jre" # Where your tomcat installation lives CATALINA_BASE="@@@TCHOME@@@" diff --git a/tomcat6.spec b/tomcat6.spec index 575bc7e..f90861d 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -566,6 +566,9 @@ fi %{appdir}/sample %changelog +* Mon Feb 28 2011 David Knox 0:6.0.32-2 +- Resolves rhbz 640134 - setting JAVA_HOME + * Mon Feb 28 2011 David Knox 0:6.0.32-1 - Rebase on 6.0.32 with several bug fixes and security fixes - changed apache-commons to jakarta-commons to fix missing From 6dbb0bd4ab1364a09d542db61d864d1f7245b336 Mon Sep 17 00:00:00 2001 From: david knox Date: Mon, 28 Feb 2011 17:15:20 -0700 Subject: [PATCH 052/273] cleaning up spec and correcting nvr. resolving rhbz 640134 --- tomcat6.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tomcat6.spec b/tomcat6.spec index f90861d..6e691c4 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -53,7 +53,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -566,7 +566,7 @@ fi %{appdir}/sample %changelog -* Mon Feb 28 2011 David Knox 0:6.0.32-2 +* Mon Feb 28 2011 David Knox 0:6.0.32-3 - Resolves rhbz 640134 - setting JAVA_HOME * Mon Feb 28 2011 David Knox 0:6.0.32-1 From fc407ac391854bc34168da3e4cdadb3e02a96f69 Mon Sep 17 00:00:00 2001 From: david knox Date: Wed, 2 Mar 2011 15:05:43 -0700 Subject: [PATCH 053/273] resolves rhbz 681677 --- tomcat6-6.0.init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tomcat6-6.0.init b/tomcat6-6.0.init index ae5d80d..dd12ef6 100644 --- a/tomcat6-6.0.init +++ b/tomcat6-6.0.init @@ -58,7 +58,7 @@ fi CONNECTOR_PORT="${CONNECTOR_PORT:-8080}" # Path to the tomcat launch script -TOMCAT_SCRIPT="/usr/sbin/${NAME}" +TOMCAT_SCRIPT="/usr/sbin/tomcat6 # Tomcat program name TOMCAT_PROG="${NAME}" From 52d719825ce517d2c99671564cd614ba39937ec5 Mon Sep 17 00:00:00 2001 From: david knox Date: Wed, 2 Mar 2011 15:08:30 -0700 Subject: [PATCH 054/273] update release this time --- tomcat6.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tomcat6.spec b/tomcat6.spec index 6e691c4..cb5605b 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -53,7 +53,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 3%{?dist} +Release: 4%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -566,6 +566,9 @@ fi %{appdir}/sample %changelog +* Wed Mar 02 2011 David Knox 0:6.0.32-4 +- Resolves rhbz 681677 + * Mon Feb 28 2011 David Knox 0:6.0.32-3 - Resolves rhbz 640134 - setting JAVA_HOME From 6a7af86dadcf65752e06fd624d6f67a35209b901 Mon Sep 17 00:00:00 2001 From: david knox Date: Fri, 4 Mar 2011 07:07:36 -0700 Subject: [PATCH 055/273] Fixed typo in init --- tomcat6-6.0.init | 2 +- tomcat6.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tomcat6-6.0.init b/tomcat6-6.0.init index dd12ef6..919ddd1 100644 --- a/tomcat6-6.0.init +++ b/tomcat6-6.0.init @@ -58,7 +58,7 @@ fi CONNECTOR_PORT="${CONNECTOR_PORT:-8080}" # Path to the tomcat launch script -TOMCAT_SCRIPT="/usr/sbin/tomcat6 +TOMCAT_SCRIPT="/usr/sbin/tomcat6" # Tomcat program name TOMCAT_PROG="${NAME}" diff --git a/tomcat6.spec b/tomcat6.spec index cb5605b..4e00a8c 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -53,7 +53,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 4%{?dist} +Release: 5%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -566,6 +566,9 @@ fi %{appdir}/sample %changelog +* Fri Mar 04 2011 David Knox 0:6.0.32-5 +- Fixed typo in tomcat6 init + * Wed Mar 02 2011 David Knox 0:6.0.32-4 - Resolves rhbz 681677 From 8ee466247f9a8302e0047b11014324d1b3d589d1 Mon Sep 17 00:00:00 2001 From: david knox Date: Fri, 4 Mar 2011 14:09:28 -0700 Subject: [PATCH 056/273] In useradd, set daemon shell to nologin --- tomcat6.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tomcat6.spec b/tomcat6.spec index 4e00a8c..a9ce551 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -53,7 +53,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 5%{?dist} +Release: 6%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -405,7 +405,7 @@ done # add the tomcat user and group %{_sbindir}/groupadd -g %{tcuid} -r tomcat 2>/dev/null || : %{_sbindir}/useradd -c "Apache Tomcat" -u %{tcuid} -g tomcat \ - -s /bin/sh -r -d %{homedir} tomcat 2>/dev/null || : + -s /bin/nologin -r -d %{homedir} tomcat 2>/dev/null || : # Save the conf, app, and lib dirs # due to rbgz 640686. Copy them to the _tmppath so we don't pollute # the tomcat file structure @@ -566,6 +566,9 @@ fi %{appdir}/sample %changelog +* Fri Mar 04 2011 David Knox 0:6.0.32-6 +- In useradd, set tomcat user shell to /sbin/nologin + * Fri Mar 04 2011 David Knox 0:6.0.32-5 - Fixed typo in tomcat6 init From 74a4175fca98889952b7b10aa3af939ec92a1946 Mon Sep 17 00:00:00 2001 From: David Knox Date: Wed, 13 Apr 2011 13:15:12 -0600 Subject: [PATCH 057/273] rhbz 693292:manager app doesn't work (directory permissions); rhbz 677414: incorrect directory permissions; Init scripts log to /initd.log versus catalina.out --- tomcat6-6.0.init | 6 +++--- tomcat6.spec | 45 +++++++++++++++++++++++++-------------------- 2 files changed, 28 insertions(+), 23 deletions(-) diff --git a/tomcat6-6.0.init b/tomcat6-6.0.init index 919ddd1..ad81343 100644 --- a/tomcat6-6.0.init +++ b/tomcat6-6.0.init @@ -184,10 +184,10 @@ function start() { parseOptions if [ "$RETVAL" -eq "0" -a "$SECURITY_MANAGER" = "true" ]; then $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} start-security" \ - >> $TOMCAT_LOG 2>&1 || RETVAL="4" + >> /var/log/${NAME}/initd.log 2>&1 || RETVAL="4" else - [ "$RETVAL" -eq "0" ] && $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} start" >> $TOMCAT_LOG 2>&1 || RETVAL="4" + [ "$RETVAL" -eq "0" ] && $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} start" >> /var/log/${NAME}/initd.log 2>&1 || RETVAL="4" fi if [ "$RETVAL" -eq "0" ]; then log_success_msg @@ -206,7 +206,7 @@ function stop() { parseOptions if [ "$RETVAL" -eq "0" ]; then touch /var/lock/subsys/${NAME} 2>&1 || RETVAL="4" - [ "$RETVAL" -eq "0" ] && $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} stop" >> $TOMCAT_LOG 2>&1 || RETVAL="4" + [ "$RETVAL" -eq "0" ] && $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} stop" >> /var/log/${NAME}/initd.log 2>&1 || RETVAL="4" fi if [ "$RETVAL" -eq "0" ]; then count="0" diff --git a/tomcat6.spec b/tomcat6.spec index a9ce551..da3c337 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -53,7 +53,7 @@ Name: tomcat6 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 6%{?dist} +Release: 7%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -480,7 +480,7 @@ if [ "$1" = "0" ]; then fi %files -%defattr(-,root,tomcat,0775) +%defattr(0664,root,tomcat,0775) %doc {LICENSE,NOTICE,RELEASE*} %attr(0755,root,root) %{_bindir}/%{name}-digest %attr(0755,root,root) %{_bindir}/%{name}-tool-wrapper @@ -490,22 +490,22 @@ fi %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %attr(0765,root,tomcat) %dir %{basedir} -%attr(0775,tomcat,root) %dir %{appdir} -%attr(0775,tomcat,root) %dir %{confdir} -%attr(0775,tomcat,root) %dir %{confdir}/Catalina -%attr(0775,tomcat,root) %dir %{confdir}/Catalina/localhost -%config(noreplace) %{confdir}/%{name}.conf -%config(noreplace) %{confdir}/*.policy -%config(noreplace) %{confdir}/*.properties -%config(noreplace) %{confdir}/context.xml -%config(noreplace) %{confdir}/server.xml -%config(noreplace) %{confdir}/log4j.properties -%attr(0664,tomcat,root) %config(noreplace) %{confdir}/tomcat-users.xml -%config(noreplace) %{confdir}/web.xml -%attr(0765,tomcat,root) %dir %{cachedir} -%attr(0765,tomcat,root) %dir %{tempdir} -%attr(0765,tomcat,root) %dir %{workdir} -%attr(0775,tomcat,root) %dir %{logdir} +%attr(0775,root,tomcat) %dir %{appdir} +%attr(0775,root,tomcat) %dir %{confdir} +%attr(0775,root,tomcat) %dir %{confdir}/Catalina +%attr(0775,root,tomcat) %dir %{confdir}/Catalina/localhost +%attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/%{name}.conf +%attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/*.policy +%attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/*.properties +%attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/context.xml +%attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/server.xml +%attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/log4j.properties +%attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/tomcat-users.xml +%attr(0666,tomcat,tomcat) %config(noreplace) %{confdir}/web.xml +%attr(0775,root,tomcat) %dir %{cachedir} +%attr(0775,root,tomcat) %dir %{tempdir} +%attr(0775,root,tomcat) %dir %{workdir} +%attr(0775,root,tomcat) %dir %{logdir} %attr(0664,tomcat,tomcat) %{logdir}/catalina.out %dir %{homedir} %{bindir}/bootstrap.jar @@ -523,7 +523,7 @@ fi %exclude %{_mavenpomdir}/*api* %files admin-webapps -%defattr(-,root,root,-) +%defattr(0664,root,tomcat,0775) %{appdir}/host-manager %{appdir}/manager @@ -560,12 +560,17 @@ fi %{_mavenpomdir}/JPP-%{name}-el-api.pom %files webapps -%defattr(-,root,tomcat,-) +%defattr(0664,root,tomcat,0775) %{appdir}/ROOT %{appdir}/examples %{appdir}/sample %changelog +* Wed Apr 13 2011 David Knox 0:6.0.32-7 +- Resolve: rhbz 693292 - manager app doesn't work (directory permissions) +- Resolve: rhbz 677414 - incorrect directory permissions +- Init scripts log to $logdir/initd.log versus catalina.out + * Fri Mar 04 2011 David Knox 0:6.0.32-6 - In useradd, set tomcat user shell to /sbin/nologin From 167370bb1553653d4badbe6b94aea42efe3b9f8f Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Wed, 27 Apr 2011 09:54:04 +0400 Subject: [PATCH 058/273] Tomcat 7 --- .gitignore | 4 +- jsp-api-OSGi-MANIFEST.MF | 12 ++-- servlet-api-OSGi-MANIFEST.MF | 6 +- sources | 3 +- tomcat6-6.0-rhbz-674601.patch | 18 ------ ...=> tomcat7-7.0-bootstrap-MANIFEST.MF.patch | 2 +- ...digest.script => tomcat7-7.0-digest.script | 6 +- ...properties => tomcat7-7.0-log4j.properties | 0 ...h => tomcat7-7.0-tomcat-users-webapp.patch | 0 ....script => tomcat7-7.0-tool-wrapper.script | 6 +- tomcat6-6.0.conf => tomcat7-7.0.conf | 10 +-- tomcat6-6.0.init => tomcat7-7.0.init | 20 +++--- ...at6-6.0.logrotate => tomcat7-7.0.logrotate | 0 ...at6-6.0.sysconfig => tomcat7-7.0.sysconfig | 14 ++--- tomcat6-6.0.wrapper => tomcat7-7.0.wrapper | 2 +- tomcat6.spec => tomcat7.spec | 62 +++++++++++-------- 16 files changed, 79 insertions(+), 86 deletions(-) delete mode 100644 tomcat6-6.0-rhbz-674601.patch rename tomcat6-6.0-bootstrap-MANIFEST.MF.patch => tomcat7-7.0-bootstrap-MANIFEST.MF.patch (89%) rename tomcat6-6.0-digest.script => tomcat7-7.0-digest.script (89%) rename tomcat6-6.0-log4j.properties => tomcat7-7.0-log4j.properties (100%) rename tomcat6-6.0-tomcat-users-webapp.patch => tomcat7-7.0-tomcat-users-webapp.patch (100%) rename tomcat6-6.0-tool-wrapper.script => tomcat7-7.0-tool-wrapper.script (88%) rename tomcat6-6.0.conf => tomcat7-7.0.conf (82%) rename tomcat6-6.0.init => tomcat7-7.0.init (94%) rename tomcat6-6.0.logrotate => tomcat7-7.0.logrotate (100%) rename tomcat6-6.0.sysconfig => tomcat7-7.0.sysconfig (79%) rename tomcat6-6.0.wrapper => tomcat7-7.0.wrapper (98%) rename tomcat6.spec => tomcat7.spec (95%) diff --git a/.gitignore b/.gitignore index 5ff9c77..3cd0629 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,6 @@ apache-tomcat-6.0.24-src.tar.gz apache-tomcat-6.0.26-src.tar.gz apache-tomcat-6.0.29-src.tar.gz apache-tomcat-6.0.30-src.tar.gz -/apache-tomcat-6.0.32-src.tar.gz +apache-tomcat-6.0.32-src.tar.gz +apache-tomcat-7.0.12-src.tar.gz + diff --git a/jsp-api-OSGi-MANIFEST.MF b/jsp-api-OSGi-MANIFEST.MF index d5ecf7e..6470b0d 100644 --- a/jsp-api-OSGi-MANIFEST.MF +++ b/jsp-api-OSGi-MANIFEST.MF @@ -4,10 +4,10 @@ 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.0,javax.servlet.jsp.el; v - ersion=2.0,javax.servlet.jsp.resources; version=2.0,javax.servlet.jsp - .tagext; version=2.0 -Bundle-Version: 2.0.0.v200806031607 +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=2.4,javax.servlet.http; version - =2.4,javax.servlet.resources; version=2.4 +Import-Package: javax.servlet; version=3.0,javax.servlet.http; version + =3.0,javax.servlet.resources; version=3.0 diff --git a/servlet-api-OSGi-MANIFEST.MF b/servlet-api-OSGi-MANIFEST.MF index 957cb38..67c80b8 100644 --- a/servlet-api-OSGi-MANIFEST.MF +++ b/servlet-api-OSGi-MANIFEST.MF @@ -4,7 +4,7 @@ Bundle-SymbolicName: javax.servlet Bundle-ManifestVersion: 2 Bundle-Name: %bundleName Bundle-Localization: plugin -Bundle-Version: 2.5.0.v200806031605 +Bundle-Version: 3.0.0 Bundle-Vendor: %bundleProvider -Export-Package: javax.servlet;version="2.5",javax.servlet.http;version - ="2.5",javax.servlet.resources;version="2.5" +Export-Package: javax.servlet;version="3.0",javax.servlet.http;version + ="3.0",javax.servlet.resources;version="3.0" diff --git a/sources b/sources index f1dcb10..99e67fa 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -7b811c9092bcb7779bd8df772744ac15 apache-tomcat-6.0.30-src.tar.gz -19a1eaa9c9938b520d3c360d8cf4af22 apache-tomcat-6.0.32-src.tar.gz +edfd253c21b51ccadce8ec05be5e61fb apache-tomcat-7.0.12-src.tar.gz diff --git a/tomcat6-6.0-rhbz-674601.patch b/tomcat6-6.0-rhbz-674601.patch deleted file mode 100644 index 64b927f..0000000 --- a/tomcat6-6.0-rhbz-674601.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- ./java/org/apache/catalina/connector/Request.java.orig 2011-02-02 15:50:25.623469439 -0700 -+++ ./java/org/apache/catalina/connector/Request.java 2011-02-02 15:51:58.832219055 -0700 -@@ -2717,8 +2717,14 @@ - int semi = entry.indexOf(";q="); - if (semi >= 0) { - try { -- quality = Double.parseDouble(entry.substring(semi + 3)); -+ String strQuality = entry.substring(semi + 3); -+ if (strQuality.length() <= 5) { -+ quality = Double.parseDouble(strQuality); -+ } else { -+ quality = 0.0; -+ } - } catch (NumberFormatException e) { -+ - quality = 0.0; - } - entry = entry.substring(0, semi); diff --git a/tomcat6-6.0-bootstrap-MANIFEST.MF.patch b/tomcat7-7.0-bootstrap-MANIFEST.MF.patch similarity index 89% rename from tomcat6-6.0-bootstrap-MANIFEST.MF.patch rename to tomcat7-7.0-bootstrap-MANIFEST.MF.patch index ac94aac..e2ee93e 100644 --- a/tomcat6-6.0-bootstrap-MANIFEST.MF.patch +++ b/tomcat7-7.0-bootstrap-MANIFEST.MF.patch @@ -3,7 +3,7 @@ @@ -1,6 +1,5 @@ Manifest-Version: 1.0 Main-Class: org.apache.catalina.startup.Bootstrap --Class-Path: commons-daemon.jar tomcat-juli.jar +-Class-Path: commons-daemon.jar Specification-Title: Apache Tomcat Bootstrap Specification-Version: @VERSION_MAJOR_MINOR@ Specification-Vendor: Apache Software Foundation diff --git a/tomcat6-6.0-digest.script b/tomcat7-7.0-digest.script similarity index 89% rename from tomcat6-6.0-digest.script rename to tomcat7-7.0-digest.script index 41ef58e..409dc86 100644 --- a/tomcat6-6.0-digest.script +++ b/tomcat7-7.0-digest.script @@ -1,6 +1,6 @@ #!/bin/sh # -# tomcat6-digest script +# tomcat7-digest script # JPackage Project # Source functions library @@ -13,7 +13,7 @@ fi # Get the tomcat config (use this for environment specific settings) if [ -z "${TOMCAT_CFG}" ]; then - TOMCAT_CFG="/etc/tomcat6/tomcat6.conf" + TOMCAT_CFG="/etc/tomcat7/tomcat7.conf" fi if [ -r "$TOMCAT_CFG" ]; then @@ -34,7 +34,7 @@ export CLASSPATH MAIN_CLASS="org.apache.catalina.startup.Tool" BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\"" BASE_OPTIONS="" -BASE_JARS="commons-daemon tomcat6/catalina servlet" +BASE_JARS="commons-daemon tomcat7/catalina servlet" # Set parameters set_classpath $BASE_JARS diff --git a/tomcat6-6.0-log4j.properties b/tomcat7-7.0-log4j.properties similarity index 100% rename from tomcat6-6.0-log4j.properties rename to tomcat7-7.0-log4j.properties diff --git a/tomcat6-6.0-tomcat-users-webapp.patch b/tomcat7-7.0-tomcat-users-webapp.patch similarity index 100% rename from tomcat6-6.0-tomcat-users-webapp.patch rename to tomcat7-7.0-tomcat-users-webapp.patch diff --git a/tomcat6-6.0-tool-wrapper.script b/tomcat7-7.0-tool-wrapper.script similarity index 88% rename from tomcat6-6.0-tool-wrapper.script rename to tomcat7-7.0-tool-wrapper.script index bcd7561..ad75a09 100644 --- a/tomcat6-6.0-tool-wrapper.script +++ b/tomcat7-7.0-tool-wrapper.script @@ -1,6 +1,6 @@ #!/bin/sh # -# tomcat6-digest script +# tomcat7-digest script # JPackage Project # Source functions library @@ -13,7 +13,7 @@ fi # Get the tomcat config (use this for environment specific settings) if [ -z "${TOMCAT_CFG}" ]; then - TOMCAT_CFG="/etc/tomcat6/tomcat6.conf" + TOMCAT_CFG="/etc/tomcat7/tomcat7.conf" fi if [ -r "$TOMCAT_CFG" ]; then @@ -34,7 +34,7 @@ export CLASSPATH MAIN_CLASS="org.apache.catalina.startup.Tool" BASE_OPTIONS="" BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\"" -BASE_JARS="commons-daemon tomcat6/catalina servlet" +BASE_JARS="commons-daemon tomcat7/catalina servlet" # Set parameters set_classpath $BASE_JARS diff --git a/tomcat6-6.0.conf b/tomcat7-7.0.conf similarity index 82% rename from tomcat6-6.0.conf rename to tomcat7-7.0.conf index f2fe56e..3ac47d9 100644 --- a/tomcat6-6.0.conf +++ b/tomcat7-7.0.conf @@ -1,11 +1,11 @@ -# System-wide configuration file for tomcat6 services -# This will be sourced by tomcat6 and any secondary service +# System-wide configuration file for tomcat7 services +# This will be sourced by tomcat7 and any secondary service # Values will be overridden by service-specific configuration # files in /etc/sysconfig # # Use this one to change default values for all services # Change the service specific ones to affect only one service -# (see, for instance, /etc/sysconfig/tomcat6) +# (see, for instance, /etc/sysconfig/tomcat7) # # Where your java installation lives @@ -39,9 +39,9 @@ SHUTDOWN_WAIT="30" SHUTDOWN_VERBOSE="false" # Set the TOMCAT_PID location -CATALINA_PID="/var/run/tomcat6.pid" +CATALINA_PID="/var/run/tomcat7.pid" -# Connector port is 8080 for this tomcat6 instance +# Connector port is 8080 for this tomcat7 instance #CONNECTOR_PORT="8080" # If you wish to further customize your tomcat environment, diff --git a/tomcat6-6.0.init b/tomcat7-7.0.init similarity index 94% rename from tomcat6-6.0.init rename to tomcat7-7.0.init index ad81343..e3887d4 100644 --- a/tomcat6-6.0.init +++ b/tomcat7-7.0.init @@ -1,16 +1,16 @@ #!/bin/bash # -# tomcat6 This shell script takes care of starting and stopping Tomcat +# tomcat7 This shell script takes care of starting and stopping Tomcat # # chkconfig: - 80 20 # ### BEGIN INIT INFO -# Provides: tomcat6 +# Provides: tomcat7 # Required-Start: $network $syslog # Required-Stop: $network $syslog # Default-Start: # Default-Stop: -# Description: Release implementation for Servlet 2.5 and JSP 2.1 +# Description: Release implementation for Servlet 3.0 and JSP 2.2 # Short-Description: start and stop tomcat ### END INIT INFO # @@ -44,7 +44,7 @@ else fi # Get the tomcat config (use this for environment specific settings) -TOMCAT_CFG="/etc/tomcat6/tomcat6.conf" +TOMCAT_CFG="/etc/tomcat7/tomcat7.conf" if [ -r "$TOMCAT_CFG" ]; then . $TOMCAT_CFG fi @@ -58,7 +58,7 @@ fi CONNECTOR_PORT="${CONNECTOR_PORT:-8080}" # Path to the tomcat launch script -TOMCAT_SCRIPT="/usr/sbin/tomcat6" +TOMCAT_SCRIPT="/usr/sbin/tomcat7" # Tomcat program name TOMCAT_PROG="${NAME}" @@ -67,7 +67,7 @@ TOMCAT_PROG="${NAME}" TOMCAT_USER="${TOMCAT_USER:-tomcat}" # Define the tomcat log file -TOMCAT_LOG="${TOMCAT_LOG:-/var/log/tomcat6/catalina.out}" +TOMCAT_LOG="${TOMCAT_LOG:-/var/log/tomcat7/catalina.out}" RETVAL="0" @@ -109,7 +109,7 @@ function makeHomeDir() { echo "$CATALINA_HOME does not exist, creating" if [ ! -d "/usr/share/${NAME}" ]; then mkdir /usr/share/${NAME} - cp -pLR /usr/share/tomcat6/* /usr/share/${NAME} + cp -pLR /usr/share/tomcat7/* /usr/share/${NAME} fi mkdir -p /var/log/${NAME} \ /var/cache/${NAME} \ @@ -118,8 +118,8 @@ function makeHomeDir() { 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/tomcat6 ${CATALINA_HOME}/lib - ln -fs /usr/share/tomcat6/webapps ${CATALINA_HOME}/webapps + ln -fs /usr/share/java/tomcat7 ${CATALINA_HOME}/lib + ln -fs /usr/share/tomcat7/webapps ${CATALINA_HOME}/webapps chown ${TOMCAT_USER}:${TOMCAT_USER} /var/log/${NAME} fi } @@ -171,7 +171,7 @@ function start() { if [ "$RETVAL" -eq "0" -a "$?" -eq "0" ]; then chown ${TOMCAT_USER}:${TOMCAT_USER} $TOMCAT_LOG fi - if [ "$CATALINA_HOME" != "/usr/share/tomcat6" -a "$RETVAL" -eq "0" ]; then + if [ "$CATALINA_HOME" != "/usr/share/tomcat7" -a "$RETVAL" -eq "0" ]; then # Create a tomcat directory if it doesn't exist makeHomeDir # If CATALINA_HOME doesn't exist modify port number so that diff --git a/tomcat6-6.0.logrotate b/tomcat7-7.0.logrotate similarity index 100% rename from tomcat6-6.0.logrotate rename to tomcat7-7.0.logrotate diff --git a/tomcat6-6.0.sysconfig b/tomcat7-7.0.sysconfig similarity index 79% rename from tomcat6-6.0.sysconfig rename to tomcat7-7.0.sysconfig index caefeed..69cd0a1 100644 --- a/tomcat6-6.0.sysconfig +++ b/tomcat7-7.0.sysconfig @@ -1,15 +1,15 @@ -# Service-specific configuration file for tomcat6. This will be sourced by +# Service-specific configuration file for tomcat7. This will be sourced by # the SysV init script after the global configuration file -# /etc/tomcat6/tomcat6.conf, thus allowing values to be overridden in +# /etc/tomcat7/tomcat7.conf, thus allowing values to be overridden in # a per-service manner. # # NEVER change the init script itself. To change values for all services make -# your changes in /etc/tomcat6/tomcat6.conf +# your changes in /etc/tomcat7/tomcat7.conf # # To change values for a specific service make your edits here. # To create a new service create a link from /etc/init.d/ to -# /etc/init.d/tomcat6 (do not copy the init script) and make a copy of the -# /etc/sysconfig/tomcat6 file to /etc/sysconfig/ and change +# /etc/init.d/tomcat7 (do not copy the init script) and make a copy of the +# /etc/sysconfig/tomcat7 file to /etc/sysconfig/ and change # the property values so the two services won't conflict. Register the new # service in the system as usual (see chkconfig and similars). # @@ -45,9 +45,9 @@ #SHUTDOWN_VERBOSE="false" # Set the TOMCAT_PID location -#CATALINA_PID="/var/run/tomcat6.pid" +#CATALINA_PID="/var/run/tomcat7.pid" -# Connector port is 8080 for this tomcat6 instance +# Connector port is 8080 for this tomcat7 instance #CONNECTOR_PORT="8080" # If you wish to further customize your tomcat environment, diff --git a/tomcat6-6.0.wrapper b/tomcat7-7.0.wrapper similarity index 98% rename from tomcat6-6.0.wrapper rename to tomcat7-7.0.wrapper index 0e95331..dc3a6f1 100644 --- a/tomcat6-6.0.wrapper +++ b/tomcat7-7.0.wrapper @@ -9,7 +9,7 @@ fi # Get the tomcat config (use this for environment specific settings) #if [ -z "${TOMCAT_CFG}" ]; then -# TOMCAT_CFG="/etc/tomcat6/tomcat6.conf" +# TOMCAT_CFG="/etc/tomcat7/tomcat7.conf" #fi #if [ -r "$TOMCAT_CFG" ]; then diff --git a/tomcat6.spec b/tomcat7.spec similarity index 95% rename from tomcat6.spec rename to tomcat7.spec index da3c337..2a850b5 100644 --- a/tomcat6.spec +++ b/tomcat7.spec @@ -28,13 +28,13 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -%global jspspec 2.1 -%global major_version 6 +%global jspspec 2.2 +%global major_version 7 %global minor_version 0 -%global micro_version 32 +%global micro_version 12 %global packdname apache-tomcat-%{version}-src -%global servletspec 2.5 -%global elspec 2.1 +%global servletspec 3.0 +%global elspec 2.2 %global tcuid 91 # FHS 2.3 compliant tree structure - http://www.pathname.com/fhs/2.3/ @@ -50,10 +50,10 @@ %global workdir %{cachedir}/work %global _initrddir %{_sysconfdir}/init.d -Name: tomcat6 +Name: tomcat7 Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 7%{?dist} +Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -72,8 +72,7 @@ Source9: jsp-api-OSGi-MANIFEST.MF Source10: %{name}-%{major_version}.%{minor_version}-log4j.properties Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch -# In 6.0.32 source -#Patch2: %{name}-%{major_version}.%{minor_version}-rhbz-674601.patch + BuildArch: noarch BuildRequires: ant @@ -146,7 +145,7 @@ Javadoc generated documentation for Apache Tomcat. Group: Internet/WWW/Dynamic Content Summary: Apache Tomcat JSP API implementation classes Provides: jsp = %{jspspec} -Provides: jsp21 +Provides: jsp22 Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} Requires(post): chkconfig Requires(postun): chkconfig @@ -175,7 +174,7 @@ Group: Internet/WWW/Dynamic Content Summary: Apache Tomcat Servlet API implementation classes Provides: servlet = %{servletspec} Provides: servlet6 -Provides: servlet25 +Provides: servlet3 Requires(post): chkconfig Requires(postun): chkconfig @@ -228,14 +227,22 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dcommons-daemon.native.src.tgz="HACK" \ -Djasper-jdt.jar="$(build-classpath ecj)" \ -Djdt.jar="$(build-classpath ecj)" \ - -Dtomcat-dbcp.jar="$(build-classpath apache-commons-dbcp)" \ -Dtomcat-native.tar.gz="HACK" \ -Dversion="%{version}" \ -Dversion.build="%{micro_version}" # javadoc generation - %{ant} -f dist.xml dist-prepare - %{ant} -f dist.xml dist-source - %{ant} -f dist.xml dist-javadoc + %{ant} -Dbase.path="." \ + -Dbuild.compiler="modern" \ + -Dcommons-collections.jar="$(build-classpath apache-commons-collections)" \ + -Dcommons-daemon.jar="$(build-classpath apache-commons-daemon)" \ + -Dcommons-daemon.native.src.tgz="HACK" \ + -Djasper-jdt.jar="$(build-classpath ecj)" \ + -Djdt.jar="$(build-classpath ecj)" \ + -Dtomcat-native.tar.gz="HACK" \ + -Dversion="%{version}" \ + -Dversion.build="%{micro_version}" \ + dist-prepare dist-source javadoc + # remove some jars that we'll replace with symlinks later %{__rm} output/build/bin/commons-daemon.jar \ output/build/lib/ecj.jar @@ -341,7 +348,7 @@ pushd ${RPM_BUILD_ROOT}%{libdir} %{__ln_s} $(build-classpath log4j) log4j.jar %{__ln_s} $(build-classpath ecj) jasper-jdt.jar - # Link the juli jar into /usr/share/java/tomcat6 + # Link the juli jar into /usr/share/java/tomcat7 %{__ln_s} %{bindir}/tomcat-juli.jar . popd @@ -364,7 +371,7 @@ popd # Generate a depmap fragment javax.servlet:servlet-api pointing to -# tomcat6-servlet-2.5-api for backwards compatibility +# tomcat7-servlet-3.0-api for backwards compatibility %add_to_maven_depmap javax.servlet servlet-api %{servletspec} JPP %{name}-servlet-%{servletspec}-api # also provide jetty depmap (originally in jetty package, but it's cleaner to have it here) %add_to_maven_depmap org.mortbay.jetty servlet-api %{servletspec} JPP %{name}-servlet-%{servletspec}-api @@ -379,25 +386,25 @@ for pom in *.pom; do done # we won't install dbcp, juli-adapters and juli-extras pom files -for pom in annotations-api.pom catalina.pom jasper-el.pom jasper.pom \ - catalina-ha.pom el-api.pom; do +for pom in tomcat-annotations-api.pom tomcat-catalina.pom tomcat-jasper-el.pom tomcat-jasper.pom \ + tomcat-catalina-ha.pom tomcat-el-api.pom; do %{__cp} -a $pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-$pom base=`basename $pom .pom` %add_to_maven_depmap org.apache.tomcat $base %{version} JPP/%{name} $base done -# servlet-api jsp-api and el-api are not in tomcat6 subdir, since they are widely re-used elsewhere -for pom in jsp-api.pom servlet-api.pom el-api.pom;do +# servlet-api jsp-api and el-api are not in tomcat7 subdir, since they are widely re-used elsewhere +for pom in tomcat-jsp-api.pom tomcat-servlet-api.pom tomcat-el-api.pom;do %{__cp} -a $pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-%{name}-$pom base=`basename $pom .pom` %add_to_maven_depmap org.apache.tomcat $base %{version} JPP %{name}-$base done # two special pom where jar files have different names -%{__cp} -a tribes.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-catalina-tribes.pom +%{__cp} -a tomcat-tribes.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-catalina-tribes.pom %add_to_maven_depmap org.apache.tomcat tribes %{version} JPP/%{name} catalina-tribes -%{__cp} -a juli.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-juli.pom +%{__cp} -a tomcat-juli.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-juli.pom %add_to_maven_depmap org.apache.tomcat juli %{version} JPP/%{name} tomcat-juli @@ -539,7 +546,7 @@ fi %defattr(-,root,root,-) %{_javadir}/%{name}-jsp-%{jspspec}*.jar %{_javadir}/%{name}-jsp-api.jar -%{_mavenpomdir}/JPP-%{name}-jsp-api.pom +%{_mavenpomdir}/JPP-%{name}-tomcat-jsp-api.pom %files lib %defattr(-,root,root,-) @@ -550,14 +557,14 @@ fi %{_javadir}/%{name}-servlet-%{servletspec}*.jar %{_javadir}/%{name}-servlet-api.jar %{_mavendepmapfragdir}/%{name}-servlet-api -%{_mavenpomdir}/JPP-%{name}-servlet-api.pom +%{_mavenpomdir}/JPP-%{name}-tomcat-servlet-api.pom %files el-%{elspec}-api %defattr(-,root,root,-) %{_javadir}/%{name}-el-%{elspec}-api.jar %{_javadir}/%{name}-el-api.jar %{_javadir}/%{name}/%{name}-el-%{elspec}-api.jar -%{_mavenpomdir}/JPP-%{name}-el-api.pom +%{_mavenpomdir}/JPP-%{name}-tomcat-el-api.pom %files webapps %defattr(0664,root,tomcat,0775) @@ -566,6 +573,9 @@ fi %{appdir}/sample %changelog +* Wed Apr 27 2011 Ivan Afonichev 0:7.0.12-1 +- Tomcat7 + * Wed Apr 13 2011 David Knox 0:6.0.32-7 - Resolve: rhbz 693292 - manager app doesn't work (directory permissions) - Resolve: rhbz 677414 - incorrect directory permissions From 5b34837704327ce2de929eff3002bc627f1b9f1c Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Thu, 28 Apr 2011 09:35:45 +0400 Subject: [PATCH 059/273] - Package now named just tomcat instead of tomcat7 - Removed Provides: %{name}-log4j - Switched to apache-commons-* names instead of jakarta-commons-* . - Remove the old changelog - BR/R java >= 1:1.6.0 , same for java-devel - Removed old tomcat6 crap --- ... => tomcat-7.0-bootstrap-MANIFEST.MF.patch | 0 ...-digest.script => tomcat-7.0-digest.script | 6 +- ....properties => tomcat-7.0-log4j.properties | 0 tomcat-7.0-tomcat-users-webapp.patch | 17 + ...r.script => tomcat-7.0-tool-wrapper.script | 6 +- tomcat7-7.0.conf => tomcat-7.0.conf | 10 +- tomcat7-7.0.init => tomcat-7.0.init | 18 +- tomcat7-7.0.logrotate => tomcat-7.0.logrotate | 0 tomcat7-7.0.sysconfig => tomcat-7.0.sysconfig | 14 +- tomcat7-7.0.wrapper => tomcat-7.0.wrapper | 2 +- tomcat7.spec => tomcat.spec | 307 ++---------------- tomcat7-7.0-tomcat-users-webapp.patch | 12 - 12 files changed, 72 insertions(+), 320 deletions(-) rename tomcat7-7.0-bootstrap-MANIFEST.MF.patch => tomcat-7.0-bootstrap-MANIFEST.MF.patch (100%) rename tomcat7-7.0-digest.script => tomcat-7.0-digest.script (89%) rename tomcat7-7.0-log4j.properties => tomcat-7.0-log4j.properties (100%) create mode 100644 tomcat-7.0-tomcat-users-webapp.patch rename tomcat7-7.0-tool-wrapper.script => tomcat-7.0-tool-wrapper.script (88%) rename tomcat7-7.0.conf => tomcat-7.0.conf (82%) rename tomcat7-7.0.init => tomcat-7.0.init (94%) rename tomcat7-7.0.logrotate => tomcat-7.0.logrotate (100%) rename tomcat7-7.0.sysconfig => tomcat-7.0.sysconfig (76%) rename tomcat7-7.0.wrapper => tomcat-7.0.wrapper (98%) rename tomcat7.spec => tomcat.spec (64%) delete mode 100644 tomcat7-7.0-tomcat-users-webapp.patch diff --git a/tomcat7-7.0-bootstrap-MANIFEST.MF.patch b/tomcat-7.0-bootstrap-MANIFEST.MF.patch similarity index 100% rename from tomcat7-7.0-bootstrap-MANIFEST.MF.patch rename to tomcat-7.0-bootstrap-MANIFEST.MF.patch diff --git a/tomcat7-7.0-digest.script b/tomcat-7.0-digest.script similarity index 89% rename from tomcat7-7.0-digest.script rename to tomcat-7.0-digest.script index 409dc86..2ff7e64 100644 --- a/tomcat7-7.0-digest.script +++ b/tomcat-7.0-digest.script @@ -1,6 +1,6 @@ #!/bin/sh # -# tomcat7-digest script +# tomcat-digest script # JPackage Project # Source functions library @@ -13,7 +13,7 @@ fi # Get the tomcat config (use this for environment specific settings) if [ -z "${TOMCAT_CFG}" ]; then - TOMCAT_CFG="/etc/tomcat7/tomcat7.conf" + TOMCAT_CFG="/etc/tomcat/tomcat.conf" fi if [ -r "$TOMCAT_CFG" ]; then @@ -34,7 +34,7 @@ export CLASSPATH MAIN_CLASS="org.apache.catalina.startup.Tool" BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\"" BASE_OPTIONS="" -BASE_JARS="commons-daemon tomcat7/catalina servlet" +BASE_JARS="commons-daemon tomcat/catalina servlet" # Set parameters set_classpath $BASE_JARS diff --git a/tomcat7-7.0-log4j.properties b/tomcat-7.0-log4j.properties similarity index 100% rename from tomcat7-7.0-log4j.properties rename to tomcat-7.0-log4j.properties diff --git a/tomcat-7.0-tomcat-users-webapp.patch b/tomcat-7.0-tomcat-users-webapp.patch new file mode 100644 index 0000000..9f05e37 --- /dev/null +++ b/tomcat-7.0-tomcat-users-webapp.patch @@ -0,0 +1,17 @@ +--- conf/tomcat-users.xml~ 2008-01-28 17:41:06.000000000 -0500 ++++ conf/tomcat-users.xml 2008-03-07 19:40:07.000000000 -0500 +@@ -23,4 +23,14 @@ + + + --> ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + diff --git a/tomcat7-7.0-tool-wrapper.script b/tomcat-7.0-tool-wrapper.script similarity index 88% rename from tomcat7-7.0-tool-wrapper.script rename to tomcat-7.0-tool-wrapper.script index ad75a09..2640ce2 100644 --- a/tomcat7-7.0-tool-wrapper.script +++ b/tomcat-7.0-tool-wrapper.script @@ -1,6 +1,6 @@ #!/bin/sh # -# tomcat7-digest script +# tomcat-digest script # JPackage Project # Source functions library @@ -13,7 +13,7 @@ fi # Get the tomcat config (use this for environment specific settings) if [ -z "${TOMCAT_CFG}" ]; then - TOMCAT_CFG="/etc/tomcat7/tomcat7.conf" + TOMCAT_CFG="/etc/tomcat/tomcat.conf" fi if [ -r "$TOMCAT_CFG" ]; then @@ -34,7 +34,7 @@ export CLASSPATH MAIN_CLASS="org.apache.catalina.startup.Tool" BASE_OPTIONS="" BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\"" -BASE_JARS="commons-daemon tomcat7/catalina servlet" +BASE_JARS="commons-daemon tomcat/catalina servlet" # Set parameters set_classpath $BASE_JARS diff --git a/tomcat7-7.0.conf b/tomcat-7.0.conf similarity index 82% rename from tomcat7-7.0.conf rename to tomcat-7.0.conf index 3ac47d9..a500479 100644 --- a/tomcat7-7.0.conf +++ b/tomcat-7.0.conf @@ -1,11 +1,11 @@ -# System-wide configuration file for tomcat7 services -# This will be sourced by tomcat7 and any secondary service +# System-wide configuration file for tomcat services +# This will be sourced by tomcat and any secondary service # Values will be overridden by service-specific configuration # files in /etc/sysconfig # # Use this one to change default values for all services # Change the service specific ones to affect only one service -# (see, for instance, /etc/sysconfig/tomcat7) +# (see, for instance, /etc/sysconfig/tomcat) # # Where your java installation lives @@ -39,9 +39,9 @@ SHUTDOWN_WAIT="30" SHUTDOWN_VERBOSE="false" # Set the TOMCAT_PID location -CATALINA_PID="/var/run/tomcat7.pid" +CATALINA_PID="/var/run/tomcat.pid" -# Connector port is 8080 for this tomcat7 instance +# Connector port is 8080 for this tomcat instance #CONNECTOR_PORT="8080" # If you wish to further customize your tomcat environment, diff --git a/tomcat7-7.0.init b/tomcat-7.0.init similarity index 94% rename from tomcat7-7.0.init rename to tomcat-7.0.init index e3887d4..7808d23 100644 --- a/tomcat7-7.0.init +++ b/tomcat-7.0.init @@ -1,11 +1,11 @@ #!/bin/bash # -# tomcat7 This shell script takes care of starting and stopping Tomcat +# tomcat This shell script takes care of starting and stopping Tomcat # # chkconfig: - 80 20 # ### BEGIN INIT INFO -# Provides: tomcat7 +# Provides: tomcat # Required-Start: $network $syslog # Required-Stop: $network $syslog # Default-Start: @@ -44,7 +44,7 @@ else fi # Get the tomcat config (use this for environment specific settings) -TOMCAT_CFG="/etc/tomcat7/tomcat7.conf" +TOMCAT_CFG="/etc/tomcat/tomcat.conf" if [ -r "$TOMCAT_CFG" ]; then . $TOMCAT_CFG fi @@ -58,7 +58,7 @@ fi CONNECTOR_PORT="${CONNECTOR_PORT:-8080}" # Path to the tomcat launch script -TOMCAT_SCRIPT="/usr/sbin/tomcat7" +TOMCAT_SCRIPT="/usr/sbin/tomcat" # Tomcat program name TOMCAT_PROG="${NAME}" @@ -67,7 +67,7 @@ TOMCAT_PROG="${NAME}" TOMCAT_USER="${TOMCAT_USER:-tomcat}" # Define the tomcat log file -TOMCAT_LOG="${TOMCAT_LOG:-/var/log/tomcat7/catalina.out}" +TOMCAT_LOG="${TOMCAT_LOG:-/var/log/tomcat/catalina.out}" RETVAL="0" @@ -109,7 +109,7 @@ function makeHomeDir() { echo "$CATALINA_HOME does not exist, creating" if [ ! -d "/usr/share/${NAME}" ]; then mkdir /usr/share/${NAME} - cp -pLR /usr/share/tomcat7/* /usr/share/${NAME} + cp -pLR /usr/share/tomcat/* /usr/share/${NAME} fi mkdir -p /var/log/${NAME} \ /var/cache/${NAME} \ @@ -118,8 +118,8 @@ function makeHomeDir() { 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/tomcat7 ${CATALINA_HOME}/lib - ln -fs /usr/share/tomcat7/webapps ${CATALINA_HOME}/webapps + ln -fs /usr/share/java/tomcat ${CATALINA_HOME}/lib + ln -fs /usr/share/tomcat/webapps ${CATALINA_HOME}/webapps chown ${TOMCAT_USER}:${TOMCAT_USER} /var/log/${NAME} fi } @@ -171,7 +171,7 @@ function start() { if [ "$RETVAL" -eq "0" -a "$?" -eq "0" ]; then chown ${TOMCAT_USER}:${TOMCAT_USER} $TOMCAT_LOG fi - if [ "$CATALINA_HOME" != "/usr/share/tomcat7" -a "$RETVAL" -eq "0" ]; then + if [ "$CATALINA_HOME" != "/usr/share/tomcat" -a "$RETVAL" -eq "0" ]; then # Create a tomcat directory if it doesn't exist makeHomeDir # If CATALINA_HOME doesn't exist modify port number so that diff --git a/tomcat7-7.0.logrotate b/tomcat-7.0.logrotate similarity index 100% rename from tomcat7-7.0.logrotate rename to tomcat-7.0.logrotate diff --git a/tomcat7-7.0.sysconfig b/tomcat-7.0.sysconfig similarity index 76% rename from tomcat7-7.0.sysconfig rename to tomcat-7.0.sysconfig index 69cd0a1..c1337e8 100644 --- a/tomcat7-7.0.sysconfig +++ b/tomcat-7.0.sysconfig @@ -1,15 +1,15 @@ -# Service-specific configuration file for tomcat7. This will be sourced by +# Service-specific configuration file for tomcat. This will be sourced by # the SysV init script after the global configuration file -# /etc/tomcat7/tomcat7.conf, thus allowing values to be overridden in +# /etc/tomcat/tomcat.conf, thus allowing values to be overridden in # a per-service manner. # # NEVER change the init script itself. To change values for all services make -# your changes in /etc/tomcat7/tomcat7.conf +# your changes in /etc/tomcat/tomcat.conf # # To change values for a specific service make your edits here. # To create a new service create a link from /etc/init.d/ to -# /etc/init.d/tomcat7 (do not copy the init script) and make a copy of the -# /etc/sysconfig/tomcat7 file to /etc/sysconfig/ and change +# /etc/init.d/tomcat (do not copy the init script) and make a copy of the +# /etc/sysconfig/tomcat file to /etc/sysconfig/ and change # the property values so the two services won't conflict. Register the new # service in the system as usual (see chkconfig and similars). # @@ -45,9 +45,9 @@ #SHUTDOWN_VERBOSE="false" # Set the TOMCAT_PID location -#CATALINA_PID="/var/run/tomcat7.pid" +#CATALINA_PID="/var/run/tomcat.pid" -# Connector port is 8080 for this tomcat7 instance +# Connector port is 8080 for this tomcat instance #CONNECTOR_PORT="8080" # If you wish to further customize your tomcat environment, diff --git a/tomcat7-7.0.wrapper b/tomcat-7.0.wrapper similarity index 98% rename from tomcat7-7.0.wrapper rename to tomcat-7.0.wrapper index dc3a6f1..ad3091b 100644 --- a/tomcat7-7.0.wrapper +++ b/tomcat-7.0.wrapper @@ -9,7 +9,7 @@ fi # Get the tomcat config (use this for environment specific settings) #if [ -z "${TOMCAT_CFG}" ]; then -# TOMCAT_CFG="/etc/tomcat7/tomcat7.conf" +# TOMCAT_CFG="/etc/tomcat/tomcat.conf" #fi #if [ -r "$TOMCAT_CFG" ]; then diff --git a/tomcat7.spec b/tomcat.spec similarity index 64% rename from tomcat7.spec rename to tomcat.spec index 2a850b5..67a2994 100644 --- a/tomcat7.spec +++ b/tomcat.spec @@ -50,10 +50,10 @@ %global workdir %{cachedir}/work %global _initrddir %{_sysconfdir}/init.d -Name: tomcat7 +Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: Networking/Daemons @@ -79,21 +79,21 @@ BuildRequires: ant BuildRequires: ant-nodeps BuildRequires: ecj BuildRequires: findutils -BuildRequires: jakarta-commons-collections -BuildRequires: jakarta-commons-daemon -BuildRequires: jakarta-commons-dbcp -BuildRequires: jakarta-commons-pool +BuildRequires: apache-commons-collections +BuildRequires: apache-commons-daemon +BuildRequires: apache-commons-dbcp +BuildRequires: apache-commons-pool BuildRequires: jakarta-taglibs-standard -BuildRequires: java-1.6.0-devel +BuildRequires: java-devel >= 1:1.6.0 BuildRequires: jpackage-utils >= 0:1.7.0 BuildRequires: junit BuildRequires: log4j -Requires: jakarta-commons-daemon -Requires: jakarta-commons-logging -Requires: jakarta-commons-collections -Requires: jakarta-commons-dbcp -Requires: jakarta-commons-pool -Requires: java-1.6.0 +Requires: apache-commons-daemon +Requires: apache-commons-logging +Requires: apache-commons-collections +Requires: apache-commons-dbcp +Requires: apache-commons-pool +Requires: java >= 1:1.6.0 Requires: procps Requires: %{name}-lib = %{epoch}:%{version}-%{release} Requires(pre): shadow-utils @@ -105,9 +105,6 @@ Requires(preun): redhat-lsb Requires(post): jpackage-utils Requires(postun): jpackage-utils -# added after log4j sub-package was removed -Provides: %{name}-log4j = %{epoch}:%{version}-%{release} - %description Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServer Pages technologies. @@ -161,9 +158,9 @@ Requires: %{name}-jsp-%{jspspec}-api = %{epoch}:%{version}-%{release} Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} Requires: %{name}-el-%{elspec}-api = %{epoch}:%{version}-%{release} Requires: ecj -Requires: jakarta-commons-collections -Requires: jakarta-commons-dbcp -Requires: jakarta-commons-pool +Requires: apache-commons-collections +Requires: apache-commons-dbcp +Requires: apache-commons-pool Requires(preun): coreutils %description lib @@ -238,7 +235,6 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dcommons-daemon.native.src.tgz="HACK" \ -Djasper-jdt.jar="$(build-classpath ecj)" \ -Djdt.jar="$(build-classpath ecj)" \ - -Dtomcat-native.tar.gz="HACK" \ -Dversion="%{version}" \ -Dversion.build="%{micro_version}" \ dist-prepare dist-source javadoc @@ -348,7 +344,7 @@ pushd ${RPM_BUILD_ROOT}%{libdir} %{__ln_s} $(build-classpath log4j) log4j.jar %{__ln_s} $(build-classpath ecj) jasper-jdt.jar - # Link the juli jar into /usr/share/java/tomcat7 + # Link the juli jar into /usr/share/java/tomcat %{__ln_s} %{bindir}/tomcat-juli.jar . popd @@ -371,7 +367,7 @@ popd # Generate a depmap fragment javax.servlet:servlet-api pointing to -# tomcat7-servlet-3.0-api for backwards compatibility +# tomcat-servlet-3.0-api for backwards compatibility %add_to_maven_depmap javax.servlet servlet-api %{servletspec} JPP %{name}-servlet-%{servletspec}-api # also provide jetty depmap (originally in jetty package, but it's cleaner to have it here) %add_to_maven_depmap org.mortbay.jetty servlet-api %{servletspec} JPP %{name}-servlet-%{servletspec}-api @@ -393,7 +389,7 @@ for pom in tomcat-annotations-api.pom tomcat-catalina.pom tomcat-jasper-el.pom t %add_to_maven_depmap org.apache.tomcat $base %{version} JPP/%{name} $base done -# servlet-api jsp-api and el-api are not in tomcat7 subdir, since they are widely re-used elsewhere +# servlet-api jsp-api and el-api are not in tomcat subdir, since they are widely re-used elsewhere for pom in tomcat-jsp-api.pom tomcat-servlet-api.pom tomcat-el-api.pom;do %{__cp} -a $pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-%{name}-$pom base=`basename $pom .pom` @@ -413,12 +409,6 @@ done %{_sbindir}/groupadd -g %{tcuid} -r tomcat 2>/dev/null || : %{_sbindir}/useradd -c "Apache Tomcat" -u %{tcuid} -g tomcat \ -s /bin/nologin -r -d %{homedir} tomcat 2>/dev/null || : -# Save the conf, app, and lib dirs -# due to rbgz 640686. Copy them to the _tmppath so we don't pollute -# the tomcat file structure -[ -d %{appdir} ] && %{__cp} -rp %{appdir} %{_tmppath}/%{name}-webapps.bak || : -[ -d %{confdir} ] && %{__cp} -rp %{confdir} %{_tmppath}/%{name}-confdir.bak || : -[ -d %{libdir} ] && %{__cp} -rp %{libdir} %{_tmppath}/%{name}-libdir.bak || : %post # install but don't activate @@ -573,256 +563,13 @@ fi %{appdir}/sample %changelog +* Wed Apr 28 2011 Ivan Afonichev 0:7.0.12-1 +- Package now named just tomcat instead of tomcat7 +- Removed Provides: %{name}-log4j +- Switched to apache-commons-* names instead of jakarta-commons-* . +- Remove the old changelog +- BR/R java >= 1:1.6.0 , same for java-devel +- Removed old tomcat6 crap + * Wed Apr 27 2011 Ivan Afonichev 0:7.0.12-1 - Tomcat7 - -* Wed Apr 13 2011 David Knox 0:6.0.32-7 -- Resolve: rhbz 693292 - manager app doesn't work (directory permissions) -- Resolve: rhbz 677414 - incorrect directory permissions -- Init scripts log to $logdir/initd.log versus catalina.out - -* Fri Mar 04 2011 David Knox 0:6.0.32-6 -- In useradd, set tomcat user shell to /sbin/nologin - -* Fri Mar 04 2011 David Knox 0:6.0.32-5 -- Fixed typo in tomcat6 init - -* Wed Mar 02 2011 David Knox 0:6.0.32-4 -- Resolves rhbz 681677 - -* Mon Feb 28 2011 David Knox 0:6.0.32-3 -- Resolves rhbz 640134 - setting JAVA_HOME - -* Mon Feb 28 2011 David Knox 0:6.0.32-1 -- Rebase on 6.0.32 with several bug fixes and security fixes -- changed apache-commons to jakarta-commons to fix missing -- dependencies during install. Adjusted permissions on logs and -- conf dirs so init worked. Reversed order of reading conf files - -* Wed Feb 09 2011 Fedora Release Engineering - 0:6.0.30-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Thu Feb 3 2011 Alexander Kurtakov 0:6.0.30-1 -- Update to 6.0.30. -- Drop jdt-core.pom which is gone upstream now. - -* Wed Feb 2 2011 David Knox 0:6.0.29-3 -- Resolves rhbz# 674601 - JDK Double.parseDouble DoS - -* Mon Jan 17 2011 David Knox 0:6.0.29-2 -- Resolves: rhbz# 669969 - tomcat-jdbc missing -- Resolves problem with multiple instances of tomcat services. References to -- hardcoded directory locations have been changed to ${CATALINA_HOME] -- to avoid confusion - -* Mon Jan 3 2011 Alexander Kurtakov 0:6.0.29-1 -- Update to new upstream. -- Simplify buildroot. -- Don't require files but packages. - -* Wed Dec 8 2010 Stanislav Ochotnicky - 0:6.0.26-18 -- Add api jars without spec version symlinks -- Remove clean section -- Remove whitespaces at the EOLs - -* Mon Dec 6 2010 Stanislav Ochotnicky - 0:6.0.26-17 -- Add jetty to servlet-api depmap - -* Thu Dec 2 2010 Stanislav Ochotnicky - 0:6.0.26-16 -- Fixes according to guidelines (versionless jars, no random defattrs) -- Simplify pom installation by splitting to more steps -- Formatting cleanups -- Removed log4j subpackage (used bundled log4j, replaced by symlink) - -* Thu Dec 2 2010 Stanislav Ochotnicky - 0:6.0.26-15 -- Fix log4j symlink (Resolves rhbz#654660) - -* Mon Nov 29 2010 David Knox 0:6.0.26-14 -- Resolving rhbz 640686: save appdir, confdir, and libdir during -- pre and copy them back during posttrans. The directories are -- copied to /var/tmp. They are copied back during posttrans and -- removed from /var/tmp. - -* Tue Nov 9 2010 Chris Spike 0:6.0.26-13 -- Added javax.servlet:servlet-api depmap entry to servlet-2.5-api subpackage - -* Thu Oct 14 2010 David Knox 0:6.0.26-12 -- Resolves rhbz#640686 - Upgrade of tomcat6 wipes out directories -- WARNING - Back up all files that need to be preserved before -- package update or uninstall - WARNING -- Resolves: rhbz#638914 - update versions of commons-collections, -- commons-dbcp, and commons-pool - -* Thu Oct 07 2010 David Knox 0:6.0.26-11 -- resolves rhbz#640837 - tomcat user requires login shell - -* Mon Oct 04 2010 David Knox 0:6.0.26-10 -- ant-nodeps is breaking the build. Put ant-nodeps on the -- OPT_JAR_LIST - -* Fri Oct 01 2010 David Knox 0:6.0.26-9 -- Resolves rhbz#575341 - Additionally created instances of Tomcat -- are broken - -* Fri Jul 02 2010 David Knox 0:6.0.26-8 -- LSB initscript compliance - -* Thu Jul 01 2010 David Knox 0:6.0.26-7 -- Made elspec the standard for elspec %post and %postun. - -* Tue Jun 29 2010 David Knox 0:6.0.26-6 -- Completed package and file sections. Added el-spec. Fixed -- directory permission problems. - -* Thu May 6 2010 David Knox 0:6.0.26-5 -- Working on 589145. Tomcat can't find java compiler for java. - -* Tue Apr 08 2010 David Knox 0:6.0.26-4 -- Moved build-jar-repository to later in the install process. - -* Tue Apr 06 2010 David Knox 0:6.0.26-3 -- Incremented the Release tag to 3 to avoid any confusion about which -- is the most recent - -* Tue Apr 06 2010 David Knox 0:6.0.26-1 -- Solved packaging problems involving taglibs-standard -- Solved packaging problems involving jakarta-commons -- Corrected Requires(post) to Requires and checked companion BuildRequires - -* Mon Mar 29 2010 David Knox 0:6.0.26-2 -- Update source to tomcat6.0.26 -- Bugzilla 572357 - Please retest. -- OSGi manifests for servlet-api and jsp-api - - -* Fri Mar 26 2010 Mary Ellen Foster 0:6.0.24-2 -- Add maven POMs and metadata -- Link tomcat6-juli into /usr/share/java/tomcat6 - -* Mon Mar 1 2010 Alexander Kurtakov 0:6.0.24-1 -- Update to 6.0.24. - -* Tue Dec 22 2009 Alexander Kurtakov 0:6.0.20-2 -- Drop file requires on /usr/share/java/ecj.jar. - -* Mon Nov 9 2009 Alexander Kurtakov 0:6.0.20-1 -- Update to 6.0.20. Fixes CVE-2009-0033,CVE-2009-0580. - -* Sun Jul 26 2009 Fedora Release Engineering - 0:6.0.18-10.2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Wed Apr 1 2009 Alexander Kurtakov 0:6.0.18-9.2 -- Add OSGi manifest for servlet-api. - -* Wed Feb 25 2009 Fedora Release Engineering - 0:6.0.18-9.1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Tue Dec 02 2008 David Walluck 0:6.0.18-8.1 -- build for Fedora - -* Tue Dec 02 2008 David Walluck 0:6.0.18-8 -- fix directory ownership - -* Thu Nov 13 2008 David Walluck 0:6.0.18-7 -- add Requires for update-alternatives - -* Tue Oct 07 2008 David Walluck 0:6.0.18-6 -- use lsb_release instead of lsb-release to get the distributor - -* Tue Oct 07 2008 David Walluck 0:6.0.18-5 -- fix initscript messages on Mandriva Linux -- fix help message in initscript - -* Wed Oct 01 2008 David Walluck 0:6.0.18-4 -- redefine %%_initrddir for FHS-compliance -- make initscript LSB-complaint - -* Fri Sep 26 2008 David Walluck 0:6.0.18-3 -- fix status in initscript - -* Thu Sep 25 2008 David Walluck 0:6.0.18-2 -- remove initscripts and /sbin/service requirement -- call initscript directly without using /sbin/service -- require /sbin/chkconfig instead of chkconfig -- remove chkconfig requirement from packages that don't require it - -* Tue Aug 26 2008 David Walluck 0:6.0.18-1 -- 6.0.18 -- Resolves: CVE-2008-1232, CVE-2008-1947, CVE-2008-2370, CVE-2008-2938 -- fix definition of java.security.policy with d%%{name} start-security -- don't pass $CATALINA_OPTS with d%%{name} stop -- redefine tempdir and workdir for tmpwatch workaround -- change eclipse-ecj references to ecj - -* Thu Jul 10 2008 Tom "spot" Callaway - 0:6.0.16-1.8 -- drop repotag - -* Fri Apr 04 2008 David Walluck 0:6.0.16-1jpp.7.fc9 -- version jsp and servlet Provides with their spec versions -- remove Obsoletes/Provides for servletapi6 package as it can co-exist -- check for java-functions existence in wrapper script -- move d%%{name} to %%{name} and create symlink for d%%{name} -- improve status function in initscript -- change license to ASL 2.0 again as per Fedora guidelines - -* Mon Mar 24 2008 David Walluck 0:6.0.16-1jpp.6.fc9 -- remove Requires: tomcat-native -- put back original JPackage Group (except javadoc) and License tags -- add Provides for jsp and servlet -- use ant macro -- build and install sample webapp -- call /sbin/service to stop service on uninstall -- remove references to $RPM_BUILD_DIR -- use copy instead of move to fix short-circuit install build -- remove prebuilt sample.war -- remove Thumbs.db files -- add Requires: java >= 0:1.6.0 - -* Wed Mar 19 2008 David Walluck 0:6.0.16-1jpp.5.fc9 -- explicitly unset CLASSPATH -- explicitly set OPT_JAR_LIST to include ant/ant-trax - -* Tue Mar 18 2008 David Walluck 0:6.0.16-1jpp.4.fc9 -- remove BuildRequires: sed -- remove specific references to icedtea - -* Mon Mar 17 2008 David Walluck 0:6.0.16-1jpp.3.fc9 -- add digest and tool-wrapper scripts -- Requires: tomcat-native - -* Fri Mar 7 2008 David Walluck 0:6.0.16-1jpp.2.fc9 -- use %%{_var} for appdir instead of /srv -- use ${JAVACMD} for java executable in wrapper script -- use built-in status function in initscript where possible -- add missing require on procps for status function -- fix java.library.path setting in %%{_sysconfdir}/sysconfig/%%{name} -- add patch to document webapps in %%{_sysconfdir}/%%{name}/tomcat-users.xml -- remove %%{appdir}/ROOT/admin -- move %%{_bindir}/d%%{name} to %%{_sbindir}/d%%{name} - -* Mon Mar 3 2008 David Walluck 0:6.0.16-1jpp.1.fc9 -- use %%{_initrddir} macro instead of %%{_sysconfdir}/init.d (rhbz #153187) -- fix java.library.path setting in %%{name}.conf (rhbz #253605) -- fix incorrect initscript output (rhbz #380921) -- update initscript (rhbz #247077) -- add logrotate support -- fix strange-permission -- fix %%prep -- replace /var with %%{_var} -- replace %%{_localstatedir} with %%{_var} -- use %%{logdir} where possible -- call build-jar-repository with full path in scriptlets -- remove file-based requires -- build with icedtea and set as the default JAVA_HOME in %%{name}.conf -- fix non-standard-group -- change ecj references to eclipse-ecj -- change Apache Software License 2.0 to ASL 2.0 for rpmlint - -* Fri Feb 8 2008 Jason Corley - 0:6.0.16-1jpp -- update to 6.0.16 - -* Sun Dec 2 2007 Jason Corley - 0:6.0.14-2jpp -- add /etc/tomcat6/Catalina/localhost (Alexander Kurtakov) - -* Tue Aug 14 2007 Jason Corley 0:6.0.14-1jpp -- first JPackage release diff --git a/tomcat7-7.0-tomcat-users-webapp.patch b/tomcat7-7.0-tomcat-users-webapp.patch deleted file mode 100644 index 6e750f9..0000000 --- a/tomcat7-7.0-tomcat-users-webapp.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- conf/tomcat-users.xml~ 2008-01-28 17:41:06.000000000 -0500 -+++ conf/tomcat-users.xml 2008-03-07 19:40:07.000000000 -0500 -@@ -23,4 +23,9 @@ - - - --> -+ -+ -+ -+ -+ - From 468fdbab7feddd284d195f102d44e17621a3c444 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Mon, 2 May 2011 02:09:32 +0400 Subject: [PATCH 060/273] - Fixed package groups - Fixed some permissions - Fixed some links - Removed old tomcat6 crap --- tomcat.spec | 61 ++++++++++++++++++++++++----------------------------- 1 file changed, 28 insertions(+), 33 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index 67a2994..5e20be1 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -53,10 +53,10 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API -Group: Networking/Daemons +Group: System Environment/Daemons License: ASL 2.0 URL: http://tomcat.apache.org/ Source0: http://www.apache.org/dist/tomcat/tomcat-6/v%{version}/src/%{packdname}.tar.gz @@ -116,7 +116,7 @@ released under the Apache Software License version 2.0. Tomcat is intended to be a collaboration of the best-of-breed developers from around the world. %package admin-webapps -Group: System Environment/Applications +Group: Applications/System Summary: The host-manager and manager web applications for Apache Tomcat Requires: %{name} = %{epoch}:%{version}-%{release} @@ -124,7 +124,7 @@ Requires: %{name} = %{epoch}:%{version}-%{release} The host-manager and manager web applications for Apache Tomcat. %package docs-webapp -Group: System Environment/Applications +Group: Applications/Text Summary: The docs web application for Apache Tomcat Requires: %{name} = %{epoch}:%{version}-%{release} @@ -139,7 +139,7 @@ Summary: Javadoc generated documentation for Apache Tomcat Javadoc generated documentation for Apache Tomcat. %package jsp-%{jspspec}-api -Group: Internet/WWW/Dynamic Content +Group: Development/Libraries Summary: Apache Tomcat JSP API implementation classes Provides: jsp = %{jspspec} Provides: jsp22 @@ -152,7 +152,7 @@ Apache Tomcat JSP API implementation classes. %package lib -Group: Development/Compilers +Group: Development/Libraries Summary: Libraries needed to run the Tomcat Web container Requires: %{name}-jsp-%{jspspec}-api = %{epoch}:%{version}-%{release} Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} @@ -167,7 +167,7 @@ Requires(preun): coreutils Libraries needed to run the Tomcat Web container. %package servlet-%{servletspec}-api -Group: Internet/WWW/Dynamic Content +Group: Development/Libraries Summary: Apache Tomcat Servlet API implementation classes Provides: servlet = %{servletspec} Provides: servlet6 @@ -179,7 +179,7 @@ Requires(postun): chkconfig Apache Tomcat Servlet API implementation classes. %package el-%{elspec}-api -Group: Development/Libraries/Java +Group: Development/Libraries Summary: Expression Language v1.0 API Provides: el_1_0_api = %{epoch}:%{version}-%{release} Provides: el_api = %{elspec} @@ -190,7 +190,7 @@ Requires(postun): chkconfig Expression Language 1.0. %package webapps -Group: System Environment/Applications +Group: Applications/Internet Summary: The ROOT and examples web applications for Apache Tomcat Requires: %{name} = %{epoch}:%{version}-%{release} Requires: jakarta-taglibs-standard >= 0:1.1 @@ -276,6 +276,7 @@ zip -u output/build/lib/jsp-api.jar META-INF/MANIFEST.MF %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{libdir} %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{logdir} /bin/touch ${RPM_BUILD_ROOT}%{logdir}/catalina.out +/bin/echo "%{name}-%{major_version}.%{minor_version}.%{micro_version} RPM installed" >> ${RPM_BUILD_ROOT}%{logdir}/catalina.out %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{homedir} %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{tempdir} %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{workdir} @@ -344,7 +345,7 @@ pushd ${RPM_BUILD_ROOT}%{libdir} %{__ln_s} $(build-classpath log4j) log4j.jar %{__ln_s} $(build-classpath ecj) jasper-jdt.jar - # Link the juli jar into /usr/share/java/tomcat + # Link the juli jar here from /usr/share/java/tomcat %{__ln_s} %{bindir}/tomcat-juli.jar . popd @@ -428,23 +429,6 @@ done %{_sbindir}/update-alternatives --install %{_javadir}/elspec.jar elspec \ %{_javadir}/%{name}-el-%{elspec}-api.jar 20250 - -# move the temporary backups to the correct tomcat directory -# due to rhbz 640686 -%posttrans -if [ -d %{_tmppath}/%{name}-webapps.bak ]; then - %{__cp} -rp %{_tmppath}/%{name}-webapps.bak/* %{appdir} - %{__rm} -rf %{_tmppath}/%{name}-webapps.bak -fi -if [ -d %{_tmppath}/%{name}-libdir.bak ]; then - %{__cp} -rp %{_tmppath}/%{name}-libdir.bak/* %{libdir} - %{__rm} -rf %{_tmppath}/%{name}-libdir.bak -fi -if [ -d %{_tmppath}/%{name}-confdir.bak ]; then - %{__cp} -rp %{_tmppath}/%{name}-confdir.bak/* %{confdir} - %{__rm} -rf %{_tmppath}/%{name}-confdir.bak -fi - %preun # clean tempdir and workdir on removal or upgrade %{__rm} -rf %{workdir} %{tempdir} @@ -477,7 +461,7 @@ if [ "$1" = "0" ]; then fi %files -%defattr(0664,root,tomcat,0775) +%defattr(0664,root,tomcat,0755) %doc {LICENSE,NOTICE,RELEASE*} %attr(0755,root,root) %{_bindir}/%{name}-digest %attr(0755,root,root) %{_bindir}/%{name}-tool-wrapper @@ -487,8 +471,9 @@ fi %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %attr(0765,root,tomcat) %dir %{basedir} +%defattr(0664,root,tomcat,0775) %attr(0775,root,tomcat) %dir %{appdir} -%attr(0775,root,tomcat) %dir %{confdir} +%attr(0755,root,tomcat) %dir %{confdir} %attr(0775,root,tomcat) %dir %{confdir}/Catalina %attr(0775,root,tomcat) %dir %{confdir}/Catalina/localhost %attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/%{name}.conf @@ -497,8 +482,8 @@ fi %attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/context.xml %attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/server.xml %attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/log4j.properties -%attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/tomcat-users.xml -%attr(0666,tomcat,tomcat) %config(noreplace) %{confdir}/web.xml +%attr(0660,tomcat,tomcat) %config(noreplace) %{confdir}/tomcat-users.xml +%attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/web.xml %attr(0775,root,tomcat) %dir %{cachedir} %attr(0775,root,tomcat) %dir %{tempdir} %attr(0775,root,tomcat) %dir %{workdir} @@ -508,6 +493,7 @@ fi %{bindir}/bootstrap.jar %{bindir}/catalina-tasks.xml %{bindir}/tomcat-juli.jar +%{libdir}/tomcat-juli.jar %{homedir}/lib %{homedir}/temp %{homedir}/webapps @@ -541,6 +527,8 @@ fi %files lib %defattr(-,root,root,-) %{libdir} +%exclude %{libdir}/tomcat-juli.jar +%exclude %{libdir}/%{name}-el-%{elspec}-api.jar %files servlet-%{servletspec}-api %defattr(-,root,root,-) @@ -557,13 +545,20 @@ fi %{_mavenpomdir}/JPP-%{name}-tomcat-el-api.pom %files webapps -%defattr(0664,root,tomcat,0775) +%defattr(0644,tomcat,tomcat,0755) %{appdir}/ROOT %{appdir}/examples %{appdir}/sample %changelog -* Wed Apr 28 2011 Ivan Afonichev 0:7.0.12-1 +* Mon May 2 2011 Ivan Afonichev 0:7.0.12-3 +- Fixed package groups +- Fixed some permissions +- Fixed some links +- Removed old tomcat6 crap + +%changelog +* Thu Apr 28 2011 Ivan Afonichev 0:7.0.12-2 - Package now named just tomcat instead of tomcat7 - Removed Provides: %{name}-log4j - Switched to apache-commons-* names instead of jakarta-commons-* . From 31d304e3da16f0e72812acfe9caa3be1bf5a774f Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Thu, 5 May 2011 01:42:20 +0400 Subject: [PATCH 061/273] - Provided local paths for libs - Fixed dependencies - Fixed update temp/work cleanup --- tomcat.spec | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index 5e20be1..52f4bd1 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -53,7 +53,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 3%{?dist} +Release: 4%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -88,6 +88,8 @@ BuildRequires: java-devel >= 1:1.6.0 BuildRequires: jpackage-utils >= 0:1.7.0 BuildRequires: junit BuildRequires: log4j +BuildRequires: geronimo-jaxrpc +BuildRequires: wsdl4j Requires: apache-commons-daemon Requires: apache-commons-logging Requires: apache-commons-collections @@ -97,7 +99,6 @@ Requires: java >= 1:1.6.0 Requires: procps Requires: %{name}-lib = %{epoch}:%{version}-%{release} Requires(pre): shadow-utils -Requires(pre): shadow-utils Requires(post): chkconfig Requires(preun): chkconfig Requires(post): redhat-lsb @@ -216,6 +217,8 @@ export OPT_JAR_LIST="xalan-j2-serializer" # tomcat-dbcp.jar with apache-commons-{collections,dbcp,pool}-tomcat5.jar # so just create a dummy file for later removal touch HACK + %{__mkdir_p} HACKDIR + touch HACKDIR/build.xml # who needs a build.properties file anyway %{ant} -Dbase.path="." \ -Dbuild.compiler="modern" \ @@ -224,20 +227,21 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dcommons-daemon.native.src.tgz="HACK" \ -Djasper-jdt.jar="$(build-classpath ecj)" \ -Djdt.jar="$(build-classpath ecj)" \ + -Dtomcat-dbcp.jar="$(build-classpath apache-commons-dbcp)" \ -Dtomcat-native.tar.gz="HACK" \ - -Dversion="%{version}" \ - -Dversion.build="%{micro_version}" - # javadoc generation - %{ant} -Dbase.path="." \ - -Dbuild.compiler="modern" \ - -Dcommons-collections.jar="$(build-classpath apache-commons-collections)" \ - -Dcommons-daemon.jar="$(build-classpath apache-commons-daemon)" \ - -Dcommons-daemon.native.src.tgz="HACK" \ - -Djasper-jdt.jar="$(build-classpath ecj)" \ - -Djdt.jar="$(build-classpath ecj)" \ + -Dtomcat-native.dll.win32="HACK" \ + -Dtomcat-native.dll.x64="HACK" \ + -Dtomcat-native.dll.i64="HACK" \ + -Dcommons-daemon.native.win.mgr.exe="HACK" \ + -Dnsis.exe="HACK" \ + -Djaxrpc-lib.jar="$(build-classpath jaxrpc)" \ + -Dwsdl4j-lib.jar="$(build-classpath wsdl4j)" \ + -Dcommons-pool.home="HACKDIR" \ + -Dcommons-dbcp.home="HACKDIR" \ + -Dno.build.dbcp=true \ -Dversion="%{version}" \ -Dversion.build="%{micro_version}" \ - dist-prepare dist-source javadoc + deploy dist-prepare dist-source javadoc # remove some jars that we'll replace with symlinks later %{__rm} output/build/bin/commons-daemon.jar \ @@ -431,7 +435,7 @@ done %preun # clean tempdir and workdir on removal or upgrade -%{__rm} -rf %{workdir} %{tempdir} +%{__rm} -rf %{workdir}/* %{tempdir}/* if [ "$1" = "0" ]; then %{_initrddir}/%{name} stop >/dev/null 2>&1 /sbin/chkconfig --del %{name} @@ -551,13 +555,17 @@ fi %{appdir}/sample %changelog +* Mon May 5 2011 Ivan Afonichev 0:7.0.12-4 +- Provided local paths for libs +- Fixed dependencies +- Fixed update temp/work cleanup + * Mon May 2 2011 Ivan Afonichev 0:7.0.12-3 - Fixed package groups - Fixed some permissions - Fixed some links - Removed old tomcat6 crap -%changelog * Thu Apr 28 2011 Ivan Afonichev 0:7.0.12-2 - Package now named just tomcat instead of tomcat7 - Removed Provides: %{name}-log4j From b44b78b8a334c4b1a69c8010f93a255ca6bf4f6a Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Sat, 14 May 2011 17:49:50 +0400 Subject: [PATCH 062/273] Switched to 7.0.14 --- sources | 1 + tomcat.spec | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 99e67fa..bd4b8fc 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ edfd253c21b51ccadce8ec05be5e61fb apache-tomcat-7.0.12-src.tar.gz +b6bfcf22694a548fad877de7d606e7ff apache-tomcat-7.0.14-src.tar.gz diff --git a/tomcat.spec b/tomcat.spec index 52f4bd1..ca1ad5c 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.2 %global major_version 7 %global minor_version 0 -%global micro_version 12 +%global micro_version 14 %global packdname apache-tomcat-%{version}-src %global servletspec 3.0 %global elspec 2.2 @@ -53,7 +53,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 4%{?dist} +Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -555,6 +555,9 @@ fi %{appdir}/sample %changelog +* Mon May 14 2011 Ivan Afonichev 0:7.0.14-1 +- Updated to 7.0.14 + * Mon May 5 2011 Ivan Afonichev 0:7.0.12-4 - Provided local paths for libs - Fixed dependencies From 5f0fcd834e180def4fb5701be5667a68509b5511 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Sat, 21 May 2011 01:44:00 +0400 Subject: [PATCH 063/273] - Fixed http source link - Securify some permissions - Added licenses for el-api and servlet-api - Added dependency on jpackage-utils for the javadoc subpackage --- tomcat.spec | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index ca1ad5c..0e81705 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -53,13 +53,13 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons License: ASL 2.0 URL: http://tomcat.apache.org/ -Source0: http://www.apache.org/dist/tomcat/tomcat-6/v%{version}/src/%{packdname}.tar.gz +Source0: http://www.apache.org/dist/tomcat/tomcat-%{major_version}/v%{version}/src/%{packdname}.tar.gz Source1: %{name}-%{major_version}.%{minor_version}.conf Source2: %{name}-%{major_version}.%{minor_version}.init Source3: %{name}-%{major_version}.%{minor_version}.sysconfig @@ -135,6 +135,7 @@ The docs web application for Apache Tomcat. %package javadoc Group: Documentation Summary: Javadoc generated documentation for Apache Tomcat +Requires: jpackage-utils %description javadoc Javadoc generated documentation for Apache Tomcat. @@ -475,9 +476,15 @@ fi %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %attr(0765,root,tomcat) %dir %{basedir} +%attr(0755,root,tomcat) %dir %{confdir} +%defattr(0664,root,tomcat,0770) +%attr(0770,root,tomcat) %dir %{logdir} +%attr(0660,tomcat,tomcat) %{logdir}/catalina.out +%attr(0770,root,tomcat) %dir %{cachedir} +%attr(0770,root,tomcat) %dir %{tempdir} +%attr(0770,root,tomcat) %dir %{workdir} %defattr(0664,root,tomcat,0775) %attr(0775,root,tomcat) %dir %{appdir} -%attr(0755,root,tomcat) %dir %{confdir} %attr(0775,root,tomcat) %dir %{confdir}/Catalina %attr(0775,root,tomcat) %dir %{confdir}/Catalina/localhost %attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/%{name}.conf @@ -488,11 +495,6 @@ fi %attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/log4j.properties %attr(0660,tomcat,tomcat) %config(noreplace) %{confdir}/tomcat-users.xml %attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/web.xml -%attr(0775,root,tomcat) %dir %{cachedir} -%attr(0775,root,tomcat) %dir %{tempdir} -%attr(0775,root,tomcat) %dir %{workdir} -%attr(0775,root,tomcat) %dir %{logdir} -%attr(0664,tomcat,tomcat) %{logdir}/catalina.out %dir %{homedir} %{bindir}/bootstrap.jar %{bindir}/catalina-tasks.xml @@ -510,7 +512,7 @@ fi %exclude %{_mavenpomdir}/*api* %files admin-webapps -%defattr(0664,root,tomcat,0775) +%defattr(0664,root,tomcat,0755) %{appdir}/host-manager %{appdir}/manager @@ -536,6 +538,7 @@ fi %files servlet-%{servletspec}-api %defattr(-,root,root,-) +%doc LICENSE %{_javadir}/%{name}-servlet-%{servletspec}*.jar %{_javadir}/%{name}-servlet-api.jar %{_mavendepmapfragdir}/%{name}-servlet-api @@ -543,6 +546,7 @@ fi %files el-%{elspec}-api %defattr(-,root,root,-) +%doc LICENSE %{_javadir}/%{name}-el-%{elspec}-api.jar %{_javadir}/%{name}-el-api.jar %{_javadir}/%{name}/%{name}-el-%{elspec}-api.jar @@ -555,10 +559,16 @@ fi %{appdir}/sample %changelog -* Mon May 14 2011 Ivan Afonichev 0:7.0.14-1 +* Sat May 21 2011 Ivan Afonichev 0:7.0.14-2 +- Fixed http source link +- Securify some permissions +- Added licenses for el-api and servlet-api +- Added dependency on jpackage-utils for the javadoc subpackage + +* Sat May 14 2011 Ivan Afonichev 0:7.0.14-1 - Updated to 7.0.14 -* Mon May 5 2011 Ivan Afonichev 0:7.0.12-4 +* Thu May 5 2011 Ivan Afonichev 0:7.0.12-4 - Provided local paths for libs - Fixed dependencies - Fixed update temp/work cleanup From c6288a2dbbd2a0f0239fb88b123e293adc1b2bf4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 25 May 2011 16:00:54 +0000 Subject: [PATCH 064/273] Initial setup of the repo --- .gitignore | 0 sources | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 .gitignore create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/sources b/sources new file mode 100644 index 0000000..e69de29 From 8b8a735314873268e9f2074710ef024e320268cb Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Thu, 26 May 2011 01:27:09 +0400 Subject: [PATCH 065/273] universify .gitignore --- .gitignore | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 3cd0629..fd61fdd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,2 @@ -apache-tomcat-6.0.18-src.tar.gz -apache-tomcat-6.0.20-src.tar.gz -apache-tomcat-6.0.24-src.tar.gz -apache-tomcat-6.0.26-src.tar.gz -apache-tomcat-6.0.29-src.tar.gz -apache-tomcat-6.0.30-src.tar.gz -apache-tomcat-6.0.32-src.tar.gz -apache-tomcat-7.0.12-src.tar.gz +apache-tomcat-*-src.tar.gz From ccbc5a8b9a812f7876ff8a271b864300f6fe276a Mon Sep 17 00:00:00 2001 From: Alexander Kurtakov Date: Tue, 31 May 2011 09:54:35 +0300 Subject: [PATCH 066/273] Remove old tarball from sources. --- sources | 1 - 1 file changed, 1 deletion(-) diff --git a/sources b/sources index bd4b8fc..710a193 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -edfd253c21b51ccadce8ec05be5e61fb apache-tomcat-7.0.12-src.tar.gz b6bfcf22694a548fad877de7d606e7ff apache-tomcat-7.0.14-src.tar.gz From ca271e5d851bea547f2020de374e685531303f18 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Tue, 7 Jun 2011 01:23:05 +0400 Subject: [PATCH 067/273] - Added initial systemd service - Fix some paths --- tomcat-7.0.service | 13 +++++++++++++ tomcat.spec | 18 ++++++++++++++---- 2 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 tomcat-7.0.service diff --git a/tomcat-7.0.service b/tomcat-7.0.service new file mode 100644 index 0000000..3e47c4f --- /dev/null +++ b/tomcat-7.0.service @@ -0,0 +1,13 @@ +[Unit] +Description=Release implementation for Servlet 3.0 and JSP 2.2 +After=syslog.target network.target + +[Service] +Type=forking +PIDFile=/var/run/tomcat.pid +EnvironmentFile=/etc/sysconfig/tomcat +ExecStart=/etc/init.d/tomcat start +ExecStop=/etc/init.d/tomcat stop + +[Install] +WantedBy=multi-user.target diff --git a/tomcat.spec b/tomcat.spec index 0e81705..69fc61c 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -40,20 +40,21 @@ # FHS 2.3 compliant tree structure - http://www.pathname.com/fhs/2.3/ %global basedir %{_var}/lib/%{name} %global appdir %{basedir}/webapps -%global bindir %{_datadir}/%{name}/bin -%global confdir %{_sysconfdir}/%{name} %global homedir %{_datadir}/%{name} +%global bindir %{homedir}/bin +%global confdir %{_sysconfdir}/%{name} %global libdir %{_javadir}/%{name} %global logdir %{_var}/log/%{name} %global cachedir %{_var}/cache/%{name} %global tempdir %{cachedir}/temp %global workdir %{cachedir}/work %global _initrddir %{_sysconfdir}/init.d +%global _systemddir /lib/systemd/system Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -70,6 +71,7 @@ Source7: %{name}-%{major_version}.%{minor_version}-tool-wrapper.script Source8: servlet-api-OSGi-MANIFEST.MF Source9: jsp-api-OSGi-MANIFEST.MF Source10: %{name}-%{major_version}.%{minor_version}-log4j.properties +Source11: %{name}-%{major_version}.%{minor_version}.service Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch @@ -272,6 +274,7 @@ zip -u output/build/lib/jsp-api.jar META-INF/MANIFEST.MF %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sbindir} %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_javadocdir}/%{name} %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_initrddir} +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_systemddir} %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{appdir} @@ -310,6 +313,8 @@ popd ${RPM_BUILD_ROOT}%{_initrddir}/%{name} %{__install} -m 0644 %{SOURCE4} \ ${RPM_BUILD_ROOT}%{_sbindir}/%{name} +%{__install} -m 0644 %{SOURCE11} \ + ${RPM_BUILD_ROOT}%{_systemddir}/%{name}.service %{__ln_s} %{name} ${RPM_BUILD_ROOT}%{_sbindir}/d%{name} %{__sed} -e "s|\@\@\@TCLOG\@\@\@|%{logdir}|g" %{SOURCE5} \ > ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/%{name} @@ -473,6 +478,7 @@ fi %attr(0755,root,root) %{_sbindir}/d%{name} %attr(0755,root,root) %{_sbindir}/%{name} %attr(0755,root,root) %{_initrddir}/%{name} +%attr(0644,root,root) %{_systemddir}/%{name}.service %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %attr(0765,root,tomcat) %dir %{basedir} @@ -549,7 +555,7 @@ fi %doc LICENSE %{_javadir}/%{name}-el-%{elspec}-api.jar %{_javadir}/%{name}-el-api.jar -%{_javadir}/%{name}/%{name}-el-%{elspec}-api.jar +%{libdir}/%{name}-el-%{elspec}-api.jar %{_mavenpomdir}/JPP-%{name}-tomcat-el-api.pom %files webapps @@ -559,6 +565,10 @@ fi %{appdir}/sample %changelog +* Mon Jun 6 2011 Ivan Afonichev 0:7.0.14-3 +- Added initial systemd service +- Fix some paths + * Sat May 21 2011 Ivan Afonichev 0:7.0.14-2 - Fixed http source link - Securify some permissions From bdc086f3855a3ab1c34d366192beb29b59b8a061 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Tue, 21 Jun 2011 01:15:48 +0400 Subject: [PATCH 068/273] Updated to 7.0.16 --- sources | 2 +- tomcat.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 710a193..88cb558 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b6bfcf22694a548fad877de7d606e7ff apache-tomcat-7.0.14-src.tar.gz +71740312baa57ebe4d9ffef2b5d7b10d apache-tomcat-7.0.16-src.tar.gz diff --git a/tomcat.spec b/tomcat.spec index 69fc61c..5948234 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.2 %global major_version 7 %global minor_version 0 -%global micro_version 14 +%global micro_version 16 %global packdname apache-tomcat-%{version}-src %global servletspec 3.0 %global elspec 2.2 @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 3%{?dist} +Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -565,6 +565,9 @@ fi %{appdir}/sample %changelog +* Tue Jun 21 2011 Ivan Afonichev 0:7.0.16-1 +- Updated to 7.0.16 + * Mon Jun 6 2011 Ivan Afonichev 0:7.0.14-3 - Added initial systemd service - Fix some paths From d07c057684622f5647c6d6f93db46a0c4b098dd6 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Tue, 26 Jul 2011 21:54:26 +0400 Subject: [PATCH 069/273] Updated to 7.0.19 --- sources | 2 +- tomcat.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 88cb558..c48745b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -71740312baa57ebe4d9ffef2b5d7b10d apache-tomcat-7.0.16-src.tar.gz +8ff875b37e463b481b8e5c30b9368ac1 apache-tomcat-7.0.19-src.tar.gz diff --git a/tomcat.spec b/tomcat.spec index 5948234..588f9eb 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.2 %global major_version 7 %global minor_version 0 -%global micro_version 16 +%global micro_version 19 %global packdname apache-tomcat-%{version}-src %global servletspec 3.0 %global elspec 2.2 @@ -565,6 +565,9 @@ fi %{appdir}/sample %changelog +* Tue Jul 26 2011 Ivan Afonichev 0:7.0.19-1 +- Updated to 7.0.19 + * Tue Jun 21 2011 Ivan Afonichev 0:7.0.16-1 - Updated to 7.0.16 From f0cf232913a363c0cae6767a060f2546f9109406 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Mon, 15 Aug 2011 21:27:41 +0400 Subject: [PATCH 070/273] Updated to 7.0.20 --- sources | 2 +- tomcat.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sources b/sources index c48745b..8b3f4ad 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8ff875b37e463b481b8e5c30b9368ac1 apache-tomcat-7.0.19-src.tar.gz +bb13b2910cc71c29e571ea062ad6ab3a apache-tomcat-7.0.20-src.tar.gz diff --git a/tomcat.spec b/tomcat.spec index 588f9eb..35f3545 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.2 %global major_version 7 %global minor_version 0 -%global micro_version 19 +%global micro_version 20 %global packdname apache-tomcat-%{version}-src %global servletspec 3.0 %global elspec 2.2 @@ -565,6 +565,9 @@ fi %{appdir}/sample %changelog +* Mon Aug 15 2011 Ivan Afonichev 0:7.0.20-1 +- Updated to 7.0.20 + * Tue Jul 26 2011 Ivan Afonichev 0:7.0.19-1 - Updated to 7.0.19 From 009133147f66bdb56b3b36d2df4e877deda83709 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Mon, 15 Aug 2011 23:28:31 +0400 Subject: [PATCH 071/273] Require java < 1.7.0 --- tomcat.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index 35f3545..b42592b 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -86,7 +86,8 @@ BuildRequires: apache-commons-daemon BuildRequires: apache-commons-dbcp BuildRequires: apache-commons-pool BuildRequires: jakarta-taglibs-standard -BuildRequires: java-devel >= 1:1.6.0 +BuildRequires: java-devel >= 1:1.6.0 +BuildRequires: java-devel < 1:1.7.0 BuildRequires: jpackage-utils >= 0:1.7.0 BuildRequires: junit BuildRequires: log4j @@ -98,6 +99,7 @@ Requires: apache-commons-collections Requires: apache-commons-dbcp Requires: apache-commons-pool Requires: java >= 1:1.6.0 +Requires: java < 1:1.7.0 Requires: procps Requires: %{name}-lib = %{epoch}:%{version}-%{release} Requires(pre): shadow-utils @@ -565,6 +567,9 @@ fi %{appdir}/sample %changelog +* Mon Aug 15 2011 Ivan Afonichev 0:7.0.20-2 +- Require java < 1.7.0 + * Mon Aug 15 2011 Ivan Afonichev 0:7.0.20-1 - Updated to 7.0.20 From 31375978bd3bb680b109bb9d2cbce0c2120c2a8c Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Tue, 16 Aug 2011 00:22:02 +0400 Subject: [PATCH 072/273] Require java = 1:1.6.0 --- tomcat.spec | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index b42592b..b83e789 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -86,8 +86,7 @@ BuildRequires: apache-commons-daemon BuildRequires: apache-commons-dbcp BuildRequires: apache-commons-pool BuildRequires: jakarta-taglibs-standard -BuildRequires: java-devel >= 1:1.6.0 -BuildRequires: java-devel < 1:1.7.0 +BuildRequires: java-devel = 1:1.6.0 BuildRequires: jpackage-utils >= 0:1.7.0 BuildRequires: junit BuildRequires: log4j @@ -98,8 +97,7 @@ Requires: apache-commons-logging Requires: apache-commons-collections Requires: apache-commons-dbcp Requires: apache-commons-pool -Requires: java >= 1:1.6.0 -Requires: java < 1:1.7.0 +Requires: java = 1:1.6.0 Requires: procps Requires: %{name}-lib = %{epoch}:%{version}-%{release} Requires(pre): shadow-utils @@ -567,6 +565,9 @@ fi %{appdir}/sample %changelog +* Mon Aug 15 2011 Ivan Afonichev 0:7.0.20-3 +- Require java = 1:1.6.0 + * Mon Aug 15 2011 Ivan Afonichev 0:7.0.20-2 - Require java < 1.7.0 From 5e7f3dea1ba700d695f2eab860311cf9228fba22 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Thu, 8 Sep 2011 00:14:46 +0400 Subject: [PATCH 073/273] Updated to 7.0.21 --- sources | 2 +- tomcat.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 8b3f4ad..fc75c8f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -bb13b2910cc71c29e571ea062ad6ab3a apache-tomcat-7.0.20-src.tar.gz +40d71249a54526ab0145fd5b41008518 apache-tomcat-7.0.21-src.tar.gz diff --git a/tomcat.spec b/tomcat.spec index b83e789..35ffb72 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.2 %global major_version 7 %global minor_version 0 -%global micro_version 20 +%global micro_version 21 %global packdname apache-tomcat-%{version}-src %global servletspec 3.0 %global elspec 2.2 @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 3%{?dist} +Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -565,6 +565,9 @@ fi %{appdir}/sample %changelog +* Thu Sep 8 2011 Ivan Afonichev 0:7.0.21-1 +- Updated to 7.0.21 + * Mon Aug 15 2011 Ivan Afonichev 0:7.0.20-3 - Require java = 1:1.6.0 From 46a16ccb3a1cbae97833ae473a0942d19e0bc302 Mon Sep 17 00:00:00 2001 From: Roland Grunberg Date: Thu, 22 Sep 2011 16:35:12 -0400 Subject: [PATCH 074/273] Add manifests for el-api, jasper-el, jasper, tomcat, and tomcat-juli. Signed-off-by: Ivan Afonichev --- el-api-OSGi-MANIFEST.MF | 13 ++++++++++++ jasper-OSGi-MANIFEST.MF | 40 ++++++++++++++++++++++++++++++++++++ jasper-el-OSGi-MANIFEST.MF | 13 ++++++++++++ jsp-api-OSGi-MANIFEST.MF | 2 +- tomcat-api-OSGi-MANIFEST.MF | 12 +++++++++++ tomcat-juli-OSGi-MANIFEST.MF | 13 ++++++++++++ tomcat.spec | 25 +++++++++++++++++++++- 7 files changed, 116 insertions(+), 2 deletions(-) create mode 100644 el-api-OSGi-MANIFEST.MF create mode 100644 jasper-OSGi-MANIFEST.MF create mode 100644 jasper-el-OSGi-MANIFEST.MF create mode 100644 tomcat-api-OSGi-MANIFEST.MF create mode 100644 tomcat-juli-OSGi-MANIFEST.MF diff --git a/el-api-OSGi-MANIFEST.MF b/el-api-OSGi-MANIFEST.MF new file mode 100644 index 0000000..69b797f --- /dev/null +++ b/el-api-OSGi-MANIFEST.MF @@ -0,0 +1,13 @@ +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 + diff --git a/jasper-OSGi-MANIFEST.MF b/jasper-OSGi-MANIFEST.MF new file mode 100644 index 0000000..9a3d98a --- /dev/null +++ b/jasper-OSGi-MANIFEST.MF @@ -0,0 +1,40 @@ +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 + diff --git a/jasper-el-OSGi-MANIFEST.MF b/jasper-el-OSGi-MANIFEST.MF new file mode 100644 index 0000000..fd2879f --- /dev/null +++ b/jasper-el-OSGi-MANIFEST.MF @@ -0,0 +1,13 @@ +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 + diff --git a/jsp-api-OSGi-MANIFEST.MF b/jsp-api-OSGi-MANIFEST.MF index 6470b0d..62bc00d 100644 --- a/jsp-api-OSGi-MANIFEST.MF +++ b/jsp-api-OSGi-MANIFEST.MF @@ -10,4 +10,4 @@ Export-Package: javax.servlet.jsp; version=2.2,javax.servlet.jsp.el; v 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 + =3.0,javax.servlet.resources; version=3.0,javax.el;version="2.2.0" diff --git a/tomcat-api-OSGi-MANIFEST.MF b/tomcat-api-OSGi-MANIFEST.MF new file mode 100644 index 0000000..3522c72 --- /dev/null +++ b/tomcat-api-OSGi-MANIFEST.MF @@ -0,0 +1,12 @@ +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 + diff --git a/tomcat-juli-OSGi-MANIFEST.MF b/tomcat-juli-OSGi-MANIFEST.MF new file mode 100644 index 0000000..cbb5674 --- /dev/null +++ b/tomcat-juli-OSGi-MANIFEST.MF @@ -0,0 +1,13 @@ +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 + diff --git a/tomcat.spec b/tomcat.spec index 35ffb72..7663f1e 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -72,6 +72,11 @@ Source8: servlet-api-OSGi-MANIFEST.MF Source9: jsp-api-OSGi-MANIFEST.MF Source10: %{name}-%{major_version}.%{minor_version}-log4j.properties Source11: %{name}-%{major_version}.%{minor_version}.service +Source12: el-api-OSGi-MANIFEST.MF +Source13: jasper-el-OSGi-MANIFEST.MF +Source14: jasper-OSGi-MANIFEST.MF +Source15: tomcat-api-OSGi-MANIFEST.MF +Source16: tomcat-juli-OSGi-MANIFEST.MF Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch @@ -267,6 +272,21 @@ zip -u output/build/lib/servlet-api.jar META-INF/MANIFEST.MF cp -p %{SOURCE9} META-INF/MANIFEST.MF touch META-INF/MANIFEST.MF zip -u output/build/lib/jsp-api.jar META-INF/MANIFEST.MF +cp -p %{SOURCE12} META-INF/MANIFEST.MF +touch META-INF/MANIFEST.MF +zip -u output/build/lib/el-api.jar META-INF/MANIFEST.MF +cp -p %{SOURCE13} META-INF/MANIFEST.MF +touch META-INF/MANIFEST.MF +zip -u output/build/lib/jasper-el.jar META-INF/MANIFEST.MF +cp -p %{SOURCE14} META-INF/MANIFEST.MF +touch META-INF/MANIFEST.MF +zip -u output/build/lib/jasper.jar META-INF/MANIFEST.MF +cp -p %{SOURCE15} META-INF/MANIFEST.MF +touch META-INF/MANIFEST.MF +zip -u output/build/lib/tomcat-api.jar META-INF/MANIFEST.MF +cp -p %{SOURCE16} META-INF/MANIFEST.MF +touch META-INF/MANIFEST.MF +zip -u output/build/bin/tomcat-juli.jar META-INF/MANIFEST.MF %install # build initial path structure @@ -565,6 +585,9 @@ fi %{appdir}/sample %changelog +* Tue Sep 20 2011 Roland Grunberg 0:7.0.21-2 +- Add manifests for el-api, jasper-el, jasper, tomcat, and tomcat-juli. + * Thu Sep 8 2011 Ivan Afonichev 0:7.0.21-1 - Updated to 7.0.21 From 2c71edb76ac45982246228c570a06905b0d135bc Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Mon, 26 Sep 2011 21:37:13 +0400 Subject: [PATCH 075/273] Fix basedir mode (Fixes Bug 741250) --- tomcat.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index 7663f1e..7527a55 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -501,7 +501,7 @@ fi %attr(0644,root,root) %{_systemddir}/%{name}.service %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %config(noreplace) %{_sysconfdir}/sysconfig/%{name} -%attr(0765,root,tomcat) %dir %{basedir} +%attr(0755,root,tomcat) %dir %{basedir} %attr(0755,root,tomcat) %dir %{confdir} %defattr(0664,root,tomcat,0770) %attr(0770,root,tomcat) %dir %{logdir} @@ -585,6 +585,9 @@ fi %{appdir}/sample %changelog +* Mon Sep 26 2011 Ivan Afonichev 0:7.0.21-3 +- Fix basedir mode + * Tue Sep 20 2011 Roland Grunberg 0:7.0.21-2 - Add manifests for el-api, jasper-el, jasper, tomcat, and tomcat-juli. From 8c286ad89df65f8882873b41d09d184f902000e2 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 3 Oct 2011 15:07:17 -0500 Subject: [PATCH 076/273] rebuild (java), rel-eng#4932 --- tomcat.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tomcat.spec b/tomcat.spec index 7527a55..3b32d27 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 3%{?dist} +Release: 3%{?dist}.1 Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -585,6 +585,9 @@ fi %{appdir}/sample %changelog +* Mon Oct 03 2011 Rex Dieter - 0:7.0.21-3.1 +- rebuild (java), rel-eng#4932 + * Mon Sep 26 2011 Ivan Afonichev 0:7.0.21-3 - Fix basedir mode From 79985542152a3c82d97f912884d0dc09c5699ef4 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Thu, 6 Oct 2011 01:06:06 +0400 Subject: [PATCH 077/273] Updated to 7.0.22 --- sources | 2 +- tomcat.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index fc75c8f..8a177eb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -40d71249a54526ab0145fd5b41008518 apache-tomcat-7.0.21-src.tar.gz +878bc216d86ce803f3bbc65fd40eb96c apache-tomcat-7.0.22-src.tar.gz diff --git a/tomcat.spec b/tomcat.spec index 3b32d27..6601a0a 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.2 %global major_version 7 %global minor_version 0 -%global micro_version 21 +%global micro_version 22 %global packdname apache-tomcat-%{version}-src %global servletspec 3.0 %global elspec 2.2 @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 3%{?dist}.1 +Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -585,6 +585,9 @@ fi %{appdir}/sample %changelog +* Thu Oct 6 2011 Ivan Afonichev 0:7.0.22-1 +- Updated to 7.0.22 + * Mon Oct 03 2011 Rex Dieter - 0:7.0.21-3.1 - rebuild (java), rel-eng#4932 From 4b23f91d227c436208fa42df3f2222ed3fff12fb Mon Sep 17 00:00:00 2001 From: Roland Grunberg Date: Thu, 10 Nov 2011 22:44:19 +0400 Subject: [PATCH 078/273] Move tomcat-juli.jar to lib package --- tomcat.spec | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index 6601a0a..e568452 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -524,8 +524,6 @@ fi %dir %{homedir} %{bindir}/bootstrap.jar %{bindir}/catalina-tasks.xml -%{bindir}/tomcat-juli.jar -%{libdir}/tomcat-juli.jar %{homedir}/lib %{homedir}/temp %{homedir}/webapps @@ -559,7 +557,7 @@ fi %files lib %defattr(-,root,root,-) %{libdir} -%exclude %{libdir}/tomcat-juli.jar +%{bindir}/tomcat-juli.jar %exclude %{libdir}/%{name}-el-%{elspec}-api.jar %files servlet-%{servletspec}-api From ddfc98c4f445649a2886286492f0a5cc585b13a8 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Fri, 11 Nov 2011 01:48:56 +0400 Subject: [PATCH 079/273] +- Drop %%update_maven_depmap as in tomcat6 +- Provide native systemd unit file ported from tomcat6 --- tomcat-7.0-tomcat-sysd | 101 +++++++++++++++++++++++++++++++++++++++++ tomcat-7.0.init | 8 ++-- tomcat-7.0.service | 16 +++++-- tomcat.spec | 61 ++++++++++++++++++++----- 4 files changed, 165 insertions(+), 21 deletions(-) create mode 100644 tomcat-7.0-tomcat-sysd diff --git a/tomcat-7.0-tomcat-sysd b/tomcat-7.0-tomcat-sysd new file mode 100644 index 0000000..1e79816 --- /dev/null +++ b/tomcat-7.0-tomcat-sysd @@ -0,0 +1,101 @@ +#!/bin/bash +# +# This script provides systemd activation of the tomcat service +# To create clones of this service: +# 1) SERVICE_NAME must be defined before calling this script +# 2) Create /etc/sysconfig/${SERVICE_NAME} from /etc/sysconfig/tomcat +# to override tomcat defaults + +# SERVICE_NAME is a required value only if the service name is +# different from 'tomcat' +# +NAME="${SERVICE_NAME:-tomcat}" + +#I'll bet this isn't required. +# unset ISBOOT + +# For SELinux we need to use 'runuser' not 'su' +if [ -x "/sbin/runuser" ]; then + SU="/sbin/runuser -s /bin/sh" +else + SU="/bin/su -s /bin/sh" +fi + +# Path to the tomcat launch script +TOMCAT_SCRIPT="/usr/sbin/tomcat" + +# Define the tomcat username +TOMCAT_USER="${TOMCAT_USER:-tomcat}" + +# TOMCAT_LOG should be different from catalina.out. +# Usually the below config is all that is necessary +TOMCAT_LOG=/var/log/${NAME}/${NAME}-sysd.log + +# Get the tomcat config (use this for environment specific settings) +TOMCAT_CFG="/etc/tomcat/tomcat.conf" +if [ -r "$TOMCAT_CFG" ]; then + . $TOMCAT_CFG +fi + +# Get instance specific config file +if [ -r "/etc/sysconfig/${NAME}" ]; then + . /etc/sysconfig/${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() { + # fix permissions on the log and pid files + export CATALINA_PID="/var/run/${NAME}.pid" + touch $CATALINA_PID 2>&1 + if [ "$?" -eq "0" ]; then + chown ${TOMCAT_USER}:${TOMCAT_USER} $CATALINA_PID + fi + + touch $TOMCAT_LOG 2>&1 + if [ "$?" -eq "0" ]; then + chown ${TOMCAT_USER}:${TOMCAT_USER} $TOMCAT_LOG + 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 +} + +function stop() { + parseOptions + $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} stop" >> $TOMCAT_LOG 2>&1 +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + stop + start + ;; +esac + diff --git a/tomcat-7.0.init b/tomcat-7.0.init index 7808d23..cddf8cd 100644 --- a/tomcat-7.0.init +++ b/tomcat-7.0.init @@ -67,7 +67,7 @@ TOMCAT_PROG="${NAME}" TOMCAT_USER="${TOMCAT_USER:-tomcat}" # Define the tomcat log file -TOMCAT_LOG="${TOMCAT_LOG:-/var/log/tomcat/catalina.out}" +TOMCAT_LOG="${TOMCAT_LOG:-${CATALINA_HOME}/logs/${NAME}-initd.log}" RETVAL="0" @@ -184,10 +184,10 @@ function start() { parseOptions if [ "$RETVAL" -eq "0" -a "$SECURITY_MANAGER" = "true" ]; then $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} start-security" \ - >> /var/log/${NAME}/initd.log 2>&1 || RETVAL="4" + >> ${TOMCAT_LOG} 2>&1 || RETVAL="4" else - [ "$RETVAL" -eq "0" ] && $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} start" >> /var/log/${NAME}/initd.log 2>&1 || RETVAL="4" + [ "$RETVAL" -eq "0" ] && $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} start" >> ${TOMCAT_LOG} 2>&1 || RETVAL="4" fi if [ "$RETVAL" -eq "0" ]; then log_success_msg @@ -206,7 +206,7 @@ function stop() { parseOptions if [ "$RETVAL" -eq "0" ]; then touch /var/lock/subsys/${NAME} 2>&1 || RETVAL="4" - [ "$RETVAL" -eq "0" ] && $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} stop" >> /var/log/${NAME}/initd.log 2>&1 || RETVAL="4" + [ "$RETVAL" -eq "0" ] && $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} stop" >> ${TOMCAT_LOG} 2>&1 || RETVAL="4" fi if [ "$RETVAL" -eq "0" ]; then count="0" diff --git a/tomcat-7.0.service b/tomcat-7.0.service index 3e47c4f..e556336 100644 --- a/tomcat-7.0.service +++ b/tomcat-7.0.service @@ -1,13 +1,19 @@ +# Systemd unit file for tomcat +# +# To create clones of this service: +# 1) By default SERVICE_NAME=tomcat. When cloned, the value must be defined +# before tomcat-sysd is called. +# 2) Create /etc/sysconfig/${SERVICE_NAME} from /etc/sysconfig/tomcat +# to override tomcat defaults + [Unit] -Description=Release implementation for Servlet 3.0 and JSP 2.2 +Description=Apache Tomcat Web Application Container After=syslog.target network.target [Service] Type=forking -PIDFile=/var/run/tomcat.pid -EnvironmentFile=/etc/sysconfig/tomcat -ExecStart=/etc/init.d/tomcat start -ExecStop=/etc/init.d/tomcat stop +ExecStart=/usr/sbin/tomcat-sysd start +ExecStop=/usr/sbin/tomcat-sysd stop [Install] WantedBy=multi-user.target diff --git a/tomcat.spec b/tomcat.spec index e568452..2aed06e 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -77,6 +77,7 @@ Source13: jasper-el-OSGi-MANIFEST.MF Source14: jasper-OSGi-MANIFEST.MF Source15: tomcat-api-OSGi-MANIFEST.MF Source16: tomcat-juli-OSGi-MANIFEST.MF +Source17: %{name}-%{major_version}.%{minor_version}-tomcat-sysd Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch @@ -97,6 +98,7 @@ BuildRequires: junit BuildRequires: log4j BuildRequires: geronimo-jaxrpc BuildRequires: wsdl4j +BuildRequires: systemd-units Requires: apache-commons-daemon Requires: apache-commons-logging Requires: apache-commons-collections @@ -110,8 +112,9 @@ Requires(post): chkconfig Requires(preun): chkconfig Requires(post): redhat-lsb Requires(preun): redhat-lsb -Requires(post): jpackage-utils -Requires(postun): jpackage-utils +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units %description Tomcat is the servlet container that is used in the official Reference @@ -147,6 +150,14 @@ Requires: jpackage-utils %description javadoc Javadoc generated documentation for Apache Tomcat. +%package systemv +Group: System Environment/Daemons +Summary: Systemv scripts for Apache Tomcat +Requires: %{name} = %{epoch}:%{version}-%{release} + +%description systemv +SystemV scripts to start and stop tomcat service + %package jsp-%{jspspec}-api Group: Development/Libraries Summary: Apache Tomcat JSP API implementation classes @@ -308,6 +319,7 @@ zip -u output/build/bin/tomcat-juli.jar META-INF/MANIFEST.MF %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{homedir} %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{tempdir} %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{workdir} +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_unitdir} # move things into place # First copy supporting libs to tomcat lib @@ -334,7 +346,9 @@ popd %{__install} -m 0644 %{SOURCE4} \ ${RPM_BUILD_ROOT}%{_sbindir}/%{name} %{__install} -m 0644 %{SOURCE11} \ - ${RPM_BUILD_ROOT}%{_systemddir}/%{name}.service + ${RPM_BUILD_ROOT}%{_unitdir}/%{name}.service +%{__install} -m 0644 %{SOURCE17} \ + ${RPM_BUILD_ROOT}%{_sbindir}/%{name}-sysd %{__ln_s} %{name} ${RPM_BUILD_ROOT}%{_sbindir}/d%{name} %{__sed} -e "s|\@\@\@TCLOG\@\@\@|%{logdir}|g" %{SOURCE5} \ > ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/%{name} @@ -444,7 +458,10 @@ done %post # install but don't activate /sbin/chkconfig --add %{name} -%update_maven_depmap +if [ $1 -eq 1 ]; then + #initial installation + /bin/systemctl daemon-reload >/dev/null 2>&1 || : +fi %post jsp-%{jspspec}-api %{_sbindir}/update-alternatives --install %{_javadir}/jsp.jar jsp \ @@ -453,7 +470,6 @@ done %post servlet-%{servletspec}-api %{_sbindir}/update-alternatives --install %{_javadir}/servlet.jar servlet \ %{_javadir}/%{name}-servlet-%{servletspec}-api.jar 20500 -%update_maven_depmap %post el-%{elspec}-api %{_sbindir}/update-alternatives --install %{_javadir}/elspec.jar elspec \ @@ -465,11 +481,18 @@ done if [ "$1" = "0" ]; then %{_initrddir}/%{name} stop >/dev/null 2>&1 /sbin/chkconfig --del %{name} + # package removal, not upgrade + /bin/systemctl --no-reload disable tomcat.service > /dev/null 2>&1 || : + /bin/systemctl stop tomcat.service > /dev/null 2>&1 || : fi - %postun -%update_maven_depmap +/bin/systemctl daemon-reload > /dev/null 2>&1 || : +if [ $1 -ge 1 ]; then + #package upgrade, not uninstall + /bin/systemctl try-restart tomcat.service > /dev/null 2>&1 || : +fi + %postun jsp-%{jspspec}-api if [ "$1" = "0" ]; then @@ -481,7 +504,6 @@ fi if [ "$1" = "0" ]; then %{_sbindir}/update-alternatives --remove servlet \ %{_javadir}/%{name}-servlet-%{servletspec}-api.jar - %update_maven_depmap fi %postun el-%{elspec}-api @@ -490,15 +512,20 @@ if [ "$1" = "0" ]; then %{_javadir}/%{name}-el-%{elspec}-api.jar fi +%triggerun -- tomcat < 0:7.0.22-2 +/usr/bin/systemd-sysv-convert -- save tomcat > /dev/null 2>&1 || : +# Run these becasue the SysV package being removed won't do them +/sbin/chkconfig --del tomcat > /dev/null 2>&1 || : +/bin/systemctl try-restart tomcat.service > /dev/null 2>&1 || : + %files %defattr(0664,root,tomcat,0755) %doc {LICENSE,NOTICE,RELEASE*} %attr(0755,root,root) %{_bindir}/%{name}-digest %attr(0755,root,root) %{_bindir}/%{name}-tool-wrapper -%attr(0755,root,root) %{_sbindir}/d%{name} %attr(0755,root,root) %{_sbindir}/%{name} -%attr(0755,root,root) %{_initrddir}/%{name} -%attr(0644,root,root) %{_systemddir}/%{name}.service +%attr(0644,root,root) %{_unitdir}/%{name}.service +%attr(0755,root,root) %{_sbindir}/%{name}-sysd %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %attr(0755,root,tomcat) %dir %{basedir} @@ -582,7 +609,17 @@ fi %{appdir}/examples %{appdir}/sample +%files systemv +%defattr(755,root,root,0755) +%{_sbindir}/d%{name} +%{_initrddir}/%{name} + %changelog +* Fri Nov 11 2011 Ivan Afonichev 0:7.0.22-2 +- Move tomcat-juli.jar to lib package +- Drop %%update_maven_depmap as in tomcat6 +- Provide native systemd unit file ported from tomcat6 + * Thu Oct 6 2011 Ivan Afonichev 0:7.0.22-1 - Updated to 7.0.22 From 4cfe7cc5cd0f75874001c7a1c0a872192b2c0924 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Mon, 28 Nov 2011 21:30:16 +0400 Subject: [PATCH 080/273] Updated to 7.0.23 --- sources | 2 +- tomcat.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 8a177eb..cea4652 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -878bc216d86ce803f3bbc65fd40eb96c apache-tomcat-7.0.22-src.tar.gz +4d78b1b115a4c3fcd079c388a8bbd0ad apache-tomcat-7.0.23-src.tar.gz diff --git a/tomcat.spec b/tomcat.spec index 2aed06e..cc6325f 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.2 %global major_version 7 %global minor_version 0 -%global micro_version 22 +%global micro_version 23 %global packdname apache-tomcat-%{version}-src %global servletspec 3.0 %global elspec 2.2 @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 2%{?dist} +Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -615,6 +615,9 @@ fi %{_initrddir}/%{name} %changelog +* Mon Nov 28 2011 Ivan Afonichev 0:7.0.23-1 +- Updated to 7.0.23 + * Fri Nov 11 2011 Ivan Afonichev 0:7.0.22-2 - Move tomcat-juli.jar to lib package - Drop %%update_maven_depmap as in tomcat6 From 2178fabdb4947a7714871c9c56726b849263604a Mon Sep 17 00:00:00 2001 From: Alexander Kurtakov Date: Wed, 11 Jan 2012 12:40:54 +0200 Subject: [PATCH 081/273] Add EntityResolver setter patch to jasper for jetty's need. (patch sent upstream). --- add_entity_resolver_setter.patch | 19 +++++++++++++++++++ tomcat.spec | 9 +++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 add_entity_resolver_setter.patch diff --git a/add_entity_resolver_setter.patch b/add_entity_resolver_setter.patch new file mode 100644 index 0000000..8a3f8a7 --- /dev/null +++ b/add_entity_resolver_setter.patch @@ -0,0 +1,19 @@ +--- java/org/apache/jasper/xmlparser/ParserUtils.java.sav 2012-01-11 12:19:05.303081671 +0200 ++++ java/org/apache/jasper/xmlparser/ParserUtils.java 2012-01-11 12:25:32.327526734 +0200 +@@ -132,6 +132,16 @@ public class ParserUtils { + + return (parseXMLDocument(uri, new InputSource(is))); + } ++ ++ /** ++ * Set the EntityResolver. ++ * This is needed when the dtds and Jasper itself are in different classloaders (e.g. OSGi environment). ++ * ++ * @parem er EntityResolver to use. ++ */ ++ public static void setEntityResolver(EntityResolver er) { ++ entityResolver = er; ++ } + + + // ------------------------------------------------------ Protected Methods diff --git a/tomcat.spec b/tomcat.spec index cc6325f..4171f42 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -80,6 +80,8 @@ Source16: tomcat-juli-OSGi-MANIFEST.MF Source17: %{name}-%{major_version}.%{minor_version}-tomcat-sysd Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch +#https://issues.apache.org/bugzilla/show_bug.cgi?id=52450 +Patch2: add_entity_resolver_setter.patch BuildArch: noarch @@ -226,7 +228,7 @@ find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name " %patch0 -p0 %patch1 -p0 -# %patch2 -p0 +%patch2 -p0 %{__ln_s} $(build-classpath jakarta-taglibs-core) webapps/examples/WEB-INF/lib/jstl.jar %{__ln_s} $(build-classpath jakarta-taglibs-standard) webapps/examples/WEB-INF/lib/standard.jar @@ -615,6 +617,9 @@ fi %{_initrddir}/%{name} %changelog +* Wed Jan 11 2012 Alexander Kurtakov 0:7.0.23-2 +- Add EntityResolver setter patch to jasper for jetty's need. (patch sent upstream). + * Mon Nov 28 2011 Ivan Afonichev 0:7.0.23-1 - Updated to 7.0.23 From a4cdf56b82db3fd9a8405c21f6b73d2a31c5e49e Mon Sep 17 00:00:00 2001 From: "Joseph D. Wagner" Date: Thu, 12 Jan 2012 01:28:30 +0400 Subject: [PATCH 082/273] support jsvc for starting tomcat --- tomcat-7.0-tomcat-sysd | 12 ++++++++++++ tomcat-7.0.wrapper | 9 +++++++++ tomcat.spec | 9 ++++++++- 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/tomcat-7.0-tomcat-sysd b/tomcat-7.0-tomcat-sysd index 1e79816..af3ed17 100644 --- a/tomcat-7.0-tomcat-sysd +++ b/tomcat-7.0-tomcat-sysd @@ -72,6 +72,12 @@ function start() { chown ${TOMCAT_USER}:${TOMCAT_USER} $TOMCAT_LOG fi + # if jsvc installed and USE_JSVC=true + # then start as root and use jsvc to drop privileges + if [ -x /usr/bin/jsvc ] && [ "$USE_JSVC" = "true" ]; then + TOMCAT_USER="root" + fi + parseOptions if [ "$SECURITY_MANAGER" = "true" ]; then $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} start-security" >> $TOMCAT_LOG 2>&1 @@ -81,6 +87,12 @@ function start() { } function stop() { + # if jsvc installed and USE_JSVC=true + # then start as root and use jsvc to drop privileges + if [ -x /usr/bin/jsvc ] && [ "$USE_JSVC" = "true" ]; then + TOMCAT_USER="root" + fi + parseOptions $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} stop" >> $TOMCAT_LOG 2>&1 } diff --git a/tomcat-7.0.wrapper b/tomcat-7.0.wrapper index ad3091b..5a81ae2 100644 --- a/tomcat-7.0.wrapper +++ b/tomcat-7.0.wrapper @@ -26,6 +26,15 @@ CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/bootstrap.jar" CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/tomcat-juli.jar" CLASSPATH="${CLASSPATH}:$(build-classpath commons-daemon 2>/dev/null)" +# if jsvc installed and USE_JSVC=true +# then use jsvc instead of calling java directly +if [ -x /usr/bin/jsvc ] && [ "$USE_JSVC" = "true" ]; then + JAVACMD="/usr/bin/jsvc -nodetach -user ${TOMCAT_USER} -outfile ${CATALINA_BASE}/logs/catalina.out -errfile ${CATALINA_BASE}/logs/catalina.out" + if [ "$1" = "stop" ]; then + JAVACMD="${JAVACMD} -stop" + fi +fi + if [ "$1" = "start" ]; then ${JAVACMD} $JAVA_OPTS $CATALINA_OPTS \ -classpath "$CLASSPATH" \ diff --git a/tomcat.spec b/tomcat.spec index cc6325f..3fd188d 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -615,6 +615,13 @@ fi %{_initrddir}/%{name} %changelog +* Mon Dec 12 2011 Joseph D. Wagner 0:7.0.23-2 +- Added support to /usr/sbin/tomcat-sysd and /usr/sbin/tomcat for + starting tomcat with jsvc, which allows tomcat to perform some + privileged operations (e.g. bind to a port < 1024) and then switch + identity to a non-privileged user. Must add USE_JSVC="true" to + /etc/tomcat/tomcat.conf or /etc/sysconfig/tomcat. + * Mon Nov 28 2011 Ivan Afonichev 0:7.0.23-1 - Updated to 7.0.23 From 94b7c9627f7802e2626cb64135c697436808c78b Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Thu, 12 Jan 2012 02:58:04 +0400 Subject: [PATCH 083/273] Move jsvc support to subpackage --- tomcat-7.0-jsvc.service | 19 ++++++ tomcat-7.0-jsvc.wrapper | 83 ++++++++++++++++++++++++++ tomcat-7.0-tomcat-jsvc-sysd | 113 ++++++++++++++++++++++++++++++++++++ tomcat-7.0-tomcat-sysd | 12 ---- tomcat-7.0.wrapper | 9 --- tomcat.spec | 39 +++++++++++-- 6 files changed, 250 insertions(+), 25 deletions(-) create mode 100644 tomcat-7.0-jsvc.service create mode 100644 tomcat-7.0-jsvc.wrapper create mode 100644 tomcat-7.0-tomcat-jsvc-sysd diff --git a/tomcat-7.0-jsvc.service b/tomcat-7.0-jsvc.service new file mode 100644 index 0000000..3792cef --- /dev/null +++ b/tomcat-7.0-jsvc.service @@ -0,0 +1,19 @@ +# Systemd unit file for tomcat +# +# To create clones of this service: +# 1) By default SERVICE_NAME=tomcat. When cloned, the value must be defined +# before tomcat-sysd is called. +# 2) Create /etc/sysconfig/${SERVICE_NAME} from /etc/sysconfig/tomcat +# to override tomcat defaults + +[Unit] +Description=Apache Tomcat Web Application Container JSVC wrapper +After=syslog.target network.target + +[Service] +Type=forking +ExecStart=/usr/sbin/tomcat-jsvc-sysd start +ExecStop=/usr/sbin/tomcat-jsvc-sysd stop + +[Install] +WantedBy=multi-user.target diff --git a/tomcat-7.0-jsvc.wrapper b/tomcat-7.0-jsvc.wrapper new file mode 100644 index 0000000..56fcc09 --- /dev/null +++ b/tomcat-7.0-jsvc.wrapper @@ -0,0 +1,83 @@ +#!/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)" + +# if jsvc installed and USE_JSVC=true +# then use jsvc instead of calling java directly +if [ -x /usr/bin/jsvc ]; then + JAVACMD="/usr/bin/jsvc -nodetach -user ${TOMCAT_USER} -outfile ${CATALINA_BASE}/logs/catalina.out -errfile ${CATALINA_BASE}/logs/catalina.out" + if [ "$1" = "stop" ]; then + JAVACMD="${JAVACMD} -stop" + fi +fi + +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 diff --git a/tomcat-7.0-tomcat-jsvc-sysd b/tomcat-7.0-tomcat-jsvc-sysd new file mode 100644 index 0000000..9134d5b --- /dev/null +++ b/tomcat-7.0-tomcat-jsvc-sysd @@ -0,0 +1,113 @@ +#!/bin/bash +# +# This script provides systemd activation of the tomcat service +# To create clones of this service: +# 1) SERVICE_NAME must be defined before calling this script +# 2) Create /etc/sysconfig/${SERVICE_NAME} from /etc/sysconfig/tomcat +# to override tomcat defaults + +# SERVICE_NAME is a required value only if the service name is +# different from 'tomcat' +# +NAME="${SERVICE_NAME:-tomcat}" + +#I'll bet this isn't required. +# unset ISBOOT + +# For SELinux we need to use 'runuser' not 'su' +if [ -x "/sbin/runuser" ]; then + SU="/sbin/runuser -s /bin/sh" +else + SU="/bin/su -s /bin/sh" +fi + +# Path to the tomcat launch script +TOMCAT_SCRIPT="/usr/sbin/tomcat-jsvc" + +# Define the tomcat username +TOMCAT_USER="${TOMCAT_USER:-tomcat}" + +# TOMCAT_LOG should be different from catalina.out. +# Usually the below config is all that is necessary +TOMCAT_LOG=/var/log/${NAME}/${NAME}-sysd.log + +# Get the tomcat config (use this for environment specific settings) +TOMCAT_CFG="/etc/tomcat/tomcat.conf" +if [ -r "$TOMCAT_CFG" ]; then + . $TOMCAT_CFG +fi + +# Get instance specific config file +if [ -r "/etc/sysconfig/${NAME}" ]; then + . /etc/sysconfig/${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() { + # fix permissions on the log and pid files + export CATALINA_PID="/var/run/${NAME}.pid" + touch $CATALINA_PID 2>&1 + if [ "$?" -eq "0" ]; then + chown ${TOMCAT_USER}:${TOMCAT_USER} $CATALINA_PID + fi + + touch $TOMCAT_LOG 2>&1 + if [ "$?" -eq "0" ]; then + chown ${TOMCAT_USER}:${TOMCAT_USER} $TOMCAT_LOG + fi + + # if jsvc installed and USE_JSVC=true + # then start as root and use jsvc to drop privileges + if [ -x /usr/bin/jsvc ]; then + TOMCAT_USER="root" + 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 +} + +function stop() { + # if jsvc installed and USE_JSVC=true + # then start as root and use jsvc to drop privileges + if [ -x /usr/bin/jsvc ]; then + TOMCAT_USER="root" + fi + + parseOptions + $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} stop" >> $TOMCAT_LOG 2>&1 +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + stop + start + ;; +esac + diff --git a/tomcat-7.0-tomcat-sysd b/tomcat-7.0-tomcat-sysd index af3ed17..1e79816 100644 --- a/tomcat-7.0-tomcat-sysd +++ b/tomcat-7.0-tomcat-sysd @@ -72,12 +72,6 @@ function start() { chown ${TOMCAT_USER}:${TOMCAT_USER} $TOMCAT_LOG fi - # if jsvc installed and USE_JSVC=true - # then start as root and use jsvc to drop privileges - if [ -x /usr/bin/jsvc ] && [ "$USE_JSVC" = "true" ]; then - TOMCAT_USER="root" - fi - parseOptions if [ "$SECURITY_MANAGER" = "true" ]; then $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} start-security" >> $TOMCAT_LOG 2>&1 @@ -87,12 +81,6 @@ function start() { } function stop() { - # if jsvc installed and USE_JSVC=true - # then start as root and use jsvc to drop privileges - if [ -x /usr/bin/jsvc ] && [ "$USE_JSVC" = "true" ]; then - TOMCAT_USER="root" - fi - parseOptions $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} stop" >> $TOMCAT_LOG 2>&1 } diff --git a/tomcat-7.0.wrapper b/tomcat-7.0.wrapper index 5a81ae2..ad3091b 100644 --- a/tomcat-7.0.wrapper +++ b/tomcat-7.0.wrapper @@ -26,15 +26,6 @@ CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/bootstrap.jar" CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/tomcat-juli.jar" CLASSPATH="${CLASSPATH}:$(build-classpath commons-daemon 2>/dev/null)" -# if jsvc installed and USE_JSVC=true -# then use jsvc instead of calling java directly -if [ -x /usr/bin/jsvc ] && [ "$USE_JSVC" = "true" ]; then - JAVACMD="/usr/bin/jsvc -nodetach -user ${TOMCAT_USER} -outfile ${CATALINA_BASE}/logs/catalina.out -errfile ${CATALINA_BASE}/logs/catalina.out" - if [ "$1" = "stop" ]; then - JAVACMD="${JAVACMD} -stop" - fi -fi - if [ "$1" = "start" ]; then ${JAVACMD} $JAVA_OPTS $CATALINA_OPTS \ -classpath "$CLASSPATH" \ diff --git a/tomcat.spec b/tomcat.spec index 51a7fc6..18ac73f 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 2%{?dist} +Release: 4%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -78,6 +78,11 @@ Source14: jasper-OSGi-MANIFEST.MF Source15: tomcat-api-OSGi-MANIFEST.MF Source16: tomcat-juli-OSGi-MANIFEST.MF Source17: %{name}-%{major_version}.%{minor_version}-tomcat-sysd +Source18: %{name}-%{major_version}.%{minor_version}-tomcat-jsvc-sysd +Source19: %{name}-%{major_version}.%{minor_version}-jsvc.wrapper +Source20: %{name}-%{major_version}.%{minor_version}-jsvc.service + + Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch #https://issues.apache.org/bugzilla/show_bug.cgi?id=52450 @@ -160,6 +165,17 @@ Requires: %{name} = %{epoch}:%{version}-%{release} %description systemv SystemV scripts to start and stop tomcat service +%package jsvc +Group: System Environment/Daemons +Summary: Apache jsvc wrapper for Apache Tomcat as separate service +Requires: %{name} = %{epoch}:%{version}-%{release} +Requires: apache-commons-daemon-jsvc + +%description jsvc +Systemd service and wrapper scripts to start tomcat with jsvc, +which allows tomcat to perform some privileged operations +(e.g. bind to a port < 1024) and then switch identity to a non-privileged user. + %package jsp-%{jspspec}-api Group: Development/Libraries Summary: Apache Tomcat JSP API implementation classes @@ -351,6 +367,12 @@ popd ${RPM_BUILD_ROOT}%{_unitdir}/%{name}.service %{__install} -m 0644 %{SOURCE17} \ ${RPM_BUILD_ROOT}%{_sbindir}/%{name}-sysd +%{__install} -m 0644 %{SOURCE19} \ + ${RPM_BUILD_ROOT}%{_sbindir}/%{name}-jsvc +%{__install} -m 0644 %{SOURCE20} \ + ${RPM_BUILD_ROOT}%{_unitdir}/%{name}-jsvc.service +%{__install} -m 0644 %{SOURCE18} \ + ${RPM_BUILD_ROOT}%{_sbindir}/%{name}-jsvc-sysd %{__ln_s} %{name} ${RPM_BUILD_ROOT}%{_sbindir}/d%{name} %{__sed} -e "s|\@\@\@TCLOG\@\@\@|%{logdir}|g" %{SOURCE5} \ > ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/%{name} @@ -616,7 +638,19 @@ fi %{_sbindir}/d%{name} %{_initrddir}/%{name} +%files jsvc +%defattr(755,root,root,0755) +%{_sbindir}/%{name}-jsvc +%{_sbindir}/%{name}-jsvc-sysd +%attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service + %changelog +* Wed Jan 12 2012 Ivan Afonichev 0:7.0.23-4 +- Move jsvc support to subpackage + +* Wed Jan 11 2012 Alexander Kurtakov 0:7.0.23-2 +- Add EntityResolver setter patch to jasper for jetty's need. (patch sent upstream). + * Mon Dec 12 2011 Joseph D. Wagner 0:7.0.23-3 - Added support to /usr/sbin/tomcat-sysd and /usr/sbin/tomcat for starting tomcat with jsvc, which allows tomcat to perform some @@ -624,9 +658,6 @@ fi identity to a non-privileged user. Must add USE_JSVC="true" to /etc/tomcat/tomcat.conf or /etc/sysconfig/tomcat. -* Wed Jan 11 2012 Alexander Kurtakov 0:7.0.23-2 -- Add EntityResolver setter patch to jasper for jetty's need. (patch sent upstream). - * Mon Nov 28 2011 Ivan Afonichev 0:7.0.23-1 - Updated to 7.0.23 From 07ce57c15be48393d0f482d81ac52f8351ba3c9d Mon Sep 17 00:00:00 2001 From: Krzysztof Daniel Date: Fri, 13 Jan 2012 14:47:37 +0100 Subject: [PATCH 084/273] Bug 781454 - Export 3.0 packages also as 2.6 https://bugzilla.redhat.com/show_bug.cgi?id=781454 Technically speaking, the 3.0 api should be named 2.6, and that is why Eclipse accepts only 2.6 javax.packages as prerequisities. Signed-off-by: Ivan Afonichev --- servlet-api-OSGi-MANIFEST.MF | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/servlet-api-OSGi-MANIFEST.MF b/servlet-api-OSGi-MANIFEST.MF index 67c80b8..d5b602a 100644 --- a/servlet-api-OSGi-MANIFEST.MF +++ b/servlet-api-OSGi-MANIFEST.MF @@ -6,5 +6,11 @@ Bundle-Name: %bundleName Bundle-Localization: plugin Bundle-Version: 3.0.0 Bundle-Vendor: %bundleProvider -Export-Package: javax.servlet;version="3.0",javax.servlet.http;version - ="3.0",javax.servlet.resources;version="3.0" +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="2.6", + javax.servlet.resources;version="3.0", + javax.servlet.resources;version="2.6" From a756cdb6a0efc3da908702369037d832bbd8ce1f Mon Sep 17 00:00:00 2001 From: Roland Grunberg Date: Wed, 18 Jan 2012 00:46:25 +0400 Subject: [PATCH 085/273] Add javax.servlet.descriptor to export-package of servlet-api --- servlet-api-OSGi-MANIFEST.MF | 1 + 1 file changed, 1 insertion(+) diff --git a/servlet-api-OSGi-MANIFEST.MF b/servlet-api-OSGi-MANIFEST.MF index d5b602a..3938935 100644 --- a/servlet-api-OSGi-MANIFEST.MF +++ b/servlet-api-OSGi-MANIFEST.MF @@ -11,6 +11,7 @@ Export-Package: javax.servlet;version="3.0", 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" From 4bfdca25933d03b41989af5d38562758923b9a39 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Sat, 21 Jan 2012 22:46:52 +0400 Subject: [PATCH 086/273] Added Krzysztof's changes to changelog --- tomcat.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tomcat.spec b/tomcat.spec index 18ac73f..758a889 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 4%{?dist} +Release: 5%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -645,6 +645,10 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Fri Jan 13 2012 Krzysztof Daniel 0:7.0.23-5 +- Exported javax.servlet.* packages in version 3.0 as 2.6 to make + servlet-api compatible with Eclipse. + * Wed Jan 12 2012 Ivan Afonichev 0:7.0.23-4 - Move jsvc support to subpackage From a7d085a852efe14b264fb82748172798ad4e1571 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Sun, 22 Jan 2012 01:52:19 +0400 Subject: [PATCH 087/273] - Updated to 7.0.25 - Removed EntityResolver patch (changes already in upstream sources) - Place poms and depmaps in the same package as jars - Added javax.servlet.descriptor to export-package of servlet-api - Move several chkconfig actions and reqs to systemv subpackage - New maven depmaps generation method - Add patch to support java7. (patch sent upstream). - Require java >= 1:1.6.0 --- add_entity_resolver_setter.patch | 19 ------- add_parent_logger_getter.patch | 29 ++++++++++ sources | 2 +- tomcat.spec | 95 +++++++++++++++++--------------- 4 files changed, 82 insertions(+), 63 deletions(-) delete mode 100644 add_entity_resolver_setter.patch create mode 100644 add_parent_logger_getter.patch diff --git a/add_entity_resolver_setter.patch b/add_entity_resolver_setter.patch deleted file mode 100644 index 8a3f8a7..0000000 --- a/add_entity_resolver_setter.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- java/org/apache/jasper/xmlparser/ParserUtils.java.sav 2012-01-11 12:19:05.303081671 +0200 -+++ java/org/apache/jasper/xmlparser/ParserUtils.java 2012-01-11 12:25:32.327526734 +0200 -@@ -132,6 +132,16 @@ public class ParserUtils { - - return (parseXMLDocument(uri, new InputSource(is))); - } -+ -+ /** -+ * Set the EntityResolver. -+ * This is needed when the dtds and Jasper itself are in different classloaders (e.g. OSGi environment). -+ * -+ * @parem er EntityResolver to use. -+ */ -+ public static void setEntityResolver(EntityResolver er) { -+ entityResolver = er; -+ } - - - // ------------------------------------------------------ Protected Methods diff --git a/add_parent_logger_getter.patch b/add_parent_logger_getter.patch new file mode 100644 index 0000000..40b9268 --- /dev/null +++ b/add_parent_logger_getter.patch @@ -0,0 +1,29 @@ +--- modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java.sav 2012-01-17 13:55:44.000000000 +0400 ++++ modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java 2012-01-22 00:44:22.299789107 +0400 +@@ -19,9 +19,11 @@ package org.apache.tomcat.jdbc.pool; + import java.io.PrintWriter; + import java.sql.Connection; + import java.sql.SQLException; ++import java.sql.SQLFeatureNotSupportedException; + import java.util.Iterator; + import java.util.Properties; + import java.util.concurrent.Future; ++import java.util.logging.Logger; + + import javax.sql.XAConnection; + +@@ -534,6 +536,14 @@ public class DataSourceProxy implements + } + + /** ++ * no-op ++ * {@link javax.sql.DataSource#getParentLogger} ++ */ ++ public Logger getParentLogger() throws SQLFeatureNotSupportedException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ ++ /** + * no-op + * {@link javax.sql.DataSource#getLogWriter} + */ diff --git a/sources b/sources index cea4652..1061591 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4d78b1b115a4c3fcd079c388a8bbd0ad apache-tomcat-7.0.23-src.tar.gz +12ebfd86a071184baac453eaf7c2a760 apache-tomcat-7.0.25-src.tar.gz diff --git a/tomcat.spec b/tomcat.spec index 758a889..09c5b97 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.2 %global major_version 7 %global minor_version 0 -%global micro_version 23 +%global micro_version 25 %global packdname apache-tomcat-%{version}-src %global servletspec 3.0 %global elspec 2.2 @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 5%{?dist} +Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -85,8 +85,8 @@ Source20: %{name}-%{major_version}.%{minor_version}-jsvc.service Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch -#https://issues.apache.org/bugzilla/show_bug.cgi?id=52450 -Patch2: add_entity_resolver_setter.patch +#https://issues.apache.org/bugzilla/show_bug.cgi?id=52493 +Patch2: add_parent_logger_getter.patch BuildArch: noarch @@ -99,7 +99,7 @@ BuildRequires: apache-commons-daemon BuildRequires: apache-commons-dbcp BuildRequires: apache-commons-pool BuildRequires: jakarta-taglibs-standard -BuildRequires: java-devel = 1:1.6.0 +BuildRequires: java-devel >= 1:1.6.0 BuildRequires: jpackage-utils >= 0:1.7.0 BuildRequires: junit BuildRequires: log4j @@ -111,7 +111,7 @@ Requires: apache-commons-logging Requires: apache-commons-collections Requires: apache-commons-dbcp Requires: apache-commons-pool -Requires: java = 1:1.6.0 +Requires: java >= 1:1.6.0 Requires: procps Requires: %{name}-lib = %{epoch}:%{version}-%{release} Requires(pre): shadow-utils @@ -161,6 +161,8 @@ Javadoc generated documentation for Apache Tomcat. Group: System Environment/Daemons Summary: Systemv scripts for Apache Tomcat Requires: %{name} = %{epoch}:%{version}-%{release} +Requires(post): chkconfig +Requires(postun): chkconfig %description systemv SystemV scripts to start and stop tomcat service @@ -182,8 +184,6 @@ Summary: Apache Tomcat JSP API implementation classes Provides: jsp = %{jspspec} Provides: jsp22 Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} -Requires(post): chkconfig -Requires(postun): chkconfig %description jsp-%{jspspec}-api Apache Tomcat JSP API implementation classes. @@ -210,8 +210,6 @@ Summary: Apache Tomcat Servlet API implementation classes Provides: servlet = %{servletspec} Provides: servlet6 Provides: servlet3 -Requires(post): chkconfig -Requires(postun): chkconfig %description servlet-%{servletspec}-api Apache Tomcat Servlet API implementation classes. @@ -221,8 +219,6 @@ Group: Development/Libraries Summary: Expression Language v1.0 API Provides: el_1_0_api = %{epoch}:%{version}-%{release} Provides: el_api = %{elspec} -Requires(post): chkconfig -Requires(postun): chkconfig %description el-%{elspec}-api Expression Language 1.0. @@ -435,13 +431,6 @@ popd %{__rm} ${RPM_BUILD_ROOT}%{appdir}/docs/appdev/sample/sample.war -# Generate a depmap fragment javax.servlet:servlet-api pointing to -# tomcat-servlet-3.0-api for backwards compatibility -%add_to_maven_depmap javax.servlet servlet-api %{servletspec} JPP %{name}-servlet-%{servletspec}-api -# also provide jetty depmap (originally in jetty package, but it's cleaner to have it here) -%add_to_maven_depmap org.mortbay.jetty servlet-api %{servletspec} JPP %{name}-servlet-%{servletspec}-api -mv %{buildroot}%{_mavendepmapfragdir}/%{name} %{buildroot}%{_mavendepmapfragdir}/%{name}-servlet-api - # Install the maven metadata %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_mavenpomdir} pushd output/dist/src/res/maven @@ -451,27 +440,29 @@ for pom in *.pom; do done # we won't install dbcp, juli-adapters and juli-extras pom files -for pom in tomcat-annotations-api.pom tomcat-catalina.pom tomcat-jasper-el.pom tomcat-jasper.pom \ - tomcat-catalina-ha.pom tomcat-el-api.pom; do - %{__cp} -a $pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-$pom - base=`basename $pom .pom` - %add_to_maven_depmap org.apache.tomcat $base %{version} JPP/%{name} $base +for libname in annotations-api catalina jasper-el jasper catalina-ha; do + %{__cp} -a %{name}-$libname.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-$libname.pom + %add_maven_depmap JPP.%{name}-$libname.pom %{name}/$libname.jar done # servlet-api jsp-api and el-api are not in tomcat subdir, since they are widely re-used elsewhere -for pom in tomcat-jsp-api.pom tomcat-servlet-api.pom tomcat-el-api.pom;do - %{__cp} -a $pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-%{name}-$pom - base=`basename $pom .pom` - %add_to_maven_depmap org.apache.tomcat $base %{version} JPP %{name}-$base +for libname in tomcat-jsp-api tomcat-el-api;do + %{__cp} -a $libname.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-$libname.pom + %add_maven_depmap JPP-$libname.pom $libname.jar -f "$libname" done +%{__cp} -a tomcat-servlet-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-servlet-api.pom +# Generate a depmap fragment javax.servlet:servlet-api pointing to +# tomcat-servlet-3.0-api for backwards compatibility +# also provide jetty depmap (originally in jetty package, but it's cleaner to have it here +%add_maven_depmap JPP-tomcat-servlet-api.pom tomcat-servlet-api.jar -f "tomcat-servlet-api" -a "javax.servlet:servlet-api,org.mortbay.jetty:servlet-api" + # two special pom where jar files have different names %{__cp} -a tomcat-tribes.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-catalina-tribes.pom -%add_to_maven_depmap org.apache.tomcat tribes %{version} JPP/%{name} catalina-tribes +%add_maven_depmap JPP.%{name}-catalina-tribes.pom %{name}/catalina-tribes.jar %{__cp} -a tomcat-juli.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-juli.pom -%add_to_maven_depmap org.apache.tomcat juli %{version} JPP/%{name} tomcat-juli - +%add_maven_depmap JPP.%{name}-tomcat-juli.pom %{name}/tomcat-juli.jar %pre # add the tomcat user and group @@ -487,6 +478,10 @@ if [ $1 -eq 1 ]; then /bin/systemctl daemon-reload >/dev/null 2>&1 || : fi +%post systemv +# install but don't activate +/sbin/chkconfig --add %{name} + %post jsp-%{jspspec}-api %{_sbindir}/update-alternatives --install %{_javadir}/jsp.jar jsp \ %{_javadir}/%{name}-jsp-%{jspspec}-api.jar 20100 @@ -499,12 +494,14 @@ fi %{_sbindir}/update-alternatives --install %{_javadir}/elspec.jar elspec \ %{_javadir}/%{name}-el-%{elspec}-api.jar 20250 +%preun systemv + %{_initrddir}/%{name} stop >/dev/null 2>&1 + /sbin/chkconfig --del %{name} + %preun # clean tempdir and workdir on removal or upgrade %{__rm} -rf %{workdir}/* %{tempdir}/* if [ "$1" = "0" ]; then - %{_initrddir}/%{name} stop >/dev/null 2>&1 - /sbin/chkconfig --del %{name} # package removal, not upgrade /bin/systemctl --no-reload disable tomcat.service > /dev/null 2>&1 || : /bin/systemctl stop tomcat.service > /dev/null 2>&1 || : @@ -569,7 +566,6 @@ fi %attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/*.properties %attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/context.xml %attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/server.xml -%attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/log4j.properties %attr(0660,tomcat,tomcat) %config(noreplace) %{confdir}/tomcat-users.xml %attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/web.xml %dir %{homedir} @@ -581,10 +577,6 @@ fi %{homedir}/work %{homedir}/logs %{homedir}/conf -%{_mavendepmapfragdir}/%{name} -%{_mavenpomdir}/*.pom -# Exclude the POMs that are in sub-packages -%exclude %{_mavenpomdir}/*api* %files admin-webapps %defattr(0664,root,tomcat,0755) @@ -603,12 +595,17 @@ fi %defattr(-,root,root,-) %{_javadir}/%{name}-jsp-%{jspspec}*.jar %{_javadir}/%{name}-jsp-api.jar -%{_mavenpomdir}/JPP-%{name}-tomcat-jsp-api.pom +%{_mavenpomdir}/JPP-%{name}-jsp-api.pom +%{_mavendepmapfragdir}/%{name}-tomcat-jsp-api %files lib %defattr(-,root,root,-) %{libdir} %{bindir}/tomcat-juli.jar +%{_mavendepmapfragdir}/%{name} +%{_mavenpomdir}/*.pom +# Exclude the POMs that are in sub-packages +%exclude %{_mavenpomdir}/JPP-*api*.pom %exclude %{libdir}/%{name}-el-%{elspec}-api.jar %files servlet-%{servletspec}-api @@ -616,8 +613,8 @@ fi %doc LICENSE %{_javadir}/%{name}-servlet-%{servletspec}*.jar %{_javadir}/%{name}-servlet-api.jar -%{_mavendepmapfragdir}/%{name}-servlet-api -%{_mavenpomdir}/JPP-%{name}-tomcat-servlet-api.pom +%{_mavendepmapfragdir}/%{name}-tomcat-servlet-api +%{_mavenpomdir}/JPP-%{name}-servlet-api.pom %files el-%{elspec}-api %defattr(-,root,root,-) @@ -625,7 +622,9 @@ fi %{_javadir}/%{name}-el-%{elspec}-api.jar %{_javadir}/%{name}-el-api.jar %{libdir}/%{name}-el-%{elspec}-api.jar -%{_mavenpomdir}/JPP-%{name}-tomcat-el-api.pom +%{_mavenpomdir}/JPP-%{name}-el-api.pom +%{_mavendepmapfragdir}/%{name}-tomcat-el-api + %files webapps %defattr(0644,tomcat,tomcat,0755) @@ -645,11 +644,21 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Sat Jan 21 2012 Ivan Afonichev 0:7.0.25-1 +- Updated to 7.0.25 +- Removed EntityResolver patch (changes already in upstream sources) +- Place poms and depmaps in the same package as jars +- Added javax.servlet.descriptor to export-package of servlet-api +- Move several chkconfig actions and reqs to systemv subpackage +- New maven depmaps generation method +- Add patch to support java7. (patch sent upstream). +- Require java >= 1:1.6.0 + * Fri Jan 13 2012 Krzysztof Daniel 0:7.0.23-5 - Exported javax.servlet.* packages in version 3.0 as 2.6 to make servlet-api compatible with Eclipse. -* Wed Jan 12 2012 Ivan Afonichev 0:7.0.23-4 +* Thu Jan 12 2012 Ivan Afonichev 0:7.0.23-4 - Move jsvc support to subpackage * Wed Jan 11 2012 Alexander Kurtakov 0:7.0.23-2 From 56bee3dd5e225d2cfb1c4b08d4631ffdf45ccb72 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Sun, 22 Jan 2012 03:47:15 +0400 Subject: [PATCH 088/273] Added hack for maven depmap of tomcat-juli absolute link [ -f ] pass correctly --- tomcat.spec | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index 09c5b97..78a979f 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -409,8 +409,8 @@ pushd ${RPM_BUILD_ROOT}%{libdir} %{__ln_s} $(build-classpath log4j) log4j.jar %{__ln_s} $(build-classpath ecj) jasper-jdt.jar - # Link the juli jar here from /usr/share/java/tomcat - %{__ln_s} %{bindir}/tomcat-juli.jar . + # Temporary copy the juli jar here from /usr/share/java/tomcat (for maven depmap) + %{__cp} -a ${RPM_BUILD_ROOT}%{bindir}/tomcat-juli.jar ./ popd # symlink to the FHS locations where we've installed things @@ -464,6 +464,10 @@ done %{__cp} -a tomcat-juli.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-juli.pom %add_maven_depmap JPP.%{name}-tomcat-juli.pom %{name}/tomcat-juli.jar +# replace temporary copy with link +%{__ln_s} -f %{bindir}/tomcat-juli.jar ${RPM_BUILD_ROOT}%{libdir}/ + + %pre # add the tomcat user and group %{_sbindir}/groupadd -g %{tcuid} -r tomcat 2>/dev/null || : @@ -644,6 +648,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Sun Jan 22 2012 Ivan Afonichev 0:7.0.25-2 +- Added hack for maven depmap of tomcat-juli absolute link [ -f ] pass correctly + * Sat Jan 21 2012 Ivan Afonichev 0:7.0.25-1 - Updated to 7.0.25 - Removed EntityResolver patch (changes already in upstream sources) From 1daf3ea73cfc6b18d5c20214ce675da2b9b979e1 Mon Sep 17 00:00:00 2001 From: Krzysztof Daniel Date: Wed, 8 Feb 2012 12:01:47 +0100 Subject: [PATCH 089/273] Dropped indirect dependency to tomcat5. --- tomcat.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index 78a979f..7353c68 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -98,7 +98,7 @@ BuildRequires: apache-commons-collections BuildRequires: apache-commons-daemon BuildRequires: apache-commons-dbcp BuildRequires: apache-commons-pool -BuildRequires: jakarta-taglibs-standard +BuildRequires: jakarta-taglibs-standard >= 0:1.1.2-4 BuildRequires: java-devel >= 1:1.6.0 BuildRequires: jpackage-utils >= 0:1.7.0 BuildRequires: junit @@ -227,7 +227,7 @@ Expression Language 1.0. Group: Applications/Internet Summary: The ROOT and examples web applications for Apache Tomcat Requires: %{name} = %{epoch}:%{version}-%{release} -Requires: jakarta-taglibs-standard >= 0:1.1 +Requires: jakarta-taglibs-standard >= 0:1.1.2-4 %description webapps The ROOT and examples web applications for Apache Tomcat. @@ -648,6 +648,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Wed Feb 8 2012 Krzysztof Daniel 0:7.0.25-3 +- Dropped indirect dependecy to tomcat 5 + * Sun Jan 22 2012 Ivan Afonichev 0:7.0.25-2 - Added hack for maven depmap of tomcat-juli absolute link [ -f ] pass correctly From 84c90670a967f124872b50b1ff230964d8b2751e Mon Sep 17 00:00:00 2001 From: Krzysztof Daniel Date: Wed, 8 Feb 2012 12:01:47 +0100 Subject: [PATCH 090/273] Dropped indirect dependency to tomcat5. --- tomcat.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index 78a979f..7353c68 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -98,7 +98,7 @@ BuildRequires: apache-commons-collections BuildRequires: apache-commons-daemon BuildRequires: apache-commons-dbcp BuildRequires: apache-commons-pool -BuildRequires: jakarta-taglibs-standard +BuildRequires: jakarta-taglibs-standard >= 0:1.1.2-4 BuildRequires: java-devel >= 1:1.6.0 BuildRequires: jpackage-utils >= 0:1.7.0 BuildRequires: junit @@ -227,7 +227,7 @@ Expression Language 1.0. Group: Applications/Internet Summary: The ROOT and examples web applications for Apache Tomcat Requires: %{name} = %{epoch}:%{version}-%{release} -Requires: jakarta-taglibs-standard >= 0:1.1 +Requires: jakarta-taglibs-standard >= 0:1.1.2-4 %description webapps The ROOT and examples web applications for Apache Tomcat. @@ -648,6 +648,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Wed Feb 8 2012 Krzysztof Daniel 0:7.0.25-3 +- Dropped indirect dependecy to tomcat 5 + * Sun Jan 22 2012 Ivan Afonichev 0:7.0.25-2 - Added hack for maven depmap of tomcat-juli absolute link [ -f ] pass correctly From 38aa2517e845ce823fe9a76c93baf7f884d9e186 Mon Sep 17 00:00:00 2001 From: Krzysztof Daniel Date: Thu, 16 Feb 2012 09:15:36 +0100 Subject: [PATCH 091/273] Bug 790694: Priorities of jsp, servlet and el packages updated. --- tomcat.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index 7353c68..a314b92 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 3%{?dist} +Release: 4%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -488,15 +488,15 @@ fi %post jsp-%{jspspec}-api %{_sbindir}/update-alternatives --install %{_javadir}/jsp.jar jsp \ - %{_javadir}/%{name}-jsp-%{jspspec}-api.jar 20100 + %{_javadir}/%{name}-jsp-%{jspspec}-api.jar 20200 %post servlet-%{servletspec}-api %{_sbindir}/update-alternatives --install %{_javadir}/servlet.jar servlet \ - %{_javadir}/%{name}-servlet-%{servletspec}-api.jar 20500 + %{_javadir}/%{name}-servlet-%{servletspec}-api.jar 30000 %post el-%{elspec}-api %{_sbindir}/update-alternatives --install %{_javadir}/elspec.jar elspec \ - %{_javadir}/%{name}-el-%{elspec}-api.jar 20250 + %{_javadir}/%{name}-el-%{elspec}-api.jar 20300 %preun systemv %{_initrddir}/%{name} stop >/dev/null 2>&1 @@ -648,6 +648,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Thu Feb 16 2012 Krzysztof Daniel 0:7.0.25-4 +- Bug 790694: Priorities of jsp, servlet and el packages updated. + * Wed Feb 8 2012 Krzysztof Daniel 0:7.0.25-3 - Dropped indirect dependecy to tomcat 5 From 5d4b042f0c9d8f679c61db1b9e1fbe9fde743db3 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Wed, 22 Feb 2012 21:16:21 +0400 Subject: [PATCH 092/273] Updated to 7.0.26 Bug 790334: Change ownership of logdir for logrotate --- sources | 2 +- tomcat.spec | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 1061591..e2b3db7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -12ebfd86a071184baac453eaf7c2a760 apache-tomcat-7.0.25-src.tar.gz +eb8e7192b02b6031be6fc23afea2431f apache-tomcat-7.0.26-src.tar.gz diff --git a/tomcat.spec b/tomcat.spec index a314b92..3ce683e 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.2 %global major_version 7 %global minor_version 0 -%global micro_version 25 +%global micro_version 26 %global packdname apache-tomcat-%{version}-src %global servletspec 3.0 %global elspec 2.2 @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 4%{?dist} +Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -648,6 +648,10 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Wed Feb 22 2012 Ivan Afonichev 0:7.0.26-1 +- Updated to 7.0.26 +- Bug 790334: Change ownership of logdir for logrotate + * Thu Feb 16 2012 Krzysztof Daniel 0:7.0.25-4 - Bug 790694: Priorities of jsp, servlet and el packages updated. From 37c11cfb2cf6026f687bb460de2fe5ed53a0d613 Mon Sep 17 00:00:00 2001 From: Stanislav Ochotnicky Date: Wed, 21 Mar 2012 17:15:10 +0100 Subject: [PATCH 093/273] Add more depmaps to J2EE apis to help jetty/glassfish updates --- tomcat.spec | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index 3ce683e..4244d71 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -99,7 +99,7 @@ BuildRequires: apache-commons-daemon BuildRequires: apache-commons-dbcp BuildRequires: apache-commons-pool BuildRequires: jakarta-taglibs-standard >= 0:1.1.2-4 -BuildRequires: java-devel >= 1:1.6.0 +BuildRequires: java-devel >= 1:1.6.0 BuildRequires: jpackage-utils >= 0:1.7.0 BuildRequires: junit BuildRequires: log4j @@ -174,7 +174,7 @@ Requires: %{name} = %{epoch}:%{version}-%{release} Requires: apache-commons-daemon-jsvc %description jsvc -Systemd service and wrapper scripts to start tomcat with jsvc, +Systemd service and wrapper scripts to start tomcat with jsvc, which allows tomcat to perform some privileged operations (e.g. bind to a port < 1024) and then switch identity to a non-privileged user. @@ -446,16 +446,17 @@ for libname in annotations-api catalina jasper-el jasper catalina-ha; do done # servlet-api jsp-api and el-api are not in tomcat subdir, since they are widely re-used elsewhere -for libname in tomcat-jsp-api tomcat-el-api;do - %{__cp} -a $libname.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-$libname.pom - %add_maven_depmap JPP-$libname.pom $libname.jar -f "$libname" -done +%{__cp} -a tomcat-jsp-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-jsp-api.pom +%add_maven_depmap JPP-tomcat-jsp-api.pom tomcat-jsp-api.jar -f "tomcat-jsp-api" -a "javax.servlet.jsp:javax.servlet.jsp-api,javax.servlet:jsp-api" + +%{__cp} -a tomcat-el-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-el-api.pom +%add_maven_depmap JPP-tomcat-el-api.pom tomcat-el-api.jar -f "tomcat-el-api" -a "javax.el:javax.el-api,javax.el:el-api" %{__cp} -a tomcat-servlet-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-servlet-api.pom # Generate a depmap fragment javax.servlet:servlet-api pointing to # tomcat-servlet-3.0-api for backwards compatibility # also provide jetty depmap (originally in jetty package, but it's cleaner to have it here -%add_maven_depmap JPP-tomcat-servlet-api.pom tomcat-servlet-api.jar -f "tomcat-servlet-api" -a "javax.servlet:servlet-api,org.mortbay.jetty:servlet-api" +%add_maven_depmap JPP-tomcat-servlet-api.pom tomcat-servlet-api.jar -f "tomcat-servlet-api" -a "javax.servlet:servlet-api,javax.servlet:javax.servlet-api,org.mortbay.jetty:servlet-api" # two special pom where jar files have different names %{__cp} -a tomcat-tribes.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-catalina-tribes.pom @@ -648,6 +649,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Wed Mar 21 2012 Stanislav Ochotnicky - 0:7.0.26-2 +- Add more depmaps to J2EE apis to help jetty/glassfish updates + * Wed Feb 22 2012 Ivan Afonichev 0:7.0.26-1 - Updated to 7.0.26 - Bug 790334: Change ownership of logdir for logrotate @@ -668,7 +672,7 @@ fi - Added javax.servlet.descriptor to export-package of servlet-api - Move several chkconfig actions and reqs to systemv subpackage - New maven depmaps generation method -- Add patch to support java7. (patch sent upstream). +- Add patch to support java7. (patch sent upstream). - Require java >= 1:1.6.0 * Fri Jan 13 2012 Krzysztof Daniel 0:7.0.23-5 @@ -692,7 +696,7 @@ fi - Updated to 7.0.23 * Fri Nov 11 2011 Ivan Afonichev 0:7.0.22-2 -- Move tomcat-juli.jar to lib package +- Move tomcat-juli.jar to lib package - Drop %%update_maven_depmap as in tomcat6 - Provide native systemd unit file ported from tomcat6 @@ -728,7 +732,7 @@ fi * Mon Jun 6 2011 Ivan Afonichev 0:7.0.14-3 - Added initial systemd service -- Fix some paths +- Fix some paths * Sat May 21 2011 Ivan Afonichev 0:7.0.14-2 - Fixed http source link @@ -752,9 +756,9 @@ fi * Thu Apr 28 2011 Ivan Afonichev 0:7.0.12-2 - Package now named just tomcat instead of tomcat7 -- Removed Provides: %{name}-log4j +- Removed Provides: %{name}-log4j - Switched to apache-commons-* names instead of jakarta-commons-* . -- Remove the old changelog +- Remove the old changelog - BR/R java >= 1:1.6.0 , same for java-devel - Removed old tomcat6 crap From 907740188d5bea74c49c9b7c3ea50eec07af95da Mon Sep 17 00:00:00 2001 From: Juan Hernandez Date: Wed, 14 Mar 2012 21:16:59 +0100 Subject: [PATCH 094/273] Add POM files for tomcat-api and tomcat-util (#803495) Signed-off-by: Ivan Afonichev --- tomcat.spec | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index 3ce683e..039892b 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -464,6 +464,12 @@ done %{__cp} -a tomcat-juli.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-juli.pom %add_maven_depmap JPP.%{name}-tomcat-juli.pom %{name}/tomcat-juli.jar +%{__cp} -a tomcat-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-api.pom +%add_maven_depmap JPP.%{name}-tomcat-api.pom %{name}/tomcat-api.jar + +%{__cp} -a tomcat-util.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-util.pom +%add_maven_depmap JPP.%{name}-tomcat-util.pom %{name}/tomcat-util.jar + # replace temporary copy with link %{__ln_s} -f %{bindir}/tomcat-juli.jar ${RPM_BUILD_ROOT}%{libdir}/ @@ -607,9 +613,16 @@ fi %{libdir} %{bindir}/tomcat-juli.jar %{_mavendepmapfragdir}/%{name} -%{_mavenpomdir}/*.pom -# Exclude the POMs that are in sub-packages -%exclude %{_mavenpomdir}/JPP-*api*.pom +%{_mavenpomdir}/JPP.%{name}-annotations-api.pom +%{_mavenpomdir}/JPP.%{name}-catalina-ha.pom +%{_mavenpomdir}/JPP.%{name}-catalina-tribes.pom +%{_mavenpomdir}/JPP.%{name}-catalina.pom +%{_mavenpomdir}/JPP.%{name}-jasper-el.pom +%{_mavenpomdir}/JPP.%{name}-jasper.pom +%{_mavenpomdir}/JPP.%{name}-tomcat-api.pom +%{_mavenpomdir}/JPP.%{name}-tomcat-juli.pom +%{_mavenpomdir}/JPP.%{name}-tomcat-util.pom + %exclude %{libdir}/%{name}-el-%{elspec}-api.jar %files servlet-%{servletspec}-api @@ -648,6 +661,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Wed Mar 14 2012 Juan Hernandez 0:7.0.26-2 +- Added the POM files for tomcat-api and tomcat-util (#803495) + * Wed Feb 22 2012 Ivan Afonichev 0:7.0.26-1 - Updated to 7.0.26 - Bug 790334: Change ownership of logdir for logrotate From 41331728601e4e12dcdf959ceb279048a75a8675 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Sun, 8 Apr 2012 00:39:19 +0400 Subject: [PATCH 095/273] - Updated to 7.0.27 - Fixed jakarta-taglibs-standard BR and R --- sources | 2 +- tomcat.spec | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/sources b/sources index e2b3db7..69a44df 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -eb8e7192b02b6031be6fc23afea2431f apache-tomcat-7.0.26-src.tar.gz +a7fa41d09ccc1dc324c35fdebebd2afe apache-tomcat-7.0.27-src.tar.gz diff --git a/tomcat.spec b/tomcat.spec index 2b3a950..413c213 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.2 %global major_version 7 %global minor_version 0 -%global micro_version 26 +%global micro_version 27 %global packdname apache-tomcat-%{version}-src %global servletspec 3.0 %global elspec 2.2 @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 2%{?dist} +Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -85,8 +85,6 @@ Source20: %{name}-%{major_version}.%{minor_version}-jsvc.service Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch -#https://issues.apache.org/bugzilla/show_bug.cgi?id=52493 -Patch2: add_parent_logger_getter.patch BuildArch: noarch @@ -98,7 +96,7 @@ BuildRequires: apache-commons-collections BuildRequires: apache-commons-daemon BuildRequires: apache-commons-dbcp BuildRequires: apache-commons-pool -BuildRequires: jakarta-taglibs-standard >= 0:1.1.2-4 +BuildRequires: jakarta-taglibs-standard BuildRequires: java-devel >= 1:1.6.0 BuildRequires: jpackage-utils >= 0:1.7.0 BuildRequires: junit @@ -227,7 +225,7 @@ Expression Language 1.0. Group: Applications/Internet Summary: The ROOT and examples web applications for Apache Tomcat Requires: %{name} = %{epoch}:%{version}-%{release} -Requires: jakarta-taglibs-standard >= 0:1.1.2-4 +Requires: jakarta-taglibs-standard >= 0:1.1 %description webapps The ROOT and examples web applications for Apache Tomcat. @@ -240,7 +238,6 @@ find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name " %patch0 -p0 %patch1 -p0 -%patch2 -p0 %{__ln_s} $(build-classpath jakarta-taglibs-core) webapps/examples/WEB-INF/lib/jstl.jar %{__ln_s} $(build-classpath jakarta-taglibs-standard) webapps/examples/WEB-INF/lib/standard.jar @@ -662,6 +659,10 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Wed Apr 7 2012 Ivan Afonichev 0:7.0.27-1 +- Updated to 7.0.27 +- Fixed jakarta-taglibs-standard BR and R + * Wed Mar 21 2012 Stanislav Ochotnicky - 0:7.0.26-2 - Add more depmaps to J2EE apis to help jetty/glassfish updates From ceaa841e806c41dc2851ef0515b10d9f0a34558c Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Mon, 9 Apr 2012 02:04:25 +0400 Subject: [PATCH 096/273] Fixed native download hack --- tomcat.spec | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index 413c213..e96e7ac 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -259,9 +259,7 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Djdt.jar="$(build-classpath ecj)" \ -Dtomcat-dbcp.jar="$(build-classpath apache-commons-dbcp)" \ -Dtomcat-native.tar.gz="HACK" \ - -Dtomcat-native.dll.win32="HACK" \ - -Dtomcat-native.dll.x64="HACK" \ - -Dtomcat-native.dll.i64="HACK" \ + -Dtomcat-native.win="HACK" \ -Dcommons-daemon.native.win.mgr.exe="HACK" \ -Dnsis.exe="HACK" \ -Djaxrpc-lib.jar="$(build-classpath jaxrpc)" \ @@ -659,7 +657,10 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog -* Wed Apr 7 2012 Ivan Afonichev 0:7.0.27-1 +* Mon Apr 9 2012 Ivan Afonichev 0:7.0.27-2 +- Fixed native download hack + +* Sat Apr 7 2012 Ivan Afonichev 0:7.0.27-1 - Updated to 7.0.27 - Fixed jakarta-taglibs-standard BR and R From 607cf32755faa46ae8591032e483c6c0f78a538e Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Tue, 10 Apr 2012 01:07:18 +0400 Subject: [PATCH 097/273] Fix tomcat-native check --- tomcat.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tomcat.spec b/tomcat.spec index e96e7ac..a894c63 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -259,7 +259,7 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Djdt.jar="$(build-classpath ecj)" \ -Dtomcat-dbcp.jar="$(build-classpath apache-commons-dbcp)" \ -Dtomcat-native.tar.gz="HACK" \ - -Dtomcat-native.win="HACK" \ + -Dtomcat-native.home="." \ -Dcommons-daemon.native.win.mgr.exe="HACK" \ -Dnsis.exe="HACK" \ -Djaxrpc-lib.jar="$(build-classpath jaxrpc)" \ From c29844a941f6567ac72a121ac0b3b4cc4142a54d Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Mon, 2 Jul 2012 02:42:34 +0400 Subject: [PATCH 098/273] Updated to 7.0.28 Resolves: rhbz 820119 Remove bundled apache-commons-dbcp Resolves: rhbz 814900 Added tomcat-coyote POM Resolves: rhbz 810775 Remove systemv stuff from %post scriptlet Remove redhat-lsb R --- sources | 2 +- tomcat.spec | 22 ++++++++++++++++------ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/sources b/sources index 69a44df..07223a9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a7fa41d09ccc1dc324c35fdebebd2afe apache-tomcat-7.0.27-src.tar.gz +b84c51041fdd42e3e08747d6c4db6d30 apache-tomcat-7.0.28-src.tar.gz diff --git a/tomcat.spec b/tomcat.spec index a894c63..2a50b0a 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.2 %global major_version 7 %global minor_version 0 -%global micro_version 27 +%global micro_version 28 %global packdname apache-tomcat-%{version}-src %global servletspec 3.0 %global elspec 2.2 @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 2%{?dist} +Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -115,8 +115,6 @@ Requires: %{name}-lib = %{epoch}:%{version}-%{release} Requires(pre): shadow-utils Requires(post): chkconfig Requires(preun): chkconfig -Requires(post): redhat-lsb -Requires(preun): redhat-lsb Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units @@ -273,7 +271,9 @@ export OPT_JAR_LIST="xalan-j2-serializer" # remove some jars that we'll replace with symlinks later %{__rm} output/build/bin/commons-daemon.jar \ - output/build/lib/ecj.jar + output/build/lib/ecj.jar \ + output/build/lib/apache-commons-dbcp.jar + # remove the cruft we created %{__rm} output/build/bin/tomcat-native.tar.gz pushd output/dist/src/webapps/docs/appdev/sample/src @@ -457,6 +457,9 @@ done %{__cp} -a tomcat-tribes.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-catalina-tribes.pom %add_maven_depmap JPP.%{name}-catalina-tribes.pom %{name}/catalina-tribes.jar +%{__cp} -a tomcat-coyote.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-coyote.pom +%add_maven_depmap JPP.%{name}-tomcat-coyote.pom %{name}/tomcat-coyote.jar + %{__cp} -a tomcat-juli.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-juli.pom %add_maven_depmap JPP.%{name}-tomcat-juli.pom %{name}/tomcat-juli.jar @@ -478,7 +481,6 @@ done %post # install but don't activate -/sbin/chkconfig --add %{name} if [ $1 -eq 1 ]; then #initial installation /bin/systemctl daemon-reload >/dev/null 2>&1 || : @@ -617,6 +619,7 @@ fi %{_mavenpomdir}/JPP.%{name}-jasper.pom %{_mavenpomdir}/JPP.%{name}-tomcat-api.pom %{_mavenpomdir}/JPP.%{name}-tomcat-juli.pom +%{_mavenpomdir}/JPP.%{name}-tomcat-coyote.pom %{_mavenpomdir}/JPP.%{name}-tomcat-util.pom %exclude %{libdir}/%{name}-el-%{elspec}-api.jar @@ -657,6 +660,13 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Mon Jul 2 2012 Ivan Afonichev 0:7.0.28-1 +- Updated to 7.0.28 +- Resolves: rhbz 820119 Remove bundled apache-commons-dbcp +- Resolves: rhbz 814900 Added tomcat-coyote POM +- Resolves: rhbz 810775 Remove systemv stuff from %post scriptlet +- Remove redhat-lsb R + * Mon Apr 9 2012 Ivan Afonichev 0:7.0.27-2 - Fixed native download hack From 24d9982b347f7b6a6cfabe6479950250fd389291 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 21 Jul 2012 18:44:00 -0500 Subject: [PATCH 099/273] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- tomcat.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tomcat.spec b/tomcat.spec index 2a50b0a..d73e34d 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -660,6 +660,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Sat Jul 21 2012 Fedora Release Engineering - 0:7.0.28-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Mon Jul 2 2012 Ivan Afonichev 0:7.0.28-1 - Updated to 7.0.28 - Resolves: rhbz 820119 Remove bundled apache-commons-dbcp From 5955ecc8dd7ba7afd9de8ad671f98e757c88eab7 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Thu, 26 Jul 2012 00:43:31 +0400 Subject: [PATCH 100/273] Updated to 7.0.29 --- sources | 2 +- tomcat.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 07223a9..6fc9dbc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b84c51041fdd42e3e08747d6c4db6d30 apache-tomcat-7.0.28-src.tar.gz +16b9f637e5ca623cf87a2a1514c8978e apache-tomcat-7.0.29-src.tar.gz diff --git a/tomcat.spec b/tomcat.spec index 2a50b0a..df758e8 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.2 %global major_version 7 %global minor_version 0 -%global micro_version 28 +%global micro_version 29 %global packdname apache-tomcat-%{version}-src %global servletspec 3.0 %global elspec 2.2 @@ -660,6 +660,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Thu Jul 26 2012 Ivan Afonichev 0:7.0.29-1 +- Updated to 7.0.29 + * Mon Jul 2 2012 Ivan Afonichev 0:7.0.28-1 - Updated to 7.0.28 - Resolves: rhbz 820119 Remove bundled apache-commons-dbcp From ad8bfffe2fae4b44f4210a0ce40ca683f22699f6 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Wed, 17 Oct 2012 02:28:32 +0400 Subject: [PATCH 101/273] - Updated to 7.0.32 - Resolves: rhbz 842620 symlinks to taglibs --- sources | 2 +- tomcat.spec | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 6fc9dbc..80f932f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -16b9f637e5ca623cf87a2a1514c8978e apache-tomcat-7.0.29-src.tar.gz +daf3de124ec09702560931e87219deb6 apache-tomcat-7.0.32-src.tar.gz diff --git a/tomcat.spec b/tomcat.spec index 1adb964..a6afaa3 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.2 %global major_version 7 %global minor_version 0 -%global micro_version 29 +%global micro_version 32 %global packdname apache-tomcat-%{version}-src %global servletspec 3.0 %global elspec 2.2 @@ -427,6 +427,18 @@ pushd ${RPM_BUILD_ROOT}%{appdir}/sample popd %{__rm} ${RPM_BUILD_ROOT}%{appdir}/docs/appdev/sample/sample.war +# Allow linking for example webapp +%{__mkdir_p} ${RPM_BUILD_ROOT}%{appdir}/examples/META-INF +pushd ${RPM_BUILD_ROOT}%{appdir}/examples/META-INF +echo ''>context.xml +echo ''>>context.xml +popd + +pushd ${RPM_BUILD_ROOT}%{appdir}/examples/WEB-INF/lib +%{__ln_s} -f $(build-classpath jakarta-taglibs-core) jstl.jar +%{__ln_s} -f $(build-classpath jakarta-taglibs-standard) standard.jar +popd + # Install the maven metadata %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_mavenpomdir} @@ -657,6 +669,10 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Wed Oct 17 2012 Ivan Afonichev 0:7.0.32-1 +- Updated to 7.0.32 +- Resolves: rhbz 842620 symlinks to taglibs + * Fri Aug 24 2012 Ivan Afonichev 0:7.0.29-1 - Updated to 7.0.29 - Add pidfile as tmpfile From 7b951af810332fa7f482cfe9aee59cee86e94fb5 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Sun, 2 Dec 2012 02:20:24 +0400 Subject: [PATCH 102/273] Updated to 7.0.33 - Resolves: rhbz 873620 need chkconfig for update-alternatives --- sources | 2 +- tomcat.spec | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 80f932f..b76a2e2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -daf3de124ec09702560931e87219deb6 apache-tomcat-7.0.32-src.tar.gz +1693d330f195366a6cd852bf3ce3eb95 apache-tomcat-7.0.33-src.tar.gz diff --git a/tomcat.spec b/tomcat.spec index a6afaa3..0304917 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.2 %global major_version 7 %global minor_version 0 -%global micro_version 32 +%global micro_version 33 %global packdname apache-tomcat-%{version}-src %global servletspec 3.0 %global elspec 2.2 @@ -180,6 +180,8 @@ Summary: Apache Tomcat JSP API implementation classes Provides: jsp = %{jspspec} Provides: jsp22 Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} +Requires(post): chkconfig +Requires(postun): chkconfig %description jsp-%{jspspec}-api Apache Tomcat JSP API implementation classes. @@ -206,6 +208,8 @@ Summary: Apache Tomcat Servlet API implementation classes Provides: servlet = %{servletspec} Provides: servlet6 Provides: servlet3 +Requires(post): chkconfig +Requires(postun): chkconfig %description servlet-%{servletspec}-api Apache Tomcat Servlet API implementation classes. @@ -215,6 +219,8 @@ Group: Development/Libraries Summary: Expression Language v1.0 API Provides: el_1_0_api = %{epoch}:%{version}-%{release} Provides: el_api = %{elspec} +Requires(post): chkconfig +Requires(postun): chkconfig %description el-%{elspec}-api Expression Language 1.0. @@ -669,6 +675,10 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Sun Dec 2 2012 Ivan Afonichev 0:7.0.33-1 +- Updated to 7.0.33 +- Resolves: rhbz 873620 need chkconfig for update-alternatives + * Wed Oct 17 2012 Ivan Afonichev 0:7.0.32-1 - Updated to 7.0.32 - Resolves: rhbz 842620 symlinks to taglibs From 50ce272e2f98db91778ce012e1539dc47f623cbe Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Fri, 7 Dec 2012 01:56:04 +0400 Subject: [PATCH 103/273] Resolves: rhbz 883806 refix logdir ownership --- tomcat.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index 0304917..2a83226 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -572,8 +572,9 @@ fi %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %attr(0755,root,tomcat) %dir %{basedir} %attr(0755,root,tomcat) %dir %{confdir} +%defattr(0664,tomcat,root,0770) +%attr(0770,tomcat,root) %dir %{logdir} %defattr(0664,root,tomcat,0770) -%attr(0770,root,tomcat) %dir %{logdir} %attr(0660,tomcat,tomcat) %{logdir}/catalina.out %attr(0644,tomcat,tomcat) %{_localstatedir}/run/%{name}.pid %attr(0770,root,tomcat) %dir %{cachedir} @@ -675,6 +676,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Fri Dec 7 2012 Ivan Afonichev 0:7.0.33-2 +- Resolves: rhbz 883806 refix logdir ownership + * Sun Dec 2 2012 Ivan Afonichev 0:7.0.33-1 - Updated to 7.0.33 - Resolves: rhbz 873620 need chkconfig for update-alternatives From a91e144155e4101b1b8247c285a6bf3a6207f448 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Mon, 24 Dec 2012 02:24:16 +0400 Subject: [PATCH 104/273] Updated to 7.0.34 - ecj >= 4.2.1 now required - Resolves: rhbz 889395 concat classpath correctly; chdir to $CATALINA_HOME --- sources | 2 +- tomcat-7.0.wrapper | 11 ++++++++--- tomcat.spec | 13 +++++++++---- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/sources b/sources index b76a2e2..fc9d51b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1693d330f195366a6cd852bf3ce3eb95 apache-tomcat-7.0.33-src.tar.gz +49243b6d5c44a8bfa739d6dec53825f7 apache-tomcat-7.0.34-src.tar.gz diff --git a/tomcat-7.0.wrapper b/tomcat-7.0.wrapper index 820c622..8d35a2f 100644 --- a/tomcat-7.0.wrapper +++ b/tomcat-7.0.wrapper @@ -22,11 +22,16 @@ if [ -r "/etc/sysconfig/${NAME}" ]; then fi set_javacmd +cd ${CATALINA_HOME} # CLASSPATH munging -if [ -n "$JSSE_HOME" ]; then - CLASSPATH="${CLASSPATH}:$(build-classpath jcert jnet jsse 2>/dev/null)" +if [ ! -z "$CLASSPATH" ] ; then + CLASSPATH="$CLASSPATH": fi -CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/bootstrap.jar" + +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)" diff --git a/tomcat.spec b/tomcat.spec index 2a83226..cf096de 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.2 %global major_version 7 %global minor_version 0 -%global micro_version 33 +%global micro_version 34 %global packdname apache-tomcat-%{version}-src %global servletspec 3.0 %global elspec 2.2 @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 2%{?dist} +Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -90,7 +90,7 @@ BuildArch: noarch BuildRequires: ant BuildRequires: ant-nodeps -BuildRequires: ecj +BuildRequires: ecj >= 4.2.1 BuildRequires: findutils BuildRequires: apache-commons-collections BuildRequires: apache-commons-daemon @@ -193,7 +193,7 @@ Summary: Libraries needed to run the Tomcat Web container Requires: %{name}-jsp-%{jspspec}-api = %{epoch}:%{version}-%{release} Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} Requires: %{name}-el-%{elspec}-api = %{epoch}:%{version}-%{release} -Requires: ecj +Requires: ecj >= 4.2.1 Requires: apache-commons-collections Requires: apache-commons-dbcp Requires: apache-commons-pool @@ -676,6 +676,11 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Mon Dec 24 2012 Ivan Afonichev 0:7.0.34-1 +- Updated to 7.0.34 +- ecj >= 4.2.1 now required +- Resolves: rhbz 889395 concat classpath correctly; chdir to $CATALINA_HOME + * Fri Dec 7 2012 Ivan Afonichev 0:7.0.33-2 - Resolves: rhbz 883806 refix logdir ownership From 40dbe1d28619974eddca6e26d2374bc621a2acc4 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Tue, 25 Dec 2012 00:42:12 +0400 Subject: [PATCH 105/273] Add ecj epoch --- tomcat.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index cf096de..1cdad1c 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -90,7 +90,7 @@ BuildArch: noarch BuildRequires: ant BuildRequires: ant-nodeps -BuildRequires: ecj >= 4.2.1 +BuildRequires: ecj >= 1:4.2.1 BuildRequires: findutils BuildRequires: apache-commons-collections BuildRequires: apache-commons-daemon @@ -193,7 +193,7 @@ Summary: Libraries needed to run the Tomcat Web container Requires: %{name}-jsp-%{jspspec}-api = %{epoch}:%{version}-%{release} Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} Requires: %{name}-el-%{elspec}-api = %{epoch}:%{version}-%{release} -Requires: ecj >= 4.2.1 +Requires: ecj >= 1:4.2.1 Requires: apache-commons-collections Requires: apache-commons-dbcp Requires: apache-commons-pool From b2b5f77833a9036d5e06330be4fcba05e901c9d9 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Mon, 4 Feb 2013 02:29:10 +0400 Subject: [PATCH 106/273] Updated to 7.0.35 systemd SuccessExitStatus=143 for proper stop exit code processing --- sources | 2 +- tomcat-7.0.service | 1 + tomcat.spec | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sources b/sources index fc9d51b..8cc8496 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -49243b6d5c44a8bfa739d6dec53825f7 apache-tomcat-7.0.34-src.tar.gz +ccc93c9eff76c16f9133148e171c94e3 apache-tomcat-7.0.35-src.tar.gz diff --git a/tomcat-7.0.service b/tomcat-7.0.service index 7cfa4bf..e2ab30c 100644 --- a/tomcat-7.0.service +++ b/tomcat-7.0.service @@ -14,6 +14,7 @@ After=syslog.target network.target Type=forking ExecStart=/usr/sbin/tomcat-sysd start ExecStop=/usr/sbin/tomcat-sysd stop +SuccessExitStatus=143 User=tomcat Group=tomcat diff --git a/tomcat.spec b/tomcat.spec index 1cdad1c..201e2a0 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.2 %global major_version 7 %global minor_version 0 -%global micro_version 34 +%global micro_version 35 %global packdname apache-tomcat-%{version}-src %global servletspec 3.0 %global elspec 2.2 @@ -676,6 +676,10 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Mon Feb 4 2013 Ivan Afonichev 0:7.0.35-1 +- Updated to 7.0.35 +- systemd SuccessExitStatus=143 for proper stop exit code processing + * Mon Dec 24 2012 Ivan Afonichev 0:7.0.34-1 - Updated to 7.0.34 - ecj >= 4.2.1 now required From c9c2c4a8ba05c96106030aa9799ed56e09613feb Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Wed, 20 Feb 2013 01:28:28 +0400 Subject: [PATCH 107/273] Updated to 7.0.37 --- sources | 2 +- tomcat.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 8cc8496..4cdfe58 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ccc93c9eff76c16f9133148e171c94e3 apache-tomcat-7.0.35-src.tar.gz +6ab7fcd20def4835f33d6c0b2f19c5ef apache-tomcat-7.0.37-src.tar.gz diff --git a/tomcat.spec b/tomcat.spec index 201e2a0..14867b9 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.2 %global major_version 7 %global minor_version 0 -%global micro_version 35 +%global micro_version 37 %global packdname apache-tomcat-%{version}-src %global servletspec 3.0 %global elspec 2.2 @@ -676,6 +676,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Wed Feb 20 2013 Ivan Afonichev 0:7.0.37-1 +- Updated to 7.0.37 + * Mon Feb 4 2013 Ivan Afonichev 0:7.0.35-1 - Updated to 7.0.35 - systemd SuccessExitStatus=143 for proper stop exit code processing From 9b14c458881edfc091a735e5a6232d480c4d257e Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Mon, 4 Mar 2013 13:34:10 +0100 Subject: [PATCH 108/273] Add depmaps for org.eclipse.jetty.orbit - Resolves: rhbz#917626 --- tomcat.spec | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index 14867b9..0b2341c 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -462,16 +462,16 @@ done # servlet-api jsp-api and el-api are not in tomcat subdir, since they are widely re-used elsewhere %{__cp} -a tomcat-jsp-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-jsp-api.pom -%add_maven_depmap JPP-tomcat-jsp-api.pom tomcat-jsp-api.jar -f "tomcat-jsp-api" -a "javax.servlet.jsp:javax.servlet.jsp-api,javax.servlet:jsp-api" +%add_maven_depmap JPP-tomcat-jsp-api.pom tomcat-jsp-api.jar -f "tomcat-jsp-api" -a "javax.servlet.jsp:javax.servlet.jsp-api,javax.servlet:jsp-api,org.eclipse.jetty.orbit:javax.servlet.jsp" %{__cp} -a tomcat-el-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-el-api.pom -%add_maven_depmap JPP-tomcat-el-api.pom tomcat-el-api.jar -f "tomcat-el-api" -a "javax.el:javax.el-api,javax.el:el-api" +%add_maven_depmap JPP-tomcat-el-api.pom tomcat-el-api.jar -f "tomcat-el-api" -a "javax.el:javax.el-api,javax.el:el-api,org.eclipse.jetty.orbit:javax.el" %{__cp} -a tomcat-servlet-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-servlet-api.pom # Generate a depmap fragment javax.servlet:servlet-api pointing to # tomcat-servlet-3.0-api for backwards compatibility # also provide jetty depmap (originally in jetty package, but it's cleaner to have it here -%add_maven_depmap JPP-tomcat-servlet-api.pom tomcat-servlet-api.jar -f "tomcat-servlet-api" -a "javax.servlet:servlet-api,javax.servlet:javax.servlet-api,org.mortbay.jetty:servlet-api" +%add_maven_depmap JPP-tomcat-servlet-api.pom tomcat-servlet-api.jar -f "tomcat-servlet-api" -a "javax.servlet:servlet-api,javax.servlet:javax.servlet-api,org.mortbay.jetty:servlet-api,org.eclipse.jetty.orbit:javax.servlet" # two special pom where jar files have different names %{__cp} -a tomcat-tribes.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-catalina-tribes.pom @@ -676,6 +676,10 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Mon Mar 4 2013 Mikolaj Izdebski - 0:7.0.37-2 +- Add depmaps for org.eclipse.jetty.orbit +- Resolves: rhbz#917626 + * Wed Feb 20 2013 Ivan Afonichev 0:7.0.37-1 - Updated to 7.0.37 From 9c1682a1b267fb83bc2094b7dd2fafa01e4ef123 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Fri, 29 Mar 2013 00:57:39 +0400 Subject: [PATCH 109/273] Updated to 7.0.39 --- sources | 2 +- tomcat.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 4cdfe58..78256d8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6ab7fcd20def4835f33d6c0b2f19c5ef apache-tomcat-7.0.37-src.tar.gz +df3c1f56eaa87d692f9e30699821ad76 apache-tomcat-7.0.39-src.tar.gz diff --git a/tomcat.spec b/tomcat.spec index 14867b9..2501271 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.2 %global major_version 7 %global minor_version 0 -%global micro_version 37 +%global micro_version 39 %global packdname apache-tomcat-%{version}-src %global servletspec 3.0 %global elspec 2.2 @@ -676,6 +676,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Wed Feb 20 2013 Ivan Afonichev 0:7.0.39-1 +- Updated to 7.0.39 + * Wed Feb 20 2013 Ivan Afonichev 0:7.0.37-1 - Updated to 7.0.37 From 6df24b614d83624608fe909b96fb411a0ecd5a3a Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Sat, 11 May 2013 19:10:39 +0400 Subject: [PATCH 110/273] Updated to 7.0.40 Resolves: rhbz 956569 added missing commons-pool link Conflicts: sources tomcat.spec --- sources | 2 +- tomcat.spec | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 78256d8..20aa8e6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -df3c1f56eaa87d692f9e30699821ad76 apache-tomcat-7.0.39-src.tar.gz +158df72e6c046fa5d46a691a7c0805e6 apache-tomcat-7.0.40-src.tar.gz diff --git a/tomcat.spec b/tomcat.spec index 2501271..d1cb027 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.2 %global major_version 7 %global minor_version 0 -%global micro_version 39 +%global micro_version 40 %global packdname apache-tomcat-%{version}-src %global servletspec 3.0 %global elspec 2.2 @@ -409,6 +409,7 @@ pushd ${RPM_BUILD_ROOT}%{libdir} %{__ln_s} ../%{name}-el-%{elspec}-api.jar . %{__ln_s} $(build-classpath apache-commons-collections) commons-collections.jar %{__ln_s} $(build-classpath apache-commons-dbcp) commons-dbcp.jar + %{__ln_s} $(build-classpath apache-commons-pool) commons-pool.jar %{__ln_s} $(build-classpath log4j) log4j.jar %{__ln_s} $(build-classpath ecj) jasper-jdt.jar @@ -676,6 +677,10 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Sat May 11 2013 Ivan Afonichev 0:7.0.40-1 +- Updated to 7.0.40 +- Resolves: rhbz 956569 added missing commons-pool link + * Wed Feb 20 2013 Ivan Afonichev 0:7.0.39-1 - Updated to 7.0.39 From 06021af326d3ef62ccb516bc60fd58a7a41920c6 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Sat, 11 May 2013 20:17:45 +0400 Subject: [PATCH 111/273] Fix changelog order --- tomcat.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index 4f0e810..ddb2cab 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -681,13 +681,13 @@ fi - Updated to 7.0.40 - Resolves: rhbz 956569 added missing commons-pool link -* Wed Feb 20 2013 Ivan Afonichev 0:7.0.39-1 -- Updated to 7.0.39 - * Mon Mar 4 2013 Mikolaj Izdebski - 0:7.0.37-2 - Add depmaps for org.eclipse.jetty.orbit - Resolves: rhbz#917626 +* Wed Feb 20 2013 Ivan Afonichev 0:7.0.39-1 +- Updated to 7.0.39 + * Wed Feb 20 2013 Ivan Afonichev 0:7.0.37-1 - Updated to 7.0.37 From 004db978afd3078dcd39b2d237957010cb9cd0b8 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Sat, 11 May 2013 21:08:22 +0400 Subject: [PATCH 112/273] Remove ant-nodeps BR --- tomcat.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tomcat.spec b/tomcat.spec index ddb2cab..99d432d 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -89,7 +89,6 @@ Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.pat BuildArch: noarch BuildRequires: ant -BuildRequires: ant-nodeps BuildRequires: ecj >= 1:4.2.1 BuildRequires: findutils BuildRequires: apache-commons-collections @@ -680,6 +679,7 @@ fi * Sat May 11 2013 Ivan Afonichev 0:7.0.40-1 - Updated to 7.0.40 - Resolves: rhbz 956569 added missing commons-pool link +- Remove ant-nodeps BR * Mon Mar 4 2013 Mikolaj Izdebski - 0:7.0.37-2 - Add depmaps for org.eclipse.jetty.orbit From 0543334466f586650a6e86a34b779bf33d67f72f Mon Sep 17 00:00:00 2001 From: "Paul P. Komkoff" Date: Tue, 11 Jun 2013 21:35:03 +0400 Subject: [PATCH 113/273] Enable multiple instances on same installation. This keeps the default tomcat.service unchanged (except for internals), and adds template for tomcat@name.service services. In the new world, if you need an instance, you'll create a directory /var/lib/tomcats/name, create {conf temp work webapps} in it, and then systemctl enable tomcat@name.service. This commit doesn't contain anything related to jsvc. --- tomcat-7.0-log4j.properties | 2 +- tomcat-7.0-tomcat-sysd | 79 --------- tomcat-7.0.conf | 46 +++--- tomcat-7.0.init | 319 ------------------------------------ tomcat-7.0.sysconfig | 59 +------ tomcat-7.0.wrapper | 79 ++------- tomcat-named.service | 18 ++ tomcat-preamble | 50 ++++++ tomcat-server | 24 +++ tomcat.spec | 57 +++---- 10 files changed, 156 insertions(+), 577 deletions(-) delete mode 100644 tomcat-7.0-tomcat-sysd delete mode 100644 tomcat-7.0.init create mode 100644 tomcat-named.service create mode 100644 tomcat-preamble create mode 100644 tomcat-server diff --git a/tomcat-7.0-log4j.properties b/tomcat-7.0-log4j.properties index 1252a64..dfc2309 100644 --- a/tomcat-7.0-log4j.properties +++ b/tomcat-7.0-log4j.properties @@ -1,6 +1,6 @@ log4j.rootLogger=debug, R log4j.appender.R=org.apache.log4j.RollingFileAppender -log4j.appender.R.File=${catalina.home}/logs/tomcat.log +log4j.appender.R.File=${catalina.base}/logs/tomcat.log log4j.appender.R.MaxFileSize=10MB log4j.appender.R.MaxBackupIndex=10 log4j.appender.R.layout=org.apache.log4j.PatternLayout diff --git a/tomcat-7.0-tomcat-sysd b/tomcat-7.0-tomcat-sysd deleted file mode 100644 index 192329c..0000000 --- a/tomcat-7.0-tomcat-sysd +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/bash -# -# This script provides systemd activation of the tomcat service -# To create clones of this service: -# 1) SERVICE_NAME must be defined before calling this script -# 2) Create /etc/sysconfig/${SERVICE_NAME} from /etc/sysconfig/tomcat -# to override tomcat defaults - -# SERVICE_NAME is a required value only if the service name is -# different from 'tomcat' -# -export NAME="${SERVICE_NAME:-tomcat}" - -#I'll bet this isn't required. -# unset ISBOOT - -# For SELinux we need to use 'runuser' not 'su' -if [ -x "/sbin/runuser" ]; then - SU="/sbin/runuser -s /bin/sh" -else - SU="/bin/su -s /bin/sh" -fi - -# Path to the tomcat launch script -TOMCAT_SCRIPT="/usr/sbin/tomcat" - -# Define the tomcat username -TOMCAT_USER="${TOMCAT_USER:-tomcat}" - -# TOMCAT_LOG should be different from catalina.out. -# Usually the below config is all that is necessary -TOMCAT_LOG=/var/log/${NAME}/${NAME}-sysd.log - -# Get the tomcat config (use this for environment specific settings) -TOMCAT_CFG="/etc/tomcat/tomcat.conf" -if [ -r "$TOMCAT_CFG" ]; then - . $TOMCAT_CFG -fi - -# Get instance specific config file -if [ -r "/etc/sysconfig/${NAME}" ]; then - . /etc/sysconfig/${NAME} -fi - -# See how we were called. -function start() { - # fix permissions on the log and pid files - export CATALINA_PID="/var/run/${NAME}.pid" - - touch $TOMCAT_LOG 2>&1 - if [ "$?" -eq "0" ]; then - chown ${TOMCAT_USER}:${TOMCAT_USER} $TOMCAT_LOG - fi - - if [ "$SECURITY_MANAGER" = "true" ]; then - ${TOMCAT_SCRIPT} start-security >> $TOMCAT_LOG 2>&1 - else - ${TOMCAT_SCRIPT} start #>> $TOMCAT_LOG 2>&1 - fi -} - -function stop() { - ${TOMCAT_SCRIPT} stop >> $TOMCAT_LOG 2>&1 -} - -# See how we were called. -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - stop - start - ;; -esac - diff --git a/tomcat-7.0.conf b/tomcat-7.0.conf index a500479..03119b7 100644 --- a/tomcat-7.0.conf +++ b/tomcat-7.0.conf @@ -1,30 +1,37 @@ # System-wide configuration file for tomcat services -# This will be sourced by tomcat and any secondary service -# Values will be overridden by service-specific configuration -# files in /etc/sysconfig +# This will be loaded by systemd as an environment file, +# so please keep the syntax. # -# Use this one to change default values for all services -# Change the service specific ones to affect only one service -# (see, for instance, /etc/sysconfig/tomcat) +# There are 2 "classes" of startup behavior in this package. +# The old one, the default service named tomcat.service. +# The new named instances are called tomcat@instance.service. # +# Use this file to change default values for all services. +# Change the service specific ones to affect only one service. +# For tomcat.service it's /etc/sysconfig/tomcat, for +# tomcat@instance it's /etc/sysconfig/tomcat@instance. + +# This variable is used to figure out if config is loaded or not. +TOMCAT_CFG_LOADED="1" + +# In new-style instances, if CATALINA_BASE isn't specified, it will +# be constructed by joining TOMCATS_BASE and NAME. +TOMCATS_BASE="/var/lib/tomcats/" # Where your java installation lives JAVA_HOME="/usr/lib/jvm/jre" # Where your tomcat installation lives -CATALINA_BASE="@@@TCHOME@@@" CATALINA_HOME="@@@TCHOME@@@" -JASPER_HOME="@@@TCHOME@@@" -CATALINA_TMPDIR="@@@TCTEMP@@@" + +# System-wide tmp +CATALINA_TMPDIR="/var/cache/tomcat/temp" # 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 -TOMCAT_USER="tomcat" +#JAVA_OPTS="-Djava.library.path=/usr/lib" # You can change your tomcat locale here #LANG="en_US" @@ -33,18 +40,9 @@ TOMCAT_USER="tomcat" 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 -CATALINA_PID="/var/run/tomcat.pid" - -# Connector port is 8080 for this tomcat instance -#CONNECTOR_PORT="8080" +# TODO(stingray): does nothing, fix. +# SHUTDOWN_WAIT="30" # If you wish to further customize your tomcat environment, # put your own definitions here # (i.e. LD_LIBRARY_PATH for some jdbc drivers) - diff --git a/tomcat-7.0.init b/tomcat-7.0.init deleted file mode 100644 index f5269f5..0000000 --- a/tomcat-7.0.init +++ /dev/null @@ -1,319 +0,0 @@ -#!/bin/bash -# -# tomcat This shell script takes care of starting and stopping Tomcat -# -# chkconfig: - 80 20 -# -### BEGIN INIT INFO -# Provides: tomcat -# Required-Start: $network $syslog -# Required-Stop: $network $syslog -# Default-Start: -# Default-Stop: -# Description: Release implementation for Servlet 3.0 and JSP 2.2 -# Short-Description: start and stop tomcat -### END INIT INFO -# -# - originally written by Henri Gomez, Keith Irwin, and Nicolas Mailhot -# - heavily rewritten by Deepak Bhole and Jason Corley -# - -## Source function library. -#. /etc/rc.d/init.d/functions -# 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 - -# For SELinux we need to use 'runuser' not 'su' -if [ -x "/sbin/runuser" ]; then - SU="/sbin/runuser -s /bin/sh" -else - SU="/bin/su -s /bin/sh" -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 - -# Get instance specific config file -if [ -r "/etc/sysconfig/${NAME}" ]; then - . /etc/sysconfig/${NAME} -fi - -# Define which connector port to use -CONNECTOR_PORT="${CONNECTOR_PORT:-8080}" - -# Path to the tomcat launch script -TOMCAT_SCRIPT="/usr/sbin/tomcat" - -# 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}" - - -RETVAL="0" - -# 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 ${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_PROG}: " - if [ "$RETVAL" != "0" ]; then - log_failure_msg - return - fi - if [ -f "/var/lock/subsys/${NAME}" ]; then - if [ -s "/var/run/${NAME}.pid" ]; then - read kpid < /var/run/${NAME}.pid -# if checkpid $kpid 2>&1; then - if [ -d "/proc/${kpid}" ]; then - log_success_msg - if [ "$DISTRIB_ID" = "MandrivaLinux" ]; then - echo - fi - return 0 - fi - fi - fi - # fix permissions on the log and pid files - export CATALINA_PID="/var/run/${NAME}.pid" - touch $CATALINA_PID 2>&1 || RETVAL="4" - if [ "$RETVAL" -eq "0" -a "$?" -eq "0" ]; then - chown ${TOMCAT_USER}:${TOMCAT_USER} $CATALINA_PID - fi - [ "$RETVAL" -eq "0" ] && touch $TOMCAT_LOG 2>&1 || RETVAL="4" - if [ "$RETVAL" -eq "0" -a "$?" -eq "0" ]; then - chown ${TOMCAT_USER}:${TOMCAT_USER} $TOMCAT_LOG - fi - if [ "$CATALINA_HOME" != "/usr/share/tomcat" -a "$RETVAL" -eq "0" ]; 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 [ "$RETVAL" -eq "0" -a "$SECURITY_MANAGER" = "true" ]; then - $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} start-security" \ - >> ${TOMCAT_LOG} 2>&1 || RETVAL="4" - else - - [ "$RETVAL" -eq "0" ] && $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} start" >> ${TOMCAT_LOG} 2>&1 || RETVAL="4" - fi - if [ "$RETVAL" -eq "0" ]; then - log_success_msg - touch /var/lock/subsys/${NAME} - else - log_failure_msg "Error code ${RETVAL}" - fi - if [ "$DISTRIB_ID" = "MandrivaLinux" ]; then - echo - fi -} - -function stop() { - echo -n "Stopping ${TOMCAT_PROG}: " - if [ -f "/var/lock/subsys/${NAME}" ]; then - parseOptions - if [ "$RETVAL" -eq "0" ]; then - touch /var/lock/subsys/${NAME} 2>&1 || RETVAL="4" - [ "$RETVAL" -eq "0" ] && $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} stop" >> ${TOMCAT_LOG} 2>&1 || RETVAL="4" - fi - if [ "$RETVAL" -eq "0" ]; then - count="0" - if [ -s "/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 - log_warning_msg "killing processes which did not stop after ${SHUTDOWN_WAIT} seconds" - fi - kill -9 $kpid - fi - log_success_msg - fi - rm -f /var/lock/subsys/${NAME} /var/run/${NAME}.pid - else - log_failure_msg - RETVAL="4" - fi - else - log_success_msg - RETVAL="0" - fi - if [ "$DISTRIB_ID" = "MandrivaLinux" ]; then - echo - fi -} - -function usage() -{ - echo "Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status|version}" - RETVAL="2" -} - -# See how we were called. -RETVAL="0" -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - stop - start - ;; - condrestart|try-restart) - if [ -s "/var/run/${NAME}.pid" ]; then - stop - start - fi - ;; - reload) - RETVAL="3" - ;; - force-reload) - if [ -s "/var/run/${NAME}.pid" ]; then - stop - start - fi - ;; - status) - if [ -s "/var/run/${NAME}.pid" ]; then - read kpid < /var/run/${NAME}.pid - if [ -d "/proc/${kpid}" ]; then - log_success_msg "${NAME} (pid ${kpid}) is running..." - RETVAL="0" - else -# The pid file exists but the process is not running - log_warning_msg "PID file exists, but process is not running" - RETVAL="1" - fi - else - pid="$(/usr/bin/pgrep -d , -u ${TOMCAT_USER} -G ${TOMCAT_USER} java)" - if [ -z "$pid" ]; then -# status ${NAME} -# RETVAL="$?" - log_success_msg "${NAME} is stopped" - RETVAL="3" - else - log_success_msg "${NAME} (pid $pid) is running..." - RETVAL="0" - fi - fi - if [ -f /var/lock/subsys/${NAME} ]; then - pid="$(/usr/bin/pgrep -d , -u ${TOMCAT_USER} -G ${TOMCAT_USER} java)" -# The lockfile exists but the process is not running - if [ -z "$pid" ]; then - log_failure_msg "${NAME} lockfile exists but process is not running" - RETVAL="2" - fi - fi - ;; - version) - ${TOMCAT_SCRIPT} version - ;; - *) - usage - ;; -esac - -exit $RETVAL diff --git a/tomcat-7.0.sysconfig b/tomcat-7.0.sysconfig index c1337e8..3117bf7 100644 --- a/tomcat-7.0.sysconfig +++ b/tomcat-7.0.sysconfig @@ -1,56 +1,11 @@ # Service-specific configuration file for tomcat. This will be sourced by -# the SysV init script after the global configuration file -# /etc/tomcat/tomcat.conf, thus allowing values to be overridden in -# a per-service manner. -# -# NEVER change the init script itself. To change values for all services make -# your changes in /etc/tomcat/tomcat.conf -# -# To change values for a specific service make your edits here. -# To create a new service create a link from /etc/init.d/ to -# /etc/init.d/tomcat (do not copy the init script) and make a copy of the -# /etc/sysconfig/tomcat file to /etc/sysconfig/ and change -# the property values so the two services won't conflict. Register the new -# service in the system as usual (see chkconfig and similars). -# +# systemd for the default service (tomcat.service) +# If you want to customize named instance, make a similar file +# and name it tomcat@instancename. -# Where your java installation lives -#JAVA_HOME="/usr/lib/jvm/java" - -# Where your tomcat installation lives +# You will not need to set this, usually. For default service it equals +# CATALINA_HOME. For named service, it equals ${TOMCATS_BASE}${NAME} #CATALINA_BASE="@@@TCHOME@@@" -#CATALINA_HOME="@@@TCHOME@@@" -#JASPER_HOME="@@@TCHOME@@@" -#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 -#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 -#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) +# Please take a look at /etc/tomcat/tomcat.conf to have an idea what you +# can override. diff --git a/tomcat-7.0.wrapper b/tomcat-7.0.wrapper index 8d35a2f..c97cb85 100644 --- a/tomcat-7.0.wrapper +++ b/tomcat-7.0.wrapper @@ -1,83 +1,24 @@ #!/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 +if [ "$1" = "version" ]; then + . /usr/libexec/tomcat/preamble + exec ${JAVACMD} -classpath ${CATALINA_HOME}/lib/catalina.jar \ + org.apache.catalina.util.ServerInfo fi -# Get the tomcat config (use this for environment specific settings) -if [ -z "${TOMCAT_CFG}" ]; then - TOMCAT_CFG="/etc/tomcat/tomcat.conf" +SRV="tomcat" +if [ -n "$2" ]; then + SRV="tomcat@$2" fi -if [ -r "$TOMCAT_CFG" ]; then - . $TOMCAT_CFG -fi - -# Get instance specific config file -if [ -r "/etc/sysconfig/${NAME}" ]; then - . /etc/sysconfig/${NAME} -fi - -set_javacmd -cd ${CATALINA_HOME} -# CLASSPATH munging -if [ ! -z "$CLASSPATH" ] ; then - CLASSPATH="$CLASSPATH": -fi - -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)" - 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 + systemctl start ${SRV}.service 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 + systemctl stop ${SRV}.service 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}" + echo "Usage: $0 {start|stop|version} [server-id]" exit 1 fi diff --git a/tomcat-named.service b/tomcat-named.service new file mode 100644 index 0000000..95f454f --- /dev/null +++ b/tomcat-named.service @@ -0,0 +1,18 @@ +[Unit] +Description=Apache Tomcat Web Application Container +After=syslog.target network.target + +[Service] +Type=simple +EnvironmentFile=/etc/tomcat/tomcat.conf +Environment="NAME=%I" +EnvironmentFile=-/etc/sysconfig/tomcat@%I +ExecStart=/usr/libexec/tomcat/server start +ExecStop=/usr/libexec/tomcat/server stop +SuccessExitStatus=143 +User=tomcat +Group=tomcat + +[Install] +WantedBy=multi-user.target + diff --git a/tomcat-preamble b/tomcat-preamble new file mode 100644 index 0000000..9627522 --- /dev/null +++ b/tomcat-preamble @@ -0,0 +1,50 @@ +#!/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_LOADED}" ]; then + if [ -z "${TOMCAT_CFG}" ]; then + TOMCAT_CFG="/etc/tomcat/tomcat.conf" + fi + . $TOMCAT_CFG +fi + +if [ -z "$CATALINA_BASE" ]; then + if [ -n "$NAME" ]; then + if [ -z "$TOMCATS_BASE" ]; then + TOMCATS_BASE="/var/lib/tomcats/" + fi + CATALINA_BASE="${TOMCATS_BASE}${NAME}" + else + CATALINA_BASE="${CATALINA_HOME}" + fi +fi + +VERBOSE=1 +set_javacmd +cd ${CATALINA_HOME} +# CLASSPATH munging +if [ ! -z "$CLASSPATH" ] ; then + CLASSPATH="$CLASSPATH": +fi + +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)" + +if [ -z "$LOGGING_PROPERTIES" ] ; then + LOGGING_PROPERTIES="${CATALINA_BASE}/conf/logging.properties" + if [ ! -f "${LOGGING_PROPERTIES}" ] ; then + LOGGING_PROPERTIES="${CATALINA_HOME}/conf/logging.properties" + fi +fi diff --git a/tomcat-server b/tomcat-server new file mode 100644 index 0000000..ef8cec9 --- /dev/null +++ b/tomcat-server @@ -0,0 +1,24 @@ +#!/bin/bash + +. /usr/libexec/tomcat/preamble + +MAIN_CLASS=org.apache.catalina.startup.Bootstrap + +FLAGS="$JAVA_OPTS $CATALINA_OPTS" +OPTIONS="-Dcatalina.base=$CATALINA_BASE \ +-Dcatalina.home=$CATALINA_HOME \ +-Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS \ +-Djava.io.tmpdir=$CATALINA_TMPDIR \ +-Djava.util.logging.config.file=${LOGGING_PROPERTIES} \ +-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" + +if [ "$1" = "start" ] ; then + if [ "${SECURITY_MANAGER}" = "true" ] ; then + OPTIONS="${OPTIONS} \ + -Djava.security.manager \ + -Djava.security.policy==\"${CATALINA_BASE}/conf/catalina.policy\"" + fi + run start +elif [ "$1" = "stop" ] ; then + run stop +fi diff --git a/tomcat.spec b/tomcat.spec index 99d432d..a4d113d 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -62,7 +62,6 @@ License: ASL 2.0 URL: http://tomcat.apache.org/ Source0: http://www.apache.org/dist/tomcat/tomcat-%{major_version}/v%{version}/src/%{packdname}.tar.gz Source1: %{name}-%{major_version}.%{minor_version}.conf -Source2: %{name}-%{major_version}.%{minor_version}.init Source3: %{name}-%{major_version}.%{minor_version}.sysconfig Source4: %{name}-%{major_version}.%{minor_version}.wrapper Source5: %{name}-%{major_version}.%{minor_version}.logrotate @@ -77,11 +76,12 @@ Source13: jasper-el-OSGi-MANIFEST.MF Source14: jasper-OSGi-MANIFEST.MF Source15: tomcat-api-OSGi-MANIFEST.MF Source16: tomcat-juli-OSGi-MANIFEST.MF -Source17: %{name}-%{major_version}.%{minor_version}-tomcat-sysd Source18: %{name}-%{major_version}.%{minor_version}-tomcat-jsvc-sysd Source19: %{name}-%{major_version}.%{minor_version}-jsvc.wrapper Source20: %{name}-%{major_version}.%{minor_version}-jsvc.service - +Source30: tomcat-preamble +Source31: tomcat-server +Source32: tomcat-named.service Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch @@ -152,16 +152,6 @@ Requires: jpackage-utils %description javadoc Javadoc generated documentation for Apache Tomcat. -%package systemv -Group: System Environment/Daemons -Summary: Systemv scripts for Apache Tomcat -Requires: %{name} = %{epoch}:%{version}-%{release} -Requires(post): chkconfig -Requires(postun): chkconfig - -%description systemv -SystemV scripts to start and stop tomcat service - %package jsvc Group: System Environment/Daemons Summary: Apache jsvc wrapper for Apache Tomcat as separate service @@ -336,6 +326,7 @@ zip -u output/build/bin/tomcat-juli.jar META-INF/MANIFEST.MF %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{tempdir} %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{workdir} %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_unitdir} +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_libexecdir}/%{name} # move things into place # First copy supporting libs to tomcat lib @@ -357,21 +348,16 @@ popd -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE3} \ > ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/%{name} -%{__install} -m 0644 %{SOURCE2} \ - ${RPM_BUILD_ROOT}%{_initrddir}/%{name} %{__install} -m 0644 %{SOURCE4} \ ${RPM_BUILD_ROOT}%{_sbindir}/%{name} %{__install} -m 0644 %{SOURCE11} \ ${RPM_BUILD_ROOT}%{_unitdir}/%{name}.service -%{__install} -m 0644 %{SOURCE17} \ - ${RPM_BUILD_ROOT}%{_sbindir}/%{name}-sysd %{__install} -m 0644 %{SOURCE19} \ ${RPM_BUILD_ROOT}%{_sbindir}/%{name}-jsvc %{__install} -m 0644 %{SOURCE20} \ ${RPM_BUILD_ROOT}%{_unitdir}/%{name}-jsvc.service %{__install} -m 0644 %{SOURCE18} \ ${RPM_BUILD_ROOT}%{_sbindir}/%{name}-jsvc-sysd -%{__ln_s} %{name} ${RPM_BUILD_ROOT}%{_sbindir}/d%{name} %{__sed} -e "s|\@\@\@TCLOG\@\@\@|%{logdir}|g" %{SOURCE5} \ > ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/%{name} %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ @@ -382,6 +368,14 @@ popd -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE7} \ > ${RPM_BUILD_ROOT}%{_bindir}/%{name}-tool-wrapper + +%{__install} -m 0755 %{SOURCE30} \ + ${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/preamble +%{__install} -m 0755 %{SOURCE31} \ + ${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/server +%{__install} -m 0644 %{SOURCE32} \ + ${RPM_BUILD_ROOT}%{_unitdir}/%{name}@.service + # create jsp and servlet API symlinks pushd ${RPM_BUILD_ROOT}%{_javadir} %{__mv} %{name}/jsp-api.jar %{name}-jsp-%{jspspec}-api.jar @@ -508,10 +502,6 @@ EOF # install but don't activate %systemd_post %{name}.service -%post systemv -# install but don't activate -/sbin/chkconfig --add %{name} - %post jsp-%{jspspec}-api %{_sbindir}/update-alternatives --install %{_javadir}/jsp.jar jsp \ %{_javadir}/%{name}-jsp-%{jspspec}-api.jar 20200 @@ -524,10 +514,6 @@ EOF %{_sbindir}/update-alternatives --install %{_javadir}/elspec.jar elspec \ %{_javadir}/%{name}-el-%{elspec}-api.jar 20300 -%preun systemv - %{_initrddir}/%{name} stop >/dev/null 2>&1 - /sbin/chkconfig --del %{name} - %preun # clean tempdir and workdir on removal or upgrade %{__rm} -rf %{workdir}/* %{tempdir}/* @@ -567,7 +553,10 @@ fi %attr(0755,root,root) %{_bindir}/%{name}-tool-wrapper %attr(0755,root,root) %{_sbindir}/%{name} %attr(0644,root,root) %{_unitdir}/%{name}.service -%attr(0755,root,root) %{_sbindir}/%{name}-sysd +%attr(0644,root,root) %{_unitdir}/%{name}@.service +%attr(0755,root,root) %dir %{_libexecdir}/%{name} +%attr(0755,root,root) %{_libexecdir}/%{name}/preamble +%attr(0755,root,root) %{_libexecdir}/%{name}/server %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %attr(0755,root,tomcat) %dir %{basedir} @@ -664,11 +653,6 @@ fi %{appdir}/examples %{appdir}/sample -%files systemv -%defattr(755,root,root,0755) -%{_sbindir}/d%{name} -%{_initrddir}/%{name} - %files jsvc %defattr(755,root,root,0755) %{_sbindir}/%{name}-jsvc @@ -676,6 +660,13 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Tue Jun 11 2013 Paul Komkoff 0:7.0.40-3 +- Dropped systemv inits. Bye-bye. +- Updated the systemd wrappers to allow running multiple instances. + Added wrapper scripts to do that, ported the original non-named + service file to work with the same wrappers, updated + /usr/sbin/tomcat to call systemctl. + * Sat May 11 2013 Ivan Afonichev 0:7.0.40-1 - Updated to 7.0.40 - Resolves: rhbz 956569 added missing commons-pool link From 935d478a7b7aca12019be19eedbefb065eb79e10 Mon Sep 17 00:00:00 2001 From: "Paul P. Komkoff" Date: Tue, 11 Jun 2013 21:56:51 +0400 Subject: [PATCH 114/273] ... --- tomcat-7.0.service | 16 ++++++++-------- tomcat-named.service | 8 ++++++++ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/tomcat-7.0.service b/tomcat-7.0.service index e2ab30c..103d464 100644 --- a/tomcat-7.0.service +++ b/tomcat-7.0.service @@ -1,19 +1,19 @@ -# Systemd unit file for tomcat +# Systemd unit file for default tomcat # # To create clones of this service: -# 1) By default SERVICE_NAME=tomcat. When cloned, the value must be defined -# before tomcat-sysd is called. -# 2) Create /etc/sysconfig/${SERVICE_NAME} from /etc/sysconfig/tomcat -# to override tomcat defaults +# DO NOTHING, use tomcat@.service instead. [Unit] Description=Apache Tomcat Web Application Container After=syslog.target network.target [Service] -Type=forking -ExecStart=/usr/sbin/tomcat-sysd start -ExecStop=/usr/sbin/tomcat-sysd stop +Type=simple +EnvironmentFile=/etc/tomcat/tomcat.conf +Environment="NAME=" +EnvironmentFile=-/etc/sysconfig/tomcat +ExecStart=/usr/libexec/tomcat/server start +ExecStop=/usr/libexec/tomcat/server stop SuccessExitStatus=143 User=tomcat Group=tomcat diff --git a/tomcat-named.service b/tomcat-named.service index 95f454f..9bbcb17 100644 --- a/tomcat-named.service +++ b/tomcat-named.service @@ -1,3 +1,11 @@ +# Systemd unit file for tomcat instances. +# +# To create clones of this service: +# 0. systemctl enable tomcat@name.service +# 1. create catalina.base directory structure in +# /var/lib/tomcats/name +# 2. profit. + [Unit] Description=Apache Tomcat Web Application Container After=syslog.target network.target From 4bc1f14d04d37989f4d17ff58a45673c5bad16dd Mon Sep 17 00:00:00 2001 From: squallsama Date: Thu, 11 Jul 2013 12:31:04 +0300 Subject: [PATCH 115/273] update to 7.0.42 --- sources | 2 +- tomcat.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 20aa8e6..d3d62ef 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -158df72e6c046fa5d46a691a7c0805e6 apache-tomcat-7.0.40-src.tar.gz +5b7319630dbfe1803fc84bcb48fc551c apache-tomcat-7.0.42-src.tar.gz \ No newline at end of file diff --git a/tomcat.spec b/tomcat.spec index a4d113d..88d9f41 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.2 %global major_version 7 %global minor_version 0 -%global micro_version 40 +%global micro_version 42 %global packdname apache-tomcat-%{version}-src %global servletspec 3.0 %global elspec 2.2 @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 3%{?dist} +Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -660,6 +660,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Thu Jul 11 2013 Dmitry Tikhonov 0:7.0.42-1 +- Updated to 7.0.42 + * Tue Jun 11 2013 Paul Komkoff 0:7.0.40-3 - Dropped systemv inits. Bye-bye. - Updated the systemd wrappers to allow running multiple instances. From 1ff9d5ff8068fa007bd16d10b497432854ccb0a5 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Fri, 12 Jul 2013 00:44:06 +0400 Subject: [PATCH 116/273] Remove jpackage-utils R --- sources | 2 +- tomcat.spec | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sources b/sources index d3d62ef..c9c84cf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5b7319630dbfe1803fc84bcb48fc551c apache-tomcat-7.0.42-src.tar.gz \ No newline at end of file +5b7319630dbfe1803fc84bcb48fc551c apache-tomcat-7.0.42-src.tar.gz diff --git a/tomcat.spec b/tomcat.spec index 88d9f41..154d553 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -109,6 +109,7 @@ Requires: apache-commons-collections Requires: apache-commons-dbcp Requires: apache-commons-pool Requires: java >= 1:1.6.0 +Requires: jpackage-utils Requires: procps Requires: %{name}-lib = %{epoch}:%{version}-%{release} Requires(pre): shadow-utils @@ -660,6 +661,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Fri Jul 12 2013 Ivan Afonichev 0:7.0.42-2 +- Remove jpackage-utils R + * Thu Jul 11 2013 Dmitry Tikhonov 0:7.0.42-1 - Updated to 7.0.42 From 53df09c777bb6a858c20e34b25d8d9daef16e057 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 3 Aug 2013 23:17:53 -0500 Subject: [PATCH 117/273] - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild --- tomcat.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tomcat.spec b/tomcat.spec index 154d553..ba04e78 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -661,6 +661,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Sun Aug 04 2013 Fedora Release Engineering - 0:7.0.42-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + * Fri Jul 12 2013 Ivan Afonichev 0:7.0.42-2 - Remove jpackage-utils R From 2e1950e71c024982f4a0025fe7bf0b1fbe943125 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Mon, 4 Nov 2013 00:04:06 +0400 Subject: [PATCH 118/273] Updated to 7.0.47 Fix java.security.policy --- sources | 2 +- tomcat-server | 2 +- tomcat.spec | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sources b/sources index c9c84cf..2bb650f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5b7319630dbfe1803fc84bcb48fc551c apache-tomcat-7.0.42-src.tar.gz +4ee89bfd85f6afb31c7675b05f0469cb apache-tomcat-7.0.47-src.tar.gz diff --git a/tomcat-server b/tomcat-server index ef8cec9..bd55999 100644 --- a/tomcat-server +++ b/tomcat-server @@ -16,7 +16,7 @@ if [ "$1" = "start" ] ; then if [ "${SECURITY_MANAGER}" = "true" ] ; then OPTIONS="${OPTIONS} \ -Djava.security.manager \ - -Djava.security.policy==\"${CATALINA_BASE}/conf/catalina.policy\"" + -Djava.security.policy==${CATALINA_BASE}/conf/catalina.policy" fi run start elif [ "$1" = "stop" ] ; then diff --git a/tomcat.spec b/tomcat.spec index ba04e78..d960a78 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.2 %global major_version 7 %global minor_version 0 -%global micro_version 42 +%global micro_version 47 %global packdname apache-tomcat-%{version}-src %global servletspec 3.0 %global elspec 2.2 @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 3%{?dist} +Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -661,6 +661,10 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Sun Nov 03 2013 Ivan Afonichev 0:7.0.47-1 +- Updated to 7.0.47 +- Fix java.security.policy + * Sun Aug 04 2013 Fedora Release Engineering - 0:7.0.42-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild From 3b876f481c07e5cac8c9785f674926964b995632 Mon Sep 17 00:00:00 2001 From: Stanislav Ochotnicky Date: Wed, 15 Jan 2014 14:51:06 +0100 Subject: [PATCH 119/273] Rebuild for bug #1033664 --- tomcat.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tomcat.spec b/tomcat.spec index d960a78..4ad1226 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -661,6 +661,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Wed Jan 15 2014 Stanislav Ochotnicky - 0:7.0.47-2 +- Rebuild for bug #1033664 + * Sun Nov 03 2013 Ivan Afonichev 0:7.0.47-1 - Updated to 7.0.47 - Fix java.security.policy From 22a6d964758a46e4beedd4168e28354be618cbc2 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Tue, 21 Jan 2014 15:02:19 +0100 Subject: [PATCH 120/273] Fix installation of Maven metadata for tomcat-juli.jar - Resolves: rhbz#1033664 --- tomcat.spec | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index 4ad1226..fb9ef77 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -468,6 +468,9 @@ done # also provide jetty depmap (originally in jetty package, but it's cleaner to have it here %add_maven_depmap JPP-tomcat-servlet-api.pom tomcat-servlet-api.jar -f "tomcat-servlet-api" -a "javax.servlet:servlet-api,javax.servlet:javax.servlet-api,org.mortbay.jetty:servlet-api,org.eclipse.jetty.orbit:javax.servlet" +# replace temporary copy with link +%{__ln_s} -f $(abs2rel %{bindir}/tomcat-juli.jar %{libdir}) ${RPM_BUILD_ROOT}%{libdir}/ + # two special pom where jar files have different names %{__cp} -a tomcat-tribes.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-catalina-tribes.pom %add_maven_depmap JPP.%{name}-catalina-tribes.pom %{name}/catalina-tribes.jar @@ -484,9 +487,6 @@ done %{__cp} -a tomcat-util.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-util.pom %add_maven_depmap JPP.%{name}-tomcat-util.pom %{name}/tomcat-util.jar -# replace temporary copy with link -%{__ln_s} -f %{bindir}/tomcat-juli.jar ${RPM_BUILD_ROOT}%{libdir}/ - mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/lib/tmpfiles.d cat > ${RPM_BUILD_ROOT}%{_prefix}/lib/tmpfiles.d/%{name}.conf < - 0:7.0.47-3 +- Fix installation of Maven metadata for tomcat-juli.jar +- Resolves: rhbz#1033664 + * Wed Jan 15 2014 Stanislav Ochotnicky - 0:7.0.47-2 - Rebuild for bug #1033664 From cee7beed0a207ae3e82b9ee9bb31df300b86b760 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Wed, 26 Mar 2014 03:34:21 +0400 Subject: [PATCH 121/273] Updated to 7.0.52 - Rewrite jsvc implementation, resolves: rhbz#1051743 - Switch to java-headless R, resolves: rhbz#1068566 - Create and own %{_localstatedir}/lib/tomcats, resolves: rhbz#1026741 - Add pom for tomcat-jdbc, resolves: rhbz#1011003 --- sources | 2 +- tomcat-7.0-jsvc.service | 8 ++- tomcat-7.0-jsvc.wrapper | 83 -------------------------- tomcat-7.0-tomcat-jsvc-sysd | 113 ------------------------------------ tomcat-functions | 42 ++++++++++++++ tomcat-preamble | 8 +-- tomcat.spec | 35 +++++++---- 7 files changed, 72 insertions(+), 219 deletions(-) delete mode 100644 tomcat-7.0-jsvc.wrapper delete mode 100644 tomcat-7.0-tomcat-jsvc-sysd create mode 100644 tomcat-functions diff --git a/sources b/sources index 2bb650f..7b1d1be 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4ee89bfd85f6afb31c7675b05f0469cb apache-tomcat-7.0.47-src.tar.gz +1b85c08721ab9d891b72ca35cd4a0e2d apache-tomcat-7.0.52-src.tar.gz diff --git a/tomcat-7.0-jsvc.service b/tomcat-7.0-jsvc.service index 3792cef..8275796 100644 --- a/tomcat-7.0-jsvc.service +++ b/tomcat-7.0-jsvc.service @@ -11,9 +11,11 @@ Description=Apache Tomcat Web Application Container JSVC wrapper After=syslog.target network.target [Service] -Type=forking -ExecStart=/usr/sbin/tomcat-jsvc-sysd start -ExecStop=/usr/sbin/tomcat-jsvc-sysd stop +Type=simple +EnvironmentFile=/etc/tomcat/tomcat.conf +Environment="NAME=" "USE_JSVC=true" +ExecStart=/usr/libexec/tomcat/server start +ExecStop=/usr/libexec/tomcat/server stop [Install] WantedBy=multi-user.target diff --git a/tomcat-7.0-jsvc.wrapper b/tomcat-7.0-jsvc.wrapper deleted file mode 100644 index 56fcc09..0000000 --- a/tomcat-7.0-jsvc.wrapper +++ /dev/null @@ -1,83 +0,0 @@ -#!/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)" - -# if jsvc installed and USE_JSVC=true -# then use jsvc instead of calling java directly -if [ -x /usr/bin/jsvc ]; then - JAVACMD="/usr/bin/jsvc -nodetach -user ${TOMCAT_USER} -outfile ${CATALINA_BASE}/logs/catalina.out -errfile ${CATALINA_BASE}/logs/catalina.out" - if [ "$1" = "stop" ]; then - JAVACMD="${JAVACMD} -stop" - fi -fi - -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 diff --git a/tomcat-7.0-tomcat-jsvc-sysd b/tomcat-7.0-tomcat-jsvc-sysd deleted file mode 100644 index 9134d5b..0000000 --- a/tomcat-7.0-tomcat-jsvc-sysd +++ /dev/null @@ -1,113 +0,0 @@ -#!/bin/bash -# -# This script provides systemd activation of the tomcat service -# To create clones of this service: -# 1) SERVICE_NAME must be defined before calling this script -# 2) Create /etc/sysconfig/${SERVICE_NAME} from /etc/sysconfig/tomcat -# to override tomcat defaults - -# SERVICE_NAME is a required value only if the service name is -# different from 'tomcat' -# -NAME="${SERVICE_NAME:-tomcat}" - -#I'll bet this isn't required. -# unset ISBOOT - -# For SELinux we need to use 'runuser' not 'su' -if [ -x "/sbin/runuser" ]; then - SU="/sbin/runuser -s /bin/sh" -else - SU="/bin/su -s /bin/sh" -fi - -# Path to the tomcat launch script -TOMCAT_SCRIPT="/usr/sbin/tomcat-jsvc" - -# Define the tomcat username -TOMCAT_USER="${TOMCAT_USER:-tomcat}" - -# TOMCAT_LOG should be different from catalina.out. -# Usually the below config is all that is necessary -TOMCAT_LOG=/var/log/${NAME}/${NAME}-sysd.log - -# Get the tomcat config (use this for environment specific settings) -TOMCAT_CFG="/etc/tomcat/tomcat.conf" -if [ -r "$TOMCAT_CFG" ]; then - . $TOMCAT_CFG -fi - -# Get instance specific config file -if [ -r "/etc/sysconfig/${NAME}" ]; then - . /etc/sysconfig/${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() { - # fix permissions on the log and pid files - export CATALINA_PID="/var/run/${NAME}.pid" - touch $CATALINA_PID 2>&1 - if [ "$?" -eq "0" ]; then - chown ${TOMCAT_USER}:${TOMCAT_USER} $CATALINA_PID - fi - - touch $TOMCAT_LOG 2>&1 - if [ "$?" -eq "0" ]; then - chown ${TOMCAT_USER}:${TOMCAT_USER} $TOMCAT_LOG - fi - - # if jsvc installed and USE_JSVC=true - # then start as root and use jsvc to drop privileges - if [ -x /usr/bin/jsvc ]; then - TOMCAT_USER="root" - 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 -} - -function stop() { - # if jsvc installed and USE_JSVC=true - # then start as root and use jsvc to drop privileges - if [ -x /usr/bin/jsvc ]; then - TOMCAT_USER="root" - fi - - parseOptions - $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} stop" >> $TOMCAT_LOG 2>&1 -} - -# See how we were called. -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - stop - start - ;; -esac - diff --git a/tomcat-functions b/tomcat-functions new file mode 100644 index 0000000..6f03951 --- /dev/null +++ b/tomcat-functions @@ -0,0 +1,42 @@ +#!/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 + +_save_function() { + local ORIG_FUNC=$(declare -f $1) + local NEWNAME_FUNC="$2${ORIG_FUNC#$1}" + eval "$NEWNAME_FUNC" +} + +run_jsvc(){ + if [ -x /usr/bin/jsvc ]; then + TOMCAT_USER="tomcat" + JSVC="/usr/bin/jsvc" + + JSVC_OPTS="-nodetach -pidfile /var/run/jsvc-tomcat${NAME}.pid -user ${TOMCAT_USER} -outfile ${CATALINA_BASE}/logs/catalina.out -errfile ${CATALINA_BASE}/logs/catalina.out" + if [ "$1" = "stop" ]; then + JSVC_OPTS="${JSVC_OPTS} -stop" + fi + + exec "${JSVC}" ${JSVC_OPTS} ${FLAGS} -classpath "${CLASSPATH}" ${OPTIONS} "${MAIN_CLASS}" "${@}" + else + echo "Can't find /usr/bin/jsvc executable" + fi + +} + +_save_function run run_java + +run() { + if [ "${USE_JSVC}" = "true" ] ; then + run_jsvc $@ + else + run_java $@ + fi +} + diff --git a/tomcat-preamble b/tomcat-preamble index 9627522..0079a8c 100644 --- a/tomcat-preamble +++ b/tomcat-preamble @@ -1,11 +1,6 @@ #!/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 +. /usr/libexec/tomcat/functions # Get the tomcat config (use this for environment specific settings) @@ -26,7 +21,6 @@ if [ -z "$CATALINA_BASE" ]; then CATALINA_BASE="${CATALINA_HOME}" fi fi - VERBOSE=1 set_javacmd cd ${CATALINA_HOME} diff --git a/tomcat.spec b/tomcat.spec index fb9ef77..03d6e53 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.2 %global major_version 7 %global minor_version 0 -%global micro_version 47 +%global micro_version 52 %global packdname apache-tomcat-%{version}-src %global servletspec 3.0 %global elspec 2.2 @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 3%{?dist} +Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -76,9 +76,8 @@ Source13: jasper-el-OSGi-MANIFEST.MF Source14: jasper-OSGi-MANIFEST.MF Source15: tomcat-api-OSGi-MANIFEST.MF Source16: tomcat-juli-OSGi-MANIFEST.MF -Source18: %{name}-%{major_version}.%{minor_version}-tomcat-jsvc-sysd -Source19: %{name}-%{major_version}.%{minor_version}-jsvc.wrapper Source20: %{name}-%{major_version}.%{minor_version}-jsvc.service +Source21: tomcat-functions Source30: tomcat-preamble Source31: tomcat-server Source32: tomcat-named.service @@ -108,7 +107,7 @@ Requires: apache-commons-logging Requires: apache-commons-collections Requires: apache-commons-dbcp Requires: apache-commons-pool -Requires: java >= 1:1.6.0 +Requires: java-headless >= 1:1.6.0 Requires: jpackage-utils Requires: procps Requires: %{name}-lib = %{epoch}:%{version}-%{release} @@ -160,7 +159,7 @@ Requires: %{name} = %{epoch}:%{version}-%{release} Requires: apache-commons-daemon-jsvc %description jsvc -Systemd service and wrapper scripts to start tomcat with jsvc, +Systemd service to start tomcat with jsvc, which allows tomcat to perform some privileged operations (e.g. bind to a port < 1024) and then switch identity to a non-privileged user. @@ -263,6 +262,7 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dno.build.dbcp=true \ -Dversion="%{version}" \ -Dversion.build="%{micro_version}" \ + -Djava.7.home=%{java_home} \ deploy dist-prepare dist-source javadoc # remove some jars that we'll replace with symlinks later @@ -321,6 +321,7 @@ zip -u output/build/bin/tomcat-juli.jar META-INF/MANIFEST.MF %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{logdir} /bin/touch ${RPM_BUILD_ROOT}%{logdir}/catalina.out %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{_localstatedir}/run +%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{_localstatedir}/lib/tomcats /bin/touch ${RPM_BUILD_ROOT}%{_localstatedir}/run/%{name}.pid /bin/echo "%{name}-%{major_version}.%{minor_version}.%{micro_version} RPM installed" >> ${RPM_BUILD_ROOT}%{logdir}/catalina.out %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{homedir} @@ -353,12 +354,8 @@ popd ${RPM_BUILD_ROOT}%{_sbindir}/%{name} %{__install} -m 0644 %{SOURCE11} \ ${RPM_BUILD_ROOT}%{_unitdir}/%{name}.service -%{__install} -m 0644 %{SOURCE19} \ - ${RPM_BUILD_ROOT}%{_sbindir}/%{name}-jsvc %{__install} -m 0644 %{SOURCE20} \ ${RPM_BUILD_ROOT}%{_unitdir}/%{name}-jsvc.service -%{__install} -m 0644 %{SOURCE18} \ - ${RPM_BUILD_ROOT}%{_sbindir}/%{name}-jsvc-sysd %{__sed} -e "s|\@\@\@TCLOG\@\@\@|%{logdir}|g" %{SOURCE5} \ > ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/%{name} %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ @@ -370,6 +367,8 @@ popd -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE7} \ > ${RPM_BUILD_ROOT}%{_bindir}/%{name}-tool-wrapper +%{__install} -m 0644 %{SOURCE21} \ + ${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/functions %{__install} -m 0755 %{SOURCE30} \ ${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/preamble %{__install} -m 0755 %{SOURCE31} \ @@ -487,6 +486,9 @@ done %{__cp} -a tomcat-util.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-util.pom %add_maven_depmap JPP.%{name}-tomcat-util.pom %{name}/tomcat-util.jar +%{__cp} -a tomcat-jdbc.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-jdbc.pom +%add_maven_depmap JPP.%{name}-tomcat-jdbc.pom %{name}/tomcat-jdbc.jar + mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/lib/tmpfiles.d cat > ${RPM_BUILD_ROOT}%{_prefix}/lib/tmpfiles.d/%{name}.conf < 0:7.0.52-1 +- Updated to 7.0.52 +- Rewrite jsvc implementation, resolves: rhbz#1051743 +- Switch to java-headless R, resolves: rhbz#1068566 +- Create and own %{_localstatedir}/lib/tomcats, resolves: rhbz#1026741 +- Add pom for tomcat-jdbc, resolves: rhbz#1011003 + * Tue Jan 21 2014 Mikolaj Izdebski - 0:7.0.47-3 - Fix installation of Maven metadata for tomcat-juli.jar - Resolves: rhbz#1033664 From e4eaf9df8e62b04dc5ed2a35c49dce4529d1a7f6 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Fri, 28 Mar 2014 02:46:09 +0400 Subject: [PATCH 122/273] Revert "Removed log4j sub-package with bundled log4j (replaced by system symlink)" This reverts commit 5746174c039169deb2a1032b2b03bada4dc77f75. Conflicts: tomcat6.spec --- tomcat.spec | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tomcat.spec b/tomcat.spec index 03d6e53..3715583 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -175,6 +175,13 @@ Requires(postun): chkconfig %description jsp-%{jspspec}-api Apache Tomcat JSP API implementation classes. +%package log4j +Group: Applications/Internet +Summary: Log4j support for Apache Tomcat +Requires: log4j + +%description log4j +Log4j support for Apache Tomcat %package lib Group: Development/Libraries @@ -596,6 +603,8 @@ fi %{homedir}/logs %{homedir}/conf +%exclude %{confdir}/log4j.properties + %files admin-webapps %defattr(0664,root,tomcat,0755) %{appdir}/host-manager @@ -616,6 +625,11 @@ fi %{_mavenpomdir}/JPP-%{name}-jsp-api.pom %{_mavendepmapfragdir}/%{name}-tomcat-jsp-api +%files log4j +%defattr(0664,root,tomcat,0755) +%config(noreplace) %{confdir}/log4j.properties +%{libdir}/log4j.jar + %files lib %defattr(-,root,root,-) %{libdir} @@ -635,6 +649,7 @@ fi %exclude %{libdir}/%{name}-el-%{elspec}-api.jar +%exclude %{libdir}/log4j.jar %files servlet-%{servletspec}-api %defattr(-,root,root,-) From 4bbbd3e6c6fd9d8cc7e0168a17a9a0333e337672 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Mon, 31 Mar 2014 00:10:23 +0400 Subject: [PATCH 123/273] Don't provide maven javax.jsp:jsp-api and javax.servlet.jsp:javax.servlet.jsp-api resolves: rhbz#1076949 --- tomcat.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index 3715583..1c06b1e 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -463,7 +463,7 @@ done # servlet-api jsp-api and el-api are not in tomcat subdir, since they are widely re-used elsewhere %{__cp} -a tomcat-jsp-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-jsp-api.pom -%add_maven_depmap JPP-tomcat-jsp-api.pom tomcat-jsp-api.jar -f "tomcat-jsp-api" -a "javax.servlet.jsp:javax.servlet.jsp-api,javax.servlet:jsp-api,org.eclipse.jetty.orbit:javax.servlet.jsp" +%add_maven_depmap JPP-tomcat-jsp-api.pom tomcat-jsp-api.jar -f "tomcat-jsp-api" -a "org.eclipse.jetty.orbit:javax.servlet.jsp" %{__cp} -a tomcat-el-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-el-api.pom %add_maven_depmap JPP-tomcat-el-api.pom tomcat-el-api.jar -f "tomcat-el-api" -a "javax.el:javax.el-api,javax.el:el-api,org.eclipse.jetty.orbit:javax.el" @@ -680,6 +680,10 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Sun Mar 30 2014 Ivan Afonichev 0:7.0.52-2 +- Don't provide maven javax.jsp:jsp-api and javax.servlet.jsp:javax.servlet.jsp-api resolves: rhbz#1076949 +- Move log4j support into subpackage, resolves: rhbz#1027716 + * Wed Mar 26 2014 Ivan Afonichev 0:7.0.52-1 - Updated to 7.0.52 - Rewrite jsvc implementation, resolves: rhbz#1051743 From 7290014b82f31331b44e6483eeaeabf47e14536e Mon Sep 17 00:00:00 2001 From: Alexander Kurtakov Date: Wed, 21 May 2014 15:16:36 +0300 Subject: [PATCH 124/273] Drop servlet/el api provides to reduce user machines ending with both. --- tomcat.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index 1c06b1e..e4a3844 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -466,13 +466,13 @@ done %add_maven_depmap JPP-tomcat-jsp-api.pom tomcat-jsp-api.jar -f "tomcat-jsp-api" -a "org.eclipse.jetty.orbit:javax.servlet.jsp" %{__cp} -a tomcat-el-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-el-api.pom -%add_maven_depmap JPP-tomcat-el-api.pom tomcat-el-api.jar -f "tomcat-el-api" -a "javax.el:javax.el-api,javax.el:el-api,org.eclipse.jetty.orbit:javax.el" +%add_maven_depmap JPP-tomcat-el-api.pom tomcat-el-api.jar -f "tomcat-el-api" -a "org.eclipse.jetty.orbit:javax.el" %{__cp} -a tomcat-servlet-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-servlet-api.pom # Generate a depmap fragment javax.servlet:servlet-api pointing to # tomcat-servlet-3.0-api for backwards compatibility # also provide jetty depmap (originally in jetty package, but it's cleaner to have it here -%add_maven_depmap JPP-tomcat-servlet-api.pom tomcat-servlet-api.jar -f "tomcat-servlet-api" -a "javax.servlet:servlet-api,javax.servlet:javax.servlet-api,org.mortbay.jetty:servlet-api,org.eclipse.jetty.orbit:javax.servlet" +%add_maven_depmap JPP-tomcat-servlet-api.pom tomcat-servlet-api.jar -f "tomcat-servlet-api" -a "org.mortbay.jetty:servlet-api,org.eclipse.jetty.orbit:javax.servlet" # replace temporary copy with link %{__ln_s} -f $(abs2rel %{bindir}/tomcat-juli.jar %{libdir}) ${RPM_BUILD_ROOT}%{libdir}/ @@ -680,6 +680,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Wed May 21 2014 Alexander Kurtakov 0:7.0.52-3 +- Drop servlet/el api provides to reduce user machines ending with both. + * Sun Mar 30 2014 Ivan Afonichev 0:7.0.52-2 - Don't provide maven javax.jsp:jsp-api and javax.servlet.jsp:javax.servlet.jsp-api resolves: rhbz#1076949 - Move log4j support into subpackage, resolves: rhbz#1027716 From b5a9b72e6c8c09e80d32ca2208628123b49c51d7 Mon Sep 17 00:00:00 2001 From: Alexander Kurtakov Date: Thu, 5 Jun 2014 11:29:46 +0300 Subject: [PATCH 125/273] Update to upstream 7.0.54 - fixes compile with Java 8. --- sources | 2 +- tomcat.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 7b1d1be..156bd93 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1b85c08721ab9d891b72ca35cd4a0e2d apache-tomcat-7.0.52-src.tar.gz +bb0c079d6a16466cc70dba07754c9ee6 apache-tomcat-7.0.54-src.tar.gz diff --git a/tomcat.spec b/tomcat.spec index e4a3844..a7baecf 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.2 %global major_version 7 %global minor_version 0 -%global micro_version 52 +%global micro_version 54 %global packdname apache-tomcat-%{version}-src %global servletspec 3.0 %global elspec 2.2 @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 3%{?dist} +Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -680,6 +680,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Thu Jun 5 2014 Alexander Kurtakov 0:7.0.54-1 +- Update to upstream 7.0.54 - fixes compile with Java 8. + * Wed May 21 2014 Alexander Kurtakov 0:7.0.52-3 - Drop servlet/el api provides to reduce user machines ending with both. From 995a509b8844f5cef62d0c0b212959b540ad8e71 Mon Sep 17 00:00:00 2001 From: Alexander Kurtakov Date: Thu, 5 Jun 2014 15:29:45 +0300 Subject: [PATCH 126/273] Fix compile with xmvn 2.0. --- tomcat.spec | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index a7baecf..9f00fe4 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -458,7 +458,7 @@ done # we won't install dbcp, juli-adapters and juli-extras pom files for libname in annotations-api catalina jasper-el jasper catalina-ha; do %{__cp} -a %{name}-$libname.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-$libname.pom - %add_maven_depmap JPP.%{name}-$libname.pom %{name}/$libname.jar + %add_maven_depmap JPP.%{name}-$libname.pom %{name}/$libname.jar -f "tomcat-lib" done # servlet-api jsp-api and el-api are not in tomcat subdir, since they are widely re-used elsewhere @@ -556,7 +556,7 @@ fi /sbin/chkconfig --del tomcat > /dev/null 2>&1 || : /bin/systemctl try-restart tomcat.service > /dev/null 2>&1 || : -%files +%files %defattr(0664,root,tomcat,0755) %doc {LICENSE,NOTICE,RELEASE*} %attr(0755,root,root) %{_bindir}/%{name}-digest @@ -618,23 +618,19 @@ fi %defattr(-,root,root,-) %{_javadocdir}/%{name} -%files jsp-%{jspspec}-api +%files jsp-%{jspspec}-api -f output/dist/src/res/maven/.mfiles-tomcat-jsp-api %defattr(-,root,root,-) %{_javadir}/%{name}-jsp-%{jspspec}*.jar -%{_javadir}/%{name}-jsp-api.jar -%{_mavenpomdir}/JPP-%{name}-jsp-api.pom -%{_mavendepmapfragdir}/%{name}-tomcat-jsp-api %files log4j %defattr(0664,root,tomcat,0755) %config(noreplace) %{confdir}/log4j.properties %{libdir}/log4j.jar -%files lib +%files lib -f output/dist/src/res/maven/.mfiles-tomcat-lib %defattr(-,root,root,-) %{libdir} %{bindir}/tomcat-juli.jar -%{_mavendepmapfragdir}/%{name} %{_mavenpomdir}/JPP.%{name}-annotations-api.pom %{_mavenpomdir}/JPP.%{name}-catalina-ha.pom %{_mavenpomdir}/JPP.%{name}-catalina-tribes.pom @@ -646,28 +642,20 @@ fi %{_mavenpomdir}/JPP.%{name}-tomcat-coyote.pom %{_mavenpomdir}/JPP.%{name}-tomcat-util.pom %{_mavenpomdir}/JPP.%{name}-tomcat-jdbc.pom - - +%{_datadir}/maven-metadata/tomcat.xml %exclude %{libdir}/%{name}-el-%{elspec}-api.jar %exclude %{libdir}/log4j.jar -%files servlet-%{servletspec}-api +%files servlet-%{servletspec}-api -f output/dist/src/res/maven/.mfiles-tomcat-servlet-api %defattr(-,root,root,-) %doc LICENSE %{_javadir}/%{name}-servlet-%{servletspec}*.jar -%{_javadir}/%{name}-servlet-api.jar -%{_mavendepmapfragdir}/%{name}-tomcat-servlet-api -%{_mavenpomdir}/JPP-%{name}-servlet-api.pom -%files el-%{elspec}-api +%files el-%{elspec}-api -f output/dist/src/res/maven/.mfiles-tomcat-el-api %defattr(-,root,root,-) %doc LICENSE %{_javadir}/%{name}-el-%{elspec}-api.jar -%{_javadir}/%{name}-el-api.jar %{libdir}/%{name}-el-%{elspec}-api.jar -%{_mavenpomdir}/JPP-%{name}-el-api.pom -%{_mavendepmapfragdir}/%{name}-tomcat-el-api - %files webapps %defattr(0644,tomcat,tomcat,0755) From 084db1837c1dc8153510f4e51d544f8c2a720d7c Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sun, 8 Jun 2014 03:44:23 -0500 Subject: [PATCH 127/273] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- tomcat.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tomcat.spec b/tomcat.spec index 9f00fe4..1f5d211 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -668,6 +668,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Sun Jun 08 2014 Fedora Release Engineering - 0:7.0.54-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Thu Jun 5 2014 Alexander Kurtakov 0:7.0.54-1 - Update to upstream 7.0.54 - fixes compile with Java 8. From be711a2ff6efc98e2fc8ce27b4ad75dbf449b212 Mon Sep 17 00:00:00 2001 From: Michal Srb Date: Mon, 16 Jun 2014 10:24:24 +0200 Subject: [PATCH 128/273] jsp-api requires el-api Signed-off-by: Mikolaj Izdebski --- tomcat.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tomcat.spec b/tomcat.spec index 1f5d211..d9de221 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -169,6 +169,7 @@ Summary: Apache Tomcat JSP API implementation classes Provides: jsp = %{jspspec} Provides: jsp22 Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} +Requires: %{name}-el-%{elspec}-api = %{epoch}:%{version}-%{release} Requires(post): chkconfig Requires(postun): chkconfig @@ -668,6 +669,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Mon Jun 16 2014 Michal Srb - 0:7.0.54-3 +- jsp-api requires el-api + * Sun Jun 08 2014 Fedora Release Engineering - 0:7.0.54-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From 53dd1361b3ab4535e39dae014a53eb7b56627f24 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Sun, 21 Sep 2014 04:11:01 +0400 Subject: [PATCH 129/273] Updated to 8.0.12 Substitute libnames in catalina-tasks.xml, resolves: rhbz#1126439 Use CATALINA_OPTS only on start, resolves: rhbz#1051194 --- ... => tomcat-8.0-bootstrap-MANIFEST.MF.patch | 0 ...-digest.script => tomcat-8.0-digest.script | 0 ....0-jsvc.service => tomcat-8.0-jsvc.service | 0 ....properties => tomcat-8.0-log4j.properties | 0 ...ch => tomcat-8.0-tomcat-users-webapp.patch | 0 ...r.script => tomcat-8.0-tool-wrapper.script | 0 tomcat-7.0.conf => tomcat-8.0.conf | 0 tomcat-7.0.logrotate => tomcat-8.0.logrotate | 0 tomcat-7.0.service => tomcat-8.0.service | 0 tomcat-7.0.sysconfig => tomcat-8.0.sysconfig | 0 tomcat-7.0.wrapper => tomcat-8.0.wrapper | 0 tomcat-server | 3 +- tomcat.spec | 47 +++++++++++++------ 13 files changed, 35 insertions(+), 15 deletions(-) rename tomcat-7.0-bootstrap-MANIFEST.MF.patch => tomcat-8.0-bootstrap-MANIFEST.MF.patch (100%) rename tomcat-7.0-digest.script => tomcat-8.0-digest.script (100%) rename tomcat-7.0-jsvc.service => tomcat-8.0-jsvc.service (100%) rename tomcat-7.0-log4j.properties => tomcat-8.0-log4j.properties (100%) rename tomcat-7.0-tomcat-users-webapp.patch => tomcat-8.0-tomcat-users-webapp.patch (100%) rename tomcat-7.0-tool-wrapper.script => tomcat-8.0-tool-wrapper.script (100%) rename tomcat-7.0.conf => tomcat-8.0.conf (100%) rename tomcat-7.0.logrotate => tomcat-8.0.logrotate (100%) rename tomcat-7.0.service => tomcat-8.0.service (100%) rename tomcat-7.0.sysconfig => tomcat-8.0.sysconfig (100%) rename tomcat-7.0.wrapper => tomcat-8.0.wrapper (100%) diff --git a/tomcat-7.0-bootstrap-MANIFEST.MF.patch b/tomcat-8.0-bootstrap-MANIFEST.MF.patch similarity index 100% rename from tomcat-7.0-bootstrap-MANIFEST.MF.patch rename to tomcat-8.0-bootstrap-MANIFEST.MF.patch diff --git a/tomcat-7.0-digest.script b/tomcat-8.0-digest.script similarity index 100% rename from tomcat-7.0-digest.script rename to tomcat-8.0-digest.script diff --git a/tomcat-7.0-jsvc.service b/tomcat-8.0-jsvc.service similarity index 100% rename from tomcat-7.0-jsvc.service rename to tomcat-8.0-jsvc.service diff --git a/tomcat-7.0-log4j.properties b/tomcat-8.0-log4j.properties similarity index 100% rename from tomcat-7.0-log4j.properties rename to tomcat-8.0-log4j.properties diff --git a/tomcat-7.0-tomcat-users-webapp.patch b/tomcat-8.0-tomcat-users-webapp.patch similarity index 100% rename from tomcat-7.0-tomcat-users-webapp.patch rename to tomcat-8.0-tomcat-users-webapp.patch diff --git a/tomcat-7.0-tool-wrapper.script b/tomcat-8.0-tool-wrapper.script similarity index 100% rename from tomcat-7.0-tool-wrapper.script rename to tomcat-8.0-tool-wrapper.script diff --git a/tomcat-7.0.conf b/tomcat-8.0.conf similarity index 100% rename from tomcat-7.0.conf rename to tomcat-8.0.conf diff --git a/tomcat-7.0.logrotate b/tomcat-8.0.logrotate similarity index 100% rename from tomcat-7.0.logrotate rename to tomcat-8.0.logrotate diff --git a/tomcat-7.0.service b/tomcat-8.0.service similarity index 100% rename from tomcat-7.0.service rename to tomcat-8.0.service diff --git a/tomcat-7.0.sysconfig b/tomcat-8.0.sysconfig similarity index 100% rename from tomcat-7.0.sysconfig rename to tomcat-8.0.sysconfig diff --git a/tomcat-7.0.wrapper b/tomcat-8.0.wrapper similarity index 100% rename from tomcat-7.0.wrapper rename to tomcat-8.0.wrapper diff --git a/tomcat-server b/tomcat-server index bd55999..951b3ee 100644 --- a/tomcat-server +++ b/tomcat-server @@ -4,7 +4,7 @@ MAIN_CLASS=org.apache.catalina.startup.Bootstrap -FLAGS="$JAVA_OPTS $CATALINA_OPTS" +FLAGS="$JAVA_OPTS" OPTIONS="-Dcatalina.base=$CATALINA_BASE \ -Dcatalina.home=$CATALINA_HOME \ -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS \ @@ -14,6 +14,7 @@ OPTIONS="-Dcatalina.base=$CATALINA_BASE \ if [ "$1" = "start" ] ; then if [ "${SECURITY_MANAGER}" = "true" ] ; then + FLAGS="${FLAGS} $CATALINA_OPTS" OPTIONS="${OPTIONS} \ -Djava.security.manager \ -Djava.security.policy==${CATALINA_BASE}/conf/catalina.policy" diff --git a/tomcat.spec b/tomcat.spec index d9de221..a0a96bb 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -28,13 +28,13 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -%global jspspec 2.2 -%global major_version 7 +%global jspspec 2.3 +%global major_version 8 %global minor_version 0 -%global micro_version 54 +%global micro_version 12 %global packdname apache-tomcat-%{version}-src -%global servletspec 3.0 -%global elspec 2.2 +%global servletspec 3.1 +%global elspec 3.0 %global tcuid 91 # FHS 2.3 compliant tree structure - http://www.pathname.com/fhs/2.3/ @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 3%{?dist} +Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -88,7 +88,7 @@ Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.pat BuildArch: noarch BuildRequires: ant -BuildRequires: ecj >= 1:4.2.1 +BuildRequires: ecj >= 1:4.4.0 BuildRequires: findutils BuildRequires: apache-commons-collections BuildRequires: apache-commons-daemon @@ -168,6 +168,8 @@ Group: Development/Libraries Summary: Apache Tomcat JSP API implementation classes Provides: jsp = %{jspspec} Provides: jsp22 +Provides: %{name}-jsp-2.2-api +Obsoletes: %{name}-jsp-2.2-api Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} Requires: %{name}-el-%{elspec}-api = %{epoch}:%{version}-%{release} Requires(post): chkconfig @@ -205,6 +207,8 @@ Summary: Apache Tomcat Servlet API implementation classes Provides: servlet = %{servletspec} Provides: servlet6 Provides: servlet3 +Provides: %{name}-servlet-3.0-api +Obsoletes: %{name}-servlet-3.0-api Requires(post): chkconfig Requires(postun): chkconfig @@ -213,14 +217,16 @@ Apache Tomcat Servlet API implementation classes. %package el-%{elspec}-api Group: Development/Libraries -Summary: Expression Language v1.0 API +Summary: Expression Language v%{elspec} API Provides: el_1_0_api = %{epoch}:%{version}-%{release} Provides: el_api = %{elspec} +Provides: %{name}-el-2.2-api +Obsoletes: %{name}-el-2.2-api Requires(post): chkconfig Requires(postun): chkconfig %description el-%{elspec}-api -Expression Language 1.0. +Expression Language %{elspec}. %package webapps Group: Applications/Internet @@ -250,6 +256,8 @@ export OPT_JAR_LIST="xalan-j2-serializer" touch HACK %{__mkdir_p} HACKDIR touch HACKDIR/build.xml + touch HACKDIR/LICENSE + # who needs a build.properties file anyway %{ant} -Dbase.path="." \ -Dbuild.compiler="modern" \ @@ -258,9 +266,9 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dcommons-daemon.native.src.tgz="HACK" \ -Djasper-jdt.jar="$(build-classpath ecj)" \ -Djdt.jar="$(build-classpath ecj)" \ - -Dtomcat-dbcp.jar="$(build-classpath apache-commons-dbcp)" \ -Dtomcat-native.tar.gz="HACK" \ -Dtomcat-native.home="." \ + -Dtomcat-native.win.path="HACKDIR" \ -Dcommons-daemon.native.win.mgr.exe="HACK" \ -Dnsis.exe="HACK" \ -Djaxrpc-lib.jar="$(build-classpath jaxrpc)" \ @@ -275,8 +283,7 @@ export OPT_JAR_LIST="xalan-j2-serializer" # remove some jars that we'll replace with symlinks later %{__rm} output/build/bin/commons-daemon.jar \ - output/build/lib/ecj.jar \ - output/build/lib/apache-commons-dbcp.jar + output/build/lib/ecj.jar # remove the cruft we created %{__rm} output/build/bin/tomcat-native.tar.gz @@ -384,6 +391,13 @@ popd %{__install} -m 0644 %{SOURCE32} \ ${RPM_BUILD_ROOT}%{_unitdir}/%{name}@.service +# Substitute libnames in catalina-tasks.xml +sed -i \ + "s,el-api.jar,%{name}-el-%{elspec}-api.jar,; + s,servlet-api.jar,%{name}-servlet-%{servletspec}-api.jar,; + s,jsp-api.jar,%{name}-jsp-%{jspspec}-api.jar,;" \ + ${RPM_BUILD_ROOT}%{bindir}/catalina-tasks.xml + # create jsp and servlet API symlinks pushd ${RPM_BUILD_ROOT}%{_javadir} %{__mv} %{name}/jsp-api.jar %{name}-jsp-%{jspspec}-api.jar @@ -467,7 +481,7 @@ done %add_maven_depmap JPP-tomcat-jsp-api.pom tomcat-jsp-api.jar -f "tomcat-jsp-api" -a "org.eclipse.jetty.orbit:javax.servlet.jsp" %{__cp} -a tomcat-el-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-el-api.pom -%add_maven_depmap JPP-tomcat-el-api.pom tomcat-el-api.jar -f "tomcat-el-api" -a "org.eclipse.jetty.orbit:javax.el" +%add_maven_depmap JPP-tomcat-el-api.pom tomcat-el-api.jar -f "tomcat-el-api" -a "org.eclipse.jetty.orbit:javax.el,javax.el:el-api" %{__cp} -a tomcat-servlet-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-servlet-api.pom # Generate a depmap fragment javax.servlet:servlet-api pointing to @@ -643,7 +657,7 @@ fi %{_mavenpomdir}/JPP.%{name}-tomcat-coyote.pom %{_mavenpomdir}/JPP.%{name}-tomcat-util.pom %{_mavenpomdir}/JPP.%{name}-tomcat-jdbc.pom -%{_datadir}/maven-metadata/tomcat.xml +%{_datadir}/maven-fragments/%{name} %exclude %{libdir}/%{name}-el-%{elspec}-api.jar %exclude %{libdir}/log4j.jar @@ -669,6 +683,11 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Sat Sep 20 2014 Ivan Afonichev 0:8.0.12-1 +- Updated to 8.0.12 +- Substitute libnames in catalina-tasks.xml, resolves: rhbz#1126439 +- Use CATALINA_OPTS only on start, resolves: rhbz#1051194 + * Mon Jun 16 2014 Michal Srb - 0:7.0.54-3 - jsp-api requires el-api From 1001f00e0ddfa70cfd4d67c426884343b03fe9c1 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Mon, 16 Feb 2015 00:43:27 +0300 Subject: [PATCH 130/273] Updated to 8.0.18 --- sources | 2 +- tomcat.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 156bd93..f4fa4f5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -bb0c079d6a16466cc70dba07754c9ee6 apache-tomcat-7.0.54-src.tar.gz +a57119b64a853c796de6b319effae632 apache-tomcat-8.0.18-src.tar.gz diff --git a/tomcat.spec b/tomcat.spec index a0a96bb..9d68f44 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.3 %global major_version 8 %global minor_version 0 -%global micro_version 12 +%global micro_version 18 %global packdname apache-tomcat-%{version}-src %global servletspec 3.1 %global elspec 3.0 @@ -657,7 +657,7 @@ fi %{_mavenpomdir}/JPP.%{name}-tomcat-coyote.pom %{_mavenpomdir}/JPP.%{name}-tomcat-util.pom %{_mavenpomdir}/JPP.%{name}-tomcat-jdbc.pom -%{_datadir}/maven-fragments/%{name} +%{_datadir}/maven-metadata/tomcat.xml %exclude %{libdir}/%{name}-el-%{elspec}-api.jar %exclude %{libdir}/log4j.jar @@ -683,6 +683,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Sun Feb 15 2015 Ivan Afonichev 0:8.0.18-1 +- Updated to 8.0.18 + * Sat Sep 20 2014 Ivan Afonichev 0:8.0.12-1 - Updated to 8.0.12 - Substitute libnames in catalina-tasks.xml, resolves: rhbz#1126439 From d6cc435f664371605534c3a7415b458b89121c18 Mon Sep 17 00:00:00 2001 From: Michal Srb Date: Mon, 16 Feb 2015 15:50:26 +0100 Subject: [PATCH 131/273] Install POM files for org.apache.tomcat:{tomcat-jni,tomcat-util-scan} --- tomcat.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index 9d68f44..c65713a 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 0 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -471,7 +471,7 @@ for pom in *.pom; do done # we won't install dbcp, juli-adapters and juli-extras pom files -for libname in annotations-api catalina jasper-el jasper catalina-ha; do +for libname in annotations-api catalina jasper-el jasper catalina-ha util-scan jni; do %{__cp} -a %{name}-$libname.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-$libname.pom %add_maven_depmap JPP.%{name}-$libname.pom %{name}/$libname.jar -f "tomcat-lib" done @@ -683,6 +683,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Mon Feb 16 2015 Michal Srb - 0:8.0.18-2 +- Install POM files for org.apache.tomcat:{tomcat-jni,tomcat-util-scan} + * Sun Feb 15 2015 Ivan Afonichev 0:8.0.18-1 - Updated to 8.0.18 From bdf0d75b2e44f06ab2a7dd7b92ea837107209d3e Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Tue, 3 Mar 2015 15:20:56 -0500 Subject: [PATCH 132/273] Bump epoch to maintain upgrade path from Fedora 22 --- tomcat.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index c65713a..718ce94 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -52,9 +52,9 @@ %global _systemddir /lib/systemd/system Name: tomcat -Epoch: 0 +Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -683,6 +683,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Tue Mar 03 2015 Stephen Gallagher 1:8.0.18-3 +- Bump epoch to maintain upgrade path from Fedora 22 + * Mon Feb 16 2015 Michal Srb - 0:8.0.18-2 - Install POM files for org.apache.tomcat:{tomcat-jni,tomcat-util-scan} From a7f5683fd0bbfcb59f4c8f2ae99f9be8fdd9eee7 Mon Sep 17 00:00:00 2001 From: Alexander Kurtakov Date: Wed, 4 Mar 2015 08:33:30 +0200 Subject: [PATCH 133/273] Drop old provides. --- tomcat.spec | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index 718ce94..82c11ca 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 3%{?dist} +Release: 4%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -167,8 +167,6 @@ which allows tomcat to perform some privileged operations Group: Development/Libraries Summary: Apache Tomcat JSP API implementation classes Provides: jsp = %{jspspec} -Provides: jsp22 -Provides: %{name}-jsp-2.2-api Obsoletes: %{name}-jsp-2.2-api Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} Requires: %{name}-el-%{elspec}-api = %{epoch}:%{version}-%{release} @@ -207,7 +205,6 @@ Summary: Apache Tomcat Servlet API implementation classes Provides: servlet = %{servletspec} Provides: servlet6 Provides: servlet3 -Provides: %{name}-servlet-3.0-api Obsoletes: %{name}-servlet-3.0-api Requires(post): chkconfig Requires(postun): chkconfig @@ -218,9 +215,7 @@ Apache Tomcat Servlet API implementation classes. %package el-%{elspec}-api Group: Development/Libraries Summary: Expression Language v%{elspec} API -Provides: el_1_0_api = %{epoch}:%{version}-%{release} Provides: el_api = %{elspec} -Provides: %{name}-el-2.2-api Obsoletes: %{name}-el-2.2-api Requires(post): chkconfig Requires(postun): chkconfig @@ -683,6 +678,10 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Wed Mar 4 2015 Alexander Kurtakov 1:8.0.18-4 +- Fix epoch bumped el_1_0_api that would override all other glassfish/jboss/etc. due to wrong epoch. +- Drop old provides. + * Tue Mar 03 2015 Stephen Gallagher 1:8.0.18-3 - Bump epoch to maintain upgrade path from Fedora 22 From 07e2fb497b2d21c5ba850d60fcbcc68470f7f030 Mon Sep 17 00:00:00 2001 From: Alexander Kurtakov Date: Thu, 5 Mar 2015 21:46:43 +0200 Subject: [PATCH 134/273] Rebuild against tomcat-taglibs-standard. --- tomcat.spec | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index 82c11ca..4abe4d7 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 4%{?dist} +Release: 5%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -94,7 +94,7 @@ BuildRequires: apache-commons-collections BuildRequires: apache-commons-daemon BuildRequires: apache-commons-dbcp BuildRequires: apache-commons-pool -BuildRequires: jakarta-taglibs-standard +BuildRequires: tomcat-taglibs-standard BuildRequires: java-devel >= 1:1.6.0 BuildRequires: jpackage-utils >= 0:1.7.0 BuildRequires: junit @@ -227,7 +227,7 @@ Expression Language %{elspec}. Group: Applications/Internet Summary: The ROOT and examples web applications for Apache Tomcat Requires: %{name} = %{epoch}:%{version}-%{release} -Requires: jakarta-taglibs-standard >= 0:1.1 +Requires: tomcat-taglibs-standard >= 0:1.1 %description webapps The ROOT and examples web applications for Apache Tomcat. @@ -240,8 +240,8 @@ find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name " %patch0 -p0 %patch1 -p0 -%{__ln_s} $(build-classpath jakarta-taglibs-core) webapps/examples/WEB-INF/lib/jstl.jar -%{__ln_s} $(build-classpath jakarta-taglibs-standard) webapps/examples/WEB-INF/lib/standard.jar +%{__ln_s} $(build-classpath tomcat-taglibs-standard/taglibs-standard-impl) webapps/examples/WEB-INF/lib/jstl.jar +%{__ln_s} $(build-classpath tomcat-taglibs-standard/taglibs-standard-compat) webapps/examples/WEB-INF/lib/standard.jar %build export OPT_JAR_LIST="xalan-j2-serializer" @@ -409,7 +409,7 @@ pushd output/build # need to use -p here with b-j-r otherwise the examples webapp fails to # load with a java.io.IOException %{_bindir}/build-jar-repository -p webapps/examples/WEB-INF/lib \ - taglibs-core.jar taglibs-standard.jar 2>&1 + tomcat-taglibs-standard/taglibs-standard-impl.jar tomcat-taglibs-standard/taglibs-standard-compat.jar 2>&1 popd pushd ${RPM_BUILD_ROOT}%{libdir} @@ -452,8 +452,8 @@ echo ''>>context.xml popd pushd ${RPM_BUILD_ROOT}%{appdir}/examples/WEB-INF/lib -%{__ln_s} -f $(build-classpath jakarta-taglibs-core) jstl.jar -%{__ln_s} -f $(build-classpath jakarta-taglibs-standard) standard.jar +%{__ln_s} -f $(build-classpath tomcat-taglibs-standard/taglibs-standard-impl) jstl.jar +%{__ln_s} -f $(build-classpath tomcat-taglibs-standard/taglibs-standard-compat) standard.jar popd @@ -678,6 +678,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Thu Mar 5 2015 Alexander Kurtakov 1:8.0.18-5 +- Rebuild against tomcat-taglibs-standard. + * Wed Mar 4 2015 Alexander Kurtakov 1:8.0.18-4 - Fix epoch bumped el_1_0_api that would override all other glassfish/jboss/etc. due to wrong epoch. - Drop old provides. From c2e91f9ffc469f42c55530f85b0a77819b49daea Mon Sep 17 00:00:00 2001 From: Alexander Kurtakov Date: Fri, 6 Mar 2015 12:01:37 +0200 Subject: [PATCH 135/273] Update to tomcat 8.0.20. --- sources | 2 +- tomcat.spec | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sources b/sources index f4fa4f5..86d2311 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a57119b64a853c796de6b319effae632 apache-tomcat-8.0.18-src.tar.gz +6006e1de147f2e71668fba49238fdd8a apache-tomcat-8.0.20-src.tar.gz diff --git a/tomcat.spec b/tomcat.spec index 4abe4d7..5dfb5e3 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.3 %global major_version 8 %global minor_version 0 -%global micro_version 18 +%global micro_version 20 %global packdname apache-tomcat-%{version}-src %global servletspec 3.1 %global elspec 3.0 @@ -54,7 +54,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 5%{?dist} +Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons From 62f8d6a9131da0b9fed43affd58e3f16c4e995bd Mon Sep 17 00:00:00 2001 From: Michal Srb Date: Wed, 10 Jun 2015 07:49:59 +0200 Subject: [PATCH 136/273] Fix metadata for org.apache.tomcat:{tomcat-jni,tomcat-util-scan} --- tomcat.spec | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index 5dfb5e3..e9e6882 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -466,11 +466,19 @@ for pom in *.pom; do done # we won't install dbcp, juli-adapters and juli-extras pom files -for libname in annotations-api catalina jasper-el jasper catalina-ha util-scan jni; do +for libname in annotations-api catalina jasper-el jasper catalina-ha; do %{__cp} -a %{name}-$libname.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-$libname.pom %add_maven_depmap JPP.%{name}-$libname.pom %{name}/$libname.jar -f "tomcat-lib" done +# tomcat-util-scan +%{__cp} -a %{name}-util-scan.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-util-scan.pom +%add_maven_depmap JPP.%{name}-util-scan.pom %{name}/%{name}-util-scan.jar -f "tomcat-lib" + +# tomcat-jni +%{__cp} -a %{name}-jni.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-jni.pom +%add_maven_depmap JPP.%{name}-jni.pom %{name}/%{name}-jni.jar -f "tomcat-lib" + # servlet-api jsp-api and el-api are not in tomcat subdir, since they are widely re-used elsewhere %{__cp} -a tomcat-jsp-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-jsp-api.pom %add_maven_depmap JPP-tomcat-jsp-api.pom tomcat-jsp-api.jar -f "tomcat-jsp-api" -a "org.eclipse.jetty.orbit:javax.servlet.jsp" @@ -678,6 +686,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Tue Jun 09 2015 Michal Srb - 1:8.0.20-2 +- Fix metadata for org.apache.tomcat:{tomcat-jni,tomcat-util-scan} + * Thu Mar 5 2015 Alexander Kurtakov 1:8.0.18-5 - Rebuild against tomcat-taglibs-standard. From a599bc57f39e7724aef4ec50780b552f473db8a6 Mon Sep 17 00:00:00 2001 From: Alexander Kurtakov Date: Thu, 18 Jun 2015 14:54:27 +0300 Subject: [PATCH 137/273] Drop jetty alias for servlet. XMvn ignores duplicate provides so better to drop the jetty alias. --- tomcat.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index e9e6882..491bed6 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -490,7 +490,7 @@ done # Generate a depmap fragment javax.servlet:servlet-api pointing to # tomcat-servlet-3.0-api for backwards compatibility # also provide jetty depmap (originally in jetty package, but it's cleaner to have it here -%add_maven_depmap JPP-tomcat-servlet-api.pom tomcat-servlet-api.jar -f "tomcat-servlet-api" -a "org.mortbay.jetty:servlet-api,org.eclipse.jetty.orbit:javax.servlet" +%add_maven_depmap JPP-tomcat-servlet-api.pom tomcat-servlet-api.jar -f "tomcat-servlet-api" # replace temporary copy with link %{__ln_s} -f $(abs2rel %{bindir}/tomcat-juli.jar %{libdir}) ${RPM_BUILD_ROOT}%{libdir}/ @@ -686,6 +686,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Thu Jun 18 2015 Alexander Kurtakov 1:8.0.20-3 +- Drop jetty alias for servlet. + * Tue Jun 09 2015 Michal Srb - 1:8.0.20-2 - Fix metadata for org.apache.tomcat:{tomcat-jni,tomcat-util-scan} From b2dda770528f619f0dd07b78b756f5546a5150c1 Mon Sep 17 00:00:00 2001 From: Alexander Kurtakov Date: Thu, 18 Jun 2015 15:28:42 +0300 Subject: [PATCH 138/273] Update to 8.0.23. --- sources | 2 +- tomcat.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 86d2311..36d85f8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6006e1de147f2e71668fba49238fdd8a apache-tomcat-8.0.20-src.tar.gz +f357c13b1e45cef40627ca995c0796e6 apache-tomcat-8.0.23-src.tar.gz diff --git a/tomcat.spec b/tomcat.spec index 491bed6..bb5ccd9 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.3 %global major_version 8 %global minor_version 0 -%global micro_version 20 +%global micro_version 23 %global packdname apache-tomcat-%{version}-src %global servletspec 3.1 %global elspec 3.0 @@ -54,7 +54,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 3%{?dist} +Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -686,6 +686,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Thu Jun 18 2015 Alexander Kurtakov 1:8.0.23-1 +- Update to 8.0.23. + * Thu Jun 18 2015 Alexander Kurtakov 1:8.0.20-3 - Drop jetty alias for servlet. From 6d77b875509642900905e50812d3e912c704b1d8 Mon Sep 17 00:00:00 2001 From: Alexander Kurtakov Date: Fri, 19 Jun 2015 19:36:40 +0300 Subject: [PATCH 139/273] Drop javax.el:el-api alias. XMvn ignores duplicated provides and glassfish-el-api provides it too but has fewer deps so is better match for default. --- tomcat.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index bb5ccd9..24daeeb 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -484,7 +484,7 @@ done %add_maven_depmap JPP-tomcat-jsp-api.pom tomcat-jsp-api.jar -f "tomcat-jsp-api" -a "org.eclipse.jetty.orbit:javax.servlet.jsp" %{__cp} -a tomcat-el-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-el-api.pom -%add_maven_depmap JPP-tomcat-el-api.pom tomcat-el-api.jar -f "tomcat-el-api" -a "org.eclipse.jetty.orbit:javax.el,javax.el:el-api" +%add_maven_depmap JPP-tomcat-el-api.pom tomcat-el-api.jar -f "tomcat-el-api" -a "org.eclipse.jetty.orbit:javax.el" %{__cp} -a tomcat-servlet-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-servlet-api.pom # Generate a depmap fragment javax.servlet:servlet-api pointing to @@ -686,6 +686,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Fri Jun 19 2015 Alexander Kurtakov 1:8.0.23-2 +- Drop javax.el:el-api alias. + * Thu Jun 18 2015 Alexander Kurtakov 1:8.0.23-1 - Update to 8.0.23. From 3a20f845cd0c7af7d5871ee7ddf3fc4e45d014da Mon Sep 17 00:00:00 2001 From: Alexander Kurtakov Date: Fri, 10 Jul 2015 11:07:03 +0300 Subject: [PATCH 140/273] Update to 8.0.24. --- sources | 2 +- tomcat.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 36d85f8..9e1f56d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f357c13b1e45cef40627ca995c0796e6 apache-tomcat-8.0.23-src.tar.gz +1184955015a2290252f0ec9495640b23 apache-tomcat-8.0.24-src.tar.gz diff --git a/tomcat.spec b/tomcat.spec index 24daeeb..b052f87 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.3 %global major_version 8 %global minor_version 0 -%global micro_version 23 +%global micro_version 24 %global packdname apache-tomcat-%{version}-src %global servletspec 3.1 %global elspec 3.0 @@ -686,6 +686,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Fri Jul 10 2015 Alexander Kurtakov 1:8.0.24-2 +- Update to 8.0.24. + * Fri Jun 19 2015 Alexander Kurtakov 1:8.0.23-2 - Drop javax.el:el-api alias. From 872c4690973ad6c3322b8694ed103bbd65f8d7e9 Mon Sep 17 00:00:00 2001 From: Alexander Kurtakov Date: Thu, 27 Aug 2015 10:57:42 +0300 Subject: [PATCH 141/273] Update to 8.0.26. --- jasper-OSGi-MANIFEST.MF | 22 +++++++++++----------- jasper-el-OSGi-MANIFEST.MF | 2 +- sources | 2 +- tomcat-api-OSGi-MANIFEST.MF | 4 ++-- tomcat-juli-OSGi-MANIFEST.MF | 6 +++--- tomcat.spec | 7 +++++-- 6 files changed, 23 insertions(+), 20 deletions(-) diff --git a/jasper-OSGi-MANIFEST.MF b/jasper-OSGi-MANIFEST.MF index 9a3d98a..ad34978 100644 --- a/jasper-OSGi-MANIFEST.MF +++ b/jasper-OSGi-MANIFEST.MF @@ -1,15 +1,15 @@ 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" +Export-Package: org.apache.jasper;version="8.0.26",org.apache.jasper.c + ompiler;version="8.0.26",org.apache.jasper.compiler.tagplugin;version + ="8.0.26",org.apache.jasper.resources;version="8.0.26",org.apache.jas + per.runtime;version="8.0.26",org.apache.jasper.security;version="7.0. + 19",org.apache.jasper.servlet;version="8.0.26",org.apache.jasper.tagp + lugins.jstl;version="8.0.26",org.apache.jasper.tagplugins.jstl.core;v + ersion="8.0.26",org.apache.jasper.util;version="8.0.26",org.apache.ja + sper.xmlparser;version="8.0.26" Bundle-Vendor: %bundleProvider Bundle-ClassPath: . -Bundle-Version: 7.0.21 +Bundle-Version: 8.0.26 Bundle-Localization: plugin Bundle-Name: %bundleName Bundle-ManifestVersion: 2 @@ -24,8 +24,8 @@ Import-Package: javax.servlet;version="[2.4.0, 3.0.0]",javax.servlet.h 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. + sax.helpers,org.apache.tomcat;version="8.0.26",org.apache.juli.loggin + g;version="8.0.26",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 diff --git a/jasper-el-OSGi-MANIFEST.MF b/jasper-el-OSGi-MANIFEST.MF index fd2879f..14e4282 100644 --- a/jasper-el-OSGi-MANIFEST.MF +++ b/jasper-el-OSGi-MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Export-Package: org.apache.el;version="7.0.21" Bundle-Vendor: %bundleProvider Bundle-ClassPath: . -Bundle-Version: 7.0.21 +Bundle-Version: 8.0.26 Bundle-Name: %bundleName Bundle-Localization: plugin Bundle-ManifestVersion: 2 diff --git a/sources b/sources index 9e1f56d..a36c73e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1184955015a2290252f0ec9495640b23 apache-tomcat-8.0.24-src.tar.gz +866415a62d9f5ba0422cad7d890ab35a apache-tomcat-8.0.26-src.tar.gz diff --git a/tomcat-api-OSGi-MANIFEST.MF b/tomcat-api-OSGi-MANIFEST.MF index 3522c72..85b12b8 100644 --- a/tomcat-api-OSGi-MANIFEST.MF +++ b/tomcat-api-OSGi-MANIFEST.MF @@ -1,8 +1,8 @@ Manifest-Version: 1.0 -Export-Package: org.apache.tomcat;version="7.0.21" +Export-Package: org.apache.tomcat;version="8.0.26" Bundle-Vendor: %bundleProvider Bundle-ClassPath: . -Bundle-Version: 7.0.21 +Bundle-Version: 8.0.26 Bundle-Name: %bundleName Bundle-Localization: plugin Bundle-ManifestVersion: 2 diff --git a/tomcat-juli-OSGi-MANIFEST.MF b/tomcat-juli-OSGi-MANIFEST.MF index cbb5674..b856d9f 100644 --- a/tomcat-juli-OSGi-MANIFEST.MF +++ b/tomcat-juli-OSGi-MANIFEST.MF @@ -1,9 +1,9 @@ Manifest-Version: 1.0 -Export-Package: org.apache.juli;version="7.0.21",org.apache.juli.loggi - ng;version="7.0.21" +Export-Package: org.apache.juli;version="8.0.26",org.apache.juli.loggi + ng;version="8.0.26" Bundle-Vendor: %bundleProvider Bundle-ClassPath: . -Bundle-Version: 7.0.21 +Bundle-Version: 8.0.26 Bundle-Name: %bundleName Bundle-Localization: plugin Bundle-ManifestVersion: 2 diff --git a/tomcat.spec b/tomcat.spec index b052f87..7a661c0 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.3 %global major_version 8 %global minor_version 0 -%global micro_version 24 +%global micro_version 26 %global packdname apache-tomcat-%{version}-src %global servletspec 3.1 %global elspec 3.0 @@ -54,7 +54,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 2%{?dist} +Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -686,6 +686,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Thu Aug 27 2015 Alexander Kurtakov 1:8.0.26-1 +- Update to 8.0.26. + * Fri Jul 10 2015 Alexander Kurtakov 1:8.0.24-2 - Update to 8.0.24. From dc47b586d3a7832ecc89ed77e8fc9542a8e571df Mon Sep 17 00:00:00 2001 From: Robert Scheck Date: Tue, 17 Nov 2015 23:42:26 +0100 Subject: [PATCH 142/273] CATALINA_OPTS are only read when SECURITY_MANAGER is true (#1147105) --- tomcat-server | 2 +- tomcat.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tomcat-server b/tomcat-server index 951b3ee..17ae385 100644 --- a/tomcat-server +++ b/tomcat-server @@ -13,8 +13,8 @@ OPTIONS="-Dcatalina.base=$CATALINA_BASE \ -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" if [ "$1" = "start" ] ; then + FLAGS="${FLAGS} $CATALINA_OPTS" if [ "${SECURITY_MANAGER}" = "true" ] ; then - FLAGS="${FLAGS} $CATALINA_OPTS" OPTIONS="${OPTIONS} \ -Djava.security.manager \ -Djava.security.policy==${CATALINA_BASE}/conf/catalina.policy" diff --git a/tomcat.spec b/tomcat.spec index 7a661c0..76dedd4 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -686,6 +686,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Tue Nov 11 2015 Robert Scheck 1:8.0.26-2 +- CATALINA_OPTS are only read when SECURITY_MANAGER is true (#1147105) + * Thu Aug 27 2015 Alexander Kurtakov 1:8.0.26-1 - Update to 8.0.26. From 6f36935bb4959ef0ff959a328a7758e27b2cb1ca Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 5 Feb 2016 01:46:06 +0000 Subject: [PATCH 143/273] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- tomcat.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tomcat.spec b/tomcat.spec index 76dedd4..1492829 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -686,6 +686,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Fri Feb 05 2016 Fedora Release Engineering - 1:8.0.26-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Tue Nov 11 2015 Robert Scheck 1:8.0.26-2 - CATALINA_OPTS are only read when SECURITY_MANAGER is true (#1147105) From 4f6d837abcc02bc1f0b946b8f7b7bd3a03c59e68 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Wed, 10 Feb 2016 15:59:41 -0500 Subject: [PATCH 144/273] Resolves: rhbz#1286800 Failed to start component due to wrong allowLinking=true in context.xml --- tomcat.spec | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index 1492829..1f06bfa 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -54,7 +54,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 3%{?dist} +Release: 4%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -447,8 +447,10 @@ popd # Allow linking for example webapp %{__mkdir_p} ${RPM_BUILD_ROOT}%{appdir}/examples/META-INF pushd ${RPM_BUILD_ROOT}%{appdir}/examples/META-INF -echo ''>context.xml -echo ''>>context.xml +echo '' > context.xml +echo '' >> context.xml +echo ' ' >> context.xml +echo '' >> context.xml popd pushd ${RPM_BUILD_ROOT}%{appdir}/examples/WEB-INF/lib @@ -686,6 +688,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Wed Feb 10 2016 Coty Sutherland 1:8.0.26-4 +- Resolves: rhbz#1286800 Failed to start component due to wrong allowLinking="true" in context.xml + * Fri Feb 05 2016 Fedora Release Engineering - 1:8.0.26-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From 669936a5b838c05597e4a4e2e5e19cdaa4f6705d Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 2 Feb 2016 11:36:08 -0500 Subject: [PATCH 145/273] Resolves: rhbz-1302718 Program /bin/nologin does not exist --- tomcat.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tomcat.spec b/tomcat.spec index 1f06bfa..5feb2b7 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -526,7 +526,7 @@ EOF # add the tomcat user and group %{_sbindir}/groupadd -g %{tcuid} -r tomcat 2>/dev/null || : %{_sbindir}/useradd -c "Apache Tomcat" -u %{tcuid} -g tomcat \ - -s /bin/nologin -r -d %{homedir} tomcat 2>/dev/null || : + -s /sbin/nologin -r -d %{homedir} tomcat 2>/dev/null || : %post # install but don't activate @@ -690,6 +690,7 @@ fi %changelog * Wed Feb 10 2016 Coty Sutherland 1:8.0.26-4 - Resolves: rhbz#1286800 Failed to start component due to wrong allowLinking="true" in context.xml +- Program /bin/nologin does not exist (#1302718) * Fri Feb 05 2016 Fedora Release Engineering - 1:8.0.26-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From 5067f18094d98e677226a93760ac26fc83cf8f74 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Thu, 4 Feb 2016 15:04:58 +0300 Subject: [PATCH 146/273] Resolves: rhbz-1121896 tomcat.service loads /etc/sysconfig/tomcat without shell expansion --- tomcat-8.0.conf | 52 +++++--------------------------------------- tomcat-8.0.service | 3 +-- tomcat-8.0.sysconfig | 49 +++++++++++++++++++++++++++++++++++------ 3 files changed, 49 insertions(+), 55 deletions(-) diff --git a/tomcat-8.0.conf b/tomcat-8.0.conf index 03119b7..bd141e8 100644 --- a/tomcat-8.0.conf +++ b/tomcat-8.0.conf @@ -1,48 +1,8 @@ -# System-wide configuration file for tomcat services -# This will be loaded by systemd as an environment file, -# so please keep the syntax. +# System-wide configuration file for tomcat services. # -# There are 2 "classes" of startup behavior in this package. -# The old one, the default service named tomcat.service. -# The new named instances are called tomcat@instance.service. +# Use this file to change default values for all tomcat services. Change the +# service specific ones to affect only one service. For tomcat.service it is +# /etc/sysconfig/tomcat. For tomcat@instance it is /etc/sysconfig/tomcat@instance. # -# Use this file to change default values for all services. -# Change the service specific ones to affect only one service. -# For tomcat.service it's /etc/sysconfig/tomcat, for -# tomcat@instance it's /etc/sysconfig/tomcat@instance. - -# This variable is used to figure out if config is loaded or not. -TOMCAT_CFG_LOADED="1" - -# In new-style instances, if CATALINA_BASE isn't specified, it will -# be constructed by joining TOMCATS_BASE and NAME. -TOMCATS_BASE="/var/lib/tomcats/" - -# Where your java installation lives -JAVA_HOME="/usr/lib/jvm/jre" - -# Where your tomcat installation lives -CATALINA_HOME="@@@TCHOME@@@" - -# System-wide tmp -CATALINA_TMPDIR="/var/cache/tomcat/temp" - -# 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=/usr/lib" - -# 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 -# TODO(stingray): does nothing, fix. -# SHUTDOWN_WAIT="30" - -# If you wish to further customize your tomcat environment, -# put your own definitions here -# (i.e. LD_LIBRARY_PATH for some jdbc drivers) +# This will not be sourced by systemd as an environment file. Feel free to add +# your overrides here. Shell invocations will work. diff --git a/tomcat-8.0.service b/tomcat-8.0.service index 103d464..157e7e1 100644 --- a/tomcat-8.0.service +++ b/tomcat-8.0.service @@ -9,9 +9,8 @@ After=syslog.target network.target [Service] Type=simple -EnvironmentFile=/etc/tomcat/tomcat.conf Environment="NAME=" -EnvironmentFile=-/etc/sysconfig/tomcat +EnvironmentFile=/etc/sysconfig/tomcat ExecStart=/usr/libexec/tomcat/server start ExecStop=/usr/libexec/tomcat/server stop SuccessExitStatus=143 diff --git a/tomcat-8.0.sysconfig b/tomcat-8.0.sysconfig index 3117bf7..9e33f1f 100644 --- a/tomcat-8.0.sysconfig +++ b/tomcat-8.0.sysconfig @@ -1,11 +1,46 @@ -# Service-specific configuration file for tomcat. This will be sourced by -# systemd for the default service (tomcat.service) +# Service-specific configuration file for tomcat services. This will be sourced by +# systemd for the default service (tomcat.service). +# # If you want to customize named instance, make a similar file # and name it tomcat@instancename. +# +# This will be loaded by systemd as an environment file, so please keep +# the syntax. If you need to use shell expansion, configure the necessary +# variables in /etc/tomcat/tomcat.conf. -# You will not need to set this, usually. For default service it equals -# CATALINA_HOME. For named service, it equals ${TOMCATS_BASE}${NAME} -#CATALINA_BASE="@@@TCHOME@@@" +# This variable is used to figure out if config is loaded or not. +# Default is empty to load /etc/tomcat/tomcat.conf for overrides. +#TOMCAT_CFG_LOADED="1" -# Please take a look at /etc/tomcat/tomcat.conf to have an idea what you -# can override. +# In new-style instances, if CATALINA_BASE isn't specified, it will +# be constructed by joining TOMCATS_BASE and NAME. +TOMCATS_BASE="/var/lib/tomcats/" + +# Where your java installation lives +JAVA_HOME="/usr/lib/jvm/jre" + +# Where your tomcat installation lives +CATALINA_HOME="@@@TCHOME@@@" + +# System-wide tmp +CATALINA_TMPDIR="/var/cache/tomcat/temp" + +# 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=/usr/lib" + +# 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 +# TODO(stingray): does nothing, fix. +# SHUTDOWN_WAIT="30" + +# If you wish to further customize your tomcat environment, +# put your own definitions here +# (i.e. LD_LIBRARY_PATH for some jdbc drivers) From 9d76b5346814066d02b7c6be89487775a18bd1c9 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Thu, 4 Feb 2016 16:13:40 +0300 Subject: [PATCH 147/273] Set TOMCAT_CFG_LOADED in tomcat.conf --- tomcat-8.0.conf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tomcat-8.0.conf b/tomcat-8.0.conf index bd141e8..4631d83 100644 --- a/tomcat-8.0.conf +++ b/tomcat-8.0.conf @@ -6,3 +6,9 @@ # # This will not be sourced by systemd as an environment file. Feel free to add # your overrides here. Shell invocations will work. +# + +# This variable is used to figure out if config is loaded or not. +# To prevent this file to be loaded multiple times. +TOMCAT_CFG_LOADED="1" + From 3bf9b4c925392dca01451971fd27c1aa4ecd8144 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Fri, 5 Feb 2016 12:20:13 +0300 Subject: [PATCH 148/273] Switch non-primary service files to sysconfig --- tomcat-8.0-jsvc.service | 2 +- tomcat-named.service | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tomcat-8.0-jsvc.service b/tomcat-8.0-jsvc.service index 8275796..413114b 100644 --- a/tomcat-8.0-jsvc.service +++ b/tomcat-8.0-jsvc.service @@ -12,7 +12,7 @@ After=syslog.target network.target [Service] Type=simple -EnvironmentFile=/etc/tomcat/tomcat.conf +EnvironmentFile=/etc/sysconfig/tomcat Environment="NAME=" "USE_JSVC=true" ExecStart=/usr/libexec/tomcat/server start ExecStop=/usr/libexec/tomcat/server stop diff --git a/tomcat-named.service b/tomcat-named.service index 9bbcb17..bb89293 100644 --- a/tomcat-named.service +++ b/tomcat-named.service @@ -12,7 +12,7 @@ After=syslog.target network.target [Service] Type=simple -EnvironmentFile=/etc/tomcat/tomcat.conf +EnvironmentFile=/etc/sysconfig/tomcat Environment="NAME=%I" EnvironmentFile=-/etc/sysconfig/tomcat@%I ExecStart=/usr/libexec/tomcat/server start From 7977e008b982e5fedaa47b3b56a55f6739745ee7 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Thu, 4 Feb 2016 18:04:14 +0300 Subject: [PATCH 149/273] Updated to 8.0.32 - Remove log4j support. It has never been working actually. See rhbz#1236297 --- sources | 2 +- tomcat.spec | 33 +++++++++++---------------------- 2 files changed, 12 insertions(+), 23 deletions(-) diff --git a/sources b/sources index a36c73e..c2a102c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -866415a62d9f5ba0422cad7d890ab35a apache-tomcat-8.0.26-src.tar.gz +f8a1a0f811f6ffe0a4ccc1132c442d8b apache-tomcat-8.0.32-src.tar.gz diff --git a/tomcat.spec b/tomcat.spec index 5feb2b7..5a75a32 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.3 %global major_version 8 %global minor_version 0 -%global micro_version 26 +%global micro_version 32 %global packdname apache-tomcat-%{version}-src %global servletspec 3.1 %global elspec 3.0 @@ -54,7 +54,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 4%{?dist} +Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -69,7 +69,6 @@ Source6: %{name}-%{major_version}.%{minor_version}-digest.script Source7: %{name}-%{major_version}.%{minor_version}-tool-wrapper.script Source8: servlet-api-OSGi-MANIFEST.MF Source9: jsp-api-OSGi-MANIFEST.MF -Source10: %{name}-%{major_version}.%{minor_version}-log4j.properties Source11: %{name}-%{major_version}.%{minor_version}.service Source12: el-api-OSGi-MANIFEST.MF Source13: jasper-el-OSGi-MANIFEST.MF @@ -98,7 +97,6 @@ BuildRequires: tomcat-taglibs-standard BuildRequires: java-devel >= 1:1.6.0 BuildRequires: jpackage-utils >= 0:1.7.0 BuildRequires: junit -BuildRequires: log4j BuildRequires: geronimo-jaxrpc BuildRequires: wsdl4j BuildRequires: systemd-units @@ -118,6 +116,9 @@ Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units +# added after log4j sub-package was removed +Provides: %{name}-log4j = %{epoch}:%{version}-%{release} + %description Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServer Pages technologies. @@ -176,14 +177,6 @@ Requires(postun): chkconfig %description jsp-%{jspspec}-api Apache Tomcat JSP API implementation classes. -%package log4j -Group: Applications/Internet -Summary: Log4j support for Apache Tomcat -Requires: log4j - -%description log4j -Log4j support for Apache Tomcat - %package lib Group: Development/Libraries Summary: Libraries needed to run the Tomcat Web container @@ -344,7 +337,6 @@ zip -u output/build/bin/tomcat-juli.jar META-INF/MANIFEST.MF # First copy supporting libs to tomcat lib pushd output/build %{__cp} -a bin/*.{jar,xml} ${RPM_BUILD_ROOT}%{bindir} - %{__cp} %{SOURCE10} conf/log4j.properties %{__cp} -a conf/*.{policy,properties,xml} ${RPM_BUILD_ROOT}%{confdir} %{__cp} -a lib/*.jar ${RPM_BUILD_ROOT}%{libdir} %{__cp} -a webapps/* ${RPM_BUILD_ROOT}%{appdir} @@ -420,7 +412,6 @@ pushd ${RPM_BUILD_ROOT}%{libdir} %{__ln_s} $(build-classpath apache-commons-collections) commons-collections.jar %{__ln_s} $(build-classpath apache-commons-dbcp) commons-dbcp.jar %{__ln_s} $(build-classpath apache-commons-pool) commons-pool.jar - %{__ln_s} $(build-classpath log4j) log4j.jar %{__ln_s} $(build-classpath ecj) jasper-jdt.jar # Temporary copy the juli jar here from /usr/share/java/tomcat (for maven depmap) @@ -623,8 +614,6 @@ fi %{homedir}/logs %{homedir}/conf -%exclude %{confdir}/log4j.properties - %files admin-webapps %defattr(0664,root,tomcat,0755) %{appdir}/host-manager @@ -642,11 +631,6 @@ fi %defattr(-,root,root,-) %{_javadir}/%{name}-jsp-%{jspspec}*.jar -%files log4j -%defattr(0664,root,tomcat,0755) -%config(noreplace) %{confdir}/log4j.properties -%{libdir}/log4j.jar - %files lib -f output/dist/src/res/maven/.mfiles-tomcat-lib %defattr(-,root,root,-) %{libdir} @@ -664,7 +648,6 @@ fi %{_mavenpomdir}/JPP.%{name}-tomcat-jdbc.pom %{_datadir}/maven-metadata/tomcat.xml %exclude %{libdir}/%{name}-el-%{elspec}-api.jar -%exclude %{libdir}/log4j.jar %files servlet-%{servletspec}-api -f output/dist/src/res/maven/.mfiles-tomcat-servlet-api %defattr(-,root,root,-) @@ -688,6 +671,12 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +<<<<<<< HEAD +* Thu Feb 11 2016 Ivan Afonichev - 1:8.0.32-1 +- Updated to 8.0.32 +- Remove log4j support. It has never been working actually. See rhbz#1236297 +- Move shipped config to /etc/sysconfig/tomcat. /etc/tomcat/tomcat.conf can now be used to override it with shell expansion, resolves rhbz#1293636 + * Wed Feb 10 2016 Coty Sutherland 1:8.0.26-4 - Resolves: rhbz#1286800 Failed to start component due to wrong allowLinking="true" in context.xml - Program /bin/nologin does not exist (#1302718) From 65e6257e5007c349f9c1ca2ad1fca65c22177497 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Sun, 14 Feb 2016 01:44:02 +0300 Subject: [PATCH 150/273] Add Recommends: tomcat-native --- tomcat.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tomcat.spec b/tomcat.spec index 5a75a32..97e41bd 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -36,6 +36,9 @@ %global servletspec 3.1 %global elspec 3.0 %global tcuid 91 +#Recommended version is specified in java/org/apache/catalina/core/AprLifecycleListener.java +%global native_version 1.1.33 + # FHS 2.3 compliant tree structure - http://www.pathname.com/fhs/2.3/ %global basedir %{_var}/lib/%{name} @@ -109,6 +112,7 @@ Requires: java-headless >= 1:1.6.0 Requires: jpackage-utils Requires: procps Requires: %{name}-lib = %{epoch}:%{version}-%{release} +Recommends: tomcat-native >= %{native_version} Requires(pre): shadow-utils Requires(post): chkconfig Requires(preun): chkconfig @@ -671,11 +675,11 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog -<<<<<<< HEAD * Thu Feb 11 2016 Ivan Afonichev - 1:8.0.32-1 - Updated to 8.0.32 - Remove log4j support. It has never been working actually. See rhbz#1236297 - Move shipped config to /etc/sysconfig/tomcat. /etc/tomcat/tomcat.conf can now be used to override it with shell expansion, resolves rhbz#1293636 +- Recommend tomcat-native, resolves: rhbz#1243132 * Wed Feb 10 2016 Coty Sutherland 1:8.0.26-4 - Resolves: rhbz#1286800 Failed to start component due to wrong allowLinking="true" in context.xml From d6fc5df332b33b39a8a32d3e566657ca307564e3 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Sun, 21 Feb 2016 23:49:52 +0300 Subject: [PATCH 151/273] [rhbz#1308685] Fix symlinks from $CATALINA_HOME/lib perspective --- tomcat.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index 97e41bd..fadbc5c 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -57,7 +57,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -410,9 +410,9 @@ popd pushd ${RPM_BUILD_ROOT}%{libdir} # symlink JSP and servlet API jars - %{__ln_s} ../%{name}-jsp-%{jspspec}-api.jar . - %{__ln_s} ../%{name}-servlet-%{servletspec}-api.jar . - %{__ln_s} ../%{name}-el-%{elspec}-api.jar . + %{__ln_s} ../../java/%{name}-jsp-%{jspspec}-api.jar . + %{__ln_s} ../../java/%{name}-servlet-%{servletspec}-api.jar . + %{__ln_s} ../../java/%{name}-el-%{elspec}-api.jar . %{__ln_s} $(build-classpath apache-commons-collections) commons-collections.jar %{__ln_s} $(build-classpath apache-commons-dbcp) commons-dbcp.jar %{__ln_s} $(build-classpath apache-commons-pool) commons-pool.jar @@ -675,6 +675,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Sun Feb 21 2016 Ivan Afonichev - 1:8.0.32-3 +- Fix symlinks from $CATALINA_HOME/lib perspective, resolves: rhbz#1308685 + * Thu Feb 11 2016 Ivan Afonichev - 1:8.0.32-1 - Updated to 8.0.32 - Remove log4j support. It has never been working actually. See rhbz#1236297 From ef1b76e880ba0ef33687d2a89aeb1da9e71496be Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Sat, 27 Feb 2016 17:56:47 +0300 Subject: [PATCH 152/273] Fix non-service use and default datasource factory - Load sysconfig from tomcat.conf, resolves: rhbz#1311771, rhbz#1311905 - Set default javax.sql.DataSource factory to apache commons one, resolves rhbz#1214381 - Fix changelog --- tomcat-8.0.conf | 8 ++++++++ tomcat-8.0.sysconfig | 8 +++++--- tomcat.spec | 10 +++++++--- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/tomcat-8.0.conf b/tomcat-8.0.conf index 4631d83..ad6e668 100644 --- a/tomcat-8.0.conf +++ b/tomcat-8.0.conf @@ -12,3 +12,11 @@ # To prevent this file to be loaded multiple times. TOMCAT_CFG_LOADED="1" + +if [ -z "${TOMCAT_SYSCONF_LOADED}" ]; then + if [ -z "${TOMCAT_SYSCONF}" ]; then + TOMCAT_SYSCONF="/etc/sysconfig/tomcat" + fi + . $TOMCAT_SYSCONF +fi + diff --git a/tomcat-8.0.sysconfig b/tomcat-8.0.sysconfig index 9e33f1f..d918420 100644 --- a/tomcat-8.0.sysconfig +++ b/tomcat-8.0.sysconfig @@ -8,9 +8,8 @@ # the syntax. If you need to use shell expansion, configure the necessary # variables in /etc/tomcat/tomcat.conf. -# This variable is used to figure out if config is loaded or not. -# Default is empty to load /etc/tomcat/tomcat.conf for overrides. -#TOMCAT_CFG_LOADED="1" +# This variable is used to figure out if this config is loaded or not. +TOMCAT_SYSCONF_LOADED="1" # In new-style instances, if CATALINA_BASE isn't specified, it will # be constructed by joining TOMCATS_BASE and NAME. @@ -31,6 +30,9 @@ CATALINA_TMPDIR="/var/cache/tomcat/temp" # Use JAVA_OPTS to set java.library.path for libtcnative.so #JAVA_OPTS="-Djava.library.path=/usr/lib" +# Set default javax.sql.DataSource factory to apache commons one. See rhbz#1214381 +JAVA_OPTS="-Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory" + # You can change your tomcat locale here #LANG="en_US" diff --git a/tomcat.spec b/tomcat.spec index fadbc5c..1aa07f5 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -57,7 +57,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -675,7 +675,11 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog -* Sun Feb 21 2016 Ivan Afonichev - 1:8.0.32-3 +* Sat Feb 27 2016 Ivan Afonichev - 1:8.0.32-3 +- Load sysconfig from tomcat.conf, resolves: rhbz#1311771, rhbz#1311905 +- Set default javax.sql.DataSource factory to apache commons one, resolves rhbz#1214381 + +* Sun Feb 21 2016 Ivan Afonichev - 1:8.0.32-2 - Fix symlinks from $CATALINA_HOME/lib perspective, resolves: rhbz#1308685 * Thu Feb 11 2016 Ivan Afonichev - 1:8.0.32-1 @@ -691,7 +695,7 @@ fi * Fri Feb 05 2016 Fedora Release Engineering - 1:8.0.26-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild -* Tue Nov 11 2015 Robert Scheck 1:8.0.26-2 +* Wed Nov 11 2015 Robert Scheck 1:8.0.26-2 - CATALINA_OPTS are only read when SECURITY_MANAGER is true (#1147105) * Thu Aug 27 2015 Alexander Kurtakov 1:8.0.26-1 From e0ea77351d434ddde2f8ff80fea788d24cd8bc56 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Wed, 2 Mar 2016 19:40:56 +0300 Subject: [PATCH 153/273] Revert sysconfig migration --- tomcat-8.0-jsvc.service | 2 +- tomcat-8.0.conf | 57 +++++++++++++++++++++++++++++++---------- tomcat-8.0.service | 3 ++- tomcat-8.0.sysconfig | 51 +++++------------------------------- tomcat-named.service | 2 +- 5 files changed, 54 insertions(+), 61 deletions(-) diff --git a/tomcat-8.0-jsvc.service b/tomcat-8.0-jsvc.service index 413114b..8275796 100644 --- a/tomcat-8.0-jsvc.service +++ b/tomcat-8.0-jsvc.service @@ -12,7 +12,7 @@ After=syslog.target network.target [Service] Type=simple -EnvironmentFile=/etc/sysconfig/tomcat +EnvironmentFile=/etc/tomcat/tomcat.conf Environment="NAME=" "USE_JSVC=true" ExecStart=/usr/libexec/tomcat/server start ExecStop=/usr/libexec/tomcat/server stop diff --git a/tomcat-8.0.conf b/tomcat-8.0.conf index ad6e668..8550df7 100644 --- a/tomcat-8.0.conf +++ b/tomcat-8.0.conf @@ -1,22 +1,51 @@ -# System-wide configuration file for tomcat services. +# System-wide configuration file for tomcat services +# This will be loaded by systemd as an environment file, +# so please keep the syntax. # -# Use this file to change default values for all tomcat services. Change the -# service specific ones to affect only one service. For tomcat.service it is -# /etc/sysconfig/tomcat. For tomcat@instance it is /etc/sysconfig/tomcat@instance. -# -# This will not be sourced by systemd as an environment file. Feel free to add -# your overrides here. Shell invocations will work. +# There are 2 "classes" of startup behavior in this package. +# The old one, the default service named tomcat.service. +# The new named instances are called tomcat@instance.service. # +# Use this file to change default values for all services. +# Change the service specific ones to affect only one service. +# For tomcat.service it's /etc/sysconfig/tomcat, for +# tomcat@instance it's /etc/sysconfig/tomcat@instance. # This variable is used to figure out if config is loaded or not. -# To prevent this file to be loaded multiple times. TOMCAT_CFG_LOADED="1" +# In new-style instances, if CATALINA_BASE isn't specified, it will +# be constructed by joining TOMCATS_BASE and NAME. +TOMCATS_BASE="/var/lib/tomcats/" -if [ -z "${TOMCAT_SYSCONF_LOADED}" ]; then - if [ -z "${TOMCAT_SYSCONF}" ]; then - TOMCAT_SYSCONF="/etc/sysconfig/tomcat" - fi - . $TOMCAT_SYSCONF -fi +# Where your java installation lives +JAVA_HOME="/usr/lib/jvm/jre" +# Where your tomcat installation lives +CATALINA_HOME="@@@TCHOME@@@" + +# System-wide tmp +CATALINA_TMPDIR="/var/cache/tomcat/temp" + +# 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=/usr/lib" + +# Set default javax.sql.DataSource factory to apache commons one. See rhbz#1214381 +JAVA_OPTS="-Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory" + +# 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 +# TODO(stingray): does nothing, fix. +# SHUTDOWN_WAIT="30" + +# If you wish to further customize your tomcat environment, +# put your own definitions here +# (i.e. LD_LIBRARY_PATH for some jdbc drivers) diff --git a/tomcat-8.0.service b/tomcat-8.0.service index 157e7e1..103d464 100644 --- a/tomcat-8.0.service +++ b/tomcat-8.0.service @@ -9,8 +9,9 @@ After=syslog.target network.target [Service] Type=simple +EnvironmentFile=/etc/tomcat/tomcat.conf Environment="NAME=" -EnvironmentFile=/etc/sysconfig/tomcat +EnvironmentFile=-/etc/sysconfig/tomcat ExecStart=/usr/libexec/tomcat/server start ExecStop=/usr/libexec/tomcat/server stop SuccessExitStatus=143 diff --git a/tomcat-8.0.sysconfig b/tomcat-8.0.sysconfig index d918420..3117bf7 100644 --- a/tomcat-8.0.sysconfig +++ b/tomcat-8.0.sysconfig @@ -1,48 +1,11 @@ -# Service-specific configuration file for tomcat services. This will be sourced by -# systemd for the default service (tomcat.service). -# +# Service-specific configuration file for tomcat. This will be sourced by +# systemd for the default service (tomcat.service) # If you want to customize named instance, make a similar file # and name it tomcat@instancename. -# -# This will be loaded by systemd as an environment file, so please keep -# the syntax. If you need to use shell expansion, configure the necessary -# variables in /etc/tomcat/tomcat.conf. -# This variable is used to figure out if this config is loaded or not. -TOMCAT_SYSCONF_LOADED="1" +# You will not need to set this, usually. For default service it equals +# CATALINA_HOME. For named service, it equals ${TOMCATS_BASE}${NAME} +#CATALINA_BASE="@@@TCHOME@@@" -# In new-style instances, if CATALINA_BASE isn't specified, it will -# be constructed by joining TOMCATS_BASE and NAME. -TOMCATS_BASE="/var/lib/tomcats/" - -# Where your java installation lives -JAVA_HOME="/usr/lib/jvm/jre" - -# Where your tomcat installation lives -CATALINA_HOME="@@@TCHOME@@@" - -# System-wide tmp -CATALINA_TMPDIR="/var/cache/tomcat/temp" - -# 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=/usr/lib" - -# Set default javax.sql.DataSource factory to apache commons one. See rhbz#1214381 -JAVA_OPTS="-Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory" - -# 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 -# TODO(stingray): does nothing, fix. -# SHUTDOWN_WAIT="30" - -# If you wish to further customize your tomcat environment, -# put your own definitions here -# (i.e. LD_LIBRARY_PATH for some jdbc drivers) +# Please take a look at /etc/tomcat/tomcat.conf to have an idea what you +# can override. diff --git a/tomcat-named.service b/tomcat-named.service index bb89293..9bbcb17 100644 --- a/tomcat-named.service +++ b/tomcat-named.service @@ -12,7 +12,7 @@ After=syslog.target network.target [Service] Type=simple -EnvironmentFile=/etc/sysconfig/tomcat +EnvironmentFile=/etc/tomcat/tomcat.conf Environment="NAME=%I" EnvironmentFile=-/etc/sysconfig/tomcat@%I ExecStart=/usr/libexec/tomcat/server start From 7d21a720d9dbbd55a2017283d8ee5dd75590fe19 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Wed, 2 Mar 2016 20:53:07 +0300 Subject: [PATCH 154/273] Add /etc/tomcat/conf.d/ with shell expansion support, resolves rhbz#1293636 --- tomcat-8.0.conf | 3 ++- tomcat-preamble | 8 ++++++++ tomcat.spec | 10 +++++++++- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/tomcat-8.0.conf b/tomcat-8.0.conf index 8550df7..3f43006 100644 --- a/tomcat-8.0.conf +++ b/tomcat-8.0.conf @@ -1,6 +1,7 @@ # System-wide configuration file for tomcat services # This will be loaded by systemd as an environment file, -# so please keep the syntax. +# so please keep the syntax. For shell expansion support +# place your custom files as /etc/tomcat/conf.d/*.conf # # There are 2 "classes" of startup behavior in this package. # The old one, the default service named tomcat.service. diff --git a/tomcat-preamble b/tomcat-preamble index 0079a8c..1271dca 100644 --- a/tomcat-preamble +++ b/tomcat-preamble @@ -11,6 +11,14 @@ if [ -z "${TOMCAT_CFG_LOADED}" ]; then . $TOMCAT_CFG fi +if [ -d "${TOMCAT_CONFD=/etc/tomcat/conf.d}" ]; then + for file in ${TOMCAT_CONFD}/*.conf ; do + if [ -f "$file" ] ; then + . "$file" + fi + done +fi + if [ -z "$CATALINA_BASE" ]; then if [ -n "$NAME" ]; then if [ -z "$TOMCATS_BASE" ]; then diff --git a/tomcat.spec b/tomcat.spec index 1aa07f5..3a8850e 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -57,7 +57,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 3%{?dist} +Release: 4%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -324,6 +324,8 @@ zip -u output/build/bin/tomcat-juli.jar META-INF/MANIFEST.MF %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{bindir} %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{confdir} %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{confdir}/Catalina/localhost +%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{confdir}/conf.d +/bin/echo "Place your custom *.conf files here. Shell expansion is supported." > ${RPM_BUILD_ROOT}%{confdir}/conf.d/README %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{libdir} %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{logdir} /bin/touch ${RPM_BUILD_ROOT}%{logdir}/catalina.out @@ -600,6 +602,8 @@ fi %attr(0775,root,tomcat) %dir %{appdir} %attr(0775,root,tomcat) %dir %{confdir}/Catalina %attr(0775,root,tomcat) %dir %{confdir}/Catalina/localhost +%attr(0775,root,tomcat) %dir %{confdir}/conf.d +%attr(0664,tomcat,tomcat) %{confdir}/conf.d/README %attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/%{name}.conf %attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/*.policy %attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/*.properties @@ -675,6 +679,10 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Wed Mar 2 2016 Ivan Afonichev - 1:8.0.32-4 +- Revert sysconfig migration changes, resolves: rhbz#1311771, rhbz#1311905 +- Add /etc/tomcat/conf.d/ with shell expansion support, resolves rhbz#1293636 + * Sat Feb 27 2016 Ivan Afonichev - 1:8.0.32-3 - Load sysconfig from tomcat.conf, resolves: rhbz#1311771, rhbz#1311905 - Set default javax.sql.DataSource factory to apache commons one, resolves rhbz#1214381 From 6bc593d2ccef648d0776aa8f4f52a0d225565f6b Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Thu, 4 Aug 2016 08:05:02 -0400 Subject: [PATCH 155/273] Resolves: rhbz#1364056 The command tomcat-digest doesn't work --- tomcat-8.0-digest.script | 2 +- tomcat.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tomcat-8.0-digest.script b/tomcat-8.0-digest.script index 2ff7e64..ce4aa0f 100644 --- a/tomcat-8.0-digest.script +++ b/tomcat-8.0-digest.script @@ -34,7 +34,7 @@ export CLASSPATH MAIN_CLASS="org.apache.catalina.startup.Tool" BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\"" BASE_OPTIONS="" -BASE_JARS="commons-daemon tomcat/catalina servlet" +BASE_JARS="commons-daemon tomcat/catalina servlet tomcat/tomcat-util tomcat/tomcat-coyote tomcat/tomcat-api tomcat/tomcat-util-scan" # Set parameters set_classpath $BASE_JARS diff --git a/tomcat.spec b/tomcat.spec index 3a8850e..ee606a8 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -57,7 +57,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 4%{?dist} +Release: 5%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -679,6 +679,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Thu Aug 04 2016 Coty Sutherland - 1:8.0.32-5 +- Resolves: rhbz#1364056 The command tomcat-digest doesn't work + * Wed Mar 2 2016 Ivan Afonichev - 1:8.0.32-4 - Revert sysconfig migration changes, resolves: rhbz#1311771, rhbz#1311905 - Add /etc/tomcat/conf.d/ with shell expansion support, resolves rhbz#1293636 From 43760819ea5808bea519c008cae0a1f1657c82f3 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Wed, 3 Aug 2016 16:12:06 -0400 Subject: [PATCH 156/273] Resolves: rhbz#1363884 The tomcat-tool-wrapper script is broken --- tomcat-8.0-tool-wrapper.script | 2 +- tomcat.spec | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tomcat-8.0-tool-wrapper.script b/tomcat-8.0-tool-wrapper.script index 2640ce2..949d46d 100644 --- a/tomcat-8.0-tool-wrapper.script +++ b/tomcat-8.0-tool-wrapper.script @@ -34,7 +34,7 @@ export CLASSPATH MAIN_CLASS="org.apache.catalina.startup.Tool" BASE_OPTIONS="" BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\"" -BASE_JARS="commons-daemon tomcat/catalina servlet" +BASE_JARS="commons-daemon tomcat/catalina servlet tomcat/tomcat-util tomcat/tomcat-coyote tomcat/tomcat-api tomcat/tomcat-util-scan" # Set parameters set_classpath $BASE_JARS diff --git a/tomcat.spec b/tomcat.spec index ee606a8..f429dc3 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -679,8 +679,9 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog -* Thu Aug 04 2016 Coty Sutherland - 1:8.0.32-5 +* Mon Aug 08 2016 Coty Sutherland - 1:8.0.32-5 - Resolves: rhbz#1364056 The command tomcat-digest doesn't work +- Resolves: rhbz#1363884 The tomcat-tool-wrapper script is broken * Wed Mar 2 2016 Ivan Afonichev - 1:8.0.32-4 - Revert sysconfig migration changes, resolves: rhbz#1311771, rhbz#1311905 From 50c91f3fe283a1b0f8744cd2541da3e45d736e98 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 1 Jul 2016 14:45:28 -0400 Subject: [PATCH 157/273] Resolves: rhbz#1349469 CVE-2016-3092 tomcat: Usage of vulnerable FileUpload package can result in denial of service (updates to 8.0.36) --- sources | 2 +- tomcat-8.0-tomcat-users-webapp.patch | 6 +++--- tomcat-8.0.36-CompilerOptionsV9.patch | 24 ++++++++++++++++++++++++ tomcat.spec | 10 +++++++--- 4 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 tomcat-8.0.36-CompilerOptionsV9.patch diff --git a/sources b/sources index c2a102c..525648d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f8a1a0f811f6ffe0a4ccc1132c442d8b apache-tomcat-8.0.32-src.tar.gz +be048e9ffa26957892933c9fa6bca0d8 apache-tomcat-8.0.36-src.tar.gz diff --git a/tomcat-8.0-tomcat-users-webapp.patch b/tomcat-8.0-tomcat-users-webapp.patch index 9f05e37..860c4cf 100644 --- a/tomcat-8.0-tomcat-users-webapp.patch +++ b/tomcat-8.0-tomcat-users-webapp.patch @@ -1,8 +1,8 @@ --- conf/tomcat-users.xml~ 2008-01-28 17:41:06.000000000 -0500 +++ conf/tomcat-users.xml 2008-03-07 19:40:07.000000000 -0500 @@ -23,4 +23,14 @@ - - + + --> + + @@ -13,5 +13,5 @@ + + + -+ ++ diff --git a/tomcat-8.0.36-CompilerOptionsV9.patch b/tomcat-8.0.36-CompilerOptionsV9.patch new file mode 100644 index 0000000..0b44236 --- /dev/null +++ b/tomcat-8.0.36-CompilerOptionsV9.patch @@ -0,0 +1,24 @@ +--- java/org/apache/jasper/compiler/JDTCompiler.java~ 2016-07-01 14:39:19.728255958 -0400 ++++ java/org/apache/jasper/compiler/JDTCompiler.java 2016-07-01 14:39:37.191311760 -0400 +@@ -312,9 +312,6 @@ + } else if(opt.equals("1.8")) { + settings.put(CompilerOptions.OPTION_Source, + CompilerOptions.VERSION_1_8); +- } else if(opt.equals("1.9")) { +- settings.put(CompilerOptions.OPTION_Source, +- CompilerOptions.VERSION_1_9); + } else { + log.warn("Unknown source VM " + opt + " ignored."); + settings.put(CompilerOptions.OPTION_Source, +@@ -361,11 +358,6 @@ + CompilerOptions.VERSION_1_8); + settings.put(CompilerOptions.OPTION_Compliance, + CompilerOptions.VERSION_1_8); +- } else if(opt.equals("1.9")) { +- settings.put(CompilerOptions.OPTION_TargetPlatform, +- CompilerOptions.VERSION_1_9); +- settings.put(CompilerOptions.OPTION_Compliance, +- CompilerOptions.VERSION_1_9); + } else { + log.warn("Unknown target VM " + opt + " ignored."); + settings.put(CompilerOptions.OPTION_TargetPlatform, diff --git a/tomcat.spec b/tomcat.spec index f429dc3..be5d53b 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.3 %global major_version 8 %global minor_version 0 -%global micro_version 32 +%global micro_version 36 %global packdname apache-tomcat-%{version}-src %global servletspec 3.1 %global elspec 3.0 @@ -57,7 +57,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 5%{?dist} +Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -86,6 +86,7 @@ Source32: tomcat-named.service Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch +Patch2: %{name}-8.0.36-CompilerOptionsV9.patch BuildArch: noarch @@ -237,6 +238,8 @@ find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name " %patch0 -p0 %patch1 -p0 +%patch2 -p0 + %{__ln_s} $(build-classpath tomcat-taglibs-standard/taglibs-standard-impl) webapps/examples/WEB-INF/lib/jstl.jar %{__ln_s} $(build-classpath tomcat-taglibs-standard/taglibs-standard-compat) webapps/examples/WEB-INF/lib/standard.jar @@ -679,7 +682,8 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog -* Mon Aug 08 2016 Coty Sutherland - 1:8.0.32-5 +* Mon Aug 08 2016 Coty Sutherland - 1:8.0.36-1 +- Resolves: rhbz#1349463 CVE-2016-3092 tomcat: Usage of vulnerable FileUpload package can result in denial of service (updates to 8.0.36) - Resolves: rhbz#1364056 The command tomcat-digest doesn't work - Resolves: rhbz#1363884 The tomcat-tool-wrapper script is broken From 5d682aa9e1abcec962dfb851bae942b59dbcfa86 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 17 Jun 2016 17:46:17 -0400 Subject: [PATCH 158/273] Resolves: rhbz#1347864 The systemd service unit does not allow tomcat to shut down gracefully --- tomcat-8.0.service | 1 - tomcat.spec | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/tomcat-8.0.service b/tomcat-8.0.service index 103d464..2b20aa0 100644 --- a/tomcat-8.0.service +++ b/tomcat-8.0.service @@ -13,7 +13,6 @@ EnvironmentFile=/etc/tomcat/tomcat.conf Environment="NAME=" EnvironmentFile=-/etc/sysconfig/tomcat ExecStart=/usr/libexec/tomcat/server start -ExecStop=/usr/libexec/tomcat/server stop SuccessExitStatus=143 User=tomcat Group=tomcat diff --git a/tomcat.spec b/tomcat.spec index be5d53b..e017fa1 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -686,6 +686,7 @@ fi - Resolves: rhbz#1349463 CVE-2016-3092 tomcat: Usage of vulnerable FileUpload package can result in denial of service (updates to 8.0.36) - Resolves: rhbz#1364056 The command tomcat-digest doesn't work - Resolves: rhbz#1363884 The tomcat-tool-wrapper script is broken +- Resolves: rhbz#1347864 The systemd service unit does not allow tomcat to shut down gracefully * Wed Mar 2 2016 Ivan Afonichev - 1:8.0.32-4 - Revert sysconfig migration changes, resolves: rhbz#1311771, rhbz#1311905 From 4dc51a6a96283e917df086e08e7b8bd6c562c6c9 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 1 Jul 2016 14:14:32 -0400 Subject: [PATCH 159/273] Resolves: rhbz#1347835 The security manager doesn't work correctly (JSPs cannot be compiled) --- tomcat-8.0-catalina-policy.patch | 39 ++++++++++++++++++++++++++++++++ tomcat.spec | 1 + 2 files changed, 40 insertions(+) create mode 100644 tomcat-8.0-catalina-policy.patch diff --git a/tomcat-8.0-catalina-policy.patch b/tomcat-8.0-catalina-policy.patch new file mode 100644 index 0000000..3694929 --- /dev/null +++ b/tomcat-8.0-catalina-policy.patch @@ -0,0 +1,39 @@ +--- conf/catalina.policy~ 2016-06-17 10:20:17.649171968 -0400 ++++ conf/catalina.policy 2016-06-17 10:23:35.358309244 -0400 +@@ -50,6 +50,36 @@ grant codeBase "file:${java.home}/lib/ex + permission java.security.AllPermission; + }; + ++// ========== RHEL SPECIFIC CODE PERMISSIONS ======================================= ++ ++// Allowing everything in /usr/share/java allows too many unknowns to be permitted ++// Specifying the individual jars that tomcat needs to function with the security manager ++// is the safest way forward. ++grant codeBase "file:/usr/share/java/tomcat-servlet-3.0-api.jar" { ++ permission java.security.AllPermission; ++}; ++grant codeBase "file:/usr/share/java/tomcat-jsp-2.2-api.jar" { ++ permission java.security.AllPermission; ++}; ++grant codeBase "file:/usr/share/java/tomcat-el-2.2-api.jar" { ++ permission java.security.AllPermission; ++}; ++grant codeBase "file:/usr/share/java/log4j.jar" { ++ permission java.security.AllPermission; ++}; ++grant codeBase "file:/usr/share/java/ecj.jar" { ++ permission java.security.AllPermission; ++}; ++grant codeBase "file:/usr/share/java/apache-commons-pool.jar" { ++ permission java.security.AllPermission; ++}; ++grant codeBase "file:/usr/share/java/apache-commons-dbcp.jar" { ++ permission java.security.AllPermission; ++}; ++grant codeBase "file:/usr/share/java/apache-commons-collections.jar" { ++ permission java.security.AllPermission; ++}; ++ + + // ========== CATALINA CODE PERMISSIONS ======================================= + diff --git a/tomcat.spec b/tomcat.spec index e017fa1..258a218 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -687,6 +687,7 @@ fi - Resolves: rhbz#1364056 The command tomcat-digest doesn't work - Resolves: rhbz#1363884 The tomcat-tool-wrapper script is broken - Resolves: rhbz#1347864 The systemd service unit does not allow tomcat to shut down gracefully +- Resolves: rhbz#1347835 The security manager doesn't work correctly (JSPs cannot be compiled) * Wed Mar 2 2016 Ivan Afonichev - 1:8.0.32-4 - Revert sysconfig migration changes, resolves: rhbz#1311771, rhbz#1311905 From b6ffa60f91cee48ba29d09503b0df3b85d6abc16 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 1 Jul 2016 13:58:16 -0400 Subject: [PATCH 160/273] Resolves: rhbz#1341853 rpm -V tomcat fails on /var/log/tomcat/catalina.out --- tomcat.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index 258a218..7a7dab8 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -596,8 +596,8 @@ fi %defattr(0664,tomcat,root,0770) %attr(0770,tomcat,root) %dir %{logdir} %defattr(0664,root,tomcat,0770) -%attr(0660,tomcat,tomcat) %{logdir}/catalina.out -%attr(0644,tomcat,tomcat) %{_localstatedir}/run/%{name}.pid +%attr(0660,tomcat,tomcat) %verify(not size md5 mtime) %{logdir}/catalina.out +%attr(0644,tomcat,tomcat) %verify(not size md5 mtime) %{_localstatedir}/run/%{name}.pid %attr(0770,root,tomcat) %dir %{cachedir} %attr(0770,root,tomcat) %dir %{tempdir} %attr(0770,root,tomcat) %dir %{workdir} @@ -688,6 +688,7 @@ fi - Resolves: rhbz#1363884 The tomcat-tool-wrapper script is broken - Resolves: rhbz#1347864 The systemd service unit does not allow tomcat to shut down gracefully - Resolves: rhbz#1347835 The security manager doesn't work correctly (JSPs cannot be compiled) +- Resolves: rhbz#1341853 rpm -V tomcat fails on /var/log/tomcat/catalina.out * Wed Mar 2 2016 Ivan Afonichev - 1:8.0.32-4 - Revert sysconfig migration changes, resolves: rhbz#1311771, rhbz#1311905 From ea624b137132b3935a082c79fb44672cdfb475df Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 1 Jul 2016 13:47:54 -0400 Subject: [PATCH 161/273] Resolves: rhbz#1341850 tomcat-jsvc.service has TOMCAT_USER value hard-coded --- tomcat-8.0-jsvc.service | 1 + tomcat-functions | 12 ++++++------ tomcat.spec | 1 + 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tomcat-8.0-jsvc.service b/tomcat-8.0-jsvc.service index 8275796..f480324 100644 --- a/tomcat-8.0-jsvc.service +++ b/tomcat-8.0-jsvc.service @@ -14,6 +14,7 @@ After=syslog.target network.target Type=simple EnvironmentFile=/etc/tomcat/tomcat.conf Environment="NAME=" "USE_JSVC=true" +EnvironmentFile=-/etc/sysconfig/tomcat ExecStart=/usr/libexec/tomcat/server start ExecStop=/usr/libexec/tomcat/server stop diff --git a/tomcat-functions b/tomcat-functions index 6f03951..ab08fa2 100644 --- a/tomcat-functions +++ b/tomcat-functions @@ -15,12 +15,12 @@ _save_function() { run_jsvc(){ if [ -x /usr/bin/jsvc ]; then - TOMCAT_USER="tomcat" - JSVC="/usr/bin/jsvc" - - JSVC_OPTS="-nodetach -pidfile /var/run/jsvc-tomcat${NAME}.pid -user ${TOMCAT_USER} -outfile ${CATALINA_BASE}/logs/catalina.out -errfile ${CATALINA_BASE}/logs/catalina.out" - if [ "$1" = "stop" ]; then - JSVC_OPTS="${JSVC_OPTS} -stop" + TOMCAT_USER="${TOMCAT_USER:-tomcat}" + JSVC="/usr/bin/jsvc" + + JSVC_OPTS="-nodetach -pidfile /var/run/jsvc-tomcat${NAME}.pid -user ${TOMCAT_USER} -outfile ${CATALINA_BASE}/logs/catalina.out -errfile ${CATALINA_BASE}/logs/catalina.out" + if [ "$1" = "stop" ]; then + JSVC_OPTS="${JSVC_OPTS} -stop" fi exec "${JSVC}" ${JSVC_OPTS} ${FLAGS} -classpath "${CLASSPATH}" ${OPTIONS} "${MAIN_CLASS}" "${@}" diff --git a/tomcat.spec b/tomcat.spec index 7a7dab8..2a3cdc1 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -689,6 +689,7 @@ fi - Resolves: rhbz#1347864 The systemd service unit does not allow tomcat to shut down gracefully - Resolves: rhbz#1347835 The security manager doesn't work correctly (JSPs cannot be compiled) - Resolves: rhbz#1341853 rpm -V tomcat fails on /var/log/tomcat/catalina.out +- Resolves: rhbz#1341850 tomcat-jsvc.service has TOMCAT_USER value hard-coded * Wed Mar 2 2016 Ivan Afonichev - 1:8.0.32-4 - Revert sysconfig migration changes, resolves: rhbz#1311771, rhbz#1311905 From 2b099c582bad923ddb1bc15d2102eb263e54e644 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Mon, 8 Aug 2016 16:38:52 -0400 Subject: [PATCH 162/273] Resolves: rhbz#1359737 Missing maven depmap for the following artifacts: org.apache.tomcat:tomcat-websocket, org.apache.tomcat:tomcat-websocket-api --- tomcat.spec | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tomcat.spec b/tomcat.spec index 2a3cdc1..1a4fa89 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -516,6 +516,14 @@ done %{__cp} -a tomcat-jdbc.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-jdbc.pom %add_maven_depmap JPP.%{name}-tomcat-jdbc.pom %{name}/tomcat-jdbc.jar +# tomcat-websocket-api +%{__cp} -a tomcat-websocket-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-websocket-api.pom +%add_maven_depmap JPP.%{name}-websocket-api.pom %{name}/websocket-api.jar + +# tomcat-tomcat-websocket +%{__cp} -a tomcat-websocket.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-websocket.pom +%add_maven_depmap JPP.%{name}-tomcat-websocket.pom %{name}/tomcat-websocket.jar + mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/lib/tmpfiles.d cat > ${RPM_BUILD_ROOT}%{_prefix}/lib/tmpfiles.d/%{name}.conf < - 1:8.0.32-4 - Revert sysconfig migration changes, resolves: rhbz#1311771, rhbz#1311905 From d64bf2e904e2fd0484832ccda3f1e621b4730d48 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Mon, 8 Aug 2016 17:34:21 -0400 Subject: [PATCH 163/273] Resolves: asfbz#59960 Building javadocs with java8 fails --- tomcat-8.0.36-asfbz-59960.patch | 13 +++++++++++++ tomcat.spec | 3 +++ 2 files changed, 16 insertions(+) create mode 100644 tomcat-8.0.36-asfbz-59960.patch diff --git a/tomcat-8.0.36-asfbz-59960.patch b/tomcat-8.0.36-asfbz-59960.patch new file mode 100644 index 0000000..20de181 --- /dev/null +++ b/tomcat-8.0.36-asfbz-59960.patch @@ -0,0 +1,13 @@ +Index: java/org/apache/catalina/tribes/group/interceptors/MessageDispatch15Interceptor.java +=================================================================== +--- java/org/apache/catalina/tribes/group/interceptors/MessageDispatch15Interceptor.java (revision 1755541) ++++ java/org/apache/catalina/tribes/group/interceptors/MessageDispatch15Interceptor.java (working copy) +@@ -18,7 +18,7 @@ + + /** + * @deprecated Originally provided an optional implementation that used Java 5+ +- * features. Now the minimum Java version is >=5, those features ++ * features. Now the minimum Java version is >=5, those features + * have been added to {@link MessageDispatchInterceptor} which + * should be used instead. This class will be removed in Tomcat + * 8.5.x onwards. diff --git a/tomcat.spec b/tomcat.spec index 1a4fa89..6f162cb 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -87,6 +87,7 @@ Source32: tomcat-named.service Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch Patch2: %{name}-8.0.36-CompilerOptionsV9.patch +Patch3: %{name}-8.0.36-asfbz-59960.patch BuildArch: noarch @@ -239,6 +240,7 @@ find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name " %patch0 -p0 %patch1 -p0 %patch2 -p0 +%patch3 -p0 %{__ln_s} $(build-classpath tomcat-taglibs-standard/taglibs-standard-impl) webapps/examples/WEB-INF/lib/jstl.jar %{__ln_s} $(build-classpath tomcat-taglibs-standard/taglibs-standard-compat) webapps/examples/WEB-INF/lib/standard.jar @@ -701,6 +703,7 @@ fi - Resolves: rhbz#1341853 rpm -V tomcat fails on /var/log/tomcat/catalina.out - Resolves: rhbz#1341850 tomcat-jsvc.service has TOMCAT_USER value hard-coded - Resolves: rhbz#1359737 Missing maven depmap for the following artifacts: org.apache.tomcat:tomcat-websocket, org.apache.tomcat:tomcat-websocket-api +- Resolves: asfbz#59960 Building javadocs with java8 fails * Wed Mar 2 2016 Ivan Afonichev - 1:8.0.32-4 - Revert sysconfig migration changes, resolves: rhbz#1311771, rhbz#1311905 From d5efee4acc4063fefe6e1152d9ae561252e5080d Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Thu, 11 Aug 2016 14:05:18 -0400 Subject: [PATCH 164/273] Related: rhbz#1349469 Correct typo in changelog entry --- tomcat.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index 6f162cb..c0dfcd3 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -57,7 +57,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -694,8 +694,11 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Thu Aug 11 2016 Coty Sutherland - 1:8.0.36-2 +- Related: rhbz#1349469 Correct typo in changelog entry + * Mon Aug 08 2016 Coty Sutherland - 1:8.0.36-1 -- Resolves: rhbz#1349463 CVE-2016-3092 tomcat: Usage of vulnerable FileUpload package can result in denial of service (updates to 8.0.36) +- Resolves: rhbz#1349469 CVE-2016-3092 tomcat: Usage of vulnerable FileUpload package can result in denial of service (updates to 8.0.36) - Resolves: rhbz#1364056 The command tomcat-digest doesn't work - Resolves: rhbz#1363884 The tomcat-tool-wrapper script is broken - Resolves: rhbz#1347864 The systemd service unit does not allow tomcat to shut down gracefully From fe6d560133c35f3e7fcf1ca0a55ff1a4f13cbe0d Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 13 Sep 2016 13:03:04 -0400 Subject: [PATCH 165/273] Resolves: rhbz#1375581 CVE-2016-5388 CGI sets environmental variable based on user supplied Proxy request header --- sources | 2 +- tomcat-8.0.36-asfbz-59960.patch | 13 ------------- tomcat-8.0.37-javadoc-fix.patch | 13 +++++++++++++ tomcat.spec | 10 +++++++--- 4 files changed, 21 insertions(+), 17 deletions(-) delete mode 100644 tomcat-8.0.36-asfbz-59960.patch create mode 100644 tomcat-8.0.37-javadoc-fix.patch diff --git a/sources b/sources index 525648d..739ef6e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -be048e9ffa26957892933c9fa6bca0d8 apache-tomcat-8.0.36-src.tar.gz +8723324d35eed02a4aa979066d810d86 apache-tomcat-8.0.37-src.tar.gz diff --git a/tomcat-8.0.36-asfbz-59960.patch b/tomcat-8.0.36-asfbz-59960.patch deleted file mode 100644 index 20de181..0000000 --- a/tomcat-8.0.36-asfbz-59960.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: java/org/apache/catalina/tribes/group/interceptors/MessageDispatch15Interceptor.java -=================================================================== ---- java/org/apache/catalina/tribes/group/interceptors/MessageDispatch15Interceptor.java (revision 1755541) -+++ java/org/apache/catalina/tribes/group/interceptors/MessageDispatch15Interceptor.java (working copy) -@@ -18,7 +18,7 @@ - - /** - * @deprecated Originally provided an optional implementation that used Java 5+ -- * features. Now the minimum Java version is >=5, those features -+ * features. Now the minimum Java version is >=5, those features - * have been added to {@link MessageDispatchInterceptor} which - * should be used instead. This class will be removed in Tomcat - * 8.5.x onwards. diff --git a/tomcat-8.0.37-javadoc-fix.patch b/tomcat-8.0.37-javadoc-fix.patch new file mode 100644 index 0000000..502f373 --- /dev/null +++ b/tomcat-8.0.37-javadoc-fix.patch @@ -0,0 +1,13 @@ +Index: java/org/apache/catalina/servlets/CGIServlet.java +=================================================================== +--- java/org/apache/catalina/servlets/CGIServlet.java (revision 1759564) ++++ java/org/apache/catalina/servlets/CGIServlet.java (revision 1759565) +@@ -358,7 +358,7 @@ + * + * @exception IOException if a write operation exception occurs + * +- * @deprecated Use {@link #printServletEnvironment(HttpServletRequest). ++ * @deprecated Use {@link #printServletEnvironment(HttpServletRequest)}. + * This will be removed in Tomcat 8.5.X onwards + */ + @Deprecated diff --git a/tomcat.spec b/tomcat.spec index c0dfcd3..4c02fed 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.3 %global major_version 8 %global minor_version 0 -%global micro_version 36 +%global micro_version 37 %global packdname apache-tomcat-%{version}-src %global servletspec 3.1 %global elspec 3.0 @@ -57,7 +57,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 2%{?dist} +Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -87,7 +87,7 @@ Source32: tomcat-named.service Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch Patch2: %{name}-8.0.36-CompilerOptionsV9.patch -Patch3: %{name}-8.0.36-asfbz-59960.patch +Patch3: %{name}-8.0.37-javadoc-fix.patch BuildArch: noarch @@ -694,6 +694,10 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Tue Sep 13 2016 Coty Sutherland - 1:8.0.37-1 +- Rebase to 8.0.37 +- Resolves: rhbz#1375581 CVE-2016-5388 CGI sets environmental variable based on user supplied Proxy request header + * Thu Aug 11 2016 Coty Sutherland - 1:8.0.36-2 - Related: rhbz#1349469 Correct typo in changelog entry From 55c043f4292055fdd2694a1eca38cea80a0e0fde Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 13 Sep 2016 14:44:55 -0400 Subject: [PATCH 166/273] Resolves: rhbz#1370262 catalina.out is no longer in use in the main package, but still gets rotated --- tomcat.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index 4c02fed..8a42bd3 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -337,7 +337,6 @@ zip -u output/build/bin/tomcat-juli.jar META-INF/MANIFEST.MF %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{_localstatedir}/run %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{_localstatedir}/lib/tomcats /bin/touch ${RPM_BUILD_ROOT}%{_localstatedir}/run/%{name}.pid -/bin/echo "%{name}-%{major_version}.%{minor_version}.%{micro_version} RPM installed" >> ${RPM_BUILD_ROOT}%{logdir}/catalina.out %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{homedir} %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{tempdir} %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{workdir} @@ -599,14 +598,12 @@ fi %attr(0644,root,root) %{_libexecdir}/%{name}/functions %attr(0755,root,root) %{_libexecdir}/%{name}/preamble %attr(0755,root,root) %{_libexecdir}/%{name}/server -%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %attr(0755,root,tomcat) %dir %{basedir} %attr(0755,root,tomcat) %dir %{confdir} %defattr(0664,tomcat,root,0770) %attr(0770,tomcat,root) %dir %{logdir} %defattr(0664,root,tomcat,0770) -%attr(0660,tomcat,tomcat) %verify(not size md5 mtime) %{logdir}/catalina.out %attr(0644,tomcat,tomcat) %verify(not size md5 mtime) %{_localstatedir}/run/%{name}.pid %attr(0770,root,tomcat) %dir %{cachedir} %attr(0770,root,tomcat) %dir %{tempdir} @@ -692,11 +689,14 @@ fi %files jsvc %defattr(755,root,root,0755) %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} +%attr(0660,tomcat,tomcat) %verify(not size md5 mtime) %{logdir}/catalina.out %changelog * Tue Sep 13 2016 Coty Sutherland - 1:8.0.37-1 - Rebase to 8.0.37 - Resolves: rhbz#1375581 CVE-2016-5388 CGI sets environmental variable based on user supplied Proxy request header +- Resolves: rhbz#1370262 catalina.out is no longer in use in the main package, but still gets rotated * Thu Aug 11 2016 Coty Sutherland - 1:8.0.36-2 - Related: rhbz#1349469 Correct typo in changelog entry From ca41eb1168269e61f504942590b3eb74740b27cd Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Thu, 13 Oct 2016 05:00:29 -0400 Subject: [PATCH 167/273] Resolves: rhbz#1382310 CVE-2016-5425 tomcat: Local privilege escalation via systemd-tmpfiles service --- tomcat.spec | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index 8a42bd3..45e1e85 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -334,9 +334,7 @@ zip -u output/build/bin/tomcat-juli.jar META-INF/MANIFEST.MF %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{libdir} %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{logdir} /bin/touch ${RPM_BUILD_ROOT}%{logdir}/catalina.out -%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{_localstatedir}/run %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{_localstatedir}/lib/tomcats -/bin/touch ${RPM_BUILD_ROOT}%{_localstatedir}/run/%{name}.pid %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{homedir} %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{tempdir} %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{workdir} @@ -525,11 +523,6 @@ done %{__cp} -a tomcat-websocket.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-websocket.pom %add_maven_depmap JPP.%{name}-tomcat-websocket.pom %{name}/tomcat-websocket.jar -mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/lib/tmpfiles.d -cat > ${RPM_BUILD_ROOT}%{_prefix}/lib/tmpfiles.d/%{name}.conf < - 1:8.0.37-2 +- Resolves: rhbz#1382310 CVE-2016-5425 tomcat: Local privilege escalation via systemd-tmpfiles service + * Tue Sep 13 2016 Coty Sutherland - 1:8.0.37-1 - Rebase to 8.0.37 - Resolves: rhbz#1375581 CVE-2016-5388 CGI sets environmental variable based on user supplied Proxy request header From 6452f0b23bf74e80a66b58348f2998b812e620b4 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Sun, 23 Oct 2016 19:11:56 -0400 Subject: [PATCH 168/273] Resolves: rhbz#1383216 CVE-2016-6325 tomcat: tomcat writable config files allow privilege escalation --- tomcat.spec | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index 45e1e85..e31319e 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -591,28 +591,31 @@ fi %attr(0644,root,root) %{_libexecdir}/%{name}/functions %attr(0755,root,root) %{_libexecdir}/%{name}/preamble %attr(0755,root,root) %{_libexecdir}/%{name}/server -%config(noreplace) %{_sysconfdir}/sysconfig/%{name} +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %attr(0755,root,tomcat) %dir %{basedir} %attr(0755,root,tomcat) %dir %{confdir} + %defattr(0664,tomcat,root,0770) %attr(0770,tomcat,root) %dir %{logdir} + %defattr(0664,root,tomcat,0770) %attr(0770,root,tomcat) %dir %{cachedir} %attr(0770,root,tomcat) %dir %{tempdir} %attr(0770,root,tomcat) %dir %{workdir} -%defattr(0664,root,tomcat,0775) + +%defattr(0644,root,tomcat,0775) %attr(0775,root,tomcat) %dir %{appdir} %attr(0775,root,tomcat) %dir %{confdir}/Catalina %attr(0775,root,tomcat) %dir %{confdir}/Catalina/localhost -%attr(0775,root,tomcat) %dir %{confdir}/conf.d -%attr(0664,tomcat,tomcat) %{confdir}/conf.d/README -%attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/%{name}.conf -%attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/*.policy -%attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/*.properties -%attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/context.xml -%attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/server.xml -%attr(0660,tomcat,tomcat) %config(noreplace) %{confdir}/tomcat-users.xml -%attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/web.xml +%attr(0755,root,tomcat) %dir %{confdir}/conf.d +%{confdir}/conf.d/README +%config(noreplace) %{confdir}/%{name}.conf +%config(noreplace) %{confdir}/*.policy +%config(noreplace) %{confdir}/*.properties +%config(noreplace) %{confdir}/context.xml +%config(noreplace) %{confdir}/server.xml +%attr(0640,root,tomcat) %config(noreplace) %{confdir}/tomcat-users.xml +%config(noreplace) %{confdir}/web.xml %dir %{homedir} %{bindir}/bootstrap.jar %{bindir}/catalina-tasks.xml @@ -684,6 +687,9 @@ fi %attr(0660,tomcat,tomcat) %verify(not size md5 mtime) %{logdir}/catalina.out %changelog +* Sun Oct 23 2016 Coty Sutherland - 1:8.0.37-3 +- Resolves: rhbz#1383216 CVE-2016-6325 tomcat: tomcat writable config files allow privilege escalation + * Thu Oct 13 2016 Coty Sutherland - 1:8.0.37-2 - Resolves: rhbz#1382310 CVE-2016-5425 tomcat: Local privilege escalation via systemd-tmpfiles service From ca7279eaa68c1a059dc4aae4fbc5ebfba607c337 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Sun, 23 Oct 2016 19:33:16 -0400 Subject: [PATCH 169/273] I forgot to bump the release --- tomcat.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tomcat.spec b/tomcat.spec index e31319e..cb486ae 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -57,7 +57,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 3%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons From 387c0999f622e4c1c6ae587ffe900c6507b52c7a Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 25 Oct 2016 11:04:12 -0400 Subject: [PATCH 170/273] Update to 8.0.38 --- sources | 2 +- tomcat-8.0.37-javadoc-fix.patch | 13 ------------- tomcat.spec | 11 +++++------ 3 files changed, 6 insertions(+), 20 deletions(-) delete mode 100644 tomcat-8.0.37-javadoc-fix.patch diff --git a/sources b/sources index 739ef6e..4e45b2e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8723324d35eed02a4aa979066d810d86 apache-tomcat-8.0.37-src.tar.gz +0090279f9a78c17115b520e70cb7116e apache-tomcat-8.0.38-src.tar.gz diff --git a/tomcat-8.0.37-javadoc-fix.patch b/tomcat-8.0.37-javadoc-fix.patch deleted file mode 100644 index 502f373..0000000 --- a/tomcat-8.0.37-javadoc-fix.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: java/org/apache/catalina/servlets/CGIServlet.java -=================================================================== ---- java/org/apache/catalina/servlets/CGIServlet.java (revision 1759564) -+++ java/org/apache/catalina/servlets/CGIServlet.java (revision 1759565) -@@ -358,7 +358,7 @@ - * - * @exception IOException if a write operation exception occurs - * -- * @deprecated Use {@link #printServletEnvironment(HttpServletRequest). -+ * @deprecated Use {@link #printServletEnvironment(HttpServletRequest)}. - * This will be removed in Tomcat 8.5.X onwards - */ - @Deprecated diff --git a/tomcat.spec b/tomcat.spec index cb486ae..d3c9a5e 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.3 %global major_version 8 %global minor_version 0 -%global micro_version 37 +%global micro_version 38 %global packdname apache-tomcat-%{version}-src %global servletspec 3.1 %global elspec 3.0 @@ -57,7 +57,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 3%{?dist} +Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -87,7 +87,6 @@ Source32: tomcat-named.service Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch Patch2: %{name}-8.0.36-CompilerOptionsV9.patch -Patch3: %{name}-8.0.37-javadoc-fix.patch BuildArch: noarch @@ -240,7 +239,6 @@ find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name " %patch0 -p0 %patch1 -p0 %patch2 -p0 -%patch3 -p0 %{__ln_s} $(build-classpath tomcat-taglibs-standard/taglibs-standard-impl) webapps/examples/WEB-INF/lib/jstl.jar %{__ln_s} $(build-classpath tomcat-taglibs-standard/taglibs-standard-compat) webapps/examples/WEB-INF/lib/standard.jar @@ -687,10 +685,11 @@ fi %attr(0660,tomcat,tomcat) %verify(not size md5 mtime) %{logdir}/catalina.out %changelog +* Tue Oct 25 2016 Coty Sutherland - 1:8.0.38-1 +- Update to 8.0.38 + * Sun Oct 23 2016 Coty Sutherland - 1:8.0.37-3 - Resolves: rhbz#1383216 CVE-2016-6325 tomcat: tomcat writable config files allow privilege escalation - -* Thu Oct 13 2016 Coty Sutherland - 1:8.0.37-2 - Resolves: rhbz#1382310 CVE-2016-5425 tomcat: Local privilege escalation via systemd-tmpfiles service * Tue Sep 13 2016 Coty Sutherland - 1:8.0.37-1 From 71d81d1e1e89765bd488925d1670a080a16ab34d Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 29 Nov 2016 17:27:17 -0500 Subject: [PATCH 171/273] Resolves: rhbz#1397493 CVE-2016-6816 CVE-2016-6817 CVE-2016-8735 tomcat: various flaws Update to 8.0.39 --- sources | 2 +- tomcat.spec | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 4e45b2e..5a9dee3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0090279f9a78c17115b520e70cb7116e apache-tomcat-8.0.38-src.tar.gz +71cefedb0a9c7f70af6c866a1b322fca apache-tomcat-8.0.39-src.tar.gz diff --git a/tomcat.spec b/tomcat.spec index d3c9a5e..235b339 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.3 %global major_version 8 %global minor_version 0 -%global micro_version 38 +%global micro_version 39 %global packdname apache-tomcat-%{version}-src %global servletspec 3.1 %global elspec 3.0 @@ -685,6 +685,10 @@ fi %attr(0660,tomcat,tomcat) %verify(not size md5 mtime) %{logdir}/catalina.out %changelog +* Tue Nov 29 2016 Coty Sutherland - 1:8.0.39-1 +- Update to 8.0.39 +- Resolves: rhbz#1397493 CVE-2016-6816 CVE-2016-6817 CVE-2016-8735 tomcat: various flaws + * Tue Oct 25 2016 Coty Sutherland - 1:8.0.38-1 - Update to 8.0.38 From e0f6e3167b76f273393156bfdf8ffd2160c38a7b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 11 Feb 2017 16:07:14 +0000 Subject: [PATCH 172/273] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- tomcat.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tomcat.spec b/tomcat.spec index 235b339..68d2c9f 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -57,7 +57,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -685,6 +685,9 @@ fi %attr(0660,tomcat,tomcat) %verify(not size md5 mtime) %{logdir}/catalina.out %changelog +* Sat Feb 11 2017 Fedora Release Engineering - 1:8.0.39-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Tue Nov 29 2016 Coty Sutherland - 1:8.0.39-1 - Update to 8.0.39 - Resolves: rhbz#1397493 CVE-2016-6816 CVE-2016-6817 CVE-2016-8735 tomcat: various flaws From bcf38b1abed501b25c6e21aa667899dbafa8b5b3 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Thu, 16 Feb 2017 15:34:40 -0500 Subject: [PATCH 173/273] Resolves: rhbz#1403825 CVE-2016-8745 tomcat: information disclosure due to incorrect Processor sharing Update to 8.0.41 --- sources | 2 +- tomcat.spec | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 5a9dee3..36a5187 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -71cefedb0a9c7f70af6c866a1b322fca apache-tomcat-8.0.39-src.tar.gz +SHA512 (apache-tomcat-8.0.41-src.tar.gz) = 6d2d104be33f203a5c45e6d0d8a8631542830462da932f1d11eadfb9927ba82e3fa5245321197e610f55ed34622b50743cb3af4699c7cedfb91b9dd2b35f338d diff --git a/tomcat.spec b/tomcat.spec index 68d2c9f..8ce382d 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.3 %global major_version 8 %global minor_version 0 -%global micro_version 39 +%global micro_version 41 %global packdname apache-tomcat-%{version}-src %global servletspec 3.1 %global elspec 3.0 @@ -57,7 +57,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 2%{?dist} +Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -685,6 +685,10 @@ fi %attr(0660,tomcat,tomcat) %verify(not size md5 mtime) %{logdir}/catalina.out %changelog +* Thu Feb 16 2017 Coty Sutherland - 1:8.0.41-1 +- Update to 8.0.41 +- Resolves: rhbz#1403825 CVE-2016-8745 tomcat: information disclosure due to incorrect Processor sharing + * Sat Feb 11 2017 Fedora Release Engineering - 1:8.0.39-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From 0f6fb3909847999a3ad8fdada51d0c48eeed68d4 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 31 Mar 2017 09:28:51 -0400 Subject: [PATCH 174/273] Update to 8.0.42 --- sources | 2 +- tomcat.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 36a5187..81c0910 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (apache-tomcat-8.0.41-src.tar.gz) = 6d2d104be33f203a5c45e6d0d8a8631542830462da932f1d11eadfb9927ba82e3fa5245321197e610f55ed34622b50743cb3af4699c7cedfb91b9dd2b35f338d +SHA512 (apache-tomcat-8.0.42-src.tar.gz) = 973c04c1950caafc2221e0aa96e2b6d7ec5d7c7a90461208a97b81ca1631a223b1595c86def027186fbaf367605cfaa4a936ee7ce7860c01bf7a4f26399c4752 diff --git a/tomcat.spec b/tomcat.spec index 8ce382d..6ef99be 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.3 %global major_version 8 %global minor_version 0 -%global micro_version 41 +%global micro_version 42 %global packdname apache-tomcat-%{version}-src %global servletspec 3.1 %global elspec 3.0 @@ -685,6 +685,9 @@ fi %attr(0660,tomcat,tomcat) %verify(not size md5 mtime) %{logdir}/catalina.out %changelog +* Fri Mar 31 2017 Coty Sutherland - 1:8.0.42-1 +- Update to 8.0.42 + * Thu Feb 16 2017 Coty Sutherland - 1:8.0.41-1 - Update to 8.0.41 - Resolves: rhbz#1403825 CVE-2016-8745 tomcat: information disclosure due to incorrect Processor sharing From ed0c45ddd883d191b7dfbaf4612a84911dcaac9f Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 11 Apr 2017 09:03:00 -0400 Subject: [PATCH 175/273] Update to 8.0.43 --- sources | 2 +- tomcat.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 81c0910..e2b50ac 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (apache-tomcat-8.0.42-src.tar.gz) = 973c04c1950caafc2221e0aa96e2b6d7ec5d7c7a90461208a97b81ca1631a223b1595c86def027186fbaf367605cfaa4a936ee7ce7860c01bf7a4f26399c4752 +SHA512 (apache-tomcat-8.0.43-src.tar.gz) = aa15046ba3404c206b7983f42837d30debca69b18b85345d1376a853ad6e9fb5c0cbf42732f835779b10d39e2eae77f6d1688dadc5280b50236bf3432e251e9b diff --git a/tomcat.spec b/tomcat.spec index 6ef99be..5bee033 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.3 %global major_version 8 %global minor_version 0 -%global micro_version 42 +%global micro_version 43 %global packdname apache-tomcat-%{version}-src %global servletspec 3.1 %global elspec 3.0 @@ -685,6 +685,9 @@ fi %attr(0660,tomcat,tomcat) %verify(not size md5 mtime) %{logdir}/catalina.out %changelog +* Tue Apr 11 2017 Coty Sutherland - 1:8.0.43-1 +- Update to 8.0.43 + * Fri Mar 31 2017 Coty Sutherland - 1:8.0.42-1 - Update to 8.0.42 From 85038a7beb4525b114218a729f884033e9b4167e Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 9 Jun 2017 15:39:00 -0400 Subject: [PATCH 176/273] Resolves: rhbz#1459160 CVE-2017-5664 tomcat: Security constrained bypass in error page mechanism --- sources | 2 +- tomcat.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sources b/sources index e2b50ac..c8bb84d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (apache-tomcat-8.0.43-src.tar.gz) = aa15046ba3404c206b7983f42837d30debca69b18b85345d1376a853ad6e9fb5c0cbf42732f835779b10d39e2eae77f6d1688dadc5280b50236bf3432e251e9b +b9eccb2c956aabd2c319e91ce308971b apache-tomcat-8.0.44-src.tar.gz diff --git a/tomcat.spec b/tomcat.spec index 5bee033..169f6ec 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.3 %global major_version 8 %global minor_version 0 -%global micro_version 43 +%global micro_version 44 %global packdname apache-tomcat-%{version}-src %global servletspec 3.1 %global elspec 3.0 @@ -685,6 +685,9 @@ fi %attr(0660,tomcat,tomcat) %verify(not size md5 mtime) %{logdir}/catalina.out %changelog +* Fri Jun 09 2017 Coty Sutherland - 1:8.0.44-1 +- Resolves: rhbz#1459160 CVE-2017-5664 tomcat: Security constrained bypass in error page mechanism + * Tue Apr 11 2017 Coty Sutherland - 1:8.0.43-1 - Update to 8.0.43 From e1abf5cd6dee5174693babb2792b20a8c5d35d43 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 9 Jun 2017 15:46:39 -0400 Subject: [PATCH 177/273] Updated sources with rhpkg instead of fedpkg accidentally. Fixing that --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index c8bb84d..a673958 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b9eccb2c956aabd2c319e91ce308971b apache-tomcat-8.0.44-src.tar.gz +SHA512 (apache-tomcat-8.0.44-src.tar.gz) = e9b793aeeced1c4bf8e1eabc7717dd839b13cbb886a2e3144fdc37f5ed14b4a0bff2c893221a4b29ccd3270950c1ebb37977588f3743b195c4e33796fad47abe From 643d34de352e7fdea7c72d338c12bc9188c08556 Mon Sep 17 00:00:00 2001 From: Release Configuration Management Date: Mon, 12 Jun 2017 13:42:35 -0400 Subject: [PATCH 178/273] New branch setup --- .gitignore | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 From ac7bc260a5925796b09e4691dd0e61c2e1475704 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 27 Jul 2017 20:25:50 +0000 Subject: [PATCH 179/273] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- tomcat.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tomcat.spec b/tomcat.spec index 169f6ec..54581b7 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -57,7 +57,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -685,6 +685,9 @@ fi %attr(0660,tomcat,tomcat) %verify(not size md5 mtime) %{logdir}/catalina.out %changelog +* Thu Jul 27 2017 Fedora Release Engineering - 1:8.0.44-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Fri Jun 09 2017 Coty Sutherland - 1:8.0.44-1 - Resolves: rhbz#1459160 CVE-2017-5664 tomcat: Security constrained bypass in error page mechanism From 66a81e03cbd826f327062364eed53dd52de8b89f Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Sun, 20 Aug 2017 07:17:43 -0700 Subject: [PATCH 180/273] Updated sources with rhpkg instead of fedpkg accidentally. Fixing that fed_hash: e1abf5cd6dee5174693babb2792b20a8c5d35d43 --- .gitignore | 1 + add_parent_logger_getter.patch | 29 + el-api-OSGi-MANIFEST.MF | 13 + jasper-OSGi-MANIFEST.MF | 40 + jasper-el-OSGi-MANIFEST.MF | 13 + jsp-api-OSGi-MANIFEST.MF | 13 + servlet-api-OSGi-MANIFEST.MF | 17 + sources | 1 + tomcat-8.0-bootstrap-MANIFEST.MF.patch | 9 + tomcat-8.0-catalina-policy.patch | 39 + tomcat-8.0-digest.script | 45 ++ tomcat-8.0-jsvc.service | 22 + tomcat-8.0-log4j.properties | 11 + tomcat-8.0-tomcat-users-webapp.patch | 17 + tomcat-8.0-tool-wrapper.script | 45 ++ tomcat-8.0.36-CompilerOptionsV9.patch | 24 + tomcat-8.0.conf | 52 ++ tomcat-8.0.logrotate | 8 + tomcat-8.0.service | 22 + tomcat-8.0.sysconfig | 11 + tomcat-8.0.wrapper | 24 + tomcat-api-OSGi-MANIFEST.MF | 12 + tomcat-functions | 42 + tomcat-juli-OSGi-MANIFEST.MF | 13 + tomcat-named.service | 26 + tomcat-preamble | 52 ++ tomcat-server | 25 + tomcat.spec | 1026 ++++++++++++++++++++++++ 28 files changed, 1652 insertions(+) create mode 100644 add_parent_logger_getter.patch create mode 100644 el-api-OSGi-MANIFEST.MF create mode 100644 jasper-OSGi-MANIFEST.MF create mode 100644 jasper-el-OSGi-MANIFEST.MF create mode 100644 jsp-api-OSGi-MANIFEST.MF create mode 100644 servlet-api-OSGi-MANIFEST.MF create mode 100644 sources create mode 100644 tomcat-8.0-bootstrap-MANIFEST.MF.patch create mode 100644 tomcat-8.0-catalina-policy.patch create mode 100644 tomcat-8.0-digest.script create mode 100644 tomcat-8.0-jsvc.service create mode 100644 tomcat-8.0-log4j.properties create mode 100644 tomcat-8.0-tomcat-users-webapp.patch create mode 100644 tomcat-8.0-tool-wrapper.script create mode 100644 tomcat-8.0.36-CompilerOptionsV9.patch create mode 100644 tomcat-8.0.conf create mode 100644 tomcat-8.0.logrotate create mode 100644 tomcat-8.0.service create mode 100644 tomcat-8.0.sysconfig create mode 100644 tomcat-8.0.wrapper create mode 100644 tomcat-api-OSGi-MANIFEST.MF create mode 100644 tomcat-functions create mode 100644 tomcat-juli-OSGi-MANIFEST.MF create mode 100644 tomcat-named.service create mode 100644 tomcat-preamble create mode 100644 tomcat-server create mode 100644 tomcat.spec diff --git a/.gitignore b/.gitignore index e69de29..baf7889 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/apache-tomcat-8.0.44-src.tar.gz diff --git a/add_parent_logger_getter.patch b/add_parent_logger_getter.patch new file mode 100644 index 0000000..40b9268 --- /dev/null +++ b/add_parent_logger_getter.patch @@ -0,0 +1,29 @@ +--- modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java.sav 2012-01-17 13:55:44.000000000 +0400 ++++ modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java 2012-01-22 00:44:22.299789107 +0400 +@@ -19,9 +19,11 @@ package org.apache.tomcat.jdbc.pool; + import java.io.PrintWriter; + import java.sql.Connection; + import java.sql.SQLException; ++import java.sql.SQLFeatureNotSupportedException; + import java.util.Iterator; + import java.util.Properties; + import java.util.concurrent.Future; ++import java.util.logging.Logger; + + import javax.sql.XAConnection; + +@@ -534,6 +536,14 @@ public class DataSourceProxy implements + } + + /** ++ * no-op ++ * {@link javax.sql.DataSource#getParentLogger} ++ */ ++ public Logger getParentLogger() throws SQLFeatureNotSupportedException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ ++ /** + * no-op + * {@link javax.sql.DataSource#getLogWriter} + */ diff --git a/el-api-OSGi-MANIFEST.MF b/el-api-OSGi-MANIFEST.MF new file mode 100644 index 0000000..69b797f --- /dev/null +++ b/el-api-OSGi-MANIFEST.MF @@ -0,0 +1,13 @@ +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 + diff --git a/jasper-OSGi-MANIFEST.MF b/jasper-OSGi-MANIFEST.MF new file mode 100644 index 0000000..ad34978 --- /dev/null +++ b/jasper-OSGi-MANIFEST.MF @@ -0,0 +1,40 @@ +Manifest-Version: 1.0 +Export-Package: org.apache.jasper;version="8.0.26",org.apache.jasper.c + ompiler;version="8.0.26",org.apache.jasper.compiler.tagplugin;version + ="8.0.26",org.apache.jasper.resources;version="8.0.26",org.apache.jas + per.runtime;version="8.0.26",org.apache.jasper.security;version="7.0. + 19",org.apache.jasper.servlet;version="8.0.26",org.apache.jasper.tagp + lugins.jstl;version="8.0.26",org.apache.jasper.tagplugins.jstl.core;v + ersion="8.0.26",org.apache.jasper.util;version="8.0.26",org.apache.ja + sper.xmlparser;version="8.0.26" +Bundle-Vendor: %bundleProvider +Bundle-ClassPath: . +Bundle-Version: 8.0.26 +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="8.0.26",org.apache.juli.loggin + g;version="8.0.26",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 + diff --git a/jasper-el-OSGi-MANIFEST.MF b/jasper-el-OSGi-MANIFEST.MF new file mode 100644 index 0000000..14e4282 --- /dev/null +++ b/jasper-el-OSGi-MANIFEST.MF @@ -0,0 +1,13 @@ +Manifest-Version: 1.0 +Export-Package: org.apache.el;version="7.0.21" +Bundle-Vendor: %bundleProvider +Bundle-ClassPath: . +Bundle-Version: 8.0.26 +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 + diff --git a/jsp-api-OSGi-MANIFEST.MF b/jsp-api-OSGi-MANIFEST.MF new file mode 100644 index 0000000..62bc00d --- /dev/null +++ b/jsp-api-OSGi-MANIFEST.MF @@ -0,0 +1,13 @@ +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" diff --git a/servlet-api-OSGi-MANIFEST.MF b/servlet-api-OSGi-MANIFEST.MF new file mode 100644 index 0000000..3938935 --- /dev/null +++ b/servlet-api-OSGi-MANIFEST.MF @@ -0,0 +1,17 @@ +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" diff --git a/sources b/sources new file mode 100644 index 0000000..c8bb84d --- /dev/null +++ b/sources @@ -0,0 +1 @@ +b9eccb2c956aabd2c319e91ce308971b apache-tomcat-8.0.44-src.tar.gz diff --git a/tomcat-8.0-bootstrap-MANIFEST.MF.patch b/tomcat-8.0-bootstrap-MANIFEST.MF.patch new file mode 100644 index 0000000..e2ee93e --- /dev/null +++ b/tomcat-8.0-bootstrap-MANIFEST.MF.patch @@ -0,0 +1,9 @@ +--- res/META-INF/bootstrap.jar.manifest.orig 2010-04-06 10:11:09.000000000 -0600 ++++ res/META-INF/bootstrap.jar.manifest 2010-04-06 10:45:56.000000000 -0600 +@@ -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 diff --git a/tomcat-8.0-catalina-policy.patch b/tomcat-8.0-catalina-policy.patch new file mode 100644 index 0000000..3694929 --- /dev/null +++ b/tomcat-8.0-catalina-policy.patch @@ -0,0 +1,39 @@ +--- conf/catalina.policy~ 2016-06-17 10:20:17.649171968 -0400 ++++ conf/catalina.policy 2016-06-17 10:23:35.358309244 -0400 +@@ -50,6 +50,36 @@ grant codeBase "file:${java.home}/lib/ex + permission java.security.AllPermission; + }; + ++// ========== RHEL SPECIFIC CODE PERMISSIONS ======================================= ++ ++// Allowing everything in /usr/share/java allows too many unknowns to be permitted ++// Specifying the individual jars that tomcat needs to function with the security manager ++// is the safest way forward. ++grant codeBase "file:/usr/share/java/tomcat-servlet-3.0-api.jar" { ++ permission java.security.AllPermission; ++}; ++grant codeBase "file:/usr/share/java/tomcat-jsp-2.2-api.jar" { ++ permission java.security.AllPermission; ++}; ++grant codeBase "file:/usr/share/java/tomcat-el-2.2-api.jar" { ++ permission java.security.AllPermission; ++}; ++grant codeBase "file:/usr/share/java/log4j.jar" { ++ permission java.security.AllPermission; ++}; ++grant codeBase "file:/usr/share/java/ecj.jar" { ++ permission java.security.AllPermission; ++}; ++grant codeBase "file:/usr/share/java/apache-commons-pool.jar" { ++ permission java.security.AllPermission; ++}; ++grant codeBase "file:/usr/share/java/apache-commons-dbcp.jar" { ++ permission java.security.AllPermission; ++}; ++grant codeBase "file:/usr/share/java/apache-commons-collections.jar" { ++ permission java.security.AllPermission; ++}; ++ + + // ========== CATALINA CODE PERMISSIONS ======================================= + diff --git a/tomcat-8.0-digest.script b/tomcat-8.0-digest.script new file mode 100644 index 0000000..ce4aa0f --- /dev/null +++ b/tomcat-8.0-digest.script @@ -0,0 +1,45 @@ +#!/bin/sh +# +# tomcat-digest script +# JPackage Project + +# 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" +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 tomcat/tomcat-util tomcat/tomcat-coyote tomcat/tomcat-api tomcat/tomcat-util-scan" + +# Set parameters +set_classpath $BASE_JARS +set_flags $BASE_FLAGS +set_options $BASE_OPTIONS + +# Let's start +run -server org.apache.catalina.realm.RealmBase "$@" diff --git a/tomcat-8.0-jsvc.service b/tomcat-8.0-jsvc.service new file mode 100644 index 0000000..f480324 --- /dev/null +++ b/tomcat-8.0-jsvc.service @@ -0,0 +1,22 @@ +# Systemd unit file for tomcat +# +# To create clones of this service: +# 1) By default SERVICE_NAME=tomcat. When cloned, the value must be defined +# before tomcat-sysd is called. +# 2) Create /etc/sysconfig/${SERVICE_NAME} from /etc/sysconfig/tomcat +# to override tomcat defaults + +[Unit] +Description=Apache Tomcat Web Application Container JSVC wrapper +After=syslog.target network.target + +[Service] +Type=simple +EnvironmentFile=/etc/tomcat/tomcat.conf +Environment="NAME=" "USE_JSVC=true" +EnvironmentFile=-/etc/sysconfig/tomcat +ExecStart=/usr/libexec/tomcat/server start +ExecStop=/usr/libexec/tomcat/server stop + +[Install] +WantedBy=multi-user.target diff --git a/tomcat-8.0-log4j.properties b/tomcat-8.0-log4j.properties new file mode 100644 index 0000000..dfc2309 --- /dev/null +++ b/tomcat-8.0-log4j.properties @@ -0,0 +1,11 @@ +log4j.rootLogger=debug, R +log4j.appender.R=org.apache.log4j.RollingFileAppender +log4j.appender.R.File=${catalina.base}/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 diff --git a/tomcat-8.0-tomcat-users-webapp.patch b/tomcat-8.0-tomcat-users-webapp.patch new file mode 100644 index 0000000..860c4cf --- /dev/null +++ b/tomcat-8.0-tomcat-users-webapp.patch @@ -0,0 +1,17 @@ +--- conf/tomcat-users.xml~ 2008-01-28 17:41:06.000000000 -0500 ++++ conf/tomcat-users.xml 2008-03-07 19:40:07.000000000 -0500 +@@ -23,4 +23,14 @@ + + + --> ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + diff --git a/tomcat-8.0-tool-wrapper.script b/tomcat-8.0-tool-wrapper.script new file mode 100644 index 0000000..949d46d --- /dev/null +++ b/tomcat-8.0-tool-wrapper.script @@ -0,0 +1,45 @@ +#!/bin/sh +# +# tomcat-digest script +# JPackage Project + +# 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" +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 tomcat/tomcat-util tomcat/tomcat-coyote tomcat/tomcat-api tomcat/tomcat-util-scan" + +# Set parameters +set_classpath $BASE_JARS +set_flags $BASE_FLAGS +set_options $BASE_OPTIONS + +# Let's start +run "$@" diff --git a/tomcat-8.0.36-CompilerOptionsV9.patch b/tomcat-8.0.36-CompilerOptionsV9.patch new file mode 100644 index 0000000..0b44236 --- /dev/null +++ b/tomcat-8.0.36-CompilerOptionsV9.patch @@ -0,0 +1,24 @@ +--- java/org/apache/jasper/compiler/JDTCompiler.java~ 2016-07-01 14:39:19.728255958 -0400 ++++ java/org/apache/jasper/compiler/JDTCompiler.java 2016-07-01 14:39:37.191311760 -0400 +@@ -312,9 +312,6 @@ + } else if(opt.equals("1.8")) { + settings.put(CompilerOptions.OPTION_Source, + CompilerOptions.VERSION_1_8); +- } else if(opt.equals("1.9")) { +- settings.put(CompilerOptions.OPTION_Source, +- CompilerOptions.VERSION_1_9); + } else { + log.warn("Unknown source VM " + opt + " ignored."); + settings.put(CompilerOptions.OPTION_Source, +@@ -361,11 +358,6 @@ + CompilerOptions.VERSION_1_8); + settings.put(CompilerOptions.OPTION_Compliance, + CompilerOptions.VERSION_1_8); +- } else if(opt.equals("1.9")) { +- settings.put(CompilerOptions.OPTION_TargetPlatform, +- CompilerOptions.VERSION_1_9); +- settings.put(CompilerOptions.OPTION_Compliance, +- CompilerOptions.VERSION_1_9); + } else { + log.warn("Unknown target VM " + opt + " ignored."); + settings.put(CompilerOptions.OPTION_TargetPlatform, diff --git a/tomcat-8.0.conf b/tomcat-8.0.conf new file mode 100644 index 0000000..3f43006 --- /dev/null +++ b/tomcat-8.0.conf @@ -0,0 +1,52 @@ +# System-wide configuration file for tomcat services +# This will be loaded by systemd as an environment file, +# so please keep the syntax. For shell expansion support +# place your custom files as /etc/tomcat/conf.d/*.conf +# +# There are 2 "classes" of startup behavior in this package. +# The old one, the default service named tomcat.service. +# The new named instances are called tomcat@instance.service. +# +# Use this file to change default values for all services. +# Change the service specific ones to affect only one service. +# For tomcat.service it's /etc/sysconfig/tomcat, for +# tomcat@instance it's /etc/sysconfig/tomcat@instance. + +# This variable is used to figure out if config is loaded or not. +TOMCAT_CFG_LOADED="1" + +# In new-style instances, if CATALINA_BASE isn't specified, it will +# be constructed by joining TOMCATS_BASE and NAME. +TOMCATS_BASE="/var/lib/tomcats/" + +# Where your java installation lives +JAVA_HOME="/usr/lib/jvm/jre" + +# Where your tomcat installation lives +CATALINA_HOME="@@@TCHOME@@@" + +# System-wide tmp +CATALINA_TMPDIR="/var/cache/tomcat/temp" + +# 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=/usr/lib" + +# Set default javax.sql.DataSource factory to apache commons one. See rhbz#1214381 +JAVA_OPTS="-Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory" + +# 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 +# TODO(stingray): does nothing, fix. +# SHUTDOWN_WAIT="30" + +# If you wish to further customize your tomcat environment, +# put your own definitions here +# (i.e. LD_LIBRARY_PATH for some jdbc drivers) diff --git a/tomcat-8.0.logrotate b/tomcat-8.0.logrotate new file mode 100644 index 0000000..a87b4c0 --- /dev/null +++ b/tomcat-8.0.logrotate @@ -0,0 +1,8 @@ +@@@TCLOG@@@/catalina.out { + copytruncate + weekly + rotate 52 + compress + missingok + create 0644 tomcat tomcat +} diff --git a/tomcat-8.0.service b/tomcat-8.0.service new file mode 100644 index 0000000..2b20aa0 --- /dev/null +++ b/tomcat-8.0.service @@ -0,0 +1,22 @@ +# Systemd unit file for default tomcat +# +# To create clones of this service: +# DO NOTHING, use tomcat@.service instead. + +[Unit] +Description=Apache Tomcat Web Application Container +After=syslog.target network.target + +[Service] +Type=simple +EnvironmentFile=/etc/tomcat/tomcat.conf +Environment="NAME=" +EnvironmentFile=-/etc/sysconfig/tomcat +ExecStart=/usr/libexec/tomcat/server start +SuccessExitStatus=143 +User=tomcat +Group=tomcat + + +[Install] +WantedBy=multi-user.target diff --git a/tomcat-8.0.sysconfig b/tomcat-8.0.sysconfig new file mode 100644 index 0000000..3117bf7 --- /dev/null +++ b/tomcat-8.0.sysconfig @@ -0,0 +1,11 @@ +# Service-specific configuration file for tomcat. This will be sourced by +# systemd for the default service (tomcat.service) +# If you want to customize named instance, make a similar file +# and name it tomcat@instancename. + +# You will not need to set this, usually. For default service it equals +# CATALINA_HOME. For named service, it equals ${TOMCATS_BASE}${NAME} +#CATALINA_BASE="@@@TCHOME@@@" + +# Please take a look at /etc/tomcat/tomcat.conf to have an idea what you +# can override. diff --git a/tomcat-8.0.wrapper b/tomcat-8.0.wrapper new file mode 100644 index 0000000..c97cb85 --- /dev/null +++ b/tomcat-8.0.wrapper @@ -0,0 +1,24 @@ +#!/bin/bash + +if [ "$1" = "version" ]; then + . /usr/libexec/tomcat/preamble + exec ${JAVACMD} -classpath ${CATALINA_HOME}/lib/catalina.jar \ + org.apache.catalina.util.ServerInfo +fi + +SRV="tomcat" +if [ -n "$2" ]; then + SRV="tomcat@$2" +fi + +if [ "$1" = "start" ]; then + systemctl start ${SRV}.service +elif [ "$1" = "stop" ]; then + systemctl stop ${SRV}.service +elif [ "$1" = "version" ]; then + ${JAVACMD} -classpath ${CATALINA_HOME}/lib/catalina.jar \ + org.apache.catalina.util.ServerInfo +else + echo "Usage: $0 {start|stop|version} [server-id]" + exit 1 +fi diff --git a/tomcat-api-OSGi-MANIFEST.MF b/tomcat-api-OSGi-MANIFEST.MF new file mode 100644 index 0000000..85b12b8 --- /dev/null +++ b/tomcat-api-OSGi-MANIFEST.MF @@ -0,0 +1,12 @@ +Manifest-Version: 1.0 +Export-Package: org.apache.tomcat;version="8.0.26" +Bundle-Vendor: %bundleProvider +Bundle-ClassPath: . +Bundle-Version: 8.0.26 +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 + diff --git a/tomcat-functions b/tomcat-functions new file mode 100644 index 0000000..ab08fa2 --- /dev/null +++ b/tomcat-functions @@ -0,0 +1,42 @@ +#!/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 + +_save_function() { + local ORIG_FUNC=$(declare -f $1) + local NEWNAME_FUNC="$2${ORIG_FUNC#$1}" + eval "$NEWNAME_FUNC" +} + +run_jsvc(){ + if [ -x /usr/bin/jsvc ]; then + TOMCAT_USER="${TOMCAT_USER:-tomcat}" + JSVC="/usr/bin/jsvc" + + JSVC_OPTS="-nodetach -pidfile /var/run/jsvc-tomcat${NAME}.pid -user ${TOMCAT_USER} -outfile ${CATALINA_BASE}/logs/catalina.out -errfile ${CATALINA_BASE}/logs/catalina.out" + if [ "$1" = "stop" ]; then + JSVC_OPTS="${JSVC_OPTS} -stop" + fi + + exec "${JSVC}" ${JSVC_OPTS} ${FLAGS} -classpath "${CLASSPATH}" ${OPTIONS} "${MAIN_CLASS}" "${@}" + else + echo "Can't find /usr/bin/jsvc executable" + fi + +} + +_save_function run run_java + +run() { + if [ "${USE_JSVC}" = "true" ] ; then + run_jsvc $@ + else + run_java $@ + fi +} + diff --git a/tomcat-juli-OSGi-MANIFEST.MF b/tomcat-juli-OSGi-MANIFEST.MF new file mode 100644 index 0000000..b856d9f --- /dev/null +++ b/tomcat-juli-OSGi-MANIFEST.MF @@ -0,0 +1,13 @@ +Manifest-Version: 1.0 +Export-Package: org.apache.juli;version="8.0.26",org.apache.juli.loggi + ng;version="8.0.26" +Bundle-Vendor: %bundleProvider +Bundle-ClassPath: . +Bundle-Version: 8.0.26 +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 + diff --git a/tomcat-named.service b/tomcat-named.service new file mode 100644 index 0000000..9bbcb17 --- /dev/null +++ b/tomcat-named.service @@ -0,0 +1,26 @@ +# Systemd unit file for tomcat instances. +# +# To create clones of this service: +# 0. systemctl enable tomcat@name.service +# 1. create catalina.base directory structure in +# /var/lib/tomcats/name +# 2. profit. + +[Unit] +Description=Apache Tomcat Web Application Container +After=syslog.target network.target + +[Service] +Type=simple +EnvironmentFile=/etc/tomcat/tomcat.conf +Environment="NAME=%I" +EnvironmentFile=-/etc/sysconfig/tomcat@%I +ExecStart=/usr/libexec/tomcat/server start +ExecStop=/usr/libexec/tomcat/server stop +SuccessExitStatus=143 +User=tomcat +Group=tomcat + +[Install] +WantedBy=multi-user.target + diff --git a/tomcat-preamble b/tomcat-preamble new file mode 100644 index 0000000..1271dca --- /dev/null +++ b/tomcat-preamble @@ -0,0 +1,52 @@ +#!/bin/bash + +. /usr/libexec/tomcat/functions + +# Get the tomcat config (use this for environment specific settings) + +if [ -z "${TOMCAT_CFG_LOADED}" ]; then + if [ -z "${TOMCAT_CFG}" ]; then + TOMCAT_CFG="/etc/tomcat/tomcat.conf" + fi + . $TOMCAT_CFG +fi + +if [ -d "${TOMCAT_CONFD=/etc/tomcat/conf.d}" ]; then + for file in ${TOMCAT_CONFD}/*.conf ; do + if [ -f "$file" ] ; then + . "$file" + fi + done +fi + +if [ -z "$CATALINA_BASE" ]; then + if [ -n "$NAME" ]; then + if [ -z "$TOMCATS_BASE" ]; then + TOMCATS_BASE="/var/lib/tomcats/" + fi + CATALINA_BASE="${TOMCATS_BASE}${NAME}" + else + CATALINA_BASE="${CATALINA_HOME}" + fi +fi +VERBOSE=1 +set_javacmd +cd ${CATALINA_HOME} +# CLASSPATH munging +if [ ! -z "$CLASSPATH" ] ; then + CLASSPATH="$CLASSPATH": +fi + +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)" + +if [ -z "$LOGGING_PROPERTIES" ] ; then + LOGGING_PROPERTIES="${CATALINA_BASE}/conf/logging.properties" + if [ ! -f "${LOGGING_PROPERTIES}" ] ; then + LOGGING_PROPERTIES="${CATALINA_HOME}/conf/logging.properties" + fi +fi diff --git a/tomcat-server b/tomcat-server new file mode 100644 index 0000000..17ae385 --- /dev/null +++ b/tomcat-server @@ -0,0 +1,25 @@ +#!/bin/bash + +. /usr/libexec/tomcat/preamble + +MAIN_CLASS=org.apache.catalina.startup.Bootstrap + +FLAGS="$JAVA_OPTS" +OPTIONS="-Dcatalina.base=$CATALINA_BASE \ +-Dcatalina.home=$CATALINA_HOME \ +-Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS \ +-Djava.io.tmpdir=$CATALINA_TMPDIR \ +-Djava.util.logging.config.file=${LOGGING_PROPERTIES} \ +-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" + +if [ "$1" = "start" ] ; then + FLAGS="${FLAGS} $CATALINA_OPTS" + if [ "${SECURITY_MANAGER}" = "true" ] ; then + OPTIONS="${OPTIONS} \ + -Djava.security.manager \ + -Djava.security.policy==${CATALINA_BASE}/conf/catalina.policy" + fi + run start +elif [ "$1" = "stop" ] ; then + run stop +fi diff --git a/tomcat.spec b/tomcat.spec new file mode 100644 index 0000000..169f6ec --- /dev/null +++ b/tomcat.spec @@ -0,0 +1,1026 @@ +# Copyright (c) 2000-2008, JPackage Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the +# distribution. +# 3. Neither the name of the JPackage Project nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +%global jspspec 2.3 +%global major_version 8 +%global minor_version 0 +%global micro_version 44 +%global packdname apache-tomcat-%{version}-src +%global servletspec 3.1 +%global elspec 3.0 +%global tcuid 91 +#Recommended version is specified in java/org/apache/catalina/core/AprLifecycleListener.java +%global native_version 1.1.33 + + +# FHS 2.3 compliant tree structure - http://www.pathname.com/fhs/2.3/ +%global basedir %{_var}/lib/%{name} +%global appdir %{basedir}/webapps +%global homedir %{_datadir}/%{name} +%global bindir %{homedir}/bin +%global confdir %{_sysconfdir}/%{name} +%global libdir %{_javadir}/%{name} +%global logdir %{_var}/log/%{name} +%global cachedir %{_var}/cache/%{name} +%global tempdir %{cachedir}/temp +%global workdir %{cachedir}/work +%global _initrddir %{_sysconfdir}/init.d +%global _systemddir /lib/systemd/system + +Name: tomcat +Epoch: 1 +Version: %{major_version}.%{minor_version}.%{micro_version} +Release: 1%{?dist} +Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API + +Group: System Environment/Daemons +License: ASL 2.0 +URL: http://tomcat.apache.org/ +Source0: http://www.apache.org/dist/tomcat/tomcat-%{major_version}/v%{version}/src/%{packdname}.tar.gz +Source1: %{name}-%{major_version}.%{minor_version}.conf +Source3: %{name}-%{major_version}.%{minor_version}.sysconfig +Source4: %{name}-%{major_version}.%{minor_version}.wrapper +Source5: %{name}-%{major_version}.%{minor_version}.logrotate +Source6: %{name}-%{major_version}.%{minor_version}-digest.script +Source7: %{name}-%{major_version}.%{minor_version}-tool-wrapper.script +Source8: servlet-api-OSGi-MANIFEST.MF +Source9: jsp-api-OSGi-MANIFEST.MF +Source11: %{name}-%{major_version}.%{minor_version}.service +Source12: el-api-OSGi-MANIFEST.MF +Source13: jasper-el-OSGi-MANIFEST.MF +Source14: jasper-OSGi-MANIFEST.MF +Source15: tomcat-api-OSGi-MANIFEST.MF +Source16: tomcat-juli-OSGi-MANIFEST.MF +Source20: %{name}-%{major_version}.%{minor_version}-jsvc.service +Source21: tomcat-functions +Source30: tomcat-preamble +Source31: tomcat-server +Source32: tomcat-named.service + +Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch +Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch +Patch2: %{name}-8.0.36-CompilerOptionsV9.patch + +BuildArch: noarch + +BuildRequires: ant +BuildRequires: ecj >= 1:4.4.0 +BuildRequires: findutils +BuildRequires: apache-commons-collections +BuildRequires: apache-commons-daemon +BuildRequires: apache-commons-dbcp +BuildRequires: apache-commons-pool +BuildRequires: tomcat-taglibs-standard +BuildRequires: java-devel >= 1:1.6.0 +BuildRequires: jpackage-utils >= 0:1.7.0 +BuildRequires: junit +BuildRequires: geronimo-jaxrpc +BuildRequires: wsdl4j +BuildRequires: systemd-units +Requires: apache-commons-daemon +Requires: apache-commons-logging +Requires: apache-commons-collections +Requires: apache-commons-dbcp +Requires: apache-commons-pool +Requires: java-headless >= 1:1.6.0 +Requires: jpackage-utils +Requires: procps +Requires: %{name}-lib = %{epoch}:%{version}-%{release} +Recommends: tomcat-native >= %{native_version} +Requires(pre): shadow-utils +Requires(post): chkconfig +Requires(preun): chkconfig +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units + +# added after log4j sub-package was removed +Provides: %{name}-log4j = %{epoch}:%{version}-%{release} + +%description +Tomcat is the servlet container that is used in the official Reference +Implementation for the Java Servlet and JavaServer Pages technologies. +The Java Servlet and JavaServer Pages specifications are developed by +Sun under the Java Community Process. + +Tomcat is developed in an open and participatory environment and +released under the Apache Software License version 2.0. Tomcat is intended +to be a collaboration of the best-of-breed developers from around the world. + +%package admin-webapps +Group: Applications/System +Summary: The host-manager and manager web applications for Apache Tomcat +Requires: %{name} = %{epoch}:%{version}-%{release} + +%description admin-webapps +The host-manager and manager web applications for Apache Tomcat. + +%package docs-webapp +Group: Applications/Text +Summary: The docs web application for Apache Tomcat +Requires: %{name} = %{epoch}:%{version}-%{release} + +%description docs-webapp +The docs web application for Apache Tomcat. + +%package javadoc +Group: Documentation +Summary: Javadoc generated documentation for Apache Tomcat +Requires: jpackage-utils + +%description javadoc +Javadoc generated documentation for Apache Tomcat. + +%package jsvc +Group: System Environment/Daemons +Summary: Apache jsvc wrapper for Apache Tomcat as separate service +Requires: %{name} = %{epoch}:%{version}-%{release} +Requires: apache-commons-daemon-jsvc + +%description jsvc +Systemd service to start tomcat with jsvc, +which allows tomcat to perform some privileged operations +(e.g. bind to a port < 1024) and then switch identity to a non-privileged user. + +%package jsp-%{jspspec}-api +Group: Development/Libraries +Summary: Apache Tomcat JSP API implementation classes +Provides: jsp = %{jspspec} +Obsoletes: %{name}-jsp-2.2-api +Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} +Requires: %{name}-el-%{elspec}-api = %{epoch}:%{version}-%{release} +Requires(post): chkconfig +Requires(postun): chkconfig + +%description jsp-%{jspspec}-api +Apache Tomcat JSP API implementation classes. + +%package lib +Group: Development/Libraries +Summary: Libraries needed to run the Tomcat Web container +Requires: %{name}-jsp-%{jspspec}-api = %{epoch}:%{version}-%{release} +Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} +Requires: %{name}-el-%{elspec}-api = %{epoch}:%{version}-%{release} +Requires: ecj >= 1:4.2.1 +Requires: apache-commons-collections +Requires: apache-commons-dbcp +Requires: apache-commons-pool +Requires(preun): coreutils + +%description lib +Libraries needed to run the Tomcat Web container. + +%package servlet-%{servletspec}-api +Group: Development/Libraries +Summary: Apache Tomcat Servlet API implementation classes +Provides: servlet = %{servletspec} +Provides: servlet6 +Provides: servlet3 +Obsoletes: %{name}-servlet-3.0-api +Requires(post): chkconfig +Requires(postun): chkconfig + +%description servlet-%{servletspec}-api +Apache Tomcat Servlet API implementation classes. + +%package el-%{elspec}-api +Group: Development/Libraries +Summary: Expression Language v%{elspec} API +Provides: el_api = %{elspec} +Obsoletes: %{name}-el-2.2-api +Requires(post): chkconfig +Requires(postun): chkconfig + +%description el-%{elspec}-api +Expression Language %{elspec}. + +%package webapps +Group: Applications/Internet +Summary: The ROOT and examples web applications for Apache Tomcat +Requires: %{name} = %{epoch}:%{version}-%{release} +Requires: tomcat-taglibs-standard >= 0:1.1 + +%description webapps +The ROOT and examples web applications for Apache Tomcat. + +%prep +%setup -q -n %{packdname} +# remove pre-built binaries and windows files +find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name "*.gz" -o \ + -name "*.jar" -o -name "*.war" -o -name "*.zip" \) -delete + +%patch0 -p0 +%patch1 -p0 +%patch2 -p0 + +%{__ln_s} $(build-classpath tomcat-taglibs-standard/taglibs-standard-impl) webapps/examples/WEB-INF/lib/jstl.jar +%{__ln_s} $(build-classpath tomcat-taglibs-standard/taglibs-standard-compat) webapps/examples/WEB-INF/lib/standard.jar + +%build +export OPT_JAR_LIST="xalan-j2-serializer" + # we don't care about the tarballs and we're going to replace + # tomcat-dbcp.jar with apache-commons-{collections,dbcp,pool}-tomcat5.jar + # so just create a dummy file for later removal + touch HACK + %{__mkdir_p} HACKDIR + touch HACKDIR/build.xml + touch HACKDIR/LICENSE + + # who needs a build.properties file anyway + %{ant} -Dbase.path="." \ + -Dbuild.compiler="modern" \ + -Dcommons-collections.jar="$(build-classpath apache-commons-collections)" \ + -Dcommons-daemon.jar="$(build-classpath apache-commons-daemon)" \ + -Dcommons-daemon.native.src.tgz="HACK" \ + -Djasper-jdt.jar="$(build-classpath ecj)" \ + -Djdt.jar="$(build-classpath ecj)" \ + -Dtomcat-native.tar.gz="HACK" \ + -Dtomcat-native.home="." \ + -Dtomcat-native.win.path="HACKDIR" \ + -Dcommons-daemon.native.win.mgr.exe="HACK" \ + -Dnsis.exe="HACK" \ + -Djaxrpc-lib.jar="$(build-classpath jaxrpc)" \ + -Dwsdl4j-lib.jar="$(build-classpath wsdl4j)" \ + -Dcommons-pool.home="HACKDIR" \ + -Dcommons-dbcp.home="HACKDIR" \ + -Dno.build.dbcp=true \ + -Dversion="%{version}" \ + -Dversion.build="%{micro_version}" \ + -Djava.7.home=%{java_home} \ + deploy dist-prepare dist-source javadoc + + # remove some jars that we'll replace with symlinks later + %{__rm} output/build/bin/commons-daemon.jar \ + output/build/lib/ecj.jar + + # remove the cruft we created + %{__rm} output/build/bin/tomcat-native.tar.gz +pushd output/dist/src/webapps/docs/appdev/sample/src +%{__mkdir_p} ../web/WEB-INF/classes +%{javac} -cp ../../../../../../../../output/build/lib/servlet-api.jar -d ../web/WEB-INF/classes mypackage/Hello.java +pushd ../web +%{jar} cf ../../../../../../../../output/build/webapps/docs/appdev/sample/sample.war * +popd +popd + +# inject OSGi manifests +mkdir -p META-INF +cp -p %{SOURCE8} META-INF/MANIFEST.MF +touch META-INF/MANIFEST.MF +zip -u output/build/lib/servlet-api.jar META-INF/MANIFEST.MF +cp -p %{SOURCE9} META-INF/MANIFEST.MF +touch META-INF/MANIFEST.MF +zip -u output/build/lib/jsp-api.jar META-INF/MANIFEST.MF +cp -p %{SOURCE12} META-INF/MANIFEST.MF +touch META-INF/MANIFEST.MF +zip -u output/build/lib/el-api.jar META-INF/MANIFEST.MF +cp -p %{SOURCE13} META-INF/MANIFEST.MF +touch META-INF/MANIFEST.MF +zip -u output/build/lib/jasper-el.jar META-INF/MANIFEST.MF +cp -p %{SOURCE14} META-INF/MANIFEST.MF +touch META-INF/MANIFEST.MF +zip -u output/build/lib/jasper.jar META-INF/MANIFEST.MF +cp -p %{SOURCE15} META-INF/MANIFEST.MF +touch META-INF/MANIFEST.MF +zip -u output/build/lib/tomcat-api.jar META-INF/MANIFEST.MF +cp -p %{SOURCE16} META-INF/MANIFEST.MF +touch META-INF/MANIFEST.MF +zip -u output/build/bin/tomcat-juli.jar META-INF/MANIFEST.MF + +%install +# build initial path structure +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_bindir} +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sbindir} +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_javadocdir}/%{name} +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_initrddir} +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_systemddir} +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{appdir} +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{bindir} +%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{confdir} +%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{confdir}/Catalina/localhost +%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{confdir}/conf.d +/bin/echo "Place your custom *.conf files here. Shell expansion is supported." > ${RPM_BUILD_ROOT}%{confdir}/conf.d/README +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{libdir} +%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{logdir} +/bin/touch ${RPM_BUILD_ROOT}%{logdir}/catalina.out +%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{_localstatedir}/lib/tomcats +%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{homedir} +%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{tempdir} +%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{workdir} +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_unitdir} +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_libexecdir}/%{name} + +# move things into place +# First copy supporting libs to tomcat lib +pushd output/build + %{__cp} -a bin/*.{jar,xml} ${RPM_BUILD_ROOT}%{bindir} + %{__cp} -a conf/*.{policy,properties,xml} ${RPM_BUILD_ROOT}%{confdir} + %{__cp} -a lib/*.jar ${RPM_BUILD_ROOT}%{libdir} + %{__cp} -a webapps/* ${RPM_BUILD_ROOT}%{appdir} +popd +# javadoc +%{__cp} -a output/dist/webapps/docs/api/* ${RPM_BUILD_ROOT}%{_javadocdir}/%{name} + +%{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ + -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ + -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE1} \ + > ${RPM_BUILD_ROOT}%{confdir}/%{name}.conf +%{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ + -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ + -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE3} \ + > ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/%{name} +%{__install} -m 0644 %{SOURCE4} \ + ${RPM_BUILD_ROOT}%{_sbindir}/%{name} +%{__install} -m 0644 %{SOURCE11} \ + ${RPM_BUILD_ROOT}%{_unitdir}/%{name}.service +%{__install} -m 0644 %{SOURCE20} \ + ${RPM_BUILD_ROOT}%{_unitdir}/%{name}-jsvc.service +%{__sed} -e "s|\@\@\@TCLOG\@\@\@|%{logdir}|g" %{SOURCE5} \ + > ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/%{name} +%{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ + -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ + -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE6} \ + > ${RPM_BUILD_ROOT}%{_bindir}/%{name}-digest +%{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ + -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ + -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE7} \ + > ${RPM_BUILD_ROOT}%{_bindir}/%{name}-tool-wrapper + +%{__install} -m 0644 %{SOURCE21} \ + ${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/functions +%{__install} -m 0755 %{SOURCE30} \ + ${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/preamble +%{__install} -m 0755 %{SOURCE31} \ + ${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/server +%{__install} -m 0644 %{SOURCE32} \ + ${RPM_BUILD_ROOT}%{_unitdir}/%{name}@.service + +# Substitute libnames in catalina-tasks.xml +sed -i \ + "s,el-api.jar,%{name}-el-%{elspec}-api.jar,; + s,servlet-api.jar,%{name}-servlet-%{servletspec}-api.jar,; + s,jsp-api.jar,%{name}-jsp-%{jspspec}-api.jar,;" \ + ${RPM_BUILD_ROOT}%{bindir}/catalina-tasks.xml + +# create jsp and servlet API symlinks +pushd ${RPM_BUILD_ROOT}%{_javadir} + %{__mv} %{name}/jsp-api.jar %{name}-jsp-%{jspspec}-api.jar + %{__ln_s} %{name}-jsp-%{jspspec}-api.jar %{name}-jsp-api.jar + %{__mv} %{name}/servlet-api.jar %{name}-servlet-%{servletspec}-api.jar + %{__ln_s} %{name}-servlet-%{servletspec}-api.jar %{name}-servlet-api.jar + %{__mv} %{name}/el-api.jar %{name}-el-%{elspec}-api.jar + %{__ln_s} %{name}-el-%{elspec}-api.jar %{name}-el-api.jar +popd + +pushd output/build + %{_bindir}/build-jar-repository lib apache-commons-collections \ + apache-commons-dbcp apache-commons-pool ecj 2>&1 + # need to use -p here with b-j-r otherwise the examples webapp fails to + # load with a java.io.IOException + %{_bindir}/build-jar-repository -p webapps/examples/WEB-INF/lib \ + tomcat-taglibs-standard/taglibs-standard-impl.jar tomcat-taglibs-standard/taglibs-standard-compat.jar 2>&1 +popd + +pushd ${RPM_BUILD_ROOT}%{libdir} + # symlink JSP and servlet API jars + %{__ln_s} ../../java/%{name}-jsp-%{jspspec}-api.jar . + %{__ln_s} ../../java/%{name}-servlet-%{servletspec}-api.jar . + %{__ln_s} ../../java/%{name}-el-%{elspec}-api.jar . + %{__ln_s} $(build-classpath apache-commons-collections) commons-collections.jar + %{__ln_s} $(build-classpath apache-commons-dbcp) commons-dbcp.jar + %{__ln_s} $(build-classpath apache-commons-pool) commons-pool.jar + %{__ln_s} $(build-classpath ecj) jasper-jdt.jar + + # Temporary copy the juli jar here from /usr/share/java/tomcat (for maven depmap) + %{__cp} -a ${RPM_BUILD_ROOT}%{bindir}/tomcat-juli.jar ./ +popd + +# symlink to the FHS locations where we've installed things +pushd ${RPM_BUILD_ROOT}%{homedir} + %{__ln_s} %{appdir} webapps + %{__ln_s} %{confdir} conf + %{__ln_s} %{libdir} lib + %{__ln_s} %{logdir} logs + %{__ln_s} %{tempdir} temp + %{__ln_s} %{workdir} work +popd + +# install sample webapp +%{__mkdir_p} ${RPM_BUILD_ROOT}%{appdir}/sample +pushd ${RPM_BUILD_ROOT}%{appdir}/sample +%{jar} xf ${RPM_BUILD_ROOT}%{appdir}/docs/appdev/sample/sample.war +popd +%{__rm} ${RPM_BUILD_ROOT}%{appdir}/docs/appdev/sample/sample.war + +# Allow linking for example webapp +%{__mkdir_p} ${RPM_BUILD_ROOT}%{appdir}/examples/META-INF +pushd ${RPM_BUILD_ROOT}%{appdir}/examples/META-INF +echo '' > context.xml +echo '' >> context.xml +echo ' ' >> context.xml +echo '' >> context.xml +popd + +pushd ${RPM_BUILD_ROOT}%{appdir}/examples/WEB-INF/lib +%{__ln_s} -f $(build-classpath tomcat-taglibs-standard/taglibs-standard-impl) jstl.jar +%{__ln_s} -f $(build-classpath tomcat-taglibs-standard/taglibs-standard-compat) standard.jar +popd + + +# Install the maven metadata +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_mavenpomdir} +pushd output/dist/src/res/maven +for pom in *.pom; do + # fix-up version in all pom files + sed -i 's/@MAVEN.DEPLOY.VERSION@/%{version}/g' $pom +done + +# we won't install dbcp, juli-adapters and juli-extras pom files +for libname in annotations-api catalina jasper-el jasper catalina-ha; do + %{__cp} -a %{name}-$libname.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-$libname.pom + %add_maven_depmap JPP.%{name}-$libname.pom %{name}/$libname.jar -f "tomcat-lib" +done + +# tomcat-util-scan +%{__cp} -a %{name}-util-scan.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-util-scan.pom +%add_maven_depmap JPP.%{name}-util-scan.pom %{name}/%{name}-util-scan.jar -f "tomcat-lib" + +# tomcat-jni +%{__cp} -a %{name}-jni.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-jni.pom +%add_maven_depmap JPP.%{name}-jni.pom %{name}/%{name}-jni.jar -f "tomcat-lib" + +# servlet-api jsp-api and el-api are not in tomcat subdir, since they are widely re-used elsewhere +%{__cp} -a tomcat-jsp-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-jsp-api.pom +%add_maven_depmap JPP-tomcat-jsp-api.pom tomcat-jsp-api.jar -f "tomcat-jsp-api" -a "org.eclipse.jetty.orbit:javax.servlet.jsp" + +%{__cp} -a tomcat-el-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-el-api.pom +%add_maven_depmap JPP-tomcat-el-api.pom tomcat-el-api.jar -f "tomcat-el-api" -a "org.eclipse.jetty.orbit:javax.el" + +%{__cp} -a tomcat-servlet-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-servlet-api.pom +# Generate a depmap fragment javax.servlet:servlet-api pointing to +# tomcat-servlet-3.0-api for backwards compatibility +# also provide jetty depmap (originally in jetty package, but it's cleaner to have it here +%add_maven_depmap JPP-tomcat-servlet-api.pom tomcat-servlet-api.jar -f "tomcat-servlet-api" + +# replace temporary copy with link +%{__ln_s} -f $(abs2rel %{bindir}/tomcat-juli.jar %{libdir}) ${RPM_BUILD_ROOT}%{libdir}/ + +# two special pom where jar files have different names +%{__cp} -a tomcat-tribes.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-catalina-tribes.pom +%add_maven_depmap JPP.%{name}-catalina-tribes.pom %{name}/catalina-tribes.jar + +%{__cp} -a tomcat-coyote.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-coyote.pom +%add_maven_depmap JPP.%{name}-tomcat-coyote.pom %{name}/tomcat-coyote.jar + +%{__cp} -a tomcat-juli.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-juli.pom +%add_maven_depmap JPP.%{name}-tomcat-juli.pom %{name}/tomcat-juli.jar + +%{__cp} -a tomcat-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-api.pom +%add_maven_depmap JPP.%{name}-tomcat-api.pom %{name}/tomcat-api.jar + +%{__cp} -a tomcat-util.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-util.pom +%add_maven_depmap JPP.%{name}-tomcat-util.pom %{name}/tomcat-util.jar + +%{__cp} -a tomcat-jdbc.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-jdbc.pom +%add_maven_depmap JPP.%{name}-tomcat-jdbc.pom %{name}/tomcat-jdbc.jar + +# tomcat-websocket-api +%{__cp} -a tomcat-websocket-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-websocket-api.pom +%add_maven_depmap JPP.%{name}-websocket-api.pom %{name}/websocket-api.jar + +# tomcat-tomcat-websocket +%{__cp} -a tomcat-websocket.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-websocket.pom +%add_maven_depmap JPP.%{name}-tomcat-websocket.pom %{name}/tomcat-websocket.jar + + +%pre +# add the tomcat user and group +%{_sbindir}/groupadd -g %{tcuid} -r tomcat 2>/dev/null || : +%{_sbindir}/useradd -c "Apache Tomcat" -u %{tcuid} -g tomcat \ + -s /sbin/nologin -r -d %{homedir} tomcat 2>/dev/null || : + +%post +# install but don't activate +%systemd_post %{name}.service + +%post jsp-%{jspspec}-api +%{_sbindir}/update-alternatives --install %{_javadir}/jsp.jar jsp \ + %{_javadir}/%{name}-jsp-%{jspspec}-api.jar 20200 + +%post servlet-%{servletspec}-api +%{_sbindir}/update-alternatives --install %{_javadir}/servlet.jar servlet \ + %{_javadir}/%{name}-servlet-%{servletspec}-api.jar 30000 + +%post el-%{elspec}-api +%{_sbindir}/update-alternatives --install %{_javadir}/elspec.jar elspec \ + %{_javadir}/%{name}-el-%{elspec}-api.jar 20300 + +%preun +# clean tempdir and workdir on removal or upgrade +%{__rm} -rf %{workdir}/* %{tempdir}/* +%systemd_preun %{name}.service + +%postun +%systemd_postun_with_restart %{name}.service + +%postun jsp-%{jspspec}-api +if [ "$1" = "0" ]; then + %{_sbindir}/update-alternatives --remove jsp \ + %{_javadir}/%{name}-jsp-%{jspspec}-api.jar +fi + +%postun servlet-%{servletspec}-api +if [ "$1" = "0" ]; then + %{_sbindir}/update-alternatives --remove servlet \ + %{_javadir}/%{name}-servlet-%{servletspec}-api.jar +fi + +%postun el-%{elspec}-api +if [ "$1" = "0" ]; then + %{_sbindir}/update-alternatives --remove elspec \ + %{_javadir}/%{name}-el-%{elspec}-api.jar +fi + +%triggerun -- tomcat < 0:7.0.22-2 +/usr/bin/systemd-sysv-convert -- save tomcat > /dev/null 2>&1 || : +# Run these becasue the SysV package being removed won't do them +/sbin/chkconfig --del tomcat > /dev/null 2>&1 || : +/bin/systemctl try-restart tomcat.service > /dev/null 2>&1 || : + +%files +%defattr(0664,root,tomcat,0755) +%doc {LICENSE,NOTICE,RELEASE*} +%attr(0755,root,root) %{_bindir}/%{name}-digest +%attr(0755,root,root) %{_bindir}/%{name}-tool-wrapper +%attr(0755,root,root) %{_sbindir}/%{name} +%attr(0644,root,root) %{_unitdir}/%{name}.service +%attr(0644,root,root) %{_unitdir}/%{name}@.service +%attr(0755,root,root) %dir %{_libexecdir}/%{name} +%attr(0755,root,root) %dir %{_localstatedir}/lib/tomcats +%attr(0644,root,root) %{_libexecdir}/%{name}/functions +%attr(0755,root,root) %{_libexecdir}/%{name}/preamble +%attr(0755,root,root) %{_libexecdir}/%{name}/server +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/%{name} +%attr(0755,root,tomcat) %dir %{basedir} +%attr(0755,root,tomcat) %dir %{confdir} + +%defattr(0664,tomcat,root,0770) +%attr(0770,tomcat,root) %dir %{logdir} + +%defattr(0664,root,tomcat,0770) +%attr(0770,root,tomcat) %dir %{cachedir} +%attr(0770,root,tomcat) %dir %{tempdir} +%attr(0770,root,tomcat) %dir %{workdir} + +%defattr(0644,root,tomcat,0775) +%attr(0775,root,tomcat) %dir %{appdir} +%attr(0775,root,tomcat) %dir %{confdir}/Catalina +%attr(0775,root,tomcat) %dir %{confdir}/Catalina/localhost +%attr(0755,root,tomcat) %dir %{confdir}/conf.d +%{confdir}/conf.d/README +%config(noreplace) %{confdir}/%{name}.conf +%config(noreplace) %{confdir}/*.policy +%config(noreplace) %{confdir}/*.properties +%config(noreplace) %{confdir}/context.xml +%config(noreplace) %{confdir}/server.xml +%attr(0640,root,tomcat) %config(noreplace) %{confdir}/tomcat-users.xml +%config(noreplace) %{confdir}/web.xml +%dir %{homedir} +%{bindir}/bootstrap.jar +%{bindir}/catalina-tasks.xml +%{homedir}/lib +%{homedir}/temp +%{homedir}/webapps +%{homedir}/work +%{homedir}/logs +%{homedir}/conf + +%files admin-webapps +%defattr(0664,root,tomcat,0755) +%{appdir}/host-manager +%{appdir}/manager + +%files docs-webapp +%defattr(-,root,root,-) +%{appdir}/docs + +%files javadoc +%defattr(-,root,root,-) +%{_javadocdir}/%{name} + +%files jsp-%{jspspec}-api -f output/dist/src/res/maven/.mfiles-tomcat-jsp-api +%defattr(-,root,root,-) +%{_javadir}/%{name}-jsp-%{jspspec}*.jar + +%files lib -f output/dist/src/res/maven/.mfiles-tomcat-lib +%defattr(-,root,root,-) +%{libdir} +%{bindir}/tomcat-juli.jar +%{_mavenpomdir}/JPP.%{name}-annotations-api.pom +%{_mavenpomdir}/JPP.%{name}-catalina-ha.pom +%{_mavenpomdir}/JPP.%{name}-catalina-tribes.pom +%{_mavenpomdir}/JPP.%{name}-catalina.pom +%{_mavenpomdir}/JPP.%{name}-jasper-el.pom +%{_mavenpomdir}/JPP.%{name}-jasper.pom +%{_mavenpomdir}/JPP.%{name}-tomcat-api.pom +%{_mavenpomdir}/JPP.%{name}-tomcat-juli.pom +%{_mavenpomdir}/JPP.%{name}-tomcat-coyote.pom +%{_mavenpomdir}/JPP.%{name}-tomcat-util.pom +%{_mavenpomdir}/JPP.%{name}-tomcat-jdbc.pom +%{_mavenpomdir}/JPP.%{name}-websocket-api.pom +%{_mavenpomdir}/JPP.%{name}-tomcat-websocket.pom +%{_datadir}/maven-metadata/tomcat.xml +%exclude %{libdir}/%{name}-el-%{elspec}-api.jar + +%files servlet-%{servletspec}-api -f output/dist/src/res/maven/.mfiles-tomcat-servlet-api +%defattr(-,root,root,-) +%doc LICENSE +%{_javadir}/%{name}-servlet-%{servletspec}*.jar + +%files el-%{elspec}-api -f output/dist/src/res/maven/.mfiles-tomcat-el-api +%defattr(-,root,root,-) +%doc LICENSE +%{_javadir}/%{name}-el-%{elspec}-api.jar +%{libdir}/%{name}-el-%{elspec}-api.jar + +%files webapps +%defattr(0644,tomcat,tomcat,0755) +%{appdir}/ROOT +%{appdir}/examples +%{appdir}/sample + +%files jsvc +%defattr(755,root,root,0755) +%attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} +%attr(0660,tomcat,tomcat) %verify(not size md5 mtime) %{logdir}/catalina.out + +%changelog +* Fri Jun 09 2017 Coty Sutherland - 1:8.0.44-1 +- Resolves: rhbz#1459160 CVE-2017-5664 tomcat: Security constrained bypass in error page mechanism + +* Tue Apr 11 2017 Coty Sutherland - 1:8.0.43-1 +- Update to 8.0.43 + +* Fri Mar 31 2017 Coty Sutherland - 1:8.0.42-1 +- Update to 8.0.42 + +* Thu Feb 16 2017 Coty Sutherland - 1:8.0.41-1 +- Update to 8.0.41 +- Resolves: rhbz#1403825 CVE-2016-8745 tomcat: information disclosure due to incorrect Processor sharing + +* Sat Feb 11 2017 Fedora Release Engineering - 1:8.0.39-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Tue Nov 29 2016 Coty Sutherland - 1:8.0.39-1 +- Update to 8.0.39 +- Resolves: rhbz#1397493 CVE-2016-6816 CVE-2016-6817 CVE-2016-8735 tomcat: various flaws + +* Tue Oct 25 2016 Coty Sutherland - 1:8.0.38-1 +- Update to 8.0.38 + +* Sun Oct 23 2016 Coty Sutherland - 1:8.0.37-3 +- Resolves: rhbz#1383216 CVE-2016-6325 tomcat: tomcat writable config files allow privilege escalation +- Resolves: rhbz#1382310 CVE-2016-5425 tomcat: Local privilege escalation via systemd-tmpfiles service + +* Tue Sep 13 2016 Coty Sutherland - 1:8.0.37-1 +- Rebase to 8.0.37 +- Resolves: rhbz#1375581 CVE-2016-5388 CGI sets environmental variable based on user supplied Proxy request header +- Resolves: rhbz#1370262 catalina.out is no longer in use in the main package, but still gets rotated + +* Thu Aug 11 2016 Coty Sutherland - 1:8.0.36-2 +- Related: rhbz#1349469 Correct typo in changelog entry + +* Mon Aug 08 2016 Coty Sutherland - 1:8.0.36-1 +- Resolves: rhbz#1349469 CVE-2016-3092 tomcat: Usage of vulnerable FileUpload package can result in denial of service (updates to 8.0.36) +- Resolves: rhbz#1364056 The command tomcat-digest doesn't work +- Resolves: rhbz#1363884 The tomcat-tool-wrapper script is broken +- Resolves: rhbz#1347864 The systemd service unit does not allow tomcat to shut down gracefully +- Resolves: rhbz#1347835 The security manager doesn't work correctly (JSPs cannot be compiled) +- Resolves: rhbz#1341853 rpm -V tomcat fails on /var/log/tomcat/catalina.out +- Resolves: rhbz#1341850 tomcat-jsvc.service has TOMCAT_USER value hard-coded +- Resolves: rhbz#1359737 Missing maven depmap for the following artifacts: org.apache.tomcat:tomcat-websocket, org.apache.tomcat:tomcat-websocket-api +- Resolves: asfbz#59960 Building javadocs with java8 fails + +* Wed Mar 2 2016 Ivan Afonichev - 1:8.0.32-4 +- Revert sysconfig migration changes, resolves: rhbz#1311771, rhbz#1311905 +- Add /etc/tomcat/conf.d/ with shell expansion support, resolves rhbz#1293636 + +* Sat Feb 27 2016 Ivan Afonichev - 1:8.0.32-3 +- Load sysconfig from tomcat.conf, resolves: rhbz#1311771, rhbz#1311905 +- Set default javax.sql.DataSource factory to apache commons one, resolves rhbz#1214381 + +* Sun Feb 21 2016 Ivan Afonichev - 1:8.0.32-2 +- Fix symlinks from $CATALINA_HOME/lib perspective, resolves: rhbz#1308685 + +* Thu Feb 11 2016 Ivan Afonichev - 1:8.0.32-1 +- Updated to 8.0.32 +- Remove log4j support. It has never been working actually. See rhbz#1236297 +- Move shipped config to /etc/sysconfig/tomcat. /etc/tomcat/tomcat.conf can now be used to override it with shell expansion, resolves rhbz#1293636 +- Recommend tomcat-native, resolves: rhbz#1243132 + +* Wed Feb 10 2016 Coty Sutherland 1:8.0.26-4 +- Resolves: rhbz#1286800 Failed to start component due to wrong allowLinking="true" in context.xml +- Program /bin/nologin does not exist (#1302718) + +* Fri Feb 05 2016 Fedora Release Engineering - 1:8.0.26-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Nov 11 2015 Robert Scheck 1:8.0.26-2 +- CATALINA_OPTS are only read when SECURITY_MANAGER is true (#1147105) + +* Thu Aug 27 2015 Alexander Kurtakov 1:8.0.26-1 +- Update to 8.0.26. + +* Fri Jul 10 2015 Alexander Kurtakov 1:8.0.24-2 +- Update to 8.0.24. + +* Fri Jun 19 2015 Alexander Kurtakov 1:8.0.23-2 +- Drop javax.el:el-api alias. + +* Thu Jun 18 2015 Alexander Kurtakov 1:8.0.23-1 +- Update to 8.0.23. + +* Thu Jun 18 2015 Alexander Kurtakov 1:8.0.20-3 +- Drop jetty alias for servlet. + +* Tue Jun 09 2015 Michal Srb - 1:8.0.20-2 +- Fix metadata for org.apache.tomcat:{tomcat-jni,tomcat-util-scan} + +* Thu Mar 5 2015 Alexander Kurtakov 1:8.0.18-5 +- Rebuild against tomcat-taglibs-standard. + +* Wed Mar 4 2015 Alexander Kurtakov 1:8.0.18-4 +- Fix epoch bumped el_1_0_api that would override all other glassfish/jboss/etc. due to wrong epoch. +- Drop old provides. + +* Tue Mar 03 2015 Stephen Gallagher 1:8.0.18-3 +- Bump epoch to maintain upgrade path from Fedora 22 + +* Mon Feb 16 2015 Michal Srb - 0:8.0.18-2 +- Install POM files for org.apache.tomcat:{tomcat-jni,tomcat-util-scan} + +* Sun Feb 15 2015 Ivan Afonichev 0:8.0.18-1 +- Updated to 8.0.18 + +* Sat Sep 20 2014 Ivan Afonichev 0:8.0.12-1 +- Updated to 8.0.12 +- Substitute libnames in catalina-tasks.xml, resolves: rhbz#1126439 +- Use CATALINA_OPTS only on start, resolves: rhbz#1051194 + +* Mon Jun 16 2014 Michal Srb - 0:7.0.54-3 +- jsp-api requires el-api + +* Sun Jun 08 2014 Fedora Release Engineering - 0:7.0.54-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Thu Jun 5 2014 Alexander Kurtakov 0:7.0.54-1 +- Update to upstream 7.0.54 - fixes compile with Java 8. + +* Wed May 21 2014 Alexander Kurtakov 0:7.0.52-3 +- Drop servlet/el api provides to reduce user machines ending with both. + +* Sun Mar 30 2014 Ivan Afonichev 0:7.0.52-2 +- Don't provide maven javax.jsp:jsp-api and javax.servlet.jsp:javax.servlet.jsp-api resolves: rhbz#1076949 +- Move log4j support into subpackage, resolves: rhbz#1027716 + +* Wed Mar 26 2014 Ivan Afonichev 0:7.0.52-1 +- Updated to 7.0.52 +- Rewrite jsvc implementation, resolves: rhbz#1051743 +- Switch to java-headless R, resolves: rhbz#1068566 +- Create and own %{_localstatedir}/lib/tomcats, resolves: rhbz#1026741 +- Add pom for tomcat-jdbc, resolves: rhbz#1011003 + +* Tue Jan 21 2014 Mikolaj Izdebski - 0:7.0.47-3 +- Fix installation of Maven metadata for tomcat-juli.jar +- Resolves: rhbz#1033664 + +* Wed Jan 15 2014 Stanislav Ochotnicky - 0:7.0.47-2 +- Rebuild for bug #1033664 + +* Sun Nov 03 2013 Ivan Afonichev 0:7.0.47-1 +- Updated to 7.0.47 +- Fix java.security.policy + +* Sun Aug 04 2013 Fedora Release Engineering - 0:7.0.42-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Fri Jul 12 2013 Ivan Afonichev 0:7.0.42-2 +- Remove jpackage-utils R + +* Thu Jul 11 2013 Dmitry Tikhonov 0:7.0.42-1 +- Updated to 7.0.42 + +* Tue Jun 11 2013 Paul Komkoff 0:7.0.40-3 +- Dropped systemv inits. Bye-bye. +- Updated the systemd wrappers to allow running multiple instances. + Added wrapper scripts to do that, ported the original non-named + service file to work with the same wrappers, updated + /usr/sbin/tomcat to call systemctl. + +* Sat May 11 2013 Ivan Afonichev 0:7.0.40-1 +- Updated to 7.0.40 +- Resolves: rhbz 956569 added missing commons-pool link +- Remove ant-nodeps BR + +* Mon Mar 4 2013 Mikolaj Izdebski - 0:7.0.37-2 +- Add depmaps for org.eclipse.jetty.orbit +- Resolves: rhbz#917626 + +* Wed Feb 20 2013 Ivan Afonichev 0:7.0.39-1 +- Updated to 7.0.39 + +* Wed Feb 20 2013 Ivan Afonichev 0:7.0.37-1 +- Updated to 7.0.37 + +* Mon Feb 4 2013 Ivan Afonichev 0:7.0.35-1 +- Updated to 7.0.35 +- systemd SuccessExitStatus=143 for proper stop exit code processing + +* Mon Dec 24 2012 Ivan Afonichev 0:7.0.34-1 +- Updated to 7.0.34 +- ecj >= 4.2.1 now required +- Resolves: rhbz 889395 concat classpath correctly; chdir to $CATALINA_HOME + +* Fri Dec 7 2012 Ivan Afonichev 0:7.0.33-2 +- Resolves: rhbz 883806 refix logdir ownership + +* Sun Dec 2 2012 Ivan Afonichev 0:7.0.33-1 +- Updated to 7.0.33 +- Resolves: rhbz 873620 need chkconfig for update-alternatives + +* Wed Oct 17 2012 Ivan Afonichev 0:7.0.32-1 +- Updated to 7.0.32 +- Resolves: rhbz 842620 symlinks to taglibs + +* Fri Aug 24 2012 Ivan Afonichev 0:7.0.29-1 +- Updated to 7.0.29 +- Add pidfile as tmpfile +- Use systemd for running as unprivileged user +- Resolves: rhbz 847751 upgrade path was broken +- Resolves: rhbz 850343 use new systemd-rpm macros + +* Sat Jul 21 2012 Fedora Release Engineering - 0:7.0.28-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Jul 2 2012 Ivan Afonichev 0:7.0.28-1 +- Updated to 7.0.28 +- Resolves: rhbz 820119 Remove bundled apache-commons-dbcp +- Resolves: rhbz 814900 Added tomcat-coyote POM +- Resolves: rhbz 810775 Remove systemv stuff from %post scriptlet +- Remove redhat-lsb R + +* Mon Apr 9 2012 Ivan Afonichev 0:7.0.27-2 +- Fixed native download hack + +* Sat Apr 7 2012 Ivan Afonichev 0:7.0.27-1 +- Updated to 7.0.27 +- Fixed jakarta-taglibs-standard BR and R + +* Wed Mar 21 2012 Stanislav Ochotnicky - 0:7.0.26-2 +- Add more depmaps to J2EE apis to help jetty/glassfish updates + +* Wed Mar 14 2012 Juan Hernandez 0:7.0.26-2 +- Added the POM files for tomcat-api and tomcat-util (#803495) + +* Wed Feb 22 2012 Ivan Afonichev 0:7.0.26-1 +- Updated to 7.0.26 +- Bug 790334: Change ownership of logdir for logrotate + +* Thu Feb 16 2012 Krzysztof Daniel 0:7.0.25-4 +- Bug 790694: Priorities of jsp, servlet and el packages updated. + +* Wed Feb 8 2012 Krzysztof Daniel 0:7.0.25-3 +- Dropped indirect dependecy to tomcat 5 + +* Sun Jan 22 2012 Ivan Afonichev 0:7.0.25-2 +- Added hack for maven depmap of tomcat-juli absolute link [ -f ] pass correctly + +* Sat Jan 21 2012 Ivan Afonichev 0:7.0.25-1 +- Updated to 7.0.25 +- Removed EntityResolver patch (changes already in upstream sources) +- Place poms and depmaps in the same package as jars +- Added javax.servlet.descriptor to export-package of servlet-api +- Move several chkconfig actions and reqs to systemv subpackage +- New maven depmaps generation method +- Add patch to support java7. (patch sent upstream). +- Require java >= 1:1.6.0 + +* Fri Jan 13 2012 Krzysztof Daniel 0:7.0.23-5 +- Exported javax.servlet.* packages in version 3.0 as 2.6 to make + servlet-api compatible with Eclipse. + +* Thu Jan 12 2012 Ivan Afonichev 0:7.0.23-4 +- Move jsvc support to subpackage + +* Wed Jan 11 2012 Alexander Kurtakov 0:7.0.23-2 +- Add EntityResolver setter patch to jasper for jetty's need. (patch sent upstream). + +* Mon Dec 12 2011 Joseph D. Wagner 0:7.0.23-3 +- Added support to /usr/sbin/tomcat-sysd and /usr/sbin/tomcat for + starting tomcat with jsvc, which allows tomcat to perform some + privileged operations (e.g. bind to a port < 1024) and then switch + identity to a non-privileged user. Must add USE_JSVC="true" to + /etc/tomcat/tomcat.conf or /etc/sysconfig/tomcat. + +* Mon Nov 28 2011 Ivan Afonichev 0:7.0.23-1 +- Updated to 7.0.23 + +* Fri Nov 11 2011 Ivan Afonichev 0:7.0.22-2 +- Move tomcat-juli.jar to lib package +- Drop %%update_maven_depmap as in tomcat6 +- Provide native systemd unit file ported from tomcat6 + +* Thu Oct 6 2011 Ivan Afonichev 0:7.0.22-1 +- Updated to 7.0.22 + +* Mon Oct 03 2011 Rex Dieter - 0:7.0.21-3.1 +- rebuild (java), rel-eng#4932 + +* Mon Sep 26 2011 Ivan Afonichev 0:7.0.21-3 +- Fix basedir mode + +* Tue Sep 20 2011 Roland Grunberg 0:7.0.21-2 +- Add manifests for el-api, jasper-el, jasper, tomcat, and tomcat-juli. + +* Thu Sep 8 2011 Ivan Afonichev 0:7.0.21-1 +- Updated to 7.0.21 + +* Mon Aug 15 2011 Ivan Afonichev 0:7.0.20-3 +- Require java = 1:1.6.0 + +* Mon Aug 15 2011 Ivan Afonichev 0:7.0.20-2 +- Require java < 1.7.0 + +* Mon Aug 15 2011 Ivan Afonichev 0:7.0.20-1 +- Updated to 7.0.20 + +* Tue Jul 26 2011 Ivan Afonichev 0:7.0.19-1 +- Updated to 7.0.19 + +* Tue Jun 21 2011 Ivan Afonichev 0:7.0.16-1 +- Updated to 7.0.16 + +* Mon Jun 6 2011 Ivan Afonichev 0:7.0.14-3 +- Added initial systemd service +- Fix some paths + +* Sat May 21 2011 Ivan Afonichev 0:7.0.14-2 +- Fixed http source link +- Securify some permissions +- Added licenses for el-api and servlet-api +- Added dependency on jpackage-utils for the javadoc subpackage + +* Sat May 14 2011 Ivan Afonichev 0:7.0.14-1 +- Updated to 7.0.14 + +* Thu May 5 2011 Ivan Afonichev 0:7.0.12-4 +- Provided local paths for libs +- Fixed dependencies +- Fixed update temp/work cleanup + +* Mon May 2 2011 Ivan Afonichev 0:7.0.12-3 +- Fixed package groups +- Fixed some permissions +- Fixed some links +- Removed old tomcat6 crap + +* Thu Apr 28 2011 Ivan Afonichev 0:7.0.12-2 +- Package now named just tomcat instead of tomcat7 +- Removed Provides: %{name}-log4j +- Switched to apache-commons-* names instead of jakarta-commons-* . +- Remove the old changelog +- BR/R java >= 1:1.6.0 , same for java-devel +- Removed old tomcat6 crap + +* Wed Apr 27 2011 Ivan Afonichev 0:7.0.12-1 +- Tomcat7 From 623e2f2fe03481f88a4562b4d9b0941b263560f1 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Mon, 21 Aug 2017 10:36:47 -0400 Subject: [PATCH 181/273] Resolves: rhbz#1480620 CVE-2017-7674 tomcat: Cache Poisoning --- sources | 2 +- tomcat.spec | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sources b/sources index a673958..a01c193 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (apache-tomcat-8.0.44-src.tar.gz) = e9b793aeeced1c4bf8e1eabc7717dd839b13cbb886a2e3144fdc37f5ed14b4a0bff2c893221a4b29ccd3270950c1ebb37977588f3743b195c4e33796fad47abe +SHA512 (apache-tomcat-8.0.46-src.tar.gz) = 9adbea9faf61f782ede1c657e833dea55ad1b4a874a1eb9801eab82ac9999de847e7f08ff7a49b3389b9d0683d185c6d4981f9f8d2f607f68c077a682af508d5 diff --git a/tomcat.spec b/tomcat.spec index 54581b7..7460e82 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.3 %global major_version 8 %global minor_version 0 -%global micro_version 44 +%global micro_version 46 %global packdname apache-tomcat-%{version}-src %global servletspec 3.1 %global elspec 3.0 @@ -685,6 +685,10 @@ fi %attr(0660,tomcat,tomcat) %verify(not size md5 mtime) %{logdir}/catalina.out %changelog +* Mon Aug 21 2017 Coty Sutherland - 1:8.0.46-1 +- Update to 8.0.46 +- Resolves: rhbz#1480620 CVE-2017-7674 tomcat: Cache Poisoning + * Thu Jul 27 2017 Fedora Release Engineering - 1:8.0.44-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From 95abd8ee71fad1a8f0ff6956c5b49850420937f2 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Mon, 21 Aug 2017 10:54:20 -0400 Subject: [PATCH 182/273] Release 1 instead of 2 --- tomcat.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tomcat.spec b/tomcat.spec index 7460e82..1c3ed2b 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -57,7 +57,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 2%{?dist} +Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons From c154cf4359e3ad5d5f00523ee3699d05b00c5fea Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Mon, 21 Aug 2017 11:22:17 -0400 Subject: [PATCH 183/273] Adding temporary workaround for add_maven_depmap deprecation --- tomcat.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tomcat.spec b/tomcat.spec index 1c3ed2b..9ff886e 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -100,6 +100,11 @@ BuildRequires: apache-commons-pool BuildRequires: tomcat-taglibs-standard BuildRequires: java-devel >= 1:1.6.0 BuildRequires: jpackage-utils >= 0:1.7.0 +%if 0%{?fedora} >= 27 +# add_maven_depmap is deprecated, using javapackages-local for now +# See https://fedora-java.github.io/howto/latest/#_add_maven_depmap_macro +BuildRequires: javapackages-local +%endif BuildRequires: junit BuildRequires: geronimo-jaxrpc BuildRequires: wsdl4j From 6d9eaa9d4ccce6d690a5b3ad95a2ff182aee8302 Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Thu, 31 Aug 2017 12:09:58 +0000 Subject: [PATCH 184/273] Adding temporary workaround for add_maven_depmap deprecation fed_hash: c154cf4359e3ad5d5f00523ee3699d05b00c5fea --- .gitignore | 2 +- sources | 2 +- tomcat.spec | 14 +++++++++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index baf7889..c2ecc53 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/apache-tomcat-8.0.44-src.tar.gz +/apache-tomcat-8.0.46-src.tar.gz diff --git a/sources b/sources index c8bb84d..3ed023d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b9eccb2c956aabd2c319e91ce308971b apache-tomcat-8.0.44-src.tar.gz +3feaec442115a40dcb068114c500b884 apache-tomcat-8.0.46-src.tar.gz diff --git a/tomcat.spec b/tomcat.spec index 169f6ec..9ff886e 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.3 %global major_version 8 %global minor_version 0 -%global micro_version 44 +%global micro_version 46 %global packdname apache-tomcat-%{version}-src %global servletspec 3.1 %global elspec 3.0 @@ -100,6 +100,11 @@ BuildRequires: apache-commons-pool BuildRequires: tomcat-taglibs-standard BuildRequires: java-devel >= 1:1.6.0 BuildRequires: jpackage-utils >= 0:1.7.0 +%if 0%{?fedora} >= 27 +# add_maven_depmap is deprecated, using javapackages-local for now +# See https://fedora-java.github.io/howto/latest/#_add_maven_depmap_macro +BuildRequires: javapackages-local +%endif BuildRequires: junit BuildRequires: geronimo-jaxrpc BuildRequires: wsdl4j @@ -685,6 +690,13 @@ fi %attr(0660,tomcat,tomcat) %verify(not size md5 mtime) %{logdir}/catalina.out %changelog +* Mon Aug 21 2017 Coty Sutherland - 1:8.0.46-1 +- Update to 8.0.46 +- Resolves: rhbz#1480620 CVE-2017-7674 tomcat: Cache Poisoning + +* Thu Jul 27 2017 Fedora Release Engineering - 1:8.0.44-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Fri Jun 09 2017 Coty Sutherland - 1:8.0.44-1 - Resolves: rhbz#1459160 CVE-2017-5664 tomcat: Security constrained bypass in error page mechanism From f62ae76aa7e9b459ff5262ef3237dcfbba296974 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Wed, 4 Oct 2017 08:57:15 -0400 Subject: [PATCH 185/273] Update to 8.0.47 Resolves: rhbz#1497682 CVE-2017-12617 tomcat: Remote Code Execution bypass for CVE-2017-12615 --- sources | 2 +- tomcat.spec | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sources b/sources index a01c193..6a8aabc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (apache-tomcat-8.0.46-src.tar.gz) = 9adbea9faf61f782ede1c657e833dea55ad1b4a874a1eb9801eab82ac9999de847e7f08ff7a49b3389b9d0683d185c6d4981f9f8d2f607f68c077a682af508d5 +SHA512 (apache-tomcat-8.0.47-src.tar.gz) = 135de73b8ca7d4003fcecc19a17a8a86ab85fc1054e89638d26e57263249438d8e8aebfca0a2791eaec2bc835baa57e6a05b60e11595aa373fdc03e278b31702 diff --git a/tomcat.spec b/tomcat.spec index 9ff886e..d15494a 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.3 %global major_version 8 %global minor_version 0 -%global micro_version 46 +%global micro_version 47 %global packdname apache-tomcat-%{version}-src %global servletspec 3.1 %global elspec 3.0 @@ -690,6 +690,10 @@ fi %attr(0660,tomcat,tomcat) %verify(not size md5 mtime) %{logdir}/catalina.out %changelog +* Wed Oct 04 2017 Coty Sutherland - 1:8.0.47-1 +- Update to 8.0.47 +- Resolves: rhbz#1497682 CVE-2017-12617 tomcat: Remote Code Execution bypass for CVE-2017-12615 + * Mon Aug 21 2017 Coty Sutherland - 1:8.0.46-1 - Update to 8.0.46 - Resolves: rhbz#1480620 CVE-2017-7674 tomcat: Cache Poisoning From 83edb0c5e8499b5ea8a1c41cb38daebc2870b5aa Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Tue, 24 Oct 2017 10:12:21 -0500 Subject: [PATCH 186/273] Change "zip -u" to "zip" Resolves: rhbz#1495241 [tomcat] zip -u in spec file causes race condition --- tomcat.spec | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index d15494a..bc48119 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -57,7 +57,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -299,25 +299,25 @@ popd mkdir -p META-INF cp -p %{SOURCE8} META-INF/MANIFEST.MF touch META-INF/MANIFEST.MF -zip -u output/build/lib/servlet-api.jar META-INF/MANIFEST.MF +zip output/build/lib/servlet-api.jar META-INF/MANIFEST.MF cp -p %{SOURCE9} META-INF/MANIFEST.MF touch META-INF/MANIFEST.MF -zip -u output/build/lib/jsp-api.jar META-INF/MANIFEST.MF +zip output/build/lib/jsp-api.jar META-INF/MANIFEST.MF cp -p %{SOURCE12} META-INF/MANIFEST.MF touch META-INF/MANIFEST.MF -zip -u output/build/lib/el-api.jar META-INF/MANIFEST.MF +zip output/build/lib/el-api.jar META-INF/MANIFEST.MF cp -p %{SOURCE13} META-INF/MANIFEST.MF touch META-INF/MANIFEST.MF -zip -u output/build/lib/jasper-el.jar META-INF/MANIFEST.MF +zip output/build/lib/jasper-el.jar META-INF/MANIFEST.MF cp -p %{SOURCE14} META-INF/MANIFEST.MF touch META-INF/MANIFEST.MF -zip -u output/build/lib/jasper.jar META-INF/MANIFEST.MF +zip output/build/lib/jasper.jar META-INF/MANIFEST.MF cp -p %{SOURCE15} META-INF/MANIFEST.MF touch META-INF/MANIFEST.MF -zip -u output/build/lib/tomcat-api.jar META-INF/MANIFEST.MF +zip output/build/lib/tomcat-api.jar META-INF/MANIFEST.MF cp -p %{SOURCE16} META-INF/MANIFEST.MF touch META-INF/MANIFEST.MF -zip -u output/build/bin/tomcat-juli.jar META-INF/MANIFEST.MF +zip output/build/bin/tomcat-juli.jar META-INF/MANIFEST.MF %install # build initial path structure @@ -690,6 +690,10 @@ fi %attr(0660,tomcat,tomcat) %verify(not size md5 mtime) %{logdir}/catalina.out %changelog +* Tue Oct 24 2017 Troy Dawson - 1:8.0.47-2 +- Change "zip -u" to "zip" +- Resolves: rhbz#1495241 [tomcat] zip -u in spec file causes race condition + * Wed Oct 04 2017 Coty Sutherland - 1:8.0.47-1 - Update to 8.0.47 - Resolves: rhbz#1497682 CVE-2017-12617 tomcat: Remote Code Execution bypass for CVE-2017-12615 From 0f426bcf0e3cc25862cdf46c4f32999b6d093401 Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Tue, 24 Oct 2017 15:46:52 +0000 Subject: [PATCH 187/273] Change "zip -u" to "zip" Resolves: rhbz#1495241 [tomcat] zip -u in spec file causes race condition fed_hash: 83edb0c5e8499b5ea8a1c41cb38daebc2870b5aa --- .gitignore | 2 +- sources | 2 +- tomcat.spec | 26 +++++++++++++++++--------- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index c2ecc53..bcdc0f5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/apache-tomcat-8.0.46-src.tar.gz +/apache-tomcat-8.0.47-src.tar.gz diff --git a/sources b/sources index 3ed023d..e52a65e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3feaec442115a40dcb068114c500b884 apache-tomcat-8.0.46-src.tar.gz +9f28b75bcb96ebf3b9fe118aab0df6f6 apache-tomcat-8.0.47-src.tar.gz diff --git a/tomcat.spec b/tomcat.spec index 9ff886e..bc48119 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.3 %global major_version 8 %global minor_version 0 -%global micro_version 46 +%global micro_version 47 %global packdname apache-tomcat-%{version}-src %global servletspec 3.1 %global elspec 3.0 @@ -57,7 +57,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -299,25 +299,25 @@ popd mkdir -p META-INF cp -p %{SOURCE8} META-INF/MANIFEST.MF touch META-INF/MANIFEST.MF -zip -u output/build/lib/servlet-api.jar META-INF/MANIFEST.MF +zip output/build/lib/servlet-api.jar META-INF/MANIFEST.MF cp -p %{SOURCE9} META-INF/MANIFEST.MF touch META-INF/MANIFEST.MF -zip -u output/build/lib/jsp-api.jar META-INF/MANIFEST.MF +zip output/build/lib/jsp-api.jar META-INF/MANIFEST.MF cp -p %{SOURCE12} META-INF/MANIFEST.MF touch META-INF/MANIFEST.MF -zip -u output/build/lib/el-api.jar META-INF/MANIFEST.MF +zip output/build/lib/el-api.jar META-INF/MANIFEST.MF cp -p %{SOURCE13} META-INF/MANIFEST.MF touch META-INF/MANIFEST.MF -zip -u output/build/lib/jasper-el.jar META-INF/MANIFEST.MF +zip output/build/lib/jasper-el.jar META-INF/MANIFEST.MF cp -p %{SOURCE14} META-INF/MANIFEST.MF touch META-INF/MANIFEST.MF -zip -u output/build/lib/jasper.jar META-INF/MANIFEST.MF +zip output/build/lib/jasper.jar META-INF/MANIFEST.MF cp -p %{SOURCE15} META-INF/MANIFEST.MF touch META-INF/MANIFEST.MF -zip -u output/build/lib/tomcat-api.jar META-INF/MANIFEST.MF +zip output/build/lib/tomcat-api.jar META-INF/MANIFEST.MF cp -p %{SOURCE16} META-INF/MANIFEST.MF touch META-INF/MANIFEST.MF -zip -u output/build/bin/tomcat-juli.jar META-INF/MANIFEST.MF +zip output/build/bin/tomcat-juli.jar META-INF/MANIFEST.MF %install # build initial path structure @@ -690,6 +690,14 @@ fi %attr(0660,tomcat,tomcat) %verify(not size md5 mtime) %{logdir}/catalina.out %changelog +* Tue Oct 24 2017 Troy Dawson - 1:8.0.47-2 +- Change "zip -u" to "zip" +- Resolves: rhbz#1495241 [tomcat] zip -u in spec file causes race condition + +* Wed Oct 04 2017 Coty Sutherland - 1:8.0.47-1 +- Update to 8.0.47 +- Resolves: rhbz#1497682 CVE-2017-12617 tomcat: Remote Code Execution bypass for CVE-2017-12615 + * Mon Aug 21 2017 Coty Sutherland - 1:8.0.46-1 - Update to 8.0.46 - Resolves: rhbz#1480620 CVE-2017-7674 tomcat: Cache Poisoning From 56956f7ea70830091dae66580cbcd9616683cf00 Mon Sep 17 00:00:00 2001 From: Merlin Mathesius Date: Tue, 12 Dec 2017 09:14:28 -0600 Subject: [PATCH 188/273] Cleanup spec file conditionals --- tomcat.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index bc48119..151572f 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -57,7 +57,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -100,7 +100,7 @@ BuildRequires: apache-commons-pool BuildRequires: tomcat-taglibs-standard BuildRequires: java-devel >= 1:1.6.0 BuildRequires: jpackage-utils >= 0:1.7.0 -%if 0%{?fedora} >= 27 +%if 0%{?fedora} >= 27 || 0%{?rhel} > 7 # add_maven_depmap is deprecated, using javapackages-local for now # See https://fedora-java.github.io/howto/latest/#_add_maven_depmap_macro BuildRequires: javapackages-local @@ -690,6 +690,9 @@ fi %attr(0660,tomcat,tomcat) %verify(not size md5 mtime) %{logdir}/catalina.out %changelog +* Tue Dec 12 2017 Merlin Mathesius - 1:8.0.47-3 +- Cleanup spec file conditionals + * Tue Oct 24 2017 Troy Dawson - 1:8.0.47-2 - Change "zip -u" to "zip" - Resolves: rhbz#1495241 [tomcat] zip -u in spec file causes race condition From 57d43b18e2d5038bc8f347ec0645c6daf761044f Mon Sep 17 00:00:00 2001 From: Merlin Mathesius Date: Tue, 12 Dec 2017 09:44:34 -0600 Subject: [PATCH 189/273] Cleanup spec file conditionals fed_hash: 56956f7ea70830091dae66580cbcd9616683cf00 --- tomcat.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index bc48119..151572f 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -57,7 +57,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -100,7 +100,7 @@ BuildRequires: apache-commons-pool BuildRequires: tomcat-taglibs-standard BuildRequires: java-devel >= 1:1.6.0 BuildRequires: jpackage-utils >= 0:1.7.0 -%if 0%{?fedora} >= 27 +%if 0%{?fedora} >= 27 || 0%{?rhel} > 7 # add_maven_depmap is deprecated, using javapackages-local for now # See https://fedora-java.github.io/howto/latest/#_add_maven_depmap_macro BuildRequires: javapackages-local @@ -690,6 +690,9 @@ fi %attr(0660,tomcat,tomcat) %verify(not size md5 mtime) %{logdir}/catalina.out %changelog +* Tue Dec 12 2017 Merlin Mathesius - 1:8.0.47-3 +- Cleanup spec file conditionals + * Tue Oct 24 2017 Troy Dawson - 1:8.0.47-2 - Change "zip -u" to "zip" - Resolves: rhbz#1495241 [tomcat] zip -u in spec file causes race condition From d28664612bf8b2e289b913b158bd22985adec7e1 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Thu, 1 Feb 2018 08:48:31 -0500 Subject: [PATCH 190/273] Update to 8.0.49 --- sources | 2 +- tomcat.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 6a8aabc..dd38972 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (apache-tomcat-8.0.47-src.tar.gz) = 135de73b8ca7d4003fcecc19a17a8a86ab85fc1054e89638d26e57263249438d8e8aebfca0a2791eaec2bc835baa57e6a05b60e11595aa373fdc03e278b31702 +SHA512 (apache-tomcat-8.0.49-src.tar.gz) = 36ae75d37874430ea6b567d8415a9249f104b57afdd8689621f659f6a2c0b229f207e63cdcdfacb1eabd13af567295ff1335cb052abbefe46efdccc20f2d5a73 diff --git a/tomcat.spec b/tomcat.spec index bc48119..8e47d5a 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.3 %global major_version 8 %global minor_version 0 -%global micro_version 47 +%global micro_version 49 %global packdname apache-tomcat-%{version}-src %global servletspec 3.1 %global elspec 3.0 @@ -690,6 +690,9 @@ fi %attr(0660,tomcat,tomcat) %verify(not size md5 mtime) %{logdir}/catalina.out %changelog +* Thu Feb 01 2018 Coty Sutherland - 1:8.0.49-1 +- Update to 8.0.49 + * Tue Oct 24 2017 Troy Dawson - 1:8.0.47-2 - Change "zip -u" to "zip" - Resolves: rhbz#1495241 [tomcat] zip -u in spec file causes race condition From 586be331e6003e9d45b59d84227ac8ca5e48c091 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Thu, 1 Feb 2018 08:54:42 -0500 Subject: [PATCH 191/273] Fix release for rebase --- tomcat.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tomcat.spec b/tomcat.spec index 15665b0..54cf6b6 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -57,7 +57,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 3%{?dist} +Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons From cf8509a357eb5f53b259d20610a65e99b7e6d5d0 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Thu, 1 Feb 2018 10:09:27 -0500 Subject: [PATCH 192/273] The tomcat-native binary is no longer copied to bin. See http://svn.apache.org/r1818186 for more details --- tomcat.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index 54cf6b6..0a4c8d9 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -285,8 +285,6 @@ export OPT_JAR_LIST="xalan-j2-serializer" %{__rm} output/build/bin/commons-daemon.jar \ output/build/lib/ecj.jar - # remove the cruft we created - %{__rm} output/build/bin/tomcat-native.tar.gz pushd output/dist/src/webapps/docs/appdev/sample/src %{__mkdir_p} ../web/WEB-INF/classes %{javac} -cp ../../../../../../../../output/build/lib/servlet-api.jar -d ../web/WEB-INF/classes mypackage/Hello.java From 5a99f40808043c75ef74fc93fcce0d5e78d829e0 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Fri, 9 Feb 2018 09:06:26 +0100 Subject: [PATCH 193/273] Escape macros in %changelog Reference: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/Y2ZUKK2B7T2IKXPMODNF6HB2O5T5TS6H/ Signed-off-by: Igor Gnatenko --- tomcat.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index 0a4c8d9..ba7c74b 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -57,7 +57,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -688,6 +688,9 @@ fi %attr(0660,tomcat,tomcat) %verify(not size md5 mtime) %{logdir}/catalina.out %changelog +* Fri Feb 09 2018 Igor Gnatenko - 1:8.0.49-2 +- Escape macros in %%changelog + * Thu Feb 01 2018 Coty Sutherland - 1:8.0.49-1 - Update to 8.0.49 @@ -841,7 +844,7 @@ fi - Updated to 7.0.52 - Rewrite jsvc implementation, resolves: rhbz#1051743 - Switch to java-headless R, resolves: rhbz#1068566 -- Create and own %{_localstatedir}/lib/tomcats, resolves: rhbz#1026741 +- Create and own %%{_localstatedir}/lib/tomcats, resolves: rhbz#1026741 - Add pom for tomcat-jdbc, resolves: rhbz#1011003 * Tue Jan 21 2014 Mikolaj Izdebski - 0:7.0.47-3 @@ -920,7 +923,7 @@ fi - Updated to 7.0.28 - Resolves: rhbz 820119 Remove bundled apache-commons-dbcp - Resolves: rhbz 814900 Added tomcat-coyote POM -- Resolves: rhbz 810775 Remove systemv stuff from %post scriptlet +- Resolves: rhbz 810775 Remove systemv stuff from %%post scriptlet - Remove redhat-lsb R * Mon Apr 9 2012 Ivan Afonichev 0:7.0.27-2 @@ -1040,7 +1043,7 @@ fi * Thu Apr 28 2011 Ivan Afonichev 0:7.0.12-2 - Package now named just tomcat instead of tomcat7 -- Removed Provides: %{name}-log4j +- Removed Provides: %%{name}-log4j - Switched to apache-commons-* names instead of jakarta-commons-* . - Remove the old changelog - BR/R java >= 1:1.6.0 , same for java-devel From dad1e77dc2f2662a5117513a37419b59ecd01dff Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Thu, 15 Mar 2018 12:57:12 -0400 Subject: [PATCH 194/273] Rebase to 8.5.29! Finally :) --- tomcat.spec | 62 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 24 deletions(-) diff --git a/tomcat.spec b/tomcat.spec index ba7c74b..0e3d384 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -30,14 +30,14 @@ %global jspspec 2.3 %global major_version 8 -%global minor_version 0 -%global micro_version 49 +%global minor_version 5 +%global micro_version 29 %global packdname apache-tomcat-%{version}-src %global servletspec 3.1 %global elspec 3.0 %global tcuid 91 -#Recommended version is specified in java/org/apache/catalina/core/AprLifecycleListener.java -%global native_version 1.1.33 +# Recommended version is specified in java/org/apache/catalina/core/AprLifecycleListener.java +%global native_version 1.2.8 # FHS 2.3 compliant tree structure - http://www.pathname.com/fhs/2.3/ @@ -54,10 +54,16 @@ %global _initrddir %{_sysconfdir}/init.d %global _systemddir /lib/systemd/system +# Fedora doesn't seem to have this macro, so we define it if it doesn't exist +%{!?_mavendepmapfragdir: %global _mavendepmapfragdir /usr/share/maven-metadata} +# Fedora 24 erroneously uses %%{_datadir}/maven-fragments instead of /maven-metadata for some reason... +# Override the mavendepmapfragdir var on fc24 +%{?fc24: %global _mavendepmapfragdir /usr/share/maven-metadata} + Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 2%{?dist} +Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -109,8 +115,8 @@ BuildRequires: junit BuildRequires: geronimo-jaxrpc BuildRequires: wsdl4j BuildRequires: systemd-units + Requires: apache-commons-daemon -Requires: apache-commons-logging Requires: apache-commons-collections Requires: apache-commons-dbcp Requires: apache-commons-pool @@ -176,7 +182,7 @@ which allows tomcat to perform some privileged operations %package jsp-%{jspspec}-api Group: Development/Libraries -Summary: Apache Tomcat JSP API implementation classes +Summary: Apache Tomcat JavaServer Pages v%{jspspec} API Implementation Classes Provides: jsp = %{jspspec} Obsoletes: %{name}-jsp-2.2-api Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} @@ -185,7 +191,7 @@ Requires(post): chkconfig Requires(postun): chkconfig %description jsp-%{jspspec}-api -Apache Tomcat JSP API implementation classes. +Apache Tomcat JSP API Implementation Classes. %package lib Group: Development/Libraries @@ -204,7 +210,7 @@ Libraries needed to run the Tomcat Web container. %package servlet-%{servletspec}-api Group: Development/Libraries -Summary: Apache Tomcat Servlet API implementation classes +Summary: Apache Tomcat Java Servlet v%{servletspec} API Implementation Classes Provides: servlet = %{servletspec} Provides: servlet6 Provides: servlet3 @@ -213,18 +219,18 @@ Requires(post): chkconfig Requires(postun): chkconfig %description servlet-%{servletspec}-api -Apache Tomcat Servlet API implementation classes. +Apache Tomcat Servlet API Implementation Classes. %package el-%{elspec}-api Group: Development/Libraries -Summary: Expression Language v%{elspec} API +Summary: Apache Tomcat Expression Language v%{elspec} API Implementation Classes Provides: el_api = %{elspec} Obsoletes: %{name}-el-2.2-api Requires(post): chkconfig Requires(postun): chkconfig %description el-%{elspec}-api -Expression Language %{elspec}. +Apache Tomcat EL API Implementation Classes. %package webapps Group: Applications/Internet @@ -254,9 +260,6 @@ export OPT_JAR_LIST="xalan-j2-serializer" # tomcat-dbcp.jar with apache-commons-{collections,dbcp,pool}-tomcat5.jar # so just create a dummy file for later removal touch HACK - %{__mkdir_p} HACKDIR - touch HACKDIR/build.xml - touch HACKDIR/LICENSE # who needs a build.properties file anyway %{ant} -Dbase.path="." \ @@ -264,27 +267,22 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dcommons-collections.jar="$(build-classpath apache-commons-collections)" \ -Dcommons-daemon.jar="$(build-classpath apache-commons-daemon)" \ -Dcommons-daemon.native.src.tgz="HACK" \ - -Djasper-jdt.jar="$(build-classpath ecj)" \ -Djdt.jar="$(build-classpath ecj)" \ -Dtomcat-native.tar.gz="HACK" \ -Dtomcat-native.home="." \ - -Dtomcat-native.win.path="HACKDIR" \ -Dcommons-daemon.native.win.mgr.exe="HACK" \ -Dnsis.exe="HACK" \ -Djaxrpc-lib.jar="$(build-classpath jaxrpc)" \ -Dwsdl4j-lib.jar="$(build-classpath wsdl4j)" \ - -Dcommons-pool.home="HACKDIR" \ - -Dcommons-dbcp.home="HACKDIR" \ -Dno.build.dbcp=true \ -Dversion="%{version}" \ -Dversion.build="%{micro_version}" \ -Djava.7.home=%{java_home} \ + -Dexecute.validate=false \ deploy dist-prepare dist-source javadoc # remove some jars that we'll replace with symlinks later - %{__rm} output/build/bin/commons-daemon.jar \ - output/build/lib/ecj.jar - + %{__rm} output/build/bin/commons-daemon.jar output/build/lib/ecj.jar pushd output/dist/src/webapps/docs/appdev/sample/src %{__mkdir_p} ../web/WEB-INF/classes %{javac} -cp ../../../../../../../../output/build/lib/servlet-api.jar -d ../web/WEB-INF/classes mypackage/Hello.java @@ -346,7 +344,7 @@ zip output/build/bin/tomcat-juli.jar META-INF/MANIFEST.MF # First copy supporting libs to tomcat lib pushd output/build %{__cp} -a bin/*.{jar,xml} ${RPM_BUILD_ROOT}%{bindir} - %{__cp} -a conf/*.{policy,properties,xml} ${RPM_BUILD_ROOT}%{confdir} + %{__cp} -a conf/*.{policy,properties,xml,xsd} ${RPM_BUILD_ROOT}%{confdir} %{__cp} -a lib/*.jar ${RPM_BUILD_ROOT}%{libdir} %{__cp} -a webapps/* ${RPM_BUILD_ROOT}%{appdir} popd @@ -524,6 +522,10 @@ done %{__cp} -a tomcat-websocket.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-websocket.pom %add_maven_depmap JPP.%{name}-tomcat-websocket.pom %{name}/tomcat-websocket.jar +# tomcat-jaspic-api +%{__cp} -a tomcat-jaspic-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-jaspic-api.pom +%add_maven_depmap JPP.%{name}-jaspic-api.pom %{name}/jaspic-api.jar + %pre # add the tomcat user and group @@ -616,6 +618,9 @@ fi %config(noreplace) %{confdir}/context.xml %config(noreplace) %{confdir}/server.xml %attr(0640,root,tomcat) %config(noreplace) %{confdir}/tomcat-users.xml +%attr(0664,root,tomcat) %{confdir}/tomcat-users.xsd +%attr(0664,root,tomcat) %config(noreplace) %{confdir}/jaspic-providers.xml +%attr(0664,root,tomcat) %{confdir}/jaspic-providers.xsd %config(noreplace) %{confdir}/web.xml %dir %{homedir} %{bindir}/bootstrap.jar @@ -646,7 +651,9 @@ fi %files lib -f output/dist/src/res/maven/.mfiles-tomcat-lib %defattr(-,root,root,-) -%{libdir} +%dir %{libdir} +%{libdir}/*.jar +%{_javadir}/*.jar %{bindir}/tomcat-juli.jar %{_mavenpomdir}/JPP.%{name}-annotations-api.pom %{_mavenpomdir}/JPP.%{name}-catalina-ha.pom @@ -661,8 +668,12 @@ fi %{_mavenpomdir}/JPP.%{name}-tomcat-jdbc.pom %{_mavenpomdir}/JPP.%{name}-websocket-api.pom %{_mavenpomdir}/JPP.%{name}-tomcat-websocket.pom +%{_mavenpomdir}/JPP.%{name}-jaspic-api.pom %{_datadir}/maven-metadata/tomcat.xml %exclude %{libdir}/%{name}-el-%{elspec}-api.jar +%exclude %{_javadir}/%{name}-servlet-%{servletspec}*.jar +%exclude %{_javadir}/%{name}-el-%{elspec}-api.jar +%exclude %{_javadir}/%{name}-jsp-%{jspspec}*.jar %files servlet-%{servletspec}-api -f output/dist/src/res/maven/.mfiles-tomcat-servlet-api %defattr(-,root,root,-) @@ -688,6 +699,9 @@ fi %attr(0660,tomcat,tomcat) %verify(not size md5 mtime) %{logdir}/catalina.out %changelog +* Thu Mar 15 2018 Coty Sutherland - 1:8.5.29-1 +- Update to 8.5.29 + * Fri Feb 09 2018 Igor Gnatenko - 1:8.0.49-2 - Escape macros in %%changelog From 7b1948b119d979a5deef9e8b62dfa1021f74f6f4 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Thu, 15 Mar 2018 12:59:10 -0400 Subject: [PATCH 195/273] Adding sources for 8.5.29 --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index dd38972..892cf01 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (apache-tomcat-8.0.49-src.tar.gz) = 36ae75d37874430ea6b567d8415a9249f104b57afdd8689621f659f6a2c0b229f207e63cdcdfacb1eabd13af567295ff1335cb052abbefe46efdccc20f2d5a73 +SHA512 (apache-tomcat-8.5.29-src.tar.gz) = af3827642cfc9a5a4a6e1e802537e0ccecb002b330ffedafb0106cf2f4ff4999374248636cff29a2d73b2c46fc00acd3b81f4e27003ac8883e70643d426f6490 From 1f223663ca02d2b746b669e3e356e072b6f925b3 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Thu, 15 Mar 2018 13:05:24 -0400 Subject: [PATCH 196/273] Forgot to rename service scripts, etc for the 8.5 rebase --- ...ap-MANIFEST.MF.patch => tomcat-8.5-bootstrap-MANIFEST.MF.patch | 0 ...-8.0-catalina-policy.patch => tomcat-8.5-catalina-policy.patch | 0 tomcat-8.0-digest.script => tomcat-8.5-digest.script | 0 tomcat-8.0-jsvc.service => tomcat-8.5-jsvc.service | 0 tomcat-8.0-log4j.properties => tomcat-8.5-log4j.properties | 0 ...cat-users-webapp.patch => tomcat-8.5-tomcat-users-webapp.patch | 0 tomcat-8.0-tool-wrapper.script => tomcat-8.5-tool-wrapper.script | 0 tomcat-8.0.conf => tomcat-8.5.conf | 0 tomcat-8.0.logrotate => tomcat-8.5.logrotate | 0 tomcat-8.0.service => tomcat-8.5.service | 0 tomcat-8.0.sysconfig => tomcat-8.5.sysconfig | 0 tomcat-8.0.wrapper => tomcat-8.5.wrapper | 0 12 files changed, 0 insertions(+), 0 deletions(-) rename tomcat-8.0-bootstrap-MANIFEST.MF.patch => tomcat-8.5-bootstrap-MANIFEST.MF.patch (100%) rename tomcat-8.0-catalina-policy.patch => tomcat-8.5-catalina-policy.patch (100%) rename tomcat-8.0-digest.script => tomcat-8.5-digest.script (100%) rename tomcat-8.0-jsvc.service => tomcat-8.5-jsvc.service (100%) rename tomcat-8.0-log4j.properties => tomcat-8.5-log4j.properties (100%) rename tomcat-8.0-tomcat-users-webapp.patch => tomcat-8.5-tomcat-users-webapp.patch (100%) rename tomcat-8.0-tool-wrapper.script => tomcat-8.5-tool-wrapper.script (100%) rename tomcat-8.0.conf => tomcat-8.5.conf (100%) rename tomcat-8.0.logrotate => tomcat-8.5.logrotate (100%) rename tomcat-8.0.service => tomcat-8.5.service (100%) rename tomcat-8.0.sysconfig => tomcat-8.5.sysconfig (100%) rename tomcat-8.0.wrapper => tomcat-8.5.wrapper (100%) diff --git a/tomcat-8.0-bootstrap-MANIFEST.MF.patch b/tomcat-8.5-bootstrap-MANIFEST.MF.patch similarity index 100% rename from tomcat-8.0-bootstrap-MANIFEST.MF.patch rename to tomcat-8.5-bootstrap-MANIFEST.MF.patch diff --git a/tomcat-8.0-catalina-policy.patch b/tomcat-8.5-catalina-policy.patch similarity index 100% rename from tomcat-8.0-catalina-policy.patch rename to tomcat-8.5-catalina-policy.patch diff --git a/tomcat-8.0-digest.script b/tomcat-8.5-digest.script similarity index 100% rename from tomcat-8.0-digest.script rename to tomcat-8.5-digest.script diff --git a/tomcat-8.0-jsvc.service b/tomcat-8.5-jsvc.service similarity index 100% rename from tomcat-8.0-jsvc.service rename to tomcat-8.5-jsvc.service diff --git a/tomcat-8.0-log4j.properties b/tomcat-8.5-log4j.properties similarity index 100% rename from tomcat-8.0-log4j.properties rename to tomcat-8.5-log4j.properties diff --git a/tomcat-8.0-tomcat-users-webapp.patch b/tomcat-8.5-tomcat-users-webapp.patch similarity index 100% rename from tomcat-8.0-tomcat-users-webapp.patch rename to tomcat-8.5-tomcat-users-webapp.patch diff --git a/tomcat-8.0-tool-wrapper.script b/tomcat-8.5-tool-wrapper.script similarity index 100% rename from tomcat-8.0-tool-wrapper.script rename to tomcat-8.5-tool-wrapper.script diff --git a/tomcat-8.0.conf b/tomcat-8.5.conf similarity index 100% rename from tomcat-8.0.conf rename to tomcat-8.5.conf diff --git a/tomcat-8.0.logrotate b/tomcat-8.5.logrotate similarity index 100% rename from tomcat-8.0.logrotate rename to tomcat-8.5.logrotate diff --git a/tomcat-8.0.service b/tomcat-8.5.service similarity index 100% rename from tomcat-8.0.service rename to tomcat-8.5.service diff --git a/tomcat-8.0.sysconfig b/tomcat-8.5.sysconfig similarity index 100% rename from tomcat-8.0.sysconfig rename to tomcat-8.5.sysconfig diff --git a/tomcat-8.0.wrapper b/tomcat-8.5.wrapper similarity index 100% rename from tomcat-8.0.wrapper rename to tomcat-8.5.wrapper From 62602785bea662cc492ddcfd70462e047267a355 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Thu, 15 Mar 2018 13:52:10 -0400 Subject: [PATCH 197/273] Disable failOnWarning so that javadoc won't fail the build --- disableJavadocFailOnWarning.patch | 47 +++++++++++++++++++++++++++++++ tomcat.spec | 2 ++ 2 files changed, 49 insertions(+) create mode 100644 disableJavadocFailOnWarning.patch diff --git a/disableJavadocFailOnWarning.patch b/disableJavadocFailOnWarning.patch new file mode 100644 index 0000000..03d03c5 --- /dev/null +++ b/disableJavadocFailOnWarning.patch @@ -0,0 +1,47 @@ +--- build.xml.orig 2018-03-15 13:49:03.366863009 -0400 ++++ build.xml 2018-03-15 13:49:29.690870139 -0400 +@@ -1777,7 +1777,7 @@ Apache Tomcat ${version} native binaries + additionalparam="-breakiterator -notimestamp" + maxmemory="512m" + failonerror="true" +- failonwarning="true"> ++ failonwarning="false"> + + + +@@ -1798,7 +1798,7 @@ Apache Tomcat ${version} native binaries + additionalparam="-breakiterator -notimestamp" + maxmemory="512m" + failonerror="true" +- failonwarning="true"> ++ failonwarning="false"> + + + +@@ -1819,7 +1819,7 @@ Apache Tomcat ${version} native binaries + additionalparam="-breakiterator -notimestamp" + maxmemory="512m" + failonerror="true" +- failonwarning="true"> ++ failonwarning="false"> + + + +@@ -1840,7 +1840,7 @@ Apache Tomcat ${version} native binaries + additionalparam="-breakiterator -notimestamp" + maxmemory="512m" + failonerror="true" +- failonwarning="true"> ++ failonwarning="false"> + + + +@@ -1860,7 +1860,7 @@ Apache Tomcat ${version} native binaries + additionalparam="-breakiterator -notimestamp ${java9.add.modules}" + maxmemory="512m" + failonerror="true" +- failonwarning="true"> ++ failonwarning="false"> + + + diff --git a/tomcat.spec b/tomcat.spec index 0e3d384..e19394c 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -93,6 +93,7 @@ Source32: tomcat-named.service Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch Patch2: %{name}-8.0.36-CompilerOptionsV9.patch +Patch3: disableJavadocFailOnWarning.patch BuildArch: noarch @@ -250,6 +251,7 @@ find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name " %patch0 -p0 %patch1 -p0 %patch2 -p0 +%patch3 -p0 %{__ln_s} $(build-classpath tomcat-taglibs-standard/taglibs-standard-impl) webapps/examples/WEB-INF/lib/jstl.jar %{__ln_s} $(build-classpath tomcat-taglibs-standard/taglibs-standard-compat) webapps/examples/WEB-INF/lib/standard.jar From 6a221faa6283ee8773131475ee4794fcf91ee219 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 16 Mar 2018 11:27:50 -0400 Subject: [PATCH 198/273] Forgot to add changelog entires for the CVEs --- tomcat.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tomcat.spec b/tomcat.spec index e19394c..7fe827e 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -703,6 +703,8 @@ fi %changelog * Thu Mar 15 2018 Coty Sutherland - 1:8.5.29-1 - Update to 8.5.29 +- Resolves: rhbz#1548290 CVE-2018-1304 tomcat: Incorrect handling of empty string URL in security constraints can lead to unitended exposure of resources +- Resolves: rhbz#1548284 CVE-2018-1305 tomcat: Late application of security constraints can lead to resource exposure for unauthorised users * Fri Feb 09 2018 Igor Gnatenko - 1:8.0.49-2 - Escape macros in %%changelog From 8703348dd0ba4659820f9130f59bf48da61d9cdd Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 1 May 2018 09:50:01 -0400 Subject: [PATCH 199/273] Update to 8.5.30 --- sources | 2 +- tomcat.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 892cf01..927322b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (apache-tomcat-8.5.29-src.tar.gz) = af3827642cfc9a5a4a6e1e802537e0ccecb002b330ffedafb0106cf2f4ff4999374248636cff29a2d73b2c46fc00acd3b81f4e27003ac8883e70643d426f6490 +SHA512 (apache-tomcat-8.5.30-src.tar.gz) = 53729cfd1859872109f816df2642e3cd776a7faf8c55b1d50df0459f12958aacbf36debe6e8f10c19ab0a5bb2973fa63a2fec57f83ecaf19f4cf9d82e4a20265 diff --git a/tomcat.spec b/tomcat.spec index 7fe827e..3ab4438 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -31,7 +31,7 @@ %global jspspec 2.3 %global major_version 8 %global minor_version 5 -%global micro_version 29 +%global micro_version 30 %global packdname apache-tomcat-%{version}-src %global servletspec 3.1 %global elspec 3.0 @@ -701,6 +701,9 @@ fi %attr(0660,tomcat,tomcat) %verify(not size md5 mtime) %{logdir}/catalina.out %changelog +* Tue May 01 2018 Coty Sutherland - 1:8.5.30-1 +- Update to 8.5.30 + * Thu Mar 15 2018 Coty Sutherland - 1:8.5.29-1 - Update to 8.5.29 - Resolves: rhbz#1548290 CVE-2018-1304 tomcat: Incorrect handling of empty string URL in security constraints can lead to unitended exposure of resources From b806b35b9562859b4cc48adcf4aa3719f934d70e Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 8 Jun 2018 14:57:09 -0400 Subject: [PATCH 200/273] First stab at creating the single RPM distribution for FreeIPA --- tomcat-8.5-jsvc.service | 22 - tomcat-8.5.logrotate | 8 - ... => tomcat-9.0-bootstrap-MANIFEST.MF.patch | 0 ....patch => tomcat-9.0-catalina-policy.patch | 0 ...-digest.script => tomcat-9.0-digest.script | 0 ....properties => tomcat-9.0-log4j.properties | 0 ...ch => tomcat-9.0-tomcat-users-webapp.patch | 0 ...r.script => tomcat-9.0-tool-wrapper.script | 0 tomcat-8.5.conf => tomcat-9.0.conf | 0 tomcat-8.5.service => tomcat-9.0.service | 0 tomcat-8.5.sysconfig => tomcat-9.0.sysconfig | 0 tomcat-8.5.wrapper => tomcat-9.0.wrapper | 0 tomcat.spec | 669 ++---------------- 13 files changed, 57 insertions(+), 642 deletions(-) delete mode 100644 tomcat-8.5-jsvc.service delete mode 100644 tomcat-8.5.logrotate rename tomcat-8.5-bootstrap-MANIFEST.MF.patch => tomcat-9.0-bootstrap-MANIFEST.MF.patch (100%) rename tomcat-8.5-catalina-policy.patch => tomcat-9.0-catalina-policy.patch (100%) rename tomcat-8.5-digest.script => tomcat-9.0-digest.script (100%) rename tomcat-8.5-log4j.properties => tomcat-9.0-log4j.properties (100%) rename tomcat-8.5-tomcat-users-webapp.patch => tomcat-9.0-tomcat-users-webapp.patch (100%) rename tomcat-8.5-tool-wrapper.script => tomcat-9.0-tool-wrapper.script (100%) rename tomcat-8.5.conf => tomcat-9.0.conf (100%) rename tomcat-8.5.service => tomcat-9.0.service (100%) rename tomcat-8.5.sysconfig => tomcat-9.0.sysconfig (100%) rename tomcat-8.5.wrapper => tomcat-9.0.wrapper (100%) diff --git a/tomcat-8.5-jsvc.service b/tomcat-8.5-jsvc.service deleted file mode 100644 index f480324..0000000 --- a/tomcat-8.5-jsvc.service +++ /dev/null @@ -1,22 +0,0 @@ -# Systemd unit file for tomcat -# -# To create clones of this service: -# 1) By default SERVICE_NAME=tomcat. When cloned, the value must be defined -# before tomcat-sysd is called. -# 2) Create /etc/sysconfig/${SERVICE_NAME} from /etc/sysconfig/tomcat -# to override tomcat defaults - -[Unit] -Description=Apache Tomcat Web Application Container JSVC wrapper -After=syslog.target network.target - -[Service] -Type=simple -EnvironmentFile=/etc/tomcat/tomcat.conf -Environment="NAME=" "USE_JSVC=true" -EnvironmentFile=-/etc/sysconfig/tomcat -ExecStart=/usr/libexec/tomcat/server start -ExecStop=/usr/libexec/tomcat/server stop - -[Install] -WantedBy=multi-user.target diff --git a/tomcat-8.5.logrotate b/tomcat-8.5.logrotate deleted file mode 100644 index a87b4c0..0000000 --- a/tomcat-8.5.logrotate +++ /dev/null @@ -1,8 +0,0 @@ -@@@TCLOG@@@/catalina.out { - copytruncate - weekly - rotate 52 - compress - missingok - create 0644 tomcat tomcat -} diff --git a/tomcat-8.5-bootstrap-MANIFEST.MF.patch b/tomcat-9.0-bootstrap-MANIFEST.MF.patch similarity index 100% rename from tomcat-8.5-bootstrap-MANIFEST.MF.patch rename to tomcat-9.0-bootstrap-MANIFEST.MF.patch diff --git a/tomcat-8.5-catalina-policy.patch b/tomcat-9.0-catalina-policy.patch similarity index 100% rename from tomcat-8.5-catalina-policy.patch rename to tomcat-9.0-catalina-policy.patch diff --git a/tomcat-8.5-digest.script b/tomcat-9.0-digest.script similarity index 100% rename from tomcat-8.5-digest.script rename to tomcat-9.0-digest.script diff --git a/tomcat-8.5-log4j.properties b/tomcat-9.0-log4j.properties similarity index 100% rename from tomcat-8.5-log4j.properties rename to tomcat-9.0-log4j.properties diff --git a/tomcat-8.5-tomcat-users-webapp.patch b/tomcat-9.0-tomcat-users-webapp.patch similarity index 100% rename from tomcat-8.5-tomcat-users-webapp.patch rename to tomcat-9.0-tomcat-users-webapp.patch diff --git a/tomcat-8.5-tool-wrapper.script b/tomcat-9.0-tool-wrapper.script similarity index 100% rename from tomcat-8.5-tool-wrapper.script rename to tomcat-9.0-tool-wrapper.script diff --git a/tomcat-8.5.conf b/tomcat-9.0.conf similarity index 100% rename from tomcat-8.5.conf rename to tomcat-9.0.conf diff --git a/tomcat-8.5.service b/tomcat-9.0.service similarity index 100% rename from tomcat-8.5.service rename to tomcat-9.0.service diff --git a/tomcat-8.5.sysconfig b/tomcat-9.0.sysconfig similarity index 100% rename from tomcat-8.5.sysconfig rename to tomcat-9.0.sysconfig diff --git a/tomcat-8.5.wrapper b/tomcat-9.0.wrapper similarity index 100% rename from tomcat-8.5.wrapper rename to tomcat-9.0.wrapper diff --git a/tomcat.spec b/tomcat.spec index 3ab4438..f0cee80 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -28,17 +28,18 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -%global jspspec 2.3 -%global major_version 8 -%global minor_version 5 -%global micro_version 30 -%global packdname apache-tomcat-%{version}-src -%global servletspec 3.1 -%global elspec 3.0 -%global tcuid 91 -# Recommended version is specified in java/org/apache/catalina/core/AprLifecycleListener.java -%global native_version 1.2.8 +%global major_version 9 +%global minor_version 0 +%global micro_version 7 +%global redhat_version 10 +%global packdname apache-tomcat-%{version}.redhat-%{redhat_version}-src +# Specification versions +%global servletspec 4.0 +%global jspspec 2.3 +%global elspec 3.0 + +%global tcuid 91 # FHS 2.3 compliant tree structure - http://www.pathname.com/fhs/2.3/ %global basedir %{_var}/lib/%{name} @@ -54,26 +55,20 @@ %global _initrddir %{_sysconfdir}/init.d %global _systemddir /lib/systemd/system -# Fedora doesn't seem to have this macro, so we define it if it doesn't exist -%{!?_mavendepmapfragdir: %global _mavendepmapfragdir /usr/share/maven-metadata} -# Fedora 24 erroneously uses %%{_datadir}/maven-fragments instead of /maven-metadata for some reason... -# Override the mavendepmapfragdir var on fc24 -%{?fc24: %global _mavendepmapfragdir /usr/share/maven-metadata} - Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API - Group: System Environment/Daemons License: ASL 2.0 URL: http://tomcat.apache.org/ -Source0: http://www.apache.org/dist/tomcat/tomcat-%{major_version}/v%{version}/src/%{packdname}.tar.gz + +#Source0: http://www.apache.org/dist/tomcat/tomcat-%%{major_version}/v%%{version}/src/%%{packdname}.tar.gz +Source0: tomcat-9.0.7.redhat-10-src.zip Source1: %{name}-%{major_version}.%{minor_version}.conf Source3: %{name}-%{major_version}.%{minor_version}.sysconfig Source4: %{name}-%{major_version}.%{minor_version}.wrapper -Source5: %{name}-%{major_version}.%{minor_version}.logrotate Source6: %{name}-%{major_version}.%{minor_version}-digest.script Source7: %{name}-%{major_version}.%{minor_version}-tool-wrapper.script Source8: servlet-api-OSGi-MANIFEST.MF @@ -84,7 +79,6 @@ Source13: jasper-el-OSGi-MANIFEST.MF Source14: jasper-OSGi-MANIFEST.MF Source15: tomcat-api-OSGi-MANIFEST.MF Source16: tomcat-juli-OSGi-MANIFEST.MF -Source20: %{name}-%{major_version}.%{minor_version}-jsvc.service Source21: tomcat-functions Source30: tomcat-preamble Source31: tomcat-server @@ -98,14 +92,13 @@ Patch3: disableJavadocFailOnWarning.patch BuildArch: noarch BuildRequires: ant -BuildRequires: ecj >= 1:4.4.0 +BuildRequires: ecj >= 1:4.6.3 BuildRequires: findutils BuildRequires: apache-commons-collections BuildRequires: apache-commons-daemon BuildRequires: apache-commons-dbcp BuildRequires: apache-commons-pool -BuildRequires: tomcat-taglibs-standard -BuildRequires: java-devel >= 1:1.6.0 +BuildRequires: java-devel >= 1:1.8.0 BuildRequires: jpackage-utils >= 0:1.7.0 %if 0%{?fedora} >= 27 || 0%{?rhel} > 7 # add_maven_depmap is deprecated, using javapackages-local for now @@ -121,13 +114,12 @@ Requires: apache-commons-daemon Requires: apache-commons-collections Requires: apache-commons-dbcp Requires: apache-commons-pool -Requires: java-headless >= 1:1.6.0 +Requires: java-headless >= 1:1.8.0 Requires: jpackage-utils Requires: procps -Requires: %{name}-lib = %{epoch}:%{version}-%{release} -Recommends: tomcat-native >= %{native_version} Requires(pre): shadow-utils Requires(post): chkconfig +Requires(postun): chkconfig Requires(preun): chkconfig Requires(post): systemd-units Requires(preun): systemd-units @@ -136,6 +128,27 @@ Requires(postun): systemd-units # added after log4j sub-package was removed Provides: %{name}-log4j = %{epoch}:%{version}-%{release} +# Leftover requires/provides from removing the subpackages +# they still apply in instances where the old version is installed. + +#%%package jsp-%%{jspspec}-api +Provides: jsp = %{jspspec} +Obsoletes: %{name}-jsp-2.2-api + +#%%package lib +Requires: ecj >= 1:4.6.3 +Requires(preun): coreutils + +#%%package servlet-%%{servletspec}-api +Provides: servlet = %{servletspec} +Provides: servlet6 +Provides: servlet3 +Obsoletes: %{name}-servlet-3.0-api + +#%%package el-%%{elspec}-api +Provides: el_api = %{elspec} +Obsoletes: %{name}-el-2.2-api + %description Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServer Pages technologies. @@ -146,104 +159,9 @@ Tomcat is developed in an open and participatory environment and released under the Apache Software License version 2.0. Tomcat is intended to be a collaboration of the best-of-breed developers from around the world. -%package admin-webapps -Group: Applications/System -Summary: The host-manager and manager web applications for Apache Tomcat -Requires: %{name} = %{epoch}:%{version}-%{release} - -%description admin-webapps -The host-manager and manager web applications for Apache Tomcat. - -%package docs-webapp -Group: Applications/Text -Summary: The docs web application for Apache Tomcat -Requires: %{name} = %{epoch}:%{version}-%{release} - -%description docs-webapp -The docs web application for Apache Tomcat. - -%package javadoc -Group: Documentation -Summary: Javadoc generated documentation for Apache Tomcat -Requires: jpackage-utils - -%description javadoc -Javadoc generated documentation for Apache Tomcat. - -%package jsvc -Group: System Environment/Daemons -Summary: Apache jsvc wrapper for Apache Tomcat as separate service -Requires: %{name} = %{epoch}:%{version}-%{release} -Requires: apache-commons-daemon-jsvc - -%description jsvc -Systemd service to start tomcat with jsvc, -which allows tomcat to perform some privileged operations -(e.g. bind to a port < 1024) and then switch identity to a non-privileged user. - -%package jsp-%{jspspec}-api -Group: Development/Libraries -Summary: Apache Tomcat JavaServer Pages v%{jspspec} API Implementation Classes -Provides: jsp = %{jspspec} -Obsoletes: %{name}-jsp-2.2-api -Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} -Requires: %{name}-el-%{elspec}-api = %{epoch}:%{version}-%{release} -Requires(post): chkconfig -Requires(postun): chkconfig - -%description jsp-%{jspspec}-api -Apache Tomcat JSP API Implementation Classes. - -%package lib -Group: Development/Libraries -Summary: Libraries needed to run the Tomcat Web container -Requires: %{name}-jsp-%{jspspec}-api = %{epoch}:%{version}-%{release} -Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} -Requires: %{name}-el-%{elspec}-api = %{epoch}:%{version}-%{release} -Requires: ecj >= 1:4.2.1 -Requires: apache-commons-collections -Requires: apache-commons-dbcp -Requires: apache-commons-pool -Requires(preun): coreutils - -%description lib -Libraries needed to run the Tomcat Web container. - -%package servlet-%{servletspec}-api -Group: Development/Libraries -Summary: Apache Tomcat Java Servlet v%{servletspec} API Implementation Classes -Provides: servlet = %{servletspec} -Provides: servlet6 -Provides: servlet3 -Obsoletes: %{name}-servlet-3.0-api -Requires(post): chkconfig -Requires(postun): chkconfig - -%description servlet-%{servletspec}-api -Apache Tomcat Servlet API Implementation Classes. - -%package el-%{elspec}-api -Group: Development/Libraries -Summary: Apache Tomcat Expression Language v%{elspec} API Implementation Classes -Provides: el_api = %{elspec} -Obsoletes: %{name}-el-2.2-api -Requires(post): chkconfig -Requires(postun): chkconfig - -%description el-%{elspec}-api -Apache Tomcat EL API Implementation Classes. - -%package webapps -Group: Applications/Internet -Summary: The ROOT and examples web applications for Apache Tomcat -Requires: %{name} = %{epoch}:%{version}-%{release} -Requires: tomcat-taglibs-standard >= 0:1.1 - -%description webapps -The ROOT and examples web applications for Apache Tomcat. - %prep %setup -q -n %{packdname} + # remove pre-built binaries and windows files find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name "*.gz" -o \ -name "*.jar" -o -name "*.war" -o -name "*.zip" \) -delete @@ -251,10 +169,7 @@ find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name " %patch0 -p0 %patch1 -p0 %patch2 -p0 -%patch3 -p0 - -%{__ln_s} $(build-classpath tomcat-taglibs-standard/taglibs-standard-impl) webapps/examples/WEB-INF/lib/jstl.jar -%{__ln_s} $(build-classpath tomcat-taglibs-standard/taglibs-standard-compat) webapps/examples/WEB-INF/lib/standard.jar +#%%patch3 -p0 %build export OPT_JAR_LIST="xalan-j2-serializer" @@ -281,17 +196,10 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dversion.build="%{micro_version}" \ -Djava.7.home=%{java_home} \ -Dexecute.validate=false \ - deploy dist-prepare dist-source javadoc + deploy dist-prepare dist-source # remove some jars that we'll replace with symlinks later %{__rm} output/build/bin/commons-daemon.jar output/build/lib/ecj.jar -pushd output/dist/src/webapps/docs/appdev/sample/src -%{__mkdir_p} ../web/WEB-INF/classes -%{javac} -cp ../../../../../../../../output/build/lib/servlet-api.jar -d ../web/WEB-INF/classes mypackage/Hello.java -pushd ../web -%{jar} cf ../../../../../../../../output/build/webapps/docs/appdev/sample/sample.war * -popd -popd # inject OSGi manifests mkdir -p META-INF @@ -321,10 +229,8 @@ zip output/build/bin/tomcat-juli.jar META-INF/MANIFEST.MF # build initial path structure %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_bindir} %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sbindir} -%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_javadocdir}/%{name} %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_initrddir} %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_systemddir} -%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{appdir} %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{bindir} @@ -334,7 +240,6 @@ zip output/build/bin/tomcat-juli.jar META-INF/MANIFEST.MF /bin/echo "Place your custom *.conf files here. Shell expansion is supported." > ${RPM_BUILD_ROOT}%{confdir}/conf.d/README %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{libdir} %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{logdir} -/bin/touch ${RPM_BUILD_ROOT}%{logdir}/catalina.out %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{_localstatedir}/lib/tomcats %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{homedir} %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{tempdir} @@ -348,10 +253,7 @@ pushd output/build %{__cp} -a bin/*.{jar,xml} ${RPM_BUILD_ROOT}%{bindir} %{__cp} -a conf/*.{policy,properties,xml,xsd} ${RPM_BUILD_ROOT}%{confdir} %{__cp} -a lib/*.jar ${RPM_BUILD_ROOT}%{libdir} - %{__cp} -a webapps/* ${RPM_BUILD_ROOT}%{appdir} popd -# javadoc -%{__cp} -a output/dist/webapps/docs/api/* ${RPM_BUILD_ROOT}%{_javadocdir}/%{name} %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ @@ -365,10 +267,6 @@ popd ${RPM_BUILD_ROOT}%{_sbindir}/%{name} %{__install} -m 0644 %{SOURCE11} \ ${RPM_BUILD_ROOT}%{_unitdir}/%{name}.service -%{__install} -m 0644 %{SOURCE20} \ - ${RPM_BUILD_ROOT}%{_unitdir}/%{name}-jsvc.service -%{__sed} -e "s|\@\@\@TCLOG\@\@\@|%{logdir}|g" %{SOURCE5} \ - > ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/%{name} %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE6} \ @@ -407,10 +305,6 @@ popd pushd output/build %{_bindir}/build-jar-repository lib apache-commons-collections \ apache-commons-dbcp apache-commons-pool ecj 2>&1 - # need to use -p here with b-j-r otherwise the examples webapp fails to - # load with a java.io.IOException - %{_bindir}/build-jar-repository -p webapps/examples/WEB-INF/lib \ - tomcat-taglibs-standard/taglibs-standard-impl.jar tomcat-taglibs-standard/taglibs-standard-compat.jar 2>&1 popd pushd ${RPM_BUILD_ROOT}%{libdir} @@ -437,28 +331,6 @@ pushd ${RPM_BUILD_ROOT}%{homedir} %{__ln_s} %{workdir} work popd -# install sample webapp -%{__mkdir_p} ${RPM_BUILD_ROOT}%{appdir}/sample -pushd ${RPM_BUILD_ROOT}%{appdir}/sample -%{jar} xf ${RPM_BUILD_ROOT}%{appdir}/docs/appdev/sample/sample.war -popd -%{__rm} ${RPM_BUILD_ROOT}%{appdir}/docs/appdev/sample/sample.war - -# Allow linking for example webapp -%{__mkdir_p} ${RPM_BUILD_ROOT}%{appdir}/examples/META-INF -pushd ${RPM_BUILD_ROOT}%{appdir}/examples/META-INF -echo '' > context.xml -echo '' >> context.xml -echo ' ' >> context.xml -echo '' >> context.xml -popd - -pushd ${RPM_BUILD_ROOT}%{appdir}/examples/WEB-INF/lib -%{__ln_s} -f $(build-classpath tomcat-taglibs-standard/taglibs-standard-impl) jstl.jar -%{__ln_s} -f $(build-classpath tomcat-taglibs-standard/taglibs-standard-compat) standard.jar -popd - - # Install the maven metadata %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_mavenpomdir} pushd output/dist/src/res/maven @@ -470,29 +342,29 @@ done # we won't install dbcp, juli-adapters and juli-extras pom files for libname in annotations-api catalina jasper-el jasper catalina-ha; do %{__cp} -a %{name}-$libname.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-$libname.pom - %add_maven_depmap JPP.%{name}-$libname.pom %{name}/$libname.jar -f "tomcat-lib" + %add_maven_depmap JPP.%{name}-$libname.pom %{name}/$libname.jar done # tomcat-util-scan %{__cp} -a %{name}-util-scan.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-util-scan.pom -%add_maven_depmap JPP.%{name}-util-scan.pom %{name}/%{name}-util-scan.jar -f "tomcat-lib" +%add_maven_depmap JPP.%{name}-util-scan.pom %{name}/%{name}-util-scan.jar # tomcat-jni %{__cp} -a %{name}-jni.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-jni.pom -%add_maven_depmap JPP.%{name}-jni.pom %{name}/%{name}-jni.jar -f "tomcat-lib" +%add_maven_depmap JPP.%{name}-jni.pom %{name}/%{name}-jni.jar # servlet-api jsp-api and el-api are not in tomcat subdir, since they are widely re-used elsewhere %{__cp} -a tomcat-jsp-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-jsp-api.pom -%add_maven_depmap JPP-tomcat-jsp-api.pom tomcat-jsp-api.jar -f "tomcat-jsp-api" -a "org.eclipse.jetty.orbit:javax.servlet.jsp" +%add_maven_depmap JPP-tomcat-jsp-api.pom tomcat-jsp-api.jar -a "org.eclipse.jetty.orbit:javax.servlet.jsp" %{__cp} -a tomcat-el-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-el-api.pom -%add_maven_depmap JPP-tomcat-el-api.pom tomcat-el-api.jar -f "tomcat-el-api" -a "org.eclipse.jetty.orbit:javax.el" +%add_maven_depmap JPP-tomcat-el-api.pom tomcat-el-api.jar -a "org.eclipse.jetty.orbit:javax.el" %{__cp} -a tomcat-servlet-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-servlet-api.pom # Generate a depmap fragment javax.servlet:servlet-api pointing to # tomcat-servlet-3.0-api for backwards compatibility # also provide jetty depmap (originally in jetty package, but it's cleaner to have it here -%add_maven_depmap JPP-tomcat-servlet-api.pom tomcat-servlet-api.jar -f "tomcat-servlet-api" +%add_maven_depmap JPP-tomcat-servlet-api.pom tomcat-servlet-api.jar # replace temporary copy with link %{__ln_s} -f $(abs2rel %{bindir}/tomcat-juli.jar %{libdir}) ${RPM_BUILD_ROOT}%{libdir}/ @@ -539,15 +411,11 @@ done # install but don't activate %systemd_post %{name}.service -%post jsp-%{jspspec}-api +# Collapse all of the alternatives installations into one %{_sbindir}/update-alternatives --install %{_javadir}/jsp.jar jsp \ %{_javadir}/%{name}-jsp-%{jspspec}-api.jar 20200 - -%post servlet-%{servletspec}-api %{_sbindir}/update-alternatives --install %{_javadir}/servlet.jar servlet \ %{_javadir}/%{name}-servlet-%{servletspec}-api.jar 30000 - -%post el-%{elspec}-api %{_sbindir}/update-alternatives --install %{_javadir}/elspec.jar elspec \ %{_javadir}/%{name}-el-%{elspec}-api.jar 20300 @@ -559,30 +427,16 @@ done %postun %systemd_postun_with_restart %{name}.service -%postun jsp-%{jspspec}-api +# Collapse all of the alternatives removals into one if [ "$1" = "0" ]; then %{_sbindir}/update-alternatives --remove jsp \ %{_javadir}/%{name}-jsp-%{jspspec}-api.jar -fi - -%postun servlet-%{servletspec}-api -if [ "$1" = "0" ]; then %{_sbindir}/update-alternatives --remove servlet \ %{_javadir}/%{name}-servlet-%{servletspec}-api.jar -fi - -%postun el-%{elspec}-api -if [ "$1" = "0" ]; then %{_sbindir}/update-alternatives --remove elspec \ %{_javadir}/%{name}-el-%{elspec}-api.jar fi -%triggerun -- tomcat < 0:7.0.22-2 -/usr/bin/systemd-sysv-convert -- save tomcat > /dev/null 2>&1 || : -# Run these becasue the SysV package being removed won't do them -/sbin/chkconfig --del tomcat > /dev/null 2>&1 || : -/bin/systemctl try-restart tomcat.service > /dev/null 2>&1 || : - %files %defattr(0664,root,tomcat,0755) %doc {LICENSE,NOTICE,RELEASE*} @@ -634,24 +488,6 @@ fi %{homedir}/logs %{homedir}/conf -%files admin-webapps -%defattr(0664,root,tomcat,0755) -%{appdir}/host-manager -%{appdir}/manager - -%files docs-webapp -%defattr(-,root,root,-) -%{appdir}/docs - -%files javadoc -%defattr(-,root,root,-) -%{_javadocdir}/%{name} - -%files jsp-%{jspspec}-api -f output/dist/src/res/maven/.mfiles-tomcat-jsp-api -%defattr(-,root,root,-) -%{_javadir}/%{name}-jsp-%{jspspec}*.jar - -%files lib -f output/dist/src/res/maven/.mfiles-tomcat-lib %defattr(-,root,root,-) %dir %{libdir} %{libdir}/*.jar @@ -671,404 +507,13 @@ fi %{_mavenpomdir}/JPP.%{name}-websocket-api.pom %{_mavenpomdir}/JPP.%{name}-tomcat-websocket.pom %{_mavenpomdir}/JPP.%{name}-jaspic-api.pom +%{_mavenpomdir}/JPP.%{name}-jni.pom +%{_mavenpomdir}/JPP.%{name}-util-scan.pom +%{_mavenpomdir}/JPP-%{name}-jsp-api.pom +%{_mavenpomdir}/JPP-%{name}-servlet-api.pom +%{_mavenpomdir}/JPP-%{name}-el-api.pom %{_datadir}/maven-metadata/tomcat.xml -%exclude %{libdir}/%{name}-el-%{elspec}-api.jar -%exclude %{_javadir}/%{name}-servlet-%{servletspec}*.jar -%exclude %{_javadir}/%{name}-el-%{elspec}-api.jar -%exclude %{_javadir}/%{name}-jsp-%{jspspec}*.jar - -%files servlet-%{servletspec}-api -f output/dist/src/res/maven/.mfiles-tomcat-servlet-api -%defattr(-,root,root,-) -%doc LICENSE -%{_javadir}/%{name}-servlet-%{servletspec}*.jar - -%files el-%{elspec}-api -f output/dist/src/res/maven/.mfiles-tomcat-el-api -%defattr(-,root,root,-) -%doc LICENSE -%{_javadir}/%{name}-el-%{elspec}-api.jar -%{libdir}/%{name}-el-%{elspec}-api.jar - -%files webapps -%defattr(0644,tomcat,tomcat,0755) -%{appdir}/ROOT -%{appdir}/examples -%{appdir}/sample - -%files jsvc -%defattr(755,root,root,0755) -%attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service -%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} -%attr(0660,tomcat,tomcat) %verify(not size md5 mtime) %{logdir}/catalina.out %changelog -* Tue May 01 2018 Coty Sutherland - 1:8.5.30-1 -- Update to 8.5.30 - -* Thu Mar 15 2018 Coty Sutherland - 1:8.5.29-1 -- Update to 8.5.29 -- Resolves: rhbz#1548290 CVE-2018-1304 tomcat: Incorrect handling of empty string URL in security constraints can lead to unitended exposure of resources -- Resolves: rhbz#1548284 CVE-2018-1305 tomcat: Late application of security constraints can lead to resource exposure for unauthorised users - -* Fri Feb 09 2018 Igor Gnatenko - 1:8.0.49-2 -- Escape macros in %%changelog - -* Thu Feb 01 2018 Coty Sutherland - 1:8.0.49-1 -- Update to 8.0.49 - -* Tue Dec 12 2017 Merlin Mathesius - 1:8.0.47-3 -- Cleanup spec file conditionals - -* Tue Oct 24 2017 Troy Dawson - 1:8.0.47-2 -- Change "zip -u" to "zip" -- Resolves: rhbz#1495241 [tomcat] zip -u in spec file causes race condition - -* Wed Oct 04 2017 Coty Sutherland - 1:8.0.47-1 -- Update to 8.0.47 -- Resolves: rhbz#1497682 CVE-2017-12617 tomcat: Remote Code Execution bypass for CVE-2017-12615 - -* Mon Aug 21 2017 Coty Sutherland - 1:8.0.46-1 -- Update to 8.0.46 -- Resolves: rhbz#1480620 CVE-2017-7674 tomcat: Cache Poisoning - -* Thu Jul 27 2017 Fedora Release Engineering - 1:8.0.44-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Fri Jun 09 2017 Coty Sutherland - 1:8.0.44-1 -- Resolves: rhbz#1459160 CVE-2017-5664 tomcat: Security constrained bypass in error page mechanism - -* Tue Apr 11 2017 Coty Sutherland - 1:8.0.43-1 -- Update to 8.0.43 - -* Fri Mar 31 2017 Coty Sutherland - 1:8.0.42-1 -- Update to 8.0.42 - -* Thu Feb 16 2017 Coty Sutherland - 1:8.0.41-1 -- Update to 8.0.41 -- Resolves: rhbz#1403825 CVE-2016-8745 tomcat: information disclosure due to incorrect Processor sharing - -* Sat Feb 11 2017 Fedora Release Engineering - 1:8.0.39-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Tue Nov 29 2016 Coty Sutherland - 1:8.0.39-1 -- Update to 8.0.39 -- Resolves: rhbz#1397493 CVE-2016-6816 CVE-2016-6817 CVE-2016-8735 tomcat: various flaws - -* Tue Oct 25 2016 Coty Sutherland - 1:8.0.38-1 -- Update to 8.0.38 - -* Sun Oct 23 2016 Coty Sutherland - 1:8.0.37-3 -- Resolves: rhbz#1383216 CVE-2016-6325 tomcat: tomcat writable config files allow privilege escalation -- Resolves: rhbz#1382310 CVE-2016-5425 tomcat: Local privilege escalation via systemd-tmpfiles service - -* Tue Sep 13 2016 Coty Sutherland - 1:8.0.37-1 -- Rebase to 8.0.37 -- Resolves: rhbz#1375581 CVE-2016-5388 CGI sets environmental variable based on user supplied Proxy request header -- Resolves: rhbz#1370262 catalina.out is no longer in use in the main package, but still gets rotated - -* Thu Aug 11 2016 Coty Sutherland - 1:8.0.36-2 -- Related: rhbz#1349469 Correct typo in changelog entry - -* Mon Aug 08 2016 Coty Sutherland - 1:8.0.36-1 -- Resolves: rhbz#1349469 CVE-2016-3092 tomcat: Usage of vulnerable FileUpload package can result in denial of service (updates to 8.0.36) -- Resolves: rhbz#1364056 The command tomcat-digest doesn't work -- Resolves: rhbz#1363884 The tomcat-tool-wrapper script is broken -- Resolves: rhbz#1347864 The systemd service unit does not allow tomcat to shut down gracefully -- Resolves: rhbz#1347835 The security manager doesn't work correctly (JSPs cannot be compiled) -- Resolves: rhbz#1341853 rpm -V tomcat fails on /var/log/tomcat/catalina.out -- Resolves: rhbz#1341850 tomcat-jsvc.service has TOMCAT_USER value hard-coded -- Resolves: rhbz#1359737 Missing maven depmap for the following artifacts: org.apache.tomcat:tomcat-websocket, org.apache.tomcat:tomcat-websocket-api -- Resolves: asfbz#59960 Building javadocs with java8 fails - -* Wed Mar 2 2016 Ivan Afonichev - 1:8.0.32-4 -- Revert sysconfig migration changes, resolves: rhbz#1311771, rhbz#1311905 -- Add /etc/tomcat/conf.d/ with shell expansion support, resolves rhbz#1293636 - -* Sat Feb 27 2016 Ivan Afonichev - 1:8.0.32-3 -- Load sysconfig from tomcat.conf, resolves: rhbz#1311771, rhbz#1311905 -- Set default javax.sql.DataSource factory to apache commons one, resolves rhbz#1214381 - -* Sun Feb 21 2016 Ivan Afonichev - 1:8.0.32-2 -- Fix symlinks from $CATALINA_HOME/lib perspective, resolves: rhbz#1308685 - -* Thu Feb 11 2016 Ivan Afonichev - 1:8.0.32-1 -- Updated to 8.0.32 -- Remove log4j support. It has never been working actually. See rhbz#1236297 -- Move shipped config to /etc/sysconfig/tomcat. /etc/tomcat/tomcat.conf can now be used to override it with shell expansion, resolves rhbz#1293636 -- Recommend tomcat-native, resolves: rhbz#1243132 - -* Wed Feb 10 2016 Coty Sutherland 1:8.0.26-4 -- Resolves: rhbz#1286800 Failed to start component due to wrong allowLinking="true" in context.xml -- Program /bin/nologin does not exist (#1302718) - -* Fri Feb 05 2016 Fedora Release Engineering - 1:8.0.26-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Wed Nov 11 2015 Robert Scheck 1:8.0.26-2 -- CATALINA_OPTS are only read when SECURITY_MANAGER is true (#1147105) - -* Thu Aug 27 2015 Alexander Kurtakov 1:8.0.26-1 -- Update to 8.0.26. - -* Fri Jul 10 2015 Alexander Kurtakov 1:8.0.24-2 -- Update to 8.0.24. - -* Fri Jun 19 2015 Alexander Kurtakov 1:8.0.23-2 -- Drop javax.el:el-api alias. - -* Thu Jun 18 2015 Alexander Kurtakov 1:8.0.23-1 -- Update to 8.0.23. - -* Thu Jun 18 2015 Alexander Kurtakov 1:8.0.20-3 -- Drop jetty alias for servlet. - -* Tue Jun 09 2015 Michal Srb - 1:8.0.20-2 -- Fix metadata for org.apache.tomcat:{tomcat-jni,tomcat-util-scan} - -* Thu Mar 5 2015 Alexander Kurtakov 1:8.0.18-5 -- Rebuild against tomcat-taglibs-standard. - -* Wed Mar 4 2015 Alexander Kurtakov 1:8.0.18-4 -- Fix epoch bumped el_1_0_api that would override all other glassfish/jboss/etc. due to wrong epoch. -- Drop old provides. - -* Tue Mar 03 2015 Stephen Gallagher 1:8.0.18-3 -- Bump epoch to maintain upgrade path from Fedora 22 - -* Mon Feb 16 2015 Michal Srb - 0:8.0.18-2 -- Install POM files for org.apache.tomcat:{tomcat-jni,tomcat-util-scan} - -* Sun Feb 15 2015 Ivan Afonichev 0:8.0.18-1 -- Updated to 8.0.18 - -* Sat Sep 20 2014 Ivan Afonichev 0:8.0.12-1 -- Updated to 8.0.12 -- Substitute libnames in catalina-tasks.xml, resolves: rhbz#1126439 -- Use CATALINA_OPTS only on start, resolves: rhbz#1051194 - -* Mon Jun 16 2014 Michal Srb - 0:7.0.54-3 -- jsp-api requires el-api - -* Sun Jun 08 2014 Fedora Release Engineering - 0:7.0.54-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Thu Jun 5 2014 Alexander Kurtakov 0:7.0.54-1 -- Update to upstream 7.0.54 - fixes compile with Java 8. - -* Wed May 21 2014 Alexander Kurtakov 0:7.0.52-3 -- Drop servlet/el api provides to reduce user machines ending with both. - -* Sun Mar 30 2014 Ivan Afonichev 0:7.0.52-2 -- Don't provide maven javax.jsp:jsp-api and javax.servlet.jsp:javax.servlet.jsp-api resolves: rhbz#1076949 -- Move log4j support into subpackage, resolves: rhbz#1027716 - -* Wed Mar 26 2014 Ivan Afonichev 0:7.0.52-1 -- Updated to 7.0.52 -- Rewrite jsvc implementation, resolves: rhbz#1051743 -- Switch to java-headless R, resolves: rhbz#1068566 -- Create and own %%{_localstatedir}/lib/tomcats, resolves: rhbz#1026741 -- Add pom for tomcat-jdbc, resolves: rhbz#1011003 - -* Tue Jan 21 2014 Mikolaj Izdebski - 0:7.0.47-3 -- Fix installation of Maven metadata for tomcat-juli.jar -- Resolves: rhbz#1033664 - -* Wed Jan 15 2014 Stanislav Ochotnicky - 0:7.0.47-2 -- Rebuild for bug #1033664 - -* Sun Nov 03 2013 Ivan Afonichev 0:7.0.47-1 -- Updated to 7.0.47 -- Fix java.security.policy - -* Sun Aug 04 2013 Fedora Release Engineering - 0:7.0.42-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Fri Jul 12 2013 Ivan Afonichev 0:7.0.42-2 -- Remove jpackage-utils R - -* Thu Jul 11 2013 Dmitry Tikhonov 0:7.0.42-1 -- Updated to 7.0.42 - -* Tue Jun 11 2013 Paul Komkoff 0:7.0.40-3 -- Dropped systemv inits. Bye-bye. -- Updated the systemd wrappers to allow running multiple instances. - Added wrapper scripts to do that, ported the original non-named - service file to work with the same wrappers, updated - /usr/sbin/tomcat to call systemctl. - -* Sat May 11 2013 Ivan Afonichev 0:7.0.40-1 -- Updated to 7.0.40 -- Resolves: rhbz 956569 added missing commons-pool link -- Remove ant-nodeps BR - -* Mon Mar 4 2013 Mikolaj Izdebski - 0:7.0.37-2 -- Add depmaps for org.eclipse.jetty.orbit -- Resolves: rhbz#917626 - -* Wed Feb 20 2013 Ivan Afonichev 0:7.0.39-1 -- Updated to 7.0.39 - -* Wed Feb 20 2013 Ivan Afonichev 0:7.0.37-1 -- Updated to 7.0.37 - -* Mon Feb 4 2013 Ivan Afonichev 0:7.0.35-1 -- Updated to 7.0.35 -- systemd SuccessExitStatus=143 for proper stop exit code processing - -* Mon Dec 24 2012 Ivan Afonichev 0:7.0.34-1 -- Updated to 7.0.34 -- ecj >= 4.2.1 now required -- Resolves: rhbz 889395 concat classpath correctly; chdir to $CATALINA_HOME - -* Fri Dec 7 2012 Ivan Afonichev 0:7.0.33-2 -- Resolves: rhbz 883806 refix logdir ownership - -* Sun Dec 2 2012 Ivan Afonichev 0:7.0.33-1 -- Updated to 7.0.33 -- Resolves: rhbz 873620 need chkconfig for update-alternatives - -* Wed Oct 17 2012 Ivan Afonichev 0:7.0.32-1 -- Updated to 7.0.32 -- Resolves: rhbz 842620 symlinks to taglibs - -* Fri Aug 24 2012 Ivan Afonichev 0:7.0.29-1 -- Updated to 7.0.29 -- Add pidfile as tmpfile -- Use systemd for running as unprivileged user -- Resolves: rhbz 847751 upgrade path was broken -- Resolves: rhbz 850343 use new systemd-rpm macros - -* Sat Jul 21 2012 Fedora Release Engineering - 0:7.0.28-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Mon Jul 2 2012 Ivan Afonichev 0:7.0.28-1 -- Updated to 7.0.28 -- Resolves: rhbz 820119 Remove bundled apache-commons-dbcp -- Resolves: rhbz 814900 Added tomcat-coyote POM -- Resolves: rhbz 810775 Remove systemv stuff from %%post scriptlet -- Remove redhat-lsb R - -* Mon Apr 9 2012 Ivan Afonichev 0:7.0.27-2 -- Fixed native download hack - -* Sat Apr 7 2012 Ivan Afonichev 0:7.0.27-1 -- Updated to 7.0.27 -- Fixed jakarta-taglibs-standard BR and R - -* Wed Mar 21 2012 Stanislav Ochotnicky - 0:7.0.26-2 -- Add more depmaps to J2EE apis to help jetty/glassfish updates - -* Wed Mar 14 2012 Juan Hernandez 0:7.0.26-2 -- Added the POM files for tomcat-api and tomcat-util (#803495) - -* Wed Feb 22 2012 Ivan Afonichev 0:7.0.26-1 -- Updated to 7.0.26 -- Bug 790334: Change ownership of logdir for logrotate - -* Thu Feb 16 2012 Krzysztof Daniel 0:7.0.25-4 -- Bug 790694: Priorities of jsp, servlet and el packages updated. - -* Wed Feb 8 2012 Krzysztof Daniel 0:7.0.25-3 -- Dropped indirect dependecy to tomcat 5 - -* Sun Jan 22 2012 Ivan Afonichev 0:7.0.25-2 -- Added hack for maven depmap of tomcat-juli absolute link [ -f ] pass correctly - -* Sat Jan 21 2012 Ivan Afonichev 0:7.0.25-1 -- Updated to 7.0.25 -- Removed EntityResolver patch (changes already in upstream sources) -- Place poms and depmaps in the same package as jars -- Added javax.servlet.descriptor to export-package of servlet-api -- Move several chkconfig actions and reqs to systemv subpackage -- New maven depmaps generation method -- Add patch to support java7. (patch sent upstream). -- Require java >= 1:1.6.0 - -* Fri Jan 13 2012 Krzysztof Daniel 0:7.0.23-5 -- Exported javax.servlet.* packages in version 3.0 as 2.6 to make - servlet-api compatible with Eclipse. - -* Thu Jan 12 2012 Ivan Afonichev 0:7.0.23-4 -- Move jsvc support to subpackage - -* Wed Jan 11 2012 Alexander Kurtakov 0:7.0.23-2 -- Add EntityResolver setter patch to jasper for jetty's need. (patch sent upstream). - -* Mon Dec 12 2011 Joseph D. Wagner 0:7.0.23-3 -- Added support to /usr/sbin/tomcat-sysd and /usr/sbin/tomcat for - starting tomcat with jsvc, which allows tomcat to perform some - privileged operations (e.g. bind to a port < 1024) and then switch - identity to a non-privileged user. Must add USE_JSVC="true" to - /etc/tomcat/tomcat.conf or /etc/sysconfig/tomcat. - -* Mon Nov 28 2011 Ivan Afonichev 0:7.0.23-1 -- Updated to 7.0.23 - -* Fri Nov 11 2011 Ivan Afonichev 0:7.0.22-2 -- Move tomcat-juli.jar to lib package -- Drop %%update_maven_depmap as in tomcat6 -- Provide native systemd unit file ported from tomcat6 - -* Thu Oct 6 2011 Ivan Afonichev 0:7.0.22-1 -- Updated to 7.0.22 - -* Mon Oct 03 2011 Rex Dieter - 0:7.0.21-3.1 -- rebuild (java), rel-eng#4932 - -* Mon Sep 26 2011 Ivan Afonichev 0:7.0.21-3 -- Fix basedir mode - -* Tue Sep 20 2011 Roland Grunberg 0:7.0.21-2 -- Add manifests for el-api, jasper-el, jasper, tomcat, and tomcat-juli. - -* Thu Sep 8 2011 Ivan Afonichev 0:7.0.21-1 -- Updated to 7.0.21 - -* Mon Aug 15 2011 Ivan Afonichev 0:7.0.20-3 -- Require java = 1:1.6.0 - -* Mon Aug 15 2011 Ivan Afonichev 0:7.0.20-2 -- Require java < 1.7.0 - -* Mon Aug 15 2011 Ivan Afonichev 0:7.0.20-1 -- Updated to 7.0.20 - -* Tue Jul 26 2011 Ivan Afonichev 0:7.0.19-1 -- Updated to 7.0.19 - -* Tue Jun 21 2011 Ivan Afonichev 0:7.0.16-1 -- Updated to 7.0.16 - -* Mon Jun 6 2011 Ivan Afonichev 0:7.0.14-3 -- Added initial systemd service -- Fix some paths - -* Sat May 21 2011 Ivan Afonichev 0:7.0.14-2 -- Fixed http source link -- Securify some permissions -- Added licenses for el-api and servlet-api -- Added dependency on jpackage-utils for the javadoc subpackage - -* Sat May 14 2011 Ivan Afonichev 0:7.0.14-1 -- Updated to 7.0.14 - -* Thu May 5 2011 Ivan Afonichev 0:7.0.12-4 -- Provided local paths for libs -- Fixed dependencies -- Fixed update temp/work cleanup - -* Mon May 2 2011 Ivan Afonichev 0:7.0.12-3 -- Fixed package groups -- Fixed some permissions -- Fixed some links -- Removed old tomcat6 crap - -* Thu Apr 28 2011 Ivan Afonichev 0:7.0.12-2 -- Package now named just tomcat instead of tomcat7 -- Removed Provides: %%{name}-log4j -- Switched to apache-commons-* names instead of jakarta-commons-* . -- Remove the old changelog -- BR/R java >= 1:1.6.0 , same for java-devel -- Removed old tomcat6 crap - -* Wed Apr 27 2011 Ivan Afonichev 0:7.0.12-1 -- Tomcat7 +* Thu Jun 07 2018 Coty Sutherland - 1:9.0.7-1 +- Create single RPM for FreeIPA to use From df584c8d778d31537386eb07f12f01d2992d83b3 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 8 Jun 2018 15:00:29 -0400 Subject: [PATCH 201/273] Initialized to use tito. --- .tito/packages/.readme | 3 +++ .tito/tito.props | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 .tito/packages/.readme create mode 100644 .tito/tito.props diff --git a/.tito/packages/.readme b/.tito/packages/.readme new file mode 100644 index 0000000..b9411e2 --- /dev/null +++ b/.tito/packages/.readme @@ -0,0 +1,3 @@ +the .tito/packages directory contains metadata files +named after their packages. Each file has the latest tagged +version and the project's relative directory. diff --git a/.tito/tito.props b/.tito/tito.props new file mode 100644 index 0000000..eab3f19 --- /dev/null +++ b/.tito/tito.props @@ -0,0 +1,5 @@ +[buildconfig] +builder = tito.builder.Builder +tagger = tito.tagger.VersionTagger +changelog_do_not_remove_cherrypick = 0 +changelog_format = %s (%ae) From 007cf5606ecb8f0b535766ec2a0f616333ac428d Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 8 Jun 2018 15:02:39 -0400 Subject: [PATCH 202/273] Automatic commit of package [tomcat] release [9.0.7-1]. Created by command: /usr/bin/tito tag 1.0 --- .tito/packages/tomcat | 1 + tomcat.spec | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 .tito/packages/tomcat diff --git a/.tito/packages/tomcat b/.tito/packages/tomcat new file mode 100644 index 0000000..c814425 --- /dev/null +++ b/.tito/packages/tomcat @@ -0,0 +1 @@ +9.0.7-1 ./ diff --git a/tomcat.spec b/tomcat.spec index f0cee80..850bde4 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -515,5 +515,8 @@ fi %{_datadir}/maven-metadata/tomcat.xml %changelog +* Fri Jun 08 2018 Coty Sutherland 9.0.7-1 +- new package built with tito + * Thu Jun 07 2018 Coty Sutherland - 1:9.0.7-1 - Create single RPM for FreeIPA to use From cd6fcc4e55771b873cdd88ad9fdfde2bf81648e4 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 8 Jun 2018 15:09:23 -0400 Subject: [PATCH 203/273] Switch tito to use NoTgzBuilder since I'm using a zip... --- .tito/tito.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tito/tito.props b/.tito/tito.props index eab3f19..70eda22 100644 --- a/.tito/tito.props +++ b/.tito/tito.props @@ -1,5 +1,5 @@ [buildconfig] -builder = tito.builder.Builder +builder = tito.builder.NoTgzBuilder tagger = tito.tagger.VersionTagger changelog_do_not_remove_cherrypick = 0 changelog_format = %s (%ae) From 246d44ac3852c87d918d60d2779dfc79c2c4e6d5 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Mon, 11 Jun 2018 14:13:20 -0400 Subject: [PATCH 204/273] Update sources --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 927322b..8a82736 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (apache-tomcat-8.5.30-src.tar.gz) = 53729cfd1859872109f816df2642e3cd776a7faf8c55b1d50df0459f12958aacbf36debe6e8f10c19ab0a5bb2973fa63a2fec57f83ecaf19f4cf9d82e4a20265 +SHA512 (tomcat-9.0.7.redhat-10-src.zip) = 0eee2cccfd08704350095b1fdd1472d2f85b81e6b8d8bf3a3f4e5005fe3bb18503438c2a5499af0dc21ab4e1d0636c2ee276aae52af823881ed0f444fb65fc81 From da3ae2f84c9f1eda77b5e180e0f274b2f56f548c Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Mon, 11 Jun 2018 14:27:31 -0400 Subject: [PATCH 205/273] Rename spec file --- tomcat.spec => pki-servlet-container.spec | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tomcat.spec => pki-servlet-container.spec (100%) diff --git a/tomcat.spec b/pki-servlet-container.spec similarity index 100% rename from tomcat.spec rename to pki-servlet-container.spec From 5061e0a17cceee8425d3fa3b95593627831c48b1 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Mon, 11 Jun 2018 14:28:49 -0400 Subject: [PATCH 206/273] Regroup source files --- pki-servlet-container.spec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 850bde4..27c511f 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -71,9 +71,9 @@ Source3: %{name}-%{major_version}.%{minor_version}.sysconfig Source4: %{name}-%{major_version}.%{minor_version}.wrapper Source6: %{name}-%{major_version}.%{minor_version}-digest.script Source7: %{name}-%{major_version}.%{minor_version}-tool-wrapper.script -Source8: servlet-api-OSGi-MANIFEST.MF -Source9: jsp-api-OSGi-MANIFEST.MF -Source11: %{name}-%{major_version}.%{minor_version}.service +Source8: %{name}-%{major_version}.%{minor_version}.service +Source9: servlet-api-OSGi-MANIFEST.MF +Source11: jsp-api-OSGi-MANIFEST.MF Source12: el-api-OSGi-MANIFEST.MF Source13: jasper-el-OSGi-MANIFEST.MF Source14: jasper-OSGi-MANIFEST.MF @@ -203,10 +203,10 @@ export OPT_JAR_LIST="xalan-j2-serializer" # inject OSGi manifests mkdir -p META-INF -cp -p %{SOURCE8} META-INF/MANIFEST.MF +cp -p %{SOURCE9} META-INF/MANIFEST.MF touch META-INF/MANIFEST.MF zip output/build/lib/servlet-api.jar META-INF/MANIFEST.MF -cp -p %{SOURCE9} META-INF/MANIFEST.MF +cp -p %{SOURCE11} META-INF/MANIFEST.MF touch META-INF/MANIFEST.MF zip output/build/lib/jsp-api.jar META-INF/MANIFEST.MF cp -p %{SOURCE12} META-INF/MANIFEST.MF @@ -265,7 +265,7 @@ popd > ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/%{name} %{__install} -m 0644 %{SOURCE4} \ ${RPM_BUILD_ROOT}%{_sbindir}/%{name} -%{__install} -m 0644 %{SOURCE11} \ +%{__install} -m 0644 %{SOURCE8} \ ${RPM_BUILD_ROOT}%{_unitdir}/%{name}.service %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ From be9ac2b0c2f096d92b8c189bbd7879e5741e75ff Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 10:04:37 -0400 Subject: [PATCH 207/273] Add serlvet-api package back for FreeIPA --- pki-servlet-container.spec | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 27c511f..96c8b15 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -139,12 +139,6 @@ Obsoletes: %{name}-jsp-2.2-api Requires: ecj >= 1:4.6.3 Requires(preun): coreutils -#%%package servlet-%%{servletspec}-api -Provides: servlet = %{servletspec} -Provides: servlet6 -Provides: servlet3 -Obsoletes: %{name}-servlet-3.0-api - #%%package el-%%{elspec}-api Provides: el_api = %{elspec} Obsoletes: %{name}-el-2.2-api @@ -159,6 +153,19 @@ Tomcat is developed in an open and participatory environment and released under the Apache Software License version 2.0. Tomcat is intended to be a collaboration of the best-of-breed developers from around the world. +%package servlet-%{servletspec}-api +Group: Development/Libraries +Summary: Apache Tomcat Java Servlet v%{servletspec} API Implementation Classes +Provides: servlet = %{servletspec} +Provides: servlet6 +Provides: servlet3 +Obsoletes: %{name}-servlet-3.1-api +Requires(post): chkconfig +Requires(postun): chkconfig + +%description servlet-%{servletspec}-api +Apache Tomcat Servlet API Implementation Classes. + %prep %setup -q -n %{packdname} @@ -364,7 +371,7 @@ done # Generate a depmap fragment javax.servlet:servlet-api pointing to # tomcat-servlet-3.0-api for backwards compatibility # also provide jetty depmap (originally in jetty package, but it's cleaner to have it here -%add_maven_depmap JPP-tomcat-servlet-api.pom tomcat-servlet-api.jar +%add_maven_depmap JPP-tomcat-servlet-api.pom tomcat-servlet-api.jar -f "tomcat-servlet-api" # replace temporary copy with link %{__ln_s} -f $(abs2rel %{bindir}/tomcat-juli.jar %{libdir}) ${RPM_BUILD_ROOT}%{libdir}/ @@ -510,10 +517,14 @@ fi %{_mavenpomdir}/JPP.%{name}-jni.pom %{_mavenpomdir}/JPP.%{name}-util-scan.pom %{_mavenpomdir}/JPP-%{name}-jsp-api.pom -%{_mavenpomdir}/JPP-%{name}-servlet-api.pom %{_mavenpomdir}/JPP-%{name}-el-api.pom %{_datadir}/maven-metadata/tomcat.xml +%files servlet-%{servletspec}-api -f output/dist/src/res/maven/.mfiles-tomcat-servlet-api +%defattr(-,root,root,-) +%doc LICENSE +%{_javadir}/%{name}-servlet-%{servletspec}*.jar + %changelog * Fri Jun 08 2018 Coty Sutherland 9.0.7-1 - new package built with tito From 2a25d68d4e88734356b6a8967b8efd397f987007 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 10:24:54 -0400 Subject: [PATCH 208/273] Update all references for %{name} to 'tomcat' to maintain directory structures, etc and reduce changes that FreeIPA will need to make in order to use this package --- pki-servlet-container.spec | 210 ++++++++++++++++++------------------- 1 file changed, 105 insertions(+), 105 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 96c8b15..05a1c01 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -42,14 +42,14 @@ %global tcuid 91 # FHS 2.3 compliant tree structure - http://www.pathname.com/fhs/2.3/ -%global basedir %{_var}/lib/%{name} +%global basedir %{_var}/lib/tomcat %global appdir %{basedir}/webapps -%global homedir %{_datadir}/%{name} +%global homedir %{_datadir}/tomcat %global bindir %{homedir}/bin -%global confdir %{_sysconfdir}/%{name} -%global libdir %{_javadir}/%{name} -%global logdir %{_var}/log/%{name} -%global cachedir %{_var}/cache/%{name} +%global confdir %{_sysconfdir}/tomcat +%global libdir %{_javadir}/tomcat +%global logdir %{_var}/log/tomcat +%global cachedir %{_var}/cache/tomcat %global tempdir %{cachedir}/temp %global workdir %{cachedir}/work %global _initrddir %{_sysconfdir}/init.d @@ -66,12 +66,12 @@ URL: http://tomcat.apache.org/ #Source0: http://www.apache.org/dist/tomcat/tomcat-%%{major_version}/v%%{version}/src/%%{packdname}.tar.gz Source0: tomcat-9.0.7.redhat-10-src.zip -Source1: %{name}-%{major_version}.%{minor_version}.conf -Source3: %{name}-%{major_version}.%{minor_version}.sysconfig -Source4: %{name}-%{major_version}.%{minor_version}.wrapper -Source6: %{name}-%{major_version}.%{minor_version}-digest.script -Source7: %{name}-%{major_version}.%{minor_version}-tool-wrapper.script -Source8: %{name}-%{major_version}.%{minor_version}.service +Source1: tomcat-%{major_version}.%{minor_version}.conf +Source3: tomcat-%{major_version}.%{minor_version}.sysconfig +Source4: tomcat-%{major_version}.%{minor_version}.wrapper +Source6: tomcat-%{major_version}.%{minor_version}-digest.script +Source7: tomcat-%{major_version}.%{minor_version}-tool-wrapper.script +Source8: tomcat-%{major_version}.%{minor_version}.service Source9: servlet-api-OSGi-MANIFEST.MF Source11: jsp-api-OSGi-MANIFEST.MF Source12: el-api-OSGi-MANIFEST.MF @@ -84,9 +84,9 @@ Source30: tomcat-preamble Source31: tomcat-server Source32: tomcat-named.service -Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch -Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch -Patch2: %{name}-8.0.36-CompilerOptionsV9.patch +Patch0: tomcat-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch +Patch1: tomcat-%{major_version}.%{minor_version}-tomcat-users-webapp.patch +Patch2: tomcat-8.0.36-CompilerOptionsV9.patch Patch3: disableJavadocFailOnWarning.patch BuildArch: noarch @@ -126,14 +126,14 @@ Requires(preun): systemd-units Requires(postun): systemd-units # added after log4j sub-package was removed -Provides: %{name}-log4j = %{epoch}:%{version}-%{release} +Provides: tomcat-log4j = %{epoch}:%{version}-%{release} # Leftover requires/provides from removing the subpackages # they still apply in instances where the old version is installed. #%%package jsp-%%{jspspec}-api Provides: jsp = %{jspspec} -Obsoletes: %{name}-jsp-2.2-api +Obsoletes: tomcat-jsp-2.2-api #%%package lib Requires: ecj >= 1:4.6.3 @@ -141,7 +141,7 @@ Requires(preun): coreutils #%%package el-%%{elspec}-api Provides: el_api = %{elspec} -Obsoletes: %{name}-el-2.2-api +Obsoletes: tomcat-el-2.2-api %description Tomcat is the servlet container that is used in the official Reference @@ -159,7 +159,7 @@ Summary: Apache Tomcat Java Servlet v%{servletspec} API Implementation Classes Provides: servlet = %{servletspec} Provides: servlet6 Provides: servlet3 -Obsoletes: %{name}-servlet-3.1-api +Obsoletes: tomcat-servlet-3.1-api Requires(post): chkconfig Requires(postun): chkconfig @@ -252,7 +252,7 @@ zip output/build/bin/tomcat-juli.jar META-INF/MANIFEST.MF %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{tempdir} %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{workdir} %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_unitdir} -%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_libexecdir}/%{name} +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_libexecdir}/tomcat # move things into place # First copy supporting libs to tomcat lib @@ -265,48 +265,48 @@ popd %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE1} \ - > ${RPM_BUILD_ROOT}%{confdir}/%{name}.conf + > ${RPM_BUILD_ROOT}%{confdir}/tomcat.conf %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE3} \ - > ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/%{name} + > ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/tomcat %{__install} -m 0644 %{SOURCE4} \ - ${RPM_BUILD_ROOT}%{_sbindir}/%{name} + ${RPM_BUILD_ROOT}%{_sbindir}/tomcat %{__install} -m 0644 %{SOURCE8} \ - ${RPM_BUILD_ROOT}%{_unitdir}/%{name}.service + ${RPM_BUILD_ROOT}%{_unitdir}/tomcat.service %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE6} \ - > ${RPM_BUILD_ROOT}%{_bindir}/%{name}-digest + > ${RPM_BUILD_ROOT}%{_bindir}/tomcat-digest %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE7} \ - > ${RPM_BUILD_ROOT}%{_bindir}/%{name}-tool-wrapper + > ${RPM_BUILD_ROOT}%{_bindir}/tomcat-tool-wrapper %{__install} -m 0644 %{SOURCE21} \ - ${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/functions + ${RPM_BUILD_ROOT}%{_libexecdir}/tomcat/functions %{__install} -m 0755 %{SOURCE30} \ - ${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/preamble + ${RPM_BUILD_ROOT}%{_libexecdir}/tomcat/preamble %{__install} -m 0755 %{SOURCE31} \ - ${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/server + ${RPM_BUILD_ROOT}%{_libexecdir}/tomcat/server %{__install} -m 0644 %{SOURCE32} \ - ${RPM_BUILD_ROOT}%{_unitdir}/%{name}@.service + ${RPM_BUILD_ROOT}%{_unitdir}/tomcat@.service # Substitute libnames in catalina-tasks.xml sed -i \ - "s,el-api.jar,%{name}-el-%{elspec}-api.jar,; - s,servlet-api.jar,%{name}-servlet-%{servletspec}-api.jar,; - s,jsp-api.jar,%{name}-jsp-%{jspspec}-api.jar,;" \ + "s,el-api.jar,tomcat-el-%{elspec}-api.jar,; + s,servlet-api.jar,tomcat-servlet-%{servletspec}-api.jar,; + s,jsp-api.jar,tomcat-jsp-%{jspspec}-api.jar,;" \ ${RPM_BUILD_ROOT}%{bindir}/catalina-tasks.xml # create jsp and servlet API symlinks pushd ${RPM_BUILD_ROOT}%{_javadir} - %{__mv} %{name}/jsp-api.jar %{name}-jsp-%{jspspec}-api.jar - %{__ln_s} %{name}-jsp-%{jspspec}-api.jar %{name}-jsp-api.jar - %{__mv} %{name}/servlet-api.jar %{name}-servlet-%{servletspec}-api.jar - %{__ln_s} %{name}-servlet-%{servletspec}-api.jar %{name}-servlet-api.jar - %{__mv} %{name}/el-api.jar %{name}-el-%{elspec}-api.jar - %{__ln_s} %{name}-el-%{elspec}-api.jar %{name}-el-api.jar + %{__mv} tomcat/jsp-api.jar tomcat-jsp-%{jspspec}-api.jar + %{__ln_s} tomcat-jsp-%{jspspec}-api.jar tomcat-jsp-api.jar + %{__mv} tomcat/servlet-api.jar tomcat-servlet-%{servletspec}-api.jar + %{__ln_s} tomcat-servlet-%{servletspec}-api.jar tomcat-servlet-api.jar + %{__mv} tomcat/el-api.jar tomcat-el-%{elspec}-api.jar + %{__ln_s} tomcat-el-%{elspec}-api.jar tomcat-el-api.jar popd pushd output/build @@ -316,9 +316,9 @@ popd pushd ${RPM_BUILD_ROOT}%{libdir} # symlink JSP and servlet API jars - %{__ln_s} ../../java/%{name}-jsp-%{jspspec}-api.jar . - %{__ln_s} ../../java/%{name}-servlet-%{servletspec}-api.jar . - %{__ln_s} ../../java/%{name}-el-%{elspec}-api.jar . + %{__ln_s} ../../java/tomcat-jsp-%{jspspec}-api.jar . + %{__ln_s} ../../java/tomcat-servlet-%{servletspec}-api.jar . + %{__ln_s} ../../java/tomcat-el-%{elspec}-api.jar . %{__ln_s} $(build-classpath apache-commons-collections) commons-collections.jar %{__ln_s} $(build-classpath apache-commons-dbcp) commons-dbcp.jar %{__ln_s} $(build-classpath apache-commons-pool) commons-pool.jar @@ -348,17 +348,17 @@ done # we won't install dbcp, juli-adapters and juli-extras pom files for libname in annotations-api catalina jasper-el jasper catalina-ha; do - %{__cp} -a %{name}-$libname.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-$libname.pom - %add_maven_depmap JPP.%{name}-$libname.pom %{name}/$libname.jar + %{__cp} -a tomcat-$libname.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-$libname.pom + %add_maven_depmap JPP.tomcat-$libname.pom tomcat/$libname.jar done # tomcat-util-scan -%{__cp} -a %{name}-util-scan.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-util-scan.pom -%add_maven_depmap JPP.%{name}-util-scan.pom %{name}/%{name}-util-scan.jar +%{__cp} -a tomcat-util-scan.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-util-scan.pom +%add_maven_depmap JPP.tomcat-util-scan.pom tomcat/tomcat-util-scan.jar # tomcat-jni -%{__cp} -a %{name}-jni.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-jni.pom -%add_maven_depmap JPP.%{name}-jni.pom %{name}/%{name}-jni.jar +%{__cp} -a tomcat-jni.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-jni.pom +%add_maven_depmap JPP.tomcat-jni.pom tomcat/tomcat-jni.jar # servlet-api jsp-api and el-api are not in tomcat subdir, since they are widely re-used elsewhere %{__cp} -a tomcat-jsp-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-jsp-api.pom @@ -377,35 +377,35 @@ done %{__ln_s} -f $(abs2rel %{bindir}/tomcat-juli.jar %{libdir}) ${RPM_BUILD_ROOT}%{libdir}/ # two special pom where jar files have different names -%{__cp} -a tomcat-tribes.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-catalina-tribes.pom -%add_maven_depmap JPP.%{name}-catalina-tribes.pom %{name}/catalina-tribes.jar +%{__cp} -a tomcat-tribes.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-catalina-tribes.pom +%add_maven_depmap JPP.tomcat-catalina-tribes.pom tomcat/catalina-tribes.jar -%{__cp} -a tomcat-coyote.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-coyote.pom -%add_maven_depmap JPP.%{name}-tomcat-coyote.pom %{name}/tomcat-coyote.jar +%{__cp} -a tomcat-coyote.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-coyote.pom +%add_maven_depmap JPP.tomcat-tomcat-coyote.pom tomcat/tomcat-coyote.jar -%{__cp} -a tomcat-juli.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-juli.pom -%add_maven_depmap JPP.%{name}-tomcat-juli.pom %{name}/tomcat-juli.jar +%{__cp} -a tomcat-juli.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-juli.pom +%add_maven_depmap JPP.tomcat-tomcat-juli.pom tomcat/tomcat-juli.jar -%{__cp} -a tomcat-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-api.pom -%add_maven_depmap JPP.%{name}-tomcat-api.pom %{name}/tomcat-api.jar +%{__cp} -a tomcat-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-api.pom +%add_maven_depmap JPP.tomcat-tomcat-api.pom tomcat/tomcat-api.jar -%{__cp} -a tomcat-util.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-util.pom -%add_maven_depmap JPP.%{name}-tomcat-util.pom %{name}/tomcat-util.jar +%{__cp} -a tomcat-util.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-util.pom +%add_maven_depmap JPP.tomcat-tomcat-util.pom tomcat/tomcat-util.jar -%{__cp} -a tomcat-jdbc.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-jdbc.pom -%add_maven_depmap JPP.%{name}-tomcat-jdbc.pom %{name}/tomcat-jdbc.jar +%{__cp} -a tomcat-jdbc.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-jdbc.pom +%add_maven_depmap JPP.tomcat-tomcat-jdbc.pom tomcat/tomcat-jdbc.jar # tomcat-websocket-api -%{__cp} -a tomcat-websocket-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-websocket-api.pom -%add_maven_depmap JPP.%{name}-websocket-api.pom %{name}/websocket-api.jar +%{__cp} -a tomcat-websocket-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-websocket-api.pom +%add_maven_depmap JPP.tomcat-websocket-api.pom tomcat/websocket-api.jar # tomcat-tomcat-websocket -%{__cp} -a tomcat-websocket.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-websocket.pom -%add_maven_depmap JPP.%{name}-tomcat-websocket.pom %{name}/tomcat-websocket.jar +%{__cp} -a tomcat-websocket.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-websocket.pom +%add_maven_depmap JPP.tomcat-tomcat-websocket.pom tomcat/tomcat-websocket.jar # tomcat-jaspic-api -%{__cp} -a tomcat-jaspic-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-jaspic-api.pom -%add_maven_depmap JPP.%{name}-jaspic-api.pom %{name}/jaspic-api.jar +%{__cp} -a tomcat-jaspic-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-jaspic-api.pom +%add_maven_depmap JPP.tomcat-jaspic-api.pom tomcat/jaspic-api.jar %pre @@ -416,48 +416,48 @@ done %post # install but don't activate -%systemd_post %{name}.service +%systemd_post tomcat.service # Collapse all of the alternatives installations into one %{_sbindir}/update-alternatives --install %{_javadir}/jsp.jar jsp \ - %{_javadir}/%{name}-jsp-%{jspspec}-api.jar 20200 + %{_javadir}/tomcat-jsp-%{jspspec}-api.jar 20200 %{_sbindir}/update-alternatives --install %{_javadir}/servlet.jar servlet \ - %{_javadir}/%{name}-servlet-%{servletspec}-api.jar 30000 + %{_javadir}/tomcat-servlet-%{servletspec}-api.jar 30000 %{_sbindir}/update-alternatives --install %{_javadir}/elspec.jar elspec \ - %{_javadir}/%{name}-el-%{elspec}-api.jar 20300 + %{_javadir}/tomcat-el-%{elspec}-api.jar 20300 %preun # clean tempdir and workdir on removal or upgrade %{__rm} -rf %{workdir}/* %{tempdir}/* -%systemd_preun %{name}.service +%systemd_preun tomcat.service %postun -%systemd_postun_with_restart %{name}.service +%systemd_postun_with_restart tomcat.service # Collapse all of the alternatives removals into one if [ "$1" = "0" ]; then %{_sbindir}/update-alternatives --remove jsp \ - %{_javadir}/%{name}-jsp-%{jspspec}-api.jar + %{_javadir}/tomcat-jsp-%{jspspec}-api.jar %{_sbindir}/update-alternatives --remove servlet \ - %{_javadir}/%{name}-servlet-%{servletspec}-api.jar + %{_javadir}/tomcat-servlet-%{servletspec}-api.jar %{_sbindir}/update-alternatives --remove elspec \ - %{_javadir}/%{name}-el-%{elspec}-api.jar + %{_javadir}/tomcat-el-%{elspec}-api.jar fi %files %defattr(0664,root,tomcat,0755) %doc {LICENSE,NOTICE,RELEASE*} -%attr(0755,root,root) %{_bindir}/%{name}-digest -%attr(0755,root,root) %{_bindir}/%{name}-tool-wrapper -%attr(0755,root,root) %{_sbindir}/%{name} -%attr(0644,root,root) %{_unitdir}/%{name}.service -%attr(0644,root,root) %{_unitdir}/%{name}@.service -%attr(0755,root,root) %dir %{_libexecdir}/%{name} +%attr(0755,root,root) %{_bindir}/tomcat-digest +%attr(0755,root,root) %{_bindir}/tomcat-tool-wrapper +%attr(0755,root,root) %{_sbindir}/tomcat +%attr(0644,root,root) %{_unitdir}/tomcat.service +%attr(0644,root,root) %{_unitdir}/tomcat@.service +%attr(0755,root,root) %dir %{_libexecdir}/tomcat %attr(0755,root,root) %dir %{_localstatedir}/lib/tomcats -%attr(0644,root,root) %{_libexecdir}/%{name}/functions -%attr(0755,root,root) %{_libexecdir}/%{name}/preamble -%attr(0755,root,root) %{_libexecdir}/%{name}/server -%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/%{name} +%attr(0644,root,root) %{_libexecdir}/tomcat/functions +%attr(0755,root,root) %{_libexecdir}/tomcat/preamble +%attr(0755,root,root) %{_libexecdir}/tomcat/server +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/tomcat %attr(0755,root,tomcat) %dir %{basedir} %attr(0755,root,tomcat) %dir %{confdir} @@ -475,7 +475,7 @@ fi %attr(0775,root,tomcat) %dir %{confdir}/Catalina/localhost %attr(0755,root,tomcat) %dir %{confdir}/conf.d %{confdir}/conf.d/README -%config(noreplace) %{confdir}/%{name}.conf +%config(noreplace) %{confdir}/tomcat.conf %config(noreplace) %{confdir}/*.policy %config(noreplace) %{confdir}/*.properties %config(noreplace) %{confdir}/context.xml @@ -500,30 +500,30 @@ fi %{libdir}/*.jar %{_javadir}/*.jar %{bindir}/tomcat-juli.jar -%{_mavenpomdir}/JPP.%{name}-annotations-api.pom -%{_mavenpomdir}/JPP.%{name}-catalina-ha.pom -%{_mavenpomdir}/JPP.%{name}-catalina-tribes.pom -%{_mavenpomdir}/JPP.%{name}-catalina.pom -%{_mavenpomdir}/JPP.%{name}-jasper-el.pom -%{_mavenpomdir}/JPP.%{name}-jasper.pom -%{_mavenpomdir}/JPP.%{name}-tomcat-api.pom -%{_mavenpomdir}/JPP.%{name}-tomcat-juli.pom -%{_mavenpomdir}/JPP.%{name}-tomcat-coyote.pom -%{_mavenpomdir}/JPP.%{name}-tomcat-util.pom -%{_mavenpomdir}/JPP.%{name}-tomcat-jdbc.pom -%{_mavenpomdir}/JPP.%{name}-websocket-api.pom -%{_mavenpomdir}/JPP.%{name}-tomcat-websocket.pom -%{_mavenpomdir}/JPP.%{name}-jaspic-api.pom -%{_mavenpomdir}/JPP.%{name}-jni.pom -%{_mavenpomdir}/JPP.%{name}-util-scan.pom -%{_mavenpomdir}/JPP-%{name}-jsp-api.pom -%{_mavenpomdir}/JPP-%{name}-el-api.pom +%{_mavenpomdir}/JPP.tomcat-annotations-api.pom +%{_mavenpomdir}/JPP.tomcat-catalina-ha.pom +%{_mavenpomdir}/JPP.tomcat-catalina-tribes.pom +%{_mavenpomdir}/JPP.tomcat-catalina.pom +%{_mavenpomdir}/JPP.tomcat-jasper-el.pom +%{_mavenpomdir}/JPP.tomcat-jasper.pom +%{_mavenpomdir}/JPP.tomcat-tomcat-api.pom +%{_mavenpomdir}/JPP.tomcat-tomcat-juli.pom +%{_mavenpomdir}/JPP.tomcat-tomcat-coyote.pom +%{_mavenpomdir}/JPP.tomcat-tomcat-util.pom +%{_mavenpomdir}/JPP.tomcat-tomcat-jdbc.pom +%{_mavenpomdir}/JPP.tomcat-websocket-api.pom +%{_mavenpomdir}/JPP.tomcat-tomcat-websocket.pom +%{_mavenpomdir}/JPP.tomcat-jaspic-api.pom +%{_mavenpomdir}/JPP.tomcat-jni.pom +%{_mavenpomdir}/JPP.tomcat-util-scan.pom +%{_mavenpomdir}/JPP-tomcat-jsp-api.pom +%{_mavenpomdir}/JPP-tomcat-el-api.pom %{_datadir}/maven-metadata/tomcat.xml %files servlet-%{servletspec}-api -f output/dist/src/res/maven/.mfiles-tomcat-servlet-api %defattr(-,root,root,-) %doc LICENSE -%{_javadir}/%{name}-servlet-%{servletspec}*.jar +%{_javadir}/tomcat-servlet-%{servletspec}*.jar %changelog * Fri Jun 08 2018 Coty Sutherland 9.0.7-1 From 058b0e8daebe259bc5ef5bd7ce08c2406237ba21 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 12:11:15 -0400 Subject: [PATCH 209/273] Change package name to 'pki-servlet-container' Add servlet-api sub-package back for FreeIPA to use Note that sub-package name differs parent because it was too lengthy otherwise --- pki-servlet-container.spec | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 05a1c01..e70f0e9 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -55,7 +55,7 @@ %global _initrddir %{_sysconfdir}/init.d %global _systemddir /lib/systemd/system -Name: tomcat +Name: pki-servlet-container Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} Release: 1%{?dist} @@ -153,7 +153,7 @@ Tomcat is developed in an open and participatory environment and released under the Apache Software License version 2.0. Tomcat is intended to be a collaboration of the best-of-breed developers from around the world. -%package servlet-%{servletspec}-api +%package -n pki-servlet-%{servletspec}-api Group: Development/Libraries Summary: Apache Tomcat Java Servlet v%{servletspec} API Implementation Classes Provides: servlet = %{servletspec} @@ -163,7 +163,7 @@ Obsoletes: tomcat-servlet-3.1-api Requires(post): chkconfig Requires(postun): chkconfig -%description servlet-%{servletspec}-api +%description -n pki-servlet-%{servletspec}-api Apache Tomcat Servlet API Implementation Classes. %prep @@ -407,6 +407,9 @@ done %{__cp} -a tomcat-jaspic-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-jaspic-api.pom %add_maven_depmap JPP.tomcat-jaspic-api.pom tomcat/jaspic-api.jar +# Manually change the metadata filenames +%{__mv} ${RPM_BUILD_ROOT}%{_datadir}/maven-metadata/%{name}.xml ${RPM_BUILD_ROOT}%{_datadir}/maven-metadata/tomcat.xml +%{__mv} ${RPM_BUILD_ROOT}%{_datadir}/maven-metadata/%{name}-tomcat-servlet-api.xml ${RPM_BUILD_ROOT}%{_datadir}/maven-metadata/tomcat-servlet-api.xml %pre # add the tomcat user and group @@ -519,11 +522,14 @@ fi %{_mavenpomdir}/JPP-tomcat-jsp-api.pom %{_mavenpomdir}/JPP-tomcat-el-api.pom %{_datadir}/maven-metadata/tomcat.xml +%exclude %{_javadir}/tomcat-servlet-%{servletspec}*.jar -%files servlet-%{servletspec}-api -f output/dist/src/res/maven/.mfiles-tomcat-servlet-api +%files -n pki-servlet-%{servletspec}-api %defattr(-,root,root,-) %doc LICENSE %{_javadir}/tomcat-servlet-%{servletspec}*.jar +%{_datadir}/maven-metadata/tomcat-servlet-api.xml +%{_mavenpomdir}/JPP-tomcat-servlet-api.pom %changelog * Fri Jun 08 2018 Coty Sutherland 9.0.7-1 From 94c5c759fa8161a5721be071d032fdbf6dcbaf89 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 12:16:32 -0400 Subject: [PATCH 210/273] Forgot to add requirement on the pki-servlet-api sub-package --- pki-servlet-container.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index e70f0e9..bbc7381 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -143,6 +143,8 @@ Requires(preun): coreutils Provides: el_api = %{elspec} Obsoletes: tomcat-el-2.2-api +Requires: pki-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} + %description Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServer Pages technologies. From 89dafd74b5ac0a5ba7162b478bfb93a271a37ee3 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 12:17:16 -0400 Subject: [PATCH 211/273] Sync up release number with JWS build so that you can immediately know where it came from --- pki-servlet-container.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index bbc7381..9d1278e 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -56,7 +56,7 @@ %global _systemddir /lib/systemd/system Name: pki-servlet-container -Epoch: 1 +Epoch: %{redhat_version} Version: %{major_version}.%{minor_version}.%{micro_version} Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API From bd4ede044e90f6b9791c1410d65daaa597730dcd Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 12:20:26 -0400 Subject: [PATCH 212/273] Reset Epoch back to 1 and set Release to sync up with the JWS builds... --- pki-servlet-container.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 9d1278e..f42105b 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -56,9 +56,9 @@ %global _systemddir /lib/systemd/system Name: pki-servlet-container -Epoch: %{redhat_version} +Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: %{redhat_version}%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons License: ASL 2.0 From a108316ffea1b0513751297408c3e7ded58586cd Mon Sep 17 00:00:00 2001 From: Release Configuration Management Date: Tue, 12 Jun 2018 17:06:01 +0000 Subject: [PATCH 213/273] Repo creation --- .gitignore | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 From 41eaee89d11e80f822a45a3de6f8821c64163604 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 14:19:54 -0400 Subject: [PATCH 214/273] Adjust changelog --- pki-servlet-container.spec | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index f42105b..24cf81b 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -534,8 +534,5 @@ fi %{_mavenpomdir}/JPP-tomcat-servlet-api.pom %changelog -* Fri Jun 08 2018 Coty Sutherland 9.0.7-1 -- new package built with tito - -* Thu Jun 07 2018 Coty Sutherland - 1:9.0.7-1 -- Create single RPM for FreeIPA to use +* Thu Jun 07 2018 Coty Sutherland - 1:9.0.7-10 +- Create packages for FreeIPA that wrap the JWS distribution of Tomcat From e8d6a98c1b59a5bed4186a74e2c7beae58a3c381 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 14:27:19 -0400 Subject: [PATCH 215/273] Removing dist-source since it's not used in the JWS build --- pki-servlet-container.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 24cf81b..be80869 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -205,7 +205,7 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dversion.build="%{micro_version}" \ -Djava.7.home=%{java_home} \ -Dexecute.validate=false \ - deploy dist-prepare dist-source + deploy dist-prepare # remove some jars that we'll replace with symlinks later %{__rm} output/build/bin/commons-daemon.jar output/build/lib/ecj.jar From 3438c668950aed1524ef251e505a98eaeeb5c425 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 14:56:58 -0400 Subject: [PATCH 216/273] Revert "Removing dist-source since it's not used in the JWS build" This reverts commit 322c052855ac896914b539360461b5aa68216d44. --- pki-servlet-container.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index be80869..24cf81b 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -205,7 +205,7 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dversion.build="%{micro_version}" \ -Djava.7.home=%{java_home} \ -Dexecute.validate=false \ - deploy dist-prepare + deploy dist-prepare dist-source # remove some jars that we'll replace with symlinks later %{__rm} output/build/bin/commons-daemon.jar output/build/lib/ecj.jar From 5e1b6dae43bf5857b3b3631221ba2e2ccbb6707b Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 14:59:25 -0400 Subject: [PATCH 217/273] Remove unused dependency on commons-daemon --- pki-servlet-container.spec | 4 +--- tomcat-9.0-digest.script | 2 +- tomcat-9.0-tool-wrapper.script | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 24cf81b..6cba1f0 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -95,7 +95,6 @@ BuildRequires: ant BuildRequires: ecj >= 1:4.6.3 BuildRequires: findutils BuildRequires: apache-commons-collections -BuildRequires: apache-commons-daemon BuildRequires: apache-commons-dbcp BuildRequires: apache-commons-pool BuildRequires: java-devel >= 1:1.8.0 @@ -110,7 +109,6 @@ BuildRequires: geronimo-jaxrpc BuildRequires: wsdl4j BuildRequires: systemd-units -Requires: apache-commons-daemon Requires: apache-commons-collections Requires: apache-commons-dbcp Requires: apache-commons-pool @@ -191,7 +189,7 @@ export OPT_JAR_LIST="xalan-j2-serializer" %{ant} -Dbase.path="." \ -Dbuild.compiler="modern" \ -Dcommons-collections.jar="$(build-classpath apache-commons-collections)" \ - -Dcommons-daemon.jar="$(build-classpath apache-commons-daemon)" \ + -Dcommons-daemon.jar="HACK" \ -Dcommons-daemon.native.src.tgz="HACK" \ -Djdt.jar="$(build-classpath ecj)" \ -Dtomcat-native.tar.gz="HACK" \ diff --git a/tomcat-9.0-digest.script b/tomcat-9.0-digest.script index ce4aa0f..731d4cf 100644 --- a/tomcat-9.0-digest.script +++ b/tomcat-9.0-digest.script @@ -34,7 +34,7 @@ export CLASSPATH MAIN_CLASS="org.apache.catalina.startup.Tool" BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\"" BASE_OPTIONS="" -BASE_JARS="commons-daemon tomcat/catalina servlet tomcat/tomcat-util tomcat/tomcat-coyote tomcat/tomcat-api tomcat/tomcat-util-scan" +BASE_JARS="tomcat/catalina servlet tomcat/tomcat-util tomcat/tomcat-coyote tomcat/tomcat-api tomcat/tomcat-util-scan" # Set parameters set_classpath $BASE_JARS diff --git a/tomcat-9.0-tool-wrapper.script b/tomcat-9.0-tool-wrapper.script index 949d46d..40e39ff 100644 --- a/tomcat-9.0-tool-wrapper.script +++ b/tomcat-9.0-tool-wrapper.script @@ -34,7 +34,7 @@ export CLASSPATH MAIN_CLASS="org.apache.catalina.startup.Tool" BASE_OPTIONS="" BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\"" -BASE_JARS="commons-daemon tomcat/catalina servlet tomcat/tomcat-util tomcat/tomcat-coyote tomcat/tomcat-api tomcat/tomcat-util-scan" +BASE_JARS="tomcat/catalina servlet tomcat/tomcat-util tomcat/tomcat-coyote tomcat/tomcat-api tomcat/tomcat-util-scan" # Set parameters set_classpath $BASE_JARS From 4dbb64044f54561b92cbe9409dfad46435ab9d5a Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 15:11:27 -0400 Subject: [PATCH 218/273] Remove webservices dependencies that were unused (not packaged, ever) --- pki-servlet-container.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 6cba1f0..72300df 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -105,8 +105,6 @@ BuildRequires: jpackage-utils >= 0:1.7.0 BuildRequires: javapackages-local %endif BuildRequires: junit -BuildRequires: geronimo-jaxrpc -BuildRequires: wsdl4j BuildRequires: systemd-units Requires: apache-commons-collections @@ -196,8 +194,6 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dtomcat-native.home="." \ -Dcommons-daemon.native.win.mgr.exe="HACK" \ -Dnsis.exe="HACK" \ - -Djaxrpc-lib.jar="$(build-classpath jaxrpc)" \ - -Dwsdl4j-lib.jar="$(build-classpath wsdl4j)" \ -Dno.build.dbcp=true \ -Dversion="%{version}" \ -Dversion.build="%{micro_version}" \ From 64e9d1cc4ace82d953e83ae1b24b9dc5fe3f89fb Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 15:12:15 -0400 Subject: [PATCH 219/273] Remove unused system property --- pki-servlet-container.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 72300df..33501c7 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -197,7 +197,6 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dno.build.dbcp=true \ -Dversion="%{version}" \ -Dversion.build="%{micro_version}" \ - -Djava.7.home=%{java_home} \ -Dexecute.validate=false \ deploy dist-prepare dist-source From 3fb00aaf2c139e2863e822f4d65d83487e623613 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 15:18:30 -0400 Subject: [PATCH 220/273] execute.validate is false by default --- pki-servlet-container.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 33501c7..8570b59 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -197,7 +197,6 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dno.build.dbcp=true \ -Dversion="%{version}" \ -Dversion.build="%{micro_version}" \ - -Dexecute.validate=false \ deploy dist-prepare dist-source # remove some jars that we'll replace with symlinks later From 573c4ceb528bc5cd7e462c5c929d44f1ab390d26 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 15:24:03 -0400 Subject: [PATCH 221/273] The no.build.dbcp property went away in Tomcat 8 --- pki-servlet-container.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 8570b59..ef198f1 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -194,7 +194,6 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dtomcat-native.home="." \ -Dcommons-daemon.native.win.mgr.exe="HACK" \ -Dnsis.exe="HACK" \ - -Dno.build.dbcp=true \ -Dversion="%{version}" \ -Dversion.build="%{micro_version}" \ deploy dist-prepare dist-source From 5621db464f562b6f91d3e43b6af40d25858b5cee Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 15:31:11 -0400 Subject: [PATCH 222/273] Remove all of the unused apache-commons-* depedencies Remove junit dependency (not sure why that was there) Remove systemd-units BuildRequires --- pki-servlet-container.spec | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index ef198f1..ef27220 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -94,9 +94,6 @@ BuildArch: noarch BuildRequires: ant BuildRequires: ecj >= 1:4.6.3 BuildRequires: findutils -BuildRequires: apache-commons-collections -BuildRequires: apache-commons-dbcp -BuildRequires: apache-commons-pool BuildRequires: java-devel >= 1:1.8.0 BuildRequires: jpackage-utils >= 0:1.7.0 %if 0%{?fedora} >= 27 || 0%{?rhel} > 7 @@ -104,12 +101,7 @@ BuildRequires: jpackage-utils >= 0:1.7.0 # See https://fedora-java.github.io/howto/latest/#_add_maven_depmap_macro BuildRequires: javapackages-local %endif -BuildRequires: junit -BuildRequires: systemd-units -Requires: apache-commons-collections -Requires: apache-commons-dbcp -Requires: apache-commons-pool Requires: java-headless >= 1:1.8.0 Requires: jpackage-utils Requires: procps @@ -178,15 +170,12 @@ find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name " %build export OPT_JAR_LIST="xalan-j2-serializer" - # we don't care about the tarballs and we're going to replace - # tomcat-dbcp.jar with apache-commons-{collections,dbcp,pool}-tomcat5.jar - # so just create a dummy file for later removal + # Create a dummy file for later removal touch HACK # who needs a build.properties file anyway %{ant} -Dbase.path="." \ -Dbuild.compiler="modern" \ - -Dcommons-collections.jar="$(build-classpath apache-commons-collections)" \ -Dcommons-daemon.jar="HACK" \ -Dcommons-daemon.native.src.tgz="HACK" \ -Djdt.jar="$(build-classpath ecj)" \ @@ -303,8 +292,7 @@ pushd ${RPM_BUILD_ROOT}%{_javadir} popd pushd output/build - %{_bindir}/build-jar-repository lib apache-commons-collections \ - apache-commons-dbcp apache-commons-pool ecj 2>&1 + %{_bindir}/build-jar-repository lib ecj 2>&1 popd pushd ${RPM_BUILD_ROOT}%{libdir} @@ -312,9 +300,6 @@ pushd ${RPM_BUILD_ROOT}%{libdir} %{__ln_s} ../../java/tomcat-jsp-%{jspspec}-api.jar . %{__ln_s} ../../java/tomcat-servlet-%{servletspec}-api.jar . %{__ln_s} ../../java/tomcat-el-%{elspec}-api.jar . - %{__ln_s} $(build-classpath apache-commons-collections) commons-collections.jar - %{__ln_s} $(build-classpath apache-commons-dbcp) commons-dbcp.jar - %{__ln_s} $(build-classpath apache-commons-pool) commons-pool.jar %{__ln_s} $(build-classpath ecj) jasper-jdt.jar # Temporary copy the juli jar here from /usr/share/java/tomcat (for maven depmap) From adb27b54eae882eaa87e1a1f76163627de83008f Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 15:48:54 -0400 Subject: [PATCH 223/273] ECJ seems to be going away and the FreeIPA folks say they don't need it, so removing it here --- pki-servlet-container.spec | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index ef27220..26d3053 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -92,7 +92,6 @@ Patch3: disableJavadocFailOnWarning.patch BuildArch: noarch BuildRequires: ant -BuildRequires: ecj >= 1:4.6.3 BuildRequires: findutils BuildRequires: java-devel >= 1:1.8.0 BuildRequires: jpackage-utils >= 0:1.7.0 @@ -124,7 +123,6 @@ Provides: jsp = %{jspspec} Obsoletes: tomcat-jsp-2.2-api #%%package lib -Requires: ecj >= 1:4.6.3 Requires(preun): coreutils #%%package el-%%{elspec}-api @@ -168,6 +166,9 @@ find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name " %patch2 -p0 #%%patch3 -p0 +# Since we don't support ECJ in RHEL anymore, remove the class that requires it +%{__rm} -f java/org/apache/jasper/compiler/JDTCompiler.java + %build export OPT_JAR_LIST="xalan-j2-serializer" # Create a dummy file for later removal @@ -178,7 +179,7 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dbuild.compiler="modern" \ -Dcommons-daemon.jar="HACK" \ -Dcommons-daemon.native.src.tgz="HACK" \ - -Djdt.jar="$(build-classpath ecj)" \ + -Djdt.jar="HACK" \ -Dtomcat-native.tar.gz="HACK" \ -Dtomcat-native.home="." \ -Dcommons-daemon.native.win.mgr.exe="HACK" \ @@ -187,8 +188,8 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dversion.build="%{micro_version}" \ deploy dist-prepare dist-source - # remove some jars that we'll replace with symlinks later - %{__rm} output/build/bin/commons-daemon.jar output/build/lib/ecj.jar + # remove some jars that we don't need + %{__rm} output/build/bin/commons-daemon.jar # inject OSGi manifests mkdir -p META-INF @@ -291,16 +292,11 @@ pushd ${RPM_BUILD_ROOT}%{_javadir} %{__ln_s} tomcat-el-%{elspec}-api.jar tomcat-el-api.jar popd -pushd output/build - %{_bindir}/build-jar-repository lib ecj 2>&1 -popd - pushd ${RPM_BUILD_ROOT}%{libdir} # symlink JSP and servlet API jars %{__ln_s} ../../java/tomcat-jsp-%{jspspec}-api.jar . %{__ln_s} ../../java/tomcat-servlet-%{servletspec}-api.jar . %{__ln_s} ../../java/tomcat-el-%{elspec}-api.jar . - %{__ln_s} $(build-classpath ecj) jasper-jdt.jar # Temporary copy the juli jar here from /usr/share/java/tomcat (for maven depmap) %{__cp} -a ${RPM_BUILD_ROOT}%{bindir}/tomcat-juli.jar ./ From a6663e4ef4757cacd0ac4d57660505b741034b39 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 15:59:47 -0400 Subject: [PATCH 224/273] Minor formatting adjustment --- pki-servlet-container.spec | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 26d3053..fa2fcef 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -171,25 +171,26 @@ find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name " %build export OPT_JAR_LIST="xalan-j2-serializer" - # Create a dummy file for later removal - touch HACK - # who needs a build.properties file anyway - %{ant} -Dbase.path="." \ - -Dbuild.compiler="modern" \ - -Dcommons-daemon.jar="HACK" \ - -Dcommons-daemon.native.src.tgz="HACK" \ - -Djdt.jar="HACK" \ - -Dtomcat-native.tar.gz="HACK" \ - -Dtomcat-native.home="." \ - -Dcommons-daemon.native.win.mgr.exe="HACK" \ - -Dnsis.exe="HACK" \ - -Dversion="%{version}" \ - -Dversion.build="%{micro_version}" \ - deploy dist-prepare dist-source +# Create a dummy file for later removal +touch HACK - # remove some jars that we don't need - %{__rm} output/build/bin/commons-daemon.jar +# who needs a build.properties file anyway +%{ant} -Dbase.path="." \ + -Dbuild.compiler="modern" \ + -Dcommons-daemon.jar="HACK" \ + -Dcommons-daemon.native.src.tgz="HACK" \ + -Djdt.jar="HACK" \ + -Dtomcat-native.tar.gz="HACK" \ + -Dtomcat-native.home="." \ + -Dcommons-daemon.native.win.mgr.exe="HACK" \ + -Dnsis.exe="HACK" \ + -Dversion="%{version}" \ + -Dversion.build="%{micro_version}" \ + deploy dist-prepare dist-source + +# remove some jars that we don't need +%{__rm} output/build/bin/commons-daemon.jar # inject OSGi manifests mkdir -p META-INF From 1fc89451d77a5e24e8490748fb0d9e73a8e4bca8 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Wed, 13 Jun 2018 14:02:14 -0400 Subject: [PATCH 225/273] Remove JSVC support from tomcat-functions for this tomcat package --- tomcat-functions | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/tomcat-functions b/tomcat-functions index ab08fa2..ac7f00d 100644 --- a/tomcat-functions +++ b/tomcat-functions @@ -13,28 +13,12 @@ _save_function() { eval "$NEWNAME_FUNC" } -run_jsvc(){ - if [ -x /usr/bin/jsvc ]; then - TOMCAT_USER="${TOMCAT_USER:-tomcat}" - JSVC="/usr/bin/jsvc" - - JSVC_OPTS="-nodetach -pidfile /var/run/jsvc-tomcat${NAME}.pid -user ${TOMCAT_USER} -outfile ${CATALINA_BASE}/logs/catalina.out -errfile ${CATALINA_BASE}/logs/catalina.out" - if [ "$1" = "stop" ]; then - JSVC_OPTS="${JSVC_OPTS} -stop" - fi - - exec "${JSVC}" ${JSVC_OPTS} ${FLAGS} -classpath "${CLASSPATH}" ${OPTIONS} "${MAIN_CLASS}" "${@}" - else - echo "Can't find /usr/bin/jsvc executable" - fi - -} - _save_function run run_java run() { if [ "${USE_JSVC}" = "true" ] ; then - run_jsvc $@ + echo "JSVC support is not available with this Tomcat package." + exit 1 else run_java $@ fi From b95cdbe8d1e6806fa856eef18a2a20dd78d64fb5 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Wed, 13 Jun 2018 14:20:45 -0400 Subject: [PATCH 226/273] Sync all RPM wrapper scripts with JWS Tomcat --- tomcat-9.0-catalina-policy.patch | 27 ++++-------------- tomcat-9.0-digest.script | 16 +++++++---- tomcat-9.0-tool-wrapper.script | 16 +++++++---- tomcat-9.0.conf | 47 +++++++++++++++++++------------- tomcat-9.0.service | 3 +- tomcat-9.0.sysconfig | 4 +-- tomcat-named.service | 2 +- tomcat-preamble | 1 - 8 files changed, 58 insertions(+), 58 deletions(-) diff --git a/tomcat-9.0-catalina-policy.patch b/tomcat-9.0-catalina-policy.patch index 3694929..f3a5007 100644 --- a/tomcat-9.0-catalina-policy.patch +++ b/tomcat-9.0-catalina-policy.patch @@ -1,6 +1,6 @@ ---- conf/catalina.policy~ 2016-06-17 10:20:17.649171968 -0400 -+++ conf/catalina.policy 2016-06-17 10:23:35.358309244 -0400 -@@ -50,6 +50,36 @@ grant codeBase "file:${java.home}/lib/ex +--- conf/catalina.policy.orig 2018-03-16 12:18:17.835746805 -0400 ++++ conf/catalina.policy 2018-06-13 13:52:33.586872659 -0400 +@@ -50,6 +50,21 @@ grant codeBase "file:${java.home}/lib/ex permission java.security.AllPermission; }; @@ -9,28 +9,13 @@ +// Allowing everything in /usr/share/java allows too many unknowns to be permitted +// Specifying the individual jars that tomcat needs to function with the security manager +// is the safest way forward. -+grant codeBase "file:/usr/share/java/tomcat-servlet-3.0-api.jar" { ++grant codeBase "file:/usr/share/java/tomcat-servlet-4.0-api.jar" { + permission java.security.AllPermission; +}; -+grant codeBase "file:/usr/share/java/tomcat-jsp-2.2-api.jar" { ++grant codeBase "file:/usr/share/java/tomcat-jsp-2.3-api.jar" { + permission java.security.AllPermission; +}; -+grant codeBase "file:/usr/share/java/tomcat-el-2.2-api.jar" { -+ permission java.security.AllPermission; -+}; -+grant codeBase "file:/usr/share/java/log4j.jar" { -+ permission java.security.AllPermission; -+}; -+grant codeBase "file:/usr/share/java/ecj.jar" { -+ permission java.security.AllPermission; -+}; -+grant codeBase "file:/usr/share/java/apache-commons-pool.jar" { -+ permission java.security.AllPermission; -+}; -+grant codeBase "file:/usr/share/java/apache-commons-dbcp.jar" { -+ permission java.security.AllPermission; -+}; -+grant codeBase "file:/usr/share/java/apache-commons-collections.jar" { ++grant codeBase "file:/usr/share/java/tomcat-el-3.0-api.jar" { + permission java.security.AllPermission; +}; + diff --git a/tomcat-9.0-digest.script b/tomcat-9.0-digest.script index 731d4cf..d2b626c 100644 --- a/tomcat-9.0-digest.script +++ b/tomcat-9.0-digest.script @@ -22,22 +22,26 @@ 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}:${CATALINA_HOME}/lib/tomcat-api.jar" +CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/tomcat-util.jar" +CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/tomcat-util-scan.jar" +CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/tomcat-coyote.jar" +CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/catalina.jar" +CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/servlet-api.jar" export CLASSPATH # Configuration MAIN_CLASS="org.apache.catalina.startup.Tool" BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\"" BASE_OPTIONS="" -BASE_JARS="tomcat/catalina servlet tomcat/tomcat-util tomcat/tomcat-coyote tomcat/tomcat-api tomcat/tomcat-util-scan" +#BASE_JARS="tomcat/tomcat-util tomcat/tomcat-util-scan" +#BASE_JARS="${BASE_JARS} tomcat/tomcat-coyote tomcat/catalina" +#BASE_JARS="${BASE_JARS} tomcat/servlet-api" # Set parameters -set_classpath $BASE_JARS +#set_classpath $BASE_JARS set_flags $BASE_FLAGS set_options $BASE_OPTIONS diff --git a/tomcat-9.0-tool-wrapper.script b/tomcat-9.0-tool-wrapper.script index 40e39ff..e427dbc 100644 --- a/tomcat-9.0-tool-wrapper.script +++ b/tomcat-9.0-tool-wrapper.script @@ -22,22 +22,26 @@ 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}:${CATALINA_HOME}/lib/tomcat-api.jar" +CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/tomcat-util.jar" +CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/tomcat-util-scan.jar" +CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/tomcat-coyote.jar" +CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/catalina.jar" +CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/servlet-api.jar" export CLASSPATH # Configuration MAIN_CLASS="org.apache.catalina.startup.Tool" BASE_OPTIONS="" BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\"" -BASE_JARS="tomcat/catalina servlet tomcat/tomcat-util tomcat/tomcat-coyote tomcat/tomcat-api tomcat/tomcat-util-scan" +#BASE_JARS="tomcat/tomcat-util tomcat/tomcat-util-scan" +#BASE_JARS="${BASE_JARS} tomcat/tomcat-coyote tomcat/catalina" +#BASE_JARS="${BASE_JARS} tomcat/servlet-api" # Set parameters -set_classpath $BASE_JARS +#set_classpath $BASE_JARS set_flags $BASE_FLAGS set_options $BASE_OPTIONS diff --git a/tomcat-9.0.conf b/tomcat-9.0.conf index 3f43006..d680192 100644 --- a/tomcat-9.0.conf +++ b/tomcat-9.0.conf @@ -1,7 +1,6 @@ -# System-wide configuration file for tomcat services # This will be loaded by systemd as an environment file, # so please keep the syntax. For shell expansion support -# place your custom files as /etc/tomcat/conf.d/*.conf +# place your custom files as /etc/tomcat/conf.d/*.conf. # # There are 2 "classes" of startup behavior in this package. # The old one, the default service named tomcat.service. @@ -15,37 +14,47 @@ # This variable is used to figure out if config is loaded or not. TOMCAT_CFG_LOADED="1" -# In new-style instances, if CATALINA_BASE isn't specified, it will -# be constructed by joining TOMCATS_BASE and NAME. -TOMCATS_BASE="/var/lib/tomcats/" - # Where your java installation lives -JAVA_HOME="/usr/lib/jvm/jre" +#JAVA_HOME="/usr/lib/jvm/java" # Where your tomcat installation lives +CATALINA_BASE="@@@TCHOME@@@" CATALINA_HOME="@@@TCHOME@@@" - -# System-wide tmp -CATALINA_TMPDIR="/var/cache/tomcat/temp" +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=/usr/lib" - -# Set default javax.sql.DataSource factory to apache commons one. See rhbz#1214381 -JAVA_OPTS="-Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory" - # 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 -# TODO(stingray): does nothing, fix. -# SHUTDOWN_WAIT="30" +# DEPRECATED VARIABLES +# +# TOMCAT_USER has been deprecated. To update the tomcat process owner, +# please see User in tomcat.service. +# +# TOMCAT_GROUP has been deprecated. To update the tomcat process group, +# please see Group in tomcat.service. +# +# SHUTDOWN_WAIT has been deprecated. To change the shutdown wait time, set +# TimeoutStopSec in tomcat.service. +# +# SHUTDOWN_VERBOSE has been deprecated. There is no replacement for this behavior. +# +# CATALINA_PID has been deprecated. A replacement for this behavior is to set +# PIDFile in tomcat.service. +# +# CONNECTOR_PORT has been deprecated. There is no replacement for this behavior. +# Set init script output file +# +# TOMCAT_LOG has been deprecated. Output from start/stop/status operations are +# logged to the system's journal. +# +# LOGGING_CONFIG has been deprecated. To update the logging properties in use, use: +# LOGGING_PROPERTIES="${CATALINA_HOME}/lib/log4j.properties" # If you wish to further customize your tomcat environment, # put your own definitions here diff --git a/tomcat-9.0.service b/tomcat-9.0.service index 2b20aa0..bf90428 100644 --- a/tomcat-9.0.service +++ b/tomcat-9.0.service @@ -15,8 +15,7 @@ EnvironmentFile=-/etc/sysconfig/tomcat ExecStart=/usr/libexec/tomcat/server start SuccessExitStatus=143 User=tomcat -Group=tomcat - +UMask=027 [Install] WantedBy=multi-user.target diff --git a/tomcat-9.0.sysconfig b/tomcat-9.0.sysconfig index 3117bf7..39db94a 100644 --- a/tomcat-9.0.sysconfig +++ b/tomcat-9.0.sysconfig @@ -7,5 +7,5 @@ # CATALINA_HOME. For named service, it equals ${TOMCATS_BASE}${NAME} #CATALINA_BASE="@@@TCHOME@@@" -# Please take a look at /etc/tomcat/tomcat.conf to have an idea what you -# can override. +# Please take a look at /etc/tomcat/tomcat.conf to have an idea +# what you can override. diff --git a/tomcat-named.service b/tomcat-named.service index 9bbcb17..66cf45c 100644 --- a/tomcat-named.service +++ b/tomcat-named.service @@ -19,7 +19,7 @@ ExecStart=/usr/libexec/tomcat/server start ExecStop=/usr/libexec/tomcat/server stop SuccessExitStatus=143 User=tomcat -Group=tomcat +UMask=027 [Install] WantedBy=multi-user.target diff --git a/tomcat-preamble b/tomcat-preamble index 1271dca..c3c1183 100644 --- a/tomcat-preamble +++ b/tomcat-preamble @@ -42,7 +42,6 @@ if [ -n "$JSSE_HOME" ]; then 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)" if [ -z "$LOGGING_PROPERTIES" ] ; then LOGGING_PROPERTIES="${CATALINA_BASE}/conf/logging.properties" From 5782fd71526a74189e4fbdbceab14f2d36bf761a Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Wed, 13 Jun 2018 14:25:50 -0400 Subject: [PATCH 227/273] Remove overrides for version so that this package matches JWS' version information --- pki-servlet-container.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index fa2fcef..0c39d1b 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -185,8 +185,6 @@ touch HACK -Dtomcat-native.home="." \ -Dcommons-daemon.native.win.mgr.exe="HACK" \ -Dnsis.exe="HACK" \ - -Dversion="%{version}" \ - -Dversion.build="%{micro_version}" \ deploy dist-prepare dist-source # remove some jars that we don't need From 38e917d3438f16ad167a2620bc83b15799646fe9 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 15 Jun 2018 14:16:40 -0400 Subject: [PATCH 228/273] Add ant and tools jars to the classpath to enable JSP compilation at runtime --- pki-servlet-container.spec | 2 ++ tomcat-preamble | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 0c39d1b..bb8ee5d 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -101,7 +101,9 @@ BuildRequires: jpackage-utils >= 0:1.7.0 BuildRequires: javapackages-local %endif +Requires: ant Requires: java-headless >= 1:1.8.0 +Requires: java-devel >= 1:1.8.0 Requires: jpackage-utils Requires: procps Requires(pre): shadow-utils diff --git a/tomcat-preamble b/tomcat-preamble index c3c1183..07d28a3 100644 --- a/tomcat-preamble +++ b/tomcat-preamble @@ -43,6 +43,11 @@ fi CLASSPATH="${CLASSPATH}${CATALINA_HOME}/bin/bootstrap.jar" CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/tomcat-juli.jar" +# Since ECJ is no longer available, add ant, ant-launcher, and tools jars to the +# classpath so that runtime compilation of JSPs still works. +CLASSPATH="${CLASSPATH}:/usr/share/java/ant.jar:/usr/share/java/ant-launcher.jar" +CLASSPATH="${CLASSPATH}:/usr/lib/jvm/java/lib/tools.jar" + if [ -z "$LOGGING_PROPERTIES" ] ; then LOGGING_PROPERTIES="${CATALINA_BASE}/conf/logging.properties" if [ ! -f "${LOGGING_PROPERTIES}" ] ; then From b389c980dc435d0f5df6adb5c60821a0ca6214ca Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 15 Jun 2018 14:21:55 -0400 Subject: [PATCH 229/273] Remove zip from sources repo and add to brew --- .gitignore | 2 +- sources | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index fd61fdd..0853083 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ apache-tomcat-*-src.tar.gz - +/tomcat-9.0.7.redhat-10-src.zip diff --git a/sources b/sources index 8a82736..b5348c8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (tomcat-9.0.7.redhat-10-src.zip) = 0eee2cccfd08704350095b1fdd1472d2f85b81e6b8d8bf3a3f4e5005fe3bb18503438c2a5499af0dc21ab4e1d0636c2ee276aae52af823881ed0f444fb65fc81 +32bca41cb6e6a99498966ac885e4922e tomcat-9.0.7.redhat-10-src.zip From 822812e4fc104cb8713a66204b06435afac27231 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 15 Jun 2018 14:27:30 -0400 Subject: [PATCH 230/273] Remove tito things that were needed to build in copr --- .tito/packages/.readme | 3 --- .tito/packages/tomcat | 1 - .tito/tito.props | 5 ----- 3 files changed, 9 deletions(-) delete mode 100644 .tito/packages/.readme delete mode 100644 .tito/packages/tomcat delete mode 100644 .tito/tito.props diff --git a/.tito/packages/.readme b/.tito/packages/.readme deleted file mode 100644 index b9411e2..0000000 --- a/.tito/packages/.readme +++ /dev/null @@ -1,3 +0,0 @@ -the .tito/packages directory contains metadata files -named after their packages. Each file has the latest tagged -version and the project's relative directory. diff --git a/.tito/packages/tomcat b/.tito/packages/tomcat deleted file mode 100644 index c814425..0000000 --- a/.tito/packages/tomcat +++ /dev/null @@ -1 +0,0 @@ -9.0.7-1 ./ diff --git a/.tito/tito.props b/.tito/tito.props deleted file mode 100644 index 70eda22..0000000 --- a/.tito/tito.props +++ /dev/null @@ -1,5 +0,0 @@ -[buildconfig] -builder = tito.builder.NoTgzBuilder -tagger = tito.tagger.VersionTagger -changelog_do_not_remove_cherrypick = 0 -changelog_format = %s (%ae) From 0dd44d62b4d42e3b958bfe6145c96eaaec4b4c64 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 8 Jun 2018 14:57:09 -0400 Subject: [PATCH 231/273] First stab at creating the single RPM distribution for FreeIPA --- tomcat-8.5-jsvc.service | 22 - tomcat-8.5.logrotate | 8 - ... => tomcat-9.0-bootstrap-MANIFEST.MF.patch | 0 ....patch => tomcat-9.0-catalina-policy.patch | 0 ...-digest.script => tomcat-9.0-digest.script | 0 ....properties => tomcat-9.0-log4j.properties | 0 ...ch => tomcat-9.0-tomcat-users-webapp.patch | 0 ...r.script => tomcat-9.0-tool-wrapper.script | 0 tomcat-8.5.conf => tomcat-9.0.conf | 0 tomcat-8.5.service => tomcat-9.0.service | 0 tomcat-8.5.sysconfig => tomcat-9.0.sysconfig | 0 tomcat-8.5.wrapper => tomcat-9.0.wrapper | 0 tomcat.spec | 669 ++---------------- 13 files changed, 57 insertions(+), 642 deletions(-) delete mode 100644 tomcat-8.5-jsvc.service delete mode 100644 tomcat-8.5.logrotate rename tomcat-8.5-bootstrap-MANIFEST.MF.patch => tomcat-9.0-bootstrap-MANIFEST.MF.patch (100%) rename tomcat-8.5-catalina-policy.patch => tomcat-9.0-catalina-policy.patch (100%) rename tomcat-8.5-digest.script => tomcat-9.0-digest.script (100%) rename tomcat-8.5-log4j.properties => tomcat-9.0-log4j.properties (100%) rename tomcat-8.5-tomcat-users-webapp.patch => tomcat-9.0-tomcat-users-webapp.patch (100%) rename tomcat-8.5-tool-wrapper.script => tomcat-9.0-tool-wrapper.script (100%) rename tomcat-8.5.conf => tomcat-9.0.conf (100%) rename tomcat-8.5.service => tomcat-9.0.service (100%) rename tomcat-8.5.sysconfig => tomcat-9.0.sysconfig (100%) rename tomcat-8.5.wrapper => tomcat-9.0.wrapper (100%) diff --git a/tomcat-8.5-jsvc.service b/tomcat-8.5-jsvc.service deleted file mode 100644 index f480324..0000000 --- a/tomcat-8.5-jsvc.service +++ /dev/null @@ -1,22 +0,0 @@ -# Systemd unit file for tomcat -# -# To create clones of this service: -# 1) By default SERVICE_NAME=tomcat. When cloned, the value must be defined -# before tomcat-sysd is called. -# 2) Create /etc/sysconfig/${SERVICE_NAME} from /etc/sysconfig/tomcat -# to override tomcat defaults - -[Unit] -Description=Apache Tomcat Web Application Container JSVC wrapper -After=syslog.target network.target - -[Service] -Type=simple -EnvironmentFile=/etc/tomcat/tomcat.conf -Environment="NAME=" "USE_JSVC=true" -EnvironmentFile=-/etc/sysconfig/tomcat -ExecStart=/usr/libexec/tomcat/server start -ExecStop=/usr/libexec/tomcat/server stop - -[Install] -WantedBy=multi-user.target diff --git a/tomcat-8.5.logrotate b/tomcat-8.5.logrotate deleted file mode 100644 index a87b4c0..0000000 --- a/tomcat-8.5.logrotate +++ /dev/null @@ -1,8 +0,0 @@ -@@@TCLOG@@@/catalina.out { - copytruncate - weekly - rotate 52 - compress - missingok - create 0644 tomcat tomcat -} diff --git a/tomcat-8.5-bootstrap-MANIFEST.MF.patch b/tomcat-9.0-bootstrap-MANIFEST.MF.patch similarity index 100% rename from tomcat-8.5-bootstrap-MANIFEST.MF.patch rename to tomcat-9.0-bootstrap-MANIFEST.MF.patch diff --git a/tomcat-8.5-catalina-policy.patch b/tomcat-9.0-catalina-policy.patch similarity index 100% rename from tomcat-8.5-catalina-policy.patch rename to tomcat-9.0-catalina-policy.patch diff --git a/tomcat-8.5-digest.script b/tomcat-9.0-digest.script similarity index 100% rename from tomcat-8.5-digest.script rename to tomcat-9.0-digest.script diff --git a/tomcat-8.5-log4j.properties b/tomcat-9.0-log4j.properties similarity index 100% rename from tomcat-8.5-log4j.properties rename to tomcat-9.0-log4j.properties diff --git a/tomcat-8.5-tomcat-users-webapp.patch b/tomcat-9.0-tomcat-users-webapp.patch similarity index 100% rename from tomcat-8.5-tomcat-users-webapp.patch rename to tomcat-9.0-tomcat-users-webapp.patch diff --git a/tomcat-8.5-tool-wrapper.script b/tomcat-9.0-tool-wrapper.script similarity index 100% rename from tomcat-8.5-tool-wrapper.script rename to tomcat-9.0-tool-wrapper.script diff --git a/tomcat-8.5.conf b/tomcat-9.0.conf similarity index 100% rename from tomcat-8.5.conf rename to tomcat-9.0.conf diff --git a/tomcat-8.5.service b/tomcat-9.0.service similarity index 100% rename from tomcat-8.5.service rename to tomcat-9.0.service diff --git a/tomcat-8.5.sysconfig b/tomcat-9.0.sysconfig similarity index 100% rename from tomcat-8.5.sysconfig rename to tomcat-9.0.sysconfig diff --git a/tomcat-8.5.wrapper b/tomcat-9.0.wrapper similarity index 100% rename from tomcat-8.5.wrapper rename to tomcat-9.0.wrapper diff --git a/tomcat.spec b/tomcat.spec index 3ab4438..f0cee80 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -28,17 +28,18 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -%global jspspec 2.3 -%global major_version 8 -%global minor_version 5 -%global micro_version 30 -%global packdname apache-tomcat-%{version}-src -%global servletspec 3.1 -%global elspec 3.0 -%global tcuid 91 -# Recommended version is specified in java/org/apache/catalina/core/AprLifecycleListener.java -%global native_version 1.2.8 +%global major_version 9 +%global minor_version 0 +%global micro_version 7 +%global redhat_version 10 +%global packdname apache-tomcat-%{version}.redhat-%{redhat_version}-src +# Specification versions +%global servletspec 4.0 +%global jspspec 2.3 +%global elspec 3.0 + +%global tcuid 91 # FHS 2.3 compliant tree structure - http://www.pathname.com/fhs/2.3/ %global basedir %{_var}/lib/%{name} @@ -54,26 +55,20 @@ %global _initrddir %{_sysconfdir}/init.d %global _systemddir /lib/systemd/system -# Fedora doesn't seem to have this macro, so we define it if it doesn't exist -%{!?_mavendepmapfragdir: %global _mavendepmapfragdir /usr/share/maven-metadata} -# Fedora 24 erroneously uses %%{_datadir}/maven-fragments instead of /maven-metadata for some reason... -# Override the mavendepmapfragdir var on fc24 -%{?fc24: %global _mavendepmapfragdir /usr/share/maven-metadata} - Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API - Group: System Environment/Daemons License: ASL 2.0 URL: http://tomcat.apache.org/ -Source0: http://www.apache.org/dist/tomcat/tomcat-%{major_version}/v%{version}/src/%{packdname}.tar.gz + +#Source0: http://www.apache.org/dist/tomcat/tomcat-%%{major_version}/v%%{version}/src/%%{packdname}.tar.gz +Source0: tomcat-9.0.7.redhat-10-src.zip Source1: %{name}-%{major_version}.%{minor_version}.conf Source3: %{name}-%{major_version}.%{minor_version}.sysconfig Source4: %{name}-%{major_version}.%{minor_version}.wrapper -Source5: %{name}-%{major_version}.%{minor_version}.logrotate Source6: %{name}-%{major_version}.%{minor_version}-digest.script Source7: %{name}-%{major_version}.%{minor_version}-tool-wrapper.script Source8: servlet-api-OSGi-MANIFEST.MF @@ -84,7 +79,6 @@ Source13: jasper-el-OSGi-MANIFEST.MF Source14: jasper-OSGi-MANIFEST.MF Source15: tomcat-api-OSGi-MANIFEST.MF Source16: tomcat-juli-OSGi-MANIFEST.MF -Source20: %{name}-%{major_version}.%{minor_version}-jsvc.service Source21: tomcat-functions Source30: tomcat-preamble Source31: tomcat-server @@ -98,14 +92,13 @@ Patch3: disableJavadocFailOnWarning.patch BuildArch: noarch BuildRequires: ant -BuildRequires: ecj >= 1:4.4.0 +BuildRequires: ecj >= 1:4.6.3 BuildRequires: findutils BuildRequires: apache-commons-collections BuildRequires: apache-commons-daemon BuildRequires: apache-commons-dbcp BuildRequires: apache-commons-pool -BuildRequires: tomcat-taglibs-standard -BuildRequires: java-devel >= 1:1.6.0 +BuildRequires: java-devel >= 1:1.8.0 BuildRequires: jpackage-utils >= 0:1.7.0 %if 0%{?fedora} >= 27 || 0%{?rhel} > 7 # add_maven_depmap is deprecated, using javapackages-local for now @@ -121,13 +114,12 @@ Requires: apache-commons-daemon Requires: apache-commons-collections Requires: apache-commons-dbcp Requires: apache-commons-pool -Requires: java-headless >= 1:1.6.0 +Requires: java-headless >= 1:1.8.0 Requires: jpackage-utils Requires: procps -Requires: %{name}-lib = %{epoch}:%{version}-%{release} -Recommends: tomcat-native >= %{native_version} Requires(pre): shadow-utils Requires(post): chkconfig +Requires(postun): chkconfig Requires(preun): chkconfig Requires(post): systemd-units Requires(preun): systemd-units @@ -136,6 +128,27 @@ Requires(postun): systemd-units # added after log4j sub-package was removed Provides: %{name}-log4j = %{epoch}:%{version}-%{release} +# Leftover requires/provides from removing the subpackages +# they still apply in instances where the old version is installed. + +#%%package jsp-%%{jspspec}-api +Provides: jsp = %{jspspec} +Obsoletes: %{name}-jsp-2.2-api + +#%%package lib +Requires: ecj >= 1:4.6.3 +Requires(preun): coreutils + +#%%package servlet-%%{servletspec}-api +Provides: servlet = %{servletspec} +Provides: servlet6 +Provides: servlet3 +Obsoletes: %{name}-servlet-3.0-api + +#%%package el-%%{elspec}-api +Provides: el_api = %{elspec} +Obsoletes: %{name}-el-2.2-api + %description Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServer Pages technologies. @@ -146,104 +159,9 @@ Tomcat is developed in an open and participatory environment and released under the Apache Software License version 2.0. Tomcat is intended to be a collaboration of the best-of-breed developers from around the world. -%package admin-webapps -Group: Applications/System -Summary: The host-manager and manager web applications for Apache Tomcat -Requires: %{name} = %{epoch}:%{version}-%{release} - -%description admin-webapps -The host-manager and manager web applications for Apache Tomcat. - -%package docs-webapp -Group: Applications/Text -Summary: The docs web application for Apache Tomcat -Requires: %{name} = %{epoch}:%{version}-%{release} - -%description docs-webapp -The docs web application for Apache Tomcat. - -%package javadoc -Group: Documentation -Summary: Javadoc generated documentation for Apache Tomcat -Requires: jpackage-utils - -%description javadoc -Javadoc generated documentation for Apache Tomcat. - -%package jsvc -Group: System Environment/Daemons -Summary: Apache jsvc wrapper for Apache Tomcat as separate service -Requires: %{name} = %{epoch}:%{version}-%{release} -Requires: apache-commons-daemon-jsvc - -%description jsvc -Systemd service to start tomcat with jsvc, -which allows tomcat to perform some privileged operations -(e.g. bind to a port < 1024) and then switch identity to a non-privileged user. - -%package jsp-%{jspspec}-api -Group: Development/Libraries -Summary: Apache Tomcat JavaServer Pages v%{jspspec} API Implementation Classes -Provides: jsp = %{jspspec} -Obsoletes: %{name}-jsp-2.2-api -Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} -Requires: %{name}-el-%{elspec}-api = %{epoch}:%{version}-%{release} -Requires(post): chkconfig -Requires(postun): chkconfig - -%description jsp-%{jspspec}-api -Apache Tomcat JSP API Implementation Classes. - -%package lib -Group: Development/Libraries -Summary: Libraries needed to run the Tomcat Web container -Requires: %{name}-jsp-%{jspspec}-api = %{epoch}:%{version}-%{release} -Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} -Requires: %{name}-el-%{elspec}-api = %{epoch}:%{version}-%{release} -Requires: ecj >= 1:4.2.1 -Requires: apache-commons-collections -Requires: apache-commons-dbcp -Requires: apache-commons-pool -Requires(preun): coreutils - -%description lib -Libraries needed to run the Tomcat Web container. - -%package servlet-%{servletspec}-api -Group: Development/Libraries -Summary: Apache Tomcat Java Servlet v%{servletspec} API Implementation Classes -Provides: servlet = %{servletspec} -Provides: servlet6 -Provides: servlet3 -Obsoletes: %{name}-servlet-3.0-api -Requires(post): chkconfig -Requires(postun): chkconfig - -%description servlet-%{servletspec}-api -Apache Tomcat Servlet API Implementation Classes. - -%package el-%{elspec}-api -Group: Development/Libraries -Summary: Apache Tomcat Expression Language v%{elspec} API Implementation Classes -Provides: el_api = %{elspec} -Obsoletes: %{name}-el-2.2-api -Requires(post): chkconfig -Requires(postun): chkconfig - -%description el-%{elspec}-api -Apache Tomcat EL API Implementation Classes. - -%package webapps -Group: Applications/Internet -Summary: The ROOT and examples web applications for Apache Tomcat -Requires: %{name} = %{epoch}:%{version}-%{release} -Requires: tomcat-taglibs-standard >= 0:1.1 - -%description webapps -The ROOT and examples web applications for Apache Tomcat. - %prep %setup -q -n %{packdname} + # remove pre-built binaries and windows files find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name "*.gz" -o \ -name "*.jar" -o -name "*.war" -o -name "*.zip" \) -delete @@ -251,10 +169,7 @@ find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name " %patch0 -p0 %patch1 -p0 %patch2 -p0 -%patch3 -p0 - -%{__ln_s} $(build-classpath tomcat-taglibs-standard/taglibs-standard-impl) webapps/examples/WEB-INF/lib/jstl.jar -%{__ln_s} $(build-classpath tomcat-taglibs-standard/taglibs-standard-compat) webapps/examples/WEB-INF/lib/standard.jar +#%%patch3 -p0 %build export OPT_JAR_LIST="xalan-j2-serializer" @@ -281,17 +196,10 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dversion.build="%{micro_version}" \ -Djava.7.home=%{java_home} \ -Dexecute.validate=false \ - deploy dist-prepare dist-source javadoc + deploy dist-prepare dist-source # remove some jars that we'll replace with symlinks later %{__rm} output/build/bin/commons-daemon.jar output/build/lib/ecj.jar -pushd output/dist/src/webapps/docs/appdev/sample/src -%{__mkdir_p} ../web/WEB-INF/classes -%{javac} -cp ../../../../../../../../output/build/lib/servlet-api.jar -d ../web/WEB-INF/classes mypackage/Hello.java -pushd ../web -%{jar} cf ../../../../../../../../output/build/webapps/docs/appdev/sample/sample.war * -popd -popd # inject OSGi manifests mkdir -p META-INF @@ -321,10 +229,8 @@ zip output/build/bin/tomcat-juli.jar META-INF/MANIFEST.MF # build initial path structure %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_bindir} %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sbindir} -%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_javadocdir}/%{name} %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_initrddir} %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_systemddir} -%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{appdir} %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{bindir} @@ -334,7 +240,6 @@ zip output/build/bin/tomcat-juli.jar META-INF/MANIFEST.MF /bin/echo "Place your custom *.conf files here. Shell expansion is supported." > ${RPM_BUILD_ROOT}%{confdir}/conf.d/README %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{libdir} %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{logdir} -/bin/touch ${RPM_BUILD_ROOT}%{logdir}/catalina.out %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{_localstatedir}/lib/tomcats %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{homedir} %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{tempdir} @@ -348,10 +253,7 @@ pushd output/build %{__cp} -a bin/*.{jar,xml} ${RPM_BUILD_ROOT}%{bindir} %{__cp} -a conf/*.{policy,properties,xml,xsd} ${RPM_BUILD_ROOT}%{confdir} %{__cp} -a lib/*.jar ${RPM_BUILD_ROOT}%{libdir} - %{__cp} -a webapps/* ${RPM_BUILD_ROOT}%{appdir} popd -# javadoc -%{__cp} -a output/dist/webapps/docs/api/* ${RPM_BUILD_ROOT}%{_javadocdir}/%{name} %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ @@ -365,10 +267,6 @@ popd ${RPM_BUILD_ROOT}%{_sbindir}/%{name} %{__install} -m 0644 %{SOURCE11} \ ${RPM_BUILD_ROOT}%{_unitdir}/%{name}.service -%{__install} -m 0644 %{SOURCE20} \ - ${RPM_BUILD_ROOT}%{_unitdir}/%{name}-jsvc.service -%{__sed} -e "s|\@\@\@TCLOG\@\@\@|%{logdir}|g" %{SOURCE5} \ - > ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/%{name} %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE6} \ @@ -407,10 +305,6 @@ popd pushd output/build %{_bindir}/build-jar-repository lib apache-commons-collections \ apache-commons-dbcp apache-commons-pool ecj 2>&1 - # need to use -p here with b-j-r otherwise the examples webapp fails to - # load with a java.io.IOException - %{_bindir}/build-jar-repository -p webapps/examples/WEB-INF/lib \ - tomcat-taglibs-standard/taglibs-standard-impl.jar tomcat-taglibs-standard/taglibs-standard-compat.jar 2>&1 popd pushd ${RPM_BUILD_ROOT}%{libdir} @@ -437,28 +331,6 @@ pushd ${RPM_BUILD_ROOT}%{homedir} %{__ln_s} %{workdir} work popd -# install sample webapp -%{__mkdir_p} ${RPM_BUILD_ROOT}%{appdir}/sample -pushd ${RPM_BUILD_ROOT}%{appdir}/sample -%{jar} xf ${RPM_BUILD_ROOT}%{appdir}/docs/appdev/sample/sample.war -popd -%{__rm} ${RPM_BUILD_ROOT}%{appdir}/docs/appdev/sample/sample.war - -# Allow linking for example webapp -%{__mkdir_p} ${RPM_BUILD_ROOT}%{appdir}/examples/META-INF -pushd ${RPM_BUILD_ROOT}%{appdir}/examples/META-INF -echo '' > context.xml -echo '' >> context.xml -echo ' ' >> context.xml -echo '' >> context.xml -popd - -pushd ${RPM_BUILD_ROOT}%{appdir}/examples/WEB-INF/lib -%{__ln_s} -f $(build-classpath tomcat-taglibs-standard/taglibs-standard-impl) jstl.jar -%{__ln_s} -f $(build-classpath tomcat-taglibs-standard/taglibs-standard-compat) standard.jar -popd - - # Install the maven metadata %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_mavenpomdir} pushd output/dist/src/res/maven @@ -470,29 +342,29 @@ done # we won't install dbcp, juli-adapters and juli-extras pom files for libname in annotations-api catalina jasper-el jasper catalina-ha; do %{__cp} -a %{name}-$libname.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-$libname.pom - %add_maven_depmap JPP.%{name}-$libname.pom %{name}/$libname.jar -f "tomcat-lib" + %add_maven_depmap JPP.%{name}-$libname.pom %{name}/$libname.jar done # tomcat-util-scan %{__cp} -a %{name}-util-scan.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-util-scan.pom -%add_maven_depmap JPP.%{name}-util-scan.pom %{name}/%{name}-util-scan.jar -f "tomcat-lib" +%add_maven_depmap JPP.%{name}-util-scan.pom %{name}/%{name}-util-scan.jar # tomcat-jni %{__cp} -a %{name}-jni.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-jni.pom -%add_maven_depmap JPP.%{name}-jni.pom %{name}/%{name}-jni.jar -f "tomcat-lib" +%add_maven_depmap JPP.%{name}-jni.pom %{name}/%{name}-jni.jar # servlet-api jsp-api and el-api are not in tomcat subdir, since they are widely re-used elsewhere %{__cp} -a tomcat-jsp-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-jsp-api.pom -%add_maven_depmap JPP-tomcat-jsp-api.pom tomcat-jsp-api.jar -f "tomcat-jsp-api" -a "org.eclipse.jetty.orbit:javax.servlet.jsp" +%add_maven_depmap JPP-tomcat-jsp-api.pom tomcat-jsp-api.jar -a "org.eclipse.jetty.orbit:javax.servlet.jsp" %{__cp} -a tomcat-el-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-el-api.pom -%add_maven_depmap JPP-tomcat-el-api.pom tomcat-el-api.jar -f "tomcat-el-api" -a "org.eclipse.jetty.orbit:javax.el" +%add_maven_depmap JPP-tomcat-el-api.pom tomcat-el-api.jar -a "org.eclipse.jetty.orbit:javax.el" %{__cp} -a tomcat-servlet-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-servlet-api.pom # Generate a depmap fragment javax.servlet:servlet-api pointing to # tomcat-servlet-3.0-api for backwards compatibility # also provide jetty depmap (originally in jetty package, but it's cleaner to have it here -%add_maven_depmap JPP-tomcat-servlet-api.pom tomcat-servlet-api.jar -f "tomcat-servlet-api" +%add_maven_depmap JPP-tomcat-servlet-api.pom tomcat-servlet-api.jar # replace temporary copy with link %{__ln_s} -f $(abs2rel %{bindir}/tomcat-juli.jar %{libdir}) ${RPM_BUILD_ROOT}%{libdir}/ @@ -539,15 +411,11 @@ done # install but don't activate %systemd_post %{name}.service -%post jsp-%{jspspec}-api +# Collapse all of the alternatives installations into one %{_sbindir}/update-alternatives --install %{_javadir}/jsp.jar jsp \ %{_javadir}/%{name}-jsp-%{jspspec}-api.jar 20200 - -%post servlet-%{servletspec}-api %{_sbindir}/update-alternatives --install %{_javadir}/servlet.jar servlet \ %{_javadir}/%{name}-servlet-%{servletspec}-api.jar 30000 - -%post el-%{elspec}-api %{_sbindir}/update-alternatives --install %{_javadir}/elspec.jar elspec \ %{_javadir}/%{name}-el-%{elspec}-api.jar 20300 @@ -559,30 +427,16 @@ done %postun %systemd_postun_with_restart %{name}.service -%postun jsp-%{jspspec}-api +# Collapse all of the alternatives removals into one if [ "$1" = "0" ]; then %{_sbindir}/update-alternatives --remove jsp \ %{_javadir}/%{name}-jsp-%{jspspec}-api.jar -fi - -%postun servlet-%{servletspec}-api -if [ "$1" = "0" ]; then %{_sbindir}/update-alternatives --remove servlet \ %{_javadir}/%{name}-servlet-%{servletspec}-api.jar -fi - -%postun el-%{elspec}-api -if [ "$1" = "0" ]; then %{_sbindir}/update-alternatives --remove elspec \ %{_javadir}/%{name}-el-%{elspec}-api.jar fi -%triggerun -- tomcat < 0:7.0.22-2 -/usr/bin/systemd-sysv-convert -- save tomcat > /dev/null 2>&1 || : -# Run these becasue the SysV package being removed won't do them -/sbin/chkconfig --del tomcat > /dev/null 2>&1 || : -/bin/systemctl try-restart tomcat.service > /dev/null 2>&1 || : - %files %defattr(0664,root,tomcat,0755) %doc {LICENSE,NOTICE,RELEASE*} @@ -634,24 +488,6 @@ fi %{homedir}/logs %{homedir}/conf -%files admin-webapps -%defattr(0664,root,tomcat,0755) -%{appdir}/host-manager -%{appdir}/manager - -%files docs-webapp -%defattr(-,root,root,-) -%{appdir}/docs - -%files javadoc -%defattr(-,root,root,-) -%{_javadocdir}/%{name} - -%files jsp-%{jspspec}-api -f output/dist/src/res/maven/.mfiles-tomcat-jsp-api -%defattr(-,root,root,-) -%{_javadir}/%{name}-jsp-%{jspspec}*.jar - -%files lib -f output/dist/src/res/maven/.mfiles-tomcat-lib %defattr(-,root,root,-) %dir %{libdir} %{libdir}/*.jar @@ -671,404 +507,13 @@ fi %{_mavenpomdir}/JPP.%{name}-websocket-api.pom %{_mavenpomdir}/JPP.%{name}-tomcat-websocket.pom %{_mavenpomdir}/JPP.%{name}-jaspic-api.pom +%{_mavenpomdir}/JPP.%{name}-jni.pom +%{_mavenpomdir}/JPP.%{name}-util-scan.pom +%{_mavenpomdir}/JPP-%{name}-jsp-api.pom +%{_mavenpomdir}/JPP-%{name}-servlet-api.pom +%{_mavenpomdir}/JPP-%{name}-el-api.pom %{_datadir}/maven-metadata/tomcat.xml -%exclude %{libdir}/%{name}-el-%{elspec}-api.jar -%exclude %{_javadir}/%{name}-servlet-%{servletspec}*.jar -%exclude %{_javadir}/%{name}-el-%{elspec}-api.jar -%exclude %{_javadir}/%{name}-jsp-%{jspspec}*.jar - -%files servlet-%{servletspec}-api -f output/dist/src/res/maven/.mfiles-tomcat-servlet-api -%defattr(-,root,root,-) -%doc LICENSE -%{_javadir}/%{name}-servlet-%{servletspec}*.jar - -%files el-%{elspec}-api -f output/dist/src/res/maven/.mfiles-tomcat-el-api -%defattr(-,root,root,-) -%doc LICENSE -%{_javadir}/%{name}-el-%{elspec}-api.jar -%{libdir}/%{name}-el-%{elspec}-api.jar - -%files webapps -%defattr(0644,tomcat,tomcat,0755) -%{appdir}/ROOT -%{appdir}/examples -%{appdir}/sample - -%files jsvc -%defattr(755,root,root,0755) -%attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service -%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} -%attr(0660,tomcat,tomcat) %verify(not size md5 mtime) %{logdir}/catalina.out %changelog -* Tue May 01 2018 Coty Sutherland - 1:8.5.30-1 -- Update to 8.5.30 - -* Thu Mar 15 2018 Coty Sutherland - 1:8.5.29-1 -- Update to 8.5.29 -- Resolves: rhbz#1548290 CVE-2018-1304 tomcat: Incorrect handling of empty string URL in security constraints can lead to unitended exposure of resources -- Resolves: rhbz#1548284 CVE-2018-1305 tomcat: Late application of security constraints can lead to resource exposure for unauthorised users - -* Fri Feb 09 2018 Igor Gnatenko - 1:8.0.49-2 -- Escape macros in %%changelog - -* Thu Feb 01 2018 Coty Sutherland - 1:8.0.49-1 -- Update to 8.0.49 - -* Tue Dec 12 2017 Merlin Mathesius - 1:8.0.47-3 -- Cleanup spec file conditionals - -* Tue Oct 24 2017 Troy Dawson - 1:8.0.47-2 -- Change "zip -u" to "zip" -- Resolves: rhbz#1495241 [tomcat] zip -u in spec file causes race condition - -* Wed Oct 04 2017 Coty Sutherland - 1:8.0.47-1 -- Update to 8.0.47 -- Resolves: rhbz#1497682 CVE-2017-12617 tomcat: Remote Code Execution bypass for CVE-2017-12615 - -* Mon Aug 21 2017 Coty Sutherland - 1:8.0.46-1 -- Update to 8.0.46 -- Resolves: rhbz#1480620 CVE-2017-7674 tomcat: Cache Poisoning - -* Thu Jul 27 2017 Fedora Release Engineering - 1:8.0.44-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Fri Jun 09 2017 Coty Sutherland - 1:8.0.44-1 -- Resolves: rhbz#1459160 CVE-2017-5664 tomcat: Security constrained bypass in error page mechanism - -* Tue Apr 11 2017 Coty Sutherland - 1:8.0.43-1 -- Update to 8.0.43 - -* Fri Mar 31 2017 Coty Sutherland - 1:8.0.42-1 -- Update to 8.0.42 - -* Thu Feb 16 2017 Coty Sutherland - 1:8.0.41-1 -- Update to 8.0.41 -- Resolves: rhbz#1403825 CVE-2016-8745 tomcat: information disclosure due to incorrect Processor sharing - -* Sat Feb 11 2017 Fedora Release Engineering - 1:8.0.39-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Tue Nov 29 2016 Coty Sutherland - 1:8.0.39-1 -- Update to 8.0.39 -- Resolves: rhbz#1397493 CVE-2016-6816 CVE-2016-6817 CVE-2016-8735 tomcat: various flaws - -* Tue Oct 25 2016 Coty Sutherland - 1:8.0.38-1 -- Update to 8.0.38 - -* Sun Oct 23 2016 Coty Sutherland - 1:8.0.37-3 -- Resolves: rhbz#1383216 CVE-2016-6325 tomcat: tomcat writable config files allow privilege escalation -- Resolves: rhbz#1382310 CVE-2016-5425 tomcat: Local privilege escalation via systemd-tmpfiles service - -* Tue Sep 13 2016 Coty Sutherland - 1:8.0.37-1 -- Rebase to 8.0.37 -- Resolves: rhbz#1375581 CVE-2016-5388 CGI sets environmental variable based on user supplied Proxy request header -- Resolves: rhbz#1370262 catalina.out is no longer in use in the main package, but still gets rotated - -* Thu Aug 11 2016 Coty Sutherland - 1:8.0.36-2 -- Related: rhbz#1349469 Correct typo in changelog entry - -* Mon Aug 08 2016 Coty Sutherland - 1:8.0.36-1 -- Resolves: rhbz#1349469 CVE-2016-3092 tomcat: Usage of vulnerable FileUpload package can result in denial of service (updates to 8.0.36) -- Resolves: rhbz#1364056 The command tomcat-digest doesn't work -- Resolves: rhbz#1363884 The tomcat-tool-wrapper script is broken -- Resolves: rhbz#1347864 The systemd service unit does not allow tomcat to shut down gracefully -- Resolves: rhbz#1347835 The security manager doesn't work correctly (JSPs cannot be compiled) -- Resolves: rhbz#1341853 rpm -V tomcat fails on /var/log/tomcat/catalina.out -- Resolves: rhbz#1341850 tomcat-jsvc.service has TOMCAT_USER value hard-coded -- Resolves: rhbz#1359737 Missing maven depmap for the following artifacts: org.apache.tomcat:tomcat-websocket, org.apache.tomcat:tomcat-websocket-api -- Resolves: asfbz#59960 Building javadocs with java8 fails - -* Wed Mar 2 2016 Ivan Afonichev - 1:8.0.32-4 -- Revert sysconfig migration changes, resolves: rhbz#1311771, rhbz#1311905 -- Add /etc/tomcat/conf.d/ with shell expansion support, resolves rhbz#1293636 - -* Sat Feb 27 2016 Ivan Afonichev - 1:8.0.32-3 -- Load sysconfig from tomcat.conf, resolves: rhbz#1311771, rhbz#1311905 -- Set default javax.sql.DataSource factory to apache commons one, resolves rhbz#1214381 - -* Sun Feb 21 2016 Ivan Afonichev - 1:8.0.32-2 -- Fix symlinks from $CATALINA_HOME/lib perspective, resolves: rhbz#1308685 - -* Thu Feb 11 2016 Ivan Afonichev - 1:8.0.32-1 -- Updated to 8.0.32 -- Remove log4j support. It has never been working actually. See rhbz#1236297 -- Move shipped config to /etc/sysconfig/tomcat. /etc/tomcat/tomcat.conf can now be used to override it with shell expansion, resolves rhbz#1293636 -- Recommend tomcat-native, resolves: rhbz#1243132 - -* Wed Feb 10 2016 Coty Sutherland 1:8.0.26-4 -- Resolves: rhbz#1286800 Failed to start component due to wrong allowLinking="true" in context.xml -- Program /bin/nologin does not exist (#1302718) - -* Fri Feb 05 2016 Fedora Release Engineering - 1:8.0.26-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Wed Nov 11 2015 Robert Scheck 1:8.0.26-2 -- CATALINA_OPTS are only read when SECURITY_MANAGER is true (#1147105) - -* Thu Aug 27 2015 Alexander Kurtakov 1:8.0.26-1 -- Update to 8.0.26. - -* Fri Jul 10 2015 Alexander Kurtakov 1:8.0.24-2 -- Update to 8.0.24. - -* Fri Jun 19 2015 Alexander Kurtakov 1:8.0.23-2 -- Drop javax.el:el-api alias. - -* Thu Jun 18 2015 Alexander Kurtakov 1:8.0.23-1 -- Update to 8.0.23. - -* Thu Jun 18 2015 Alexander Kurtakov 1:8.0.20-3 -- Drop jetty alias for servlet. - -* Tue Jun 09 2015 Michal Srb - 1:8.0.20-2 -- Fix metadata for org.apache.tomcat:{tomcat-jni,tomcat-util-scan} - -* Thu Mar 5 2015 Alexander Kurtakov 1:8.0.18-5 -- Rebuild against tomcat-taglibs-standard. - -* Wed Mar 4 2015 Alexander Kurtakov 1:8.0.18-4 -- Fix epoch bumped el_1_0_api that would override all other glassfish/jboss/etc. due to wrong epoch. -- Drop old provides. - -* Tue Mar 03 2015 Stephen Gallagher 1:8.0.18-3 -- Bump epoch to maintain upgrade path from Fedora 22 - -* Mon Feb 16 2015 Michal Srb - 0:8.0.18-2 -- Install POM files for org.apache.tomcat:{tomcat-jni,tomcat-util-scan} - -* Sun Feb 15 2015 Ivan Afonichev 0:8.0.18-1 -- Updated to 8.0.18 - -* Sat Sep 20 2014 Ivan Afonichev 0:8.0.12-1 -- Updated to 8.0.12 -- Substitute libnames in catalina-tasks.xml, resolves: rhbz#1126439 -- Use CATALINA_OPTS only on start, resolves: rhbz#1051194 - -* Mon Jun 16 2014 Michal Srb - 0:7.0.54-3 -- jsp-api requires el-api - -* Sun Jun 08 2014 Fedora Release Engineering - 0:7.0.54-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Thu Jun 5 2014 Alexander Kurtakov 0:7.0.54-1 -- Update to upstream 7.0.54 - fixes compile with Java 8. - -* Wed May 21 2014 Alexander Kurtakov 0:7.0.52-3 -- Drop servlet/el api provides to reduce user machines ending with both. - -* Sun Mar 30 2014 Ivan Afonichev 0:7.0.52-2 -- Don't provide maven javax.jsp:jsp-api and javax.servlet.jsp:javax.servlet.jsp-api resolves: rhbz#1076949 -- Move log4j support into subpackage, resolves: rhbz#1027716 - -* Wed Mar 26 2014 Ivan Afonichev 0:7.0.52-1 -- Updated to 7.0.52 -- Rewrite jsvc implementation, resolves: rhbz#1051743 -- Switch to java-headless R, resolves: rhbz#1068566 -- Create and own %%{_localstatedir}/lib/tomcats, resolves: rhbz#1026741 -- Add pom for tomcat-jdbc, resolves: rhbz#1011003 - -* Tue Jan 21 2014 Mikolaj Izdebski - 0:7.0.47-3 -- Fix installation of Maven metadata for tomcat-juli.jar -- Resolves: rhbz#1033664 - -* Wed Jan 15 2014 Stanislav Ochotnicky - 0:7.0.47-2 -- Rebuild for bug #1033664 - -* Sun Nov 03 2013 Ivan Afonichev 0:7.0.47-1 -- Updated to 7.0.47 -- Fix java.security.policy - -* Sun Aug 04 2013 Fedora Release Engineering - 0:7.0.42-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Fri Jul 12 2013 Ivan Afonichev 0:7.0.42-2 -- Remove jpackage-utils R - -* Thu Jul 11 2013 Dmitry Tikhonov 0:7.0.42-1 -- Updated to 7.0.42 - -* Tue Jun 11 2013 Paul Komkoff 0:7.0.40-3 -- Dropped systemv inits. Bye-bye. -- Updated the systemd wrappers to allow running multiple instances. - Added wrapper scripts to do that, ported the original non-named - service file to work with the same wrappers, updated - /usr/sbin/tomcat to call systemctl. - -* Sat May 11 2013 Ivan Afonichev 0:7.0.40-1 -- Updated to 7.0.40 -- Resolves: rhbz 956569 added missing commons-pool link -- Remove ant-nodeps BR - -* Mon Mar 4 2013 Mikolaj Izdebski - 0:7.0.37-2 -- Add depmaps for org.eclipse.jetty.orbit -- Resolves: rhbz#917626 - -* Wed Feb 20 2013 Ivan Afonichev 0:7.0.39-1 -- Updated to 7.0.39 - -* Wed Feb 20 2013 Ivan Afonichev 0:7.0.37-1 -- Updated to 7.0.37 - -* Mon Feb 4 2013 Ivan Afonichev 0:7.0.35-1 -- Updated to 7.0.35 -- systemd SuccessExitStatus=143 for proper stop exit code processing - -* Mon Dec 24 2012 Ivan Afonichev 0:7.0.34-1 -- Updated to 7.0.34 -- ecj >= 4.2.1 now required -- Resolves: rhbz 889395 concat classpath correctly; chdir to $CATALINA_HOME - -* Fri Dec 7 2012 Ivan Afonichev 0:7.0.33-2 -- Resolves: rhbz 883806 refix logdir ownership - -* Sun Dec 2 2012 Ivan Afonichev 0:7.0.33-1 -- Updated to 7.0.33 -- Resolves: rhbz 873620 need chkconfig for update-alternatives - -* Wed Oct 17 2012 Ivan Afonichev 0:7.0.32-1 -- Updated to 7.0.32 -- Resolves: rhbz 842620 symlinks to taglibs - -* Fri Aug 24 2012 Ivan Afonichev 0:7.0.29-1 -- Updated to 7.0.29 -- Add pidfile as tmpfile -- Use systemd for running as unprivileged user -- Resolves: rhbz 847751 upgrade path was broken -- Resolves: rhbz 850343 use new systemd-rpm macros - -* Sat Jul 21 2012 Fedora Release Engineering - 0:7.0.28-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Mon Jul 2 2012 Ivan Afonichev 0:7.0.28-1 -- Updated to 7.0.28 -- Resolves: rhbz 820119 Remove bundled apache-commons-dbcp -- Resolves: rhbz 814900 Added tomcat-coyote POM -- Resolves: rhbz 810775 Remove systemv stuff from %%post scriptlet -- Remove redhat-lsb R - -* Mon Apr 9 2012 Ivan Afonichev 0:7.0.27-2 -- Fixed native download hack - -* Sat Apr 7 2012 Ivan Afonichev 0:7.0.27-1 -- Updated to 7.0.27 -- Fixed jakarta-taglibs-standard BR and R - -* Wed Mar 21 2012 Stanislav Ochotnicky - 0:7.0.26-2 -- Add more depmaps to J2EE apis to help jetty/glassfish updates - -* Wed Mar 14 2012 Juan Hernandez 0:7.0.26-2 -- Added the POM files for tomcat-api and tomcat-util (#803495) - -* Wed Feb 22 2012 Ivan Afonichev 0:7.0.26-1 -- Updated to 7.0.26 -- Bug 790334: Change ownership of logdir for logrotate - -* Thu Feb 16 2012 Krzysztof Daniel 0:7.0.25-4 -- Bug 790694: Priorities of jsp, servlet and el packages updated. - -* Wed Feb 8 2012 Krzysztof Daniel 0:7.0.25-3 -- Dropped indirect dependecy to tomcat 5 - -* Sun Jan 22 2012 Ivan Afonichev 0:7.0.25-2 -- Added hack for maven depmap of tomcat-juli absolute link [ -f ] pass correctly - -* Sat Jan 21 2012 Ivan Afonichev 0:7.0.25-1 -- Updated to 7.0.25 -- Removed EntityResolver patch (changes already in upstream sources) -- Place poms and depmaps in the same package as jars -- Added javax.servlet.descriptor to export-package of servlet-api -- Move several chkconfig actions and reqs to systemv subpackage -- New maven depmaps generation method -- Add patch to support java7. (patch sent upstream). -- Require java >= 1:1.6.0 - -* Fri Jan 13 2012 Krzysztof Daniel 0:7.0.23-5 -- Exported javax.servlet.* packages in version 3.0 as 2.6 to make - servlet-api compatible with Eclipse. - -* Thu Jan 12 2012 Ivan Afonichev 0:7.0.23-4 -- Move jsvc support to subpackage - -* Wed Jan 11 2012 Alexander Kurtakov 0:7.0.23-2 -- Add EntityResolver setter patch to jasper for jetty's need. (patch sent upstream). - -* Mon Dec 12 2011 Joseph D. Wagner 0:7.0.23-3 -- Added support to /usr/sbin/tomcat-sysd and /usr/sbin/tomcat for - starting tomcat with jsvc, which allows tomcat to perform some - privileged operations (e.g. bind to a port < 1024) and then switch - identity to a non-privileged user. Must add USE_JSVC="true" to - /etc/tomcat/tomcat.conf or /etc/sysconfig/tomcat. - -* Mon Nov 28 2011 Ivan Afonichev 0:7.0.23-1 -- Updated to 7.0.23 - -* Fri Nov 11 2011 Ivan Afonichev 0:7.0.22-2 -- Move tomcat-juli.jar to lib package -- Drop %%update_maven_depmap as in tomcat6 -- Provide native systemd unit file ported from tomcat6 - -* Thu Oct 6 2011 Ivan Afonichev 0:7.0.22-1 -- Updated to 7.0.22 - -* Mon Oct 03 2011 Rex Dieter - 0:7.0.21-3.1 -- rebuild (java), rel-eng#4932 - -* Mon Sep 26 2011 Ivan Afonichev 0:7.0.21-3 -- Fix basedir mode - -* Tue Sep 20 2011 Roland Grunberg 0:7.0.21-2 -- Add manifests for el-api, jasper-el, jasper, tomcat, and tomcat-juli. - -* Thu Sep 8 2011 Ivan Afonichev 0:7.0.21-1 -- Updated to 7.0.21 - -* Mon Aug 15 2011 Ivan Afonichev 0:7.0.20-3 -- Require java = 1:1.6.0 - -* Mon Aug 15 2011 Ivan Afonichev 0:7.0.20-2 -- Require java < 1.7.0 - -* Mon Aug 15 2011 Ivan Afonichev 0:7.0.20-1 -- Updated to 7.0.20 - -* Tue Jul 26 2011 Ivan Afonichev 0:7.0.19-1 -- Updated to 7.0.19 - -* Tue Jun 21 2011 Ivan Afonichev 0:7.0.16-1 -- Updated to 7.0.16 - -* Mon Jun 6 2011 Ivan Afonichev 0:7.0.14-3 -- Added initial systemd service -- Fix some paths - -* Sat May 21 2011 Ivan Afonichev 0:7.0.14-2 -- Fixed http source link -- Securify some permissions -- Added licenses for el-api and servlet-api -- Added dependency on jpackage-utils for the javadoc subpackage - -* Sat May 14 2011 Ivan Afonichev 0:7.0.14-1 -- Updated to 7.0.14 - -* Thu May 5 2011 Ivan Afonichev 0:7.0.12-4 -- Provided local paths for libs -- Fixed dependencies -- Fixed update temp/work cleanup - -* Mon May 2 2011 Ivan Afonichev 0:7.0.12-3 -- Fixed package groups -- Fixed some permissions -- Fixed some links -- Removed old tomcat6 crap - -* Thu Apr 28 2011 Ivan Afonichev 0:7.0.12-2 -- Package now named just tomcat instead of tomcat7 -- Removed Provides: %%{name}-log4j -- Switched to apache-commons-* names instead of jakarta-commons-* . -- Remove the old changelog -- BR/R java >= 1:1.6.0 , same for java-devel -- Removed old tomcat6 crap - -* Wed Apr 27 2011 Ivan Afonichev 0:7.0.12-1 -- Tomcat7 +* Thu Jun 07 2018 Coty Sutherland - 1:9.0.7-1 +- Create single RPM for FreeIPA to use From 7e7715d237f983393d9ed8b72dd2807906bfc1a4 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 8 Jun 2018 15:00:29 -0400 Subject: [PATCH 232/273] Initialized to use tito. --- .tito/packages/.readme | 3 +++ .tito/tito.props | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 .tito/packages/.readme create mode 100644 .tito/tito.props diff --git a/.tito/packages/.readme b/.tito/packages/.readme new file mode 100644 index 0000000..b9411e2 --- /dev/null +++ b/.tito/packages/.readme @@ -0,0 +1,3 @@ +the .tito/packages directory contains metadata files +named after their packages. Each file has the latest tagged +version and the project's relative directory. diff --git a/.tito/tito.props b/.tito/tito.props new file mode 100644 index 0000000..eab3f19 --- /dev/null +++ b/.tito/tito.props @@ -0,0 +1,5 @@ +[buildconfig] +builder = tito.builder.Builder +tagger = tito.tagger.VersionTagger +changelog_do_not_remove_cherrypick = 0 +changelog_format = %s (%ae) From f1fd819e7db3967ace1f5606b8d3e1cdd99fe792 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 8 Jun 2018 15:02:39 -0400 Subject: [PATCH 233/273] Automatic commit of package [tomcat] release [9.0.7-1]. Created by command: /usr/bin/tito tag 1.0 --- .tito/packages/tomcat | 1 + tomcat.spec | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 .tito/packages/tomcat diff --git a/.tito/packages/tomcat b/.tito/packages/tomcat new file mode 100644 index 0000000..c814425 --- /dev/null +++ b/.tito/packages/tomcat @@ -0,0 +1 @@ +9.0.7-1 ./ diff --git a/tomcat.spec b/tomcat.spec index f0cee80..850bde4 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -515,5 +515,8 @@ fi %{_datadir}/maven-metadata/tomcat.xml %changelog +* Fri Jun 08 2018 Coty Sutherland 9.0.7-1 +- new package built with tito + * Thu Jun 07 2018 Coty Sutherland - 1:9.0.7-1 - Create single RPM for FreeIPA to use From 9ae9549c72a11ec432b8d92b2668931af63ad7c7 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 8 Jun 2018 15:09:23 -0400 Subject: [PATCH 234/273] Switch tito to use NoTgzBuilder since I'm using a zip... --- .tito/tito.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tito/tito.props b/.tito/tito.props index eab3f19..70eda22 100644 --- a/.tito/tito.props +++ b/.tito/tito.props @@ -1,5 +1,5 @@ [buildconfig] -builder = tito.builder.Builder +builder = tito.builder.NoTgzBuilder tagger = tito.tagger.VersionTagger changelog_do_not_remove_cherrypick = 0 changelog_format = %s (%ae) From dbf58e8939fbd18fc763f213d908a9d7db4cb385 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Mon, 11 Jun 2018 14:13:20 -0400 Subject: [PATCH 235/273] Update sources --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 927322b..8a82736 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (apache-tomcat-8.5.30-src.tar.gz) = 53729cfd1859872109f816df2642e3cd776a7faf8c55b1d50df0459f12958aacbf36debe6e8f10c19ab0a5bb2973fa63a2fec57f83ecaf19f4cf9d82e4a20265 +SHA512 (tomcat-9.0.7.redhat-10-src.zip) = 0eee2cccfd08704350095b1fdd1472d2f85b81e6b8d8bf3a3f4e5005fe3bb18503438c2a5499af0dc21ab4e1d0636c2ee276aae52af823881ed0f444fb65fc81 From 1a7c77b10788d13adbc410e7d596bd481e53bd37 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Mon, 11 Jun 2018 14:27:31 -0400 Subject: [PATCH 236/273] Rename spec file --- tomcat.spec => pki-servlet-container.spec | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tomcat.spec => pki-servlet-container.spec (100%) diff --git a/tomcat.spec b/pki-servlet-container.spec similarity index 100% rename from tomcat.spec rename to pki-servlet-container.spec From 52f0ab9fd485f6be0e3b071f2a533e82b99ac607 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Mon, 11 Jun 2018 14:28:49 -0400 Subject: [PATCH 237/273] Regroup source files --- pki-servlet-container.spec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 850bde4..27c511f 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -71,9 +71,9 @@ Source3: %{name}-%{major_version}.%{minor_version}.sysconfig Source4: %{name}-%{major_version}.%{minor_version}.wrapper Source6: %{name}-%{major_version}.%{minor_version}-digest.script Source7: %{name}-%{major_version}.%{minor_version}-tool-wrapper.script -Source8: servlet-api-OSGi-MANIFEST.MF -Source9: jsp-api-OSGi-MANIFEST.MF -Source11: %{name}-%{major_version}.%{minor_version}.service +Source8: %{name}-%{major_version}.%{minor_version}.service +Source9: servlet-api-OSGi-MANIFEST.MF +Source11: jsp-api-OSGi-MANIFEST.MF Source12: el-api-OSGi-MANIFEST.MF Source13: jasper-el-OSGi-MANIFEST.MF Source14: jasper-OSGi-MANIFEST.MF @@ -203,10 +203,10 @@ export OPT_JAR_LIST="xalan-j2-serializer" # inject OSGi manifests mkdir -p META-INF -cp -p %{SOURCE8} META-INF/MANIFEST.MF +cp -p %{SOURCE9} META-INF/MANIFEST.MF touch META-INF/MANIFEST.MF zip output/build/lib/servlet-api.jar META-INF/MANIFEST.MF -cp -p %{SOURCE9} META-INF/MANIFEST.MF +cp -p %{SOURCE11} META-INF/MANIFEST.MF touch META-INF/MANIFEST.MF zip output/build/lib/jsp-api.jar META-INF/MANIFEST.MF cp -p %{SOURCE12} META-INF/MANIFEST.MF @@ -265,7 +265,7 @@ popd > ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/%{name} %{__install} -m 0644 %{SOURCE4} \ ${RPM_BUILD_ROOT}%{_sbindir}/%{name} -%{__install} -m 0644 %{SOURCE11} \ +%{__install} -m 0644 %{SOURCE8} \ ${RPM_BUILD_ROOT}%{_unitdir}/%{name}.service %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ From 9b32c74444c0bf00cfe6b28c613a0eaf4a856a83 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 10:04:37 -0400 Subject: [PATCH 238/273] Add serlvet-api package back for FreeIPA --- pki-servlet-container.spec | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 27c511f..96c8b15 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -139,12 +139,6 @@ Obsoletes: %{name}-jsp-2.2-api Requires: ecj >= 1:4.6.3 Requires(preun): coreutils -#%%package servlet-%%{servletspec}-api -Provides: servlet = %{servletspec} -Provides: servlet6 -Provides: servlet3 -Obsoletes: %{name}-servlet-3.0-api - #%%package el-%%{elspec}-api Provides: el_api = %{elspec} Obsoletes: %{name}-el-2.2-api @@ -159,6 +153,19 @@ Tomcat is developed in an open and participatory environment and released under the Apache Software License version 2.0. Tomcat is intended to be a collaboration of the best-of-breed developers from around the world. +%package servlet-%{servletspec}-api +Group: Development/Libraries +Summary: Apache Tomcat Java Servlet v%{servletspec} API Implementation Classes +Provides: servlet = %{servletspec} +Provides: servlet6 +Provides: servlet3 +Obsoletes: %{name}-servlet-3.1-api +Requires(post): chkconfig +Requires(postun): chkconfig + +%description servlet-%{servletspec}-api +Apache Tomcat Servlet API Implementation Classes. + %prep %setup -q -n %{packdname} @@ -364,7 +371,7 @@ done # Generate a depmap fragment javax.servlet:servlet-api pointing to # tomcat-servlet-3.0-api for backwards compatibility # also provide jetty depmap (originally in jetty package, but it's cleaner to have it here -%add_maven_depmap JPP-tomcat-servlet-api.pom tomcat-servlet-api.jar +%add_maven_depmap JPP-tomcat-servlet-api.pom tomcat-servlet-api.jar -f "tomcat-servlet-api" # replace temporary copy with link %{__ln_s} -f $(abs2rel %{bindir}/tomcat-juli.jar %{libdir}) ${RPM_BUILD_ROOT}%{libdir}/ @@ -510,10 +517,14 @@ fi %{_mavenpomdir}/JPP.%{name}-jni.pom %{_mavenpomdir}/JPP.%{name}-util-scan.pom %{_mavenpomdir}/JPP-%{name}-jsp-api.pom -%{_mavenpomdir}/JPP-%{name}-servlet-api.pom %{_mavenpomdir}/JPP-%{name}-el-api.pom %{_datadir}/maven-metadata/tomcat.xml +%files servlet-%{servletspec}-api -f output/dist/src/res/maven/.mfiles-tomcat-servlet-api +%defattr(-,root,root,-) +%doc LICENSE +%{_javadir}/%{name}-servlet-%{servletspec}*.jar + %changelog * Fri Jun 08 2018 Coty Sutherland 9.0.7-1 - new package built with tito From 7c915f6c49a59c1e71d3bbc25ddad693f8a730bf Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 10:24:54 -0400 Subject: [PATCH 239/273] Update all references for %{name} to 'tomcat' to maintain directory structures, etc and reduce changes that FreeIPA will need to make in order to use this package --- pki-servlet-container.spec | 210 ++++++++++++++++++------------------- 1 file changed, 105 insertions(+), 105 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 96c8b15..05a1c01 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -42,14 +42,14 @@ %global tcuid 91 # FHS 2.3 compliant tree structure - http://www.pathname.com/fhs/2.3/ -%global basedir %{_var}/lib/%{name} +%global basedir %{_var}/lib/tomcat %global appdir %{basedir}/webapps -%global homedir %{_datadir}/%{name} +%global homedir %{_datadir}/tomcat %global bindir %{homedir}/bin -%global confdir %{_sysconfdir}/%{name} -%global libdir %{_javadir}/%{name} -%global logdir %{_var}/log/%{name} -%global cachedir %{_var}/cache/%{name} +%global confdir %{_sysconfdir}/tomcat +%global libdir %{_javadir}/tomcat +%global logdir %{_var}/log/tomcat +%global cachedir %{_var}/cache/tomcat %global tempdir %{cachedir}/temp %global workdir %{cachedir}/work %global _initrddir %{_sysconfdir}/init.d @@ -66,12 +66,12 @@ URL: http://tomcat.apache.org/ #Source0: http://www.apache.org/dist/tomcat/tomcat-%%{major_version}/v%%{version}/src/%%{packdname}.tar.gz Source0: tomcat-9.0.7.redhat-10-src.zip -Source1: %{name}-%{major_version}.%{minor_version}.conf -Source3: %{name}-%{major_version}.%{minor_version}.sysconfig -Source4: %{name}-%{major_version}.%{minor_version}.wrapper -Source6: %{name}-%{major_version}.%{minor_version}-digest.script -Source7: %{name}-%{major_version}.%{minor_version}-tool-wrapper.script -Source8: %{name}-%{major_version}.%{minor_version}.service +Source1: tomcat-%{major_version}.%{minor_version}.conf +Source3: tomcat-%{major_version}.%{minor_version}.sysconfig +Source4: tomcat-%{major_version}.%{minor_version}.wrapper +Source6: tomcat-%{major_version}.%{minor_version}-digest.script +Source7: tomcat-%{major_version}.%{minor_version}-tool-wrapper.script +Source8: tomcat-%{major_version}.%{minor_version}.service Source9: servlet-api-OSGi-MANIFEST.MF Source11: jsp-api-OSGi-MANIFEST.MF Source12: el-api-OSGi-MANIFEST.MF @@ -84,9 +84,9 @@ Source30: tomcat-preamble Source31: tomcat-server Source32: tomcat-named.service -Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch -Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch -Patch2: %{name}-8.0.36-CompilerOptionsV9.patch +Patch0: tomcat-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch +Patch1: tomcat-%{major_version}.%{minor_version}-tomcat-users-webapp.patch +Patch2: tomcat-8.0.36-CompilerOptionsV9.patch Patch3: disableJavadocFailOnWarning.patch BuildArch: noarch @@ -126,14 +126,14 @@ Requires(preun): systemd-units Requires(postun): systemd-units # added after log4j sub-package was removed -Provides: %{name}-log4j = %{epoch}:%{version}-%{release} +Provides: tomcat-log4j = %{epoch}:%{version}-%{release} # Leftover requires/provides from removing the subpackages # they still apply in instances where the old version is installed. #%%package jsp-%%{jspspec}-api Provides: jsp = %{jspspec} -Obsoletes: %{name}-jsp-2.2-api +Obsoletes: tomcat-jsp-2.2-api #%%package lib Requires: ecj >= 1:4.6.3 @@ -141,7 +141,7 @@ Requires(preun): coreutils #%%package el-%%{elspec}-api Provides: el_api = %{elspec} -Obsoletes: %{name}-el-2.2-api +Obsoletes: tomcat-el-2.2-api %description Tomcat is the servlet container that is used in the official Reference @@ -159,7 +159,7 @@ Summary: Apache Tomcat Java Servlet v%{servletspec} API Implementation Classes Provides: servlet = %{servletspec} Provides: servlet6 Provides: servlet3 -Obsoletes: %{name}-servlet-3.1-api +Obsoletes: tomcat-servlet-3.1-api Requires(post): chkconfig Requires(postun): chkconfig @@ -252,7 +252,7 @@ zip output/build/bin/tomcat-juli.jar META-INF/MANIFEST.MF %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{tempdir} %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{workdir} %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_unitdir} -%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_libexecdir}/%{name} +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_libexecdir}/tomcat # move things into place # First copy supporting libs to tomcat lib @@ -265,48 +265,48 @@ popd %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE1} \ - > ${RPM_BUILD_ROOT}%{confdir}/%{name}.conf + > ${RPM_BUILD_ROOT}%{confdir}/tomcat.conf %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE3} \ - > ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/%{name} + > ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/tomcat %{__install} -m 0644 %{SOURCE4} \ - ${RPM_BUILD_ROOT}%{_sbindir}/%{name} + ${RPM_BUILD_ROOT}%{_sbindir}/tomcat %{__install} -m 0644 %{SOURCE8} \ - ${RPM_BUILD_ROOT}%{_unitdir}/%{name}.service + ${RPM_BUILD_ROOT}%{_unitdir}/tomcat.service %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE6} \ - > ${RPM_BUILD_ROOT}%{_bindir}/%{name}-digest + > ${RPM_BUILD_ROOT}%{_bindir}/tomcat-digest %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE7} \ - > ${RPM_BUILD_ROOT}%{_bindir}/%{name}-tool-wrapper + > ${RPM_BUILD_ROOT}%{_bindir}/tomcat-tool-wrapper %{__install} -m 0644 %{SOURCE21} \ - ${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/functions + ${RPM_BUILD_ROOT}%{_libexecdir}/tomcat/functions %{__install} -m 0755 %{SOURCE30} \ - ${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/preamble + ${RPM_BUILD_ROOT}%{_libexecdir}/tomcat/preamble %{__install} -m 0755 %{SOURCE31} \ - ${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/server + ${RPM_BUILD_ROOT}%{_libexecdir}/tomcat/server %{__install} -m 0644 %{SOURCE32} \ - ${RPM_BUILD_ROOT}%{_unitdir}/%{name}@.service + ${RPM_BUILD_ROOT}%{_unitdir}/tomcat@.service # Substitute libnames in catalina-tasks.xml sed -i \ - "s,el-api.jar,%{name}-el-%{elspec}-api.jar,; - s,servlet-api.jar,%{name}-servlet-%{servletspec}-api.jar,; - s,jsp-api.jar,%{name}-jsp-%{jspspec}-api.jar,;" \ + "s,el-api.jar,tomcat-el-%{elspec}-api.jar,; + s,servlet-api.jar,tomcat-servlet-%{servletspec}-api.jar,; + s,jsp-api.jar,tomcat-jsp-%{jspspec}-api.jar,;" \ ${RPM_BUILD_ROOT}%{bindir}/catalina-tasks.xml # create jsp and servlet API symlinks pushd ${RPM_BUILD_ROOT}%{_javadir} - %{__mv} %{name}/jsp-api.jar %{name}-jsp-%{jspspec}-api.jar - %{__ln_s} %{name}-jsp-%{jspspec}-api.jar %{name}-jsp-api.jar - %{__mv} %{name}/servlet-api.jar %{name}-servlet-%{servletspec}-api.jar - %{__ln_s} %{name}-servlet-%{servletspec}-api.jar %{name}-servlet-api.jar - %{__mv} %{name}/el-api.jar %{name}-el-%{elspec}-api.jar - %{__ln_s} %{name}-el-%{elspec}-api.jar %{name}-el-api.jar + %{__mv} tomcat/jsp-api.jar tomcat-jsp-%{jspspec}-api.jar + %{__ln_s} tomcat-jsp-%{jspspec}-api.jar tomcat-jsp-api.jar + %{__mv} tomcat/servlet-api.jar tomcat-servlet-%{servletspec}-api.jar + %{__ln_s} tomcat-servlet-%{servletspec}-api.jar tomcat-servlet-api.jar + %{__mv} tomcat/el-api.jar tomcat-el-%{elspec}-api.jar + %{__ln_s} tomcat-el-%{elspec}-api.jar tomcat-el-api.jar popd pushd output/build @@ -316,9 +316,9 @@ popd pushd ${RPM_BUILD_ROOT}%{libdir} # symlink JSP and servlet API jars - %{__ln_s} ../../java/%{name}-jsp-%{jspspec}-api.jar . - %{__ln_s} ../../java/%{name}-servlet-%{servletspec}-api.jar . - %{__ln_s} ../../java/%{name}-el-%{elspec}-api.jar . + %{__ln_s} ../../java/tomcat-jsp-%{jspspec}-api.jar . + %{__ln_s} ../../java/tomcat-servlet-%{servletspec}-api.jar . + %{__ln_s} ../../java/tomcat-el-%{elspec}-api.jar . %{__ln_s} $(build-classpath apache-commons-collections) commons-collections.jar %{__ln_s} $(build-classpath apache-commons-dbcp) commons-dbcp.jar %{__ln_s} $(build-classpath apache-commons-pool) commons-pool.jar @@ -348,17 +348,17 @@ done # we won't install dbcp, juli-adapters and juli-extras pom files for libname in annotations-api catalina jasper-el jasper catalina-ha; do - %{__cp} -a %{name}-$libname.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-$libname.pom - %add_maven_depmap JPP.%{name}-$libname.pom %{name}/$libname.jar + %{__cp} -a tomcat-$libname.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-$libname.pom + %add_maven_depmap JPP.tomcat-$libname.pom tomcat/$libname.jar done # tomcat-util-scan -%{__cp} -a %{name}-util-scan.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-util-scan.pom -%add_maven_depmap JPP.%{name}-util-scan.pom %{name}/%{name}-util-scan.jar +%{__cp} -a tomcat-util-scan.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-util-scan.pom +%add_maven_depmap JPP.tomcat-util-scan.pom tomcat/tomcat-util-scan.jar # tomcat-jni -%{__cp} -a %{name}-jni.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-jni.pom -%add_maven_depmap JPP.%{name}-jni.pom %{name}/%{name}-jni.jar +%{__cp} -a tomcat-jni.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-jni.pom +%add_maven_depmap JPP.tomcat-jni.pom tomcat/tomcat-jni.jar # servlet-api jsp-api and el-api are not in tomcat subdir, since they are widely re-used elsewhere %{__cp} -a tomcat-jsp-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-jsp-api.pom @@ -377,35 +377,35 @@ done %{__ln_s} -f $(abs2rel %{bindir}/tomcat-juli.jar %{libdir}) ${RPM_BUILD_ROOT}%{libdir}/ # two special pom where jar files have different names -%{__cp} -a tomcat-tribes.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-catalina-tribes.pom -%add_maven_depmap JPP.%{name}-catalina-tribes.pom %{name}/catalina-tribes.jar +%{__cp} -a tomcat-tribes.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-catalina-tribes.pom +%add_maven_depmap JPP.tomcat-catalina-tribes.pom tomcat/catalina-tribes.jar -%{__cp} -a tomcat-coyote.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-coyote.pom -%add_maven_depmap JPP.%{name}-tomcat-coyote.pom %{name}/tomcat-coyote.jar +%{__cp} -a tomcat-coyote.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-coyote.pom +%add_maven_depmap JPP.tomcat-tomcat-coyote.pom tomcat/tomcat-coyote.jar -%{__cp} -a tomcat-juli.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-juli.pom -%add_maven_depmap JPP.%{name}-tomcat-juli.pom %{name}/tomcat-juli.jar +%{__cp} -a tomcat-juli.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-juli.pom +%add_maven_depmap JPP.tomcat-tomcat-juli.pom tomcat/tomcat-juli.jar -%{__cp} -a tomcat-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-api.pom -%add_maven_depmap JPP.%{name}-tomcat-api.pom %{name}/tomcat-api.jar +%{__cp} -a tomcat-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-api.pom +%add_maven_depmap JPP.tomcat-tomcat-api.pom tomcat/tomcat-api.jar -%{__cp} -a tomcat-util.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-util.pom -%add_maven_depmap JPP.%{name}-tomcat-util.pom %{name}/tomcat-util.jar +%{__cp} -a tomcat-util.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-util.pom +%add_maven_depmap JPP.tomcat-tomcat-util.pom tomcat/tomcat-util.jar -%{__cp} -a tomcat-jdbc.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-jdbc.pom -%add_maven_depmap JPP.%{name}-tomcat-jdbc.pom %{name}/tomcat-jdbc.jar +%{__cp} -a tomcat-jdbc.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-jdbc.pom +%add_maven_depmap JPP.tomcat-tomcat-jdbc.pom tomcat/tomcat-jdbc.jar # tomcat-websocket-api -%{__cp} -a tomcat-websocket-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-websocket-api.pom -%add_maven_depmap JPP.%{name}-websocket-api.pom %{name}/websocket-api.jar +%{__cp} -a tomcat-websocket-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-websocket-api.pom +%add_maven_depmap JPP.tomcat-websocket-api.pom tomcat/websocket-api.jar # tomcat-tomcat-websocket -%{__cp} -a tomcat-websocket.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-websocket.pom -%add_maven_depmap JPP.%{name}-tomcat-websocket.pom %{name}/tomcat-websocket.jar +%{__cp} -a tomcat-websocket.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-websocket.pom +%add_maven_depmap JPP.tomcat-tomcat-websocket.pom tomcat/tomcat-websocket.jar # tomcat-jaspic-api -%{__cp} -a tomcat-jaspic-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-jaspic-api.pom -%add_maven_depmap JPP.%{name}-jaspic-api.pom %{name}/jaspic-api.jar +%{__cp} -a tomcat-jaspic-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-jaspic-api.pom +%add_maven_depmap JPP.tomcat-jaspic-api.pom tomcat/jaspic-api.jar %pre @@ -416,48 +416,48 @@ done %post # install but don't activate -%systemd_post %{name}.service +%systemd_post tomcat.service # Collapse all of the alternatives installations into one %{_sbindir}/update-alternatives --install %{_javadir}/jsp.jar jsp \ - %{_javadir}/%{name}-jsp-%{jspspec}-api.jar 20200 + %{_javadir}/tomcat-jsp-%{jspspec}-api.jar 20200 %{_sbindir}/update-alternatives --install %{_javadir}/servlet.jar servlet \ - %{_javadir}/%{name}-servlet-%{servletspec}-api.jar 30000 + %{_javadir}/tomcat-servlet-%{servletspec}-api.jar 30000 %{_sbindir}/update-alternatives --install %{_javadir}/elspec.jar elspec \ - %{_javadir}/%{name}-el-%{elspec}-api.jar 20300 + %{_javadir}/tomcat-el-%{elspec}-api.jar 20300 %preun # clean tempdir and workdir on removal or upgrade %{__rm} -rf %{workdir}/* %{tempdir}/* -%systemd_preun %{name}.service +%systemd_preun tomcat.service %postun -%systemd_postun_with_restart %{name}.service +%systemd_postun_with_restart tomcat.service # Collapse all of the alternatives removals into one if [ "$1" = "0" ]; then %{_sbindir}/update-alternatives --remove jsp \ - %{_javadir}/%{name}-jsp-%{jspspec}-api.jar + %{_javadir}/tomcat-jsp-%{jspspec}-api.jar %{_sbindir}/update-alternatives --remove servlet \ - %{_javadir}/%{name}-servlet-%{servletspec}-api.jar + %{_javadir}/tomcat-servlet-%{servletspec}-api.jar %{_sbindir}/update-alternatives --remove elspec \ - %{_javadir}/%{name}-el-%{elspec}-api.jar + %{_javadir}/tomcat-el-%{elspec}-api.jar fi %files %defattr(0664,root,tomcat,0755) %doc {LICENSE,NOTICE,RELEASE*} -%attr(0755,root,root) %{_bindir}/%{name}-digest -%attr(0755,root,root) %{_bindir}/%{name}-tool-wrapper -%attr(0755,root,root) %{_sbindir}/%{name} -%attr(0644,root,root) %{_unitdir}/%{name}.service -%attr(0644,root,root) %{_unitdir}/%{name}@.service -%attr(0755,root,root) %dir %{_libexecdir}/%{name} +%attr(0755,root,root) %{_bindir}/tomcat-digest +%attr(0755,root,root) %{_bindir}/tomcat-tool-wrapper +%attr(0755,root,root) %{_sbindir}/tomcat +%attr(0644,root,root) %{_unitdir}/tomcat.service +%attr(0644,root,root) %{_unitdir}/tomcat@.service +%attr(0755,root,root) %dir %{_libexecdir}/tomcat %attr(0755,root,root) %dir %{_localstatedir}/lib/tomcats -%attr(0644,root,root) %{_libexecdir}/%{name}/functions -%attr(0755,root,root) %{_libexecdir}/%{name}/preamble -%attr(0755,root,root) %{_libexecdir}/%{name}/server -%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/%{name} +%attr(0644,root,root) %{_libexecdir}/tomcat/functions +%attr(0755,root,root) %{_libexecdir}/tomcat/preamble +%attr(0755,root,root) %{_libexecdir}/tomcat/server +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/tomcat %attr(0755,root,tomcat) %dir %{basedir} %attr(0755,root,tomcat) %dir %{confdir} @@ -475,7 +475,7 @@ fi %attr(0775,root,tomcat) %dir %{confdir}/Catalina/localhost %attr(0755,root,tomcat) %dir %{confdir}/conf.d %{confdir}/conf.d/README -%config(noreplace) %{confdir}/%{name}.conf +%config(noreplace) %{confdir}/tomcat.conf %config(noreplace) %{confdir}/*.policy %config(noreplace) %{confdir}/*.properties %config(noreplace) %{confdir}/context.xml @@ -500,30 +500,30 @@ fi %{libdir}/*.jar %{_javadir}/*.jar %{bindir}/tomcat-juli.jar -%{_mavenpomdir}/JPP.%{name}-annotations-api.pom -%{_mavenpomdir}/JPP.%{name}-catalina-ha.pom -%{_mavenpomdir}/JPP.%{name}-catalina-tribes.pom -%{_mavenpomdir}/JPP.%{name}-catalina.pom -%{_mavenpomdir}/JPP.%{name}-jasper-el.pom -%{_mavenpomdir}/JPP.%{name}-jasper.pom -%{_mavenpomdir}/JPP.%{name}-tomcat-api.pom -%{_mavenpomdir}/JPP.%{name}-tomcat-juli.pom -%{_mavenpomdir}/JPP.%{name}-tomcat-coyote.pom -%{_mavenpomdir}/JPP.%{name}-tomcat-util.pom -%{_mavenpomdir}/JPP.%{name}-tomcat-jdbc.pom -%{_mavenpomdir}/JPP.%{name}-websocket-api.pom -%{_mavenpomdir}/JPP.%{name}-tomcat-websocket.pom -%{_mavenpomdir}/JPP.%{name}-jaspic-api.pom -%{_mavenpomdir}/JPP.%{name}-jni.pom -%{_mavenpomdir}/JPP.%{name}-util-scan.pom -%{_mavenpomdir}/JPP-%{name}-jsp-api.pom -%{_mavenpomdir}/JPP-%{name}-el-api.pom +%{_mavenpomdir}/JPP.tomcat-annotations-api.pom +%{_mavenpomdir}/JPP.tomcat-catalina-ha.pom +%{_mavenpomdir}/JPP.tomcat-catalina-tribes.pom +%{_mavenpomdir}/JPP.tomcat-catalina.pom +%{_mavenpomdir}/JPP.tomcat-jasper-el.pom +%{_mavenpomdir}/JPP.tomcat-jasper.pom +%{_mavenpomdir}/JPP.tomcat-tomcat-api.pom +%{_mavenpomdir}/JPP.tomcat-tomcat-juli.pom +%{_mavenpomdir}/JPP.tomcat-tomcat-coyote.pom +%{_mavenpomdir}/JPP.tomcat-tomcat-util.pom +%{_mavenpomdir}/JPP.tomcat-tomcat-jdbc.pom +%{_mavenpomdir}/JPP.tomcat-websocket-api.pom +%{_mavenpomdir}/JPP.tomcat-tomcat-websocket.pom +%{_mavenpomdir}/JPP.tomcat-jaspic-api.pom +%{_mavenpomdir}/JPP.tomcat-jni.pom +%{_mavenpomdir}/JPP.tomcat-util-scan.pom +%{_mavenpomdir}/JPP-tomcat-jsp-api.pom +%{_mavenpomdir}/JPP-tomcat-el-api.pom %{_datadir}/maven-metadata/tomcat.xml %files servlet-%{servletspec}-api -f output/dist/src/res/maven/.mfiles-tomcat-servlet-api %defattr(-,root,root,-) %doc LICENSE -%{_javadir}/%{name}-servlet-%{servletspec}*.jar +%{_javadir}/tomcat-servlet-%{servletspec}*.jar %changelog * Fri Jun 08 2018 Coty Sutherland 9.0.7-1 From 572effda91727142c6df1e62e107eb57c39831e6 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 12:11:15 -0400 Subject: [PATCH 240/273] Change package name to 'pki-servlet-container' Add servlet-api sub-package back for FreeIPA to use Note that sub-package name differs parent because it was too lengthy otherwise --- pki-servlet-container.spec | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 05a1c01..e70f0e9 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -55,7 +55,7 @@ %global _initrddir %{_sysconfdir}/init.d %global _systemddir /lib/systemd/system -Name: tomcat +Name: pki-servlet-container Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} Release: 1%{?dist} @@ -153,7 +153,7 @@ Tomcat is developed in an open and participatory environment and released under the Apache Software License version 2.0. Tomcat is intended to be a collaboration of the best-of-breed developers from around the world. -%package servlet-%{servletspec}-api +%package -n pki-servlet-%{servletspec}-api Group: Development/Libraries Summary: Apache Tomcat Java Servlet v%{servletspec} API Implementation Classes Provides: servlet = %{servletspec} @@ -163,7 +163,7 @@ Obsoletes: tomcat-servlet-3.1-api Requires(post): chkconfig Requires(postun): chkconfig -%description servlet-%{servletspec}-api +%description -n pki-servlet-%{servletspec}-api Apache Tomcat Servlet API Implementation Classes. %prep @@ -407,6 +407,9 @@ done %{__cp} -a tomcat-jaspic-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-jaspic-api.pom %add_maven_depmap JPP.tomcat-jaspic-api.pom tomcat/jaspic-api.jar +# Manually change the metadata filenames +%{__mv} ${RPM_BUILD_ROOT}%{_datadir}/maven-metadata/%{name}.xml ${RPM_BUILD_ROOT}%{_datadir}/maven-metadata/tomcat.xml +%{__mv} ${RPM_BUILD_ROOT}%{_datadir}/maven-metadata/%{name}-tomcat-servlet-api.xml ${RPM_BUILD_ROOT}%{_datadir}/maven-metadata/tomcat-servlet-api.xml %pre # add the tomcat user and group @@ -519,11 +522,14 @@ fi %{_mavenpomdir}/JPP-tomcat-jsp-api.pom %{_mavenpomdir}/JPP-tomcat-el-api.pom %{_datadir}/maven-metadata/tomcat.xml +%exclude %{_javadir}/tomcat-servlet-%{servletspec}*.jar -%files servlet-%{servletspec}-api -f output/dist/src/res/maven/.mfiles-tomcat-servlet-api +%files -n pki-servlet-%{servletspec}-api %defattr(-,root,root,-) %doc LICENSE %{_javadir}/tomcat-servlet-%{servletspec}*.jar +%{_datadir}/maven-metadata/tomcat-servlet-api.xml +%{_mavenpomdir}/JPP-tomcat-servlet-api.pom %changelog * Fri Jun 08 2018 Coty Sutherland 9.0.7-1 From 55deda392ac12c979642906b713eead03403ea93 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 12:16:32 -0400 Subject: [PATCH 241/273] Forgot to add requirement on the pki-servlet-api sub-package --- pki-servlet-container.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index e70f0e9..bbc7381 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -143,6 +143,8 @@ Requires(preun): coreutils Provides: el_api = %{elspec} Obsoletes: tomcat-el-2.2-api +Requires: pki-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} + %description Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServer Pages technologies. From d7dbe3189fecb82603a71157f54f67ad2ce04762 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 12:17:16 -0400 Subject: [PATCH 242/273] Sync up release number with JWS build so that you can immediately know where it came from --- pki-servlet-container.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index bbc7381..9d1278e 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -56,7 +56,7 @@ %global _systemddir /lib/systemd/system Name: pki-servlet-container -Epoch: 1 +Epoch: %{redhat_version} Version: %{major_version}.%{minor_version}.%{micro_version} Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API From 8cc860d99010cd32857cdb20626e21e616569d9f Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 12:20:26 -0400 Subject: [PATCH 243/273] Reset Epoch back to 1 and set Release to sync up with the JWS builds... --- pki-servlet-container.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 9d1278e..f42105b 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -56,9 +56,9 @@ %global _systemddir /lib/systemd/system Name: pki-servlet-container -Epoch: %{redhat_version} +Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: %{redhat_version}%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons License: ASL 2.0 From 6a563473e50625e177b3ca195cd66225d88e8df8 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 14:19:54 -0400 Subject: [PATCH 244/273] Adjust changelog --- pki-servlet-container.spec | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index f42105b..24cf81b 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -534,8 +534,5 @@ fi %{_mavenpomdir}/JPP-tomcat-servlet-api.pom %changelog -* Fri Jun 08 2018 Coty Sutherland 9.0.7-1 -- new package built with tito - -* Thu Jun 07 2018 Coty Sutherland - 1:9.0.7-1 -- Create single RPM for FreeIPA to use +* Thu Jun 07 2018 Coty Sutherland - 1:9.0.7-10 +- Create packages for FreeIPA that wrap the JWS distribution of Tomcat From 9f705506e80a81a6ffc269658688cd16e3e16f42 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 14:27:19 -0400 Subject: [PATCH 245/273] Removing dist-source since it's not used in the JWS build --- pki-servlet-container.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 24cf81b..be80869 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -205,7 +205,7 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dversion.build="%{micro_version}" \ -Djava.7.home=%{java_home} \ -Dexecute.validate=false \ - deploy dist-prepare dist-source + deploy dist-prepare # remove some jars that we'll replace with symlinks later %{__rm} output/build/bin/commons-daemon.jar output/build/lib/ecj.jar From dd764c18d3915d3f6ecc5ae74a4e02ad0456a712 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 14:56:58 -0400 Subject: [PATCH 246/273] Revert "Removing dist-source since it's not used in the JWS build" This reverts commit 322c052855ac896914b539360461b5aa68216d44. --- pki-servlet-container.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index be80869..24cf81b 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -205,7 +205,7 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dversion.build="%{micro_version}" \ -Djava.7.home=%{java_home} \ -Dexecute.validate=false \ - deploy dist-prepare + deploy dist-prepare dist-source # remove some jars that we'll replace with symlinks later %{__rm} output/build/bin/commons-daemon.jar output/build/lib/ecj.jar From 89d10be6433279a6a9b27491275b489a27a5f86c Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 14:59:25 -0400 Subject: [PATCH 247/273] Remove unused dependency on commons-daemon --- pki-servlet-container.spec | 4 +--- tomcat-9.0-digest.script | 2 +- tomcat-9.0-tool-wrapper.script | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 24cf81b..6cba1f0 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -95,7 +95,6 @@ BuildRequires: ant BuildRequires: ecj >= 1:4.6.3 BuildRequires: findutils BuildRequires: apache-commons-collections -BuildRequires: apache-commons-daemon BuildRequires: apache-commons-dbcp BuildRequires: apache-commons-pool BuildRequires: java-devel >= 1:1.8.0 @@ -110,7 +109,6 @@ BuildRequires: geronimo-jaxrpc BuildRequires: wsdl4j BuildRequires: systemd-units -Requires: apache-commons-daemon Requires: apache-commons-collections Requires: apache-commons-dbcp Requires: apache-commons-pool @@ -191,7 +189,7 @@ export OPT_JAR_LIST="xalan-j2-serializer" %{ant} -Dbase.path="." \ -Dbuild.compiler="modern" \ -Dcommons-collections.jar="$(build-classpath apache-commons-collections)" \ - -Dcommons-daemon.jar="$(build-classpath apache-commons-daemon)" \ + -Dcommons-daemon.jar="HACK" \ -Dcommons-daemon.native.src.tgz="HACK" \ -Djdt.jar="$(build-classpath ecj)" \ -Dtomcat-native.tar.gz="HACK" \ diff --git a/tomcat-9.0-digest.script b/tomcat-9.0-digest.script index ce4aa0f..731d4cf 100644 --- a/tomcat-9.0-digest.script +++ b/tomcat-9.0-digest.script @@ -34,7 +34,7 @@ export CLASSPATH MAIN_CLASS="org.apache.catalina.startup.Tool" BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\"" BASE_OPTIONS="" -BASE_JARS="commons-daemon tomcat/catalina servlet tomcat/tomcat-util tomcat/tomcat-coyote tomcat/tomcat-api tomcat/tomcat-util-scan" +BASE_JARS="tomcat/catalina servlet tomcat/tomcat-util tomcat/tomcat-coyote tomcat/tomcat-api tomcat/tomcat-util-scan" # Set parameters set_classpath $BASE_JARS diff --git a/tomcat-9.0-tool-wrapper.script b/tomcat-9.0-tool-wrapper.script index 949d46d..40e39ff 100644 --- a/tomcat-9.0-tool-wrapper.script +++ b/tomcat-9.0-tool-wrapper.script @@ -34,7 +34,7 @@ export CLASSPATH MAIN_CLASS="org.apache.catalina.startup.Tool" BASE_OPTIONS="" BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\"" -BASE_JARS="commons-daemon tomcat/catalina servlet tomcat/tomcat-util tomcat/tomcat-coyote tomcat/tomcat-api tomcat/tomcat-util-scan" +BASE_JARS="tomcat/catalina servlet tomcat/tomcat-util tomcat/tomcat-coyote tomcat/tomcat-api tomcat/tomcat-util-scan" # Set parameters set_classpath $BASE_JARS From 893b4ac8eb200cf0ca96a749034ccdc2134cb9e8 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 15:11:27 -0400 Subject: [PATCH 248/273] Remove webservices dependencies that were unused (not packaged, ever) --- pki-servlet-container.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 6cba1f0..72300df 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -105,8 +105,6 @@ BuildRequires: jpackage-utils >= 0:1.7.0 BuildRequires: javapackages-local %endif BuildRequires: junit -BuildRequires: geronimo-jaxrpc -BuildRequires: wsdl4j BuildRequires: systemd-units Requires: apache-commons-collections @@ -196,8 +194,6 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dtomcat-native.home="." \ -Dcommons-daemon.native.win.mgr.exe="HACK" \ -Dnsis.exe="HACK" \ - -Djaxrpc-lib.jar="$(build-classpath jaxrpc)" \ - -Dwsdl4j-lib.jar="$(build-classpath wsdl4j)" \ -Dno.build.dbcp=true \ -Dversion="%{version}" \ -Dversion.build="%{micro_version}" \ From 6ab4e17bba4b291e8128ce2e05a3fa26883801e1 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 15:12:15 -0400 Subject: [PATCH 249/273] Remove unused system property --- pki-servlet-container.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 72300df..33501c7 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -197,7 +197,6 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dno.build.dbcp=true \ -Dversion="%{version}" \ -Dversion.build="%{micro_version}" \ - -Djava.7.home=%{java_home} \ -Dexecute.validate=false \ deploy dist-prepare dist-source From ee01c70a06463e1df36702a5125cef9152d8ecbc Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 15:18:30 -0400 Subject: [PATCH 250/273] execute.validate is false by default --- pki-servlet-container.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 33501c7..8570b59 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -197,7 +197,6 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dno.build.dbcp=true \ -Dversion="%{version}" \ -Dversion.build="%{micro_version}" \ - -Dexecute.validate=false \ deploy dist-prepare dist-source # remove some jars that we'll replace with symlinks later From abbb601b2f3d3edd314159418cfc3d3e482cea73 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 15:24:03 -0400 Subject: [PATCH 251/273] The no.build.dbcp property went away in Tomcat 8 --- pki-servlet-container.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 8570b59..ef198f1 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -194,7 +194,6 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dtomcat-native.home="." \ -Dcommons-daemon.native.win.mgr.exe="HACK" \ -Dnsis.exe="HACK" \ - -Dno.build.dbcp=true \ -Dversion="%{version}" \ -Dversion.build="%{micro_version}" \ deploy dist-prepare dist-source From a860d30ae53502d9332f7c454404f435484b099b Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 15:31:11 -0400 Subject: [PATCH 252/273] Remove all of the unused apache-commons-* depedencies Remove junit dependency (not sure why that was there) Remove systemd-units BuildRequires --- pki-servlet-container.spec | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index ef198f1..ef27220 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -94,9 +94,6 @@ BuildArch: noarch BuildRequires: ant BuildRequires: ecj >= 1:4.6.3 BuildRequires: findutils -BuildRequires: apache-commons-collections -BuildRequires: apache-commons-dbcp -BuildRequires: apache-commons-pool BuildRequires: java-devel >= 1:1.8.0 BuildRequires: jpackage-utils >= 0:1.7.0 %if 0%{?fedora} >= 27 || 0%{?rhel} > 7 @@ -104,12 +101,7 @@ BuildRequires: jpackage-utils >= 0:1.7.0 # See https://fedora-java.github.io/howto/latest/#_add_maven_depmap_macro BuildRequires: javapackages-local %endif -BuildRequires: junit -BuildRequires: systemd-units -Requires: apache-commons-collections -Requires: apache-commons-dbcp -Requires: apache-commons-pool Requires: java-headless >= 1:1.8.0 Requires: jpackage-utils Requires: procps @@ -178,15 +170,12 @@ find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name " %build export OPT_JAR_LIST="xalan-j2-serializer" - # we don't care about the tarballs and we're going to replace - # tomcat-dbcp.jar with apache-commons-{collections,dbcp,pool}-tomcat5.jar - # so just create a dummy file for later removal + # Create a dummy file for later removal touch HACK # who needs a build.properties file anyway %{ant} -Dbase.path="." \ -Dbuild.compiler="modern" \ - -Dcommons-collections.jar="$(build-classpath apache-commons-collections)" \ -Dcommons-daemon.jar="HACK" \ -Dcommons-daemon.native.src.tgz="HACK" \ -Djdt.jar="$(build-classpath ecj)" \ @@ -303,8 +292,7 @@ pushd ${RPM_BUILD_ROOT}%{_javadir} popd pushd output/build - %{_bindir}/build-jar-repository lib apache-commons-collections \ - apache-commons-dbcp apache-commons-pool ecj 2>&1 + %{_bindir}/build-jar-repository lib ecj 2>&1 popd pushd ${RPM_BUILD_ROOT}%{libdir} @@ -312,9 +300,6 @@ pushd ${RPM_BUILD_ROOT}%{libdir} %{__ln_s} ../../java/tomcat-jsp-%{jspspec}-api.jar . %{__ln_s} ../../java/tomcat-servlet-%{servletspec}-api.jar . %{__ln_s} ../../java/tomcat-el-%{elspec}-api.jar . - %{__ln_s} $(build-classpath apache-commons-collections) commons-collections.jar - %{__ln_s} $(build-classpath apache-commons-dbcp) commons-dbcp.jar - %{__ln_s} $(build-classpath apache-commons-pool) commons-pool.jar %{__ln_s} $(build-classpath ecj) jasper-jdt.jar # Temporary copy the juli jar here from /usr/share/java/tomcat (for maven depmap) From f532ac54d0359c0157535407d7d84fe76bc29953 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 15:48:54 -0400 Subject: [PATCH 253/273] ECJ seems to be going away and the FreeIPA folks say they don't need it, so removing it here --- pki-servlet-container.spec | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index ef27220..26d3053 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -92,7 +92,6 @@ Patch3: disableJavadocFailOnWarning.patch BuildArch: noarch BuildRequires: ant -BuildRequires: ecj >= 1:4.6.3 BuildRequires: findutils BuildRequires: java-devel >= 1:1.8.0 BuildRequires: jpackage-utils >= 0:1.7.0 @@ -124,7 +123,6 @@ Provides: jsp = %{jspspec} Obsoletes: tomcat-jsp-2.2-api #%%package lib -Requires: ecj >= 1:4.6.3 Requires(preun): coreutils #%%package el-%%{elspec}-api @@ -168,6 +166,9 @@ find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name " %patch2 -p0 #%%patch3 -p0 +# Since we don't support ECJ in RHEL anymore, remove the class that requires it +%{__rm} -f java/org/apache/jasper/compiler/JDTCompiler.java + %build export OPT_JAR_LIST="xalan-j2-serializer" # Create a dummy file for later removal @@ -178,7 +179,7 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dbuild.compiler="modern" \ -Dcommons-daemon.jar="HACK" \ -Dcommons-daemon.native.src.tgz="HACK" \ - -Djdt.jar="$(build-classpath ecj)" \ + -Djdt.jar="HACK" \ -Dtomcat-native.tar.gz="HACK" \ -Dtomcat-native.home="." \ -Dcommons-daemon.native.win.mgr.exe="HACK" \ @@ -187,8 +188,8 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dversion.build="%{micro_version}" \ deploy dist-prepare dist-source - # remove some jars that we'll replace with symlinks later - %{__rm} output/build/bin/commons-daemon.jar output/build/lib/ecj.jar + # remove some jars that we don't need + %{__rm} output/build/bin/commons-daemon.jar # inject OSGi manifests mkdir -p META-INF @@ -291,16 +292,11 @@ pushd ${RPM_BUILD_ROOT}%{_javadir} %{__ln_s} tomcat-el-%{elspec}-api.jar tomcat-el-api.jar popd -pushd output/build - %{_bindir}/build-jar-repository lib ecj 2>&1 -popd - pushd ${RPM_BUILD_ROOT}%{libdir} # symlink JSP and servlet API jars %{__ln_s} ../../java/tomcat-jsp-%{jspspec}-api.jar . %{__ln_s} ../../java/tomcat-servlet-%{servletspec}-api.jar . %{__ln_s} ../../java/tomcat-el-%{elspec}-api.jar . - %{__ln_s} $(build-classpath ecj) jasper-jdt.jar # Temporary copy the juli jar here from /usr/share/java/tomcat (for maven depmap) %{__cp} -a ${RPM_BUILD_ROOT}%{bindir}/tomcat-juli.jar ./ From acff1bd33d625430fe409f0a9120ee64ce3e93d4 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 15:59:47 -0400 Subject: [PATCH 254/273] Minor formatting adjustment --- pki-servlet-container.spec | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 26d3053..fa2fcef 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -171,25 +171,26 @@ find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name " %build export OPT_JAR_LIST="xalan-j2-serializer" - # Create a dummy file for later removal - touch HACK - # who needs a build.properties file anyway - %{ant} -Dbase.path="." \ - -Dbuild.compiler="modern" \ - -Dcommons-daemon.jar="HACK" \ - -Dcommons-daemon.native.src.tgz="HACK" \ - -Djdt.jar="HACK" \ - -Dtomcat-native.tar.gz="HACK" \ - -Dtomcat-native.home="." \ - -Dcommons-daemon.native.win.mgr.exe="HACK" \ - -Dnsis.exe="HACK" \ - -Dversion="%{version}" \ - -Dversion.build="%{micro_version}" \ - deploy dist-prepare dist-source +# Create a dummy file for later removal +touch HACK - # remove some jars that we don't need - %{__rm} output/build/bin/commons-daemon.jar +# who needs a build.properties file anyway +%{ant} -Dbase.path="." \ + -Dbuild.compiler="modern" \ + -Dcommons-daemon.jar="HACK" \ + -Dcommons-daemon.native.src.tgz="HACK" \ + -Djdt.jar="HACK" \ + -Dtomcat-native.tar.gz="HACK" \ + -Dtomcat-native.home="." \ + -Dcommons-daemon.native.win.mgr.exe="HACK" \ + -Dnsis.exe="HACK" \ + -Dversion="%{version}" \ + -Dversion.build="%{micro_version}" \ + deploy dist-prepare dist-source + +# remove some jars that we don't need +%{__rm} output/build/bin/commons-daemon.jar # inject OSGi manifests mkdir -p META-INF From 9bff3c840d424bbbd22b6c060ac2c3dfafd9d599 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Wed, 13 Jun 2018 14:02:14 -0400 Subject: [PATCH 255/273] Remove JSVC support from tomcat-functions for this tomcat package --- tomcat-functions | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/tomcat-functions b/tomcat-functions index ab08fa2..ac7f00d 100644 --- a/tomcat-functions +++ b/tomcat-functions @@ -13,28 +13,12 @@ _save_function() { eval "$NEWNAME_FUNC" } -run_jsvc(){ - if [ -x /usr/bin/jsvc ]; then - TOMCAT_USER="${TOMCAT_USER:-tomcat}" - JSVC="/usr/bin/jsvc" - - JSVC_OPTS="-nodetach -pidfile /var/run/jsvc-tomcat${NAME}.pid -user ${TOMCAT_USER} -outfile ${CATALINA_BASE}/logs/catalina.out -errfile ${CATALINA_BASE}/logs/catalina.out" - if [ "$1" = "stop" ]; then - JSVC_OPTS="${JSVC_OPTS} -stop" - fi - - exec "${JSVC}" ${JSVC_OPTS} ${FLAGS} -classpath "${CLASSPATH}" ${OPTIONS} "${MAIN_CLASS}" "${@}" - else - echo "Can't find /usr/bin/jsvc executable" - fi - -} - _save_function run run_java run() { if [ "${USE_JSVC}" = "true" ] ; then - run_jsvc $@ + echo "JSVC support is not available with this Tomcat package." + exit 1 else run_java $@ fi From 49c6f4d60854b5703298ad01f59fff31de241375 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Wed, 13 Jun 2018 14:20:45 -0400 Subject: [PATCH 256/273] Sync all RPM wrapper scripts with JWS Tomcat --- tomcat-9.0-catalina-policy.patch | 27 ++++-------------- tomcat-9.0-digest.script | 16 +++++++---- tomcat-9.0-tool-wrapper.script | 16 +++++++---- tomcat-9.0.conf | 47 +++++++++++++++++++------------- tomcat-9.0.service | 3 +- tomcat-9.0.sysconfig | 4 +-- tomcat-named.service | 2 +- tomcat-preamble | 1 - 8 files changed, 58 insertions(+), 58 deletions(-) diff --git a/tomcat-9.0-catalina-policy.patch b/tomcat-9.0-catalina-policy.patch index 3694929..f3a5007 100644 --- a/tomcat-9.0-catalina-policy.patch +++ b/tomcat-9.0-catalina-policy.patch @@ -1,6 +1,6 @@ ---- conf/catalina.policy~ 2016-06-17 10:20:17.649171968 -0400 -+++ conf/catalina.policy 2016-06-17 10:23:35.358309244 -0400 -@@ -50,6 +50,36 @@ grant codeBase "file:${java.home}/lib/ex +--- conf/catalina.policy.orig 2018-03-16 12:18:17.835746805 -0400 ++++ conf/catalina.policy 2018-06-13 13:52:33.586872659 -0400 +@@ -50,6 +50,21 @@ grant codeBase "file:${java.home}/lib/ex permission java.security.AllPermission; }; @@ -9,28 +9,13 @@ +// Allowing everything in /usr/share/java allows too many unknowns to be permitted +// Specifying the individual jars that tomcat needs to function with the security manager +// is the safest way forward. -+grant codeBase "file:/usr/share/java/tomcat-servlet-3.0-api.jar" { ++grant codeBase "file:/usr/share/java/tomcat-servlet-4.0-api.jar" { + permission java.security.AllPermission; +}; -+grant codeBase "file:/usr/share/java/tomcat-jsp-2.2-api.jar" { ++grant codeBase "file:/usr/share/java/tomcat-jsp-2.3-api.jar" { + permission java.security.AllPermission; +}; -+grant codeBase "file:/usr/share/java/tomcat-el-2.2-api.jar" { -+ permission java.security.AllPermission; -+}; -+grant codeBase "file:/usr/share/java/log4j.jar" { -+ permission java.security.AllPermission; -+}; -+grant codeBase "file:/usr/share/java/ecj.jar" { -+ permission java.security.AllPermission; -+}; -+grant codeBase "file:/usr/share/java/apache-commons-pool.jar" { -+ permission java.security.AllPermission; -+}; -+grant codeBase "file:/usr/share/java/apache-commons-dbcp.jar" { -+ permission java.security.AllPermission; -+}; -+grant codeBase "file:/usr/share/java/apache-commons-collections.jar" { ++grant codeBase "file:/usr/share/java/tomcat-el-3.0-api.jar" { + permission java.security.AllPermission; +}; + diff --git a/tomcat-9.0-digest.script b/tomcat-9.0-digest.script index 731d4cf..d2b626c 100644 --- a/tomcat-9.0-digest.script +++ b/tomcat-9.0-digest.script @@ -22,22 +22,26 @@ 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}:${CATALINA_HOME}/lib/tomcat-api.jar" +CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/tomcat-util.jar" +CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/tomcat-util-scan.jar" +CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/tomcat-coyote.jar" +CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/catalina.jar" +CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/servlet-api.jar" export CLASSPATH # Configuration MAIN_CLASS="org.apache.catalina.startup.Tool" BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\"" BASE_OPTIONS="" -BASE_JARS="tomcat/catalina servlet tomcat/tomcat-util tomcat/tomcat-coyote tomcat/tomcat-api tomcat/tomcat-util-scan" +#BASE_JARS="tomcat/tomcat-util tomcat/tomcat-util-scan" +#BASE_JARS="${BASE_JARS} tomcat/tomcat-coyote tomcat/catalina" +#BASE_JARS="${BASE_JARS} tomcat/servlet-api" # Set parameters -set_classpath $BASE_JARS +#set_classpath $BASE_JARS set_flags $BASE_FLAGS set_options $BASE_OPTIONS diff --git a/tomcat-9.0-tool-wrapper.script b/tomcat-9.0-tool-wrapper.script index 40e39ff..e427dbc 100644 --- a/tomcat-9.0-tool-wrapper.script +++ b/tomcat-9.0-tool-wrapper.script @@ -22,22 +22,26 @@ 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}:${CATALINA_HOME}/lib/tomcat-api.jar" +CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/tomcat-util.jar" +CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/tomcat-util-scan.jar" +CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/tomcat-coyote.jar" +CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/catalina.jar" +CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/servlet-api.jar" export CLASSPATH # Configuration MAIN_CLASS="org.apache.catalina.startup.Tool" BASE_OPTIONS="" BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\"" -BASE_JARS="tomcat/catalina servlet tomcat/tomcat-util tomcat/tomcat-coyote tomcat/tomcat-api tomcat/tomcat-util-scan" +#BASE_JARS="tomcat/tomcat-util tomcat/tomcat-util-scan" +#BASE_JARS="${BASE_JARS} tomcat/tomcat-coyote tomcat/catalina" +#BASE_JARS="${BASE_JARS} tomcat/servlet-api" # Set parameters -set_classpath $BASE_JARS +#set_classpath $BASE_JARS set_flags $BASE_FLAGS set_options $BASE_OPTIONS diff --git a/tomcat-9.0.conf b/tomcat-9.0.conf index 3f43006..d680192 100644 --- a/tomcat-9.0.conf +++ b/tomcat-9.0.conf @@ -1,7 +1,6 @@ -# System-wide configuration file for tomcat services # This will be loaded by systemd as an environment file, # so please keep the syntax. For shell expansion support -# place your custom files as /etc/tomcat/conf.d/*.conf +# place your custom files as /etc/tomcat/conf.d/*.conf. # # There are 2 "classes" of startup behavior in this package. # The old one, the default service named tomcat.service. @@ -15,37 +14,47 @@ # This variable is used to figure out if config is loaded or not. TOMCAT_CFG_LOADED="1" -# In new-style instances, if CATALINA_BASE isn't specified, it will -# be constructed by joining TOMCATS_BASE and NAME. -TOMCATS_BASE="/var/lib/tomcats/" - # Where your java installation lives -JAVA_HOME="/usr/lib/jvm/jre" +#JAVA_HOME="/usr/lib/jvm/java" # Where your tomcat installation lives +CATALINA_BASE="@@@TCHOME@@@" CATALINA_HOME="@@@TCHOME@@@" - -# System-wide tmp -CATALINA_TMPDIR="/var/cache/tomcat/temp" +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=/usr/lib" - -# Set default javax.sql.DataSource factory to apache commons one. See rhbz#1214381 -JAVA_OPTS="-Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory" - # 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 -# TODO(stingray): does nothing, fix. -# SHUTDOWN_WAIT="30" +# DEPRECATED VARIABLES +# +# TOMCAT_USER has been deprecated. To update the tomcat process owner, +# please see User in tomcat.service. +# +# TOMCAT_GROUP has been deprecated. To update the tomcat process group, +# please see Group in tomcat.service. +# +# SHUTDOWN_WAIT has been deprecated. To change the shutdown wait time, set +# TimeoutStopSec in tomcat.service. +# +# SHUTDOWN_VERBOSE has been deprecated. There is no replacement for this behavior. +# +# CATALINA_PID has been deprecated. A replacement for this behavior is to set +# PIDFile in tomcat.service. +# +# CONNECTOR_PORT has been deprecated. There is no replacement for this behavior. +# Set init script output file +# +# TOMCAT_LOG has been deprecated. Output from start/stop/status operations are +# logged to the system's journal. +# +# LOGGING_CONFIG has been deprecated. To update the logging properties in use, use: +# LOGGING_PROPERTIES="${CATALINA_HOME}/lib/log4j.properties" # If you wish to further customize your tomcat environment, # put your own definitions here diff --git a/tomcat-9.0.service b/tomcat-9.0.service index 2b20aa0..bf90428 100644 --- a/tomcat-9.0.service +++ b/tomcat-9.0.service @@ -15,8 +15,7 @@ EnvironmentFile=-/etc/sysconfig/tomcat ExecStart=/usr/libexec/tomcat/server start SuccessExitStatus=143 User=tomcat -Group=tomcat - +UMask=027 [Install] WantedBy=multi-user.target diff --git a/tomcat-9.0.sysconfig b/tomcat-9.0.sysconfig index 3117bf7..39db94a 100644 --- a/tomcat-9.0.sysconfig +++ b/tomcat-9.0.sysconfig @@ -7,5 +7,5 @@ # CATALINA_HOME. For named service, it equals ${TOMCATS_BASE}${NAME} #CATALINA_BASE="@@@TCHOME@@@" -# Please take a look at /etc/tomcat/tomcat.conf to have an idea what you -# can override. +# Please take a look at /etc/tomcat/tomcat.conf to have an idea +# what you can override. diff --git a/tomcat-named.service b/tomcat-named.service index 9bbcb17..66cf45c 100644 --- a/tomcat-named.service +++ b/tomcat-named.service @@ -19,7 +19,7 @@ ExecStart=/usr/libexec/tomcat/server start ExecStop=/usr/libexec/tomcat/server stop SuccessExitStatus=143 User=tomcat -Group=tomcat +UMask=027 [Install] WantedBy=multi-user.target diff --git a/tomcat-preamble b/tomcat-preamble index 1271dca..c3c1183 100644 --- a/tomcat-preamble +++ b/tomcat-preamble @@ -42,7 +42,6 @@ if [ -n "$JSSE_HOME" ]; then 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)" if [ -z "$LOGGING_PROPERTIES" ] ; then LOGGING_PROPERTIES="${CATALINA_BASE}/conf/logging.properties" From b9eb7e5fef01bdae5fef88bff708399b45f02e5a Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Wed, 13 Jun 2018 14:25:50 -0400 Subject: [PATCH 257/273] Remove overrides for version so that this package matches JWS' version information --- pki-servlet-container.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index fa2fcef..0c39d1b 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -185,8 +185,6 @@ touch HACK -Dtomcat-native.home="." \ -Dcommons-daemon.native.win.mgr.exe="HACK" \ -Dnsis.exe="HACK" \ - -Dversion="%{version}" \ - -Dversion.build="%{micro_version}" \ deploy dist-prepare dist-source # remove some jars that we don't need From 4e7c1267c1e3500983ef5cb8ba58e4a2ef1eeb67 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 15 Jun 2018 14:16:40 -0400 Subject: [PATCH 258/273] Add ant and tools jars to the classpath to enable JSP compilation at runtime --- pki-servlet-container.spec | 2 ++ tomcat-preamble | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 0c39d1b..bb8ee5d 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -101,7 +101,9 @@ BuildRequires: jpackage-utils >= 0:1.7.0 BuildRequires: javapackages-local %endif +Requires: ant Requires: java-headless >= 1:1.8.0 +Requires: java-devel >= 1:1.8.0 Requires: jpackage-utils Requires: procps Requires(pre): shadow-utils diff --git a/tomcat-preamble b/tomcat-preamble index c3c1183..07d28a3 100644 --- a/tomcat-preamble +++ b/tomcat-preamble @@ -43,6 +43,11 @@ fi CLASSPATH="${CLASSPATH}${CATALINA_HOME}/bin/bootstrap.jar" CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/tomcat-juli.jar" +# Since ECJ is no longer available, add ant, ant-launcher, and tools jars to the +# classpath so that runtime compilation of JSPs still works. +CLASSPATH="${CLASSPATH}:/usr/share/java/ant.jar:/usr/share/java/ant-launcher.jar" +CLASSPATH="${CLASSPATH}:/usr/lib/jvm/java/lib/tools.jar" + if [ -z "$LOGGING_PROPERTIES" ] ; then LOGGING_PROPERTIES="${CATALINA_BASE}/conf/logging.properties" if [ ! -f "${LOGGING_PROPERTIES}" ] ; then From e14029400aaaa04b88041d946101eb90bec1d757 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 15 Jun 2018 14:21:55 -0400 Subject: [PATCH 259/273] Remove zip from sources repo and add to brew --- .gitignore | 2 +- sources | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index fd61fdd..0853083 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ apache-tomcat-*-src.tar.gz - +/tomcat-9.0.7.redhat-10-src.zip diff --git a/sources b/sources index 8a82736..b5348c8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (tomcat-9.0.7.redhat-10-src.zip) = 0eee2cccfd08704350095b1fdd1472d2f85b81e6b8d8bf3a3f4e5005fe3bb18503438c2a5499af0dc21ab4e1d0636c2ee276aae52af823881ed0f444fb65fc81 +32bca41cb6e6a99498966ac885e4922e tomcat-9.0.7.redhat-10-src.zip From a3b507165e125d92c8b523aa1096a11d47ce85b7 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 15 Jun 2018 14:27:30 -0400 Subject: [PATCH 260/273] Remove tito things that were needed to build in copr --- .tito/packages/.readme | 3 --- .tito/packages/tomcat | 1 - .tito/tito.props | 5 ----- 3 files changed, 9 deletions(-) delete mode 100644 .tito/packages/.readme delete mode 100644 .tito/packages/tomcat delete mode 100644 .tito/tito.props diff --git a/.tito/packages/.readme b/.tito/packages/.readme deleted file mode 100644 index b9411e2..0000000 --- a/.tito/packages/.readme +++ /dev/null @@ -1,3 +0,0 @@ -the .tito/packages directory contains metadata files -named after their packages. Each file has the latest tagged -version and the project's relative directory. diff --git a/.tito/packages/tomcat b/.tito/packages/tomcat deleted file mode 100644 index c814425..0000000 --- a/.tito/packages/tomcat +++ /dev/null @@ -1 +0,0 @@ -9.0.7-1 ./ diff --git a/.tito/tito.props b/.tito/tito.props deleted file mode 100644 index 70eda22..0000000 --- a/.tito/tito.props +++ /dev/null @@ -1,5 +0,0 @@ -[buildconfig] -builder = tito.builder.NoTgzBuilder -tagger = tito.tagger.VersionTagger -changelog_do_not_remove_cherrypick = 0 -changelog_format = %s (%ae) From d2b161f3116e1afa1179c4d24c1203b1ae15fb26 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Thu, 21 Jun 2018 13:32:46 -0400 Subject: [PATCH 261/273] Remove unused patch files --- add_parent_logger_getter.patch | 29 ------------------- disableJavadocFailOnWarning.patch | 47 ------------------------------- 2 files changed, 76 deletions(-) delete mode 100644 add_parent_logger_getter.patch delete mode 100644 disableJavadocFailOnWarning.patch diff --git a/add_parent_logger_getter.patch b/add_parent_logger_getter.patch deleted file mode 100644 index 40b9268..0000000 --- a/add_parent_logger_getter.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java.sav 2012-01-17 13:55:44.000000000 +0400 -+++ modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java 2012-01-22 00:44:22.299789107 +0400 -@@ -19,9 +19,11 @@ package org.apache.tomcat.jdbc.pool; - import java.io.PrintWriter; - import java.sql.Connection; - import java.sql.SQLException; -+import java.sql.SQLFeatureNotSupportedException; - import java.util.Iterator; - import java.util.Properties; - import java.util.concurrent.Future; -+import java.util.logging.Logger; - - import javax.sql.XAConnection; - -@@ -534,6 +536,14 @@ public class DataSourceProxy implements - } - - /** -+ * no-op -+ * {@link javax.sql.DataSource#getParentLogger} -+ */ -+ public Logger getParentLogger() throws SQLFeatureNotSupportedException { -+ throw new SQLFeatureNotSupportedException(); -+ } -+ -+ /** - * no-op - * {@link javax.sql.DataSource#getLogWriter} - */ diff --git a/disableJavadocFailOnWarning.patch b/disableJavadocFailOnWarning.patch deleted file mode 100644 index 03d03c5..0000000 --- a/disableJavadocFailOnWarning.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- build.xml.orig 2018-03-15 13:49:03.366863009 -0400 -+++ build.xml 2018-03-15 13:49:29.690870139 -0400 -@@ -1777,7 +1777,7 @@ Apache Tomcat ${version} native binaries - additionalparam="-breakiterator -notimestamp" - maxmemory="512m" - failonerror="true" -- failonwarning="true"> -+ failonwarning="false"> - - - -@@ -1798,7 +1798,7 @@ Apache Tomcat ${version} native binaries - additionalparam="-breakiterator -notimestamp" - maxmemory="512m" - failonerror="true" -- failonwarning="true"> -+ failonwarning="false"> - - - -@@ -1819,7 +1819,7 @@ Apache Tomcat ${version} native binaries - additionalparam="-breakiterator -notimestamp" - maxmemory="512m" - failonerror="true" -- failonwarning="true"> -+ failonwarning="false"> - - - -@@ -1840,7 +1840,7 @@ Apache Tomcat ${version} native binaries - additionalparam="-breakiterator -notimestamp" - maxmemory="512m" - failonerror="true" -- failonwarning="true"> -+ failonwarning="false"> - - - -@@ -1860,7 +1860,7 @@ Apache Tomcat ${version} native binaries - additionalparam="-breakiterator -notimestamp ${java9.add.modules}" - maxmemory="512m" - failonerror="true" -- failonwarning="true"> -+ failonwarning="false"> - - - From 2c35e20b2fbe8edcda2dc77d2d10b7f6d0c9beb7 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Thu, 21 Jun 2018 13:33:12 -0400 Subject: [PATCH 262/273] Add newly required ant, ant-launcher, and tools jars to the catalina.policy so that tomcat can access them when running under the SecurityManager --- pki-servlet-container.spec | 4 ++-- tomcat-9.0-catalina-policy.patch | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index bb8ee5d..3fd202d 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -87,7 +87,7 @@ Source32: tomcat-named.service Patch0: tomcat-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch Patch1: tomcat-%{major_version}.%{minor_version}-tomcat-users-webapp.patch Patch2: tomcat-8.0.36-CompilerOptionsV9.patch -Patch3: disableJavadocFailOnWarning.patch +Patch3: tomcat-%{major_version}.%{minor_version}-catalina-policy.patch BuildArch: noarch @@ -166,7 +166,7 @@ find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name " %patch0 -p0 %patch1 -p0 %patch2 -p0 -#%%patch3 -p0 +%patch3 -p0 # Since we don't support ECJ in RHEL anymore, remove the class that requires it %{__rm} -f java/org/apache/jasper/compiler/JDTCompiler.java diff --git a/tomcat-9.0-catalina-policy.patch b/tomcat-9.0-catalina-policy.patch index f3a5007..c8c5c08 100644 --- a/tomcat-9.0-catalina-policy.patch +++ b/tomcat-9.0-catalina-policy.patch @@ -1,6 +1,6 @@ ---- conf/catalina.policy.orig 2018-03-16 12:18:17.835746805 -0400 -+++ conf/catalina.policy 2018-06-13 13:52:33.586872659 -0400 -@@ -50,6 +50,21 @@ grant codeBase "file:${java.home}/lib/ex +--- conf/catalina.policy.orig 2018-06-21 13:30:04.074492012 -0400 ++++ conf/catalina.policy 2018-06-21 13:30:02.111479809 -0400 +@@ -50,6 +50,30 @@ grant codeBase "file:${java.home}/lib/ex permission java.security.AllPermission; }; @@ -18,6 +18,15 @@ +grant codeBase "file:/usr/share/java/tomcat-el-3.0-api.jar" { + permission java.security.AllPermission; +}; ++grant codeBase "file:/usr/share/java/ant.jar" { ++ permission java.security.AllPermission; ++}; ++grant codeBase "file:/usr/share/java/ant-launcher.jar" { ++ permission java.security.AllPermission; ++}; ++grant codeBase "file:/usr/lib/jvm/java/lib/tools.jar" { ++ permission java.security.AllPermission; ++}; + // ========== CATALINA CODE PERMISSIONS ======================================= From a26a9bba8bcaad759604c7ce3acaba55ce0a2cad Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 22 Jun 2018 08:38:23 -0400 Subject: [PATCH 263/273] Related: rhbz#1594139 Remove unused OSGi information --- el-api-OSGi-MANIFEST.MF | 13 ------------ jasper-OSGi-MANIFEST.MF | 40 ------------------------------------ jasper-el-OSGi-MANIFEST.MF | 13 ------------ jsp-api-OSGi-MANIFEST.MF | 13 ------------ pki-servlet-container.spec | 31 ---------------------------- servlet-api-OSGi-MANIFEST.MF | 17 --------------- tomcat-api-OSGi-MANIFEST.MF | 12 ----------- tomcat-juli-OSGi-MANIFEST.MF | 13 ------------ 8 files changed, 152 deletions(-) delete mode 100644 el-api-OSGi-MANIFEST.MF delete mode 100644 jasper-OSGi-MANIFEST.MF delete mode 100644 jasper-el-OSGi-MANIFEST.MF delete mode 100644 jsp-api-OSGi-MANIFEST.MF delete mode 100644 servlet-api-OSGi-MANIFEST.MF delete mode 100644 tomcat-api-OSGi-MANIFEST.MF delete mode 100644 tomcat-juli-OSGi-MANIFEST.MF diff --git a/el-api-OSGi-MANIFEST.MF b/el-api-OSGi-MANIFEST.MF deleted file mode 100644 index 69b797f..0000000 --- a/el-api-OSGi-MANIFEST.MF +++ /dev/null @@ -1,13 +0,0 @@ -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 - diff --git a/jasper-OSGi-MANIFEST.MF b/jasper-OSGi-MANIFEST.MF deleted file mode 100644 index ad34978..0000000 --- a/jasper-OSGi-MANIFEST.MF +++ /dev/null @@ -1,40 +0,0 @@ -Manifest-Version: 1.0 -Export-Package: org.apache.jasper;version="8.0.26",org.apache.jasper.c - ompiler;version="8.0.26",org.apache.jasper.compiler.tagplugin;version - ="8.0.26",org.apache.jasper.resources;version="8.0.26",org.apache.jas - per.runtime;version="8.0.26",org.apache.jasper.security;version="7.0. - 19",org.apache.jasper.servlet;version="8.0.26",org.apache.jasper.tagp - lugins.jstl;version="8.0.26",org.apache.jasper.tagplugins.jstl.core;v - ersion="8.0.26",org.apache.jasper.util;version="8.0.26",org.apache.ja - sper.xmlparser;version="8.0.26" -Bundle-Vendor: %bundleProvider -Bundle-ClassPath: . -Bundle-Version: 8.0.26 -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="8.0.26",org.apache.juli.loggin - g;version="8.0.26",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 - diff --git a/jasper-el-OSGi-MANIFEST.MF b/jasper-el-OSGi-MANIFEST.MF deleted file mode 100644 index 14e4282..0000000 --- a/jasper-el-OSGi-MANIFEST.MF +++ /dev/null @@ -1,13 +0,0 @@ -Manifest-Version: 1.0 -Export-Package: org.apache.el;version="7.0.21" -Bundle-Vendor: %bundleProvider -Bundle-ClassPath: . -Bundle-Version: 8.0.26 -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 - diff --git a/jsp-api-OSGi-MANIFEST.MF b/jsp-api-OSGi-MANIFEST.MF deleted file mode 100644 index 62bc00d..0000000 --- a/jsp-api-OSGi-MANIFEST.MF +++ /dev/null @@ -1,13 +0,0 @@ -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" diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 3fd202d..6f7696b 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -72,13 +72,6 @@ Source4: tomcat-%{major_version}.%{minor_version}.wrapper Source6: tomcat-%{major_version}.%{minor_version}-digest.script Source7: tomcat-%{major_version}.%{minor_version}-tool-wrapper.script Source8: tomcat-%{major_version}.%{minor_version}.service -Source9: servlet-api-OSGi-MANIFEST.MF -Source11: jsp-api-OSGi-MANIFEST.MF -Source12: el-api-OSGi-MANIFEST.MF -Source13: jasper-el-OSGi-MANIFEST.MF -Source14: jasper-OSGi-MANIFEST.MF -Source15: tomcat-api-OSGi-MANIFEST.MF -Source16: tomcat-juli-OSGi-MANIFEST.MF Source21: tomcat-functions Source30: tomcat-preamble Source31: tomcat-server @@ -192,30 +185,6 @@ touch HACK # remove some jars that we don't need %{__rm} output/build/bin/commons-daemon.jar -# inject OSGi manifests -mkdir -p META-INF -cp -p %{SOURCE9} META-INF/MANIFEST.MF -touch META-INF/MANIFEST.MF -zip output/build/lib/servlet-api.jar META-INF/MANIFEST.MF -cp -p %{SOURCE11} META-INF/MANIFEST.MF -touch META-INF/MANIFEST.MF -zip output/build/lib/jsp-api.jar META-INF/MANIFEST.MF -cp -p %{SOURCE12} META-INF/MANIFEST.MF -touch META-INF/MANIFEST.MF -zip output/build/lib/el-api.jar META-INF/MANIFEST.MF -cp -p %{SOURCE13} META-INF/MANIFEST.MF -touch META-INF/MANIFEST.MF -zip output/build/lib/jasper-el.jar META-INF/MANIFEST.MF -cp -p %{SOURCE14} META-INF/MANIFEST.MF -touch META-INF/MANIFEST.MF -zip output/build/lib/jasper.jar META-INF/MANIFEST.MF -cp -p %{SOURCE15} META-INF/MANIFEST.MF -touch META-INF/MANIFEST.MF -zip output/build/lib/tomcat-api.jar META-INF/MANIFEST.MF -cp -p %{SOURCE16} META-INF/MANIFEST.MF -touch META-INF/MANIFEST.MF -zip output/build/bin/tomcat-juli.jar META-INF/MANIFEST.MF - %install # build initial path structure %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_bindir} diff --git a/servlet-api-OSGi-MANIFEST.MF b/servlet-api-OSGi-MANIFEST.MF deleted file mode 100644 index 3938935..0000000 --- a/servlet-api-OSGi-MANIFEST.MF +++ /dev/null @@ -1,17 +0,0 @@ -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" diff --git a/tomcat-api-OSGi-MANIFEST.MF b/tomcat-api-OSGi-MANIFEST.MF deleted file mode 100644 index 85b12b8..0000000 --- a/tomcat-api-OSGi-MANIFEST.MF +++ /dev/null @@ -1,12 +0,0 @@ -Manifest-Version: 1.0 -Export-Package: org.apache.tomcat;version="8.0.26" -Bundle-Vendor: %bundleProvider -Bundle-ClassPath: . -Bundle-Version: 8.0.26 -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 - diff --git a/tomcat-juli-OSGi-MANIFEST.MF b/tomcat-juli-OSGi-MANIFEST.MF deleted file mode 100644 index b856d9f..0000000 --- a/tomcat-juli-OSGi-MANIFEST.MF +++ /dev/null @@ -1,13 +0,0 @@ -Manifest-Version: 1.0 -Export-Package: org.apache.juli;version="8.0.26",org.apache.juli.loggi - ng;version="8.0.26" -Bundle-Vendor: %bundleProvider -Bundle-ClassPath: . -Bundle-Version: 8.0.26 -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 - From 10e8d18d0e86beeca4d59dd76934d6f6824b6fdf Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 22 Jun 2018 09:47:27 -0400 Subject: [PATCH 264/273] Related: rhbz#1594139 Remove unused maven artifacts --- pki-servlet-container.spec | 102 +------------------------------------ 1 file changed, 1 insertion(+), 101 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 6f7696b..b1cba46 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -88,11 +88,6 @@ BuildRequires: ant BuildRequires: findutils BuildRequires: java-devel >= 1:1.8.0 BuildRequires: jpackage-utils >= 0:1.7.0 -%if 0%{?fedora} >= 27 || 0%{?rhel} > 7 -# add_maven_depmap is deprecated, using javapackages-local for now -# See https://fedora-java.github.io/howto/latest/#_add_maven_depmap_macro -BuildRequires: javapackages-local -%endif Requires: ant Requires: java-headless >= 1:1.8.0 @@ -268,8 +263,7 @@ pushd ${RPM_BUILD_ROOT}%{libdir} %{__ln_s} ../../java/tomcat-servlet-%{servletspec}-api.jar . %{__ln_s} ../../java/tomcat-el-%{elspec}-api.jar . - # Temporary copy the juli jar here from /usr/share/java/tomcat (for maven depmap) - %{__cp} -a ${RPM_BUILD_ROOT}%{bindir}/tomcat-juli.jar ./ + %{__ln_s} ../../tomcat/bin/tomcat-juli.jar . popd # symlink to the FHS locations where we've installed things @@ -282,79 +276,6 @@ pushd ${RPM_BUILD_ROOT}%{homedir} %{__ln_s} %{workdir} work popd -# Install the maven metadata -%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_mavenpomdir} -pushd output/dist/src/res/maven -for pom in *.pom; do - # fix-up version in all pom files - sed -i 's/@MAVEN.DEPLOY.VERSION@/%{version}/g' $pom -done - -# we won't install dbcp, juli-adapters and juli-extras pom files -for libname in annotations-api catalina jasper-el jasper catalina-ha; do - %{__cp} -a tomcat-$libname.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-$libname.pom - %add_maven_depmap JPP.tomcat-$libname.pom tomcat/$libname.jar -done - -# tomcat-util-scan -%{__cp} -a tomcat-util-scan.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-util-scan.pom -%add_maven_depmap JPP.tomcat-util-scan.pom tomcat/tomcat-util-scan.jar - -# tomcat-jni -%{__cp} -a tomcat-jni.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-jni.pom -%add_maven_depmap JPP.tomcat-jni.pom tomcat/tomcat-jni.jar - -# servlet-api jsp-api and el-api are not in tomcat subdir, since they are widely re-used elsewhere -%{__cp} -a tomcat-jsp-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-jsp-api.pom -%add_maven_depmap JPP-tomcat-jsp-api.pom tomcat-jsp-api.jar -a "org.eclipse.jetty.orbit:javax.servlet.jsp" - -%{__cp} -a tomcat-el-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-el-api.pom -%add_maven_depmap JPP-tomcat-el-api.pom tomcat-el-api.jar -a "org.eclipse.jetty.orbit:javax.el" - -%{__cp} -a tomcat-servlet-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-servlet-api.pom -# Generate a depmap fragment javax.servlet:servlet-api pointing to -# tomcat-servlet-3.0-api for backwards compatibility -# also provide jetty depmap (originally in jetty package, but it's cleaner to have it here -%add_maven_depmap JPP-tomcat-servlet-api.pom tomcat-servlet-api.jar -f "tomcat-servlet-api" - -# replace temporary copy with link -%{__ln_s} -f $(abs2rel %{bindir}/tomcat-juli.jar %{libdir}) ${RPM_BUILD_ROOT}%{libdir}/ - -# two special pom where jar files have different names -%{__cp} -a tomcat-tribes.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-catalina-tribes.pom -%add_maven_depmap JPP.tomcat-catalina-tribes.pom tomcat/catalina-tribes.jar - -%{__cp} -a tomcat-coyote.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-coyote.pom -%add_maven_depmap JPP.tomcat-tomcat-coyote.pom tomcat/tomcat-coyote.jar - -%{__cp} -a tomcat-juli.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-juli.pom -%add_maven_depmap JPP.tomcat-tomcat-juli.pom tomcat/tomcat-juli.jar - -%{__cp} -a tomcat-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-api.pom -%add_maven_depmap JPP.tomcat-tomcat-api.pom tomcat/tomcat-api.jar - -%{__cp} -a tomcat-util.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-util.pom -%add_maven_depmap JPP.tomcat-tomcat-util.pom tomcat/tomcat-util.jar - -%{__cp} -a tomcat-jdbc.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-jdbc.pom -%add_maven_depmap JPP.tomcat-tomcat-jdbc.pom tomcat/tomcat-jdbc.jar - -# tomcat-websocket-api -%{__cp} -a tomcat-websocket-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-websocket-api.pom -%add_maven_depmap JPP.tomcat-websocket-api.pom tomcat/websocket-api.jar - -# tomcat-tomcat-websocket -%{__cp} -a tomcat-websocket.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-websocket.pom -%add_maven_depmap JPP.tomcat-tomcat-websocket.pom tomcat/tomcat-websocket.jar - -# tomcat-jaspic-api -%{__cp} -a tomcat-jaspic-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-jaspic-api.pom -%add_maven_depmap JPP.tomcat-jaspic-api.pom tomcat/jaspic-api.jar - -# Manually change the metadata filenames -%{__mv} ${RPM_BUILD_ROOT}%{_datadir}/maven-metadata/%{name}.xml ${RPM_BUILD_ROOT}%{_datadir}/maven-metadata/tomcat.xml -%{__mv} ${RPM_BUILD_ROOT}%{_datadir}/maven-metadata/%{name}-tomcat-servlet-api.xml ${RPM_BUILD_ROOT}%{_datadir}/maven-metadata/tomcat-servlet-api.xml - %pre # add the tomcat user and group %{_sbindir}/groupadd -g %{tcuid} -r tomcat 2>/dev/null || : @@ -447,33 +368,12 @@ fi %{libdir}/*.jar %{_javadir}/*.jar %{bindir}/tomcat-juli.jar -%{_mavenpomdir}/JPP.tomcat-annotations-api.pom -%{_mavenpomdir}/JPP.tomcat-catalina-ha.pom -%{_mavenpomdir}/JPP.tomcat-catalina-tribes.pom -%{_mavenpomdir}/JPP.tomcat-catalina.pom -%{_mavenpomdir}/JPP.tomcat-jasper-el.pom -%{_mavenpomdir}/JPP.tomcat-jasper.pom -%{_mavenpomdir}/JPP.tomcat-tomcat-api.pom -%{_mavenpomdir}/JPP.tomcat-tomcat-juli.pom -%{_mavenpomdir}/JPP.tomcat-tomcat-coyote.pom -%{_mavenpomdir}/JPP.tomcat-tomcat-util.pom -%{_mavenpomdir}/JPP.tomcat-tomcat-jdbc.pom -%{_mavenpomdir}/JPP.tomcat-websocket-api.pom -%{_mavenpomdir}/JPP.tomcat-tomcat-websocket.pom -%{_mavenpomdir}/JPP.tomcat-jaspic-api.pom -%{_mavenpomdir}/JPP.tomcat-jni.pom -%{_mavenpomdir}/JPP.tomcat-util-scan.pom -%{_mavenpomdir}/JPP-tomcat-jsp-api.pom -%{_mavenpomdir}/JPP-tomcat-el-api.pom -%{_datadir}/maven-metadata/tomcat.xml %exclude %{_javadir}/tomcat-servlet-%{servletspec}*.jar %files -n pki-servlet-%{servletspec}-api %defattr(-,root,root,-) %doc LICENSE %{_javadir}/tomcat-servlet-%{servletspec}*.jar -%{_datadir}/maven-metadata/tomcat-servlet-api.xml -%{_mavenpomdir}/JPP-tomcat-servlet-api.pom %changelog * Thu Jun 07 2018 Coty Sutherland - 1:9.0.7-10 From 5b41d32bf856e4670f72d52782933779ec426db5 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 22 Jun 2018 09:51:25 -0400 Subject: [PATCH 265/273] Related: rhbz#1594139 Remove all ties to the tomcat package by cleaning up Provides and Obsoletes that overwrite any tomcat packages and result in pki-servlet-container being installed in cases we don't want it to tbe installed in --- pki-servlet-container.spec | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index b1cba46..7a324c7 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -101,24 +101,7 @@ Requires(preun): chkconfig Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units - -# added after log4j sub-package was removed -Provides: tomcat-log4j = %{epoch}:%{version}-%{release} - -# Leftover requires/provides from removing the subpackages -# they still apply in instances where the old version is installed. - -#%%package jsp-%%{jspspec}-api -Provides: jsp = %{jspspec} -Obsoletes: tomcat-jsp-2.2-api - -#%%package lib Requires(preun): coreutils - -#%%package el-%%{elspec}-api -Provides: el_api = %{elspec} -Obsoletes: tomcat-el-2.2-api - Requires: pki-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} %description @@ -134,10 +117,6 @@ to be a collaboration of the best-of-breed developers from around the world. %package -n pki-servlet-%{servletspec}-api Group: Development/Libraries Summary: Apache Tomcat Java Servlet v%{servletspec} API Implementation Classes -Provides: servlet = %{servletspec} -Provides: servlet6 -Provides: servlet3 -Obsoletes: tomcat-servlet-3.1-api Requires(post): chkconfig Requires(postun): chkconfig From 5ef3ca091f1b915ebe9262cd26ffbf8c43470c2c Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 22 Jun 2018 09:56:09 -0400 Subject: [PATCH 266/273] Related: rhbz#1594139 Add bundled() to tie this package to tomcat --- pki-servlet-container.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 7a324c7..7b3125f 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -104,6 +104,9 @@ Requires(postun): systemd-units Requires(preun): coreutils Requires: pki-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} +# Add bundled so that everyone knows this is Tomcat +Provides: bundled(tomcat) = 9.0.7.redhat-%{redhat_version} + %description Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServer Pages technologies. From 8eca09a1364953688f950fd5d19d6d466a70a659 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 22 Jun 2018 09:57:28 -0400 Subject: [PATCH 267/273] Resolves: rhbz#1594139 Cleanup Provides and Requires --- pki-servlet-container.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 7b3125f..9a7c2b8 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -58,7 +58,7 @@ Name: pki-servlet-container Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: %{redhat_version}%{?dist} +Release: 11%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons License: ASL 2.0 @@ -358,5 +358,8 @@ fi %{_javadir}/tomcat-servlet-%{servletspec}*.jar %changelog +* Fri Jun 22 2018 Coty Sutherland - 1:9.0.7-11 +- Resolves: rhbz#1594139 Cleanup Provides and Requires + * Thu Jun 07 2018 Coty Sutherland - 1:9.0.7-10 - Create packages for FreeIPA that wrap the JWS distribution of Tomcat From 63ef8375bbcda94e5b4acef41e9529ddd7dbe9e8 Mon Sep 17 00:00:00 2001 From: Jean-Frederic Clere Date: Fri, 20 Jul 2018 08:39:03 +0200 Subject: [PATCH 268/273] Add missing BuildRequires: systemd-units --- pki-servlet-container.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 9a7c2b8..9a4b0e7 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -58,7 +58,7 @@ Name: pki-servlet-container Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 11%{?dist} +Release: 12%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons License: ASL 2.0 @@ -88,6 +88,7 @@ BuildRequires: ant BuildRequires: findutils BuildRequires: java-devel >= 1:1.8.0 BuildRequires: jpackage-utils >= 0:1.7.0 +BuildRequires: systemd-units Requires: ant Requires: java-headless >= 1:1.8.0 @@ -358,6 +359,9 @@ fi %{_javadir}/tomcat-servlet-%{servletspec}*.jar %changelog +* Fri Jul 20 2018 Jean-Frederic Clere - 1:9.0.7-12 +- Add missing BuildRequires: systemd-units + * Fri Jun 22 2018 Coty Sutherland - 1:9.0.7-11 - Resolves: rhbz#1594139 Cleanup Provides and Requires From 8cc30cfbf2b8e61ea4c0b2ba20ed969b90b1d1bb Mon Sep 17 00:00:00 2001 From: Fraser Tweedale Date: Fri, 3 Aug 2018 18:53:35 +1000 Subject: [PATCH 269/273] Revert "Related: rhbz#1594139 Remove unused maven artifacts" This reverts commit 10e8d18d0e86beeca4d59dd76934d6f6824b6fdf. --- pki-servlet-container.spec | 98 +++++++++++++++++++++++++++++++++++++- 1 file changed, 97 insertions(+), 1 deletion(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 9a4b0e7..2d2fb2a 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -88,6 +88,7 @@ BuildRequires: ant BuildRequires: findutils BuildRequires: java-devel >= 1:1.8.0 BuildRequires: jpackage-utils >= 0:1.7.0 +BuildRequires: maven-local BuildRequires: systemd-units Requires: ant @@ -246,7 +247,8 @@ pushd ${RPM_BUILD_ROOT}%{libdir} %{__ln_s} ../../java/tomcat-servlet-%{servletspec}-api.jar . %{__ln_s} ../../java/tomcat-el-%{elspec}-api.jar . - %{__ln_s} ../../tomcat/bin/tomcat-juli.jar . + # Temporary copy the juli jar here from /usr/share/java/tomcat (for maven depmap) + %{__cp} -a ${RPM_BUILD_ROOT}%{bindir}/tomcat-juli.jar ./ popd # symlink to the FHS locations where we've installed things @@ -259,6 +261,79 @@ pushd ${RPM_BUILD_ROOT}%{homedir} %{__ln_s} %{workdir} work popd +# Install the maven metadata +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_mavenpomdir} +pushd output/dist/src/res/maven +for pom in *.pom; do + # fix-up version in all pom files + sed -i 's/@MAVEN.DEPLOY.VERSION@/%{version}/g' $pom +done + +# we won't install dbcp, juli-adapters and juli-extras pom files +for libname in annotations-api catalina jasper-el jasper catalina-ha; do + %{__cp} -a tomcat-$libname.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-$libname.pom + %add_maven_depmap JPP.tomcat-$libname.pom tomcat/$libname.jar +done + +# tomcat-util-scan +%{__cp} -a tomcat-util-scan.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-util-scan.pom +%add_maven_depmap JPP.tomcat-util-scan.pom tomcat/tomcat-util-scan.jar + +# tomcat-jni +%{__cp} -a tomcat-jni.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-jni.pom +%add_maven_depmap JPP.tomcat-jni.pom tomcat/tomcat-jni.jar + +# servlet-api jsp-api and el-api are not in tomcat subdir, since they are widely re-used elsewhere +%{__cp} -a tomcat-jsp-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-jsp-api.pom +%add_maven_depmap JPP-tomcat-jsp-api.pom tomcat-jsp-api.jar -a "org.eclipse.jetty.orbit:javax.servlet.jsp" + +%{__cp} -a tomcat-el-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-el-api.pom +%add_maven_depmap JPP-tomcat-el-api.pom tomcat-el-api.jar -a "org.eclipse.jetty.orbit:javax.el" + +%{__cp} -a tomcat-servlet-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-servlet-api.pom +# Generate a depmap fragment javax.servlet:servlet-api pointing to +# tomcat-servlet-3.0-api for backwards compatibility +# also provide jetty depmap (originally in jetty package, but it's cleaner to have it here +%add_maven_depmap JPP-tomcat-servlet-api.pom tomcat-servlet-api.jar -f "tomcat-servlet-api" + +# replace temporary copy with link +%{__ln_s} -f $(abs2rel %{bindir}/tomcat-juli.jar %{libdir}) ${RPM_BUILD_ROOT}%{libdir}/ + +# two special pom where jar files have different names +%{__cp} -a tomcat-tribes.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-catalina-tribes.pom +%add_maven_depmap JPP.tomcat-catalina-tribes.pom tomcat/catalina-tribes.jar + +%{__cp} -a tomcat-coyote.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-coyote.pom +%add_maven_depmap JPP.tomcat-tomcat-coyote.pom tomcat/tomcat-coyote.jar + +%{__cp} -a tomcat-juli.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-juli.pom +%add_maven_depmap JPP.tomcat-tomcat-juli.pom tomcat/tomcat-juli.jar + +%{__cp} -a tomcat-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-api.pom +%add_maven_depmap JPP.tomcat-tomcat-api.pom tomcat/tomcat-api.jar + +%{__cp} -a tomcat-util.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-util.pom +%add_maven_depmap JPP.tomcat-tomcat-util.pom tomcat/tomcat-util.jar + +%{__cp} -a tomcat-jdbc.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-jdbc.pom +%add_maven_depmap JPP.tomcat-tomcat-jdbc.pom tomcat/tomcat-jdbc.jar + +# tomcat-websocket-api +%{__cp} -a tomcat-websocket-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-websocket-api.pom +%add_maven_depmap JPP.tomcat-websocket-api.pom tomcat/websocket-api.jar + +# tomcat-tomcat-websocket +%{__cp} -a tomcat-websocket.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-websocket.pom +%add_maven_depmap JPP.tomcat-tomcat-websocket.pom tomcat/tomcat-websocket.jar + +# tomcat-jaspic-api +%{__cp} -a tomcat-jaspic-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-jaspic-api.pom +%add_maven_depmap JPP.tomcat-jaspic-api.pom tomcat/jaspic-api.jar + +# Manually change the metadata filenames +%{__mv} ${RPM_BUILD_ROOT}%{_datadir}/maven-metadata/%{name}.xml ${RPM_BUILD_ROOT}%{_datadir}/maven-metadata/tomcat.xml +%{__mv} ${RPM_BUILD_ROOT}%{_datadir}/maven-metadata/%{name}-tomcat-servlet-api.xml ${RPM_BUILD_ROOT}%{_datadir}/maven-metadata/tomcat-servlet-api.xml + %pre # add the tomcat user and group %{_sbindir}/groupadd -g %{tcuid} -r tomcat 2>/dev/null || : @@ -351,12 +426,33 @@ fi %{libdir}/*.jar %{_javadir}/*.jar %{bindir}/tomcat-juli.jar +%{_mavenpomdir}/JPP.tomcat-annotations-api.pom +%{_mavenpomdir}/JPP.tomcat-catalina-ha.pom +%{_mavenpomdir}/JPP.tomcat-catalina-tribes.pom +%{_mavenpomdir}/JPP.tomcat-catalina.pom +%{_mavenpomdir}/JPP.tomcat-jasper-el.pom +%{_mavenpomdir}/JPP.tomcat-jasper.pom +%{_mavenpomdir}/JPP.tomcat-tomcat-api.pom +%{_mavenpomdir}/JPP.tomcat-tomcat-juli.pom +%{_mavenpomdir}/JPP.tomcat-tomcat-coyote.pom +%{_mavenpomdir}/JPP.tomcat-tomcat-util.pom +%{_mavenpomdir}/JPP.tomcat-tomcat-jdbc.pom +%{_mavenpomdir}/JPP.tomcat-websocket-api.pom +%{_mavenpomdir}/JPP.tomcat-tomcat-websocket.pom +%{_mavenpomdir}/JPP.tomcat-jaspic-api.pom +%{_mavenpomdir}/JPP.tomcat-jni.pom +%{_mavenpomdir}/JPP.tomcat-util-scan.pom +%{_mavenpomdir}/JPP-tomcat-jsp-api.pom +%{_mavenpomdir}/JPP-tomcat-el-api.pom +%{_datadir}/maven-metadata/tomcat.xml %exclude %{_javadir}/tomcat-servlet-%{servletspec}*.jar %files -n pki-servlet-%{servletspec}-api %defattr(-,root,root,-) %doc LICENSE %{_javadir}/tomcat-servlet-%{servletspec}*.jar +%{_datadir}/maven-metadata/tomcat-servlet-api.xml +%{_mavenpomdir}/JPP-tomcat-servlet-api.pom %changelog * Fri Jul 20 2018 Jean-Frederic Clere - 1:9.0.7-12 From 18826faa6201a5fa8ac7b254fd034b4eff08e943 Mon Sep 17 00:00:00 2001 From: Fraser Tweedale Date: Fri, 3 Aug 2018 23:01:00 +1000 Subject: [PATCH 270/273] Reinstate Maven artifacts and fix maven-metadata JAR path --- pki-servlet-container.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 2d2fb2a..13ba221 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -58,7 +58,7 @@ Name: pki-servlet-container Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 12%{?dist} +Release: 13%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons License: ASL 2.0 @@ -294,7 +294,7 @@ done # Generate a depmap fragment javax.servlet:servlet-api pointing to # tomcat-servlet-3.0-api for backwards compatibility # also provide jetty depmap (originally in jetty package, but it's cleaner to have it here -%add_maven_depmap JPP-tomcat-servlet-api.pom tomcat-servlet-api.jar -f "tomcat-servlet-api" +%add_maven_depmap JPP-tomcat-servlet-api.pom tomcat-servlet-%{servletspec}-api.jar -f "tomcat-servlet-api" # replace temporary copy with link %{__ln_s} -f $(abs2rel %{bindir}/tomcat-juli.jar %{libdir}) ${RPM_BUILD_ROOT}%{libdir}/ @@ -455,6 +455,9 @@ fi %{_mavenpomdir}/JPP-tomcat-servlet-api.pom %changelog +* Fri Aug 03 2018 Fraser Tweedale - 1:9.0.7-13 +- Reinstate Maven artifacts and fix maven-metadata JAR path + * Fri Jul 20 2018 Jean-Frederic Clere - 1:9.0.7-12 - Add missing BuildRequires: systemd-units From f7e577bfc80fa1588d3e5e0294b5c83f395bf4c3 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 9 Nov 2018 11:38:43 -0500 Subject: [PATCH 271/273] Ignore zip files --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 0853083..ff782e8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ apache-tomcat-*-src.tar.gz -/tomcat-9.0.7.redhat-10-src.zip +tomcat-*-src.zip From 9d6007e5f200e6d11ea35739da039c5373d91b6e Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 9 Nov 2018 11:42:09 -0500 Subject: [PATCH 272/273] Update to JWS 5.0.1 distribution Resolves: rhbz#1619232 - CVE-2018-8037 pki-servlet-container: tomcat: Due to a mishandling of close in NIO/NIO2 connectors user sessions can get mixed up Resolves: rhbz#1641874 - CVE-2018-11784 pki-servlet-container: tomcat: Open redirect in default servlet --- pki-servlet-container.spec | 11 ++++++++--- sources | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 13ba221..495140b 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -31,7 +31,7 @@ %global major_version 9 %global minor_version 0 %global micro_version 7 -%global redhat_version 10 +%global redhat_version 12 %global packdname apache-tomcat-%{version}.redhat-%{redhat_version}-src # Specification versions @@ -58,14 +58,14 @@ Name: pki-servlet-container Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 13%{?dist} +Release: 14%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons License: ASL 2.0 URL: http://tomcat.apache.org/ #Source0: http://www.apache.org/dist/tomcat/tomcat-%%{major_version}/v%%{version}/src/%%{packdname}.tar.gz -Source0: tomcat-9.0.7.redhat-10-src.zip +Source0: tomcat-%{version}.redhat-%{redhat_version}-src.zip Source1: tomcat-%{major_version}.%{minor_version}.conf Source3: tomcat-%{major_version}.%{minor_version}.sysconfig Source4: tomcat-%{major_version}.%{minor_version}.wrapper @@ -455,6 +455,11 @@ fi %{_mavenpomdir}/JPP-tomcat-servlet-api.pom %changelog +* Fri Nov 09 2018 Coty Sutherland - 1:9.0.7-14 +- Update to JWS 5.0.1 distribution +- Resolves: rhbz#1619232 - CVE-2018-8037 pki-servlet-container: tomcat: Due to a mishandling of close in NIO/NIO2 connectors user sessions can get mixed up +- Resolves: rhbz#1641874 - CVE-2018-11784 pki-servlet-container: tomcat: Open redirect in default servlet + * Fri Aug 03 2018 Fraser Tweedale - 1:9.0.7-13 - Reinstate Maven artifacts and fix maven-metadata JAR path diff --git a/sources b/sources index b5348c8..cd377bb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -32bca41cb6e6a99498966ac885e4922e tomcat-9.0.7.redhat-10-src.zip +1e8f64d492694b76faee6c0825e0adf3 tomcat-9.0.7.redhat-12-src.zip From 00b9240636a67d980f24d6cac611b33d2575761e Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Mon, 4 Mar 2019 15:28:28 -0500 Subject: [PATCH 273/273] Update to JWS 5.0.2 distribution --- pki-servlet-container.spec | 8 +++++--- sources | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 495140b..200608e 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -31,7 +31,7 @@ %global major_version 9 %global minor_version 0 %global micro_version 7 -%global redhat_version 12 +%global redhat_version 16 %global packdname apache-tomcat-%{version}.redhat-%{redhat_version}-src # Specification versions @@ -455,8 +455,10 @@ fi %{_mavenpomdir}/JPP-tomcat-servlet-api.pom %changelog -* Fri Nov 09 2018 Coty Sutherland - 1:9.0.7-14 -- Update to JWS 5.0.1 distribution +* Mon Mar 04 2019 Coty Sutherland - 1:9.0.7-14 +- Update to JWS 5.0.2 distribution +- Resolves: rhbz#1658846 CVE-2018-8034 pki-servlet-container: tomcat: host name verification missing in WebSocket client +- Resolves: rhbz#1579614 CVE-2018-8014 pki-servlet-container: tomcat: Insecure defaults in CORS filter enable 'supportsCredentials' for all origins - Resolves: rhbz#1619232 - CVE-2018-8037 pki-servlet-container: tomcat: Due to a mishandling of close in NIO/NIO2 connectors user sessions can get mixed up - Resolves: rhbz#1641874 - CVE-2018-11784 pki-servlet-container: tomcat: Open redirect in default servlet diff --git a/sources b/sources index cd377bb..e65120b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1e8f64d492694b76faee6c0825e0adf3 tomcat-9.0.7.redhat-12-src.zip +cab3a9624554d5bd07bff460251bddab tomcat-9.0.7.redhat-16-src.zip