Gentoo Archives: gentoo-commits

From: "Miroslav Šulc" <fordfrog@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/zabbix/
Date: Thu, 14 May 2020 06:55:16
Message-Id: 1589439303.9e9a2b00f30d21beff750a4d6a6a50d09265d376.fordfrog@gentoo
1 commit: 9e9a2b00f30d21beff750a4d6a6a50d09265d376
2 Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 14 06:54:34 2020 +0000
4 Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
5 CommitDate: Thu May 14 06:55:03 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e9a2b00
7
8 net-analyzer/zabbix: removed obsolete 4.0.18 and 4.4.6
9
10 Package-Manager: Portage-2.3.99, Repoman-2.3.22
11 Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>
12
13 net-analyzer/zabbix/Manifest | 2 -
14 net-analyzer/zabbix/zabbix-4.0.18.ebuild | 350 -------------------------------
15 net-analyzer/zabbix/zabbix-4.4.6.ebuild | 347 ------------------------------
16 3 files changed, 699 deletions(-)
17
18 diff --git a/net-analyzer/zabbix/Manifest b/net-analyzer/zabbix/Manifest
19 index 157252c9bd4..0fe146080fd 100644
20 --- a/net-analyzer/zabbix/Manifest
21 +++ b/net-analyzer/zabbix/Manifest
22 @@ -1,8 +1,6 @@
23 DIST zabbix-3.0.30.tar.gz 14700686 BLAKE2B 9caa772c8dfdd53411bc996b8c97dce7c24853ea1049fe3cb71048c089105af5c7d1cf51071d91d1d2a98113181e9977a1ca3b4304e42a4a2f8bb0b87cd725b8 SHA512 6e60c9e5570aa69e1d52f005094eda1618aafc6d7ee831d4e5dc26f64b0691e2d9e494845fd36d22b049175776057fca28142da31d5e8e06d6c6f3e003bde3a3
24 DIST zabbix-3.0.31.tar.gz 14698394 BLAKE2B b8b5f94fe7fe08385b1b358c628b2047b437e6068dab8c3dbdab03e55e95e27f1b77ede4a1a57c4f79bf4a629d9dc5671bd144c002ace7c915f2fed382ac13b2 SHA512 35fec45667cdf217c2be21a164181f92f8f11ef9bcfb0c8dad914726e7c436bae5f8a97aebc3af82499e37125f4d1896ef74ad061a1ee3cbb674562c22a832b1
25 -DIST zabbix-4.0.18.tar.gz 17200784 BLAKE2B 00c447459518d4c3a600e82f42f2ae14bcda6d8a933eb25a31fb00951f556355925e90960b76e273c2cc08a83b476e7c1a98b2e94aa4c23363fd639d4b199ac5 SHA512 c686611f60242cb2bef408bacbd71b7f3e88ad01b5ac9c34566c36812c9469c85c2388a9efd2ded5b329a3ffa7ec474845f2bac4e100e66b80078823c276cecb
26 DIST zabbix-4.0.19.tar.gz 17211769 BLAKE2B 1f7ac3fb195c35a41fae84a2b9a7985bee49664df8469ef7a14b9e264348447e5d5822fdc05feca4041ca57e74d15bc8b5cae262024fc5dca7749af263224d2d SHA512 c279af3d8b1b9125420d65e4e20a8892f9531a345e1f0046214fa14ab6204d535fd0cb672b5f3c6b5e325b7d8ff44e317bde58611f4bef9d89aba70851326daf
27 DIST zabbix-4.0.20.tar.gz 17215217 BLAKE2B 144b334e78b121d0ba01b285590a6d354ed54be8dcebc12216b51f9829dba98c76d122bb329efbf67931237636fe178ecf5dfd141954fe37d1063c24c3c6dcda SHA512 5f761ba8bd3eac67de9f8d3614ebf437a6a4cdad8f0bf961c8b4cbe39f13bafe64bdb58b6ba56f1a27304ebdaa32109447bd3328fd3e2fcc1aacde056fb1d5dd
28 -DIST zabbix-4.4.6.tar.gz 19371211 BLAKE2B b63d946f360c529bfc32070e2907cdfada34ee3615c24c6a65ada7379e2ad65ff8e1d182ff9b59e11c844103cb608aafeab0f2bc6bb97fc1a31183214a6df01e SHA512 f9e84872f0210e497261462de95e9096391fc74bee6fd511087825fcfdd8f363003bd090e01a8a092a69ef1f01c4dd31d623f5321cf77dbced0bd337fb91682c
29 DIST zabbix-4.4.7.tar.gz 19413652 BLAKE2B 3c7d55a64f8d0e94d7fca3d088bb40592f56ffd5ca8025fb2cdd82ae7946bca1449b354e74cc3e50a6fca9b0bc2b46cf995b74d31d4b462f3d0b4be734f7c19b SHA512 2b96771bb555fae3df67665ac2e47c94662b071eb97c943d59b8f1fc7d31e2bf349c551a0015c6e239321f069b3ab87373c397a023cbff3daad8bd310d11fb6a
30 DIST zabbix-4.4.8.tar.gz 19457802 BLAKE2B 4cc566b744d500c5f3a95eeaebe5418ff58cf3852318f474991706b0f81d1a9b0a1b3793e3e28b99fc45f4a6bfb9281c4d42acb5bb8fc49c37802d3c245dd853 SHA512 bd850d4ec8f30b9bcd531d84606c900692be5b91424cb06f66cde24ed4634a93d25476010e4387b51933406c2552a611e2e7ec4691b57ca6c38fc874c4b1aef1
31
32 diff --git a/net-analyzer/zabbix/zabbix-4.0.18.ebuild b/net-analyzer/zabbix/zabbix-4.0.18.ebuild
33 deleted file mode 100644
34 index 1825d361d64..00000000000
35 --- a/net-analyzer/zabbix/zabbix-4.0.18.ebuild
36 +++ /dev/null
37 @@ -1,350 +0,0 @@
38 -# Copyright 1999-2020 Gentoo Authors
39 -# Distributed under the terms of the GNU General Public License v2
40 -
41 -EAPI=7
42 -
43 -# needed to make webapp-config dep optional
44 -WEBAPP_OPTIONAL="yes"
45 -inherit flag-o-matic webapp java-pkg-opt-2 user systemd toolchain-funcs
46 -
47 -DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers"
48 -HOMEPAGE="https://www.zabbix.com/"
49 -MY_P=${P/_/}
50 -MY_PV=${PV/_/}
51 -SRC_URI="mirror://sourceforge/project/zabbix/ZABBIX%20Latest%20Stable/${PV}/${P}.tar.gz"
52 -LICENSE="GPL-2"
53 -SLOT="0"
54 -WEBAPP_MANUAL_SLOT="yes"
55 -KEYWORDS="amd64 x86"
56 -IUSE="+agent java curl frontend ipv6 xmpp ldap libxml2 mysql openipmi oracle +postgres proxy server ssh ssl snmp sqlite odbc static"
57 -REQUIRED_USE="|| ( agent frontend proxy server )
58 - proxy? ( ^^ ( mysql oracle postgres sqlite odbc ) )
59 - server? ( ^^ ( mysql oracle postgres odbc ) )
60 - static? ( !oracle !snmp )"
61 -
62 -COMMON_DEPEND="
63 - curl? ( net-misc/curl )
64 - java? ( >=virtual/jdk-1.8:* )
65 - ldap? (
66 - =dev-libs/cyrus-sasl-2*
67 - net-libs/gnutls
68 - net-nds/openldap
69 - )
70 - libxml2? ( dev-libs/libxml2 )
71 - mysql? ( dev-db/mysql-connector-c )
72 - odbc? ( dev-db/unixODBC )
73 - openipmi? ( sys-libs/openipmi )
74 - oracle? ( dev-db/oracle-instantclient-basic )
75 - postgres? ( dev-db/postgresql:* )
76 - proxy? ( sys-libs/zlib )
77 - server? (
78 - dev-libs/libevent
79 - sys-libs/zlib
80 - )
81 - snmp? ( net-analyzer/net-snmp )
82 - sqlite? ( dev-db/sqlite )
83 - ssh? ( net-libs/libssh2 )
84 - ssl? ( dev-libs/openssl:=[-bindist] )
85 - xmpp? ( dev-libs/iksemel )
86 -"
87 -
88 -RDEPEND="${COMMON_DEPEND}
89 - java? ( >=virtual/jre-1.8:* )
90 - mysql? ( virtual/mysql )
91 - proxy? ( net-analyzer/fping[suid] )
92 - server? (
93 - app-admin/webapp-config
94 - dev-libs/libevent
95 - dev-libs/libpcre
96 - net-analyzer/fping[suid]
97 - )
98 - frontend? (
99 - app-admin/webapp-config
100 - dev-lang/php:*[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode]
101 - media-libs/gd[png]
102 - virtual/httpd-php:*
103 - mysql? ( dev-lang/php[mysqli] )
104 - odbc? ( dev-lang/php[odbc] )
105 - oracle? ( dev-lang/php[oci8-instant-client] )
106 - postgres? ( dev-lang/php[postgres] )
107 - sqlite? ( dev-lang/php[sqlite] )
108 - )
109 -"
110 -DEPEND="${COMMON_DEPEND}
111 - static? (
112 - curl? ( net-misc/curl[static-libs] )
113 - ldap? (
114 - =dev-libs/cyrus-sasl-2*[static-libs]
115 - net-libs/gnutls[static-libs]
116 - net-nds/openldap[static-libs]
117 - )
118 - libxml2? ( dev-libs/libxml2[static-libs] )
119 - mysql? ( dev-db/mysql-connector-c[static-libs] )
120 - odbc? ( dev-db/unixODBC[static-libs] )
121 - postgres? ( dev-db/postgresql:*[static-libs] )
122 - sqlite? ( dev-db/sqlite[static-libs] )
123 - ssh? ( net-libs/libssh2 )
124 - )
125 -"
126 -BDEPEND="
127 - virtual/pkgconfig
128 -"
129 -
130 -PATCHES=(
131 - "${FILESDIR}/${P}-modulepathfix.patch"
132 - "${FILESDIR}/${PN}-3.0.30-security-disable-PidFile.patch"
133 -)
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 - java-pkg-opt-2_pkg_setup
165 -}
166 -
167 -src_prepare() {
168 - default
169 -}
170 -
171 -src_configure() {
172 - econf \
173 - $(use_enable agent) \
174 - $(use_enable ipv6) \
175 - $(use_enable java) \
176 - $(use_enable proxy) \
177 - $(use_enable server) \
178 - $(use_enable static) \
179 - $(use_with curl libcurl) \
180 - $(use_with ldap) \
181 - $(use_with libxml2) \
182 - $(use_with mysql) \
183 - $(use_with odbc unixodbc) \
184 - $(use_with openipmi openipmi) \
185 - $(use_with oracle) \
186 - $(use_with postgres postgresql) \
187 - $(use_with snmp net-snmp) \
188 - $(use_with sqlite sqlite3) \
189 - $(use_with ssh ssh2) \
190 - $(use_with ssl openssl) \
191 - $(use_with xmpp jabber)
192 -}
193 -
194 -src_compile() {
195 - if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
196 - emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)"
197 - fi
198 -}
199 -
200 -src_install() {
201 - local dirs=(
202 - /etc/zabbix
203 - /var/lib/zabbix
204 - /var/lib/zabbix/home
205 - /var/lib/zabbix/scripts
206 - /var/lib/zabbix/alertscripts
207 - /var/lib/zabbix/externalscripts
208 - /var/log/zabbix
209 - )
210 -
211 - for dir in "${dirs[@]}"; do
212 - dodir "${dir}"
213 - keepdir "${dir}"
214 - done
215 -
216 - if use server; then
217 - insinto /etc/zabbix
218 - doins "${S}"/conf/zabbix_server.conf
219 - fperms 0640 /etc/zabbix/zabbix_server.conf
220 - fowners root:zabbix /etc/zabbix/zabbix_server.conf
221 -
222 - newinitd "${FILESDIR}"/zabbix-server.init zabbix-server
223 -
224 - dosbin src/zabbix_server/zabbix_server
225 -
226 - insinto /usr/share/zabbix
227 - doins -r "${S}"/database/
228 -
229 - systemd_dounit "${FILESDIR}"/zabbix-server.service
230 - systemd_newtmpfilesd "${FILESDIR}"/zabbix-server.tmpfiles zabbix-server.conf
231 - fi
232 -
233 - if use proxy; then
234 - insinto /etc/zabbix
235 - doins "${S}"/conf/zabbix_proxy.conf
236 - fperms 0640 /etc/zabbix/zabbix_proxy.conf
237 - fowners root:zabbix /etc/zabbix/zabbix_proxy.conf
238 -
239 - newinitd "${FILESDIR}"/zabbix-proxy.init zabbix-proxy
240 -
241 - dosbin src/zabbix_proxy/zabbix_proxy
242 -
243 - insinto /usr/share/zabbix
244 - doins -r "${S}"/database/
245 -
246 - systemd_dounit "${FILESDIR}"/zabbix-proxy.service
247 - systemd_newtmpfilesd "${FILESDIR}"/zabbix-proxy.tmpfiles zabbix-proxy.conf
248 - fi
249 -
250 - if use agent; then
251 - insinto /etc/zabbix
252 - doins "${S}"/conf/zabbix_agentd.conf
253 - fperms 0640 /etc/zabbix/zabbix_agentd.conf
254 - fowners root:zabbix /etc/zabbix/zabbix_agentd.conf
255 -
256 - newinitd "${FILESDIR}"/zabbix-agentd.init zabbix-agentd
257 -
258 - dosbin src/zabbix_agent/zabbix_agentd
259 - dobin \
260 - src/zabbix_sender/zabbix_sender \
261 - src/zabbix_get/zabbix_get
262 -
263 - systemd_dounit "${FILESDIR}"/zabbix-agentd.service
264 - systemd_newtmpfilesd "${FILESDIR}"/zabbix-agentd.tmpfiles zabbix-agentd.conf
265 - fi
266 -
267 - fowners root:zabbix /etc/zabbix
268 - fowners zabbix:zabbix \
269 - /var/lib/zabbix \
270 - /var/lib/zabbix/home \
271 - /var/lib/zabbix/scripts \
272 - /var/lib/zabbix/alertscripts \
273 - /var/lib/zabbix/externalscripts \
274 - /var/log/zabbix
275 - fperms 0750 \
276 - /etc/zabbix \
277 - /var/lib/zabbix \
278 - /var/lib/zabbix/home \
279 - /var/lib/zabbix/scripts \
280 - /var/lib/zabbix/alertscripts \
281 - /var/lib/zabbix/externalscripts \
282 - /var/log/zabbix
283 -
284 - dodoc README INSTALL NEWS ChangeLog \
285 - conf/zabbix_agentd.conf \
286 - conf/zabbix_proxy.conf \
287 - conf/zabbix_agentd/userparameter_examples.conf \
288 - conf/zabbix_agentd/userparameter_mysql.conf \
289 - conf/zabbix_server.conf
290 -
291 - if use frontend; then
292 - webapp_src_preinst
293 - cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}"
294 - webapp_configfile \
295 - "${MY_HTDOCSDIR}"/include/db.inc.php \
296 - "${MY_HTDOCSDIR}"/include/config.inc.php
297 - webapp_src_install
298 - fi
299 -
300 - if use java; then
301 - dodir \
302 - /${ZABBIXJAVA_BASE} \
303 - /${ZABBIXJAVA_BASE}/bin \
304 - /${ZABBIXJAVA_BASE}/lib
305 - keepdir /${ZABBIXJAVA_BASE}
306 - exeinto /${ZABBIXJAVA_BASE}/bin
307 - doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar
308 - exeinto /${ZABBIXJAVA_BASE}/lib
309 - doexe \
310 - src/zabbix_java/lib/logback-classic-0.9.27.jar \
311 - src/zabbix_java/lib/logback-console.xml \
312 - src/zabbix_java/lib/logback-core-0.9.27.jar \
313 - src/zabbix_java/lib/logback.xml \
314 - src/zabbix_java/lib/android-json-4.3_r3.1.jar \
315 - src/zabbix_java/lib/slf4j-api-1.6.1.jar
316 - newinitd "${FILESDIR}"/zabbix-jmx-proxy.init zabbix-jmx-proxy
317 - newconfd "${FILESDIR}"/zabbix-jmx-proxy.conf zabbix-jmx-proxy
318 - fi
319 -}
320 -
321 -pkg_postinst() {
322 - if use server || use proxy ; then
323 - elog
324 - elog "You may need to configure your database for Zabbix"
325 - elog "if you have not already done so."
326 - elog
327 -
328 - zabbix_homedir=$(egethome zabbix)
329 - if [ -n "${zabbix_homedir}" ] && \
330 - [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then
331 - ewarn
332 - ewarn "The user 'zabbix' should have his homedir changed"
333 - ewarn "to /var/lib/zabbix/home if you want to use"
334 - ewarn "custom alert scripts."
335 - ewarn
336 - ewarn "A real homedir might be needed for configfiles"
337 - ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when"
338 - ewarn "using sendxmpp for Jabber alerts)."
339 - ewarn
340 - ewarn "To change the homedir use:"
341 - ewarn " usermod -d /var/lib/zabbix/home zabbix"
342 - ewarn
343 - fi
344 - fi
345 -
346 - if use server; then
347 - elog
348 - elog "For distributed monitoring you have to run:"
349 - elog
350 - elog "zabbix_server -n <nodeid>"
351 - elog
352 - elog "This will convert database data for use with Node ID"
353 - elog "and also adds a local node."
354 - elog
355 - fi
356 -
357 - elog "--"
358 - elog
359 - elog "You may need to add these lines to /etc/services:"
360 - elog
361 - elog "zabbix-agent 10050/tcp Zabbix Agent"
362 - elog "zabbix-agent 10050/udp Zabbix Agent"
363 - elog "zabbix-trapper 10051/tcp Zabbix Trapper"
364 - elog "zabbix-trapper 10051/udp Zabbix Trapper"
365 - elog
366 -
367 - if use server || use proxy ; then
368 - # check for fping
369 - fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null)
370 - case "${fping_perms}" in
371 - 4[157][157][157])
372 - ;;
373 - *)
374 - ewarn
375 - ewarn "If you want to use the checks 'icmpping' and 'icmppingsec',"
376 - ewarn "you have to make /usr/sbin/fping setuid root and executable"
377 - ewarn "by everyone. Run the following command to fix it:"
378 - ewarn
379 - ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping"
380 - ewarn
381 - ewarn "Please be aware that this might impose a security risk,"
382 - ewarn "depending on the code quality of fping."
383 - ewarn
384 - ;;
385 - esac
386 - fi
387 -}
388
389 diff --git a/net-analyzer/zabbix/zabbix-4.4.6.ebuild b/net-analyzer/zabbix/zabbix-4.4.6.ebuild
390 deleted file mode 100644
391 index 4f4099f27c6..00000000000
392 --- a/net-analyzer/zabbix/zabbix-4.4.6.ebuild
393 +++ /dev/null
394 @@ -1,347 +0,0 @@
395 -# Copyright 1999-2020 Gentoo Authors
396 -# Distributed under the terms of the GNU General Public License v2
397 -
398 -EAPI=7
399 -
400 -# needed to make webapp-config dep optional
401 -WEBAPP_OPTIONAL="yes"
402 -inherit flag-o-matic webapp java-pkg-opt-2 user systemd toolchain-funcs
403 -
404 -DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers"
405 -HOMEPAGE="https://www.zabbix.com/"
406 -MY_P=${P/_/}
407 -MY_PV=${PV/_/}
408 -SRC_URI="mirror://sourceforge/project/zabbix/ZABBIX%20Latest%20Stable/${PV}/${P}.tar.gz"
409 -LICENSE="GPL-2"
410 -SLOT="0"
411 -WEBAPP_MANUAL_SLOT="yes"
412 -KEYWORDS="amd64 x86"
413 -IUSE="+agent java curl frontend ipv6 ldap libxml2 mysql openipmi oracle +postgres proxy server ssh ssl snmp sqlite odbc static"
414 -REQUIRED_USE="|| ( agent frontend proxy server )
415 - proxy? ( ^^ ( mysql oracle postgres sqlite odbc ) )
416 - server? ( ^^ ( mysql oracle postgres odbc ) )
417 - static? ( !oracle !snmp )"
418 -
419 -COMMON_DEPEND="
420 - curl? ( net-misc/curl )
421 - java? ( >=virtual/jdk-1.8:* )
422 - ldap? (
423 - =dev-libs/cyrus-sasl-2*
424 - net-libs/gnutls
425 - net-nds/openldap
426 - )
427 - libxml2? ( dev-libs/libxml2 )
428 - mysql? ( dev-db/mysql-connector-c )
429 - odbc? ( dev-db/unixODBC )
430 - openipmi? ( sys-libs/openipmi )
431 - oracle? ( dev-db/oracle-instantclient-basic )
432 - postgres? ( dev-db/postgresql:* )
433 - proxy? ( sys-libs/zlib )
434 - server? (
435 - dev-libs/libevent
436 - sys-libs/zlib
437 - )
438 - snmp? ( net-analyzer/net-snmp )
439 - sqlite? ( dev-db/sqlite )
440 - ssh? ( net-libs/libssh2 )
441 - ssl? ( dev-libs/openssl:=[-bindist] )
442 -"
443 -
444 -RDEPEND="${COMMON_DEPEND}
445 - java? ( >=virtual/jre-1.8:* )
446 - mysql? ( virtual/mysql )
447 - proxy? ( net-analyzer/fping[suid] )
448 - server? (
449 - app-admin/webapp-config
450 - dev-libs/libevent
451 - dev-libs/libpcre
452 - net-analyzer/fping[suid]
453 - )
454 - frontend? (
455 - app-admin/webapp-config
456 - dev-lang/php:*[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode]
457 - media-libs/gd[png]
458 - virtual/httpd-php:*
459 - mysql? ( dev-lang/php[mysqli] )
460 - odbc? ( dev-lang/php[odbc] )
461 - oracle? ( dev-lang/php[oci8-instant-client] )
462 - postgres? ( dev-lang/php[postgres] )
463 - sqlite? ( dev-lang/php[sqlite] )
464 - )
465 -"
466 -DEPEND="${COMMON_DEPEND}
467 - static? (
468 - curl? ( net-misc/curl[static-libs] )
469 - ldap? (
470 - =dev-libs/cyrus-sasl-2*[static-libs]
471 - net-libs/gnutls[static-libs]
472 - net-nds/openldap[static-libs]
473 - )
474 - libxml2? ( dev-libs/libxml2[static-libs] )
475 - mysql? ( dev-db/mysql-connector-c[static-libs] )
476 - odbc? ( dev-db/unixODBC[static-libs] )
477 - postgres? ( dev-db/postgresql:*[static-libs] )
478 - sqlite? ( dev-db/sqlite[static-libs] )
479 - ssh? ( net-libs/libssh2 )
480 - )
481 -"
482 -BDEPEND="
483 - virtual/pkgconfig
484 -"
485 -
486 -PATCHES=(
487 - "${FILESDIR}/${PN}-4.0.18-modulepathfix.patch"
488 - "${FILESDIR}/${PN}-3.0.30-security-disable-PidFile.patch"
489 -)
490 -
491 -S=${WORKDIR}/${MY_P}
492 -
493 -ZABBIXJAVA_BASE="opt/zabbix_java"
494 -
495 -pkg_setup() {
496 - if use oracle; then
497 - if [ -z "${ORACLE_HOME}" ]; then
498 - eerror
499 - eerror "The environment variable ORACLE_HOME must be set"
500 - eerror "and point to the correct location."
501 - eerror "It looks like you don't have Oracle installed."
502 - eerror
503 - die "Environment variable ORACLE_HOME is not set"
504 - fi
505 - if has_version 'dev-db/oracle-instantclient-basic'; then
506 - ewarn
507 - ewarn "Please ensure you have a full install of the Oracle client."
508 - ewarn "dev-db/oracle-instantclient* is NOT sufficient."
509 - ewarn
510 - fi
511 - fi
512 -
513 - if use frontend; then
514 - webapp_pkg_setup
515 - fi
516 -
517 - enewgroup zabbix
518 - enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix
519 -
520 - java-pkg-opt-2_pkg_setup
521 -}
522 -
523 -src_prepare() {
524 - default
525 -}
526 -
527 -src_configure() {
528 - econf \
529 - $(use_enable agent) \
530 - $(use_enable ipv6) \
531 - $(use_enable java) \
532 - $(use_enable proxy) \
533 - $(use_enable server) \
534 - $(use_enable static) \
535 - $(use_with curl libcurl) \
536 - $(use_with ldap) \
537 - $(use_with libxml2) \
538 - $(use_with mysql) \
539 - $(use_with odbc unixodbc) \
540 - $(use_with openipmi openipmi) \
541 - $(use_with oracle) \
542 - $(use_with postgres postgresql) \
543 - $(use_with snmp net-snmp) \
544 - $(use_with sqlite sqlite3) \
545 - $(use_with ssh ssh2) \
546 - $(use_with ssl openssl)
547 -}
548 -
549 -src_compile() {
550 - if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
551 - emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)"
552 - fi
553 -}
554 -
555 -src_install() {
556 - local dirs=(
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 -
566 - for dir in "${dirs[@]}"; do
567 - dodir "${dir}"
568 - keepdir "${dir}"
569 - done
570 -
571 - if use server; then
572 - insinto /etc/zabbix
573 - doins "${S}"/conf/zabbix_server.conf
574 - fperms 0640 /etc/zabbix/zabbix_server.conf
575 - fowners root:zabbix /etc/zabbix/zabbix_server.conf
576 -
577 - newinitd "${FILESDIR}"/zabbix-server.init zabbix-server
578 -
579 - dosbin src/zabbix_server/zabbix_server
580 -
581 - insinto /usr/share/zabbix
582 - doins -r "${S}"/database/
583 -
584 - systemd_dounit "${FILESDIR}"/zabbix-server.service
585 - systemd_newtmpfilesd "${FILESDIR}"/zabbix-server.tmpfiles zabbix-server.conf
586 - fi
587 -
588 - if use proxy; then
589 - insinto /etc/zabbix
590 - doins "${S}"/conf/zabbix_proxy.conf
591 - fperms 0640 /etc/zabbix/zabbix_proxy.conf
592 - fowners root:zabbix /etc/zabbix/zabbix_proxy.conf
593 -
594 - newinitd "${FILESDIR}"/zabbix-proxy.init zabbix-proxy
595 -
596 - dosbin src/zabbix_proxy/zabbix_proxy
597 -
598 - insinto /usr/share/zabbix
599 - doins -r "${S}"/database/
600 -
601 - systemd_dounit "${FILESDIR}"/zabbix-proxy.service
602 - systemd_newtmpfilesd "${FILESDIR}"/zabbix-proxy.tmpfiles zabbix-proxy.conf
603 - fi
604 -
605 - if use agent; then
606 - insinto /etc/zabbix
607 - doins "${S}"/conf/zabbix_agentd.conf
608 - fperms 0640 /etc/zabbix/zabbix_agentd.conf
609 - fowners root:zabbix /etc/zabbix/zabbix_agentd.conf
610 -
611 - newinitd "${FILESDIR}"/zabbix-agentd.init zabbix-agentd
612 -
613 - dosbin src/zabbix_agent/zabbix_agentd
614 - dobin \
615 - src/zabbix_sender/zabbix_sender \
616 - src/zabbix_get/zabbix_get
617 -
618 - systemd_dounit "${FILESDIR}"/zabbix-agentd.service
619 - systemd_newtmpfilesd "${FILESDIR}"/zabbix-agentd.tmpfiles zabbix-agentd.conf
620 - fi
621 -
622 - fowners root:zabbix /etc/zabbix
623 - fowners zabbix:zabbix \
624 - /var/lib/zabbix \
625 - /var/lib/zabbix/home \
626 - /var/lib/zabbix/scripts \
627 - /var/lib/zabbix/alertscripts \
628 - /var/lib/zabbix/externalscripts \
629 - /var/log/zabbix
630 - fperms 0750 \
631 - /etc/zabbix \
632 - /var/lib/zabbix \
633 - /var/lib/zabbix/home \
634 - /var/lib/zabbix/scripts \
635 - /var/lib/zabbix/alertscripts \
636 - /var/lib/zabbix/externalscripts \
637 - /var/log/zabbix
638 -
639 - dodoc README INSTALL NEWS ChangeLog \
640 - conf/zabbix_agentd.conf \
641 - conf/zabbix_proxy.conf \
642 - conf/zabbix_agentd/userparameter_examples.conf \
643 - conf/zabbix_agentd/userparameter_mysql.conf \
644 - conf/zabbix_server.conf
645 -
646 - if use frontend; then
647 - webapp_src_preinst
648 - cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}"
649 - webapp_configfile \
650 - "${MY_HTDOCSDIR}"/include/db.inc.php \
651 - "${MY_HTDOCSDIR}"/include/config.inc.php
652 - webapp_src_install
653 - fi
654 -
655 - if use java; then
656 - dodir \
657 - /${ZABBIXJAVA_BASE} \
658 - /${ZABBIXJAVA_BASE}/bin \
659 - /${ZABBIXJAVA_BASE}/lib
660 - keepdir /${ZABBIXJAVA_BASE}
661 - exeinto /${ZABBIXJAVA_BASE}/bin
662 - doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar
663 - exeinto /${ZABBIXJAVA_BASE}/lib
664 - doexe \
665 - src/zabbix_java/lib/logback-classic-0.9.27.jar \
666 - src/zabbix_java/lib/logback-console.xml \
667 - src/zabbix_java/lib/logback-core-0.9.27.jar \
668 - src/zabbix_java/lib/logback.xml \
669 - src/zabbix_java/lib/android-json-4.3_r3.1.jar \
670 - src/zabbix_java/lib/slf4j-api-1.6.1.jar
671 - newinitd "${FILESDIR}"/zabbix-jmx-proxy.init zabbix-jmx-proxy
672 - newconfd "${FILESDIR}"/zabbix-jmx-proxy.conf zabbix-jmx-proxy
673 - fi
674 -}
675 -
676 -pkg_postinst() {
677 - if use server || use proxy ; then
678 - elog
679 - elog "You may need to configure your database for Zabbix"
680 - elog "if you have not already done so."
681 - elog
682 -
683 - zabbix_homedir=$(egethome zabbix)
684 - if [ -n "${zabbix_homedir}" ] && \
685 - [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then
686 - ewarn
687 - ewarn "The user 'zabbix' should have his homedir changed"
688 - ewarn "to /var/lib/zabbix/home if you want to use"
689 - ewarn "custom alert scripts."
690 - ewarn
691 - ewarn "A real homedir might be needed for configfiles"
692 - ewarn "for custom alert scripts."
693 - ewarn
694 - ewarn "To change the homedir use:"
695 - ewarn " usermod -d /var/lib/zabbix/home zabbix"
696 - ewarn
697 - fi
698 - fi
699 -
700 - if use server; then
701 - elog
702 - elog "For distributed monitoring you have to run:"
703 - elog
704 - elog "zabbix_server -n <nodeid>"
705 - elog
706 - elog "This will convert database data for use with Node ID"
707 - elog "and also adds a local node."
708 - elog
709 - fi
710 -
711 - elog "--"
712 - elog
713 - elog "You may need to add these lines to /etc/services:"
714 - elog
715 - elog "zabbix-agent 10050/tcp Zabbix Agent"
716 - elog "zabbix-agent 10050/udp Zabbix Agent"
717 - elog "zabbix-trapper 10051/tcp Zabbix Trapper"
718 - elog "zabbix-trapper 10051/udp Zabbix Trapper"
719 - elog
720 -
721 - if use server || use proxy ; then
722 - # check for fping
723 - fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null)
724 - case "${fping_perms}" in
725 - 4[157][157][157])
726 - ;;
727 - *)
728 - ewarn
729 - ewarn "If you want to use the checks 'icmpping' and 'icmppingsec',"
730 - ewarn "you have to make /usr/sbin/fping setuid root and executable"
731 - ewarn "by everyone. Run the following command to fix it:"
732 - ewarn
733 - ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping"
734 - ewarn
735 - ewarn "Please be aware that this might impose a security risk,"
736 - ewarn "depending on the code quality of fping."
737 - ewarn
738 - ;;
739 - esac
740 - fi
741 -}