Compare commits
83 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a174585603 | ||
|
|
9563f11b9e | ||
|
|
4ac0942113 | ||
|
|
208522a9f2 | ||
|
|
3509fc4b4b | ||
|
|
0e6b8f1b04 | ||
|
|
2f8bca3680 | ||
|
|
3ab821b1f1 | ||
|
|
4f8faf67f2 | ||
|
|
bee90cc445 | ||
|
|
53af7d2339 | ||
|
|
b3f5333fe2 | ||
|
|
90835a7334 | ||
|
|
5ac49193ad | ||
|
|
3d2693a555 | ||
|
|
86ec90907e | ||
|
|
05293ee2a3 | ||
|
|
5d15171717 | ||
|
|
69c429d628 | ||
|
|
715415eccc | ||
|
|
6ddb487a2a | ||
|
|
4b33f22df6 | ||
|
|
ddf0b328a1 | ||
|
|
b2405bc450 | ||
|
|
04ebf2cc89 | ||
|
|
ac5e3ee050 | ||
|
|
1e5a896367 | ||
|
|
49ac0f639e | ||
|
|
4b8fa750e7 | ||
|
|
e12e1e78e7 | ||
|
|
db12ab1d5e | ||
|
|
0e797f55f0 | ||
|
|
cd0ac4a1ff | ||
|
|
bfc4824563 | ||
|
|
7ea089f878 | ||
|
|
e84a075a5a | ||
|
|
e7435cfab3 | ||
|
|
449935b9ad | ||
|
|
99a8151268 | ||
|
|
53a0501e50 | ||
|
|
2d519e3c75 | ||
|
|
25759ac67c | ||
|
|
5a42e79227 | ||
|
|
35e239433c | ||
|
|
36a3e9ffec | ||
|
|
79044f754b | ||
|
|
817844a3cd | ||
|
|
7cac3fa020 | ||
|
|
8c1e26a724 | ||
|
|
109dad6dbb | ||
|
|
bac4255793 | ||
|
|
694a006876 | ||
|
|
bbe9e2eb9c | ||
|
|
93f643e335 | ||
|
|
56cc1dee84 | ||
|
|
8e804f0efd | ||
|
|
24b2b7a82d | ||
|
|
aa5454a96d | ||
|
|
b225805ced | ||
|
|
da5404f2d4 | ||
|
|
f277685a28 | ||
|
|
7e95d02801 | ||
|
|
cecdb36d07 | ||
|
|
6ed748d8f6 | ||
|
|
5eb026baf5 | ||
|
|
ae0ef248d6 | ||
|
|
9661f8da0d | ||
|
|
a6c97575bf | ||
|
|
c091d4485f | ||
|
|
0e914b1053 | ||
|
|
7dc9c669e5 | ||
|
|
2f93af69c5 | ||
|
|
2147fa0d4a | ||
|
|
be363bfbe6 | ||
|
|
1054595cbf | ||
|
|
5e8d8f6599 | ||
|
|
181e718899 | ||
|
|
c16cb96349 | ||
|
|
84f3874ac9 | ||
|
|
2a1fbf0f3d | ||
|
|
fb74d36077 | ||
|
|
a0886b4640 | ||
|
|
f5590977b9 |
46 changed files with 1775 additions and 1311 deletions
|
|
@ -1 +0,0 @@
|
|||
1
|
||||
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -1,4 +1,4 @@
|
|||
apache-tomcat-*-src.tar.gz
|
||||
results_tomcat
|
||||
tomcat*.src.rpm
|
||||
apache-tomcat-*-src/
|
||||
apache-tomcat-*-src
|
||||
results_tomcat/
|
||||
tomcat*src.rpm
|
||||
|
|
|
|||
38
.packit.yaml
38
.packit.yaml
|
|
@ -1,38 +0,0 @@
|
|||
# See the documentation for more information:
|
||||
# https://packit.dev/docs/configuration/
|
||||
|
||||
create_sync_note: false
|
||||
|
||||
upstream_project_url: https://github.com/apache/tomcat.git
|
||||
|
||||
issue_repository: https://src.fedoraproject.org/rpms/tomcat
|
||||
|
||||
jobs:
|
||||
# https://packit.dev/docs/configuration/downstream/pull_from_upstream
|
||||
# Make sure there is Fedora mapping for the 'tomcat' project in https://release-monitoring.org/projects/search/?pattern=tomcat
|
||||
# Make sure Monitoring status on the left side at https://src.fedoraproject.org/rpms/tomcat is set to Monitoring
|
||||
- job: pull_from_upstream
|
||||
trigger: release
|
||||
dist_git_branches:
|
||||
- fedora-branched
|
||||
|
||||
# https://packit.dev/docs/configuration/downstream/koji_build
|
||||
- job: koji_build
|
||||
trigger: commit
|
||||
dist_git_branches:
|
||||
- fedora-all
|
||||
|
||||
- job: koji_build
|
||||
trigger: commit
|
||||
scratch: true
|
||||
allowed_pr_authors: ['all_admins', 'all_committers']
|
||||
allowed_committers: ['all_admins', 'all_committers']
|
||||
dist_git_branches:
|
||||
- fedora-all
|
||||
|
||||
# https://packit.dev/docs/configuration/downstream/bodhi_update
|
||||
- job: bodhi_update
|
||||
trigger: commit
|
||||
allowed_builders: ['packit', 'all_admins']
|
||||
dist_git_branches:
|
||||
- fedora-branched # rawhide updates are created automatically
|
||||
222
change-defaults-for-CVE-2020-1938.patch
Normal file
222
change-defaults-for-CVE-2020-1938.patch
Normal file
|
|
@ -0,0 +1,222 @@
|
|||
diff -up ./java/org/apache/coyote/ajp/AbstractAjpProtocol.java.orig ./java/org/apache/coyote/ajp/AbstractAjpProtocol.java
|
||||
--- ./java/org/apache/coyote/ajp/AbstractAjpProtocol.java.orig 2020-03-16 04:41:13.000000000 -0400
|
||||
+++ ./java/org/apache/coyote/ajp/AbstractAjpProtocol.java 2020-04-22 15:42:50.544106513 -0400
|
||||
@@ -134,7 +134,7 @@ public abstract class AbstractAjpProtoco
|
||||
}
|
||||
|
||||
|
||||
- private boolean secretRequired = true;
|
||||
+ private boolean secretRequired = false;
|
||||
public void setSecretRequired(boolean secretRequired) {
|
||||
this.secretRequired = secretRequired;
|
||||
}
|
||||
diff -up ./java/org/apache/coyote/ajp/AjpAprProtocol.java.orig ./java/org/apache/coyote/ajp/AjpAprProtocol.java
|
||||
--- ./java/org/apache/coyote/ajp/AjpAprProtocol.java.orig 2020-03-16 04:41:13.000000000 -0400
|
||||
+++ ./java/org/apache/coyote/ajp/AjpAprProtocol.java 2020-04-22 15:42:50.544106513 -0400
|
||||
@@ -20,7 +20,6 @@ import org.apache.coyote.AbstractProtoco
|
||||
import org.apache.coyote.Processor;
|
||||
import org.apache.juli.logging.Log;
|
||||
import org.apache.juli.logging.LogFactory;
|
||||
-import org.apache.tomcat.util.compat.JreCompat;
|
||||
import org.apache.tomcat.util.net.AbstractEndpoint;
|
||||
import org.apache.tomcat.util.net.AprEndpoint;
|
||||
import org.apache.tomcat.util.net.AprEndpoint.Handler;
|
||||
@@ -62,7 +61,6 @@ public class AjpAprProtocol extends Abst
|
||||
|
||||
public AjpAprProtocol() {
|
||||
endpoint = new AprEndpoint();
|
||||
- endpoint.setAddress(JreCompat.getInstance().getLoopbackAddress());
|
||||
cHandler = new AjpConnectionHandler(this);
|
||||
((AprEndpoint) endpoint).setHandler(cHandler);
|
||||
setSoLinger(Constants.DEFAULT_CONNECTION_LINGER);
|
||||
diff -up ./java/org/apache/coyote/ajp/AjpNioProtocol.java.orig ./java/org/apache/coyote/ajp/AjpNioProtocol.java
|
||||
--- ./java/org/apache/coyote/ajp/AjpNioProtocol.java.orig 2020-03-16 04:41:13.000000000 -0400
|
||||
+++ ./java/org/apache/coyote/ajp/AjpNioProtocol.java 2020-04-22 15:42:50.545106511 -0400
|
||||
@@ -23,7 +23,6 @@ import org.apache.coyote.AbstractProtoco
|
||||
import org.apache.coyote.Processor;
|
||||
import org.apache.juli.logging.Log;
|
||||
import org.apache.juli.logging.LogFactory;
|
||||
-import org.apache.tomcat.util.compat.JreCompat;
|
||||
import org.apache.tomcat.util.net.AbstractEndpoint;
|
||||
import org.apache.tomcat.util.net.NioChannel;
|
||||
import org.apache.tomcat.util.net.NioEndpoint;
|
||||
@@ -57,7 +56,6 @@ public class AjpNioProtocol extends Abst
|
||||
|
||||
public AjpNioProtocol() {
|
||||
endpoint = new NioEndpoint();
|
||||
- endpoint.setAddress(JreCompat.getInstance().getLoopbackAddress());
|
||||
cHandler = new AjpConnectionHandler(this);
|
||||
((NioEndpoint) endpoint).setHandler(cHandler);
|
||||
setSoLinger(Constants.DEFAULT_CONNECTION_LINGER);
|
||||
diff -up ./java/org/apache/coyote/ajp/AjpProtocol.java.orig ./java/org/apache/coyote/ajp/AjpProtocol.java
|
||||
--- ./java/org/apache/coyote/ajp/AjpProtocol.java.orig 2020-03-16 04:41:13.000000000 -0400
|
||||
+++ ./java/org/apache/coyote/ajp/AjpProtocol.java 2020-04-22 15:42:50.545106511 -0400
|
||||
@@ -22,7 +22,6 @@ import org.apache.coyote.AbstractProtoco
|
||||
import org.apache.coyote.Processor;
|
||||
import org.apache.juli.logging.Log;
|
||||
import org.apache.juli.logging.LogFactory;
|
||||
-import org.apache.tomcat.util.compat.JreCompat;
|
||||
import org.apache.tomcat.util.net.AbstractEndpoint;
|
||||
import org.apache.tomcat.util.net.JIoEndpoint;
|
||||
import org.apache.tomcat.util.net.JIoEndpoint.Handler;
|
||||
@@ -58,7 +57,6 @@ public class AjpProtocol extends Abstrac
|
||||
|
||||
public AjpProtocol() {
|
||||
endpoint = new JIoEndpoint();
|
||||
- endpoint.setAddress(JreCompat.getInstance().getLoopbackAddress());
|
||||
cHandler = new AjpConnectionHandler(this);
|
||||
((JIoEndpoint) endpoint).setHandler(cHandler);
|
||||
setSoLinger(Constants.DEFAULT_CONNECTION_LINGER);
|
||||
diff -up ./java/org/apache/tomcat/util/compat/Jre7Compat.java.orig ./java/org/apache/tomcat/util/compat/Jre7Compat.java
|
||||
--- ./java/org/apache/tomcat/util/compat/Jre7Compat.java.orig 2020-03-16 04:41:15.000000000 -0400
|
||||
+++ ./java/org/apache/tomcat/util/compat/Jre7Compat.java 2020-04-22 15:42:50.546106509 -0400
|
||||
@@ -20,7 +20,6 @@ import java.io.OutputStream;
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
-import java.net.InetAddress;
|
||||
import java.sql.CallableStatement;
|
||||
import java.sql.Connection;
|
||||
import java.sql.DatabaseMetaData;
|
||||
@@ -57,7 +56,6 @@ class Jre7Compat extends JreCompat {
|
||||
private static final Method resultSetGetObjectName;
|
||||
private static final Method statementCloseOnCompletion;
|
||||
private static final Method statementIsCloseOnCompletion;
|
||||
- private static final Method getLoopbackAddress;
|
||||
|
||||
static {
|
||||
Method m1 = null;
|
||||
@@ -74,7 +72,6 @@ class Jre7Compat extends JreCompat {
|
||||
Method m12 = null;
|
||||
Method m13 = null;
|
||||
Method m14 = null;
|
||||
- Method m15 = null;
|
||||
Constructor<GZIPOutputStream> c = null;
|
||||
try {
|
||||
// Order is important for the error handling below.
|
||||
@@ -94,7 +91,6 @@ class Jre7Compat extends JreCompat {
|
||||
m12 = ResultSet.class.getMethod("getObject", String.class, Class.class);
|
||||
m13 = Statement.class.getMethod("closeOnCompletion");
|
||||
m14 = Statement.class.getMethod("isCloseOnCompletion");
|
||||
- m15 = InetAddress.class.getMethod("getLoopbackAddress");
|
||||
} catch (SecurityException e) {
|
||||
// Should never happen
|
||||
log.error(sm.getString("jre7Compat.unexpected"), e);
|
||||
@@ -122,7 +118,6 @@ class Jre7Compat extends JreCompat {
|
||||
resultSetGetObjectName = m12;
|
||||
statementCloseOnCompletion = m13;
|
||||
statementIsCloseOnCompletion = m14;
|
||||
- getLoopbackAddress = m15;
|
||||
}
|
||||
|
||||
|
||||
@@ -357,20 +352,6 @@ class Jre7Compat extends JreCompat {
|
||||
}
|
||||
}
|
||||
|
||||
-
|
||||
- @Override
|
||||
- public InetAddress getLoopbackAddress() {
|
||||
- try {
|
||||
- return (InetAddress) getLoopbackAddress.invoke(null);
|
||||
- } catch (IllegalArgumentException e) {
|
||||
- throw new UnsupportedOperationException(e);
|
||||
- } catch (IllegalAccessException e) {
|
||||
- throw new UnsupportedOperationException(e);
|
||||
- } catch (InvocationTargetException e) {
|
||||
- throw new UnsupportedOperationException(e);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
|
||||
// Java 9 methods
|
||||
|
||||
diff -up ./java/org/apache/tomcat/util/compat/JreCompat.java.orig ./java/org/apache/tomcat/util/compat/JreCompat.java
|
||||
--- ./java/org/apache/tomcat/util/compat/JreCompat.java.orig 2020-03-16 04:41:15.000000000 -0400
|
||||
+++ ./java/org/apache/tomcat/util/compat/JreCompat.java 2020-04-22 15:42:50.547106507 -0400
|
||||
@@ -21,10 +21,8 @@ import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.lang.reflect.AccessibleObject;
|
||||
import java.lang.reflect.Method;
|
||||
-import java.net.InetAddress;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
-import java.net.UnknownHostException;
|
||||
import java.sql.CallableStatement;
|
||||
import java.sql.Connection;
|
||||
import java.sql.DatabaseMetaData;
|
||||
@@ -234,32 +232,6 @@ public class JreCompat {
|
||||
}
|
||||
|
||||
|
||||
- public InetAddress getLoopbackAddress() {
|
||||
- // Javadoc for getByName() states that calling with null will return one
|
||||
- // of the loopback addresses
|
||||
- InetAddress result = null;
|
||||
- try {
|
||||
- result = InetAddress.getByName(null);
|
||||
- } catch (UnknownHostException e) {
|
||||
- // This would be unusual but ignore it in this case.
|
||||
- }
|
||||
- if (result == null) {
|
||||
- // Fallback to default IPv4 loopback address.
|
||||
- // Not perfect but good enough and if the address is not valid the
|
||||
- // bind will fail later with an appropriate error message
|
||||
- try {
|
||||
- result = InetAddress.getByName("127.0.0.1");
|
||||
- } catch (UnknownHostException e) {
|
||||
- // Unreachable.
|
||||
- // For text representations of IP addresses only the format is
|
||||
- // checked.
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- return result;
|
||||
- }
|
||||
-
|
||||
-
|
||||
// Java 6 implementation of Java 8 methods
|
||||
|
||||
public static boolean isJre8Available() {
|
||||
diff -up ./webapps/docs/changelog.xml.orig ./webapps/docs/changelog.xml
|
||||
--- ./webapps/docs/changelog.xml.orig 2020-03-16 04:41:18.000000000 -0400
|
||||
+++ ./webapps/docs/changelog.xml 2020-04-22 15:42:50.554106492 -0400
|
||||
@@ -260,14 +260,10 @@
|
||||
Disable (comment out in server.xml) the AJP/1.3 connector by default.
|
||||
(markt)
|
||||
</update>
|
||||
- <update>
|
||||
- Change the default bind address for the AJP/1.3 connector to be the
|
||||
- loopback address. (markt)
|
||||
- </update>
|
||||
<add>
|
||||
Rename the <code>requiredSecret</code> attribute of the AJP/1.3
|
||||
Connector to <code>secret</code> and add a new attribute
|
||||
- <code>secretRequired</code> that defaults to <code>true</code>. When
|
||||
+ <code>secretRequired</code> that defaults to <code>false</code>. When
|
||||
<code>secretRequired</code> is <code>true</code> the AJP/1.3 Connector
|
||||
will not start unless the <code>secret</code> attribute is configured to
|
||||
a non-null, non-zero length String. (markt)
|
||||
diff -up ./webapps/docs/config/ajp.xml.orig ./webapps/docs/config/ajp.xml
|
||||
--- ./webapps/docs/config/ajp.xml.orig 2020-04-22 15:42:50.557106486 -0400
|
||||
+++ ./webapps/docs/config/ajp.xml 2020-04-22 15:44:54.425843527 -0400
|
||||
@@ -306,7 +306,9 @@
|
||||
<attribute name="address" required="false">
|
||||
<p>For servers with more than one IP address, this attribute specifies
|
||||
which address will be used for listening on the specified port. By
|
||||
- default, the connector will listen on the loopback address. Unless the JVM
|
||||
+ default, this port will be used on all IP addresses associated with the
|
||||
+ server. A value of <code>127.0.0.1</code> indicates that the Connector
|
||||
+ will only listen on the loopback interface. Unless the JVM
|
||||
is configured otherwise using system properties, the Java based connectors
|
||||
(BIO, NIO) will listen on both IPv4 and IPv6 addresses when configured
|
||||
with either <code>0.0.0.0</code> or <code>::</code>. The APR/native
|
||||
@@ -483,7 +485,7 @@
|
||||
the <strong>secret</strong> attribute is required to be specified for the
|
||||
AJP Connector to start. It <strong>does not</strong> control whether
|
||||
workers are required to provide the secret. The default value is
|
||||
- <code>true</code>. This attribute should only be set to <code>false</code>
|
||||
+ <code>false</code>. This attribute should only be set to <code>false</code>
|
||||
when the Connector is used on a trusted network.</p>
|
||||
</attribute>
|
||||
|
||||
1
ci.fmf
1
ci.fmf
|
|
@ -1 +0,0 @@
|
|||
resultsdb-testcase: separate
|
||||
13
el-api-OSGi-MANIFEST.MF
Normal file
13
el-api-OSGi-MANIFEST.MF
Normal file
|
|
@ -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
|
||||
|
||||
20
gating.yaml
20
gating.yaml
|
|
@ -1,20 +0,0 @@
|
|||
--- !Policy
|
||||
product_versions:
|
||||
- fedora-rawhide
|
||||
decision_contexts:
|
||||
- bodhi_update_push_stable
|
||||
- bodhi_update_push_testing
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpmdeplint.functional}
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_contexts:
|
||||
- bodhi_update_push_stable
|
||||
- bodhi_update_push_testing
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpminspect.static-analysis}
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.installability.functional}
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/javapackages.functional}
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/smoke.functional}
|
||||
40
jasper-OSGi-MANIFEST.MF
Normal file
40
jasper-OSGi-MANIFEST.MF
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
Manifest-Version: 1.0
|
||||
Export-Package: org.apache.jasper;version="7.0.21",org.apache.jasper.c
|
||||
ompiler;version="7.0.21",org.apache.jasper.compiler.tagplugin;version
|
||||
="7.0.21",org.apache.jasper.resources;version="7.0.21",org.apache.jas
|
||||
per.runtime;version="7.0.21",org.apache.jasper.security;version="7.0.
|
||||
19",org.apache.jasper.servlet;version="7.0.21",org.apache.jasper.tagp
|
||||
lugins.jstl;version="7.0.21",org.apache.jasper.tagplugins.jstl.core;v
|
||||
ersion="7.0.21",org.apache.jasper.util;version="7.0.21",org.apache.ja
|
||||
sper.xmlparser;version="7.0.21"
|
||||
Bundle-Vendor: %bundleProvider
|
||||
Bundle-ClassPath: .
|
||||
Bundle-Version: 7.0.21
|
||||
Bundle-Localization: plugin
|
||||
Bundle-Name: %bundleName
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-SymbolicName: org.apache.jasper
|
||||
Import-Package: javax.servlet;version="[2.4.0, 3.0.0]",javax.servlet.h
|
||||
ttp;version="[2.4.0, 3.0.0]",javax.servlet.jsp;version="[2.0.0, 2.2.0
|
||||
]",javax.servlet.jsp.el;version="[2.0.0, 2.2.0]",javax.servlet.jsp.re
|
||||
sources;version="[2.0.0, 2.2.0]",javax.servlet.jsp.tagext;version="[2
|
||||
.0.0, 2.2.0]",javax.servlet.resources;version="[2.4.0, 3.0.0]",javax.
|
||||
xml.parsers,org.apache.commons.el;version="[1.0.0,2.0.0)",org.apache.
|
||||
commons.logging;version="[1.0.0,2.0.0)",org.apache.tools.ant;resoluti
|
||||
on:=optional,org.apache.tools.ant.taskdefs;resolution:=optional,org.a
|
||||
pache.tools.ant.types;resolution:=optional,org.apache.tools.ant.util;
|
||||
resolution:=optional,org.w3c.dom,org.xml.sax,org.xml.sax.ext,org.xml.
|
||||
sax.helpers,org.apache.tomcat;version="7.0.21",org.apache.juli.loggin
|
||||
g;version="7.0.21",javax.el;version="2.2.0",org.eclipse.jdt.internal.
|
||||
compiler,org.eclipse.jdt.internal.compiler.parser,org.eclipse.jdt.int
|
||||
ernal.compiler.parser.diagnose,org.eclipse.jdt.internal.compiler.flow
|
||||
,org.eclipse.jdt.internal.compiler.util,org.eclipse.jdt.internal.comp
|
||||
iler.impl,org.eclipse.jdt.internal.compiler.lookup,org.eclipse.jdt.in
|
||||
ternal.compiler.codegen,org.eclipse.jdt.internal.compiler.batch,org.e
|
||||
clipse.jdt.internal.compiler.classfmt,org.eclipse.jdt.internal.compil
|
||||
er.ast,org.eclipse.jdt.internal.compiler.problem,org.eclipse.jdt.inte
|
||||
rnal.compiler.env,org.eclipse.jdt.internal.core.util,org.eclipse.jdt.
|
||||
core.compiler
|
||||
Bundle-RequiredExecutionEnvironment: J2SE-1.4,CDC-1.0/Foundation-1.0,J
|
||||
2SE-1.3
|
||||
|
||||
13
jasper-el-OSGi-MANIFEST.MF
Normal file
13
jasper-el-OSGi-MANIFEST.MF
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
Manifest-Version: 1.0
|
||||
Export-Package: org.apache.el;version="7.0.21"
|
||||
Bundle-Vendor: %bundleProvider
|
||||
Bundle-ClassPath: .
|
||||
Bundle-Version: 7.0.21
|
||||
Bundle-Name: %bundleName
|
||||
Bundle-Localization: plugin
|
||||
Bundle-ManifestVersion: 2
|
||||
Import-Package: javax.el;version="2.2"
|
||||
Bundle-SymbolicName: org.apache.el
|
||||
Bundle-RequiredExecutionEnvironment: J2SE-1.4,CDC-1.0/Foundation-1.0,J
|
||||
2SE-1.3
|
||||
|
||||
13
jsp-api-OSGi-MANIFEST.MF
Normal file
13
jsp-api-OSGi-MANIFEST.MF
Normal file
|
|
@ -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"
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
# Add the module start-up parameters required by Tomcat
|
||||
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.lang=ALL-UNNAMED"
|
||||
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.io=ALL-UNNAMED"
|
||||
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.util=ALL-UNNAMED"
|
||||
JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.util.concurrent=ALL-UNNAMED"
|
||||
JAVA_OPTS="$JAVA_OPTS --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED"
|
||||
export JAVA_OPTS
|
||||
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
summary: Run javapackages-specific tests
|
||||
discover:
|
||||
how: fmf
|
||||
url: https://src.fedoraproject.org/tests/javapackages
|
||||
ref: f42
|
||||
execute:
|
||||
how: tmt
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
discover:
|
||||
how: fmf
|
||||
url: https://src.fedoraproject.org/tests/tomcat
|
||||
execute:
|
||||
how: tmt
|
||||
|
|
@ -1,215 +0,0 @@
|
|||
--- build.xml.orig 2024-08-02 18:14:43.000000000 +0300
|
||||
+++ build.xml 2024-08-19 13:56:38.991730088 +0300
|
||||
@@ -1121,7 +1121,7 @@
|
||||
filesDir="${tomcat.classes}"
|
||||
filesId="files.annotations-api"
|
||||
manifest="${tomcat.manifests}/annotations-api.jar.manifest"
|
||||
- addOSGi="true" />
|
||||
+ addOSGi="false" />
|
||||
|
||||
<!-- Servlet Implementation JAR File -->
|
||||
<jarIt jarfile="${servlet-api.jar}"
|
||||
@@ -1130,48 +1130,48 @@
|
||||
manifest="${tomcat.manifests}/servlet-api.jar.manifest"
|
||||
notice="${tomcat.manifests}/servlet-api.jar.notice"
|
||||
license="${tomcat.manifests}/servlet-api.jar.license"
|
||||
- addOSGi="true" />
|
||||
+ addOSGi="false" />
|
||||
|
||||
<!-- EL Implementation JAR File -->
|
||||
<jarIt jarfile="${el-api.jar}"
|
||||
filesDir="${tomcat.classes}"
|
||||
filesId="files.el-api"
|
||||
manifest="${tomcat.manifests}/el-api.jar.manifest"
|
||||
- addOSGi="true" />
|
||||
+ addOSGi="false" />
|
||||
|
||||
<!-- JSP Implementation JAR File -->
|
||||
<jarIt jarfile="${jsp-api.jar}"
|
||||
filesDir="${tomcat.classes}"
|
||||
filesId="files.jsp-api"
|
||||
manifest="${tomcat.manifests}/jsp-api.jar.manifest"
|
||||
- addOSGi="true" />
|
||||
+ addOSGi="false" />
|
||||
|
||||
<!-- WebSocket API JAR File -->
|
||||
<jarIt jarfile="${websocket-api.jar}"
|
||||
filesDir="${tomcat.classes}"
|
||||
filesId="files.websocket-api"
|
||||
manifest="${tomcat.manifests}/websocket-api.jar.manifest"
|
||||
- addOSGi="true" />
|
||||
+ addOSGi="false" />
|
||||
|
||||
<!-- WebSocket Client API JAR File -->
|
||||
<jarIt jarfile="${websocket-client-api.jar}"
|
||||
filesDir="${tomcat.classes}"
|
||||
filesId="files.websocket-client-api"
|
||||
manifest="${tomcat.manifests}/websocket-client-api.jar.manifest"
|
||||
- addOSGi="true" />
|
||||
+ addOSGi="false" />
|
||||
|
||||
<!-- JASPIC API JAR File -->
|
||||
<jarIt jarfile="${jaspic-api.jar}"
|
||||
filesDir="${tomcat.classes}"
|
||||
filesId="files.jaspic-api"
|
||||
manifest="${tomcat.manifests}/jaspic-api.jar.manifest"
|
||||
- addOSGi="true" />
|
||||
+ addOSGi="false" />
|
||||
|
||||
<!-- Tomcat-juli JAR File -->
|
||||
<jarIt jarfile="${tomcat-juli.jar}"
|
||||
filesDir="${tomcat.classes}"
|
||||
filesId="files.tomcat-juli"
|
||||
- addOSGi="true" />
|
||||
+ addOSGi="false" />
|
||||
|
||||
<!-- Bootstrap JAR File -->
|
||||
<jarIt jarfile="${bootstrap.jar}"
|
||||
@@ -1183,68 +1183,68 @@
|
||||
<jarIt jarfile="${tomcat-util.jar}"
|
||||
filesDir="${tomcat.classes}"
|
||||
filesId="files.tomcat-util"
|
||||
- addOSGi="true" />
|
||||
+ addOSGi="false" />
|
||||
|
||||
<!-- Tomcat API JAR File -->
|
||||
<jarIt jarfile="${tomcat-api.jar}"
|
||||
filesDir="${tomcat.classes}"
|
||||
filesId="files.tomcat-api"
|
||||
- addOSGi="true" />
|
||||
+ addOSGi="false" />
|
||||
|
||||
<!-- Tomcat Util Scan JAR File -->
|
||||
<jarIt jarfile="${tomcat-util-scan.jar}"
|
||||
filesDir="${tomcat.classes}"
|
||||
filesId="files.tomcat-util-scan"
|
||||
- addOSGi="true" />
|
||||
+ addOSGi="false" />
|
||||
|
||||
<jarIt jarfile="${tomcat-jni.jar}"
|
||||
filesDir="${tomcat.classes}"
|
||||
filesId="files.tomcat-jni"
|
||||
- addOSGi="true" />
|
||||
+ addOSGi="false" />
|
||||
|
||||
<!-- Protocol handlers - Coyote -->
|
||||
<jarIt jarfile="${tomcat-coyote.jar}"
|
||||
filesDir="${tomcat.classes}"
|
||||
filesId="files.tomcat-coyote"
|
||||
- addOSGi="true" />
|
||||
+ addOSGi="false" />
|
||||
|
||||
<!-- OpenSSL FFM - Coyote -->
|
||||
<jarIt jarfile="${tomcat-coyote-ffm.jar}"
|
||||
filesDir="${tomcat.classes}"
|
||||
filesId="files.tomcat-coyote-ffm"
|
||||
manifest="${tomcat.manifests}/tomcat-coyote-ffm.jar.manifest"
|
||||
- addOSGi="true" />
|
||||
+ addOSGi="false" />
|
||||
|
||||
<!-- WebSocket implementation JAR File -->
|
||||
<jarIt jarfile="${tomcat-websocket.jar}"
|
||||
filesDir="${tomcat.classes}"
|
||||
filesId="files.tomcat-websocket"
|
||||
meta-inf="${tomcat.manifests}/tomcat-websocket.jar"
|
||||
- addOSGi="true" />
|
||||
+ addOSGi="false" />
|
||||
|
||||
<!-- Catalina GroupCom/Tribes JAR File -->
|
||||
<jarIt jarfile="${catalina-tribes.jar}"
|
||||
filesDir="${tomcat.classes}"
|
||||
filesId="files.catalina-tribes"
|
||||
- addOSGi="true" />
|
||||
+ addOSGi="false" />
|
||||
|
||||
<!-- Catalina Main JAR File -->
|
||||
<jarIt jarfile="${catalina.jar}"
|
||||
filesDir="${tomcat.classes}"
|
||||
filesId="files.catalina"
|
||||
- addOSGi="true" />
|
||||
+ addOSGi="false" />
|
||||
|
||||
<!-- Catalina Cluster/HA JAR File -->
|
||||
<jarIt jarfile="${catalina-ha.jar}"
|
||||
filesDir="${tomcat.classes}"
|
||||
filesId="files.catalina-ha"
|
||||
- addOSGi="true" />
|
||||
+ addOSGi="false" />
|
||||
|
||||
<!-- Server-Side Includes (SSI) -->
|
||||
<jarIt jarfile="${catalina-ssi.jar}"
|
||||
filesDir="${tomcat.classes}"
|
||||
filesId="files.catalina-ssi"
|
||||
- addOSGi="true" />
|
||||
+ addOSGi="false" />
|
||||
|
||||
<!-- Catalina Ant Tasks JAR File -->
|
||||
<jarIt jarfile="${catalina-ant.jar}"
|
||||
@@ -1255,27 +1255,27 @@
|
||||
<jarIt jarfile="${catalina-storeconfig.jar}"
|
||||
filesDir="${tomcat.classes}"
|
||||
filesId="files.catalina-storeconfig"
|
||||
- addOSGi="true" />
|
||||
+ addOSGi="false" />
|
||||
|
||||
<!-- Jasper EL Implementation JAR File -->
|
||||
<jarIt jarfile="${jasper-el.jar}"
|
||||
filesDir="${tomcat.classes}"
|
||||
filesId="files.jasper-el"
|
||||
meta-inf="${tomcat.manifests}/jasper-el.jar"
|
||||
- addOSGi="true" />
|
||||
+ addOSGi="false" />
|
||||
|
||||
<!-- Jasper Implementation JAR File -->
|
||||
<jarIt jarfile="${jasper.jar}"
|
||||
filesDir="${tomcat.classes}"
|
||||
filesId="files.jasper"
|
||||
meta-inf="${tomcat.manifests}/jasper.jar"
|
||||
- addOSGi="true" />
|
||||
+ addOSGi="false" />
|
||||
|
||||
<!-- Re-packaged Apache Commons DBCP 2-->
|
||||
<jarIt jarfile="${tomcat-dbcp.jar}"
|
||||
filesDir="${tomcat.classes}"
|
||||
filesId="files.tomcat-dbcp"
|
||||
- addOSGi="true" />
|
||||
+ addOSGi="false" />
|
||||
|
||||
<!-- i18n JARs -->
|
||||
<jar jarfile="${tomcat.build}/lib/tomcat-i18n-cs.jar"
|
||||
@@ -1748,7 +1748,7 @@
|
||||
filesId="files.tomcat-embed-core"
|
||||
notice="${tomcat.manifests}/servlet-api.jar.notice"
|
||||
license="${tomcat.manifests}/servlet-api.jar.license"
|
||||
- addOSGi="true"
|
||||
+ addOSGi="false"
|
||||
addGraal="true"
|
||||
graalPrefix="org.apache.tomcat.embed/tomcat-embed-core"
|
||||
graalFiles="res/graal/tomcat-embed-core/native-image"
|
||||
@@ -1756,7 +1756,7 @@
|
||||
<jarIt jarfile="${tomcat-embed-el.jar}"
|
||||
filesDir="${tomcat.classes}"
|
||||
filesId="files.tomcat-embed-el"
|
||||
- addOSGi="true"
|
||||
+ addOSGi="false"
|
||||
addGraal="true"
|
||||
graalPrefix="org.apache.tomcat.embed/tomcat-embed-el"
|
||||
graalFiles="res/graal/tomcat-embed-el/native-image"
|
||||
@@ -1765,7 +1765,7 @@
|
||||
filesDir="${tomcat.classes}"
|
||||
filesId="files.tomcat-embed-jasper"
|
||||
meta-inf="${tomcat.manifests}/jasper.jar"
|
||||
- addOSGi="true"
|
||||
+ addOSGi="false"
|
||||
addGraal="true"
|
||||
graalPrefix="org.apache.tomcat.embed/tomcat-embed-jasper"
|
||||
graalFiles="res/graal/tomcat-embed-jasper/native-image"
|
||||
@@ -1774,7 +1774,7 @@
|
||||
filesDir="${tomcat.classes}"
|
||||
filesId="files.tomcat-embed-websocket"
|
||||
meta-inf="${tomcat.manifests}/tomcat-websocket.jar"
|
||||
- addOSGi="true"
|
||||
+ addOSGi="false"
|
||||
addGraal="true"
|
||||
graalPrefix="org.apache.tomcat.embed/tomcat-embed-websocket"
|
||||
graalFiles="res/graal/tomcat-embed-websocket/native-image"
|
||||
17
servlet-api-OSGi-MANIFEST.MF
Normal file
17
servlet-api-OSGi-MANIFEST.MF
Normal file
|
|
@ -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"
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (apache-tomcat-10.1.46-src.tar.gz) = 4abb5a5fad013135c4107508e4530673e4af623658b6aff5c4fc18fd557dfca37b58a9c5c0479e52e240b53d469ad91a34225a80b718aa2f91b8d385d16d9682
|
||||
SHA512 (apache-tomcat-7.0.106-src.tar.gz) = 5ce5a5af93c58e69c4758c2c0dedeadeceb6be920421b9d3b3d071d32fc8eb59ba8312c98d037b8434fe43d57a9f720ad8790de29a26ed2959f6c761fe1fd573
|
||||
|
|
|
|||
|
|
@ -1,30 +0,0 @@
|
|||
--- java/org/apache/jasper/compiler/JDTCompiler.java.orig 2024-12-05 18:01:16.000000000 +0200
|
||||
+++ java/org/apache/jasper/compiler/JDTCompiler.java 2025-01-07 16:30:34.996302312 +0200
|
||||
@@ -302,9 +302,9 @@ public class JDTCompiler extends org.apa
|
||||
} else if (opt.equals("17")) {
|
||||
settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_17);
|
||||
} else if (opt.equals("18")) {
|
||||
- settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_18);
|
||||
+ settings.put(CompilerOptions.OPTION_Source, "18");
|
||||
} else if (opt.equals("19")) {
|
||||
- settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_19);
|
||||
+ settings.put(CompilerOptions.OPTION_Source, "19");
|
||||
} else if (opt.equals("20")) {
|
||||
// Constant not available in latest ECJ version that runs on
|
||||
// Java 11.
|
||||
@@ -392,11 +392,11 @@ public class JDTCompiler extends org.apa
|
||||
settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_17);
|
||||
settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_17);
|
||||
} else if (opt.equals("18")) {
|
||||
- settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_18);
|
||||
- settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_18);
|
||||
+ settings.put(CompilerOptions.OPTION_TargetPlatform, "18");
|
||||
+ settings.put(CompilerOptions.OPTION_Compliance, "18");
|
||||
} else if (opt.equals("19")) {
|
||||
- settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_19);
|
||||
- settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_19);
|
||||
+ settings.put(CompilerOptions.OPTION_TargetPlatform, "19");
|
||||
+ settings.put(CompilerOptions.OPTION_Compliance, "19");
|
||||
} else if (opt.equals("20")) {
|
||||
// Constant not available in latest ECJ version that runs on
|
||||
// Java 11.
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
--- build.xml.orig 2023-01-29 17:38:29.477052402 +0800
|
||||
+++ build.xml 2023-01-29 17:42:03.369583841 +0800
|
||||
@@ -216,6 +216,7 @@
|
||||
<!-- Classpaths -->
|
||||
<path id="compile.classpath">
|
||||
<pathelement location="${bnd.jar}"/>
|
||||
+ <pathelement location="${bnd-annotation.jar}"/>
|
||||
<pathelement location="${jdt.jar}"/>
|
||||
<pathelement location="${jaxrpc-lib.jar}"/>
|
||||
<pathelement location="${wsdl4j-lib.jar}"/>
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
--- conf/catalina.policy.orig 2024-05-22 16:12:23.809886452 +0300
|
||||
+++ conf/catalina.policy 2024-05-22 16:14:38.913939654 +0300
|
||||
@@ -55,6 +55,14 @@
|
||||
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/ecj/ecj.jar" {
|
||||
+ permission java.security.AllPermission;
|
||||
+};
|
||||
|
||||
// ========== CATALINA CODE PERMISSIONS =======================================
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
# 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 change your tomcat locale here
|
||||
#LANG="en_US"
|
||||
|
||||
# Run tomcat under the Java Security Manager
|
||||
SECURITY_MANAGER="false"
|
||||
|
||||
# If you wish to further customize your tomcat environment,
|
||||
# put your own definitions here
|
||||
# (i.e. LD_LIBRARY_PATH for some jdbc drivers)
|
||||
|
||||
# You can also pass parameters to Java here by defining JAVA_OPTS variable
|
||||
# (e.g. JAVA_OPTS="-Xminf0.1 -Xmaxf0.3")
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
# 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
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
# 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
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
# 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.
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
#!/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
|
||||
37
tomcat-7.0-catalina-policy.patch
Normal file
37
tomcat-7.0-catalina-policy.patch
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
--- conf/catalina.policy.orig 2016-08-05 11:13:17.192398668 -0400
|
||||
+++ conf/catalina.policy 2016-08-05 11:13:40.855396127 -0400
|
||||
@@ -51,6 +51,34 @@
|
||||
};
|
||||
|
||||
|
||||
+// ========== 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-el-2.2-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-servlet-3.0-api.jar" {
|
||||
+ permission java.security.AllPermission;
|
||||
+};
|
||||
+grant codeBase "file:/usr/share/java/jakarta-commons-collections.jar" {
|
||||
+ permission java.security.AllPermission;
|
||||
+};
|
||||
+grant codeBase "file:/usr/share/java/jakarta-commons-dbcp.jar" {
|
||||
+ permission java.security.AllPermission;
|
||||
+};
|
||||
+grant codeBase "file:/usr/share/java/ecj.jar" {
|
||||
+ permission java.security.AllPermission;
|
||||
+};
|
||||
+grant codeBase "file:/usr/share/java/log4j.jar" {
|
||||
+ permission java.security.AllPermission;
|
||||
+};
|
||||
+
|
||||
+
|
||||
// ========== CATALINA CODE PERMISSIONS =======================================
|
||||
|
||||
|
||||
|
|
@ -34,7 +34,7 @@ export CLASSPATH
|
|||
MAIN_CLASS="org.apache.catalina.startup.Tool"
|
||||
BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\""
|
||||
BASE_OPTIONS=""
|
||||
BASE_JARS="commons-daemon tomcat/catalina servlet tomcat/tomcat-util tomcat/tomcat-coyote tomcat/tomcat-api tomcat/tomcat-util-scan"
|
||||
BASE_JARS="commons-daemon tomcat/catalina servlet tomcat/tomcat-util tomcat/tomcat-coyote"
|
||||
|
||||
# Set parameters
|
||||
set_classpath $BASE_JARS
|
||||
89
tomcat-7.0-jsvc.wrapper
Normal file
89
tomcat-7.0-jsvc.wrapper
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
#!/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 $TOMCAT_CFG wasn't already loaded
|
||||
if [ -z "${TOMCAT_CFG_LOADED}" ]; then
|
||||
if [ -z "${TOMCAT_CFG}" ]; then
|
||||
TOMCAT_CFG="/etc/tomcat/tomcat.conf"
|
||||
fi
|
||||
|
||||
if [ -r "$TOMCAT_CFG" ]; then
|
||||
. $TOMCAT_CFG
|
||||
fi
|
||||
fi
|
||||
|
||||
set_javacmd
|
||||
|
||||
# CLASSPATH munging
|
||||
if [ -n "$JSSE_HOME" ]; then
|
||||
CLASSPATH="${CLASSPATH}:$(build-classpath jcert jnet jsse 2>/dev/null)"
|
||||
fi
|
||||
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/bootstrap.jar"
|
||||
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/tomcat-juli.jar"
|
||||
CLASSPATH="${CLASSPATH}:$(build-classpath commons-daemon 2>/dev/null)"
|
||||
|
||||
# if jsvc installed and USE_JSVC=true
|
||||
# then use jsvc instead of calling java directly
|
||||
if [ -x /usr/bin/jsvc ]; then
|
||||
# Command to use for version so it doesn't use jsvc
|
||||
VER_JAVACMD=$JAVACMD
|
||||
|
||||
JAVACMD="/usr/bin/jsvc -nodetach -user ${TOMCAT_USER} -outfile ${CATALINA_BASE}/logs/catalina.out -errfile ${CATALINA_BASE}/logs/catalina.out"
|
||||
if [ "$1" = "stop" ]; then
|
||||
JAVACMD="${JAVACMD} -stop"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$1" = "start" ]; then
|
||||
${JAVACMD} $JAVA_OPTS $CATALINA_OPTS \
|
||||
-classpath "$CLASSPATH" \
|
||||
-Dcatalina.base="$CATALINA_BASE" \
|
||||
-Dcatalina.home="$CATALINA_HOME" \
|
||||
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
|
||||
-Djava.io.tmpdir="$CATALINA_TMPDIR" \
|
||||
-Djava.util.logging.config.file="${CATALINA_BASE}/conf/logging.properties" \
|
||||
-Djava.util.logging.manager="org.apache.juli.ClassLoaderLogManager" \
|
||||
org.apache.catalina.startup.Bootstrap start \
|
||||
>> ${CATALINA_BASE}/logs/catalina.out 2>&1 &
|
||||
if [ ! -z "$CATALINA_PID" ]; then
|
||||
echo $! > $CATALINA_PID
|
||||
fi
|
||||
elif [ "$1" = "start-security" ]; then
|
||||
${JAVACMD} $JAVA_OPTS $CATALINA_OPTS \
|
||||
-classpath "$CLASSPATH" \
|
||||
-Dcatalina.base="$CATALINA_BASE" \
|
||||
-Dcatalina.home="$CATALINA_HOME" \
|
||||
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
|
||||
-Djava.io.tmpdir="$CATALINA_TMPDIR" \
|
||||
-Djava.security.manager \
|
||||
-Djava.security.policy=="${CATALINA_BASE}/conf/catalina.policy" \
|
||||
-Djava.util.logging.config.file="${CATALINA_BASE}/conf/logging.properties" \
|
||||
-Djava.util.logging.manager="org.apache.juli.ClassLoaderLogManager" \
|
||||
org.apache.catalina.startup.Bootstrap start \
|
||||
>> ${CATALINA_BASE}/logs/catalina.out 2>&1 &
|
||||
if [ ! -z "$CATALINA_PID" ]; then
|
||||
echo $! > $CATALINA_PID
|
||||
fi
|
||||
elif [ "$1" = "stop" ]; then
|
||||
${JAVACMD} $JAVA_OPTS \
|
||||
-classpath "$CLASSPATH" \
|
||||
-Dcatalina.base="$CATALINA_BASE" \
|
||||
-Dcatalina.home="$CATALINA_HOME" \
|
||||
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
|
||||
-Djava.io.tmpdir="$CATALINA_TMPDIR" \
|
||||
org.apache.catalina.startup.Bootstrap stop \
|
||||
>> ${CATALINA_BASE}/logs/catalina.out 2>&1
|
||||
elif [ "$1" = "version" ]; then
|
||||
${VER_JAVACMD} -classpath ${CATALINA_HOME}/lib/catalina.jar \
|
||||
org.apache.catalina.util.ServerInfo
|
||||
else
|
||||
echo "Usage: $0 {start|start-security|stop|version}"
|
||||
exit 1
|
||||
fi
|
||||
11
tomcat-7.0-log4j.properties
Normal file
11
tomcat-7.0-log4j.properties
Normal file
|
|
@ -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
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
--- conf/tomcat-users.xml~ 2008-01-28 17:41:06.000000000 -0500
|
||||
+++ conf/tomcat-users.xml 2008-03-07 19:40:07.000000000 -0500
|
||||
@@ -53,4 +53,14 @@
|
||||
@@ -23,4 +23,14 @@
|
||||
<user username="both" password="<must-be-changed>" roles="tomcat,role1"/>
|
||||
<user username="role1" password="<must-be-changed>" roles="role1"/>
|
||||
-->
|
||||
|
|
@ -34,7 +34,7 @@ export CLASSPATH
|
|||
MAIN_CLASS="org.apache.catalina.startup.Tool"
|
||||
BASE_OPTIONS=""
|
||||
BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\""
|
||||
BASE_JARS="commons-daemon tomcat/catalina servlet tomcat/tomcat-util tomcat/tomcat-coyote tomcat/tomcat-api tomcat/tomcat-util-scan"
|
||||
BASE_JARS="commons-daemon tomcat/catalina servlet tomcat/tomcat-util tomcat/tomcat-coyote"
|
||||
|
||||
# Set parameters
|
||||
set_classpath $BASE_JARS
|
||||
184
tomcat-7.0.104-RemoveCompilerOptions.patch
Normal file
184
tomcat-7.0.104-RemoveCompilerOptions.patch
Normal file
|
|
@ -0,0 +1,184 @@
|
|||
--- java/org/apache/jasper/compiler/JDTCompiler.java.orig 2020-06-08 14:28:56.745393437 +0800
|
||||
+++ java/org/apache/jasper/compiler/JDTCompiler.java 2020-06-08 14:33:16.421538658 +0800
|
||||
@@ -95,7 +95,6 @@
|
||||
/**
|
||||
* Compile the servlet from .java file to .class file
|
||||
*/
|
||||
- @Override
|
||||
protected void generateClass(String[] smap) throws FileNotFoundException, JasperException, Exception {
|
||||
|
||||
long t1 = 0;
|
||||
@@ -122,12 +121,10 @@
|
||||
this.sourceFile = sourceFile;
|
||||
}
|
||||
|
||||
- @Override
|
||||
public char[] getFileName() {
|
||||
return sourceFile.toCharArray();
|
||||
}
|
||||
|
||||
- @Override
|
||||
public char[] getContents() {
|
||||
char[] result = null;
|
||||
FileInputStream is = null;
|
||||
@@ -167,7 +164,6 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
- @Override
|
||||
public char[] getMainTypeName() {
|
||||
int dot = className.lastIndexOf('.');
|
||||
if (dot > 0) {
|
||||
@@ -176,7 +172,6 @@
|
||||
return className.toCharArray();
|
||||
}
|
||||
|
||||
- @Override
|
||||
public char[][] getPackageName() {
|
||||
StringTokenizer izer = new StringTokenizer(className, ".");
|
||||
char[][] result = new char[izer.countTokens()-1][];
|
||||
@@ -187,7 +182,6 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
- @Override
|
||||
public boolean ignoreOptionalProblems() {
|
||||
return false;
|
||||
}
|
||||
@@ -195,7 +189,6 @@
|
||||
|
||||
final INameEnvironment env = new INameEnvironment() {
|
||||
|
||||
- @Override
|
||||
public NameEnvironmentAnswer
|
||||
findType(char[][] compoundTypeName) {
|
||||
StringBuilder result = new StringBuilder();
|
||||
@@ -208,7 +201,6 @@
|
||||
return findType(result.toString());
|
||||
}
|
||||
|
||||
- @Override
|
||||
public NameEnvironmentAnswer findType(char[] typeName, char[][] packageName) {
|
||||
StringBuilder result = new StringBuilder();
|
||||
String sep = "";
|
||||
@@ -281,7 +273,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
- @Override
|
||||
public boolean isPackage(char[][] parentPackageName, char[] packageName) {
|
||||
StringBuilder result = new StringBuilder();
|
||||
String sep = "";
|
||||
@@ -302,7 +293,6 @@
|
||||
return isPackage(result.toString());
|
||||
}
|
||||
|
||||
- @Override
|
||||
public void cleanup() {
|
||||
}
|
||||
|
||||
@@ -350,43 +340,6 @@
|
||||
} else if(opt.equals("1.7")) {
|
||||
settings.put(CompilerOptions.OPTION_Source,
|
||||
CompilerOptions.VERSION_1_7);
|
||||
- } else if(opt.equals("1.8")) {
|
||||
- settings.put(CompilerOptions.OPTION_Source,
|
||||
- CompilerOptions.VERSION_1_8);
|
||||
- // Support old format that was used in EA implementation as well
|
||||
- } else if(opt.equals("9") || opt.equals("1.9")) {
|
||||
- settings.put(CompilerOptions.OPTION_Source,
|
||||
- JDT_JAVA_9_VERSION);
|
||||
- } else if(opt.equals("10")) {
|
||||
- // Constant not available in latest ECJ version that runs on
|
||||
- // Java 6.
|
||||
- // This is checked against the actual version below.
|
||||
- settings.put(CompilerOptions.OPTION_Source, "10");
|
||||
- } else if(opt.equals("11")) {
|
||||
- // Constant not available in latest ECJ version that runs on
|
||||
- // Java 6.
|
||||
- // This is checked against the actual version below.
|
||||
- settings.put(CompilerOptions.OPTION_Source, "11");
|
||||
- } else if(opt.equals("12")) {
|
||||
- // Constant not available in latest ECJ version that runs on
|
||||
- // Java 6.
|
||||
- // This is checked against the actual version below.
|
||||
- settings.put(CompilerOptions.OPTION_Source, "12");
|
||||
- } else if(opt.equals("13")) {
|
||||
- // Constant not available in latest available ECJ version.
|
||||
- // May be supported in a snapshot build.
|
||||
- // This is checked against the actual version below.
|
||||
- settings.put(CompilerOptions.OPTION_Source, "13");
|
||||
- } else if(opt.equals("14")) {
|
||||
- // Constant not available in latest available ECJ version.
|
||||
- // May be supported in a snapshot build.
|
||||
- // This is checked against the actual version below.
|
||||
- settings.put(CompilerOptions.OPTION_Source, "14");
|
||||
- } else if(opt.equals("15")) {
|
||||
- // Constant not available in latest available ECJ version.
|
||||
- // May be supported in a snapshot build.
|
||||
- // This is checked against the actual version below.
|
||||
- settings.put(CompilerOptions.OPTION_Source, "15");
|
||||
} else {
|
||||
log.warn(Localizer.getMessage("jsp.warning.unknown.sourceVM", opt));
|
||||
settings.put(CompilerOptions.OPTION_Source,
|
||||
@@ -428,52 +381,6 @@
|
||||
CompilerOptions.VERSION_1_7);
|
||||
settings.put(CompilerOptions.OPTION_Compliance,
|
||||
CompilerOptions.VERSION_1_7);
|
||||
- } else if(opt.equals("1.8")) {
|
||||
- settings.put(CompilerOptions.OPTION_TargetPlatform,
|
||||
- CompilerOptions.VERSION_1_8);
|
||||
- settings.put(CompilerOptions.OPTION_Compliance,
|
||||
- CompilerOptions.VERSION_1_8);
|
||||
- } else if(opt.equals("9") || opt.equals("1.9")) {
|
||||
- settings.put(CompilerOptions.OPTION_TargetPlatform,
|
||||
- JDT_JAVA_9_VERSION);
|
||||
- settings.put(CompilerOptions.OPTION_Compliance,
|
||||
- JDT_JAVA_9_VERSION);
|
||||
- } else if(opt.equals("10")) {
|
||||
- // Constant not available in latest ECJ version that runs on
|
||||
- // Java 6.
|
||||
- // This is checked against the actual version below.
|
||||
- settings.put(CompilerOptions.OPTION_TargetPlatform, "10");
|
||||
- settings.put(CompilerOptions.OPTION_Compliance, "10");
|
||||
- } else if(opt.equals("11")) {
|
||||
- // Constant not available in latest ECJ version that runs on
|
||||
- // Java 6.
|
||||
- // This is checked against the actual version below.
|
||||
- settings.put(CompilerOptions.OPTION_TargetPlatform, "11");
|
||||
- settings.put(CompilerOptions.OPTION_Compliance, "11");
|
||||
- } else if(opt.equals("12")) {
|
||||
- // Constant not available in latest ECJ version that runs on
|
||||
- // Java 6.
|
||||
- // This is checked against the actual version below.
|
||||
- settings.put(CompilerOptions.OPTION_TargetPlatform, "12");
|
||||
- settings.put(CompilerOptions.OPTION_Compliance, "12");
|
||||
- } else if(opt.equals("13")) {
|
||||
- // Constant not available in latest available ECJ version.
|
||||
- // May be supported in a snapshot build.
|
||||
- // This is checked against the actual version below.
|
||||
- settings.put(CompilerOptions.OPTION_TargetPlatform, "13");
|
||||
- settings.put(CompilerOptions.OPTION_Compliance, "13");
|
||||
- } else if(opt.equals("14")) {
|
||||
- // Constant not available in latest ECJ version shipped with
|
||||
- // Tomcat. May be supported in a snapshot build.
|
||||
- // This is checked against the actual version below.
|
||||
- settings.put(CompilerOptions.OPTION_TargetPlatform, "14");
|
||||
- settings.put(CompilerOptions.OPTION_Compliance, "14");
|
||||
- } else if(opt.equals("15")) {
|
||||
- // Constant not available in latest ECJ version shipped with
|
||||
- // Tomcat. May be supported in a snapshot build.
|
||||
- // This is checked against the actual version below.
|
||||
- settings.put(CompilerOptions.OPTION_TargetPlatform, "15");
|
||||
- settings.put(CompilerOptions.OPTION_Compliance, "15");
|
||||
} else {
|
||||
log.warn(Localizer.getMessage("jsp.warning.unknown.targetVM", opt));
|
||||
settings.put(CompilerOptions.OPTION_TargetPlatform,
|
||||
@@ -491,7 +398,6 @@
|
||||
new DefaultProblemFactory(Locale.getDefault());
|
||||
|
||||
final ICompilerRequestor requestor = new ICompilerRequestor() {
|
||||
- @Override
|
||||
public void acceptResult(CompilationResult result) {
|
||||
try {
|
||||
if (result.hasProblems()) {
|
||||
130
tomcat-7.0.99-build.patch
Normal file
130
tomcat-7.0.99-build.patch
Normal file
|
|
@ -0,0 +1,130 @@
|
|||
--- build.xml.orig 2019-12-11 08:21:52.000000000 -0500
|
||||
+++ build.xml 2020-02-06 14:32:03.578329367 -0500
|
||||
@@ -222,7 +222,6 @@
|
||||
<!-- Classpaths -->
|
||||
<path id="compile.classpath">
|
||||
<pathelement location="${jdt.jar}"/>
|
||||
- <pathelement location="${saaj-api.jar}"/>
|
||||
</path>
|
||||
|
||||
<path id="tomcat.classpath">
|
||||
@@ -244,7 +243,7 @@
|
||||
<path id="tomcat.webservices.classpath">
|
||||
<path refid="tomcat.classpath" />
|
||||
<fileset dir="${tomcat.extras}/webservices">
|
||||
- <include name="jaxrpc.jar"/>
|
||||
+ <!--<include name="jaxrpc.jar"/>-->
|
||||
<include name="wsdl4j.jar"/>
|
||||
</fileset>
|
||||
</path>
|
||||
@@ -636,7 +635,6 @@
|
||||
deprecation="${compile.deprecation}"
|
||||
source="${compile.source}"
|
||||
target="${compile.target}"
|
||||
- release="${compile.release}"
|
||||
encoding="ISO-8859-1"
|
||||
includeAntRuntime="true" >
|
||||
<compilerarg value="-Xlint:unchecked"/>
|
||||
@@ -1141,12 +1139,11 @@
|
||||
</copy>
|
||||
|
||||
<!-- Delete all other versions of Eclipse JDT Compiler and copy the current one -->
|
||||
- <local name="jdt.jar.filename" />
|
||||
- <basename property="jdt.jar.filename" file="${jdt.jar}"/>
|
||||
+ <basename property="deploy.jdt.jar.filename" file="${jdt.jar}"/>
|
||||
<delete verbose="true">
|
||||
<fileset dir="${tomcat.build}/lib">
|
||||
<include name="ecj-*.jar"/>
|
||||
- <exclude name="${jdt.jar.filename}"/>
|
||||
+ <exclude name="${deploy.jdt.jar.filename}"/>
|
||||
</fileset>
|
||||
</delete>
|
||||
<copy file="${jdt.jar}" todir="${tomcat.build}/lib"/>
|
||||
@@ -1177,7 +1174,6 @@
|
||||
debug="${compile.debug}" deprecation="${compile.deprecation}"
|
||||
source="${compile.source}"
|
||||
target="${compile.target}"
|
||||
- release="${compile.release}"
|
||||
classpath="${tomcat.classes}"
|
||||
encoding="ISO-8859-1"
|
||||
includeantruntime="false">
|
||||
@@ -1189,7 +1185,6 @@
|
||||
debug="${compile.debug}" deprecation="${compile.deprecation}"
|
||||
source="${compile.source}"
|
||||
target="${compile.target}"
|
||||
- release="${compile.release}"
|
||||
classpath="${tomcat.classes}"
|
||||
encoding="ISO-8859-1"
|
||||
includeantruntime="false">
|
||||
@@ -1416,7 +1411,6 @@
|
||||
deprecation="${compile.deprecation}"
|
||||
source="${compile.source}"
|
||||
target="${compile.target}"
|
||||
- release="${compile.release}"
|
||||
encoding="ISO-8859-1"
|
||||
includeantruntime="true">
|
||||
<classpath refid="tomcat.test.classpath" />
|
||||
@@ -1859,8 +1853,8 @@
|
||||
<param name="checksum.value" value="${wsdl4j-lib.checksum.value}"/>
|
||||
</antcall>
|
||||
|
||||
- <copy file="${jaxrpc-lib.jar}"
|
||||
- tofile="${tomcat.extras}/webservices/jaxrpc.jar" />
|
||||
+ <!--<copy file="${jaxrpc-lib.jar}"
|
||||
+ tofile="${tomcat.extras}/webservices/jaxrpc.jar" />-->
|
||||
<copy file="${wsdl4j-lib.jar}"
|
||||
tofile="${tomcat.extras}/webservices/wsdl4j.jar" />
|
||||
</target>
|
||||
@@ -2912,16 +2906,6 @@ skip.installer property in build.propert
|
||||
<param name="checksum.value" value="${jdt.checksum.value}"/>
|
||||
</antcall>
|
||||
|
||||
- <!-- Download SAAJ API -->
|
||||
- <antcall target="downloadfile">
|
||||
- <param name="sourcefile" value="${saaj-api.loc}"/>
|
||||
- <param name="destfile" value="${saaj-api.jar}"/>
|
||||
- <param name="destdir" value="${saaj-api.home}"/>
|
||||
- <param name="checksum.enabled" value="${saaj-api.checksum.enabled}"/>
|
||||
- <param name="checksum.algorithm" value="${saaj-api.checksum.algorithm}"/>
|
||||
- <param name="checksum.value" value="${saaj-api.checksum.value}"/>
|
||||
- </antcall>
|
||||
-
|
||||
</target>
|
||||
|
||||
<target name="download-test-compile"
|
||||
@@ -3151,7 +3135,7 @@ skip.installer property in build.propert
|
||||
<local name="temp.file"/>
|
||||
<mkdir dir="${base.path}"/>
|
||||
<tempfile property="temp.file" destdir="${base.path}" prefix="download-"/>
|
||||
- <get src="${sourcefile}" httpusecaches="${trydownload.httpusecaches}" dest="${temp.file}.tar.gz" />
|
||||
+ <get src="${sourcefile}" dest="${temp.file}.tar.gz" />
|
||||
<verifyChecksum
|
||||
enabled="${checksum.enabled}"
|
||||
algorithm="${checksum.algorithm}" value="${checksum.value}"
|
||||
@@ -3193,7 +3177,7 @@ skip.installer property in build.propert
|
||||
<local name="temp.file"/>
|
||||
<mkdir dir="${base.path}"/>
|
||||
<tempfile property="temp.file" destdir="${base.path}" prefix="download-" suffix=".zip"/>
|
||||
- <get src="${sourcefile}" httpusecaches="${trydownload.httpusecaches}" dest="${temp.file}"/>
|
||||
+ <get src="${sourcefile}" dest="${temp.file}"/>
|
||||
<verifyChecksum
|
||||
enabled="${checksum.enabled}"
|
||||
algorithm="${checksum.algorithm}" value="${checksum.value}"
|
||||
@@ -3233,7 +3217,7 @@ skip.installer property in build.propert
|
||||
<local name="temp.file"/>
|
||||
<mkdir dir="${base.path}"/>
|
||||
<tempfile property="temp.file" destdir="${base.path}" prefix="download-" suffix=".tmp"/>
|
||||
- <get src="${sourcefile}" httpusecaches="${trydownload.httpusecaches}" dest="${temp.file}"/>
|
||||
+ <get src="${sourcefile}" dest="${temp.file}"/>
|
||||
<verifyChecksum
|
||||
enabled="${checksum.enabled}"
|
||||
algorithm="${checksum.algorithm}" value="${checksum.value}"
|
||||
@@ -3284,7 +3268,7 @@ skip.installer property in build.propert
|
||||
|
||||
<target name="trydownload" if="trydownload.run" depends="trydownload.check">
|
||||
<!-- Downloads a file if not yet downloaded and the source URL is available -->
|
||||
- <get src="${sourcefile}" httpusecaches="${trydownload.httpusecaches}" dest="${destfile}" />
|
||||
+ <get src="${sourcefile}" dest="${destfile}" />
|
||||
</target>
|
||||
|
||||
<!-- ============================ IDE Support ============================ -->
|
||||
53
tomcat-7.0.conf
Normal file
53
tomcat-7.0.conf
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
# System-wide configuration file for tomcat services
|
||||
# This will be sourced by tomcat and any secondary service
|
||||
# Values will be overridden by service-specific configuration
|
||||
# files in /etc/sysconfig
|
||||
#
|
||||
# Use this one to change default values for all services
|
||||
# Change the service specific ones to affect only one service
|
||||
# (see, for instance, /etc/sysconfig/tomcat)
|
||||
#
|
||||
|
||||
# This variable is used to figure out if config is loaded or not.
|
||||
TOMCAT_CFG_LOADED="1"
|
||||
|
||||
# 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/tomcat.pid"
|
||||
|
||||
# Connector port is 8080 for this tomcat instance
|
||||
#CONNECTOR_PORT="8080"
|
||||
|
||||
# If you wish to further customize your tomcat environment,
|
||||
# put your own definitions here
|
||||
# (i.e. LD_LIBRARY_PATH for some jdbc drivers)
|
||||
|
||||
331
tomcat-7.0.init
Normal file
331
tomcat-7.0.init
Normal file
|
|
@ -0,0 +1,331 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# tomcat This shell script takes care of starting and stopping Tomcat
|
||||
#
|
||||
# chkconfig: - 80 20
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: tomcat
|
||||
# Required-Start: $network $syslog
|
||||
# Required-Stop: $network $syslog
|
||||
# Default-Start:
|
||||
# Default-Stop:
|
||||
# Description: Release implementation for Servlet 3.0 and JSP 2.2
|
||||
# Short-Description: start and stop tomcat
|
||||
### END INIT INFO
|
||||
#
|
||||
# - originally written by Henri Gomez, Keith Irwin, and Nicolas Mailhot
|
||||
# - heavily rewritten by Deepak Bhole and Jason Corley
|
||||
#
|
||||
|
||||
## Source function library.
|
||||
#. /etc/rc.d/init.d/functions
|
||||
# Source LSB function library.
|
||||
if [ -r /lib/lsb/init-functions ]; then
|
||||
. /lib/lsb/init-functions
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DISTRIB_ID=`lsb_release -i -s 2>/dev/null`
|
||||
|
||||
NAME="$(basename $0)"
|
||||
unset ISBOOT
|
||||
if [ "${NAME:0:1}" = "S" -o "${NAME:0:1}" = "K" ]; then
|
||||
NAME="${NAME:3}"
|
||||
ISBOOT="1"
|
||||
fi
|
||||
|
||||
# For SELinux we need to use 'runuser' not 'su'
|
||||
if [ -x "/sbin/runuser" ]; then
|
||||
SU="/sbin/runuser -s /bin/sh"
|
||||
else
|
||||
SU="/bin/su -s /bin/sh"
|
||||
fi
|
||||
|
||||
# Get the tomcat config (use this for environment specific settings)
|
||||
TOMCAT_CFG="/etc/tomcat/tomcat.conf"
|
||||
if [ -r "$TOMCAT_CFG" ]; then
|
||||
. $TOMCAT_CFG
|
||||
fi
|
||||
|
||||
# Get instance specific config file
|
||||
if [ -r "/etc/sysconfig/${NAME}" ]; then
|
||||
. /etc/sysconfig/${NAME}
|
||||
fi
|
||||
|
||||
# Define which connector port to use
|
||||
CONNECTOR_PORT="${CONNECTOR_PORT:-8080}"
|
||||
|
||||
# Path to the tomcat launch script
|
||||
TOMCAT_SCRIPT="${TOMCAT_SCRIPT:-/usr/sbin/tomcat}"
|
||||
|
||||
# Tomcat program name
|
||||
TOMCAT_PROG="${NAME}"
|
||||
|
||||
# Define the tomcat username
|
||||
TOMCAT_USER="${TOMCAT_USER:-tomcat}"
|
||||
|
||||
# Define the tomcat group
|
||||
TOMCAT_GROUP="${TOMCAT_GROUP:-`id -gn $TOMCAT_USER`}"
|
||||
|
||||
# Define the tomcat log file
|
||||
TOMCAT_LOG="${TOMCAT_LOG:-${CATALINA_HOME}/logs/${NAME}-initd.log}"
|
||||
|
||||
# Define the tomcat pid file
|
||||
CATALINA_PID="${CATALINA_PID:-/var/run/${NAME}.pid}"
|
||||
|
||||
# Variable to keep parseOptions status
|
||||
OPTIONS_PARSED="0"
|
||||
|
||||
RETVAL="0"
|
||||
|
||||
# Look for open ports, as the function name might imply
|
||||
function findFreePorts() {
|
||||
local isSet1="false"
|
||||
local isSet2="false"
|
||||
local isSet3="false"
|
||||
local lower="8000"
|
||||
randomPort1="0"
|
||||
randomPort2="0"
|
||||
randomPort3="0"
|
||||
local -a listeners="( $(
|
||||
netstat -ntl | \
|
||||
awk '/^tcp/ {gsub("(.)*:", "", $4); print $4}'
|
||||
) )"
|
||||
while [ "$isSet1" = "false" ] || \
|
||||
[ "$isSet2" = "false" ] || \
|
||||
[ "$isSet3" = "false" ]; do
|
||||
let port="${lower}+${RANDOM:0:4}"
|
||||
if [ -z `expr " ${listeners[*]} " : ".*\( $port \).*"` ]; then
|
||||
if [ "$isSet1" = "false" ]; then
|
||||
export randomPort1="$port"
|
||||
isSet1="true"
|
||||
elif [ "$isSet2" = "false" ]; then
|
||||
export randomPort2="$port"
|
||||
isSet2="true"
|
||||
elif [ "$isSet3" = "false" ]; then
|
||||
export randomPort3="$port"
|
||||
isSet3="true"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
function makeHomeDir() {
|
||||
if [ ! -d "$CATALINA_HOME" ]; then
|
||||
echo "$CATALINA_HOME does not exist, creating"
|
||||
if [ ! -d "/usr/share/${NAME}" ]; then
|
||||
mkdir /usr/share/${NAME}
|
||||
cp -pLR /usr/share/tomcat/* /usr/share/${NAME}
|
||||
fi
|
||||
mkdir -p /var/log/${NAME} \
|
||||
/var/cache/${NAME} \
|
||||
/var/tmp/${NAME}
|
||||
ln -fs /var/cache/${NAME} ${CATALINA_HOME}/work
|
||||
ln -fs /var/tmp/${NAME} ${CATALINA_HOME}/temp
|
||||
cp -pLR /usr/share/${NAME}/bin $CATALINA_HOME
|
||||
cp -pLR /usr/share/${NAME}/conf $CATALINA_HOME
|
||||
ln -fs /usr/share/java/tomcat ${CATALINA_HOME}/lib
|
||||
ln -fs /usr/share/tomcat/webapps ${CATALINA_HOME}/webapps
|
||||
install -o ${TOMCAT_USER} -g ${TOMCAT_GROUP} -d -m 0770 /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
|
||||
if [ "$OPTIONS_PARSED" -eq 0 ]; then
|
||||
TOMCAT_SCRIPT="$options ${TOMCAT_SCRIPT}"
|
||||
OPTIONS_PARSED=1
|
||||
fi
|
||||
}
|
||||
|
||||
# See how we were called.
|
||||
function start() {
|
||||
|
||||
echo -n "Starting ${TOMCAT_PROG}: "
|
||||
if [ "$RETVAL" != "0" ]; then
|
||||
log_failure_msg
|
||||
return
|
||||
fi
|
||||
if [ -f "/var/lock/subsys/${NAME}" ]; then
|
||||
if [ -s "$CATALINA_PID" ]; then
|
||||
read kpid < $CATALINA_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
|
||||
touch $CATALINA_PID 2>&1 || RETVAL="4"
|
||||
if [ "$RETVAL" -eq "0" -a "$?" -eq "0" ]; then
|
||||
install -o ${TOMCAT_USER} -g ${TOMCAT_GROUP} -m 644 /dev/null "${CATALINA_PID}"
|
||||
fi
|
||||
[ "$RETVAL" -eq "0" ] && touch $TOMCAT_LOG 2>&1 || RETVAL="4"
|
||||
if [ "$RETVAL" -eq "0" -a "$?" -eq "0" ]; then
|
||||
if [ ! -f "${TOMCAT_LOG}" ]; then
|
||||
install -o ${TOMCAT_USER} -g ${TOMCAT_GROUP} -m 644 /dev/null "${TOMCAT_LOG}"
|
||||
fi
|
||||
fi
|
||||
if [ "$CATALINA_HOME" != "/usr/share/tomcat" -a "$RETVAL" -eq "0" ]; then
|
||||
# Create a tomcat directory if it doesn't exist
|
||||
makeHomeDir
|
||||
# If CATALINA_HOME doesn't exist modify port number so that
|
||||
# multiple instances don't interfere with each other
|
||||
findFreePorts
|
||||
sed -i -e "s/8005/${randomPort1}/g" -e "s/8080/${CONNECTOR_PORT}/g" \
|
||||
-e "s/8009/${randomPort2}/g" -e "s/8443/${randomPort3}/g" \
|
||||
${CATALINA_HOME}/conf/server.xml
|
||||
fi
|
||||
parseOptions
|
||||
if [ "$RETVAL" -eq "0" -a "$SECURITY_MANAGER" = "true" ]; then
|
||||
$SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} start-security" \
|
||||
>> ${TOMCAT_LOG} 2>&1 || RETVAL="4"
|
||||
else
|
||||
|
||||
[ "$RETVAL" -eq "0" ] && $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} start" >> ${TOMCAT_LOG} 2>&1 || RETVAL="4"
|
||||
fi
|
||||
if [ "$RETVAL" -eq "0" ]; then
|
||||
log_success_msg
|
||||
touch /var/lock/subsys/${NAME}
|
||||
else
|
||||
log_failure_msg "Error code ${RETVAL}"
|
||||
fi
|
||||
if [ "$DISTRIB_ID" = "MandrivaLinux" ]; then
|
||||
echo
|
||||
fi
|
||||
}
|
||||
|
||||
function stop() {
|
||||
echo -n "Stopping ${TOMCAT_PROG}: "
|
||||
if [ -f "/var/lock/subsys/${NAME}" ]; then
|
||||
parseOptions
|
||||
if [ "$RETVAL" -eq "0" ]; then
|
||||
touch /var/lock/subsys/${NAME} 2>&1 || RETVAL="4"
|
||||
[ "$RETVAL" -eq "0" ] && $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} stop" >> ${TOMCAT_LOG} 2>&1 || RETVAL="4"
|
||||
fi
|
||||
if [ "$RETVAL" -eq "0" ]; then
|
||||
count="0"
|
||||
if [ -s "$CATALINA_PID" ]; then
|
||||
read kpid < $CATALINA_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} $CATALINA_PID
|
||||
else
|
||||
log_failure_msg
|
||||
RETVAL="4"
|
||||
fi
|
||||
else
|
||||
log_success_msg
|
||||
RETVAL="0"
|
||||
fi
|
||||
if [ "$DISTRIB_ID" = "MandrivaLinux" ]; then
|
||||
echo
|
||||
fi
|
||||
}
|
||||
|
||||
function usage()
|
||||
{
|
||||
echo "Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status|version}"
|
||||
RETVAL="2"
|
||||
}
|
||||
|
||||
# See how we were called.
|
||||
RETVAL="0"
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
condrestart|try-restart)
|
||||
if [ -s "$CATALINA_PID" ]; then
|
||||
stop
|
||||
start
|
||||
fi
|
||||
;;
|
||||
reload)
|
||||
RETVAL="3"
|
||||
;;
|
||||
force-reload)
|
||||
if [ -s "$CATALINA_PID" ]; then
|
||||
stop
|
||||
start
|
||||
fi
|
||||
;;
|
||||
status)
|
||||
if [ -s "$CATALINA_PID" ]; then
|
||||
read kpid < $CATALINA_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} -f "catalina\.base=${CATALINA_BASE}[ $]")"
|
||||
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} -f "catalina\.base=${CATALINA_BASE}[ $]")"
|
||||
# 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
|
||||
8
tomcat-7.0.logrotate
Normal file
8
tomcat-7.0.logrotate
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
@@@TCLOG@@@/catalina.out {
|
||||
copytruncate
|
||||
weekly
|
||||
rotate 52
|
||||
compress
|
||||
missingok
|
||||
create 0644 tomcat tomcat
|
||||
}
|
||||
56
tomcat-7.0.sysconfig
Normal file
56
tomcat-7.0.sysconfig
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
# Service-specific configuration file for tomcat. This will be sourced by
|
||||
# the SysV init script after the global configuration file
|
||||
# /etc/tomcat/tomcat.conf, thus allowing values to be overridden in
|
||||
# a per-service manner.
|
||||
#
|
||||
# NEVER change the init script itself. To change values for all services make
|
||||
# your changes in /etc/tomcat/tomcat.conf
|
||||
#
|
||||
# To change values for a specific service make your edits here.
|
||||
# To create a new service create a link from /etc/init.d/<your new service> to
|
||||
# /etc/init.d/tomcat (do not copy the init script) and make a copy of the
|
||||
# /etc/sysconfig/tomcat file to /etc/sysconfig/<your new service> 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/tomcat.pid"
|
||||
|
||||
# Connector port is 8080 for this tomcat instance
|
||||
#CONNECTOR_PORT="8080"
|
||||
|
||||
# If you wish to further customize your tomcat environment,
|
||||
# put your own definitions here
|
||||
# (i.e. LD_LIBRARY_PATH for some jdbc drivers)
|
||||
|
||||
76
tomcat-7.0.wrapper
Normal file
76
tomcat-7.0.wrapper
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
#!/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 $TOMCAT_CFG wasn't already loaded
|
||||
if [ -z "${TOMCAT_CFG_LOADED}" ]; then
|
||||
if [ -z "${TOMCAT_CFG}" ]; then
|
||||
TOMCAT_CFG="/etc/tomcat/tomcat.conf"
|
||||
fi
|
||||
|
||||
if [ -r "$TOMCAT_CFG" ]; then
|
||||
. $TOMCAT_CFG
|
||||
fi
|
||||
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
|
||||
12
tomcat-api-OSGi-MANIFEST.MF
Normal file
12
tomcat-api-OSGi-MANIFEST.MF
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
Manifest-Version: 1.0
|
||||
Export-Package: org.apache.tomcat;version="7.0.21"
|
||||
Bundle-Vendor: %bundleProvider
|
||||
Bundle-ClassPath: .
|
||||
Bundle-Version: 7.0.21
|
||||
Bundle-Name: %bundleName
|
||||
Bundle-Localization: plugin
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-SymbolicName: org.apache.tomcat
|
||||
Bundle-RequiredExecutionEnvironment: J2SE-1.4,CDC-1.0/Foundation-1.0,J
|
||||
2SE-1.3
|
||||
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
diff -up ./res/bnd/build-defaults.bnd.orig ./res/bnd/build-defaults.bnd
|
||||
--- res/bnd/build-defaults.bnd.orig 2023-10-16 11:23:04.752754202 +0800
|
||||
+++ res/bnd/build-defaults.bnd 2023-10-16 11:23:29.931876910 +0800
|
||||
@@ -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}
|
||||
Bundle-License: https://www.apache.org/licenses/LICENSE-2.0.txt
|
||||
|
||||
Specification-Title: Apache Tomcat
|
||||
@@ -36,4 +36,4 @@ X-Compile-Target-JDK: ${compile.release}
|
||||
|
||||
-removeheaders: DSTAMP,TODAY,TSTAMP
|
||||
|
||||
-module.name: org.apache.${replace;${Bundle-Name};-;.}
|
||||
\ No newline at end of file
|
||||
+module.name: org.apache.${replace;${Bundle-Name};-;.}
|
||||
|
|
@ -1,21 +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
|
||||
|
||||
_save_function() {
|
||||
local ORIG_FUNC=$(declare -f $1)
|
||||
local NEWNAME_FUNC="$2${ORIG_FUNC#$1}"
|
||||
eval "$NEWNAME_FUNC"
|
||||
}
|
||||
|
||||
_save_function run run_java
|
||||
|
||||
run() {
|
||||
run_java $@
|
||||
}
|
||||
|
||||
13
tomcat-juli-OSGi-MANIFEST.MF
Normal file
13
tomcat-juli-OSGi-MANIFEST.MF
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
Manifest-Version: 1.0
|
||||
Export-Package: org.apache.juli;version="7.0.21",org.apache.juli.loggi
|
||||
ng;version="7.0.21"
|
||||
Bundle-Vendor: %bundleProvider
|
||||
Bundle-ClassPath: .
|
||||
Bundle-Version: 7.0.21
|
||||
Bundle-Name: %bundleName
|
||||
Bundle-Localization: plugin
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-SymbolicName: org.apache.juli
|
||||
Bundle-RequiredExecutionEnvironment: J2SE-1.4,CDC-1.0/Foundation-1.0,J
|
||||
2SE-1.3
|
||||
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
# 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
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
#!/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
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
#!/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
|
||||
1154
tomcat.spec
1154
tomcat.spec
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue