1 |
patrick 11/07/29 07:09:46 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: zabbix-1.9.5.ebuild zabbix-1.8.6_rc1.ebuild |
5 |
Log: |
6 |
Bump for #376847 and 1.9 alpha update |
7 |
|
8 |
(Portage version: 2.2.0_alpha47/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.53 net-analyzer/zabbix/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/ChangeLog?rev=1.53&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/ChangeLog?rev=1.53&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/ChangeLog?r1=1.52&r2=1.53 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/ChangeLog,v |
20 |
retrieving revision 1.52 |
21 |
retrieving revision 1.53 |
22 |
diff -u -r1.52 -r1.53 |
23 |
--- ChangeLog 28 Jul 2011 20:31:22 -0000 1.52 |
24 |
+++ ChangeLog 29 Jul 2011 07:09:46 -0000 1.53 |
25 |
@@ -1,6 +1,13 @@ |
26 |
# ChangeLog for net-analyzer/zabbix |
27 |
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/ChangeLog,v 1.52 2011/07/28 20:31:22 patrick Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/ChangeLog,v 1.53 2011/07/29 07:09:46 patrick Exp $ |
30 |
+ |
31 |
+*zabbix-1.9.5 (29 Jul 2011) |
32 |
+*zabbix-1.8.6_rc1 (29 Jul 2011) |
33 |
+ |
34 |
+ 29 Jul 2011; Patrick Lauer <patrick@g.o> +zabbix-1.8.6_rc1.ebuild, |
35 |
+ +zabbix-1.9.5.ebuild: |
36 |
+ Bump for #376847 and 1.9 alpha update |
37 |
|
38 |
*zabbix-1.9.4 (28 Jul 2011) |
39 |
|
40 |
|
41 |
|
42 |
|
43 |
1.1 net-analyzer/zabbix/zabbix-1.9.5.ebuild |
44 |
|
45 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/zabbix-1.9.5.ebuild?rev=1.1&view=markup |
46 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/zabbix-1.9.5.ebuild?rev=1.1&content-type=text/plain |
47 |
|
48 |
Index: zabbix-1.9.5.ebuild |
49 |
=================================================================== |
50 |
# Copyright 1999-2011 Gentoo Foundation |
51 |
# Distributed under the terms of the GNU General Public License v2 |
52 |
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/zabbix-1.9.5.ebuild,v 1.1 2011/07/29 07:09:46 patrick 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 |
59 |
|
60 |
DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers." |
61 |
HOMEPAGE="http://www.zabbix.com/" |
62 |
SRC_URI="http://prdownloads.sourceforge.net/zabbix/${P}.tar.gz" |
63 |
LICENSE="GPL-2" |
64 |
SLOT="0" |
65 |
WEBAPP_MANUAL_SLOT="yes" |
66 |
KEYWORDS="~amd64 ~ppc ~x86" |
67 |
IUSE="agent curl frontend ipv6 jabber ldap mysql openipmi oracle postgres proxy server -ssh snmp +sqlite3" |
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 ) |
76 |
sqlite3? ( =dev-db/sqlite-3* ) |
77 |
postgres? ( dev-db/postgresql-base ) |
78 |
jabber? ( dev-libs/iksemel ) |
79 |
curl? ( net-misc/curl ) |
80 |
openipmi? ( sys-libs/openipmi ) |
81 |
ssh? ( net-libs/libssh2 )" |
82 |
|
83 |
RDEPEND="${COMMON_DEPEND} |
84 |
proxy? ( net-analyzer/fping ) |
85 |
server? ( net-analyzer/fping |
86 |
app-admin/webapp-config ) |
87 |
frontend? ( dev-lang/php[bcmath,ctype,sockets,gd,truetype,xml,session] |
88 |
media-libs/gd[png] |
89 |
app-admin/webapp-config )" |
90 |
DEPEND="${COMMON_DEPEND} |
91 |
jabber? ( dev-util/pkgconfig )" |
92 |
|
93 |
use frontend && need_php_httpd |
94 |
|
95 |
src_prepare() { |
96 |
epatch "${FILESDIR}/${PN}-1.8.3-as-needed.patch" |
97 |
eautoreconf |
98 |
} |
99 |
|
100 |
pkg_setup() { |
101 |
if use server || use proxy ; then |
102 |
local dbnum dbtypes="mysql oracle postgres sqlite3" dbtype |
103 |
declare -i dbnum=0 |
104 |
for dbtype in ${dbtypes}; do |
105 |
use ${dbtype} && let dbnum++ |
106 |
done |
107 |
if [ ${dbnum} -gt 1 ]; then |
108 |
eerror |
109 |
eerror "You can't use more than one database type in Zabbix." |
110 |
eerror "Select exactly one database type out of these: ${dbtypes}" |
111 |
eerror |
112 |
die "Multiple database types selected." |
113 |
elif [ ${dbnum} -lt 1 ]; then |
114 |
eerror |
115 |
eerror "Select exactly one database type out of these: ${dbtypes}" |
116 |
eerror |
117 |
die "No database type selected." |
118 |
fi |
119 |
if use oracle; then |
120 |
if [ -z "${ORACLE_HOME}" ]; then |
121 |
eerror |
122 |
eerror "The environment variable ORACLE_HOME must be set" |
123 |
eerror "and point to the correct location." |
124 |
eerror "It looks like you don't have Oracle installed." |
125 |
eerror |
126 |
die "Environment variable ORACLE_HOME is not set" |
127 |
fi |
128 |
if has_version 'dev-db/oracle-instantclient-basic'; then |
129 |
ewarn |
130 |
ewarn "Please ensure you have a full install of the Oracle client." |
131 |
ewarn "dev-db/oracle-instantclient* is NOT sufficient." |
132 |
ewarn |
133 |
fi |
134 |
fi |
135 |
fi |
136 |
|
137 |
if use frontend; then |
138 |
webapp_pkg_setup |
139 |
fi |
140 |
|
141 |
enewgroup zabbix |
142 |
enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix |
143 |
} |
144 |
|
145 |
pkg_postinst() { |
146 |
if use server || use proxy ; then |
147 |
elog |
148 |
elog "You need to configure your database for Zabbix." |
149 |
elog |
150 |
elog "Have a look at /usr/share/zabbix/database for" |
151 |
elog "database creation and upgrades." |
152 |
elog |
153 |
elog "For more info read the Zabbix manual at" |
154 |
elog "http://www.zabbix.com/documentation.php" |
155 |
elog |
156 |
|
157 |
zabbix_homedir="$(egetent passwd zabbix | cut -d : -f 6 )" |
158 |
if [ -n "${zabbix_homedir}" ] && \ |
159 |
[ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then |
160 |
ewarn |
161 |
ewarn "The user 'zabbix' should have his homedir changed" |
162 |
ewarn "to /var/lib/zabbix/home if you want to use" |
163 |
ewarn "custom alert scripts." |
164 |
ewarn |
165 |
ewarn "A real homedir might be needed for configfiles" |
166 |
ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when" |
167 |
ewarn "using sendxmpp for Jabber alerts)." |
168 |
ewarn |
169 |
ewarn "To change the homedir use:" |
170 |
ewarn " usermod -d /var/lib/zabbix/home zabbix" |
171 |
ewarn |
172 |
fi |
173 |
fi |
174 |
|
175 |
if use server; then |
176 |
elog |
177 |
elog "For distributed monitoring you have to run:" |
178 |
elog |
179 |
elog "zabbix_server -n <nodeid>" |
180 |
elog |
181 |
elog "This will convert database data for use with Node ID" |
182 |
elog "and also adds a local node." |
183 |
elog |
184 |
fi |
185 |
|
186 |
elog "--" |
187 |
elog |
188 |
elog "Add these lines in the /etc/services :" |
189 |
elog |
190 |
elog "zabbix-agent 10050/tcp Zabbix Agent" |
191 |
elog "zabbix-agent 10050/udp Zabbix Agent" |
192 |
elog "zabbix-trapper 10051/tcp Zabbix Trapper" |
193 |
elog "zabbix-trapper 10051/udp Zabbix Trapper" |
194 |
elog |
195 |
|
196 |
# repeat fowners/fperms functionality from src_install() |
197 |
# here to catch wrong permissions on existing files in |
198 |
# the live filesystem (yeah, that sucks). |
199 |
chown -R zabbix:zabbix \ |
200 |
"${ROOT}"/etc/zabbix \ |
201 |
"${ROOT}"/var/lib/zabbix \ |
202 |
"${ROOT}"/var/lib/zabbix/home \ |
203 |
"${ROOT}"/var/lib/zabbix/scripts \ |
204 |
"${ROOT}"/var/log/zabbix \ |
205 |
"${ROOT}"/var/run/zabbix |
206 |
chmod 0750 \ |
207 |
"${ROOT}"/etc/zabbix \ |
208 |
"${ROOT}"/var/lib/zabbix \ |
209 |
"${ROOT}"/var/lib/zabbix/home \ |
210 |
"${ROOT}"/var/lib/zabbix/scripts \ |
211 |
"${ROOT}"/var/log/zabbix \ |
212 |
"${ROOT}"/var/run/zabbix |
213 |
|
214 |
chmod 0640 \ |
215 |
"${ROOT}"/etc/zabbix/zabbix_* |
216 |
|
217 |
if use server || use proxy ; then |
218 |
# check for fping |
219 |
fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null) |
220 |
case "${fping_perms}" in |
221 |
4[157][157][157]) |
222 |
;; |
223 |
*) |
224 |
ewarn |
225 |
ewarn "If you want to use the checks 'icmpping' and 'icmppingsec'," |
226 |
ewarn "you have to make /usr/sbin/fping setuid root and executable" |
227 |
ewarn "by everyone. Run the following command to fix it:" |
228 |
ewarn |
229 |
ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping" |
230 |
ewarn |
231 |
ewarn "Please be aware that this might impose a security risk," |
232 |
ewarn "depending on the code quality of fping." |
233 |
ewarn |
234 |
ebeep 3 |
235 |
epause 5 |
236 |
;; |
237 |
esac |
238 |
fi |
239 |
} |
240 |
|
241 |
src_configure() { |
242 |
econf \ |
243 |
$(use_enable server) \ |
244 |
$(use_enable proxy) \ |
245 |
$(use_enable agent) \ |
246 |
$(use_enable ipv6) \ |
247 |
$(use_with ldap) \ |
248 |
$(use_with snmp net-snmp) \ |
249 |
$(use_with mysql) \ |
250 |
$(use_with postgres postgresql) \ |
251 |
$(use_with oracle) \ |
252 |
$(use_with sqlite3) \ |
253 |
$(use_with jabber) \ |
254 |
$(use_with curl libcurl) \ |
255 |
$(use_with openipmi openipmi) \ |
256 |
$(use_with ssh ssh2) \ |
257 |
|| die "econf failed" |
258 |
} |
259 |
|
260 |
src_install() { |
261 |
dodir \ |
262 |
/etc/zabbix \ |
263 |
/var/lib/zabbix \ |
264 |
/var/lib/zabbix/home \ |
265 |
/var/lib/zabbix/scripts \ |
266 |
/var/log/zabbix \ |
267 |
/var/run/zabbix |
268 |
|
269 |
keepdir \ |
270 |
/etc/zabbix \ |
271 |
/var/lib/zabbix \ |
272 |
/var/lib/zabbix/home \ |
273 |
/var/lib/zabbix/scripts \ |
274 |
/var/log/zabbix \ |
275 |
/var/run/zabbix |
276 |
|
277 |
if use server; then |
278 |
insinto /etc/zabbix |
279 |
doins \ |
280 |
"${FILESDIR}/1.6.6"/zabbix_server.conf \ |
281 |
"${FILESDIR}/1.6.6"/zabbix_trapper.conf |
282 |
doinitd \ |
283 |
"${FILESDIR}/1.6.6"/init.d/zabbix-server |
284 |
dosbin \ |
285 |
src/zabbix_server/zabbix_server |
286 |
dodir \ |
287 |
/usr/share/zabbix/database |
288 |
insinto /usr/share/zabbix/database |
289 |
doins -r \ |
290 |
upgrades \ |
291 |
create |
292 |
fowners zabbix:zabbix \ |
293 |
/etc/zabbix/zabbix_server.conf \ |
294 |
/etc/zabbix/zabbix_trapper.conf |
295 |
fperms 0640 \ |
296 |
/etc/zabbix/zabbix_server.conf \ |
297 |
/etc/zabbix/zabbix_trapper.conf |
298 |
fi |
299 |
|
300 |
if use proxy; then |
301 |
doinitd \ |
302 |
"${FILESDIR}/1.6.6"/init.d/zabbix-proxy |
303 |
dosbin \ |
304 |
src/zabbix_proxy/zabbix_proxy |
305 |
insinto /etc/zabbix |
306 |
doins \ |
307 |
"${FILESDIR}/1.6.6"/zabbix_proxy.conf |
308 |
dodir \ |
309 |
/usr/share/zabbix/database |
310 |
insinto /usr/share/zabbix/database |
311 |
doins -r \ |
312 |
upgrades \ |
313 |
create |
314 |
fi |
315 |
|
316 |
if use agent; then |
317 |
insinto /etc/zabbix |
318 |
doins \ |
319 |
"${FILESDIR}/1.6.6"/zabbix_agent.conf \ |
320 |
"${FILESDIR}/1.6.6"/zabbix_agentd.conf |
321 |
doinitd \ |
322 |
"${FILESDIR}/1.6.6"/init.d/zabbix-agentd |
323 |
dosbin \ |
324 |
src/zabbix_agent/zabbix_agent \ |
325 |
src/zabbix_agent/zabbix_agentd |
326 |
dobin \ |
327 |
src/zabbix_sender/zabbix_sender \ |
328 |
src/zabbix_get/zabbix_get |
329 |
fowners zabbix:zabbix \ |
330 |
/etc/zabbix/zabbix_agent.conf \ |
331 |
/etc/zabbix/zabbix_agentd.conf |
332 |
fperms 0640 \ |
333 |
/etc/zabbix/zabbix_agent.conf \ |
334 |
/etc/zabbix/zabbix_agentd.conf |
335 |
fi |
336 |
|
337 |
fowners zabbix:zabbix \ |
338 |
/etc/zabbix \ |
339 |
/var/lib/zabbix \ |
340 |
/var/lib/zabbix/home \ |
341 |
/var/lib/zabbix/scripts \ |
342 |
/var/log/zabbix \ |
343 |
/var/run/zabbix |
344 |
fperms 0750 \ |
345 |
/etc/zabbix \ |
346 |
/var/lib/zabbix \ |
347 |
/var/lib/zabbix/home \ |
348 |
/var/lib/zabbix/scripts \ |
349 |
/var/log/zabbix \ |
350 |
/var/run/zabbix |
351 |
|
352 |
dodoc README INSTALL NEWS ChangeLog |
353 |
|
354 |
if use frontend; then |
355 |
webapp_src_preinst |
356 |
cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}" |
357 |
webapp_postinst_txt en "${FILESDIR}/"1.6.6/postinstall-en.txt |
358 |
webapp_configfile \ |
359 |
"${MY_HTDOCSDIR}"/include/db.inc.php \ |
360 |
"${MY_HTDOCSDIR}"/include/config.inc.php |
361 |
webapp_src_install |
362 |
fi |
363 |
} |
364 |
|
365 |
|
366 |
|
367 |
1.1 net-analyzer/zabbix/zabbix-1.8.6_rc1.ebuild |
368 |
|
369 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/zabbix-1.8.6_rc1.ebuild?rev=1.1&view=markup |
370 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/zabbix-1.8.6_rc1.ebuild?rev=1.1&content-type=text/plain |
371 |
|
372 |
Index: zabbix-1.8.6_rc1.ebuild |
373 |
=================================================================== |
374 |
# Copyright 1999-2011 Gentoo Foundation |
375 |
# Distributed under the terms of the GNU General Public License v2 |
376 |
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/zabbix-1.8.6_rc1.ebuild,v 1.1 2011/07/29 07:09:46 patrick Exp $ |
377 |
|
378 |
EAPI="2" |
379 |
|
380 |
# needed to make webapp-config dep optional |
381 |
WEBAPP_OPTIONAL="yes" |
382 |
inherit eutils flag-o-matic webapp depend.php autotools |
383 |
|
384 |
DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers." |
385 |
HOMEPAGE="http://www.zabbix.com/" |
386 |
MY_P=${P/_/} |
387 |
SRC_URI="http://prdownloads.sourceforge.net/zabbix/${MY_P}.tar.gz" |
388 |
LICENSE="GPL-2" |
389 |
SLOT="0" |
390 |
WEBAPP_MANUAL_SLOT="yes" |
391 |
KEYWORDS="" |
392 |
IUSE="agent curl frontend ipv6 jabber ldap mysql openipmi oracle postgres proxy server -ssh snmp +sqlite3" |
393 |
|
394 |
S=${WORKDIR}/${MY_P} |
395 |
|
396 |
COMMON_DEPEND="snmp? ( net-analyzer/net-snmp ) |
397 |
ldap? ( |
398 |
net-nds/openldap |
399 |
=dev-libs/cyrus-sasl-2* |
400 |
net-libs/gnutls |
401 |
) |
402 |
mysql? ( virtual/mysql ) |
403 |
sqlite3? ( =dev-db/sqlite-3* ) |
404 |
postgres? ( dev-db/postgresql-base ) |
405 |
jabber? ( dev-libs/iksemel ) |
406 |
curl? ( net-misc/curl ) |
407 |
openipmi? ( sys-libs/openipmi ) |
408 |
ssh? ( net-libs/libssh2 )" |
409 |
|
410 |
RDEPEND="${COMMON_DEPEND} |
411 |
proxy? ( net-analyzer/fping ) |
412 |
server? ( net-analyzer/fping |
413 |
app-admin/webapp-config ) |
414 |
frontend? ( dev-lang/php[bcmath,ctype,sockets,gd,truetype,xml,session] |
415 |
media-libs/gd[png] |
416 |
app-admin/webapp-config )" |
417 |
DEPEND="${COMMON_DEPEND} |
418 |
jabber? ( dev-util/pkgconfig )" |
419 |
|
420 |
use frontend && need_php_httpd |
421 |
|
422 |
src_prepare() { |
423 |
epatch "${FILESDIR}/${PN}-1.8.3-as-needed.patch" |
424 |
eautoreconf |
425 |
} |
426 |
|
427 |
pkg_setup() { |
428 |
if use server || use proxy ; then |
429 |
local dbnum dbtypes="mysql oracle postgres sqlite3" dbtype |
430 |
declare -i dbnum=0 |
431 |
for dbtype in ${dbtypes}; do |
432 |
use ${dbtype} && let dbnum++ |
433 |
done |
434 |
if [ ${dbnum} -gt 1 ]; then |
435 |
eerror |
436 |
eerror "You can't use more than one database type in Zabbix." |
437 |
eerror "Select exactly one database type out of these: ${dbtypes}" |
438 |
eerror |
439 |
die "Multiple database types selected." |
440 |
elif [ ${dbnum} -lt 1 ]; then |
441 |
eerror |
442 |
eerror "Select exactly one database type out of these: ${dbtypes}" |
443 |
eerror |
444 |
die "No database type selected." |
445 |
fi |
446 |
if use oracle; then |
447 |
if [ -z "${ORACLE_HOME}" ]; then |
448 |
eerror |
449 |
eerror "The environment variable ORACLE_HOME must be set" |
450 |
eerror "and point to the correct location." |
451 |
eerror "It looks like you don't have Oracle installed." |
452 |
eerror |
453 |
die "Environment variable ORACLE_HOME is not set" |
454 |
fi |
455 |
if has_version 'dev-db/oracle-instantclient-basic'; then |
456 |
ewarn |
457 |
ewarn "Please ensure you have a full install of the Oracle client." |
458 |
ewarn "dev-db/oracle-instantclient* is NOT sufficient." |
459 |
ewarn |
460 |
fi |
461 |
fi |
462 |
fi |
463 |
|
464 |
if use frontend; then |
465 |
webapp_pkg_setup |
466 |
fi |
467 |
|
468 |
enewgroup zabbix |
469 |
enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix |
470 |
} |
471 |
|
472 |
pkg_postinst() { |
473 |
if use server || use proxy ; then |
474 |
elog |
475 |
elog "You need to configure your database for Zabbix." |
476 |
elog |
477 |
elog "Have a look at /usr/share/zabbix/database for" |
478 |
elog "database creation and upgrades." |
479 |
elog |
480 |
elog "For more info read the Zabbix manual at" |
481 |
elog "http://www.zabbix.com/documentation.php" |
482 |
elog |
483 |
|
484 |
zabbix_homedir="$(egetent passwd zabbix | cut -d : -f 6 )" |
485 |
if [ -n "${zabbix_homedir}" ] && \ |
486 |
[ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then |
487 |
ewarn |
488 |
ewarn "The user 'zabbix' should have his homedir changed" |
489 |
ewarn "to /var/lib/zabbix/home if you want to use" |
490 |
ewarn "custom alert scripts." |
491 |
ewarn |
492 |
ewarn "A real homedir might be needed for configfiles" |
493 |
ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when" |
494 |
ewarn "using sendxmpp for Jabber alerts)." |
495 |
ewarn |
496 |
ewarn "To change the homedir use:" |
497 |
ewarn " usermod -d /var/lib/zabbix/home zabbix" |
498 |
ewarn |
499 |
fi |
500 |
fi |
501 |
|
502 |
if use server; then |
503 |
elog |
504 |
elog "For distributed monitoring you have to run:" |
505 |
elog |
506 |
elog "zabbix_server -n <nodeid>" |
507 |
elog |
508 |
elog "This will convert database data for use with Node ID" |
509 |
elog "and also adds a local node." |
510 |
elog |
511 |
fi |
512 |
|
513 |
elog "--" |
514 |
elog |
515 |
elog "Add these lines in the /etc/services :" |
516 |
elog |
517 |
elog "zabbix-agent 10050/tcp Zabbix Agent" |
518 |
elog "zabbix-agent 10050/udp Zabbix Agent" |
519 |
elog "zabbix-trapper 10051/tcp Zabbix Trapper" |
520 |
elog "zabbix-trapper 10051/udp Zabbix Trapper" |
521 |
elog |
522 |
|
523 |
# repeat fowners/fperms functionality from src_install() |
524 |
# here to catch wrong permissions on existing files in |
525 |
# the live filesystem (yeah, that sucks). |
526 |
chown -R zabbix:zabbix \ |
527 |
"${ROOT}"/etc/zabbix \ |
528 |
"${ROOT}"/var/lib/zabbix \ |
529 |
"${ROOT}"/var/lib/zabbix/home \ |
530 |
"${ROOT}"/var/lib/zabbix/scripts \ |
531 |
"${ROOT}"/var/log/zabbix \ |
532 |
"${ROOT}"/var/run/zabbix |
533 |
chmod 0750 \ |
534 |
"${ROOT}"/etc/zabbix \ |
535 |
"${ROOT}"/var/lib/zabbix \ |
536 |
"${ROOT}"/var/lib/zabbix/home \ |
537 |
"${ROOT}"/var/lib/zabbix/scripts \ |
538 |
"${ROOT}"/var/log/zabbix \ |
539 |
"${ROOT}"/var/run/zabbix |
540 |
|
541 |
chmod 0640 \ |
542 |
"${ROOT}"/etc/zabbix/zabbix_* |
543 |
|
544 |
if use server || use proxy ; then |
545 |
# check for fping |
546 |
fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null) |
547 |
case "${fping_perms}" in |
548 |
4[157][157][157]) |
549 |
;; |
550 |
*) |
551 |
ewarn |
552 |
ewarn "If you want to use the checks 'icmpping' and 'icmppingsec'," |
553 |
ewarn "you have to make /usr/sbin/fping setuid root and executable" |
554 |
ewarn "by everyone. Run the following command to fix it:" |
555 |
ewarn |
556 |
ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping" |
557 |
ewarn |
558 |
ewarn "Please be aware that this might impose a security risk," |
559 |
ewarn "depending on the code quality of fping." |
560 |
ewarn |
561 |
ebeep 3 |
562 |
epause 5 |
563 |
;; |
564 |
esac |
565 |
fi |
566 |
} |
567 |
|
568 |
src_configure() { |
569 |
econf \ |
570 |
$(use_enable server) \ |
571 |
$(use_enable proxy) \ |
572 |
$(use_enable agent) \ |
573 |
$(use_enable ipv6) \ |
574 |
$(use_with ldap) \ |
575 |
$(use_with snmp net-snmp) \ |
576 |
$(use_with mysql) \ |
577 |
$(use_with postgres pgsql) \ |
578 |
$(use_with oracle) \ |
579 |
$(use_with sqlite3) \ |
580 |
$(use_with jabber) \ |
581 |
$(use_with curl libcurl) \ |
582 |
$(use_with openipmi openipmi) \ |
583 |
$(use_with ssh ssh2) \ |
584 |
|| die "econf failed" |
585 |
} |
586 |
|
587 |
src_install() { |
588 |
dodir \ |
589 |
/etc/zabbix \ |
590 |
/var/lib/zabbix \ |
591 |
/var/lib/zabbix/home \ |
592 |
/var/lib/zabbix/scripts \ |
593 |
/var/log/zabbix \ |
594 |
/var/run/zabbix |
595 |
|
596 |
keepdir \ |
597 |
/etc/zabbix \ |
598 |
/var/lib/zabbix \ |
599 |
/var/lib/zabbix/home \ |
600 |
/var/lib/zabbix/scripts \ |
601 |
/var/log/zabbix \ |
602 |
/var/run/zabbix |
603 |
|
604 |
if use server; then |
605 |
insinto /etc/zabbix |
606 |
doins \ |
607 |
"${FILESDIR}/1.6.6"/zabbix_server.conf \ |
608 |
"${FILESDIR}/1.6.6"/zabbix_trapper.conf |
609 |
doinitd \ |
610 |
"${FILESDIR}/1.6.6"/init.d/zabbix-server |
611 |
dosbin \ |
612 |
src/zabbix_server/zabbix_server |
613 |
dodir \ |
614 |
/usr/share/zabbix/database |
615 |
insinto /usr/share/zabbix/database |
616 |
doins -r \ |
617 |
upgrades \ |
618 |
create |
619 |
fowners zabbix:zabbix \ |
620 |
/etc/zabbix/zabbix_server.conf \ |
621 |
/etc/zabbix/zabbix_trapper.conf |
622 |
fperms 0640 \ |
623 |
/etc/zabbix/zabbix_server.conf \ |
624 |
/etc/zabbix/zabbix_trapper.conf |
625 |
fi |
626 |
|
627 |
if use proxy; then |
628 |
doinitd \ |
629 |
"${FILESDIR}/1.6.6"/init.d/zabbix-proxy |
630 |
dosbin \ |
631 |
src/zabbix_proxy/zabbix_proxy |
632 |
insinto /etc/zabbix |
633 |
doins \ |
634 |
"${FILESDIR}/1.6.6"/zabbix_proxy.conf |
635 |
dodir \ |
636 |
/usr/share/zabbix/database |
637 |
insinto /usr/share/zabbix/database |
638 |
doins -r \ |
639 |
upgrades \ |
640 |
create |
641 |
fi |
642 |
|
643 |
if use agent; then |
644 |
insinto /etc/zabbix |
645 |
doins \ |
646 |
"${FILESDIR}/1.6.6"/zabbix_agent.conf \ |
647 |
"${FILESDIR}/1.6.6"/zabbix_agentd.conf |
648 |
doinitd \ |
649 |
"${FILESDIR}/1.6.6"/init.d/zabbix-agentd |
650 |
dosbin \ |
651 |
src/zabbix_agent/zabbix_agent \ |
652 |
src/zabbix_agent/zabbix_agentd |
653 |
dobin \ |
654 |
src/zabbix_sender/zabbix_sender \ |
655 |
src/zabbix_get/zabbix_get |
656 |
fowners zabbix:zabbix \ |
657 |
/etc/zabbix/zabbix_agent.conf \ |
658 |
/etc/zabbix/zabbix_agentd.conf |
659 |
fperms 0640 \ |
660 |
/etc/zabbix/zabbix_agent.conf \ |
661 |
/etc/zabbix/zabbix_agentd.conf |
662 |
fi |
663 |
|
664 |
fowners zabbix:zabbix \ |
665 |
/etc/zabbix \ |
666 |
/var/lib/zabbix \ |
667 |
/var/lib/zabbix/home \ |
668 |
/var/lib/zabbix/scripts \ |
669 |
/var/log/zabbix \ |
670 |
/var/run/zabbix |
671 |
fperms 0750 \ |
672 |
/etc/zabbix \ |
673 |
/var/lib/zabbix \ |
674 |
/var/lib/zabbix/home \ |
675 |
/var/lib/zabbix/scripts \ |
676 |
/var/log/zabbix \ |
677 |
/var/run/zabbix |
678 |
|
679 |
dodoc README INSTALL NEWS ChangeLog |
680 |
|
681 |
if use frontend; then |
682 |
webapp_src_preinst |
683 |
cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}" |
684 |
webapp_postinst_txt en "${FILESDIR}/"1.6.6/postinstall-en.txt |
685 |
webapp_configfile \ |
686 |
"${MY_HTDOCSDIR}"/include/db.inc.php \ |
687 |
"${MY_HTDOCSDIR}"/include/config.inc.php |
688 |
webapp_src_install |
689 |
fi |
690 |
} |