Compare commits

...

No commits in common. "c8-beta" and "c10s" have entirely different histories.

30 changed files with 71 additions and 170 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

7
.gitignore vendored
View File

@ -1 +1,6 @@
SOURCES/tomcat-9.0.62.redhat-00018-src.zip
apache-tomcat-*-src.tar.gz
tomcat-*-src.zip
results_tomcat
tomcat*.src.rpm
apache-tomcat-*-src/
tomcat-*-src/

View File

@ -1 +0,0 @@
5becf21ed1eb5c031c31d5f295ce499234e98f82 SOURCES/tomcat-9.0.62.redhat-00018-src.zip

View File

@ -1,8 +0,0 @@
diff -up ./java/org/apache/tomcat/util/modeler/mbeans-descriptors.dtd.orig ./java/org/apache/tomcat/util/modeler/mbeans-descriptors.dtd
--- ./java/org/apache/tomcat/util/modeler/mbeans-descriptors.dtd.orig 2023-02-07 14:11:25.294179017 -0500
+++ ./java/org/apache/tomcat/util/modeler/mbeans-descriptors.dtd 2023-02-07 14:11:28.629196705 -0500
@@ -1,4 +1,3 @@
-<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with

View File

@ -1,74 +0,0 @@
diff --git a/build.xml b/build.xml
index 5a0be1b..2131211 100644
--- a/build.xml
+++ b/build.xml
@@ -3062,7 +3062,7 @@ skip.installer property in build.properties" />
<target name="download-compile"
description="Download components necessary to compile"
- depends="setup-bnd">
+ >
<!-- Download Commons Daemon -->
<antcall target="downloadgz-2">
diff --git a/java/org/apache/el/ExpressionFactoryImpl.java b/java/org/apache/el/ExpressionFactoryImpl.java
index a6faeb6..5afbda7 100644
--- a/java/org/apache/el/ExpressionFactoryImpl.java
+++ b/java/org/apache/el/ExpressionFactoryImpl.java
@@ -33,7 +33,7 @@ import org.apache.el.util.MessageFactory;
*
* @author Jacob Hookom [jacob@hookom.net]
*/
-@aQute.bnd.annotation.spi.ServiceProvider(value=ExpressionFactory.class)
+//@aQute.bnd.annotation.spi.ServiceProvider(value=ExpressionFactory.class)
public class ExpressionFactoryImpl extends ExpressionFactory {
@Override
diff --git a/java/org/apache/juli/logging/LogFactory.java b/java/org/apache/juli/logging/LogFactory.java
index 56c805a..bd6eb0d 100644
--- a/java/org/apache/juli/logging/LogFactory.java
+++ b/java/org/apache/juli/logging/LogFactory.java
@@ -21,7 +21,7 @@ import java.nio.file.FileSystems;
import java.util.ServiceLoader;
import java.util.logging.LogManager;
-import aQute.bnd.annotation.spi.ServiceConsumer;
+//import aQute.bnd.annotation.spi.ServiceConsumer;
/**
* This is a modified LogFactory that uses a simple {@link ServiceLoader} based
@@ -63,7 +63,7 @@ import aQute.bnd.annotation.spi.ServiceConsumer;
* @author Costin Manolache
* @author Richard A. Sitze
*/
-@ServiceConsumer(value=org.apache.juli.logging.Log.class)
+//@ServiceConsumer(value=org.apache.juli.logging.Log.class)
public class LogFactory {
private static final LogFactory singleton = new LogFactory();
diff --git a/java/org/apache/tomcat/websocket/WsContainerProvider.java b/java/org/apache/tomcat/websocket/WsContainerProvider.java
index 3cb8873..7bc50f6 100644
--- a/java/org/apache/tomcat/websocket/WsContainerProvider.java
+++ b/java/org/apache/tomcat/websocket/WsContainerProvider.java
@@ -19,7 +19,7 @@ package org.apache.tomcat.websocket;
import javax.websocket.ContainerProvider;
import javax.websocket.WebSocketContainer;
-@aQute.bnd.annotation.spi.ServiceProvider(value=ContainerProvider.class)
+//@aQute.bnd.annotation.spi.ServiceProvider(value=ContainerProvider.class)
public class WsContainerProvider extends ContainerProvider {
@Override
diff --git a/java/org/apache/tomcat/websocket/server/DefaultServerEndpointConfigurator.java b/java/org/apache/tomcat/websocket/server/DefaultServerEndpointConfigurator.java
index 5c385ed..2e4e82e 100644
--- a/java/org/apache/tomcat/websocket/server/DefaultServerEndpointConfigurator.java
+++ b/java/org/apache/tomcat/websocket/server/DefaultServerEndpointConfigurator.java
@@ -26,7 +26,7 @@ import javax.websocket.HandshakeResponse;
import javax.websocket.server.HandshakeRequest;
import javax.websocket.server.ServerEndpointConfig;
-@aQute.bnd.annotation.spi.ServiceProvider(value=ServerEndpointConfig.Configurator.class)
+//@aQute.bnd.annotation.spi.ServiceProvider(value=ServerEndpointConfig.Configurator.class)
public class DefaultServerEndpointConfigurator
extends ServerEndpointConfig.Configurator {

View File

@ -1,12 +0,0 @@
diff -up ./res/bnd/build-defaults.bnd.orig ./res/bnd/build-defaults.bnd
--- ./res/bnd/build-defaults.bnd.orig 2020-07-13 13:47:01.229077747 -0400
+++ ./res/bnd/build-defaults.bnd 2020-07-13 13:47:12.923095618 -0400
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-Bundle-Version: ${version_cleanup;${version}}
+Bundle-Version: ${version}
Specification-Title: Apache Tomcat
Specification-Version: ${version.major.minor}

1
ci.fmf Normal file
View File

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

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-10
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build./plans/tier1-internal.functional}

11
plans/tier1-internal.fmf Normal file
View File

@ -0,0 +1,11 @@
summary: Internal Tier1 beakerlib tests.
discover:
- name: rhel
how: fmf
url: git://pkgs.devel.redhat.com/tests/tomcat
filter: 'tier: 1'
execute:
how: tmt
adjust:
enabled: false
when: distro == centos-stream-10

7
plans/tier1-public.fmf Normal file
View File

@ -0,0 +1,7 @@
summary: Public Tier1 beakerlib tests
discover:
how: fmf
url: https://src.fedoraproject.org/tests/tomcat.git
filter: 'tier: 1'
execute:
how: tmt

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (tomcat-9.0.87.redhat-00005-src.zip) = a8574039027b7fd990dc6a6a705e58fb45e5a2e6051cc2da9e7d46513b0d2b0846ffa85ae33be747436ad108464087ba7029880287903e0a53788cfa18a889cf

View File

@ -0,0 +1,10 @@
--- build.xml.orig 2023-01-19 10:39:11.163687508 +0800
+++ build.xml 2023-01-19 10:44:42.960604444 +0800
@@ -213,6 +213,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

@ -35,7 +35,7 @@ CATALINA_TMPDIR="/var/cache/tomcat/temp"
#JAVA_OPTS="-Djava.library.path=/usr/lib"
# Set default javax.sql.DataSource factory to apache commons one. See rhbz#1214381
JAVA_OPTS="-Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory"
JAVA_OPTS="-Djavax.sql.DataSource.Factory=org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory"
# You can change your tomcat locale here
#LANG="en_US"

View File

@ -31,8 +31,8 @@
%global jspspec 2.3
%global major_version 9
%global minor_version 0
%global micro_version 62
%global packdname %{name}-%{major_version}.%{minor_version}.%{micro_version}.redhat-00018-src
%global micro_version 87
%global packdname %{name}-%{major_version}.%{minor_version}.%{micro_version}.redhat-00005-src
%global servletspec 4.0
%global elspec 3.0
%global tcuid 53
@ -56,7 +56,7 @@
Name: tomcat
Epoch: 1
Version: %{major_version}.%{minor_version}.%{micro_version}
Release: 29%{?dist}
Release: 3%{?dist}
Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API
License: ASL 2.0
@ -77,25 +77,23 @@ Source33: java-9-start-up-parameters.conf
Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch
Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch
Patch2: %{name}-build.patch
Patch3: %{name}-%{major_version}.%{minor_version}-catalina-policy.patch
Patch4: rhbz-1857043.patch
# remove bnd dependency which version is too low on rhel8
Patch6: remove-bnd-annotation.patch
Patch6: %{name}-%{major_version}.%{minor_version}-bnd-annotation.patch
Patch7: JmxRemoteLifecycleListener.patch
Patch8: fix-malformed-dtd.patch
BuildArch: noarch
BuildRequires: ant
BuildRequires: ecj
BuildRequires: ecj >= 1:4.10
BuildRequires: findutils
BuildRequires: java-devel
BuildRequires: javapackages-local
BuildRequires: aqute-bnd
BuildRequires: aqute-bndlib
BuildRequires: systemd
Requires: (java-headless >= 1:1.8 or java-1.8.0-headless or java-11-headless or java-17-headless or java >= 1:1.8)
Requires: java-headless
Requires: javapackages-tools
Requires: %{name}-lib = %{epoch}:%{version}-%{release}
%if 0%{?fedora} || 0%{?rhel} > 7
@ -106,8 +104,6 @@ Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
Conflicts: pki-servlet-engine <= 1:9.0.50
# added after log4j sub-package was removed
Provides: %{name}-log4j = %{epoch}:%{version}-%{release}
@ -138,10 +134,8 @@ The docs web application for Apache Tomcat.
%package jsp-%{jspspec}-api
Summary: Apache Tomcat JavaServer Pages v%{jspspec} API Implementation Classes
Provides: jsp = %{jspspec}
Obsoletes: %{name}-jsp-2.2-api
Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release}
Requires: %{name}-el-%{elspec}-api = %{epoch}:%{version}-%{release}
Conflicts: pki-servlet-engine <= 1:9.0.50
%description jsp-%{jspspec}-api
Apache Tomcat JSP API Implementation Classes.
@ -153,7 +147,6 @@ Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release}
Requires: %{name}-el-%{elspec}-api = %{epoch}:%{version}-%{release}
Requires: ecj >= 1:4.10
Requires(preun): coreutils
Conflicts: pki-servlet-engine <= 1:9.0.50
%description lib
Libraries needed to run the Tomcat Web container.
@ -163,8 +156,6 @@ Summary: Apache Tomcat Java Servlet v%{servletspec} API Implementation Classes
Provides: servlet = %{servletspec}
Provides: servlet6
Provides: servlet3
Obsoletes: %{name}-servlet-3.1-api
Conflicts: pki-servlet-4.0-api <= 1:9.0.50
%description servlet-%{servletspec}-api
Apache Tomcat Servlet API Implementation Classes.
@ -172,8 +163,6 @@ Apache Tomcat Servlet API Implementation Classes.
%package el-%{elspec}-api
Summary: Apache Tomcat Expression Language v%{elspec} API Implementation Classes
Provides: el_api = %{elspec}
Obsoletes: %{name}-el-2.2-api
Conflicts: pki-servlet-engine <= 1:9.0.50 and pki-servlet-container <= 1:9.0.7
%description el-%{elspec}-api
Apache Tomcat EL API Implementation Classes.
@ -193,12 +182,10 @@ find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name "
%patch -P0 -p0
%patch -P1 -p0
%patch -P2 -p0
%patch -P3 -p0
%patch -P4 -p0
%patch -P6 -p1
%patch -P6 -p0
%patch -P7 -p1
%patch -P8 -p1
# Remove webservices naming resources as it's generally unused
%{__rm} -rf java/org/apache/naming/factory/webservices
@ -230,7 +217,8 @@ touch HACK
-Dnsis.exe="HACK" \
-Djaxrpc-lib.jar="HACK" \
-Dwsdl4j-lib.jar="HACK" \
-Dbnd.jar="HACK" \
-Dbnd.jar="$(build-classpath aqute-bnd/biz.aQute.bnd)" \
-Dbnd-annotation.jar="$(build-classpath aqute-bnd/biz.aQute.bnd.annotation)" \
-Dversion="%{version}" \
-Dversion.build="%{micro_version}" \
deploy
@ -402,7 +390,6 @@ popd
%mvn_artifact res/maven/tomcat-websocket-api.pom ${RPM_BUILD_ROOT}%{libdir}/websocket-api.jar
%mvn_artifact res/maven/tomcat-websocket.pom ${RPM_BUILD_ROOT}%{libdir}/tomcat-websocket.jar
%mvn_artifact res/maven/tomcat.pom
%mvn_install
%pre
@ -556,58 +543,25 @@ fi
%defattr(0644,tomcat,tomcat,0755)
%{appdir}/ROOT
%changelog
* Thu Jan 18 2024 Hui Wang <huwang@redhat.com> - 1:9.0.62-29
- Resolves: RHEL-17602
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1:9.0.87-3
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Thu Nov 23 2023 Hui Wang <huwang@redhat.com> - 1:9.0.62-28
- Resolves: RHEL-13907
- Resolves: RHEL-13904
- Resolves: RHEL-12951
- Resolves: RHEL-12544
- Resolves: RHEL-2386
* Mon Aug 12 2024 Adam Krajcik <akrajcik@redhat.com> - 1:9.0.87-2
- Resolves: RHEL-50166 - Rebase tomcat to version 9.0.87
- Resolves: RHEL-12274 - Use src.zip file as a Source0 instead of tar.gz
- Resolves: RHEL-51277 - Prune changelog to remove non-relevant history
- Resolves: RHEL-52906 - tomcat: Switch to using Java 21 as the default JDK
- Resolves: RHEL-55194 - Fix changelog version
- Resolves: RHEL-46156
tomcat: Improper Handling of Exceptional Conditions (CVE-2024-34750)
* Fri Oct 13 2023 Hui Wang <huwang@redhat.com> - 1:9.0.62-27
- Related: RHEL-12543
- Bump release number
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1:9.0.83-3
- Bump release for June 2024 mass rebuild
* Thu Oct 12 2023 Hui Wang <huwang@redhat.com> - 1:9.0.62-16
- Resolves: RHEL-12543 HTTP/2: Multiple HTTP/2 enabled web servers are vulnerable to a DDoS attack (Rapid Reset Attack)
- Remove JDK subpackges which are unused
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:9.0.83-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Sep 08 2023 Hui Wang <huwang@redhat.com> - 1:9.0.62-14
- Related: RHEL-2330 Bump release number
* Thu Sep 07 2023 Hui Wang <huwang@redhat.com> - 1:9.0.62-13
- Resolves: RHEL-2330 Revert the fix for pki-servlet-engine
* Fri Aug 25 2023 Coty Sutherland <csutherl@redhat.com> - 1:9.0.62-12
- Related: #2184135 Declare file conflicts
* Fri Aug 25 2023 Coty Sutherland <csutherl@redhat.com> - 1:9.0.62-11
- Resolves: #2184135 Fix bug introduced in initial commit
* Fri Aug 18 2023 Hui Wang <huwang@redhat.com> - 1:9.0.62-10
- Resolves: #2210630 CVE-2023-28709 tomcat
- Resolves: #2181448 CVE-2023-28708 tomcat: not including the secure attribute causes information disclosure
* Thu Aug 17 2023 Hui Wang <huwang@redhat.com> - 1:9.0.62-9
- Resolves: #2184135 Add Obsoletes to tomcat package
* Thu Aug 17 2023 Hui Wang <huwang@redhat.com> - 1:9.0.62-8
- Resolves: #2189676 Missing Tomcat POM files in RHEL 8.9
* Tue Aug 15 2023 Hui Wang <huwang@redhat.com> - 1:9.0.62-7
- Related: #2173874 Tomcat installs older java even though newer java is installed
- Bump release number
* Fri Aug 11 2023 Hui Wang <huwang@redhat.com> - 1:9.0.62-6
- Resolves: #2173874 Tomcat installs older java even though newer java is installed
- Sync with rhel-8.8.0 branch
* Thu Feb 16 2023 Coty Sutherland <csutherl@redhat.com> - 1:9.0.62-5
- Related: #2160455 Add conflicts to subpackage
* Wed Feb 15 2023 Hui Wang <huwang@redhat.com> - 1:9.0.62-4
- Resolves: #2160455 Add Tomcat 9 to RHEL8
* Fri Dec 01 2023 Hui Wang <huwang@redhat.com> - 1:9.0.83-1
- Update to 9.0.83