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