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