From a1e5f304f2d1565cf670ee352eb1a7397b88b51f Mon Sep 17 00:00:00 2001 From: Miroslav Ć ulc Date: Sun, 4 Feb 2018 10:31:28 +0100 Subject: www-servers/tomcat: version bump for slots 7, 8 and 8.5 Package-Manager: Portage-2.3.24, Repoman-2.3.6 --- www-servers/tomcat/Manifest | 3 + .../tomcat/files/tomcat-7.0.84-build.xml.patch | 161 +++++++++++++ .../tomcat/files/tomcat-8.0.49-build.xml.patch | 267 +++++++++++++++++++++ .../tomcat/files/tomcat-8.5.27-build.xml.patch | 258 ++++++++++++++++++++ www-servers/tomcat/tomcat-7.0.84.ebuild | 146 +++++++++++ www-servers/tomcat/tomcat-8.0.49.ebuild | 157 ++++++++++++ www-servers/tomcat/tomcat-8.5.27.ebuild | 157 ++++++++++++ 7 files changed, 1149 insertions(+) create mode 100644 www-servers/tomcat/files/tomcat-7.0.84-build.xml.patch create mode 100644 www-servers/tomcat/files/tomcat-8.0.49-build.xml.patch create mode 100644 www-servers/tomcat/files/tomcat-8.5.27-build.xml.patch create mode 100644 www-servers/tomcat/tomcat-7.0.84.ebuild create mode 100644 www-servers/tomcat/tomcat-8.0.49.ebuild create mode 100644 www-servers/tomcat/tomcat-8.5.27.ebuild (limited to 'www-servers') diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest index 98013508714a..18f8fa8c5e0e 100644 --- a/www-servers/tomcat/Manifest +++ b/www-servers/tomcat/Manifest @@ -1,6 +1,9 @@ DIST apache-tomcat-7.0.82-src.tar.gz 4697342 BLAKE2B 1106ed04dc83e64e395de29f01a7752a0578b0c88046eb59614a7cfc0d8a98e3aebb698c8eb56763eea41620d9b42482971c5093304184b1028c6bd8f9770ada SHA512 fc92388d81316de0246df4074c417ffa341eab55308c0694e9ea71c5497c863b42019cd1f38628ff640114c501a06c4e9c428cb2b6f1bc1c16fb337a286718db +DIST apache-tomcat-7.0.84-src.tar.gz 4713409 BLAKE2B 3dc7766db1492413bbd3f878a2da7392dd4cfd1ca4c3e8a236e380cdfbc0c4ff075665d39871026e61f0bc88e0a84f372fbcef6914af9dc99e6dda05bafc6e48 SHA512 ca6b3f17f56a0b1befafd2efbfa07cbe094fb4ab022a3b5d704d249e551b44c6ef0d9691bd1b7c48ccda957efb43045209d11ca1a4aa0a7875e516e3a233cd74 DIST apache-tomcat-8.0.47-src.tar.gz 4996505 BLAKE2B 8024ec5248fed57bf1841a320fc23fa8a7a99b2352ea9635f3d4dc903bd363f3a15adc47f48250a4d732ab9c1724443bcb602b459b6ede2e7908051a5c3fdea5 SHA512 135de73b8ca7d4003fcecc19a17a8a86ab85fc1054e89638d26e57263249438d8e8aebfca0a2791eaec2bc835baa57e6a05b60e11595aa373fdc03e278b31702 DIST apache-tomcat-8.0.48-src.tar.gz 5009969 BLAKE2B 4b1db654d74b02f5fd589590197561496ecfb9b219e445fd18f2e967c78fb95f7fc71a21a6ed9ab5f8c6cee448b74a1729eb3627bcf1a59e2d2748c9c80cc76c SHA512 c56aaa7335c4ef221b2e5de7a7d4946ae1221127f977da5f46a97b062d909abc918b0e6ceb887d98ea5f5b38a26bbe9a3de481972492be593636f6f7e6ef7841 +DIST apache-tomcat-8.0.49-src.tar.gz 5017328 BLAKE2B a3494c73fc6b9ffecfe7b09380f9fb3a632e167861f876ac827848e6ae5fd41dc9d3f8a0da9d484edd87b88532de05809c8019941d3a2639e925066ff0a8cc87 SHA512 36ae75d37874430ea6b567d8415a9249f104b57afdd8689621f659f6a2c0b229f207e63cdcdfacb1eabd13af567295ff1335cb052abbefe46efdccc20f2d5a73 DIST apache-tomcat-8.5.23-src.tar.gz 5086043 BLAKE2B 9bcad0d465aff6da1ba4a846042491bc8d5963283ed1d2530a26ab48289d14e8b85834d24ca476c95a75c1a5f51ee3ecd71c190b9609983cce56b56bc046b6d3 SHA512 2848331553f2c1bc51a4113960c6fe7e2beddf9146341dbfde1a27e2232802cfc364c8e8b988ae862371ca1a3be34665a56a28be9eadf80f8b317e0e2525cbef DIST apache-tomcat-8.5.24-src.tar.gz 5101516 BLAKE2B c19c46cca562f0c4c4733608ec007dd423f9a8ed0595bfb835554a7d08be06b791933e4beacbb0fe472589feae82f7d1a46934c0fb68930343cb2f4589bf6530 SHA512 f4ef9a66f2cafb3207c5a38c0f88efc1189e72f02fa88ef2a1b3626a03a57d0ba505b099f6185d747d5ab858aa3f8f3446ae60789312a900ec443eac45233efc +DIST apache-tomcat-8.5.27-src.tar.gz 5123614 BLAKE2B 0051a7b5a9d3529a012338e0b12ed5fca218fc6740a0c576d3195a9c7848a78d93d0a6151541e314d82723de1b533b28024eeb231e33b21c38a2c4f702007415 SHA512 d3cac3d618283f0c26f861df67223fcb889da750f5e42563ec2ebc17d72169a7639d05d4d42fe403f4e49052962da09bc4b312b012c31309d8a096036baec8ab DIST apache-tomcat-9.0.4-src.tar.gz 5073991 BLAKE2B 7efffbba395d78d5ab051dd2bdb7a1491cb04159421bec17deebcb901bbca5cfec67a651f8e1fcd9a394ba3e0650fc61e7da039f0f979ae60a87f477bc4bc3b8 SHA512 bb8777f6fff861a53381b15a4196053abd9cc01e080f0511032f69eb6f57f5c6ed0eafd8a94155f19a4654bce4fad39e0fcaa2e5473cb269bceeb46a2ea43557 diff --git a/www-servers/tomcat/files/tomcat-7.0.84-build.xml.patch b/www-servers/tomcat/files/tomcat-7.0.84-build.xml.patch new file mode 100644 index 000000000000..aa40bd1564a4 --- /dev/null +++ b/www-servers/tomcat/files/tomcat-7.0.84-build.xml.patch @@ -0,0 +1,161 @@ +diff --git a/build.xml b/build.xml +index 3f1229c..13894ed 100644 +--- a/build.xml ++++ b/build.xml +@@ -671,12 +671,14 @@ + + + ++ + + + +@@ -733,26 +735,32 @@ + manifest="${tomcat.manifests}/annotations-api.jar.manifest" /> + + ++ + + ++ + + ++ + + + +- ++ + + + +@@ -1060,14 +1068,15 @@ + + + ++ + + +- ++ + + + ++ description="Prepare to build web services extras package" unless="noget"> + + + +@@ -1886,11 +1895,12 @@ + + + ++ + + + Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. +@@ -1902,6 +1912,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. + description="Create the Tomcat javadoc" > + ++ + + + ++ + + + +@@ -2632,7 +2646,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. + + + ++ description="Download (and build) components necessary to compile" unless="noget"> + + + +@@ -2675,7 +2689,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. + + + ++ description="Download additional components for the tests" unless="noget"> + + + +@@ -2721,7 +2735,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. + + + ++ description="Download additional components for a distribution" unless="noget"> + + + diff --git a/www-servers/tomcat/files/tomcat-8.0.49-build.xml.patch b/www-servers/tomcat/files/tomcat-8.0.49-build.xml.patch new file mode 100644 index 000000000000..b7e0a283fe26 --- /dev/null +++ b/www-servers/tomcat/files/tomcat-8.0.49-build.xml.patch @@ -0,0 +1,267 @@ +diff --git a/build.xml b/build.xml +index 3152712..9e09384 100644 +--- a/build.xml ++++ b/build.xml +@@ -718,24 +718,29 @@ + manifest="${tomcat.manifests}/annotations-api.jar.manifest" /> + + ++ + ++ + + ++ + + + +- ++ + + + +@@ -1067,7 +1072,7 @@ + + + +- ++ + + + +@@ -1101,7 +1106,7 @@ + + + +- ++ + + + + + +- ++ + + + + ++ + + + ++ + + + Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. +@@ -1955,6 +1963,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. + + ++ + + + ++ + + + +@@ -2791,7 +2803,7 @@ skip.installer property in build.properties" /> + + + ++ description="Download (and build) components necessary to compile" unless="noget"> + + + +@@ -2811,7 +2823,7 @@ skip.installer property in build.properties" /> + + + ++ description="Download additional components for the tests" unless="noget"> + + + +@@ -2868,7 +2880,7 @@ skip.installer property in build.properties" /> + + + ++ description="Download additional components for a distribution" unless="noget"> + + + +@@ -2908,18 +2920,18 @@ skip.installer property in build.properties" /> + + + +- ++ + + + + +- ++ + + + + +- ++ + + + +@@ -2931,7 +2943,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -2950,7 +2962,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -2961,7 +2973,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -2979,7 +2991,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -2989,7 +3001,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -3012,7 +3024,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -3023,7 +3035,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -3034,7 +3046,7 @@ skip.installer property in build.properties" /> + + ++ description="Prepares the source tree to be built in Eclipse" unless="noget"> + + + diff --git a/www-servers/tomcat/files/tomcat-8.5.27-build.xml.patch b/www-servers/tomcat/files/tomcat-8.5.27-build.xml.patch new file mode 100644 index 000000000000..e08dd17c6cc3 --- /dev/null +++ b/www-servers/tomcat/files/tomcat-8.5.27-build.xml.patch @@ -0,0 +1,258 @@ +diff --git a/build.xml b/build.xml +index 2b3c7cf..b8e57e0 100644 +--- a/build.xml ++++ b/build.xml +@@ -717,24 +717,29 @@ + manifest="${tomcat.manifests}/annotations-api.jar.manifest" /> + + ++ + ++ + + ++ + + + +- ++ + + + +@@ -1072,7 +1077,7 @@ + + + +- ++ + + + +@@ -1106,7 +1111,7 @@ + + + +- ++ + + + + + +- ++ + + + + ++ + + + ++ + + + Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. +@@ -1764,6 +1772,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. + + ++ + + + ++ + + + +@@ -2617,7 +2629,7 @@ skip.installer property in build.properties" /> + + + ++ description="Download (and build) components necessary to compile" unless="noget"> + + + +@@ -2637,7 +2649,7 @@ skip.installer property in build.properties" /> + + + ++ description="Download additional components for the tests" unless="noget"> + + + +@@ -2694,7 +2706,7 @@ skip.installer property in build.properties" /> + + + ++ description="Download additional components for a distribution" unless="noget"> + + + +@@ -2734,18 +2746,18 @@ skip.installer property in build.properties" /> + + + +- ++ + + + + +- ++ + + + + +- ++ + + + +@@ -2757,7 +2769,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -2776,7 +2788,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -2787,7 +2799,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -2805,7 +2817,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -2815,7 +2827,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -2838,7 +2850,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -2849,7 +2861,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -2860,7 +2872,7 @@ skip.installer property in build.properties" /> + + ++ description="Prepares the source tree to be built in Eclipse" unless="noget"> + + + diff --git a/www-servers/tomcat/tomcat-7.0.84.ebuild b/www-servers/tomcat/tomcat-7.0.84.ebuild new file mode 100644 index 000000000000..4ce5c4efd222 --- /dev/null +++ b/www-servers/tomcat/tomcat-7.0.84.ebuild @@ -0,0 +1,146 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +JAVA_PKG_IUSE="doc source test" + +inherit eutils java-pkg-2 java-ant-2 prefix user + +MY_P="apache-${P}-src" + +DESCRIPTION="Tomcat Servlet-3.0/JSP-2.2 Container" +HOMEPAGE="https://tomcat.apache.org/" +SRC_URI="mirror://apache/${PN}/tomcat-7/v${PV}/src/${MY_P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="7" +KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-solaris" +IUSE="extra-webapps websockets" + +RESTRICT="test" # can we run them on a production system? + +ECJ_SLOT="4.5" +SAPI_SLOT="3.0" + +COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT} + dev-java/tomcat-servlet-api:${SAPI_SLOT}" +RDEPEND="${COMMON_DEP} + virtual/jre + !|=\"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 "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://www.gentoo.org/proj/en/java/tomcat6-guide.xml for more information." +} diff --git a/www-servers/tomcat/tomcat-8.5.27.ebuild b/www-servers/tomcat/tomcat-8.5.27.ebuild new file mode 100644 index 000000000000..17a74d0fb02b --- /dev/null +++ b/www-servers/tomcat/tomcat-8.5.27.ebuild @@ -0,0 +1,157 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +JAVA_PKG_IUSE="doc source test" + +inherit eutils java-pkg-2 java-ant-2 prefix user + +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" + +LICENSE="Apache-2.0" +SLOT="8.5" +KEYWORDS="~amd64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris" +IUSE="extra-webapps" + +RESTRICT="test" # can we run them on a production system? + +ECJ_SLOT="4.5" +SAPI_SLOT="3.1" + +COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT} + >=dev-java/tomcat-servlet-api-${SLOT}:${SAPI_SLOT}" +RDEPEND="${COMMON_DEP} + !=virtual/jre-1.7" +DEPEND="${COMMON_DEP} + app-admin/pwgen + >=virtual/jdk-1.7 + test? ( + >=dev-java/ant-junit-1.9:0 + dev-java/easymock:3.2 + )" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + java-pkg-2_pkg_setup + enewgroup tomcat 265 + enewuser tomcat 265 -1 /dev/null tomcat +} + +src_prepare() { + default + + find -name '*.jar' -type f -delete -print || die + + # Remove bundled servlet-api + rm -rv java/javax/{el,servlet} || die + + epatch "${FILESDIR}/${P}-build.xml.patch" + + # For use of catalina.sh in netbeans + sed -i -e "/^# ----- Execute The Requested Command/ a\ + CLASSPATH=\`java-config --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}" +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)" + 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 "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://www.gentoo.org/proj/en/java/tomcat6-guide.xml for more information." +} -- cgit v1.2.3-18-g5258