Gentoo Archives: gentoo-commits

From: "Miroslav Šulc" <fordfrog@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-servers/tomcat/files/, www-servers/tomcat/
Date: Wed, 25 Nov 2015 19:49:15
Message-Id: 1448480936.2d9f56cb73c053a1c95c2da0fb1ce2266e040fce.fordfrog@gentoo
1 commit: 2d9f56cb73c053a1c95c2da0fb1ce2266e040fce
2 Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
3 AuthorDate: Wed Nov 25 19:48:00 2015 +0000
4 Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
5 CommitDate: Wed Nov 25 19:48:56 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d9f56cb
7
8 www-servers/tomcat: version bump
9
10 Package-Manager: portage-2.2.26
11
12 www-servers/tomcat/Manifest | 1 +
13 .../tomcat/files/tomcat-8.0.29-build.xml.patch | 265 +++++++++++++++++++++
14 www-servers/tomcat/tomcat-8.0.29.ebuild | 155 ++++++++++++
15 3 files changed, 421 insertions(+)
16
17 diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest
18 index 6e88e73..0ea45d7 100644
19 --- a/www-servers/tomcat/Manifest
20 +++ b/www-servers/tomcat/Manifest
21 @@ -4,3 +4,4 @@ DIST apache-tomcat-7.0.64-src.tar.gz 4592198 SHA256 d805dec3b387a244c4285ce1f9fc
22 DIST apache-tomcat-7.0.65-src.tar.gz 4600718 SHA256 38c266a21ff27560ba4c213dd64628a1ed35b22289d37b5d7f250010e963cc39 SHA512 6eb420a3067783a6ffee781c834dc363d6638d6e79182886594249a0ef810b2ab721f2a44f84b4ea90372a7e2e5171caf49697945d359e9c877a2db640fc3da2 WHIRLPOOL db678b899455ef977d893eec01ba50687c7563646321dbe511be6c55f03859a08778e4f6da14021a9ed051c1f3573edf9d0de527383aaf4ee6114f3a027b281d
23 DIST apache-tomcat-8.0.26-src.tar.gz 4904717 SHA256 3725621a73501a6e09438f177acfab7ce11fabeb2b0380a909273410f3b50b3b SHA512 70ef253889916bcca309a8f80675c4c588fef1cc5dc0360c45347107fb56fd546a334ca01e1109775410f7642acf6c75d9887f9403ad4c1d0e30f041f9ce34fb WHIRLPOOL 3c29a5418dfefc12157d8656dfa15a2937668f52d18c21f6dd4a278d2bc4c84d5b6d542daf6244040eabeab57cb759a510b7b1d0e41440a2d9ad62586723dafc
24 DIST apache-tomcat-8.0.28-src.tar.gz 4913153 SHA256 441a0a0459b6c2dacab3bcf68a9e512b4bb62f7251a27bd15b909ee31b659367 SHA512 60f9a9f643595cdc87598169b8b66cc1e445445a530cad88d2957e90ca99e7c77be9d3576c7fa3a0e7051166f2a960a1c3bf4103f902d1da122825d41e1154c7 WHIRLPOOL 5867ec0c128fe5247c7b874baf05fba9fc9a5663e1c16ecd60bc6ae1e3c411a43f4d8784db5c915fe6c54bc2ec728a01773708738aede30e5abaf1f77072cdcb
25 +DIST apache-tomcat-8.0.29-src.tar.gz 4933339 SHA256 5cb87ae9afd145d68906e93b825a6a41303d7975bafe3d57530e9a8ec01c7c80 SHA512 279c971529f0e7513885a0a201753bc94b1ed7a4f035cb33943bf6ae769102630b94144c65236e8b42c666ded7cc843db54c155e8b5cd1ae175b6385d9c2789b WHIRLPOOL 8cfb5402b877be4bd4306cf5d14cf76302b1904e3530de108f262f9bb3de6f1377882fb5a1406e4b2ffc5c239c541f64df55fc98945157edafbd14586deb26bd
26
27 diff --git a/www-servers/tomcat/files/tomcat-8.0.29-build.xml.patch b/www-servers/tomcat/files/tomcat-8.0.29-build.xml.patch
28 new file mode 100644
29 index 0000000..1923d23
30 --- /dev/null
31 +++ b/www-servers/tomcat/files/tomcat-8.0.29-build.xml.patch
32 @@ -0,0 +1,265 @@
33 +diff -Naur apache-tomcat-8.0.24-src.orig/build.xml apache-tomcat-8.0.24-src/build.xml
34 +--- apache-tomcat-8.0.24-src.orig/build.xml 2015-07-01 21:25:21.000000000 +0100
35 ++++ apache-tomcat-8.0.24-src/build.xml 2015-08-22 21:17:05.825564599 +0100
36 +@@ -697,24 +697,29 @@
37 + manifest="${tomcat.manifests}/annotations-api.jar.manifest" />
38 +
39 + <!-- Servlet 3.1 Implementation JAR File -->
40 ++<!--
41 + <jarIt jarfile="${servlet-api.jar}"
42 + filesDir="${tomcat.classes}"
43 + filesId="files.servlet-api"
44 + manifest="${tomcat.manifests}/servlet-api.jar.manifest"
45 + notice="${tomcat.manifests}/servlet-api.jar.notice"
46 + license="${tomcat.manifests}/servlet-api.jar.license" />
47 +-
48 ++-->
49 + <!-- JSP 2.3 Implementation JAR File -->
50 ++<!--
51 + <jarIt jarfile="${jsp-api.jar}"
52 + filesDir="${tomcat.classes}"
53 + filesId="files.jsp-api"
54 + manifest="${tomcat.manifests}/jsp-api.jar.manifest" />
55 ++-->
56 +
57 + <!-- EL 3.0 Implementation JAR File -->
58 ++<!--
59 + <jarIt jarfile="${el-api.jar}"
60 + filesDir="${tomcat.classes}"
61 + filesId="files.el-api"
62 + manifest="${tomcat.manifests}/el-api.jar.manifest" />
63 ++-->
64 +
65 + <!-- WebSocket 1.1 API JAR File -->
66 + <jarIt jarfile="${websocket-api.jar}"
67 +@@ -982,14 +987,14 @@
68 +
69 + <target name="deploy" depends="package,build-docs,build-tomcat-jdbc,compile-webapp-examples"
70 + description="Default. Builds a working Tomcat instance">
71 +-
72 ++<!--
73 + <copy tofile="${tomcat.build}/bin/tomcat-native.tar.gz"
74 + file="${tomcat-native.tar.gz}" />
75 + <copy tofile="${tomcat.build}/bin/commons-daemon-native.tar.gz"
76 + file="${commons-daemon.native.src.tgz}" />
77 +
78 + <copy tofile="${tomcat.build}/bin/commons-daemon.jar" file="${commons-daemon.jar}" />
79 +-
80 ++-->
81 + <!-- Copy scripts -->
82 + <copy todir="${tomcat.build}/bin">
83 + <fileset dir="bin">
84 +@@ -1049,7 +1054,7 @@
85 + <exclude name="${jdt.jar.filename}"/>
86 + </fileset>
87 + </delete>
88 +- <copy file="${jdt.jar}" todir="${tomcat.build}/lib"/>
89 ++<!-- <copy file="${jdt.jar}" todir="${tomcat.build}/lib"/> -->
90 +
91 + <!-- Add sources for examples -->
92 + <antcall target="examples-sources" />
93 +@@ -1083,7 +1088,7 @@
94 + </javac>
95 + </target>
96 +
97 +- <target name="build-tomcat-jdbc" depends="package">
98 ++ <target name="build-tomcat-jdbc" depends="package" unless="noget">
99 + <!-- build the jdbc-pool jar and source jar-->
100 + <echo message="Building Tomcat JDBC pool libraries"/>
101 + <ant antfile="${tomcat.jdbc.dir}/build.xml" dir="${tomcat.jdbc.dir}"
102 +@@ -1098,7 +1103,7 @@
103 + <copy file="${tomcat-jdbc.jar}" todir="${tomcat.build}/lib"/>
104 + </target>
105 +
106 +- <target name="build-tomcat-jdbc-src">
107 ++ <target name="build-tomcat-jdbc-src" unless="noget">
108 + <!-- build the jdbc-pool source jar-->
109 + <echo message="Building Tomcat JDBC pool src JAR"/>
110 + <ant antfile="${tomcat.jdbc.dir}/build.xml" dir="${tomcat.jdbc.dir}"
111 +@@ -1202,10 +1207,11 @@
112 +
113 + <copy file="${basedir}/LICENSE" todir="${tomcat.embed}" />
114 + <copy file="${basedir}/NOTICE" todir="${tomcat.embed}" />
115 ++<!--
116 + <copy file="${tomcat-dbcp.jar}" todir="${tomcat.embed}"
117 + failonerror="false"/>
118 + <copy file="${jdt.jar}" todir="${tomcat.embed}" />
119 +-
120 ++-->
121 + <!-- Note the meta-inf below will work as long as there is only one JAR
122 + that needs to add entries. If there is more than one a more complex
123 + solution will be required. -->
124 +@@ -1542,7 +1548,7 @@
125 +
126 + <target name="extras-commons-logging-prepare"
127 + depends="extras-prepare"
128 +- description="Prepare to build web services extras package">
129 ++ description="Prepare to build web services extras package" unless="noget">
130 +
131 + <antcall target="downloadfile-2">
132 + <param name="sourcefile.1" value="${commons-logging-src.loc.1}"/>
133 +@@ -1681,7 +1687,7 @@
134 +
135 + <target name="extras-webservices-prepare"
136 + depends="extras-prepare"
137 +- description="Prepare to build web services extras package">
138 ++ description="Prepare to build web services extras package" unless="noget">
139 +
140 + <antcall target="downloadfile">
141 + <param name="sourcefile" value="${jaxrpc-lib.loc}"/>
142 +@@ -1882,6 +1888,7 @@
143 +
144 + <target name="javadoc" depends="dist-source,extras-webservices-prepare"
145 + description="Create the Tomcat javadoc" >
146 ++<!--
147 + <javadoc packagenames="javax.servlet.*"
148 + excludepackagenames="javax.servlet.jsp.*"
149 + sourcepath="${tomcat.dist}/src/java"
150 +@@ -1940,6 +1947,7 @@
151 + <path location="${ant.core.lib}"/>
152 + </classpath>
153 + </javadoc>
154 ++-->
155 + <javadoc packagenames="javax.websocket.*"
156 + sourcepath="${tomcat.dist}/src/java"
157 + destdir="${tomcat.dist}/webapps/docs/websocketapi"
158 +@@ -1970,15 +1978,17 @@
159 + docencoding="UTF-8"
160 + charset="UTF-8"
161 + additionalparam="-breakiterator -notimestamp"
162 +- maxmemory="256m" >
163 ++ maxmemory="512m" >
164 + <classpath>
165 + <path refid="compile.classpath"/>
166 + <path refid="tomcat.webservices.classpath"/>
167 + <path location="${ant.core.lib}"/>
168 + </classpath>
169 ++<!--
170 + <link href="../servletapi"/>
171 + <link href="../jspapi"/>
172 + <link href="../elapi"/>
173 ++-->
174 + <link href="../websocketapi"/>
175 + <link href="http://docs.oracle.com/javase/7/docs/api/"/>
176 + <link href="http://commons.apache.org/proper/commons-io/javadocs/api-release/"/>
177 +@@ -2739,7 +2749,7 @@
178 + </target>
179 +
180 + <target name="download-compile"
181 +- description="Download (and build) components necessary to compile" >
182 ++ description="Download (and build) components necessary to compile" unless="noget">
183 +
184 + <antcall target="downloadfile-2">
185 + <param name="sourcefile.1" value="${tomcat-native.loc.1}"/>
186 +@@ -2773,7 +2783,7 @@
187 + </target>
188 +
189 + <target name="download-test-compile"
190 +- description="Download additional components for the tests" >
191 ++ description="Download additional components for the tests" unless="noget">
192 +
193 + <antcall target="downloadfile">
194 + <param name="sourcefile" value="${junit.loc}"/>
195 +@@ -2819,7 +2829,7 @@
196 + </target>
197 +
198 + <target name="download-dist"
199 +- description="Download additional components for a distribution" >
200 ++ description="Download additional components for a distribution" unless="noget">
201 +
202 + <antcall target="downloadzip-2">
203 + <param name="sourcefile.1" value="${tomcat-native.win.1}"/>
204 +@@ -2845,18 +2855,18 @@
205 +
206 + <!-- =============== Utility Targets to support downloads ================ -->
207 +
208 +- <target name="setproxy" if="${proxy.use}">
209 ++ <target name="setproxy" if="${proxy.use}" unless="noget">
210 + <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"
211 + proxyuser="${proxy.user}" proxypassword="${proxy.password}" />
212 + <echo message="Using ${proxy.host}:${proxy.port} to download ${sourcefile}"/>
213 + </target>
214 +
215 +- <target name="testexist">
216 ++ <target name="testexist" unless="noget">
217 + <echo message="Testing for ${destfile}"/>
218 + <available file="${destfile}" property="exist"/>
219 + </target>
220 +
221 +- <target name="downloadgz" unless="exist" depends="testexist,setproxy">
222 ++ <target name="downloadgz" unless="noget" depends="testexist,setproxy">
223 + <!-- Download and extract the package -->
224 + <local name="temp.file"/>
225 + <mkdir dir="${base.path}"/>
226 +@@ -2868,7 +2878,7 @@
227 + <delete file="${temp.file}.tar.gz"/>
228 + </target>
229 +
230 +- <target name="downloadgz-2" unless="exist" depends="testexist">
231 ++ <target name="downloadgz-2" unless="noget" depends="testexist">
232 + <!-- Download and extract the package from the two alternative locations -->
233 + <local name="temp.file"/>
234 + <mkdir dir="${base.path}"/>
235 +@@ -2887,7 +2897,7 @@
236 + <delete file="${temp.file}.tar.gz"/>
237 + </target>
238 +
239 +- <target name="downloadzip" unless="exist" depends="testexist,setproxy">
240 ++ <target name="downloadzip" unless="noget" depends="testexist,setproxy">
241 + <!-- Download and extract the package -->
242 + <local name="temp.file"/>
243 + <mkdir dir="${base.path}"/>
244 +@@ -2898,7 +2908,7 @@
245 + <delete file="${temp.file}"/>
246 + </target>
247 +
248 +- <target name="downloadzip-2" unless="exist" depends="testexist">
249 ++ <target name="downloadzip-2" unless="noget" depends="testexist">
250 + <!-- Download and extract the package from the two alternative locations -->
251 + <local name="temp.file"/>
252 + <mkdir dir="${base.path}"/>
253 +@@ -2916,7 +2926,7 @@
254 + <delete file="${temp.file}"/>
255 + </target>
256 +
257 +- <target name="downloadfile" unless="exist" depends="testexist,setproxy">
258 ++ <target name="downloadfile" unless="noget" depends="testexist,setproxy">
259 + <!-- Download the file -->
260 + <local name="temp.file"/>
261 + <mkdir dir="${base.path}"/>
262 +@@ -2926,7 +2936,7 @@
263 + <move file="${temp.file}" tofile="${destfile}"/>
264 + </target>
265 +
266 +- <target name="downloadfile-2" unless="exist" depends="testexist">
267 ++ <target name="downloadfile-2" unless="noget" depends="testexist">
268 + <!-- Download the file from the two alternative locations -->
269 + <local name="temp.file"/>
270 + <mkdir dir="${base.path}"/>
271 +@@ -2949,7 +2959,7 @@
272 + <move file="${temp.file}" tofile="${destfile}"/>
273 + </target>
274 +
275 +- <target name="trydownload.check" depends="setproxy">
276 ++ <target name="trydownload.check" depends="setproxy" unless="noget">
277 + <condition property="trydownload.run">
278 + <and>
279 + <not>
280 +@@ -2960,7 +2970,7 @@
281 + </condition>
282 + </target>
283 +
284 +- <target name="trydownload" if="trydownload.run" depends="trydownload.check">
285 ++ <target name="trydownload" if="trydownload.run" depends="trydownload.check" unless="noget">
286 + <!-- Downloads a file if not yet downloaded and the source URL is available -->
287 + <get src="${sourcefile}" httpusecaches="${trydownload.httpusecaches}" dest="${destfile}" />
288 + </target>
289 +@@ -2971,7 +2981,7 @@
290 +
291 + <target name="ide-eclipse"
292 + depends="download-compile, extras-webservices-prepare, download-test-compile"
293 +- description="Prepares the source tree to be built in Eclipse">
294 ++ description="Prepares the source tree to be built in Eclipse" unless="noget">
295 +
296 + <!-- Copy the sample project files into the root directory -->
297 + <copy file="${tomcat.home}/res/ide-support/eclipse/eclipse.project" tofile="${tomcat.home}/.project"/>
298
299 diff --git a/www-servers/tomcat/tomcat-8.0.29.ebuild b/www-servers/tomcat/tomcat-8.0.29.ebuild
300 new file mode 100644
301 index 0000000..3595c57
302 --- /dev/null
303 +++ b/www-servers/tomcat/tomcat-8.0.29.ebuild
304 @@ -0,0 +1,155 @@
305 +# Copyright 1999-2015 Gentoo Foundation
306 +# Distributed under the terms of the GNU General Public License v2
307 +# $Id$
308 +
309 +EAPI=5
310 +
311 +JAVA_PKG_IUSE="doc source test"
312 +
313 +inherit eutils java-pkg-2 java-ant-2 prefix user
314 +
315 +MY_P="apache-${P}-src"
316 +
317 +DESCRIPTION="Tomcat Servlet-3.1/JSP-2.3 Container"
318 +HOMEPAGE="http://tomcat.apache.org/"
319 +SRC_URI="mirror://apache/${PN}/tomcat-8/v${PV}/src/${MY_P}.tar.gz"
320 +
321 +LICENSE="Apache-2.0"
322 +SLOT="8"
323 +KEYWORDS="~amd64 ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-solaris"
324 +IUSE="extra-webapps"
325 +
326 +RESTRICT="test" # can we run them on a production system?
327 +
328 +ECJ_SLOT="4.4"
329 +SAPI_SLOT="3.1"
330 +
331 +COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT}
332 + dev-java/oracle-javamail:0
333 + dev-java/tomcat-servlet-api:${SAPI_SLOT}"
334 +RDEPEND="${COMMON_DEP}
335 + !<dev-java/tomcat-native-1.1.24
336 + >=virtual/jre-1.7"
337 +DEPEND="${COMMON_DEP}
338 + app-admin/pwgen
339 + >=virtual/jdk-1.7
340 + test? (
341 + >=dev-java/ant-junit-1.9:0
342 + dev-java/easymock:3.2
343 + )"
344 +
345 +S=${WORKDIR}/${MY_P}
346 +
347 +pkg_setup() {
348 + java-pkg-2_pkg_setup
349 + enewgroup tomcat 265
350 + enewuser tomcat 265 -1 /dev/null tomcat
351 +}
352 +
353 +java_prepare() {
354 + find -name '*.jar' -type f -delete -print || die
355 +
356 + # Remove bundled javamail, servlet-api
357 + rm -rv java/javax/{el,mail,servlet} || die
358 +
359 + epatch "${FILESDIR}/${P}-build.xml.patch"
360 +
361 + # For use of catalina.sh in netbeans
362 + sed -i -e "/^# ----- Execute The Requested Command/ a\
363 + CLASSPATH=\`java-config --classpath ${PN}-${SLOT}\`" \
364 + bin/catalina.sh || die
365 +}
366 +
367 +JAVA_ANT_REWRITE_CLASSPATH="true"
368 +
369 +EANT_BUILD_TARGET="deploy"
370 +EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT},oracle-javamail,tomcat-servlet-api-${SAPI_SLOT}"
371 +EANT_TEST_GENTOO_CLASSPATH="easymock-3.2"
372 +EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes"
373 +EANT_NEEDS_TOOLS="true"
374 +EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false"
375 +
376 +# revisions of the scripts
377 +IM_REV="-r2"
378 +INIT_REV="-r1"
379 +
380 +src_compile() {
381 + EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)"
382 + java-pkg-2_src_compile
383 +}
384 +
385 +src_test() {
386 + java-pkg-2_src_test
387 +}
388 +
389 +src_install() {
390 + local dest="/usr/share/${PN}-${SLOT}"
391 +
392 + java-pkg_jarinto "${dest}"/bin
393 + java-pkg_dojar output/build/bin/*.jar
394 + exeinto "${dest}"/bin
395 + doexe output/build/bin/*.sh
396 +
397 + java-pkg_jarinto "${dest}"/lib
398 + java-pkg_dojar output/build/lib/*.jar
399 +
400 + dodoc RELEASE-NOTES RUNNING.txt
401 + use doc && java-pkg_dojavadoc output/dist/webapps/docs/api
402 + use source && java-pkg_dosrc java/*
403 +
404 + ### Webapps ###
405 +
406 + # add missing docBase
407 + local apps="host-manager manager"
408 + for app in ${apps}; do
409 + sed -i -e "s|=\"true\" >|=\"true\" docBase=\"\$\{catalina.home\}/webapps/${app}\" >|" \
410 + output/build/webapps/${app}/META-INF/context.xml || die
411 + done
412 +
413 + insinto "${dest}"/webapps
414 + doins -r output/build/webapps/{host-manager,manager,ROOT}
415 + use extra-webapps && doins -r output/build/webapps/{docs,examples}
416 +
417 + ### Config ###
418 +
419 + # create "logs" directory in $CATALINA_BASE
420 + # and set correct perms, see #458890
421 + dodir "${dest}"/logs
422 + fperms 0750 "${dest}"/logs
423 +
424 + # replace the default pw with a random one, see #92281
425 + local randpw="$(pwgen -s -B 15 1)"
426 + sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die
427 +
428 + # prepend gentoo.classpath to common.loader, see #453212
429 + sed -i -e 's/^common\.loader=/\0${gentoo.classpath},/' output/build/conf/catalina.properties || die
430 +
431 + insinto "${dest}"
432 + doins -r output/build/conf
433 +
434 + ### rc ###
435 +
436 + cp "${FILESDIR}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} "${T}" || die
437 + eprefixify "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash}
438 + sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} || die
439 +
440 + insinto "${dest}"/gentoo
441 + doins "${T}"/tomcat.conf
442 + exeinto "${dest}"/gentoo
443 + newexe "${T}"/tomcat${INIT_REV}.init tomcat.init
444 + newexe "${T}"/tomcat-instance-manager${IM_REV}.bash tomcat-instance-manager.bash
445 +}
446 +
447 +pkg_postinst() {
448 + elog "New ebuilds of Tomcat support running multiple instances. If you used prior version"
449 + elog "of Tomcat (<7.0.32), you have to migrate your existing instance to work with new Tomcat."
450 + elog "You can find more information at https://wiki.gentoo.org/wiki/Apache_Tomcat"
451 +
452 + elog "To manage Tomcat instances, run:"
453 + elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help"
454 +
455 + ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar"
456 + ewarn "from upstream binary if you need it. Gentoo Bug # 144276"
457 +
458 +# einfo "Please read https://www.gentoo.org/proj/en/java/tomcat6-guide.xml for more information."
459 +}