1 |
commit: 61897263c220dcfc25f3a7414f37146a6f5e4f9f |
2 |
Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jul 12 14:03:12 2021 +0000 |
4 |
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jul 12 14:03:30 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61897263 |
7 |
|
8 |
www-servers/tomcat: removed 10.0.6 & 9.0.46 - security issues |
9 |
|
10 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
11 |
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org> |
12 |
|
13 |
www-servers/tomcat/Manifest | 2 - |
14 |
www-servers/tomcat/tomcat-10.0.6.ebuild | 192 -------------------------------- |
15 |
www-servers/tomcat/tomcat-9.0.46.ebuild | 187 ------------------------------- |
16 |
3 files changed, 381 deletions(-) |
17 |
|
18 |
diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest |
19 |
index 3888da8d7ca..2f36da9c154 100644 |
20 |
--- a/www-servers/tomcat/Manifest |
21 |
+++ b/www-servers/tomcat/Manifest |
22 |
@@ -1,11 +1,9 @@ |
23 |
-DIST apache-tomcat-10.0.6-src.tar.gz 5987333 BLAKE2B b955d3708555c5530ebccaf9c6e8c344a679666bdd45361980d722d2cb48b618a03dc2514f973c182c2c1eaf96852e5a5eadad89575ee1bf524213211191a6a4 SHA512 229e8767b8f53f6b5c0e28f13a1daffd6fb8307a5239ae28ee1522087d881e4c9e3f1a0d39bfc852d5e54166dbb8a0a1577210a325845815c7281c4babc0b100 |
24 |
DIST apache-tomcat-10.0.7-src.tar.gz 6001147 BLAKE2B f1aee4748d404d02188369603824dcc97765e907cfc3872f54b1859ae950a9475d72862caa2179ac39e4cbdb8c23424f89c4cbbfff8a2e079a842b0054257009 SHA512 395b0280666c6779f6378cb87e9abdb637a823e7f89452b7324329f4c0a1fe0b315275dca5df2f80a38c6f1ef98541bd1ea762df7af9cb15e4466c3b89e4e7a8 |
25 |
DIST apache-tomcat-10.0.8-src.tar.gz 6010420 BLAKE2B 86390f04147d3082fbc9f15704121cbd6aa8ba756b4bc03e64a49aae3dca96c6b503949da0096f8ddf143bdeb1320b7601008683ce94bdad9ef235e1f73ad948 SHA512 c264be4cb29d87c95918d2723ab20bc7e2cb5149cb366cca348c6cd311b0f38ac500ed6b4756b20245a446ead50e7208f77093d6081563ed76d6691abfcbe14c |
26 |
DIST apache-tomcat-7.0.109-src.tar.gz 5314401 BLAKE2B 56583caea6879bf8ca5cc02a886de3d7af413032f88d367653e709dc1c8f590e78620c788317bbff4b6e65dd3e242cc26863164ac8e7c87334a22636f3ed0703 SHA512 ecf9c0bee0e3e1aa24f299fe633705c5a2f6aa264d9e4968cfc96aa5d0a425c2b0ff07765a8b6c67221766733bdfaed6e6c6377a8d0870d889e7063ce90a46ce |
27 |
DIST apache-tomcat-8.5.66-src.tar.gz 5879748 BLAKE2B bfef20872bd19ffa2bb34b98a1da875fdd5f232e681458f0aef093b7eecd63a95c1cd26130f54251f149249e639d0da2577770e43314d2a86b8ee9b48b675f0d SHA512 322fda683197898f873feb375791092d33c90aac08a54889fabab0f59ecbc7b27784f027b37008c6893fdbf8ca7973b73268f42673d7e8df762419b5a536593b |
28 |
DIST apache-tomcat-8.5.68-src.tar.gz 5907026 BLAKE2B 2312edb94f98ee98b594325fbc32521776e9cadc4422a3a46f3651f1fee072a99c5f6874378ac06215396504d34ad750edd6ec3399a3931554068195a8ee15ef SHA512 579a35f944ead756995d288b66ea8a4ab30289a90c32aa01119abcea85a8524f6594ce5cb7ac9df6d352c1e3b54a18c814b5d3a6409dce6a43614e3a89284066 |
29 |
DIST apache-tomcat-8.5.69-src.tar.gz 5916996 BLAKE2B 4a3ef958b6bb0089149877c25baaa2c1a0bcee473c0942b419c5c1d7071dcae4f8a6e6f1805efdee1201042feedc64e213fffbcdb35cf2b7f9a67217b8dcad48 SHA512 467dd38bd77d8b5ac6fa2acf9f6ee71d04467a3182647757fa47f5d1d9576c96e5061db61ba08b04318f1db9ee4f2bcac7b45f1f9f4f81cd1807a57483dd7bbb |
30 |
-DIST apache-tomcat-9.0.46-src.tar.gz 6068533 BLAKE2B 400814281aedd588c008a1363199f8602e856870d4c39d536b13f8a357c2390d2db689940f4a6971ec74a84e8e400174e72610e0d64a220de41f2dff419dda3c SHA512 dc380e23aa87273c6ba32e79659e768c551b07812635c2f1c62d2c34b493b1d3d51b4548fec5014fdb36f8461fc90942aa7917874ddf3d6f5c5345d8ca02dfc1 |
31 |
DIST apache-tomcat-9.0.48-src.tar.gz 6080015 BLAKE2B 9b2cac8143ca8186857d7d53e8737f2f7d2ec8e0ca03d32447ad25b429cbf37c1c7b39bc6e4b93679c08bd5f4940280d00946a70e9fa82f8c2a596ea18a2a4c6 SHA512 9b762f6d1a1f6c75e10f1bc05c39a647ae2165f3b81c09ff73cc286f3c487b034b9d14c73b808c73b35f55f642848831a0329d9d611c8bbb3928559e552a3ff3 |
32 |
DIST apache-tomcat-9.0.50-src.tar.gz 6086608 BLAKE2B 59b5eb1616d377193f330fd8c5abb6e98926ab0a2f75b1ea14251d249837aad733f55a0b79f2a67de57f612dd1afdeae53836be97e81701d8dc27ecb0a381d4a SHA512 1032d2d5c342fb495b76426fdc301e0e5546815e709e604061d7aa2cdab19bcd376adc957fd25dee1d574306186eafd2e9d24140dd5e725b130128592cac47a2 |
33 |
DIST biz.aQute.bnd-5.1.1.jar 16088761 BLAKE2B 59906cc39ea27ef20cbf82de1ba78096f34dc417da6dc5c28e21f6e92c0625efecf14cec6c5faf0ab17551c31a6c87a24614c2ac75ac902cfea30199ecc0d39f SHA512 8092b083e7b86e75bf27233964763b88bee74d8ae141c85e387c1cc8bd0cbf3a54be27afea29931fb3ae950700a515fd4a28cfe8e7f26cbaaec506aa06357a37 |
34 |
|
35 |
diff --git a/www-servers/tomcat/tomcat-10.0.6.ebuild b/www-servers/tomcat/tomcat-10.0.6.ebuild |
36 |
deleted file mode 100644 |
37 |
index d66b5ff3679..00000000000 |
38 |
--- a/www-servers/tomcat/tomcat-10.0.6.ebuild |
39 |
+++ /dev/null |
40 |
@@ -1,192 +0,0 @@ |
41 |
-# Copyright 1999-2021 Gentoo Authors |
42 |
-# Distributed under the terms of the GNU General Public License v2 |
43 |
- |
44 |
-EAPI=7 |
45 |
- |
46 |
-JAVA_PKG_IUSE="doc source test" |
47 |
- |
48 |
-inherit java-pkg-2 java-ant-2 prefix |
49 |
- |
50 |
-MY_P="apache-${PN}-${PV}-src" |
51 |
- |
52 |
-# Currently we bundle binary versions of bnd.jar and bndlib.jar |
53 |
-# See bugs #203080 and #676116 |
54 |
-BND_VERSION="5.1.1" |
55 |
-BND="biz.aQute.bnd-${BND_VERSION}.jar" |
56 |
-BNDLIB="biz.aQute.bndlib-${BND_VERSION}.jar" |
57 |
- |
58 |
-DESCRIPTION="Tomcat Servlet-5.0/JSP-3.0/EL-4.0/WebSocket-2.0/JASIC-2.0 Container" |
59 |
-HOMEPAGE="https://tomcat.apache.org/" |
60 |
-SRC_URI="mirror://apache/${PN}/tomcat-9/v${PV}/src/${MY_P}.tar.gz |
61 |
- https://repo.maven.apache.org/maven2/biz/aQute/bnd/biz.aQute.bnd/${BND_VERSION}/${BND} |
62 |
- https://repo.maven.apache.org/maven2/biz/aQute/bnd/biz.aQute.bndlib/${BND_VERSION}/${BNDLIB}" |
63 |
- |
64 |
-LICENSE="Apache-2.0" |
65 |
-SLOT="10" |
66 |
-KEYWORDS="~amd64 ~amd64-linux" |
67 |
-IUSE="extra-webapps" |
68 |
- |
69 |
-RESTRICT="test" # can we run them on a production system? |
70 |
- |
71 |
-ECJ_SLOT="4.15" |
72 |
-SAPI_SLOT="5.0" |
73 |
- |
74 |
-COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT} |
75 |
- dev-java/glassfish-xmlrpc-api:0 |
76 |
- dev-java/jakartaee-migration:0 |
77 |
- ~dev-java/tomcat-servlet-api-${PV}:${SAPI_SLOT} |
78 |
- dev-java/wsdl4j:0" |
79 |
-RDEPEND="${COMMON_DEP} |
80 |
- acct-group/tomcat |
81 |
- acct-user/tomcat |
82 |
- virtual/jre" |
83 |
-DEPEND="${COMMON_DEP} |
84 |
- app-admin/pwgen |
85 |
- dev-java/ant-core |
86 |
- virtual/jdk:1.8 |
87 |
- test? ( |
88 |
- dev-java/ant-junit:0 |
89 |
- dev-java/easymock:3.2 |
90 |
- )" |
91 |
- |
92 |
-S=${WORKDIR}/${MY_P} |
93 |
- |
94 |
-PATCHES=( |
95 |
- "${FILESDIR}/${PN}-9.0.43-insufficient-ecj.patch" |
96 |
-) |
97 |
- |
98 |
-BND_HOME="${S}/tomcat-build-libs/bnd" |
99 |
-BNDLIB_HOME="${S}/tomcat-build-libs/bndlib" |
100 |
-BND_JAR="${BND_HOME}/${BND}" |
101 |
-BNDLIB_JAR="${BNDLIB_HOME}/${BND_LIB}" |
102 |
- |
103 |
-src_unpack() { |
104 |
- unpack ${MY_P}.tar.gz |
105 |
- |
106 |
- mkdir -p "${BND_HOME}" "${BNDLIB_HOME}" || die "Failed to create dir" |
107 |
- ln -s "${DISTDIR}/${BND}" "${BND_HOME}/" || die "Failed to symlink bnd-*.jar" |
108 |
- ln -s "${DISTDIR}/${BND}" "${BNDLIB_HOME}/" || die "Failed to symlink bndlib-*.jar" |
109 |
-} |
110 |
- |
111 |
-src_prepare() { |
112 |
- default |
113 |
- |
114 |
- find -name '*.jar' -type f -delete -print || die |
115 |
- |
116 |
- # Remove bundled servlet-api |
117 |
- rm -rv java/jakarta/{el,servlet} || die |
118 |
- |
119 |
- eapply "${FILESDIR}/${PN}-10.0.4-build.xml.patch" |
120 |
- |
121 |
- # For use of catalina.sh in netbeans |
122 |
- sed -i -e "/^# ----- Execute The Requested Command/ a\ |
123 |
- CLASSPATH=\`java-config --with-dependencies --classpath ${PN}-${SLOT}\`" \ |
124 |
- bin/catalina.sh || die |
125 |
- |
126 |
- java-pkg-2_src_prepare |
127 |
-} |
128 |
- |
129 |
-JAVA_ANT_REWRITE_CLASSPATH="true" |
130 |
- |
131 |
-EANT_BUILD_TARGET="deploy" |
132 |
-EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT},jakartaee-migration,tomcat-servlet-api-${SAPI_SLOT},wsdl4j" |
133 |
-EANT_TEST_GENTOO_CLASSPATH="easymock-3.2" |
134 |
-EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes" |
135 |
-EANT_NEEDS_TOOLS="true" |
136 |
-EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false -Dbnd.jar=${BND_JAR} -Dbndlib.jar=${BNDLIB_JAR}" |
137 |
- |
138 |
-# revisions of the scripts |
139 |
-IM_REV="-r2" |
140 |
-INIT_REV="-r1" |
141 |
- |
142 |
-src_configure() { |
143 |
- java-ant-2_src_configure |
144 |
- |
145 |
- eapply "${FILESDIR}/${PN}-9.0.37-fix-build-rewrite.patch" |
146 |
-} |
147 |
- |
148 |
-src_compile() { |
149 |
- EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar):$(java-pkg_getjars --build-only glassfish-xmlrpc-api)" |
150 |
- LC_ALL=C java-pkg-2_src_compile |
151 |
-} |
152 |
- |
153 |
-src_test() { |
154 |
- java-pkg-2_src_test |
155 |
-} |
156 |
- |
157 |
-src_install() { |
158 |
- local dest="/usr/share/${PN}-${SLOT}" |
159 |
- |
160 |
- java-pkg_jarinto "${dest}"/bin |
161 |
- java-pkg_dojar output/build/bin/*.jar |
162 |
- exeinto "${dest}"/bin |
163 |
- doexe output/build/bin/*.sh |
164 |
- |
165 |
- java-pkg_jarinto "${dest}"/lib |
166 |
- java-pkg_dojar output/build/lib/*.jar |
167 |
- |
168 |
- dodoc RELEASE-NOTES RUNNING.txt |
169 |
- use doc && java-pkg_dojavadoc output/dist/webapps/docs/api |
170 |
- use source && java-pkg_dosrc java/* |
171 |
- |
172 |
- ### Webapps ### |
173 |
- |
174 |
- # add missing docBase |
175 |
- local apps="host-manager manager" |
176 |
- for app in ${apps}; do |
177 |
- sed -i -e "s|=\"true\" >|=\"true\" docBase=\"\$\{catalina.home\}/webapps/${app}\" >|" \ |
178 |
- output/build/webapps/${app}/META-INF/context.xml || die |
179 |
- done |
180 |
- |
181 |
- insinto "${dest}"/webapps |
182 |
- doins -r output/build/webapps/{host-manager,manager,ROOT} |
183 |
- use extra-webapps && doins -r output/build/webapps/{docs,examples} |
184 |
- |
185 |
- ### Config ### |
186 |
- |
187 |
- # create "logs" directory in $CATALINA_BASE |
188 |
- # and set correct perms, see #458890 |
189 |
- dodir "${dest}"/logs |
190 |
- fperms 0750 "${dest}"/logs |
191 |
- |
192 |
- # replace the default pw with a random one, see #92281 |
193 |
- local randpw="$(pwgen -s -B 15 1)" |
194 |
- sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die |
195 |
- |
196 |
- # prepend gentoo.classpath to common.loader, see #453212 |
197 |
- sed -i -e 's/^common\.loader=/\0${gentoo.classpath},/' output/build/conf/catalina.properties || die |
198 |
- |
199 |
- insinto "${dest}" |
200 |
- doins -r output/build/conf |
201 |
- |
202 |
- ### rc ### |
203 |
- |
204 |
- cp "${FILESDIR}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} "${T}" || die |
205 |
- eprefixify "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} |
206 |
- sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} || die |
207 |
- |
208 |
- insinto "${dest}"/gentoo |
209 |
- doins "${T}"/tomcat.conf |
210 |
- exeinto "${dest}"/gentoo |
211 |
- newexe "${T}"/tomcat${INIT_REV}.init tomcat.init |
212 |
- newexe "${T}"/tomcat-instance-manager${IM_REV}.bash tomcat-instance-manager.bash |
213 |
-} |
214 |
- |
215 |
-pkg_postinst() { |
216 |
- elog "New ebuilds of Tomcat support running multiple instances. If you used prior version" |
217 |
- elog "of Tomcat (<7.0.32), you have to migrate your existing instance to work with new Tomcat." |
218 |
- elog "You can find more information at https://wiki.gentoo.org/wiki/Apache_Tomcat" |
219 |
- |
220 |
- elog "To manage Tomcat instances, run:" |
221 |
- elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help" |
222 |
- |
223 |
- ewarn "Please note that since version 10 the primary package for all implemented APIs" |
224 |
- ewarn "has changed from javax.* to jakarta.*. This will almost certainly require code" |
225 |
- ewarn "changes to enable applications to migrate from Tomcat 9 and earlier to Tomcat 10 and later." |
226 |
- |
227 |
- ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar" |
228 |
- ewarn "from upstream binary if you need it. Gentoo Bug # 144276" |
229 |
- |
230 |
- einfo "Please read https://wiki.gentoo.org/wiki/Apache_Tomcat and" |
231 |
- einfo "https://wiki.gentoo.org/wiki/Project:Java/Tomcat_6_Guide for more information." |
232 |
-} |
233 |
|
234 |
diff --git a/www-servers/tomcat/tomcat-9.0.46.ebuild b/www-servers/tomcat/tomcat-9.0.46.ebuild |
235 |
deleted file mode 100644 |
236 |
index e39b539c70d..00000000000 |
237 |
--- a/www-servers/tomcat/tomcat-9.0.46.ebuild |
238 |
+++ /dev/null |
239 |
@@ -1,187 +0,0 @@ |
240 |
-# Copyright 1999-2021 Gentoo Authors |
241 |
-# Distributed under the terms of the GNU General Public License v2 |
242 |
- |
243 |
-EAPI=7 |
244 |
- |
245 |
-JAVA_PKG_IUSE="doc source test" |
246 |
- |
247 |
-inherit java-pkg-2 java-ant-2 prefix |
248 |
- |
249 |
-MY_P="apache-${PN}-${PV}-src" |
250 |
- |
251 |
-# Currently we bundle binary versions of bnd.jar and bndlib.jar |
252 |
-# See bugs #203080 and #676116 |
253 |
-BND_VERSION="5.1.1" |
254 |
-BND="biz.aQute.bnd-${BND_VERSION}.jar" |
255 |
-BNDLIB="biz.aQute.bndlib-${BND_VERSION}.jar" |
256 |
- |
257 |
-DESCRIPTION="Tomcat Servlet-4.0/JSP-2.3/EL-3.0/WebSocket-1.1/JASPIC-1.1 Container" |
258 |
-HOMEPAGE="https://tomcat.apache.org/" |
259 |
-SRC_URI="mirror://apache/${PN}/tomcat-9/v${PV}/src/${MY_P}.tar.gz |
260 |
- https://repo.maven.apache.org/maven2/biz/aQute/bnd/biz.aQute.bnd/${BND_VERSION}/${BND} |
261 |
- https://repo.maven.apache.org/maven2/biz/aQute/bnd/biz.aQute.bndlib/${BND_VERSION}/${BNDLIB}" |
262 |
- |
263 |
-LICENSE="Apache-2.0" |
264 |
-SLOT="9" |
265 |
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-solaris" |
266 |
-IUSE="extra-webapps" |
267 |
- |
268 |
-RESTRICT="test" # can we run them on a production system? |
269 |
- |
270 |
-ECJ_SLOT="4.15" |
271 |
-SAPI_SLOT="4.0" |
272 |
- |
273 |
-COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT} |
274 |
- dev-java/glassfish-xmlrpc-api:0 |
275 |
- ~dev-java/tomcat-servlet-api-${PV}:${SAPI_SLOT} |
276 |
- dev-java/wsdl4j:0" |
277 |
-RDEPEND="${COMMON_DEP} |
278 |
- acct-group/tomcat |
279 |
- acct-user/tomcat |
280 |
- virtual/jre" |
281 |
-DEPEND="${COMMON_DEP} |
282 |
- app-admin/pwgen |
283 |
- >=dev-java/ant-core-1.9.13 |
284 |
- virtual/jdk:1.8 |
285 |
- test? ( |
286 |
- >=dev-java/ant-junit-1.9:0 |
287 |
- dev-java/easymock:3.2 |
288 |
- )" |
289 |
- |
290 |
-S=${WORKDIR}/${MY_P} |
291 |
- |
292 |
-PATCHES=( |
293 |
- "${FILESDIR}/${PN}-9.0.43-insufficient-ecj.patch" |
294 |
-) |
295 |
- |
296 |
-BND_HOME="${S}/tomcat-build-libs/bnd" |
297 |
-BNDLIB_HOME="${S}/tomcat-build-libs/bndlib" |
298 |
-BND_JAR="${BND_HOME}/${BND}" |
299 |
-BNDLIB_JAR="${BNDLIB_HOME}/${BND_LIB}" |
300 |
- |
301 |
-src_unpack() { |
302 |
- unpack ${MY_P}.tar.gz |
303 |
- |
304 |
- mkdir -p "${BND_HOME}" "${BNDLIB_HOME}" || die "Failed to create dir" |
305 |
- ln -s "${DISTDIR}/${BND}" "${BND_HOME}/" || die "Failed to symlink bnd-*.jar" |
306 |
- ln -s "${DISTDIR}/${BND}" "${BNDLIB_HOME}/" || die "Failed to symlink bndlib-*.jar" |
307 |
-} |
308 |
- |
309 |
-src_prepare() { |
310 |
- default |
311 |
- |
312 |
- find -name '*.jar' -type f -delete -print || die |
313 |
- |
314 |
- # Remove bundled servlet-api |
315 |
- rm -rv java/javax/{el,servlet} || die |
316 |
- |
317 |
- eapply "${FILESDIR}/${PN}-9.0.46-build.xml.patch" |
318 |
- |
319 |
- # For use of catalina.sh in netbeans |
320 |
- sed -i -e "/^# ----- Execute The Requested Command/ a\ |
321 |
- CLASSPATH=\`java-config --with-dependencies --classpath ${PN}-${SLOT}\`" \ |
322 |
- bin/catalina.sh || die |
323 |
- |
324 |
- java-pkg-2_src_prepare |
325 |
-} |
326 |
- |
327 |
-JAVA_ANT_REWRITE_CLASSPATH="true" |
328 |
- |
329 |
-EANT_BUILD_TARGET="deploy" |
330 |
-EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT},tomcat-servlet-api-${SAPI_SLOT},wsdl4j" |
331 |
-EANT_TEST_GENTOO_CLASSPATH="easymock-3.2" |
332 |
-EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes" |
333 |
-EANT_NEEDS_TOOLS="true" |
334 |
-EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false -Dbnd.jar=${BND_JAR} -Dbndlib.jar=${BNDLIB_JAR}" |
335 |
- |
336 |
-# revisions of the scripts |
337 |
-IM_REV="-r2" |
338 |
-INIT_REV="-r1" |
339 |
- |
340 |
-src_configure() { |
341 |
- java-ant-2_src_configure |
342 |
- |
343 |
- eapply "${FILESDIR}/${PN}-9.0.37-fix-build-rewrite.patch" |
344 |
-} |
345 |
- |
346 |
-src_compile() { |
347 |
- EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar):$(java-pkg_getjars --build-only glassfish-xmlrpc-api)" |
348 |
- LC_ALL=C java-pkg-2_src_compile |
349 |
-} |
350 |
- |
351 |
-src_test() { |
352 |
- java-pkg-2_src_test |
353 |
-} |
354 |
- |
355 |
-src_install() { |
356 |
- local dest="/usr/share/${PN}-${SLOT}" |
357 |
- |
358 |
- java-pkg_jarinto "${dest}"/bin |
359 |
- java-pkg_dojar output/build/bin/*.jar |
360 |
- exeinto "${dest}"/bin |
361 |
- doexe output/build/bin/*.sh |
362 |
- |
363 |
- java-pkg_jarinto "${dest}"/lib |
364 |
- java-pkg_dojar output/build/lib/*.jar |
365 |
- |
366 |
- dodoc RELEASE-NOTES RUNNING.txt |
367 |
- use doc && java-pkg_dojavadoc output/dist/webapps/docs/api |
368 |
- use source && java-pkg_dosrc java/* |
369 |
- |
370 |
- ### Webapps ### |
371 |
- |
372 |
- # add missing docBase |
373 |
- local apps="host-manager manager" |
374 |
- for app in ${apps}; do |
375 |
- sed -i -e "s|=\"true\" >|=\"true\" docBase=\"\$\{catalina.home\}/webapps/${app}\" >|" \ |
376 |
- output/build/webapps/${app}/META-INF/context.xml || die |
377 |
- done |
378 |
- |
379 |
- insinto "${dest}"/webapps |
380 |
- doins -r output/build/webapps/{host-manager,manager,ROOT} |
381 |
- use extra-webapps && doins -r output/build/webapps/{docs,examples} |
382 |
- |
383 |
- ### Config ### |
384 |
- |
385 |
- # create "logs" directory in $CATALINA_BASE |
386 |
- # and set correct perms, see #458890 |
387 |
- dodir "${dest}"/logs |
388 |
- fperms 0750 "${dest}"/logs |
389 |
- |
390 |
- # replace the default pw with a random one, see #92281 |
391 |
- local randpw="$(pwgen -s -B 15 1)" |
392 |
- sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die |
393 |
- |
394 |
- # prepend gentoo.classpath to common.loader, see #453212 |
395 |
- sed -i -e 's/^common\.loader=/\0${gentoo.classpath},/' output/build/conf/catalina.properties || die |
396 |
- |
397 |
- insinto "${dest}" |
398 |
- doins -r output/build/conf |
399 |
- |
400 |
- ### rc ### |
401 |
- |
402 |
- cp "${FILESDIR}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} "${T}" || die |
403 |
- eprefixify "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} |
404 |
- sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} || die |
405 |
- |
406 |
- insinto "${dest}"/gentoo |
407 |
- doins "${T}"/tomcat.conf |
408 |
- exeinto "${dest}"/gentoo |
409 |
- newexe "${T}"/tomcat${INIT_REV}.init tomcat.init |
410 |
- newexe "${T}"/tomcat-instance-manager${IM_REV}.bash tomcat-instance-manager.bash |
411 |
-} |
412 |
- |
413 |
-pkg_postinst() { |
414 |
- elog "New ebuilds of Tomcat support running multiple instances. If you used prior version" |
415 |
- elog "of Tomcat (<7.0.32), you have to migrate your existing instance to work with new Tomcat." |
416 |
- elog "You can find more information at https://wiki.gentoo.org/wiki/Apache_Tomcat" |
417 |
- |
418 |
- elog "To manage Tomcat instances, run:" |
419 |
- elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help" |
420 |
- |
421 |
- ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar" |
422 |
- ewarn "from upstream binary if you need it. Gentoo Bug # 144276" |
423 |
- |
424 |
- einfo "Please read https://wiki.gentoo.org/wiki/Apache_Tomcat and" |
425 |
- einfo "https://wiki.gentoo.org/wiki/Project:Java/Tomcat_6_Guide for more information." |
426 |
-} |