Gentoo Archives: gentoo-commits

From: "Miroslav Šulc" <fordfrog@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/zabbix/
Date: Tue, 23 Feb 2021 09:49:09
Message-Id: 1614073731.7dbe32bfb0839a662ee18f19d8fa426b86c9e4bd.fordfrog@gentoo
1 commit: 7dbe32bfb0839a662ee18f19d8fa426b86c9e4bd
2 Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 23 09:48:51 2021 +0000
4 Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 23 09:48:51 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7dbe32bf
7
8 net-analyzer/zabbix: bump to 4.0.29
9
10 Package-Manager: Portage-3.0.15, Repoman-3.0.2
11 Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>
12
13 net-analyzer/zabbix/Manifest | 1 +
14 net-analyzer/zabbix/zabbix-4.0.29.ebuild | 353 +++++++++++++++++++++++++++++++
15 2 files changed, 354 insertions(+)
16
17 diff --git a/net-analyzer/zabbix/Manifest b/net-analyzer/zabbix/Manifest
18 index 8b3b08a3c72..7baee21cbd4 100644
19 --- a/net-analyzer/zabbix/Manifest
20 +++ b/net-analyzer/zabbix/Manifest
21 @@ -1,6 +1,7 @@
22 DIST zabbix-3.0.31.tar.gz 14698394 BLAKE2B b8b5f94fe7fe08385b1b358c628b2047b437e6068dab8c3dbdab03e55e95e27f1b77ede4a1a57c4f79bf4a629d9dc5671bd144c002ace7c915f2fed382ac13b2 SHA512 35fec45667cdf217c2be21a164181f92f8f11ef9bcfb0c8dad914726e7c436bae5f8a97aebc3af82499e37125f4d1896ef74ad061a1ee3cbb674562c22a832b1
23 DIST zabbix-4.0.27.tar.gz 17426383 BLAKE2B 33381d3705bc7cb9d451b1a536fbb4f92a9e7e321afbe9363a7879cbea3cc5977a4866a5f4d1fb70120804edaffaf869ba8c4321a67898c42c9abe2341ee118b SHA512 54690dd778d09d7309c2e2ea3f0bfc6053ef097888bfccd140484e4677766ded829757eb4dfde7da8ce19335307ddbfbb1c132feabc13cc6727a6d28c1591cfa
24 DIST zabbix-4.0.28.tar.gz 17424006 BLAKE2B f45af54d1e54ff6945f13cc684fbe0506dab4d554f65018fc30758d7b8be6814ca3661655778abb7c24dcbb241b8e6c21f0ea72a01a886392cadc917e699a957 SHA512 1f40c7316f92474beecc9470d4ad6c093a3a005180514307eb3d7aa206fa36d1a8decc20628b1fc0e62bc7a2ff0e508d694da0fe05911314de6f6d7aa726f425
25 +DIST zabbix-4.0.29.tar.gz 17411987 BLAKE2B 187b6de17403c656c2faa93c8e0952be06ca4fc60e8fe62c48dd9f96371bd26b53f333b93de5805d7333b849f93ff7db6cf1f0cf256cea438afeea5d314e0e83 SHA512 778fe43c2394c572b0f1a6d426897bf24391ebda25cce5bfa0dad63827f5d3457776ecd8186c0b783d400a0d87778d9243fdfedd875136383282e56f542eafca
26 DIST zabbix-5.0.7.tar.gz 19382483 BLAKE2B fa0864ba1ac77659e9a18b0c22cee8be1078fad1e76017d01754b626151366bfeb67aa2a5b29ac1c0ac92ebaff53f7ca273a763158f7a37566dd41efe4dee7ff SHA512 8916ff44a2b3ad16e40d37b43ed540b4eefb91423ecbcc4ab9463477f6a29ed8417c79b0951a36e2798df1166a95ee5ed150bd61448b657df694498c2a274403
27 DIST zabbix-5.0.8.tar.gz 19474050 BLAKE2B 1043efca2f373553728206837949bce5f5ea32328c6289e4028f65e6f1ed76560c1ffbd610eec9855f050d0330bcd3b364a983db896285729f30a693d5ae6c6f SHA512 19601ace704c8a887ffc9b57da8825d8a28a5d064aac3e59480994bee4156db186d37ecf4bee2208bbafc0cb76c0c7f47de964f99953ce78d0187457255d92e9
28 DIST zabbix-5.0.9.tar.gz 19513312 BLAKE2B e60fcf300c3fcd9595e9fa8465403e906672fdc908d9a15646e2ac9e88684999184acb3a0b8226dff1966554769930b0ae6d692ee4569441714912c2eb93540f SHA512 7306afce482b8b8222d46c25d91cdd8df2d5bbbeb755bd54b4bf747dc78031cc24167a954e4de5933f33f59772838ff0b4c66d0bf19c28dc1a27276da9bb0b38
29
30 diff --git a/net-analyzer/zabbix/zabbix-4.0.29.ebuild b/net-analyzer/zabbix/zabbix-4.0.29.ebuild
31 new file mode 100644
32 index 00000000000..6eb470b33c5
33 --- /dev/null
34 +++ b/net-analyzer/zabbix/zabbix-4.0.29.ebuild
35 @@ -0,0 +1,353 @@
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 flag-o-matic webapp java-pkg-opt-2 systemd toolchain-funcs
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 java curl frontend ipv6 xmpp ldap libxml2 mysql openipmi oracle +postgres proxy server ssh ssl snmp sqlite odbc static"
55 +REQUIRED_USE="|| ( agent frontend proxy server )
56 + proxy? ( ^^ ( mysql oracle postgres sqlite odbc ) )
57 + server? ( ^^ ( mysql oracle postgres odbc ) )
58 + static? ( !oracle !snmp )"
59 +
60 +COMMON_DEPEND="
61 + curl? ( net-misc/curl )
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 + mysql? ( dev-db/mysql-connector-c )
70 + odbc? ( dev-db/unixODBC )
71 + openipmi? ( sys-libs/openipmi )
72 + oracle? ( dev-db/oracle-instantclient-basic )
73 + postgres? ( dev-db/postgresql:* )
74 + proxy? ( sys-libs/zlib )
75 + server? (
76 + dev-libs/libevent
77 + sys-libs/zlib
78 + )
79 + snmp? ( net-analyzer/net-snmp )
80 + sqlite? ( dev-db/sqlite )
81 + ssh? ( net-libs/libssh2 )
82 + ssl? ( dev-libs/openssl:=[-bindist] )
83 + xmpp? ( dev-libs/iksemel )
84 +"
85 +
86 +RDEPEND="${COMMON_DEPEND}
87 + acct-group/zabbix
88 + acct-user/zabbix
89 + java? ( >=virtual/jre-1.8:* )
90 + mysql? ( virtual/mysql )
91 + proxy? ( net-analyzer/fping[suid] )
92 + server? (
93 + app-admin/webapp-config
94 + dev-libs/libevent
95 + dev-libs/libpcre
96 + net-analyzer/fping[suid]
97 + )
98 + frontend? (
99 + app-admin/webapp-config
100 + dev-lang/php:*[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode]
101 + media-libs/gd[png]
102 + virtual/httpd-php:*
103 + mysql? ( dev-lang/php[mysqli] )
104 + odbc? ( dev-lang/php[odbc] )
105 + oracle? ( dev-lang/php[oci8-instant-client] )
106 + postgres? ( dev-lang/php[postgres] )
107 + sqlite? ( dev-lang/php[sqlite] )
108 + )
109 +"
110 +DEPEND="${COMMON_DEPEND}
111 + static? (
112 + curl? ( net-misc/curl[static-libs] )
113 + ldap? (
114 + =dev-libs/cyrus-sasl-2*[static-libs]
115 + net-libs/gnutls[static-libs]
116 + net-nds/openldap[static-libs]
117 + )
118 + libxml2? ( dev-libs/libxml2[static-libs] )
119 + mysql? ( dev-db/mysql-connector-c[static-libs] )
120 + odbc? ( dev-db/unixODBC[static-libs] )
121 + postgres? ( dev-db/postgresql:*[static-libs] )
122 + sqlite? ( dev-db/sqlite[static-libs] )
123 + ssh? ( net-libs/libssh2 )
124 + )
125 +"
126 +BDEPEND="
127 + virtual/pkgconfig
128 +"
129 +
130 +PATCHES=(
131 + "${FILESDIR}/${PN}-4.0.18-modulepathfix.patch"
132 + "${FILESDIR}/${PN}-3.0.30-security-disable-PidFile.patch"
133 +)
134 +
135 +S=${WORKDIR}/${MY_P}
136 +
137 +ZABBIXJAVA_BASE="opt/zabbix_java"
138 +
139 +pkg_setup() {
140 + if use oracle; then
141 + if [ -z "${ORACLE_HOME}" ]; then
142 + eerror
143 + eerror "The environment variable ORACLE_HOME must be set"
144 + eerror "and point to the correct location."
145 + eerror "It looks like you don't have Oracle installed."
146 + eerror
147 + die "Environment variable ORACLE_HOME is not set"
148 + fi
149 + if has_version 'dev-db/oracle-instantclient-basic'; then
150 + ewarn
151 + ewarn "Please ensure you have a full install of the Oracle client."
152 + ewarn "dev-db/oracle-instantclient* is NOT sufficient."
153 + ewarn
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 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 +pkg_prerm() {
387 + (use frontend || use server) && webapp_pkg_prerm
388 +}