1 |
hwoarang 13/03/05 21:26:50 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: collectd-5.2.1.ebuild |
5 |
Log: |
6 |
Version bump. #454594. Thanks to Johan Bergström <bugs@××××××××××.nu> |
7 |
|
8 |
(Portage version: 2.1.11.53/cvs/Linux x86_64, signed Manifest commit with key C2BA7F3C!) |
9 |
|
10 |
Revision Changes Path |
11 |
1.50 app-admin/collectd/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/collectd/ChangeLog?rev=1.50&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/collectd/ChangeLog?rev=1.50&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/collectd/ChangeLog?r1=1.49&r2=1.50 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/app-admin/collectd/ChangeLog,v |
20 |
retrieving revision 1.49 |
21 |
retrieving revision 1.50 |
22 |
diff -u -r1.49 -r1.50 |
23 |
--- ChangeLog 16 Jan 2013 07:23:15 -0000 1.49 |
24 |
+++ ChangeLog 5 Mar 2013 21:26:50 -0000 1.50 |
25 |
@@ -1,6 +1,11 @@ |
26 |
# ChangeLog for app-admin/collectd |
27 |
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/app-admin/collectd/ChangeLog,v 1.49 2013/01/16 07:23:15 pinkbyte Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/app-admin/collectd/ChangeLog,v 1.50 2013/03/05 21:26:50 hwoarang Exp $ |
30 |
+ |
31 |
+*collectd-5.2.1 (05 Mar 2013) |
32 |
+ |
33 |
+ 05 Mar 2013; Markos Chandras <hwoarang@g.o> +collectd-5.2.1.ebuild: |
34 |
+ Version bump. #454594. Thanks to Johan Bergström <bugs@××××××××××.nu> |
35 |
|
36 |
16 Jan 2013; Sergey Popov <pinkbyte@g.o> collectd-5.2.0-r1.ebuild: |
37 |
Sort eclasses inherit order, wrt bug #448480. Changes by Johan Bergström |
38 |
|
39 |
|
40 |
|
41 |
1.1 app-admin/collectd/collectd-5.2.1.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/collectd/collectd-5.2.1.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/collectd/collectd-5.2.1.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: collectd-5.2.1.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2013 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/app-admin/collectd/collectd-5.2.1.ebuild,v 1.1 2013/03/05 21:26:50 hwoarang Exp $ |
51 |
|
52 |
EAPI="4" |
53 |
|
54 |
inherit autotools base eutils linux-info multilib perl-app systemd user |
55 |
|
56 |
DESCRIPTION="A a daemon which collects system statistic and provides mechanisms to store the values" |
57 |
|
58 |
HOMEPAGE="http://collectd.org" |
59 |
SRC_URI="${HOMEPAGE}/files/${P}.tar.bz2" |
60 |
|
61 |
LICENSE="GPL-2" |
62 |
SLOT="0" |
63 |
KEYWORDS="~amd64 ~x86" |
64 |
IUSE="contrib debug kernel_linux kernel_FreeBSD kernel_Darwin perl static-libs" |
65 |
|
66 |
# The plugin lists have to follow here since they extend IUSE |
67 |
|
68 |
# Plugins that to my knowledge cannot be supported (eg. dependencies not in gentoo) |
69 |
COLLECTD_IMPOSSIBLE_PLUGINS="netapp pinba xmms" |
70 |
|
71 |
# Plugins that still need some work |
72 |
COLLECTD_UNTESTED_PLUGINS="amqp apple_sensors genericjmx ipvs lpar modbus redis |
73 |
tape v5upgrade write_redis zfs_arc" |
74 |
|
75 |
# Plugins that have been (compile) tested and can be enabled via COLLECTD_PLUGINS |
76 |
COLLECTD_TESTED_PLUGINS="aggregation apache apcups ascent battery bind conntrack |
77 |
contextswitch cpu cpufreq csv curl curl_json curl_xml dbi df disk dns email |
78 |
entropy ethstat exec filecount fscache gmond hddtemp interface ipmi iptables |
79 |
irq java libvirt load logfile madwifi match_empty_counter match_hashed |
80 |
match_regex match_timediff match_value mbmon md memcachec memcached memory |
81 |
multimeter mysql netlink network network nfs nginx notify_desktop notify_email |
82 |
ntpd numa nut olsrd onewire openvpn oracle perl perl ping postgresql powerdns |
83 |
processes protocols python python routeros rrdcached rrdcached rrdtool sensors |
84 |
serial snmp swap syslog table tail target_notification target_replace |
85 |
target_scale target_set tcpconns teamspeak2 ted thermal threshold tokyotyrant |
86 |
unixsock uptime users uuid varnish vmem vserver wireless write_graphite |
87 |
write_http write_mongodb" |
88 |
|
89 |
COLLECTD_DISABLED_PLUGINS="${COLLECTD_IMPOSSIBLE_PLUGINS} ${COLLECTD_UNTESTED_PLUGINS}" |
90 |
|
91 |
COLLECTD_ALL_PLUGINS=${COLLECTD_TESTED_PLUGINS} |
92 |
|
93 |
for plugin in ${COLLECTD_ALL_PLUGINS}; do |
94 |
IUSE="${IUSE} collectd_plugins_${plugin}" |
95 |
done |
96 |
unset plugin |
97 |
|
98 |
# Now come the dependencies. |
99 |
|
100 |
COMMON_DEPEND=" |
101 |
dev-libs/libgcrypt |
102 |
sys-devel/libtool |
103 |
perl? ( dev-lang/perl[ithreads] ( || ( sys-devel/libperl[ithreads] >=sys-devel/libperl-5.10 ) ) ) |
104 |
collectd_plugins_apache? ( net-misc/curl ) |
105 |
collectd_plugins_ascent? ( net-misc/curl dev-libs/libxml2 ) |
106 |
collectd_plugins_bind? ( dev-libs/libxml2 ) |
107 |
collectd_plugins_curl? ( net-misc/curl ) |
108 |
collectd_plugins_curl_json? ( net-misc/curl dev-libs/yajl ) |
109 |
collectd_plugins_curl_xml? ( net-misc/curl dev-libs/libxml2 ) |
110 |
collectd_plugins_dbi? ( dev-db/libdbi ) |
111 |
collectd_plugins_dns? ( net-libs/libpcap ) |
112 |
collectd_plugins_gmond? ( sys-cluster/ganglia ) |
113 |
collectd_plugins_ipmi? ( >=sys-libs/openipmi-2.0.16-r1 ) |
114 |
collectd_plugins_iptables? ( >=net-firewall/iptables-1.4.13 ) |
115 |
collectd_plugins_java? ( virtual/jre dev-java/java-config-wrapper ) |
116 |
collectd_plugins_libvirt? ( app-emulation/libvirt dev-libs/libxml2 ) |
117 |
collectd_plugins_memcachec? ( dev-libs/libmemcached ) |
118 |
collectd_plugins_mysql? ( >=virtual/mysql-5.0 ) |
119 |
collectd_plugins_netlink? ( >=sys-apps/iproute2-3.3.0 ) |
120 |
collectd_plugins_nginx? ( net-misc/curl ) |
121 |
collectd_plugins_notify_desktop? ( x11-libs/libnotify ) |
122 |
collectd_plugins_notify_email? ( >=net-libs/libesmtp-1.0.4 dev-libs/openssl ) |
123 |
collectd_plugins_nut? ( sys-power/nut ) |
124 |
collectd_plugins_onewire? ( sys-fs/owfs ) |
125 |
collectd_plugins_oracle? ( >=dev-db/oracle-instantclient-basic-11.2.0.1.0 ) |
126 |
collectd_plugins_perl? ( dev-lang/perl[ithreads] ( || ( sys-devel/libperl[ithreads] >=sys-devel/libperl-5.10 ) ) ) |
127 |
collectd_plugins_ping? ( net-libs/liboping ) |
128 |
collectd_plugins_postgresql? ( >=dev-db/postgresql-base-8.2 ) |
129 |
collectd_plugins_python? ( =dev-lang/python-2* ) |
130 |
collectd_plugins_routeros? ( net-libs/librouteros ) |
131 |
collectd_plugins_rrdcached? ( >=net-analyzer/rrdtool-1.4 ) |
132 |
collectd_plugins_rrdtool? ( >=net-analyzer/rrdtool-1.2.27 ) |
133 |
collectd_plugins_sensors? ( sys-apps/lm_sensors ) |
134 |
collectd_plugins_snmp? ( net-analyzer/net-snmp ) |
135 |
collectd_plugins_tokyotyrant? ( net-misc/tokyotyrant ) |
136 |
collectd_plugins_varnish? ( www-servers/varnish ) |
137 |
collectd_plugins_write_http? ( net-misc/curl ) |
138 |
collectd_plugins_write_mongodb? ( dev-libs/mongo-c-driver ) |
139 |
|
140 |
kernel_FreeBSD? ( |
141 |
collectd_plugins_disk? ( >=sys-libs/libstatgrab-0.16 ) |
142 |
collectd_plugins_interface? ( >=sys-libs/libstatgrab-0.16 ) |
143 |
collectd_plugins_load? ( >=sys-libs/libstatgrab-0.16 ) |
144 |
collectd_plugins_memory? ( >=sys-libs/libstatgrab-0.16 ) |
145 |
collectd_plugins_swap? ( >=sys-libs/libstatgrab-0.16 ) |
146 |
collectd_plugins_users? ( >=sys-libs/libstatgrab-0.16 ) |
147 |
)" |
148 |
|
149 |
DEPEND="${COMMON_DEPEND} |
150 |
virtual/pkgconfig |
151 |
kernel_linux? ( |
152 |
collectd_plugins_vserver? ( sys-kernel/vserver-sources ) |
153 |
)" |
154 |
|
155 |
RDEPEND="${COMMON_DEPEND} |
156 |
collectd_plugins_syslog? ( virtual/logger )" |
157 |
|
158 |
PATCHES=( |
159 |
"${FILESDIR}/${PN}-4.10.2"-{libocci,nohal}.patch |
160 |
"${FILESDIR}/${PN}-4.10.3"-werror.patch |
161 |
"${FILESDIR}/${PN}-5.1.0"-libperl.patch |
162 |
"${FILESDIR}/${PN}-5.1.1"-lt.patch |
163 |
) |
164 |
|
165 |
# @FUNCTION: collectd_plugin_kernel_linux |
166 |
# @DESCRIPTION: |
167 |
# USAGE: <plug-in name> <kernel_options> <severity> |
168 |
# kernel_options is a list of kernel configurations options; the check tests whether at least |
169 |
# one of them is enabled. If no, depending on the third argument an elog, ewarn, or eerror message |
170 |
# is emitted. |
171 |
collectd_plugin_kernel_linux() { |
172 |
local multi_opt opt |
173 |
if has ${1} ${COLLECTD_ALL_PLUGINS}; then |
174 |
if use collectd_plugins_${1}; then |
175 |
for opt in ${2}; do |
176 |
if linux_chkconfig_present ${opt}; then return 0; fi |
177 |
done |
178 |
multi_opt=${2//\ /\ or\ } |
179 |
case ${3} in |
180 |
(info) |
181 |
elog "The ${1} plug-in can use kernel features that are disabled now; enable ${multi_opt} in your kernel" |
182 |
;; |
183 |
(warn) |
184 |
ewarn "The ${1} plug-in uses kernel features that are disabled now; enable ${multi_opt} in your kernel" |
185 |
;; |
186 |
(error) |
187 |
eerror "The ${1} plug-in needs kernel features that are disabled now; enable ${multi_opt} in your kernel" |
188 |
;; |
189 |
(*) |
190 |
die "function collectd_plugin_kernel_linux called with invalid third argument" |
191 |
;; |
192 |
esac |
193 |
fi |
194 |
fi |
195 |
} |
196 |
|
197 |
collectd_linux_kernel_checks() { |
198 |
linux-info_pkg_setup |
199 |
|
200 |
# battery.c:/proc/pmu/battery_%i |
201 |
# battery.c:/proc/acpi/battery |
202 |
collectd_plugin_kernel_linux battery ACPI_BATTERY warn |
203 |
|
204 |
# cpufreq.c:/sys/devices/system/cpu/cpu%d/cpufreq/ |
205 |
collectd_plugin_kernel_linux cpufreq SYSFS warn |
206 |
collectd_plugin_kernel_linux cpufreq CPU_FREQ_STAT warn |
207 |
|
208 |
# nfs.c:/proc/net/rpc/nfs |
209 |
# nfs.c:/proc/net/rpc/nfsd |
210 |
collectd_plugin_kernel_linux nfs NFS_COMMON warn |
211 |
|
212 |
# serial.c:/proc/tty/driver/serial |
213 |
# serial.c:/proc/tty/driver/ttyS |
214 |
collectd_plugin_kernel_linux serial SERIAL_CORE warn |
215 |
|
216 |
# swap.c:/proc/meminfo |
217 |
collectd_plugin_kernel_linux swap SWAP warn |
218 |
|
219 |
# thermal.c:/proc/acpi/thermal_zone |
220 |
# thermal.c:/sys/class/thermal |
221 |
collectd_plugin_kernel_linux thermal "PROC_FS SYSFS" warn |
222 |
collectd_plugin_kernel_linux thermal ACPI_THERMAL warn |
223 |
|
224 |
# vmem.c:/proc/vmstat |
225 |
collectd_plugin_kernel_linux vmem VM_EVENT_COUNTERS warn |
226 |
|
227 |
# uuid.c:/sys/hypervisor/uuid |
228 |
collectd_plugin_kernel_linux uuid SYSFS info |
229 |
|
230 |
# wireless.c:/proc/net/wireless |
231 |
collectd_plugin_kernel_linux wireless "MAC80211 IEEE80211" warn |
232 |
} |
233 |
|
234 |
pkg_setup() { |
235 |
if use kernel_linux; then |
236 |
if linux_config_exists; then |
237 |
einfo "Checking your linux kernel configuration:" |
238 |
collectd_linux_kernel_checks |
239 |
else |
240 |
elog "Cannot find a linux kernel configuration. Continuing anyway." |
241 |
fi |
242 |
fi |
243 |
|
244 |
enewgroup collectd |
245 |
enewuser collectd -1 -1 /var/lib/collectd collectd |
246 |
} |
247 |
|
248 |
src_prepare() { |
249 |
base_src_prepare |
250 |
|
251 |
# There's some strange prefix handling in the default config file, resulting in |
252 |
# paths like "/usr/var/..." |
253 |
sed -i -e "s:@prefix@/var:/var:g" src/collectd.conf.in || die |
254 |
|
255 |
sed -i -e "s:/etc/collectd/collectd.conf:/etc/collectd.conf:g" contrib/collectd.service || die |
256 |
|
257 |
# fix installdirs for perl, bug 444360 |
258 |
sed -i -e 's/INSTALL_BASE=$(DESTDIR)$(prefix) //' bindings/Makefile.am || die |
259 |
|
260 |
rm -r libltdl || die |
261 |
|
262 |
eautoreconf |
263 |
} |
264 |
|
265 |
src_configure() { |
266 |
# Now come the lists of os-dependent plugins. Any plugin that is not listed anywhere here |
267 |
# should work independent of the operating system. |
268 |
|
269 |
local linux_plugins="battery cpu cpufreq disk entropy ethstat interface iptables ipvs irq load |
270 |
memory md netlink nfs numa processes serial swap tcpconns thermal users vmem vserver |
271 |
wireless" |
272 |
|
273 |
local libstatgrab_plugins="cpu disk interface load memory swap users" |
274 |
local bsd_plugins="cpu tcpconns ${libstatgrab_plugins}" |
275 |
|
276 |
local darwin_plugins="apple_sensors battery cpu disk interface memory processes tcpconns" |
277 |
|
278 |
local osdependent_plugins="${linux_plugins} ${bsd_plugins} ${darwin_plugins}" |
279 |
local myos_plugins="" |
280 |
if use kernel_linux; then |
281 |
einfo "Enabling Linux plugins." |
282 |
myos_plugins=${linux_plugins} |
283 |
elif use kernel_FreeBSD; then |
284 |
einfo "Enabling FreeBSD plugins." |
285 |
myos_plugins=${bsd_plugins} |
286 |
elif use kernel_Darwin; then |
287 |
einfo "Enabling Darwin plugins." |
288 |
myos_plugins=${darwin_plugins} |
289 |
fi |
290 |
|
291 |
# Do we debug? |
292 |
local myconf="$(use_enable debug)" |
293 |
|
294 |
local plugin |
295 |
|
296 |
# Disable what needs to be disabled. |
297 |
for plugin in ${COLLECTD_DISABLED_PLUGINS}; do |
298 |
myconf+=" --disable-${plugin}" |
299 |
done |
300 |
|
301 |
# Set enable/disable for each single plugin. |
302 |
for plugin in ${COLLECTD_ALL_PLUGINS}; do |
303 |
if has ${plugin} ${osdependent_plugins}; then |
304 |
# plugin is os-dependent ... |
305 |
if has ${plugin} ${myos_plugins}; then |
306 |
# ... and available in this os |
307 |
myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" |
308 |
else |
309 |
# ... and NOT available in this os |
310 |
if use collectd_plugins_${plugin}; then |
311 |
ewarn "You try to enable the ${plugin} plugin, but it is not available for this" |
312 |
ewarn "kernel. Disabling it automatically." |
313 |
fi |
314 |
myconf+=" --disable-${plugin}" |
315 |
fi |
316 |
elif [[ "${plugin}" = "collectd_plugins_perl" ]]; then |
317 |
if use collectd_plugins_perl && ! use perl; then |
318 |
ewarn "Perl plugin disabled as perl bindings disabled by -perl use flag" |
319 |
myconf+= --disable-perl |
320 |
else |
321 |
myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" |
322 |
fi |
323 |
else |
324 |
myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" |
325 |
fi |
326 |
done |
327 |
|
328 |
# Need JAVA_HOME for java. |
329 |
if use collectd_plugins_java; then |
330 |
myconf+=" --with-java=$(java-config -g JAVA_HOME)" |
331 |
fi |
332 |
|
333 |
# Need libiptc ONLY for iptables. If we try to use it otherwise bug 340109 happens. |
334 |
if ! use collectd_plugins_iptables; then |
335 |
myconf+=" --with-libiptc=no" |
336 |
fi |
337 |
|
338 |
# The perl bindings |
339 |
myconf+=" $(use_with perl perl-bindings=INSTALLDIRS=vendor)" |
340 |
|
341 |
# Finally, run econf. |
342 |
KERNEL_DIR="${KERNEL_DIR}" econf --config-cache --without-included-ltdl $(use_enable static-libs static) --localstatedir=/var ${myconf} |
343 |
} |
344 |
|
345 |
src_install() { |
346 |
emake DESTDIR="${D}" install || die |
347 |
|
348 |
fixlocalpod |
349 |
|
350 |
find "${D}/usr/" -name "*.la" -exec rm -f {} + |
351 |
|
352 |
# use collectd_plugins_ping && setcap cap_net_raw+ep ${D}/usr/sbin/collectd |
353 |
# we cannot do this yet |
354 |
|
355 |
fowners root:collectd /etc/collectd.conf |
356 |
fperms u=rw,g=r,o= /etc/collectd.conf |
357 |
|
358 |
dodoc AUTHORS ChangeLog NEWS README TODO |
359 |
|
360 |
if use contrib ; then |
361 |
insinto /usr/share/doc/${PF} |
362 |
doins -r contrib |
363 |
fi |
364 |
|
365 |
keepdir /var/lib/${PN} |
366 |
fowners collectd:collectd /var/lib/${PN} |
367 |
|
368 |
newinitd "${FILESDIR}/${PN}.initd" ${PN} |
369 |
newconfd "${FILESDIR}/${PN}.confd" ${PN} |
370 |
systemd_dounit "contrib/${PN}.service" |
371 |
|
372 |
insinto /etc/logrotate.d |
373 |
newins "${FILESDIR}/logrotate" collectd |
374 |
|
375 |
sed -i -e 's:^.*PIDFile "/var/run/collectd.pid":PIDFile "/var/run/collectd/collectd.pid":' "${D}"/etc/collectd.conf || die |
376 |
sed -i -e 's:^# SocketFile "/var/run/collectd-unixsock":# SocketFile "/var/run/collectd/collectd-unixsock":' "${D}"/etc/collectd.conf || die |
377 |
sed -i -e 's:^.*LoadPlugin perl$:# The new, correct way to load the perl plugin -- \n# <LoadPlugin perl>\n# Globals true\n# </LoadPlugin>:' "${D}"/etc/collectd.conf || die |
378 |
sed -i -e 's:^.*LoadPlugin python$:# The new, correct way to load the python plugin -- \n# <LoadPlugin python>\n# Globals true\n# </LoadPlugin>:' "${D}"/etc/collectd.conf || die |
379 |
} |
380 |
|
381 |
collectd_rdeps() { |
382 |
if (use collectd_plugins_${1} && ! has_version "${2}"); then |
383 |
elog "The ${1} plug-in needs ${2} to be installed locally or remotely to work." |
384 |
fi |
385 |
} |
386 |
|
387 |
pkg_postinst() { |
388 |
collectd_rdeps apcups sys-power/apcupsd |
389 |
collectd_rdeps hddtemp app-admin/hddtemp |
390 |
collectd_rdeps mbmon sys-apps/xmbmon |
391 |
collectd_rdeps memcached ">=net-misc/memcached-1.2.2-r2" |
392 |
collectd_rdeps ntpd net-misc/ntp |
393 |
collectd_rdeps openvpn ">=net-misc/openvpn-2.0.9" |
394 |
collectd_rdeps write_mongodb "dev-db/mongodb" |
395 |
|
396 |
echo |
397 |
elog "collectd is now started as unprivileged user by default." |
398 |
elog "You may want to recheck the configuration." |
399 |
elog |
400 |
|
401 |
if use collectd_plugins_email; then |
402 |
ewarn "The email plug-in is deprecated. To submit statistics please use the unixsock plugin." |
403 |
fi |
404 |
if use contrib; then |
405 |
elog "The scripts in /usr/share/doc/${PF}/collection3 for generating graphs need dev-perl/HTML-Parser," |
406 |
elog "dev-perl/config-general, dev-perl/regexp-common, and net-analyzer/rrdtool[perl] to be installed." |
407 |
fi |
408 |
} |