Gentoo Archives: gentoo-commits

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