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/, www-servers/tomcat/files/
Date: Sat, 20 Apr 2019 23:20:49
Message-Id: 1555687197.ad227ffe791b7f75d7218055d090e231b954f954.fordfrog@gentoo
1 commit: ad227ffe791b7f75d7218055d090e231b954f954
2 Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
3 AuthorDate: Fri Apr 19 15:19:57 2019 +0000
4 Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 19 15:19:57 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad227ffe
7
8 www-servers/tomcat-7.0.94: bump
9
10 Package-Manager: Portage-2.3.64, Repoman-2.3.12
11 Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>
12
13 www-servers/tomcat/Manifest | 1 +
14 .../tomcat/files/tomcat-7.0.94-build.xml.patch | 163 +++++++++++++++++++++
15 www-servers/tomcat/tomcat-7.0.94.ebuild | 147 +++++++++++++++++++
16 3 files changed, 311 insertions(+)
17
18 diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest
19 index dac737d170a..af2df86dea4 100644
20 --- a/www-servers/tomcat/Manifest
21 +++ b/www-servers/tomcat/Manifest
22 @@ -1,4 +1,5 @@
23 DIST apache-tomcat-7.0.93-src.tar.gz 4786577 BLAKE2B 8b72418c98369e0e104c5f51e9d822c287487b5d3b66a4a6d005535b33a35a6cbc50c49b48100555bfaba0c6c983ea11dcdf381d2fba80a77fc17ac0df20efaa SHA512 5f9b08827aeae58f371496c34ce1ae5692bd5403e1a9a7a91b283ece3289356dbd85d48fcb71958aaeeb42cd65bb70fcf34cbe2db3901475cfb812370766f3fc
24 +DIST apache-tomcat-7.0.94-src.tar.gz 4966331 BLAKE2B e806baa91ebe4672fb238d6fd461b2055ff90db822b7edb2ad4432334d45cf2c2286639bc12f83987972a47129493bef4ba6ec77e544a93e000282a2d24ae9e8 SHA512 5e8d2fab7145af5677170299bec0ae5ea5fd20b7a539738678a420581f9b53a95a6fbb1caffb54c7222d97edfe8ff34ce6dbb7ba62adb1a61f2bfa6b15c43139
25 DIST apache-tomcat-8.0.53-src.tar.gz 5057041 BLAKE2B 3a50d2f61baecb5244909972384e36478c69e7592dd35119d8b7b974273c57a4855082f309146ed160144dbdcced3236fd586b047970bd8558bbe7b7e002e9fd SHA512 0b56bc723277b2888896ab34ec3e49cb56bac94ddf1a9b96bd023982e2ffabd5317f63b3c0971afdc8cd7a6364197409df461d22151dbaab3a2be7daf6858b9e
26 DIST apache-tomcat-8.5.39-src.tar.gz 5264067 BLAKE2B 8cd672529660783d3310beae356c32a9392f550ae72f2cdbd60f23c3b532e3adb19a295737fb39e9a2990b14edeff51cedf1f936f32f844e496e751913f2a859 SHA512 ba591290be49a01cec38300c6321b634e3ca7417074b55103afc887b9af3eda942d302aee5f1648e7fa60b5231cd7d83428846e2b55a4964f5cc98c27a844f8d
27 DIST apache-tomcat-9.0.17-src.tar.gz 5670728 BLAKE2B 15f8518ec073a935dec6afdd3a8f9885e7867a0aa033024024bd72b7887011ca169c776f2a4d886d93a73a478f9dcad5f87c31b3a30a88ca913309c51e0f0ec7 SHA512 b5763dae05598c0a4d3638ba02c0627219de20406bddaab86ae3262299f2d9bbda1a5db612cad9fb8a54b2888e9ce1c4be67613d855cfd92b4cee5b85e226602
28
29 diff --git a/www-servers/tomcat/files/tomcat-7.0.94-build.xml.patch b/www-servers/tomcat/files/tomcat-7.0.94-build.xml.patch
30 new file mode 100644
31 index 00000000000..832ce0be4a2
32 --- /dev/null
33 +++ b/www-servers/tomcat/files/tomcat-7.0.94-build.xml.patch
34 @@ -0,0 +1,163 @@
35 +diff --git a/build.xml b/build.xml
36 +index 92d8b92..790d8fd 100644
37 +--- a/build.xml
38 ++++ b/build.xml
39 +@@ -685,12 +685,14 @@
40 + </fileset>
41 + </copy>
42 + <!-- Copy JSP Schemas and DTDs to be packed into servlet-api.jar -->
43 ++<!--
44 + <copy todir="${tomcat.classes}/javax/servlet/resources" encoding="ISO-8859-1">
45 + <fileset dir="${tomcat.classes}/javax/servlet/jsp/resources">
46 + <include name="*" />
47 + <exclude name="jspxml*" />
48 + </fileset>
49 + </copy>
50 ++-->
51 +
52 + </target>
53 +
54 +@@ -741,26 +743,32 @@
55 + manifest="${tomcat.manifests}/annotations-api.jar.manifest" />
56 +
57 + <!-- Servlet 3.0 Implementation JAR File -->
58 ++<!--
59 + <jarIt jarfile="${servlet-api.jar}"
60 + filesDir="${tomcat.classes}"
61 + filesId="files.servlet-api"
62 + manifest="${tomcat.manifests}/servlet-api.jar.manifest"
63 + notice="${tomcat.manifests}/servlet-api.jar.notice"
64 + license="${tomcat.manifests}/servlet-api.jar.license" />
65 ++-->
66 +
67 + <!-- JSP 2.2 Implementation JAR File -->
68 ++<!--
69 + <jarIt jarfile="${jsp-api.jar}"
70 + filesDir="${tomcat.classes}"
71 + filesId="files.jsp-api"
72 + manifest="${tomcat.manifests}/jsp-api.jar.manifest"
73 + notice="${tomcat.manifests}/jsp-api.jar.notice"
74 + license="${tomcat.manifests}/jsp-api.jar.license" />
75 ++-->
76 +
77 + <!-- JSP 2.2 EL Implementation JAR File -->
78 ++<!--
79 + <jarIt jarfile="${el-api.jar}"
80 + filesDir="${tomcat.classes}"
81 + filesId="files.el-api"
82 + manifest="${tomcat.manifests}/el-api.jar.manifest" />
83 ++-->
84 +
85 + <!-- Bootstrap JAR File -->
86 + <jarIt jarfile="${bootstrap.jar}"
87 +@@ -819,9 +827,9 @@
88 + filesId="files.jasper-el" />
89 +
90 + <!-- Re-packaged Apache Commons DBCP 1-->
91 +- <jarIt jarfile="${tomcat-dbcp.jar}"
92 ++<!-- <jarIt jarfile="${tomcat-dbcp.jar}"
93 + filesDir="${tomcat.classes}"
94 +- filesId="files.tomcat-dbcp" />
95 ++ filesId="files.tomcat-dbcp" /> -->
96 +
97 + <!-- i18n JARs -->
98 + <jar jarfile="${tomcat.build}/lib/tomcat-i18n-es.jar"
99 +@@ -1022,9 +1030,9 @@
100 +
101 + <target name="deploy" depends="package,build-docs,compile-webapp-examples"
102 + description="Default. Builds a working Tomcat instance">
103 +-
104 ++<!--
105 + <copy tofile="${tomcat.build}/bin/commons-daemon.jar" file="${commons-daemon.jar}" />
106 +-
107 ++-->
108 + <!-- Copy scripts -->
109 + <copy todir="${tomcat.build}/bin">
110 + <fileset dir="bin">
111 +@@ -1083,7 +1091,7 @@
112 + <exclude name="${jdt.jar.filename}"/>
113 + </fileset>
114 + </delete>
115 +- <copy file="${jdt.jar}" todir="${tomcat.build}/lib"/>
116 ++<!-- <copy file="${jdt.jar}" todir="${tomcat.build}/lib"/> -->
117 +
118 + <!-- Add sources for examples -->
119 + <antcall target="examples-sources" />
120 +@@ -1728,7 +1736,7 @@
121 +
122 + <target name="extras-webservices-prepare"
123 + depends="extras-prepare"
124 +- description="Prepare to build web services extras package">
125 ++ description="Prepare to build web services extras package" unless="noget">
126 +
127 + <antcall target="downloadfile">
128 + <param name="sourcefile" value="${jaxrpc-lib.loc}"/>
129 +@@ -1925,11 +1933,12 @@
130 + </copy>
131 +
132 + <!-- Source bundles for native components -->
133 ++<!--
134 + <copy tofile="${tomcat.dist}/bin/tomcat-native.tar.gz"
135 + file="${tomcat-native.tar.gz}" />
136 + <copy tofile="${tomcat.dist}/bin/commons-daemon-native.tar.gz"
137 + file="${commons-daemon.native.src.tgz}" />
138 +-
139 ++-->
140 + <!-- platform README files -->
141 + <echo append="false" file="${tomcat.dist}/bin/x64/README">
142 + Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
143 +@@ -1941,6 +1950,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
144 + description="Create the Tomcat javadoc" >
145 + <fail unless="java.7.home"
146 + message="The java.7.home property must be set for javadoc build"/>
147 ++<!--
148 + <javadoc packagenames="javax.servlet.*"
149 + excludepackagenames="javax.servlet.jsp.*"
150 + sourcepath="${tomcat.dist}/src/java"
151 +@@ -2005,6 +2015,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
152 + <path location="${ant.core.lib}"/>
153 + </classpath>
154 + </javadoc>
155 ++-->
156 + <javadoc packagenames="javax.websocket.*"
157 + sourcepath="${tomcat.dist}/src/java"
158 + destdir="${tomcat.dist}/webapps/docs/websocketapi"
159 +@@ -2045,9 +2056,11 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
160 + <path refid="tomcat.webservices.classpath"/>
161 + <path location="${ant.core.lib}"/>
162 + </classpath>
163 ++<!--
164 + <link href="../servletapi"/>
165 + <link href="../jspapi"/>
166 + <link href="../elapi"/>
167 ++-->
168 + <link href="../websocketapi"/>
169 + <link href="http://docs.oracle.com/javase/7/docs/api/"/>
170 + <link href="http://commons.apache.org/proper/commons-io/javadocs/api-release/"/>
171 +@@ -2658,7 +2671,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
172 + </target>
173 +
174 + <target name="download-compile"
175 +- description="Download components necessary to compile" >
176 ++ description="Download components necessary to compile" unless="noget" >
177 +
178 + <!-- Download Commons Daemon -->
179 + <antcall target="downloadgz-2">
180 +@@ -2683,7 +2696,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
181 + </target>
182 +
183 + <target name="download-test-compile"
184 +- description="Download additional components for the tests" >
185 ++ description="Download additional components for the tests" unless="noget">
186 +
187 + <antcall target="downloadfile">
188 + <param name="sourcefile" value="${junit.loc}"/>
189 +@@ -2747,7 +2760,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
190 + </target>
191 +
192 + <target name="download-dist"
193 +- description="Download additional components for a distribution" >
194 ++ description="Download additional components for a distribution" unless="noget">
195 +
196 + <antcall target="downloadfile-2">
197 + <param name="sourcefile.1" value="${tomcat-native.loc.1}"/>
198
199 diff --git a/www-servers/tomcat/tomcat-7.0.94.ebuild b/www-servers/tomcat/tomcat-7.0.94.ebuild
200 new file mode 100644
201 index 00000000000..b94ae21e1ef
202 --- /dev/null
203 +++ b/www-servers/tomcat/tomcat-7.0.94.ebuild
204 @@ -0,0 +1,147 @@
205 +# Copyright 1999-2019 Gentoo Authors
206 +# Distributed under the terms of the GNU General Public License v2
207 +
208 +EAPI=6
209 +
210 +JAVA_PKG_IUSE="doc source test"
211 +
212 +inherit eutils java-pkg-2 java-ant-2 prefix user
213 +
214 +MY_P="apache-${P}-src"
215 +
216 +DESCRIPTION="Tomcat Servlet-3.0/JSP-2.2 Container"
217 +HOMEPAGE="https://tomcat.apache.org/"
218 +SRC_URI="mirror://apache/${PN}/tomcat-7/v${PV}/src/${MY_P}.tar.gz"
219 +
220 +LICENSE="Apache-2.0"
221 +SLOT="7"
222 +KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-solaris"
223 +IUSE="extra-webapps websockets"
224 +
225 +RESTRICT="test" # can we run them on a production system?
226 +
227 +ECJ_SLOT="4.5"
228 +SAPI_SLOT="3.0"
229 +
230 +COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT}
231 + dev-java/tomcat-servlet-api:${SAPI_SLOT}"
232 +RDEPEND="${COMMON_DEP}
233 + virtual/jre
234 + !<dev-java/tomcat-native-1.1.24"
235 +DEPEND="${COMMON_DEP}
236 + virtual/jdk:1.8
237 + test? ( dev-java/ant-junit:0 )"
238 +
239 +S=${WORKDIR}/${MY_P}
240 +
241 +pkg_setup() {
242 + java-pkg-2_pkg_setup
243 + enewgroup tomcat 265
244 + enewuser tomcat 265 -1 /dev/null tomcat
245 +}
246 +
247 +src_prepare() {
248 + default
249 +
250 + # Remove bundled servlet-api
251 + rm -rv java/javax/{el,servlet} || die
252 +
253 + java-pkg_clean
254 +
255 + eapply "${FILESDIR}/${P}-build.xml.patch"
256 +
257 + # For use of catalina.sh in netbeans
258 + sed -i -e "/^# ----- Execute The Requested Command/ a\
259 + CLASSPATH=\`java-config --classpath ${PN}-${SLOT}\`" \
260 + bin/catalina.sh || die
261 +
262 + java-pkg-2_src_prepare
263 +}
264 +
265 +JAVA_ANT_REWRITE_CLASSPATH="true"
266 +
267 +EANT_BUILD_TARGET="deploy"
268 +EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT},tomcat-servlet-api-${SAPI_SLOT}"
269 +EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes"
270 +EANT_NEEDS_TOOLS="true"
271 +EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false"
272 +
273 +# revisions of the scripts
274 +IM_REV="-r1"
275 +INIT_REV="-r1"
276 +
277 +src_compile() {
278 + use websockets && EANT_EXTRA_ARGS+=" -Djava.7.home=${JAVA_HOME}"
279 + EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)"
280 + java-pkg-2_src_compile
281 +}
282 +
283 +src_test() {
284 + java-pkg-2_src_test
285 +}
286 +
287 +src_install() {
288 + local dest="/usr/share/${PN}-${SLOT}"
289 +
290 + java-pkg_jarinto "${dest}"/bin
291 + java-pkg_dojar output/build/bin/*.jar
292 + exeinto "${dest}"/bin
293 + doexe output/build/bin/*.sh
294 +
295 + java-pkg_jarinto "${dest}"/lib
296 + java-pkg_dojar output/build/lib/*.jar
297 +
298 + dodoc RELEASE-NOTES RUNNING.txt
299 + use doc && java-pkg_dojavadoc output/dist/webapps/docs/api
300 + use source && java-pkg_dosrc java/*
301 +
302 + ### Webapps ###
303 +
304 + insinto "${dest}"/webapps
305 + doins -r output/build/webapps/{host-manager,manager,ROOT}
306 + use extra-webapps && doins -r output/build/webapps/{docs,examples}
307 +
308 + ### Config ###
309 +
310 + # create "logs" directory in $CATALINA_BASE
311 + # and set correct perms, see #458890
312 + dodir "${dest}"/logs
313 + fperms 0750 "${dest}"/logs
314 +
315 + # replace the default pw with a random one, see #92281
316 + local randpw=$(echo ${RANDOM}|md5sum|cut -c 1-15)
317 + sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die
318 +
319 + # prepend gentoo.classpath to common.loader, see #453212
320 + sed -i -e 's/^common\.loader=/\0${gentoo.classpath},/' output/build/conf/catalina.properties || die
321 +
322 + insinto "${dest}"
323 + doins -r output/build/conf
324 +
325 + ### rc ###
326 +
327 + cp "${FILESDIR}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} "${T}" || die
328 + eprefixify "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash}
329 + sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} || die
330 +
331 + insinto "${dest}"/gentoo
332 + doins "${T}"/tomcat.conf
333 + exeinto "${dest}"/gentoo
334 + newexe "${T}"/tomcat${INIT_REV}.init tomcat.init
335 + newexe "${T}"/tomcat-instance-manager${IM_REV}.bash tomcat-instance-manager.bash
336 +}
337 +
338 +pkg_postinst() {
339 + elog "New ebuilds of Tomcat support running multiple instances. If you used prior version"
340 + elog "of Tomcat (<7.0.32), you have to migrate your existing instance to work with new Tomcat."
341 + elog "You can find more information at https://wiki.gentoo.org/wiki/Apache_Tomcat"
342 +
343 + elog "To manage Tomcat instances, run:"
344 + elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help"
345 +
346 + ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar"
347 + ewarn "from upstream binary if you need it. Gentoo Bug # 144276"
348 +
349 + einfo "Please read https://wiki.gentoo.org/wiki/Apache_Tomcat and"
350 + einfo "https://wiki.gentoo.org/wiki/Project:Java/Tomcat_6_Guide for more information."
351 +}