diff --git a/JmxRemoteLifecycleListener.patch b/JmxRemoteLifecycleListener.patch
deleted file mode 100644
index 3145a54..0000000
--- a/JmxRemoteLifecycleListener.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-diff --git a/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java b/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
-index f62f8d1..db19960 100644
---- a/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
-+++ b/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
-@@ -611,34 +611,28 @@ public class JmxRemoteLifecycleListener extends SSLHostConfig implements Lifecyc
- * Better to use the internal API than re-invent the wheel.
- */
- @SuppressWarnings("restriction")
-- private static class JmxRegistry extends sun.rmi.registry.RegistryImpl {
-+ private static class JmxRegistry {
- private static final long serialVersionUID = -3772054804656428217L;
- private final String jmxName;
- private final Remote jmxServer;
- public JmxRegistry(int port, RMIClientSocketFactory csf,
- RMIServerSocketFactory ssf, String jmxName, Remote jmxServer) throws RemoteException {
-- super(port, csf, ssf);
- this.jmxName = jmxName;
- this.jmxServer = jmxServer;
- }
-- @Override
- public Remote lookup(String name)
- throws RemoteException, NotBoundException {
- return (jmxName.equals(name)) ? jmxServer : null;
- }
-- @Override
- public void bind(String name, Remote obj)
- throws RemoteException, AlreadyBoundException, AccessException {
- }
-- @Override
- public void unbind(String name)
- throws RemoteException, NotBoundException, AccessException {
- }
-- @Override
- public void rebind(String name, Remote obj)
- throws RemoteException, AccessException {
- }
-- @Override
- public String[] list() throws RemoteException {
- return new String[] { jmxName };
- }
diff --git a/java-9-start-up-parameters.conf b/java-9-start-up-parameters.conf
deleted file mode 100644
index 341e077..0000000
--- a/java-9-start-up-parameters.conf
+++ /dev/null
@@ -1,7 +0,0 @@
-# Add the JAVA 9 specific start-up parameters required by Tomcat
-JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.base/java.lang=ALL-UNNAMED"
-JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.base/java.io=ALL-UNNAMED"
-JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.base/java.util=ALL-UNNAMED"
-JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.base/java.util.concurrent=ALL-UNNAMED"
-JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED"
-export JDK_JAVA_OPTIONS
diff --git a/module-start-up-parameters.conf b/module-start-up-parameters.conf
new file mode 100644
index 0000000..ba35e23
--- /dev/null
+++ b/module-start-up-parameters.conf
@@ -0,0 +1,7 @@
+# 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
diff --git a/rhbz-1857043.patch b/rhbz-1857043.patch
index dd74c3b..92b113b 100644
--- a/rhbz-1857043.patch
+++ b/rhbz-1857043.patch
@@ -1,7 +1,6 @@
-diff -up ./build.xml.orig ./build.xml
---- build.xml.orig 2021-07-07 10:53:55.493742841 +0800
-+++ build.xml 2021-07-07 11:09:43.107968515 +0800
-@@ -1020,7 +1020,7 @@
+--- build.xml.orig 2025-02-04 18:48:03.291725907 +0100
++++ build.xml 2025-02-04 18:56:28.876849900 +0100
+@@ -1071,7 +1071,7 @@
filesDir="${tomcat.classes}"
filesId="files.annotations-api"
manifest="${tomcat.manifests}/annotations-api.jar.manifest"
@@ -10,7 +9,7 @@ diff -up ./build.xml.orig ./build.xml
++ addOSGi="false" />
+
+
+
+ addOSGi="false" />
@@ -58,7 +65,7 @@ diff -up ./build.xml.orig ./build.xml
diff --git a/tomcat-9.0-bootstrap-MANIFEST.MF.patch b/tomcat-10.1-bootstrap-MANIFEST.MF.patch
similarity index 100%
rename from tomcat-9.0-bootstrap-MANIFEST.MF.patch
rename to tomcat-10.1-bootstrap-MANIFEST.MF.patch
diff --git a/tomcat-10.1-catalina-policy.patch b/tomcat-10.1-catalina-policy.patch
new file mode 100644
index 0000000..3254968
--- /dev/null
+++ b/tomcat-10.1-catalina-policy.patch
@@ -0,0 +1,16 @@
+--- 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 =======================================
diff --git a/tomcat-9.0-digest.script b/tomcat-10.1-digest.script
similarity index 100%
rename from tomcat-9.0-digest.script
rename to tomcat-10.1-digest.script
diff --git a/tomcat-9.0-tomcat-users-webapp.patch b/tomcat-10.1-tomcat-users-webapp.patch
similarity index 100%
rename from tomcat-9.0-tomcat-users-webapp.patch
rename to tomcat-10.1-tomcat-users-webapp.patch
diff --git a/tomcat-9.0-tool-wrapper.script b/tomcat-10.1-tool-wrapper.script
similarity index 100%
rename from tomcat-9.0-tool-wrapper.script
rename to tomcat-10.1-tool-wrapper.script
diff --git a/tomcat-9.0.conf b/tomcat-10.1.conf
similarity index 73%
rename from tomcat-9.0.conf
rename to tomcat-10.1.conf
index 6e9eed1..c83305a 100644
--- a/tomcat-9.0.conf
+++ b/tomcat-10.1.conf
@@ -28,24 +28,15 @@ CATALINA_HOME="@@@TCHOME@@@"
# System-wide tmp
CATALINA_TMPDIR="/var/cache/tomcat/temp"
-# 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=/usr/lib"
-
-# Set default javax.sql.DataSource factory to apache commons one. See rhbz#1214381
-JAVA_OPTS="-Djavax.sql.DataSource.Factory=org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory"
-
# You can change your tomcat locale here
#LANG="en_US"
# Run tomcat under the Java Security Manager
SECURITY_MANAGER="false"
-# SHUTDOWN_WAIT has been deprecated. To change the shutdown wait time, set
-# TimeoutStopSec in tomcat.service.
-
# 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")
diff --git a/tomcat-9.0.logrotate b/tomcat-10.1.logrotate
similarity index 100%
rename from tomcat-9.0.logrotate
rename to tomcat-10.1.logrotate
diff --git a/tomcat-9.0.service b/tomcat-10.1.service
similarity index 100%
rename from tomcat-9.0.service
rename to tomcat-10.1.service
diff --git a/tomcat-9.0.sysconfig b/tomcat-10.1.sysconfig
similarity index 100%
rename from tomcat-9.0.sysconfig
rename to tomcat-10.1.sysconfig
diff --git a/tomcat-9.0.wrapper b/tomcat-10.1.wrapper
similarity index 100%
rename from tomcat-9.0.wrapper
rename to tomcat-10.1.wrapper
diff --git a/tomcat-9.0-catalina-policy.patch b/tomcat-9.0-catalina-policy.patch
deleted file mode 100644
index dd6a47d..0000000
--- a/tomcat-9.0-catalina-policy.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- conf/catalina.policy.orig 2022-11-04 16:17:41.227506990 +0800
-+++ conf/catalina.policy 2022-11-04 16:21:51.393351415 +0800
-@@ -56,6 +56,15 @@ grant codeBase "file:${java.home}/lib/ex
- // 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 =======================================
-
-@@ -261,4 +270,4 @@ grant codeBase "file:${catalina.home}/we
- //
- // The permissions granted to a specific JAR
- // grant codeBase "war:file:${catalina.base}/webapps/examples.war*/WEB-INF/lib/foo.jar" {
--// };
-\ No newline at end of file
-+// };
diff --git a/tomcat-build.patch b/tomcat-build.patch
new file mode 100644
index 0000000..cdf73ef
--- /dev/null
+++ b/tomcat-build.patch
@@ -0,0 +1,19 @@
+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};-;.}
diff --git a/tomcat-functions b/tomcat-functions
index ab08fa2..1187653 100644
--- a/tomcat-functions
+++ b/tomcat-functions
@@ -13,30 +13,9 @@ _save_function() {
eval "$NEWNAME_FUNC"
}
-run_jsvc(){
- if [ -x /usr/bin/jsvc ]; then
- TOMCAT_USER="${TOMCAT_USER:-tomcat}"
- JSVC="/usr/bin/jsvc"
-
- JSVC_OPTS="-nodetach -pidfile /var/run/jsvc-tomcat${NAME}.pid -user ${TOMCAT_USER} -outfile ${CATALINA_BASE}/logs/catalina.out -errfile ${CATALINA_BASE}/logs/catalina.out"
- if [ "$1" = "stop" ]; then
- JSVC_OPTS="${JSVC_OPTS} -stop"
- fi
-
- exec "${JSVC}" ${JSVC_OPTS} ${FLAGS} -classpath "${CLASSPATH}" ${OPTIONS} "${MAIN_CLASS}" "${@}"
- else
- echo "Can't find /usr/bin/jsvc executable"
- fi
-
-}
-
_save_function run run_java
run() {
- if [ "${USE_JSVC}" = "true" ] ; then
- run_jsvc $@
- else
run_java $@
- fi
}
diff --git a/tomcat.spec b/tomcat.spec
index 2faa052..96c8fb3 100644
--- a/tomcat.spec
+++ b/tomcat.spec
@@ -28,19 +28,17 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
-%global jspspec 2.3
-%global major_version 9
-%global minor_version 0
-%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 jspspec 3.1
+%global major_version 10
+%global minor_version 1
+%global micro_version 8
+%global packdname %{name}-%{major_version}.%{minor_version}.%{micro_version}.redhat-00022-src
+%global servletspec 6.0
+%global elspec 5.0
%global tcuid 53
-# Recommended version is specified in java/org/apache/catalina/core/AprLifecycleListener.java
-%global native_version 1.2.21
-# FHS 2.3 compliant tree structure - http://www.pathname.com/fhs/2.3/
+# FHS 3.0 compliant tree structure - http://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html
%global basedir %{_var}/lib/%{name}
%global appdir %{basedir}/webapps
%global homedir %{_datadir}/%{name}
@@ -51,61 +49,58 @@
%global cachedir %{_var}/cache/%{name}
%global tempdir %{cachedir}/temp
%global workdir %{cachedir}/work
-%global _systemddir /lib/systemd/system
Name: tomcat
Epoch: 1
Version: %{major_version}.%{minor_version}.%{micro_version}
-Release: 3%{?dist}
+Release: 1%{?dist}
Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API
-License: ASL 2.0
+License: Apache-2.0
URL: http://tomcat.apache.org/
Source0: %{packdname}.zip
Source1: %{name}-%{major_version}.%{minor_version}.conf
-Source3: %{name}-%{major_version}.%{minor_version}.sysconfig
-Source4: %{name}-%{major_version}.%{minor_version}.wrapper
-Source5: %{name}-%{major_version}.%{minor_version}.logrotate
-Source6: %{name}-%{major_version}.%{minor_version}-digest.script
-Source7: %{name}-%{major_version}.%{minor_version}-tool-wrapper.script
-Source11: %{name}-%{major_version}.%{minor_version}.service
-Source21: tomcat-functions
-Source30: tomcat-preamble
-Source31: tomcat-server
-Source32: tomcat-named.service
-Source33: java-9-start-up-parameters.conf
+Source2: %{name}-%{major_version}.%{minor_version}.sysconfig
+Source3: %{name}-%{major_version}.%{minor_version}.wrapper
+Source4: %{name}-%{major_version}.%{minor_version}.logrotate
+Source5: %{name}-%{major_version}.%{minor_version}-digest.script
+Source6: %{name}-%{major_version}.%{minor_version}-tool-wrapper.script
+Source7: %{name}-%{major_version}.%{minor_version}.service
+Source8: %{name}-functions
+Source9: %{name}-preamble
+Source10: %{name}-server
+Source11: %{name}-named.service
+Source12: module-start-up-parameters.conf
Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch
Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch
Patch3: %{name}-%{major_version}.%{minor_version}-catalina-policy.patch
-Patch4: rhbz-1857043.patch
-Patch6: %{name}-%{major_version}.%{minor_version}-bnd-annotation.patch
-Patch7: JmxRemoteLifecycleListener.patch
+Patch4: %{name}-%{major_version}.%{minor_version}-bnd-annotation.patch
+Patch5: %{name}-%{major_version}.%{minor_version}-JDTCompiler.patch
+Patch6: rhbz-1857043.patch
BuildArch: noarch
-BuildRequires: ant
-BuildRequires: ecj >= 1:4.10
+BuildRequires: ant >= 1.10.2
+BuildRequires: ecj >= 4.20
BuildRequires: findutils
BuildRequires: java-devel
BuildRequires: javapackages-local
BuildRequires: aqute-bnd
BuildRequires: aqute-bndlib
BuildRequires: systemd
+BuildRequires: tomcat-jakartaee-migration
Requires: java-headless
Requires: javapackages-tools
Requires: %{name}-lib = %{epoch}:%{version}-%{release}
-%if 0%{?fedora} || 0%{?rhel} > 7
-Recommends: tomcat-native >= %{native_version}
-%endif
+
Requires(pre): shadow-utils
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
-# added after log4j sub-package was removed
-Provides: %{name}-log4j = %{epoch}:%{version}-%{release}
+Conflicts: tomcat9
%description
Tomcat is the servlet container that is used in the official Reference
@@ -120,6 +115,8 @@ to be a collaboration of the best-of-breed developers from around the world.
%package admin-webapps
Summary: The host-manager and manager web applications for Apache Tomcat
Requires: %{name} = %{epoch}:%{version}-%{release}
+Conflicts: tomcat9
+Conflicts: tomcat9-admin-webapps
%description admin-webapps
The host-manager and manager web applications for Apache Tomcat.
@@ -127,6 +124,8 @@ The host-manager and manager web applications for Apache Tomcat.
%package docs-webapp
Summary: The docs web application for Apache Tomcat
Requires: %{name} = %{epoch}:%{version}-%{release}
+Conflicts: tomcat9
+Conflicts: tomcat9-docs-webapp
%description docs-webapp
The docs web application for Apache Tomcat.
@@ -134,8 +133,12 @@ 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-api < %{jspspec}
Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release}
Requires: %{name}-el-%{elspec}-api = %{epoch}:%{version}-%{release}
+Conflicts: tomcat9
+Conflicts: tomcat9-jsp-2.3-api
+
%description jsp-%{jspspec}-api
Apache Tomcat JSP API Implementation Classes.
@@ -145,8 +148,14 @@ Summary: Libraries needed to run the Tomcat Web container
Requires: %{name}-jsp-%{jspspec}-api = %{epoch}:%{version}-%{release}
Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release}
Requires: %{name}-el-%{elspec}-api = %{epoch}:%{version}-%{release}
-Requires: ecj >= 1:4.10
+Requires: ecj >= 4.20
+Recommends: tomcat-jakartaee-migration
Requires(preun): coreutils
+Conflicts: tomcat9
+Conflicts: tomcat9-lib
+Conflicts: tomcat9-jsp-2.3-api
+Conflicts: tomcat9-servlet-4.0-api
+Conflicts: tomcat9-el-3.0-api
%description lib
Libraries needed to run the Tomcat Web container.
@@ -154,8 +163,9 @@ Libraries needed to run the Tomcat Web container.
%package servlet-%{servletspec}-api
Summary: Apache Tomcat Java Servlet v%{servletspec} API Implementation Classes
Provides: servlet = %{servletspec}
-Provides: servlet6
-Provides: servlet3
+Obsoletes: %{name}-servlet-api < %{servletspec}
+Conflicts: tomcat9
+Conflicts: tomcat9-servlet-4.0-api
%description servlet-%{servletspec}-api
Apache Tomcat Servlet API Implementation Classes.
@@ -163,6 +173,9 @@ 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-api < %{elspec}
+Conflicts: tomcat9
+Conflicts: tomcat9-el-3.0-api
%description el-%{elspec}-api
Apache Tomcat EL API Implementation Classes.
@@ -170,6 +183,8 @@ Apache Tomcat EL API Implementation Classes.
%package webapps
Summary: The ROOT web application for Apache Tomcat
Requires: %{name} = %{epoch}:%{version}-%{release}
+Conflicts: tomcat9
+Conflicts: tomcat9-webapps
%description webapps
The ROOT web application for Apache Tomcat.
@@ -180,28 +195,26 @@ The ROOT web application for Apache Tomcat.
find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name "*.gz" -o \
-name "*.jar" -o -name "*.war" -o -name "*.zip" \) -delete
-%patch -P0 -p0
-%patch -P1 -p0
-%patch -P3 -p0
-%patch -P4 -p0
-%patch -P6 -p0
-%patch -P7 -p1
+%patch 0 -p0
+%patch 1 -p0
+%patch 3 -p0
+%patch 4 -p0
+%patch 5 -p0
+%patch 6 -p0
# Remove webservices naming resources as it's generally unused
%{__rm} -rf java/org/apache/naming/factory/webservices
# Configure maven files
%mvn_package ":tomcat-el-api" tomcat-el-api
-%mvn_alias "org.apache.tomcat:tomcat-el-api" "org.eclipse.jetty.orbit:javax.el"
+%mvn_alias "org.apache.tomcat:tomcat-el-api" "jakarta.servlet:jakarta.servlet-api"
%mvn_package ":tomcat-jsp-api" tomcat-jsp-api
-%mvn_alias "org.apache.tomcat:tomcat-jsp-api" "org.eclipse.jetty.orbit:javax.servlet.jsp"
+%mvn_alias "org.apache.tomcat:tomcat-jsp-api" "jakarta.servlet:jakarta.servlet.jsp"
%mvn_package ":tomcat-servlet-api" tomcat-servlet-api
%build
-export OPT_JAR_LIST="xalan-j2-serializer"
-# we don't care about the tarballs and we're going to replace
-# tomcat-dbcp.jar with apache-commons-{collections,dbcp,pool}-tomcat5.jar
+# we don't care about the tarballs and we're going to replace jars
# so just create a dummy file for later removal
touch HACK
@@ -221,12 +234,13 @@ touch HACK
-Dbnd-annotation.jar="$(build-classpath aqute-bnd/biz.aQute.bnd.annotation)" \
-Dversion="%{version}" \
-Dversion.build="%{micro_version}" \
+ -Dmigration-lib.jar="$(build-classpath tomcat-jakartaee-migration/jakartaee-migration.jar)" \
deploy
# remove some jars that we'll replace with symlinks later
-%{__rm} output/build/lib/ecj.jar
+%{__rm} output/build/bin/commons-daemon.jar output/build/lib/ecj.jar output/build/lib/jakartaee-migration.jar
# Remove the example webapps per Apache Tomcat Security Considerations
-# see https://tomcat.apache.org/tomcat-9.0-doc/security-howto.html
+# see https://tomcat.apache.org/tomcat-10.1-doc/security-howto.html
%{__rm} -rf output/build/webapps/examples
@@ -234,7 +248,6 @@ touch HACK
# build initial path structure
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_bindir}
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sbindir}
-%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_systemddir}
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{appdir}
@@ -267,33 +280,33 @@ popd
> ${RPM_BUILD_ROOT}%{confdir}/%{name}.conf
%{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
-e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \
- -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE3} \
+ -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE2} \
> ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/%{name}
-%{__install} -m 0644 %{SOURCE4} \
+%{__install} -m 0755 %{SOURCE3} \
${RPM_BUILD_ROOT}%{_sbindir}/%{name}
-%{__install} -m 0644 %{SOURCE11} \
+%{__install} -m 0644 %{SOURCE7} \
${RPM_BUILD_ROOT}%{_unitdir}/%{name}.service
-%{__sed} -e "s|\@\@\@TCLOG\@\@\@|%{logdir}|g" %{SOURCE5} \
+%{__sed} -e "s|\@\@\@TCLOG\@\@\@|%{logdir}|g" %{SOURCE4} \
> ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/%{name}.disabled
%{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
-e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \
- -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE6} \
+ -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE5} \
> ${RPM_BUILD_ROOT}%{_bindir}/%{name}-digest
%{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
-e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \
- -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE7} \
+ -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE6} \
> ${RPM_BUILD_ROOT}%{_bindir}/%{name}-tool-wrapper
-%{__install} -m 0644 %{SOURCE21} \
+%{__install} -m 0644 %{SOURCE8} \
${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/functions
-%{__install} -m 0755 %{SOURCE30} \
+%{__install} -m 0755 %{SOURCE9} \
${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/preamble
-%{__install} -m 0755 %{SOURCE31} \
+%{__install} -m 0755 %{SOURCE10} \
${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/server
-%{__install} -m 0644 %{SOURCE32} \
+%{__install} -m 0644 %{SOURCE11} \
${RPM_BUILD_ROOT}%{_unitdir}/%{name}@.service
-%{__install} -m 0644 %{SOURCE33} ${RPM_BUILD_ROOT}%{confdir}/conf.d/
+%{__install} -m 0644 %{SOURCE12} ${RPM_BUILD_ROOT}%{confdir}/conf.d/
# Substitute libnames in catalina-tasks.xml
sed -i \
@@ -314,6 +327,7 @@ popd
pushd output/build
%{_bindir}/build-jar-repository lib ecj 2>&1
+ %{_bindir}/build-jar-repository lib tomcat-jakartaee-migration 2>&1
popd
pushd ${RPM_BUILD_ROOT}%{libdir}
@@ -322,7 +336,9 @@ pushd ${RPM_BUILD_ROOT}%{libdir}
%{__ln_s} ../../java/%{name}-servlet-%{servletspec}-api.jar .
%{__ln_s} ../../java/%{name}-el-%{elspec}-api.jar .
%{__ln_s} $(build-classpath ecj/ecj) jasper-jdt.jar
- %{__cp} -a ../../%{name}/bin/tomcat-juli.jar .
+ %{__ln_s} $(build-classpath tomcat-jakartaee-migration/jakartaee-migration) jakartaee-migration.jar
+
+ cp ../../%{name}/bin/tomcat-juli.jar .
popd
# symlink to the FHS locations where we've installed things
@@ -389,7 +405,9 @@ popd
%mvn_file org.apache.tomcat:tomcat-websocket-api tomcat/websocket-api
%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-websocket-client-api.pom ${RPM_BUILD_ROOT}%{libdir}/websocket-client-api.jar
%mvn_artifact res/maven/tomcat.pom
+
%mvn_install
%pre
@@ -407,43 +425,13 @@ exit 0
# install but don't activate
%systemd_post %{name}.service
-%post jsp-%{jspspec}-api
-%{_sbindir}/update-alternatives --install %{_javadir}/jsp.jar jsp \
- %{_javadir}/%{name}-jsp-%{jspspec}-api.jar 20200
-
-%post servlet-%{servletspec}-api
-%{_sbindir}/update-alternatives --install %{_javadir}/servlet.jar servlet \
- %{_javadir}/%{name}-servlet-%{servletspec}-api.jar 30000
-
-%post el-%{elspec}-api
-%{_sbindir}/update-alternatives --install %{_javadir}/elspec.jar elspec \
- %{_javadir}/%{name}-el-%{elspec}-api.jar 20300
-
%preun
# clean tempdir and workdir on removal or upgrade
%{__rm} -rf %{workdir}/* %{tempdir}/*
%systemd_preun %{name}.service
%postun
-%systemd_postun_with_restart %{name}.service
-
-%postun jsp-%{jspspec}-api
-if [ "$1" = "0" ]; then
- %{_sbindir}/update-alternatives --remove jsp \
- %{_javadir}/%{name}-jsp-%{jspspec}-api.jar
-fi
-
-%postun servlet-%{servletspec}-api
-if [ "$1" = "0" ]; then
- %{_sbindir}/update-alternatives --remove servlet \
- %{_javadir}/%{name}-servlet-%{servletspec}-api.jar
-fi
-
-%postun el-%{elspec}-api
-if [ "$1" = "0" ]; then
- %{_sbindir}/update-alternatives --remove elspec \
- %{_javadir}/%{name}-el-%{elspec}-api.jar
-fi
+%systemd_postun_with_restart %{name}.service
%files
%defattr(0664,root,tomcat,0755)
@@ -477,7 +465,7 @@ fi
%attr(0775,root,tomcat) %dir %{confdir}/Catalina/localhost
%attr(0755,root,tomcat) %dir %{confdir}/conf.d
%{confdir}/conf.d/README
-%{confdir}/conf.d/java-9-start-up-parameters.conf
+%{confdir}/conf.d/module-start-up-parameters.conf
%config(noreplace) %{confdir}/%{name}.conf
%config(noreplace) %{confdir}/*.policy
%config(noreplace) %{confdir}/*.properties
@@ -544,6 +532,9 @@ fi
%{appdir}/ROOT
%changelog
+* Wed Feb 05 2025 Adam Krajcik - 1:10.1.8-1
+- Resolves: RHEL-51222 Upgrade tomcat to 10.1.8
+
* Tue Oct 29 2024 Troy Dawson - 1:9.0.87-3
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018