Gentoo Archives: gentoo-commits

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