diff options
author | Miroslav Šulc <fordfrog@gentoo.org> | 2023-12-13 22:25:47 +0100 |
---|---|---|
committer | Miroslav Šulc <fordfrog@gentoo.org> | 2023-12-13 22:25:47 +0100 |
commit | c43c0b80b81f871b6bfaf458bbd752341eed5e86 (patch) | |
tree | ae08f04823cf709cdb23e6eecc9402df26cb56d1 /www-servers | |
parent | sec-keys/openpgp-keys-apache-tomcat: dropped obsoleteo 10.0.15, 9.0.82 & 8.5.95 (diff) | |
download | gentoo-c43c0b80b81f871b6bfaf458bbd752341eed5e86.tar.gz gentoo-c43c0b80b81f871b6bfaf458bbd752341eed5e86.tar.bz2 gentoo-c43c0b80b81f871b6bfaf458bbd752341eed5e86.zip |
www-servers/tomcat: bump to 10.0.17
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'www-servers')
-rw-r--r-- | www-servers/tomcat/Manifest | 2 | ||||
-rw-r--r-- | www-servers/tomcat/tomcat-10.1.17.ebuild | 181 |
2 files changed, 183 insertions, 0 deletions
diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest index befa8b89fd58..9a7e8e2933a0 100644 --- a/www-servers/tomcat/Manifest +++ b/www-servers/tomcat/Manifest @@ -1,5 +1,7 @@ DIST apache-tomcat-10.1.16-src.tar.gz 6148509 BLAKE2B d6b8169c6761a4a27a84d0c5e8900b9ef213e4a00a4c713ebefbc5cac4c037da10686a1196bcc50ba2eca96ddb3604d51e3961048f6fd1ef2d81bcca92930d19 SHA512 a358f93642fcb9eb34e4fb30f6dc7f7a3d69ae9c83c7a50748f143e3297228db106548cb44a1c2102e63325ae39be67090a66be1920ccac5d080c8ff1f41ad8c 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-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-9.0.83-src.tar.gz 6300235 BLAKE2B 207f617e6af89898be2a120376d6ee926ea1b67becfeb4e35ab7eb1c97aa09a59d714e642722f3cfeadbc71d90f49b483a02d1d2d909fdf1f28954ff8326e0f9 SHA512 28e112a9d01918434ad03c414058275bbc4e34be408c2cfe2d819c3a08cadc3c31920e279c5312529aa2f5abf1e002537012c5f06d43ba8894448afd5585c231 diff --git a/www-servers/tomcat/tomcat-10.1.17.ebuild b/www-servers/tomcat/tomcat-10.1.17.ebuild new file mode 100644 index 000000000000..7001a52d8c24 --- /dev/null +++ b/www-servers/tomcat/tomcat-10.1.17.ebuild @@ -0,0 +1,181 @@ +# Copyright 1999-2023 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." +} |