1 |
commit: a475c807b941b7f1787fae0be319f68796b29697 |
2 |
Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Aug 31 12:34:45 2021 +0000 |
4 |
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Aug 31 12:34:45 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a475c807 |
7 |
|
8 |
net-analyzer/zabbix: bump to 4.0.33 |
9 |
|
10 |
Package-Manager: Portage-3.0.22, Repoman-3.0.3 |
11 |
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org> |
12 |
|
13 |
net-analyzer/zabbix/Manifest | 1 + |
14 |
net-analyzer/zabbix/zabbix-4.0.33.ebuild | 370 +++++++++++++++++++++++++++++++ |
15 |
2 files changed, 371 insertions(+) |
16 |
|
17 |
diff --git a/net-analyzer/zabbix/Manifest b/net-analyzer/zabbix/Manifest |
18 |
index 039ca188c52..94498043108 100644 |
19 |
--- a/net-analyzer/zabbix/Manifest |
20 |
+++ b/net-analyzer/zabbix/Manifest |
21 |
@@ -253,6 +253,7 @@ DIST gopkg.in%2Fyaml.v2%2F@v%2Fv2.2.8.zip 80666 BLAKE2B ff3645b71cedd41b9fef6e5d |
22 |
DIST honnef.co%2Fgo%2Ftools%2F@v%2Fv0.0.1-2019.2.3.mod 300 BLAKE2B 3e3f5a2be0918cbaacd5e43e59fcc6c7c6999645f0c9214cd5a522c31d34b6d3dad61e3ddae8ccdb2f3f0d90b406c047802ee3d9d54dc40fe6eff9cd35620792 SHA512 0c8aa788d0c03d6d049f0dd7468d0f81ce2131ccedd5a5a3a18362b7d30eef7ef325277844eefe4b707b1ad71c6f83a44e110b7af7b98e05406d347237a7bafb |
23 |
DIST zabbix-4.0.31.tar.gz 17600018 BLAKE2B 6b3dd8bdc465fc610756b93cd033e0ade607af718a2914928d5a10cef648ac3c8276c75403fa889b00b4ec1485069240462f8f2c2aaff9767a2914e4b32c6817 SHA512 b4dc02b76f438ca922caee8a04c119c0958d7431622b36a2c26da2ed1a2fdc87e5e7abfcded033a852f6ee018e999f8fceea1a89a67b97d4c160e01a536d2663 |
24 |
DIST zabbix-4.0.32.tar.gz 17606713 BLAKE2B 48d0f8fdc3f538701383f0c246152df8d000aeb194669edf855dd96f0ee4b0a27d14a373d555cdda4f3ca9057f4abbb51d5184167bc4858ce798bf17284e0c74 SHA512 af3c3306c2ed1d47d980f0581324274b4bee6fe6bac657e7cba90d6079ad1a83d57d5279aeed54e63f28764d02476be881972667e84e1c8a85d90c659384766a |
25 |
+DIST zabbix-4.0.33.tar.gz 17614916 BLAKE2B e9edb516a4780daa2d4ced5a0753d597fabbb009d8109fb93dcdf8c738011459ee2bab65784998289bc13d21a40ec4c325eb72337a38f3940473ec347f9020ed SHA512 9ef74f50eefe6c9d8fb0d8cb8df9040331489520e2bb2df2cf83d7e698e6b99c2af1d31fdb385594a8696e3b186321cc8b9fddd654182a8a6e34eb5bf0f29fdd |
26 |
DIST zabbix-5.0.12.tar.gz 20404121 BLAKE2B b458f8dfae5f1c2cc0b8d4d06a41633f00ab0749288e36e50fc13377a544ee01634f2b603cda901fe35600eb883caf084e1d0f72931561996336022e0c8d33ff SHA512 e26012c177d72bc75e63653b6ce4e1c21cf83e123edc0931635887002dbe713637177d95d15e493923416d1f277dd373bf9f568ea31ac9b1b93dc6bbb59ed15c |
27 |
DIST zabbix-5.0.13.tar.gz 21076927 BLAKE2B 4c5a503fba87fbb0882a60378721e9156a9ffc374b5a127fbaa08aeb23d40aefbf4324b6a00d9c53d65714eb88e04730dc9f43bbc6baedd8b844b29359aca76a SHA512 846607e9c409cb996eb6aed0beaa29fa37450ca61a2e533e477b3bb16fd3c3fd90a59cff1e7234e0dc47276cce052e022f1663c1928e0e4295bff44002720e47 |
28 |
DIST zabbix-5.0.14.tar.gz 21159722 BLAKE2B 627e64138335b2a3b679a69f21d778df1eb5bbf5455d8d2b0244f6194d3c79d2afe2227cc5093f34b783f63a7bc5c8e204ba39f4474493b67c3e91f7aafbc97b SHA512 9b373592918755174c33e0e348d5fcc21076903abe9149dec48a1b8779435e7afd7bc3db77deed98765ee4205253ee1314301d49db80cd103c730435f5299989 |
29 |
|
30 |
diff --git a/net-analyzer/zabbix/zabbix-4.0.33.ebuild b/net-analyzer/zabbix/zabbix-4.0.33.ebuild |
31 |
new file mode 100644 |
32 |
index 00000000000..b4467228139 |
33 |
--- /dev/null |
34 |
+++ b/net-analyzer/zabbix/zabbix-4.0.33.ebuild |
35 |
@@ -0,0 +1,370 @@ |
36 |
+# Copyright 1999-2021 Gentoo Authors |
37 |
+# Distributed under the terms of the GNU General Public License v2 |
38 |
+ |
39 |
+EAPI=7 |
40 |
+ |
41 |
+# needed to make webapp-config dep optional |
42 |
+WEBAPP_OPTIONAL="yes" |
43 |
+inherit webapp java-pkg-opt-2 systemd toolchain-funcs tmpfiles user-info |
44 |
+ |
45 |
+DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers" |
46 |
+HOMEPAGE="https://www.zabbix.com/" |
47 |
+MY_P=${P/_/} |
48 |
+MY_PV=${PV/_/} |
49 |
+SRC_URI="https://cdn.zabbix.com/${PN}/sources/stable/4.0/${P}.tar.gz" |
50 |
+LICENSE="GPL-2" |
51 |
+SLOT="0/$(ver_cut 1-2)" |
52 |
+WEBAPP_MANUAL_SLOT="yes" |
53 |
+KEYWORDS="~amd64 ~x86" |
54 |
+IUSE="+agent curl frontend gnutls ipv6 java ldap libxml2 mbedtls mysql odbc openipmi +openssl oracle +postgres proxy server snmp sqlite ssh ssl static xmpp" |
55 |
+REQUIRED_USE="|| ( agent frontend proxy server ) |
56 |
+ ssl? ( ^^ ( gnutls mbedtls openssl ) ) |
57 |
+ proxy? ( ^^ ( mysql oracle postgres sqlite ) ) |
58 |
+ server? ( ^^ ( mysql oracle postgres ) ) |
59 |
+ static? ( !oracle !snmp )" |
60 |
+ |
61 |
+COMMON_DEPEND=" |
62 |
+ curl? ( net-misc/curl ) |
63 |
+ java? ( >=virtual/jdk-1.8:* ) |
64 |
+ ldap? ( |
65 |
+ =dev-libs/cyrus-sasl-2* |
66 |
+ net-libs/gnutls |
67 |
+ net-nds/openldap |
68 |
+ ) |
69 |
+ libxml2? ( dev-libs/libxml2 ) |
70 |
+ mysql? ( dev-db/mysql-connector-c ) |
71 |
+ odbc? ( dev-db/unixODBC ) |
72 |
+ openipmi? ( sys-libs/openipmi ) |
73 |
+ oracle? ( dev-db/oracle-instantclient-basic ) |
74 |
+ postgres? ( dev-db/postgresql:* ) |
75 |
+ proxy? ( sys-libs/zlib ) |
76 |
+ server? ( |
77 |
+ dev-libs/libevent |
78 |
+ sys-libs/zlib |
79 |
+ ) |
80 |
+ snmp? ( net-analyzer/net-snmp ) |
81 |
+ sqlite? ( dev-db/sqlite ) |
82 |
+ ssh? ( net-libs/libssh2 ) |
83 |
+ ssl? ( |
84 |
+ gnutls? ( net-libs/gnutls:0= ) |
85 |
+ mbedtls? ( net-libs/mbedtls:0= ) |
86 |
+ openssl? ( dev-libs/openssl:=[-bindist(-)] ) |
87 |
+ ) |
88 |
+ xmpp? ( dev-libs/iksemel ) |
89 |
+" |
90 |
+ |
91 |
+RDEPEND="${COMMON_DEPEND} |
92 |
+ acct-group/zabbix |
93 |
+ acct-user/zabbix |
94 |
+ java? ( >=virtual/jre-1.8:* ) |
95 |
+ mysql? ( virtual/mysql ) |
96 |
+ proxy? ( net-analyzer/fping[suid] ) |
97 |
+ server? ( |
98 |
+ app-admin/webapp-config |
99 |
+ dev-libs/libevent |
100 |
+ dev-libs/libpcre |
101 |
+ net-analyzer/fping[suid] |
102 |
+ ) |
103 |
+ frontend? ( |
104 |
+ app-admin/webapp-config |
105 |
+ dev-lang/php:*[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode] |
106 |
+ media-libs/gd[png] |
107 |
+ virtual/httpd-php:* |
108 |
+ mysql? ( dev-lang/php[mysqli] ) |
109 |
+ odbc? ( dev-lang/php[odbc] ) |
110 |
+ oracle? ( dev-lang/php[oci8-instant-client] ) |
111 |
+ postgres? ( dev-lang/php[postgres] ) |
112 |
+ sqlite? ( dev-lang/php[sqlite] ) |
113 |
+ ) |
114 |
+" |
115 |
+DEPEND="${COMMON_DEPEND} |
116 |
+ static? ( |
117 |
+ curl? ( net-misc/curl[static-libs] ) |
118 |
+ ldap? ( |
119 |
+ =dev-libs/cyrus-sasl-2*[static-libs] |
120 |
+ net-libs/gnutls[static-libs] |
121 |
+ net-nds/openldap[static-libs] |
122 |
+ ) |
123 |
+ libxml2? ( dev-libs/libxml2[static-libs] ) |
124 |
+ mysql? ( dev-db/mysql-connector-c[static-libs] ) |
125 |
+ odbc? ( dev-db/unixODBC[static-libs] ) |
126 |
+ postgres? ( dev-db/postgresql:*[static-libs] ) |
127 |
+ sqlite? ( dev-db/sqlite[static-libs] ) |
128 |
+ ssh? ( net-libs/libssh2 ) |
129 |
+ ) |
130 |
+" |
131 |
+BDEPEND=" |
132 |
+ virtual/pkgconfig |
133 |
+" |
134 |
+ |
135 |
+PATCHES=( |
136 |
+ "${FILESDIR}/${PN}-4.0.18-modulepathfix.patch" |
137 |
+ "${FILESDIR}/${PN}-3.0.30-security-disable-PidFile.patch" |
138 |
+) |
139 |
+ |
140 |
+S=${WORKDIR}/${MY_P} |
141 |
+ |
142 |
+ZABBIXJAVA_BASE="opt/zabbix_java" |
143 |
+ |
144 |
+pkg_setup() { |
145 |
+ if use oracle; then |
146 |
+ if [ -z "${ORACLE_HOME}" ]; then |
147 |
+ eerror |
148 |
+ eerror "The environment variable ORACLE_HOME must be set" |
149 |
+ eerror "and point to the correct location." |
150 |
+ eerror "It looks like you don't have Oracle installed." |
151 |
+ eerror |
152 |
+ die "Environment variable ORACLE_HOME is not set" |
153 |
+ fi |
154 |
+ if has_version 'dev-db/oracle-instantclient-basic'; then |
155 |
+ ewarn |
156 |
+ ewarn "Please ensure you have a full install of the Oracle client." |
157 |
+ ewarn "dev-db/oracle-instantclient* is NOT sufficient." |
158 |
+ ewarn |
159 |
+ fi |
160 |
+ fi |
161 |
+ |
162 |
+ if use frontend; then |
163 |
+ webapp_pkg_setup |
164 |
+ fi |
165 |
+ |
166 |
+ java-pkg-opt-2_pkg_setup |
167 |
+} |
168 |
+ |
169 |
+src_prepare() { |
170 |
+ default |
171 |
+} |
172 |
+ |
173 |
+src_configure() { |
174 |
+ econf \ |
175 |
+ $(use_enable agent) \ |
176 |
+ $(use_enable ipv6) \ |
177 |
+ $(use_enable java) \ |
178 |
+ $(use_enable proxy) \ |
179 |
+ $(use_enable server) \ |
180 |
+ $(use_enable static) \ |
181 |
+ $(use_with curl libcurl) \ |
182 |
+ $(use_with gnutls) \ |
183 |
+ $(use_with ldap) \ |
184 |
+ $(use_with libxml2) \ |
185 |
+ $(use_with mbedtls) \ |
186 |
+ $(use_with mysql) \ |
187 |
+ $(use_with odbc unixodbc) \ |
188 |
+ $(use_with openipmi openipmi) \ |
189 |
+ $(use_with openssl) \ |
190 |
+ $(use_with oracle) \ |
191 |
+ $(use_with postgres postgresql) \ |
192 |
+ $(use_with snmp net-snmp) \ |
193 |
+ $(use_with sqlite sqlite3) \ |
194 |
+ $(use_with ssh ssh2) \ |
195 |
+ $(use_with xmpp jabber) |
196 |
+} |
197 |
+ |
198 |
+src_compile() { |
199 |
+ if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then |
200 |
+ emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" |
201 |
+ fi |
202 |
+} |
203 |
+ |
204 |
+src_install() { |
205 |
+ local dirs=( |
206 |
+ /etc/zabbix |
207 |
+ /var/lib/zabbix |
208 |
+ /var/lib/zabbix/home |
209 |
+ /var/lib/zabbix/scripts |
210 |
+ /var/lib/zabbix/alertscripts |
211 |
+ /var/lib/zabbix/externalscripts |
212 |
+ /var/log/zabbix |
213 |
+ ) |
214 |
+ |
215 |
+ for dir in "${dirs[@]}"; do |
216 |
+ dodir "${dir}" |
217 |
+ keepdir "${dir}" |
218 |
+ done |
219 |
+ |
220 |
+ if use server; then |
221 |
+ insinto /etc/zabbix |
222 |
+ doins "${S}"/conf/zabbix_server.conf |
223 |
+ fperms 0640 /etc/zabbix/zabbix_server.conf |
224 |
+ fowners root:zabbix /etc/zabbix/zabbix_server.conf |
225 |
+ |
226 |
+ newinitd "${FILESDIR}"/zabbix-server.init zabbix-server |
227 |
+ |
228 |
+ dosbin src/zabbix_server/zabbix_server |
229 |
+ |
230 |
+ insinto /usr/share/zabbix |
231 |
+ doins -r "${S}"/database/ |
232 |
+ |
233 |
+ systemd_dounit "${FILESDIR}"/zabbix-server.service |
234 |
+ newtmpfiles "${FILESDIR}"/zabbix-server.tmpfiles zabbix-server.conf |
235 |
+ fi |
236 |
+ |
237 |
+ if use proxy; then |
238 |
+ insinto /etc/zabbix |
239 |
+ doins "${S}"/conf/zabbix_proxy.conf |
240 |
+ fperms 0640 /etc/zabbix/zabbix_proxy.conf |
241 |
+ fowners root:zabbix /etc/zabbix/zabbix_proxy.conf |
242 |
+ |
243 |
+ newinitd "${FILESDIR}"/zabbix-proxy.init zabbix-proxy |
244 |
+ |
245 |
+ dosbin src/zabbix_proxy/zabbix_proxy |
246 |
+ |
247 |
+ insinto /usr/share/zabbix |
248 |
+ doins -r "${S}"/database/ |
249 |
+ |
250 |
+ systemd_dounit "${FILESDIR}"/zabbix-proxy.service |
251 |
+ newtmpfiles "${FILESDIR}"/zabbix-proxy.tmpfiles zabbix-proxy.conf |
252 |
+ fi |
253 |
+ |
254 |
+ if use agent; then |
255 |
+ insinto /etc/zabbix |
256 |
+ doins "${S}"/conf/zabbix_agentd.conf |
257 |
+ fperms 0640 /etc/zabbix/zabbix_agentd.conf |
258 |
+ fowners root:zabbix /etc/zabbix/zabbix_agentd.conf |
259 |
+ |
260 |
+ newinitd "${FILESDIR}"/zabbix-agentd.init zabbix-agentd |
261 |
+ |
262 |
+ dosbin src/zabbix_agent/zabbix_agentd |
263 |
+ dobin \ |
264 |
+ src/zabbix_sender/zabbix_sender \ |
265 |
+ src/zabbix_get/zabbix_get |
266 |
+ |
267 |
+ systemd_dounit "${FILESDIR}"/zabbix-agentd.service |
268 |
+ newtmpfiles "${FILESDIR}"/zabbix-agentd.tmpfiles zabbix-agentd.conf |
269 |
+ fi |
270 |
+ |
271 |
+ fowners root:zabbix /etc/zabbix |
272 |
+ fowners zabbix:zabbix \ |
273 |
+ /var/lib/zabbix \ |
274 |
+ /var/lib/zabbix/home \ |
275 |
+ /var/lib/zabbix/scripts \ |
276 |
+ /var/lib/zabbix/alertscripts \ |
277 |
+ /var/lib/zabbix/externalscripts \ |
278 |
+ /var/log/zabbix |
279 |
+ fperms 0750 \ |
280 |
+ /etc/zabbix \ |
281 |
+ /var/lib/zabbix \ |
282 |
+ /var/lib/zabbix/home \ |
283 |
+ /var/lib/zabbix/scripts \ |
284 |
+ /var/lib/zabbix/alertscripts \ |
285 |
+ /var/lib/zabbix/externalscripts \ |
286 |
+ /var/log/zabbix |
287 |
+ |
288 |
+ dodoc README INSTALL NEWS ChangeLog \ |
289 |
+ conf/zabbix_agentd.conf \ |
290 |
+ conf/zabbix_proxy.conf \ |
291 |
+ conf/zabbix_agentd/userparameter_examples.conf \ |
292 |
+ conf/zabbix_agentd/userparameter_mysql.conf \ |
293 |
+ conf/zabbix_server.conf |
294 |
+ |
295 |
+ if use frontend; then |
296 |
+ webapp_src_preinst |
297 |
+ cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}" |
298 |
+ webapp_configfile \ |
299 |
+ "${MY_HTDOCSDIR}"/include/db.inc.php \ |
300 |
+ "${MY_HTDOCSDIR}"/include/config.inc.php |
301 |
+ webapp_src_install |
302 |
+ fi |
303 |
+ |
304 |
+ if use java; then |
305 |
+ dodir \ |
306 |
+ /${ZABBIXJAVA_BASE} \ |
307 |
+ /${ZABBIXJAVA_BASE}/bin \ |
308 |
+ /${ZABBIXJAVA_BASE}/lib |
309 |
+ keepdir /${ZABBIXJAVA_BASE} |
310 |
+ exeinto /${ZABBIXJAVA_BASE}/bin |
311 |
+ doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar |
312 |
+ exeinto /${ZABBIXJAVA_BASE}/lib |
313 |
+ doexe \ |
314 |
+ src/zabbix_java/lib/logback-classic-1.2.3.jar \ |
315 |
+ src/zabbix_java/lib/logback-console.xml \ |
316 |
+ src/zabbix_java/lib/logback-core-1.2.3.jar \ |
317 |
+ src/zabbix_java/lib/logback.xml \ |
318 |
+ src/zabbix_java/lib/android-json-4.3_r3.1.jar \ |
319 |
+ src/zabbix_java/lib/slf4j-api-1.7.30.jar |
320 |
+ newinitd "${FILESDIR}"/zabbix-jmx-proxy.init zabbix-jmx-proxy |
321 |
+ newconfd "${FILESDIR}"/zabbix-jmx-proxy.conf zabbix-jmx-proxy |
322 |
+ fi |
323 |
+} |
324 |
+ |
325 |
+pkg_postinst() { |
326 |
+ if use server || use proxy ; then |
327 |
+ elog |
328 |
+ elog "You may need to configure your database for Zabbix" |
329 |
+ elog "if you have not already done so." |
330 |
+ elog |
331 |
+ |
332 |
+ zabbix_homedir=$(egethome zabbix) |
333 |
+ if [ -n "${zabbix_homedir}" ] && \ |
334 |
+ [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then |
335 |
+ ewarn |
336 |
+ ewarn "The user 'zabbix' should have his homedir changed" |
337 |
+ ewarn "to /var/lib/zabbix/home if you want to use" |
338 |
+ ewarn "custom alert scripts." |
339 |
+ ewarn |
340 |
+ ewarn "A real homedir might be needed for configfiles" |
341 |
+ ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when" |
342 |
+ ewarn "using sendxmpp for Jabber alerts)." |
343 |
+ ewarn |
344 |
+ ewarn "To change the homedir use:" |
345 |
+ ewarn " usermod -d /var/lib/zabbix/home zabbix" |
346 |
+ ewarn |
347 |
+ fi |
348 |
+ fi |
349 |
+ |
350 |
+ if use server; then |
351 |
+ tmpfiles_process zabbix-server.conf |
352 |
+ |
353 |
+ elog |
354 |
+ elog "For distributed monitoring you have to run:" |
355 |
+ elog |
356 |
+ elog "zabbix_server -n <nodeid>" |
357 |
+ elog |
358 |
+ elog "This will convert database data for use with Node ID" |
359 |
+ elog "and also adds a local node." |
360 |
+ elog |
361 |
+ fi |
362 |
+ |
363 |
+ if use proxy; then |
364 |
+ tmpfiles_process zabbix-proxy.conf |
365 |
+ fi |
366 |
+ |
367 |
+ if use agent; then |
368 |
+ tmpfiles_process zabbix-agentd.conf |
369 |
+ fi |
370 |
+ |
371 |
+ elog "--" |
372 |
+ elog |
373 |
+ elog "You may need to add these lines to /etc/services:" |
374 |
+ elog |
375 |
+ elog "zabbix-agent 10050/tcp Zabbix Agent" |
376 |
+ elog "zabbix-agent 10050/udp Zabbix Agent" |
377 |
+ elog "zabbix-trapper 10051/tcp Zabbix Trapper" |
378 |
+ elog "zabbix-trapper 10051/udp Zabbix Trapper" |
379 |
+ elog |
380 |
+ |
381 |
+ if use server || use proxy ; then |
382 |
+ # check for fping |
383 |
+ fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null) |
384 |
+ case "${fping_perms}" in |
385 |
+ 4[157][157][157]) |
386 |
+ ;; |
387 |
+ *) |
388 |
+ ewarn |
389 |
+ ewarn "If you want to use the checks 'icmpping' and 'icmppingsec'," |
390 |
+ ewarn "you have to make /usr/sbin/fping setuid root and executable" |
391 |
+ ewarn "by everyone. Run the following command to fix it:" |
392 |
+ ewarn |
393 |
+ ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping" |
394 |
+ ewarn |
395 |
+ ewarn "Please be aware that this might impose a security risk," |
396 |
+ ewarn "depending on the code quality of fping." |
397 |
+ ewarn |
398 |
+ ;; |
399 |
+ esac |
400 |
+ fi |
401 |
+} |
402 |
+ |
403 |
+pkg_prerm() { |
404 |
+ (use frontend || use server) && webapp_pkg_prerm |
405 |
+} |