Gentoo Archives: gentoo-commits

From: "Matthew Marlow (mattm)" <mattm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-analyzer/zabbix: zabbix-2.0.9_rc1.ebuild ChangeLog
Date: Wed, 02 Oct 2013 20:13:27
Message-Id: 20131002201321.D82AC2004C@flycatcher.gentoo.org
1 mattm 13/10/02 20:13:21
2
3 Modified: ChangeLog
4 Added: zabbix-2.0.9_rc1.ebuild
5 Log:
6 Bump for security vulnerability, Bug 486696 and ZBX-7091, https://bugs.gentoo.org/show_bug.cgi?id=486696
7 Temporarily no keywords on package while testing.
8
9 (Portage version: 2.1.11.62/cvs/Linux x86_64, signed Manifest commit with key 786037A7)
10
11 Revision Changes Path
12 1.132 net-analyzer/zabbix/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/ChangeLog?rev=1.132&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/ChangeLog?rev=1.132&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/ChangeLog?r1=1.131&r2=1.132
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/ChangeLog,v
21 retrieving revision 1.131
22 retrieving revision 1.132
23 diff -u -r1.131 -r1.132
24 --- ChangeLog 22 Sep 2013 13:36:41 -0000 1.131
25 +++ ChangeLog 2 Oct 2013 20:13:21 -0000 1.132
26 @@ -1,6 +1,13 @@
27 # ChangeLog for net-analyzer/zabbix
28 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/ChangeLog,v 1.131 2013/09/22 13:36:41 mattm Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/ChangeLog,v 1.132 2013/10/02 20:13:21 mattm Exp $
31 +
32 +*zabbix-2.0.9_rc1 (02 Oct 2013)
33 +
34 + 02 Oct 2013; Matthew Marlowe <mattm@g.o> +zabbix-2.0.9_rc1.ebuild:
35 + Bump for security vulnerability, Bug 486696 and ZBX-7091,
36 + https://bugs.gentoo.org/show_bug.cgi?id=486696 Temporarily no keywords on
37 + package while testing.
38
39 22 Sep 2013; Matthew Marlowe <mattm@g.o> -zabbix-2.0.4-r1.ebuild,
40 -zabbix-2.0.5.ebuild, -zabbix-2.0.6-r5.ebuild:
41
42
43
44 1.1 net-analyzer/zabbix/zabbix-2.0.9_rc1.ebuild
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/zabbix-2.0.9_rc1.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/zabbix-2.0.9_rc1.ebuild?rev=1.1&content-type=text/plain
48
49 Index: zabbix-2.0.9_rc1.ebuild
50 ===================================================================
51 # Copyright 1999-2013 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/zabbix-2.0.9_rc1.ebuild,v 1.1 2013/10/02 20:13:21 mattm Exp $
54
55 EAPI="5"
56
57 # needed to make webapp-config dep optional
58 WEBAPP_OPTIONAL="yes"
59 inherit flag-o-matic webapp depend.php autotools java-pkg-opt-2 user toolchain-funcs
60
61 DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers."
62 HOMEPAGE="http://www.zabbix.com/"
63 MY_P=${P/_/}
64 SRC_URI="http://prdownloads.sourceforge.net/zabbix/${MY_P}.tar.gz"
65 LICENSE="GPL-2"
66 SLOT="0"
67 WEBAPP_MANUAL_SLOT="yes"
68 KEYWORDS=""
69 IUSE="agent java curl frontend ipv6 jabber ldap mysql openipmi oracle postgres proxy server ssh snmp sqlite iodbc odbc static"
70
71 COMMON_DEPEND="snmp? ( net-analyzer/net-snmp )
72 ldap? (
73 net-nds/openldap
74 =dev-libs/cyrus-sasl-2*
75 net-libs/gnutls
76 )
77 mysql? ( >=virtual/mysql-5.0 )
78 sqlite? ( >=dev-db/sqlite-3.3.5 )
79 postgres? ( >=dev-db/postgresql-base-8.3.0 )
80 oracle? ( >=dev-db/oracle-instantclient-basic-10.0.0.0 )
81 jabber? ( dev-libs/iksemel )
82 curl? ( net-misc/curl )
83 openipmi? ( sys-libs/openipmi )
84 ssh? ( net-libs/libssh2 )
85 java? ( >=virtual/jdk-1.4 )
86 odbc? (
87 iodbc? ( dev-db/libiodbc )
88 !iodbc? ( dev-db/unixODBC )
89 )"
90
91 RDEPEND="${COMMON_DEPEND}
92 proxy? ( <=net-analyzer/fping-2.9 )
93 server? ( <=net-analyzer/fping-2.9
94 app-admin/webapp-config )
95 java? (
96 >=virtual/jre-1.4
97 dev-java/slf4j-api
98 dev-java/json-simple
99 )
100 frontend? (
101 dev-lang/php[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode]
102 || ( dev-lang/php[apache2] dev-lang/php[cgi] dev-lang/php[fpm] )
103 media-libs/gd[png]
104 app-admin/webapp-config )"
105 DEPEND="${COMMON_DEPEND}
106 virtual/pkgconfig"
107
108 S=${WORKDIR}/${MY_P}
109
110 ZABBIXJAVA_BASE="opt/zabbix_java"
111
112 java_prepare() {
113 cd "${S}/src/zabbix_java/lib"
114 rm -v *.jar || die
115
116 java-pkg_jar-from slf4j-api
117 java-pkg_jar-from json-simple
118 }
119
120 src_prepare() {
121 epatch "${FILESDIR}/2.0/patches/zbx282.patch"
122 eautoreconf
123 }
124
125 pkg_setup() {
126 if use server || use proxy ; then
127 local dbnum dbtypes="mysql oracle postgres sqlite" dbtype
128 declare -i dbnum=0
129 for dbtype in ${dbtypes}; do
130 use ${dbtype} && let dbnum++
131 done
132 if [ ${dbnum} -gt 1 ]; then
133 eerror
134 eerror "You can't use more than one database type in Zabbix."
135 eerror "Select exactly one database type out of these: ${dbtypes}"
136 eerror
137 die "Multiple database types selected."
138 elif [ ${dbnum} -lt 1 ]; then
139 eerror
140 eerror "Select exactly one database type out of these: ${dbtypes}"
141 eerror
142 die "No database type selected."
143 fi
144 if use oracle; then
145 if [ -z "${ORACLE_HOME}" ]; then
146 eerror
147 eerror "The environment variable ORACLE_HOME must be set"
148 eerror "and point to the correct location."
149 eerror "It looks like you don't have Oracle installed."
150 eerror
151 die "Environment variable ORACLE_HOME is not set"
152 fi
153 if has_version 'dev-db/oracle-instantclient-basic'; then
154 ewarn
155 ewarn "Please ensure you have a full install of the Oracle client."
156 ewarn "dev-db/oracle-instantclient* is NOT sufficient."
157 ewarn
158 fi
159 fi
160 fi
161
162 if use frontend; then
163 webapp_pkg_setup
164 fi
165
166 enewgroup zabbix
167 enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix
168 }
169
170 pkg_postinst() {
171 if use server || use proxy ; then
172 elog
173 elog "You may need to configure your database for Zabbix,"
174 elog "if you have not already done so. Most minor version"
175 elog "zabbix updates do not require db changes. However, "
176 elog "you should read the release notes to be sure."
177 elog
178 elog "Have a look at /usr/share/zabbix for"
179 elog "database creation and upgrades."
180 elog
181 elog "Execute schema, images, and data sql files in that order."
182 elog
183 elog "For more info read the Zabbix manual at"
184 elog "http://www.zabbix.com/documentation.php"
185 elog
186 elog "New use flags: java, odbc, iodbc"
187 elog
188
189 zabbix_homedir=$(egethome zabbix)
190 if [ -n "${zabbix_homedir}" ] && \
191 [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then
192 ewarn
193 ewarn "The user 'zabbix' should have his homedir changed"
194 ewarn "to /var/lib/zabbix/home if you want to use"
195 ewarn "custom alert scripts."
196 ewarn
197 ewarn "A real homedir might be needed for configfiles"
198 ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when"
199 ewarn "using sendxmpp for Jabber alerts)."
200 ewarn
201 ewarn "To change the homedir use:"
202 ewarn " usermod -d /var/lib/zabbix/home zabbix"
203 ewarn
204 fi
205 fi
206
207 if use server; then
208 elog
209 elog "For distributed monitoring you have to run:"
210 elog
211 elog "zabbix_server -n <nodeid>"
212 elog
213 elog "This will convert database data for use with Node ID"
214 elog "and also adds a local node."
215 elog
216 fi
217
218 elog "--"
219 elog
220 elog "You may need to add these lines to /etc/services:"
221 elog
222 elog "zabbix-agent 10050/tcp Zabbix Agent"
223 elog "zabbix-agent 10050/udp Zabbix Agent"
224 elog "zabbix-trapper 10051/tcp Zabbix Trapper"
225 elog "zabbix-trapper 10051/udp Zabbix Trapper"
226 elog
227
228 elog "Zabbix is incompatible with fping 3.0 - (Zabbix bug #ZBX-4894)."
229 elog
230 elog "Feel free to download or contribute gentoo specific zabbix templates"
231 elog "via https://github.com/deploylinux/gentooZabbixTemplates (WIP). We may"
232 elog "eventually create a seperate package in portage for them."
233
234 # repeat fowners/fperms functionality from src_install()
235 # here to catch wrong permissions on existing files in
236 # the live filesystem (yeah, that sucks).
237 chown -R zabbix:zabbix \
238 "${ROOT}"/etc/zabbix \
239 "${ROOT}"/var/lib/zabbix \
240 "${ROOT}"/var/lib/zabbix/home \
241 "${ROOT}"/var/lib/zabbix/scripts \
242 "${ROOT}"/var/log/zabbix
243 chmod 0750 \
244 "${ROOT}"/etc/zabbix \
245 "${ROOT}"/var/lib/zabbix \
246 "${ROOT}"/var/lib/zabbix/home \
247 "${ROOT}"/var/lib/zabbix/scripts \
248 "${ROOT}"/var/log/zabbix
249
250 chmod 0640 \
251 "${ROOT}"/etc/zabbix/zabbix_*
252
253 if use server || use proxy ; then
254 # check for fping
255 fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null)
256 case "${fping_perms}" in
257 4[157][157][157])
258 ;;
259 *)
260 ewarn
261 ewarn "If you want to use the checks 'icmpping' and 'icmppingsec',"
262 ewarn "you have to make /usr/sbin/fping setuid root and executable"
263 ewarn "by everyone. Run the following command to fix it:"
264 ewarn
265 ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping"
266 ewarn
267 ewarn "Please be aware that this might impose a security risk,"
268 ewarn "depending on the code quality of fping."
269 ewarn
270 ebeep 3
271 epause 5
272 ;;
273 esac
274 fi
275 }
276
277 src_configure() {
278
279 local myconf
280
281 if use odbc && use iodbc ; then
282 myconf="${myconf} --with-iodbc --without-unixodbc"
283 elif use odbc && ! use iodbc; then
284 myconf="${myconf} --with-unixodbc --without-iodbc"
285 else
286 myconf="${myconf} --without-unixodbc --without-iodbc"
287 fi
288
289 econf \
290 $myconf \
291 $(use_enable server) \
292 $(use_enable proxy) \
293 $(use_enable agent) \
294 $(use_enable ipv6) \
295 $(use_enable static) \
296 $(use_enable java) \
297 $(use_with ldap) \
298 $(use_with snmp net-snmp) \
299 $(use_with mysql) \
300 $(use_with postgres postgresql) \
301 $(use_with oracle) \
302 $(use_with sqlite sqlite3) \
303 $(use_with jabber) \
304 $(use_with curl libcurl) \
305 $(use_with openipmi openipmi) \
306 $(use_with ssh ssh2) \
307 || die "econf failed"
308 }
309
310 src_install() {
311 dodir \
312 /etc/zabbix \
313 /var/lib/zabbix \
314 /var/lib/zabbix/home \
315 /var/lib/zabbix/scripts \
316 /var/log/zabbix
317
318 keepdir \
319 /etc/zabbix \
320 /var/lib/zabbix \
321 /var/lib/zabbix/home \
322 /var/lib/zabbix/scripts \
323 /var/log/zabbix
324
325 if use server; then
326 insinto /etc/zabbix
327 doins \
328 "${FILESDIR}/1.6.6"/zabbix_server.conf \
329 "${FILESDIR}/1.6.6"/zabbix_trapper.conf
330 doinitd \
331 "${FILESDIR}/2.0"/init.d/zabbix-server
332 dosbin \
333 src/zabbix_server/zabbix_server
334 dodir \
335 /usr/share/zabbix
336 insinto /usr/share/zabbix
337 doins -r \
338 database \
339 upgrades
340 fowners zabbix:zabbix \
341 /etc/zabbix/zabbix_server.conf \
342 /etc/zabbix/zabbix_trapper.conf
343 fperms 0640 \
344 /etc/zabbix/zabbix_server.conf \
345 /etc/zabbix/zabbix_trapper.conf
346 fi
347
348 if use proxy; then
349 doinitd \
350 "${FILESDIR}/2.0"/init.d/zabbix-proxy
351 dosbin \
352 src/zabbix_proxy/zabbix_proxy
353 insinto /etc/zabbix
354 doins \
355 "${FILESDIR}/2.0"/zabbix_proxy.conf
356 dodir \
357 /usr/share/zabbix
358 insinto /usr/share/zabbix
359 doins -r \
360 database \
361 create
362 fi
363
364 if use agent; then
365 insinto /etc/zabbix
366 doins \
367 "${FILESDIR}/1.6.6"/zabbix_agent.conf \
368 "${FILESDIR}/1.6.6"/zabbix_agentd.conf
369 doinitd \
370 "${FILESDIR}/2.0"/init.d/zabbix-agentd
371 dosbin \
372 src/zabbix_agent/zabbix_agent \
373 src/zabbix_agent/zabbix_agentd
374 dobin \
375 src/zabbix_sender/zabbix_sender \
376 src/zabbix_get/zabbix_get
377 fowners zabbix:zabbix \
378 /etc/zabbix/zabbix_agent.conf \
379 /etc/zabbix/zabbix_agentd.conf
380 fperms 0640 \
381 /etc/zabbix/zabbix_agent.conf \
382 /etc/zabbix/zabbix_agentd.conf
383 fi
384
385 fowners zabbix:zabbix \
386 /etc/zabbix \
387 /var/lib/zabbix \
388 /var/lib/zabbix/home \
389 /var/lib/zabbix/scripts \
390 /var/log/zabbix
391 fperms 0750 \
392 /etc/zabbix \
393 /var/lib/zabbix \
394 /var/lib/zabbix/home \
395 /var/lib/zabbix/scripts \
396 /var/log/zabbix
397
398 dodoc README INSTALL NEWS ChangeLog \
399 conf/zabbix_agent.conf \
400 conf/zabbix_agentd.conf \
401 conf/zabbix_proxy.conf \
402 conf/zabbix_agentd/userparameter_examples.conf \
403 conf/zabbix_agentd/userparameter_mysql.conf \
404 conf/zabbix_server.conf
405
406 if use frontend; then
407 webapp_src_preinst
408 cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}"
409 webapp_postinst_txt en "${FILESDIR}/"1.6.6/postinstall-en.txt
410 webapp_configfile \
411 "${MY_HTDOCSDIR}"/include/db.inc.php \
412 "${MY_HTDOCSDIR}"/include/config.inc.php
413 webapp_src_install
414 fi
415
416 if use java; then
417 dodir \
418 /${ZABBIXJAVA_BASE} \
419 /${ZABBIXJAVA_BASE}/bin \
420 /${ZABBIXJAVA_BASE}/lib
421 keepdir /${ZABBIXJAVA_BASE}
422 exeinto /${ZABBIXJAVA_BASE}/bin
423 doexe src/zabbix_java/bin/zabbix-java-gateway-${PV}.jar
424 exeinto /${ZABBIXJAVA_BASE}/lib
425 doexe \
426 src/zabbix_java/lib/logback-classic-0.9.27.jar \
427 src/zabbix_java/lib/logback-console.xml \
428 src/zabbix_java/lib/logback-core-0.9.27.jar \
429 src/zabbix_java/lib/logback.xml \
430 src/zabbix_java/lib/org-json-2010-12-28.jar \
431 src/zabbix_java/lib/slf4j-api-1.6.1.jar
432 exeinto /${ZABBIXJAVA_BASE}/
433 doexe \
434 src/zabbix_java/settings.sh \
435 src/zabbix_java/startup.sh \
436 src/zabbix_java/shutdown.sh
437 fowners -R zabbix:zabbix /${ZABBIXJAVA_BASE}
438 fi
439
440 }
441
442 src_compile() {
443 if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
444 emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" || die "emake failed"
445 fi
446 }