1 |
commit: 2e9721c9764885edd70fa6aad2c953b936dcd9b8 |
2 |
Author: Patrick Lauer <patrick <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Dec 21 15:30:24 2015 +0000 |
4 |
Commit: Patrick Lauer <patrick <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Dec 21 15:31:04 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e9721c9 |
7 |
|
8 |
net-analyzer/zabbix: Bump, #562634 |
9 |
|
10 |
net-analyzer/zabbix/Manifest | 1 + |
11 |
net-analyzer/zabbix/zabbix-2.2.11.ebuild | 363 +++++++++++++++++++++++++++++++ |
12 |
2 files changed, 364 insertions(+) |
13 |
|
14 |
diff --git a/net-analyzer/zabbix/Manifest b/net-analyzer/zabbix/Manifest |
15 |
index 418a463..7812134 100644 |
16 |
--- a/net-analyzer/zabbix/Manifest |
17 |
+++ b/net-analyzer/zabbix/Manifest |
18 |
@@ -1,3 +1,4 @@ |
19 |
+DIST zabbix-2.2.11.tar.gz 15147477 SHA256 9ad7bd71985dc316ee2a614bba2b1dd108d2a930c0a5cc5a8f75eb45a7a7e1ba SHA512 7447d3207bf67fdda67c1e56636ae114df7776a2ba4df4f9f260eef6a65e37d770ed73d6edd6438a9a783da1fc9bfede2d98acdc51fa6c7a130565efe8ae5b2d WHIRLPOOL e2b1f2ed019651d127a40f656117c9acccc8dcb1b9a8c0f9a773368de6d430d0716b5c50c42358992c9c2567c59cf0ec02bffea123ee4ac873be262aef0f2f6f |
20 |
DIST zabbix-2.2.5.tar.gz 14960556 SHA256 1e33f54d4accc5b6a0dccf4a308d27dc82de245567dffef823f9add9fa7d81b5 SHA512 0e229a2502f1332775db2107556b5e62267bcdf05dc483957960f563877ed970aef7ed465123576849413305e54309d83eeb75dd1f522c93cf09cd4b75265514 WHIRLPOOL 0a6b81f4e23ad8c8247b5356aa31bc4dfbd364642a647b9dff3216a0141cd2287b75731f396d26083aa412669a7efdb6f24fcb8592b4773c4a21d02b2f369681 |
21 |
DIST zabbix-2.2.9.tar.gz 15032149 SHA256 7c8c319b34beb978e4b7be8c93e084485f93fe028dd9dbc6b674a7498d324439 SHA512 8400f875546140a7393ac6598a02e95645ac63ece1d958e7752737d0c0fff25e70923f2dd1ea29a9e73640b159da8a5286d9b1c31fbb3f090acbd07606c6113d WHIRLPOOL cb68a2c1467c83e8c2e2662af3995d7d90a00408009df2d9fe0b0d0d81191521b3f6e1624240150f68419252324e0d6e5653a3f19ed3b88adeb2719277172fb6 |
22 |
DIST zabbix-2.4.5.tar.gz 14851092 SHA256 4e2cf1e4893a45d83379a05e2debabddf16beab324c93e84adc0bb57716fb957 SHA512 bdcba684b3d1cdb9eb5e1f9b370ef450201de8dbd9fe1619ef2b2437de6c34762dc041fa873976c4af0a2af229eec450aa58b1663feb75b6345d303484d35ead WHIRLPOOL 775e98b85152268b19cde553ff8bc7e86c0f6c5b873e85a0faca3edb5b51fe7d02267e52b3dccb0f08847bf11c6d0ba6b2d9f1e6bd472c882a2fac4326a83e10 |
23 |
|
24 |
diff --git a/net-analyzer/zabbix/zabbix-2.2.11.ebuild b/net-analyzer/zabbix/zabbix-2.2.11.ebuild |
25 |
new file mode 100644 |
26 |
index 0000000..33b1210 |
27 |
--- /dev/null |
28 |
+++ b/net-analyzer/zabbix/zabbix-2.2.11.ebuild |
29 |
@@ -0,0 +1,363 @@ |
30 |
+# Copyright 1999-2015 Gentoo Foundation |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+# $Id$ |
33 |
+ |
34 |
+EAPI="5" |
35 |
+ |
36 |
+# needed to make webapp-config dep optional |
37 |
+WEBAPP_OPTIONAL="yes" |
38 |
+inherit flag-o-matic webapp depend.php autotools java-pkg-opt-2 user systemd toolchain-funcs |
39 |
+ |
40 |
+DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers" |
41 |
+HOMEPAGE="http://www.zabbix.com/" |
42 |
+MY_P=${P/_/} |
43 |
+MY_PV=${PV/_/} |
44 |
+SRC_URI="http://prdownloads.sourceforge.net/zabbix/${MY_P}.tar.gz" |
45 |
+LICENSE="GPL-2" |
46 |
+SLOT="0" |
47 |
+WEBAPP_MANUAL_SLOT="yes" |
48 |
+KEYWORDS="~amd64 ~x86" |
49 |
+IUSE="agent java curl frontend ipv6 xmpp ldap libxml2 mysql openipmi oracle postgres proxy server ssh snmp sqlite odbc static" |
50 |
+ |
51 |
+COMMON_DEPEND="snmp? ( net-analyzer/net-snmp ) |
52 |
+ ldap? ( |
53 |
+ net-nds/openldap |
54 |
+ =dev-libs/cyrus-sasl-2* |
55 |
+ net-libs/gnutls |
56 |
+ ) |
57 |
+ mysql? ( >=virtual/mysql-5.0.3 ) |
58 |
+ sqlite? ( >=dev-db/sqlite-3.3.5 ) |
59 |
+ postgres? ( dev-db/postgresql:* ) |
60 |
+ oracle? ( >=dev-db/oracle-instantclient-basic-10.0.0.0 ) |
61 |
+ xmpp? ( dev-libs/iksemel ) |
62 |
+ libxml2? ( dev-libs/libxml2 ) |
63 |
+ curl? ( net-misc/curl ) |
64 |
+ openipmi? ( sys-libs/openipmi ) |
65 |
+ ssh? ( net-libs/libssh2 ) |
66 |
+ java? ( virtual/jdk:* ) |
67 |
+ odbc? ( dev-db/unixODBC )" |
68 |
+ |
69 |
+RDEPEND="${COMMON_DEPEND} |
70 |
+ proxy? ( <=net-analyzer/fping-2.9 ) |
71 |
+ server? ( <=net-analyzer/fping-2.9 |
72 |
+ app-admin/webapp-config ) |
73 |
+ java? ( |
74 |
+ >=virtual/jre-1.4 |
75 |
+ dev-java/slf4j-api |
76 |
+ ) |
77 |
+ frontend? ( |
78 |
+ >=dev-lang/php-5.3.0[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode] |
79 |
+ || ( dev-lang/php[apache2] dev-lang/php[cgi] dev-lang/php[fpm] ) |
80 |
+ media-libs/gd[png] |
81 |
+ app-admin/webapp-config )" |
82 |
+DEPEND="${COMMON_DEPEND} |
83 |
+ virtual/pkgconfig" |
84 |
+ |
85 |
+S=${WORKDIR}/${MY_P} |
86 |
+ |
87 |
+ZABBIXJAVA_BASE="opt/zabbix_java" |
88 |
+ |
89 |
+java_prepare() { |
90 |
+ cd "${S}/src/zabbix_java/lib" |
91 |
+ rm -v *.jar || die |
92 |
+ |
93 |
+ java-pkg_jar-from slf4j-api |
94 |
+} |
95 |
+ |
96 |
+src_prepare() { |
97 |
+ eautoreconf |
98 |
+} |
99 |
+ |
100 |
+pkg_setup() { |
101 |
+ if use server || use proxy ; then |
102 |
+ local dbnum dbtypes="mysql oracle postgres sqlite" dbtype |
103 |
+ declare -i dbnum=0 |
104 |
+ for dbtype in ${dbtypes}; do |
105 |
+ use ${dbtype} && let dbnum++ |
106 |
+ done |
107 |
+ if [ ${dbnum} -gt 1 ]; then |
108 |
+ eerror |
109 |
+ eerror "You can't use more than one database type in Zabbix." |
110 |
+ eerror "Select exactly one database type out of these: ${dbtypes}" |
111 |
+ eerror |
112 |
+ die "Multiple database types selected." |
113 |
+ elif [ ${dbnum} -lt 1 ]; then |
114 |
+ eerror |
115 |
+ eerror "Select exactly one database type out of these: ${dbtypes}" |
116 |
+ eerror |
117 |
+ die "No database type selected." |
118 |
+ fi |
119 |
+ if use oracle; then |
120 |
+ if [ -z "${ORACLE_HOME}" ]; then |
121 |
+ eerror |
122 |
+ eerror "The environment variable ORACLE_HOME must be set" |
123 |
+ eerror "and point to the correct location." |
124 |
+ eerror "It looks like you don't have Oracle installed." |
125 |
+ eerror |
126 |
+ die "Environment variable ORACLE_HOME is not set" |
127 |
+ fi |
128 |
+ if has_version 'dev-db/oracle-instantclient-basic'; then |
129 |
+ ewarn |
130 |
+ ewarn "Please ensure you have a full install of the Oracle client." |
131 |
+ ewarn "dev-db/oracle-instantclient* is NOT sufficient." |
132 |
+ ewarn |
133 |
+ fi |
134 |
+ fi |
135 |
+ fi |
136 |
+ |
137 |
+ if use frontend; then |
138 |
+ webapp_pkg_setup |
139 |
+ fi |
140 |
+ |
141 |
+ enewgroup zabbix |
142 |
+ enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix |
143 |
+} |
144 |
+ |
145 |
+pkg_postinst() { |
146 |
+ if use server || use proxy ; then |
147 |
+ elog |
148 |
+ elog "You may need to configure your database for Zabbix," |
149 |
+ elog "if you have not already done so. " |
150 |
+ elog |
151 |
+ |
152 |
+ zabbix_homedir=$(egethome zabbix) |
153 |
+ if [ -n "${zabbix_homedir}" ] && \ |
154 |
+ [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then |
155 |
+ ewarn |
156 |
+ ewarn "The user 'zabbix' should have his homedir changed" |
157 |
+ ewarn "to /var/lib/zabbix/home if you want to use" |
158 |
+ ewarn "custom alert scripts." |
159 |
+ ewarn |
160 |
+ ewarn "A real homedir might be needed for configfiles" |
161 |
+ ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when" |
162 |
+ ewarn "using sendxmpp for Jabber alerts)." |
163 |
+ ewarn |
164 |
+ ewarn "To change the homedir use:" |
165 |
+ ewarn " usermod -d /var/lib/zabbix/home zabbix" |
166 |
+ ewarn |
167 |
+ fi |
168 |
+ fi |
169 |
+ |
170 |
+ if use server; then |
171 |
+ elog |
172 |
+ elog "For distributed monitoring you have to run:" |
173 |
+ elog |
174 |
+ elog "zabbix_server -n <nodeid>" |
175 |
+ elog |
176 |
+ elog "This will convert database data for use with Node ID" |
177 |
+ elog "and also adds a local node." |
178 |
+ elog |
179 |
+ fi |
180 |
+ |
181 |
+ elog "--" |
182 |
+ elog |
183 |
+ elog "You may need to add these lines to /etc/services:" |
184 |
+ elog |
185 |
+ elog "zabbix-agent 10050/tcp Zabbix Agent" |
186 |
+ elog "zabbix-agent 10050/udp Zabbix Agent" |
187 |
+ elog "zabbix-trapper 10051/tcp Zabbix Trapper" |
188 |
+ elog "zabbix-trapper 10051/udp Zabbix Trapper" |
189 |
+ elog |
190 |
+ |
191 |
+ elog "Feel free to download or contribute gentoo specific zabbix templates" |
192 |
+ elog "via https://github.com/deploylinux/gentooZabbixTemplates (WIP)." |
193 |
+ |
194 |
+ # repeat fowners/fperms functionality from src_install() |
195 |
+ # here to catch wrong permissions on existing files in |
196 |
+ # the live filesystem (yeah, that sucks). |
197 |
+ chown -R zabbix:zabbix \ |
198 |
+ "${ROOT}"/etc/zabbix \ |
199 |
+ "${ROOT}"/var/lib/zabbix \ |
200 |
+ "${ROOT}"/var/lib/zabbix/home \ |
201 |
+ "${ROOT}"/var/lib/zabbix/scripts \ |
202 |
+ "${ROOT}"/var/log/zabbix |
203 |
+ chmod 0750 \ |
204 |
+ "${ROOT}"/etc/zabbix \ |
205 |
+ "${ROOT}"/var/lib/zabbix \ |
206 |
+ "${ROOT}"/var/lib/zabbix/home \ |
207 |
+ "${ROOT}"/var/lib/zabbix/scripts \ |
208 |
+ "${ROOT}"/var/log/zabbix |
209 |
+ |
210 |
+ chmod 0640 \ |
211 |
+ "${ROOT}"/etc/zabbix/zabbix_* |
212 |
+ |
213 |
+ if use server || use proxy ; then |
214 |
+ # check for fping |
215 |
+ fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null) |
216 |
+ case "${fping_perms}" in |
217 |
+ 4[157][157][157]) |
218 |
+ ;; |
219 |
+ *) |
220 |
+ ewarn |
221 |
+ ewarn "If you want to use the checks 'icmpping' and 'icmppingsec'," |
222 |
+ ewarn "you have to make /usr/sbin/fping setuid root and executable" |
223 |
+ ewarn "by everyone. Run the following command to fix it:" |
224 |
+ ewarn |
225 |
+ ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping" |
226 |
+ ewarn |
227 |
+ ewarn "Please be aware that this might impose a security risk," |
228 |
+ ewarn "depending on the code quality of fping." |
229 |
+ ewarn |
230 |
+ ;; |
231 |
+ esac |
232 |
+ fi |
233 |
+} |
234 |
+ |
235 |
+src_configure() { |
236 |
+ |
237 |
+ econf \ |
238 |
+ $(use_enable server) \ |
239 |
+ $(use_enable proxy) \ |
240 |
+ $(use_enable agent) \ |
241 |
+ $(use_enable ipv6) \ |
242 |
+ $(use_enable static) \ |
243 |
+ $(use_enable java) \ |
244 |
+ $(use_with ldap) \ |
245 |
+ $(use_with snmp net-snmp) \ |
246 |
+ $(use_with mysql) \ |
247 |
+ $(use_with postgres postgresql) \ |
248 |
+ $(use_with oracle) \ |
249 |
+ $(use_with sqlite sqlite3) \ |
250 |
+ $(use_with xmpp jabber) \ |
251 |
+ $(use_with curl libcurl) \ |
252 |
+ $(use_with openipmi openipmi) \ |
253 |
+ $(use_with ssh ssh2) \ |
254 |
+ $(use_with libxml2) \ |
255 |
+ $(use_with odbc unixodbc) \ |
256 |
+ || die "econf failed" |
257 |
+} |
258 |
+ |
259 |
+src_install() { |
260 |
+ dodir \ |
261 |
+ /etc/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 |
+ |
269 |
+ keepdir \ |
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 |
+ if use server; then |
279 |
+ insinto /etc/zabbix |
280 |
+ doins "${FILESDIR}/2.2"/zabbix_server.conf |
281 |
+ doinitd "${FILESDIR}/2.2"/init.d/zabbix-server |
282 |
+ dosbin src/zabbix_server/zabbix_server |
283 |
+ fowners zabbix:zabbix /etc/zabbix/zabbix_server.conf |
284 |
+ fperms 0640 /etc/zabbix/zabbix_server.conf |
285 |
+ dodir /usr/share/zabbix |
286 |
+ /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/ |
287 |
+ systemd_dounit "${FILESDIR}/zabbix-server.service" |
288 |
+ systemd_newtmpfilesd "${FILESDIR}/zabbix-server.tmpfiles" zabbix-server.conf |
289 |
+ fi |
290 |
+ |
291 |
+ if use proxy; then |
292 |
+ doinitd \ |
293 |
+ "${FILESDIR}/2.2"/init.d/zabbix-proxy |
294 |
+ dosbin \ |
295 |
+ src/zabbix_proxy/zabbix_proxy |
296 |
+ insinto /etc/zabbix |
297 |
+ doins \ |
298 |
+ "${FILESDIR}/2.2"/zabbix_proxy.conf |
299 |
+ dodir /usr/share/zabbix |
300 |
+ /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/ |
301 |
+ systemd_dounit "${FILESDIR}/zabbix-proxy.service" |
302 |
+ systemd_newtmpfilesd "${FILESDIR}/zabbix-proxy.tmpfiles" zabbix-proxy.conf |
303 |
+ fi |
304 |
+ |
305 |
+ if use agent; then |
306 |
+ insinto /etc/zabbix |
307 |
+ doins \ |
308 |
+ "${FILESDIR}/2.2"/zabbix_agent.conf \ |
309 |
+ "${FILESDIR}/2.2"/zabbix_agentd.conf |
310 |
+ doinitd "${FILESDIR}/2.2"/init.d/zabbix-agentd |
311 |
+ dosbin \ |
312 |
+ src/zabbix_agent/zabbix_agent \ |
313 |
+ src/zabbix_agent/zabbix_agentd |
314 |
+ dobin \ |
315 |
+ src/zabbix_sender/zabbix_sender \ |
316 |
+ src/zabbix_get/zabbix_get |
317 |
+ fowners zabbix:zabbix \ |
318 |
+ /etc/zabbix/zabbix_agent.conf \ |
319 |
+ /etc/zabbix/zabbix_agentd.conf |
320 |
+ fperms 0640 \ |
321 |
+ /etc/zabbix/zabbix_agent.conf \ |
322 |
+ /etc/zabbix/zabbix_agentd.conf |
323 |
+ systemd_dounit "${FILESDIR}/zabbix-agentd.service" |
324 |
+ systemd_newtmpfilesd "${FILESDIR}/zabbix-agentd.tmpfiles" zabbix-agentd.conf |
325 |
+ fi |
326 |
+ |
327 |
+ fowners zabbix:zabbix \ |
328 |
+ /etc/zabbix \ |
329 |
+ /var/lib/zabbix \ |
330 |
+ /var/lib/zabbix/home \ |
331 |
+ /var/lib/zabbix/scripts \ |
332 |
+ /var/lib/zabbix/alertscripts \ |
333 |
+ /var/lib/zabbix/externalscripts \ |
334 |
+ /var/log/zabbix |
335 |
+ fperms 0750 \ |
336 |
+ /etc/zabbix \ |
337 |
+ /var/lib/zabbix \ |
338 |
+ /var/lib/zabbix/home \ |
339 |
+ /var/lib/zabbix/scripts \ |
340 |
+ /var/lib/zabbix/alertscripts \ |
341 |
+ /var/lib/zabbix/externalscripts \ |
342 |
+ /var/log/zabbix |
343 |
+ |
344 |
+ dodoc README INSTALL NEWS ChangeLog \ |
345 |
+ conf/zabbix_agent.conf \ |
346 |
+ conf/zabbix_agentd.conf \ |
347 |
+ conf/zabbix_proxy.conf \ |
348 |
+ conf/zabbix_agentd/userparameter_examples.conf \ |
349 |
+ conf/zabbix_agentd/userparameter_mysql.conf \ |
350 |
+ conf/zabbix_server.conf |
351 |
+ |
352 |
+ if use frontend; then |
353 |
+ webapp_src_preinst |
354 |
+ cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}" |
355 |
+ webapp_postinst_txt en "${FILESDIR}/"1.6.6/postinstall-en.txt |
356 |
+ webapp_configfile \ |
357 |
+ "${MY_HTDOCSDIR}"/include/db.inc.php \ |
358 |
+ "${MY_HTDOCSDIR}"/include/config.inc.php |
359 |
+ webapp_src_install |
360 |
+ fi |
361 |
+ |
362 |
+ if use java; then |
363 |
+ dodir \ |
364 |
+ /${ZABBIXJAVA_BASE} \ |
365 |
+ /${ZABBIXJAVA_BASE}/bin \ |
366 |
+ /${ZABBIXJAVA_BASE}/lib |
367 |
+ keepdir /${ZABBIXJAVA_BASE} |
368 |
+ exeinto /${ZABBIXJAVA_BASE}/bin |
369 |
+ doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar |
370 |
+ exeinto /${ZABBIXJAVA_BASE}/lib |
371 |
+ doexe \ |
372 |
+ src/zabbix_java/lib/logback-classic-0.9.27.jar \ |
373 |
+ src/zabbix_java/lib/logback-console.xml \ |
374 |
+ src/zabbix_java/lib/logback-core-0.9.27.jar \ |
375 |
+ src/zabbix_java/lib/logback.xml \ |
376 |
+ src/zabbix_java/lib/android-json-4.3_r3.1.jar \ |
377 |
+ src/zabbix_java/lib/slf4j-api-1.6.1.jar |
378 |
+ exeinto /${ZABBIXJAVA_BASE}/ |
379 |
+ doexe \ |
380 |
+ src/zabbix_java/settings.sh \ |
381 |
+ src/zabbix_java/startup.sh \ |
382 |
+ src/zabbix_java/shutdown.sh |
383 |
+ fowners -R zabbix:zabbix /${ZABBIXJAVA_BASE} |
384 |
+ fi |
385 |
+ |
386 |
+} |
387 |
+ |
388 |
+src_compile() { |
389 |
+ if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then |
390 |
+ emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" || die "emake failed" |
391 |
+ fi |
392 |
+} |