1 |
mattm 14/02/23 01:16:41 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: zabbix-2.2.2_rc2-r3.ebuild |
5 |
Removed: zabbix-2.0.9-r1.ebuild zabbix-2.2.2_rc2-r1.ebuild |
6 |
zabbix-2.2.2_rc2-r2.ebuild zabbix-2.2.0-r4.ebuild |
7 |
zabbix-2.2.0-r5.ebuild |
8 |
Log: |
9 |
Wrap systemd file install with if use systemd; |
10 |
|
11 |
(Portage version: 2.2.8/cvs/Linux x86_64, signed Manifest commit with key 786037A7) |
12 |
|
13 |
Revision Changes Path |
14 |
1.157 net-analyzer/zabbix/ChangeLog |
15 |
|
16 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/ChangeLog?rev=1.157&view=markup |
17 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/ChangeLog?rev=1.157&content-type=text/plain |
18 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/ChangeLog?r1=1.156&r2=1.157 |
19 |
|
20 |
Index: ChangeLog |
21 |
=================================================================== |
22 |
RCS file: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/ChangeLog,v |
23 |
retrieving revision 1.156 |
24 |
retrieving revision 1.157 |
25 |
diff -u -r1.156 -r1.157 |
26 |
--- ChangeLog 16 Feb 2014 07:08:51 -0000 1.156 |
27 |
+++ ChangeLog 23 Feb 2014 01:16:41 -0000 1.157 |
28 |
@@ -1,6 +1,13 @@ |
29 |
# ChangeLog for net-analyzer/zabbix |
30 |
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
31 |
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/ChangeLog,v 1.156 2014/02/16 07:08:51 ago Exp $ |
32 |
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/ChangeLog,v 1.157 2014/02/23 01:16:41 mattm Exp $ |
33 |
+ |
34 |
+*zabbix-2.2.2_rc2-r3 (23 Feb 2014) |
35 |
+ |
36 |
+ 23 Feb 2014; Matthew Marlowe <mattm@g.o> +zabbix-2.2.2_rc2-r3.ebuild, |
37 |
+ -zabbix-2.0.9-r1.ebuild, -zabbix-2.2.0-r4.ebuild, -zabbix-2.2.0-r5.ebuild, |
38 |
+ -zabbix-2.2.2_rc2-r1.ebuild, -zabbix-2.2.2_rc2-r2.ebuild: |
39 |
+ Wrap systemd file install with if use systemd; |
40 |
|
41 |
16 Feb 2014; Agostino Sarubbo <ago@g.o> zabbix-2.0.11_rc1-r1.ebuild: |
42 |
Stable for x86, wrt bug #500342 |
43 |
|
44 |
|
45 |
|
46 |
1.1 net-analyzer/zabbix/zabbix-2.2.2_rc2-r3.ebuild |
47 |
|
48 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/zabbix-2.2.2_rc2-r3.ebuild?rev=1.1&view=markup |
49 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/zabbix-2.2.2_rc2-r3.ebuild?rev=1.1&content-type=text/plain |
50 |
|
51 |
Index: zabbix-2.2.2_rc2-r3.ebuild |
52 |
=================================================================== |
53 |
# Copyright 1999-2014 Gentoo Foundation |
54 |
# Distributed under the terms of the GNU General Public License v2 |
55 |
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/zabbix-2.2.2_rc2-r3.ebuild,v 1.1 2014/02/23 01:16:41 mattm Exp $ |
56 |
|
57 |
EAPI="5" |
58 |
|
59 |
# needed to make webapp-config dep optional |
60 |
WEBAPP_OPTIONAL="yes" |
61 |
inherit flag-o-matic webapp depend.php autotools java-pkg-opt-2 user systemd toolchain-funcs |
62 |
|
63 |
DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers." |
64 |
HOMEPAGE="http://www.zabbix.com/" |
65 |
MY_P=${P/_/} |
66 |
MY_PV=${PV/_/} |
67 |
SRC_URI="http://prdownloads.sourceforge.net/zabbix/${MY_P}.tar.gz" |
68 |
LICENSE="GPL-2" |
69 |
SLOT="0" |
70 |
WEBAPP_MANUAL_SLOT="yes" |
71 |
KEYWORDS="~amd64 ~x86" |
72 |
IUSE="agent java curl frontend ipv6 jabber ldap libxml2 mysql openipmi oracle postgres proxy server ssh snmp sqlite odbc static" |
73 |
|
74 |
COMMON_DEPEND="snmp? ( net-analyzer/net-snmp ) |
75 |
ldap? ( |
76 |
net-nds/openldap |
77 |
=dev-libs/cyrus-sasl-2* |
78 |
net-libs/gnutls |
79 |
) |
80 |
mysql? ( >=virtual/mysql-5.0.3 ) |
81 |
sqlite? ( >=dev-db/sqlite-3.3.5 ) |
82 |
postgres? ( >=dev-db/postgresql-base-8.3.0 ) |
83 |
oracle? ( >=dev-db/oracle-instantclient-basic-10.0.0.0 ) |
84 |
jabber? ( dev-libs/iksemel ) |
85 |
libxml2? ( dev-libs/libxml2 ) |
86 |
curl? ( net-misc/curl ) |
87 |
openipmi? ( sys-libs/openipmi ) |
88 |
ssh? ( net-libs/libssh2 ) |
89 |
java? ( >=virtual/jdk-1.4 ) |
90 |
odbc? ( dev-db/unixODBC )" |
91 |
|
92 |
RDEPEND="${COMMON_DEPEND} |
93 |
proxy? ( <=net-analyzer/fping-2.9 ) |
94 |
server? ( <=net-analyzer/fping-2.9 |
95 |
app-admin/webapp-config ) |
96 |
java? ( |
97 |
>=virtual/jre-1.4 |
98 |
dev-java/slf4j-api |
99 |
dev-java/json-simple |
100 |
) |
101 |
frontend? ( |
102 |
>=dev-lang/php-5.3.0[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode] |
103 |
|| ( dev-lang/php[apache2] dev-lang/php[cgi] dev-lang/php[fpm] ) |
104 |
media-libs/gd[png] |
105 |
app-admin/webapp-config )" |
106 |
DEPEND="${COMMON_DEPEND} |
107 |
virtual/pkgconfig" |
108 |
|
109 |
S=${WORKDIR}/${MY_P} |
110 |
|
111 |
ZABBIXJAVA_BASE="opt/zabbix_java" |
112 |
|
113 |
java_prepare() { |
114 |
cd "${S}/src/zabbix_java/lib" |
115 |
rm -v *.jar || die |
116 |
|
117 |
java-pkg_jar-from slf4j-api |
118 |
java-pkg_jar-from json-simple |
119 |
} |
120 |
|
121 |
src_prepare() { |
122 |
eautoreconf |
123 |
} |
124 |
|
125 |
pkg_setup() { |
126 |
if use server || use proxy ; then |
127 |
local dbnum dbtypes="mysql oracle postgres sqlite" dbtype |
128 |
declare -i dbnum=0 |
129 |
for dbtype in ${dbtypes}; do |
130 |
use ${dbtype} && let dbnum++ |
131 |
done |
132 |
if [ ${dbnum} -gt 1 ]; then |
133 |
eerror |
134 |
eerror "You can't use more than one database type in Zabbix." |
135 |
eerror "Select exactly one database type out of these: ${dbtypes}" |
136 |
eerror |
137 |
die "Multiple database types selected." |
138 |
elif [ ${dbnum} -lt 1 ]; then |
139 |
eerror |
140 |
eerror "Select exactly one database type out of these: ${dbtypes}" |
141 |
eerror |
142 |
die "No database type selected." |
143 |
fi |
144 |
if use oracle; then |
145 |
if [ -z "${ORACLE_HOME}" ]; then |
146 |
eerror |
147 |
eerror "The environment variable ORACLE_HOME must be set" |
148 |
eerror "and point to the correct location." |
149 |
eerror "It looks like you don't have Oracle installed." |
150 |
eerror |
151 |
die "Environment variable ORACLE_HOME is not set" |
152 |
fi |
153 |
if has_version 'dev-db/oracle-instantclient-basic'; then |
154 |
ewarn |
155 |
ewarn "Please ensure you have a full install of the Oracle client." |
156 |
ewarn "dev-db/oracle-instantclient* is NOT sufficient." |
157 |
ewarn |
158 |
fi |
159 |
fi |
160 |
fi |
161 |
|
162 |
if use frontend; then |
163 |
webapp_pkg_setup |
164 |
fi |
165 |
|
166 |
enewgroup zabbix |
167 |
enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix |
168 |
} |
169 |
|
170 |
pkg_postinst() { |
171 |
if use server || use proxy ; then |
172 |
elog |
173 |
elog "You may need to configure your database for Zabbix," |
174 |
elog "if you have not already done so. " |
175 |
elog |
176 |
|
177 |
zabbix_homedir=$(egethome zabbix) |
178 |
if [ -n "${zabbix_homedir}" ] && \ |
179 |
[ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then |
180 |
ewarn |
181 |
ewarn "The user 'zabbix' should have his homedir changed" |
182 |
ewarn "to /var/lib/zabbix/home if you want to use" |
183 |
ewarn "custom alert scripts." |
184 |
ewarn |
185 |
ewarn "A real homedir might be needed for configfiles" |
186 |
ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when" |
187 |
ewarn "using sendxmpp for Jabber alerts)." |
188 |
ewarn |
189 |
ewarn "To change the homedir use:" |
190 |
ewarn " usermod -d /var/lib/zabbix/home zabbix" |
191 |
ewarn |
192 |
fi |
193 |
fi |
194 |
|
195 |
if use server; then |
196 |
elog |
197 |
elog "For distributed monitoring you have to run:" |
198 |
elog |
199 |
elog "zabbix_server -n <nodeid>" |
200 |
elog |
201 |
elog "This will convert database data for use with Node ID" |
202 |
elog "and also adds a local node." |
203 |
elog |
204 |
fi |
205 |
|
206 |
elog "--" |
207 |
elog |
208 |
elog "You may need to add these lines to /etc/services:" |
209 |
elog |
210 |
elog "zabbix-agent 10050/tcp Zabbix Agent" |
211 |
elog "zabbix-agent 10050/udp Zabbix Agent" |
212 |
elog "zabbix-trapper 10051/tcp Zabbix Trapper" |
213 |
elog "zabbix-trapper 10051/udp Zabbix Trapper" |
214 |
elog |
215 |
|
216 |
elog "Feel free to download or contribute gentoo specific zabbix templates" |
217 |
elog "via https://github.com/deploylinux/gentooZabbixTemplates (WIP)." |
218 |
|
219 |
# repeat fowners/fperms functionality from src_install() |
220 |
# here to catch wrong permissions on existing files in |
221 |
# the live filesystem (yeah, that sucks). |
222 |
chown -R zabbix:zabbix \ |
223 |
"${ROOT}"/etc/zabbix \ |
224 |
"${ROOT}"/var/lib/zabbix \ |
225 |
"${ROOT}"/var/lib/zabbix/home \ |
226 |
"${ROOT}"/var/lib/zabbix/scripts \ |
227 |
"${ROOT}"/var/log/zabbix |
228 |
chmod 0750 \ |
229 |
"${ROOT}"/etc/zabbix \ |
230 |
"${ROOT}"/var/lib/zabbix \ |
231 |
"${ROOT}"/var/lib/zabbix/home \ |
232 |
"${ROOT}"/var/lib/zabbix/scripts \ |
233 |
"${ROOT}"/var/log/zabbix |
234 |
|
235 |
chmod 0640 \ |
236 |
"${ROOT}"/etc/zabbix/zabbix_* |
237 |
|
238 |
if use server || use proxy ; then |
239 |
# check for fping |
240 |
fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null) |
241 |
case "${fping_perms}" in |
242 |
4[157][157][157]) |
243 |
;; |
244 |
*) |
245 |
ewarn |
246 |
ewarn "If you want to use the checks 'icmpping' and 'icmppingsec'," |
247 |
ewarn "you have to make /usr/sbin/fping setuid root and executable" |
248 |
ewarn "by everyone. Run the following command to fix it:" |
249 |
ewarn |
250 |
ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping" |
251 |
ewarn |
252 |
ewarn "Please be aware that this might impose a security risk," |
253 |
ewarn "depending on the code quality of fping." |
254 |
ewarn |
255 |
;; |
256 |
esac |
257 |
fi |
258 |
} |
259 |
|
260 |
src_configure() { |
261 |
|
262 |
econf \ |
263 |
$(use_enable server) \ |
264 |
$(use_enable proxy) \ |
265 |
$(use_enable agent) \ |
266 |
$(use_enable ipv6) \ |
267 |
$(use_enable static) \ |
268 |
$(use_enable java) \ |
269 |
$(use_with ldap) \ |
270 |
$(use_with snmp net-snmp) \ |
271 |
$(use_with mysql) \ |
272 |
$(use_with postgres postgresql) \ |
273 |
$(use_with oracle) \ |
274 |
$(use_with sqlite sqlite3) \ |
275 |
$(use_with jabber) \ |
276 |
$(use_with curl libcurl) \ |
277 |
$(use_with openipmi openipmi) \ |
278 |
$(use_with ssh ssh2) \ |
279 |
$(use_with libxml2) \ |
280 |
$(use_with odbc unixodbc) \ |
281 |
|| die "econf failed" |
282 |
} |
283 |
|
284 |
src_install() { |
285 |
dodir \ |
286 |
/etc/zabbix \ |
287 |
/var/lib/zabbix \ |
288 |
/var/lib/zabbix/home \ |
289 |
/var/lib/zabbix/scripts \ |
290 |
/var/lib/zabbix/alertscripts \ |
291 |
/var/lib/zabbix/externalscripts \ |
292 |
/var/log/zabbix |
293 |
|
294 |
keepdir \ |
295 |
/etc/zabbix \ |
296 |
/var/lib/zabbix \ |
297 |
/var/lib/zabbix/home \ |
298 |
/var/lib/zabbix/scripts \ |
299 |
/var/lib/zabbix/alertscripts \ |
300 |
/var/lib/zabbix/externalscripts \ |
301 |
/var/log/zabbix |
302 |
|
303 |
if use server; then |
304 |
insinto /etc/zabbix |
305 |
doins "${FILESDIR}/2.2"/zabbix_server.conf |
306 |
doinitd "${FILESDIR}/2.2"/init.d/zabbix-server |
307 |
dosbin src/zabbix_server/zabbix_server |
308 |
fowners zabbix:zabbix /etc/zabbix/zabbix_server.conf |
309 |
fperms 0640 /etc/zabbix/zabbix_server.conf |
310 |
if use systemd; then |
311 |
systemd_dounit "${FILESDIR}/zabbix-server.service" |
312 |
systemd_newtmpfilesd "${FILESDIR}/zabbix-server.tmpfiles" zabbix-server.conf |
313 |
fi |
314 |
fi |
315 |
|
316 |
if use proxy; then |
317 |
doinitd \ |
318 |
"${FILESDIR}/2.2"/init.d/zabbix-proxy |
319 |
dosbin \ |
320 |
src/zabbix_proxy/zabbix_proxy |
321 |
insinto /etc/zabbix |
322 |
doins \ |
323 |
"${FILESDIR}/2.2"/zabbix_proxy.conf |
324 |
if use systemd; then |
325 |
systemd_dounit "${FILESDIR}/zabbix-proxy.service" |
326 |
systemd_newtmpfilesd "${FILESDIR}/zabbix-proxy.tmpfiles" zabbix-proxy.conf |
327 |
fi |
328 |
fi |
329 |
|
330 |
if use agent; then |
331 |
insinto /etc/zabbix |
332 |
doins \ |
333 |
"${FILESDIR}/2.2"/zabbix_agent.conf \ |
334 |
"${FILESDIR}/2.2"/zabbix_agentd.conf |
335 |
doinitd "${FILESDIR}/2.2"/init.d/zabbix-agentd |
336 |
dosbin \ |
337 |
src/zabbix_agent/zabbix_agent \ |
338 |
src/zabbix_agent/zabbix_agentd |
339 |
dobin \ |
340 |
src/zabbix_sender/zabbix_sender \ |
341 |
src/zabbix_get/zabbix_get |
342 |
fowners zabbix:zabbix \ |
343 |
/etc/zabbix/zabbix_agent.conf \ |
344 |
/etc/zabbix/zabbix_agentd.conf |
345 |
fperms 0640 \ |
346 |
/etc/zabbix/zabbix_agent.conf \ |
347 |
/etc/zabbix/zabbix_agentd.conf |
348 |
if use systemd; then |
349 |
systemd_dounit "${FILESDIR}/zabbix-agentd.service" |
350 |
systemd_newtmpfilesd "${FILESDIR}/zabbix-agentd.tmpfiles" zabbix-agentd.conf |
351 |
fi |
352 |
fi |
353 |
|
354 |
fowners zabbix:zabbix \ |
355 |
/etc/zabbix \ |
356 |
/var/lib/zabbix \ |
357 |
/var/lib/zabbix/home \ |
358 |
/var/lib/zabbix/scripts \ |
359 |
/var/lib/zabbix/alertscripts \ |
360 |
/var/lib/zabbix/externalscripts \ |
361 |
/var/log/zabbix |
362 |
fperms 0750 \ |
363 |
/etc/zabbix \ |
364 |
/var/lib/zabbix \ |
365 |
/var/lib/zabbix/home \ |
366 |
/var/lib/zabbix/scripts \ |
367 |
/var/lib/zabbix/alertscripts \ |
368 |
/var/lib/zabbix/externalscripts \ |
369 |
/var/log/zabbix |
370 |
|
371 |
dodoc README INSTALL NEWS ChangeLog \ |
372 |
conf/zabbix_agent.conf \ |
373 |
conf/zabbix_agentd.conf \ |
374 |
conf/zabbix_proxy.conf \ |
375 |
conf/zabbix_agentd/userparameter_examples.conf \ |
376 |
conf/zabbix_agentd/userparameter_mysql.conf \ |
377 |
conf/zabbix_server.conf |
378 |
|
379 |
if use frontend; then |
380 |
webapp_src_preinst |
381 |
cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}" |
382 |
webapp_postinst_txt en "${FILESDIR}/"1.6.6/postinstall-en.txt |
383 |
webapp_configfile \ |
384 |
"${MY_HTDOCSDIR}"/include/db.inc.php \ |
385 |
"${MY_HTDOCSDIR}"/include/config.inc.php |
386 |
webapp_src_install |
387 |
fi |
388 |
|
389 |
if use java; then |
390 |
dodir \ |
391 |
/${ZABBIXJAVA_BASE} \ |
392 |
/${ZABBIXJAVA_BASE}/bin \ |
393 |
/${ZABBIXJAVA_BASE}/lib |
394 |
keepdir /${ZABBIXJAVA_BASE} |
395 |
exeinto /${ZABBIXJAVA_BASE}/bin |
396 |
doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar |
397 |
exeinto /${ZABBIXJAVA_BASE}/lib |
398 |
doexe \ |
399 |
src/zabbix_java/lib/logback-classic-0.9.27.jar \ |
400 |
src/zabbix_java/lib/logback-console.xml \ |
401 |
src/zabbix_java/lib/logback-core-0.9.27.jar \ |
402 |
src/zabbix_java/lib/logback.xml \ |
403 |
src/zabbix_java/lib/org-json-2010-12-28.jar \ |
404 |
src/zabbix_java/lib/slf4j-api-1.6.1.jar |
405 |
exeinto /${ZABBIXJAVA_BASE}/ |
406 |
doexe \ |
407 |
src/zabbix_java/settings.sh \ |
408 |
src/zabbix_java/startup.sh \ |
409 |
src/zabbix_java/shutdown.sh |
410 |
fowners -R zabbix:zabbix /${ZABBIXJAVA_BASE} |
411 |
fi |
412 |
|
413 |
} |
414 |
|
415 |
src_compile() { |
416 |
if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then |
417 |
emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" || die "emake failed" |
418 |
fi |
419 |
} |