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