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/
Date: Fri, 28 Feb 2020 16:13:27
Message-Id: 1582906390.44c7742044198a985fc81163b590ce0ca15e2bdf.fordfrog@gentoo
1 commit: 44c7742044198a985fc81163b590ce0ca15e2bdf
2 Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
3 AuthorDate: Fri Feb 28 16:12:48 2020 +0000
4 Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
5 CommitDate: Fri Feb 28 16:13:10 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44c77420
7
8 www-servers/tomcat: removed old vulnerable
9
10 Bug: https://bugs.gentoo.org/710656
11 Package-Manager: Portage-2.3.89, Repoman-2.3.20
12 Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>
13
14 www-servers/tomcat/Manifest | 2 -
15 www-servers/tomcat/tomcat-7.0.96.ebuild | 146 -----------------------------
16 www-servers/tomcat/tomcat-8.5.47.ebuild | 158 --------------------------------
17 3 files changed, 306 deletions(-)
18
19 diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest
20 index adf4e36cc3a..e1398f24081 100644
21 --- a/www-servers/tomcat/Manifest
22 +++ b/www-servers/tomcat/Manifest
23 @@ -1,6 +1,4 @@
24 DIST apache-tomcat-7.0.100-src.tar.gz 5265444 BLAKE2B 9c706e6a50e13cd8f542669e2d80f8940816976cfb84f62c3e17bbe6f0cc6d76d6fcdd18ec69e706ce27552aa66041833f6ae7bba8e671e187de3246e90a25c5 SHA512 53ef64c64263d0f25d72ed179bd7b7beed3f73cd63010988ba740ff7328b00a5ec09fe1d4575188ecacf258c891e022a0f1ae07d2957d9830a56881170bb1a57
25 -DIST apache-tomcat-7.0.96-src.tar.gz 4983881 BLAKE2B d5b828b7a4e8a7a5ce793a15421fbd6b12b55918aa7c15bc8209b4c762d7f422a7315e4cbe9b4ae2da754b6d8493bc11ae6a5c99f11a1ac3b23473e05fa26c83 SHA512 5797e66fb9ce558340e08d3a4ccd372d912707aabd6177318781925dd35055902a0ecc3e50e677d76b0feea547cc8fc038bb83ae5de65d28680cb4c9582f60c0
26 -DIST apache-tomcat-8.5.47-src.tar.gz 5607118 BLAKE2B 3c326056f674032424d298c7581243a24dd01fae39b1ce7069b60e1bcf3d825de954164f643e887618c43c87d691bc41f942e73bf86b254b4c7dca9c68ce7cce SHA512 1513fdaf7751ee263d878cdfc05329bc4ee50e2f3aeea68e1d173a5f4d555ec59a43050222f013758f704967730dd25a64337cf1ba4365ab53b8730af87b4051
27 DIST apache-tomcat-8.5.51-src.tar.gz 5661227 BLAKE2B 711de5678903941a5261693972906f2d0fca2c9d3219e62d3186e5d71a2e3cb4da0a5028e62790a26dad2d244246c2f41c74f18e17d52ec0af070f0d5842ca3f SHA512 8529d2e7d83a863fe88ed4ee8ec29b673e5df4bea53231412c0d89e2384d3939b9d1f29350a4ca46966ab5d4a0d3178ed5d2caa50aa766092a3ab8f28dd27592
28 DIST apache-tomcat-9.0.31-src.tar.gz 5812430 BLAKE2B 7ef0f989860b046b4ddbacde50013284a623eb9d81e2c3465b0e04ec9c934a5319293677919ab758243a352fc60cb6691b51f946d8c5a36360b9108dafc5dfe3 SHA512 a0ba9e46a3d2a4cf708e6e29b4647c041495e45865ce5c679c9dcfee77181373a2d3034222701d0f15d5c7e71e6aa3cc7db236c66ba069b3e3660a948b44342f
29 DIST biz.aQute.bnd-4.1.0.jar 9263260 BLAKE2B e251a9d8b653f3e815e6c2f7774d64f1d594f3ce4b2f77956c806698df4d873310067cece68663324b11fcef8d90796b087abb289dbe2a13164a9038da4a6260 SHA512 f5d230358840f4909e35de40343fb7ee50a2d4d4691691f5ea896cfe212a086ad4859e0ee6ed4c315211223663b2fb2c07af7ea88786cedbcd4f891e5a4589ef
30
31 diff --git a/www-servers/tomcat/tomcat-7.0.96.ebuild b/www-servers/tomcat/tomcat-7.0.96.ebuild
32 deleted file mode 100644
33 index ad19069fd89..00000000000
34 --- a/www-servers/tomcat/tomcat-7.0.96.ebuild
35 +++ /dev/null
36 @@ -1,146 +0,0 @@
37 -# Copyright 1999-2020 Gentoo Authors
38 -# Distributed under the terms of the GNU General Public License v2
39 -
40 -EAPI=6
41 -
42 -JAVA_PKG_IUSE="doc source test"
43 -
44 -inherit eutils java-pkg-2 java-ant-2 prefix user
45 -
46 -MY_P="apache-${P}-src"
47 -
48 -DESCRIPTION="Tomcat Servlet-3.0/JSP-2.2 Container"
49 -HOMEPAGE="https://tomcat.apache.org/"
50 -SRC_URI="mirror://apache/${PN}/tomcat-7/v${PV}/src/${MY_P}.tar.gz"
51 -
52 -LICENSE="Apache-2.0"
53 -SLOT="7"
54 -KEYWORDS="amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-solaris"
55 -IUSE="extra-webapps websockets"
56 -
57 -RESTRICT="test" # can we run them on a production system?
58 -
59 -ECJ_SLOT="4.5"
60 -SAPI_SLOT="3.0"
61 -
62 -COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT}
63 - ~dev-java/tomcat-servlet-api-${PV}"
64 -RDEPEND="${COMMON_DEP}
65 - virtual/jre"
66 -DEPEND="${COMMON_DEP}
67 - virtual/jdk:1.8
68 - test? ( dev-java/ant-junit:0 )"
69 -
70 -S=${WORKDIR}/${MY_P}
71 -
72 -pkg_setup() {
73 - java-pkg-2_pkg_setup
74 - enewgroup tomcat 265
75 - enewuser tomcat 265 -1 /dev/null tomcat
76 -}
77 -
78 -src_prepare() {
79 - default
80 -
81 - # Remove bundled servlet-api
82 - rm -rv java/javax/{el,servlet} || die
83 -
84 - java-pkg_clean
85 -
86 - eapply "${FILESDIR}/${PN}-7.0.94-build.xml.patch"
87 -
88 - # For use of catalina.sh in netbeans
89 - sed -i -e "/^# ----- Execute The Requested Command/ a\
90 - CLASSPATH=\`java-config --classpath ${PN}-${SLOT}\`" \
91 - bin/catalina.sh || die
92 -
93 - java-pkg-2_src_prepare
94 -}
95 -
96 -JAVA_ANT_REWRITE_CLASSPATH="true"
97 -
98 -EANT_BUILD_TARGET="deploy"
99 -EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT},tomcat-servlet-api-${SAPI_SLOT}"
100 -EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes"
101 -EANT_NEEDS_TOOLS="true"
102 -EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false"
103 -
104 -# revisions of the scripts
105 -IM_REV="-r1"
106 -INIT_REV="-r1"
107 -
108 -src_compile() {
109 - use websockets && EANT_EXTRA_ARGS+=" -Djava.7.home=${JAVA_HOME}"
110 - EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)"
111 - java-pkg-2_src_compile
112 -}
113 -
114 -src_test() {
115 - java-pkg-2_src_test
116 -}
117 -
118 -src_install() {
119 - local dest="/usr/share/${PN}-${SLOT}"
120 -
121 - java-pkg_jarinto "${dest}"/bin
122 - java-pkg_dojar output/build/bin/*.jar
123 - exeinto "${dest}"/bin
124 - doexe output/build/bin/*.sh
125 -
126 - java-pkg_jarinto "${dest}"/lib
127 - java-pkg_dojar output/build/lib/*.jar
128 -
129 - dodoc RELEASE-NOTES RUNNING.txt
130 - use doc && java-pkg_dojavadoc output/dist/webapps/docs/api
131 - use source && java-pkg_dosrc java/*
132 -
133 - ### Webapps ###
134 -
135 - insinto "${dest}"/webapps
136 - doins -r output/build/webapps/{host-manager,manager,ROOT}
137 - use extra-webapps && doins -r output/build/webapps/{docs,examples}
138 -
139 - ### Config ###
140 -
141 - # create "logs" directory in $CATALINA_BASE
142 - # and set correct perms, see #458890
143 - dodir "${dest}"/logs
144 - fperms 0750 "${dest}"/logs
145 -
146 - # replace the default pw with a random one, see #92281
147 - local randpw=$(echo ${RANDOM}|md5sum|cut -c 1-15)
148 - sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die
149 -
150 - # prepend gentoo.classpath to common.loader, see #453212
151 - sed -i -e 's/^common\.loader=/\0${gentoo.classpath},/' output/build/conf/catalina.properties || die
152 -
153 - insinto "${dest}"
154 - doins -r output/build/conf
155 -
156 - ### rc ###
157 -
158 - cp "${FILESDIR}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} "${T}" || die
159 - eprefixify "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash}
160 - sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} || die
161 -
162 - insinto "${dest}"/gentoo
163 - doins "${T}"/tomcat.conf
164 - exeinto "${dest}"/gentoo
165 - newexe "${T}"/tomcat${INIT_REV}.init tomcat.init
166 - newexe "${T}"/tomcat-instance-manager${IM_REV}.bash tomcat-instance-manager.bash
167 -}
168 -
169 -pkg_postinst() {
170 - elog "New ebuilds of Tomcat support running multiple instances. If you used prior version"
171 - elog "of Tomcat (<7.0.32), you have to migrate your existing instance to work with new Tomcat."
172 - elog "You can find more information at https://wiki.gentoo.org/wiki/Apache_Tomcat"
173 -
174 - elog "To manage Tomcat instances, run:"
175 - elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help"
176 -
177 - ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar"
178 - ewarn "from upstream binary if you need it. Gentoo Bug # 144276"
179 -
180 - einfo "Please read https://wiki.gentoo.org/wiki/Apache_Tomcat and"
181 - einfo "https://wiki.gentoo.org/wiki/Project:Java/Tomcat_6_Guide for more information."
182 -}
183
184 diff --git a/www-servers/tomcat/tomcat-8.5.47.ebuild b/www-servers/tomcat/tomcat-8.5.47.ebuild
185 deleted file mode 100644
186 index 729cd12dcdf..00000000000
187 --- a/www-servers/tomcat/tomcat-8.5.47.ebuild
188 +++ /dev/null
189 @@ -1,158 +0,0 @@
190 -# Copyright 1999-2020 Gentoo Authors
191 -# Distributed under the terms of the GNU General Public License v2
192 -
193 -EAPI=7
194 -
195 -JAVA_PKG_IUSE="doc source test"
196 -
197 -inherit eutils java-pkg-2 java-ant-2 prefix user
198 -
199 -MY_P="apache-${P}-src"
200 -
201 -DESCRIPTION="Tomcat Servlet-3.1/JSP-2.3/EL-3.0/WebSocket-1.1/JASPIC-1.1 Container"
202 -HOMEPAGE="https://tomcat.apache.org/"
203 -SRC_URI="mirror://apache/${PN}/tomcat-8/v${PV}/src/${MY_P}.tar.gz"
204 -
205 -LICENSE="Apache-2.0"
206 -SLOT="8.5"
207 -KEYWORDS="amd64 ~x86 ~amd64-linux ~x86-linux ~x86-solaris"
208 -IUSE="extra-webapps"
209 -
210 -RESTRICT="test" # can we run them on a production system?
211 -
212 -ECJ_SLOT="4.5"
213 -SAPI_SLOT="3.1"
214 -
215 -COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT}
216 - ~dev-java/tomcat-servlet-api-${PV}"
217 -RDEPEND="${COMMON_DEP}
218 - >=virtual/jre-1.8"
219 -DEPEND="${COMMON_DEP}
220 - app-admin/pwgen
221 - >=dev-java/ant-core-1.9.13
222 - >=virtual/jdk-1.8
223 - test? (
224 - >=dev-java/ant-junit-1.9:0
225 - dev-java/easymock:3.2
226 - )"
227 -
228 -S=${WORKDIR}/${MY_P}
229 -
230 -pkg_setup() {
231 - java-pkg-2_pkg_setup
232 - enewgroup tomcat 265
233 - enewuser tomcat 265 -1 /dev/null tomcat
234 -}
235 -
236 -src_prepare() {
237 - default
238 -
239 - find -name '*.jar' -type f -delete -print || die
240 -
241 - # Remove bundled servlet-api
242 - rm -rv java/javax/{el,servlet} || die
243 -
244 - eapply "${FILESDIR}/${P}-build.xml.patch"
245 -
246 - # For use of catalina.sh in netbeans
247 - sed -i -e "/^# ----- Execute The Requested Command/ a\
248 - CLASSPATH=\`java-config --classpath ${PN}-${SLOT}\`" \
249 - bin/catalina.sh || die
250 -
251 - java-pkg-2_src_prepare
252 -}
253 -
254 -JAVA_ANT_REWRITE_CLASSPATH="true"
255 -
256 -EANT_BUILD_TARGET="deploy"
257 -EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT},tomcat-servlet-api-${SAPI_SLOT}"
258 -EANT_TEST_GENTOO_CLASSPATH="easymock-3.2"
259 -EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes"
260 -EANT_NEEDS_TOOLS="true"
261 -EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false -Dexecute.validate=false"
262 -
263 -# revisions of the scripts
264 -IM_REV="-r2"
265 -INIT_REV="-r1"
266 -
267 -src_compile() {
268 - EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)"
269 - java-pkg-2_src_compile
270 -}
271 -
272 -src_test() {
273 - java-pkg-2_src_test
274 -}
275 -
276 -src_install() {
277 - local dest="/usr/share/${PN}-${SLOT}"
278 -
279 - java-pkg_jarinto "${dest}"/bin
280 - java-pkg_dojar output/build/bin/*.jar
281 - exeinto "${dest}"/bin
282 - doexe output/build/bin/*.sh
283 -
284 - java-pkg_jarinto "${dest}"/lib
285 - java-pkg_dojar output/build/lib/*.jar
286 -
287 - dodoc RELEASE-NOTES RUNNING.txt
288 - use doc && java-pkg_dojavadoc output/dist/webapps/docs/api
289 - use source && java-pkg_dosrc java/*
290 -
291 - ### Webapps ###
292 -
293 - # add missing docBase
294 - local apps="host-manager manager"
295 - for app in ${apps}; do
296 - sed -i -e "s|=\"true\" >|=\"true\" docBase=\"\$\{catalina.home\}/webapps/${app}\" >|" \
297 - output/build/webapps/${app}/META-INF/context.xml || die
298 - done
299 -
300 - insinto "${dest}"/webapps
301 - doins -r output/build/webapps/{host-manager,manager,ROOT}
302 - use extra-webapps && doins -r output/build/webapps/{docs,examples}
303 -
304 - ### Config ###
305 -
306 - # create "logs" directory in $CATALINA_BASE
307 - # and set correct perms, see #458890
308 - dodir "${dest}"/logs
309 - fperms 0750 "${dest}"/logs
310 -
311 - # replace the default pw with a random one, see #92281
312 - local randpw="$(pwgen -s -B 15 1)"
313 - sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die
314 -
315 - # prepend gentoo.classpath to common.loader, see #453212
316 - sed -i -e 's/^common\.loader=/\0${gentoo.classpath},/' output/build/conf/catalina.properties || die
317 -
318 - insinto "${dest}"
319 - doins -r output/build/conf
320 -
321 - ### rc ###
322 -
323 - cp "${FILESDIR}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} "${T}" || die
324 - eprefixify "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash}
325 - sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} || die
326 -
327 - insinto "${dest}"/gentoo
328 - doins "${T}"/tomcat.conf
329 - exeinto "${dest}"/gentoo
330 - newexe "${T}"/tomcat${INIT_REV}.init tomcat.init
331 - newexe "${T}"/tomcat-instance-manager${IM_REV}.bash tomcat-instance-manager.bash
332 -}
333 -
334 -pkg_postinst() {
335 - elog "New ebuilds of Tomcat support running multiple instances. If you used prior version"
336 - elog "of Tomcat (<7.0.32), you have to migrate your existing instance to work with new Tomcat."
337 - elog "You can find more information at https://wiki.gentoo.org/wiki/Apache_Tomcat"
338 -
339 - elog "To manage Tomcat instances, run:"
340 - elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help"
341 -
342 - ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar"
343 - ewarn "from upstream binary if you need it. Gentoo Bug # 144276"
344 -
345 - einfo "Please read https://wiki.gentoo.org/wiki/Apache_Tomcat and"
346 - einfo "https://wiki.gentoo.org/wiki/Project:Java/Tomcat_6_Guide for more information."
347 -}