commit: b32d9e7eeffd909e6c30194e9d3f29fe2e41bee7 Author: Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net> AuthorDate: Wed Oct 8 04:20:59 2025 +0000 Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> CommitDate: Thu Oct 16 12:49:03 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b32d9e7e
www-servers/tomcat: add 11.0.13 Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net> Part-of: https://github.com/gentoo/gentoo/pull/44080 Closes: https://github.com/gentoo/gentoo/pull/44080 Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org> www-servers/tomcat/Manifest | 2 + www-servers/tomcat/tomcat-11.0.13.ebuild | 186 +++++++++++++++++++++++++++++++ 2 files changed, 188 insertions(+) diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest index 520913be6622..f320d5d8c0d4 100644 --- a/www-servers/tomcat/Manifest +++ b/www-servers/tomcat/Manifest @@ -8,6 +8,8 @@ DIST apache-tomcat-11.0.10-src.tar.gz 7169469 BLAKE2B 3b28aa6b9b84ed17ab8ccd176a DIST apache-tomcat-11.0.10-src.tar.gz.asc 849 BLAKE2B 620b5a744f3c4b5fda83d552f4add1f19b1f42cbf727556db2158fea3ac5cedf4b4c306d36979d31b4183f4972f2abdfdf81bc8744159c9f66eeb78276d41ceb SHA512 b21642e3b19fd983492a7662e29b76a7bb449424aab03a9bd8b4a85e4bb00d9980dee403c07cc60998adcdb19566eeb9a69abd56b42c395694fb2b8a7659f744 DIST apache-tomcat-11.0.11-src.tar.gz 7174430 BLAKE2B d38e7cdb8304f6635e729a4afe6d70b3f8dfd375aebff86a08d984013e6ebd05b8baa5c4ce11abdfec94de7f3dec83336058eaeafc84e643f08d1bef0637df36 SHA512 ecdd59ab212036d5d0a1b043ca5e27169e13601d7f3c2b394b26396feced027b77694711e115a76065ff394999ed69c9829f780460069f51e03be086c3b4e7b6 DIST apache-tomcat-11.0.11-src.tar.gz.asc 849 BLAKE2B 9358f07e7c08a3f3005a24f83c9c7689f0e69eddc2e396b730377baec9fcb7033edda03ea23bfc776602cbc587174f2ec6e5f8bae256f1b489b16ca1f96ae656 SHA512 3bb76a43281aca4d35f2e43d0b455fa58726a6636099d92f697cbcd520ed3a428360eb9d80ce6efa80ab5a5456e7c915b1df2864dab99caa7c4534f662710e78 +DIST apache-tomcat-11.0.13-src.tar.gz 7191673 BLAKE2B ec4be9ba9f7d5d999bc53214419bfe028351b921dc7b3f97c900982a0152c7d8f42d8b0dc73dd5c808cd1e8e904f558b6c15112008ac573b13656d4311201c7b SHA512 be2b4c7ccdb7065f6862dd90e0ca0d09de08d68d25472044736a35e96dd6d3c37f8606ef2b321051454e31d210bf1a08a2cf6099a763d8d6610632666070315c +DIST apache-tomcat-11.0.13-src.tar.gz.asc 849 BLAKE2B 5380a3d02580c48ba4d0a6551da2d36872354fdeb6c02c220a3de7c2bf70563ee7b23ab91f5e955dd3ffa7c272706c1373e36f76c5986a74723c893f2a99a2e1 SHA512 03395c1f06bc49adf3d8eb1fab81fe0ed3cbeaca540f26e6060158b7ca27b1213b34a0fe9f123d26d2d5e8a9b8440c0d0c03bd1dd317c27df50db89ede12de9d DIST apache-tomcat-9.0.108-src.tar.gz 7390563 BLAKE2B a13aa17d9e2c266af0667fc72216f490c844ccf5dcd64d8265cbaca62d7c867ee234460c8fdd9106004c3147aac708c67e2f14d32e0d8a8b0e20c3cd97a19e80 SHA512 df88cf29a79ac39ae569fa06b465a7bc162cf750645d2e0e1ac12f24b5c0569298c9cd854a253062d05e2eceee977e815f55722f3dfc959e96eebac5785ef84b DIST apache-tomcat-9.0.108-src.tar.gz.asc 833 BLAKE2B d6f022c817aabebbee5e39afc2bc8556c5bbb1e60e28977d77c9a0f2da2f4b7eef1b3f2d83cb22bf9dc2256aaa2c0e69cab8f4a62efcb1eeb7df2072bfce131b SHA512 87e07a7a10434cff72c6c951f90b62d8b56d7cdb430c704ba017d37f0006d247804e3e169390b55ac008d5e28256e4fd23d962fa2be0d62897564f48d0db57fd DIST apache-tomcat-9.0.109-src.tar.gz 7396259 BLAKE2B 78140ce85281ecc1f12d080c37af7bdd738030a61fd0a356c625550c3e5f260c2944e3a01da03c2b39020b4d51b683e8c2825208b011c3afe6079e6771d60d90 SHA512 5ff1fdc882ffd3e3bd05be17b6dc45f914fb2b6553f2438ef30f929f2255cde49b1bac3e39f1a1b1440664b5477e64bde6c408a477e7eab097aa8cee01b82850 diff --git a/www-servers/tomcat/tomcat-11.0.13.ebuild b/www-servers/tomcat/tomcat-11.0.13.ebuild new file mode 100644 index 000000000000..5c03bec2b8ce --- /dev/null +++ b/www-servers/tomcat/tomcat-11.0.13.ebuild @@ -0,0 +1,186 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +JAVA_PKG_IUSE="doc source test" + +inherit java-pkg-2 prefix verify-sig + +MY_P="apache-${P}-src" + +DESCRIPTION="Tomcat Servlet-6.1/JSP-4.0/EL-6.0/WebSocket-2.2/JASPIC-3.1 Container" +HOMEPAGE="https://tomcat.apache.org/" +SRC_URI="mirror://apache/${PN}/tomcat-$(ver_cut 1)/v${PV}/src/${MY_P}.tar.gz + verify-sig? ( https://downloads.apache.org/tomcat/tomcat-$(ver_cut 1)/v${PV}/src/${MY_P}.tar.gz.asc )" +S=${WORKDIR}/${MY_P} + +LICENSE="Apache-2.0" +SLOT="11" + +KEYWORDS="~amd64 ~arm64 ~amd64-linux" +IUSE="extra-webapps" + +RESTRICT="test" # can we run them on a production system? + +ECJ_SLOT="4.37" + +COMMON_DEP=" + >=dev-java/ant-1.10.15:0 + dev-java/bnd-annotation:0 + dev-java/eclipse-ecj:${ECJ_SLOT} + dev-java/jax-rpc-api:0 + >=dev-java/jakartaee-migration-1.0.7-r2:0 + dev-java/wsdl4j:0" + +# jre-17:* because of line 1081, build.xml +# <filter token="target.jdk" value="${compile.release}"/> +RDEPEND=" + ${COMMON_DEP} + acct-group/tomcat + acct-user/tomcat + >=virtual/jre-17:*" +DEPEND=" + ${COMMON_DEP} + app-admin/pwgen + dev-java/bnd:0 + dev-java/bnd-ant:0 + dev-java/bnd-util:0 + dev-java/bndlib:0 + dev-java/libg:0 + dev-java/osgi-cmpn:8 + dev-java/osgi-core:0 + dev-java/slf4j-api:0 + || ( virtual/jdk:21 virtual/jdk:17 ) + test? ( + >=dev-java/ant-1.10.15:0[junit] + dev-java/easymock:3.2 + )" + +BDEPEND="verify-sig? ( ~sec-keys/openpgp-keys-apache-tomcat-$(ver_cut 1) )" +VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/tomcat-$(ver_cut 1).apache.org.asc" + +PATCHES=( + "${FILESDIR}/tomcat-10.1.20-do-not-copy.patch" + "${FILESDIR}/tomcat-11.0.0-offline.patch" + "${FILESDIR}/tomcat-9.0.87-gentoo-bnd.patch" +) + +src_prepare() { + default #780585 + java-pkg-2_src_prepare + java-pkg_clean + + cat > build.properties <<-EOF || die + compile.debug=false + execute.download=false + exist=true # skip target="downloadfile-2" + version=${PV}-gentoo + version.number=${PV} + ant.jar=$(java-pkg_getjar --build-only ant ant.jar) + bnd-annotation.jar=$(java-pkg_getjars bnd-annotation) + bnd-ant.jar=$(java-pkg_getjars --build-only bnd-ant) + bnd-util.jar=$(java-pkg_getjars --build-only bnd-util) + bnd.jar=$(java-pkg_getjars --build-only bnd) + bndlib.jar=$(java-pkg_getjars --build-only bndlib) + jaxrpc-lib.jar=$(java-pkg_getjars --build-only jax-rpc-api) + jdt.jar=$(java-pkg_getjars eclipse-ecj-${ECJ_SLOT}) + libg.jar=$(java-pkg_getjars --build-only libg) + migration-lib.jar=$(java-pkg_getjars jakartaee-migration) + osgi-cmpn.jar=$(java-pkg_getjars --build-only osgi-cmpn-8) + osgi-core.jar=$(java-pkg_getjars --build-only osgi-core) + slf4j-api.jar=$(java-pkg_getjars --build-only slf4j-api) + wsdl4j-lib.jar=$(java-pkg_getjars --build-only wsdl4j) + EOF + if use test; then + echo "easymock.jar=$(java-pkg_getjars --build-only easymock-3.2)" \ + >> build.properties || die "easymock" + fi + + # For use of catalina.sh in netbeans + sed -i -e "/^# ----- Execute The Requested Command/ a\ + CLASSPATH=\`java-config --with-dependencies --classpath ${PN}-${SLOT}\`" \ + bin/catalina.sh || die +} + +# revisions of the scripts +IM_REV="-r2" +INIT_REV="-r1" + +src_compile() { + LC_ALL=C eant + use doc && LC_ALL=C eant javadoc +} + +src_test() { + eant test +} + +src_install() { + local dest="/usr/share/${PN}-${SLOT}" + + java-pkg_jarinto "${dest}"/bin + java-pkg_dojar output/build/bin/*.jar + exeinto "${dest}"/bin + doexe output/build/bin/*.sh + + java-pkg_jarinto "${dest}"/lib + java-pkg_dojar output/build/lib/*.jar + + dodoc RELEASE-NOTES RUNNING.txt + use doc && java-pkg_dojavadoc output/dist/webapps/docs/api + use source && java-pkg_dosrc java/* + + ### Webapps ### + + # add missing docBase + local apps="host-manager manager" + for app in ${apps}; do + sed -i -e "s|=\"true\" >|=\"true\" docBase=\"\$\{catalina.home\}/webapps/${app}\" >|" \ + output/build/webapps/${app}/META-INF/context.xml || die + done + + insinto "${dest}"/webapps + doins -r output/build/webapps/{host-manager,manager,ROOT} + use extra-webapps && doins -r output/build/webapps/{docs,examples} + + ### Config ### + + # create "logs" directory in $CATALINA_BASE + # and set correct perms, see #458890 + dodir "${dest}"/logs + fperms 0750 "${dest}"/logs + + # replace the default pw with a random one, see #92281 + local randpw="$(pwgen -s -B 15 1)" + sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die + + # prepend gentoo.classpath to common.loader, see #453212 + sed -i -e 's/^common\.loader=/\0${gentoo.classpath},/' output/build/conf/catalina.properties || die + + insinto "${dest}" + doins -r output/build/conf + + ### rc ### + + cp "${FILESDIR}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} "${T}" || die + eprefixify "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} + sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} || die + + insinto "${dest}"/gentoo + doins "${T}"/tomcat.conf + exeinto "${dest}"/gentoo + newexe "${T}"/tomcat${INIT_REV}.init tomcat.init + newexe "${T}"/tomcat-instance-manager${IM_REV}.bash tomcat-instance-manager.bash +} + +pkg_postinst() { + einfo "Ebuilds of Tomcat support running multiple instances. To manage Tomcat instances, run:" + einfo " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help" + + ewarn "Please note that since version 10 the primary package for all implemented APIs" + ewarn "has changed from javax.* to jakarta.*. This will almost certainly require code" + ewarn "changes to enable applications to migrate from Tomcat 9 and earlier to Tomcat 10 and later." + + einfo "Please read https://wiki.gentoo.org/wiki/Apache_Tomcat" +}
