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