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