1 |
fordfrog 11/12/24 19:43:50 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: tomcat-6.0.35.ebuild |
5 |
Log: |
6 |
www-servers/tomcat: version bump and some fixes |
7 |
|
8 |
(Portage version: 2.1.10.43/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.273 www-servers/tomcat/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/tomcat/ChangeLog?rev=1.273&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/tomcat/ChangeLog?rev=1.273&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/tomcat/ChangeLog?r1=1.272&r2=1.273 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v |
20 |
retrieving revision 1.272 |
21 |
retrieving revision 1.273 |
22 |
diff -u -r1.272 -r1.273 |
23 |
--- ChangeLog 24 Dec 2011 18:25:38 -0000 1.272 |
24 |
+++ ChangeLog 24 Dec 2011 19:43:50 -0000 1.273 |
25 |
@@ -1,6 +1,14 @@ |
26 |
# ChangeLog for www-servers/tomcat |
27 |
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v 1.272 2011/12/24 18:25:38 fordfrog Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v 1.273 2011/12/24 19:43:50 fordfrog Exp $ |
30 |
+ |
31 |
+*tomcat-6.0.35 (24 Dec 2011) |
32 |
+ |
33 |
+ 24 Dec 2011; Miroslav Šulc <fordfrog@g.o> +files/6/tomcat.init.4, |
34 |
+ +tomcat-6.0.35.ebuild: |
35 |
+ Version bump. This release fixes CVE-2011-3190. Also fixed issue with |
36 |
+ documentation installation (bug #357437, thanks to Matt O |
37 |
+ <locke105@×××××.com> for the fix). Also fixed warnings from init script. |
38 |
|
39 |
*tomcat-7.0.23-r2 (24 Dec 2011) |
40 |
|
41 |
|
42 |
|
43 |
|
44 |
1.1 www-servers/tomcat/tomcat-6.0.35.ebuild |
45 |
|
46 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/tomcat/tomcat-6.0.35.ebuild?rev=1.1&view=markup |
47 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/tomcat/tomcat-6.0.35.ebuild?rev=1.1&content-type=text/plain |
48 |
|
49 |
Index: tomcat-6.0.35.ebuild |
50 |
=================================================================== |
51 |
# Copyright 1999-2011 Gentoo Foundation |
52 |
# Distributed under the terms of the GNU General Public License v2 |
53 |
# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/tomcat-6.0.35.ebuild,v 1.1 2011/12/24 19:43:50 fordfrog Exp $ |
54 |
|
55 |
EAPI=2 |
56 |
JAVA_PKG_IUSE="doc examples source test" |
57 |
WANT_ANT_TASKS="ant-trax" |
58 |
|
59 |
inherit eutils java-pkg-2 java-ant-2 |
60 |
|
61 |
DESCRIPTION="Tomcat Servlet-2.5/JSP-2.1 Container" |
62 |
|
63 |
MY_P="apache-${P}-src" |
64 |
SLOT="6" |
65 |
SRC_URI="mirror://apache/${PN}/${PN}-6/v${PV/_/-}/src/${MY_P}.tar.gz" |
66 |
HOMEPAGE="http://tomcat.apache.org/" |
67 |
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd" |
68 |
LICENSE="Apache-2.0" |
69 |
|
70 |
IUSE="" |
71 |
|
72 |
COMMON_DEPEND="dev-java/eclipse-ecj:3.3 |
73 |
dev-java/ant-eclipse-ecj:3.3 |
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=" |
81 |
!<dev-java/tomcat-native-1.1.20 |
82 |
>=virtual/jre-1.5 |
83 |
>=dev-java/commons-daemon-1.0.1 |
84 |
dev-java/ant-core |
85 |
${COMMON_DEPEND}" |
86 |
|
87 |
DEPEND=">=virtual/jdk-1.5 |
88 |
${COMMON_DEPEND} |
89 |
test? ( =dev-java/junit-3.8* )" |
90 |
|
91 |
S=${WORKDIR}/${MY_P} |
92 |
|
93 |
TOMCAT_NAME="${PN}-${SLOT}" |
94 |
TOMCAT_HOME="/usr/share/${TOMCAT_NAME}" |
95 |
WEBAPPS_DIR="/var/lib/${TOMCAT_NAME}/webapps" |
96 |
|
97 |
# TODO: Fails to find PrettyPrint in with python 2.6 and xml-rewriter-3 |
98 |
# Find out why so |
99 |
JAVA_ANT_CELEMENT_REWRITER="true" |
100 |
JAVA_ANT_REWRITE_CLASSPATH="true" |
101 |
|
102 |
EANT_NEEDS_TOOLS="true" |
103 |
EANT_GENTOO_CLASSPATH="tomcat-servlet-api-2.5,eclipse-ecj-3.3" |
104 |
|
105 |
EANT_BUILD_TARGET="build-only" |
106 |
EANT_DOC_TARGET="build-docs" |
107 |
|
108 |
EANT_EXTRA_ARGS="-Dbase.path=${T} -Dversion=${PV} -Dversion.number=${PV} |
109 |
-Dcompile.debug=false -Djsp-api.jar=jsp-api.jar -Dservlet-api.jar=servlet-api.jar |
110 |
-Dant.jar=ant.jar" |
111 |
|
112 |
pkg_setup() { |
113 |
java-pkg-2_pkg_setup |
114 |
enewgroup tomcat 265 |
115 |
enewuser tomcat 265 -1 /dev/null tomcat |
116 |
} |
117 |
|
118 |
java_prepare() { |
119 |
rm -v webapps/examples/WEB-INF/lib/*.jar || die |
120 |
|
121 |
# bug # 178980 and #312293 |
122 |
if use amd64; then |
123 |
java-pkg_force-compiler ecj-3.3 |
124 |
fi |
125 |
|
126 |
if ! use doc; then |
127 |
EANT_EXTRA_ARGS+=" -Dnobuild.docs=true" |
128 |
fi |
129 |
|
130 |
EANT_EXTRA_ARGS+=" -Djdt.jar=$(java-pkg_getjar eclipse-ecj-3.3 ecj.jar)" |
131 |
java-pkg_jarfrom --build-only ant-core ant.jar |
132 |
} |
133 |
|
134 |
src_install() { |
135 |
cd "${S}/bin" |
136 |
rm -f *.bat |
137 |
chmod 755 *.sh |
138 |
|
139 |
# register jars per bug #171496 |
140 |
cd "${S}/output/build/lib/" |
141 |
for jar in *.jar; do |
142 |
java-pkg_dojar ${jar} |
143 |
done |
144 |
|
145 |
local CATALINA_BASE=/var/lib/${TOMCAT_NAME}/ |
146 |
|
147 |
# init.d, conf.d |
148 |
newinitd "${FILESDIR}"/${SLOT}/tomcat.init.4 ${TOMCAT_NAME} |
149 |
newconfd "${FILESDIR}"/${SLOT}/tomcat.conf ${TOMCAT_NAME} |
150 |
|
151 |
# create dir structure |
152 |
dodir /usr/share/${TOMCAT_NAME} |
153 |
|
154 |
diropts -m750 -o tomcat -g tomcat |
155 |
dodir /etc/${TOMCAT_NAME} |
156 |
keepdir ${WEBAPPS_DIR} |
157 |
|
158 |
diropts -m755 -o tomcat -g tomcat |
159 |
dodir ${CATALINA_BASE} |
160 |
|
161 |
diropts -m775 -o tomcat -g tomcat |
162 |
dodir /etc/${TOMCAT_NAME}/Catalina/localhost |
163 |
keepdir /var/log/${TOMCAT_NAME}/ |
164 |
keepdir /var/run/${TOMCAT_NAME}/ |
165 |
keepdir /var/tmp/${TOMCAT_NAME}/ |
166 |
|
167 |
cd "${S}" |
168 |
# fix context's so webapps will be deployed |
169 |
sed -i -e 's:Context a:Context docBase="${catalina.home}/webapps/host-manager" a:' "${S}"/webapps/host-manager/META-INF/context.xml |
170 |
sed -i -e 's:Context a:Context docBase="${catalina.home}/webapps/manager" a:' "${S}"/webapps/manager/META-INF/context.xml |
171 |
|
172 |
# replace the default pw with a random one, see #92281 |
173 |
local randpw=$(echo ${RANDOM}|md5sum|cut -c 1-15) |
174 |
sed -e s:SHUTDOWN:${randpw}: -i conf/server.xml |
175 |
|
176 |
# copy over the directories |
177 |
chown -R tomcat:tomcat webapps/* conf/* |
178 |
cp -pR conf/* "${D}"/etc/${TOMCAT_NAME} || die "failed to copy conf" |
179 |
cp -pPR output/build/bin "${D}"/usr/share/${TOMCAT_NAME} \ |
180 |
|| die "failed to copy" |
181 |
# webapps get stored in /usr/share/${TOMCAT_NAME}/webapps |
182 |
cd "${S}"/webapps || die |
183 |
ebegin "Installing webapps to /usr/share/${TOMCAT_NAME}" |
184 |
|
185 |
dodir /usr/share/${TOMCAT_NAME}/webapps |
186 |
cp -pR ROOT "${D}"/usr/share/${TOMCAT_NAME}/webapps || die |
187 |
cp -pR host-manager "${D}"/usr/share/${TOMCAT_NAME}/webapps || die |
188 |
cp -pR manager "${D}"/usr/share/${TOMCAT_NAME}/webapps || die |
189 |
if use doc; then |
190 |
cp -pR "${S}"/output/build/webapps/docs "${D}"/usr/share/${TOMCAT_NAME}/webapps || die |
191 |
fi |
192 |
if use examples; then |
193 |
cd "${S}"/webapps/examples/WEB-INF/lib |
194 |
java-pkg_jar-from jakarta-jstl jstl.jar |
195 |
java-pkg_jar-from jakarta-jstl standard.jar |
196 |
cd "${S}"/webapps |
197 |
cp -pR examples "${D}"/usr/share/${TOMCAT_NAME}/webapps || die |
198 |
fi |
199 |
|
200 |
# replace catalina.policy with gentoo specific one bug #176701 |
201 |
# cp ${FILESDIR}/${SLOT}/catalina.policy "${D}"/etc/${TOMCAT_NAME} \ |
202 |
# || die "failed to replace catalina.policy" |
203 |
|
204 |
# cp "${T}"/tomcat6-deps/jdt/jasper-jdt.jar "${D}"/usr/share/${TOMCAT_NAME}/lib \ |
205 |
# || die "failed to copy" |
206 |
|
207 |
cd "${D}/usr/share/${TOMCAT_NAME}/lib" || die |
208 |
java-pkg_jar-from tomcat-servlet-api-2.5 |
209 |
java-pkg_jar-from eclipse-ecj-3.3 |
210 |
|
211 |
# symlink the directories to make CATALINA_BASE possible |
212 |
dosym /etc/${TOMCAT_NAME} ${CATALINA_BASE}/conf |
213 |
dosym /var/log/${TOMCAT_NAME} ${CATALINA_BASE}/logs |
214 |
dosym /var/tmp/${TOMCAT_NAME} ${CATALINA_BASE}/temp |
215 |
dosym /var/run/${TOMCAT_NAME} ${CATALINA_BASE}/work |
216 |
|
217 |
dodoc "${S}"/{RELEASE-NOTES,RUNNING.txt} |
218 |
fperms 640 /etc/${TOMCAT_NAME}/tomcat-users.xml |
219 |
|
220 |
#install *.sh scripts bug #278059 |
221 |
exeinto /usr/share/${TOMCAT_NAME}/bin |
222 |
doexe "${S}"/bin/*.sh |
223 |
} |
224 |
|
225 |
pkg_postinst() { |
226 |
ewarn "Changing ownership recursively on /etc/${TOMCAT_NAME}" |
227 |
# temp fix for bug #176097 |
228 |
chown -fR tomcat:tomcat /etc/${TOMCAT_NAME} |
229 |
ewarn "Owner ship changed to tomcat:tomcat. Temp hack/fix." |
230 |
|
231 |
# bug #180519 |
232 |
if [[ -e "${ROOT}var/lib/${TOMCAT_NAME}/webapps/manager" ]] ; then |
233 |
elog "The latest webapp has NOT been installed into" |
234 |
elog "${ROOT}var/lib/${TOMCAT_NAME}/webapps/ because directory already exists" |
235 |
elog "and we do not want to overwrite any files you have put there." |
236 |
elog |
237 |
elog "Installing latest webapp into" |
238 |
elog "${ROOT}usr/share/${TOMCAT_NAME}/webapps instead" |
239 |
elog |
240 |
elog "Manager Symbolic Links NOT created." |
241 |
else |
242 |
einfo "Installing latest webroot to ${ROOT}/${WEBAPPS_DIR}" |
243 |
cp -pR "${ROOT}"/usr/share/${TOMCAT_NAME}/webapps/* \ |
244 |
"${ROOT}""${WEBAPPS_DIR}" |
245 |
# link the manager's context to the right position |
246 |
dosym ${TOMCAT_HOME}/webapps/host-manager/META-INF/context.xml /etc/${TOMCAT_NAME}/Catalina/localhost/host-manager.xml |
247 |
dosym ${TOMCAT_HOME}/webapps/manager/META-INF/context.xml /etc/${TOMCAT_NAME}/Catalina/localhost/manager.xml |
248 |
fi |
249 |
|
250 |
elog |
251 |
elog " This ebuild implements a FHS compliant layout for tomcat" |
252 |
elog " Please read http://www.gentoo.org/proj/en/java/tomcat6-guide.xml" |
253 |
elog " for more information." |
254 |
elog |
255 |
ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar" |
256 |
ewarn "from upstream binary if you need it. Gentoo Bug # 144276" |
257 |
elog |
258 |
|
259 |
ewarn "The manager webapps have known exploits, please refer to" |
260 |
ewarn "http://cve.mitre.org/cgi-bin/cvename.cgi?name=2007-2450" |
261 |
|
262 |
if use examples ; then |
263 |
ewarn |
264 |
ewarn "The examples webapp has a known exploit, please refer to" |
265 |
ewarn "http://cve.mitre.org/cgi-bin/cvename.cgi?name=2007-2449" |
266 |
ewarn |
267 |
fi |
268 |
|
269 |
elog |
270 |
elog " Please report any bugs to http://bugs.gentoo.org/" |
271 |
elog |
272 |
} |