From 167370bb1553653d4badbe6b94aea42efe3b9f8f Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Apr 27 2011 05:54:04 +0000 Subject: Tomcat 7 --- 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-bootstrap-MANIFEST.MF.patch b/tomcat6-6.0-bootstrap-MANIFEST.MF.patch deleted file mode 100644 index ac94aac..0000000 --- a/tomcat6-6.0-bootstrap-MANIFEST.MF.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- 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: Apache Tomcat Bootstrap - Specification-Version: @VERSION_MAJOR_MINOR@ - Specification-Vendor: Apache Software Foundation diff --git a/tomcat6-6.0-digest.script b/tomcat6-6.0-digest.script deleted file mode 100644 index 41ef58e..0000000 --- a/tomcat6-6.0-digest.script +++ /dev/null @@ -1,45 +0,0 @@ -#!/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-log4j.properties b/tomcat6-6.0-log4j.properties deleted file mode 100644 index 1252a64..0000000 --- a/tomcat6-6.0-log4j.properties +++ /dev/null @@ -1,11 +0,0 @@ -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-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-tomcat-users-webapp.patch b/tomcat6-6.0-tomcat-users-webapp.patch deleted file mode 100644 index 6e750f9..0000000 --- a/tomcat6-6.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 @@ - - - --> -+ -+ -+ -+ -+ - diff --git a/tomcat6-6.0-tool-wrapper.script b/tomcat6-6.0-tool-wrapper.script deleted file mode 100644 index bcd7561..0000000 --- a/tomcat6-6.0-tool-wrapper.script +++ /dev/null @@ -1,45 +0,0 @@ -#!/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 deleted file mode 100644 index f2fe56e..0000000 --- a/tomcat6-6.0.conf +++ /dev/null @@ -1,50 +0,0 @@ -# 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/jre" - -# 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 deleted file mode 100644 index ad81343..0000000 --- a/tomcat6-6.0.init +++ /dev/null @@ -1,319 +0,0 @@ -#!/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 -# 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/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 [ "$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 - 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/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 - # 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" \ - >> /var/log/${NAME}/initd.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" - 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" >> /var/log/${NAME}/initd.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" - 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 [ -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 - 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/tomcat6-6.0.logrotate b/tomcat6-6.0.logrotate deleted file mode 100644 index a87b4c0..0000000 --- a/tomcat6-6.0.logrotate +++ /dev/null @@ -1,8 +0,0 @@ -@@@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 deleted file mode 100644 index caefeed..0000000 --- a/tomcat6-6.0.sysconfig +++ /dev/null @@ -1,56 +0,0 @@ -# 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 deleted file mode 100644 index 0e95331..0000000 --- a/tomcat6-6.0.wrapper +++ /dev/null @@ -1,74 +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/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 \ - -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 deleted file mode 100644 index da3c337..0000000 --- a/tomcat6.spec +++ /dev/null @@ -1,818 +0,0 @@ -# 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.1 -%global major_version 6 -%global minor_version 0 -%global micro_version 32 -%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/ -%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 -Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 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 -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 -# In 6.0.32 source -#Patch2: %{name}-%{major_version}.%{minor_version}-rhbz-674601.patch -BuildArch: noarch - -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: jakarta-taglibs-standard -BuildRequires: java-1.6.0-devel -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: 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 -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. -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: %{name}-el-%{elspec}-api = %{epoch}:%{version}-%{release} -Requires: ecj -Requires: jakarta-commons-collections -Requires: jakarta-commons-dbcp -Requires: jakarta-commons-pool -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 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): chkconfig -Requires(postun): chkconfig - -%description el-%{elspec}-api -Expression Language 1.0. - -%package webapps -Group: System Environment/Applications -Summary: The ROOT and examples web applications for Apache Tomcat -Requires: %{name} = %{epoch}:%{version}-%{release} -Requires: jakarta-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 jakarta-taglibs-core) webapps/examples/WEB-INF/lib/jstl.jar -%{__ln_s} $(build-classpath jakarta-taglibs-standard) 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 - # 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-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 - # 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 - -%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}%{_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 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}%{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 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} -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 %{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.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 \ - taglibs-core.jar taglibs-standard.jar 2>&1 -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} $(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 - -# 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 - - -# 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) -%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 -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; 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 - - -%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/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 -/sbin/chkconfig --add %{name} -%update_maven_depmap - -%post jsp-%{jspspec}-api -%{_sbindir}/update-alternatives --install %{_javadir}/jsp.jar jsp \ - %{_javadir}/%{name}-jsp-%{jspspec}-api.jar 20100 - -%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 \ - %{_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} -if [ "$1" = "0" ]; then - %{_initrddir}/%{name} stop >/dev/null 2>&1 - /sbin/chkconfig --del %{name} -fi - - -%postun -%update_maven_depmap - -%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 - %update_maven_depmap -fi - -%postun el-%{elspec}-api -if [ "$1" = "0" ]; then - %{_sbindir}/update-alternatives --remove elspec \ - %{_javadir}/%{name}-el-%{elspec}-api.jar -fi - -%files -%defattr(0664,root,tomcat,0775) -%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) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} -%config(noreplace) %{_sysconfdir}/sysconfig/%{name} -%attr(0765,root,tomcat) %dir %{basedir} -%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 -%{bindir}/catalina-tasks.xml -%{bindir}/tomcat-juli.jar -%{homedir}/lib -%{homedir}/temp -%{homedir}/webapps -%{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,0775) -%{appdir}/host-manager -%{appdir}/manager - -%files docs-webapp -%defattr(-,root,root,-) -%{appdir}/docs - -%files javadoc -%defattr(-,root,root,-) -%{_javadocdir}/%{name} - -%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 -%defattr(-,root,root,-) -%{libdir} - -%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-api.jar -%{_javadir}/%{name}/%{name}-el-%{elspec}-api.jar -%{_mavenpomdir}/JPP-%{name}-el-api.pom - -%files webapps -%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 - -* 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-bootstrap-MANIFEST.MF.patch b/tomcat7-7.0-bootstrap-MANIFEST.MF.patch new file mode 100644 index 0000000..e2ee93e --- /dev/null +++ b/tomcat7-7.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/tomcat7-7.0-digest.script b/tomcat7-7.0-digest.script new file mode 100644 index 0000000..409dc86 --- /dev/null +++ b/tomcat7-7.0-digest.script @@ -0,0 +1,45 @@ +#!/bin/sh +# +# tomcat7-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/tomcat7/tomcat7.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 tomcat7/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/tomcat7-7.0-log4j.properties b/tomcat7-7.0-log4j.properties new file mode 100644 index 0000000..1252a64 --- /dev/null +++ b/tomcat7-7.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/tomcat7-7.0-tomcat-users-webapp.patch b/tomcat7-7.0-tomcat-users-webapp.patch new file mode 100644 index 0000000..6e750f9 --- /dev/null +++ b/tomcat7-7.0-tomcat-users-webapp.patch @@ -0,0 +1,12 @@ +--- 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/tomcat7-7.0-tool-wrapper.script b/tomcat7-7.0-tool-wrapper.script new file mode 100644 index 0000000..ad75a09 --- /dev/null +++ b/tomcat7-7.0-tool-wrapper.script @@ -0,0 +1,45 @@ +#!/bin/sh +# +# tomcat7-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/tomcat7/tomcat7.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 tomcat7/catalina servlet" + +# Set parameters +set_classpath $BASE_JARS +set_flags $BASE_FLAGS +set_options $BASE_OPTIONS + +# Let's start +run "$@" diff --git a/tomcat7-7.0.conf b/tomcat7-7.0.conf new file mode 100644 index 0000000..3ac47d9 --- /dev/null +++ b/tomcat7-7.0.conf @@ -0,0 +1,50 @@ +# 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/tomcat7) +# + +# 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@@@" + +# 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/tomcat7.pid" + +# Connector port is 8080 for this tomcat7 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/tomcat7-7.0.init b/tomcat7-7.0.init new file mode 100644 index 0000000..e3887d4 --- /dev/null +++ b/tomcat7-7.0.init @@ -0,0 +1,319 @@ +#!/bin/bash +# +# tomcat7 This shell script takes care of starting and stopping Tomcat +# +# chkconfig: - 80 20 +# +### BEGIN INIT INFO +# Provides: tomcat7 +# 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/tomcat7/tomcat7.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/tomcat7" + +# 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/tomcat7/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/tomcat7/* /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/tomcat7 ${CATALINA_HOME}/lib + ln -fs /usr/share/tomcat7/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 [ -f "/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/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 + # 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" \ + >> /var/log/${NAME}/initd.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" + 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" >> /var/log/${NAME}/initd.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" + 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 [ -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 + 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/tomcat7-7.0.logrotate b/tomcat7-7.0.logrotate new file mode 100644 index 0000000..a87b4c0 --- /dev/null +++ b/tomcat7-7.0.logrotate @@ -0,0 +1,8 @@ +@@@TCLOG@@@/catalina.out { + copytruncate + weekly + rotate 52 + compress + missingok + create 0644 tomcat tomcat +} diff --git a/tomcat7-7.0.sysconfig b/tomcat7-7.0.sysconfig new file mode 100644 index 0000000..69cd0a1 --- /dev/null +++ b/tomcat7-7.0.sysconfig @@ -0,0 +1,56 @@ +# Service-specific configuration file for tomcat7. 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 +# a per-service manner. +# +# NEVER change the init script itself. To change values for all services make +# 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/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). +# + +# 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/tomcat7.pid" + +# Connector port is 8080 for this tomcat7 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/tomcat7-7.0.wrapper b/tomcat7-7.0.wrapper new file mode 100644 index 0000000..dc3a6f1 --- /dev/null +++ b/tomcat7-7.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/tomcat7/tomcat7.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 \ + -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/tomcat7.spec b/tomcat7.spec new file mode 100644 index 0000000..2a850b5 --- /dev/null +++ b/tomcat7.spec @@ -0,0 +1,828 @@ +# 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.2 +%global major_version 7 +%global minor_version 0 +%global micro_version 12 +%global packdname apache-tomcat-%{version}-src +%global servletspec 3.0 +%global elspec 2.2 +%global tcuid 91 + +# 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 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: tomcat7 +Epoch: 0 +Version: %{major_version}.%{minor_version}.%{micro_version} +Release: 1%{?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 + +BuildArch: noarch + +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: jakarta-taglibs-standard +BuildRequires: java-1.6.0-devel +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: 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 +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. +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: 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. + + +%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 +Requires: jakarta-commons-dbcp +Requires: jakarta-commons-pool +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: servlet3 +Requires(post): chkconfig +Requires(postun): chkconfig + +%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): chkconfig +Requires(postun): chkconfig + +%description el-%{elspec}-api +Expression Language 1.0. + +%package webapps +Group: System Environment/Applications +Summary: The ROOT and examples web applications for Apache Tomcat +Requires: %{name} = %{epoch}:%{version}-%{release} +Requires: jakarta-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 jakarta-taglibs-core) webapps/examples/WEB-INF/lib/jstl.jar +%{__ln_s} $(build-classpath jakarta-taglibs-standard) 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 + # 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" \ + -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.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 + # 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 + +%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}%{_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 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}%{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 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} +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 %{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.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 \ + taglibs-core.jar taglibs-standard.jar 2>&1 +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} $(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/tomcat7 + %{__ln_s} %{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 + + +# Generate a depmap fragment javax.servlet:servlet-api pointing to +# 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 +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 +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 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 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 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 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 + + +%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/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 +/sbin/chkconfig --add %{name} +%update_maven_depmap + +%post jsp-%{jspspec}-api +%{_sbindir}/update-alternatives --install %{_javadir}/jsp.jar jsp \ + %{_javadir}/%{name}-jsp-%{jspspec}-api.jar 20100 + +%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 \ + %{_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} +if [ "$1" = "0" ]; then + %{_initrddir}/%{name} stop >/dev/null 2>&1 + /sbin/chkconfig --del %{name} +fi + + +%postun +%update_maven_depmap + +%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 + %update_maven_depmap +fi + +%postun el-%{elspec}-api +if [ "$1" = "0" ]; then + %{_sbindir}/update-alternatives --remove elspec \ + %{_javadir}/%{name}-el-%{elspec}-api.jar +fi + +%files +%defattr(0664,root,tomcat,0775) +%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) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} +%config(noreplace) %{_sysconfdir}/sysconfig/%{name} +%attr(0765,root,tomcat) %dir %{basedir} +%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 +%{bindir}/catalina-tasks.xml +%{bindir}/tomcat-juli.jar +%{homedir}/lib +%{homedir}/temp +%{homedir}/webapps +%{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,0775) +%{appdir}/host-manager +%{appdir}/manager + +%files docs-webapp +%defattr(-,root,root,-) +%{appdir}/docs + +%files javadoc +%defattr(-,root,root,-) +%{_javadocdir}/%{name} + +%files jsp-%{jspspec}-api +%defattr(-,root,root,-) +%{_javadir}/%{name}-jsp-%{jspspec}*.jar +%{_javadir}/%{name}-jsp-api.jar +%{_mavenpomdir}/JPP-%{name}-tomcat-jsp-api.pom + +%files lib +%defattr(-,root,root,-) +%{libdir} + +%files servlet-%{servletspec}-api +%defattr(-,root,root,-) +%{_javadir}/%{name}-servlet-%{servletspec}*.jar +%{_javadir}/%{name}-servlet-api.jar +%{_mavendepmapfragdir}/%{name}-servlet-api +%{_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}-tomcat-el-api.pom + +%files webapps +%defattr(0664,root,tomcat,0775) +%{appdir}/ROOT +%{appdir}/examples +%{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 +- 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