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, 29 Sep 2017 16:12:54
Message-Id: 1506701564.ca33738d69ca4eecac47467a28b90ffba551928c.patrick@gentoo
1 commit: ca33738d69ca4eecac47467a28b90ffba551928c
2 Author: Patrick Lauer <patrick <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 29 16:12:12 2017 +0000
4 Commit: Patrick Lauer <patrick <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 29 16:12:44 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca33738d
7
8 net-analyzer/zabbix: Bump
9
10 Package-Manager: Portage-2.3.10, Repoman-2.3.3
11
12 net-analyzer/zabbix/Manifest | 4 +
13 net-analyzer/zabbix/zabbix-2.2.20.ebuild | 341 +++++++++++++++++++++++++++++++
14 net-analyzer/zabbix/zabbix-3.0.11.ebuild | 331 ++++++++++++++++++++++++++++++
15 net-analyzer/zabbix/zabbix-3.2.8.ebuild | 328 +++++++++++++++++++++++++++++
16 net-analyzer/zabbix/zabbix-3.4.2.ebuild | 329 +++++++++++++++++++++++++++++
17 5 files changed, 1333 insertions(+)
18
19 diff --git a/net-analyzer/zabbix/Manifest b/net-analyzer/zabbix/Manifest
20 index c3579644c89..bee6845de45 100644
21 --- a/net-analyzer/zabbix/Manifest
22 +++ b/net-analyzer/zabbix/Manifest
23 @@ -2,7 +2,9 @@ DIST zabbix-2.2.16.tar.gz 15498413 SHA256 3cfcd8c7c11a2e18298e93f33701210b963a7c
24 DIST zabbix-2.2.17.tar.gz 15494053 SHA256 cf42c5db31c27466a9ec33b6bf22289bbc43ee4e5711e6d323d71644b743e535 SHA512 1abd60d05443cdb7b7ecdeca4d0b97414b249fe8be8c3ceaca137722af93e77101151bde59faaac4a3b61b8256bab68b0d1416192d8f72480703575794068a1f WHIRLPOOL 0ab0df7723ac6403fb26d53369fbc1d207b08343bd24f27832b2a2c7a1f043e6fe95ae99d79210f5baa5e5bd9ed9dd89acb74ce66114dfe4702d7913a26a4bb9
25 DIST zabbix-2.2.18.tar.gz 15495920 SHA256 b87e7dadec65d04711fcd66dba398b213452453c5f0c3fc5490d1ab68a41abde SHA512 3e24827b2739aefa12e3d189b856d836b85a1fa45928343c08620ce1ef16c664a8ad806d051f5cffed10837a326245dd5617034f83cdd00432b81eb05be40491 WHIRLPOOL 7936219b6ea6b0db4251db494731b0cbd40a5b774467314a6011434b2c11111e21998217efb3a6925a7d4067da6fc04a4aea9d271f0568101f1ebe660244e378
26 DIST zabbix-2.2.19.tar.gz 15497840 SHA256 311d70a1d0868eeda752b3e9555afbbdf3f37b380e79b0b0ee138e4be488873c SHA512 f9a35093cd63fe433ae67a01d526e65387455cc0c82b33d4015ad428991289f711857e089c169fc46fad51697e3a07a2b310026789099e6f42fa88f2f573c560 WHIRLPOOL b8ed5c92b88c3799cdd37b1e878b5db82e9147e9b603b99655cb4820a38caaeb6280733b3c4c5af57957e2dbf050f31cccad1c494cc4f46c7fcd95f5b1652d50
27 +DIST zabbix-2.2.20.tar.gz 15503661 SHA256 139a4000455bf948df247b4312b9127701596e80742e605beabcf93da4bfee02 SHA512 ca63237c1eece870c2f54a1c35c5165062d0e875e9aa05ce9654657de59e52a131b2ddc1f94dbfb1e2d3f4e6f202e4d6424ba97de06fa008fc15ff859ab8e0c6 WHIRLPOOL 397462758352b585c48aa3a4168ab06134057c292b89cd227ccee4a3ab29b5e7c4797afa2f673a904a91ffc78fd64ae9897697d6ecf923b5aa07a218ad79eb0a
28 DIST zabbix-3.0.10.tar.gz 15573988 SHA256 49ab7a69352fc07c88e08f10e20ef714adde6d08e44df8af81edb82e26c7c772 SHA512 cb5602a6fdb78f4f5e3b6b0193e707497e8c04a7558da8345e2e9130f3058be670a48d501b36bca87d10a1964188ae81eb6cd83a573499086ce1f2152dfa9936 WHIRLPOOL d8da9e2eeaf1a7ded198f25198742a53b97762000b2f84add25fcbc05ff2c5be48193072338e6131e0d905d8429d581802125806512d7705e5f1aa50211fb385
29 +DIST zabbix-3.0.11.tar.gz 15642949 SHA256 e161f4b9ff233740029f9fa39c4cf7f1c7e3d829c465741b200d82d53ffda444 SHA512 880b69677833ed636c866fec731d84540a0269975c767bbcb834ca0bb22b8b881095b80b359e30e965282935650e6533d0e930bb6c21b2f6245d57a0e6e73ec6 WHIRLPOOL c4260523379640780fd3d06a86c6c0f001125b53c0b6e7a61f800ba123800737600c46f54756072fbfa3013844aaed68b999aa0687a1e9942b27ec853da6b44c
30 DIST zabbix-3.0.6.tar.gz 15513412 SHA256 4fe972b061cae8cc91bf2870f2caabc967096f31def5a3f53e8789154b05a97b SHA512 ccffc58f3555bea62011bad272e8a3085d1723d8cb200e00a3e657696104c3fd055b8b963a26d9c726ef45a5381c7f9625498e99b756a3dd97b147d8b7884d1f WHIRLPOOL 137eb724b5205e5d38d00f96c62da5f96ef91c57b01280489bafb67c54d10e7c40304b4674fcefedda9381dfe6d2721b81dbcda1822f56f6d538e067c2588fea
31 DIST zabbix-3.0.8.tar.gz 15514547 SHA256 1df3e106427ed21547b8119049a161092f597d04507f9eb535951a9ee887a476 SHA512 9f5fec7f3888f34ad9659a5d34d5fc089efc86a5fcf78f8cabf6704fbf95fd52a8caaab6f4291cb76d15cc2d69c986c95346fbe4fdfdc407c5506f3b8946aa1a WHIRLPOOL 83a391ee2d60e974fa4e569050b62af69df192d24ad8dd151d39b668a170980f4dc448e3564a823662aecf5a2f03adca9e32c37b4949c95cab71425e786ab0bb
32 DIST zabbix-3.0.9.tar.gz 15516440 SHA256 4445f26c025009681c29c9b350aa6c4ee7b124ddcaf1609ae36c55997bcb8cf2 SHA512 f34d0fde48e64dfb6bea152ab6c63eb28be66e3647cc781d430b56b13bc91ac9f194ac80d264b2e837f8fceb929e0ebeda0221bf8363eb0a66e53461088a4ef9 WHIRLPOOL dae1417efa8df60633a950473af7cf9b533dc63abfdd95b2f2edb30fc07d074fa8ef626927e578911eead45461cdc4918f92be17c21d494d6f198519c117a74d
33 @@ -12,4 +14,6 @@ DIST zabbix-3.2.4.tar.gz 15924840 SHA256 22cf19ef5a9478df2281bf518e8be38adc7dbc5
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 +DIST zabbix-3.2.8.tar.gz 16092939 SHA256 f27608b56f12dd016805a87fe3c8a6d5dbe55fe0626d463b1d6bbb4c6889ec16 SHA512 ba4356218c41c7bdf580906d58589ffd71baa357b26ae12f414bfa47592d61a8dc4de900f4ab24377475d5ece3723526eb170d678ea6083f0dce5ca0c4e594da WHIRLPOOL 2af99622552224da938a459dfb80edd86f508d687b63d92da6f7f85515fd31576247c685d02bc1feeed11e5dafb936af7dd07c9883144ad138ecaa5e7d3512e5
38 DIST zabbix-3.4.1.tar.gz 17010519 SHA256 faaf1a1569ec6b4674d80e707904197c8b568f2b4660f636c28d0c42af471fd4 SHA512 e3ce49cbbb6ada1d12fa80ff366b9e819b8d7b8c60474698457f8250682614af0d2e5de6c2f6a9e34ab10bb8fd01eac51d8365489606b6d0aefc103c5780ebce WHIRLPOOL 52cfae3172e36a61db75f82f37ec97c9c85614c865c30b784b7644c2af99790e295f9700a1dcddfe85d23825f1b4cfccc2a9785051a8cb8d0c4439626ccbfcd9
39 +DIST zabbix-3.4.2.tar.gz 17113290 SHA256 54c21e04da4ef43380af647c6a0ddff67614337386fa318da021117efe5b334f SHA512 42feff59e1e1dd5d69a66cc857e9076b9a6f1410b5796a719cb660ea97ccd2544fe87f3cfabc27590cc53a321d24a7977daa320be1fdff31653b3650602dd385 WHIRLPOOL 752bf703018a67b8299a25b40e1fd204abf9e37675313705646b5eac05dfa84b5301f3ef9588aa21e097b1608ae82db418b084866f70800d78eb2384c1d34fce
40
41 diff --git a/net-analyzer/zabbix/zabbix-2.2.20.ebuild b/net-analyzer/zabbix/zabbix-2.2.20.ebuild
42 new file mode 100644
43 index 00000000000..6a201569afd
44 --- /dev/null
45 +++ b/net-analyzer/zabbix/zabbix-2.2.20.ebuild
46 @@ -0,0 +1,341 @@
47 +# Copyright 1999-2017 Gentoo Foundation
48 +# Distributed under the terms of the GNU General Public License v2
49 +
50 +EAPI="6"
51 +
52 +# needed to make webapp-config dep optional
53 +WEBAPP_OPTIONAL="yes"
54 +inherit flag-o-matic webapp java-pkg-opt-2 user systemd toolchain-funcs
55 +
56 +DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers"
57 +HOMEPAGE="http://www.zabbix.com/"
58 +MY_P=${P/_/}
59 +MY_PV=${PV/_/}
60 +SRC_URI="http://prdownloads.sourceforge.net/zabbix/${MY_P}.tar.gz"
61 +LICENSE="GPL-2"
62 +SLOT="0"
63 +WEBAPP_MANUAL_SLOT="yes"
64 +KEYWORDS="~amd64 ~x86"
65 +IUSE="+agent java curl frontend ipv6 xmpp ldap libxml2 mysql openipmi oracle postgres proxy server ssh snmp sqlite odbc static"
66 +REQUIRED_USE="|| ( agent frontend proxy server )
67 + proxy? ( ^^ ( mysql oracle postgres sqlite odbc ) )
68 + server? ( ^^ ( mysql oracle postgres sqlite odbc ) )
69 + static? ( !oracle !snmp )"
70 +
71 +COMMON_DEPEND="snmp? ( net-analyzer/net-snmp )
72 + ldap? (
73 + net-nds/openldap
74 + =dev-libs/cyrus-sasl-2*
75 + net-libs/gnutls
76 + )
77 + mysql? ( >=virtual/mysql-5.0.3 )
78 + sqlite? ( >=dev-db/sqlite-3.3.5 )
79 + postgres? ( dev-db/postgresql:* )
80 + oracle? ( >=dev-db/oracle-instantclient-basic-10.0.0.0 )
81 + xmpp? ( dev-libs/iksemel )
82 + libxml2? ( dev-libs/libxml2 )
83 + curl? ( net-misc/curl )
84 + openipmi? ( sys-libs/openipmi )
85 + ssh? ( net-libs/libssh2 )
86 + java? ( virtual/jdk:* )
87 + odbc? ( dev-db/unixODBC )"
88 +
89 +RDEPEND="${COMMON_DEPEND}
90 + proxy? ( net-analyzer/fping )
91 + server? ( net-analyzer/fping
92 + app-admin/webapp-config )
93 + java? (
94 + >=virtual/jre-1.4
95 + dev-java/slf4j-api
96 + )
97 + frontend? (
98 + >=dev-lang/php-5.3.0[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode]
99 + || ( dev-lang/php[apache2] dev-lang/php[cgi] dev-lang/php[fpm] )
100 + mysql? ( dev-lang/php[mysqli] )
101 + odbc? ( dev-lang/php[odbc] )
102 + oracle? ( dev-lang/php[oci8-instant-client] )
103 + postgres? ( dev-lang/php[postgres] )
104 + sqlite? ( dev-lang/php[sqlite] )
105 + media-libs/gd[png]
106 + app-admin/webapp-config )"
107 +DEPEND="${COMMON_DEPEND}
108 + static? (
109 + ldap? (
110 + net-nds/openldap[static-libs]
111 + =dev-libs/cyrus-sasl-2*[static-libs]
112 + net-libs/gnutls[static-libs]
113 + )
114 + mysql? ( >=virtual/mysql-5.0.3[static-libs] )
115 + sqlite? ( >=dev-db/sqlite-3.3.5[static-libs] )
116 + postgres? ( dev-db/postgresql:*[static-libs] )
117 + libxml2? ( dev-libs/libxml2[static-libs] )
118 + curl? ( net-misc/curl[static-libs] )
119 + ssh? ( net-libs/libssh2[static-libs] )
120 + odbc? ( dev-db/unixODBC[static-libs] )
121 + )
122 + virtual/pkgconfig"
123 +
124 +S=${WORKDIR}/${MY_P}
125 +
126 +ZABBIXJAVA_BASE="opt/zabbix_java"
127 +
128 +pkg_setup() {
129 + if use oracle; then
130 + if [ -z "${ORACLE_HOME}" ]; then
131 + eerror
132 + eerror "The environment variable ORACLE_HOME must be set"
133 + eerror "and point to the correct location."
134 + eerror "It looks like you don't have Oracle installed."
135 + eerror
136 + die "Environment variable ORACLE_HOME is not set"
137 + fi
138 + if has_version 'dev-db/oracle-instantclient-basic'; then
139 + ewarn
140 + ewarn "Please ensure you have a full install of the Oracle client."
141 + ewarn "dev-db/oracle-instantclient* is NOT sufficient."
142 + ewarn
143 + fi
144 + fi
145 +
146 + if use frontend; then
147 + webapp_pkg_setup
148 + fi
149 +
150 + enewgroup zabbix
151 + enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix
152 +}
153 +
154 +java_prepare() {
155 + cd "${S}/src/zabbix_java/lib"
156 + rm -v *.jar || die
157 +
158 + java-pkg_jar-from slf4j-api
159 +}
160 +
161 +src_prepare() {
162 + default
163 +}
164 +
165 +src_configure() {
166 + econf \
167 + $(use_enable server) \
168 + $(use_enable proxy) \
169 + $(use_enable agent) \
170 + $(use_enable ipv6) \
171 + $(use_enable static) \
172 + $(use_enable java) \
173 + $(use_with ldap) \
174 + $(use_with snmp net-snmp) \
175 + $(use_with mysql) \
176 + $(use_with postgres postgresql) \
177 + $(use_with oracle) \
178 + $(use_with sqlite sqlite3) \
179 + $(use_with xmpp jabber) \
180 + $(use_with curl libcurl) \
181 + $(use_with openipmi openipmi) \
182 + $(use_with ssh ssh2) \
183 + $(use_with libxml2) \
184 + $(use_with odbc unixodbc) \
185 + || die "econf failed"
186 +}
187 +
188 +src_compile() {
189 + if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
190 + emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" || die "emake failed"
191 + fi
192 +}
193 +
194 +src_install() {
195 + dodir \
196 + /etc/zabbix \
197 + /var/lib/zabbix \
198 + /var/lib/zabbix/home \
199 + /var/lib/zabbix/scripts \
200 + /var/lib/zabbix/alertscripts \
201 + /var/lib/zabbix/externalscripts \
202 + /var/log/zabbix
203 +
204 + keepdir \
205 + /etc/zabbix \
206 + /var/lib/zabbix \
207 + /var/lib/zabbix/home \
208 + /var/lib/zabbix/scripts \
209 + /var/lib/zabbix/alertscripts \
210 + /var/lib/zabbix/externalscripts \
211 + /var/log/zabbix
212 +
213 + if use server; then
214 + insinto /etc/zabbix
215 + doins "${FILESDIR}/2.2"/zabbix_server.conf
216 + doinitd "${FILESDIR}/2.2"/init.d/zabbix-server
217 + dosbin src/zabbix_server/zabbix_server
218 + fowners zabbix:zabbix /etc/zabbix/zabbix_server.conf
219 + fperms 0640 /etc/zabbix/zabbix_server.conf
220 + dodir /usr/share/zabbix
221 + /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
222 + systemd_dounit "${FILESDIR}/zabbix-server.service"
223 + systemd_newtmpfilesd "${FILESDIR}/zabbix-server.tmpfiles" zabbix-server.conf
224 + fi
225 +
226 + if use proxy; then
227 + doinitd \
228 + "${FILESDIR}/2.2"/init.d/zabbix-proxy
229 + dosbin \
230 + src/zabbix_proxy/zabbix_proxy
231 + insinto /etc/zabbix
232 + doins \
233 + "${FILESDIR}/2.2"/zabbix_proxy.conf
234 + dodir /usr/share/zabbix
235 + /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
236 + systemd_dounit "${FILESDIR}/zabbix-proxy.service"
237 + systemd_newtmpfilesd "${FILESDIR}/zabbix-proxy.tmpfiles" zabbix-proxy.conf
238 + fi
239 +
240 + if use agent; then
241 + insinto /etc/zabbix
242 + doins \
243 + "${FILESDIR}/2.2"/zabbix_agent.conf \
244 + "${FILESDIR}/2.2"/zabbix_agentd.conf
245 + doinitd "${FILESDIR}/2.2"/init.d/zabbix-agentd
246 + dosbin \
247 + src/zabbix_agent/zabbix_agent \
248 + src/zabbix_agent/zabbix_agentd
249 + dobin \
250 + src/zabbix_sender/zabbix_sender \
251 + src/zabbix_get/zabbix_get
252 + fowners zabbix:zabbix \
253 + /etc/zabbix/zabbix_agent.conf \
254 + /etc/zabbix/zabbix_agentd.conf
255 + fperms 0640 \
256 + /etc/zabbix/zabbix_agent.conf \
257 + /etc/zabbix/zabbix_agentd.conf
258 + systemd_dounit "${FILESDIR}/zabbix-agentd.service"
259 + systemd_newtmpfilesd "${FILESDIR}/zabbix-agentd.tmpfiles" zabbix-agentd.conf
260 + fi
261 +
262 + fowners zabbix:zabbix \
263 + /etc/zabbix \
264 + /var/lib/zabbix \
265 + /var/lib/zabbix/home \
266 + /var/lib/zabbix/scripts \
267 + /var/lib/zabbix/alertscripts \
268 + /var/lib/zabbix/externalscripts \
269 + /var/log/zabbix
270 + fperms 0750 \
271 + /etc/zabbix \
272 + /var/lib/zabbix \
273 + /var/lib/zabbix/home \
274 + /var/lib/zabbix/scripts \
275 + /var/lib/zabbix/alertscripts \
276 + /var/lib/zabbix/externalscripts \
277 + /var/log/zabbix
278 +
279 + dodoc README INSTALL NEWS ChangeLog \
280 + conf/zabbix_agent.conf \
281 + conf/zabbix_agentd.conf \
282 + conf/zabbix_proxy.conf \
283 + conf/zabbix_agentd/userparameter_examples.conf \
284 + conf/zabbix_agentd/userparameter_mysql.conf \
285 + conf/zabbix_server.conf
286 +
287 + if use frontend; then
288 + webapp_src_preinst
289 + cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}"
290 + webapp_configfile \
291 + "${MY_HTDOCSDIR}"/include/db.inc.php \
292 + "${MY_HTDOCSDIR}"/include/config.inc.php
293 + webapp_src_install
294 + fi
295 +
296 + if use java; then
297 + dodir \
298 + /${ZABBIXJAVA_BASE} \
299 + /${ZABBIXJAVA_BASE}/bin \
300 + /${ZABBIXJAVA_BASE}/lib
301 + keepdir /${ZABBIXJAVA_BASE}
302 + exeinto /${ZABBIXJAVA_BASE}/bin
303 + doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar
304 + exeinto /${ZABBIXJAVA_BASE}/lib
305 + doexe \
306 + src/zabbix_java/lib/logback-classic-0.9.27.jar \
307 + src/zabbix_java/lib/logback-console.xml \
308 + src/zabbix_java/lib/logback-core-0.9.27.jar \
309 + src/zabbix_java/lib/logback.xml \
310 + src/zabbix_java/lib/android-json-4.3_r3.1.jar \
311 + src/zabbix_java/lib/slf4j-api-1.6.1.jar
312 + exeinto /${ZABBIXJAVA_BASE}/
313 + doexe \
314 + src/zabbix_java/settings.sh \
315 + src/zabbix_java/startup.sh \
316 + src/zabbix_java/shutdown.sh
317 + fowners -R zabbix:zabbix /${ZABBIXJAVA_BASE}
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-3.0.11.ebuild b/net-analyzer/zabbix/zabbix-3.0.11.ebuild
390 new file mode 100644
391 index 00000000000..13448bdf670
392 --- /dev/null
393 +++ b/net-analyzer/zabbix/zabbix-3.0.11.ebuild
394 @@ -0,0 +1,331 @@
395 +# Copyright 1999-2017 Gentoo Foundation
396 +# Distributed under the terms of the GNU General Public License v2
397 +
398 +EAPI="6"
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="http://www.zabbix.com/"
406 +MY_P=${P/_/}
407 +MY_PV=${PV/_/}
408 +SRC_URI="http://prdownloads.sourceforge.net/zabbix/${MY_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 xmpp 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 sqlite odbc ) )
417 + static? ( !oracle !snmp )"
418 +
419 +COMMON_DEPEND="snmp? ( net-analyzer/net-snmp )
420 + ldap? (
421 + net-nds/openldap
422 + =dev-libs/cyrus-sasl-2*
423 + net-libs/gnutls
424 + )
425 + mysql? ( >=virtual/mysql-5.0.3 )
426 + sqlite? ( >=dev-db/sqlite-3.3.5 )
427 + postgres? ( dev-db/postgresql:* )
428 + oracle? ( >=dev-db/oracle-instantclient-basic-10.0.0.0 )
429 + xmpp? ( dev-libs/iksemel )
430 + libxml2? ( dev-libs/libxml2 )
431 + curl? ( net-misc/curl )
432 + openipmi? ( sys-libs/openipmi )
433 + ssh? ( net-libs/libssh2 )
434 + java? ( virtual/jdk:* )
435 + odbc? ( dev-db/unixODBC )
436 + ssl? ( dev-libs/openssl:=[-bindist] )"
437 +
438 +RDEPEND="${COMMON_DEPEND}
439 + proxy? ( net-analyzer/fping )
440 + server? ( net-analyzer/fping
441 + app-admin/webapp-config )
442 + java? (
443 + >=virtual/jre-1.4
444 + dev-java/slf4j-api
445 + )
446 + frontend? (
447 + >=dev-lang/php-5.3.0[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode]
448 + || ( dev-lang/php[apache2] dev-lang/php[cgi] dev-lang/php[fpm] )
449 + mysql? ( dev-lang/php[mysqli] )
450 + odbc? ( dev-lang/php[odbc] )
451 + oracle? ( dev-lang/php[oci8-instant-client] )
452 + postgres? ( dev-lang/php[postgres] )
453 + sqlite? ( dev-lang/php[sqlite] )
454 + media-libs/gd[png]
455 + app-admin/webapp-config )"
456 +DEPEND="${COMMON_DEPEND}
457 + static? (
458 + ldap? (
459 + net-nds/openldap[static-libs]
460 + =dev-libs/cyrus-sasl-2*[static-libs]
461 + net-libs/gnutls[static-libs]
462 + )
463 + mysql? ( >=virtual/mysql-5.0.3[static-libs] )
464 + sqlite? ( >=dev-db/sqlite-3.3.5[static-libs] )
465 + postgres? ( dev-db/postgresql:*[static-libs] )
466 + libxml2? ( dev-libs/libxml2[static-libs] )
467 + curl? ( net-misc/curl[static-libs] )
468 + ssh? ( net-libs/libssh2[static-libs] )
469 + odbc? ( dev-db/unixODBC[static-libs] )
470 + )
471 + virtual/pkgconfig"
472 +
473 +S=${WORKDIR}/${MY_P}
474 +
475 +ZABBIXJAVA_BASE="opt/zabbix_java"
476 +
477 +pkg_setup() {
478 + if use oracle; then
479 + if [ -z "${ORACLE_HOME}" ]; then
480 + eerror
481 + eerror "The environment variable ORACLE_HOME must be set"
482 + eerror "and point to the correct location."
483 + eerror "It looks like you don't have Oracle installed."
484 + eerror
485 + die "Environment variable ORACLE_HOME is not set"
486 + fi
487 + if has_version 'dev-db/oracle-instantclient-basic'; then
488 + ewarn
489 + ewarn "Please ensure you have a full install of the Oracle client."
490 + ewarn "dev-db/oracle-instantclient* is NOT sufficient."
491 + ewarn
492 + fi
493 + fi
494 +
495 + if use frontend; then
496 + webapp_pkg_setup
497 + fi
498 +
499 + enewgroup zabbix
500 + enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix
501 +}
502 +
503 +java_prepare() {
504 + cd "${S}/src/zabbix_java/lib"
505 + rm -v *.jar || die
506 +
507 + java-pkg_jar-from slf4j-api
508 +}
509 +
510 +src_prepare() {
511 + default
512 +}
513 +
514 +src_configure() {
515 + econf \
516 + $(use_enable server) \
517 + $(use_enable proxy) \
518 + $(use_enable agent) \
519 + $(use_enable ipv6) \
520 + $(use_enable static) \
521 + $(use_enable java) \
522 + $(use_with ldap) \
523 + $(use_with snmp net-snmp) \
524 + $(use_with mysql) \
525 + $(use_with postgres postgresql) \
526 + $(use_with oracle) \
527 + $(use_with sqlite sqlite3) \
528 + $(use_with xmpp jabber) \
529 + $(use_with curl libcurl) \
530 + $(use_with openipmi openipmi) \
531 + $(use_with ssh ssh2) \
532 + $(use_with libxml2) \
533 + $(use_with odbc unixodbc) \
534 + $(use_with ssl openssl) \
535 + || die "econf failed"
536 +}
537 +
538 +src_compile() {
539 + if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
540 + emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" || die "emake failed"
541 + fi
542 +}
543 +
544 +src_install() {
545 + dodir \
546 + /etc/zabbix \
547 + /var/lib/zabbix \
548 + /var/lib/zabbix/home \
549 + /var/lib/zabbix/scripts \
550 + /var/lib/zabbix/alertscripts \
551 + /var/lib/zabbix/externalscripts \
552 + /var/log/zabbix
553 +
554 + keepdir \
555 + /etc/zabbix \
556 + /var/lib/zabbix \
557 + /var/lib/zabbix/home \
558 + /var/lib/zabbix/scripts \
559 + /var/lib/zabbix/alertscripts \
560 + /var/lib/zabbix/externalscripts \
561 + /var/log/zabbix
562 +
563 + if use server; then
564 + insinto /etc/zabbix
565 + doins "${FILESDIR}/3.0"/zabbix_server.conf
566 + doinitd "${FILESDIR}/3.0"/init.d/zabbix-server
567 + dosbin src/zabbix_server/zabbix_server
568 + fowners zabbix:zabbix /etc/zabbix/zabbix_server.conf
569 + fperms 0640 /etc/zabbix/zabbix_server.conf
570 + dodir /usr/share/zabbix
571 + /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
572 + systemd_dounit "${FILESDIR}/zabbix-server.service"
573 + systemd_newtmpfilesd "${FILESDIR}/zabbix-server.tmpfiles" zabbix-server.conf
574 + fi
575 +
576 + if use proxy; then
577 + doinitd "${FILESDIR}/3.0"/init.d/zabbix-proxy
578 + dosbin src/zabbix_proxy/zabbix_proxy
579 + insinto /etc/zabbix
580 + doins "${FILESDIR}/3.0"/zabbix_proxy.conf
581 + dodir /usr/share/zabbix
582 + /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
583 + systemd_dounit "${FILESDIR}/zabbix-proxy.service"
584 + systemd_newtmpfilesd "${FILESDIR}/zabbix-proxy.tmpfiles" zabbix-proxy.conf
585 + fi
586 +
587 + if use agent; then
588 + insinto /etc/zabbix
589 + doins "${FILESDIR}/3.0"/zabbix_agentd.conf
590 + doinitd "${FILESDIR}/3.0"/init.d/zabbix-agentd
591 + dosbin src/zabbix_agent/zabbix_agentd
592 + dobin \
593 + src/zabbix_sender/zabbix_sender \
594 + src/zabbix_get/zabbix_get
595 + fowners zabbix:zabbix /etc/zabbix/zabbix_agentd.conf
596 + fperms 0640 /etc/zabbix/zabbix_agentd.conf
597 + systemd_dounit "${FILESDIR}/zabbix-agentd.service"
598 + systemd_newtmpfilesd "${FILESDIR}/zabbix-agentd.tmpfiles" zabbix-agentd.conf
599 + fi
600 +
601 + fowners zabbix:zabbix \
602 + /etc/zabbix \
603 + /var/lib/zabbix \
604 + /var/lib/zabbix/home \
605 + /var/lib/zabbix/scripts \
606 + /var/lib/zabbix/alertscripts \
607 + /var/lib/zabbix/externalscripts \
608 + /var/log/zabbix
609 + fperms 0750 \
610 + /etc/zabbix \
611 + /var/lib/zabbix \
612 + /var/lib/zabbix/home \
613 + /var/lib/zabbix/scripts \
614 + /var/lib/zabbix/alertscripts \
615 + /var/lib/zabbix/externalscripts \
616 + /var/log/zabbix
617 +
618 + dodoc README INSTALL NEWS ChangeLog \
619 + conf/zabbix_agentd.conf \
620 + conf/zabbix_proxy.conf \
621 + conf/zabbix_agentd/userparameter_examples.conf \
622 + conf/zabbix_agentd/userparameter_mysql.conf \
623 + conf/zabbix_server.conf
624 +
625 + if use frontend; then
626 + webapp_src_preinst
627 + cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}"
628 + webapp_configfile \
629 + "${MY_HTDOCSDIR}"/include/db.inc.php \
630 + "${MY_HTDOCSDIR}"/include/config.inc.php
631 + webapp_src_install
632 + fi
633 +
634 + if use java; then
635 + dodir \
636 + /${ZABBIXJAVA_BASE} \
637 + /${ZABBIXJAVA_BASE}/bin \
638 + /${ZABBIXJAVA_BASE}/lib
639 + keepdir /${ZABBIXJAVA_BASE}
640 + exeinto /${ZABBIXJAVA_BASE}/bin
641 + doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar
642 + exeinto /${ZABBIXJAVA_BASE}/lib
643 + doexe \
644 + src/zabbix_java/lib/logback-classic-0.9.27.jar \
645 + src/zabbix_java/lib/logback-console.xml \
646 + src/zabbix_java/lib/logback-core-0.9.27.jar \
647 + src/zabbix_java/lib/logback.xml \
648 + src/zabbix_java/lib/android-json-4.3_r3.1.jar \
649 + src/zabbix_java/lib/slf4j-api-1.6.1.jar
650 + exeinto /${ZABBIXJAVA_BASE}/
651 + doexe \
652 + src/zabbix_java/settings.sh \
653 + src/zabbix_java/startup.sh \
654 + src/zabbix_java/shutdown.sh
655 + fowners -R zabbix:zabbix /${ZABBIXJAVA_BASE}
656 + fi
657 +}
658 +
659 +pkg_postinst() {
660 + if use server || use proxy ; then
661 + elog
662 + elog "You may need to configure your database for Zabbix,"
663 + elog "if you have not already done so. "
664 + elog
665 +
666 + zabbix_homedir=$(egethome zabbix)
667 + if [ -n "${zabbix_homedir}" ] && \
668 + [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then
669 + ewarn
670 + ewarn "The user 'zabbix' should have his homedir changed"
671 + ewarn "to /var/lib/zabbix/home if you want to use"
672 + ewarn "custom alert scripts."
673 + ewarn
674 + ewarn "A real homedir might be needed for configfiles"
675 + ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when"
676 + ewarn "using sendxmpp for Jabber alerts)."
677 + ewarn
678 + ewarn "To change the homedir use:"
679 + ewarn " usermod -d /var/lib/zabbix/home zabbix"
680 + ewarn
681 + fi
682 + fi
683 +
684 + if use server; then
685 + elog
686 + elog "For distributed monitoring you have to run:"
687 + elog
688 + elog "zabbix_server -n <nodeid>"
689 + elog
690 + elog "This will convert database data for use with Node ID"
691 + elog "and also adds a local node."
692 + elog
693 + fi
694 +
695 + elog "--"
696 + elog
697 + elog "You may need to add these lines to /etc/services:"
698 + elog
699 + elog "zabbix-agent 10050/tcp Zabbix Agent"
700 + elog "zabbix-agent 10050/udp Zabbix Agent"
701 + elog "zabbix-trapper 10051/tcp Zabbix Trapper"
702 + elog "zabbix-trapper 10051/udp Zabbix Trapper"
703 + elog
704 +
705 + if use server || use proxy ; then
706 + # check for fping
707 + fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null)
708 + case "${fping_perms}" in
709 + 4[157][157][157])
710 + ;;
711 + *)
712 + ewarn
713 + ewarn "If you want to use the checks 'icmpping' and 'icmppingsec',"
714 + ewarn "you have to make /usr/sbin/fping setuid root and executable"
715 + ewarn "by everyone. Run the following command to fix it:"
716 + ewarn
717 + ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping"
718 + ewarn
719 + ewarn "Please be aware that this might impose a security risk,"
720 + ewarn "depending on the code quality of fping."
721 + ewarn
722 + ;;
723 + esac
724 + fi
725 +}
726
727 diff --git a/net-analyzer/zabbix/zabbix-3.2.8.ebuild b/net-analyzer/zabbix/zabbix-3.2.8.ebuild
728 new file mode 100644
729 index 00000000000..31176f59177
730 --- /dev/null
731 +++ b/net-analyzer/zabbix/zabbix-3.2.8.ebuild
732 @@ -0,0 +1,328 @@
733 +# Copyright 1999-2017 Gentoo Foundation
734 +# Distributed under the terms of the GNU General Public License v2
735 +
736 +EAPI="6"
737 +
738 +# needed to make webapp-config dep optional
739 +WEBAPP_OPTIONAL="yes"
740 +inherit flag-o-matic webapp java-pkg-opt-2 user systemd toolchain-funcs
741 +
742 +DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers"
743 +HOMEPAGE="http://www.zabbix.com/"
744 +MY_P=${P/_/}
745 +MY_PV=${PV/_/}
746 +SRC_URI="http://prdownloads.sourceforge.net/zabbix/${MY_P}.tar.gz"
747 +LICENSE="GPL-2"
748 +SLOT="0"
749 +WEBAPP_MANUAL_SLOT="yes"
750 +KEYWORDS="~amd64 ~x86"
751 +IUSE="+agent java curl frontend ipv6 xmpp ldap libxml2 mysql openipmi oracle postgres proxy server ssh ssl snmp sqlite odbc static"
752 +REQUIRED_USE="|| ( agent frontend proxy server )
753 + proxy? ( ^^ ( mysql oracle postgres sqlite odbc ) )
754 + server? ( ^^ ( mysql oracle postgres sqlite odbc ) )
755 + static? ( !oracle !snmp )"
756 +
757 +COMMON_DEPEND="snmp? ( net-analyzer/net-snmp )
758 + ldap? (
759 + net-nds/openldap
760 + =dev-libs/cyrus-sasl-2*
761 + net-libs/gnutls
762 + )
763 + mysql? ( >=virtual/mysql-5.0.3 )
764 + sqlite? ( >=dev-db/sqlite-3.3.5 )
765 + postgres? ( dev-db/postgresql:* )
766 + oracle? ( >=dev-db/oracle-instantclient-basic-10.0.0.0 )
767 + xmpp? ( dev-libs/iksemel )
768 + libxml2? ( dev-libs/libxml2 )
769 + curl? ( net-misc/curl )
770 + openipmi? ( sys-libs/openipmi )
771 + ssh? ( net-libs/libssh2 )
772 + java? ( virtual/jdk:* )
773 + odbc? ( dev-db/unixODBC )
774 + ssl? ( dev-libs/openssl:=[-bindist] )"
775 +
776 +RDEPEND="${COMMON_DEPEND}
777 + proxy? ( net-analyzer/fping[suid] )
778 + server? ( net-analyzer/fping[suid]
779 + app-admin/webapp-config )
780 + java? (
781 + >=virtual/jre-1.4
782 + dev-java/slf4j-api
783 + )
784 + frontend? (
785 + >=dev-lang/php-5.3.0[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode]
786 + || ( dev-lang/php[apache2] dev-lang/php[cgi] dev-lang/php[fpm] )
787 + mysql? ( dev-lang/php[mysqli] )
788 + odbc? ( dev-lang/php[odbc] )
789 + oracle? ( dev-lang/php[oci8-instant-client] )
790 + postgres? ( dev-lang/php[postgres] )
791 + sqlite? ( dev-lang/php[sqlite] )
792 + media-libs/gd[png]
793 + app-admin/webapp-config )"
794 +DEPEND="${COMMON_DEPEND}
795 + static? (
796 + ldap? (
797 + net-nds/openldap[static-libs]
798 + =dev-libs/cyrus-sasl-2*[static-libs]
799 + net-libs/gnutls[static-libs]
800 + )
801 + mysql? ( >=virtual/mysql-5.0.3[static-libs] )
802 + sqlite? ( >=dev-db/sqlite-3.3.5[static-libs] )
803 + postgres? ( dev-db/postgresql:*[static-libs] )
804 + libxml2? ( dev-libs/libxml2[static-libs] )
805 + curl? ( net-misc/curl[static-libs] )
806 + ssh? ( net-libs/libssh2[static-libs] )
807 + odbc? ( dev-db/unixODBC[static-libs] )
808 + )
809 + virtual/pkgconfig"
810 +
811 +S=${WORKDIR}/${MY_P}
812 +
813 +ZABBIXJAVA_BASE="opt/zabbix_java"
814 +
815 +pkg_setup() {
816 + if use oracle; then
817 + if [ -z "${ORACLE_HOME}" ]; then
818 + eerror
819 + eerror "The environment variable ORACLE_HOME must be set"
820 + eerror "and point to the correct location."
821 + eerror "It looks like you don't have Oracle installed."
822 + eerror
823 + die "Environment variable ORACLE_HOME is not set"
824 + fi
825 + if has_version 'dev-db/oracle-instantclient-basic'; then
826 + ewarn
827 + ewarn "Please ensure you have a full install of the Oracle client."
828 + ewarn "dev-db/oracle-instantclient* is NOT sufficient."
829 + ewarn
830 + fi
831 + fi
832 +
833 + if use frontend; then
834 + webapp_pkg_setup
835 + fi
836 +
837 + enewgroup zabbix
838 + enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix
839 +}
840 +
841 +java_prepare() {
842 + cd "${S}/src/zabbix_java/lib"
843 + rm -v *.jar || die
844 +
845 + java-pkg_jar-from slf4j-api
846 +}
847 +
848 +src_prepare() {
849 + default
850 +}
851 +
852 +src_configure() {
853 + econf \
854 + $(use_enable server) \
855 + $(use_enable proxy) \
856 + $(use_enable agent) \
857 + $(use_enable ipv6) \
858 + $(use_enable static) \
859 + $(use_enable java) \
860 + $(use_with ldap) \
861 + $(use_with snmp net-snmp) \
862 + $(use_with mysql) \
863 + $(use_with postgres postgresql) \
864 + $(use_with oracle) \
865 + $(use_with sqlite sqlite3) \
866 + $(use_with xmpp jabber) \
867 + $(use_with curl libcurl) \
868 + $(use_with openipmi openipmi) \
869 + $(use_with ssh ssh2) \
870 + $(use_with libxml2) \
871 + $(use_with odbc unixodbc) \
872 + $(use_with ssl openssl) \
873 + || die "econf failed"
874 +}
875 +
876 +src_compile() {
877 + if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
878 + emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" || die "emake failed"
879 + fi
880 +}
881 +
882 +src_install() {
883 + dodir \
884 + /etc/zabbix \
885 + /var/lib/zabbix \
886 + /var/lib/zabbix/home \
887 + /var/lib/zabbix/scripts \
888 + /var/lib/zabbix/alertscripts \
889 + /var/lib/zabbix/externalscripts \
890 + /var/log/zabbix
891 +
892 + keepdir \
893 + /etc/zabbix \
894 + /var/lib/zabbix \
895 + /var/lib/zabbix/home \
896 + /var/lib/zabbix/scripts \
897 + /var/lib/zabbix/alertscripts \
898 + /var/lib/zabbix/externalscripts \
899 + /var/log/zabbix
900 +
901 + if use server; then
902 + insinto /etc/zabbix
903 + doins "${FILESDIR}/3.0"/zabbix_server.conf
904 + doinitd "${FILESDIR}/3.0"/init.d/zabbix-server
905 + dosbin src/zabbix_server/zabbix_server
906 + fowners zabbix:zabbix /etc/zabbix/zabbix_server.conf
907 + fperms 0640 /etc/zabbix/zabbix_server.conf
908 + dodir /usr/share/zabbix
909 + /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
910 + systemd_dounit "${FILESDIR}/zabbix-server.service"
911 + systemd_newtmpfilesd "${FILESDIR}/zabbix-server.tmpfiles" zabbix-server.conf
912 + fi
913 +
914 + if use proxy; then
915 + doinitd "${FILESDIR}/3.0"/init.d/zabbix-proxy
916 + dosbin src/zabbix_proxy/zabbix_proxy
917 + insinto /etc/zabbix
918 + doins "${FILESDIR}/3.0"/zabbix_proxy.conf
919 + dodir /usr/share/zabbix
920 + /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
921 + systemd_dounit "${FILESDIR}/zabbix-proxy.service"
922 + systemd_newtmpfilesd "${FILESDIR}/zabbix-proxy.tmpfiles" zabbix-proxy.conf
923 + fi
924 +
925 + if use agent; then
926 + insinto /etc/zabbix
927 + doins "${FILESDIR}/3.0"/zabbix_agentd.conf
928 + doinitd "${FILESDIR}/3.0"/init.d/zabbix-agentd
929 + dosbin src/zabbix_agent/zabbix_agentd
930 + dobin \
931 + src/zabbix_sender/zabbix_sender \
932 + src/zabbix_get/zabbix_get
933 + fowners zabbix:zabbix /etc/zabbix/zabbix_agentd.conf
934 + fperms 0640 /etc/zabbix/zabbix_agentd.conf
935 + systemd_dounit "${FILESDIR}/zabbix-agentd.service"
936 + systemd_newtmpfilesd "${FILESDIR}/zabbix-agentd.tmpfiles" zabbix-agentd.conf
937 + fi
938 +
939 + fowners zabbix:zabbix \
940 + /etc/zabbix \
941 + /var/lib/zabbix \
942 + /var/lib/zabbix/home \
943 + /var/lib/zabbix/scripts \
944 + /var/lib/zabbix/alertscripts \
945 + /var/lib/zabbix/externalscripts \
946 + /var/log/zabbix
947 + fperms 0750 \
948 + /etc/zabbix \
949 + /var/lib/zabbix \
950 + /var/lib/zabbix/home \
951 + /var/lib/zabbix/scripts \
952 + /var/lib/zabbix/alertscripts \
953 + /var/lib/zabbix/externalscripts \
954 + /var/log/zabbix
955 +
956 + dodoc README INSTALL NEWS ChangeLog \
957 + conf/zabbix_agentd.conf \
958 + conf/zabbix_proxy.conf \
959 + conf/zabbix_agentd/userparameter_examples.conf \
960 + conf/zabbix_agentd/userparameter_mysql.conf \
961 + conf/zabbix_server.conf
962 +
963 + if use frontend; then
964 + webapp_src_preinst
965 + cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}"
966 + webapp_configfile \
967 + "${MY_HTDOCSDIR}"/include/db.inc.php \
968 + "${MY_HTDOCSDIR}"/include/config.inc.php
969 + webapp_src_install
970 + fi
971 +
972 + if use java; then
973 + dodir \
974 + /${ZABBIXJAVA_BASE} \
975 + /${ZABBIXJAVA_BASE}/bin \
976 + /${ZABBIXJAVA_BASE}/lib
977 + keepdir /${ZABBIXJAVA_BASE}
978 + exeinto /${ZABBIXJAVA_BASE}/bin
979 + doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar
980 + exeinto /${ZABBIXJAVA_BASE}/lib
981 + doexe \
982 + src/zabbix_java/lib/logback-classic-0.9.27.jar \
983 + src/zabbix_java/lib/logback-console.xml \
984 + src/zabbix_java/lib/logback-core-0.9.27.jar \
985 + src/zabbix_java/lib/logback.xml \
986 + src/zabbix_java/lib/android-json-4.3_r3.1.jar \
987 + src/zabbix_java/lib/slf4j-api-1.6.1.jar
988 + fowners -R zabbix:zabbix /${ZABBIXJAVA_BASE}
989 + doinitd "${FILESDIR}"/3.0/init.d/zabbix-jmx-proxy
990 + doconfd "${FILESDIR}"/3.0/conf.d/zabbix-jmx-proxy
991 + fi
992 +}
993 +
994 +pkg_postinst() {
995 + if use server || use proxy ; then
996 + elog
997 + elog "You may need to configure your database for Zabbix,"
998 + elog "if you have not already done so. "
999 + elog
1000 +
1001 + zabbix_homedir=$(egethome zabbix)
1002 + if [ -n "${zabbix_homedir}" ] && \
1003 + [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then
1004 + ewarn
1005 + ewarn "The user 'zabbix' should have his homedir changed"
1006 + ewarn "to /var/lib/zabbix/home if you want to use"
1007 + ewarn "custom alert scripts."
1008 + ewarn
1009 + ewarn "A real homedir might be needed for configfiles"
1010 + ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when"
1011 + ewarn "using sendxmpp for Jabber alerts)."
1012 + ewarn
1013 + ewarn "To change the homedir use:"
1014 + ewarn " usermod -d /var/lib/zabbix/home zabbix"
1015 + ewarn
1016 + fi
1017 + fi
1018 +
1019 + if use server; then
1020 + elog
1021 + elog "For distributed monitoring you have to run:"
1022 + elog
1023 + elog "zabbix_server -n <nodeid>"
1024 + elog
1025 + elog "This will convert database data for use with Node ID"
1026 + elog "and also adds a local node."
1027 + elog
1028 + fi
1029 +
1030 + elog "--"
1031 + elog
1032 + elog "You may need to add these lines to /etc/services:"
1033 + elog
1034 + elog "zabbix-agent 10050/tcp Zabbix Agent"
1035 + elog "zabbix-agent 10050/udp Zabbix Agent"
1036 + elog "zabbix-trapper 10051/tcp Zabbix Trapper"
1037 + elog "zabbix-trapper 10051/udp Zabbix Trapper"
1038 + elog
1039 +
1040 + if use server || use proxy ; then
1041 + # check for fping
1042 + fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null)
1043 + case "${fping_perms}" in
1044 + 4[157][157][157])
1045 + ;;
1046 + *)
1047 + ewarn
1048 + ewarn "If you want to use the checks 'icmpping' and 'icmppingsec',"
1049 + ewarn "you have to make /usr/sbin/fping setuid root and executable"
1050 + ewarn "by everyone. Run the following command to fix it:"
1051 + ewarn
1052 + ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping"
1053 + ewarn
1054 + ewarn "Please be aware that this might impose a security risk,"
1055 + ewarn "depending on the code quality of fping."
1056 + ewarn
1057 + ;;
1058 + esac
1059 + fi
1060 +}
1061
1062 diff --git a/net-analyzer/zabbix/zabbix-3.4.2.ebuild b/net-analyzer/zabbix/zabbix-3.4.2.ebuild
1063 new file mode 100644
1064 index 00000000000..ae1d5666084
1065 --- /dev/null
1066 +++ b/net-analyzer/zabbix/zabbix-3.4.2.ebuild
1067 @@ -0,0 +1,329 @@
1068 +# Copyright 1999-2017 Gentoo Foundation
1069 +# Distributed under the terms of the GNU General Public License v2
1070 +
1071 +EAPI="6"
1072 +
1073 +# needed to make webapp-config dep optional
1074 +WEBAPP_OPTIONAL="yes"
1075 +inherit flag-o-matic webapp java-pkg-opt-2 user systemd toolchain-funcs
1076 +
1077 +DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers"
1078 +HOMEPAGE="http://www.zabbix.com/"
1079 +MY_P=${P/_/}
1080 +MY_PV=${PV/_/}
1081 +SRC_URI="http://prdownloads.sourceforge.net/zabbix/${MY_P}.tar.gz"
1082 +LICENSE="GPL-2"
1083 +SLOT="0"
1084 +WEBAPP_MANUAL_SLOT="yes"
1085 +KEYWORDS="~amd64 ~x86"
1086 +IUSE="+agent java curl frontend ipv6 xmpp ldap libxml2 mysql openipmi oracle +postgres proxy server ssh ssl snmp sqlite odbc static"
1087 +REQUIRED_USE="|| ( agent frontend proxy server )
1088 + proxy? ( ^^ ( mysql oracle postgres sqlite odbc ) )
1089 + server? ( ^^ ( mysql oracle postgres odbc ) )
1090 + static? ( !oracle !snmp )"
1091 +
1092 +COMMON_DEPEND="snmp? ( net-analyzer/net-snmp )
1093 + ldap? (
1094 + net-nds/openldap
1095 + =dev-libs/cyrus-sasl-2*
1096 + net-libs/gnutls
1097 + )
1098 + mysql? ( >=virtual/mysql-5.0.3 )
1099 + sqlite? ( >=dev-db/sqlite-3.3.5 )
1100 + postgres? ( dev-db/postgresql:* )
1101 + oracle? ( >=dev-db/oracle-instantclient-basic-10.0.0.0 )
1102 + xmpp? ( dev-libs/iksemel )
1103 + libxml2? ( dev-libs/libxml2 )
1104 + curl? ( net-misc/curl )
1105 + openipmi? ( sys-libs/openipmi )
1106 + ssh? ( net-libs/libssh2 )
1107 + java? ( virtual/jdk:* )
1108 + odbc? ( dev-db/unixODBC )
1109 + ssl? ( dev-libs/openssl:=[-bindist] )"
1110 +
1111 +RDEPEND="${COMMON_DEPEND}
1112 + proxy? ( net-analyzer/fping[suid] )
1113 + server? ( net-analyzer/fping[suid]
1114 + app-admin/webapp-config
1115 + dev-libs/libevent )
1116 + java? (
1117 + >=virtual/jre-1.4
1118 + dev-java/slf4j-api
1119 + )
1120 + frontend? (
1121 + >=dev-lang/php-5.3.0[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode]
1122 + || ( dev-lang/php[apache2] dev-lang/php[cgi] dev-lang/php[fpm] )
1123 + mysql? ( dev-lang/php[mysqli] )
1124 + odbc? ( dev-lang/php[odbc] )
1125 + oracle? ( dev-lang/php[oci8-instant-client] )
1126 + postgres? ( dev-lang/php[postgres] )
1127 + sqlite? ( dev-lang/php[sqlite] )
1128 + media-libs/gd[png]
1129 + app-admin/webapp-config )"
1130 +DEPEND="${COMMON_DEPEND}
1131 + static? (
1132 + ldap? (
1133 + net-nds/openldap[static-libs]
1134 + =dev-libs/cyrus-sasl-2*[static-libs]
1135 + net-libs/gnutls[static-libs]
1136 + )
1137 + mysql? ( >=virtual/mysql-5.0.3[static-libs] )
1138 + sqlite? ( >=dev-db/sqlite-3.3.5[static-libs] )
1139 + postgres? ( dev-db/postgresql:*[static-libs] )
1140 + libxml2? ( dev-libs/libxml2[static-libs] )
1141 + curl? ( net-misc/curl[static-libs] )
1142 + ssh? ( net-libs/libssh2[static-libs] )
1143 + odbc? ( dev-db/unixODBC[static-libs] )
1144 + )
1145 + virtual/pkgconfig"
1146 +
1147 +S=${WORKDIR}/${MY_P}
1148 +
1149 +ZABBIXJAVA_BASE="opt/zabbix_java"
1150 +
1151 +pkg_setup() {
1152 + if use oracle; then
1153 + if [ -z "${ORACLE_HOME}" ]; then
1154 + eerror
1155 + eerror "The environment variable ORACLE_HOME must be set"
1156 + eerror "and point to the correct location."
1157 + eerror "It looks like you don't have Oracle installed."
1158 + eerror
1159 + die "Environment variable ORACLE_HOME is not set"
1160 + fi
1161 + if has_version 'dev-db/oracle-instantclient-basic'; then
1162 + ewarn
1163 + ewarn "Please ensure you have a full install of the Oracle client."
1164 + ewarn "dev-db/oracle-instantclient* is NOT sufficient."
1165 + ewarn
1166 + fi
1167 + fi
1168 +
1169 + if use frontend; then
1170 + webapp_pkg_setup
1171 + fi
1172 +
1173 + enewgroup zabbix
1174 + enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix
1175 +}
1176 +
1177 +java_prepare() {
1178 + cd "${S}/src/zabbix_java/lib"
1179 + rm -v *.jar || die
1180 +
1181 + java-pkg_jar-from slf4j-api
1182 +}
1183 +
1184 +src_prepare() {
1185 + default
1186 +}
1187 +
1188 +src_configure() {
1189 + econf \
1190 + $(use_enable server) \
1191 + $(use_enable proxy) \
1192 + $(use_enable agent) \
1193 + $(use_enable ipv6) \
1194 + $(use_enable static) \
1195 + $(use_enable java) \
1196 + $(use_with ldap) \
1197 + $(use_with snmp net-snmp) \
1198 + $(use_with mysql) \
1199 + $(use_with postgres postgresql) \
1200 + $(use_with oracle) \
1201 + $(use_with sqlite sqlite3) \
1202 + $(use_with xmpp jabber) \
1203 + $(use_with curl libcurl) \
1204 + $(use_with openipmi openipmi) \
1205 + $(use_with ssh ssh2) \
1206 + $(use_with libxml2) \
1207 + $(use_with odbc unixodbc) \
1208 + $(use_with ssl openssl) \
1209 + || die "econf failed"
1210 +}
1211 +
1212 +src_compile() {
1213 + if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
1214 + emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" || die "emake failed"
1215 + fi
1216 +}
1217 +
1218 +src_install() {
1219 + dodir \
1220 + /etc/zabbix \
1221 + /var/lib/zabbix \
1222 + /var/lib/zabbix/home \
1223 + /var/lib/zabbix/scripts \
1224 + /var/lib/zabbix/alertscripts \
1225 + /var/lib/zabbix/externalscripts \
1226 + /var/log/zabbix
1227 +
1228 + keepdir \
1229 + /etc/zabbix \
1230 + /var/lib/zabbix \
1231 + /var/lib/zabbix/home \
1232 + /var/lib/zabbix/scripts \
1233 + /var/lib/zabbix/alertscripts \
1234 + /var/lib/zabbix/externalscripts \
1235 + /var/log/zabbix
1236 +
1237 + if use server; then
1238 + insinto /etc/zabbix
1239 + doins "${FILESDIR}/3.0"/zabbix_server.conf
1240 + doinitd "${FILESDIR}/3.0"/init.d/zabbix-server
1241 + dosbin src/zabbix_server/zabbix_server
1242 + fowners zabbix:zabbix /etc/zabbix/zabbix_server.conf
1243 + fperms 0640 /etc/zabbix/zabbix_server.conf
1244 + dodir /usr/share/zabbix
1245 + /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
1246 + systemd_dounit "${FILESDIR}/zabbix-server.service"
1247 + systemd_newtmpfilesd "${FILESDIR}/zabbix-server.tmpfiles" zabbix-server.conf
1248 + fi
1249 +
1250 + if use proxy; then
1251 + doinitd "${FILESDIR}/3.0"/init.d/zabbix-proxy
1252 + dosbin src/zabbix_proxy/zabbix_proxy
1253 + insinto /etc/zabbix
1254 + doins "${FILESDIR}/3.0"/zabbix_proxy.conf
1255 + dodir /usr/share/zabbix
1256 + /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
1257 + systemd_dounit "${FILESDIR}/zabbix-proxy.service"
1258 + systemd_newtmpfilesd "${FILESDIR}/zabbix-proxy.tmpfiles" zabbix-proxy.conf
1259 + fi
1260 +
1261 + if use agent; then
1262 + insinto /etc/zabbix
1263 + doins "${FILESDIR}/3.0"/zabbix_agentd.conf
1264 + doinitd "${FILESDIR}/3.0"/init.d/zabbix-agentd
1265 + dosbin src/zabbix_agent/zabbix_agentd
1266 + dobin \
1267 + src/zabbix_sender/zabbix_sender \
1268 + src/zabbix_get/zabbix_get
1269 + fowners zabbix:zabbix /etc/zabbix/zabbix_agentd.conf
1270 + fperms 0640 /etc/zabbix/zabbix_agentd.conf
1271 + systemd_dounit "${FILESDIR}/zabbix-agentd.service"
1272 + systemd_newtmpfilesd "${FILESDIR}/zabbix-agentd.tmpfiles" zabbix-agentd.conf
1273 + fi
1274 +
1275 + fowners zabbix:zabbix \
1276 + /etc/zabbix \
1277 + /var/lib/zabbix \
1278 + /var/lib/zabbix/home \
1279 + /var/lib/zabbix/scripts \
1280 + /var/lib/zabbix/alertscripts \
1281 + /var/lib/zabbix/externalscripts \
1282 + /var/log/zabbix
1283 + fperms 0750 \
1284 + /etc/zabbix \
1285 + /var/lib/zabbix \
1286 + /var/lib/zabbix/home \
1287 + /var/lib/zabbix/scripts \
1288 + /var/lib/zabbix/alertscripts \
1289 + /var/lib/zabbix/externalscripts \
1290 + /var/log/zabbix
1291 +
1292 + dodoc README INSTALL NEWS ChangeLog \
1293 + conf/zabbix_agentd.conf \
1294 + conf/zabbix_proxy.conf \
1295 + conf/zabbix_agentd/userparameter_examples.conf \
1296 + conf/zabbix_agentd/userparameter_mysql.conf \
1297 + conf/zabbix_server.conf
1298 +
1299 + if use frontend; then
1300 + webapp_src_preinst
1301 + cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}"
1302 + webapp_configfile \
1303 + "${MY_HTDOCSDIR}"/include/db.inc.php \
1304 + "${MY_HTDOCSDIR}"/include/config.inc.php
1305 + webapp_src_install
1306 + fi
1307 +
1308 + if use java; then
1309 + dodir \
1310 + /${ZABBIXJAVA_BASE} \
1311 + /${ZABBIXJAVA_BASE}/bin \
1312 + /${ZABBIXJAVA_BASE}/lib
1313 + keepdir /${ZABBIXJAVA_BASE}
1314 + exeinto /${ZABBIXJAVA_BASE}/bin
1315 + doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar
1316 + exeinto /${ZABBIXJAVA_BASE}/lib
1317 + doexe \
1318 + src/zabbix_java/lib/logback-classic-0.9.27.jar \
1319 + src/zabbix_java/lib/logback-console.xml \
1320 + src/zabbix_java/lib/logback-core-0.9.27.jar \
1321 + src/zabbix_java/lib/logback.xml \
1322 + src/zabbix_java/lib/android-json-4.3_r3.1.jar \
1323 + src/zabbix_java/lib/slf4j-api-1.6.1.jar
1324 + fowners -R zabbix:zabbix /${ZABBIXJAVA_BASE}
1325 + doinitd "${FILESDIR}"/3.0/init.d/zabbix-jmx-proxy
1326 + doconfd "${FILESDIR}"/3.0/conf.d/zabbix-jmx-proxy
1327 + fi
1328 +}
1329 +
1330 +pkg_postinst() {
1331 + if use server || use proxy ; then
1332 + elog
1333 + elog "You may need to configure your database for Zabbix,"
1334 + elog "if you have not already done so. "
1335 + elog
1336 +
1337 + zabbix_homedir=$(egethome zabbix)
1338 + if [ -n "${zabbix_homedir}" ] && \
1339 + [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then
1340 + ewarn
1341 + ewarn "The user 'zabbix' should have his homedir changed"
1342 + ewarn "to /var/lib/zabbix/home if you want to use"
1343 + ewarn "custom alert scripts."
1344 + ewarn
1345 + ewarn "A real homedir might be needed for configfiles"
1346 + ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when"
1347 + ewarn "using sendxmpp for Jabber alerts)."
1348 + ewarn
1349 + ewarn "To change the homedir use:"
1350 + ewarn " usermod -d /var/lib/zabbix/home zabbix"
1351 + ewarn
1352 + fi
1353 + fi
1354 +
1355 + if use server; then
1356 + elog
1357 + elog "For distributed monitoring you have to run:"
1358 + elog
1359 + elog "zabbix_server -n <nodeid>"
1360 + elog
1361 + elog "This will convert database data for use with Node ID"
1362 + elog "and also adds a local node."
1363 + elog
1364 + fi
1365 +
1366 + elog "--"
1367 + elog
1368 + elog "You may need to add these lines to /etc/services:"
1369 + elog
1370 + elog "zabbix-agent 10050/tcp Zabbix Agent"
1371 + elog "zabbix-agent 10050/udp Zabbix Agent"
1372 + elog "zabbix-trapper 10051/tcp Zabbix Trapper"
1373 + elog "zabbix-trapper 10051/udp Zabbix Trapper"
1374 + elog
1375 +
1376 + if use server || use proxy ; then
1377 + # check for fping
1378 + fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null)
1379 + case "${fping_perms}" in
1380 + 4[157][157][157])
1381 + ;;
1382 + *)
1383 + ewarn
1384 + ewarn "If you want to use the checks 'icmpping' and 'icmppingsec',"
1385 + ewarn "you have to make /usr/sbin/fping setuid root and executable"
1386 + ewarn "by everyone. Run the following command to fix it:"
1387 + ewarn
1388 + ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping"
1389 + ewarn
1390 + ewarn "Please be aware that this might impose a security risk,"
1391 + ewarn "depending on the code quality of fping."
1392 + ewarn
1393 + ;;
1394 + esac
1395 + fi
1396 +}