Fix Tomcat build for RHEL 9.0.0 beta

Notably, I checked in two patches:

 - 0001-ascheel-Update-to-JDK-Version-11 is UNUSED, but present in case
   it is useful in the future. This was a relatively easy hack on the
   build file, but didn't prove useful; I disabled it.
 - 0002-ascheel-Add-javax.xml.soap.patch, which adds the missing
   javax.xml.soap (removed from JDK 9+) from the jakarta package. This
   package is already in RHEL 9 and so should be safe to add.

Signed-off-by: Alexander Scheel <ascheel@redhat.com>
This commit is contained in:
Alexander Scheel 2021-03-01 13:35:35 -05:00
parent ec341c0fb1
commit f5b68890a2
No known key found for this signature in database
GPG Key ID: C0D6C737D0003143
3 changed files with 77 additions and 6 deletions

View File

@ -0,0 +1,32 @@
From 6cfbaebf60aa4410501ea6c94e65d3df195b2d56 Mon Sep 17 00:00:00 2001
From: Alexander Scheel <ascheel@redhat.com>
Date: Thu, 25 Feb 2021 08:35:51 -0500
Subject: [PATCH] Update to JDK Version 11
Signed-off-by: Alexander Scheel <ascheel@redhat.com>
---
build.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/build.xml b/build.xml
index 37710fd..6664b7a 100644
--- a/build.xml
+++ b/build.xml
@@ -90,10 +90,10 @@
<property name="tomcat.pool" value="${tomcat.output}/jdbc-pool"/>
<!-- Servlet 4.0 spec requires Java 8+ -->
- <property name="compile.source" value="8"/>
- <property name="compile.target" value="8"/>
- <property name="compile.release" value="8"/>
- <property name="min.java.version" value="8"/>
+ <property name="compile.source" value="11"/>
+ <property name="compile.target" value="11"/>
+ <property name="compile.release" value="11"/>
+ <property name="min.java.version" value="11"/>
<!-- Locations to create the JAR artifacts -->
<!-- Standard JARs -->
--
2.29.2

View File

@ -0,0 +1,30 @@
From 03ed73f56fdbb934ed3c9d6315a797835ae4cea9 Mon Sep 17 00:00:00 2001
From: Alexander Scheel <ascheel@redhat.com>
Date: Thu, 25 Feb 2021 09:49:54 -0500
Subject: [PATCH] Add javax.xml.soap?
Signed-off-by: Alexander Scheel <ascheel@redhat.com>
---
build.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/build.xml b/build.xml
index 6664b7a..44888b1 100644
--- a/build.xml
+++ b/build.xml
@@ -220,10 +220,12 @@
<pathelement location="${jdt.jar}"/>
<!-- ant.jar reference for maven build to use -->
<pathelement location="${ant.jar}"/>
+ <pathelement location="${jakarta-saaj.jar}"/>
</path>
<path id="tomcat.classpath">
<pathelement path="${test.run.classes}"/>
+ <pathelement location="${jakarta-saaj.jar}"/>
</path>
<path id="tomcat.test.classpath">
--
2.29.2

View File

@ -82,6 +82,7 @@ Patch1: tomcat-%{major_version}.%{minor_version}-tomcat-users-webapp.patc
Patch2: tomcat-9.0.30-CompilerOptionsRemoval.patch
Patch3: tomcat-%{major_version}.%{minor_version}-catalina-policy.patch
Patch4: removeUnusedDependencies.patch
Patch6: 0002-ascheel-Add-javax.xml.soap.patch
BuildArch: noarch
@ -90,24 +91,27 @@ BuildRequires: findutils
BuildRequires: java-devel >= 1:1.8.0
BuildRequires: jpackage-utils >= 0:1.7.0
BuildRequires: maven-local
BuildRequires: systemd-units
BuildRequires: jakarta-saaj
BuildRequires: systemd
BuildRequires: systemd-rpm-macros
Requires: ant
Requires: java-headless >= 1:1.8.0
Requires: java-devel >= 1:1.8.0
Requires: jpackage-utils
Requires: procps
Requires: jakarta-saaj
Requires(pre): shadow-utils
Requires(post): chkconfig
Requires(postun): chkconfig
Requires(preun): chkconfig
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
Requires(preun): coreutils
Requires: pki-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release}
# Add bundled so that everyone knows this is Tomcat
# Add bundled so that everyone knows this is Tomcat.
Provides: bundled(tomcat) = 9.0.30.redhat-%{redhat_version}
Obsoletes: pki-servlet-container
@ -143,6 +147,7 @@ find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name "
%patch2 -p0
%patch3 -p0
%patch4 -p0
%patch6 -p1
# Since we don't support ECJ in RHEL anymore, remove the class that requires it
%{__rm} -f java/org/apache/jasper/compiler/JDTCompiler.java
@ -159,6 +164,7 @@ touch HACK
-Dcommons-daemon.jar="HACK" \
-Dcommons-daemon.native.src.tgz="HACK" \
-Djdt.jar="HACK" \
-Djakarta-saaj.jar="/usr/share/java/jakarta-saaj/jakarta.xml.soap-api.jar" \
-Dtomcat-native.tar.gz="HACK" \
-Dtomcat-native.home="." \
-Dcommons-daemon.native.win.mgr.exe="HACK" \
@ -374,7 +380,7 @@ if [ "$1" = "0" ]; then
%{_javadir}/tomcat-el-%{elspec}-api.jar
fi
%files
%files
%defattr(0664,root,tomcat,0755)
%doc {LICENSE,NOTICE,RELEASE*}
%attr(0755,root,root) %{_bindir}/tomcat-digest
@ -459,6 +465,9 @@ fi
%{_mavenpomdir}/JPP-tomcat-servlet-api.pom
%changelog
* Wed Feb 03 2021 Alexander Scheel <ascheel@redhat.com> - 1:9.0.30-2
- Rebuild for RHEL 9
* Thu Apr 23 2020 Coty Sutherland <csutherl@redhat.com> - 1:9.0.30-1
- Resolves: rhbz#1721684 Rebase pki-servlet-engine to 9.0.30
- Update to JWS 5.3.0 distribution