Gentoo Archives: gentoo-commits

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