1 |
idl0r 11/12/31 20:47:13 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: zabbix-1.8.7-r2.ebuild zabbix-1.9.5-r1.ebuild |
5 |
zabbix-1.8.9-r2.ebuild zabbix-1.8.10-r1.ebuild |
6 |
zabbix-1.8.8-r2.ebuild zabbix-1.8.8-r3.ebuild |
7 |
zabbix-1.8.9-r3.ebuild zabbix-1.8.7-r3.ebuild |
8 |
zabbix-1.9.4-r1.ebuild |
9 |
Removed: zabbix-1.8.9.ebuild zabbix-1.8.7.ebuild |
10 |
zabbix-1.8.7-r1.ebuild zabbix-1.9.5.ebuild |
11 |
zabbix-1.8.10.ebuild zabbix-1.9.4.ebuild |
12 |
zabbix-1.8.9-r1.ebuild zabbix-1.8.8-r1.ebuild |
13 |
zabbix-1.8.8.ebuild |
14 |
Log: |
15 |
Revbump. Don't use deprecated start-stop-daemon options, bug 376865. |
16 |
|
17 |
(Portage version: 2.1.10.41/cvs/Linux i686, RepoMan options: --force) |
18 |
|
19 |
Revision Changes Path |
20 |
1.72 net-analyzer/zabbix/ChangeLog |
21 |
|
22 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/ChangeLog?rev=1.72&view=markup |
23 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/ChangeLog?rev=1.72&content-type=text/plain |
24 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/ChangeLog?r1=1.71&r2=1.72 |
25 |
|
26 |
Index: ChangeLog |
27 |
=================================================================== |
28 |
RCS file: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/ChangeLog,v |
29 |
retrieving revision 1.71 |
30 |
retrieving revision 1.72 |
31 |
diff -u -r1.71 -r1.72 |
32 |
--- ChangeLog 30 Dec 2011 09:46:32 -0000 1.71 |
33 |
+++ ChangeLog 31 Dec 2011 20:47:13 -0000 1.72 |
34 |
@@ -1,6 +1,29 @@ |
35 |
# ChangeLog for net-analyzer/zabbix |
36 |
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
37 |
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/ChangeLog,v 1.71 2011/12/30 09:46:32 polynomial-c Exp $ |
38 |
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/ChangeLog,v 1.72 2011/12/31 20:47:13 idl0r Exp $ |
39 |
+ |
40 |
+*zabbix-1.9.5-r1 (31 Dec 2011) |
41 |
+*zabbix-1.9.4-r1 (31 Dec 2011) |
42 |
+*zabbix-1.8.10-r1 (31 Dec 2011) |
43 |
+*zabbix-1.8.9-r3 (31 Dec 2011) |
44 |
+*zabbix-1.8.9-r2 (31 Dec 2011) |
45 |
+*zabbix-1.8.8-r3 (31 Dec 2011) |
46 |
+*zabbix-1.8.8-r2 (31 Dec 2011) |
47 |
+*zabbix-1.8.7-r3 (31 Dec 2011) |
48 |
+*zabbix-1.8.7-r2 (31 Dec 2011) |
49 |
+ |
50 |
+ 31 Dec 2011; Christian Ruppert <idl0r@g.o> -zabbix-1.8.7.ebuild, |
51 |
+ -zabbix-1.8.7-r1.ebuild, +zabbix-1.8.7-r2.ebuild, +zabbix-1.8.7-r3.ebuild, |
52 |
+ -zabbix-1.8.8.ebuild, -zabbix-1.8.8-r1.ebuild, +zabbix-1.8.8-r2.ebuild, |
53 |
+ +zabbix-1.8.8-r3.ebuild, -zabbix-1.8.9.ebuild, -zabbix-1.8.9-r1.ebuild, |
54 |
+ +zabbix-1.8.9-r2.ebuild, +zabbix-1.8.9-r3.ebuild, -zabbix-1.8.10.ebuild, |
55 |
+ +zabbix-1.8.10-r1.ebuild, -zabbix-1.9.4.ebuild, +zabbix-1.9.4-r1.ebuild, |
56 |
+ -zabbix-1.9.5.ebuild, +zabbix-1.9.5-r1.ebuild, |
57 |
+ files/1.4.6/init.d/zabbix-agentd, files/1.4.6/init.d/zabbix-server, |
58 |
+ files/1.6.5/init.d/zabbix-agentd, files/1.6.5/init.d/zabbix-server, |
59 |
+ files/1.6.6/init.d/zabbix-agentd, files/1.6.6/init.d/zabbix-proxy, |
60 |
+ files/1.6.6/init.d/zabbix-server: |
61 |
+ Revbump. Don't use deprecated start-stop-daemon options, bug 376865. |
62 |
|
63 |
30 Dec 2011; Lars Wendler <polynomial-c@g.o> |
64 |
files/1.6.6/init.d/zabbix-agentd, files/1.6.6/init.d/zabbix-proxy, |
65 |
|
66 |
|
67 |
|
68 |
1.1 net-analyzer/zabbix/zabbix-1.8.7-r2.ebuild |
69 |
|
70 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/zabbix-1.8.7-r2.ebuild?rev=1.1&view=markup |
71 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/zabbix-1.8.7-r2.ebuild?rev=1.1&content-type=text/plain |
72 |
|
73 |
Index: zabbix-1.8.7-r2.ebuild |
74 |
=================================================================== |
75 |
# Copyright 1999-2011 Gentoo Foundation |
76 |
# Distributed under the terms of the GNU General Public License v2 |
77 |
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/zabbix-1.8.7-r2.ebuild,v 1.1 2011/12/31 20:47:13 idl0r Exp $ |
78 |
|
79 |
EAPI="2" |
80 |
|
81 |
# needed to make webapp-config dep optional |
82 |
WEBAPP_OPTIONAL="yes" |
83 |
inherit eutils flag-o-matic webapp depend.php autotools |
84 |
|
85 |
DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers." |
86 |
HOMEPAGE="http://www.zabbix.com/" |
87 |
SRC_URI="http://prdownloads.sourceforge.net/zabbix/${P}.tar.gz" |
88 |
LICENSE="GPL-2" |
89 |
SLOT="0" |
90 |
WEBAPP_MANUAL_SLOT="yes" |
91 |
KEYWORDS="~amd64 x86" |
92 |
IUSE="agent curl frontend ipv6 jabber ldap mysql openipmi oracle postgres proxy server -ssh snmp +sqlite3" |
93 |
|
94 |
COMMON_DEPEND="snmp? ( net-analyzer/net-snmp ) |
95 |
ldap? ( |
96 |
net-nds/openldap |
97 |
=dev-libs/cyrus-sasl-2* |
98 |
net-libs/gnutls |
99 |
) |
100 |
mysql? ( virtual/mysql ) |
101 |
sqlite3? ( =dev-db/sqlite-3* ) |
102 |
postgres? ( dev-db/postgresql-base ) |
103 |
jabber? ( dev-libs/iksemel ) |
104 |
curl? ( net-misc/curl ) |
105 |
openipmi? ( sys-libs/openipmi ) |
106 |
ssh? ( net-libs/libssh2 )" |
107 |
|
108 |
RDEPEND="${COMMON_DEPEND} |
109 |
proxy? ( net-analyzer/fping ) |
110 |
server? ( net-analyzer/fping |
111 |
app-admin/webapp-config ) |
112 |
frontend? ( dev-lang/php[bcmath,ctype,sockets,gd,truetype,xml,session] |
113 |
media-libs/gd[png] |
114 |
app-admin/webapp-config )" |
115 |
DEPEND="${COMMON_DEPEND} |
116 |
dev-util/pkgconfig" |
117 |
|
118 |
use frontend && need_php_httpd |
119 |
|
120 |
src_prepare() { |
121 |
epatch "${FILESDIR}/${PN}-1.8.3-as-needed.patch" |
122 |
eautoreconf |
123 |
} |
124 |
|
125 |
pkg_setup() { |
126 |
if use server || use proxy ; then |
127 |
local dbnum dbtypes="mysql oracle postgres sqlite3" dbtype |
128 |
declare -i dbnum=0 |
129 |
for dbtype in ${dbtypes}; do |
130 |
use ${dbtype} && let dbnum++ |
131 |
done |
132 |
if [ ${dbnum} -gt 1 ]; then |
133 |
eerror |
134 |
eerror "You can't use more than one database type in Zabbix." |
135 |
eerror "Select exactly one database type out of these: ${dbtypes}" |
136 |
eerror |
137 |
die "Multiple database types selected." |
138 |
elif [ ${dbnum} -lt 1 ]; then |
139 |
eerror |
140 |
eerror "Select exactly one database type out of these: ${dbtypes}" |
141 |
eerror |
142 |
die "No database type selected." |
143 |
fi |
144 |
if use oracle; then |
145 |
if [ -z "${ORACLE_HOME}" ]; then |
146 |
eerror |
147 |
eerror "The environment variable ORACLE_HOME must be set" |
148 |
eerror "and point to the correct location." |
149 |
eerror "It looks like you don't have Oracle installed." |
150 |
eerror |
151 |
die "Environment variable ORACLE_HOME is not set" |
152 |
fi |
153 |
if has_version 'dev-db/oracle-instantclient-basic'; then |
154 |
ewarn |
155 |
ewarn "Please ensure you have a full install of the Oracle client." |
156 |
ewarn "dev-db/oracle-instantclient* is NOT sufficient." |
157 |
ewarn |
158 |
fi |
159 |
fi |
160 |
fi |
161 |
|
162 |
if use frontend; then |
163 |
webapp_pkg_setup |
164 |
fi |
165 |
|
166 |
enewgroup zabbix |
167 |
enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix |
168 |
} |
169 |
|
170 |
pkg_postinst() { |
171 |
if use server || use proxy ; then |
172 |
elog |
173 |
elog "You need to configure your database for Zabbix." |
174 |
elog |
175 |
elog "Have a look at /usr/share/zabbix/database for" |
176 |
elog "database creation and upgrades." |
177 |
elog |
178 |
elog "For more info read the Zabbix manual at" |
179 |
elog "http://www.zabbix.com/documentation.php" |
180 |
elog |
181 |
|
182 |
zabbix_homedir=$(egethome zabbix) |
183 |
if [ -n "${zabbix_homedir}" ] && \ |
184 |
[ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then |
185 |
ewarn |
186 |
ewarn "The user 'zabbix' should have his homedir changed" |
187 |
ewarn "to /var/lib/zabbix/home if you want to use" |
188 |
ewarn "custom alert scripts." |
189 |
ewarn |
190 |
ewarn "A real homedir might be needed for configfiles" |
191 |
ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when" |
192 |
ewarn "using sendxmpp for Jabber alerts)." |
193 |
ewarn |
194 |
ewarn "To change the homedir use:" |
195 |
ewarn " usermod -d /var/lib/zabbix/home zabbix" |
196 |
ewarn |
197 |
fi |
198 |
fi |
199 |
|
200 |
if use server; then |
201 |
elog |
202 |
elog "For distributed monitoring you have to run:" |
203 |
elog |
204 |
elog "zabbix_server -n <nodeid>" |
205 |
elog |
206 |
elog "This will convert database data for use with Node ID" |
207 |
elog "and also adds a local node." |
208 |
elog |
209 |
fi |
210 |
|
211 |
elog "--" |
212 |
elog |
213 |
elog "Add these lines in the /etc/services :" |
214 |
elog |
215 |
elog "zabbix-agent 10050/tcp Zabbix Agent" |
216 |
elog "zabbix-agent 10050/udp Zabbix Agent" |
217 |
elog "zabbix-trapper 10051/tcp Zabbix Trapper" |
218 |
elog "zabbix-trapper 10051/udp Zabbix Trapper" |
219 |
elog |
220 |
|
221 |
# repeat fowners/fperms functionality from src_install() |
222 |
# here to catch wrong permissions on existing files in |
223 |
# the live filesystem (yeah, that sucks). |
224 |
chown -R zabbix:zabbix \ |
225 |
"${ROOT}"/etc/zabbix \ |
226 |
"${ROOT}"/var/lib/zabbix \ |
227 |
"${ROOT}"/var/lib/zabbix/home \ |
228 |
"${ROOT}"/var/lib/zabbix/scripts \ |
229 |
"${ROOT}"/var/log/zabbix \ |
230 |
"${ROOT}"/var/run/zabbix |
231 |
chmod 0750 \ |
232 |
"${ROOT}"/etc/zabbix \ |
233 |
"${ROOT}"/var/lib/zabbix \ |
234 |
"${ROOT}"/var/lib/zabbix/home \ |
235 |
"${ROOT}"/var/lib/zabbix/scripts \ |
236 |
"${ROOT}"/var/log/zabbix \ |
237 |
"${ROOT}"/var/run/zabbix |
238 |
|
239 |
chmod 0640 \ |
240 |
"${ROOT}"/etc/zabbix/zabbix_* |
241 |
|
242 |
if use server || use proxy ; then |
243 |
# check for fping |
244 |
fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null) |
245 |
case "${fping_perms}" in |
246 |
4[157][157][157]) |
247 |
;; |
248 |
*) |
249 |
ewarn |
250 |
ewarn "If you want to use the checks 'icmpping' and 'icmppingsec'," |
251 |
ewarn "you have to make /usr/sbin/fping setuid root and executable" |
252 |
ewarn "by everyone. Run the following command to fix it:" |
253 |
ewarn |
254 |
ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping" |
255 |
ewarn |
256 |
ewarn "Please be aware that this might impose a security risk," |
257 |
ewarn "depending on the code quality of fping." |
258 |
ewarn |
259 |
ebeep 3 |
260 |
epause 5 |
261 |
;; |
262 |
esac |
263 |
fi |
264 |
} |
265 |
|
266 |
src_configure() { |
267 |
econf \ |
268 |
$(use_enable server) \ |
269 |
$(use_enable proxy) \ |
270 |
$(use_enable agent) \ |
271 |
$(use_enable ipv6) \ |
272 |
$(use_with ldap) \ |
273 |
$(use_with snmp net-snmp) \ |
274 |
$(use_with mysql) \ |
275 |
$(use_with postgres pgsql) \ |
276 |
$(use_with oracle) \ |
277 |
$(use_with sqlite3) \ |
278 |
$(use_with jabber) \ |
279 |
$(use_with curl libcurl) \ |
280 |
$(use_with openipmi openipmi) \ |
281 |
$(use_with ssh ssh2) \ |
282 |
|| die "econf failed" |
283 |
} |
284 |
|
285 |
src_install() { |
286 |
dodir \ |
287 |
/etc/zabbix \ |
288 |
/var/lib/zabbix \ |
289 |
/var/lib/zabbix/home \ |
290 |
/var/lib/zabbix/scripts \ |
291 |
/var/log/zabbix \ |
292 |
/var/run/zabbix |
293 |
|
294 |
keepdir \ |
295 |
/etc/zabbix \ |
296 |
/var/lib/zabbix \ |
297 |
/var/lib/zabbix/home \ |
298 |
/var/lib/zabbix/scripts \ |
299 |
/var/log/zabbix \ |
300 |
/var/run/zabbix |
301 |
|
302 |
if use server; then |
303 |
insinto /etc/zabbix |
304 |
doins \ |
305 |
"${FILESDIR}/1.6.6"/zabbix_server.conf \ |
306 |
"${FILESDIR}/1.6.6"/zabbix_trapper.conf |
307 |
doinitd \ |
308 |
"${FILESDIR}/1.6.6"/init.d/zabbix-server |
309 |
dosbin \ |
310 |
src/zabbix_server/zabbix_server |
311 |
dodir \ |
312 |
/usr/share/zabbix/database |
313 |
insinto /usr/share/zabbix/database |
314 |
doins -r \ |
315 |
upgrades \ |
316 |
create |
317 |
fowners zabbix:zabbix \ |
318 |
/etc/zabbix/zabbix_server.conf \ |
319 |
/etc/zabbix/zabbix_trapper.conf |
320 |
fperms 0640 \ |
321 |
/etc/zabbix/zabbix_server.conf \ |
322 |
/etc/zabbix/zabbix_trapper.conf |
323 |
fi |
324 |
|
325 |
if use proxy; then |
326 |
doinitd \ |
327 |
"${FILESDIR}/1.6.6"/init.d/zabbix-proxy |
328 |
dosbin \ |
329 |
src/zabbix_proxy/zabbix_proxy |
330 |
insinto /etc/zabbix |
331 |
doins \ |
332 |
"${FILESDIR}/1.6.6"/zabbix_proxy.conf |
333 |
dodir \ |
334 |
/usr/share/zabbix/database |
335 |
insinto /usr/share/zabbix/database |
336 |
doins -r \ |
337 |
upgrades \ |
338 |
create |
339 |
fi |
340 |
|
341 |
if use agent; then |
342 |
insinto /etc/zabbix |
343 |
doins \ |
344 |
"${FILESDIR}/1.6.6"/zabbix_agent.conf \ |
345 |
"${FILESDIR}/1.6.6"/zabbix_agentd.conf |
346 |
doinitd \ |
347 |
"${FILESDIR}/1.6.6"/init.d/zabbix-agentd |
348 |
dosbin \ |
349 |
src/zabbix_agent/zabbix_agent \ |
350 |
src/zabbix_agent/zabbix_agentd |
351 |
dobin \ |
352 |
src/zabbix_sender/zabbix_sender \ |
353 |
src/zabbix_get/zabbix_get |
354 |
fowners zabbix:zabbix \ |
355 |
/etc/zabbix/zabbix_agent.conf \ |
356 |
/etc/zabbix/zabbix_agentd.conf |
357 |
fperms 0640 \ |
358 |
/etc/zabbix/zabbix_agent.conf \ |
359 |
/etc/zabbix/zabbix_agentd.conf |
360 |
fi |
361 |
|
362 |
fowners zabbix:zabbix \ |
363 |
/etc/zabbix \ |
364 |
/var/lib/zabbix \ |
365 |
/var/lib/zabbix/home \ |
366 |
/var/lib/zabbix/scripts \ |
367 |
/var/log/zabbix \ |
368 |
/var/run/zabbix |
369 |
fperms 0750 \ |
370 |
/etc/zabbix \ |
371 |
/var/lib/zabbix \ |
372 |
/var/lib/zabbix/home \ |
373 |
/var/lib/zabbix/scripts \ |
374 |
/var/log/zabbix \ |
375 |
/var/run/zabbix |
376 |
|
377 |
dodoc README INSTALL NEWS ChangeLog |
378 |
|
379 |
if use frontend; then |
380 |
webapp_src_preinst |
381 |
cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}" |
382 |
webapp_postinst_txt en "${FILESDIR}/"1.6.6/postinstall-en.txt |
383 |
webapp_configfile \ |
384 |
"${MY_HTDOCSDIR}"/include/db.inc.php \ |
385 |
"${MY_HTDOCSDIR}"/include/config.inc.php |
386 |
webapp_src_install |
387 |
fi |
388 |
} |
389 |
|
390 |
|
391 |
|
392 |
1.1 net-analyzer/zabbix/zabbix-1.9.5-r1.ebuild |
393 |
|
394 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/zabbix-1.9.5-r1.ebuild?rev=1.1&view=markup |
395 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/zabbix-1.9.5-r1.ebuild?rev=1.1&content-type=text/plain |
396 |
|
397 |
Index: zabbix-1.9.5-r1.ebuild |
398 |
=================================================================== |
399 |
# Copyright 1999-2011 Gentoo Foundation |
400 |
# Distributed under the terms of the GNU General Public License v2 |
401 |
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/zabbix-1.9.5-r1.ebuild,v 1.1 2011/12/31 20:47:13 idl0r Exp $ |
402 |
|
403 |
EAPI="2" |
404 |
|
405 |
# needed to make webapp-config dep optional |
406 |
WEBAPP_OPTIONAL="yes" |
407 |
inherit eutils flag-o-matic webapp depend.php autotools |
408 |
|
409 |
DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers." |
410 |
HOMEPAGE="http://www.zabbix.com/" |
411 |
SRC_URI="http://prdownloads.sourceforge.net/zabbix/${P}.tar.gz" |
412 |
LICENSE="GPL-2" |
413 |
SLOT="0" |
414 |
WEBAPP_MANUAL_SLOT="yes" |
415 |
KEYWORDS="" |
416 |
IUSE="agent curl frontend ipv6 jabber ldap mysql openipmi oracle postgres proxy server -ssh snmp +sqlite3" |
417 |
|
418 |
COMMON_DEPEND="snmp? ( net-analyzer/net-snmp ) |
419 |
ldap? ( |
420 |
net-nds/openldap |
421 |
=dev-libs/cyrus-sasl-2* |
422 |
net-libs/gnutls |
423 |
) |
424 |
mysql? ( virtual/mysql ) |
425 |
sqlite3? ( =dev-db/sqlite-3* ) |
426 |
postgres? ( dev-db/postgresql-base ) |
427 |
jabber? ( dev-libs/iksemel ) |
428 |
curl? ( net-misc/curl ) |
429 |
openipmi? ( sys-libs/openipmi ) |
430 |
ssh? ( net-libs/libssh2 )" |
431 |
|
432 |
RDEPEND="${COMMON_DEPEND} |
433 |
proxy? ( net-analyzer/fping ) |
434 |
server? ( net-analyzer/fping |
435 |
app-admin/webapp-config ) |
436 |
frontend? ( dev-lang/php[bcmath,ctype,sockets,gd,truetype,xml,session] |
437 |
media-libs/gd[png] |
438 |
app-admin/webapp-config )" |
439 |
DEPEND="${COMMON_DEPEND} |
440 |
dev-util/pkgconfig" |
441 |
|
442 |
use frontend && need_php_httpd |
443 |
|
444 |
src_prepare() { |
445 |
epatch "${FILESDIR}/${PN}-1.8.3-as-needed.patch" |
446 |
eautoreconf |
447 |
} |
448 |
|
449 |
pkg_setup() { |
450 |
if use server || use proxy ; then |
451 |
local dbnum dbtypes="mysql oracle postgres sqlite3" dbtype |
452 |
declare -i dbnum=0 |
453 |
for dbtype in ${dbtypes}; do |
454 |
use ${dbtype} && let dbnum++ |
455 |
done |
456 |
if [ ${dbnum} -gt 1 ]; then |
457 |
eerror |
458 |
eerror "You can't use more than one database type in Zabbix." |
459 |
eerror "Select exactly one database type out of these: ${dbtypes}" |
460 |
eerror |
461 |
die "Multiple database types selected." |
462 |
elif [ ${dbnum} -lt 1 ]; then |
463 |
eerror |
464 |
eerror "Select exactly one database type out of these: ${dbtypes}" |
465 |
eerror |
466 |
die "No database type selected." |
467 |
fi |
468 |
if use oracle; then |
469 |
if [ -z "${ORACLE_HOME}" ]; then |
470 |
eerror |
471 |
eerror "The environment variable ORACLE_HOME must be set" |
472 |
eerror "and point to the correct location." |
473 |
eerror "It looks like you don't have Oracle installed." |
474 |
eerror |
475 |
die "Environment variable ORACLE_HOME is not set" |
476 |
fi |
477 |
if has_version 'dev-db/oracle-instantclient-basic'; then |
478 |
ewarn |
479 |
ewarn "Please ensure you have a full install of the Oracle client." |
480 |
ewarn "dev-db/oracle-instantclient* is NOT sufficient." |
481 |
ewarn |
482 |
fi |
483 |
fi |
484 |
fi |
485 |
|
486 |
if use frontend; then |
487 |
webapp_pkg_setup |
488 |
fi |
489 |
|
490 |
enewgroup zabbix |
491 |
enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix |
492 |
} |
493 |
|
494 |
pkg_postinst() { |
495 |
if use server || use proxy ; then |
496 |
elog |
497 |
elog "You need to configure your database for Zabbix." |
498 |
elog |
499 |
elog "Have a look at /usr/share/zabbix/database for" |
500 |
elog "database creation and upgrades." |
501 |
elog |
502 |
elog "For more info read the Zabbix manual at" |
503 |
elog "http://www.zabbix.com/documentation.php" |
504 |
elog |
505 |
|
506 |
zabbix_homedir=$(egethome zabbix) |
507 |
if [ -n "${zabbix_homedir}" ] && \ |
508 |
[ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then |
509 |
ewarn |
510 |
ewarn "The user 'zabbix' should have his homedir changed" |
511 |
ewarn "to /var/lib/zabbix/home if you want to use" |
512 |
ewarn "custom alert scripts." |
513 |
ewarn |
514 |
ewarn "A real homedir might be needed for configfiles" |
515 |
ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when" |
516 |
ewarn "using sendxmpp for Jabber alerts)." |
517 |
ewarn |
518 |
ewarn "To change the homedir use:" |
519 |
ewarn " usermod -d /var/lib/zabbix/home zabbix" |
520 |
ewarn |
521 |
fi |
522 |
fi |
523 |
|
524 |
if use server; then |
525 |
elog |
526 |
elog "For distributed monitoring you have to run:" |
527 |
elog |
528 |
elog "zabbix_server -n <nodeid>" |
529 |
elog |
530 |
elog "This will convert database data for use with Node ID" |
531 |
elog "and also adds a local node." |
532 |
elog |
533 |
fi |
534 |
|
535 |
elog "--" |
536 |
elog |
537 |
elog "Add these lines in the /etc/services :" |
538 |
elog |
539 |
elog "zabbix-agent 10050/tcp Zabbix Agent" |
540 |
elog "zabbix-agent 10050/udp Zabbix Agent" |
541 |
elog "zabbix-trapper 10051/tcp Zabbix Trapper" |
542 |
elog "zabbix-trapper 10051/udp Zabbix Trapper" |
543 |
elog |
544 |
|
545 |
# repeat fowners/fperms functionality from src_install() |
546 |
# here to catch wrong permissions on existing files in |
547 |
# the live filesystem (yeah, that sucks). |
548 |
chown -R zabbix:zabbix \ |
549 |
"${ROOT}"/etc/zabbix \ |
550 |
"${ROOT}"/var/lib/zabbix \ |
551 |
"${ROOT}"/var/lib/zabbix/home \ |
552 |
"${ROOT}"/var/lib/zabbix/scripts \ |
553 |
"${ROOT}"/var/log/zabbix \ |
554 |
"${ROOT}"/var/run/zabbix |
555 |
chmod 0750 \ |
556 |
"${ROOT}"/etc/zabbix \ |
557 |
"${ROOT}"/var/lib/zabbix \ |
558 |
"${ROOT}"/var/lib/zabbix/home \ |
559 |
"${ROOT}"/var/lib/zabbix/scripts \ |
560 |
"${ROOT}"/var/log/zabbix \ |
561 |
"${ROOT}"/var/run/zabbix |
562 |
|
563 |
chmod 0640 \ |
564 |
"${ROOT}"/etc/zabbix/zabbix_* |
565 |
|
566 |
if use server || use proxy ; then |
567 |
# check for fping |
568 |
fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null) |
569 |
case "${fping_perms}" in |
570 |
4[157][157][157]) |
571 |
;; |
572 |
*) |
573 |
ewarn |
574 |
ewarn "If you want to use the checks 'icmpping' and 'icmppingsec'," |
575 |
ewarn "you have to make /usr/sbin/fping setuid root and executable" |
576 |
ewarn "by everyone. Run the following command to fix it:" |
577 |
ewarn |
578 |
ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping" |
579 |
ewarn |
580 |
ewarn "Please be aware that this might impose a security risk," |
581 |
ewarn "depending on the code quality of fping." |
582 |
ewarn |
583 |
ebeep 3 |
584 |
epause 5 |
585 |
;; |
586 |
esac |
587 |
fi |
588 |
} |
589 |
|
590 |
src_configure() { |
591 |
econf \ |
592 |
$(use_enable server) \ |
593 |
$(use_enable proxy) \ |
594 |
$(use_enable agent) \ |
595 |
$(use_enable ipv6) \ |
596 |
$(use_with ldap) \ |
597 |
$(use_with snmp net-snmp) \ |
598 |
$(use_with mysql) \ |
599 |
$(use_with postgres postgresql) \ |
600 |
$(use_with oracle) \ |
601 |
$(use_with sqlite3) \ |
602 |
$(use_with jabber) \ |
603 |
$(use_with curl libcurl) \ |
604 |
$(use_with openipmi openipmi) \ |
605 |
$(use_with ssh ssh2) \ |
606 |
|| die "econf failed" |
607 |
} |
608 |
|
609 |
src_install() { |
610 |
dodir \ |
611 |
/etc/zabbix \ |
612 |
/var/lib/zabbix \ |
613 |
/var/lib/zabbix/home \ |
614 |
/var/lib/zabbix/scripts \ |
615 |
/var/log/zabbix \ |
616 |
/var/run/zabbix |
617 |
|
618 |
keepdir \ |
619 |
/etc/zabbix \ |
620 |
/var/lib/zabbix \ |
621 |
/var/lib/zabbix/home \ |
622 |
/var/lib/zabbix/scripts \ |
623 |
/var/log/zabbix \ |
624 |
/var/run/zabbix |
625 |
|
626 |
if use server; then |
627 |
insinto /etc/zabbix |
628 |
doins \ |
629 |
"${FILESDIR}/1.6.6"/zabbix_server.conf \ |
630 |
"${FILESDIR}/1.6.6"/zabbix_trapper.conf |
631 |
doinitd \ |
632 |
"${FILESDIR}/1.6.6"/init.d/zabbix-server |
633 |
dosbin \ |
634 |
src/zabbix_server/zabbix_server |
635 |
dodir \ |
636 |
/usr/share/zabbix/database |
637 |
insinto /usr/share/zabbix/database |
638 |
doins -r \ |
639 |
upgrades \ |
640 |
create |
641 |
fowners zabbix:zabbix \ |
642 |
/etc/zabbix/zabbix_server.conf \ |
643 |
/etc/zabbix/zabbix_trapper.conf |
644 |
fperms 0640 \ |
645 |
/etc/zabbix/zabbix_server.conf \ |
646 |
/etc/zabbix/zabbix_trapper.conf |
647 |
fi |
648 |
|
649 |
if use proxy; then |
650 |
doinitd \ |
651 |
"${FILESDIR}/1.6.6"/init.d/zabbix-proxy |
652 |
dosbin \ |
653 |
src/zabbix_proxy/zabbix_proxy |
654 |
insinto /etc/zabbix |
655 |
doins \ |
656 |
"${FILESDIR}/1.6.6"/zabbix_proxy.conf |
657 |
dodir \ |
658 |
/usr/share/zabbix/database |
659 |
insinto /usr/share/zabbix/database |
660 |
doins -r \ |
661 |
upgrades \ |
662 |
create |
663 |
fi |
664 |
|
665 |
if use agent; then |
666 |
insinto /etc/zabbix |
667 |
doins \ |
668 |
"${FILESDIR}/1.6.6"/zabbix_agent.conf \ |
669 |
"${FILESDIR}/1.6.6"/zabbix_agentd.conf |
670 |
doinitd \ |
671 |
"${FILESDIR}/1.6.6"/init.d/zabbix-agentd |
672 |
dosbin \ |
673 |
src/zabbix_agent/zabbix_agent \ |
674 |
src/zabbix_agent/zabbix_agentd |
675 |
dobin \ |
676 |
src/zabbix_sender/zabbix_sender \ |
677 |
src/zabbix_get/zabbix_get |
678 |
fowners zabbix:zabbix \ |
679 |
/etc/zabbix/zabbix_agent.conf \ |
680 |
/etc/zabbix/zabbix_agentd.conf |
681 |
fperms 0640 \ |
682 |
/etc/zabbix/zabbix_agent.conf \ |
683 |
/etc/zabbix/zabbix_agentd.conf |
684 |
fi |
685 |
|
686 |
fowners zabbix:zabbix \ |
687 |
/etc/zabbix \ |
688 |
/var/lib/zabbix \ |
689 |
/var/lib/zabbix/home \ |
690 |
/var/lib/zabbix/scripts \ |
691 |
/var/log/zabbix \ |
692 |
/var/run/zabbix |
693 |
fperms 0750 \ |
694 |
/etc/zabbix \ |
695 |
/var/lib/zabbix \ |
696 |
/var/lib/zabbix/home \ |
697 |
/var/lib/zabbix/scripts \ |
698 |
/var/log/zabbix \ |
699 |
/var/run/zabbix |
700 |
|
701 |
dodoc README INSTALL NEWS ChangeLog |
702 |
|
703 |
if use frontend; then |
704 |
webapp_src_preinst |
705 |
cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}" |
706 |
webapp_postinst_txt en "${FILESDIR}/"1.6.6/postinstall-en.txt |
707 |
webapp_configfile \ |
708 |
"${MY_HTDOCSDIR}"/include/db.inc.php \ |
709 |
"${MY_HTDOCSDIR}"/include/config.inc.php |
710 |
webapp_src_install |
711 |
fi |
712 |
} |
713 |
|
714 |
|
715 |
|
716 |
1.1 net-analyzer/zabbix/zabbix-1.8.9-r2.ebuild |
717 |
|
718 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/zabbix-1.8.9-r2.ebuild?rev=1.1&view=markup |
719 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/zabbix-1.8.9-r2.ebuild?rev=1.1&content-type=text/plain |
720 |
|
721 |
Index: zabbix-1.8.9-r2.ebuild |
722 |
=================================================================== |
723 |
# Copyright 1999-2011 Gentoo Foundation |
724 |
# Distributed under the terms of the GNU General Public License v2 |
725 |
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/zabbix-1.8.9-r2.ebuild,v 1.1 2011/12/31 20:47:13 idl0r Exp $ |
726 |
|
727 |
EAPI="2" |
728 |
|
729 |
# needed to make webapp-config dep optional |
730 |
WEBAPP_OPTIONAL="yes" |
731 |
inherit eutils flag-o-matic webapp depend.php autotools |
732 |
|
733 |
DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers." |
734 |
HOMEPAGE="http://www.zabbix.com/" |
735 |
SRC_URI="http://prdownloads.sourceforge.net/zabbix/${P}.tar.gz" |
736 |
LICENSE="GPL-2" |
737 |
SLOT="0" |
738 |
WEBAPP_MANUAL_SLOT="yes" |
739 |
KEYWORDS="" |
740 |
IUSE="agent curl frontend ipv6 jabber ldap mysql openipmi oracle postgres proxy server -ssh snmp +sqlite3" |
741 |
|
742 |
COMMON_DEPEND="snmp? ( net-analyzer/net-snmp ) |
743 |
ldap? ( |
744 |
net-nds/openldap |
745 |
=dev-libs/cyrus-sasl-2* |
746 |
net-libs/gnutls |
747 |
) |
748 |
mysql? ( virtual/mysql ) |
749 |
sqlite3? ( =dev-db/sqlite-3* ) |
750 |
postgres? ( dev-db/postgresql-base ) |
751 |
oracle? ( dev-db/oracle-instantclient-basic ) |
752 |
jabber? ( dev-libs/iksemel ) |
753 |
curl? ( net-misc/curl ) |
754 |
openipmi? ( sys-libs/openipmi ) |
755 |
ssh? ( net-libs/libssh2 )" |
756 |
|
757 |
RDEPEND="${COMMON_DEPEND} |
758 |
proxy? ( net-analyzer/fping ) |
759 |
server? ( net-analyzer/fping |
760 |
app-admin/webapp-config ) |
761 |
frontend? ( dev-lang/php[bcmath,ctype,sockets,gd,truetype,xml,session] |
762 |
media-libs/gd[png] |
763 |
app-admin/webapp-config )" |
764 |
DEPEND="${COMMON_DEPEND} |
765 |
dev-util/pkgconfig" |
766 |
|
767 |
use frontend && need_php_httpd |
768 |
|
769 |
src_prepare() { |
770 |
epatch "${FILESDIR}/${PN}-1.8.3-as-needed.patch" |
771 |
eautoreconf |
772 |
} |
773 |
|
774 |
pkg_setup() { |
775 |
if use server || use proxy ; then |
776 |
local dbnum dbtypes="mysql oracle postgres sqlite3" dbtype |
777 |
declare -i dbnum=0 |
778 |
for dbtype in ${dbtypes}; do |
779 |
use ${dbtype} && let dbnum++ |
780 |
done |
781 |
if [ ${dbnum} -gt 1 ]; then |
782 |
eerror |
783 |
eerror "You can't use more than one database type in Zabbix." |
784 |
eerror "Select exactly one database type out of these: ${dbtypes}" |
785 |
eerror |
786 |
die "Multiple database types selected." |
787 |
elif [ ${dbnum} -lt 1 ]; then |
788 |
eerror |
789 |
eerror "Select exactly one database type out of these: ${dbtypes}" |
790 |
eerror |
791 |
die "No database type selected." |
792 |
fi |
793 |
if use oracle; then |
794 |
if [ -z "${ORACLE_HOME}" ]; then |
795 |
eerror |
796 |
eerror "The environment variable ORACLE_HOME must be set" |
797 |
eerror "and point to the correct location." |
798 |
eerror "It looks like you don't have Oracle installed." |
799 |
eerror |
800 |
die "Environment variable ORACLE_HOME is not set" |
801 |
fi |
802 |
if has_version 'dev-db/oracle-instantclient-basic'; then |
803 |
ewarn |
804 |
ewarn "Please ensure you have a full install of the Oracle client." |
805 |
ewarn "dev-db/oracle-instantclient* is NOT sufficient." |
806 |
ewarn |
807 |
fi |
808 |
fi |
809 |
fi |
810 |
|
811 |
if use frontend; then |
812 |
webapp_pkg_setup |
813 |
fi |
814 |
|
815 |
enewgroup zabbix |
816 |
enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix |
817 |
} |
818 |
|
819 |
pkg_postinst() { |
820 |
if use server || use proxy ; then |
821 |
elog |
822 |
elog "You need to configure your database for Zabbix." |
823 |
elog |
824 |
elog "Have a look at /usr/share/zabbix/database for" |
825 |
elog "database creation and upgrades." |
826 |
elog |
827 |
elog "For more info read the Zabbix manual at" |
828 |
elog "http://www.zabbix.com/documentation.php" |
829 |
elog |
830 |
|
831 |
zabbix_homedir=$(egethome zabbix) |
832 |
if [ -n "${zabbix_homedir}" ] && \ |
833 |
[ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then |
834 |
ewarn |
835 |
ewarn "The user 'zabbix' should have his homedir changed" |
836 |
ewarn "to /var/lib/zabbix/home if you want to use" |
837 |
ewarn "custom alert scripts." |
838 |
ewarn |
839 |
ewarn "A real homedir might be needed for configfiles" |
840 |
ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when" |
841 |
ewarn "using sendxmpp for Jabber alerts)." |
842 |
ewarn |
843 |
ewarn "To change the homedir use:" |
844 |
ewarn " usermod -d /var/lib/zabbix/home zabbix" |
845 |
ewarn |
846 |
fi |
847 |
fi |
848 |
|
849 |
if use server; then |
850 |
elog |
851 |
elog "For distributed monitoring you have to run:" |
852 |
elog |
853 |
elog "zabbix_server -n <nodeid>" |
854 |
elog |
855 |
elog "This will convert database data for use with Node ID" |
856 |
elog "and also adds a local node." |
857 |
elog |
858 |
fi |
859 |
|
860 |
elog "--" |
861 |
elog |
862 |
elog "Add these lines in the /etc/services :" |
863 |
elog |
864 |
elog "zabbix-agent 10050/tcp Zabbix Agent" |
865 |
elog "zabbix-agent 10050/udp Zabbix Agent" |
866 |
elog "zabbix-trapper 10051/tcp Zabbix Trapper" |
867 |
elog "zabbix-trapper 10051/udp Zabbix Trapper" |
868 |
elog |
869 |
|
870 |
# repeat fowners/fperms functionality from src_install() |
871 |
# here to catch wrong permissions on existing files in |
872 |
# the live filesystem (yeah, that sucks). |
873 |
chown -R zabbix:zabbix \ |
874 |
"${ROOT}"/etc/zabbix \ |
875 |
"${ROOT}"/var/lib/zabbix \ |
876 |
"${ROOT}"/var/lib/zabbix/home \ |
877 |
"${ROOT}"/var/lib/zabbix/scripts \ |
878 |
"${ROOT}"/var/log/zabbix \ |
879 |
"${ROOT}"/var/run/zabbix |
880 |
chmod 0750 \ |
881 |
"${ROOT}"/etc/zabbix \ |
882 |
"${ROOT}"/var/lib/zabbix \ |
883 |
"${ROOT}"/var/lib/zabbix/home \ |
884 |
"${ROOT}"/var/lib/zabbix/scripts \ |
885 |
"${ROOT}"/var/log/zabbix \ |
886 |
"${ROOT}"/var/run/zabbix |
887 |
|
888 |
chmod 0640 \ |
889 |
"${ROOT}"/etc/zabbix/zabbix_* |
890 |
|
891 |
if use server || use proxy ; then |
892 |
# check for fping |
893 |
fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null) |
894 |
case "${fping_perms}" in |
895 |
4[157][157][157]) |
896 |
;; |
897 |
*) |
898 |
ewarn |
899 |
ewarn "If you want to use the checks 'icmpping' and 'icmppingsec'," |
900 |
ewarn "you have to make /usr/sbin/fping setuid root and executable" |
901 |
ewarn "by everyone. Run the following command to fix it:" |
902 |
ewarn |
903 |
ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping" |
904 |
ewarn |
905 |
ewarn "Please be aware that this might impose a security risk," |
906 |
ewarn "depending on the code quality of fping." |
907 |
ewarn |
908 |
ebeep 3 |
909 |
epause 5 |
910 |
;; |
911 |
esac |
912 |
fi |
913 |
} |
914 |
|
915 |
src_configure() { |
916 |
econf \ |
917 |
$(use_enable server) \ |
918 |
$(use_enable proxy) \ |
919 |
$(use_enable agent) \ |
920 |
$(use_enable ipv6) \ |
921 |
$(use_with ldap) \ |
922 |
$(use_with snmp net-snmp) \ |
923 |
$(use_with mysql) \ |
924 |
$(use_with postgres pgsql) \ |
925 |
$(use_with oracle) \ |
926 |
$(use_with sqlite3) \ |
927 |
$(use_with jabber) \ |
928 |
$(use_with curl libcurl) \ |
929 |
$(use_with openipmi openipmi) \ |
930 |
$(use_with ssh ssh2) \ |
931 |
|| die "econf failed" |
932 |
} |
933 |
|
934 |
src_install() { |
935 |
dodir \ |
936 |
/etc/zabbix \ |
937 |
/var/lib/zabbix \ |
938 |
/var/lib/zabbix/home \ |
939 |
/var/lib/zabbix/scripts \ |
940 |
/var/log/zabbix \ |
941 |
/var/run/zabbix |
942 |
|
943 |
keepdir \ |
944 |
/etc/zabbix \ |
945 |
/var/lib/zabbix \ |
946 |
/var/lib/zabbix/home \ |
947 |
/var/lib/zabbix/scripts \ |
948 |
/var/log/zabbix \ |
949 |
/var/run/zabbix |
950 |
|
951 |
if use server; then |
952 |
insinto /etc/zabbix |
953 |
doins \ |
954 |
"${FILESDIR}/1.6.6"/zabbix_server.conf \ |
955 |
"${FILESDIR}/1.6.6"/zabbix_trapper.conf |
956 |
doinitd \ |
957 |
"${FILESDIR}/1.6.6"/init.d/zabbix-server |
958 |
dosbin \ |
959 |
src/zabbix_server/zabbix_server |
960 |
dodir \ |
961 |
/usr/share/zabbix/database |
962 |
insinto /usr/share/zabbix/database |
963 |
doins -r \ |
964 |
upgrades \ |
965 |
create |
966 |
fowners zabbix:zabbix \ |
967 |
/etc/zabbix/zabbix_server.conf \ |
968 |
/etc/zabbix/zabbix_trapper.conf |
969 |
fperms 0640 \ |
970 |
/etc/zabbix/zabbix_server.conf \ |
971 |
/etc/zabbix/zabbix_trapper.conf |
972 |
fi |
973 |
|
974 |
if use proxy; then |
975 |
doinitd \ |
976 |
"${FILESDIR}/1.6.6"/init.d/zabbix-proxy |
977 |
dosbin \ |
978 |
src/zabbix_proxy/zabbix_proxy |
979 |
insinto /etc/zabbix |
980 |
doins \ |
981 |
"${FILESDIR}/1.6.6"/zabbix_proxy.conf |
982 |
dodir \ |
983 |
/usr/share/zabbix/database |
984 |
insinto /usr/share/zabbix/database |
985 |
doins -r \ |
986 |
upgrades \ |
987 |
create |
988 |
fi |
989 |
|
990 |
if use agent; then |
991 |
insinto /etc/zabbix |
992 |
doins \ |
993 |
"${FILESDIR}/1.6.6"/zabbix_agent.conf \ |
994 |
"${FILESDIR}/1.6.6"/zabbix_agentd.conf |
995 |
doinitd \ |
996 |
"${FILESDIR}/1.6.6"/init.d/zabbix-agentd |
997 |
dosbin \ |
998 |
src/zabbix_agent/zabbix_agent \ |
999 |
src/zabbix_agent/zabbix_agentd |
1000 |
dobin \ |
1001 |
src/zabbix_sender/zabbix_sender \ |
1002 |
src/zabbix_get/zabbix_get |
1003 |
fowners zabbix:zabbix \ |
1004 |
/etc/zabbix/zabbix_agent.conf \ |
1005 |
/etc/zabbix/zabbix_agentd.conf |
1006 |
fperms 0640 \ |
1007 |
/etc/zabbix/zabbix_agent.conf \ |
1008 |
/etc/zabbix/zabbix_agentd.conf |
1009 |
fi |
1010 |
|
1011 |
fowners zabbix:zabbix \ |
1012 |
/etc/zabbix \ |
1013 |
/var/lib/zabbix \ |
1014 |
/var/lib/zabbix/home \ |
1015 |
/var/lib/zabbix/scripts \ |
1016 |
/var/log/zabbix \ |
1017 |
/var/run/zabbix |
1018 |
fperms 0750 \ |
1019 |
/etc/zabbix \ |
1020 |
/var/lib/zabbix \ |
1021 |
/var/lib/zabbix/home \ |
1022 |
/var/lib/zabbix/scripts \ |
1023 |
/var/log/zabbix \ |
1024 |
/var/run/zabbix |
1025 |
|
1026 |
dodoc README INSTALL NEWS ChangeLog |
1027 |
|
1028 |
if use frontend; then |
1029 |
webapp_src_preinst |
1030 |
cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}" |
1031 |
webapp_postinst_txt en "${FILESDIR}/"1.6.6/postinstall-en.txt |
1032 |
webapp_configfile \ |
1033 |
"${MY_HTDOCSDIR}"/include/db.inc.php \ |
1034 |
"${MY_HTDOCSDIR}"/include/config.inc.php |
1035 |
webapp_src_install |
1036 |
fi |
1037 |
} |
1038 |
|
1039 |
|
1040 |
|
1041 |
1.1 net-analyzer/zabbix/zabbix-1.8.10-r1.ebuild |
1042 |
|
1043 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/zabbix-1.8.10-r1.ebuild?rev=1.1&view=markup |
1044 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/zabbix-1.8.10-r1.ebuild?rev=1.1&content-type=text/plain |
1045 |
|
1046 |
Index: zabbix-1.8.10-r1.ebuild |
1047 |
=================================================================== |
1048 |
# Copyright 1999-2011 Gentoo Foundation |
1049 |
# Distributed under the terms of the GNU General Public License v2 |
1050 |
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/zabbix-1.8.10-r1.ebuild,v 1.1 2011/12/31 20:47:13 idl0r Exp $ |
1051 |
|
1052 |
EAPI="2" |
1053 |
|
1054 |
# needed to make webapp-config dep optional |
1055 |
WEBAPP_OPTIONAL="yes" |
1056 |
inherit eutils flag-o-matic webapp depend.php autotools |
1057 |
|
1058 |
DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers." |
1059 |
HOMEPAGE="http://www.zabbix.com/" |
1060 |
MY_P=${P/_/} |
1061 |
SRC_URI="http://prdownloads.sourceforge.net/zabbix/${MY_P}.tar.gz" |
1062 |
LICENSE="GPL-2" |
1063 |
SLOT="0" |
1064 |
WEBAPP_MANUAL_SLOT="yes" |
1065 |
KEYWORDS="~amd64 ~x86" |
1066 |
IUSE="agent curl frontend ipv6 jabber ldap mysql openipmi oracle postgres proxy server -ssh snmp +sqlite3" |
1067 |
|
1068 |
COMMON_DEPEND="snmp? ( net-analyzer/net-snmp ) |
1069 |
ldap? ( |
1070 |
net-nds/openldap |
1071 |
=dev-libs/cyrus-sasl-2* |
1072 |
net-libs/gnutls |
1073 |
) |
1074 |
mysql? ( virtual/mysql ) |
1075 |
sqlite3? ( =dev-db/sqlite-3* ) |
1076 |
postgres? ( dev-db/postgresql-base ) |
1077 |
oracle? ( dev-db/oracle-instantclient-basic ) |
1078 |
jabber? ( dev-libs/iksemel ) |
1079 |
curl? ( net-misc/curl ) |
1080 |
openipmi? ( sys-libs/openipmi ) |
1081 |
ssh? ( net-libs/libssh2 )" |
1082 |
|
1083 |
RDEPEND="${COMMON_DEPEND} |
1084 |
proxy? ( net-analyzer/fping ) |
1085 |
server? ( net-analyzer/fping |
1086 |
app-admin/webapp-config ) |
1087 |
frontend? ( dev-lang/php[bcmath,ctype,sockets,gd,truetype,xml,session] |
1088 |
media-libs/gd[png] |
1089 |
app-admin/webapp-config )" |
1090 |
DEPEND="${COMMON_DEPEND} |
1091 |
dev-util/pkgconfig" |
1092 |
|
1093 |
use frontend && need_php_httpd |
1094 |
|
1095 |
src_prepare() { |
1096 |
epatch "${FILESDIR}/${PN}-1.8.9-as-needed.patch" |
1097 |
eautoreconf |
1098 |
} |
1099 |
|
1100 |
pkg_setup() { |
1101 |
if use server || use proxy ; then |
1102 |
local dbnum dbtypes="mysql oracle postgres sqlite3" dbtype |
1103 |
declare -i dbnum=0 |
1104 |
for dbtype in ${dbtypes}; do |
1105 |
use ${dbtype} && let dbnum++ |
1106 |
done |
1107 |
if [ ${dbnum} -gt 1 ]; then |
1108 |
eerror |
1109 |
eerror "You can't use more than one database type in Zabbix." |
1110 |
eerror "Select exactly one database type out of these: ${dbtypes}" |
1111 |
eerror |
1112 |
die "Multiple database types selected." |
1113 |
elif [ ${dbnum} -lt 1 ]; then |
1114 |
eerror |
1115 |
eerror "Select exactly one database type out of these: ${dbtypes}" |
1116 |
eerror |
1117 |
die "No database type selected." |
1118 |
fi |
1119 |
if use oracle; then |
1120 |
if [ -z "${ORACLE_HOME}" ]; then |
1121 |
eerror |
1122 |
eerror "The environment variable ORACLE_HOME must be set" |
1123 |
eerror "and point to the correct location." |
1124 |
eerror "It looks like you don't have Oracle installed." |
1125 |
eerror |
1126 |
die "Environment variable ORACLE_HOME is not set" |
1127 |
fi |
1128 |
if has_version 'dev-db/oracle-instantclient-basic'; then |
1129 |
ewarn |
1130 |
ewarn "Please ensure you have a full install of the Oracle client." |
1131 |
ewarn "dev-db/oracle-instantclient* is NOT sufficient." |
1132 |
ewarn |
1133 |
fi |
1134 |
fi |
1135 |
fi |
1136 |
|
1137 |
if use frontend; then |
1138 |
webapp_pkg_setup |
1139 |
fi |
1140 |
|
1141 |
enewgroup zabbix |
1142 |
enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix |
1143 |
} |
1144 |
|
1145 |
pkg_postinst() { |
1146 |
if use server || use proxy ; then |
1147 |
elog |
1148 |
elog "You need to configure your database for Zabbix." |
1149 |
elog |
1150 |
elog "Have a look at /usr/share/zabbix/database for" |
1151 |
elog "database creation and upgrades." |
1152 |
elog |
1153 |
elog "For more info read the Zabbix manual at" |
1154 |
elog "http://www.zabbix.com/documentation.php" |
1155 |
elog |
1156 |
|
1157 |
zabbix_homedir=$(egethome zabbix) |
1158 |
if [ -n "${zabbix_homedir}" ] && \ |
1159 |
[ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then |
1160 |
ewarn |
1161 |
ewarn "The user 'zabbix' should have his homedir changed" |
1162 |
ewarn "to /var/lib/zabbix/home if you want to use" |
1163 |
ewarn "custom alert scripts." |
1164 |
ewarn |
1165 |
ewarn "A real homedir might be needed for configfiles" |
1166 |
ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when" |
1167 |
ewarn "using sendxmpp for Jabber alerts)." |
1168 |
ewarn |
1169 |
ewarn "To change the homedir use:" |
1170 |
ewarn " usermod -d /var/lib/zabbix/home zabbix" |
1171 |
ewarn |
1172 |
fi |
1173 |
fi |
1174 |
|
1175 |
if use server; then |
1176 |
elog |
1177 |
elog "For distributed monitoring you have to run:" |
1178 |
elog |
1179 |
elog "zabbix_server -n <nodeid>" |
1180 |
elog |
1181 |
elog "This will convert database data for use with Node ID" |
1182 |
elog "and also adds a local node." |
1183 |
elog |
1184 |
fi |
1185 |
|
1186 |
elog "--" |
1187 |
elog |
1188 |
elog "Add these lines in the /etc/services :" |
1189 |
elog |
1190 |
elog "zabbix-agent 10050/tcp Zabbix Agent" |
1191 |
elog "zabbix-agent 10050/udp Zabbix Agent" |
1192 |
elog "zabbix-trapper 10051/tcp Zabbix Trapper" |
1193 |
elog "zabbix-trapper 10051/udp Zabbix Trapper" |
1194 |
elog |
1195 |
|
1196 |
# repeat fowners/fperms functionality from src_install() |
1197 |
# here to catch wrong permissions on existing files in |
1198 |
# the live filesystem (yeah, that sucks). |
1199 |
chown -R zabbix:zabbix \ |
1200 |
"${ROOT}"/etc/zabbix \ |
1201 |
"${ROOT}"/var/lib/zabbix \ |
1202 |
"${ROOT}"/var/lib/zabbix/home \ |
1203 |
"${ROOT}"/var/lib/zabbix/scripts \ |
1204 |
"${ROOT}"/var/log/zabbix \ |
1205 |
"${ROOT}"/var/run/zabbix |
1206 |
chmod 0750 \ |
1207 |
"${ROOT}"/etc/zabbix \ |
1208 |
"${ROOT}"/var/lib/zabbix \ |
1209 |
"${ROOT}"/var/lib/zabbix/home \ |
1210 |
"${ROOT}"/var/lib/zabbix/scripts \ |
1211 |
"${ROOT}"/var/log/zabbix \ |
1212 |
"${ROOT}"/var/run/zabbix |
1213 |
|
1214 |
chmod 0640 \ |
1215 |
"${ROOT}"/etc/zabbix/zabbix_* |
1216 |
|
1217 |
if use server || use proxy ; then |
1218 |
# check for fping |
1219 |
fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null) |
1220 |
case "${fping_perms}" in |
1221 |
4[157][157][157]) |
1222 |
;; |
1223 |
*) |
1224 |
ewarn |
1225 |
ewarn "If you want to use the checks 'icmpping' and 'icmppingsec'," |
1226 |
ewarn "you have to make /usr/sbin/fping setuid root and executable" |
1227 |
ewarn "by everyone. Run the following command to fix it:" |
1228 |
ewarn |
1229 |
ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping" |
1230 |
ewarn |
1231 |
ewarn "Please be aware that this might impose a security risk," |
1232 |
ewarn "depending on the code quality of fping." |
1233 |
ewarn |
1234 |
ebeep 3 |
1235 |
epause 5 |
1236 |
;; |
1237 |
esac |
1238 |
fi |
1239 |
} |
1240 |
|
1241 |
src_configure() { |
1242 |
econf \ |
1243 |
$(use_enable server) \ |
1244 |
$(use_enable proxy) \ |
1245 |
$(use_enable agent) \ |
1246 |
$(use_enable ipv6) \ |
1247 |
$(use_with ldap) \ |
1248 |
$(use_with snmp net-snmp) \ |
1249 |
$(use_with mysql) \ |
1250 |
$(use_with postgres pgsql) \ |
1251 |
$(use_with oracle) \ |
1252 |
$(use_with sqlite3) \ |
1253 |
$(use_with jabber) \ |
1254 |
$(use_with curl libcurl) \ |
1255 |
$(use_with openipmi openipmi) \ |
1256 |
$(use_with ssh ssh2) \ |
1257 |
|| die "econf failed" |
1258 |
} |
1259 |
|
1260 |
src_install() { |
1261 |
dodir \ |
1262 |
/etc/zabbix \ |
1263 |
/var/lib/zabbix \ |
1264 |
/var/lib/zabbix/home \ |
1265 |
/var/lib/zabbix/scripts \ |
1266 |
/var/log/zabbix \ |
1267 |
/var/run/zabbix |
1268 |
|
1269 |
keepdir \ |
1270 |
/etc/zabbix \ |
1271 |
/var/lib/zabbix \ |
1272 |
/var/lib/zabbix/home \ |
1273 |
/var/lib/zabbix/scripts \ |
1274 |
/var/log/zabbix \ |
1275 |
/var/run/zabbix |
1276 |
|
1277 |
if use server; then |
1278 |
insinto /etc/zabbix |
1279 |
doins \ |
1280 |
"${FILESDIR}/1.6.6"/zabbix_server.conf \ |
1281 |
"${FILESDIR}/1.6.6"/zabbix_trapper.conf |
1282 |
doinitd \ |
1283 |
"${FILESDIR}/1.6.6"/init.d/zabbix-server |
1284 |
dosbin \ |
1285 |
src/zabbix_server/zabbix_server |
1286 |
dodir \ |
1287 |
/usr/share/zabbix/database |
1288 |
insinto /usr/share/zabbix/database |
1289 |
doins -r \ |
1290 |
upgrades \ |
1291 |
create |
1292 |
fowners zabbix:zabbix \ |
1293 |
/etc/zabbix/zabbix_server.conf \ |
1294 |
/etc/zabbix/zabbix_trapper.conf |
1295 |
fperms 0640 \ |
1296 |
/etc/zabbix/zabbix_server.conf \ |
1297 |
/etc/zabbix/zabbix_trapper.conf |
1298 |
fi |
1299 |
|
1300 |
if use proxy; then |
1301 |
doinitd \ |
1302 |
"${FILESDIR}/1.6.6"/init.d/zabbix-proxy |
1303 |
dosbin \ |
1304 |
src/zabbix_proxy/zabbix_proxy |
1305 |
insinto /etc/zabbix |
1306 |
doins \ |
1307 |
"${FILESDIR}/1.6.6"/zabbix_proxy.conf |
1308 |
dodir \ |
1309 |
/usr/share/zabbix/database |
1310 |
insinto /usr/share/zabbix/database |
1311 |
doins -r \ |
1312 |
upgrades \ |
1313 |
create |
1314 |
fi |
1315 |
|
1316 |
if use agent; then |
1317 |
insinto /etc/zabbix |
1318 |
doins \ |
1319 |
"${FILESDIR}/1.6.6"/zabbix_agent.conf \ |
1320 |
"${FILESDIR}/1.6.6"/zabbix_agentd.conf |
1321 |
doinitd \ |
1322 |
"${FILESDIR}/1.6.6"/init.d/zabbix-agentd |
1323 |
dosbin \ |
1324 |
src/zabbix_agent/zabbix_agent \ |
1325 |
src/zabbix_agent/zabbix_agentd |
1326 |
dobin \ |
1327 |
src/zabbix_sender/zabbix_sender \ |
1328 |
src/zabbix_get/zabbix_get |
1329 |
fowners zabbix:zabbix \ |
1330 |
/etc/zabbix/zabbix_agent.conf \ |
1331 |
/etc/zabbix/zabbix_agentd.conf |
1332 |
fperms 0640 \ |
1333 |
/etc/zabbix/zabbix_agent.conf \ |
1334 |
/etc/zabbix/zabbix_agentd.conf |
1335 |
fi |
1336 |
|
1337 |
fowners zabbix:zabbix \ |
1338 |
/etc/zabbix \ |
1339 |
/var/lib/zabbix \ |
1340 |
/var/lib/zabbix/home \ |
1341 |
/var/lib/zabbix/scripts \ |
1342 |
/var/log/zabbix \ |
1343 |
/var/run/zabbix |
1344 |
fperms 0750 \ |
1345 |
/etc/zabbix \ |
1346 |
/var/lib/zabbix \ |
1347 |
/var/lib/zabbix/home \ |
1348 |
/var/lib/zabbix/scripts \ |
1349 |
/var/log/zabbix \ |
1350 |
/var/run/zabbix |
1351 |
|
1352 |
dodoc README INSTALL NEWS ChangeLog |
1353 |
|
1354 |
if use frontend; then |
1355 |
webapp_src_preinst |
1356 |
cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}" |
1357 |
webapp_postinst_txt en "${FILESDIR}/"1.6.6/postinstall-en.txt |
1358 |
webapp_configfile \ |
1359 |
"${MY_HTDOCSDIR}"/include/db.inc.php \ |
1360 |
"${MY_HTDOCSDIR}"/include/config.inc.php |
1361 |
webapp_src_install |
1362 |
fi |
1363 |
} |
1364 |
|
1365 |
|
1366 |
|
1367 |
1.1 net-analyzer/zabbix/zabbix-1.8.8-r2.ebuild |
1368 |
|
1369 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/zabbix-1.8.8-r2.ebuild?rev=1.1&view=markup |
1370 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/zabbix-1.8.8-r2.ebuild?rev=1.1&content-type=text/plain |
1371 |
|
1372 |
Index: zabbix-1.8.8-r2.ebuild |
1373 |
=================================================================== |
1374 |
# Copyright 1999-2011 Gentoo Foundation |
1375 |
# Distributed under the terms of the GNU General Public License v2 |
1376 |
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/zabbix-1.8.8-r2.ebuild,v 1.1 2011/12/31 20:47:13 idl0r Exp $ |
1377 |
|
1378 |
EAPI="2" |
1379 |
|
1380 |
# needed to make webapp-config dep optional |
1381 |
WEBAPP_OPTIONAL="yes" |
1382 |
inherit eutils flag-o-matic webapp depend.php autotools |
1383 |
|
1384 |
DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers." |
1385 |
HOMEPAGE="http://www.zabbix.com/" |
1386 |
SRC_URI="http://prdownloads.sourceforge.net/zabbix/${P}.tar.gz" |
1387 |
LICENSE="GPL-2" |
1388 |
SLOT="0" |
1389 |
WEBAPP_MANUAL_SLOT="yes" |
1390 |
KEYWORDS="~amd64 ~x86" |
1391 |
IUSE="agent curl frontend ipv6 jabber ldap mysql openipmi oracle postgres proxy server -ssh snmp +sqlite3" |
1392 |
|
1393 |
COMMON_DEPEND="snmp? ( net-analyzer/net-snmp ) |
1394 |
ldap? ( |
1395 |
net-nds/openldap |
1396 |
=dev-libs/cyrus-sasl-2* |
1397 |
net-libs/gnutls |
1398 |
) |
1399 |
mysql? ( virtual/mysql ) |
1400 |
sqlite3? ( =dev-db/sqlite-3* ) |
1401 |
postgres? ( dev-db/postgresql-base ) |
1402 |
jabber? ( dev-libs/iksemel ) |
1403 |
curl? ( net-misc/curl ) |
1404 |
openipmi? ( sys-libs/openipmi ) |
1405 |
ssh? ( net-libs/libssh2 )" |
1406 |
|
1407 |
RDEPEND="${COMMON_DEPEND} |
1408 |
proxy? ( net-analyzer/fping ) |
1409 |
server? ( net-analyzer/fping |
1410 |
app-admin/webapp-config ) |
1411 |
frontend? ( dev-lang/php[bcmath,ctype,sockets,gd,truetype,xml,session] |
1412 |
media-libs/gd[png] |
1413 |
app-admin/webapp-config )" |
1414 |
DEPEND="${COMMON_DEPEND} |
1415 |
dev-util/pkgconfig" |
1416 |
|
1417 |
use frontend && need_php_httpd |
1418 |
|
1419 |
src_prepare() { |
1420 |
epatch "${FILESDIR}/${PN}-1.8.3-as-needed.patch" |
1421 |
eautoreconf |
1422 |
} |
1423 |
|
1424 |
pkg_setup() { |
1425 |
if use server || use proxy ; then |
1426 |
local dbnum dbtypes="mysql oracle postgres sqlite3" dbtype |
1427 |
declare -i dbnum=0 |
1428 |
for dbtype in ${dbtypes}; do |
1429 |
use ${dbtype} && let dbnum++ |
1430 |
done |
1431 |
if [ ${dbnum} -gt 1 ]; then |
1432 |
eerror |
1433 |
eerror "You can't use more than one database type in Zabbix." |
1434 |
eerror "Select exactly one database type out of these: ${dbtypes}" |
1435 |
eerror |
1436 |
die "Multiple database types selected." |
1437 |
elif [ ${dbnum} -lt 1 ]; then |
1438 |
eerror |
1439 |
eerror "Select exactly one database type out of these: ${dbtypes}" |
1440 |
eerror |
1441 |
die "No database type selected." |
1442 |
fi |
1443 |
if use oracle; then |
1444 |
if [ -z "${ORACLE_HOME}" ]; then |
1445 |
eerror |
1446 |
eerror "The environment variable ORACLE_HOME must be set" |
1447 |
eerror "and point to the correct location." |
1448 |
eerror "It looks like you don't have Oracle installed." |
1449 |
eerror |
1450 |
die "Environment variable ORACLE_HOME is not set" |
1451 |
fi |
1452 |
if has_version 'dev-db/oracle-instantclient-basic'; then |
1453 |
ewarn |
1454 |
ewarn "Please ensure you have a full install of the Oracle client." |
1455 |
ewarn "dev-db/oracle-instantclient* is NOT sufficient." |
1456 |
ewarn |
1457 |
fi |
1458 |
fi |
1459 |
fi |
1460 |
|
1461 |
if use frontend; then |
1462 |
webapp_pkg_setup |
1463 |
fi |
1464 |
|
1465 |
enewgroup zabbix |
1466 |
enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix |
1467 |
} |
1468 |
|
1469 |
pkg_postinst() { |
1470 |
if use server || use proxy ; then |
1471 |
elog |
1472 |
elog "You need to configure your database for Zabbix." |
1473 |
elog |
1474 |
elog "Have a look at /usr/share/zabbix/database for" |
1475 |
elog "database creation and upgrades." |
1476 |
elog |
1477 |
elog "For more info read the Zabbix manual at" |
1478 |
elog "http://www.zabbix.com/documentation.php" |
1479 |
elog |
1480 |
|
1481 |
zabbix_homedir=$(egethome zabbix) |
1482 |
if [ -n "${zabbix_homedir}" ] && \ |
1483 |
[ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then |
1484 |
ewarn |
1485 |
ewarn "The user 'zabbix' should have his homedir changed" |
1486 |
ewarn "to /var/lib/zabbix/home if you want to use" |
1487 |
ewarn "custom alert scripts." |
1488 |
ewarn |
1489 |
ewarn "A real homedir might be needed for configfiles" |
1490 |
ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when" |
1491 |
ewarn "using sendxmpp for Jabber alerts)." |
1492 |
ewarn |
1493 |
ewarn "To change the homedir use:" |
1494 |
ewarn " usermod -d /var/lib/zabbix/home zabbix" |
1495 |
ewarn |
1496 |
fi |
1497 |
fi |
1498 |
|
1499 |
if use server; then |
1500 |
elog |
1501 |
elog "For distributed monitoring you have to run:" |
1502 |
elog |
1503 |
elog "zabbix_server -n <nodeid>" |
1504 |
elog |
1505 |
elog "This will convert database data for use with Node ID" |
1506 |
elog "and also adds a local node." |
1507 |
elog |
1508 |
fi |
1509 |
|
1510 |
elog "--" |
1511 |
elog |
1512 |
elog "Add these lines in the /etc/services :" |
1513 |
elog |
1514 |
elog "zabbix-agent 10050/tcp Zabbix Agent" |
1515 |
elog "zabbix-agent 10050/udp Zabbix Agent" |
1516 |
elog "zabbix-trapper 10051/tcp Zabbix Trapper" |
1517 |
elog "zabbix-trapper 10051/udp Zabbix Trapper" |
1518 |
elog |
1519 |
|
1520 |
# repeat fowners/fperms functionality from src_install() |
1521 |
# here to catch wrong permissions on existing files in |
1522 |
# the live filesystem (yeah, that sucks). |
1523 |
chown -R zabbix:zabbix \ |
1524 |
"${ROOT}"/etc/zabbix \ |
1525 |
"${ROOT}"/var/lib/zabbix \ |
1526 |
"${ROOT}"/var/lib/zabbix/home \ |
1527 |
"${ROOT}"/var/lib/zabbix/scripts \ |
1528 |
"${ROOT}"/var/log/zabbix \ |
1529 |
"${ROOT}"/var/run/zabbix |
1530 |
chmod 0750 \ |
1531 |
"${ROOT}"/etc/zabbix \ |
1532 |
"${ROOT}"/var/lib/zabbix \ |
1533 |
"${ROOT}"/var/lib/zabbix/home \ |
1534 |
"${ROOT}"/var/lib/zabbix/scripts \ |
1535 |
"${ROOT}"/var/log/zabbix \ |
1536 |
"${ROOT}"/var/run/zabbix |
1537 |
|
1538 |
chmod 0640 \ |
1539 |
"${ROOT}"/etc/zabbix/zabbix_* |
1540 |
|
1541 |
if use server || use proxy ; then |
1542 |
# check for fping |
1543 |
fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null) |
1544 |
case "${fping_perms}" in |
1545 |
4[157][157][157]) |
1546 |
;; |
1547 |
*) |
1548 |
ewarn |
1549 |
ewarn "If you want to use the checks 'icmpping' and 'icmppingsec'," |
1550 |
ewarn "you have to make /usr/sbin/fping setuid root and executable" |
1551 |
ewarn "by everyone. Run the following command to fix it:" |
1552 |
ewarn |
1553 |
ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping" |
1554 |
ewarn |
1555 |
ewarn "Please be aware that this might impose a security risk," |
1556 |
ewarn "depending on the code quality of fping." |
1557 |
ewarn |
1558 |
ebeep 3 |
1559 |
epause 5 |
1560 |
;; |
1561 |
esac |
1562 |
fi |
1563 |
} |
1564 |
|
1565 |
src_configure() { |
1566 |
econf \ |
1567 |
$(use_enable server) \ |
1568 |
$(use_enable proxy) \ |
1569 |
$(use_enable agent) \ |
1570 |
$(use_enable ipv6) \ |
1571 |
$(use_with ldap) \ |
1572 |
$(use_with snmp net-snmp) \ |
1573 |
$(use_with mysql) \ |
1574 |
$(use_with postgres pgsql) \ |
1575 |
$(use_with oracle) \ |
1576 |
$(use_with sqlite3) \ |
1577 |
$(use_with jabber) \ |
1578 |
$(use_with curl libcurl) \ |
1579 |
$(use_with openipmi openipmi) \ |
1580 |
$(use_with ssh ssh2) \ |
1581 |
|| die "econf failed" |
1582 |
} |
1583 |
|
1584 |
src_install() { |
1585 |
dodir \ |
1586 |
/etc/zabbix \ |
1587 |
/var/lib/zabbix \ |
1588 |
/var/lib/zabbix/home \ |
1589 |
/var/lib/zabbix/scripts \ |
1590 |
/var/log/zabbix \ |
1591 |
/var/run/zabbix |
1592 |
|
1593 |
keepdir \ |
1594 |
/etc/zabbix \ |
1595 |
/var/lib/zabbix \ |
1596 |
/var/lib/zabbix/home \ |
1597 |
/var/lib/zabbix/scripts \ |
1598 |
/var/log/zabbix \ |
1599 |
/var/run/zabbix |
1600 |
|
1601 |
if use server; then |
1602 |
insinto /etc/zabbix |
1603 |
doins \ |
1604 |
"${FILESDIR}/1.6.6"/zabbix_server.conf \ |
1605 |
"${FILESDIR}/1.6.6"/zabbix_trapper.conf |
1606 |
doinitd \ |
1607 |
"${FILESDIR}/1.6.6"/init.d/zabbix-server |
1608 |
dosbin \ |
1609 |
src/zabbix_server/zabbix_server |
1610 |
dodir \ |
1611 |
/usr/share/zabbix/database |
1612 |
insinto /usr/share/zabbix/database |
1613 |
doins -r \ |
1614 |
upgrades \ |
1615 |
create |
1616 |
fowners zabbix:zabbix \ |
1617 |
/etc/zabbix/zabbix_server.conf \ |
1618 |
/etc/zabbix/zabbix_trapper.conf |
1619 |
fperms 0640 \ |
1620 |
/etc/zabbix/zabbix_server.conf \ |
1621 |
/etc/zabbix/zabbix_trapper.conf |
1622 |
fi |
1623 |
|
1624 |
if use proxy; then |
1625 |
doinitd \ |
1626 |
"${FILESDIR}/1.6.6"/init.d/zabbix-proxy |
1627 |
dosbin \ |
1628 |
src/zabbix_proxy/zabbix_proxy |
1629 |
insinto /etc/zabbix |
1630 |
doins \ |
1631 |
"${FILESDIR}/1.6.6"/zabbix_proxy.conf |
1632 |
dodir \ |
1633 |
/usr/share/zabbix/database |
1634 |
insinto /usr/share/zabbix/database |
1635 |
doins -r \ |
1636 |
upgrades \ |
1637 |
create |
1638 |
fi |
1639 |
|
1640 |
if use agent; then |
1641 |
insinto /etc/zabbix |
1642 |
doins \ |
1643 |
"${FILESDIR}/1.6.6"/zabbix_agent.conf \ |
1644 |
"${FILESDIR}/1.6.6"/zabbix_agentd.conf |
1645 |
doinitd \ |
1646 |
"${FILESDIR}/1.6.6"/init.d/zabbix-agentd |
1647 |
dosbin \ |
1648 |
src/zabbix_agent/zabbix_agent \ |
1649 |
src/zabbix_agent/zabbix_agentd |
1650 |
dobin \ |
1651 |
src/zabbix_sender/zabbix_sender \ |
1652 |
src/zabbix_get/zabbix_get |
1653 |
fowners zabbix:zabbix \ |
1654 |
/etc/zabbix/zabbix_agent.conf \ |
1655 |
/etc/zabbix/zabbix_agentd.conf |
1656 |
fperms 0640 \ |
1657 |
/etc/zabbix/zabbix_agent.conf \ |
1658 |
/etc/zabbix/zabbix_agentd.conf |
1659 |
fi |
1660 |
|
1661 |
fowners zabbix:zabbix \ |
1662 |
/etc/zabbix \ |
1663 |
/var/lib/zabbix \ |
1664 |
/var/lib/zabbix/home \ |
1665 |
/var/lib/zabbix/scripts \ |
1666 |
/var/log/zabbix \ |
1667 |
/var/run/zabbix |
1668 |
fperms 0750 \ |
1669 |
/etc/zabbix \ |
1670 |
/var/lib/zabbix \ |
1671 |
/var/lib/zabbix/home \ |
1672 |
/var/lib/zabbix/scripts \ |
1673 |
/var/log/zabbix \ |
1674 |
/var/run/zabbix |
1675 |
|
1676 |
dodoc README INSTALL NEWS ChangeLog |
1677 |
|
1678 |
if use frontend; then |
1679 |
webapp_src_preinst |
1680 |
cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}" |
1681 |
webapp_postinst_txt en "${FILESDIR}/"1.6.6/postinstall-en.txt |
1682 |
webapp_configfile \ |
1683 |
"${MY_HTDOCSDIR}"/include/db.inc.php \ |
1684 |
"${MY_HTDOCSDIR}"/include/config.inc.php |
1685 |
webapp_src_install |
1686 |
fi |
1687 |
} |
1688 |
|
1689 |
|
1690 |
|
1691 |
1.1 net-analyzer/zabbix/zabbix-1.8.8-r3.ebuild |
1692 |
|
1693 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/zabbix-1.8.8-r3.ebuild?rev=1.1&view=markup |
1694 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/zabbix-1.8.8-r3.ebuild?rev=1.1&content-type=text/plain |
1695 |
|
1696 |
Index: zabbix-1.8.8-r3.ebuild |
1697 |
=================================================================== |
1698 |
# Copyright 1999-2011 Gentoo Foundation |
1699 |
# Distributed under the terms of the GNU General Public License v2 |
1700 |
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/zabbix-1.8.8-r3.ebuild,v 1.1 2011/12/31 20:47:13 idl0r Exp $ |
1701 |
|
1702 |
EAPI="2" |
1703 |
|
1704 |
# needed to make webapp-config dep optional |
1705 |
WEBAPP_OPTIONAL="yes" |
1706 |
inherit eutils flag-o-matic webapp depend.php autotools |
1707 |
|
1708 |
DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers." |
1709 |
HOMEPAGE="http://www.zabbix.com/" |
1710 |
SRC_URI="http://prdownloads.sourceforge.net/zabbix/${P}.tar.gz" |
1711 |
LICENSE="GPL-2" |
1712 |
SLOT="0" |
1713 |
WEBAPP_MANUAL_SLOT="yes" |
1714 |
KEYWORDS="~amd64 ~x86" |
1715 |
IUSE="agent curl frontend ipv6 jabber ldap mysql openipmi oracle postgres proxy server -ssh snmp +sqlite3" |
1716 |
|
1717 |
COMMON_DEPEND="snmp? ( net-analyzer/net-snmp ) |
1718 |
ldap? ( |
1719 |
net-nds/openldap |
1720 |
=dev-libs/cyrus-sasl-2* |
1721 |
net-libs/gnutls |
1722 |
) |
1723 |
mysql? ( virtual/mysql ) |
1724 |
sqlite3? ( =dev-db/sqlite-3* ) |
1725 |
postgres? ( dev-db/postgresql-base ) |
1726 |
oracle? ( dev-db/oracle-instantclient-basic ) |
1727 |
jabber? ( dev-libs/iksemel ) |
1728 |
curl? ( net-misc/curl ) |
1729 |
openipmi? ( sys-libs/openipmi ) |
1730 |
ssh? ( net-libs/libssh2 )" |
1731 |
|
1732 |
RDEPEND="${COMMON_DEPEND} |
1733 |
proxy? ( net-analyzer/fping ) |
1734 |
server? ( net-analyzer/fping |
1735 |
app-admin/webapp-config ) |
1736 |
frontend? ( dev-lang/php[bcmath,ctype,sockets,gd,truetype,xml,session] |
1737 |
media-libs/gd[png] |
1738 |
app-admin/webapp-config )" |
1739 |
DEPEND="${COMMON_DEPEND} |
1740 |
dev-util/pkgconfig" |
1741 |
|
1742 |
use frontend && need_php_httpd |
1743 |
|
1744 |
src_prepare() { |
1745 |
epatch "${FILESDIR}/${PN}-1.8.3-as-needed.patch" |
1746 |
eautoreconf |
1747 |
} |
1748 |
|
1749 |
pkg_setup() { |
1750 |
if use server || use proxy ; then |
1751 |
local dbnum dbtypes="mysql oracle postgres sqlite3" dbtype |
1752 |
declare -i dbnum=0 |
1753 |
for dbtype in ${dbtypes}; do |
1754 |
use ${dbtype} && let dbnum++ |
1755 |
done |
1756 |
if [ ${dbnum} -gt 1 ]; then |
1757 |
eerror |
1758 |
eerror "You can't use more than one database type in Zabbix." |
1759 |
eerror "Select exactly one database type out of these: ${dbtypes}" |
1760 |
eerror |
1761 |
die "Multiple database types selected." |
1762 |
elif [ ${dbnum} -lt 1 ]; then |
1763 |
eerror |
1764 |
eerror "Select exactly one database type out of these: ${dbtypes}" |
1765 |
eerror |
1766 |
die "No database type selected." |
1767 |
fi |
1768 |
if use oracle; then |
1769 |
if [ -z "${ORACLE_HOME}" ]; then |
1770 |
eerror |
1771 |
eerror "The environment variable ORACLE_HOME must be set" |
1772 |
eerror "and point to the correct location." |
1773 |
eerror "It looks like you don't have Oracle installed." |
1774 |
eerror |
1775 |
die "Environment variable ORACLE_HOME is not set" |
1776 |
fi |
1777 |
if has_version 'dev-db/oracle-instantclient-basic'; then |
1778 |
ewarn |
1779 |
ewarn "Please ensure you have a full install of the Oracle client." |
1780 |
ewarn "dev-db/oracle-instantclient* is NOT sufficient." |
1781 |
ewarn |
1782 |
fi |
1783 |
fi |
1784 |
fi |
1785 |
|
1786 |
if use frontend; then |
1787 |
webapp_pkg_setup |
1788 |
fi |
1789 |
|
1790 |
enewgroup zabbix |
1791 |
enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix |
1792 |
} |
1793 |
|
1794 |
pkg_postinst() { |
1795 |
if use server || use proxy ; then |
1796 |
elog |
1797 |
elog "You need to configure your database for Zabbix." |
1798 |
elog |
1799 |
elog "Have a look at /usr/share/zabbix/database for" |
1800 |
elog "database creation and upgrades." |
1801 |
elog |
1802 |
elog "For more info read the Zabbix manual at" |
1803 |
elog "http://www.zabbix.com/documentation.php" |
1804 |
elog |
1805 |
|
1806 |
zabbix_homedir=$(egethome zabbix) |
1807 |
if [ -n "${zabbix_homedir}" ] && \ |
1808 |
[ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then |
1809 |
ewarn |
1810 |
ewarn "The user 'zabbix' should have his homedir changed" |
1811 |
ewarn "to /var/lib/zabbix/home if you want to use" |
1812 |
ewarn "custom alert scripts." |
1813 |
ewarn |
1814 |
ewarn "A real homedir might be needed for configfiles" |
1815 |
ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when" |
1816 |
ewarn "using sendxmpp for Jabber alerts)." |
1817 |
ewarn |
1818 |
ewarn "To change the homedir use:" |
1819 |
ewarn " usermod -d /var/lib/zabbix/home zabbix" |
1820 |
ewarn |
1821 |
fi |
1822 |
fi |
1823 |
|
1824 |
if use server; then |
1825 |
elog |
1826 |
elog "For distributed monitoring you have to run:" |
1827 |
elog |
1828 |
elog "zabbix_server -n <nodeid>" |
1829 |
elog |
1830 |
elog "This will convert database data for use with Node ID" |
1831 |
elog "and also adds a local node." |
1832 |
elog |
1833 |
fi |
1834 |
|
1835 |
elog "--" |
1836 |
elog |
1837 |
elog "Add these lines in the /etc/services :" |
1838 |
elog |
1839 |
elog "zabbix-agent 10050/tcp Zabbix Agent" |
1840 |
elog "zabbix-agent 10050/udp Zabbix Agent" |
1841 |
elog "zabbix-trapper 10051/tcp Zabbix Trapper" |
1842 |
elog "zabbix-trapper 10051/udp Zabbix Trapper" |
1843 |
elog |
1844 |
|
1845 |
# repeat fowners/fperms functionality from src_install() |
1846 |
# here to catch wrong permissions on existing files in |
1847 |
# the live filesystem (yeah, that sucks). |
1848 |
chown -R zabbix:zabbix \ |
1849 |
"${ROOT}"/etc/zabbix \ |
1850 |
"${ROOT}"/var/lib/zabbix \ |
1851 |
"${ROOT}"/var/lib/zabbix/home \ |
1852 |
"${ROOT}"/var/lib/zabbix/scripts \ |
1853 |
"${ROOT}"/var/log/zabbix \ |
1854 |
"${ROOT}"/var/run/zabbix |
1855 |
chmod 0750 \ |
1856 |
"${ROOT}"/etc/zabbix \ |
1857 |
"${ROOT}"/var/lib/zabbix \ |
1858 |
"${ROOT}"/var/lib/zabbix/home \ |
1859 |
"${ROOT}"/var/lib/zabbix/scripts \ |
1860 |
"${ROOT}"/var/log/zabbix \ |
1861 |
"${ROOT}"/var/run/zabbix |
1862 |
|
1863 |
chmod 0640 \ |
1864 |
"${ROOT}"/etc/zabbix/zabbix_* |
1865 |
|
1866 |
if use server || use proxy ; then |
1867 |
# check for fping |
1868 |
fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null) |
1869 |
case "${fping_perms}" in |
1870 |
4[157][157][157]) |
1871 |
;; |
1872 |
*) |
1873 |
ewarn |
1874 |
ewarn "If you want to use the checks 'icmpping' and 'icmppingsec'," |
1875 |
ewarn "you have to make /usr/sbin/fping setuid root and executable" |
1876 |
ewarn "by everyone. Run the following command to fix it:" |
1877 |
ewarn |
1878 |
ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping" |
1879 |
ewarn |
1880 |
ewarn "Please be aware that this might impose a security risk," |
1881 |
ewarn "depending on the code quality of fping." |
1882 |
ewarn |
1883 |
ebeep 3 |
1884 |
epause 5 |
1885 |
;; |
1886 |
esac |
1887 |
fi |
1888 |
} |
1889 |
|
1890 |
src_configure() { |
1891 |
econf \ |
1892 |
$(use_enable server) \ |
1893 |
$(use_enable proxy) \ |
1894 |
$(use_enable agent) \ |
1895 |
$(use_enable ipv6) \ |
1896 |
$(use_with ldap) \ |
1897 |
$(use_with snmp net-snmp) \ |
1898 |
$(use_with mysql) \ |
1899 |
$(use_with postgres pgsql) \ |
1900 |
$(use_with oracle) \ |
1901 |
$(use_with sqlite3) \ |
1902 |
$(use_with jabber) \ |
1903 |
$(use_with curl libcurl) \ |
1904 |
$(use_with openipmi openipmi) \ |
1905 |
$(use_with ssh ssh2) \ |
1906 |
|| die "econf failed" |
1907 |
} |
1908 |
|
1909 |
src_install() { |
1910 |
dodir \ |
1911 |
/etc/zabbix \ |
1912 |
/var/lib/zabbix \ |
1913 |
/var/lib/zabbix/home \ |
1914 |
/var/lib/zabbix/scripts \ |
1915 |
/var/log/zabbix \ |
1916 |
/var/run/zabbix |
1917 |
|
1918 |
keepdir \ |
1919 |
/etc/zabbix \ |
1920 |
/var/lib/zabbix \ |
1921 |
/var/lib/zabbix/home \ |
1922 |
/var/lib/zabbix/scripts \ |
1923 |
/var/log/zabbix \ |
1924 |
/var/run/zabbix |
1925 |
|
1926 |
if use server; then |
1927 |
insinto /etc/zabbix |
1928 |
doins \ |
1929 |
"${FILESDIR}/1.6.6"/zabbix_server.conf \ |
1930 |
"${FILESDIR}/1.6.6"/zabbix_trapper.conf |
1931 |
doinitd \ |
1932 |
"${FILESDIR}/1.6.6"/init.d/zabbix-server |
1933 |
dosbin \ |
1934 |
src/zabbix_server/zabbix_server |
1935 |
dodir \ |
1936 |
/usr/share/zabbix/database |
1937 |
insinto /usr/share/zabbix/database |
1938 |
doins -r \ |
1939 |
upgrades \ |
1940 |
create |
1941 |
fowners zabbix:zabbix \ |
1942 |
/etc/zabbix/zabbix_server.conf \ |
1943 |
/etc/zabbix/zabbix_trapper.conf |
1944 |
fperms 0640 \ |
1945 |
/etc/zabbix/zabbix_server.conf \ |
1946 |
/etc/zabbix/zabbix_trapper.conf |
1947 |
fi |
1948 |
|
1949 |
if use proxy; then |
1950 |
doinitd \ |
1951 |
"${FILESDIR}/1.6.6"/init.d/zabbix-proxy |
1952 |
dosbin \ |
1953 |
src/zabbix_proxy/zabbix_proxy |
1954 |
insinto /etc/zabbix |
1955 |
doins \ |
1956 |
"${FILESDIR}/1.6.6"/zabbix_proxy.conf |
1957 |
dodir \ |
1958 |
/usr/share/zabbix/database |
1959 |
insinto /usr/share/zabbix/database |
1960 |
doins -r \ |
1961 |
upgrades \ |
1962 |
create |
1963 |
fi |
1964 |
|
1965 |
if use agent; then |
1966 |
insinto /etc/zabbix |
1967 |
doins \ |
1968 |
"${FILESDIR}/1.6.6"/zabbix_agent.conf \ |
1969 |
"${FILESDIR}/1.6.6"/zabbix_agentd.conf |
1970 |
doinitd \ |
1971 |
"${FILESDIR}/1.6.6"/init.d/zabbix-agentd |
1972 |
dosbin \ |
1973 |
src/zabbix_agent/zabbix_agent \ |
1974 |
src/zabbix_agent/zabbix_agentd |
1975 |
dobin \ |
1976 |
src/zabbix_sender/zabbix_sender \ |
1977 |
src/zabbix_get/zabbix_get |
1978 |
fowners zabbix:zabbix \ |
1979 |
/etc/zabbix/zabbix_agent.conf \ |
1980 |
/etc/zabbix/zabbix_agentd.conf |
1981 |
fperms 0640 \ |
1982 |
/etc/zabbix/zabbix_agent.conf \ |
1983 |
/etc/zabbix/zabbix_agentd.conf |
1984 |
fi |
1985 |
|
1986 |
fowners zabbix:zabbix \ |
1987 |
/etc/zabbix \ |
1988 |
/var/lib/zabbix \ |
1989 |
/var/lib/zabbix/home \ |
1990 |
/var/lib/zabbix/scripts \ |
1991 |
/var/log/zabbix \ |
1992 |
/var/run/zabbix |
1993 |
fperms 0750 \ |
1994 |
/etc/zabbix \ |
1995 |
/var/lib/zabbix \ |
1996 |
/var/lib/zabbix/home \ |
1997 |
/var/lib/zabbix/scripts \ |
1998 |
/var/log/zabbix \ |
1999 |
/var/run/zabbix |
2000 |
|
2001 |
dodoc README INSTALL NEWS ChangeLog |
2002 |
|
2003 |
if use frontend; then |
2004 |
webapp_src_preinst |
2005 |
cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}" |
2006 |
webapp_postinst_txt en "${FILESDIR}/"1.6.6/postinstall-en.txt |
2007 |
webapp_configfile \ |
2008 |
"${MY_HTDOCSDIR}"/include/db.inc.php \ |
2009 |
"${MY_HTDOCSDIR}"/include/config.inc.php |
2010 |
webapp_src_install |
2011 |
fi |
2012 |
} |
2013 |
|
2014 |
|
2015 |
|
2016 |
1.1 net-analyzer/zabbix/zabbix-1.8.9-r3.ebuild |
2017 |
|
2018 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/zabbix-1.8.9-r3.ebuild?rev=1.1&view=markup |
2019 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/zabbix-1.8.9-r3.ebuild?rev=1.1&content-type=text/plain |
2020 |
|
2021 |
Index: zabbix-1.8.9-r3.ebuild |
2022 |
=================================================================== |
2023 |
# Copyright 1999-2011 Gentoo Foundation |
2024 |
# Distributed under the terms of the GNU General Public License v2 |
2025 |
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/zabbix-1.8.9-r3.ebuild,v 1.1 2011/12/31 20:47:13 idl0r Exp $ |
2026 |
|
2027 |
EAPI="2" |
2028 |
|
2029 |
# needed to make webapp-config dep optional |
2030 |
WEBAPP_OPTIONAL="yes" |
2031 |
inherit eutils flag-o-matic webapp depend.php autotools |
2032 |
|
2033 |
DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers." |
2034 |
HOMEPAGE="http://www.zabbix.com/" |
2035 |
SRC_URI="http://prdownloads.sourceforge.net/zabbix/${P}.tar.gz" |
2036 |
LICENSE="GPL-2" |
2037 |
SLOT="0" |
2038 |
WEBAPP_MANUAL_SLOT="yes" |
2039 |
KEYWORDS="~amd64 ~x86" |
2040 |
IUSE="agent curl frontend ipv6 jabber ldap mysql openipmi oracle postgres proxy server -ssh snmp +sqlite3" |
2041 |
|
2042 |
COMMON_DEPEND="snmp? ( net-analyzer/net-snmp ) |
2043 |
ldap? ( |
2044 |
net-nds/openldap |
2045 |
=dev-libs/cyrus-sasl-2* |
2046 |
net-libs/gnutls |
2047 |
) |
2048 |
mysql? ( virtual/mysql ) |
2049 |
sqlite3? ( =dev-db/sqlite-3* ) |
2050 |
postgres? ( dev-db/postgresql-base ) |
2051 |
oracle? ( dev-db/oracle-instantclient-basic ) |
2052 |
jabber? ( dev-libs/iksemel ) |
2053 |
curl? ( net-misc/curl ) |
2054 |
openipmi? ( sys-libs/openipmi ) |
2055 |
ssh? ( net-libs/libssh2 )" |
2056 |
|
2057 |
RDEPEND="${COMMON_DEPEND} |
2058 |
proxy? ( net-analyzer/fping ) |
2059 |
server? ( net-analyzer/fping |
2060 |
app-admin/webapp-config ) |
2061 |
frontend? ( dev-lang/php[bcmath,ctype,sockets,gd,truetype,xml,session] |
2062 |
media-libs/gd[png] |
2063 |
app-admin/webapp-config )" |
2064 |
DEPEND="${COMMON_DEPEND} |
2065 |
dev-util/pkgconfig" |
2066 |
|
2067 |
use frontend && need_php_httpd |
2068 |
|
2069 |
src_prepare() { |
2070 |
epatch "${FILESDIR}/${PN}-1.8.9-as-needed.patch" |
2071 |
eautoreconf |
2072 |
} |
2073 |
|
2074 |
pkg_setup() { |
2075 |
if use server || use proxy ; then |
2076 |
local dbnum dbtypes="mysql oracle postgres sqlite3" dbtype |
2077 |
declare -i dbnum=0 |
2078 |
for dbtype in ${dbtypes}; do |
2079 |
use ${dbtype} && let dbnum++ |
2080 |
done |
2081 |
if [ ${dbnum} -gt 1 ]; then |
2082 |
eerror |
2083 |
eerror "You can't use more than one database type in Zabbix." |
2084 |
eerror "Select exactly one database type out of these: ${dbtypes}" |
2085 |
eerror |
2086 |
die "Multiple database types selected." |
2087 |
elif [ ${dbnum} -lt 1 ]; then |
2088 |
eerror |
2089 |
eerror "Select exactly one database type out of these: ${dbtypes}" |
2090 |
eerror |
2091 |
die "No database type selected." |
2092 |
fi |
2093 |
if use oracle; then |
2094 |
if [ -z "${ORACLE_HOME}" ]; then |
2095 |
eerror |
2096 |
eerror "The environment variable ORACLE_HOME must be set" |
2097 |
eerror "and point to the correct location." |
2098 |
eerror "It looks like you don't have Oracle installed." |
2099 |
eerror |
2100 |
die "Environment variable ORACLE_HOME is not set" |
2101 |
fi |
2102 |
if has_version 'dev-db/oracle-instantclient-basic'; then |
2103 |
ewarn |
2104 |
ewarn "Please ensure you have a full install of the Oracle client." |
2105 |
ewarn "dev-db/oracle-instantclient* is NOT sufficient." |
2106 |
ewarn |
2107 |
fi |
2108 |
fi |
2109 |
fi |
2110 |
|
2111 |
if use frontend; then |
2112 |
webapp_pkg_setup |
2113 |
fi |
2114 |
|
2115 |
enewgroup zabbix |
2116 |
enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix |
2117 |
} |
2118 |
|
2119 |
pkg_postinst() { |
2120 |
if use server || use proxy ; then |
2121 |
elog |
2122 |
elog "You need to configure your database for Zabbix." |
2123 |
elog |
2124 |
elog "Have a look at /usr/share/zabbix/database for" |
2125 |
elog "database creation and upgrades." |
2126 |
elog |
2127 |
elog "For more info read the Zabbix manual at" |
2128 |
elog "http://www.zabbix.com/documentation.php" |
2129 |
elog |
2130 |
|
2131 |
zabbix_homedir=$(egethome zabbix) |
2132 |
if [ -n "${zabbix_homedir}" ] && \ |
2133 |
[ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then |
2134 |
ewarn |
2135 |
ewarn "The user 'zabbix' should have his homedir changed" |
2136 |
ewarn "to /var/lib/zabbix/home if you want to use" |
2137 |
ewarn "custom alert scripts." |
2138 |
ewarn |
2139 |
ewarn "A real homedir might be needed for configfiles" |
2140 |
ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when" |
2141 |
ewarn "using sendxmpp for Jabber alerts)." |
2142 |
ewarn |
2143 |
ewarn "To change the homedir use:" |
2144 |
ewarn " usermod -d /var/lib/zabbix/home zabbix" |
2145 |
ewarn |
2146 |
fi |
2147 |
fi |
2148 |
|
2149 |
if use server; then |
2150 |
elog |
2151 |
elog "For distributed monitoring you have to run:" |
2152 |
elog |
2153 |
elog "zabbix_server -n <nodeid>" |
2154 |
elog |
2155 |
elog "This will convert database data for use with Node ID" |
2156 |
elog "and also adds a local node." |
2157 |
elog |
2158 |
fi |
2159 |
|
2160 |
elog "--" |
2161 |
elog |
2162 |
elog "Add these lines in the /etc/services :" |
2163 |
elog |
2164 |
elog "zabbix-agent 10050/tcp Zabbix Agent" |
2165 |
elog "zabbix-agent 10050/udp Zabbix Agent" |
2166 |
elog "zabbix-trapper 10051/tcp Zabbix Trapper" |
2167 |
elog "zabbix-trapper 10051/udp Zabbix Trapper" |
2168 |
elog |
2169 |
|
2170 |
# repeat fowners/fperms functionality from src_install() |
2171 |
# here to catch wrong permissions on existing files in |
2172 |
# the live filesystem (yeah, that sucks). |
2173 |
chown -R zabbix:zabbix \ |
2174 |
"${ROOT}"/etc/zabbix \ |
2175 |
"${ROOT}"/var/lib/zabbix \ |
2176 |
"${ROOT}"/var/lib/zabbix/home \ |
2177 |
"${ROOT}"/var/lib/zabbix/scripts \ |
2178 |
"${ROOT}"/var/log/zabbix \ |
2179 |
"${ROOT}"/var/run/zabbix |
2180 |
chmod 0750 \ |
2181 |
"${ROOT}"/etc/zabbix \ |
2182 |
"${ROOT}"/var/lib/zabbix \ |
2183 |
"${ROOT}"/var/lib/zabbix/home \ |
2184 |
"${ROOT}"/var/lib/zabbix/scripts \ |
2185 |
"${ROOT}"/var/log/zabbix \ |
2186 |
"${ROOT}"/var/run/zabbix |
2187 |
|
2188 |
chmod 0640 \ |
2189 |
"${ROOT}"/etc/zabbix/zabbix_* |
2190 |
|
2191 |
if use server || use proxy ; then |
2192 |
# check for fping |
2193 |
fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null) |
2194 |
case "${fping_perms}" in |
2195 |
4[157][157][157]) |
2196 |
;; |
2197 |
*) |
2198 |
ewarn |
2199 |
ewarn "If you want to use the checks 'icmpping' and 'icmppingsec'," |
2200 |
ewarn "you have to make /usr/sbin/fping setuid root and executable" |
2201 |
ewarn "by everyone. Run the following command to fix it:" |
2202 |
ewarn |
2203 |
ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping" |
2204 |
ewarn |
2205 |
ewarn "Please be aware that this might impose a security risk," |
2206 |
ewarn "depending on the code quality of fping." |
2207 |
ewarn |
2208 |
ebeep 3 |
2209 |
epause 5 |
2210 |
;; |
2211 |
esac |
2212 |
fi |
2213 |
} |
2214 |
|
2215 |
src_configure() { |
2216 |
econf \ |
2217 |
$(use_enable server) \ |
2218 |
$(use_enable proxy) \ |
2219 |
$(use_enable agent) \ |
2220 |
$(use_enable ipv6) \ |
2221 |
$(use_with ldap) \ |
2222 |
$(use_with snmp net-snmp) \ |
2223 |
$(use_with mysql) \ |
2224 |
$(use_with postgres pgsql) \ |
2225 |
$(use_with oracle) \ |
2226 |
$(use_with sqlite3) \ |
2227 |
$(use_with jabber) \ |
2228 |
$(use_with curl libcurl) \ |
2229 |
$(use_with openipmi openipmi) \ |
2230 |
$(use_with ssh ssh2) \ |
2231 |
|| die "econf failed" |
2232 |
} |
2233 |
|
2234 |
src_install() { |
2235 |
dodir \ |
2236 |
/etc/zabbix \ |
2237 |
/var/lib/zabbix \ |
2238 |
/var/lib/zabbix/home \ |
2239 |
/var/lib/zabbix/scripts \ |
2240 |
/var/log/zabbix \ |
2241 |
/var/run/zabbix |
2242 |
|
2243 |
keepdir \ |
2244 |
/etc/zabbix \ |
2245 |
/var/lib/zabbix \ |
2246 |
/var/lib/zabbix/home \ |
2247 |
/var/lib/zabbix/scripts \ |
2248 |
/var/log/zabbix \ |
2249 |
/var/run/zabbix |
2250 |
|
2251 |
if use server; then |
2252 |
insinto /etc/zabbix |
2253 |
doins \ |
2254 |
"${FILESDIR}/1.6.6"/zabbix_server.conf \ |
2255 |
"${FILESDIR}/1.6.6"/zabbix_trapper.conf |
2256 |
doinitd \ |
2257 |
"${FILESDIR}/1.6.6"/init.d/zabbix-server |
2258 |
dosbin \ |
2259 |
src/zabbix_server/zabbix_server |
2260 |
dodir \ |
2261 |
/usr/share/zabbix/database |
2262 |
insinto /usr/share/zabbix/database |
2263 |
doins -r \ |
2264 |
upgrades \ |
2265 |
create |
2266 |
fowners zabbix:zabbix \ |
2267 |
/etc/zabbix/zabbix_server.conf \ |
2268 |
/etc/zabbix/zabbix_trapper.conf |
2269 |
fperms 0640 \ |
2270 |
/etc/zabbix/zabbix_server.conf \ |
2271 |
/etc/zabbix/zabbix_trapper.conf |
2272 |
fi |
2273 |
|
2274 |
if use proxy; then |
2275 |
doinitd \ |
2276 |
"${FILESDIR}/1.6.6"/init.d/zabbix-proxy |
2277 |
dosbin \ |
2278 |
src/zabbix_proxy/zabbix_proxy |
2279 |
insinto /etc/zabbix |
2280 |
doins \ |
2281 |
"${FILESDIR}/1.6.6"/zabbix_proxy.conf |
2282 |
dodir \ |
2283 |
/usr/share/zabbix/database |
2284 |
insinto /usr/share/zabbix/database |
2285 |
doins -r \ |
2286 |
upgrades \ |
2287 |
create |
2288 |
fi |
2289 |
|
2290 |
if use agent; then |
2291 |
insinto /etc/zabbix |
2292 |
doins \ |
2293 |
"${FILESDIR}/1.6.6"/zabbix_agent.conf \ |
2294 |
"${FILESDIR}/1.6.6"/zabbix_agentd.conf |
2295 |
doinitd \ |
2296 |
"${FILESDIR}/1.6.6"/init.d/zabbix-agentd |
2297 |
dosbin \ |
2298 |
src/zabbix_agent/zabbix_agent \ |
2299 |
src/zabbix_agent/zabbix_agentd |
2300 |
dobin \ |
2301 |
src/zabbix_sender/zabbix_sender \ |
2302 |
src/zabbix_get/zabbix_get |
2303 |
fowners zabbix:zabbix \ |
2304 |
/etc/zabbix/zabbix_agent.conf \ |
2305 |
/etc/zabbix/zabbix_agentd.conf |
2306 |
fperms 0640 \ |
2307 |
/etc/zabbix/zabbix_agent.conf \ |
2308 |
/etc/zabbix/zabbix_agentd.conf |
2309 |
fi |
2310 |
|
2311 |
fowners zabbix:zabbix \ |
2312 |
/etc/zabbix \ |
2313 |
/var/lib/zabbix \ |
2314 |
/var/lib/zabbix/home \ |
2315 |
/var/lib/zabbix/scripts \ |
2316 |
/var/log/zabbix \ |
2317 |
/var/run/zabbix |
2318 |
fperms 0750 \ |
2319 |
/etc/zabbix \ |
2320 |
/var/lib/zabbix \ |
2321 |
/var/lib/zabbix/home \ |
2322 |
/var/lib/zabbix/scripts \ |
2323 |
/var/log/zabbix \ |
2324 |
/var/run/zabbix |
2325 |
|
2326 |
dodoc README INSTALL NEWS ChangeLog |
2327 |
|
2328 |
if use frontend; then |
2329 |
webapp_src_preinst |
2330 |
cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}" |
2331 |
webapp_postinst_txt en "${FILESDIR}/"1.6.6/postinstall-en.txt |
2332 |
webapp_configfile \ |
2333 |
"${MY_HTDOCSDIR}"/include/db.inc.php \ |
2334 |
"${MY_HTDOCSDIR}"/include/config.inc.php |
2335 |
webapp_src_install |
2336 |
fi |
2337 |
} |
2338 |
|
2339 |
|
2340 |
|
2341 |
1.1 net-analyzer/zabbix/zabbix-1.8.7-r3.ebuild |
2342 |
|
2343 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/zabbix-1.8.7-r3.ebuild?rev=1.1&view=markup |
2344 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/zabbix-1.8.7-r3.ebuild?rev=1.1&content-type=text/plain |
2345 |
|
2346 |
Index: zabbix-1.8.7-r3.ebuild |
2347 |
=================================================================== |
2348 |
# Copyright 1999-2011 Gentoo Foundation |
2349 |
# Distributed under the terms of the GNU General Public License v2 |
2350 |
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/zabbix-1.8.7-r3.ebuild,v 1.1 2011/12/31 20:47:13 idl0r Exp $ |
2351 |
|
2352 |
EAPI="2" |
2353 |
|
2354 |
# needed to make webapp-config dep optional |
2355 |
WEBAPP_OPTIONAL="yes" |
2356 |
inherit eutils flag-o-matic webapp depend.php autotools |
2357 |
|
2358 |
DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers." |
2359 |
HOMEPAGE="http://www.zabbix.com/" |
2360 |
SRC_URI="http://prdownloads.sourceforge.net/zabbix/${P}.tar.gz" |
2361 |
LICENSE="GPL-2" |
2362 |
SLOT="0" |
2363 |
WEBAPP_MANUAL_SLOT="yes" |
2364 |
KEYWORDS="amd64 x86" |
2365 |
IUSE="agent curl frontend ipv6 jabber ldap mysql openipmi oracle postgres proxy server -ssh snmp +sqlite3" |
2366 |
|
2367 |
COMMON_DEPEND="snmp? ( net-analyzer/net-snmp ) |
2368 |
ldap? ( |
2369 |
net-nds/openldap |
2370 |
=dev-libs/cyrus-sasl-2* |
2371 |
net-libs/gnutls |
2372 |
) |
2373 |
mysql? ( virtual/mysql ) |
2374 |
sqlite3? ( =dev-db/sqlite-3* ) |
2375 |
postgres? ( dev-db/postgresql-base ) |
2376 |
oracle? ( dev-db/oracle-instantclient-basic ) |
2377 |
jabber? ( dev-libs/iksemel ) |
2378 |
curl? ( net-misc/curl ) |
2379 |
openipmi? ( sys-libs/openipmi ) |
2380 |
ssh? ( net-libs/libssh2 )" |
2381 |
|
2382 |
RDEPEND="${COMMON_DEPEND} |
2383 |
proxy? ( net-analyzer/fping ) |
2384 |
server? ( net-analyzer/fping |
2385 |
app-admin/webapp-config ) |
2386 |
frontend? ( dev-lang/php[bcmath,ctype,sockets,gd,truetype,xml,session] |
2387 |
media-libs/gd[png] |
2388 |
app-admin/webapp-config )" |
2389 |
DEPEND="${COMMON_DEPEND} |
2390 |
dev-util/pkgconfig" |
2391 |
|
2392 |
use frontend && need_php_httpd |
2393 |
|
2394 |
src_prepare() { |
2395 |
epatch "${FILESDIR}/${PN}-1.8.3-as-needed.patch" |
2396 |
eautoreconf |
2397 |
} |
2398 |
|
2399 |
pkg_setup() { |
2400 |
if use server || use proxy ; then |
2401 |
local dbnum dbtypes="mysql oracle postgres sqlite3" dbtype |
2402 |
declare -i dbnum=0 |
2403 |
for dbtype in ${dbtypes}; do |
2404 |
use ${dbtype} && let dbnum++ |
2405 |
done |
2406 |
if [ ${dbnum} -gt 1 ]; then |
2407 |
eerror |
2408 |
eerror "You can't use more than one database type in Zabbix." |
2409 |
eerror "Select exactly one database type out of these: ${dbtypes}" |
2410 |
eerror |
2411 |
die "Multiple database types selected." |
2412 |
elif [ ${dbnum} -lt 1 ]; then |
2413 |
eerror |
2414 |
eerror "Select exactly one database type out of these: ${dbtypes}" |
2415 |
eerror |
2416 |
die "No database type selected." |
2417 |
fi |
2418 |
if use oracle; then |
2419 |
if [ -z "${ORACLE_HOME}" ]; then |
2420 |
eerror |
2421 |
eerror "The environment variable ORACLE_HOME must be set" |
2422 |
eerror "and point to the correct location." |
2423 |
eerror "It looks like you don't have Oracle installed." |
2424 |
eerror |
2425 |
die "Environment variable ORACLE_HOME is not set" |
2426 |
fi |
2427 |
if has_version 'dev-db/oracle-instantclient-basic'; then |
2428 |
ewarn |
2429 |
ewarn "Please ensure you have a full install of the Oracle client." |
2430 |
ewarn "dev-db/oracle-instantclient* is NOT sufficient." |
2431 |
ewarn |
2432 |
fi |
2433 |
fi |
2434 |
fi |
2435 |
|
2436 |
if use frontend; then |
2437 |
webapp_pkg_setup |
2438 |
fi |
2439 |
|
2440 |
enewgroup zabbix |
2441 |
enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix |
2442 |
} |
2443 |
|
2444 |
pkg_postinst() { |
2445 |
if use server || use proxy ; then |
2446 |
elog |
2447 |
elog "You need to configure your database for Zabbix." |
2448 |
elog |
2449 |
elog "Have a look at /usr/share/zabbix/database for" |
2450 |
elog "database creation and upgrades." |
2451 |
elog |
2452 |
elog "For more info read the Zabbix manual at" |
2453 |
elog "http://www.zabbix.com/documentation.php" |
2454 |
elog |
2455 |
|
2456 |
zabbix_homedir=$(egethome zabbix) |
2457 |
if [ -n "${zabbix_homedir}" ] && \ |
2458 |
[ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then |
2459 |
ewarn |
2460 |
ewarn "The user 'zabbix' should have his homedir changed" |
2461 |
ewarn "to /var/lib/zabbix/home if you want to use" |
2462 |
ewarn "custom alert scripts." |
2463 |
ewarn |
2464 |
ewarn "A real homedir might be needed for configfiles" |
2465 |
ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when" |
2466 |
ewarn "using sendxmpp for Jabber alerts)." |
2467 |
ewarn |
2468 |
ewarn "To change the homedir use:" |
2469 |
ewarn " usermod -d /var/lib/zabbix/home zabbix" |
2470 |
ewarn |
2471 |
fi |
2472 |
fi |
2473 |
|
2474 |
if use server; then |
2475 |
elog |
2476 |
elog "For distributed monitoring you have to run:" |
2477 |
elog |
2478 |
elog "zabbix_server -n <nodeid>" |
2479 |
elog |
2480 |
elog "This will convert database data for use with Node ID" |
2481 |
elog "and also adds a local node." |
2482 |
elog |
2483 |
fi |
2484 |
|
2485 |
elog "--" |
2486 |
elog |
2487 |
elog "Add these lines in the /etc/services :" |
2488 |
elog |
2489 |
elog "zabbix-agent 10050/tcp Zabbix Agent" |
2490 |
elog "zabbix-agent 10050/udp Zabbix Agent" |
2491 |
elog "zabbix-trapper 10051/tcp Zabbix Trapper" |
2492 |
elog "zabbix-trapper 10051/udp Zabbix Trapper" |
2493 |
elog |
2494 |
|
2495 |
# repeat fowners/fperms functionality from src_install() |
2496 |
# here to catch wrong permissions on existing files in |
2497 |
# the live filesystem (yeah, that sucks). |
2498 |
chown -R zabbix:zabbix \ |
2499 |
"${ROOT}"/etc/zabbix \ |
2500 |
"${ROOT}"/var/lib/zabbix \ |
2501 |
"${ROOT}"/var/lib/zabbix/home \ |
2502 |
"${ROOT}"/var/lib/zabbix/scripts \ |
2503 |
"${ROOT}"/var/log/zabbix \ |
2504 |
"${ROOT}"/var/run/zabbix |
2505 |
chmod 0750 \ |
2506 |
"${ROOT}"/etc/zabbix \ |
2507 |
"${ROOT}"/var/lib/zabbix \ |
2508 |
"${ROOT}"/var/lib/zabbix/home \ |
2509 |
"${ROOT}"/var/lib/zabbix/scripts \ |
2510 |
"${ROOT}"/var/log/zabbix \ |
2511 |
"${ROOT}"/var/run/zabbix |
2512 |
|
2513 |
chmod 0640 \ |
2514 |
"${ROOT}"/etc/zabbix/zabbix_* |
2515 |
|
2516 |
if use server || use proxy ; then |
2517 |
# check for fping |
2518 |
fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null) |
2519 |
case "${fping_perms}" in |
2520 |
4[157][157][157]) |
2521 |
;; |
2522 |
*) |
2523 |
ewarn |
2524 |
ewarn "If you want to use the checks 'icmpping' and 'icmppingsec'," |
2525 |
ewarn "you have to make /usr/sbin/fping setuid root and executable" |
2526 |
ewarn "by everyone. Run the following command to fix it:" |
2527 |
ewarn |
2528 |
ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping" |
2529 |
ewarn |
2530 |
ewarn "Please be aware that this might impose a security risk," |
2531 |
ewarn "depending on the code quality of fping." |
2532 |
ewarn |
2533 |
ebeep 3 |
2534 |
epause 5 |
2535 |
;; |
2536 |
esac |
2537 |
fi |
2538 |
} |
2539 |
|
2540 |
src_configure() { |
2541 |
econf \ |
2542 |
$(use_enable server) \ |
2543 |
$(use_enable proxy) \ |
2544 |
$(use_enable agent) \ |
2545 |
$(use_enable ipv6) \ |
2546 |
$(use_with ldap) \ |
2547 |
$(use_with snmp net-snmp) \ |
2548 |
$(use_with mysql) \ |
2549 |
$(use_with postgres pgsql) \ |
2550 |
$(use_with oracle) \ |
2551 |
$(use_with sqlite3) \ |
2552 |
$(use_with jabber) \ |
2553 |
$(use_with curl libcurl) \ |
2554 |
$(use_with openipmi openipmi) \ |
2555 |
$(use_with ssh ssh2) \ |
2556 |
|| die "econf failed" |
2557 |
} |
2558 |
|
2559 |
src_install() { |
2560 |
dodir \ |
2561 |
/etc/zabbix \ |
2562 |
/var/lib/zabbix \ |
2563 |
/var/lib/zabbix/home \ |
2564 |
/var/lib/zabbix/scripts \ |
2565 |
/var/log/zabbix \ |
2566 |
/var/run/zabbix |
2567 |
|
2568 |
keepdir \ |
2569 |
/etc/zabbix \ |
2570 |
/var/lib/zabbix \ |
2571 |
/var/lib/zabbix/home \ |
2572 |
/var/lib/zabbix/scripts \ |
2573 |
/var/log/zabbix \ |
2574 |
/var/run/zabbix |
2575 |
|
2576 |
if use server; then |
2577 |
insinto /etc/zabbix |
|