Gentoo Archives: gentoo-commits

From: Patrick Lauer <patrick@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/zabbix/
Date: Sat, 01 Oct 2016 19:14:55
Message-Id: 1475349283.f2c984144c9e1e6709b8478d9a21918ec6dae8fb.patrick@gentoo
1 commit: f2c984144c9e1e6709b8478d9a21918ec6dae8fb
2 Author: Patrick Lauer <patrick <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 1 19:14:23 2016 +0000
4 Commit: Patrick Lauer <patrick <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 1 19:14:43 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2c98414
7
8 net-analyzer/zabbix: Bump
9
10 Package-Manager: portage-2.3.0
11
12 net-analyzer/zabbix/Manifest | 6 +-
13 net-analyzer/zabbix/zabbix-2.2.15.ebuild | 342 +++++++++++++++++++++++++++++++
14 net-analyzer/zabbix/zabbix-3.0.5.ebuild | 332 ++++++++++++++++++++++++++++++
15 net-analyzer/zabbix/zabbix-3.2.1.ebuild | 332 ++++++++++++++++++++++++++++++
16 4 files changed, 1009 insertions(+), 3 deletions(-)
17
18 diff --git a/net-analyzer/zabbix/Manifest b/net-analyzer/zabbix/Manifest
19 index 23e8e38..3068663 100644
20 --- a/net-analyzer/zabbix/Manifest
21 +++ b/net-analyzer/zabbix/Manifest
22 @@ -1,11 +1,11 @@
23 DIST zabbix-2.2.11.tar.gz 15147477 SHA256 9ad7bd71985dc316ee2a614bba2b1dd108d2a930c0a5cc5a8f75eb45a7a7e1ba SHA512 7447d3207bf67fdda67c1e56636ae114df7776a2ba4df4f9f260eef6a65e37d770ed73d6edd6438a9a783da1fc9bfede2d98acdc51fa6c7a130565efe8ae5b2d WHIRLPOOL e2b1f2ed019651d127a40f656117c9acccc8dcb1b9a8c0f9a773368de6d430d0716b5c50c42358992c9c2567c59cf0ec02bffea123ee4ac873be262aef0f2f6f
24 DIST zabbix-2.2.13.tar.gz 15478414 SHA256 0a272ad4de22368f9a77864e0a9fa566f76c872814e81845e16d4d24cd5452f4 SHA512 dc9a20069376de2221577f2833f003dd243f09e583a673038787dab413c0affa1a85abdef567d7ea015c2ff88d97481570cb3732f5d72f45d4e7f509654f93eb WHIRLPOOL 3f7385068fa65b693bfb280686242512dcc1a9a4d3df9af56319c17f1075c9ebf4dfa54aab18b6b5e645055fd8efcfd847fca3e0fe2e6041acc5f1342d0538b0
25 DIST zabbix-2.2.14.tar.gz 15481807 SHA256 76fa3f45168946b9fb4a22840b4b06054f1a09da93c910969eacd04217fa21c8 SHA512 98450ba663e1737fcbacdab6ed8d13f57634913b37fae50c091325c675fbc0739be55d7e7e5278bb8af7aac748deb81f2bc39b02ffece0553b256bd8dd8d7d18 WHIRLPOOL 543f3574f7357a0ea14bf247e1c23e887582253b110e739b2599d30f5b45f0f071978952fb3332e573a01e68f0f91d7d6b737af3c168d2258b28df7617298b5a
26 +DIST zabbix-2.2.15.tar.gz 15487398 SHA256 1dc370a04bc42bf21cdedc2dd53de051ac4a61d20ae83cd7c6e1cdd9c574f653 SHA512 4affb310f81ccba71ebb6fade953592ca88ec2bb57767cab53329e771d7e541094f29f4709da27e0236b2d6511618e5342ee2d6bf28ca2b4438c11f1060a892b WHIRLPOOL fcba3f0282c4ed258343a3061bbc1401080e1d44ad8f1837f5f91fa5fdffcb9b10c8f71de6326095fb5f321611d47bafda15b73762a0a861fc1a9c5d15d68f5c
27 DIST zabbix-2.2.5.tar.gz 14960556 SHA256 1e33f54d4accc5b6a0dccf4a308d27dc82de245567dffef823f9add9fa7d81b5 SHA512 0e229a2502f1332775db2107556b5e62267bcdf05dc483957960f563877ed970aef7ed465123576849413305e54309d83eeb75dd1f522c93cf09cd4b75265514 WHIRLPOOL 0a6b81f4e23ad8c8247b5356aa31bc4dfbd364642a647b9dff3216a0141cd2287b75731f396d26083aa412669a7efdb6f24fcb8592b4773c4a21d02b2f369681
28 DIST zabbix-2.2.9.tar.gz 15032149 SHA256 7c8c319b34beb978e4b7be8c93e084485f93fe028dd9dbc6b674a7498d324439 SHA512 8400f875546140a7393ac6598a02e95645ac63ece1d958e7752737d0c0fff25e70923f2dd1ea29a9e73640b159da8a5286d9b1c31fbb3f090acbd07606c6113d WHIRLPOOL cb68a2c1467c83e8c2e2662af3995d7d90a00408009df2d9fe0b0d0d81191521b3f6e1624240150f68419252324e0d6e5653a3f19ed3b88adeb2719277172fb6
29 -DIST zabbix-2.4.5.tar.gz 14851092 SHA256 4e2cf1e4893a45d83379a05e2debabddf16beab324c93e84adc0bb57716fb957 SHA512 bdcba684b3d1cdb9eb5e1f9b370ef450201de8dbd9fe1619ef2b2437de6c34762dc041fa873976c4af0a2af229eec450aa58b1663feb75b6345d303484d35ead WHIRLPOOL 775e98b85152268b19cde553ff8bc7e86c0f6c5b873e85a0faca3edb5b51fe7d02267e52b3dccb0f08847bf11c6d0ba6b2d9f1e6bd472c882a2fac4326a83e10
30 -DIST zabbix-2.4.7.tar.gz 15012768 SHA256 d2c47b8f5b9b91f18010d54c45de55845d979014a8b3fe4bef64e0b08f8b00da SHA512 81860dfab38241e939a5cced50527fd16d35ec7b82232b2e0a4f17c90c1fc8ffb9bb95891ec27bb87445e5f81fba066dccc6b1a8833a4af4f483532f83d6172a WHIRLPOOL 03525fa3113f258af7fbd9cf3f501846b466afa48dca2874f2e28562f63cf5824df51c89349f0c10830bb7b5650f70a32443ba9af2d826d99d02cf7bb2a01e21
31 -DIST zabbix-2.4.8.tar.gz 15474481 SHA256 073f7498ff7c07e51f3395dbd850b375144d6a41388409d898bb2826b0a3e1f0 SHA512 bf0816279f771448076bd8d8f1efe65651e24964b402ba128aace3d5afc0333f808a9d48b5763e334a05bc9f53fa934d81cc1b90072a0e9ba74b29205ab2b300 WHIRLPOOL 3e9da427680c3686820f3fb59bcac11614dea77ab577fd34fa339283b886306e94e4a3b73d5c966a8610e8d24992158b5f0ee3e3c2428152c1b7b92eb529d729
32 DIST zabbix-3.0.3.tar.gz 15407273 SHA256 1a42ce537580913268f1ece673208b49ca241fb067f8ea1ad497ce07455c10e0 SHA512 b59fd6e34e2636d1ad69993e33abe3694ba58f99c0372fc421c5620ade3ff497b23a022fa273691b968dabe0b9776fb0db6f6bf85e1d60d7dd5d61240bc60419 WHIRLPOOL 556e432a5c5bbf31ff2efce0d2b64c9b0ca959dfbba27aa2ec774c4880b38d8c8f82f968bc99c22cef15ad00b3a45b5dd89de6f2da4a4b17ce9db3f28a4e138f
33 DIST zabbix-3.0.4.tar.gz 15403727 SHA256 9fa47d97843b6ca9f550d706b40ee6b35b76c5165ff32ff11ef0474f161e7700 SHA512 e11bad801e4b978ac072a6701b202395d9566c0f319857dc997aaf978eb03c14e3d0d9fee5542eba27aec9881a0360f14f97864ffe4ac9ea58844d05c1a2425a WHIRLPOOL 58118c6606ec4e97eed022b307187b009cc37277b01e14f70626d2bef73ce5b71cc8a74f93f186f629caa721ba4ab2491e91bdcfae784db31d3ea1d5d751ad4c
34 +DIST zabbix-3.0.5.tar.gz 15412400 SHA256 641e608765e34edfc04ec005f7c501430105b7c3ec9210bbf52b73fda530c1a1 SHA512 ffee20f913ac3f3efaf8678940815004190f991ad61f3412d01f6d7685a95b12d313b44529d351d567c9cbd06974d0c17b2edf4ba23391b07919fa69a031b6bd WHIRLPOOL fe86deb3eb1db61916f9c85adc83cf55c857cace56de4a4a85e102cd2e557198033f58ddd5c3f5e9377ede8161003ed5f1e04aa2d9a206384381077adfffbad4
35 DIST zabbix-3.2.0.tar.gz 15806267 SHA256 036d1042359cb62e414d7fcf58bb09bcbf1eabfd7bc8d5dd60d0f3095765cd5c SHA512 e6a0957c4b14f4662996277f2051773e732dcc658998d671a2f4189180c91ccc6b72ba84a2a8e70affe17fb811405fcb5eab59f036de414c1b8ee2a654d21ce4 WHIRLPOOL 4e76bf68c6da0f8c93cbc65580ccca16dab4d96eddd86b30a8772e3726ce3852369e7af6cac71ea8da46900e507b24253dc0cf3f89d5d9e73bb7514b3ce38531
36 +DIST zabbix-3.2.1.tar.gz 15815404 SHA256 8926b96ef05cba041d05329130f40e8e1311ad201e58c75d22005eda4075c091 SHA512 85d43360c1cf4b5507d92a483a5e2a4283bea53e9b85f08c29ff36908ba43695a3ac89a69ca83f9f79f2a8336b96e1a1e9be6dc2f862e449006f8892e3c01961 WHIRLPOOL ec6c0054292400c8f6d9daf6eb97881a8d5b78d0276d8468a8dffbffc07535fc1bf9279ef3fb6e6e8215dde137b2595d5694bd7905bc3feb767bacd94becd140
37
38 diff --git a/net-analyzer/zabbix/zabbix-2.2.15.ebuild b/net-analyzer/zabbix/zabbix-2.2.15.ebuild
39 new file mode 100644
40 index 00000000..0bbbf88
41 --- /dev/null
42 +++ b/net-analyzer/zabbix/zabbix-2.2.15.ebuild
43 @@ -0,0 +1,342 @@
44 +# Copyright 1999-2016 Gentoo Foundation
45 +# Distributed under the terms of the GNU General Public License v2
46 +# $Id$
47 +
48 +EAPI="6"
49 +
50 +# needed to make webapp-config dep optional
51 +WEBAPP_OPTIONAL="yes"
52 +inherit flag-o-matic webapp java-pkg-opt-2 user systemd toolchain-funcs
53 +
54 +DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers"
55 +HOMEPAGE="http://www.zabbix.com/"
56 +MY_P=${P/_/}
57 +MY_PV=${PV/_/}
58 +SRC_URI="http://prdownloads.sourceforge.net/zabbix/${MY_P}.tar.gz"
59 +LICENSE="GPL-2"
60 +SLOT="0"
61 +WEBAPP_MANUAL_SLOT="yes"
62 +KEYWORDS="~amd64 ~x86"
63 +IUSE="+agent java curl frontend ipv6 xmpp ldap libxml2 mysql openipmi oracle postgres proxy server ssh snmp sqlite odbc static"
64 +REQUIRED_USE="|| ( agent frontend proxy server )
65 + proxy? ( ^^ ( mysql oracle postgres sqlite odbc ) )
66 + server? ( ^^ ( mysql oracle postgres sqlite odbc ) )
67 + static? ( !oracle !snmp )"
68 +
69 +COMMON_DEPEND="snmp? ( net-analyzer/net-snmp )
70 + ldap? (
71 + net-nds/openldap
72 + =dev-libs/cyrus-sasl-2*
73 + net-libs/gnutls
74 + )
75 + mysql? ( >=virtual/mysql-5.0.3 )
76 + sqlite? ( >=dev-db/sqlite-3.3.5 )
77 + postgres? ( dev-db/postgresql:* )
78 + oracle? ( >=dev-db/oracle-instantclient-basic-10.0.0.0 )
79 + xmpp? ( dev-libs/iksemel )
80 + libxml2? ( dev-libs/libxml2 )
81 + curl? ( net-misc/curl )
82 + openipmi? ( sys-libs/openipmi )
83 + ssh? ( net-libs/libssh2 )
84 + java? ( virtual/jdk:* )
85 + odbc? ( dev-db/unixODBC )"
86 +
87 +RDEPEND="${COMMON_DEPEND}
88 + proxy? ( net-analyzer/fping )
89 + server? ( net-analyzer/fping
90 + app-admin/webapp-config )
91 + java? (
92 + >=virtual/jre-1.4
93 + dev-java/slf4j-api
94 + )
95 + frontend? (
96 + >=dev-lang/php-5.3.0[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode]
97 + || ( dev-lang/php[apache2] dev-lang/php[cgi] dev-lang/php[fpm] )
98 + mysql? ( dev-lang/php[mysqli] )
99 + odbc? ( dev-lang/php[odbc] )
100 + oracle? ( dev-lang/php[oci8-instant-client] )
101 + postgres? ( dev-lang/php[postgres] )
102 + sqlite? ( dev-lang/php[sqlite] )
103 + media-libs/gd[png]
104 + app-admin/webapp-config )"
105 +DEPEND="${COMMON_DEPEND}
106 + static? (
107 + ldap? (
108 + net-nds/openldap[static-libs]
109 + =dev-libs/cyrus-sasl-2*[static-libs]
110 + net-libs/gnutls[static-libs]
111 + )
112 + mysql? ( >=virtual/mysql-5.0.3[static-libs] )
113 + sqlite? ( >=dev-db/sqlite-3.3.5[static-libs] )
114 + postgres? ( dev-db/postgresql:*[static-libs] )
115 + libxml2? ( dev-libs/libxml2[static-libs] )
116 + curl? ( net-misc/curl[static-libs] )
117 + ssh? ( net-libs/libssh2[static-libs] )
118 + odbc? ( dev-db/unixODBC[static-libs] )
119 + )
120 + virtual/pkgconfig"
121 +
122 +S=${WORKDIR}/${MY_P}
123 +
124 +ZABBIXJAVA_BASE="opt/zabbix_java"
125 +
126 +pkg_setup() {
127 + if use oracle; then
128 + if [ -z "${ORACLE_HOME}" ]; then
129 + eerror
130 + eerror "The environment variable ORACLE_HOME must be set"
131 + eerror "and point to the correct location."
132 + eerror "It looks like you don't have Oracle installed."
133 + eerror
134 + die "Environment variable ORACLE_HOME is not set"
135 + fi
136 + if has_version 'dev-db/oracle-instantclient-basic'; then
137 + ewarn
138 + ewarn "Please ensure you have a full install of the Oracle client."
139 + ewarn "dev-db/oracle-instantclient* is NOT sufficient."
140 + ewarn
141 + fi
142 + fi
143 +
144 + if use frontend; then
145 + webapp_pkg_setup
146 + fi
147 +
148 + enewgroup zabbix
149 + enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix
150 +}
151 +
152 +java_prepare() {
153 + cd "${S}/src/zabbix_java/lib"
154 + rm -v *.jar || die
155 +
156 + java-pkg_jar-from slf4j-api
157 +}
158 +
159 +src_prepare() {
160 + default
161 +}
162 +
163 +src_configure() {
164 + econf \
165 + $(use_enable server) \
166 + $(use_enable proxy) \
167 + $(use_enable agent) \
168 + $(use_enable ipv6) \
169 + $(use_enable static) \
170 + $(use_enable java) \
171 + $(use_with ldap) \
172 + $(use_with snmp net-snmp) \
173 + $(use_with mysql) \
174 + $(use_with postgres postgresql) \
175 + $(use_with oracle) \
176 + $(use_with sqlite sqlite3) \
177 + $(use_with xmpp jabber) \
178 + $(use_with curl libcurl) \
179 + $(use_with openipmi openipmi) \
180 + $(use_with ssh ssh2) \
181 + $(use_with libxml2) \
182 + $(use_with odbc unixodbc) \
183 + || die "econf failed"
184 +}
185 +
186 +src_compile() {
187 + if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
188 + emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" || die "emake failed"
189 + fi
190 +}
191 +
192 +src_install() {
193 + dodir \
194 + /etc/zabbix \
195 + /var/lib/zabbix \
196 + /var/lib/zabbix/home \
197 + /var/lib/zabbix/scripts \
198 + /var/lib/zabbix/alertscripts \
199 + /var/lib/zabbix/externalscripts \
200 + /var/log/zabbix
201 +
202 + keepdir \
203 + /etc/zabbix \
204 + /var/lib/zabbix \
205 + /var/lib/zabbix/home \
206 + /var/lib/zabbix/scripts \
207 + /var/lib/zabbix/alertscripts \
208 + /var/lib/zabbix/externalscripts \
209 + /var/log/zabbix
210 +
211 + if use server; then
212 + insinto /etc/zabbix
213 + doins "${FILESDIR}/2.2"/zabbix_server.conf
214 + doinitd "${FILESDIR}/2.2"/init.d/zabbix-server
215 + dosbin src/zabbix_server/zabbix_server
216 + fowners zabbix:zabbix /etc/zabbix/zabbix_server.conf
217 + fperms 0640 /etc/zabbix/zabbix_server.conf
218 + dodir /usr/share/zabbix
219 + /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
220 + systemd_dounit "${FILESDIR}/zabbix-server.service"
221 + systemd_newtmpfilesd "${FILESDIR}/zabbix-server.tmpfiles" zabbix-server.conf
222 + fi
223 +
224 + if use proxy; then
225 + doinitd \
226 + "${FILESDIR}/2.2"/init.d/zabbix-proxy
227 + dosbin \
228 + src/zabbix_proxy/zabbix_proxy
229 + insinto /etc/zabbix
230 + doins \
231 + "${FILESDIR}/2.2"/zabbix_proxy.conf
232 + dodir /usr/share/zabbix
233 + /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
234 + systemd_dounit "${FILESDIR}/zabbix-proxy.service"
235 + systemd_newtmpfilesd "${FILESDIR}/zabbix-proxy.tmpfiles" zabbix-proxy.conf
236 + fi
237 +
238 + if use agent; then
239 + insinto /etc/zabbix
240 + doins \
241 + "${FILESDIR}/2.2"/zabbix_agent.conf \
242 + "${FILESDIR}/2.2"/zabbix_agentd.conf
243 + doinitd "${FILESDIR}/2.2"/init.d/zabbix-agentd
244 + dosbin \
245 + src/zabbix_agent/zabbix_agent \
246 + src/zabbix_agent/zabbix_agentd
247 + dobin \
248 + src/zabbix_sender/zabbix_sender \
249 + src/zabbix_get/zabbix_get
250 + fowners zabbix:zabbix \
251 + /etc/zabbix/zabbix_agent.conf \
252 + /etc/zabbix/zabbix_agentd.conf
253 + fperms 0640 \
254 + /etc/zabbix/zabbix_agent.conf \
255 + /etc/zabbix/zabbix_agentd.conf
256 + systemd_dounit "${FILESDIR}/zabbix-agentd.service"
257 + systemd_newtmpfilesd "${FILESDIR}/zabbix-agentd.tmpfiles" zabbix-agentd.conf
258 + fi
259 +
260 + fowners zabbix:zabbix \
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 + 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_agent.conf \
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-0.9.27.jar \
305 + src/zabbix_java/lib/logback-console.xml \
306 + src/zabbix_java/lib/logback-core-0.9.27.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.6.1.jar
310 + exeinto /${ZABBIXJAVA_BASE}/
311 + doexe \
312 + src/zabbix_java/settings.sh \
313 + src/zabbix_java/startup.sh \
314 + src/zabbix_java/shutdown.sh
315 + fowners -R zabbix:zabbix /${ZABBIXJAVA_BASE}
316 + fi
317 +}
318 +
319 +pkg_postinst() {
320 + if use server || use proxy ; then
321 + elog
322 + elog "You may need to configure your database for Zabbix,"
323 + elog "if you have not already done so. "
324 + elog
325 +
326 + zabbix_homedir=$(egethome zabbix)
327 + if [ -n "${zabbix_homedir}" ] && \
328 + [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then
329 + ewarn
330 + ewarn "The user 'zabbix' should have his homedir changed"
331 + ewarn "to /var/lib/zabbix/home if you want to use"
332 + ewarn "custom alert scripts."
333 + ewarn
334 + ewarn "A real homedir might be needed for configfiles"
335 + ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when"
336 + ewarn "using sendxmpp for Jabber alerts)."
337 + ewarn
338 + ewarn "To change the homedir use:"
339 + ewarn " usermod -d /var/lib/zabbix/home zabbix"
340 + ewarn
341 + fi
342 + fi
343 +
344 + if use server; then
345 + elog
346 + elog "For distributed monitoring you have to run:"
347 + elog
348 + elog "zabbix_server -n <nodeid>"
349 + elog
350 + elog "This will convert database data for use with Node ID"
351 + elog "and also adds a local node."
352 + elog
353 + fi
354 +
355 + elog "--"
356 + elog
357 + elog "You may need to add these lines to /etc/services:"
358 + elog
359 + elog "zabbix-agent 10050/tcp Zabbix Agent"
360 + elog "zabbix-agent 10050/udp Zabbix Agent"
361 + elog "zabbix-trapper 10051/tcp Zabbix Trapper"
362 + elog "zabbix-trapper 10051/udp Zabbix Trapper"
363 + elog
364 +
365 + if use server || use proxy ; then
366 + # check for fping
367 + fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null)
368 + case "${fping_perms}" in
369 + 4[157][157][157])
370 + ;;
371 + *)
372 + ewarn
373 + ewarn "If you want to use the checks 'icmpping' and 'icmppingsec',"
374 + ewarn "you have to make /usr/sbin/fping setuid root and executable"
375 + ewarn "by everyone. Run the following command to fix it:"
376 + ewarn
377 + ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping"
378 + ewarn
379 + ewarn "Please be aware that this might impose a security risk,"
380 + ewarn "depending on the code quality of fping."
381 + ewarn
382 + ;;
383 + esac
384 + fi
385 +}
386
387 diff --git a/net-analyzer/zabbix/zabbix-3.0.5.ebuild b/net-analyzer/zabbix/zabbix-3.0.5.ebuild
388 new file mode 100644
389 index 00000000..212ccb7
390 --- /dev/null
391 +++ b/net-analyzer/zabbix/zabbix-3.0.5.ebuild
392 @@ -0,0 +1,332 @@
393 +# Copyright 1999-2016 Gentoo Foundation
394 +# Distributed under the terms of the GNU General Public License v2
395 +# $Id$
396 +
397 +EAPI="6"
398 +
399 +# needed to make webapp-config dep optional
400 +WEBAPP_OPTIONAL="yes"
401 +inherit flag-o-matic webapp java-pkg-opt-2 user systemd toolchain-funcs
402 +
403 +DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers"
404 +HOMEPAGE="http://www.zabbix.com/"
405 +MY_P=${P/_/}
406 +MY_PV=${PV/_/}
407 +SRC_URI="http://prdownloads.sourceforge.net/zabbix/${MY_P}.tar.gz"
408 +LICENSE="GPL-2"
409 +SLOT="0"
410 +WEBAPP_MANUAL_SLOT="yes"
411 +KEYWORDS="~amd64 ~x86"
412 +IUSE="+agent java curl frontend ipv6 xmpp ldap libxml2 mysql openipmi oracle postgres proxy server ssh ssl snmp sqlite odbc static"
413 +REQUIRED_USE="|| ( agent frontend proxy server )
414 + proxy? ( ^^ ( mysql oracle postgres sqlite odbc ) )
415 + server? ( ^^ ( mysql oracle postgres sqlite odbc ) )
416 + static? ( !oracle !snmp )"
417 +
418 +COMMON_DEPEND="snmp? ( net-analyzer/net-snmp )
419 + ldap? (
420 + net-nds/openldap
421 + =dev-libs/cyrus-sasl-2*
422 + net-libs/gnutls
423 + )
424 + mysql? ( >=virtual/mysql-5.0.3 )
425 + sqlite? ( >=dev-db/sqlite-3.3.5 )
426 + postgres? ( dev-db/postgresql:* )
427 + oracle? ( >=dev-db/oracle-instantclient-basic-10.0.0.0 )
428 + xmpp? ( dev-libs/iksemel )
429 + libxml2? ( dev-libs/libxml2 )
430 + curl? ( net-misc/curl )
431 + openipmi? ( sys-libs/openipmi )
432 + ssh? ( net-libs/libssh2 )
433 + java? ( virtual/jdk:* )
434 + odbc? ( dev-db/unixODBC )
435 + ssl? ( dev-libs/openssl:=[-bindist] )"
436 +
437 +RDEPEND="${COMMON_DEPEND}
438 + proxy? ( net-analyzer/fping )
439 + server? ( net-analyzer/fping
440 + app-admin/webapp-config )
441 + java? (
442 + >=virtual/jre-1.4
443 + dev-java/slf4j-api
444 + )
445 + frontend? (
446 + >=dev-lang/php-5.3.0[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode]
447 + || ( dev-lang/php[apache2] dev-lang/php[cgi] dev-lang/php[fpm] )
448 + mysql? ( dev-lang/php[mysqli] )
449 + odbc? ( dev-lang/php[odbc] )
450 + oracle? ( dev-lang/php[oci8-instant-client] )
451 + postgres? ( dev-lang/php[postgres] )
452 + sqlite? ( dev-lang/php[sqlite] )
453 + media-libs/gd[png]
454 + app-admin/webapp-config )"
455 +DEPEND="${COMMON_DEPEND}
456 + static? (
457 + ldap? (
458 + net-nds/openldap[static-libs]
459 + =dev-libs/cyrus-sasl-2*[static-libs]
460 + net-libs/gnutls[static-libs]
461 + )
462 + mysql? ( >=virtual/mysql-5.0.3[static-libs] )
463 + sqlite? ( >=dev-db/sqlite-3.3.5[static-libs] )
464 + postgres? ( dev-db/postgresql:*[static-libs] )
465 + libxml2? ( dev-libs/libxml2[static-libs] )
466 + curl? ( net-misc/curl[static-libs] )
467 + ssh? ( net-libs/libssh2[static-libs] )
468 + odbc? ( dev-db/unixODBC[static-libs] )
469 + )
470 + virtual/pkgconfig"
471 +
472 +S=${WORKDIR}/${MY_P}
473 +
474 +ZABBIXJAVA_BASE="opt/zabbix_java"
475 +
476 +pkg_setup() {
477 + if use oracle; then
478 + if [ -z "${ORACLE_HOME}" ]; then
479 + eerror
480 + eerror "The environment variable ORACLE_HOME must be set"
481 + eerror "and point to the correct location."
482 + eerror "It looks like you don't have Oracle installed."
483 + eerror
484 + die "Environment variable ORACLE_HOME is not set"
485 + fi
486 + if has_version 'dev-db/oracle-instantclient-basic'; then
487 + ewarn
488 + ewarn "Please ensure you have a full install of the Oracle client."
489 + ewarn "dev-db/oracle-instantclient* is NOT sufficient."
490 + ewarn
491 + fi
492 + fi
493 +
494 + if use frontend; then
495 + webapp_pkg_setup
496 + fi
497 +
498 + enewgroup zabbix
499 + enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix
500 +}
501 +
502 +java_prepare() {
503 + cd "${S}/src/zabbix_java/lib"
504 + rm -v *.jar || die
505 +
506 + java-pkg_jar-from slf4j-api
507 +}
508 +
509 +src_prepare() {
510 + default
511 +}
512 +
513 +src_configure() {
514 + econf \
515 + $(use_enable server) \
516 + $(use_enable proxy) \
517 + $(use_enable agent) \
518 + $(use_enable ipv6) \
519 + $(use_enable static) \
520 + $(use_enable java) \
521 + $(use_with ldap) \
522 + $(use_with snmp net-snmp) \
523 + $(use_with mysql) \
524 + $(use_with postgres postgresql) \
525 + $(use_with oracle) \
526 + $(use_with sqlite sqlite3) \
527 + $(use_with xmpp jabber) \
528 + $(use_with curl libcurl) \
529 + $(use_with openipmi openipmi) \
530 + $(use_with ssh ssh2) \
531 + $(use_with libxml2) \
532 + $(use_with odbc unixodbc) \
533 + $(use_with ssl openssl) \
534 + || die "econf failed"
535 +}
536 +
537 +src_compile() {
538 + if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
539 + emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" || die "emake failed"
540 + fi
541 +}
542 +
543 +src_install() {
544 + dodir \
545 + /etc/zabbix \
546 + /var/lib/zabbix \
547 + /var/lib/zabbix/home \
548 + /var/lib/zabbix/scripts \
549 + /var/lib/zabbix/alertscripts \
550 + /var/lib/zabbix/externalscripts \
551 + /var/log/zabbix
552 +
553 + keepdir \
554 + /etc/zabbix \
555 + /var/lib/zabbix \
556 + /var/lib/zabbix/home \
557 + /var/lib/zabbix/scripts \
558 + /var/lib/zabbix/alertscripts \
559 + /var/lib/zabbix/externalscripts \
560 + /var/log/zabbix
561 +
562 + if use server; then
563 + insinto /etc/zabbix
564 + doins "${FILESDIR}/3.0"/zabbix_server.conf
565 + doinitd "${FILESDIR}/3.0"/init.d/zabbix-server
566 + dosbin src/zabbix_server/zabbix_server
567 + fowners zabbix:zabbix /etc/zabbix/zabbix_server.conf
568 + fperms 0640 /etc/zabbix/zabbix_server.conf
569 + dodir /usr/share/zabbix
570 + /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
571 + systemd_dounit "${FILESDIR}/zabbix-server.service"
572 + systemd_newtmpfilesd "${FILESDIR}/zabbix-server.tmpfiles" zabbix-server.conf
573 + fi
574 +
575 + if use proxy; then
576 + doinitd "${FILESDIR}/3.0"/init.d/zabbix-proxy
577 + dosbin src/zabbix_proxy/zabbix_proxy
578 + insinto /etc/zabbix
579 + doins "${FILESDIR}/3.0"/zabbix_proxy.conf
580 + dodir /usr/share/zabbix
581 + /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
582 + systemd_dounit "${FILESDIR}/zabbix-proxy.service"
583 + systemd_newtmpfilesd "${FILESDIR}/zabbix-proxy.tmpfiles" zabbix-proxy.conf
584 + fi
585 +
586 + if use agent; then
587 + insinto /etc/zabbix
588 + doins "${FILESDIR}/3.0"/zabbix_agentd.conf
589 + doinitd "${FILESDIR}/3.0"/init.d/zabbix-agentd
590 + dosbin src/zabbix_agent/zabbix_agentd
591 + dobin \
592 + src/zabbix_sender/zabbix_sender \
593 + src/zabbix_get/zabbix_get
594 + fowners zabbix:zabbix /etc/zabbix/zabbix_agentd.conf
595 + fperms 0640 /etc/zabbix/zabbix_agentd.conf
596 + systemd_dounit "${FILESDIR}/zabbix-agentd.service"
597 + systemd_newtmpfilesd "${FILESDIR}/zabbix-agentd.tmpfiles" zabbix-agentd.conf
598 + fi
599 +
600 + fowners zabbix:zabbix \
601 + /etc/zabbix \
602 + /var/lib/zabbix \
603 + /var/lib/zabbix/home \
604 + /var/lib/zabbix/scripts \
605 + /var/lib/zabbix/alertscripts \
606 + /var/lib/zabbix/externalscripts \
607 + /var/log/zabbix
608 + fperms 0750 \
609 + /etc/zabbix \
610 + /var/lib/zabbix \
611 + /var/lib/zabbix/home \
612 + /var/lib/zabbix/scripts \
613 + /var/lib/zabbix/alertscripts \
614 + /var/lib/zabbix/externalscripts \
615 + /var/log/zabbix
616 +
617 + dodoc README INSTALL NEWS ChangeLog \
618 + conf/zabbix_agentd.conf \
619 + conf/zabbix_proxy.conf \
620 + conf/zabbix_agentd/userparameter_examples.conf \
621 + conf/zabbix_agentd/userparameter_mysql.conf \
622 + conf/zabbix_server.conf
623 +
624 + if use frontend; then
625 + webapp_src_preinst
626 + cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}"
627 + webapp_configfile \
628 + "${MY_HTDOCSDIR}"/include/db.inc.php \
629 + "${MY_HTDOCSDIR}"/include/config.inc.php
630 + webapp_src_install
631 + fi
632 +
633 + if use java; then
634 + dodir \
635 + /${ZABBIXJAVA_BASE} \
636 + /${ZABBIXJAVA_BASE}/bin \
637 + /${ZABBIXJAVA_BASE}/lib
638 + keepdir /${ZABBIXJAVA_BASE}
639 + exeinto /${ZABBIXJAVA_BASE}/bin
640 + doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar
641 + exeinto /${ZABBIXJAVA_BASE}/lib
642 + doexe \
643 + src/zabbix_java/lib/logback-classic-0.9.27.jar \
644 + src/zabbix_java/lib/logback-console.xml \
645 + src/zabbix_java/lib/logback-core-0.9.27.jar \
646 + src/zabbix_java/lib/logback.xml \
647 + src/zabbix_java/lib/android-json-4.3_r3.1.jar \
648 + src/zabbix_java/lib/slf4j-api-1.6.1.jar
649 + exeinto /${ZABBIXJAVA_BASE}/
650 + doexe \
651 + src/zabbix_java/settings.sh \
652 + src/zabbix_java/startup.sh \
653 + src/zabbix_java/shutdown.sh
654 + fowners -R zabbix:zabbix /${ZABBIXJAVA_BASE}
655 + fi
656 +}
657 +
658 +pkg_postinst() {
659 + if use server || use proxy ; then
660 + elog
661 + elog "You may need to configure your database for Zabbix,"
662 + elog "if you have not already done so. "
663 + elog
664 +
665 + zabbix_homedir=$(egethome zabbix)
666 + if [ -n "${zabbix_homedir}" ] && \
667 + [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then
668 + ewarn
669 + ewarn "The user 'zabbix' should have his homedir changed"
670 + ewarn "to /var/lib/zabbix/home if you want to use"
671 + ewarn "custom alert scripts."
672 + ewarn
673 + ewarn "A real homedir might be needed for configfiles"
674 + ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when"
675 + ewarn "using sendxmpp for Jabber alerts)."
676 + ewarn
677 + ewarn "To change the homedir use:"
678 + ewarn " usermod -d /var/lib/zabbix/home zabbix"
679 + ewarn
680 + fi
681 + fi
682 +
683 + if use server; then
684 + elog
685 + elog "For distributed monitoring you have to run:"
686 + elog
687 + elog "zabbix_server -n <nodeid>"
688 + elog
689 + elog "This will convert database data for use with Node ID"
690 + elog "and also adds a local node."
691 + elog
692 + fi
693 +
694 + elog "--"
695 + elog
696 + elog "You may need to add these lines to /etc/services:"
697 + elog
698 + elog "zabbix-agent 10050/tcp Zabbix Agent"
699 + elog "zabbix-agent 10050/udp Zabbix Agent"
700 + elog "zabbix-trapper 10051/tcp Zabbix Trapper"
701 + elog "zabbix-trapper 10051/udp Zabbix Trapper"
702 + elog
703 +
704 + if use server || use proxy ; then
705 + # check for fping
706 + fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null)
707 + case "${fping_perms}" in
708 + 4[157][157][157])
709 + ;;
710 + *)
711 + ewarn
712 + ewarn "If you want to use the checks 'icmpping' and 'icmppingsec',"
713 + ewarn "you have to make /usr/sbin/fping setuid root and executable"
714 + ewarn "by everyone. Run the following command to fix it:"
715 + ewarn
716 + ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping"
717 + ewarn
718 + ewarn "Please be aware that this might impose a security risk,"
719 + ewarn "depending on the code quality of fping."
720 + ewarn
721 + ;;
722 + esac
723 + fi
724 +}
725
726 diff --git a/net-analyzer/zabbix/zabbix-3.2.1.ebuild b/net-analyzer/zabbix/zabbix-3.2.1.ebuild
727 new file mode 100644
728 index 00000000..212ccb7
729 --- /dev/null
730 +++ b/net-analyzer/zabbix/zabbix-3.2.1.ebuild
731 @@ -0,0 +1,332 @@
732 +# Copyright 1999-2016 Gentoo Foundation
733 +# Distributed under the terms of the GNU General Public License v2
734 +# $Id$
735 +
736 +EAPI="6"
737 +
738 +# needed to make webapp-config dep optional
739 +WEBAPP_OPTIONAL="yes"
740 +inherit flag-o-matic webapp java-pkg-opt-2 user systemd toolchain-funcs
741 +
742 +DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers"
743 +HOMEPAGE="http://www.zabbix.com/"
744 +MY_P=${P/_/}
745 +MY_PV=${PV/_/}
746 +SRC_URI="http://prdownloads.sourceforge.net/zabbix/${MY_P}.tar.gz"
747 +LICENSE="GPL-2"
748 +SLOT="0"
749 +WEBAPP_MANUAL_SLOT="yes"
750 +KEYWORDS="~amd64 ~x86"
751 +IUSE="+agent java curl frontend ipv6 xmpp ldap libxml2 mysql openipmi oracle postgres proxy server ssh ssl snmp sqlite odbc static"
752 +REQUIRED_USE="|| ( agent frontend proxy server )
753 + proxy? ( ^^ ( mysql oracle postgres sqlite odbc ) )
754 + server? ( ^^ ( mysql oracle postgres sqlite odbc ) )
755 + static? ( !oracle !snmp )"
756 +
757 +COMMON_DEPEND="snmp? ( net-analyzer/net-snmp )
758 + ldap? (
759 + net-nds/openldap
760 + =dev-libs/cyrus-sasl-2*
761 + net-libs/gnutls
762 + )
763 + mysql? ( >=virtual/mysql-5.0.3 )
764 + sqlite? ( >=dev-db/sqlite-3.3.5 )
765 + postgres? ( dev-db/postgresql:* )
766 + oracle? ( >=dev-db/oracle-instantclient-basic-10.0.0.0 )
767 + xmpp? ( dev-libs/iksemel )
768 + libxml2? ( dev-libs/libxml2 )
769 + curl? ( net-misc/curl )
770 + openipmi? ( sys-libs/openipmi )
771 + ssh? ( net-libs/libssh2 )
772 + java? ( virtual/jdk:* )
773 + odbc? ( dev-db/unixODBC )
774 + ssl? ( dev-libs/openssl:=[-bindist] )"
775 +
776 +RDEPEND="${COMMON_DEPEND}
777 + proxy? ( net-analyzer/fping )
778 + server? ( net-analyzer/fping
779 + app-admin/webapp-config )
780 + java? (
781 + >=virtual/jre-1.4
782 + dev-java/slf4j-api
783 + )
784 + frontend? (
785 + >=dev-lang/php-5.3.0[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode]
786 + || ( dev-lang/php[apache2] dev-lang/php[cgi] dev-lang/php[fpm] )
787 + mysql? ( dev-lang/php[mysqli] )
788 + odbc? ( dev-lang/php[odbc] )
789 + oracle? ( dev-lang/php[oci8-instant-client] )
790 + postgres? ( dev-lang/php[postgres] )
791 + sqlite? ( dev-lang/php[sqlite] )
792 + media-libs/gd[png]
793 + app-admin/webapp-config )"
794 +DEPEND="${COMMON_DEPEND}
795 + static? (
796 + ldap? (
797 + net-nds/openldap[static-libs]
798 + =dev-libs/cyrus-sasl-2*[static-libs]
799 + net-libs/gnutls[static-libs]
800 + )
801 + mysql? ( >=virtual/mysql-5.0.3[static-libs] )
802 + sqlite? ( >=dev-db/sqlite-3.3.5[static-libs] )
803 + postgres? ( dev-db/postgresql:*[static-libs] )
804 + libxml2? ( dev-libs/libxml2[static-libs] )
805 + curl? ( net-misc/curl[static-libs] )
806 + ssh? ( net-libs/libssh2[static-libs] )
807 + odbc? ( dev-db/unixODBC[static-libs] )
808 + )
809 + virtual/pkgconfig"
810 +
811 +S=${WORKDIR}/${MY_P}
812 +
813 +ZABBIXJAVA_BASE="opt/zabbix_java"
814 +
815 +pkg_setup() {
816 + if use oracle; then
817 + if [ -z "${ORACLE_HOME}" ]; then
818 + eerror
819 + eerror "The environment variable ORACLE_HOME must be set"
820 + eerror "and point to the correct location."
821 + eerror "It looks like you don't have Oracle installed."
822 + eerror
823 + die "Environment variable ORACLE_HOME is not set"
824 + fi
825 + if has_version 'dev-db/oracle-instantclient-basic'; then
826 + ewarn
827 + ewarn "Please ensure you have a full install of the Oracle client."
828 + ewarn "dev-db/oracle-instantclient* is NOT sufficient."
829 + ewarn
830 + fi
831 + fi
832 +
833 + if use frontend; then
834 + webapp_pkg_setup
835 + fi
836 +
837 + enewgroup zabbix
838 + enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix
839 +}
840 +
841 +java_prepare() {
842 + cd "${S}/src/zabbix_java/lib"
843 + rm -v *.jar || die
844 +
845 + java-pkg_jar-from slf4j-api
846 +}
847 +
848 +src_prepare() {
849 + default
850 +}
851 +
852 +src_configure() {
853 + econf \
854 + $(use_enable server) \
855 + $(use_enable proxy) \
856 + $(use_enable agent) \
857 + $(use_enable ipv6) \
858 + $(use_enable static) \
859 + $(use_enable java) \
860 + $(use_with ldap) \
861 + $(use_with snmp net-snmp) \
862 + $(use_with mysql) \
863 + $(use_with postgres postgresql) \
864 + $(use_with oracle) \
865 + $(use_with sqlite sqlite3) \
866 + $(use_with xmpp jabber) \
867 + $(use_with curl libcurl) \
868 + $(use_with openipmi openipmi) \
869 + $(use_with ssh ssh2) \
870 + $(use_with libxml2) \
871 + $(use_with odbc unixodbc) \
872 + $(use_with ssl openssl) \
873 + || die "econf failed"
874 +}
875 +
876 +src_compile() {
877 + if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
878 + emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" || die "emake failed"
879 + fi
880 +}
881 +
882 +src_install() {
883 + dodir \
884 + /etc/zabbix \
885 + /var/lib/zabbix \
886 + /var/lib/zabbix/home \
887 + /var/lib/zabbix/scripts \
888 + /var/lib/zabbix/alertscripts \
889 + /var/lib/zabbix/externalscripts \
890 + /var/log/zabbix
891 +
892 + keepdir \
893 + /etc/zabbix \
894 + /var/lib/zabbix \
895 + /var/lib/zabbix/home \
896 + /var/lib/zabbix/scripts \
897 + /var/lib/zabbix/alertscripts \
898 + /var/lib/zabbix/externalscripts \
899 + /var/log/zabbix
900 +
901 + if use server; then
902 + insinto /etc/zabbix
903 + doins "${FILESDIR}/3.0"/zabbix_server.conf
904 + doinitd "${FILESDIR}/3.0"/init.d/zabbix-server
905 + dosbin src/zabbix_server/zabbix_server
906 + fowners zabbix:zabbix /etc/zabbix/zabbix_server.conf
907 + fperms 0640 /etc/zabbix/zabbix_server.conf
908 + dodir /usr/share/zabbix
909 + /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
910 + systemd_dounit "${FILESDIR}/zabbix-server.service"
911 + systemd_newtmpfilesd "${FILESDIR}/zabbix-server.tmpfiles" zabbix-server.conf
912 + fi
913 +
914 + if use proxy; then
915 + doinitd "${FILESDIR}/3.0"/init.d/zabbix-proxy
916 + dosbin src/zabbix_proxy/zabbix_proxy
917 + insinto /etc/zabbix
918 + doins "${FILESDIR}/3.0"/zabbix_proxy.conf
919 + dodir /usr/share/zabbix
920 + /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
921 + systemd_dounit "${FILESDIR}/zabbix-proxy.service"
922 + systemd_newtmpfilesd "${FILESDIR}/zabbix-proxy.tmpfiles" zabbix-proxy.conf
923 + fi
924 +
925 + if use agent; then
926 + insinto /etc/zabbix
927 + doins "${FILESDIR}/3.0"/zabbix_agentd.conf
928 + doinitd "${FILESDIR}/3.0"/init.d/zabbix-agentd
929 + dosbin src/zabbix_agent/zabbix_agentd
930 + dobin \
931 + src/zabbix_sender/zabbix_sender \
932 + src/zabbix_get/zabbix_get
933 + fowners zabbix:zabbix /etc/zabbix/zabbix_agentd.conf
934 + fperms 0640 /etc/zabbix/zabbix_agentd.conf
935 + systemd_dounit "${FILESDIR}/zabbix-agentd.service"
936 + systemd_newtmpfilesd "${FILESDIR}/zabbix-agentd.tmpfiles" zabbix-agentd.conf
937 + fi
938 +
939 + fowners zabbix:zabbix \
940 + /etc/zabbix \
941 + /var/lib/zabbix \
942 + /var/lib/zabbix/home \
943 + /var/lib/zabbix/scripts \
944 + /var/lib/zabbix/alertscripts \
945 + /var/lib/zabbix/externalscripts \
946 + /var/log/zabbix
947 + fperms 0750 \
948 + /etc/zabbix \
949 + /var/lib/zabbix \
950 + /var/lib/zabbix/home \
951 + /var/lib/zabbix/scripts \
952 + /var/lib/zabbix/alertscripts \
953 + /var/lib/zabbix/externalscripts \
954 + /var/log/zabbix
955 +
956 + dodoc README INSTALL NEWS ChangeLog \
957 + conf/zabbix_agentd.conf \
958 + conf/zabbix_proxy.conf \
959 + conf/zabbix_agentd/userparameter_examples.conf \
960 + conf/zabbix_agentd/userparameter_mysql.conf \
961 + conf/zabbix_server.conf
962 +
963 + if use frontend; then
964 + webapp_src_preinst
965 + cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}"
966 + webapp_configfile \
967 + "${MY_HTDOCSDIR}"/include/db.inc.php \
968 + "${MY_HTDOCSDIR}"/include/config.inc.php
969 + webapp_src_install
970 + fi
971 +
972 + if use java; then
973 + dodir \
974 + /${ZABBIXJAVA_BASE} \
975 + /${ZABBIXJAVA_BASE}/bin \
976 + /${ZABBIXJAVA_BASE}/lib
977 + keepdir /${ZABBIXJAVA_BASE}
978 + exeinto /${ZABBIXJAVA_BASE}/bin
979 + doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar
980 + exeinto /${ZABBIXJAVA_BASE}/lib
981 + doexe \
982 + src/zabbix_java/lib/logback-classic-0.9.27.jar \
983 + src/zabbix_java/lib/logback-console.xml \
984 + src/zabbix_java/lib/logback-core-0.9.27.jar \
985 + src/zabbix_java/lib/logback.xml \
986 + src/zabbix_java/lib/android-json-4.3_r3.1.jar \
987 + src/zabbix_java/lib/slf4j-api-1.6.1.jar
988 + exeinto /${ZABBIXJAVA_BASE}/
989 + doexe \
990 + src/zabbix_java/settings.sh \
991 + src/zabbix_java/startup.sh \
992 + src/zabbix_java/shutdown.sh
993 + fowners -R zabbix:zabbix /${ZABBIXJAVA_BASE}
994 + fi
995 +}
996 +
997 +pkg_postinst() {
998 + if use server || use proxy ; then
999 + elog
1000 + elog "You may need to configure your database for Zabbix,"
1001 + elog "if you have not already done so. "
1002 + elog
1003 +
1004 + zabbix_homedir=$(egethome zabbix)
1005 + if [ -n "${zabbix_homedir}" ] && \
1006 + [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then
1007 + ewarn
1008 + ewarn "The user 'zabbix' should have his homedir changed"
1009 + ewarn "to /var/lib/zabbix/home if you want to use"
1010 + ewarn "custom alert scripts."
1011 + ewarn
1012 + ewarn "A real homedir might be needed for configfiles"
1013 + ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when"
1014 + ewarn "using sendxmpp for Jabber alerts)."
1015 + ewarn
1016 + ewarn "To change the homedir use:"
1017 + ewarn " usermod -d /var/lib/zabbix/home zabbix"
1018 + ewarn
1019 + fi
1020 + fi
1021 +
1022 + if use server; then
1023 + elog
1024 + elog "For distributed monitoring you have to run:"
1025 + elog
1026 + elog "zabbix_server -n <nodeid>"
1027 + elog
1028 + elog "This will convert database data for use with Node ID"
1029 + elog "and also adds a local node."
1030 + elog
1031 + fi
1032 +
1033 + elog "--"
1034 + elog
1035 + elog "You may need to add these lines to /etc/services:"
1036 + elog
1037 + elog "zabbix-agent 10050/tcp Zabbix Agent"
1038 + elog "zabbix-agent 10050/udp Zabbix Agent"
1039 + elog "zabbix-trapper 10051/tcp Zabbix Trapper"
1040 + elog "zabbix-trapper 10051/udp Zabbix Trapper"
1041 + elog
1042 +
1043 + if use server || use proxy ; then
1044 + # check for fping
1045 + fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null)
1046 + case "${fping_perms}" in
1047 + 4[157][157][157])
1048 + ;;
1049 + *)
1050 + ewarn
1051 + ewarn "If you want to use the checks 'icmpping' and 'icmppingsec',"
1052 + ewarn "you have to make /usr/sbin/fping setuid root and executable"
1053 + ewarn "by everyone. Run the following command to fix it:"
1054 + ewarn
1055 + ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping"
1056 + ewarn
1057 + ewarn "Please be aware that this might impose a security risk,"
1058 + ewarn "depending on the code quality of fping."
1059 + ewarn
1060 + ;;
1061 + esac
1062 + fi
1063 +}