Updated sources with rhpkg instead of fedpkg accidentally. Fixing that fed_hash: e1abf5cd6d
This commit is contained in:
parent
643d34de35
commit
66a81e03cb
|
@ -0,0 +1 @@
|
|||
/apache-tomcat-8.0.44-src.tar.gz
|
|
@ -0,0 +1,29 @@
|
|||
--- modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java.sav 2012-01-17 13:55:44.000000000 +0400
|
||||
+++ modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java 2012-01-22 00:44:22.299789107 +0400
|
||||
@@ -19,9 +19,11 @@ package org.apache.tomcat.jdbc.pool;
|
||||
import java.io.PrintWriter;
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
+import java.sql.SQLFeatureNotSupportedException;
|
||||
import java.util.Iterator;
|
||||
import java.util.Properties;
|
||||
import java.util.concurrent.Future;
|
||||
+import java.util.logging.Logger;
|
||||
|
||||
import javax.sql.XAConnection;
|
||||
|
||||
@@ -534,6 +536,14 @@ public class DataSourceProxy implements
|
||||
}
|
||||
|
||||
/**
|
||||
+ * no-op
|
||||
+ * {@link javax.sql.DataSource#getParentLogger}
|
||||
+ */
|
||||
+ public Logger getParentLogger() throws SQLFeatureNotSupportedException {
|
||||
+ throw new SQLFeatureNotSupportedException();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
* no-op
|
||||
* {@link javax.sql.DataSource#getLogWriter}
|
||||
*/
|
|
@ -0,0 +1,13 @@
|
|||
Manifest-Version: 1.0
|
||||
Export-Package: javax.el;version="2.2.0"
|
||||
Bundle-Vendor: %bundleProvider
|
||||
Bundle-ClassPath: .
|
||||
Bundle-Version: 2.2.0
|
||||
Bundle-Name: %bundleName
|
||||
Bundle-Localization: plugin
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-SymbolicName: javax.el
|
||||
DynamicImport-Package: org.apache.el
|
||||
Bundle-RequiredExecutionEnvironment: J2SE-1.4,CDC-1.0/Foundation-1.0,J
|
||||
2SE-1.3
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
Manifest-Version: 1.0
|
||||
Export-Package: org.apache.jasper;version="8.0.26",org.apache.jasper.c
|
||||
ompiler;version="8.0.26",org.apache.jasper.compiler.tagplugin;version
|
||||
="8.0.26",org.apache.jasper.resources;version="8.0.26",org.apache.jas
|
||||
per.runtime;version="8.0.26",org.apache.jasper.security;version="7.0.
|
||||
19",org.apache.jasper.servlet;version="8.0.26",org.apache.jasper.tagp
|
||||
lugins.jstl;version="8.0.26",org.apache.jasper.tagplugins.jstl.core;v
|
||||
ersion="8.0.26",org.apache.jasper.util;version="8.0.26",org.apache.ja
|
||||
sper.xmlparser;version="8.0.26"
|
||||
Bundle-Vendor: %bundleProvider
|
||||
Bundle-ClassPath: .
|
||||
Bundle-Version: 8.0.26
|
||||
Bundle-Localization: plugin
|
||||
Bundle-Name: %bundleName
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-SymbolicName: org.apache.jasper
|
||||
Import-Package: javax.servlet;version="[2.4.0, 3.0.0]",javax.servlet.h
|
||||
ttp;version="[2.4.0, 3.0.0]",javax.servlet.jsp;version="[2.0.0, 2.2.0
|
||||
]",javax.servlet.jsp.el;version="[2.0.0, 2.2.0]",javax.servlet.jsp.re
|
||||
sources;version="[2.0.0, 2.2.0]",javax.servlet.jsp.tagext;version="[2
|
||||
.0.0, 2.2.0]",javax.servlet.resources;version="[2.4.0, 3.0.0]",javax.
|
||||
xml.parsers,org.apache.commons.el;version="[1.0.0,2.0.0)",org.apache.
|
||||
commons.logging;version="[1.0.0,2.0.0)",org.apache.tools.ant;resoluti
|
||||
on:=optional,org.apache.tools.ant.taskdefs;resolution:=optional,org.a
|
||||
pache.tools.ant.types;resolution:=optional,org.apache.tools.ant.util;
|
||||
resolution:=optional,org.w3c.dom,org.xml.sax,org.xml.sax.ext,org.xml.
|
||||
sax.helpers,org.apache.tomcat;version="8.0.26",org.apache.juli.loggin
|
||||
g;version="8.0.26",javax.el;version="2.2.0",org.eclipse.jdt.internal.
|
||||
compiler,org.eclipse.jdt.internal.compiler.parser,org.eclipse.jdt.int
|
||||
ernal.compiler.parser.diagnose,org.eclipse.jdt.internal.compiler.flow
|
||||
,org.eclipse.jdt.internal.compiler.util,org.eclipse.jdt.internal.comp
|
||||
iler.impl,org.eclipse.jdt.internal.compiler.lookup,org.eclipse.jdt.in
|
||||
ternal.compiler.codegen,org.eclipse.jdt.internal.compiler.batch,org.e
|
||||
clipse.jdt.internal.compiler.classfmt,org.eclipse.jdt.internal.compil
|
||||
er.ast,org.eclipse.jdt.internal.compiler.problem,org.eclipse.jdt.inte
|
||||
rnal.compiler.env,org.eclipse.jdt.internal.core.util,org.eclipse.jdt.
|
||||
core.compiler
|
||||
Bundle-RequiredExecutionEnvironment: J2SE-1.4,CDC-1.0/Foundation-1.0,J
|
||||
2SE-1.3
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
Manifest-Version: 1.0
|
||||
Export-Package: org.apache.el;version="7.0.21"
|
||||
Bundle-Vendor: %bundleProvider
|
||||
Bundle-ClassPath: .
|
||||
Bundle-Version: 8.0.26
|
||||
Bundle-Name: %bundleName
|
||||
Bundle-Localization: plugin
|
||||
Bundle-ManifestVersion: 2
|
||||
Import-Package: javax.el;version="2.2"
|
||||
Bundle-SymbolicName: org.apache.el
|
||||
Bundle-RequiredExecutionEnvironment: J2SE-1.4,CDC-1.0/Foundation-1.0,J
|
||||
2SE-1.3
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
Manifest-Version: 1.0
|
||||
Bundle-Vendor: %bundleProvider
|
||||
Bundle-Localization: plugin
|
||||
Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0,J2SE-1.3
|
||||
Bundle-Name: %bundleName
|
||||
Bundle-SymbolicName: javax.servlet.jsp
|
||||
Export-Package: javax.servlet.jsp; version=2.2,javax.servlet.jsp.el; v
|
||||
ersion=2.2,javax.servlet.jsp.resources; version=2.2,javax.servlet.jsp
|
||||
.tagext; version=2.2
|
||||
Bundle-Version: 2.2.0.v200806031607
|
||||
Bundle-ManifestVersion: 2
|
||||
Import-Package: javax.servlet; version=3.0,javax.servlet.http; version
|
||||
=3.0,javax.servlet.resources; version=3.0,javax.el;version="2.2.0"
|
|
@ -0,0 +1,17 @@
|
|||
Manifest-Version: 1.0
|
||||
Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,J2SE-1.4
|
||||
Bundle-SymbolicName: javax.servlet
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %bundleName
|
||||
Bundle-Localization: plugin
|
||||
Bundle-Version: 3.0.0
|
||||
Bundle-Vendor: %bundleProvider
|
||||
Export-Package: javax.servlet;version="3.0",
|
||||
javax.servlet;version="2.6",
|
||||
javax.servlet.http;version="3.0",
|
||||
javax.servlet.http;version="2.6",
|
||||
javax.servlet.annotation;version="2.6",
|
||||
javax.servlet.descriptor;version="3.0",
|
||||
javax.servlet.descriptor;version="2.6",
|
||||
javax.servlet.resources;version="3.0",
|
||||
javax.servlet.resources;version="2.6"
|
|
@ -0,0 +1 @@
|
|||
b9eccb2c956aabd2c319e91ce308971b apache-tomcat-8.0.44-src.tar.gz
|
|
@ -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
|
|
@ -0,0 +1,39 @@
|
|||
--- conf/catalina.policy~ 2016-06-17 10:20:17.649171968 -0400
|
||||
+++ conf/catalina.policy 2016-06-17 10:23:35.358309244 -0400
|
||||
@@ -50,6 +50,36 @@ grant codeBase "file:${java.home}/lib/ex
|
||||
permission java.security.AllPermission;
|
||||
};
|
||||
|
||||
+// ========== RHEL SPECIFIC CODE PERMISSIONS =======================================
|
||||
+
|
||||
+// Allowing everything in /usr/share/java allows too many unknowns to be permitted
|
||||
+// Specifying the individual jars that tomcat needs to function with the security manager
|
||||
+// is the safest way forward.
|
||||
+grant codeBase "file:/usr/share/java/tomcat-servlet-3.0-api.jar" {
|
||||
+ permission java.security.AllPermission;
|
||||
+};
|
||||
+grant codeBase "file:/usr/share/java/tomcat-jsp-2.2-api.jar" {
|
||||
+ permission java.security.AllPermission;
|
||||
+};
|
||||
+grant codeBase "file:/usr/share/java/tomcat-el-2.2-api.jar" {
|
||||
+ permission java.security.AllPermission;
|
||||
+};
|
||||
+grant codeBase "file:/usr/share/java/log4j.jar" {
|
||||
+ permission java.security.AllPermission;
|
||||
+};
|
||||
+grant codeBase "file:/usr/share/java/ecj.jar" {
|
||||
+ permission java.security.AllPermission;
|
||||
+};
|
||||
+grant codeBase "file:/usr/share/java/apache-commons-pool.jar" {
|
||||
+ permission java.security.AllPermission;
|
||||
+};
|
||||
+grant codeBase "file:/usr/share/java/apache-commons-dbcp.jar" {
|
||||
+ permission java.security.AllPermission;
|
||||
+};
|
||||
+grant codeBase "file:/usr/share/java/apache-commons-collections.jar" {
|
||||
+ permission java.security.AllPermission;
|
||||
+};
|
||||
+
|
||||
|
||||
// ========== CATALINA CODE PERMISSIONS =======================================
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# tomcat-digest script
|
||||
# JPackage Project <http://www.jpackage.org/>
|
||||
|
||||
# Source functions library
|
||||
if [ -f /usr/share/java-utils/java-functions ] ; then
|
||||
. /usr/share/java-utils/java-functions
|
||||
else
|
||||
echo "Can't find functions library, aborting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Get the tomcat config (use this for environment specific settings)
|
||||
if [ -z "${TOMCAT_CFG}" ]; then
|
||||
TOMCAT_CFG="/etc/tomcat/tomcat.conf"
|
||||
fi
|
||||
|
||||
if [ -r "$TOMCAT_CFG" ]; then
|
||||
. $TOMCAT_CFG
|
||||
fi
|
||||
|
||||
set_javacmd
|
||||
|
||||
# CLASSPATH munging
|
||||
if [ -n "$JSSE_HOME" ]; then
|
||||
CLASSPATH="${CLASSPATH}:$(build-classpath jcert jnet jsse 2>/dev/null)"
|
||||
fi
|
||||
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/bootstrap.jar"
|
||||
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/tomcat-juli.jar"
|
||||
export CLASSPATH
|
||||
|
||||
# Configuration
|
||||
MAIN_CLASS="org.apache.catalina.startup.Tool"
|
||||
BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\""
|
||||
BASE_OPTIONS=""
|
||||
BASE_JARS="commons-daemon tomcat/catalina servlet tomcat/tomcat-util tomcat/tomcat-coyote tomcat/tomcat-api tomcat/tomcat-util-scan"
|
||||
|
||||
# Set parameters
|
||||
set_classpath $BASE_JARS
|
||||
set_flags $BASE_FLAGS
|
||||
set_options $BASE_OPTIONS
|
||||
|
||||
# Let's start
|
||||
run -server org.apache.catalina.realm.RealmBase "$@"
|
|
@ -0,0 +1,22 @@
|
|||
# Systemd unit file for tomcat
|
||||
#
|
||||
# To create clones of this service:
|
||||
# 1) By default SERVICE_NAME=tomcat. When cloned, the value must be defined
|
||||
# before tomcat-sysd is called.
|
||||
# 2) Create /etc/sysconfig/${SERVICE_NAME} from /etc/sysconfig/tomcat
|
||||
# to override tomcat defaults
|
||||
|
||||
[Unit]
|
||||
Description=Apache Tomcat Web Application Container JSVC wrapper
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
EnvironmentFile=/etc/tomcat/tomcat.conf
|
||||
Environment="NAME=" "USE_JSVC=true"
|
||||
EnvironmentFile=-/etc/sysconfig/tomcat
|
||||
ExecStart=/usr/libexec/tomcat/server start
|
||||
ExecStop=/usr/libexec/tomcat/server stop
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -0,0 +1,11 @@
|
|||
log4j.rootLogger=debug, R
|
||||
log4j.appender.R=org.apache.log4j.RollingFileAppender
|
||||
log4j.appender.R.File=${catalina.base}/logs/tomcat.log
|
||||
log4j.appender.R.MaxFileSize=10MB
|
||||
log4j.appender.R.MaxBackupIndex=10
|
||||
log4j.appender.R.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
|
||||
log4j.logger.org.apache.catalina=DEBUG, R
|
||||
log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=DEBUG, R
|
||||
log4j.logger.org.apache.catalina.core=DEBUG, R
|
||||
log4j.logger.org.apache.catalina.session=DEBUG, R
|
|
@ -0,0 +1,17 @@
|
|||
--- conf/tomcat-users.xml~ 2008-01-28 17:41:06.000000000 -0500
|
||||
+++ conf/tomcat-users.xml 2008-03-07 19:40:07.000000000 -0500
|
||||
@@ -23,4 +23,14 @@
|
||||
<user username="both" password="<must-be-changed>" roles="tomcat,role1"/>
|
||||
<user username="role1" password="<must-be-changed>" roles="role1"/>
|
||||
-->
|
||||
+
|
||||
+<!-- <role rolename="admin"/> -->
|
||||
+<!-- <role rolename="admin-gui"/> -->
|
||||
+<!-- <role rolename="admin-script"/> -->
|
||||
+<!-- <role rolename="manager"/> -->
|
||||
+<!-- <role rolename="manager-gui"/> -->
|
||||
+<!-- <role rolename="manager-script"/> -->
|
||||
+<!-- <role rolename="manager-jmx"/> -->
|
||||
+<!-- <role rolename="manager-status"/> -->
|
||||
+<!-- <user name="admin" password="<must-be-changed>" roles="admin,manager,admin-gui,admin-script,manager-gui,manager-script,manager-jmx,manager-status" /> -->
|
||||
</tomcat-users>
|
|
@ -0,0 +1,45 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# tomcat-digest script
|
||||
# JPackage Project <http://www.jpackage.org/>
|
||||
|
||||
# Source functions library
|
||||
if [ -f /usr/share/java-utils/java-functions ] ; then
|
||||
. /usr/share/java-utils/java-functions
|
||||
else
|
||||
echo "Can't find functions library, aborting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Get the tomcat config (use this for environment specific settings)
|
||||
if [ -z "${TOMCAT_CFG}" ]; then
|
||||
TOMCAT_CFG="/etc/tomcat/tomcat.conf"
|
||||
fi
|
||||
|
||||
if [ -r "$TOMCAT_CFG" ]; then
|
||||
. $TOMCAT_CFG
|
||||
fi
|
||||
|
||||
set_javacmd
|
||||
|
||||
# CLASSPATH munging
|
||||
if [ -n "$JSSE_HOME" ]; then
|
||||
CLASSPATH="${CLASSPATH}:$(build-classpath jcert jnet jsse 2>/dev/null)"
|
||||
fi
|
||||
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/bootstrap.jar"
|
||||
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/tomcat-juli.jar"
|
||||
export CLASSPATH
|
||||
|
||||
# Configuration
|
||||
MAIN_CLASS="org.apache.catalina.startup.Tool"
|
||||
BASE_OPTIONS=""
|
||||
BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\""
|
||||
BASE_JARS="commons-daemon tomcat/catalina servlet tomcat/tomcat-util tomcat/tomcat-coyote tomcat/tomcat-api tomcat/tomcat-util-scan"
|
||||
|
||||
# Set parameters
|
||||
set_classpath $BASE_JARS
|
||||
set_flags $BASE_FLAGS
|
||||
set_options $BASE_OPTIONS
|
||||
|
||||
# Let's start
|
||||
run "$@"
|
|
@ -0,0 +1,24 @@
|
|||
--- java/org/apache/jasper/compiler/JDTCompiler.java~ 2016-07-01 14:39:19.728255958 -0400
|
||||
+++ java/org/apache/jasper/compiler/JDTCompiler.java 2016-07-01 14:39:37.191311760 -0400
|
||||
@@ -312,9 +312,6 @@
|
||||
} else if(opt.equals("1.8")) {
|
||||
settings.put(CompilerOptions.OPTION_Source,
|
||||
CompilerOptions.VERSION_1_8);
|
||||
- } else if(opt.equals("1.9")) {
|
||||
- settings.put(CompilerOptions.OPTION_Source,
|
||||
- CompilerOptions.VERSION_1_9);
|
||||
} else {
|
||||
log.warn("Unknown source VM " + opt + " ignored.");
|
||||
settings.put(CompilerOptions.OPTION_Source,
|
||||
@@ -361,11 +358,6 @@
|
||||
CompilerOptions.VERSION_1_8);
|
||||
settings.put(CompilerOptions.OPTION_Compliance,
|
||||
CompilerOptions.VERSION_1_8);
|
||||
- } else if(opt.equals("1.9")) {
|
||||
- settings.put(CompilerOptions.OPTION_TargetPlatform,
|
||||
- CompilerOptions.VERSION_1_9);
|
||||
- settings.put(CompilerOptions.OPTION_Compliance,
|
||||
- CompilerOptions.VERSION_1_9);
|
||||
} else {
|
||||
log.warn("Unknown target VM " + opt + " ignored.");
|
||||
settings.put(CompilerOptions.OPTION_TargetPlatform,
|
|
@ -0,0 +1,52 @@
|
|||
# System-wide configuration file for tomcat services
|
||||
# This will be loaded by systemd as an environment file,
|
||||
# so please keep the syntax. For shell expansion support
|
||||
# place your custom files as /etc/tomcat/conf.d/*.conf
|
||||
#
|
||||
# There are 2 "classes" of startup behavior in this package.
|
||||
# The old one, the default service named tomcat.service.
|
||||
# The new named instances are called tomcat@instance.service.
|
||||
#
|
||||
# Use this file to change default values for all services.
|
||||
# Change the service specific ones to affect only one service.
|
||||
# For tomcat.service it's /etc/sysconfig/tomcat, for
|
||||
# tomcat@instance it's /etc/sysconfig/tomcat@instance.
|
||||
|
||||
# This variable is used to figure out if config is loaded or not.
|
||||
TOMCAT_CFG_LOADED="1"
|
||||
|
||||
# In new-style instances, if CATALINA_BASE isn't specified, it will
|
||||
# be constructed by joining TOMCATS_BASE and NAME.
|
||||
TOMCATS_BASE="/var/lib/tomcats/"
|
||||
|
||||
# Where your java installation lives
|
||||
JAVA_HOME="/usr/lib/jvm/jre"
|
||||
|
||||
# Where your tomcat installation lives
|
||||
CATALINA_HOME="@@@TCHOME@@@"
|
||||
|
||||
# System-wide tmp
|
||||
CATALINA_TMPDIR="/var/cache/tomcat/temp"
|
||||
|
||||
# You can pass some parameters to java here if you wish to
|
||||
#JAVA_OPTS="-Xminf0.1 -Xmaxf0.3"
|
||||
|
||||
# Use JAVA_OPTS to set java.library.path for libtcnative.so
|
||||
#JAVA_OPTS="-Djava.library.path=/usr/lib"
|
||||
|
||||
# Set default javax.sql.DataSource factory to apache commons one. See rhbz#1214381
|
||||
JAVA_OPTS="-Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory"
|
||||
|
||||
# You can change your tomcat locale here
|
||||
#LANG="en_US"
|
||||
|
||||
# Run tomcat under the Java Security Manager
|
||||
SECURITY_MANAGER="false"
|
||||
|
||||
# Time to wait in seconds, before killing process
|
||||
# TODO(stingray): does nothing, fix.
|
||||
# SHUTDOWN_WAIT="30"
|
||||
|
||||
# If you wish to further customize your tomcat environment,
|
||||
# put your own definitions here
|
||||
# (i.e. LD_LIBRARY_PATH for some jdbc drivers)
|
|
@ -0,0 +1,8 @@
|
|||
@@@TCLOG@@@/catalina.out {
|
||||
copytruncate
|
||||
weekly
|
||||
rotate 52
|
||||
compress
|
||||
missingok
|
||||
create 0644 tomcat tomcat
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
# Systemd unit file for default tomcat
|
||||
#
|
||||
# To create clones of this service:
|
||||
# DO NOTHING, use tomcat@.service instead.
|
||||
|
||||
[Unit]
|
||||
Description=Apache Tomcat Web Application Container
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
EnvironmentFile=/etc/tomcat/tomcat.conf
|
||||
Environment="NAME="
|
||||
EnvironmentFile=-/etc/sysconfig/tomcat
|
||||
ExecStart=/usr/libexec/tomcat/server start
|
||||
SuccessExitStatus=143
|
||||
User=tomcat
|
||||
Group=tomcat
|
||||
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -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.
|
|
@ -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
|
|
@ -0,0 +1,12 @@
|
|||
Manifest-Version: 1.0
|
||||
Export-Package: org.apache.tomcat;version="8.0.26"
|
||||
Bundle-Vendor: %bundleProvider
|
||||
Bundle-ClassPath: .
|
||||
Bundle-Version: 8.0.26
|
||||
Bundle-Name: %bundleName
|
||||
Bundle-Localization: plugin
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-SymbolicName: org.apache.tomcat
|
||||
Bundle-RequiredExecutionEnvironment: J2SE-1.4,CDC-1.0/Foundation-1.0,J
|
||||
2SE-1.3
|
||||
|
|
@ -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
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
Manifest-Version: 1.0
|
||||
Export-Package: org.apache.juli;version="8.0.26",org.apache.juli.loggi
|
||||
ng;version="8.0.26"
|
||||
Bundle-Vendor: %bundleProvider
|
||||
Bundle-ClassPath: .
|
||||
Bundle-Version: 8.0.26
|
||||
Bundle-Name: %bundleName
|
||||
Bundle-Localization: plugin
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-SymbolicName: org.apache.juli
|
||||
Bundle-RequiredExecutionEnvironment: J2SE-1.4,CDC-1.0/Foundation-1.0,J
|
||||
2SE-1.3
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
# Systemd unit file for tomcat instances.
|
||||
#
|
||||
# To create clones of this service:
|
||||
# 0. systemctl enable tomcat@name.service
|
||||
# 1. create catalina.base directory structure in
|
||||
# /var/lib/tomcats/name
|
||||
# 2. profit.
|
||||
|
||||
[Unit]
|
||||
Description=Apache Tomcat Web Application Container
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
EnvironmentFile=/etc/tomcat/tomcat.conf
|
||||
Environment="NAME=%I"
|
||||
EnvironmentFile=-/etc/sysconfig/tomcat@%I
|
||||
ExecStart=/usr/libexec/tomcat/server start
|
||||
ExecStop=/usr/libexec/tomcat/server stop
|
||||
SuccessExitStatus=143
|
||||
User=tomcat
|
||||
Group=tomcat
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
@ -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
|
|
@ -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
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue