From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id DBCB51382C5 for ; Thu, 4 Feb 2021 10:50:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 115ABE087C; Thu, 4 Feb 2021 10:50:30 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DB37DE087C for ; Thu, 4 Feb 2021 10:50:29 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 691533422D5 for ; Thu, 4 Feb 2021 10:50:28 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2353E4AE for ; Thu, 4 Feb 2021 10:50:27 +0000 (UTC) From: "Miroslav Šulc" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Miroslav Šulc" Message-ID: <1612435823.377ab10b47d2e4b8842b36e2e2679009f35cbd6e.fordfrog@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: www-servers/tomcat/files/, www-servers/tomcat/ X-VCS-Repository: repo/gentoo X-VCS-Files: www-servers/tomcat/Manifest www-servers/tomcat/files/tomcat-10.0.2-build.xml.patch www-servers/tomcat/tomcat-10.0.2.ebuild X-VCS-Directories: www-servers/tomcat/files/ www-servers/tomcat/ X-VCS-Committer: fordfrog X-VCS-Committer-Name: Miroslav Šulc X-VCS-Revision: 377ab10b47d2e4b8842b36e2e2679009f35cbd6e X-VCS-Branch: master Date: Thu, 4 Feb 2021 10:50:27 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 986ec74e-2cbf-4644-83f9-a6212d61f642 X-Archives-Hash: 62e2cf93ea31076b97c85023e961e58a commit: 377ab10b47d2e4b8842b36e2e2679009f35cbd6e Author: Miroslav Šulc gentoo org> AuthorDate: Thu Feb 4 10:48:54 2021 +0000 Commit: Miroslav Šulc gentoo org> CommitDate: Thu Feb 4 10:50:23 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=377ab10b www-servers/tomcat: introduced slot 10 with version 10.0.2 Package-Manager: Portage-3.0.14, Repoman-3.0.2 Signed-off-by: Miroslav Šulc gentoo.org> www-servers/tomcat/Manifest | 1 + .../tomcat/files/tomcat-10.0.2-build.xml.patch | 284 +++++++++++++++++++++ www-servers/tomcat/tomcat-10.0.2.ebuild | 191 ++++++++++++++ 3 files changed, 476 insertions(+) diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest index 445c595920a..ce288762f41 100644 --- a/www-servers/tomcat/Manifest +++ b/www-servers/tomcat/Manifest @@ -1,3 +1,4 @@ +DIST apache-tomcat-10.0.2-src.tar.gz 5954905 BLAKE2B fa7ca630b287c96538955848ab0ef109beb22a381e884eae96fa5246c134164b543003669c65d716f453ffa7a0e72f119354d1f023b529a948befb11c5e375a1 SHA512 402e942b9a1006535fd0e1416a4606d880ca1af473d7c394d54aa3dff60ecfe80823a0bb14f354049e008fdf29ea67a1490d0828fbc50eaf39ea159ef36cbc53 DIST apache-tomcat-7.0.107-src.tar.gz 5312698 BLAKE2B 1f2712ddce6aa604692aaf6a6c706469d3dbcb2266a99e62346c15b8347fff573608440473be8e20b8632a431f8838dd29f24f6bf630a13d262c444be68e0d2c SHA512 820923697c487367786c595d3aeaa58981d25b56529c6739b9388ad771f3264e6995f7659805cc5b2ef9456dbd42bad92ad2cfa3c7f741920a5b7bff2cc1bb1b DIST apache-tomcat-8.5.61-src.tar.gz 5840559 BLAKE2B 18e1505b6b7d8e1a024d9f834d33ef105a16e6fc1f9e80abd3e6e88b2326597b9973e13c2ebc030a1db4a2d4dc5572d195b9f61db6cb7bf51e97cbfaa121678a SHA512 fd6bb5926b5e7cf44f359c93dadc4edd87fa5f2e26fb0fb3a9bc0a5c89ae4d844d66872055e1b441392cf03d7690aca3429b66afd8334319784f089f821d8c22 DIST apache-tomcat-8.5.63-src.tar.gz 5853051 BLAKE2B d007d9922d54578bdebcbbaec3e7c0ffcafdce913e52fdd93d5c174c9d1304980b5eb7f126e957c5975a59dfb126857dcc87ef3ca5e479e44cd7910b6183e469 SHA512 d78a140117844675239e834a0890641c0ef0d6fc3c89eb4512536fece2c128f088edfdea15f79ba7a31e0478431f155230f8f60a57bfea0aed191298a95310c4 diff --git a/www-servers/tomcat/files/tomcat-10.0.2-build.xml.patch b/www-servers/tomcat/files/tomcat-10.0.2-build.xml.patch new file mode 100644 index 00000000000..0ed24682291 --- /dev/null +++ b/www-servers/tomcat/files/tomcat-10.0.2-build.xml.patch @@ -0,0 +1,284 @@ +diff --git a/build.xml b/build.xml +index 455edf9..457c0a9 100644 +--- a/build.xml ++++ b/build.xml +@@ -1032,6 +1032,7 @@ + addOSGi="true" /> + + ++ + ++ + ++ + + + + +- ++ addOSGi="true" /> --> + + + +- ++ + + + +@@ -1459,7 +1462,7 @@ + + + +- ++ + + + +@@ -1502,7 +1505,7 @@ + + + +- ++ + + + + + +- ++ + + + + ++ + + + ++ + + + Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. +@@ -2231,6 +2237,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. + + + ++ + + + ++ + + ++ + + + +@@ -3083,7 +3095,7 @@ skip.installer property in build.properties" /> + + ++ depends="setup-bnd" unless="noget"> + + + +@@ -3127,7 +3139,7 @@ skip.installer property in build.properties" /> + + + ++ description="Download additional components for the tests" unless="noget"> + + + +@@ -3205,7 +3217,7 @@ skip.installer property in build.properties" /> + + + ++ description="Download additional components for a distribution" unless="noget"> + + + +@@ -3260,13 +3272,13 @@ skip.installer property in build.properties" /> + + + +- ++ + + + + +- ++ + + + +@@ -3388,7 +3400,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -3405,7 +3417,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -3430,7 +3442,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -3446,7 +3458,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -3470,7 +3482,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -3485,7 +3497,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -3513,7 +3525,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -3524,7 +3536,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -3535,7 +3547,7 @@ skip.installer property in build.properties" /> + + ++ description="Prepares the source tree to be built in Eclipse" unless="noget"> + + + +@@ -3553,7 +3565,7 @@ Read the Building page on the Apache Tomcat documentation site for details on ho + + ++ description="Creates project directory .idea for IntelliJ IDEA" unless="noget"> + + + diff --git a/www-servers/tomcat/tomcat-10.0.2.ebuild b/www-servers/tomcat/tomcat-10.0.2.ebuild new file mode 100644 index 00000000000..7e618f92e88 --- /dev/null +++ b/www-servers/tomcat/tomcat-10.0.2.ebuild @@ -0,0 +1,191 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +JAVA_PKG_IUSE="doc source test" + +inherit eutils java-pkg-2 java-ant-2 prefix + +MY_P="apache-${PN}-${PV}-src" + +# Currently we bundle binary versions of bnd.jar and bndlib.jar +# See bugs #203080 and #676116 +BND_VERSION="5.1.1" +BND="biz.aQute.bnd-${BND_VERSION}.jar" +BNDLIB="biz.aQute.bndlib-${BND_VERSION}.jar" + +DESCRIPTION="Tomcat Servlet-5.0/JSP-3.0/EL-4.0/WebSocket-2.0/JASIC-2.0 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}" + +LICENSE="Apache-2.0" +SLOT="10" +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" +SAPI_SLOT="5.0" + +COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT} + dev-java/glassfish-xmlrpc-api:0 + ~dev-java/tomcat-servlet-api-${PV}:${SAPI_SLOT} + dev-java/wsdl4j:0" +RDEPEND="${COMMON_DEP} + acct-group/tomcat + acct-user/tomcat + virtual/jre" +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 + )" + +S=${WORKDIR}/${MY_P} + +PATCHES=( + "${FILESDIR}/${PN}-9.0.43-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() { + 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 + + # Remove bundled servlet-api + rm -rv java/jakarta/{el,servlet} || die + + eapply "${FILESDIR}/${P}-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},tomcat-servlet-api-${SAPI_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 glassfish-xmlrpc-api)" + 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 "New 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." + + ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar" + ewarn "from upstream binary if you need it. Gentoo Bug # 144276" + + 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." +}