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