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