Gentoo Archives: gentoo-commits

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