1 |
wltjr 07/09/08 18:28:30 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: tomcat-5.5.25.ebuild |
5 |
Log: |
6 |
Bumped to latest release, unified multiple patch files into two, partly result of having to re-create patches. Dropped ~x86-fbsd keyword due to it missing on a dep per bug #191729. |
7 |
(Portage version: 2.1.3.7) |
8 |
|
9 |
Revision Changes Path |
10 |
1.164 www-servers/tomcat/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/tomcat/ChangeLog?rev=1.164&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/tomcat/ChangeLog?rev=1.164&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/tomcat/ChangeLog?r1=1.163&r2=1.164 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v |
19 |
retrieving revision 1.163 |
20 |
retrieving revision 1.164 |
21 |
diff -u -r1.163 -r1.164 |
22 |
--- ChangeLog 8 Sep 2007 00:26:15 -0000 1.163 |
23 |
+++ ChangeLog 8 Sep 2007 18:28:30 -0000 1.164 |
24 |
@@ -1,6 +1,16 @@ |
25 |
# ChangeLog for www-servers/tomcat |
26 |
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v 1.163 2007/09/08 00:26:15 wltjr Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v 1.164 2007/09/08 18:28:30 wltjr Exp $ |
29 |
+ |
30 |
+*tomcat-5.5.25 (08 Sep 2007) |
31 |
+ |
32 |
+ 08 Sep 2007; William L. Thomson Jr. <wltjr@g.o> |
33 |
+ +files/5.5/jsr152_jsr154_examples_build_xml.patch, |
34 |
+ +files/5.5/main_tomcat_catalina_jasper_build_xml.patch, |
35 |
+ +tomcat-5.5.25.ebuild: |
36 |
+ Bumped to latest release, unified multiple patch files into two, partly |
37 |
+ result of having to re-create patches. Dropped ~x86-fbsd keyword due to it |
38 |
+ missing on a dep per bug #191729. |
39 |
|
40 |
08 Sep 2007; William L. Thomson Jr. <wltjr@g.o> |
41 |
-files/5.5/tomcat.conf, -files/5.5/tomcat.init, -tomcat-5.5.23-r1.ebuild, |
42 |
|
43 |
|
44 |
|
45 |
1.1 www-servers/tomcat/tomcat-5.5.25.ebuild |
46 |
|
47 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/tomcat/tomcat-5.5.25.ebuild?rev=1.1&view=markup |
48 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/tomcat/tomcat-5.5.25.ebuild?rev=1.1&content-type=text/plain |
49 |
|
50 |
Index: tomcat-5.5.25.ebuild |
51 |
=================================================================== |
52 |
# Copyright 1999-2007 Gentoo Foundation |
53 |
# Distributed under the terms of the GNU General Public License v2 |
54 |
# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/tomcat-5.5.25.ebuild,v 1.1 2007/09/08 18:28:30 wltjr Exp $ |
55 |
|
56 |
WANT_ANT_TASKS="ant-trax" |
57 |
|
58 |
inherit eutils java-pkg-2 java-ant-2 |
59 |
|
60 |
DESCRIPTION="Tomcat Servlet-2.4/JSP-2.0 Container" |
61 |
|
62 |
MY_P="apache-${P}-src" |
63 |
SLOT="5.5" |
64 |
SRC_URI="mirror://apache/${PN}/${PN}-5/v${PV}/src/${MY_P}.tar.gz" |
65 |
HOMEPAGE="http://tomcat.apache.org/" |
66 |
KEYWORDS="~amd64 -ppc -ppc64 ~x86" |
67 |
LICENSE="Apache-2.0" |
68 |
|
69 |
IUSE="admin java5 doc examples source test" |
70 |
|
71 |
RDEPEND="=dev-java/eclipse-ecj-3.3* |
72 |
=dev-java/commons-beanutils-1.7* |
73 |
>=dev-java/commons-collections-3.1 |
74 |
>=dev-java/commons-daemon-1.0.1 |
75 |
>=dev-java/commons-dbcp-1.2.1 |
76 |
>=dev-java/commons-digester-1.7 |
77 |
>=dev-java/commons-fileupload-1.1 |
78 |
=dev-java/commons-httpclient-2.0* |
79 |
>=dev-java/commons-io-1.1 |
80 |
>=dev-java/commons-el-1.0 |
81 |
>=dev-java/commons-launcher-0.9 |
82 |
>=dev-java/commons-logging-1.0.4 |
83 |
>=dev-java/commons-modeler-2.0 |
84 |
>=dev-java/commons-pool-1.2 |
85 |
>=dev-java/junit-3.8.1 |
86 |
>=dev-java/log4j-1.2.9 |
87 |
>=dev-java/saxpath-1.0 |
88 |
~dev-java/tomcat-servlet-api-${PV} |
89 |
dev-java/ant-core |
90 |
admin? ( =dev-java/struts-1.2* ) |
91 |
dev-java/sun-javamail |
92 |
java5? ( >=virtual/jre-1.5 ) |
93 |
!java5? ( |
94 |
=virtual/jre-1.4* |
95 |
dev-java/sun-jaf |
96 |
=dev-java/mx4j-core-3* |
97 |
>=dev-java/xerces-2.7.1 |
98 |
=dev-java/xml-commons-external-1.3* |
99 |
)" |
100 |
DEPEND="java5? ( >=virtual/jdk-1.5 ) |
101 |
!java5? ( =virtual/jdk-1.4* ) |
102 |
${RDEPEND}" |
103 |
|
104 |
S=${WORKDIR}/${MY_P} |
105 |
|
106 |
TOMCAT_NAME="${PN}-${SLOT}" |
107 |
WEBAPPS_DIR="/var/lib/${TOMCAT_NAME}/webapps" |
108 |
|
109 |
pkg_setup() { |
110 |
java-pkg-2_pkg_setup |
111 |
# new user for tomcat |
112 |
enewgroup tomcat |
113 |
enewuser tomcat -1 -1 /dev/null tomcat |
114 |
|
115 |
java-pkg_filter-compiler ecj-3.1 ecj-3.2 |
116 |
} |
117 |
|
118 |
src_unpack() { |
119 |
unpack ${A} |
120 |
cd ${S} |
121 |
|
122 |
epatch "${FILESDIR}/${SLOT}/main_tomcat_catalina_jasper_build_xml.patch" |
123 |
|
124 |
use examples && epatch "${FILESDIR}/${SLOT}/jsr152_jsr154_examples_build_xml.patch" |
125 |
|
126 |
# avoid packed jars :-) |
127 |
mkdir -p ${S}/build/build/common |
128 |
cd ${S}/build/build |
129 |
|
130 |
mkdir ./bin && cd ./bin |
131 |
java-pkg_jar-from commons-logging commons-logging-api.jar |
132 |
java-pkg_jar-from commons-daemon |
133 |
if ! use java5; then |
134 |
java-pkg_jar-from mx4j-core-3.0 mx4j.jar jmx.jar |
135 |
java-pkg_jar-from mx4j-core-3.0 mx4j-rjmx.jar jmx-remote.jar |
136 |
mkdir ${S}/build/build/common/endorsed && cd ${S}/build/build/common/endorsed |
137 |
java-pkg_jar-from xml-commons-external-1.3 xml-apis.jar |
138 |
java-pkg_jar-from xerces-2 xercesImpl.jar |
139 |
fi |
140 |
|
141 |
mkdir ${S}/build/build/common/lib && cd ${S}/build/build/common/lib |
142 |
java-pkg_jar-from ant-core |
143 |
java-pkg_jar-from commons-collections |
144 |
java-pkg_jar-from commons-dbcp |
145 |
java-pkg_jar-from commons-el |
146 |
java-pkg_jar-from commons-pool |
147 |
java-pkg_jar-from tomcat-servlet-api-2.4 |
148 |
|
149 |
mkdir -p ${S}/build/build/server/lib && cd ${S}/build/build/server/lib |
150 |
java-pkg_jar-from commons-beanutils-1.7 commons-beanutils.jar |
151 |
java-pkg_jar-from commons-digester |
152 |
java-pkg_jar-from commons-modeler |
153 |
|
154 |
} |
155 |
|
156 |
src_compile(){ |
157 |
local antflags="-Dbase.path=${T}" |
158 |
|
159 |
antflags="${antflags} -Dservletapi.build.notrequired=true" |
160 |
antflags="${antflags} -Djspapi.build.notrequired=true" |
161 |
antflags="${antflags} -Dcommons-beanutils.jar=$(java-pkg_getjar commons-beanutils-1.7 commons-beanutils.jar)" |
162 |
antflags="${antflags} -Dcommons-collections.jar=$(java-pkg_getjars commons-collections)" |
163 |
antflags="${antflags} -Dcommons-daemon.jar=$(java-pkg_getjars commons-daemon)" |
164 |
antflags="${antflags} -Dcommons-digester.jar=$(java-pkg_getjars commons-digester)" |
165 |
antflags="${antflags} -Dcommons-dbcp.jar=$(java-pkg_getjars commons-dbcp)" |
166 |
antflags="${antflags} -Dcommons-el.jar=$(java-pkg_getjars commons-el)" |
167 |
antflags="${antflags} -Dcommons-fileupload.jar=$(java-pkg_getjars commons-fileupload)" |
168 |
antflags="${antflags} -Dcommons-httpclient.jar=$(java-pkg_getjars commons-httpclient)" |
169 |
antflags="${antflags} -Dcommons-launcher.jar=$(java-pkg_getjars commons-launcher)" |
170 |
antflags="${antflags} -Dcommons-logging.jar=$(java-pkg_getjar commons-logging commons-logging.jar)" |
171 |
antflags="${antflags} -Dcommons-logging-api.jar=$(java-pkg_getjar commons-logging commons-logging-api.jar)" |
172 |
antflags="${antflags} -Dcommons-pool.jar=$(java-pkg_getjars commons-pool)" |
173 |
antflags="${antflags} -Dcommons-modeler.jar=$(java-pkg_getjars commons-modeler)" |
174 |
antflags="${antflags} -Djdt.jar=$(java-pkg_getjar eclipse-ecj-3.3 ecj.jar)" |
175 |
antflags="${antflags} -Djsp-api.jar=$(java-pkg_getjar tomcat-servlet-api-2.4 jsp-api.jar)" |
176 |
antflags="${antflags} -Djunit.jar=$(java-pkg_getjars junit)" |
177 |
antflags="${antflags} -Dlog4j.jar=$(java-pkg_getjars log4j)" |
178 |
antflags="${antflags} -Dmail.jar=$(java-pkg_getjar sun-javamail mail.jar)" |
179 |
antflags="${antflags} -Dsaxpath.jar=$(java-pkg_getjar saxpath saxpath.jar)" |
180 |
antflags="${antflags} -Dservlet-api.jar=$(java-pkg_getjar tomcat-servlet-api-2.4 servlet-api.jar)" |
181 |
if use admin; then |
182 |
antflags="${antflags} -Dstruts.jar=$(java-pkg_getjar struts-1.2 struts.jar)" |
183 |
antflags="${antflags} -Dstruts.home=/usr/share/struts" |
184 |
else |
185 |
antflags="${antflags} -Dadmin.build.notrequired=true" |
186 |
antflags="${antflags} -Dadmin.precompile.notrequired=true" |
187 |
fi |
188 |
if ! use examples; then |
189 |
antflags="${antflags} -Dexamples.build.notrequired=true" |
190 |
antflags="${antflags} -Dexamples.precompile.notrequired=true" |
191 |
fi |
192 |
antflags="${antflags} -Djasper.home=${S}/jasper" |
193 |
if ! use java5; then |
194 |
antflags="${antflags} -Dactivation.jar=$(java-pkg_getjars sun-jaf)" |
195 |
antflags="${antflags} -Djmx.jar=$(java-pkg_getjar mx4j-core-3.0 mx4j.jar)" |
196 |
antflags="${antflags} -Djmx-remote.jar=$(java-pkg_getjar mx4j-core-3.0 mx4j-rjmx.jar)" |
197 |
antflags="${antflags} -DxercesImpl.jar=$(java-pkg_getjar xerces-2 xercesImpl.jar)" |
198 |
antflags="${antflags} -Dxml-apis.jar=$(java-pkg_getjar xml-commons-external-1.3 xml-apis.jar)" |
199 |
fi |
200 |
|
201 |
eant ${antflags} |
202 |
} |
203 |
|
204 |
src_install() { |
205 |
cd ${S}/build/build |
206 |
|
207 |
# init.d, conf.d |
208 |
newinitd ${FILESDIR}/${SLOT}/tomcat.init.2 ${TOMCAT_NAME} |
209 |
newconfd ${FILESDIR}/${SLOT}/tomcat.conf.2 ${TOMCAT_NAME} |
210 |
|
211 |
# create dir structure |
212 |
diropts -m755 -o tomcat -g tomcat |
213 |
dodir /usr/share/${TOMCAT_NAME} |
214 |
keepdir /var/log/${TOMCAT_NAME}/ |
215 |
keepdir /var/tmp/${TOMCAT_NAME}/ |
216 |
keepdir /var/run/${TOMCAT_NAME}/ |
217 |
|
218 |
local CATALINA_BASE=/var/lib/${TOMCAT_NAME}/ |
219 |
dodir ${CATALINA_BASE} |
220 |
keepdir ${CATALINA_BASE}/shared/lib |
221 |
keepdir ${CATALINA_BASE}/shared/classes |
222 |
|
223 |
keepdir /usr/share/${TOMCAT_NAME}/common/lib |
224 |
|
225 |
dodir /etc/${TOMCAT_NAME} |
226 |
fperms 750 /etc/${TOMCAT_NAME} |
227 |
|
228 |
diropts -m0755 |
229 |
|
230 |
# we don't need dos scripts |
231 |
rm -f bin/*.bat |
232 |
|
233 |
# copy the manager and admin context's to the right position |
234 |
mkdir -p conf/Catalina/localhost |
235 |
if use admin; then |
236 |
cp ${S}/container/webapps/admin/admin.xml \ |
237 |
conf/Catalina/localhost |
238 |
fi |
239 |
cp ${S}/container/webapps/manager/manager.xml \ |
240 |
conf/Catalina/localhost |
241 |
|
242 |
# make the jars available via java-pkg_getjar and jar-from, etc |
243 |
base=$(pwd) |
244 |
libdirs="common/lib server/lib" |
245 |
for dir in ${libdirs} |
246 |
do |
247 |
cd ${dir} |
248 |
|
249 |
for jar in *.jar; |
250 |
do |
251 |
# replace the file with a symlink |
252 |
if [ ! -L ${jar} ]; then |
253 |
java-pkg_dojar ${jar} |
254 |
rm -f ${jar} |
255 |
ln -s ${DESTTREE}/share/${TOMCAT_NAME}/lib/${jar} ${jar} |
256 |
fi |
257 |
done |
258 |
|
259 |
cd ${base} |
260 |
done |
261 |
|
262 |
# replace a packed struts.jar |
263 |
if the use admin; then |
264 |
cd server/webapps/admin/WEB-INF/lib |
265 |
rm -f struts.jar |
266 |
java-pkg_jar-from struts-1.2 struts.jar |
267 |
cd ${base} |
268 |
else |
269 |
rm -fR server/webapps/admin |
270 |
fi |
271 |
|
272 |
cd server/webapps/manager/WEB-INF/lib |
273 |
java-pkg_jar-from commons-fileupload |
274 |
java-pkg_jar-from commons-io-1 |
275 |
cd ${base} |
276 |
|
277 |
# replace the default pw with a random one, see #92281 |
278 |
local randpw=$(echo ${RANDOM}|md5sum|cut -c 1-15) |
279 |
sed -e s:SHUTDOWN:${randpw}: -i conf/{server,server-minimal}.xml |
280 |
|
281 |
# copy over the directories |
282 |
chown -R tomcat:tomcat webapps/* conf/* |
283 |
cp -pR conf/* ${D}/etc/${TOMCAT_NAME} || die "failed to copy conf" |
284 |
cp -HR bin common server ${D}/usr/share/${TOMCAT_NAME} || die "failed to copy" |
285 |
|
286 |
# replace catalina.policy with gentoo specific one bug #176701 |
287 |
cp ${FILESDIR}/${SLOT}/catalina.policy ${D}/etc/${TOMCAT_NAME} || die "failed to replace catalina.policy" |
288 |
|
289 |
keepdir ${WEBAPPS_DIR} |
290 |
set_webapps_perms ${D}/${WEBAPPS_DIR} |
291 |
|
292 |
# Copy over webapps, some controlled by use flags |
293 |
cp -p ../RELEASE-NOTES webapps/ROOT/RELEASE-NOTES.txt |
294 |
cp -pr webapps/ROOT ${D}${CATALINA_BASE}/webapps |
295 |
if use doc; then |
296 |
cp -pr webapps/tomcat-docs ${D}${CATALINA_BASE}/webapps |
297 |
fi |
298 |
if use examples; then |
299 |
cp -pr webapps/{jsp-examples,servlets-examples,webdav} \ |
300 |
${D}${CATALINA_BASE}/webapps |
301 |
fi |
302 |
|
303 |
# symlink the directories to make CATALINA_BASE possible |
304 |
dosym /etc/${TOMCAT_NAME} ${CATALINA_BASE}/conf |
305 |
dosym /var/log/${TOMCAT_NAME} ${CATALINA_BASE}/logs |
306 |
dosym /var/tmp/${TOMCAT_NAME} ${CATALINA_BASE}/temp |
307 |
dosym /var/run/${TOMCAT_NAME} ${CATALINA_BASE}/work |
308 |
|
309 |
dodoc ${S}/build/{RELEASE-NOTES,RUNNING.txt} |
310 |
fperms 640 /etc/${TOMCAT_NAME}/tomcat-users.xml |
311 |
} |
312 |
|
313 |
pkg_postinst() { |
314 |
#due to previous ebuild bloopers, make sure everything is correct |
315 |
chown root:root /etc/init.d/${TOMCAT_NAME} |
316 |
chown root:root /etc/conf.d/${TOMCAT_NAME} |
317 |
|
318 |
elog |
319 |
elog " This ebuild implements a new filesystem layout for tomcat" |
320 |
elog " please read http://www.gentoo.org/proj/en/java/tomcat-guide.xml" |
321 |
elog " for more information!." |
322 |
elog |
323 |
ewarn "naming-factory-dbcp.jar is not built at this time. Please fetch" |
324 |
ewarn "jar from upstream binary if you need it. Gentoo Bug # 144276" |
325 |
elog |
326 |
ewarn "The manager webapps have known exploits, please refer to" |
327 |
ewarn "http://cve.mitre.org/cgi-bin/cvename.cgi?name=2007-2450" |
328 |
if use examples ; then |
329 |
elog |
330 |
ewarn "The examples webapp has a known exploit, please refer to" |
331 |
ewarn "http://cve.mitre.org/cgi-bin/cvename.cgi?name=2007-2449" |
332 |
fi |
333 |
elog |
334 |
elog " Please file any bugs at http://bugs.gentoo.org/ or else it" |
335 |
elog " may not get seen. Thank you." |
336 |
elog |
337 |
} |
338 |
|
339 |
#helpers |
340 |
set_webapps_perms() { |
341 |
chown tomcat:tomcat ${1} || die "Failed to change owner off ${1}." |
342 |
chmod 750 ${1} || die "Failed to change permissions off ${1}." |
343 |
} |
344 |
|
345 |
pkg_config() { |
346 |
# Better suggestions are welcome |
347 |
local currentdir="$(getent passwd tomcat | gawk -F':' '{ print $6 }')" |
348 |
|
349 |
elog "The default home directory for Tomcat is /dev/null." |
350 |
elog "You need to change it if your applications needs it to" |
351 |
elog "be an actual directory. Current home directory:" |
352 |
elog "${currentdir}" |
353 |
elog "" |
354 |
elog "Do you want to change it [yes/no]?" |
355 |
|
356 |
local answer |
357 |
read answer |
358 |
|
359 |
if [[ "${answer}" == "yes" ]]; then |
360 |
elog "" |
361 |
elog "Suggestions:" |
362 |
elog "${WEBAPPS_DIR}" |
363 |
elog "" |
364 |
elog "If you want to suggest a directory, file a bug to" |
365 |
elog "http://bugs.gentoo.org" |
366 |
elog "" |
367 |
elog "Enter home directory:" |
368 |
|
369 |
local homedir |
370 |
read homedir |
371 |
|
372 |
elog "" |
373 |
elog "Setting home directory to: ${homedir}" |
374 |
|
375 |
/usr/sbin/usermod -d"${homedir}" tomcat |
376 |
|
377 |
elog "You can run emerge --config =${PF}" |
378 |
elog "again to change to homedir" |
379 |
elog "at any time." |
380 |
fi |
381 |
} |
382 |
|
383 |
|
384 |
|
385 |
|
386 |
-- |
387 |
gentoo-commits@g.o mailing list |