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