Fix release to match upstream
This commit is contained in:
parent
4b68228454
commit
7213be0770
@ -1 +1 @@
|
||||
a0b455b96e12c6eb6410a2dae201bf25b0edb8ed SOURCES/tomcat-9.0.62.redhat-00014-src.zip
|
||||
3fb3d5b913c9366e4ff3c5868bc90abb004028aa SOURCES/tomcat-9.0.62.redhat-00014-src.zip
|
||||
|
51
SOURCES/tomcat-9.0.conf
Normal file
51
SOURCES/tomcat-9.0.conf
Normal file
@ -0,0 +1,51 @@
|
||||
# System-wide configuration file for tomcat services
|
||||
# This will be loaded by systemd as an environment file,
|
||||
# so please keep the syntax. For shell expansion support
|
||||
# place your custom files as /etc/tomcat/conf.d/*.conf
|
||||
#
|
||||
# There are 2 "classes" of startup behavior in this package.
|
||||
# The old one, the default service named tomcat.service.
|
||||
# The new named instances are called tomcat@instance.service.
|
||||
#
|
||||
# Use this file to change default values for all services.
|
||||
# Change the service specific ones to affect only one service.
|
||||
# For tomcat.service it's /etc/sysconfig/tomcat, for
|
||||
# tomcat@instance it's /etc/sysconfig/tomcat@instance.
|
||||
|
||||
# This variable is used to figure out if config is loaded or not.
|
||||
TOMCAT_CFG_LOADED="1"
|
||||
|
||||
# In new-style instances, if CATALINA_BASE isn't specified, it will
|
||||
# be constructed by joining TOMCATS_BASE and NAME.
|
||||
TOMCATS_BASE="/var/lib/tomcats/"
|
||||
|
||||
# Where your java installation lives
|
||||
JAVA_HOME="/usr/lib/jvm/jre"
|
||||
|
||||
# Where your tomcat installation lives
|
||||
CATALINA_HOME="@@@TCHOME@@@"
|
||||
|
||||
# System-wide tmp
|
||||
CATALINA_TMPDIR="/var/cache/tomcat/temp"
|
||||
|
||||
# You can pass some parameters to java here if you wish to
|
||||
#JAVA_OPTS="-Xminf0.1 -Xmaxf0.3"
|
||||
|
||||
# Use JAVA_OPTS to set java.library.path for libtcnative.so
|
||||
#JAVA_OPTS="-Djava.library.path=/usr/lib"
|
||||
|
||||
# Set default javax.sql.DataSource factory to apache commons one. See rhbz#1214381
|
||||
JAVA_OPTS="-Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory"
|
||||
|
||||
# You can change your tomcat locale here
|
||||
#LANG="en_US"
|
||||
|
||||
# Run tomcat under the Java Security Manager
|
||||
SECURITY_MANAGER="false"
|
||||
|
||||
# SHUTDOWN_WAIT has been deprecated. To change the shutdown wait time, set
|
||||
# TimeoutStopSec in tomcat.service.
|
||||
|
||||
# If you wish to further customize your tomcat environment,
|
||||
# put your own definitions here
|
||||
# (i.e. LD_LIBRARY_PATH for some jdbc drivers)
|
11
SOURCES/tomcat-9.0.logrotate
Normal file
11
SOURCES/tomcat-9.0.logrotate
Normal file
@ -0,0 +1,11 @@
|
||||
# This is an example config only and is disabled by default
|
||||
# If you wish to use it, you'll need to update /etc/tomcat/logging.properties
|
||||
# to prevent catalina*.log from being rotated by Tomcat
|
||||
@@@TCLOG@@@/catalina*.log {
|
||||
copytruncate
|
||||
weekly
|
||||
rotate 52
|
||||
compress
|
||||
missingok
|
||||
create 0644 tomcat tomcat
|
||||
}
|
20
SOURCES/tomcat-9.0.service
Normal file
20
SOURCES/tomcat-9.0.service
Normal file
@ -0,0 +1,20 @@
|
||||
# Systemd unit file for default tomcat
|
||||
#
|
||||
# To create clones of this service:
|
||||
# DO NOTHING, use tomcat@.service instead.
|
||||
|
||||
[Unit]
|
||||
Description=Apache Tomcat Web Application Container
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
EnvironmentFile=/etc/tomcat/tomcat.conf
|
||||
Environment="NAME="
|
||||
EnvironmentFile=-/etc/sysconfig/tomcat
|
||||
ExecStart=/usr/libexec/tomcat/server start
|
||||
SuccessExitStatus=143
|
||||
User=tomcat
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
11
SOURCES/tomcat-9.0.sysconfig
Normal file
11
SOURCES/tomcat-9.0.sysconfig
Normal file
@ -0,0 +1,11 @@
|
||||
# Service-specific configuration file for tomcat. This will be sourced by
|
||||
# systemd for the default service (tomcat.service)
|
||||
# If you want to customize named instance, make a similar file
|
||||
# and name it tomcat@instancename.
|
||||
|
||||
# You will not need to set this, usually. For default service it equals
|
||||
# CATALINA_HOME. For named service, it equals ${TOMCATS_BASE}${NAME}
|
||||
#CATALINA_BASE="@@@TCHOME@@@"
|
||||
|
||||
# Please take a look at /etc/tomcat/tomcat.conf to have an idea what you
|
||||
# can override.
|
24
SOURCES/tomcat-9.0.wrapper
Normal file
24
SOURCES/tomcat-9.0.wrapper
Normal file
@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$1" = "version" ]; then
|
||||
. /usr/libexec/tomcat/preamble
|
||||
exec ${JAVACMD} -classpath ${CATALINA_HOME}/lib/catalina.jar \
|
||||
org.apache.catalina.util.ServerInfo
|
||||
fi
|
||||
|
||||
SRV="tomcat"
|
||||
if [ -n "$2" ]; then
|
||||
SRV="tomcat@$2"
|
||||
fi
|
||||
|
||||
if [ "$1" = "start" ]; then
|
||||
systemctl start ${SRV}.service
|
||||
elif [ "$1" = "stop" ]; then
|
||||
systemctl stop ${SRV}.service
|
||||
elif [ "$1" = "version" ]; then
|
||||
${JAVACMD} -classpath ${CATALINA_HOME}/lib/catalina.jar \
|
||||
org.apache.catalina.util.ServerInfo
|
||||
else
|
||||
echo "Usage: $0 {start|stop|version} [server-id]"
|
||||
exit 1
|
||||
fi
|
12
SOURCES/tomcat-build.patch
Normal file
12
SOURCES/tomcat-build.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up ./res/bnd/build-defaults.bnd.orig ./res/bnd/build-defaults.bnd
|
||||
--- ./res/bnd/build-defaults.bnd.orig 2020-07-13 13:47:01.229077747 -0400
|
||||
+++ ./res/bnd/build-defaults.bnd 2020-07-13 13:47:12.923095618 -0400
|
||||
@@ -13,7 +13,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
-Bundle-Version: ${version_cleanup;${version}}
|
||||
+Bundle-Version: ${version}
|
||||
|
||||
Specification-Title: Apache Tomcat
|
||||
Specification-Version: ${version.major.minor}
|
42
SOURCES/tomcat-functions
Normal file
42
SOURCES/tomcat-functions
Normal file
@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -r /usr/share/java-utils/java-functions ]; then
|
||||
. /usr/share/java-utils/java-functions
|
||||
else
|
||||
echo "Can't read Java functions library, aborting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
_save_function() {
|
||||
local ORIG_FUNC=$(declare -f $1)
|
||||
local NEWNAME_FUNC="$2${ORIG_FUNC#$1}"
|
||||
eval "$NEWNAME_FUNC"
|
||||
}
|
||||
|
||||
run_jsvc(){
|
||||
if [ -x /usr/bin/jsvc ]; then
|
||||
TOMCAT_USER="${TOMCAT_USER:-tomcat}"
|
||||
JSVC="/usr/bin/jsvc"
|
||||
|
||||
JSVC_OPTS="-nodetach -pidfile /var/run/jsvc-tomcat${NAME}.pid -user ${TOMCAT_USER} -outfile ${CATALINA_BASE}/logs/catalina.out -errfile ${CATALINA_BASE}/logs/catalina.out"
|
||||
if [ "$1" = "stop" ]; then
|
||||
JSVC_OPTS="${JSVC_OPTS} -stop"
|
||||
fi
|
||||
|
||||
exec "${JSVC}" ${JSVC_OPTS} ${FLAGS} -classpath "${CLASSPATH}" ${OPTIONS} "${MAIN_CLASS}" "${@}"
|
||||
else
|
||||
echo "Can't find /usr/bin/jsvc executable"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
_save_function run run_java
|
||||
|
||||
run() {
|
||||
if [ "${USE_JSVC}" = "true" ] ; then
|
||||
run_jsvc $@
|
||||
else
|
||||
run_java $@
|
||||
fi
|
||||
}
|
||||
|
24
SOURCES/tomcat-named.service
Normal file
24
SOURCES/tomcat-named.service
Normal file
@ -0,0 +1,24 @@
|
||||
# Systemd unit file for tomcat instances.
|
||||
#
|
||||
# To create clones of this service:
|
||||
# 0. systemctl enable tomcat@name.service
|
||||
# 1. create catalina.base directory structure in
|
||||
# /var/lib/tomcats/name
|
||||
# 2. profit.
|
||||
|
||||
[Unit]
|
||||
Description=Apache Tomcat Web Application Container
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
EnvironmentFile=/etc/tomcat/tomcat.conf
|
||||
Environment="NAME=%i"
|
||||
EnvironmentFile=-/etc/sysconfig/tomcat@%i
|
||||
ExecStart=/usr/libexec/tomcat/server start
|
||||
ExecStop=/usr/libexec/tomcat/server stop
|
||||
SuccessExitStatus=143
|
||||
User=tomcat
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
52
SOURCES/tomcat-preamble
Normal file
52
SOURCES/tomcat-preamble
Normal file
@ -0,0 +1,52 @@
|
||||
#!/bin/bash
|
||||
|
||||
. /usr/libexec/tomcat/functions
|
||||
|
||||
# Get the tomcat config (use this for environment specific settings)
|
||||
|
||||
if [ -z "${TOMCAT_CFG_LOADED}" ]; then
|
||||
if [ -z "${TOMCAT_CFG}" ]; then
|
||||
TOMCAT_CFG="/etc/tomcat/tomcat.conf"
|
||||
fi
|
||||
. $TOMCAT_CFG
|
||||
fi
|
||||
|
||||
if [ -d "${TOMCAT_CONFD=/etc/tomcat/conf.d}" ]; then
|
||||
for file in ${TOMCAT_CONFD}/*.conf ; do
|
||||
if [ -f "$file" ] ; then
|
||||
. "$file"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [ -z "$CATALINA_BASE" ]; then
|
||||
if [ -n "$NAME" ]; then
|
||||
if [ -z "$TOMCATS_BASE" ]; then
|
||||
TOMCATS_BASE="/var/lib/tomcats/"
|
||||
fi
|
||||
CATALINA_BASE="${TOMCATS_BASE}${NAME}"
|
||||
else
|
||||
CATALINA_BASE="${CATALINA_HOME}"
|
||||
fi
|
||||
fi
|
||||
VERBOSE=1
|
||||
set_javacmd
|
||||
cd ${CATALINA_HOME}
|
||||
# CLASSPATH munging
|
||||
if [ ! -z "$CLASSPATH" ] ; then
|
||||
CLASSPATH="$CLASSPATH":
|
||||
fi
|
||||
|
||||
if [ -n "$JSSE_HOME" ]; then
|
||||
CLASSPATH="${CLASSPATH}$(build-classpath jcert jnet jsse 2>/dev/null):"
|
||||
fi
|
||||
CLASSPATH="${CLASSPATH}${CATALINA_HOME}/bin/bootstrap.jar"
|
||||
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/tomcat-juli.jar"
|
||||
CLASSPATH="${CLASSPATH}:$(build-classpath commons-daemon 2>/dev/null)"
|
||||
|
||||
if [ -z "$LOGGING_PROPERTIES" ] ; then
|
||||
LOGGING_PROPERTIES="${CATALINA_BASE}/conf/logging.properties"
|
||||
if [ ! -f "${LOGGING_PROPERTIES}" ] ; then
|
||||
LOGGING_PROPERTIES="${CATALINA_HOME}/conf/logging.properties"
|
||||
fi
|
||||
fi
|
25
SOURCES/tomcat-server
Normal file
25
SOURCES/tomcat-server
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
. /usr/libexec/tomcat/preamble
|
||||
|
||||
MAIN_CLASS=org.apache.catalina.startup.Bootstrap
|
||||
|
||||
FLAGS="$JAVA_OPTS"
|
||||
OPTIONS="-Dcatalina.base=$CATALINA_BASE \
|
||||
-Dcatalina.home=$CATALINA_HOME \
|
||||
-Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS \
|
||||
-Djava.io.tmpdir=$CATALINA_TMPDIR \
|
||||
-Djava.util.logging.config.file=${LOGGING_PROPERTIES} \
|
||||
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
|
||||
|
||||
if [ "$1" = "start" ] ; then
|
||||
FLAGS="${FLAGS} $CATALINA_OPTS"
|
||||
if [ "${SECURITY_MANAGER}" = "true" ] ; then
|
||||
OPTIONS="${OPTIONS} \
|
||||
-Djava.security.manager \
|
||||
-Djava.security.policy==${CATALINA_BASE}/conf/catalina.policy"
|
||||
fi
|
||||
run start
|
||||
elif [ "$1" = "stop" ] ; then
|
||||
run stop
|
||||
fi
|
1086
SPECS/tomcat.spec
Normal file
1086
SPECS/tomcat.spec
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user