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