From f5b68890a244cd0a95ac4f54824c40fe1258afef Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Mon, 1 Mar 2021 13:35:35 -0500 Subject: [PATCH] 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 --- 0001-ascheel-Update-to-JDK-Version-11.patch | 32 +++++++++++++++++++++ 0002-ascheel-Add-javax.xml.soap.patch | 30 +++++++++++++++++++ pki-servlet-engine.spec | 21 ++++++++++---- 3 files changed, 77 insertions(+), 6 deletions(-) create mode 100644 0001-ascheel-Update-to-JDK-Version-11.patch create mode 100644 0002-ascheel-Add-javax.xml.soap.patch diff --git a/0001-ascheel-Update-to-JDK-Version-11.patch b/0001-ascheel-Update-to-JDK-Version-11.patch new file mode 100644 index 0000000..7868ccb --- /dev/null +++ b/0001-ascheel-Update-to-JDK-Version-11.patch @@ -0,0 +1,32 @@ +From 6cfbaebf60aa4410501ea6c94e65d3df195b2d56 Mon Sep 17 00:00:00 2001 +From: Alexander Scheel +Date: Thu, 25 Feb 2021 08:35:51 -0500 +Subject: [PATCH] Update to JDK Version 11 + +Signed-off-by: Alexander Scheel +--- + 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 @@ + + + +- +- +- +- ++ ++ ++ ++ + + + +-- +2.29.2 + diff --git a/0002-ascheel-Add-javax.xml.soap.patch b/0002-ascheel-Add-javax.xml.soap.patch new file mode 100644 index 0000000..f324ef4 --- /dev/null +++ b/0002-ascheel-Add-javax.xml.soap.patch @@ -0,0 +1,30 @@ +From 03ed73f56fdbb934ed3c9d6315a797835ae4cea9 Mon Sep 17 00:00:00 2001 +From: Alexander Scheel +Date: Thu, 25 Feb 2021 09:49:54 -0500 +Subject: [PATCH] Add javax.xml.soap? + +Signed-off-by: Alexander Scheel +--- + 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 @@ + + + ++ + + + + ++ + + + +-- +2.29.2 + diff --git a/pki-servlet-engine.spec b/pki-servlet-engine.spec index fc97047..a10aceb 100644 --- a/pki-servlet-engine.spec +++ b/pki-servlet-engine.spec @@ -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 - 1:9.0.30-2 +- Rebuild for RHEL 9 + * Thu Apr 23 2020 Coty Sutherland - 1:9.0.30-1 - Resolves: rhbz#1721684 Rebase pki-servlet-engine to 9.0.30 - Update to JWS 5.3.0 distribution