1 |
commit: 5b2f88bf50c5b56f774847c544f61e50069fa14c |
2 |
Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Feb 1 10:15:50 2022 +0000 |
4 |
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Feb 1 10:15:50 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b2f88bf |
7 |
|
8 |
net-analyzer/zabbix: bump to 4.0.38 + eapi8 |
9 |
|
10 |
Package-Manager: Portage-3.0.30, 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.38.ebuild | 360 +++++++++++++++++++++++++++++++ |
15 |
2 files changed, 361 insertions(+) |
16 |
|
17 |
diff --git a/net-analyzer/zabbix/Manifest b/net-analyzer/zabbix/Manifest |
18 |
index 83ec1e33871d..a91297697a0c 100644 |
19 |
--- a/net-analyzer/zabbix/Manifest |
20 |
+++ b/net-analyzer/zabbix/Manifest |
21 |
@@ -237,6 +237,7 @@ DIST gopkg.in%2Fyaml.v2%2F@v%2Fv2.2.8.mod 95 BLAKE2B adb3684980f1d8e6c23444e9102 |
22 |
DIST gopkg.in%2Fyaml.v2%2F@v%2Fv2.2.8.zip 80666 BLAKE2B ff3645b71cedd41b9fef6e5d01f3d89a2db6930f406aded7889530b04689ea34b53fa2a7af352c264681ee40b1d192c86ca2f7dcc33dca825d355694527e4dbf SHA512 19f019e85b8c9a533c3cf2fd492b1813272f00cce06a56ffe43046935e49ccf6e191ce83f1d236f6355bae7126aa722016f05174687ff2faf54f121958266edf |
23 |
DIST honnef.co%2Fgo%2Ftools%2F@v%2Fv0.0.1-2019.2.3.mod 300 BLAKE2B 3e3f5a2be0918cbaacd5e43e59fcc6c7c6999645f0c9214cd5a522c31d34b6d3dad61e3ddae8ccdb2f3f0d90b406c047802ee3d9d54dc40fe6eff9cd35620792 SHA512 0c8aa788d0c03d6d049f0dd7468d0f81ce2131ccedd5a5a3a18362b7d30eef7ef325277844eefe4b707b1ad71c6f83a44e110b7af7b98e05406d347237a7bafb |
24 |
DIST zabbix-4.0.37.tar.gz 17552391 BLAKE2B c5f3b200e8dda2b4a961a78a3ba8cd97a6e07744c4e16acde3a740559cb70649660b5652d36cf42e87f28d03e14803c4efe9e585583834f7a765fcbf0e5953b9 SHA512 007e7664a6fe1e9b3e76f95c5cfdb9744a27139d243b6fcb78c2e84f01ccdc788130f824514d29f1557724761557e459924d22cb33bb35fe740b5fdc6746ef0e |
25 |
+DIST zabbix-4.0.38.tar.gz 17558387 BLAKE2B 1ddf27d76734128ddd197eb9dffeb59018282464a7322973dc4102992c0ade003d4d0291194f5b5a487d83a702917d6f0036636e56acc424bd7a7d6beb3f787c SHA512 0d38a74336c9e46b3f9985aca3508312dd5b15affeadee3497ebf8d5e59b4fa7b99ff28819b01878cbc5c9c304c1992a6a91d73f35bf1a333ae2ee561e0d7e1f |
26 |
DIST zabbix-5.0.19.tar.gz 21367685 BLAKE2B 4e6b52d4ace766f700894d1eb6c7adf8e13ac72fe2534a48625302ffa6aea02734f8e81ee781a1d1aa0e6e375428919609edfca6094f17912123a7ed96e22af0 SHA512 b7223c656f8830e302ccc6321ff19e580eed199355ca9070ac2b59375e0794d17de1dfa4e1600ef6ac5a72e8abd2b80191b2f58fa77f25096dee52e6e40940b9 |
27 |
DIST zabbix-5.0.20.tar.gz 21434290 BLAKE2B 8203d9f8831c081af05fa306ce3363ea3d1afd72587459a941e2a20de27e97dce21e34b59e21884f87f6238469c2293dad9e6e5436a9ef82c0139a18a4b0c206 SHA512 af625ee69926b1f0860d4e5e5f4348b3630c642027f5f08f876207cf705d46741c21aacbdde1367b8014c705508236281ba8556700de43c1ccf2b7a9b7f68390 |
28 |
DIST zabbix-5.4.10.tar.gz 24510838 BLAKE2B 37e8561e031b9267dbfeb786da7d88487142262c3f9063e83b2faafeabd88baa1a0f2e7ffa333d2e29c1b11e09ca995f42442aa60b0b994617b276152d46590c SHA512 452513c56db1778d49a32543814ed83836b480047ebc747e588b5cea8f9b199650824b9ea2042695c5551a81f1f3b2e8d98d0f658003f483bf8edf8ed5427c48 |
29 |
|
30 |
diff --git a/net-analyzer/zabbix/zabbix-4.0.38.ebuild b/net-analyzer/zabbix/zabbix-4.0.38.ebuild |
31 |
new file mode 100644 |
32 |
index 000000000000..3e38c3cbb0e9 |
33 |
--- /dev/null |
34 |
+++ b/net-analyzer/zabbix/zabbix-4.0.38.ebuild |
35 |
@@ -0,0 +1,360 @@ |
36 |
+# Copyright 1999-2022 Gentoo Authors |
37 |
+# Distributed under the terms of the GNU General Public License v2 |
38 |
+ |
39 |
+EAPI=8 |
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 ) !sqlite ) |
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[odbc,sdk] ) |
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 |
+ fi |
155 |
+ |
156 |
+ if use frontend; then |
157 |
+ webapp_pkg_setup |
158 |
+ fi |
159 |
+ |
160 |
+ java-pkg-opt-2_pkg_setup |
161 |
+} |
162 |
+ |
163 |
+src_configure() { |
164 |
+ econf \ |
165 |
+ $(use_enable agent) \ |
166 |
+ $(use_enable ipv6) \ |
167 |
+ $(use_enable java) \ |
168 |
+ $(use_enable proxy) \ |
169 |
+ $(use_enable server) \ |
170 |
+ $(use_enable static) \ |
171 |
+ $(use_with curl libcurl) \ |
172 |
+ $(use_with gnutls) \ |
173 |
+ $(use_with ldap) \ |
174 |
+ $(use_with libxml2) \ |
175 |
+ $(use_with mbedtls) \ |
176 |
+ $(use_with mysql) \ |
177 |
+ $(use_with odbc unixodbc) \ |
178 |
+ $(use_with openipmi openipmi) \ |
179 |
+ $(use_with openssl) \ |
180 |
+ $(use_with oracle) \ |
181 |
+ $(use_with postgres postgresql) \ |
182 |
+ $(use_with snmp net-snmp) \ |
183 |
+ $(use_with sqlite sqlite3) \ |
184 |
+ $(use_with ssh ssh2) \ |
185 |
+ $(use_with xmpp jabber) |
186 |
+} |
187 |
+ |
188 |
+src_compile() { |
189 |
+ if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then |
190 |
+ emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" |
191 |
+ fi |
192 |
+} |
193 |
+ |
194 |
+src_install() { |
195 |
+ local dirs=( |
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 |
+ |
205 |
+ for dir in "${dirs[@]}"; do |
206 |
+ dodir "${dir}" |
207 |
+ keepdir "${dir}" |
208 |
+ done |
209 |
+ |
210 |
+ if use server; then |
211 |
+ insinto /etc/zabbix |
212 |
+ doins "${S}"/conf/zabbix_server.conf |
213 |
+ fperms 0640 /etc/zabbix/zabbix_server.conf |
214 |
+ fowners root:zabbix /etc/zabbix/zabbix_server.conf |
215 |
+ |
216 |
+ newinitd "${FILESDIR}"/zabbix-server-r1.init zabbix-server |
217 |
+ |
218 |
+ dosbin src/zabbix_server/zabbix_server |
219 |
+ |
220 |
+ insinto /usr/share/zabbix |
221 |
+ doins -r "${S}"/database/ |
222 |
+ |
223 |
+ systemd_dounit "${FILESDIR}"/zabbix-server.service |
224 |
+ newtmpfiles "${FILESDIR}"/zabbix-server.tmpfiles zabbix-server.conf |
225 |
+ fi |
226 |
+ |
227 |
+ if use proxy; then |
228 |
+ insinto /etc/zabbix |
229 |
+ doins "${S}"/conf/zabbix_proxy.conf |
230 |
+ fperms 0640 /etc/zabbix/zabbix_proxy.conf |
231 |
+ fowners root:zabbix /etc/zabbix/zabbix_proxy.conf |
232 |
+ |
233 |
+ newinitd "${FILESDIR}"/zabbix-proxy.init zabbix-proxy |
234 |
+ |
235 |
+ dosbin src/zabbix_proxy/zabbix_proxy |
236 |
+ |
237 |
+ insinto /usr/share/zabbix |
238 |
+ doins -r "${S}"/database/ |
239 |
+ |
240 |
+ systemd_dounit "${FILESDIR}"/zabbix-proxy.service |
241 |
+ newtmpfiles "${FILESDIR}"/zabbix-proxy.tmpfiles zabbix-proxy.conf |
242 |
+ fi |
243 |
+ |
244 |
+ if use agent; then |
245 |
+ insinto /etc/zabbix |
246 |
+ doins "${S}"/conf/zabbix_agentd.conf |
247 |
+ fperms 0640 /etc/zabbix/zabbix_agentd.conf |
248 |
+ fowners root:zabbix /etc/zabbix/zabbix_agentd.conf |
249 |
+ |
250 |
+ newinitd "${FILESDIR}"/zabbix-agentd.init zabbix-agentd |
251 |
+ |
252 |
+ dosbin src/zabbix_agent/zabbix_agentd |
253 |
+ dobin \ |
254 |
+ src/zabbix_sender/zabbix_sender \ |
255 |
+ src/zabbix_get/zabbix_get |
256 |
+ |
257 |
+ systemd_dounit "${FILESDIR}"/zabbix-agentd.service |
258 |
+ newtmpfiles "${FILESDIR}"/zabbix-agentd.tmpfiles zabbix-agentd.conf |
259 |
+ fi |
260 |
+ |
261 |
+ fowners root:zabbix /etc/zabbix |
262 |
+ fowners zabbix:zabbix \ |
263 |
+ /var/lib/zabbix \ |
264 |
+ /var/lib/zabbix/home \ |
265 |
+ /var/lib/zabbix/scripts \ |
266 |
+ /var/lib/zabbix/alertscripts \ |
267 |
+ /var/lib/zabbix/externalscripts \ |
268 |
+ /var/log/zabbix |
269 |
+ fperms 0750 \ |
270 |
+ /etc/zabbix \ |
271 |
+ /var/lib/zabbix \ |
272 |
+ /var/lib/zabbix/home \ |
273 |
+ /var/lib/zabbix/scripts \ |
274 |
+ /var/lib/zabbix/alertscripts \ |
275 |
+ /var/lib/zabbix/externalscripts \ |
276 |
+ /var/log/zabbix |
277 |
+ |
278 |
+ dodoc README INSTALL NEWS ChangeLog \ |
279 |
+ conf/zabbix_agentd.conf \ |
280 |
+ conf/zabbix_proxy.conf \ |
281 |
+ conf/zabbix_agentd/userparameter_examples.conf \ |
282 |
+ conf/zabbix_agentd/userparameter_mysql.conf \ |
283 |
+ conf/zabbix_server.conf |
284 |
+ |
285 |
+ if use frontend; then |
286 |
+ webapp_src_preinst |
287 |
+ cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}" |
288 |
+ webapp_configfile \ |
289 |
+ "${MY_HTDOCSDIR}"/include/db.inc.php \ |
290 |
+ "${MY_HTDOCSDIR}"/include/config.inc.php |
291 |
+ webapp_src_install |
292 |
+ fi |
293 |
+ |
294 |
+ if use java; then |
295 |
+ dodir \ |
296 |
+ /${ZABBIXJAVA_BASE} \ |
297 |
+ /${ZABBIXJAVA_BASE}/bin \ |
298 |
+ /${ZABBIXJAVA_BASE}/lib |
299 |
+ keepdir /${ZABBIXJAVA_BASE} |
300 |
+ exeinto /${ZABBIXJAVA_BASE}/bin |
301 |
+ doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar |
302 |
+ exeinto /${ZABBIXJAVA_BASE}/lib |
303 |
+ doexe \ |
304 |
+ src/zabbix_java/lib/logback-classic-1.2.9.jar \ |
305 |
+ src/zabbix_java/lib/logback-console.xml \ |
306 |
+ src/zabbix_java/lib/logback-core-1.2.9.jar \ |
307 |
+ src/zabbix_java/lib/logback.xml \ |
308 |
+ src/zabbix_java/lib/android-json-4.3_r3.1.jar \ |
309 |
+ src/zabbix_java/lib/slf4j-api-1.7.32.jar |
310 |
+ newinitd "${FILESDIR}"/zabbix-jmx-proxy.init zabbix-jmx-proxy |
311 |
+ newconfd "${FILESDIR}"/zabbix-jmx-proxy.conf zabbix-jmx-proxy |
312 |
+ fi |
313 |
+} |
314 |
+ |
315 |
+pkg_postinst() { |
316 |
+ if use server || use proxy ; then |
317 |
+ elog |
318 |
+ elog "You may need to configure your database for Zabbix" |
319 |
+ elog "if you have not already done so." |
320 |
+ elog |
321 |
+ |
322 |
+ zabbix_homedir=$(egethome zabbix) |
323 |
+ if [ -n "${zabbix_homedir}" ] && \ |
324 |
+ [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then |
325 |
+ ewarn |
326 |
+ ewarn "The user 'zabbix' should have his homedir changed" |
327 |
+ ewarn "to /var/lib/zabbix/home if you want to use" |
328 |
+ ewarn "custom alert scripts." |
329 |
+ ewarn |
330 |
+ ewarn "A real homedir might be needed for configfiles" |
331 |
+ ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when" |
332 |
+ ewarn "using sendxmpp for Jabber alerts)." |
333 |
+ ewarn |
334 |
+ ewarn "To change the homedir use:" |
335 |
+ ewarn " usermod -d /var/lib/zabbix/home zabbix" |
336 |
+ ewarn |
337 |
+ fi |
338 |
+ fi |
339 |
+ |
340 |
+ if use server; then |
341 |
+ tmpfiles_process zabbix-server.conf |
342 |
+ |
343 |
+ elog |
344 |
+ elog "For distributed monitoring you have to run:" |
345 |
+ elog |
346 |
+ elog "zabbix_server -n <nodeid>" |
347 |
+ elog |
348 |
+ elog "This will convert database data for use with Node ID" |
349 |
+ elog "and also adds a local node." |
350 |
+ elog |
351 |
+ fi |
352 |
+ |
353 |
+ if use proxy; then |
354 |
+ tmpfiles_process zabbix-proxy.conf |
355 |
+ fi |
356 |
+ |
357 |
+ if use agent; then |
358 |
+ tmpfiles_process zabbix-agentd.conf |
359 |
+ fi |
360 |
+ |
361 |
+ elog "--" |
362 |
+ elog |
363 |
+ elog "You may need to add these lines to /etc/services:" |
364 |
+ elog |
365 |
+ elog "zabbix-agent 10050/tcp Zabbix Agent" |
366 |
+ elog "zabbix-agent 10050/udp Zabbix Agent" |
367 |
+ elog "zabbix-trapper 10051/tcp Zabbix Trapper" |
368 |
+ elog "zabbix-trapper 10051/udp Zabbix Trapper" |
369 |
+ elog |
370 |
+ |
371 |
+ if use server || use proxy ; then |
372 |
+ # check for fping |
373 |
+ fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null) |
374 |
+ case "${fping_perms}" in |
375 |
+ 4[157][157][157]) |
376 |
+ ;; |
377 |
+ *) |
378 |
+ ewarn |
379 |
+ ewarn "If you want to use the checks 'icmpping' and 'icmppingsec'," |
380 |
+ ewarn "you have to make /usr/sbin/fping setuid root and executable" |
381 |
+ ewarn "by everyone. Run the following command to fix it:" |
382 |
+ ewarn |
383 |
+ ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping" |
384 |
+ ewarn |
385 |
+ ewarn "Please be aware that this might impose a security risk," |
386 |
+ ewarn "depending on the code quality of fping." |
387 |
+ ewarn |
388 |
+ ;; |
389 |
+ esac |
390 |
+ fi |
391 |
+} |
392 |
+ |
393 |
+pkg_prerm() { |
394 |
+ (use frontend || use server) && webapp_pkg_prerm |
395 |
+} |