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