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