From: "Miroslav Šulc" <fordfrog@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: www-servers/tomcat/files/, www-servers/tomcat/
Date: Tue, 05 Aug 2025 19:27:16 +0000 (UTC) [thread overview]
Message-ID: <1754421817.ed599b1d88f2b9c0faae491e6560a772f35e5a03.fordfrog@gentoo> (raw)
commit: ed599b1d88f2b9c0faae491e6560a772f35e5a03
Author: Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net>
AuthorDate: Sun Jul 6 07:57:32 2025 +0000
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Tue Aug 5 19:23:37 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed599b1d
www-servers/tomcat: add 11.0.9
Bug: https://bugs.gentoo.org/960748
Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net>
Part-of: https://github.com/gentoo/gentoo/pull/42902
Closes: https://github.com/gentoo/gentoo/pull/42902
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>
www-servers/tomcat/Manifest | 2 +
.../tomcat-11.0.9-avoid_eclipse-ecj_4.35.patch | 53 ++++++
www-servers/tomcat/tomcat-11.0.9.ebuild | 190 +++++++++++++++++++++
3 files changed, 245 insertions(+)
diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest
index 0630b18a1f76..80bd7bc15411 100644
--- a/www-servers/tomcat/Manifest
+++ b/www-servers/tomcat/Manifest
@@ -8,6 +8,8 @@ DIST apache-tomcat-11.0.6-src.tar.gz 6923455 BLAKE2B 1381bfe42390235e9726c5704ff
DIST apache-tomcat-11.0.6-src.tar.gz.asc 849 BLAKE2B 21ac13391c6fe25496ede76af999032dfaec14edb3d8babe99bf63f6fed047eedb240c4aa557370d787c62cf2169a7e4333a036231f81f2684b4407b30fbf55e SHA512 9a42f9a7264c8f757b710b1cf6ab0642b0446838b56644ef51799b0f2c7202d03e7fd57d89e6bc42fedbf8ab42838128151554d5109e5206ca36853e3b9eab9b
DIST apache-tomcat-11.0.8-src.tar.gz 7145586 BLAKE2B 05a7f94f9b0d907ffbc4b0bc5a7638c236e3d218846155134d558dcfef9357175920dc83913c771a05f5874380a11c82b671c9654d2d71a2110aae87b259c067 SHA512 6e266f3fbb9ed8f8308bf4d5cc8644700864e26d75e6d94b2306bd4c5ca72bae42e98ed3ebf54769956a191f039b354e9f901bfbe64a182ed69e78abfaad6f7e
DIST apache-tomcat-11.0.8-src.tar.gz.asc 849 BLAKE2B c0531021bb03030afec7dade9b5d894b7fa6ba32fa2c688b9d4c311e2ddbf2df05af9c8fa359545bccd402445f8f31d0e905cd30775fabb322fb480bb0da806d SHA512 50fa400f572203c985a4d2b5602c2a515a7ac4ddb81d0c56f526c5e5aa44b0e1110c7894a55c4c9a62d5f5495c4d28dfa45250524e44a8ea8a8399139c9b0f74
+DIST apache-tomcat-11.0.9-src.tar.gz 7149332 BLAKE2B 7979e1918e66324895c6d33f6ee806b6b1d4d8841574b1eb0f9280b6ac9b3c305150291fef9b4d732c17f419cffcde0ef60c885b540973e080087a777ecd421e SHA512 d493a66f8118666f946da35e4b4b40116f516e720982a9e0c65c3e4049748f628b6d89afe25232786c0fe93e6aa2441c94634d6646bbcc5b64878545342b0284
+DIST apache-tomcat-11.0.9-src.tar.gz.asc 849 BLAKE2B 7e134bca298b191d8fa7ee5f59582d20201b3335c5f1db6348a344eea047d85afefc24606c4f21cefdac670bed62509b7f9a40fad31ad9afdc2bd52e0078c4c4 SHA512 36dd0906b82de2ba0917691a2fe275af0082f0c156b9445efcd30820519a4648021e879a5829d3b2287ac9a0ae4c8a79961b7c8f36d1b8b57d0265bc11b3d43e
DIST apache-tomcat-9.0.104-src.tar.gz 7141508 BLAKE2B 125a38e2e46e190e84368f7269968b5724cc84dea0b1ced5f6edf0fc2f494b6fb60d70b27fc046ce4007565b428ad922c3e14ed8b0f1960726b0cc67d01d95af SHA512 d2d66a1e0bf55cd6379154a023aaccec5e4007a95412e7207ecf729d315c6afdc3125a985cdf1289ad66162a180f24798161436e99d792e24deee71aaf521a4c
DIST apache-tomcat-9.0.104-src.tar.gz.asc 833 BLAKE2B 2d42e131df4c42dc831c0d0b8d2068083c5812e500737e84f3c6a37a1a695311e871b2c1ad7bacbdfd53b2400fe1211039bdcfa48908335551bef99a5de7da89 SHA512 533f81f8dce8f840c19796d306565aff4bd16797dc3c2786ae6a748e2b91214768849036477d465e1de522880458bc35e38424a2cd30e13152561df575af7947
DIST apache-tomcat-9.0.106-src.tar.gz 7365623 BLAKE2B ee1b2025b99deab2c845fc0ebf0a651786fa947a42b20287a20b93da7d4bcd58470654d816f91c70be09293893d67e6df83bf05a7050178a52592f5d0a740ade SHA512 1b95f7899a488bd3435ab45999e371a9d8cdd42e4e575ae14b4fcb0387034d150d96c8d62d036b95fad187c810015eda43db50a46919296812653c0a153e8cee
diff --git a/www-servers/tomcat/files/tomcat-11.0.9-avoid_eclipse-ecj_4.35.patch b/www-servers/tomcat/files/tomcat-11.0.9-avoid_eclipse-ecj_4.35.patch
new file mode 100644
index 000000000000..3c7c8fcfaff7
--- /dev/null
+++ b/www-servers/tomcat/files/tomcat-11.0.9-avoid_eclipse-ecj_4.35.patch
@@ -0,0 +1,53 @@
+
+In order to allow building tomcat-11.0.9 with java 21 we have to use an older version of eclipse-ecj.
+We cannot keyword eclipse-ecj:4.35 as long we don't have Java 23 or higher keyworded.
+Otherwise compilation would run into this error:
+
+ [javac] /var/tmp/portage/www-servers/tomcat-11.0.6/work/apache-tomcat-11.0.6-src/java/org/apache/jasper/compiler/JDTCompiler.java:327: error: cannot find symbol
+ [javac] settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_23);
+ [javac] ^
+ [javac] symbol: variable VERSION_23
+ [javac] location: class CompilerOptions
+ [javac] /var/tmp/portage/www-servers/tomcat-11.0.6/work/apache-tomcat-11.0.6-src/java/org/apache/jasper/compiler/JDTCompiler.java:415: error: cannot find symbol
+ [javac] settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_23);
+ [javac] ^
+ [javac] symbol: variable VERSION_23
+ [javac] location: class CompilerOptions
+ [javac] /var/tmp/portage/www-servers/tomcat-11.0.6/work/apache-tomcat-11.0.6-src/java/org/apache/jasper/compiler/JDTCompiler.java:416: error: cannot find symbol
+ [javac] settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_23);
+ [javac] ^
+ [javac] symbol: variable VERSION_23
+ [javac] location: class CompilerOptions
+
+diff --git a/java/org/apache/jasper/compiler/JDTCompiler.java b/java/org/apache/jasper/compiler/JDTCompiler.java
+index 1a267be..79b56bd 100644
+--- a/java/org/apache/jasper/compiler/JDTCompiler.java
++++ b/java/org/apache/jasper/compiler/JDTCompiler.java
+@@ -332,9 +332,9 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler {
+ } else if (opt.equals("22")) {
+ settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_22);
+ } else if (opt.equals("23")) {
+- settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_23);
++ settings.put(CompilerOptions.OPTION_Source, "23");
+ } else if (opt.equals("24")) {
+- settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_24);
++ settings.put(CompilerOptions.OPTION_Source, "24");
+ } else if (opt.equals("25")) {
+ // Constant not available in latest ECJ version shipped with
+ // Tomcat. May be supported in a snapshot build.
+@@ -417,11 +417,11 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler {
+ settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_22);
+ settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_22);
+ } else if (opt.equals("23")) {
+- settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_23);
+- settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_23);
++ settings.put(CompilerOptions.OPTION_TargetPlatform, "23");
++ settings.put(CompilerOptions.OPTION_Compliance, "23");
+ } else if (opt.equals("24")) {
+- settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_24);
+- settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_24);
++ settings.put(CompilerOptions.OPTION_TargetPlatform, "24");
++ settings.put(CompilerOptions.OPTION_Compliance, "24");
+ } else if (opt.equals("25")) {
+ // Constant not available in latest ECJ version shipped with
+ // Tomcat. May be supported in a snapshot build.
diff --git a/www-servers/tomcat/tomcat-11.0.9.ebuild b/www-servers/tomcat/tomcat-11.0.9.ebuild
new file mode 100644
index 000000000000..65b4dc2604e9
--- /dev/null
+++ b/www-servers/tomcat/tomcat-11.0.9.ebuild
@@ -0,0 +1,190 @@
+# 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?
+
+# We use ECJ_SLOT="4.33" instead of "4.35" because "4.35" would need Java
+# version 23 or higher to build which is not keyworded:
+# To use "4.33" we also added "tomcat-11.0.6-avoid_eclipse-ecj_4.35.patch".
+ECJ_SLOT="4.33"
+
+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-${PV}:${PV} )"
+VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/tomcat-${PV}.apache.org.asc"
+
+PATCHES=(
+ "${FILESDIR}/tomcat-10.1.20-do-not-copy.patch"
+ "${FILESDIR}/tomcat-11.0.0-offline.patch"
+ "${FILESDIR}/tomcat-11.0.9-avoid_eclipse-ecj_4.35.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"
+}
next reply other threads:[~2025-08-05 19:27 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-05 19:27 Miroslav Šulc [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-04-10 16:36 [gentoo-commits] repo/gentoo:master commit in: www-servers/tomcat/files/, www-servers/tomcat/ Miroslav Šulc
2024-10-15 7:36 Miroslav Šulc
2024-04-04 7:51 Miroslav Šulc
2023-11-08 9:02 Miroslav Šulc
2023-01-04 8:05 Miroslav Šulc
2022-09-27 5:17 Miroslav Šulc
2022-09-18 11:20 Miroslav Šulc
2022-04-01 10:04 Miroslav Šulc
2022-04-01 9:50 Miroslav Šulc
2022-02-22 9:13 Miroslav Šulc
2022-01-21 10:02 Miroslav Šulc
2022-01-21 10:02 Miroslav Šulc
2021-08-07 14:56 Miroslav Šulc
2021-07-05 14:15 Miroslav Šulc
2021-05-13 11:09 Miroslav Šulc
2021-04-07 15:03 Miroslav Šulc
2021-04-07 14:33 Miroslav Šulc
2021-03-13 12:03 Miroslav Šulc
2021-02-04 10:50 Miroslav Šulc
2020-11-24 10:30 Miroslav Šulc
2020-07-20 8:40 Miroslav Šulc
2020-07-07 8:10 Miroslav Šulc
2020-02-09 23:34 Miroslav Šulc
2019-11-25 12:26 Miroslav Šulc
2019-04-19 14:51 Miroslav Šulc
2019-01-23 14:54 Miroslav Šulc
2019-01-23 12:49 Miroslav Šulc
2018-06-01 8:34 Miroslav Šulc
2018-04-13 14:08 Miroslav Šulc
2018-04-08 20:15 James Le Cuirot
2018-02-15 17:00 Miroslav Šulc
2018-01-23 15:30 Miroslav Šulc
2017-12-15 18:03 Miroslav Šulc
2017-12-04 15:07 Miroslav Šulc
2017-11-16 8:54 Miroslav Šulc
2017-10-19 7:41 Miroslav Šulc
2017-10-11 14:27 Miroslav Šulc
2017-08-10 10:35 Miroslav Šulc
2017-08-10 10:35 Miroslav Šulc
2017-07-15 7:50 Miroslav Šulc
2017-07-15 7:50 Miroslav Šulc
2017-07-15 7:50 Miroslav Šulc
2017-05-15 17:36 Miroslav Šulc
2017-05-09 13:27 Miroslav Šulc
2017-04-25 10:12 Miroslav Šulc
2017-04-09 14:56 Miroslav Šulc
2017-04-09 14:28 Miroslav Šulc
2017-03-31 17:40 Miroslav Šulc
2017-03-31 17:40 Miroslav Šulc
2017-03-31 17:40 Miroslav Šulc
2017-03-14 15:15 Miroslav Šulc
2017-02-10 10:11 Miroslav Šulc
2017-01-25 15:56 Miroslav Šulc
2016-12-13 12:22 Miroslav Šulc
2016-12-13 8:34 Miroslav Šulc
2016-11-10 16:03 Miroslav Šulc
2016-10-13 17:10 Miroslav Šulc
2016-09-06 17:23 Miroslav Šulc
2016-07-13 21:39 Miroslav Šulc
2016-07-13 21:39 Miroslav Šulc
2016-06-14 12:34 Miroslav Šulc
2016-06-14 12:18 Miroslav Šulc
2016-05-25 20:10 Miroslav Šulc
2016-02-18 9:13 Miroslav Šulc
2016-02-12 18:28 Miroslav Šulc
2016-02-10 14:40 Miroslav Šulc
2016-01-18 15:18 Miroslav Šulc
2015-12-11 9:50 Miroslav Šulc
2015-12-04 18:11 Miroslav Šulc
2015-11-25 19:49 Miroslav Šulc
2015-10-15 11:07 Miroslav Šulc
2015-10-02 9:08 Miroslav Šulc
2015-09-03 16:50 Miroslav Šulc
2015-08-25 23:22 James Le Cuirot
2015-08-16 14:22 James Le Cuirot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1754421817.ed599b1d88f2b9c0faae491e6560a772f35e5a03.fordfrog@gentoo \
--to=fordfrog@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox