1 |
commit: 889a0d84b7a02fc604f534d4046bb12489629e95 |
2 |
Author: Patrick Lauer <patrick <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 25 12:01:52 2018 +0000 |
4 |
Commit: Patrick Lauer <patrick <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 25 12:01:52 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=889a0d84 |
7 |
|
8 |
net-analyzer/zabbix: Bump |
9 |
|
10 |
Package-Manager: Portage-2.3.20, Repoman-2.3.6 |
11 |
|
12 |
net-analyzer/zabbix/Manifest | 1 + |
13 |
net-analyzer/zabbix/zabbix-3.4.6.ebuild | 329 ++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 330 insertions(+) |
15 |
|
16 |
diff --git a/net-analyzer/zabbix/Manifest b/net-analyzer/zabbix/Manifest |
17 |
index bef20354f37..240d726df2a 100644 |
18 |
--- a/net-analyzer/zabbix/Manifest |
19 |
+++ b/net-analyzer/zabbix/Manifest |
20 |
@@ -5,3 +5,4 @@ DIST zabbix-3.2.10.tar.gz 16089723 BLAKE2B c69b8b00781198b8e4845f94e5a42e3910950 |
21 |
DIST zabbix-3.2.11.tar.gz 16099820 BLAKE2B 7038679ecc9ae1b6684d65b3dd0019865e587c82e5a3ffe55610c057f8516ebe34978101065ac31628e6fd54077877c447d64cb1d169e0ad7402e727c7e65d76 SHA512 a14e0af4b183c8deb524c8965700c2988c0c131844f7fbc748aa8d1703b9dad73c2cf6d77663799fbd455adf58fdd1ce8dc5fd6404a9269c1a42160ad0e33e6e |
22 |
DIST zabbix-3.2.9.tar.gz 16098846 BLAKE2B a8d7ab803cab075889bbaee10806c1f35be42a91c78e1ee62e8fa458987865401d2fb677d4ebf42267e13acb38b8689bb6d232fbc3247ffba3f06f5e8c3cd692 SHA512 e8d82d4cadd8f6d5124de5d1b93f4768086c9543bfea676f321df86a76e001400330ea3650d3c295b25fa76858a205dac49caa97d61af30cc31fac544025d347 |
23 |
DIST zabbix-3.4.5.tar.gz 17170228 BLAKE2B bd799a3ad25256421bc2a8458019237da17e78d2dd5253485cebbc40df785e550e7cf15fcf8925a225c118e38e9aaad3f7532f909ba3eaff3a175136033ae81a SHA512 e77c8693d687c9f1e3c160f2f41161b5e4ac663f0db69f4bff424da4ba607815ad0148448c6f80a2b9357ad7472016610f4beed173e40c6fcf661874d75c69a4 |
24 |
+DIST zabbix-3.4.6.tar.gz 17162881 BLAKE2B cf8a461f720b2f1d4910d8f512ac9949c56b9116fb9ddd1a26687b22da2c3938c4f10e6d0029bf348101e897fe6d352880964aaf5a0f55dd377fb6eec59a5006 SHA512 02300b103278f6f2867629a958a8bc5ea8e6cfe5743056b7e2f9d59afdeea04e29f51cae7c5d9847899c45c321a4c15cdaf66203c627fb1d85b3af619afe73ca |
25 |
|
26 |
diff --git a/net-analyzer/zabbix/zabbix-3.4.6.ebuild b/net-analyzer/zabbix/zabbix-3.4.6.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..d51a6c625af |
29 |
--- /dev/null |
30 |
+++ b/net-analyzer/zabbix/zabbix-3.4.6.ebuild |
31 |
@@ -0,0 +1,329 @@ |
32 |
+# Copyright 1999-2018 Gentoo Foundation |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI="6" |
36 |
+ |
37 |
+# needed to make webapp-config dep optional |
38 |
+WEBAPP_OPTIONAL="yes" |
39 |
+inherit flag-o-matic webapp java-pkg-opt-2 user systemd toolchain-funcs |
40 |
+ |
41 |
+DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers" |
42 |
+HOMEPAGE="http://www.zabbix.com/" |
43 |
+MY_P=${P/_/} |
44 |
+MY_PV=${PV/_/} |
45 |
+SRC_URI="http://prdownloads.sourceforge.net/zabbix/${MY_P}.tar.gz" |
46 |
+LICENSE="GPL-2" |
47 |
+SLOT="0" |
48 |
+WEBAPP_MANUAL_SLOT="yes" |
49 |
+KEYWORDS="~amd64 ~x86" |
50 |
+IUSE="+agent java curl frontend ipv6 xmpp ldap libxml2 mysql openipmi oracle +postgres proxy server ssh ssl snmp sqlite odbc static" |
51 |
+REQUIRED_USE="|| ( agent frontend proxy server ) |
52 |
+ proxy? ( ^^ ( mysql oracle postgres sqlite odbc ) ) |
53 |
+ server? ( ^^ ( mysql oracle postgres odbc ) ) |
54 |
+ static? ( !oracle !snmp )" |
55 |
+ |
56 |
+COMMON_DEPEND="snmp? ( net-analyzer/net-snmp ) |
57 |
+ ldap? ( |
58 |
+ net-nds/openldap |
59 |
+ =dev-libs/cyrus-sasl-2* |
60 |
+ net-libs/gnutls |
61 |
+ ) |
62 |
+ mysql? ( >=virtual/mysql-5.0.3 ) |
63 |
+ sqlite? ( >=dev-db/sqlite-3.3.5 ) |
64 |
+ postgres? ( dev-db/postgresql:* ) |
65 |
+ oracle? ( >=dev-db/oracle-instantclient-basic-10.0.0.0 ) |
66 |
+ xmpp? ( dev-libs/iksemel ) |
67 |
+ libxml2? ( dev-libs/libxml2 ) |
68 |
+ curl? ( net-misc/curl ) |
69 |
+ openipmi? ( sys-libs/openipmi ) |
70 |
+ ssh? ( net-libs/libssh2 ) |
71 |
+ java? ( virtual/jdk:* ) |
72 |
+ odbc? ( dev-db/unixODBC ) |
73 |
+ ssl? ( dev-libs/openssl:=[-bindist] )" |
74 |
+ |
75 |
+RDEPEND="${COMMON_DEPEND} |
76 |
+ proxy? ( net-analyzer/fping[suid] ) |
77 |
+ server? ( net-analyzer/fping[suid] |
78 |
+ app-admin/webapp-config |
79 |
+ dev-libs/libevent ) |
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 |
+} |