Gentoo Archives: gentoo-commits

From: Patrick Lauer <patrick@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/zabbix/
Date: Fri, 28 Jul 2017 10:00:53
Message-Id: 1501235945.8586766a58e34a0aef92a261d85bfb52ea94b1eb.patrick@gentoo
1 commit: 8586766a58e34a0aef92a261d85bfb52ea94b1eb
2 Author: Patrick Lauer <patrick <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jul 28 09:58:34 2017 +0000
4 Commit: Patrick Lauer <patrick <AT> gentoo <DOT> org>
5 CommitDate: Fri Jul 28 09:59:05 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8586766a
7
8 net-analyzer/zabbix: Bump
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.3
11
12 net-analyzer/zabbix/Manifest | 3 +
13 net-analyzer/zabbix/metadata.xml | 2 +-
14 net-analyzer/zabbix/zabbix-2.2.19.ebuild | 341 +++++++++++++++++++++++++++++++
15 net-analyzer/zabbix/zabbix-3.0.10.ebuild | 331 ++++++++++++++++++++++++++++++
16 net-analyzer/zabbix/zabbix-3.2.7.ebuild | 328 +++++++++++++++++++++++++++++
17 5 files changed, 1004 insertions(+), 1 deletion(-)
18
19 diff --git a/net-analyzer/zabbix/Manifest b/net-analyzer/zabbix/Manifest
20 index 99b9de8af37..42bfcf22ad2 100644
21 --- a/net-analyzer/zabbix/Manifest
22 +++ b/net-analyzer/zabbix/Manifest
23 @@ -1,6 +1,8 @@
24 DIST zabbix-2.2.16.tar.gz 15498413 SHA256 3cfcd8c7c11a2e18298e93f33701210b963a7c0e61d8c14fccfd9a8beef08041 SHA512 5d92c17e86608359fff220416d5eed2d4ac10edfe56f4162f4b7660c472cf6f609ba01034d76e5b7164c22d55a1fc5be753f5d0e0ce7ac71d00a6f68dca14afd WHIRLPOOL 2b219d17624ef40a8844193a3d836326160249549775db31c7c68597d17d9fa3d71ddbc9aa30e73c2255606957d0d2f5f562fbf2b0c0654d794c8e61e96e7ead
25 DIST zabbix-2.2.17.tar.gz 15494053 SHA256 cf42c5db31c27466a9ec33b6bf22289bbc43ee4e5711e6d323d71644b743e535 SHA512 1abd60d05443cdb7b7ecdeca4d0b97414b249fe8be8c3ceaca137722af93e77101151bde59faaac4a3b61b8256bab68b0d1416192d8f72480703575794068a1f WHIRLPOOL 0ab0df7723ac6403fb26d53369fbc1d207b08343bd24f27832b2a2c7a1f043e6fe95ae99d79210f5baa5e5bd9ed9dd89acb74ce66114dfe4702d7913a26a4bb9
26 DIST zabbix-2.2.18.tar.gz 15495920 SHA256 b87e7dadec65d04711fcd66dba398b213452453c5f0c3fc5490d1ab68a41abde SHA512 3e24827b2739aefa12e3d189b856d836b85a1fa45928343c08620ce1ef16c664a8ad806d051f5cffed10837a326245dd5617034f83cdd00432b81eb05be40491 WHIRLPOOL 7936219b6ea6b0db4251db494731b0cbd40a5b774467314a6011434b2c11111e21998217efb3a6925a7d4067da6fc04a4aea9d271f0568101f1ebe660244e378
27 +DIST zabbix-2.2.19.tar.gz 15497840 SHA256 311d70a1d0868eeda752b3e9555afbbdf3f37b380e79b0b0ee138e4be488873c SHA512 f9a35093cd63fe433ae67a01d526e65387455cc0c82b33d4015ad428991289f711857e089c169fc46fad51697e3a07a2b310026789099e6f42fa88f2f573c560 WHIRLPOOL b8ed5c92b88c3799cdd37b1e878b5db82e9147e9b603b99655cb4820a38caaeb6280733b3c4c5af57957e2dbf050f31cccad1c494cc4f46c7fcd95f5b1652d50
28 +DIST zabbix-3.0.10.tar.gz 15573988 SHA256 49ab7a69352fc07c88e08f10e20ef714adde6d08e44df8af81edb82e26c7c772 SHA512 cb5602a6fdb78f4f5e3b6b0193e707497e8c04a7558da8345e2e9130f3058be670a48d501b36bca87d10a1964188ae81eb6cd83a573499086ce1f2152dfa9936 WHIRLPOOL d8da9e2eeaf1a7ded198f25198742a53b97762000b2f84add25fcbc05ff2c5be48193072338e6131e0d905d8429d581802125806512d7705e5f1aa50211fb385
29 DIST zabbix-3.0.6.tar.gz 15513412 SHA256 4fe972b061cae8cc91bf2870f2caabc967096f31def5a3f53e8789154b05a97b SHA512 ccffc58f3555bea62011bad272e8a3085d1723d8cb200e00a3e657696104c3fd055b8b963a26d9c726ef45a5381c7f9625498e99b756a3dd97b147d8b7884d1f WHIRLPOOL 137eb724b5205e5d38d00f96c62da5f96ef91c57b01280489bafb67c54d10e7c40304b4674fcefedda9381dfe6d2721b81dbcda1822f56f6d538e067c2588fea
30 DIST zabbix-3.0.8.tar.gz 15514547 SHA256 1df3e106427ed21547b8119049a161092f597d04507f9eb535951a9ee887a476 SHA512 9f5fec7f3888f34ad9659a5d34d5fc089efc86a5fcf78f8cabf6704fbf95fd52a8caaab6f4291cb76d15cc2d69c986c95346fbe4fdfdc407c5506f3b8946aa1a WHIRLPOOL 83a391ee2d60e974fa4e569050b62af69df192d24ad8dd151d39b668a170980f4dc448e3564a823662aecf5a2f03adca9e32c37b4949c95cab71425e786ab0bb
31 DIST zabbix-3.0.9.tar.gz 15516440 SHA256 4445f26c025009681c29c9b350aa6c4ee7b124ddcaf1609ae36c55997bcb8cf2 SHA512 f34d0fde48e64dfb6bea152ab6c63eb28be66e3647cc781d430b56b13bc91ac9f194ac80d264b2e837f8fceb929e0ebeda0221bf8363eb0a66e53461088a4ef9 WHIRLPOOL dae1417efa8df60633a950473af7cf9b533dc63abfdd95b2f2edb30fc07d074fa8ef626927e578911eead45461cdc4918f92be17c21d494d6f198519c117a74d
32 @@ -9,3 +11,4 @@ DIST zabbix-3.2.3.tar.gz 15922416 SHA256 e6dba74039d8d6efff86ec3da99909f4daeaeb6
33 DIST zabbix-3.2.4.tar.gz 15924840 SHA256 22cf19ef5a9478df2281bf518e8be38adc7dbc508bf63111e02388ca7aabeef4 SHA512 62e532bcf6a5ab82b1f943e28d46d1e64782758a405680d2c1a54e9c1092a340a50987045acbbad2b57439e3c2640d8a11fe1a29a234764859befa6a7fd779d1 WHIRLPOOL 8cac552472bb186a1e16bc809d68a7dd7a63eaec7503f204bec58cd03ce9f813247d47e95b6a17baa3765dca9a51835c2dc4d6efbc69bcf03ff64cb976ac716f
34 DIST zabbix-3.2.5.tar.gz 15931390 SHA256 2f25d4622f85f9faa9626c9d5b3dbd9bf098f494fae007fecd52c8dc5545504e SHA512 313eda7d26d4fe443440ff20f355a51ee0a14d7dbce2aef7ce21f95543588eb69f111dc4b19e17024f82e629bcb8fdf5739dace6f05517aee744f4e68518ea37 WHIRLPOOL 1bdb93ba3f82cda5389e68f8e9468836e2e111133f3ccb983095ab45b866d1cb483cf05522c8bb13524d77ae8f09f753158af73ba73f3f8b6c1b098e28c6bebe
35 DIST zabbix-3.2.6.tar.gz 16008047 SHA256 98f025b39515b196552b8a23e2fe20a8180b5e99e613ce7378725a46ed8b62d6 SHA512 48e70a7e33ec8c29967f099d27f240b2e8b02554b43a47387d02b5450367efcb0d2f1c60557194f6b1d4a9755d2c9c69a478627e57624521152b1c1ea0264844 WHIRLPOOL 19cccff8e71ea6bf18fc71ccc770ae863ef6ed63f56b068f0b8741d39fc9c0dab3f63129f74c057e5f34f64adcd584b478f5214214ff3d2deaf54e53a2b24574
36 +DIST zabbix-3.2.7.tar.gz 16016367 SHA256 3ea0c299bd69bc728177128740f0476bc1a2c1de438330df5bbd8f5fc6090712 SHA512 f60c82829c076a7f8b9d2f0c7dc91f7b65594ac4dcfaa08b19a61b730d8d21afc161636f793416613a47220535334fb675bb105738b130677c729fc0e31cd3e3 WHIRLPOOL 5956e6a5116a70f9feb00ffbb7547243f2de6a6c26188008bea31b4fb4d6fa31a099b11f9535f8409f7a66d6ab682837f27497b881b263f253192034250669fb
37
38 diff --git a/net-analyzer/zabbix/metadata.xml b/net-analyzer/zabbix/metadata.xml
39 index aec9f833cb0..0a5802a41df 100644
40 --- a/net-analyzer/zabbix/metadata.xml
41 +++ b/net-analyzer/zabbix/metadata.xml
42 @@ -14,7 +14,7 @@ ZABBIX is software for monitoring of your applications, network and servers.
43 ZABBIX supports both polling and trapping techniques to collect data from
44 monitored hosts. A flexible notification mechanism allows easy and quickly
45 configure different types of notifications for pre-defined events.
46 - </longdescription>
47 + </longdescription>
48 <use>
49 <flag name="agent">Enable zabbix agent (for to-be-monitored machines)</flag>
50 <flag name="frontend">Enable zabbix web frontend</flag>
51
52 diff --git a/net-analyzer/zabbix/zabbix-2.2.19.ebuild b/net-analyzer/zabbix/zabbix-2.2.19.ebuild
53 new file mode 100644
54 index 00000000000..6a201569afd
55 --- /dev/null
56 +++ b/net-analyzer/zabbix/zabbix-2.2.19.ebuild
57 @@ -0,0 +1,341 @@
58 +# Copyright 1999-2017 Gentoo Foundation
59 +# Distributed under the terms of the GNU General Public License v2
60 +
61 +EAPI="6"
62 +
63 +# needed to make webapp-config dep optional
64 +WEBAPP_OPTIONAL="yes"
65 +inherit flag-o-matic webapp java-pkg-opt-2 user systemd toolchain-funcs
66 +
67 +DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers"
68 +HOMEPAGE="http://www.zabbix.com/"
69 +MY_P=${P/_/}
70 +MY_PV=${PV/_/}
71 +SRC_URI="http://prdownloads.sourceforge.net/zabbix/${MY_P}.tar.gz"
72 +LICENSE="GPL-2"
73 +SLOT="0"
74 +WEBAPP_MANUAL_SLOT="yes"
75 +KEYWORDS="~amd64 ~x86"
76 +IUSE="+agent java curl frontend ipv6 xmpp ldap libxml2 mysql openipmi oracle postgres proxy server ssh snmp sqlite odbc static"
77 +REQUIRED_USE="|| ( agent frontend proxy server )
78 + proxy? ( ^^ ( mysql oracle postgres sqlite odbc ) )
79 + server? ( ^^ ( mysql oracle postgres sqlite odbc ) )
80 + static? ( !oracle !snmp )"
81 +
82 +COMMON_DEPEND="snmp? ( net-analyzer/net-snmp )
83 + ldap? (
84 + net-nds/openldap
85 + =dev-libs/cyrus-sasl-2*
86 + net-libs/gnutls
87 + )
88 + mysql? ( >=virtual/mysql-5.0.3 )
89 + sqlite? ( >=dev-db/sqlite-3.3.5 )
90 + postgres? ( dev-db/postgresql:* )
91 + oracle? ( >=dev-db/oracle-instantclient-basic-10.0.0.0 )
92 + xmpp? ( dev-libs/iksemel )
93 + libxml2? ( dev-libs/libxml2 )
94 + curl? ( net-misc/curl )
95 + openipmi? ( sys-libs/openipmi )
96 + ssh? ( net-libs/libssh2 )
97 + java? ( virtual/jdk:* )
98 + odbc? ( dev-db/unixODBC )"
99 +
100 +RDEPEND="${COMMON_DEPEND}
101 + proxy? ( net-analyzer/fping )
102 + server? ( net-analyzer/fping
103 + app-admin/webapp-config )
104 + java? (
105 + >=virtual/jre-1.4
106 + dev-java/slf4j-api
107 + )
108 + frontend? (
109 + >=dev-lang/php-5.3.0[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode]
110 + || ( dev-lang/php[apache2] dev-lang/php[cgi] dev-lang/php[fpm] )
111 + mysql? ( dev-lang/php[mysqli] )
112 + odbc? ( dev-lang/php[odbc] )
113 + oracle? ( dev-lang/php[oci8-instant-client] )
114 + postgres? ( dev-lang/php[postgres] )
115 + sqlite? ( dev-lang/php[sqlite] )
116 + media-libs/gd[png]
117 + app-admin/webapp-config )"
118 +DEPEND="${COMMON_DEPEND}
119 + static? (
120 + ldap? (
121 + net-nds/openldap[static-libs]
122 + =dev-libs/cyrus-sasl-2*[static-libs]
123 + net-libs/gnutls[static-libs]
124 + )
125 + mysql? ( >=virtual/mysql-5.0.3[static-libs] )
126 + sqlite? ( >=dev-db/sqlite-3.3.5[static-libs] )
127 + postgres? ( dev-db/postgresql:*[static-libs] )
128 + libxml2? ( dev-libs/libxml2[static-libs] )
129 + curl? ( net-misc/curl[static-libs] )
130 + ssh? ( net-libs/libssh2[static-libs] )
131 + odbc? ( dev-db/unixODBC[static-libs] )
132 + )
133 + virtual/pkgconfig"
134 +
135 +S=${WORKDIR}/${MY_P}
136 +
137 +ZABBIXJAVA_BASE="opt/zabbix_java"
138 +
139 +pkg_setup() {
140 + if use oracle; then
141 + if [ -z "${ORACLE_HOME}" ]; then
142 + eerror
143 + eerror "The environment variable ORACLE_HOME must be set"
144 + eerror "and point to the correct location."
145 + eerror "It looks like you don't have Oracle installed."
146 + eerror
147 + die "Environment variable ORACLE_HOME is not set"
148 + fi
149 + if has_version 'dev-db/oracle-instantclient-basic'; then
150 + ewarn
151 + ewarn "Please ensure you have a full install of the Oracle client."
152 + ewarn "dev-db/oracle-instantclient* is NOT sufficient."
153 + ewarn
154 + fi
155 + fi
156 +
157 + if use frontend; then
158 + webapp_pkg_setup
159 + fi
160 +
161 + enewgroup zabbix
162 + enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix
163 +}
164 +
165 +java_prepare() {
166 + cd "${S}/src/zabbix_java/lib"
167 + rm -v *.jar || die
168 +
169 + java-pkg_jar-from slf4j-api
170 +}
171 +
172 +src_prepare() {
173 + default
174 +}
175 +
176 +src_configure() {
177 + econf \
178 + $(use_enable server) \
179 + $(use_enable proxy) \
180 + $(use_enable agent) \
181 + $(use_enable ipv6) \
182 + $(use_enable static) \
183 + $(use_enable java) \
184 + $(use_with ldap) \
185 + $(use_with snmp net-snmp) \
186 + $(use_with mysql) \
187 + $(use_with postgres postgresql) \
188 + $(use_with oracle) \
189 + $(use_with sqlite sqlite3) \
190 + $(use_with xmpp jabber) \
191 + $(use_with curl libcurl) \
192 + $(use_with openipmi openipmi) \
193 + $(use_with ssh ssh2) \
194 + $(use_with libxml2) \
195 + $(use_with odbc unixodbc) \
196 + || die "econf failed"
197 +}
198 +
199 +src_compile() {
200 + if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
201 + emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" || die "emake failed"
202 + fi
203 +}
204 +
205 +src_install() {
206 + dodir \
207 + /etc/zabbix \
208 + /var/lib/zabbix \
209 + /var/lib/zabbix/home \
210 + /var/lib/zabbix/scripts \
211 + /var/lib/zabbix/alertscripts \
212 + /var/lib/zabbix/externalscripts \
213 + /var/log/zabbix
214 +
215 + keepdir \
216 + /etc/zabbix \
217 + /var/lib/zabbix \
218 + /var/lib/zabbix/home \
219 + /var/lib/zabbix/scripts \
220 + /var/lib/zabbix/alertscripts \
221 + /var/lib/zabbix/externalscripts \
222 + /var/log/zabbix
223 +
224 + if use server; then
225 + insinto /etc/zabbix
226 + doins "${FILESDIR}/2.2"/zabbix_server.conf
227 + doinitd "${FILESDIR}/2.2"/init.d/zabbix-server
228 + dosbin src/zabbix_server/zabbix_server
229 + fowners zabbix:zabbix /etc/zabbix/zabbix_server.conf
230 + fperms 0640 /etc/zabbix/zabbix_server.conf
231 + dodir /usr/share/zabbix
232 + /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
233 + systemd_dounit "${FILESDIR}/zabbix-server.service"
234 + systemd_newtmpfilesd "${FILESDIR}/zabbix-server.tmpfiles" zabbix-server.conf
235 + fi
236 +
237 + if use proxy; then
238 + doinitd \
239 + "${FILESDIR}/2.2"/init.d/zabbix-proxy
240 + dosbin \
241 + src/zabbix_proxy/zabbix_proxy
242 + insinto /etc/zabbix
243 + doins \
244 + "${FILESDIR}/2.2"/zabbix_proxy.conf
245 + dodir /usr/share/zabbix
246 + /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
247 + systemd_dounit "${FILESDIR}/zabbix-proxy.service"
248 + systemd_newtmpfilesd "${FILESDIR}/zabbix-proxy.tmpfiles" zabbix-proxy.conf
249 + fi
250 +
251 + if use agent; then
252 + insinto /etc/zabbix
253 + doins \
254 + "${FILESDIR}/2.2"/zabbix_agent.conf \
255 + "${FILESDIR}/2.2"/zabbix_agentd.conf
256 + doinitd "${FILESDIR}/2.2"/init.d/zabbix-agentd
257 + dosbin \
258 + src/zabbix_agent/zabbix_agent \
259 + src/zabbix_agent/zabbix_agentd
260 + dobin \
261 + src/zabbix_sender/zabbix_sender \
262 + src/zabbix_get/zabbix_get
263 + fowners zabbix:zabbix \
264 + /etc/zabbix/zabbix_agent.conf \
265 + /etc/zabbix/zabbix_agentd.conf
266 + fperms 0640 \
267 + /etc/zabbix/zabbix_agent.conf \
268 + /etc/zabbix/zabbix_agentd.conf
269 + systemd_dounit "${FILESDIR}/zabbix-agentd.service"
270 + systemd_newtmpfilesd "${FILESDIR}/zabbix-agentd.tmpfiles" zabbix-agentd.conf
271 + fi
272 +
273 + fowners zabbix:zabbix \
274 + /etc/zabbix \
275 + /var/lib/zabbix \
276 + /var/lib/zabbix/home \
277 + /var/lib/zabbix/scripts \
278 + /var/lib/zabbix/alertscripts \
279 + /var/lib/zabbix/externalscripts \
280 + /var/log/zabbix
281 + fperms 0750 \
282 + /etc/zabbix \
283 + /var/lib/zabbix \
284 + /var/lib/zabbix/home \
285 + /var/lib/zabbix/scripts \
286 + /var/lib/zabbix/alertscripts \
287 + /var/lib/zabbix/externalscripts \
288 + /var/log/zabbix
289 +
290 + dodoc README INSTALL NEWS ChangeLog \
291 + conf/zabbix_agent.conf \
292 + conf/zabbix_agentd.conf \
293 + conf/zabbix_proxy.conf \
294 + conf/zabbix_agentd/userparameter_examples.conf \
295 + conf/zabbix_agentd/userparameter_mysql.conf \
296 + conf/zabbix_server.conf
297 +
298 + if use frontend; then
299 + webapp_src_preinst
300 + cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}"
301 + webapp_configfile \
302 + "${MY_HTDOCSDIR}"/include/db.inc.php \
303 + "${MY_HTDOCSDIR}"/include/config.inc.php
304 + webapp_src_install
305 + fi
306 +
307 + if use java; then
308 + dodir \
309 + /${ZABBIXJAVA_BASE} \
310 + /${ZABBIXJAVA_BASE}/bin \
311 + /${ZABBIXJAVA_BASE}/lib
312 + keepdir /${ZABBIXJAVA_BASE}
313 + exeinto /${ZABBIXJAVA_BASE}/bin
314 + doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar
315 + exeinto /${ZABBIXJAVA_BASE}/lib
316 + doexe \
317 + src/zabbix_java/lib/logback-classic-0.9.27.jar \
318 + src/zabbix_java/lib/logback-console.xml \
319 + src/zabbix_java/lib/logback-core-0.9.27.jar \
320 + src/zabbix_java/lib/logback.xml \
321 + src/zabbix_java/lib/android-json-4.3_r3.1.jar \
322 + src/zabbix_java/lib/slf4j-api-1.6.1.jar
323 + exeinto /${ZABBIXJAVA_BASE}/
324 + doexe \
325 + src/zabbix_java/settings.sh \
326 + src/zabbix_java/startup.sh \
327 + src/zabbix_java/shutdown.sh
328 + fowners -R zabbix:zabbix /${ZABBIXJAVA_BASE}
329 + fi
330 +}
331 +
332 +pkg_postinst() {
333 + if use server || use proxy ; then
334 + elog
335 + elog "You may need to configure your database for Zabbix,"
336 + elog "if you have not already done so. "
337 + elog
338 +
339 + zabbix_homedir=$(egethome zabbix)
340 + if [ -n "${zabbix_homedir}" ] && \
341 + [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then
342 + ewarn
343 + ewarn "The user 'zabbix' should have his homedir changed"
344 + ewarn "to /var/lib/zabbix/home if you want to use"
345 + ewarn "custom alert scripts."
346 + ewarn
347 + ewarn "A real homedir might be needed for configfiles"
348 + ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when"
349 + ewarn "using sendxmpp for Jabber alerts)."
350 + ewarn
351 + ewarn "To change the homedir use:"
352 + ewarn " usermod -d /var/lib/zabbix/home zabbix"
353 + ewarn
354 + fi
355 + fi
356 +
357 + if use server; then
358 + elog
359 + elog "For distributed monitoring you have to run:"
360 + elog
361 + elog "zabbix_server -n <nodeid>"
362 + elog
363 + elog "This will convert database data for use with Node ID"
364 + elog "and also adds a local node."
365 + elog
366 + fi
367 +
368 + elog "--"
369 + elog
370 + elog "You may need to add these lines to /etc/services:"
371 + elog
372 + elog "zabbix-agent 10050/tcp Zabbix Agent"
373 + elog "zabbix-agent 10050/udp Zabbix Agent"
374 + elog "zabbix-trapper 10051/tcp Zabbix Trapper"
375 + elog "zabbix-trapper 10051/udp Zabbix Trapper"
376 + elog
377 +
378 + if use server || use proxy ; then
379 + # check for fping
380 + fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null)
381 + case "${fping_perms}" in
382 + 4[157][157][157])
383 + ;;
384 + *)
385 + ewarn
386 + ewarn "If you want to use the checks 'icmpping' and 'icmppingsec',"
387 + ewarn "you have to make /usr/sbin/fping setuid root and executable"
388 + ewarn "by everyone. Run the following command to fix it:"
389 + ewarn
390 + ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping"
391 + ewarn
392 + ewarn "Please be aware that this might impose a security risk,"
393 + ewarn "depending on the code quality of fping."
394 + ewarn
395 + ;;
396 + esac
397 + fi
398 +}
399
400 diff --git a/net-analyzer/zabbix/zabbix-3.0.10.ebuild b/net-analyzer/zabbix/zabbix-3.0.10.ebuild
401 new file mode 100644
402 index 00000000000..13448bdf670
403 --- /dev/null
404 +++ b/net-analyzer/zabbix/zabbix-3.0.10.ebuild
405 @@ -0,0 +1,331 @@
406 +# Copyright 1999-2017 Gentoo Foundation
407 +# Distributed under the terms of the GNU General Public License v2
408 +
409 +EAPI="6"
410 +
411 +# needed to make webapp-config dep optional
412 +WEBAPP_OPTIONAL="yes"
413 +inherit flag-o-matic webapp java-pkg-opt-2 user systemd toolchain-funcs
414 +
415 +DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers"
416 +HOMEPAGE="http://www.zabbix.com/"
417 +MY_P=${P/_/}
418 +MY_PV=${PV/_/}
419 +SRC_URI="http://prdownloads.sourceforge.net/zabbix/${MY_P}.tar.gz"
420 +LICENSE="GPL-2"
421 +SLOT="0"
422 +WEBAPP_MANUAL_SLOT="yes"
423 +KEYWORDS="~amd64 ~x86"
424 +IUSE="+agent java curl frontend ipv6 xmpp ldap libxml2 mysql openipmi oracle postgres proxy server ssh ssl snmp sqlite odbc static"
425 +REQUIRED_USE="|| ( agent frontend proxy server )
426 + proxy? ( ^^ ( mysql oracle postgres sqlite odbc ) )
427 + server? ( ^^ ( mysql oracle postgres sqlite odbc ) )
428 + static? ( !oracle !snmp )"
429 +
430 +COMMON_DEPEND="snmp? ( net-analyzer/net-snmp )
431 + ldap? (
432 + net-nds/openldap
433 + =dev-libs/cyrus-sasl-2*
434 + net-libs/gnutls
435 + )
436 + mysql? ( >=virtual/mysql-5.0.3 )
437 + sqlite? ( >=dev-db/sqlite-3.3.5 )
438 + postgres? ( dev-db/postgresql:* )
439 + oracle? ( >=dev-db/oracle-instantclient-basic-10.0.0.0 )
440 + xmpp? ( dev-libs/iksemel )
441 + libxml2? ( dev-libs/libxml2 )
442 + curl? ( net-misc/curl )
443 + openipmi? ( sys-libs/openipmi )
444 + ssh? ( net-libs/libssh2 )
445 + java? ( virtual/jdk:* )
446 + odbc? ( dev-db/unixODBC )
447 + ssl? ( dev-libs/openssl:=[-bindist] )"
448 +
449 +RDEPEND="${COMMON_DEPEND}
450 + proxy? ( net-analyzer/fping )
451 + server? ( net-analyzer/fping
452 + app-admin/webapp-config )
453 + java? (
454 + >=virtual/jre-1.4
455 + dev-java/slf4j-api
456 + )
457 + frontend? (
458 + >=dev-lang/php-5.3.0[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode]
459 + || ( dev-lang/php[apache2] dev-lang/php[cgi] dev-lang/php[fpm] )
460 + mysql? ( dev-lang/php[mysqli] )
461 + odbc? ( dev-lang/php[odbc] )
462 + oracle? ( dev-lang/php[oci8-instant-client] )
463 + postgres? ( dev-lang/php[postgres] )
464 + sqlite? ( dev-lang/php[sqlite] )
465 + media-libs/gd[png]
466 + app-admin/webapp-config )"
467 +DEPEND="${COMMON_DEPEND}
468 + static? (
469 + ldap? (
470 + net-nds/openldap[static-libs]
471 + =dev-libs/cyrus-sasl-2*[static-libs]
472 + net-libs/gnutls[static-libs]
473 + )
474 + mysql? ( >=virtual/mysql-5.0.3[static-libs] )
475 + sqlite? ( >=dev-db/sqlite-3.3.5[static-libs] )
476 + postgres? ( dev-db/postgresql:*[static-libs] )
477 + libxml2? ( dev-libs/libxml2[static-libs] )
478 + curl? ( net-misc/curl[static-libs] )
479 + ssh? ( net-libs/libssh2[static-libs] )
480 + odbc? ( dev-db/unixODBC[static-libs] )
481 + )
482 + virtual/pkgconfig"
483 +
484 +S=${WORKDIR}/${MY_P}
485 +
486 +ZABBIXJAVA_BASE="opt/zabbix_java"
487 +
488 +pkg_setup() {
489 + if use oracle; then
490 + if [ -z "${ORACLE_HOME}" ]; then
491 + eerror
492 + eerror "The environment variable ORACLE_HOME must be set"
493 + eerror "and point to the correct location."
494 + eerror "It looks like you don't have Oracle installed."
495 + eerror
496 + die "Environment variable ORACLE_HOME is not set"
497 + fi
498 + if has_version 'dev-db/oracle-instantclient-basic'; then
499 + ewarn
500 + ewarn "Please ensure you have a full install of the Oracle client."
501 + ewarn "dev-db/oracle-instantclient* is NOT sufficient."
502 + ewarn
503 + fi
504 + fi
505 +
506 + if use frontend; then
507 + webapp_pkg_setup
508 + fi
509 +
510 + enewgroup zabbix
511 + enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix
512 +}
513 +
514 +java_prepare() {
515 + cd "${S}/src/zabbix_java/lib"
516 + rm -v *.jar || die
517 +
518 + java-pkg_jar-from slf4j-api
519 +}
520 +
521 +src_prepare() {
522 + default
523 +}
524 +
525 +src_configure() {
526 + econf \
527 + $(use_enable server) \
528 + $(use_enable proxy) \
529 + $(use_enable agent) \
530 + $(use_enable ipv6) \
531 + $(use_enable static) \
532 + $(use_enable java) \
533 + $(use_with ldap) \
534 + $(use_with snmp net-snmp) \
535 + $(use_with mysql) \
536 + $(use_with postgres postgresql) \
537 + $(use_with oracle) \
538 + $(use_with sqlite sqlite3) \
539 + $(use_with xmpp jabber) \
540 + $(use_with curl libcurl) \
541 + $(use_with openipmi openipmi) \
542 + $(use_with ssh ssh2) \
543 + $(use_with libxml2) \
544 + $(use_with odbc unixodbc) \
545 + $(use_with ssl openssl) \
546 + || die "econf failed"
547 +}
548 +
549 +src_compile() {
550 + if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
551 + emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" || die "emake failed"
552 + fi
553 +}
554 +
555 +src_install() {
556 + dodir \
557 + /etc/zabbix \
558 + /var/lib/zabbix \
559 + /var/lib/zabbix/home \
560 + /var/lib/zabbix/scripts \
561 + /var/lib/zabbix/alertscripts \
562 + /var/lib/zabbix/externalscripts \
563 + /var/log/zabbix
564 +
565 + keepdir \
566 + /etc/zabbix \
567 + /var/lib/zabbix \
568 + /var/lib/zabbix/home \
569 + /var/lib/zabbix/scripts \
570 + /var/lib/zabbix/alertscripts \
571 + /var/lib/zabbix/externalscripts \
572 + /var/log/zabbix
573 +
574 + if use server; then
575 + insinto /etc/zabbix
576 + doins "${FILESDIR}/3.0"/zabbix_server.conf
577 + doinitd "${FILESDIR}/3.0"/init.d/zabbix-server
578 + dosbin src/zabbix_server/zabbix_server
579 + fowners zabbix:zabbix /etc/zabbix/zabbix_server.conf
580 + fperms 0640 /etc/zabbix/zabbix_server.conf
581 + dodir /usr/share/zabbix
582 + /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
583 + systemd_dounit "${FILESDIR}/zabbix-server.service"
584 + systemd_newtmpfilesd "${FILESDIR}/zabbix-server.tmpfiles" zabbix-server.conf
585 + fi
586 +
587 + if use proxy; then
588 + doinitd "${FILESDIR}/3.0"/init.d/zabbix-proxy
589 + dosbin src/zabbix_proxy/zabbix_proxy
590 + insinto /etc/zabbix
591 + doins "${FILESDIR}/3.0"/zabbix_proxy.conf
592 + dodir /usr/share/zabbix
593 + /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
594 + systemd_dounit "${FILESDIR}/zabbix-proxy.service"
595 + systemd_newtmpfilesd "${FILESDIR}/zabbix-proxy.tmpfiles" zabbix-proxy.conf
596 + fi
597 +
598 + if use agent; then
599 + insinto /etc/zabbix
600 + doins "${FILESDIR}/3.0"/zabbix_agentd.conf
601 + doinitd "${FILESDIR}/3.0"/init.d/zabbix-agentd
602 + dosbin src/zabbix_agent/zabbix_agentd
603 + dobin \
604 + src/zabbix_sender/zabbix_sender \
605 + src/zabbix_get/zabbix_get
606 + fowners zabbix:zabbix /etc/zabbix/zabbix_agentd.conf
607 + fperms 0640 /etc/zabbix/zabbix_agentd.conf
608 + systemd_dounit "${FILESDIR}/zabbix-agentd.service"
609 + systemd_newtmpfilesd "${FILESDIR}/zabbix-agentd.tmpfiles" zabbix-agentd.conf
610 + fi
611 +
612 + fowners zabbix:zabbix \
613 + /etc/zabbix \
614 + /var/lib/zabbix \
615 + /var/lib/zabbix/home \
616 + /var/lib/zabbix/scripts \
617 + /var/lib/zabbix/alertscripts \
618 + /var/lib/zabbix/externalscripts \
619 + /var/log/zabbix
620 + fperms 0750 \
621 + /etc/zabbix \
622 + /var/lib/zabbix \
623 + /var/lib/zabbix/home \
624 + /var/lib/zabbix/scripts \
625 + /var/lib/zabbix/alertscripts \
626 + /var/lib/zabbix/externalscripts \
627 + /var/log/zabbix
628 +
629 + dodoc README INSTALL NEWS ChangeLog \
630 + conf/zabbix_agentd.conf \
631 + conf/zabbix_proxy.conf \
632 + conf/zabbix_agentd/userparameter_examples.conf \
633 + conf/zabbix_agentd/userparameter_mysql.conf \
634 + conf/zabbix_server.conf
635 +
636 + if use frontend; then
637 + webapp_src_preinst
638 + cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}"
639 + webapp_configfile \
640 + "${MY_HTDOCSDIR}"/include/db.inc.php \
641 + "${MY_HTDOCSDIR}"/include/config.inc.php
642 + webapp_src_install
643 + fi
644 +
645 + if use java; then
646 + dodir \
647 + /${ZABBIXJAVA_BASE} \
648 + /${ZABBIXJAVA_BASE}/bin \
649 + /${ZABBIXJAVA_BASE}/lib
650 + keepdir /${ZABBIXJAVA_BASE}
651 + exeinto /${ZABBIXJAVA_BASE}/bin
652 + doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar
653 + exeinto /${ZABBIXJAVA_BASE}/lib
654 + doexe \
655 + src/zabbix_java/lib/logback-classic-0.9.27.jar \
656 + src/zabbix_java/lib/logback-console.xml \
657 + src/zabbix_java/lib/logback-core-0.9.27.jar \
658 + src/zabbix_java/lib/logback.xml \
659 + src/zabbix_java/lib/android-json-4.3_r3.1.jar \
660 + src/zabbix_java/lib/slf4j-api-1.6.1.jar
661 + exeinto /${ZABBIXJAVA_BASE}/
662 + doexe \
663 + src/zabbix_java/settings.sh \
664 + src/zabbix_java/startup.sh \
665 + src/zabbix_java/shutdown.sh
666 + fowners -R zabbix:zabbix /${ZABBIXJAVA_BASE}
667 + fi
668 +}
669 +
670 +pkg_postinst() {
671 + if use server || use proxy ; then
672 + elog
673 + elog "You may need to configure your database for Zabbix,"
674 + elog "if you have not already done so. "
675 + elog
676 +
677 + zabbix_homedir=$(egethome zabbix)
678 + if [ -n "${zabbix_homedir}" ] && \
679 + [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then
680 + ewarn
681 + ewarn "The user 'zabbix' should have his homedir changed"
682 + ewarn "to /var/lib/zabbix/home if you want to use"
683 + ewarn "custom alert scripts."
684 + ewarn
685 + ewarn "A real homedir might be needed for configfiles"
686 + ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when"
687 + ewarn "using sendxmpp for Jabber alerts)."
688 + ewarn
689 + ewarn "To change the homedir use:"
690 + ewarn " usermod -d /var/lib/zabbix/home zabbix"
691 + ewarn
692 + fi
693 + fi
694 +
695 + if use server; then
696 + elog
697 + elog "For distributed monitoring you have to run:"
698 + elog
699 + elog "zabbix_server -n <nodeid>"
700 + elog
701 + elog "This will convert database data for use with Node ID"
702 + elog "and also adds a local node."
703 + elog
704 + fi
705 +
706 + elog "--"
707 + elog
708 + elog "You may need to add these lines to /etc/services:"
709 + elog
710 + elog "zabbix-agent 10050/tcp Zabbix Agent"
711 + elog "zabbix-agent 10050/udp Zabbix Agent"
712 + elog "zabbix-trapper 10051/tcp Zabbix Trapper"
713 + elog "zabbix-trapper 10051/udp Zabbix Trapper"
714 + elog
715 +
716 + if use server || use proxy ; then
717 + # check for fping
718 + fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null)
719 + case "${fping_perms}" in
720 + 4[157][157][157])
721 + ;;
722 + *)
723 + ewarn
724 + ewarn "If you want to use the checks 'icmpping' and 'icmppingsec',"
725 + ewarn "you have to make /usr/sbin/fping setuid root and executable"
726 + ewarn "by everyone. Run the following command to fix it:"
727 + ewarn
728 + ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping"
729 + ewarn
730 + ewarn "Please be aware that this might impose a security risk,"
731 + ewarn "depending on the code quality of fping."
732 + ewarn
733 + ;;
734 + esac
735 + fi
736 +}
737
738 diff --git a/net-analyzer/zabbix/zabbix-3.2.7.ebuild b/net-analyzer/zabbix/zabbix-3.2.7.ebuild
739 new file mode 100644
740 index 00000000000..31176f59177
741 --- /dev/null
742 +++ b/net-analyzer/zabbix/zabbix-3.2.7.ebuild
743 @@ -0,0 +1,328 @@
744 +# Copyright 1999-2017 Gentoo Foundation
745 +# Distributed under the terms of the GNU General Public License v2
746 +
747 +EAPI="6"
748 +
749 +# needed to make webapp-config dep optional
750 +WEBAPP_OPTIONAL="yes"
751 +inherit flag-o-matic webapp java-pkg-opt-2 user systemd toolchain-funcs
752 +
753 +DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers"
754 +HOMEPAGE="http://www.zabbix.com/"
755 +MY_P=${P/_/}
756 +MY_PV=${PV/_/}
757 +SRC_URI="http://prdownloads.sourceforge.net/zabbix/${MY_P}.tar.gz"
758 +LICENSE="GPL-2"
759 +SLOT="0"
760 +WEBAPP_MANUAL_SLOT="yes"
761 +KEYWORDS="~amd64 ~x86"
762 +IUSE="+agent java curl frontend ipv6 xmpp ldap libxml2 mysql openipmi oracle postgres proxy server ssh ssl snmp sqlite odbc static"
763 +REQUIRED_USE="|| ( agent frontend proxy server )
764 + proxy? ( ^^ ( mysql oracle postgres sqlite odbc ) )
765 + server? ( ^^ ( mysql oracle postgres sqlite odbc ) )
766 + static? ( !oracle !snmp )"
767 +
768 +COMMON_DEPEND="snmp? ( net-analyzer/net-snmp )
769 + ldap? (
770 + net-nds/openldap
771 + =dev-libs/cyrus-sasl-2*
772 + net-libs/gnutls
773 + )
774 + mysql? ( >=virtual/mysql-5.0.3 )
775 + sqlite? ( >=dev-db/sqlite-3.3.5 )
776 + postgres? ( dev-db/postgresql:* )
777 + oracle? ( >=dev-db/oracle-instantclient-basic-10.0.0.0 )
778 + xmpp? ( dev-libs/iksemel )
779 + libxml2? ( dev-libs/libxml2 )
780 + curl? ( net-misc/curl )
781 + openipmi? ( sys-libs/openipmi )
782 + ssh? ( net-libs/libssh2 )
783 + java? ( virtual/jdk:* )
784 + odbc? ( dev-db/unixODBC )
785 + ssl? ( dev-libs/openssl:=[-bindist] )"
786 +
787 +RDEPEND="${COMMON_DEPEND}
788 + proxy? ( net-analyzer/fping[suid] )
789 + server? ( net-analyzer/fping[suid]
790 + app-admin/webapp-config )
791 + java? (
792 + >=virtual/jre-1.4
793 + dev-java/slf4j-api
794 + )
795 + frontend? (
796 + >=dev-lang/php-5.3.0[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode]
797 + || ( dev-lang/php[apache2] dev-lang/php[cgi] dev-lang/php[fpm] )
798 + mysql? ( dev-lang/php[mysqli] )
799 + odbc? ( dev-lang/php[odbc] )
800 + oracle? ( dev-lang/php[oci8-instant-client] )
801 + postgres? ( dev-lang/php[postgres] )
802 + sqlite? ( dev-lang/php[sqlite] )
803 + media-libs/gd[png]
804 + app-admin/webapp-config )"
805 +DEPEND="${COMMON_DEPEND}
806 + static? (
807 + ldap? (
808 + net-nds/openldap[static-libs]
809 + =dev-libs/cyrus-sasl-2*[static-libs]
810 + net-libs/gnutls[static-libs]
811 + )
812 + mysql? ( >=virtual/mysql-5.0.3[static-libs] )
813 + sqlite? ( >=dev-db/sqlite-3.3.5[static-libs] )
814 + postgres? ( dev-db/postgresql:*[static-libs] )
815 + libxml2? ( dev-libs/libxml2[static-libs] )
816 + curl? ( net-misc/curl[static-libs] )
817 + ssh? ( net-libs/libssh2[static-libs] )
818 + odbc? ( dev-db/unixODBC[static-libs] )
819 + )
820 + virtual/pkgconfig"
821 +
822 +S=${WORKDIR}/${MY_P}
823 +
824 +ZABBIXJAVA_BASE="opt/zabbix_java"
825 +
826 +pkg_setup() {
827 + if use oracle; then
828 + if [ -z "${ORACLE_HOME}" ]; then
829 + eerror
830 + eerror "The environment variable ORACLE_HOME must be set"
831 + eerror "and point to the correct location."
832 + eerror "It looks like you don't have Oracle installed."
833 + eerror
834 + die "Environment variable ORACLE_HOME is not set"
835 + fi
836 + if has_version 'dev-db/oracle-instantclient-basic'; then
837 + ewarn
838 + ewarn "Please ensure you have a full install of the Oracle client."
839 + ewarn "dev-db/oracle-instantclient* is NOT sufficient."
840 + ewarn
841 + fi
842 + fi
843 +
844 + if use frontend; then
845 + webapp_pkg_setup
846 + fi
847 +
848 + enewgroup zabbix
849 + enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix
850 +}
851 +
852 +java_prepare() {
853 + cd "${S}/src/zabbix_java/lib"
854 + rm -v *.jar || die
855 +
856 + java-pkg_jar-from slf4j-api
857 +}
858 +
859 +src_prepare() {
860 + default
861 +}
862 +
863 +src_configure() {
864 + econf \
865 + $(use_enable server) \
866 + $(use_enable proxy) \
867 + $(use_enable agent) \
868 + $(use_enable ipv6) \
869 + $(use_enable static) \
870 + $(use_enable java) \
871 + $(use_with ldap) \
872 + $(use_with snmp net-snmp) \
873 + $(use_with mysql) \
874 + $(use_with postgres postgresql) \
875 + $(use_with oracle) \
876 + $(use_with sqlite sqlite3) \
877 + $(use_with xmpp jabber) \
878 + $(use_with curl libcurl) \
879 + $(use_with openipmi openipmi) \
880 + $(use_with ssh ssh2) \
881 + $(use_with libxml2) \
882 + $(use_with odbc unixodbc) \
883 + $(use_with ssl openssl) \
884 + || die "econf failed"
885 +}
886 +
887 +src_compile() {
888 + if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
889 + emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" || die "emake failed"
890 + fi
891 +}
892 +
893 +src_install() {
894 + dodir \
895 + /etc/zabbix \
896 + /var/lib/zabbix \
897 + /var/lib/zabbix/home \
898 + /var/lib/zabbix/scripts \
899 + /var/lib/zabbix/alertscripts \
900 + /var/lib/zabbix/externalscripts \
901 + /var/log/zabbix
902 +
903 + keepdir \
904 + /etc/zabbix \
905 + /var/lib/zabbix \
906 + /var/lib/zabbix/home \
907 + /var/lib/zabbix/scripts \
908 + /var/lib/zabbix/alertscripts \
909 + /var/lib/zabbix/externalscripts \
910 + /var/log/zabbix
911 +
912 + if use server; then
913 + insinto /etc/zabbix
914 + doins "${FILESDIR}/3.0"/zabbix_server.conf
915 + doinitd "${FILESDIR}/3.0"/init.d/zabbix-server
916 + dosbin src/zabbix_server/zabbix_server
917 + fowners zabbix:zabbix /etc/zabbix/zabbix_server.conf
918 + fperms 0640 /etc/zabbix/zabbix_server.conf
919 + dodir /usr/share/zabbix
920 + /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
921 + systemd_dounit "${FILESDIR}/zabbix-server.service"
922 + systemd_newtmpfilesd "${FILESDIR}/zabbix-server.tmpfiles" zabbix-server.conf
923 + fi
924 +
925 + if use proxy; then
926 + doinitd "${FILESDIR}/3.0"/init.d/zabbix-proxy
927 + dosbin src/zabbix_proxy/zabbix_proxy
928 + insinto /etc/zabbix
929 + doins "${FILESDIR}/3.0"/zabbix_proxy.conf
930 + dodir /usr/share/zabbix
931 + /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
932 + systemd_dounit "${FILESDIR}/zabbix-proxy.service"
933 + systemd_newtmpfilesd "${FILESDIR}/zabbix-proxy.tmpfiles" zabbix-proxy.conf
934 + fi
935 +
936 + if use agent; then
937 + insinto /etc/zabbix
938 + doins "${FILESDIR}/3.0"/zabbix_agentd.conf
939 + doinitd "${FILESDIR}/3.0"/init.d/zabbix-agentd
940 + dosbin src/zabbix_agent/zabbix_agentd
941 + dobin \
942 + src/zabbix_sender/zabbix_sender \
943 + src/zabbix_get/zabbix_get
944 + fowners zabbix:zabbix /etc/zabbix/zabbix_agentd.conf
945 + fperms 0640 /etc/zabbix/zabbix_agentd.conf
946 + systemd_dounit "${FILESDIR}/zabbix-agentd.service"
947 + systemd_newtmpfilesd "${FILESDIR}/zabbix-agentd.tmpfiles" zabbix-agentd.conf
948 + fi
949 +
950 + fowners zabbix:zabbix \
951 + /etc/zabbix \
952 + /var/lib/zabbix \
953 + /var/lib/zabbix/home \
954 + /var/lib/zabbix/scripts \
955 + /var/lib/zabbix/alertscripts \
956 + /var/lib/zabbix/externalscripts \
957 + /var/log/zabbix
958 + fperms 0750 \
959 + /etc/zabbix \
960 + /var/lib/zabbix \
961 + /var/lib/zabbix/home \
962 + /var/lib/zabbix/scripts \
963 + /var/lib/zabbix/alertscripts \
964 + /var/lib/zabbix/externalscripts \
965 + /var/log/zabbix
966 +
967 + dodoc README INSTALL NEWS ChangeLog \
968 + conf/zabbix_agentd.conf \
969 + conf/zabbix_proxy.conf \
970 + conf/zabbix_agentd/userparameter_examples.conf \
971 + conf/zabbix_agentd/userparameter_mysql.conf \
972 + conf/zabbix_server.conf
973 +
974 + if use frontend; then
975 + webapp_src_preinst
976 + cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}"
977 + webapp_configfile \
978 + "${MY_HTDOCSDIR}"/include/db.inc.php \
979 + "${MY_HTDOCSDIR}"/include/config.inc.php
980 + webapp_src_install
981 + fi
982 +
983 + if use java; then
984 + dodir \
985 + /${ZABBIXJAVA_BASE} \
986 + /${ZABBIXJAVA_BASE}/bin \
987 + /${ZABBIXJAVA_BASE}/lib
988 + keepdir /${ZABBIXJAVA_BASE}
989 + exeinto /${ZABBIXJAVA_BASE}/bin
990 + doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar
991 + exeinto /${ZABBIXJAVA_BASE}/lib
992 + doexe \
993 + src/zabbix_java/lib/logback-classic-0.9.27.jar \
994 + src/zabbix_java/lib/logback-console.xml \
995 + src/zabbix_java/lib/logback-core-0.9.27.jar \
996 + src/zabbix_java/lib/logback.xml \
997 + src/zabbix_java/lib/android-json-4.3_r3.1.jar \
998 + src/zabbix_java/lib/slf4j-api-1.6.1.jar
999 + fowners -R zabbix:zabbix /${ZABBIXJAVA_BASE}
1000 + doinitd "${FILESDIR}"/3.0/init.d/zabbix-jmx-proxy
1001 + doconfd "${FILESDIR}"/3.0/conf.d/zabbix-jmx-proxy
1002 + fi
1003 +}
1004 +
1005 +pkg_postinst() {
1006 + if use server || use proxy ; then
1007 + elog
1008 + elog "You may need to configure your database for Zabbix,"
1009 + elog "if you have not already done so. "
1010 + elog
1011 +
1012 + zabbix_homedir=$(egethome zabbix)
1013 + if [ -n "${zabbix_homedir}" ] && \
1014 + [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then
1015 + ewarn
1016 + ewarn "The user 'zabbix' should have his homedir changed"
1017 + ewarn "to /var/lib/zabbix/home if you want to use"
1018 + ewarn "custom alert scripts."
1019 + ewarn
1020 + ewarn "A real homedir might be needed for configfiles"
1021 + ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when"
1022 + ewarn "using sendxmpp for Jabber alerts)."
1023 + ewarn
1024 + ewarn "To change the homedir use:"
1025 + ewarn " usermod -d /var/lib/zabbix/home zabbix"
1026 + ewarn
1027 + fi
1028 + fi
1029 +
1030 + if use server; then
1031 + elog
1032 + elog "For distributed monitoring you have to run:"
1033 + elog
1034 + elog "zabbix_server -n <nodeid>"
1035 + elog
1036 + elog "This will convert database data for use with Node ID"
1037 + elog "and also adds a local node."
1038 + elog
1039 + fi
1040 +
1041 + elog "--"
1042 + elog
1043 + elog "You may need to add these lines to /etc/services:"
1044 + elog
1045 + elog "zabbix-agent 10050/tcp Zabbix Agent"
1046 + elog "zabbix-agent 10050/udp Zabbix Agent"
1047 + elog "zabbix-trapper 10051/tcp Zabbix Trapper"
1048 + elog "zabbix-trapper 10051/udp Zabbix Trapper"
1049 + elog
1050 +
1051 + if use server || use proxy ; then
1052 + # check for fping
1053 + fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null)
1054 + case "${fping_perms}" in
1055 + 4[157][157][157])
1056 + ;;
1057 + *)
1058 + ewarn
1059 + ewarn "If you want to use the checks 'icmpping' and 'icmppingsec',"
1060 + ewarn "you have to make /usr/sbin/fping setuid root and executable"
1061 + ewarn "by everyone. Run the following command to fix it:"
1062 + ewarn
1063 + ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping"
1064 + ewarn
1065 + ewarn "Please be aware that this might impose a security risk,"
1066 + ewarn "depending on the code quality of fping."
1067 + ewarn
1068 + ;;
1069 + esac
1070 + fi
1071 +}