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