summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolkmar W. Pogatzki <gentoo@pogatzki.net>2024-12-09 20:41:15 +0100
committerMiroslav Šulc <fordfrog@gentoo.org>2024-12-10 07:48:31 +0100
commit8053000515fea304b5d1a7df1c052b150fbb47d8 (patch)
tree5d24779d6df216ca1475d0eb35e7ee124f5207ff /www-servers
parentwww-servers/tomcat: add 10.1.34 (diff)
downloadgentoo-8053000515fea304b5d1a7df1c052b150fbb47d8.tar.gz
gentoo-8053000515fea304b5d1a7df1c052b150fbb47d8.tar.bz2
gentoo-8053000515fea304b5d1a7df1c052b150fbb47d8.zip
www-servers/tomcat: add 11.0.2
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Closes: https://github.com/gentoo/gentoo/pull/39589 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'www-servers')
-rw-r--r--www-servers/tomcat/Manifest2
-rw-r--r--www-servers/tomcat/tomcat-11.0.2.ebuild185
2 files changed, 187 insertions, 0 deletions
diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest
index 2bf878694444..34a9459b6d46 100644
--- a/www-servers/tomcat/Manifest
+++ b/www-servers/tomcat/Manifest
@@ -6,6 +6,8 @@ DIST apache-tomcat-10.1.34-src.tar.gz 6946871 BLAKE2B 9e25c8fd0ca4a8d19e2d4f912b
DIST apache-tomcat-10.1.34-src.tar.gz.asc 833 BLAKE2B 564c266e4967967450c10944a388c3df051971d00a632d8ecfe68f0a8741f89b270d965f8f62ff8cdc1f097f184f34025ec18b0e4ecfef26bed3a8db9ff8e028 SHA512 2c96d2f89f2bfc449516cdc06682a5404168cdd9e473211444a141aafe3fabe743d68d4e7e32c8a2bc2bb23d875e09c28781ca4cb33e9e13288086c97c20e891
DIST apache-tomcat-11.0.1-src.tar.gz 6857402 BLAKE2B 7e8b006454578328b200a2ecb93ab6db7f5db19c9a7be5af794cd90cf72a6836170c1ca8228b89c132ef42adedbc4a6ac4ee0b0c11ab77cdd3180cbdd40ad394 SHA512 9e05a85331d5c868b149476e8bad4618c4608cd82d425c2bd907c1c4888e7d7e8eebba623ad7e5ded03123e089a1a8c271f69d4d9c62c3829634fe145b668588
DIST apache-tomcat-11.0.1-src.tar.gz.asc 849 BLAKE2B e7d20faf4bf17318bf3afb053b0c573b1c721b2d40633f0bdb928143b632dabcd53dac302de672e119195947ea11aaee5fbab1f5d6b1fd660c9839369c27f4ff SHA512 32fb68ead6b5576d9d52f7c27a9b8aa55cec0f6db76f5fb2abb5666804d5eacba3636d7fa8b337ada3320a1cab7e01f829a9d644ede3584a5a05aec613aa92a8
+DIST apache-tomcat-11.0.2-src.tar.gz 6877090 BLAKE2B 3ed1b184ecf43d12678d3682830065562ce4442aab571ee926b91f509195e314aeceeb10ff2ad935332b38607fd09237eeca274d526df9b7daad17fe6f144508 SHA512 38c5b9c75edb7e620a89376deab0c2e2af08e5853021e207ba26f8b4a2fa1dae2aecffb79bc9c443eb989c96317268a947a42b6869ca2cd827d2bda3be426433
+DIST apache-tomcat-11.0.2-src.tar.gz.asc 849 BLAKE2B 0e670e67396068747d5371da13135696be8b4555892e1cd8338413f7540ded08203c986074cfe42bd077e475a30a05299fd35def29e8a089e570e68be473366c SHA512 ae10b95f4a5a9e922721d190ff9abfeeb62d5814277b076e1d12a5dec64491de8c382273a1b4ccc3f3d193ce561ba34214334048a9e28dcb22a50458d9103016
DIST apache-tomcat-9.0.96-src.tar.gz 7042818 BLAKE2B de7d573a2ee83ffe997f65ff2b66b8205efdb05c7155e6e6982c5ff0406b0f7ddf1a93978b758c956e5fee8f5b8df8880ef55b4009248a2477f26dc1da30a8b0 SHA512 cd6d0730b2aa34520249f8285b0663f88b601ca508f8534fa948ad0a9502dd760f446b6adc930b947c310d05e33025186b88ecab71a0ea16618ae24edb0c4884
DIST apache-tomcat-9.0.96-src.tar.gz.asc 833 BLAKE2B 6df8c0c7ee73b9104c102c1c4c0f2030728de90a968efc26a0c85537d7876a0402bc66fea9a3a398be8f210c6255b5741ee969a0633cdecd95268731615f8635 SHA512 37404f8687b0bfc761611402ac4581e98063a229f9a4b40d4b4c6fc25e966d48a2b951cdd198cf60930bb7b776ebce6ef02eeaa89e51351120b462ae1b20e54c
DIST apache-tomcat-9.0.97-src.tar.gz 7072346 BLAKE2B ab6e4359d01016f83d66ed516471701c4a9ecc6c4bffc13474978b7bf01cf4336ea88a6f3c3bb9e97f63f9056e4b3fc7d766e144f100862b2c0e5540109f46e9 SHA512 e0500e0c7e4af40f0a6db845b73f41423a7b7746e110053c36744fc376a0db96d141069035171f5b6efdf6011c155cbc29815cd286a0508cefaddb776909a00a
diff --git a/www-servers/tomcat/tomcat-11.0.2.ebuild b/www-servers/tomcat/tomcat-11.0.2.ebuild
new file mode 100644
index 000000000000..0a27c5cc1870
--- /dev/null
+++ b/www-servers/tomcat/tomcat-11.0.2.ebuild
@@ -0,0 +1,185 @@
+# Copyright 1999-2024 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.33"
+
+COMMON_DEP="
+ 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/ant-1.10.14-r3:0
+ 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-17:*
+ test? (
+ >=dev-java/ant-1.10.14-r3: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-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 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 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"
+}