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: Wed, 03 Feb 2021 08:05:58
Message-Id: 1612339537.d903d42e383e9ca7cc9d56ab1e6413918c6a8305.fordfrog@gentoo
1 commit: d903d42e383e9ca7cc9d56ab1e6413918c6a8305
2 Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 3 08:05:37 2021 +0000
4 Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 3 08:05:37 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d903d42e
7
8 net-analyzer/zabbix: removed obsolete 5.0.6-r1 & 5.2.2-r1
9
10 Package-Manager: Portage-3.0.14, Repoman-3.0.2
11 Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>
12
13 net-analyzer/zabbix/Manifest | 2 -
14 net-analyzer/zabbix/zabbix-5.0.6-r1.ebuild | 350 -----------------------------
15 net-analyzer/zabbix/zabbix-5.2.2-r1.ebuild | 350 -----------------------------
16 3 files changed, 702 deletions(-)
17
18 diff --git a/net-analyzer/zabbix/Manifest b/net-analyzer/zabbix/Manifest
19 index 7b01ef70a73..1ed8dd53762 100644
20 --- a/net-analyzer/zabbix/Manifest
21 +++ b/net-analyzer/zabbix/Manifest
22 @@ -1,9 +1,7 @@
23 DIST zabbix-3.0.31.tar.gz 14698394 BLAKE2B b8b5f94fe7fe08385b1b358c628b2047b437e6068dab8c3dbdab03e55e95e27f1b77ede4a1a57c4f79bf4a629d9dc5671bd144c002ace7c915f2fed382ac13b2 SHA512 35fec45667cdf217c2be21a164181f92f8f11ef9bcfb0c8dad914726e7c436bae5f8a97aebc3af82499e37125f4d1896ef74ad061a1ee3cbb674562c22a832b1
24 DIST zabbix-4.0.27.tar.gz 17426383 BLAKE2B 33381d3705bc7cb9d451b1a536fbb4f92a9e7e321afbe9363a7879cbea3cc5977a4866a5f4d1fb70120804edaffaf869ba8c4321a67898c42c9abe2341ee118b SHA512 54690dd778d09d7309c2e2ea3f0bfc6053ef097888bfccd140484e4677766ded829757eb4dfde7da8ce19335307ddbfbb1c132feabc13cc6727a6d28c1591cfa
25 DIST zabbix-4.0.28.tar.gz 17424006 BLAKE2B f45af54d1e54ff6945f13cc684fbe0506dab4d554f65018fc30758d7b8be6814ca3661655778abb7c24dcbb241b8e6c21f0ea72a01a886392cadc917e699a957 SHA512 1f40c7316f92474beecc9470d4ad6c093a3a005180514307eb3d7aa206fa36d1a8decc20628b1fc0e62bc7a2ff0e508d694da0fe05911314de6f6d7aa726f425
26 -DIST zabbix-5.0.6.tar.gz 19359566 BLAKE2B 375fcbed08be46c1f17c7979763dcdfb8a51a25c2523037a1992dbb7ceb798a665f5d01e97e2e6ef023d5170e3e71df933e0fc41d27fd905ba190497d6bcd28d SHA512 c136536eab3c0e3527e8db8528656776de8849554e0a85a1644000e51c66b09044b176985de1c6d1dcc1d4ec03fc2456111c4df8d896ca276eeed2744cdd48be
27 DIST zabbix-5.0.7.tar.gz 19382483 BLAKE2B fa0864ba1ac77659e9a18b0c22cee8be1078fad1e76017d01754b626151366bfeb67aa2a5b29ac1c0ac92ebaff53f7ca273a763158f7a37566dd41efe4dee7ff SHA512 8916ff44a2b3ad16e40d37b43ed540b4eefb91423ecbcc4ab9463477f6a29ed8417c79b0951a36e2798df1166a95ee5ed150bd61448b657df694498c2a274403
28 DIST zabbix-5.0.8.tar.gz 19474050 BLAKE2B 1043efca2f373553728206837949bce5f5ea32328c6289e4028f65e6f1ed76560c1ffbd610eec9855f050d0330bcd3b364a983db896285729f30a693d5ae6c6f SHA512 19601ace704c8a887ffc9b57da8825d8a28a5d064aac3e59480994bee4156db186d37ecf4bee2208bbafc0cb76c0c7f47de964f99953ce78d0187457255d92e9
29 -DIST zabbix-5.2.2.tar.gz 19745101 BLAKE2B 651184d4645ff4cfac1317326bd846b4707d8556a30c64dd0b5ac923fb2bb4439b120a4c2bf43c1f73b57a919d5f3bfba28e3d9efde6a3f48587c5b7d0b1d7db SHA512 7bb79111ff809a90a5911d7f94f86eddec3a3fa4f91fdfbf013178442de81d22dc13359679570b8d62fe41b664c764c42cbe98936fd195521951aab507933d9b
30 DIST zabbix-5.2.3.tar.gz 19791383 BLAKE2B ad0c2306f05d1d664068d9dbc6983c79e1e4d13e605a4683076da51968d2ca2dd6330ca16ad5e24fcabca95565ff1c3e4246ce7352f23a32d419ba207869f8c2 SHA512 207d522ab728bb89f6aaf793af94848469210fb257ead34b93e0f7ba7b2a22b4cce65d516dfbb549a36ae873fe6b6d3486c47f11efff8950d3c81570c673ff9e
31 DIST zabbix-5.2.4.tar.gz 19916307 BLAKE2B 17d0f5dc1d4a8b79d2a5e741a0fa18ecf584ddfb45afbe816721d0e69bae4b5e11b44fe5031c8a34562c30fd2818f7b4a8bfb1442489be3ec23a27a70e789f56 SHA512 e218de9a8b9445401e769c14a9efd0b3d1b7e9610ce021cdbfc9db159801a4033b8f1c1a808c853bfa3aeb66db8a6dd0cbb5b44fc1421fa0f54c28589d7314b4
32
33 diff --git a/net-analyzer/zabbix/zabbix-5.0.6-r1.ebuild b/net-analyzer/zabbix/zabbix-5.0.6-r1.ebuild
34 deleted file mode 100644
35 index 90a6d16b59e..00000000000
36 --- a/net-analyzer/zabbix/zabbix-5.0.6-r1.ebuild
37 +++ /dev/null
38 @@ -1,350 +0,0 @@
39 -# Copyright 1999-2021 Gentoo Authors
40 -# Distributed under the terms of the GNU General Public License v2
41 -
42 -EAPI=7
43 -
44 -# needed to make webapp-config dep optional
45 -WEBAPP_OPTIONAL="yes"
46 -inherit flag-o-matic webapp java-pkg-opt-2 systemd toolchain-funcs
47 -
48 -DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers"
49 -HOMEPAGE="https://www.zabbix.com/"
50 -MY_P=${P/_/}
51 -MY_PV=${PV/_/}
52 -SRC_URI="https://cdn.zabbix.com/${PN}/sources/stable/$(ver_cut 1-2)/${P}.tar.gz"
53 -LICENSE="GPL-2"
54 -SLOT="0/$(ver_cut 1-2)"
55 -WEBAPP_MANUAL_SLOT="yes"
56 -KEYWORDS="amd64 x86"
57 -IUSE="+agent java curl frontend ipv6 ldap libxml2 mysql openipmi oracle +postgres proxy server ssh ssl snmp sqlite odbc static"
58 -REQUIRED_USE="|| ( agent frontend proxy server )
59 - proxy? ( ^^ ( mysql oracle postgres sqlite odbc ) )
60 - server? ( ^^ ( mysql oracle postgres odbc ) )
61 - static? ( !oracle !snmp )"
62 -
63 -COMMON_DEPEND="
64 - curl? ( net-misc/curl )
65 - java? ( >=virtual/jdk-1.8:* )
66 - ldap? (
67 - =dev-libs/cyrus-sasl-2*
68 - net-libs/gnutls
69 - net-nds/openldap
70 - )
71 - libxml2? ( dev-libs/libxml2 )
72 - mysql? ( dev-db/mysql-connector-c )
73 - odbc? ( dev-db/unixODBC )
74 - openipmi? ( sys-libs/openipmi )
75 - oracle? ( dev-db/oracle-instantclient-basic )
76 - postgres? ( dev-db/postgresql:* )
77 - proxy? ( sys-libs/zlib )
78 - server? (
79 - dev-libs/libevent
80 - sys-libs/zlib
81 - )
82 - snmp? ( net-analyzer/net-snmp )
83 - sqlite? ( dev-db/sqlite )
84 - ssh? ( net-libs/libssh2 )
85 - ssl? ( dev-libs/openssl:=[-bindist] )
86 -"
87 -
88 -RDEPEND="${COMMON_DEPEND}
89 - acct-group/zabbix
90 - acct-user/zabbix
91 - java? ( >=virtual/jre-1.8:* )
92 - mysql? ( virtual/mysql )
93 - proxy? ( net-analyzer/fping[suid] )
94 - server? (
95 - app-admin/webapp-config
96 - dev-libs/libevent
97 - dev-libs/libpcre
98 - net-analyzer/fping[suid]
99 - )
100 - frontend? (
101 - app-admin/webapp-config
102 - dev-lang/php:*[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode]
103 - media-libs/gd[png]
104 - virtual/httpd-php:*
105 - mysql? ( dev-lang/php[mysqli] )
106 - odbc? ( dev-lang/php[odbc] )
107 - oracle? ( dev-lang/php[oci8-instant-client] )
108 - postgres? ( dev-lang/php[postgres] )
109 - sqlite? ( dev-lang/php[sqlite] )
110 - )
111 -"
112 -DEPEND="${COMMON_DEPEND}
113 - static? (
114 - curl? ( net-misc/curl[static-libs] )
115 - ldap? (
116 - =dev-libs/cyrus-sasl-2*[static-libs]
117 - net-libs/gnutls[static-libs]
118 - net-nds/openldap[static-libs]
119 - )
120 - libxml2? ( dev-libs/libxml2[static-libs] )
121 - mysql? ( dev-db/mysql-connector-c[static-libs] )
122 - odbc? ( dev-db/unixODBC[static-libs] )
123 - postgres? ( dev-db/postgresql:*[static-libs] )
124 - sqlite? ( dev-db/sqlite[static-libs] )
125 - ssh? ( net-libs/libssh2 )
126 - )
127 -"
128 -BDEPEND="
129 - virtual/pkgconfig
130 -"
131 -
132 -PATCHES=(
133 - "${FILESDIR}/${PN}-4.0.18-modulepathfix.patch"
134 - "${FILESDIR}/${PN}-3.0.30-security-disable-PidFile.patch"
135 -)
136 -
137 -S=${WORKDIR}/${MY_P}
138 -
139 -ZABBIXJAVA_BASE="opt/zabbix_java"
140 -
141 -pkg_setup() {
142 - if use oracle; then
143 - if [ -z "${ORACLE_HOME}" ]; then
144 - eerror
145 - eerror "The environment variable ORACLE_HOME must be set"
146 - eerror "and point to the correct location."
147 - eerror "It looks like you don't have Oracle installed."
148 - eerror
149 - die "Environment variable ORACLE_HOME is not set"
150 - fi
151 - if has_version 'dev-db/oracle-instantclient-basic'; then
152 - ewarn
153 - ewarn "Please ensure you have a full install of the Oracle client."
154 - ewarn "dev-db/oracle-instantclient* is NOT sufficient."
155 - ewarn
156 - fi
157 - fi
158 -
159 - if use frontend; then
160 - webapp_pkg_setup
161 - fi
162 -
163 - java-pkg-opt-2_pkg_setup
164 -}
165 -
166 -src_prepare() {
167 - default
168 -}
169 -
170 -src_configure() {
171 - econf \
172 - $(use_enable agent) \
173 - $(use_enable ipv6) \
174 - $(use_enable java) \
175 - $(use_enable proxy) \
176 - $(use_enable server) \
177 - $(use_enable static) \
178 - $(use_with curl libcurl) \
179 - $(use_with ldap) \
180 - $(use_with libxml2) \
181 - $(use_with mysql) \
182 - $(use_with odbc unixodbc) \
183 - $(use_with openipmi openipmi) \
184 - $(use_with oracle) \
185 - $(use_with postgres postgresql) \
186 - $(use_with snmp net-snmp) \
187 - $(use_with sqlite sqlite3) \
188 - $(use_with ssh ssh2) \
189 - $(use_with ssl openssl)
190 -}
191 -
192 -src_compile() {
193 - if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
194 - emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)"
195 - fi
196 -}
197 -
198 -src_install() {
199 - local dirs=(
200 - /etc/zabbix
201 - /var/lib/zabbix
202 - /var/lib/zabbix/home
203 - /var/lib/zabbix/scripts
204 - /var/lib/zabbix/alertscripts
205 - /var/lib/zabbix/externalscripts
206 - /var/log/zabbix
207 - )
208 -
209 - for dir in "${dirs[@]}"; do
210 - dodir "${dir}"
211 - keepdir "${dir}"
212 - done
213 -
214 - if use server; then
215 - insinto /etc/zabbix
216 - doins "${S}"/conf/zabbix_server.conf
217 - fperms 0640 /etc/zabbix/zabbix_server.conf
218 - fowners root:zabbix /etc/zabbix/zabbix_server.conf
219 -
220 - newinitd "${FILESDIR}"/zabbix-server.init zabbix-server
221 -
222 - dosbin src/zabbix_server/zabbix_server
223 -
224 - insinto /usr/share/zabbix
225 - doins -r "${S}"/database/
226 -
227 - systemd_dounit "${FILESDIR}"/zabbix-server.service
228 - systemd_newtmpfilesd "${FILESDIR}"/zabbix-server.tmpfiles zabbix-server.conf
229 - fi
230 -
231 - if use proxy; then
232 - insinto /etc/zabbix
233 - doins "${S}"/conf/zabbix_proxy.conf
234 - fperms 0640 /etc/zabbix/zabbix_proxy.conf
235 - fowners root:zabbix /etc/zabbix/zabbix_proxy.conf
236 -
237 - newinitd "${FILESDIR}"/zabbix-proxy.init zabbix-proxy
238 -
239 - dosbin src/zabbix_proxy/zabbix_proxy
240 -
241 - insinto /usr/share/zabbix
242 - doins -r "${S}"/database/
243 -
244 - systemd_dounit "${FILESDIR}"/zabbix-proxy.service
245 - systemd_newtmpfilesd "${FILESDIR}"/zabbix-proxy.tmpfiles zabbix-proxy.conf
246 - fi
247 -
248 - if use agent; then
249 - insinto /etc/zabbix
250 - doins "${S}"/conf/zabbix_agentd.conf
251 - fperms 0640 /etc/zabbix/zabbix_agentd.conf
252 - fowners root:zabbix /etc/zabbix/zabbix_agentd.conf
253 -
254 - newinitd "${FILESDIR}"/zabbix-agentd.init zabbix-agentd
255 -
256 - dosbin src/zabbix_agent/zabbix_agentd
257 - dobin \
258 - src/zabbix_sender/zabbix_sender \
259 - src/zabbix_get/zabbix_get
260 -
261 - systemd_dounit "${FILESDIR}"/zabbix-agentd.service
262 - systemd_newtmpfilesd "${FILESDIR}"/zabbix-agentd.tmpfiles zabbix-agentd.conf
263 - fi
264 -
265 - fowners root:zabbix /etc/zabbix
266 - fowners zabbix:zabbix \
267 - /var/lib/zabbix \
268 - /var/lib/zabbix/home \
269 - /var/lib/zabbix/scripts \
270 - /var/lib/zabbix/alertscripts \
271 - /var/lib/zabbix/externalscripts \
272 - /var/log/zabbix
273 - fperms 0750 \
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 -
282 - dodoc README INSTALL NEWS ChangeLog \
283 - conf/zabbix_agentd.conf \
284 - conf/zabbix_proxy.conf \
285 - conf/zabbix_agentd/userparameter_examples.conf \
286 - conf/zabbix_agentd/userparameter_mysql.conf \
287 - conf/zabbix_server.conf
288 -
289 - if use frontend; then
290 - webapp_src_preinst
291 - cp -R ui/* "${D}/${MY_HTDOCSDIR}"
292 - webapp_configfile \
293 - "${MY_HTDOCSDIR}"/include/db.inc.php \
294 - "${MY_HTDOCSDIR}"/include/config.inc.php
295 - webapp_src_install
296 - fi
297 -
298 - if use java; then
299 - dodir \
300 - /${ZABBIXJAVA_BASE} \
301 - /${ZABBIXJAVA_BASE}/bin \
302 - /${ZABBIXJAVA_BASE}/lib
303 - keepdir /${ZABBIXJAVA_BASE}
304 - exeinto /${ZABBIXJAVA_BASE}/bin
305 - doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar
306 - exeinto /${ZABBIXJAVA_BASE}/lib
307 - doexe \
308 - src/zabbix_java/lib/logback-classic-0.9.27.jar \
309 - src/zabbix_java/lib/logback-console.xml \
310 - src/zabbix_java/lib/logback-core-0.9.27.jar \
311 - src/zabbix_java/lib/logback.xml \
312 - src/zabbix_java/lib/android-json-4.3_r3.1.jar \
313 - src/zabbix_java/lib/slf4j-api-1.6.1.jar
314 - newinitd "${FILESDIR}"/zabbix-jmx-proxy.init zabbix-jmx-proxy
315 - newconfd "${FILESDIR}"/zabbix-jmx-proxy.conf zabbix-jmx-proxy
316 - fi
317 -}
318 -
319 -pkg_postinst() {
320 - if use server || use proxy ; then
321 - elog
322 - elog "You may need to configure your database for Zabbix"
323 - elog "if you have not already done so."
324 - elog
325 -
326 - zabbix_homedir=$(egethome zabbix)
327 - if [ -n "${zabbix_homedir}" ] && \
328 - [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then
329 - ewarn
330 - ewarn "The user 'zabbix' should have his homedir changed"
331 - ewarn "to /var/lib/zabbix/home if you want to use"
332 - ewarn "custom alert scripts."
333 - ewarn
334 - ewarn "A real homedir might be needed for configfiles"
335 - ewarn "for custom alert scripts."
336 - ewarn
337 - ewarn "To change the homedir use:"
338 - ewarn " usermod -d /var/lib/zabbix/home zabbix"
339 - ewarn
340 - fi
341 - fi
342 -
343 - if use server; then
344 - elog
345 - elog "For distributed monitoring you have to run:"
346 - elog
347 - elog "zabbix_server -n <nodeid>"
348 - elog
349 - elog "This will convert database data for use with Node ID"
350 - elog "and also adds a local node."
351 - elog
352 - fi
353 -
354 - elog "--"
355 - elog
356 - elog "You may need to add these lines to /etc/services:"
357 - elog
358 - elog "zabbix-agent 10050/tcp Zabbix Agent"
359 - elog "zabbix-agent 10050/udp Zabbix Agent"
360 - elog "zabbix-trapper 10051/tcp Zabbix Trapper"
361 - elog "zabbix-trapper 10051/udp Zabbix Trapper"
362 - elog
363 -
364 - if use server || use proxy ; then
365 - # check for fping
366 - fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null)
367 - case "${fping_perms}" in
368 - 4[157][157][157])
369 - ;;
370 - *)
371 - ewarn
372 - ewarn "If you want to use the checks 'icmpping' and 'icmppingsec',"
373 - ewarn "you have to make /usr/sbin/fping setuid root and executable"
374 - ewarn "by everyone. Run the following command to fix it:"
375 - ewarn
376 - ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping"
377 - ewarn
378 - ewarn "Please be aware that this might impose a security risk,"
379 - ewarn "depending on the code quality of fping."
380 - ewarn
381 - ;;
382 - esac
383 - fi
384 -}
385 -
386 -pkg_prerm() {
387 - (use frontend || use server) && webapp_pkg_prerm
388 -}
389
390 diff --git a/net-analyzer/zabbix/zabbix-5.2.2-r1.ebuild b/net-analyzer/zabbix/zabbix-5.2.2-r1.ebuild
391 deleted file mode 100644
392 index 90a6d16b59e..00000000000
393 --- a/net-analyzer/zabbix/zabbix-5.2.2-r1.ebuild
394 +++ /dev/null
395 @@ -1,350 +0,0 @@
396 -# Copyright 1999-2021 Gentoo Authors
397 -# Distributed under the terms of the GNU General Public License v2
398 -
399 -EAPI=7
400 -
401 -# needed to make webapp-config dep optional
402 -WEBAPP_OPTIONAL="yes"
403 -inherit flag-o-matic webapp java-pkg-opt-2 systemd toolchain-funcs
404 -
405 -DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers"
406 -HOMEPAGE="https://www.zabbix.com/"
407 -MY_P=${P/_/}
408 -MY_PV=${PV/_/}
409 -SRC_URI="https://cdn.zabbix.com/${PN}/sources/stable/$(ver_cut 1-2)/${P}.tar.gz"
410 -LICENSE="GPL-2"
411 -SLOT="0/$(ver_cut 1-2)"
412 -WEBAPP_MANUAL_SLOT="yes"
413 -KEYWORDS="amd64 x86"
414 -IUSE="+agent java curl frontend ipv6 ldap libxml2 mysql openipmi oracle +postgres proxy server ssh ssl snmp sqlite odbc static"
415 -REQUIRED_USE="|| ( agent frontend proxy server )
416 - proxy? ( ^^ ( mysql oracle postgres sqlite odbc ) )
417 - server? ( ^^ ( mysql oracle postgres odbc ) )
418 - static? ( !oracle !snmp )"
419 -
420 -COMMON_DEPEND="
421 - curl? ( net-misc/curl )
422 - java? ( >=virtual/jdk-1.8:* )
423 - ldap? (
424 - =dev-libs/cyrus-sasl-2*
425 - net-libs/gnutls
426 - net-nds/openldap
427 - )
428 - libxml2? ( dev-libs/libxml2 )
429 - mysql? ( dev-db/mysql-connector-c )
430 - odbc? ( dev-db/unixODBC )
431 - openipmi? ( sys-libs/openipmi )
432 - oracle? ( dev-db/oracle-instantclient-basic )
433 - postgres? ( dev-db/postgresql:* )
434 - proxy? ( sys-libs/zlib )
435 - server? (
436 - dev-libs/libevent
437 - sys-libs/zlib
438 - )
439 - snmp? ( net-analyzer/net-snmp )
440 - sqlite? ( dev-db/sqlite )
441 - ssh? ( net-libs/libssh2 )
442 - ssl? ( dev-libs/openssl:=[-bindist] )
443 -"
444 -
445 -RDEPEND="${COMMON_DEPEND}
446 - acct-group/zabbix
447 - acct-user/zabbix
448 - java? ( >=virtual/jre-1.8:* )
449 - mysql? ( virtual/mysql )
450 - proxy? ( net-analyzer/fping[suid] )
451 - server? (
452 - app-admin/webapp-config
453 - dev-libs/libevent
454 - dev-libs/libpcre
455 - net-analyzer/fping[suid]
456 - )
457 - frontend? (
458 - app-admin/webapp-config
459 - dev-lang/php:*[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode]
460 - media-libs/gd[png]
461 - virtual/httpd-php:*
462 - mysql? ( dev-lang/php[mysqli] )
463 - odbc? ( dev-lang/php[odbc] )
464 - oracle? ( dev-lang/php[oci8-instant-client] )
465 - postgres? ( dev-lang/php[postgres] )
466 - sqlite? ( dev-lang/php[sqlite] )
467 - )
468 -"
469 -DEPEND="${COMMON_DEPEND}
470 - static? (
471 - curl? ( net-misc/curl[static-libs] )
472 - ldap? (
473 - =dev-libs/cyrus-sasl-2*[static-libs]
474 - net-libs/gnutls[static-libs]
475 - net-nds/openldap[static-libs]
476 - )
477 - libxml2? ( dev-libs/libxml2[static-libs] )
478 - mysql? ( dev-db/mysql-connector-c[static-libs] )
479 - odbc? ( dev-db/unixODBC[static-libs] )
480 - postgres? ( dev-db/postgresql:*[static-libs] )
481 - sqlite? ( dev-db/sqlite[static-libs] )
482 - ssh? ( net-libs/libssh2 )
483 - )
484 -"
485 -BDEPEND="
486 - virtual/pkgconfig
487 -"
488 -
489 -PATCHES=(
490 - "${FILESDIR}/${PN}-4.0.18-modulepathfix.patch"
491 - "${FILESDIR}/${PN}-3.0.30-security-disable-PidFile.patch"
492 -)
493 -
494 -S=${WORKDIR}/${MY_P}
495 -
496 -ZABBIXJAVA_BASE="opt/zabbix_java"
497 -
498 -pkg_setup() {
499 - if use oracle; then
500 - if [ -z "${ORACLE_HOME}" ]; then
501 - eerror
502 - eerror "The environment variable ORACLE_HOME must be set"
503 - eerror "and point to the correct location."
504 - eerror "It looks like you don't have Oracle installed."
505 - eerror
506 - die "Environment variable ORACLE_HOME is not set"
507 - fi
508 - if has_version 'dev-db/oracle-instantclient-basic'; then
509 - ewarn
510 - ewarn "Please ensure you have a full install of the Oracle client."
511 - ewarn "dev-db/oracle-instantclient* is NOT sufficient."
512 - ewarn
513 - fi
514 - fi
515 -
516 - if use frontend; then
517 - webapp_pkg_setup
518 - fi
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 ui/* "${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 -}
742 -
743 -pkg_prerm() {
744 - (use frontend || use server) && webapp_pkg_prerm
745 -}