1 |
nelchael 10/08/31 15:19:58 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: tomcat-6.0.29.ebuild |
5 |
Log: |
6 |
Version bump. |
7 |
(Portage version: 2.1.8.3/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.233 www-servers/tomcat/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/tomcat/ChangeLog?rev=1.233&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/tomcat/ChangeLog?rev=1.233&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/tomcat/ChangeLog?r1=1.232&r2=1.233 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v |
19 |
retrieving revision 1.232 |
20 |
retrieving revision 1.233 |
21 |
diff -u -r1.232 -r1.233 |
22 |
--- ChangeLog 25 Jul 2010 17:31:33 -0000 1.232 |
23 |
+++ ChangeLog 31 Aug 2010 15:19:58 -0000 1.233 |
24 |
@@ -1,6 +1,11 @@ |
25 |
# ChangeLog for www-servers/tomcat |
26 |
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v 1.232 2010/07/25 17:31:33 betelgeuse Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v 1.233 2010/08/31 15:19:58 nelchael Exp $ |
29 |
+ |
30 |
+*tomcat-6.0.29 (31 Aug 2010) |
31 |
+ |
32 |
+ 31 Aug 2010; Krzysztof Pawlik <nelchael@g.o> +tomcat-6.0.29.ebuild: |
33 |
+ Version bump. |
34 |
|
35 |
25 Jul 2010; Petteri Räty <betelgeuse@g.o> tomcat-6.0.28.ebuild: |
36 |
Block tomcat-native older than 1.1.20. Fixes bug #316545. |
37 |
|
38 |
|
39 |
|
40 |
1.1 www-servers/tomcat/tomcat-6.0.29.ebuild |
41 |
|
42 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/tomcat/tomcat-6.0.29.ebuild?rev=1.1&view=markup |
43 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/tomcat/tomcat-6.0.29.ebuild?rev=1.1&content-type=text/plain |
44 |
|
45 |
Index: tomcat-6.0.29.ebuild |
46 |
=================================================================== |
47 |
# Copyright 1999-2010 Gentoo Foundation |
48 |
# Distributed under the terms of the GNU General Public License v2 |
49 |
# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/tomcat-6.0.29.ebuild,v 1.1 2010/08/31 15:19:58 nelchael Exp $ |
50 |
|
51 |
EAPI=2 |
52 |
JAVA_PKG_IUSE="doc examples source test" |
53 |
WANT_ANT_TASKS="ant-trax" |
54 |
|
55 |
inherit eutils java-pkg-2 java-ant-2 |
56 |
|
57 |
DESCRIPTION="Tomcat Servlet-2.5/JSP-2.1 Container" |
58 |
|
59 |
MY_P="apache-${P}-src" |
60 |
SLOT="6" |
61 |
SRC_URI="mirror://apache/${PN}/${PN}-6/v${PV/_/-}/src/${MY_P}.tar.gz" |
62 |
HOMEPAGE="http://tomcat.apache.org/" |
63 |
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd" |
64 |
LICENSE="Apache-2.0" |
65 |
|
66 |
IUSE="" |
67 |
|
68 |
COMMON_DEPEND="dev-java/eclipse-ecj:3.3 |
69 |
dev-java/ant-eclipse-ecj:3.3 |
70 |
>=dev-java/commons-dbcp-1.2.1 |
71 |
>=dev-java/commons-logging-1.1 |
72 |
>=dev-java/commons-pool-1.2 |
73 |
~dev-java/tomcat-servlet-api-${PV} |
74 |
examples? ( dev-java/jakarta-jstl )" |
75 |
|
76 |
RDEPEND=" |
77 |
!<dev-java/tomcat-native-1.1.20 |
78 |
>=virtual/jre-1.5 |
79 |
>=dev-java/commons-daemon-1.0.1 |
80 |
dev-java/ant-core |
81 |
${COMMON_DEPEND}" |
82 |
|
83 |
DEPEND=">=virtual/jdk-1.5 |
84 |
${COMMON_DEPEND} |
85 |
test? ( =dev-java/junit-3.8* )" |
86 |
|
87 |
S=${WORKDIR}/${MY_P} |
88 |
|
89 |
TOMCAT_NAME="${PN}-${SLOT}" |
90 |
TOMCAT_HOME="/usr/share/${TOMCAT_NAME}" |
91 |
WEBAPPS_DIR="/var/lib/${TOMCAT_NAME}/webapps" |
92 |
|
93 |
# TODO: Fails to find PrettyPrint in with python 2.6 and xml-rewriter-3 |
94 |
# Find out why so |
95 |
JAVA_ANT_CELEMENT_REWRITER="true" |
96 |
JAVA_ANT_REWRITE_CLASSPATH="true" |
97 |
|
98 |
EANT_NEEDS_TOOLS="true" |
99 |
EANT_GENTOO_CLASSPATH="tomcat-servlet-api-2.5,eclipse-ecj-3.3" |
100 |
|
101 |
EANT_BUILD_TARGET="build-only build-jasper-jdt" |
102 |
EANT_DOC_TARGET="build-docs" |
103 |
|
104 |
EANT_EXTRA_ARGS="-Dbase.path=${T} -Dversion=${PV} -Dversion.number=${PV} |
105 |
-Dcompile.debug=false -Djsp-api.jar=jsp-api.jar -Dservlet-api.jar=servlet-api.jar |
106 |
-Dant.jar=ant.jar" |
107 |
|
108 |
pkg_setup() { |
109 |
java-pkg-2_pkg_setup |
110 |
enewgroup tomcat 265 |
111 |
enewuser tomcat 265 -1 /dev/null tomcat |
112 |
} |
113 |
|
114 |
java_prepare() { |
115 |
rm -v webapps/examples/WEB-INF/lib/*.jar || die |
116 |
|
117 |
# bug # 178980 and #312293 |
118 |
if use amd64; then |
119 |
java-pkg_force-compiler ecj-3.3 |
120 |
fi |
121 |
|
122 |
if ! use doc; then |
123 |
EANT_EXTRA_ARGS+=" -Dnobuild.docs=true" |
124 |
fi |
125 |
|
126 |
EANT_EXTRA_ARGS+=" -Djdt.jar=$(java-pkg_getjar eclipse-ecj-3.3 ecj.jar)" |
127 |
java-pkg_jarfrom --build-only ant-core ant.jar |
128 |
} |
129 |
|
130 |
src_install() { |
131 |
cd "${S}/bin" |
132 |
rm -f *.bat |
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.2 ${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 |
# webapps get stored in /usr/share/${TOMCAT_NAME}/webapps |
178 |
cd "${S}"/webapps || die |
179 |
ebegin "Installing webapps to /usr/share/${TOMCAT_NAME}" |
180 |
|
181 |
cp -pR ROOT "${D}"/usr/share/${TOMCAT_NAME}/webapps || die |
182 |
cp -pR host-manager "${D}"/usr/share/${TOMCAT_NAME}/webapps || die |
183 |
cp -pR manager "${D}"/usr/share/${TOMCAT_NAME}/webapps || die |
184 |
if use doc; then |
185 |
cp -pR docs "${D}"/usr/share/${TOMCAT_NAME}/webapps || die |
186 |
fi |
187 |
if use examples; then |
188 |
cd "${S}"/webapps/examples/WEB-INF/lib |
189 |
java-pkg_jar-from jakarta-jstl jstl.jar |
190 |
java-pkg_jar-from jakarta-jstl standard.jar |
191 |
cd "${S}"/webapps |
192 |
cp -pR examples "${D}"/usr/share/${TOMCAT_NAME}/webapps || die |
193 |
fi |
194 |
|
195 |
# replace catalina.policy with gentoo specific one bug #176701 |
196 |
# cp ${FILESDIR}/${SLOT}/catalina.policy "${D}"/etc/${TOMCAT_NAME} \ |
197 |
# || die "failed to replace catalina.policy" |
198 |
|
199 |
cp "${T}"/tomcat6-deps/jdt/jasper-jdt.jar "${D}"/usr/share/${TOMCAT_NAME}/lib \ |
200 |
|| die "failed to copy" |
201 |
|
202 |
cd "${D}/usr/share/${TOMCAT_NAME}/lib" || die |
203 |
java-pkg_jar-from tomcat-servlet-api-2.5 |
204 |
|
205 |
# symlink the directories to make CATALINA_BASE possible |
206 |
dosym /etc/${TOMCAT_NAME} ${CATALINA_BASE}/conf |
207 |
dosym /var/log/${TOMCAT_NAME} ${CATALINA_BASE}/logs |
208 |
dosym /var/tmp/${TOMCAT_NAME} ${CATALINA_BASE}/temp |
209 |
dosym /var/run/${TOMCAT_NAME} ${CATALINA_BASE}/work |
210 |
|
211 |
dodoc "${S}"/{RELEASE-NOTES,RUNNING.txt} |
212 |
fperms 640 /etc/${TOMCAT_NAME}/tomcat-users.xml |
213 |
|
214 |
#install *.sh scripts bug #278059 |
215 |
exeinto /usr/share/${TOMCAT_NAME}/bin |
216 |
doexe "${S}"/bin/*.sh |
217 |
} |
218 |
|
219 |
pkg_postinst() { |
220 |
ewarn "Changing ownership recursively on /etc/${TOMCAT_NAME}" |
221 |
# temp fix for bug #176097 |
222 |
chown -fR tomcat:tomcat /etc/${TOMCAT_NAME} |
223 |
ewarn "Owner ship changed to tomcat:tomcat. Temp hack/fix." |
224 |
|
225 |
# bug #180519 |
226 |
if [[ -e "${ROOT}var/lib/${TOMCAT_NAME}/webapps/manager" ]] ; then |
227 |
elog "The latest webapp has NOT been installed into" |
228 |
elog "${ROOT}var/lib/${TOMCAT_NAME}/webapps/ because directory already exists" |
229 |
elog "and we do not want to overwrite any files you have put there." |
230 |
elog |
231 |
elog "Installing latest webapp into" |
232 |
elog "${ROOT}usr/share/${TOMCAT_NAME}/webapps instead" |
233 |
elog |
234 |
elog "Manager Symbolic Links NOT created." |
235 |
|
236 |
else |
237 |
einfo "Installing latest webroot to ${ROOT}/${WEBAPPS_DIR}" |
238 |
cp -pR "${ROOT}"/usr/share/${TOMCAT_NAME}/webapps/* \ |
239 |
"${ROOT}""${WEBAPPS_DIR}" |
240 |
# link the manager's context to the right position |
241 |
dosym ${TOMCAT_HOME}/webapps/host-manager/META-INF/context.xml /etc/${TOMCAT_NAME}/Catalina/localhost/host-manager.xml |
242 |
dosym ${TOMCAT_HOME}/webapps/manager/META-INF/context.xml /etc/${TOMCAT_NAME}/Catalina/localhost/manager.xml |
243 |
fi |
244 |
|
245 |
elog |
246 |
elog " This ebuild implements a FHS compliant layout for tomcat" |
247 |
elog " Please read http://www.gentoo.org/proj/en/java/tomcat6-guide.xml" |
248 |
elog " for more information." |
249 |
elog |
250 |
ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar" |
251 |
ewarn "from upstream binary if you need it. Gentoo Bug # 144276" |
252 |
elog |
253 |
|
254 |
ewarn "The manager webapps have known exploits, please refer to" |
255 |
ewarn "http://cve.mitre.org/cgi-bin/cvename.cgi?name=2007-2450" |
256 |
|
257 |
if use examples ; then |
258 |
ewarn |
259 |
ewarn "The examples webapp has a known exploit, please refer to" |
260 |
ewarn "http://cve.mitre.org/cgi-bin/cvename.cgi?name=2007-2449" |
261 |
ewarn |
262 |
fi |
263 |
|
264 |
elog |
265 |
elog " Please report any bugs to http://bugs.gentoo.org/" |
266 |
elog |
267 |
} |