summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Šulc <fordfrog@gentoo.org>2024-01-10 10:23:00 +0100
committerMiroslav Šulc <fordfrog@gentoo.org>2024-01-10 10:23:00 +0100
commit811c2ec10dfdaec678e69995530bb50e8ae60ad5 (patch)
tree09db970696c1dc9d06f1842ae5f42390be66f1df /www-servers
parentsec-keys/openpgp-keys-apache-tomcat: bump to 10.1.18, 9.0.85 & 8.5.98 (diff)
downloadgentoo-811c2ec10dfdaec678e69995530bb50e8ae60ad5.tar.gz
gentoo-811c2ec10dfdaec678e69995530bb50e8ae60ad5.tar.bz2
gentoo-811c2ec10dfdaec678e69995530bb50e8ae60ad5.zip
www-servers/tomcat: bump to 10.1.18
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-10.1.18.ebuild181
2 files changed, 183 insertions, 0 deletions
diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest
index 5d7f5cf91b2e..562e5e1e1183 100644
--- a/www-servers/tomcat/Manifest
+++ b/www-servers/tomcat/Manifest
@@ -2,6 +2,8 @@ DIST apache-tomcat-10.1.16-src.tar.gz 6148509 BLAKE2B d6b8169c6761a4a27a84d0c5e8
DIST apache-tomcat-10.1.16-src.tar.gz.asc 849 BLAKE2B 698555997aec1f8c0a8c01a40d7c991099623db60f4e5f5e9d26a6eec6f67a12967d6d2f58ffad311b13e0266316fcfcb8a3f2f1dc9b418b3104808de88527af SHA512 85e055ce437242b64af42c2c500704ff272fc8624bc1b4d7eb4ea3e28277186a214ee177927c9ef7b593b43571d462ccdab33fcbf401c23ddd7931e61c0b4275
DIST apache-tomcat-10.1.17-src.tar.gz 6157591 BLAKE2B cd7b21a5ac698570914598bb72c1ddae76df55e36d6a04057a311d80b08375973a74dd26926778e6504b71f08d1dd2f4bf6d1396fd172bc6bf0d65479ddb7eb6 SHA512 1a2c71357a358a18d9cea824371d3e12ed637fcf748b42b38406c408c7e597ce8796548a66407454bc00a8c42d647006dcb3ebfaca6aceca3adbbd9cc79319aa
DIST apache-tomcat-10.1.17-src.tar.gz.asc 849 BLAKE2B a517cfbddb778002c9e32e81e2bcb55e9e91a4f77909ce93736c86294dbadf8262a0dd178b236b9119a2d4c1e63367af7dfa19372f76f66519cd2bbd6ad853df SHA512 b0e5937ae0a4960d709a8d120caf7e91cc0af3650d6428e3165c880506f028f451ceb64a2318dd3e9d40bad69c6bf711a0e082ef2497fcbe55e201c87e84a6c1
+DIST apache-tomcat-10.1.18-src.tar.gz 6166424 BLAKE2B 588b60b25448cf15389449a4f6d6791e005ae69a6b4c840e49a2564a6e483ec24c028d1d4022b38dcba7b0ef9fb1723b3d58474ba52358ff01eb842d951a6259 SHA512 62bd651ea24ff856c02688ca6e8bb469b1ae4903c95d89c45342fa82474a0688fae5d773fb43ed8a6ef1a3933509e9b35812147c5b7b193a7cbf7cc58a97e403
+DIST apache-tomcat-10.1.18-src.tar.gz.asc 849 BLAKE2B 139f943e369f3dcf2d2bd7238296e631d5ca16886222cfa4a715e02d4914c77014a7a284585708a341e450f749ba02b6ecbe18abe0ecbcd10dbfce21aa4180f0 SHA512 990333e3d10d9de5162b4fd6f44d2d5f9c97df3fb8bcdd1e4e2cfb9aebd010bc9f6be0cbead17ac57f94ea4e3ae078755e0c157666de8acdcd862c5b11f4cd27
DIST apache-tomcat-8.5.96-src.tar.gz 6135041 BLAKE2B 7bb00cb835f1c56a9eb79ab44333436782ed526bc22ba31b2522323a0ab7c80384b76d049e2d9f0703a07cd5ecd449995125b2b7ce319943ab85b65f7acb66ff SHA512 3d2652e06d81eb014623bf1b0f03c238f330487682a255a4ed37a2b722f99194d08e3083b491d962917bc21cfbefd44f0e7808248c6b90c6a87db292138144dd
DIST apache-tomcat-8.5.96-src.tar.gz.asc 849 BLAKE2B 2f1e20008cdad11bca95146542566c64956b79ff10571b7bc8068fe65cf3025e190bc43f94d29511f12c5091f79f2a69a02afeff51f8e78aef7058264c32e35f SHA512 fa86689b1438d39ea1fbe376cef2941d09c572fba2f1aa2d4f63cfa238da94880d4e8eb6403175073bfa379434abf0571f4b85c3789714a04183c416db94f25f
DIST apache-tomcat-8.5.97-src.tar.gz 6142056 BLAKE2B 8aa2078d88fe796631c5fa5a611b84ea1622d44e4ccc4ce8bbf6e494d8bd17324fcb849d55dae3d20c9197743712e1b31f3144c3e1c1fba094f271114d439014 SHA512 bb2aeac13cf953b98faae35eaf4b9d95acbe334088f26acfe9ae3a0cc1429a5e56c43a6c29829f52472e6abef9077477f38f8b759972c6f11f7fc3143d041eda
diff --git a/www-servers/tomcat/tomcat-10.1.18.ebuild b/www-servers/tomcat/tomcat-10.1.18.ebuild
new file mode 100644
index 000000000000..104bd1129668
--- /dev/null
+++ b/www-servers/tomcat/tomcat-10.1.18.ebuild
@@ -0,0 +1,181 @@
+# 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 java-ant-2 prefix verify-sig
+
+MY_P="apache-${PN}-${PV}-src"
+
+# Currently we bundle binary versions of bnd.jar
+# See bugs #203080 and #676116
+BND_VERSION="7.0.0"
+BND="biz.aQute.bnd-${BND_VERSION}.jar"
+
+DESCRIPTION="Tomcat Servlet-6.0/JSP-3.1/EL-5.0/WebSocket-2.1/JASPIC-3.0 Container"
+HOMEPAGE="https://tomcat.apache.org/"
+SRC_URI="mirror://apache/${PN}/tomcat-10/v${PV}/src/${MY_P}.tar.gz
+ https://repo.maven.apache.org/maven2/biz/aQute/bnd/biz.aQute.bnd/${BND_VERSION}/${BND}
+ verify-sig? ( https://downloads.apache.org/tomcat/tomcat-$(ver_cut 1)/v${PV}/src/apache-tomcat-${PV}-src.tar.gz.asc )"
+
+LICENSE="Apache-2.0"
+SLOT="10.1"
+KEYWORDS="~amd64 ~arm ~arm64 ~amd64-linux"
+IUSE="extra-webapps"
+
+RESTRICT="test" # can we run them on a production system?
+
+ECJ_SLOT="4.26"
+
+COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT}
+ dev-java/jax-rpc-api:0
+ >=dev-java/jakartaee-migration-1.0.5:0
+ dev-java/wsdl4j:0"
+RDEPEND="${COMMON_DEP}
+ acct-group/tomcat
+ acct-user/tomcat
+ >=virtual/jre-11:*"
+DEPEND="${COMMON_DEP}
+ app-admin/pwgen
+ dev-java/ant-core
+ >=virtual/jdk-11:*
+ test? (
+ dev-java/ant-junit:0
+ 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}/${PN}-10.1.6-build.xml.patch" )
+
+S=${WORKDIR}/${MY_P}
+
+BND_HOME="${S}/tomcat-build-libs/bnd"
+BND_JAR="${BND_HOME}/${BND}"
+
+src_unpack() {
+ if use verify-sig; then
+ verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.gz{,.asc}
+ fi
+
+ unpack ${MY_P}.tar.gz
+
+ mkdir -p "${BND_HOME}" || die "Failed to create dir"
+ ln -s "${DISTDIR}/${BND}" "${BND_HOME}/" || die "Failed to symlink bnd-*.jar"
+}
+
+src_prepare() {
+ default
+
+ find -name '*.jar' -type f -delete -print || die
+
+ local vm_version="$(java-config -g PROVIDES_VERSION)"
+
+ # 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
+
+ java-pkg-2_src_prepare
+}
+
+JAVA_ANT_REWRITE_CLASSPATH="true"
+
+EANT_BUILD_TARGET="deploy"
+EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT},jakartaee-migration,wsdl4j"
+EANT_TEST_GENTOO_CLASSPATH="easymock-3.2"
+EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes"
+EANT_NEEDS_TOOLS="true"
+EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false -Dbnd.jar=${BND_JAR}"
+
+# revisions of the scripts
+IM_REV="-r2"
+INIT_REV="-r1"
+
+src_configure() {
+ java-ant-2_src_configure
+
+ eapply "${FILESDIR}/${PN}-9.0.37-fix-build-rewrite.patch"
+}
+
+src_compile() {
+ EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar):$(java-pkg_getjars --build-only jax-rpc-api)"
+ LC_ALL=C java-pkg-2_src_compile
+}
+
+src_test() {
+ java-pkg-2_src_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 and"
+ einfo "https://wiki.gentoo.org/wiki/Project:Java/Tomcat_6_Guide for more information."
+}