Fix missing linking to dependent libraries

Resolves: RHEL-85343 - Tomcat-jakartaee-migration NoClassDefFoundError error
This commit is contained in:
Adam Krajcik 2025-04-14 09:58:18 +02:00
parent 483be6105f
commit b84e1112ca

View File

@ -41,6 +41,7 @@
# 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 appdir_javaee %{basedir}/webapps-javaee
%global homedir %{_datadir}/%{name}
%global bindir %{homedir}/bin
%global confdir %{_sysconfdir}/%{name}
@ -253,6 +254,7 @@ touch HACK
%{__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}
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{appdir_javaee}
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{bindir}
%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{confdir}
%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{confdir}/Catalina/localhost
@ -339,6 +341,10 @@ pushd ${RPM_BUILD_ROOT}%{libdir}
%{__ln_s} ../../java/%{name}-el-%{elspec}-api.jar .
%{__ln_s} $(build-classpath ecj/ecj) jasper-jdt.jar
%{__ln_s} $(build-classpath tomcat-jakartaee-migration/jakartaee-migration) jakartaee-migration.jar
%{__ln_s} $(build-classpath apache-commons-compress/commons-compress) commons-compress.jar
%{__ln_s} $(build-classpath apache-commons-io/commons-io) commons-io.jar
%{__ln_s} $(build-classpath apache-commons-lang3/commons-lang3) commons-lang3.jar
%{__ln_s} $(build-classpath bcel/bcel) bcel.jar
cp ../../%{name}/bin/tomcat-juli.jar .
popd
@ -346,6 +352,7 @@ popd
# symlink to the FHS locations where we've installed things
pushd ${RPM_BUILD_ROOT}%{homedir}
%{__ln_s} %{appdir} webapps
%{__ln_s} %{appdir_javaee} webapps-javaee
%{__ln_s} %{confdir} conf
%{__ln_s} %{libdir} lib
%{__ln_s} %{logdir} logs
@ -463,6 +470,7 @@ exit 0
%defattr(0644,root,tomcat,0775)
%attr(0775,root,tomcat) %dir %{appdir}
%attr(0775,root,tomcat) %dir %{appdir_javaee}
%attr(0775,root,tomcat) %dir %{confdir}/Catalina
%attr(0775,root,tomcat) %dir %{confdir}/Catalina/localhost
%attr(0755,root,tomcat) %dir %{confdir}/conf.d
@ -484,6 +492,7 @@ exit 0
%{homedir}/lib
%{homedir}/temp
%{homedir}/webapps
%{homedir}/webapps-javaee
%{homedir}/work
%{homedir}/logs
%{homedir}/conf
@ -542,6 +551,7 @@ exit 0
tomcat: DoS in examples web application (CVE-2024-54677)
- Resolves: RHEL-87273
tomcat: Authentication bypass when using Jakarta Authentication API (CVE-2024-52316)
- Resolves: RHEL-85343 - NoClassDefFoundError when using migration tool
* Tue Feb 11 2025 Adam Krajcik <akrajcik@redhat.com> - 1:10.1.8-2
- Resolves: RHEL-78899 Add missing Obsoletes