commit: 5d9a5678a347f381a6b41b16e29c7d3ee0fcc99b Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> AuthorDate: Sun Feb 26 07:40:18 2023 +0000 Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> CommitDate: Sun Feb 26 07:40:36 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d9a5678
www-servers/tomcat: bump to 9.0.72 in this version we do not provide external packages for servlet, el and jsp apis anymore switched from glassfish-xmlrpc-api to jax-rpc-api this version again provides tomcat-dbcp.jar Bug: https://bugs.gentoo.org/144276 Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org> www-servers/tomcat/Manifest | 2 + .../tomcat/files/tomcat-9.0.72-build.xml.patch | 99 +++++++++++ www-servers/tomcat/tomcat-9.0.72.ebuild | 190 +++++++++++++++++++++ 3 files changed, 291 insertions(+) diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest index 16c39c24c145..5b400b7546de 100644 --- a/www-servers/tomcat/Manifest +++ b/www-servers/tomcat/Manifest @@ -6,6 +6,8 @@ DIST apache-tomcat-8.5.85-src.tar.gz 6035271 BLAKE2B 06180fe34c3bd70678dd82d44e2 DIST apache-tomcat-8.5.85-src.tar.gz.asc 849 BLAKE2B ead4de7a2fe01f67b2c3fd61d4c85d87e5142f2bd0ba933d70d8e5a8935e6bd97fff14bd4d4ddeee27edd7683971d241e6d14126fee01e789914a394ee0faf47 SHA512 e7c3cb19cff697154d159986748680d66bae22a12bc272a09d64b39ed681d60ce9d7ff9ba9c2f45744b6ac81b675a87af6c7df3eecd7079b98749063fbe579a5 DIST apache-tomcat-9.0.71-src.tar.gz 6222516 BLAKE2B 41b4ea0006e813a1be885cd48cb76e7debde4794e79b88e1110d505b179ac7c45b516265fd0e2f90cd20f0cac6ec7d04577ba1b3384570531902e00a7f599f0a SHA512 0c62a5e526178e39c68717223ce2cb4a31096e5765b718639e4ba4bbf3d70ba28238cd1bb5cf74747f718b35baf98de32c7ee8a7ebd445c6191700070c1ca930 DIST apache-tomcat-9.0.71-src.tar.gz.asc 833 BLAKE2B 137f8f2ba0ec727e478291bd82000f0eb3bb411c5e27916892424cbfc49e75e52d0f14da732946d1e8e5cf06493392b604952b5bfea3288753a4fc53fd90b743 SHA512 398c4782de8339c332381156dd36f05f2006f8c5a78bd78ee32ef05fbb1ab121a21020b3726020282e632bdc14f98cf2828f329c229801d63a06d55cab8f3c80 +DIST apache-tomcat-9.0.72-src.tar.gz 6227773 BLAKE2B f784df0dd40539f38343942d818f3735521fbd3c978a3fa9c1c4cb7a4a46b71a23bdd55530b2ba6ae4a6ae89bf651a1c73fea0380e485097eb77cc75ac4d7075 SHA512 5dfcf1b4ce90b41164170eada109ccccb9c4357ca979f88dc89548284164b482c5d87788d93188de20b68ae346e870ab01525a980be3f8ee72af27e83f82d3a1 +DIST apache-tomcat-9.0.72-src.tar.gz.asc 833 BLAKE2B f79bd955a01d846427a454d9a50f9a614e16757edf79beeeef7b9498e79356944085b0f39bd8e1a1181e7152e042a06ce310ccf7da3549b8b16acee2eaf4ba56 SHA512 4e8afa0ae0d7eded96f33d2391c018bac7dbf44754cbf98bc965fd0d3c2c3fbbac9c68304066e93cb4e9e36bc8bcf2f8378f5b357df360582df0aae239b61585 DIST biz.aQute.bnd-6.3.1.jar 16703723 BLAKE2B 97cc171a926be326abe95695e795ccb575bc6ca770b4c4df7764bdedbd6dfcf5643673484f50cc34f845f27d03ddf8a971c1c502b3b63db2541266c2b35e8e23 SHA512 59d3a50575ea8fcfc5f5c2178f7d40248c987c77ae8afeb0a8c9ec397ce9e4ceae277ba3b26dafc245bd2185bbafeaef219dd1af0988921631b6a8fe0cbd0abf DIST biz.aQute.bnd-6.4.0.jar 16303123 BLAKE2B 73cdeb9e63c04b41db26f91efc3b01fdfd7c8796d6b1f556c77f90bcdbe048f374b5164b885689f3e62ca45b8ca8b97fce70e1fa13d807d2f76869155c8ba7f5 SHA512 b113177f97894b0ed5cfbc38f96c995d6425e981ec8c7b27d99044793ff77dd2450367ad9ee977f443fba349fe1d68fc26f3aaa737eba0a402abcf29716b2e85 DIST biz.aQute.bndlib-6.3.1.jar 3183076 BLAKE2B 73bef88e8f3c8015d259ac36b953672ed9cb0aa5d9dfca3361033a7f37646bb65bbea8be4ef1fb425518e85ec8a9cc63032815671ece5f956b754ecf555dc174 SHA512 7c3f7bc0280beb1b15182c558ef23f431719c046da8473545efe9aeec935776ebf6682cabbb7e7f53dcf2ccca168d8df35859be77121dab04340a5ec7e993608 diff --git a/www-servers/tomcat/files/tomcat-9.0.72-build.xml.patch b/www-servers/tomcat/files/tomcat-9.0.72-build.xml.patch new file mode 100644 index 000000000000..985d5d4f94fb --- /dev/null +++ b/www-servers/tomcat/files/tomcat-9.0.72-build.xml.patch @@ -0,0 +1,99 @@ +diff --git a/build.xml b/build.xml +index b420c2a..abecfde 100644 +--- a/build.xml ++++ b/build.xml +@@ -1436,9 +1436,9 @@ + + <target name="deploy" depends="package,build-docs,build-tomcat-jdbc,compile-webapp-examples" + description="Default. Builds a working Tomcat instance"> +- ++<!-- not needed for us + <copy tofile="${tomcat.build}/bin/commons-daemon.jar" file="${commons-daemon.jar}" /> +- ++--> + <!-- Copy scripts --> + <copy todir="${tomcat.build}/bin"> + <fileset dir="bin"> +@@ -1498,7 +1498,9 @@ + <exclude name="${jdt.jar.filename}"/> + </fileset> + </delete> ++<!-- we provide jdt jar externally + <copy file="${jdt.jar}" todir="${tomcat.build}/lib"/> ++--> + + <!-- Add sources for examples --> + <antcall target="examples-sources" /> +@@ -2154,11 +2156,12 @@ + </copy> + + <!-- Source bundles for native components --> ++<!-- we provide tomcat native as another package and we don't need commons-daemon + <copy tofile="${tomcat.dist}/bin/tomcat-native.tar.gz" + file="${tomcat-native.tar.gz}" /> + <copy tofile="${tomcat.dist}/bin/commons-daemon-native.tar.gz" + file="${commons-daemon.native.src.tgz}" /> +- ++--> + <!-- platform README files --> + <echo append="false" file="${tomcat.dist}/bin/x64/README"> + Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. +@@ -2319,8 +2322,10 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. + <link href="../elapi"/> + <link href="../websocketapi"/> + <link href="../jaspicapi"/> ++<!-- net is not accessed from emerge + <link href="https://docs.oracle.com/javase/8/docs/api/"/> + <link href="https://javaee.github.io/javaee-spec/javadocs/"/> ++--> + <packageset dir="${tomcat.dist}/src/java/"> + <include name="org/**"/> + <exclude name="org/apache/el/parser/**"/> +@@ -3234,6 +3239,7 @@ asf.ldap.username=${release.asfusername} + depends="setup-bnd"> + + <!-- Download Commons Daemon --> ++<!-- not needed + <antcall target="downloadgz-2"> + <param name="sourcefile.1" value="${commons-daemon.bin.loc.1}"/> + <param name="sourcefile.2" value="${commons-daemon.bin.loc.2}"/> +@@ -3242,8 +3248,9 @@ asf.ldap.username=${release.asfusername} + <param name="checksum.algorithm" value="${commons-daemon.bin.checksum.algorithm}"/> + <param name="checksum.value" value="${commons-daemon.bin.checksum.value}"/> + </antcall> +- ++--> + <!-- Download JDT (Eclipse compiler) --> ++<!-- we provide JDT + <antcall target="downloadfile-2"> + <param name="sourcefile.1" value="${jdt.loc.1}"/> + <param name="sourcefile.2" value="${jdt.loc.2}"/> +@@ -3253,8 +3260,9 @@ asf.ldap.username=${release.asfusername} + <param name="checksum.algorithm" value="${jdt.checksum.algorithm}"/> + <param name="checksum.value" value="${jdt.checksum.value}"/> + </antcall> +- ++--> + <!-- Download WS API --> ++<!-- we provide jaxrpc + <antcall target="downloadfile"> + <param name="sourcefile" value="${jaxrpc-lib.loc}"/> + <param name="destfile" value="${jaxrpc-lib.jar}"/> +@@ -3263,6 +3271,8 @@ asf.ldap.username=${release.asfusername} + <param name="checksum.algorithm" value="${jaxrpc-lib.checksum.algorithm}"/> + <param name="checksum.value" value="${jaxrpc-lib.checksum.value}"/> + </antcall> ++--> ++<!-- we provide wsdl4j + <antcall target="downloadfile"> + <param name="sourcefile" value="${wsdl4j-lib.loc}"/> + <param name="destfile" value="${wsdl4j-lib.jar}"/> +@@ -3271,7 +3281,7 @@ asf.ldap.username=${release.asfusername} + <param name="checksum.algorithm" value="${wsdl4j-lib.checksum.algorithm}"/> + <param name="checksum.value" value="${wsdl4j-lib.checksum.value}"/> + </antcall> +- ++--> + </target> + + <target name="download-test-compile" diff --git a/www-servers/tomcat/tomcat-9.0.72.ebuild b/www-servers/tomcat/tomcat-9.0.72.ebuild new file mode 100644 index 000000000000..77edaf178766 --- /dev/null +++ b/www-servers/tomcat/tomcat-9.0.72.ebuild @@ -0,0 +1,190 @@ +# 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 and bndlib.jar +# See bugs #203080 and #676116 +BND_VERSION="6.4.0" +BND="biz.aQute.bnd-${BND_VERSION}.jar" +BNDLIB="biz.aQute.bndlib-${BND_VERSION}.jar" + +DESCRIPTION="Tomcat Servlet-4.0/JSP-2.3/EL-3.0/WebSocket-1.1/JASPIC-1.1 Container" +HOMEPAGE="https://tomcat.apache.org/" +SRC_URI="mirror://apache/${PN}/tomcat-9/v${PV}/src/${MY_P}.tar.gz + https://repo.maven.apache.org/maven2/biz/aQute/bnd/biz.aQute.bnd/${BND_VERSION}/${BND} + https://repo.maven.apache.org/maven2/biz/aQute/bnd/biz.aQute.bndlib/${BND_VERSION}/${BNDLIB} + 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="9" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-solaris" +IUSE="extra-webapps" + +RESTRICT="test" # can we run them on a production system? + +# though it could work with 4.22 and upstream uses 4.20, +# we still use 4.15 because 4.20+ is currently built with java 11 +# and it would force Tomcat to use at least java 11 too +ECJ_SLOT="4.15" + +COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT} + dev-java/jax-rpc-api:0 + dev-java/wsdl4j:0" +RDEPEND="${COMMON_DEP} + acct-group/tomcat + acct-user/tomcat + >=virtual/jre-1.8:*" +DEPEND="${COMMON_DEP} + app-admin/pwgen + >=dev-java/ant-core-1.9.13 + >=virtual/jdk-1.8:* + test? ( + >=dev-java/ant-junit-1.9:0 + dev-java/easymock:3.2 + )" + +BDEPEND="verify-sig? ( ~sec-keys/openpgp-keys-apache-tomcat-${PV}:${PV} )" +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}/usr/share/openpgp-keys/tomcat-${PV}.apache.org.asc" + +S=${WORKDIR}/${MY_P} + +PATCHES=( + "${FILESDIR}/${PN}-9.0.50-insufficient-ecj.patch" +) + +BND_HOME="${S}/tomcat-build-libs/bnd" +BNDLIB_HOME="${S}/tomcat-build-libs/bndlib" +BND_JAR="${BND_HOME}/${BND}" +BNDLIB_JAR="${BNDLIB_HOME}/${BND_LIB}" + +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}" "${BNDLIB_HOME}" || die "Failed to create dir" + ln -s "${DISTDIR}/${BND}" "${BND_HOME}/" || die "Failed to symlink bnd-*.jar" + ln -s "${DISTDIR}/${BND}" "${BNDLIB_HOME}/" || die "Failed to symlink bndlib-*.jar" +} + +src_prepare() { + default + + find -name '*.jar' -type f -delete -print || die + + eapply "${FILESDIR}/${PN}-9.0.72-build.xml.patch" + + # 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},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} -Dbndlib.jar=${BNDLIB_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() { + elog "Ebuilds of Tomcat support running multiple instances. If you used prior version" + elog "of Tomcat (<7.0.32), you have to migrate your existing instance to work with new Tomcat." + elog "You can find more information at https://wiki.gentoo.org/wiki/Apache_Tomcat" + + elog "To manage Tomcat instances, run:" + elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help" + + 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." +}