diff options
author | Miroslav Šulc <fordfrog@gentoo.org> | 2023-02-26 08:23:29 +0100 |
---|---|---|
committer | Miroslav Šulc <fordfrog@gentoo.org> | 2023-02-26 08:23:53 +0100 |
commit | 136ca3e04560e5842f7e1b185e1e2a44f5bb36c1 (patch) | |
tree | 89c16f1a9c1c266abb78c40f5d5e181bfa5697be /www-servers | |
parent | dev-java/jakarta-xml-soap-api: update SRC_URI (diff) | |
download | gentoo-136ca3e04560e5842f7e1b185e1e2a44f5bb36c1.tar.gz gentoo-136ca3e04560e5842f7e1b185e1e2a44f5bb36c1.tar.bz2 gentoo-136ca3e04560e5842f7e1b185e1e2a44f5bb36c1.zip |
www-servers/tomcat: bump to 10.1.6
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@gentoo.org>
Diffstat (limited to 'www-servers')
-rw-r--r-- | www-servers/tomcat/Manifest | 4 | ||||
-rw-r--r-- | www-servers/tomcat/files/tomcat-10.1.6-build.xml.patch | 122 | ||||
-rw-r--r-- | www-servers/tomcat/tomcat-10.1.6.ebuild | 190 |
3 files changed, 316 insertions, 0 deletions
diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest index 2595f74b916d..16c39c24c145 100644 --- a/www-servers/tomcat/Manifest +++ b/www-servers/tomcat/Manifest @@ -1,8 +1,12 @@ DIST apache-tomcat-10.1.5-src.tar.gz 6066163 BLAKE2B 96c03f053b8585cfc466e7bf870a85d82e5637169028d0bca43508480f14834ebccf2ddf68744b29510fa93cc8fd0994c72a61d0949da0d4e6b095da87704d0d SHA512 d52cf7fd4c4982b7934cd14000e540998cf2599a730083c7647d57939993f3522b6d208a82cdfcb0f7ffc084d9d2ea2b27104203398a61bb765667d97fc13c02 DIST apache-tomcat-10.1.5-src.tar.gz.asc 849 BLAKE2B 6b733488772bea88ea6a6710651bf60a83c78187463850f0216ca5152f0698648ab8ba37f86480916caa816792095a1f434bc84d5706ae9e6f6ed882b8b29d4b SHA512 600580fb89620937c103fa5581669b9ab7cb359db32b0d1d2cd81e9dc41cec6e3df7e852baa3564ed94e4af30d506453e6761fa20ff8fd37d7c4dafa33aac712 +DIST apache-tomcat-10.1.6-src.tar.gz 6073924 BLAKE2B debc363395becd96a856a03ffd5846e786c27781318b9c08c428498a010dc77e334e6fd15ffea1545dc15b1c226fdd73f24d15f70361b39d37316c48a0c5e66e SHA512 54df5784fbbe9c29b5569783c836e1490a6c08610ffe3c98123cc8bee8b483fcb73f46a15487dc5a6c9c7926ba63bab79e1794b07c00c22798ea0984e56f12f5 +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-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 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 +DIST biz.aQute.bndlib-6.4.0.jar 3200265 BLAKE2B c8b8c1d0ff398e2a701edc4431cd8d65671a5e5daa0ef04be6b02eabb570768e0202640c15ce1290a5ae21bb31700a89f2822826851d7dc026267cb31da9f1ef SHA512 15a20751d879291c31b6530cb0d51652bf5bb33bf944ed703369eada439df6464190c01e2872ea6e7535209abd0b4692ea8980499d4b43edfffcc5729633c85d diff --git a/www-servers/tomcat/files/tomcat-10.1.6-build.xml.patch b/www-servers/tomcat/files/tomcat-10.1.6-build.xml.patch new file mode 100644 index 000000000000..341813c73123 --- /dev/null +++ b/www-servers/tomcat/files/tomcat-10.1.6-build.xml.patch @@ -0,0 +1,122 @@ +diff --git a/build.xml b/build.xml +index bea41a8..08ef1db 100644 +--- a/build.xml ++++ b/build.xml +@@ -1457,9 +1457,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"> +@@ -1519,8 +1519,9 @@ + <exclude name="${jdt.jar.filename}"/> + </fileset> + </delete> ++<!-- we provide jdt jar externally + <copy file="${jdt.jar}" todir="${tomcat.build}/lib"/> +- ++--> + <!-- Delete all other versions of Tomcat Migration Tool for Jakarta EE and copy the current one --> + <local name="migration.jar.filename" /> + <basename property="migration.jar.filename" file="${migration-lib.jar}"/> +@@ -1530,8 +1531,9 @@ + <exclude name="${migration-lib.jar.filename}"/> + </fileset> + </delete> ++<!-- we provide migration tool externally + <copy file="${migration-lib.jar}" todir="${tomcat.build}/lib"/> +- ++--> + <!-- Delete all other versions of OpenSSL support for Tomcat and copy the current one --> + <!-- After module release + <local name="openssl-lib.jar.filename" /> +@@ -2213,11 +2215,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. +@@ -2378,8 +2381,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/en/java/javase/11/docs/api/"/> + <link href="https://jakarta.ee/specifications/platform/10/apidocs/"/> ++--> + <packageset dir="${tomcat.dist}/src/java/"> + <include name="org/**"/> + <exclude name="org/apache/el/parser/**"/> +@@ -3300,6 +3305,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}"/> +@@ -3308,8 +3314,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}"/> +@@ -3319,8 +3326,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}"/> +@@ -3329,6 +3337,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}"/> +@@ -3337,8 +3347,9 @@ asf.ldap.username=${release.asfusername} + <param name="checksum.algorithm" value="${wsdl4j-lib.checksum.algorithm}"/> + <param name="checksum.value" value="${wsdl4j-lib.checksum.value}"/> + </antcall> +- ++--> + <!-- Tomcat Migration Tool for Jakarta EE --> ++<!-- we provide migration tool + <antcall target="downloadfile"> + <param name="sourcefile" value="${migration-lib.loc}"/> + <param name="destfile" value="${migration-lib.jar}"/> +@@ -3347,7 +3358,7 @@ asf.ldap.username=${release.asfusername} + <param name="checksum.algorithm" value="${migration-lib.checksum.algorithm}"/> + <param name="checksum.value" value="${migration-lib.checksum.value}"/> + </antcall> +- ++--> + </target> + + <target name="download-test-compile" diff --git a/www-servers/tomcat/tomcat-10.1.6.ebuild b/www-servers/tomcat/tomcat-10.1.6.ebuild new file mode 100644 index 000000000000..9c25e9b767b7 --- /dev/null +++ b/www-servers/tomcat/tomcat-10.1.6.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-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} + 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="10.1" +KEYWORDS="~amd64 ~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="${BROOT}/usr/share/openpgp-keys/tomcat-${PV}.apache.org.asc" + +S=${WORKDIR}/${MY_P} + +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}-10.1.6-build.xml.patch" + + 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} -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" + + 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." +} |