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