commit:     3338a7205f699f0e4de85779f5c29a8d4c51991f
Author:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 26 08:02:00 2023 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Sun Feb 26 08:02:25 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3338a720

www-servers/tomcat: bump to 8.5.86

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

Closes: https://bugs.gentoo.org/144276
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 www-servers/tomcat/Manifest                        |   2 +
 .../tomcat/files/tomcat-8.5.86-build.xml.patch     | 113 +++++++++++++++
 www-servers/tomcat/tomcat-8.5.86.ebuild            | 158 +++++++++++++++++++++
 3 files changed, 273 insertions(+)

diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest
index 5b400b7546de..25b05656fda8 100644
--- a/www-servers/tomcat/Manifest
+++ b/www-servers/tomcat/Manifest
@@ -4,6 +4,8 @@ DIST apache-tomcat-10.1.6-src.tar.gz 6073924 BLAKE2B 
debc363395becd96a856a03ffd5
 DIST apache-tomcat-10.1.6-src.tar.gz.asc 849 BLAKE2B 
71f512c0def69b9c23d4440a988f1f889c57c55e731fc00080a6c919c13360ad2b8a7bbdc65b0e632b5e4b66eb96e58301d720fb433b3b3b50e107de17fd6fe6
 SHA512 
51d560236ebdc9f9c6e77e6ac98306ec8e9e3079efda7f0a2b6cb0cc3256571881acd891668d606d873d0b5a1be3ba3cd5a095d44cba6e852f1cd5fd8e1e9d41
 DIST apache-tomcat-8.5.85-src.tar.gz 6035271 BLAKE2B 
06180fe34c3bd70678dd82d44e2cfc7cf4ed367523b35f3cdaab6c15a5a586522584c8338a990543b5452073ae3ed8a60fad9a159ddfd63adcbaaac35a5a4528
 SHA512 
1500c87a4f3f5302ff28f7592c1bdd66190095b04a1fac349bf421d117c0ace7b109bfb7943795375bcdf76c810df8f588150ccfb5843ccdf10c394b11754736
 DIST apache-tomcat-8.5.85-src.tar.gz.asc 849 BLAKE2B 
ead4de7a2fe01f67b2c3fd61d4c85d87e5142f2bd0ba933d70d8e5a8935e6bd97fff14bd4d4ddeee27edd7683971d241e6d14126fee01e789914a394ee0faf47
 SHA512 
e7c3cb19cff697154d159986748680d66bae22a12bc272a09d64b39ed681d60ce9d7ff9ba9c2f45744b6ac81b675a87af6c7df3eecd7079b98749063fbe579a5
+DIST apache-tomcat-8.5.86-src.tar.gz 6038952 BLAKE2B 
b57a203fb2e215f0a07485d5ae70398e0e2d56b37cd7172f33680c8b57faa97929904349ee93b3d975cb24ac2c9e2d15240d59d4a3295d0a7deb96b8069269ef
 SHA512 
fbc57d314fb8885e9986a26515b6536f2bffdb3476af71417eb9dab1623f36ea80da431bc1dc8874aa99dd6575919a0d3a828d84a87404a73ed22de601097e12
+DIST apache-tomcat-8.5.86-src.tar.gz.asc 849 BLAKE2B 
ff388f97a189c9b45eaac42a1e670c8cddf52903421f053ec1df0518937f3c8b0bc650009cc93bb0a7440aa0607f955bbc219d80a34ab050851554b5736f3235
 SHA512 
85e961b6569e6c8421b83246653c86a53843232dc7a3eb5d466e6f11fb4b4f1a5dcee43403a43c8950774395acf7f576f7184c7dfa84084f08ff9a203b6104fd
 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

diff --git a/www-servers/tomcat/files/tomcat-8.5.86-build.xml.patch 
b/www-servers/tomcat/files/tomcat-8.5.86-build.xml.patch
new file mode 100644
index 000000000000..8888e3589ce3
--- /dev/null
+++ b/www-servers/tomcat/files/tomcat-8.5.86-build.xml.patch
@@ -0,0 +1,113 @@
+diff --git a/build.xml b/build.xml
+index d407be0..7c69a1b 100644
+--- a/build.xml
++++ b/build.xml
+@@ -1148,9 +1148,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">
+@@ -1210,7 +1210,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" />
+@@ -1719,7 +1721,7 @@
+   <target name="extras-webservices-prepare"
+           depends="extras-prepare"
+           description="Prepare to build web services extras package">
+-
++<!-- we provide jaxrpc
+     <antcall target="downloadfile">
+       <param name="sourcefile" value="${jaxrpc-lib.loc}"/>
+       <param name="destfile" value="${jaxrpc-lib.jar}"/>
+@@ -1728,7 +1730,8 @@
+       <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}"/>
+@@ -1737,11 +1740,13 @@
+       <param name="checksum.algorithm" 
value="${wsdl4j-lib.checksum.algorithm}"/>
+       <param name="checksum.value" value="${wsdl4j-lib.checksum.value}"/>
+     </antcall>
+-
++-->
++<!-- ignored above
+     <copy file="${jaxrpc-lib.jar}"
+           tofile="${tomcat.extras}/webservices/jaxrpc.jar" />
+     <copy file="${wsdl4j-lib.jar}"
+           tofile="${tomcat.extras}/webservices/wsdl4j.jar" />
++-->
+   </target>
+ 
+   <target name="extras-webservices"
+@@ -1850,11 +1855,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.
+@@ -2020,8 +2026,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/7/docs/api/"/>
+       <link href="https://docs.oracle.com/javaee/7/api/"/>
++-->
+       <packageset dir="${tomcat.dist}/src/java/">
+         <include name="org/**"/>
+         <exclude name="org/apache/el/parser/**"/>
+@@ -2933,6 +2941,7 @@ asf.ldap.username=${release.asfusername}
+           description="Download components necessary to compile" >
+ 
+     <!-- 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}"/>
+@@ -2941,8 +2950,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}"/>
+@@ -2952,7 +2962,7 @@ asf.ldap.username=${release.asfusername}
+       <param name="checksum.algorithm" value="${jdt.checksum.algorithm}"/>
+       <param name="checksum.value" value="${jdt.checksum.value}"/>
+     </antcall>
+-
++-->
+   </target>
+ 
+   <target name="download-test-compile"

diff --git a/www-servers/tomcat/tomcat-8.5.86.ebuild 
b/www-servers/tomcat/tomcat-8.5.86.ebuild
new file mode 100644
index 000000000000..717b0f622eb2
--- /dev/null
+++ b/www-servers/tomcat/tomcat-8.5.86.ebuild
@@ -0,0 +1,158 @@
+# 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-${P}-src"
+
+DESCRIPTION="Tomcat Servlet-3.1/JSP-2.3/EL-3.0/WebSocket-1.1/JASPIC-1.1 
Container"
+HOMEPAGE="https://tomcat.apache.org/";
+SRC_URI="mirror://apache/${PN}/tomcat-8/v${PV}/src/${MY_P}.tar.gz
+       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="8.5"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-solaris"
+IUSE="extra-webapps"
+
+RESTRICT="test" # can we run them on a production system?
+
+ECJ_SLOT="4.15"
+
+# we don't use ~ for el and jsp because the same implementation
+# is also present in tomcat 9 and it would be impossible to install
+# both tomcat 8.5 and 9 at the same time
+COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT}"
+RDEPEND="${COMMON_DEP}
+       acct-group/tomcat
+       acct-user/tomcat
+       >=virtual/jre-1.8:*"
+DEPEND="${COMMON_DEP}
+       app-admin/pwgen
+       dev-java/ant-core
+       >=virtual/jdk-1.8:*
+       doc? (
+               dev-java/jax-rpc-api:0
+               dev-java/wsdl4j:0
+       )
+       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}
+
+src_prepare() {
+       default
+
+       find -name '*.jar' -type f -delete -print || die
+
+       eapply "${FILESDIR}/${PN}-8.5.86-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}"
+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 -Dexecute.validate=false"
+
+# revisions of the scripts
+IM_REV="-r2"
+INIT_REV="-r1"
+
+src_compile() {
+       EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core 
ant.jar)"
+       use doc && EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjars 
--build-only jax-rpc-api):$(java-pkg_getjars --build-only wsdl4j)"
+       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."
+}

Reply via email to