1 |
commit: 857707b2c81bd2e1268810c1318548ab51888b96 |
2 |
Author: Patrick Lauer <patrick <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Dec 28 18:12:56 2016 +0000 |
4 |
Commit: Patrick Lauer <patrick <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 28 18:13:08 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=857707b2 |
7 |
|
8 |
net-analyzer/zabbix: Bump |
9 |
|
10 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
11 |
|
12 |
net-analyzer/zabbix/Manifest | 1 + |
13 |
net-analyzer/zabbix/zabbix-3.2.3.ebuild | 329 ++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 330 insertions(+) |
15 |
|
16 |
diff --git a/net-analyzer/zabbix/Manifest b/net-analyzer/zabbix/Manifest |
17 |
index 3789f05..ee1ad30 100644 |
18 |
--- a/net-analyzer/zabbix/Manifest |
19 |
+++ b/net-analyzer/zabbix/Manifest |
20 |
@@ -1,3 +1,4 @@ |
21 |
DIST zabbix-2.2.16.tar.gz 15498413 SHA256 3cfcd8c7c11a2e18298e93f33701210b963a7c0e61d8c14fccfd9a8beef08041 SHA512 5d92c17e86608359fff220416d5eed2d4ac10edfe56f4162f4b7660c472cf6f609ba01034d76e5b7164c22d55a1fc5be753f5d0e0ce7ac71d00a6f68dca14afd WHIRLPOOL 2b219d17624ef40a8844193a3d836326160249549775db31c7c68597d17d9fa3d71ddbc9aa30e73c2255606957d0d2f5f562fbf2b0c0654d794c8e61e96e7ead |
22 |
DIST zabbix-3.0.6.tar.gz 15513412 SHA256 4fe972b061cae8cc91bf2870f2caabc967096f31def5a3f53e8789154b05a97b SHA512 ccffc58f3555bea62011bad272e8a3085d1723d8cb200e00a3e657696104c3fd055b8b963a26d9c726ef45a5381c7f9625498e99b756a3dd97b147d8b7884d1f WHIRLPOOL 137eb724b5205e5d38d00f96c62da5f96ef91c57b01280489bafb67c54d10e7c40304b4674fcefedda9381dfe6d2721b81dbcda1822f56f6d538e067c2588fea |
23 |
DIST zabbix-3.2.2.tar.gz 15915015 SHA256 f9760dde57b1faee4bbecf00c39877678d58aaf4b6205e010d6b049d9cf4535e SHA512 1f6cb6344d24ed91c49fa116d6862cfd78caab9cd3297329369dd2df5cf9c83fda67bc9faa1a59f2b605bfeda73a69a3e29653fca320eda1b67f4d0931bfdb9b WHIRLPOOL a3e9c22459376b29b3f041f0e57b369976e2fa6eb752dd79e3f862a3095c216c91e08854dff350505c33c0a5e1b73b0c4b677d5a2bb1c0c872791023c741ac77 |
24 |
+DIST zabbix-3.2.3.tar.gz 15922416 SHA256 e6dba74039d8d6efff86ec3da99909f4daeaeb66d48781bbb666e3094533da25 SHA512 5a704282765fa66d1aa53ae546d3a49a35050d6830a25a3a9ad64d73f8aff48b31e8d13f37d147c8d6244bb0f2dab21bceb5d022f1c3ffa726c10edc6e7bd1f6 WHIRLPOOL cab23a3edfa53f7b505f0d7e03fbcf0a2f59a52e441e195b5f7ff5555ee7bd0258ba7cb93e45f894e16ba4ad1a1b236cfef0cc65c7b7905ee0ebde2e11972710 |
25 |
|
26 |
diff --git a/net-analyzer/zabbix/zabbix-3.2.3.ebuild b/net-analyzer/zabbix/zabbix-3.2.3.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000..aaa5b91 |
29 |
--- /dev/null |
30 |
+++ b/net-analyzer/zabbix/zabbix-3.2.3.ebuild |
31 |
@@ -0,0 +1,329 @@ |
32 |
+# Copyright 1999-2016 Gentoo Foundation |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+# $Id$ |
35 |
+ |
36 |
+EAPI="6" |
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="http://www.zabbix.com/" |
44 |
+MY_P=${P/_/} |
45 |
+MY_PV=${PV/_/} |
46 |
+SRC_URI="http://prdownloads.sourceforge.net/zabbix/${MY_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 xmpp 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 sqlite odbc ) ) |
55 |
+ static? ( !oracle !snmp )" |
56 |
+ |
57 |
+COMMON_DEPEND="snmp? ( net-analyzer/net-snmp ) |
58 |
+ ldap? ( |
59 |
+ net-nds/openldap |
60 |
+ =dev-libs/cyrus-sasl-2* |
61 |
+ net-libs/gnutls |
62 |
+ ) |
63 |
+ mysql? ( >=virtual/mysql-5.0.3 ) |
64 |
+ sqlite? ( >=dev-db/sqlite-3.3.5 ) |
65 |
+ postgres? ( dev-db/postgresql:* ) |
66 |
+ oracle? ( >=dev-db/oracle-instantclient-basic-10.0.0.0 ) |
67 |
+ xmpp? ( dev-libs/iksemel ) |
68 |
+ libxml2? ( dev-libs/libxml2 ) |
69 |
+ curl? ( net-misc/curl ) |
70 |
+ openipmi? ( sys-libs/openipmi ) |
71 |
+ ssh? ( net-libs/libssh2 ) |
72 |
+ java? ( virtual/jdk:* ) |
73 |
+ odbc? ( dev-db/unixODBC ) |
74 |
+ ssl? ( dev-libs/openssl:=[-bindist] )" |
75 |
+ |
76 |
+RDEPEND="${COMMON_DEPEND} |
77 |
+ proxy? ( net-analyzer/fping[suid] ) |
78 |
+ server? ( net-analyzer/fping[suid] |
79 |
+ app-admin/webapp-config ) |
80 |
+ java? ( |
81 |
+ >=virtual/jre-1.4 |
82 |
+ dev-java/slf4j-api |
83 |
+ ) |
84 |
+ frontend? ( |
85 |
+ >=dev-lang/php-5.3.0[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode] |
86 |
+ || ( dev-lang/php[apache2] dev-lang/php[cgi] dev-lang/php[fpm] ) |
87 |
+ mysql? ( dev-lang/php[mysqli] ) |
88 |
+ odbc? ( dev-lang/php[odbc] ) |
89 |
+ oracle? ( dev-lang/php[oci8-instant-client] ) |
90 |
+ postgres? ( dev-lang/php[postgres] ) |
91 |
+ sqlite? ( dev-lang/php[sqlite] ) |
92 |
+ media-libs/gd[png] |
93 |
+ app-admin/webapp-config )" |
94 |
+DEPEND="${COMMON_DEPEND} |
95 |
+ static? ( |
96 |
+ ldap? ( |
97 |
+ net-nds/openldap[static-libs] |
98 |
+ =dev-libs/cyrus-sasl-2*[static-libs] |
99 |
+ net-libs/gnutls[static-libs] |
100 |
+ ) |
101 |
+ mysql? ( >=virtual/mysql-5.0.3[static-libs] ) |
102 |
+ sqlite? ( >=dev-db/sqlite-3.3.5[static-libs] ) |
103 |
+ postgres? ( dev-db/postgresql:*[static-libs] ) |
104 |
+ libxml2? ( dev-libs/libxml2[static-libs] ) |
105 |
+ curl? ( net-misc/curl[static-libs] ) |
106 |
+ ssh? ( net-libs/libssh2[static-libs] ) |
107 |
+ odbc? ( dev-db/unixODBC[static-libs] ) |
108 |
+ ) |
109 |
+ virtual/pkgconfig" |
110 |
+ |
111 |
+S=${WORKDIR}/${MY_P} |
112 |
+ |
113 |
+ZABBIXJAVA_BASE="opt/zabbix_java" |
114 |
+ |
115 |
+pkg_setup() { |
116 |
+ if use oracle; then |
117 |
+ if [ -z "${ORACLE_HOME}" ]; then |
118 |
+ eerror |
119 |
+ eerror "The environment variable ORACLE_HOME must be set" |
120 |
+ eerror "and point to the correct location." |
121 |
+ eerror "It looks like you don't have Oracle installed." |
122 |
+ eerror |
123 |
+ die "Environment variable ORACLE_HOME is not set" |
124 |
+ fi |
125 |
+ if has_version 'dev-db/oracle-instantclient-basic'; then |
126 |
+ ewarn |
127 |
+ ewarn "Please ensure you have a full install of the Oracle client." |
128 |
+ ewarn "dev-db/oracle-instantclient* is NOT sufficient." |
129 |
+ ewarn |
130 |
+ fi |
131 |
+ fi |
132 |
+ |
133 |
+ if use frontend; then |
134 |
+ webapp_pkg_setup |
135 |
+ fi |
136 |
+ |
137 |
+ enewgroup zabbix |
138 |
+ enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix |
139 |
+} |
140 |
+ |
141 |
+java_prepare() { |
142 |
+ cd "${S}/src/zabbix_java/lib" |
143 |
+ rm -v *.jar || die |
144 |
+ |
145 |
+ java-pkg_jar-from slf4j-api |
146 |
+} |
147 |
+ |
148 |
+src_prepare() { |
149 |
+ default |
150 |
+} |
151 |
+ |
152 |
+src_configure() { |
153 |
+ econf \ |
154 |
+ $(use_enable server) \ |
155 |
+ $(use_enable proxy) \ |
156 |
+ $(use_enable agent) \ |
157 |
+ $(use_enable ipv6) \ |
158 |
+ $(use_enable static) \ |
159 |
+ $(use_enable java) \ |
160 |
+ $(use_with ldap) \ |
161 |
+ $(use_with snmp net-snmp) \ |
162 |
+ $(use_with mysql) \ |
163 |
+ $(use_with postgres postgresql) \ |
164 |
+ $(use_with oracle) \ |
165 |
+ $(use_with sqlite sqlite3) \ |
166 |
+ $(use_with xmpp jabber) \ |
167 |
+ $(use_with curl libcurl) \ |
168 |
+ $(use_with openipmi openipmi) \ |
169 |
+ $(use_with ssh ssh2) \ |
170 |
+ $(use_with libxml2) \ |
171 |
+ $(use_with odbc unixodbc) \ |
172 |
+ $(use_with ssl openssl) \ |
173 |
+ || die "econf failed" |
174 |
+} |
175 |
+ |
176 |
+src_compile() { |
177 |
+ if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then |
178 |
+ emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" || die "emake failed" |
179 |
+ fi |
180 |
+} |
181 |
+ |
182 |
+src_install() { |
183 |
+ dodir \ |
184 |
+ /etc/zabbix \ |
185 |
+ /var/lib/zabbix \ |
186 |
+ /var/lib/zabbix/home \ |
187 |
+ /var/lib/zabbix/scripts \ |
188 |
+ /var/lib/zabbix/alertscripts \ |
189 |
+ /var/lib/zabbix/externalscripts \ |
190 |
+ /var/log/zabbix |
191 |
+ |
192 |
+ keepdir \ |
193 |
+ /etc/zabbix \ |
194 |
+ /var/lib/zabbix \ |
195 |
+ /var/lib/zabbix/home \ |
196 |
+ /var/lib/zabbix/scripts \ |
197 |
+ /var/lib/zabbix/alertscripts \ |
198 |
+ /var/lib/zabbix/externalscripts \ |
199 |
+ /var/log/zabbix |
200 |
+ |
201 |
+ if use server; then |
202 |
+ insinto /etc/zabbix |
203 |
+ doins "${FILESDIR}/3.0"/zabbix_server.conf |
204 |
+ doinitd "${FILESDIR}/3.0"/init.d/zabbix-server |
205 |
+ dosbin src/zabbix_server/zabbix_server |
206 |
+ fowners zabbix:zabbix /etc/zabbix/zabbix_server.conf |
207 |
+ fperms 0640 /etc/zabbix/zabbix_server.conf |
208 |
+ dodir /usr/share/zabbix |
209 |
+ /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/ |
210 |
+ systemd_dounit "${FILESDIR}/zabbix-server.service" |
211 |
+ systemd_newtmpfilesd "${FILESDIR}/zabbix-server.tmpfiles" zabbix-server.conf |
212 |
+ fi |
213 |
+ |
214 |
+ if use proxy; then |
215 |
+ doinitd "${FILESDIR}/3.0"/init.d/zabbix-proxy |
216 |
+ dosbin src/zabbix_proxy/zabbix_proxy |
217 |
+ insinto /etc/zabbix |
218 |
+ doins "${FILESDIR}/3.0"/zabbix_proxy.conf |
219 |
+ dodir /usr/share/zabbix |
220 |
+ /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/ |
221 |
+ systemd_dounit "${FILESDIR}/zabbix-proxy.service" |
222 |
+ systemd_newtmpfilesd "${FILESDIR}/zabbix-proxy.tmpfiles" zabbix-proxy.conf |
223 |
+ fi |
224 |
+ |
225 |
+ if use agent; then |
226 |
+ insinto /etc/zabbix |
227 |
+ doins "${FILESDIR}/3.0"/zabbix_agentd.conf |
228 |
+ doinitd "${FILESDIR}/3.0"/init.d/zabbix-agentd |
229 |
+ dosbin src/zabbix_agent/zabbix_agentd |
230 |
+ dobin \ |
231 |
+ src/zabbix_sender/zabbix_sender \ |
232 |
+ src/zabbix_get/zabbix_get |
233 |
+ fowners zabbix:zabbix /etc/zabbix/zabbix_agentd.conf |
234 |
+ fperms 0640 /etc/zabbix/zabbix_agentd.conf |
235 |
+ systemd_dounit "${FILESDIR}/zabbix-agentd.service" |
236 |
+ systemd_newtmpfilesd "${FILESDIR}/zabbix-agentd.tmpfiles" zabbix-agentd.conf |
237 |
+ fi |
238 |
+ |
239 |
+ fowners zabbix:zabbix \ |
240 |
+ /etc/zabbix \ |
241 |
+ /var/lib/zabbix \ |
242 |
+ /var/lib/zabbix/home \ |
243 |
+ /var/lib/zabbix/scripts \ |
244 |
+ /var/lib/zabbix/alertscripts \ |
245 |
+ /var/lib/zabbix/externalscripts \ |
246 |
+ /var/log/zabbix |
247 |
+ fperms 0750 \ |
248 |
+ /etc/zabbix \ |
249 |
+ /var/lib/zabbix \ |
250 |
+ /var/lib/zabbix/home \ |
251 |
+ /var/lib/zabbix/scripts \ |
252 |
+ /var/lib/zabbix/alertscripts \ |
253 |
+ /var/lib/zabbix/externalscripts \ |
254 |
+ /var/log/zabbix |
255 |
+ |
256 |
+ dodoc README INSTALL NEWS ChangeLog \ |
257 |
+ conf/zabbix_agentd.conf \ |
258 |
+ conf/zabbix_proxy.conf \ |
259 |
+ conf/zabbix_agentd/userparameter_examples.conf \ |
260 |
+ conf/zabbix_agentd/userparameter_mysql.conf \ |
261 |
+ conf/zabbix_server.conf |
262 |
+ |
263 |
+ if use frontend; then |
264 |
+ webapp_src_preinst |
265 |
+ cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}" |
266 |
+ webapp_configfile \ |
267 |
+ "${MY_HTDOCSDIR}"/include/db.inc.php \ |
268 |
+ "${MY_HTDOCSDIR}"/include/config.inc.php |
269 |
+ webapp_src_install |
270 |
+ fi |
271 |
+ |
272 |
+ if use java; then |
273 |
+ dodir \ |
274 |
+ /${ZABBIXJAVA_BASE} \ |
275 |
+ /${ZABBIXJAVA_BASE}/bin \ |
276 |
+ /${ZABBIXJAVA_BASE}/lib |
277 |
+ keepdir /${ZABBIXJAVA_BASE} |
278 |
+ exeinto /${ZABBIXJAVA_BASE}/bin |
279 |
+ doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar |
280 |
+ exeinto /${ZABBIXJAVA_BASE}/lib |
281 |
+ doexe \ |
282 |
+ src/zabbix_java/lib/logback-classic-0.9.27.jar \ |
283 |
+ src/zabbix_java/lib/logback-console.xml \ |
284 |
+ src/zabbix_java/lib/logback-core-0.9.27.jar \ |
285 |
+ src/zabbix_java/lib/logback.xml \ |
286 |
+ src/zabbix_java/lib/android-json-4.3_r3.1.jar \ |
287 |
+ src/zabbix_java/lib/slf4j-api-1.6.1.jar |
288 |
+ fowners -R zabbix:zabbix /${ZABBIXJAVA_BASE} |
289 |
+ doinitd "${FILESDIR}"/3.0/init.d/zabbix-jmx-proxy |
290 |
+ doconfd "${FILESDIR}"/3.0/conf.d/zabbix-jmx-proxy |
291 |
+ fi |
292 |
+} |
293 |
+ |
294 |
+pkg_postinst() { |
295 |
+ if use server || use proxy ; then |
296 |
+ elog |
297 |
+ elog "You may need to configure your database for Zabbix," |
298 |
+ elog "if you have not already done so. " |
299 |
+ elog |
300 |
+ |
301 |
+ zabbix_homedir=$(egethome zabbix) |
302 |
+ if [ -n "${zabbix_homedir}" ] && \ |
303 |
+ [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then |
304 |
+ ewarn |
305 |
+ ewarn "The user 'zabbix' should have his homedir changed" |
306 |
+ ewarn "to /var/lib/zabbix/home if you want to use" |
307 |
+ ewarn "custom alert scripts." |
308 |
+ ewarn |
309 |
+ ewarn "A real homedir might be needed for configfiles" |
310 |
+ ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when" |
311 |
+ ewarn "using sendxmpp for Jabber alerts)." |
312 |
+ ewarn |
313 |
+ ewarn "To change the homedir use:" |
314 |
+ ewarn " usermod -d /var/lib/zabbix/home zabbix" |
315 |
+ ewarn |
316 |
+ fi |
317 |
+ fi |
318 |
+ |
319 |
+ if use server; then |
320 |
+ elog |
321 |
+ elog "For distributed monitoring you have to run:" |
322 |
+ elog |
323 |
+ elog "zabbix_server -n <nodeid>" |
324 |
+ elog |
325 |
+ elog "This will convert database data for use with Node ID" |
326 |
+ elog "and also adds a local node." |
327 |
+ elog |
328 |
+ fi |
329 |
+ |
330 |
+ elog "--" |
331 |
+ elog |
332 |
+ elog "You may need to add these lines to /etc/services:" |
333 |
+ elog |
334 |
+ elog "zabbix-agent 10050/tcp Zabbix Agent" |
335 |
+ elog "zabbix-agent 10050/udp Zabbix Agent" |
336 |
+ elog "zabbix-trapper 10051/tcp Zabbix Trapper" |
337 |
+ elog "zabbix-trapper 10051/udp Zabbix Trapper" |
338 |
+ elog |
339 |
+ |
340 |
+ if use server || use proxy ; then |
341 |
+ # check for fping |
342 |
+ fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null) |
343 |
+ case "${fping_perms}" in |
344 |
+ 4[157][157][157]) |
345 |
+ ;; |
346 |
+ *) |
347 |
+ ewarn |
348 |
+ ewarn "If you want to use the checks 'icmpping' and 'icmppingsec'," |
349 |
+ ewarn "you have to make /usr/sbin/fping setuid root and executable" |
350 |
+ ewarn "by everyone. Run the following command to fix it:" |
351 |
+ ewarn |
352 |
+ ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping" |
353 |
+ ewarn |
354 |
+ ewarn "Please be aware that this might impose a security risk," |
355 |
+ ewarn "depending on the code quality of fping." |
356 |
+ ewarn |
357 |
+ ;; |
358 |
+ esac |
359 |
+ fi |
360 |
+} |