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