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