summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrice Clement <monsieurp@gentoo.org>2015-07-21 15:33:34 +0000
committerPatrice Clement <monsieurp@gentoo.org>2015-07-21 15:33:34 +0000
commit4913bfb234da8d1a8d9c2e9e38d075677360f8e1 (patch)
tree4e990c8480b2dedd5b788d4e34378d9dac964d9a /www-servers
parentremoved old for security bug 554036 (diff)
downloadhistorical-4913bfb234da8d1a8d9c2e9e38d075677360f8e1.tar.gz
historical-4913bfb234da8d1a8d9c2e9e38d075677360f8e1.tar.bz2
historical-4913bfb234da8d1a8d9c2e9e38d075677360f8e1.zip
Create logs directory in $CATALINA_BASE and set up perms to 0750. Fix security bug 458890.
Signed-off-by: Patrice Clement <monsieurp@gentoo.org> Package-Manager: portage-2.2.18/cvs/Linux x86_64 Manifest-Sign-Key: 0x93491BB8
Diffstat (limited to 'www-servers')
-rw-r--r--www-servers/tomcat/ChangeLog11
-rw-r--r--www-servers/tomcat/Manifest19
-rw-r--r--www-servers/tomcat/tomcat-6.0.44-r0.ebuild144
-rw-r--r--www-servers/tomcat/tomcat-7.0.59-r2.ebuild147
-rw-r--r--www-servers/tomcat/tomcat-8.0.23-r2.ebuild145
5 files changed, 464 insertions, 2 deletions
diff --git a/www-servers/tomcat/ChangeLog b/www-servers/tomcat/ChangeLog
index 573ebd6e4981..f95b1f7de138 100644
--- a/www-servers/tomcat/ChangeLog
+++ b/www-servers/tomcat/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for www-servers/tomcat
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v 1.360 2015/07/12 00:27:07 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v 1.361 2015/07/21 15:33:26 monsieurp Exp $
+
+*tomcat-6.0.44-r0 (21 Jul 2015)
+*tomcat-7.0.59-r2 (21 Jul 2015)
+*tomcat-8.0.23-r2 (21 Jul 2015)
+
+ 21 Jul 2015; Patrice Clement <monsieurp@gentoo.org> +tomcat-6.0.44-r0.ebuild,
+ +tomcat-7.0.59-r2.ebuild, +tomcat-8.0.23-r2.ebuild:
+ Create logs directory in $CATALINA_BASE and set up perms to 0750. Fix security
+ bug 458890.
12 Jul 2015; Patrick Lauer <patrick@gentoo.org> -tomcat-8.0.22-r1.ebuild,
-tomcat-8.0.22.ebuild:
diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest
index 9da42883a00e..403c4fb31627 100644
--- a/www-servers/tomcat/Manifest
+++ b/www-servers/tomcat/Manifest
@@ -1,3 +1,6 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
AUX tomcat-6.0.44-build.xml.patch 950 SHA256 33af0fd388c439e3ee74fd2271d94066169b530b61dab3f1f01a094ec22e3f9f SHA512 69775288f3ba31bc5b3f1f6125c1ca6f27c64647eeeb40928227fcbeb3a33f832ccc24be051efec9f8ca575475549c6493b12495d4a98e9e4fd1c27b9af68f8c WHIRLPOOL e31b35c1395c152c65863cddd79617ec92b21269567fc1458914e6f9b10e3a70698987d05724e52b706e6e0cfeab56e818feca5d04d80ee08f24bfefe89ea63f
AUX tomcat-7.0.59-build.xml.patch 4021 SHA256 eaedbf4f596109b8b2218f4643b8433d9907ded1e81060e1694bd9b8ea1c972c SHA512 c58512a0edec2c70ed1751cefebdcfeb992f5748f83a5797bd6a23f17f99f40283521dfc8c1734868168ecae8bcf1b8435900f16ff113b0c89c2ea1d64e4dbcc WHIRLPOOL f2ff5781f8e31bbd7210a535216b8e61b6d0c000629eaba96a05fd48eb32bf828be9f79b6081aacc0071c333bb72e1fc70eedfedcc1311fb8ea7583b628e13c9
AUX tomcat-8.0.22-build.xml.patch 9015 SHA256 8d6f7bfc3b8aaddb1e7cb636e5048c64ff2f32206a3e495d35eef490dbaf586f SHA512 dbb855189281350e49184f87843db0655b831b47a298928ba942de2e20fa6cf10445911cd9ac12a73d1737611940d3330152f999b339d2a8d64e69b4240f248c WHIRLPOOL 007a0e5401870df8028b7856fe116864c45dffdd96481cbfa84d7daf5c61ef4b72b0c8ef1be46c29b9cbb960ef394dbfebd8c9b82270aa12c2ce7970145303e2
@@ -9,10 +12,24 @@ AUX tomcat.init 2989 SHA256 bae9e2663e5fda9c665fc97e916074cca46468560af17e3bbad0
DIST apache-tomcat-6.0.44-src.tar.gz 3447711 SHA256 c6f01526d58f2ba7b9da496e959d9e68cc49183006077704ab91c36ebebf5a4a SHA512 0d6a1539b28fa8ca3442557889d7d21cc523b18136f6998820ba13f41420536aba65ce78bac526002ee1dd86df3cbc80d9f043a3f765d7cf0b79e58e516030be WHIRLPOOL c65e704466191a0f98ec777e95dda889599ff6a545e7c013fd04bc0b72e0d0edf4491415f243d6a4de60cf76abe5c13ffbcc6d98f78b51490f7b7b43b24ecb97
DIST apache-tomcat-7.0.59-src.tar.gz 4687344 SHA256 3a1dedda4019db87464fca3aeb4e800a538f0baee96d8b14c9d64967b0d2ea44 SHA512 acc322eee1446dd1bff72910ae9f40a62f88332ee69d6057b3c684e2abf8f28e6df6ab9505900f0b0cf7a5e2e0e80e64b0a790b3b78594ce595ce897706b4bcb WHIRLPOOL 4948964c1746e6ee912ac72c901ba271793610f402bf082455d104e2e8d6dbfa0bf5371d42d48d8ad7c826271fa60d989119a01e700497099022d0cf3564fdff
DIST apache-tomcat-8.0.23-src.tar.gz 4868650 SHA256 6293713e78da9bb803060c8ddff982f8f7aef5a2e4b325340088493ce9957ba4 SHA512 cc83194b2847fc2db5448d548c7e65a1198cda02726b070f913a762d324152315886fba09532b879e26d15ec57e04057cc30b3a686b2a2307d6447d17f84e16c WHIRLPOOL b0559a4ef1b4c1f0683e4cce976d31db175d3c4f4d2b809b127e1074d49a6bf764366cc3e91f9a0818afd6de35e662a7aab89866dfd2e61673327c50535bff88
+EBUILD tomcat-6.0.44-r0.ebuild 4169 SHA256 e194e8cdd26bb3a32be116d49cdb7814b7c8bd45e2369069890bc8f05185ec04 SHA512 f2d9c1964be0a68ef223250e119391646aa2bfe02086535b1b7563f07a78947b4dc8c9e3213cda5c6194462ebaa7a3d6946b585d7244bb9f3d8cfd86bac30f69 WHIRLPOOL 06e54b82e6499055743fe475933b0beb8d6d9c21483365dac38e7714b38b5ec6dbc1f37fe4f05fd833669da7b564dfc1afeaedf8aebc78dc262b328fac741e32
EBUILD tomcat-6.0.44.ebuild 3981 SHA256 9c9c65233de3f8b3c67fd2284596ddf11ffa909c8ffdefd3fae6740d65e077a8 SHA512 895ff3b45dcef71f111842a36e40267e913ed5182a448fb2dd90584d318b8b4404adbe02225cc0fadf7c3b59ffd26ebb27a8a1bf67925eb18b054e2fed09d6d4 WHIRLPOOL 1f6a81f4f697234f5615f51105d24998b3f813bf4f325cff1e1ccea2283ebfdb0babe00bdfbd6568d8964709f9fda0a7d0d0cc76a91ea875a599087fa3a8d66e
EBUILD tomcat-7.0.59-r1.ebuild 4322 SHA256 f9be909f3ef9a4e451fcd80ff93ecc85650b0cd60519f2534aa5bfd3e0b840d3 SHA512 3df119a2cc39ec494e71e943f6067f58bda0c0c06922cc1d0c219528b3cd59ba0060881d7cb2a07e3bbb02a2655afde0fbc3ed4e9a47b836cb7a1a14c8609741 WHIRLPOOL 1642c6cda43daea4f0a376344cb505457854907c144bc08c0a4d9438f44fef889efcaa145fcccb362fe52d104d9f89d0e80bd916f82d8dd88392537e7ecf6e97
+EBUILD tomcat-7.0.59-r2.ebuild 4442 SHA256 d5fbf3e8b711c5a363357a458ade5bc145160690c7f76ef7caa785df4057ca0f SHA512 12916690127a8cd24906710a3fbf4e77d1931531735074234eeae4874a343cee0eec4bd92291c226fe3a643a19a532f110e0ecfb78877a7aab3d034d429237df WHIRLPOOL 72c769243122b38de1abe1b5a41c14b276db050d854fdaa0b8096717f0c49b4f22094a57f8253be6ad2b3f85352438e6a9aeb673db2adf245f3b70c080ae8a86
EBUILD tomcat-7.0.59.ebuild 4355 SHA256 d3bb85c86f500a7ee59a4e85d362d67d7741792dc0af6fa1e3ed694076e6a822 SHA512 2f7e2b7a33c87af7498c1b4c84a7c7e0af5fae4fe2edafdd7d6fb84f13f32bc4a2ea7b3334d1c7b423a91c60a5981df3b65cbedccaec140f7e47a904630e7bef WHIRLPOOL 953632ee7590be60c342a748dc3d92e8e7e22fa840057476b6f083497993c756240a93f7902104e175935d19b9d9251e7ed2b9adf7618930474ac4c2583e95f2
EBUILD tomcat-8.0.23-r1.ebuild 4153 SHA256 da6b77d97c1ce9c4358080edd1682ed86aa5e265acc7eecff30622cccd95d0f8 SHA512 083f04e9f936cdbb5ef9b591ecbce56423e5bf50c8e86aa26101b86cbcd0bb7dbc7da6f74c785c4cbb4038f12353f114f31e274ac6897ae9a9718646b0a7e8cf WHIRLPOOL 30206000dfca5c5522e4bb0f8da5a2b3edb94734766eae25580e34c6ed9efd6b78cf8d3bbd633315785d2d7c4500e9a73c480f8a75f0a6e7de4f994a420b9cfb
+EBUILD tomcat-8.0.23-r2.ebuild 4312 SHA256 ff527eae7b6c8f5772ac26adc3197636d9a1525cecadd4f24cdc48dbf5a896a3 SHA512 322b6a2d864e8b8dbaf293ded3b22ce4b7b4ccd92a97e283db01b2789b11b91b817745047ddc3d2171a1b57fba6e6c0dd1c58854f78d78cbf198941e8d1c66aa WHIRLPOOL c9aeeb9c9dd19771e4ff4b632e969a8acf7a29b3c500e4abc23a47d9e94cd72120c1bd334baa10502dace421ee41e4346224a3a9266ad80e118edc13d9bd5ecc
EBUILD tomcat-8.0.23.ebuild 4195 SHA256 a3d63d0ac2e032f06f87e8be7c6dd6205e25ff090d26e2a4545b13c15027678c SHA512 632113159f1bcf2ec364ce4d4d5774316fcfeaab1f52101ea1298e7aecf5551b62cb291488f594edb6b2b040b60eb3856f421cc3f45fac4cea88b94e5af141dd WHIRLPOOL 29aaa1db8b67f239c4b271a7d277b22179a6ca4dd3490c6af51ba8585a3e4c862236d6250c3a9244861755f47668b4caf96bd7423ee8b96b1c91e5e8532b2c95
-MISC ChangeLog 85019 SHA256 ffca3eb044ea0f9932831a09e3840c0c73ac994feec6b467f845d480e93a027b SHA512 764e7cef2b9fe849f25f8fe5132d9c9ef4823fd7304af21f29fdc7c82274e25ad8e8c23a022ba8e57eed5a9346b6df609dc8a2aa3d959d18adaa7a3f4aca2fc6 WHIRLPOOL 13ccc16ae81ea54b8a7df22659cce671adb9860e564f1fd448f9fc6262be3dc6eb4b07862737b36b5160145ff42a88935b4681c01ae74346fa66a368e8c74f41
+MISC ChangeLog 85348 SHA256 7cbc72506cee56a54cbeadb128c75e5cc9a09890df91667873d8eb5576c58fca SHA512 4472930b1d7015055b9d5ca1dbadd3cb2aa976560fcaa287a04d7028a46fbbedb6509a85f2c283f017ecb9533f4e1f4637d396a6b8fdafe192c4ddacd15dcebb WHIRLPOOL bb783b8c3a688ed15a96897b9f3477c763cc1ff81f3a4c3740d699c01bdee241991ae5889236c00c68682bdab59f7baf1427ec70a36ccbe3b280298c986f3d0e
MISC metadata.xml 652 SHA256 ec9dcba0295a5c3eff6b20d7d8038e09c6438d2fc56e45b5cfc3c27206f4bfd8 SHA512 07bc791d1240d11cb34a117657187a9efe4ef4bcdfee76d99f9656caa6fde1c1ffb67b78fe5e552c2a44ddb7e595d4175ada50f0426f2b0d832f0162f6b0afac WHIRLPOOL e1cc5d3799a6b7f6249f5c1420248600b5fec9228dd803fd673b1a75e26900c6539222a1da07e83bb4560e17681ecdf9ff31fe5dcc4d0fb15a694e9402991d7e
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2
+
+iQEcBAEBCAAGBQJVrnSSAAoJEJGRpfGTSRu4IdMIAKMsYqLZDdl81YQkp/+ht5oG
+6mXmGKpEPq+0wlsIH8mWBsEb8epYWHgTopobuTlMJyRX9z5szSZT2+tqeh8DUjT6
+TXHgJAnHT3SBT0la/6/csEfh7gkjrire9IJsFQTXJD6uRz/Rfqp4t0KSoEodcNMG
+Jbu2+nS0BVTqqvg/XZCFCGZP1XPApoeY/OLNBrloQUy7WsnOEdVc8S4VbUMXNLCi
+4JVs5EAazVhjNfB+dApbuxiGhImH2JgnDlx2NKtsuMGLAC8qrKt3LvrRoYLPt5qe
+UjmGvF+zt/ad+ftHUWRlq8XCrZOE3jQLGYVaDEOFCJtKw6zR5p4/nTTiDbJkwUk=
+=8t8y
+-----END PGP SIGNATURE-----
diff --git a/www-servers/tomcat/tomcat-6.0.44-r0.ebuild b/www-servers/tomcat/tomcat-6.0.44-r0.ebuild
new file mode 100644
index 000000000000..590b4701edf7
--- /dev/null
+++ b/www-servers/tomcat/tomcat-6.0.44-r0.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/tomcat-6.0.44-r0.ebuild,v 1.1 2015/07/21 15:33:26 monsieurp Exp $
+
+EAPI=5
+
+JAVA_PKG_IUSE="source test"
+
+inherit eutils java-pkg-2 java-ant-2 prefix user
+
+MY_P="apache-${P}-src"
+
+DESCRIPTION="Tomcat Servlet-2.5/JSP-2.1 Container"
+HOMEPAGE="http://tomcat.apache.org/"
+SRC_URI="mirror://apache/${PN}/tomcat-6/v${PV}/src/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="6"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
+IUSE="extra-webapps"
+
+RESTRICT="test"
+
+ECJ_SLOT="3.7"
+SAPI_SLOT="2.5"
+
+CDEPEND="dev-java/eclipse-ecj:${ECJ_SLOT}
+ dev-java/tomcat-servlet-api:${SAPI_SLOT}"
+RDEPEND="${CDEPEND}
+ >=virtual/jre-1.6
+ !<dev-java/tomcat-native-1.1.20"
+DEPEND="${CDEPEND}
+ >=virtual/jdk-1.6
+ >=dev-java/ant-core-1.8.1:0
+ test? (
+ dev-java/ant-junit:0
+ dev-java/junit:4
+ )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+ enewgroup tomcat 265
+ enewuser tomcat 265 -1 /dev/null tomcat
+}
+
+java_prepare() {
+ find -name '*.jar' -exec rm -v {} + || 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_ANT_REWRITE_CLASSPATH="true"
+
+EANT_BUILD_TARGET="deploy"
+EANT_DOC_TARGET=""
+EANT_GENTOO_CLASSPATH="tomcat-servlet-api-${SAPI_SLOT},eclipse-ecj-${ECJ_SLOT}"
+EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes"
+EANT_NEEDS_TOOLS="true"
+EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false"
+
+# revision of the instance-manager script
+IM_REV="-r1"
+
+src_compile() {
+ EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)"
+ java-pkg-2_src_compile
+}
+
+EANT_TEST_GENTOO_CLASSPATH="${EANT_GENTOO_CLASSPATH},junit-4"
+
+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
+
+ # so we don't have to call java-config with --with-dependencies, which might
+ # bring in more jars than actually desired.
+ java-pkg_addcp "$(java-pkg_getjars eclipse-ecj-${ECJ_SLOT},tomcat-servlet-api-${SAPI_SLOT})"
+
+ dodoc RELEASE-NOTES RUNNING.txt
+ use source && java-pkg_dosrc java/*
+
+ ### Webapps ###
+
+ 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 /usr/share/tomcat-${SLOT}/logs
+ fperms 0750 /usr/share/tomcat-${SLOT}/logs
+
+ # replace the default pw with a random one, see #92281
+ local randpw=$(echo ${RANDOM}|md5sum|cut -c 1-15)
+ sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die
+
+ insinto "${dest}"
+ doins -r output/build/conf
+
+ ### rc ###
+
+ cp "${FILESDIR}"/tomcat{.conf,.init,-instance-manager${IM_REV}.bash} "${T}" || die
+ eprefixify "${T}"/tomcat{.conf,.init,-instance-manager${IM_REV}.bash}
+ sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,.init,-instance-manager${IM_REV}.bash} || die
+
+ insinto "${dest}"/gentoo
+ doins "${T}"/tomcat.conf
+ exeinto "${dest}"/gentoo
+ doexe "${T}"/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 (<6.0.36), 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 http://www.gentoo.org/proj/en/java/tomcat6-guide.xml for more information."
+}
diff --git a/www-servers/tomcat/tomcat-7.0.59-r2.ebuild b/www-servers/tomcat/tomcat-7.0.59-r2.ebuild
new file mode 100644
index 000000000000..0c083f945c73
--- /dev/null
+++ b/www-servers/tomcat/tomcat-7.0.59-r2.ebuild
@@ -0,0 +1,147 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/tomcat-7.0.59-r2.ebuild,v 1.1 2015/07/21 15:33:26 monsieurp Exp $
+
+EAPI=5
+
+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="http://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 ~x86 ~ppc ~ppc64 ~x86-freebsd ~amd64-linux ~x86-linux ~x86-solaris"
+IUSE="extra-webapps websockets"
+
+RESTRICT="test" # can we run them on a production system?
+
+ECJ_SLOT="4.4"
+SAPI_SLOT="3.0"
+
+COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT}
+ dev-java/tomcat-servlet-api:${SAPI_SLOT}"
+RDEPEND="${COMMON_DEP}
+ websockets? ( >=virtual/jre-1.6 )
+ !websockets? ( >=virtual/jre-1.6 )
+ !<dev-java/tomcat-native-1.1.24"
+DEPEND="${COMMON_DEP}
+ websockets? ( >=virtual/jdk-1.6 )
+ !websockets? ( >=virtual/jdk-1.6 )
+ >=dev-java/ant-core-1.8.1:0
+ test? (
+ dev-java/ant-junit:0
+ dev-java/junit:4
+ )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+ enewgroup tomcat 265
+ enewuser tomcat 265 -1 /dev/null tomcat
+}
+
+java_prepare() {
+ find -type f -name '*.jar' -exec rm -frv {} + || 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_ANT_REWRITE_CLASSPATH="true"
+
+EANT_BUILD_TARGET="deploy"
+EANT_GENTOO_CLASSPATH="tomcat-servlet-api-${SAPI_SLOT},eclipse-ecj-${ECJ_SLOT}"
+EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes"
+EANT_NEEDS_TOOLS="true"
+EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false"
+
+# revision of the instance-manager script
+IM_REV="-r1"
+
+src_compile() {
+ use websockets && EANT_EXTRA_ARGS="-Djava.7.home=${JAVA_HOME}"
+ EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)"
+ java-pkg-2_src_compile
+}
+
+EANT_TEST_GENTOO_CLASSPATH="${EANT_GENTOO_CLASSPATH},junit-4"
+
+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
+
+ # so we don't have to call java-config with --with-dependencies, which might
+ # bring in more jars then actually desired.
+ java-pkg_addcp "$(java-pkg_getjars eclipse-ecj-${ECJ_SLOT},tomcat-servlet-api-${SAPI_SLOT})"
+
+ dodoc RELEASE-NOTES RUNNING.txt
+ use doc && java-pkg_dojavadoc output/dist/webapps/docs/api
+ use source && java-pkg_dosrc java/*
+
+ ### Webapps ###
+
+ 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 logs
+ fperms 0750 logs
+
+ # replace the default pw with a random one, see #92281
+ local randpw=$(echo ${RANDOM}|md5sum|cut -c 1-15)
+ sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die
+
+ insinto "${dest}"
+ doins -r output/build/conf
+
+ ### rc ###
+
+ cp "${FILESDIR}"/tomcat{.conf,.init,-instance-manager${IM_REV}.bash} "${T}" || die
+ eprefixify "${T}"/tomcat{.conf,.init,-instance-manager${IM_REV}.bash}
+ sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,.init,-instance-manager${IM_REV}.bash} || die
+
+ insinto "${dest}"/gentoo
+ doins "${T}"/tomcat.conf
+ exeinto "${dest}"/gentoo
+ doexe "${T}"/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 http://www.gentoo.org/proj/en/java/tomcat6-guide.xml for more information."
+}
diff --git a/www-servers/tomcat/tomcat-8.0.23-r2.ebuild b/www-servers/tomcat/tomcat-8.0.23-r2.ebuild
new file mode 100644
index 000000000000..52ecbf241a85
--- /dev/null
+++ b/www-servers/tomcat/tomcat-8.0.23-r2.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/tomcat-8.0.23-r2.ebuild,v 1.1 2015/07/21 15:33:26 monsieurp Exp $
+
+EAPI="5"
+
+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 Container"
+HOMEPAGE="http://tomcat.apache.org/"
+SRC_URI="mirror://apache/${PN}/tomcat-8/v${PV}/src/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="8"
+KEYWORDS="~amd64 ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-solaris"
+IUSE="extra-webapps"
+
+RESTRICT="test" # can we run them on a production system?
+
+ECJ_SLOT="4.4"
+SAPI_SLOT="3.1"
+
+COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT}
+ dev-java/tomcat-servlet-api:${SAPI_SLOT}"
+RDEPEND="${COMMON_DEP}
+ !<dev-java/tomcat-native-1.1.24
+ >=virtual/jre-1.7"
+DEPEND="${COMMON_DEP}
+ >=virtual/jdk-1.7
+ >=dev-java/ant-core-1.8.1:0
+ test? (
+ dev-java/ant-junit:0
+ dev-java/junit:4
+ )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+ enewgroup tomcat 265
+ enewuser tomcat 265 -1 /dev/null tomcat
+}
+
+java_prepare() {
+ find -name '*.jar' -type f -delete -print || 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_ANT_REWRITE_CLASSPATH="true"
+
+EANT_BUILD_TARGET="deploy"
+EANT_GENTOO_CLASSPATH="tomcat-servlet-api-${SAPI_SLOT},eclipse-ecj-${ECJ_SLOT}"
+EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes"
+EANT_NEEDS_TOOLS="true"
+EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false"
+
+# revision of the instance-manager script
+IM_REV="-r1"
+
+src_compile() {
+ EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)"
+ java-pkg-2_src_compile
+}
+
+EANT_TEST_GENTOO_CLASSPATH="${EANT_GENTOO_CLASSPATH},junit-4"
+
+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
+
+ # so we don't have to call java-config with --with-dependencies, which might
+ # bring in more jars then actually desired.
+ java-pkg_addcp "$(java-pkg_getjars eclipse-ecj-${ECJ_SLOT},tomcat-servlet-api-${SAPI_SLOT})"
+
+ dodoc RELEASE-NOTES RUNNING.txt
+ use doc && java-pkg_dohtml -r output/dist/webapps/docs/api
+ use source && java-pkg_dosrc java/*
+
+ ### Webapps ###
+
+ 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 /usr/share/tomcat-${SLOT}/logs
+ fperms 0750 /usr/share/tomcat-${SLOT}/logs
+
+ # replace the default pw with a random one, see #92281
+ local randpw=$(echo ${RANDOM}|md5sum|cut -c 1-15)
+ sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die
+
+ insinto "${dest}"
+ doins -r output/build/conf
+
+ ### rc ###
+
+ cp "${FILESDIR}"/tomcat{.conf,.init,-instance-manager${IM_REV}.bash} "${T}" || die
+ eprefixify "${T}"/tomcat{.conf,.init,-instance-manager${IM_REV}.bash}
+ sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,.init,-instance-manager${IM_REV}.bash} || die
+
+ insinto "${dest}"/gentoo
+ doins "${T}"/tomcat.conf
+ exeinto "${dest}"/gentoo
+ doexe "${T}"/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 http://www.gentoo.org/proj/en/java/tomcat6-guide.xml for more information."
+}