1 |
wltjr 08/08/02 01:28:31 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: tomcat-6.0.18.ebuild |
5 |
Log: |
6 |
Bumped to latest release, addresses recent security issue. Compiles and installs, should be good, but little time. Comitted from Houston Aiport, committer on way to LWE 08 |
7 |
(Portage version: 2.2_rc3/cvs/Linux 2.6.24-gentoo-r4 x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.185 www-servers/tomcat/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/tomcat/ChangeLog?rev=1.185&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/tomcat/ChangeLog?rev=1.185&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/tomcat/ChangeLog?r1=1.184&r2=1.185 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v |
19 |
retrieving revision 1.184 |
20 |
retrieving revision 1.185 |
21 |
diff -u -r1.184 -r1.185 |
22 |
--- ChangeLog 13 May 2008 02:06:49 -0000 1.184 |
23 |
+++ ChangeLog 2 Aug 2008 01:28:30 -0000 1.185 |
24 |
@@ -1,6 +1,14 @@ |
25 |
# ChangeLog for www-servers/tomcat |
26 |
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v 1.184 2008/05/13 02:06:49 wltjr Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v 1.185 2008/08/02 01:28:30 wltjr Exp $ |
29 |
+ |
30 |
+*tomcat-6.0.18 (02 Aug 2008) |
31 |
+ |
32 |
+ 02 Aug 2008; William L. Thomson Jr. <wltjr@g.o> |
33 |
+ +tomcat-6.0.18.ebuild: |
34 |
+ Bumped to latest release, addresses recent security issue. Compiles and |
35 |
+ installs, should be good, but little time. Comitted from Houston Aiport, |
36 |
+ committer on way to LWE 08 |
37 |
|
38 |
13 May 2008; William L. Thomson Jr. <wltjr@g.o> |
39 |
-files/5.5/main_tomcat_catalina_jasper_build_xml.patch, |
40 |
|
41 |
|
42 |
|
43 |
1.1 www-servers/tomcat/tomcat-6.0.18.ebuild |
44 |
|
45 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/tomcat/tomcat-6.0.18.ebuild?rev=1.1&view=markup |
46 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/tomcat/tomcat-6.0.18.ebuild?rev=1.1&content-type=text/plain |
47 |
|
48 |
Index: tomcat-6.0.18.ebuild |
49 |
=================================================================== |
50 |
# Copyright 1999-2008 Gentoo Foundation |
51 |
# Distributed under the terms of the GNU General Public License v2 |
52 |
# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/tomcat-6.0.18.ebuild,v 1.1 2008/08/02 01:28:30 wltjr Exp $ |
53 |
|
54 |
EAPI=1 |
55 |
JAVA_PKG_IUSE="doc source" |
56 |
WANT_ANT_TASKS="ant-trax" |
57 |
|
58 |
inherit eutils java-pkg-2 java-ant-2 |
59 |
|
60 |
DESCRIPTION="Tomcat Servlet-2.5/JSP-2.1 Container" |
61 |
|
62 |
MY_P="apache-${P}-src" |
63 |
SLOT="6" |
64 |
SRC_URI="mirror://apache/${PN}/${PN}-6/v${PV/_/-}/src/${MY_P}.tar.gz" |
65 |
HOMEPAGE="http://tomcat.apache.org/" |
66 |
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd" |
67 |
LICENSE="Apache-2.0" |
68 |
|
69 |
IUSE="examples test" |
70 |
|
71 |
COMMON_DEPEND="dev-java/eclipse-ecj:3.3 |
72 |
dev-java/ant-eclipse-ecj:3.3 |
73 |
>=dev-java/commons-daemon-1.0.1 |
74 |
>=dev-java/commons-dbcp-1.2.1 |
75 |
>=dev-java/commons-logging-1.1 |
76 |
>=dev-java/commons-pool-1.2 |
77 |
~dev-java/tomcat-servlet-api-${PV} |
78 |
examples? ( dev-java/jakarta-jstl )" |
79 |
|
80 |
RDEPEND=">=virtual/jre-1.5 |
81 |
dev-java/ant-core |
82 |
${COMMON_DEPEND}" |
83 |
|
84 |
DEPEND=">=virtual/jdk-1.5 |
85 |
${COMMON_DEPEND} |
86 |
test? ( =dev-java/junit-3.8* )" |
87 |
|
88 |
S=${WORKDIR}/${MY_P} |
89 |
|
90 |
TOMCAT_NAME="${PN}-${SLOT}" |
91 |
TOMCAT_HOME="/usr/share/${TOMCAT_NAME}" |
92 |
WEBAPPS_DIR="/var/lib/${TOMCAT_NAME}/webapps" |
93 |
|
94 |
pkg_setup() { |
95 |
java-pkg-2_pkg_setup |
96 |
enewgroup tomcat 265 |
97 |
enewuser tomcat 265 -1 /dev/null tomcat |
98 |
} |
99 |
|
100 |
src_unpack() { |
101 |
unpack ${A} |
102 |
cd "${S}" |
103 |
|
104 |
epatch "${FILESDIR}/${SLOT}/build-xml.patch" |
105 |
|
106 |
cd webapps/examples/WEB-INF/lib/ |
107 |
rm -v *.jar |
108 |
} |
109 |
|
110 |
src_compile(){ |
111 |
# Fix for bug # 178980 |
112 |
if use amd64 && [[ "${GENTOO_VM}" = "sun-jdk-1.5" ]] ; then |
113 |
java-pkg_force-compiler ecj-3.3 |
114 |
fi |
115 |
|
116 |
local antflags="build-jasper-jdt deploy -Dbase.path=${T}" |
117 |
antflags="${antflags} -Dcompile.debug=false" |
118 |
if ! use doc; then |
119 |
antflags="${antflags} -Dnobuild.docs=true" |
120 |
fi |
121 |
antflags="${antflags} -Dant.jar=$(java-pkg_getjar ant-core ant.jar)" |
122 |
antflags="${antflags} -Dcommons-daemon.jar=$(java-pkg_getjar commons-daemon commons-daemon.jar)" |
123 |
antflags="${antflags} -Djdt.jar=$(java-pkg_getjar eclipse-ecj-3.3 ecj.jar)" |
124 |
antflags="${antflags} -Djsp-api.jar=$(java-pkg_getjar tomcat-servlet-api-2.5 jsp-api.jar)" |
125 |
antflags="${antflags} -Dservlet-api.jar=$(java-pkg_getjar tomcat-servlet-api-2.5 servlet-api.jar)" |
126 |
eant ${antflags} |
127 |
} |
128 |
|
129 |
src_install() { |
130 |
cd "${S}/output/build/bin" |
131 |
rm -f *.bat commons-daemon.jar |
132 |
java-pkg_jar-from commons-daemon |
133 |
chmod 755 *.sh |
134 |
|
135 |
# register jars per bug #171496 |
136 |
cd "${S}/output/build/lib/" |
137 |
for jar in *.jar; do |
138 |
java-pkg_dojar ${jar} |
139 |
done |
140 |
|
141 |
local CATALINA_BASE=/var/lib/${TOMCAT_NAME}/ |
142 |
|
143 |
# init.d, conf.d |
144 |
newinitd "${FILESDIR}"/${SLOT}/tomcat.init ${TOMCAT_NAME} |
145 |
newconfd "${FILESDIR}"/${SLOT}/tomcat.conf ${TOMCAT_NAME} |
146 |
|
147 |
# create dir structure |
148 |
dodir /usr/share/${TOMCAT_NAME} |
149 |
|
150 |
diropts -m750 -o tomcat -g tomcat |
151 |
dodir /etc/${TOMCAT_NAME} |
152 |
keepdir ${WEBAPPS_DIR} |
153 |
|
154 |
diropts -m755 -o tomcat -g tomcat |
155 |
dodir ${CATALINA_BASE} |
156 |
|
157 |
diropts -m775 -o tomcat -g tomcat |
158 |
dodir /etc/${TOMCAT_NAME}/Catalina/localhost |
159 |
keepdir /var/log/${TOMCAT_NAME}/ |
160 |
keepdir /var/run/${TOMCAT_NAME}/ |
161 |
keepdir /var/tmp/${TOMCAT_NAME}/ |
162 |
|
163 |
cd "${S}" |
164 |
# fix context's so webapps will be deployed |
165 |
sed -i -e 's:Context a:Context docBase="${catalina.home}/webapps/host-manager" a:' "${S}"/webapps/host-manager/META-INF/context.xml |
166 |
sed -i -e 's:Context a:Context docBase="${catalina.home}/webapps/manager" a:' "${S}"/webapps/manager/META-INF/context.xml |
167 |
|
168 |
# replace the default pw with a random one, see #92281 |
169 |
local randpw=$(echo ${RANDOM}|md5sum|cut -c 1-15) |
170 |
sed -e s:SHUTDOWN:${randpw}: -i conf/server.xml |
171 |
|
172 |
# copy over the directories |
173 |
chown -R tomcat:tomcat webapps/* conf/* |
174 |
cp -pR conf/* "${D}"/etc/${TOMCAT_NAME} || die "failed to copy conf" |
175 |
cp -pPR output/build/bin "${D}"/usr/share/${TOMCAT_NAME} \ |
176 |
|| die "failed to copy" |
177 |
|
178 |
# replace catalina.policy with gentoo specific one bug #176701 |
179 |
# cp ${FILESDIR}/${SLOT}/catalina.policy "${D}"/etc/${TOMCAT_NAME} \ |
180 |
# || die "failed to replace catalina.policy" |
181 |
|
182 |
cp "${T}"/tomcat6-deps/jdt/jasper-jdt.jar "${D}"/usr/share/${TOMCAT_NAME}/lib \ |
183 |
|| die "failed to copy" |
184 |
|
185 |
cd "${D}/usr/share/${TOMCAT_NAME}/lib" |
186 |
java-pkg_jar-from tomcat-servlet-api-2.5 |
187 |
|
188 |
cd "${S}" |
189 |
|
190 |
# Copy over webapps, some controlled by use flags |
191 |
cp -p RELEASE-NOTES webapps/ROOT/RELEASE-NOTES.txt |
192 |
cp -pr webapps/ROOT "${D}"${CATALINA_BASE}/webapps |
193 |
|
194 |
diropts -m755 -o tomcat -g tomcat |
195 |
dodir ${TOMCAT_HOME}/webapps |
196 |
cp -pr webapps/host-manager "${D}"${TOMCAT_HOME}/webapps |
197 |
cp -pr webapps/manager "${D}"${TOMCAT_HOME}/webapps |
198 |
|
199 |
if use doc; then |
200 |
cp -pr output/build/webapps/docs "${D}"${CATALINA_BASE}/webapps |
201 |
fi |
202 |
if use examples; then |
203 |
cd output/build/webapps/examples/WEB-INF/lib |
204 |
java-pkg_jar-from jakarta-jstl jstl.jar |
205 |
java-pkg_jar-from jakarta-jstl standard.jar |
206 |
cd "${S}" |
207 |
cp -pPr output/build/webapps/examples "${D}"${CATALINA_BASE}/webapps |
208 |
fi |
209 |
|
210 |
# symlink the directories to make CATALINA_BASE possible |
211 |
dosym /etc/${TOMCAT_NAME} ${CATALINA_BASE}/conf |
212 |
dosym /var/log/${TOMCAT_NAME} ${CATALINA_BASE}/logs |
213 |
dosym /var/tmp/${TOMCAT_NAME} ${CATALINA_BASE}/temp |
214 |
dosym /var/run/${TOMCAT_NAME} ${CATALINA_BASE}/work |
215 |
|
216 |
# link the manager's context to the right position |
217 |
dosym ${TOMCAT_HOME}/webapps/host-manager/META-INF/context.xml /etc/${TOMCAT_NAME}/Catalina/localhost/host-manager.xml |
218 |
dosym ${TOMCAT_HOME}/webapps/manager/META-INF/context.xml /etc/${TOMCAT_NAME}/Catalina/localhost/manager.xml |
219 |
|
220 |
dodoc "${S}"/{RELEASE-NOTES,RUNNING.txt} |
221 |
fperms 640 /etc/${TOMCAT_NAME}/tomcat-users.xml |
222 |
} |
223 |
|
224 |
pkg_postinst() { |
225 |
ewarn "Changing ownership recursively on /etc/${TOMCAT_NAME}" |
226 |
# temp fix for bug #176097 |
227 |
chown -fR tomcat:tomcat /etc/${TOMCAT_NAME} |
228 |
ewarn "Owner ship changed to tomcat:tomcat. Temp hack/fix." |
229 |
|
230 |
elog |
231 |
elog " This ebuild implements a FHS compliant layout for tomcat" |
232 |
elog " Please read http://www.gentoo.org/proj/en/java/tomcat6-guide.xml" |
233 |
elog " for more information." |
234 |
elog |
235 |
ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar" |
236 |
ewarn "from upstream binary if you need it. Gentoo Bug # 144276" |
237 |
elog |
238 |
ewarn "The manager webapps have known exploits, please refer to" |
239 |
ewarn "http://cve.mitre.org/cgi-bin/cvename.cgi?name=2007-2450" |
240 |
if use examples ; then |
241 |
elog |
242 |
ewarn "The examples webapp has a known exploit, please refer to" |
243 |
ewarn "http://cve.mitre.org/cgi-bin/cvename.cgi?name=2007-2449" |
244 |
fi |
245 |
elog |
246 |
elog " Please report any bugs to http://bugs.gentoo.org/" |
247 |
elog |
248 |
} |