Compare commits

..

83 commits

Author SHA1 Message Date
Hui Wang
a174585603 Update to 7.0.106 2020-10-28 18:40:15 +08:00
Hui Wang
9563f11b9e Update to 7.0.105 2020-07-15 18:27:04 +08:00
Hui Wang
4ac0942113 Re-create tomcat-7.0.104-RemoveCompilerOptions.patch 2020-06-08 14:48:38 +08:00
Hui Wang
208522a9f2 Update tomcat-RemoveCompilerOptions.patch 2020-06-08 14:08:44 +08:00
Hui Wang
3509fc4b4b Fix the changelog and version parts 2020-06-04 17:36:59 +08:00
Hui Wang
0e6b8f1b04 Update to 7.0.104 2020-06-04 17:11:34 +08:00
Coty Sutherland
2f8bca3680 Tweak the default changes for CVE-2020-1938 so the patch applies cleanly 2020-04-22 15:46:02 -04:00
Coty Sutherland
3ab821b1f1 Update to 7.0.103 2020-04-22 14:21:43 -04:00
Coty Sutherland
4f8faf67f2 Related: rhbz#1806398 Undo changes in defaults for AJP connector (CVE-2020-1938) to prevent breakage, please update your configuration 2020-03-12 14:29:24 -04:00
Coty Sutherland
bee90cc445 Update to 7.0.100
Resolves: rhbz#1806805 - CVE-2020-1938 tomcat: Apache Tomcat AJP File Read/Inclusion Vulnerability
2020-03-05 15:10:18 -05:00
Coty Sutherland
53af7d2339 Remove SAAJ API addition (not necessary) and javac release attributes (not yet supported) 2020-02-06 14:38:45 -05:00
Coty Sutherland
b3f5333fe2 Update to 7.0.99 2020-02-06 13:15:28 -05:00
Coty Sutherland
90835a7334 Update to 7.0.96 2019-09-26 12:35:29 -04:00
Coty Sutherland
5ac49193ad Resolves: rhbz#1466026 JVM options are duplicated after service restart 2019-09-26 12:00:56 -04:00
Coty Sutherland
3d2693a555 Drop some outdated deps and use zip instead of zip -u 2019-06-18 15:26:48 -04:00
Coty Sutherland
86ec90907e Update to 7.0.94
Resolves: rhbz#1713280 - CVE-2019-0221 tomcat: XSS in SSI printenv
2019-06-18 10:54:41 -04:00
Coty Sutherland
05293ee2a3 Add changelog entries for CVEs to update notes 2018-12-13 11:48:15 -05:00
Coty Sutherland
5d15171717 Update to 7.0.92 2018-12-13 11:45:59 -05:00
Coty Sutherland
69c429d628 Related: Update to 7.0.90 Fix patch files so that they apply correctly 2018-07-31 17:01:08 -04:00
Coty Sutherland
715415eccc Update to 7.0.90 2018-07-31 16:17:53 -04:00
Coty Sutherland
6ddb487a2a Update to 7.0.86 2018-05-01 09:56:53 -04:00
Coty Sutherland
4b33f22df6 Forgot to add changelog entires for the CVEs 2018-03-16 11:27:13 -04:00
Coty Sutherland
ddf0b328a1 Update to 7.0.85 2018-03-16 11:16:34 -04:00
Coty Sutherland
b2405bc450 Update CompilerOptions patch to remove Java 1.9 version 2018-02-01 10:18:53 -05:00
Coty Sutherland
04ebf2cc89 The tomcat-native binary is no longer copied to bin. See http://svn.apache.org/r1818186 for more details 2018-02-01 10:10:44 -05:00
Coty Sutherland
ac5e3ee050 Update to 7.0.84 2018-02-01 08:56:29 -05:00
Coty Sutherland
1e5a896367 Update to 7.0.82
Resolves: rhbz#1497681 CVE-2017-12617 tomcat: Remote Code Execution bypass for CVE-2017-12615
2017-10-04 09:05:46 -04:00
Coty Sutherland
49ac0f639e Updating sources with fedpkg instead of rhpkg... 2017-08-21 10:32:14 -04:00
Coty Sutherland
4b8fa750e7 Resolves: rhbz#1480621 CVE-2017-7674 tomcat: Cache Poisoning 2017-08-21 10:26:03 -04:00
Coty Sutherland
e12e1e78e7 Updated wrong source tar...this time it's right for sure 2017-06-09 15:54:14 -04:00
Coty Sutherland
db12ab1d5e Updated sources with rhpkg instead of fedpkg accidentally. Fixing that 2017-06-09 15:47:27 -04:00
Coty Sutherland
0e797f55f0 Resolves: rhbz#1459161 CVE-2017-5664 tomcat: Security constrained bypass in error page mechanism 2017-06-09 15:33:46 -04:00
Coty Sutherland
cd0ac4a1ff Update to 7.0.77 2017-04-11 09:06:43 -04:00
Coty Sutherland
bfc4824563 Update to 7.0.76 2017-03-31 09:24:17 -04:00
Coty Sutherland
7ea089f878 Resolves: rhbz#1372789 init script status command gives incorrect result 2017-02-17 15:14:12 -05:00
Coty Sutherland
e84a075a5a Resolves: rhbz#1420223 CVE-2016-6325 tomcat: tomcat writable config files allow privilege escalation 2017-02-17 14:23:24 -05:00
Coty Sutherland
e7435cfab3 Update to 7.0.75 2017-02-16 16:07:32 -05:00
Coty Sutherland
449935b9ad Resolves: rhbz#1397495 CVE-2016-6816 CVE-2016-8735 tomcat: various flaws 2016-11-30 09:52:02 -05:00
Coty Sutherland
99a8151268 Resolves: rhbz#1379170 jsvc script is broken 2016-09-25 14:30:39 -04:00
Coty Sutherland
53a0501e50 Updating changelog version 2016-09-23 17:00:13 -04:00
Coty Sutherland
2d519e3c75 Resolves: rhbz#1376718 CVE-2016-1240 tomcat: Local privilege escalation via unsafe file handling in the Tomcat init script 2016-09-23 16:59:38 -04:00
Coty Sutherland
25759ac67c Resolves: rhbz#1375582 CVE-2016-5388 Tomcat: CGI sets environmental variable based on user supplied Proxy request header 2016-09-23 16:32:11 -04:00
Coty Sutherland
5a42e79227 Resolves: rhbz#1170797 remove tomcat6 dependency on redhat-lsb (and any other unnecessary ones) 2016-08-17 16:06:51 -04:00
Coty Sutherland
35e239433c Related: rhbz#1314177 Had to fix a minor syntax issue that caused it to improperly eval. Bumping release to rebuild 2016-08-05 15:21:26 -04:00
Coty Sutherland
36a3e9ffec Related: rhbz#1314177 Had to fix a minor syntax issue that caused it to improperly eval 2016-08-05 15:17:10 -04:00
Coty Sutherland
79044f754b Updating the release to 1 for the first build of 7.0.70 2016-08-05 11:23:57 -04:00
Coty Sutherland
817844a3cd Apparently my attention to detail caused a problem here. Whitespace cleaned up in my patch files caused them to fail to apply :( 2016-08-05 11:17:22 -04:00
Coty Sutherland
7cac3fa020 Resolves: rhbz#1352009 tomcat: multiple security vulnerabilities (updates to 7.0.70)
This patch also removed the references to jaxrpc since the jar file is emtpy anyway. It was causing the javadoc phase to crash, so removing it resolves the build failure.
2016-08-05 10:33:31 -04:00
Coty Sutherland
8c1e26a724 Resolves: rhbz#1311499 Updating package causes tomcat to not start on boot 2016-08-05 10:28:43 -04:00
Coty Sutherland
109dad6dbb Resolves: rhbz#1364068 The command tomcat-digest doesn't work 2016-08-05 10:17:32 -04:00
Coty Sutherland
bac4255793 Resolves: rhbz#1364067 The tomcat-tool-wrapper script is broken 2016-08-05 10:13:20 -04:00
Coty Sutherland
694a006876 Resolves: rhbz#1104704 /usr/sbin/tomcat overrides settings specified in /etc/sysconfig/${NAME} 2016-08-05 10:11:00 -04:00
Coty Sutherland
bbe9e2eb9c Resolves: rhbz#1104708 Tomcat init script does not respect setting of CATALINA_PID in /etc/sysconfig/tomcat 2016-08-05 10:06:53 -04:00
Coty Sutherland
93f643e335 Resolves: rhbz#1312280 Unable to overwrite the TOMCAT_SCRIPT variable 2016-08-05 10:02:54 -04:00
Coty Sutherland
56cc1dee84 Related: rhbz#1314177 Forgot to commit to init change... 2016-08-05 09:57:40 -04:00
Coty Sutherland
8e804f0efd Resolved: rhbz#1314177 Tomcat init script reports wrong status when one instance of several is stopped 2016-08-05 09:56:41 -04:00
Coty Sutherland
24b2b7a82d Resolves: rhbz#1327327 rpm -V tomcat fails on /var/log/tomcat/catalina.out 2016-08-05 09:49:28 -04:00
Coty Sutherland
aa5454a96d Related: rhbz#1347838 I noticed an erroneous block in the policy patch. Removed it. 2016-08-05 09:46:24 -04:00
Coty Sutherland
b225805ced Resolves: rhbz#1347838 The security manager doesn't work correctly (JSPs cannot be compiled) 2016-08-05 09:43:24 -04:00
Coty Sutherland
da5404f2d4 Resolves: rhbz#1352120 The javadoc package is useless; it contains one index.html 2016-08-05 09:32:22 -04:00
Coty Sutherland
f277685a28 Adding back the ppc64 exclusion because java7 doesn't exist on ppc64. 2016-01-04 16:16:07 -05:00
Ivan Afonichev
7e95d02801 Merge branch 'tomcat-7.0.65-attempt' of github.com:csutherl/fedora-tomcat-epel into el6 2015-12-30 19:26:21 +03:00
Coty Sutherland
cecdb36d07 Updated to 7.0.65 2015-12-21 13:23:50 -05:00
Ivan Afonichev
6ed748d8f6 Merge branch 'tomcat-7.0.65-attempt' of github.com:csutherl/fedora-tomcat-epel into el6 2015-12-21 17:50:54 +03:00
Coty Sutherland
5eb026baf5 Updated to 7.0.65 2015-12-11 07:33:28 -05:00
Coty Sutherland
ae0ef248d6 Updated to 7.0.65 2015-11-19 15:17:56 -05:00
Vlad Selpukhin
9661f8da0d fixed bug 1080195 2014-05-01 00:11:18 +04:00
Vlad Slepukhin
a6c97575bf changing ExclusiveArch to ExcludeArch because of bug 2014-02-26 14:24:03 +04:00
Vlad Slepukhin
c091d4485f added platform restriction due to obligatory java >=1.6 2014-02-25 10:45:01 +04:00
Vlad Slepukhin
0e914b1053 Typo in date fixed 2014-02-20 10:28:35 +04:00
Ivan Afonichev
7dc9c669e5 Merge branch 'f19' of https://github.com/ka2m/tomcat-centos into el6 2014-02-18 21:48:17 +04:00
Vlad Slepukhin
2f93af69c5 Typo in Source0 fixed 2014-02-18 11:17:37 +03:00
Ivan Afonichev
2147fa0d4a Merge branch 'f19' of https://github.com/ka2m/tomcat-centos into el6
Conflicts:
	tomcat.spec
2014-02-17 23:43:25 +04:00
Ivan Afonichev
be363bfbe6 F20 changes reverted 2014-02-17 23:36:40 +04:00
Vlad Slepukhin
1054595cbf Fixing typo in spec file 2014-02-14 08:38:11 +03:00
Vlad Slepukhin
5e8d8f6599 minor versioning fixes 2014-02-12 07:32:16 +03:00
Vlad Slepukhin
181e718899 residual lines removal 2014-02-11 15:55:57 +04:00
Vlad Slepukhin
c16cb96349 Some security fixes, systemd stuff removal and changelog update 2014-02-10 13:27:08 +04:00
Vlad Slepukhin
84f3874ac9 Fixing SOURCE numeration 2014-02-07 17:29:13 +04:00
Vlad Slepukhin
2a1fbf0f3d Tomcat 7.0.33 for CentOS 6.x 2014-02-07 16:55:17 +04:00
Ivan Afonichev
fb74d36077 Updated to 7.0.47
Conflicts:
	tomcat.spec
2013-11-04 01:16:25 +04:00
Ivan Afonichev
a0886b4640 Fix sources 2013-07-12 02:09:26 +04:00
squallsama
f5590977b9 update to 7.0.42
Conflicts:
	tomcat.spec
2013-07-12 01:17:58 +04:00
46 changed files with 1775 additions and 1311 deletions

View file

@ -1 +0,0 @@
1

6
.gitignore vendored
View file

@ -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

View file

@ -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

View 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
View file

@ -1 +0,0 @@
resultsdb-testcase: separate

13
el-api-OSGi-MANIFEST.MF Normal file
View 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

View file

@ -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
View 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

View 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
View 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"

View file

@ -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

View file

@ -1,7 +0,0 @@
summary: Run javapackages-specific tests
discover:
how: fmf
url: https://src.fedoraproject.org/tests/javapackages
ref: f42
execute:
how: tmt

View file

@ -1,5 +0,0 @@
discover:
how: fmf
url: https://src.fedoraproject.org/tests/tomcat
execute:
how: tmt

View file

@ -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"

View 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"

View file

@ -1 +1 @@
SHA512 (apache-tomcat-10.1.46-src.tar.gz) = 4abb5a5fad013135c4107508e4530673e4af623658b6aff5c4fc18fd557dfca37b58a9c5c0479e52e240b53d469ad91a34225a80b718aa2f91b8d385d16d9682
SHA512 (apache-tomcat-7.0.106-src.tar.gz) = 5ce5a5af93c58e69c4758c2c0dedeadeceb6be920421b9d3b3d071d32fc8eb59ba8312c98d037b8434fe43d57a9f720ad8790de29a26ed2959f6c761fe1fd573

View file

@ -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.

View file

@ -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}"/>

View file

@ -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 =======================================

View file

@ -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")

View file

@ -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
}

View file

@ -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

View file

@ -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.

View file

@ -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

View 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 =======================================

View file

@ -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
View 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

View 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

View file

@ -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"/>
-->

View file

@ -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

View 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
View 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
View 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
View 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
View 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
View 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
View 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

View 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

View file

@ -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};-;.}

View file

@ -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 $@
}

View 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

View file

@ -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

View file

@ -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

View file

@ -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

File diff suppressed because it is too large Load diff