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