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