1 |
dilfridge 10/10/31 21:19:00 |
2 |
|
3 |
Modified: metadata.xml ChangeLog |
4 |
Added: collectd-4.10.1-r3.ebuild |
5 |
Log: |
6 |
Added a small logrotate file and support for the ipmi and netlink plugins |
7 |
|
8 |
(Portage version: 2.1.9.23/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.2 app-admin/collectd/metadata.xml |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/collectd/metadata.xml?rev=1.2&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/collectd/metadata.xml?rev=1.2&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/collectd/metadata.xml?r1=1.1&r2=1.2 |
16 |
|
17 |
Index: metadata.xml |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/app-admin/collectd/metadata.xml,v |
20 |
retrieving revision 1.1 |
21 |
retrieving revision 1.2 |
22 |
diff -u -r1.1 -r1.2 |
23 |
--- metadata.xml 28 Sep 2010 15:17:05 -0000 1.1 |
24 |
+++ metadata.xml 31 Oct 2010 21:19:00 -0000 1.2 |
25 |
@@ -31,6 +31,7 @@ |
26 |
<flag name='collectd_plugins_gmond'>Build the gmond input plugin (receive data from gmond, the client daemon of the Ganglia project)</flag> |
27 |
<flag name='collectd_plugins_hddtemp'>Build the hddtemp input plugin (temperature of hard disks)</flag> |
28 |
<flag name='collectd_plugins_interface'>Build the interface input plugin (information about traffic, packets and errors of interfaces)</flag> |
29 |
+ <flag name='collectd_plugins_ipmi'>Build the ipmi input plugin (read hardware sensors from servers using the Intelligent Platform Management Interface (IPMI))</flag> |
30 |
<flag name='collectd_plugins_iptables'>Build the iptables input plugin (statistics from a ip_tables based packet filter)</flag> |
31 |
<flag name='collectd_plugins_irq'>Build the irq input plugin (number of times each interrupt has been handled by the os)</flag> |
32 |
<flag name='collectd_plugins_java'>Build the java input plugin (embeds a JVM into collectd for writing plugins)</flag> |
33 |
@@ -49,6 +50,7 @@ |
34 |
<flag name='collectd_plugins_memory'>Build the memory input plugin (physical memory utilization)</flag> |
35 |
<flag name='collectd_plugins_multimeter'>Build the multimeter input plugin (reads a voltage or current from a multimeter connected to a serial bus)</flag> |
36 |
<flag name='collectd_plugins_mysql'>Build the mysql input plugin (connects to an MySQL-database and issues a SHOW STATUS command)</flag> |
37 |
+ <flag name='collectd_plugins_netlink'>Build the netlink input plugin (opens a netlink socket to the Linux kernel for getting statistics)</flag> |
38 |
<flag name='collectd_plugins_network'>Build the network input/output plugin (communicates with other instances of collectd)</flag> |
39 |
<flag name='collectd_plugins_nfs'>Build the nfs input plugin (usage of the Network File System)</flag> |
40 |
<flag name='collectd_plugins_nginx'>Build the nginx input plugin (number of requests handled by the nginx daemon)</flag> |
41 |
|
42 |
|
43 |
|
44 |
1.7 app-admin/collectd/ChangeLog |
45 |
|
46 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/collectd/ChangeLog?rev=1.7&view=markup |
47 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/collectd/ChangeLog?rev=1.7&content-type=text/plain |
48 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/collectd/ChangeLog?r1=1.6&r2=1.7 |
49 |
|
50 |
Index: ChangeLog |
51 |
=================================================================== |
52 |
RCS file: /var/cvsroot/gentoo-x86/app-admin/collectd/ChangeLog,v |
53 |
retrieving revision 1.6 |
54 |
retrieving revision 1.7 |
55 |
diff -u -r1.6 -r1.7 |
56 |
--- ChangeLog 12 Oct 2010 17:59:52 -0000 1.6 |
57 |
+++ ChangeLog 31 Oct 2010 21:19:00 -0000 1.7 |
58 |
@@ -1,6 +1,13 @@ |
59 |
# ChangeLog for app-admin/collectd |
60 |
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 |
61 |
-# $Header: /var/cvsroot/gentoo-x86/app-admin/collectd/ChangeLog,v 1.6 2010/10/12 17:59:52 dilfridge Exp $ |
62 |
+# $Header: /var/cvsroot/gentoo-x86/app-admin/collectd/ChangeLog,v 1.7 2010/10/31 21:19:00 dilfridge Exp $ |
63 |
+ |
64 |
+*collectd-4.10.1-r3 (31 Oct 2010) |
65 |
+ |
66 |
+ 31 Oct 2010; Andreas K. Huettel <dilfridge@g.o> |
67 |
+ +collectd-4.10.1-r3.ebuild, +files/logrotate: |
68 |
+ Added support for the ipmi and netlink plugins and added a small logrotate |
69 |
+ control file. Thanks to Daniel Deptula. |
70 |
|
71 |
12 Oct 2010; Andreas K. Huettel <dilfridge@g.o> |
72 |
collectd-4.10.1-r2.ebuild, +files/collectd-4.10.1-noowniptc.patch: |
73 |
|
74 |
|
75 |
|
76 |
1.1 app-admin/collectd/collectd-4.10.1-r3.ebuild |
77 |
|
78 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/collectd/collectd-4.10.1-r3.ebuild?rev=1.1&view=markup |
79 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/collectd/collectd-4.10.1-r3.ebuild?rev=1.1&content-type=text/plain |
80 |
|
81 |
Index: collectd-4.10.1-r3.ebuild |
82 |
=================================================================== |
83 |
# Copyright 1999-2010 Gentoo Foundation |
84 |
# Distributed under the terms of the GNU General Public License v2 |
85 |
# $Header: /var/cvsroot/gentoo-x86/app-admin/collectd/collectd-4.10.1-r3.ebuild,v 1.1 2010/10/31 21:19:00 dilfridge Exp $ |
86 |
|
87 |
EAPI="2" |
88 |
|
89 |
inherit base linux-info perl-app autotools |
90 |
|
91 |
DESCRIPTION="A small daemon which collects system performance statistics - with a near-infinite number of plugins" |
92 |
HOMEPAGE="http://collectd.org" |
93 |
SRC_URI="${HOMEPAGE}/files/${P}.tar.bz2" |
94 |
|
95 |
LICENSE="GPL-2" |
96 |
SLOT="0" |
97 |
KEYWORDS="~amd64 ~x86" |
98 |
IUSE="contrib debug kernel_linux kernel_FreeBSD kernel_Darwin" |
99 |
|
100 |
# The plugin lists have to follow here since they extend IUSE |
101 |
|
102 |
# Plugins that to my knowledge cannot be supported (eg. dependencies not in gentoo) |
103 |
COLLECTD_IMPOSSIBLE_PLUGINS="curl_json netapp pinba ping xmms" |
104 |
|
105 |
# Plugins that still need some work |
106 |
COLLECTD_UNTESTED_PLUGINS="oracle ipvs apple_sensors routeros tape zfs_arc nut modbus" |
107 |
|
108 |
# Plugins that have been (compile) tested and can be enabled via COLLECTD_PLUGINS |
109 |
COLLECTD_TESTED_PLUGINS="apache apcups ascent battery bind conntrack contextswitch |
110 |
cpu cpufreq curl curl_xml dbi df disk dns email entropy exec filecount fscache gmond |
111 |
hddtemp interface ipmi iptables irq java libvirt load madwifi mbmon memcachec |
112 |
memcached memory multimeter mysql netlink network nfs nginx ntpd olsrd |
113 |
onewire openvpn perl postgresql powerdns processes protocols python |
114 |
rrdcached sensors serial snmp swap table tail tcpconns teamspeak2 ted thermal |
115 |
tokyotyrant uptime users vmem vserver wireless csv exec logfile network |
116 |
notify_desktop notify_email perl python rrdcached rrdtool syslog unixsock write_http |
117 |
match_empty_counter match_hashed match_regex match_timediff match_value |
118 |
target_notification target_replace target_scale target_set uuid" |
119 |
|
120 |
COLLECTD_DISABLED_PLUGINS="${COLLECTD_IMPOSSIBLE_PLUGINS} ${COLLECTD_UNTESTED_PLUGINS}" |
121 |
|
122 |
COLLECTD_ALL_PLUGINS=${COLLECTD_TESTED_PLUGINS} |
123 |
|
124 |
for plugin in ${COLLECTD_ALL_PLUGINS}; do |
125 |
IUSE="${IUSE} collectd_plugins_${plugin}" |
126 |
done |
127 |
unset plugin |
128 |
|
129 |
# Now come the dependencies. |
130 |
|
131 |
COMMON_DEPEND=" |
132 |
collectd_plugins_apache? ( net-misc/curl ) |
133 |
collectd_plugins_ascent? ( net-misc/curl dev-libs/libxml2 ) |
134 |
collectd_plugins_bind? ( dev-libs/libxml2 ) |
135 |
collectd_plugins_curl? ( net-misc/curl ) |
136 |
collectd_plugins_curl_xml? ( net-misc/curl dev-libs/libxml2 ) |
137 |
collectd_plugins_dbi? ( dev-db/libdbi ) |
138 |
collectd_plugins_dns? ( net-libs/libpcap ) |
139 |
collectd_plugins_gmond? ( sys-cluster/ganglia ) |
140 |
collectd_plugins_ipmi? ( >=sys-libs/openipmi-2.0.16-r1 ) |
141 |
collectd_plugins_iptables? ( >=net-firewall/iptables-1.4.9.1-r2 ) |
142 |
collectd_plugins_java? ( virtual/jre dev-java/java-config-wrapper ) |
143 |
collectd_plugins_libvirt? ( app-emulation/libvirt dev-libs/libxml2 ) |
144 |
collectd_plugins_memcachec? ( dev-libs/libmemcached ) |
145 |
collectd_plugins_mysql? ( >=virtual/mysql-5.0 ) |
146 |
collectd_plugins_netlink? ( >=sys-apps/iproute2-2.6.34 ) |
147 |
collectd_plugins_network? ( dev-libs/libgcrypt ) |
148 |
collectd_plugins_nginx? ( net-misc/curl ) |
149 |
collectd_plugins_notify_desktop? ( x11-libs/libnotify ) |
150 |
collectd_plugins_notify_email? ( >=net-libs/libesmtp-1.0.4 dev-libs/openssl ) |
151 |
collectd_plugins_onewire? ( sys-fs/owfs ) |
152 |
collectd_plugins_perl? ( dev-lang/perl[ithreads] sys-devel/libperl[ithreads] ) |
153 |
collectd_plugins_postgresql? ( >=dev-db/postgresql-base-8.2 ) |
154 |
collectd_plugins_python? ( =dev-lang/python-2* ) |
155 |
collectd_plugins_rrdcached? ( >=net-analyzer/rrdtool-1.4 ) |
156 |
collectd_plugins_rrdtool? ( >=net-analyzer/rrdtool-1.2.27 ) |
157 |
collectd_plugins_sensors? ( sys-apps/lm_sensors ) |
158 |
collectd_plugins_snmp? ( net-analyzer/net-snmp ) |
159 |
collectd_plugins_tokyotyrant? ( net-misc/tokyotyrant ) |
160 |
collectd_plugins_uuid? ( sys-apps/hal ) |
161 |
collectd_plugins_write_http? ( net-misc/curl ) |
162 |
|
163 |
kernel_FreeBSD? ( |
164 |
collectd_plugins_disk? ( >=sys-libs/libstatgrab-0.16 ) |
165 |
collectd_plugins_interface? ( >=sys-libs/libstatgrab-0.16 ) |
166 |
collectd_plugins_load? ( >=sys-libs/libstatgrab-0.16 ) |
167 |
collectd_plugins_memory? ( >=sys-libs/libstatgrab-0.16 ) |
168 |
collectd_plugins_swap? ( >=sys-libs/libstatgrab-0.16 ) |
169 |
collectd_plugins_users? ( >=sys-libs/libstatgrab-0.16 ) |
170 |
)" |
171 |
|
172 |
DEPEND="${COMMON_DEPEND} |
173 |
dev-util/pkgconfig |
174 |
kernel_linux? ( |
175 |
collectd_plugins_vserver? ( sys-kernel/vserver-sources ) |
176 |
)" |
177 |
|
178 |
RDEPEND="${COMMON_DEPEND} |
179 |
collectd_plugins_syslog? ( virtual/logger )" |
180 |
|
181 |
PATCHES=( "${FILESDIR}/${P}"-{libperl,libiptc,noowniptc}.patch ) |
182 |
|
183 |
# @FUNCTION: collectd_plugin_kernel_linux |
184 |
# @DESCRIPTION: |
185 |
# USAGE: <plug-in name> <kernel_options> <severity> |
186 |
# kernel_options is a list of kernel configurations options; the check tests whether at least |
187 |
# one of them is enabled. If no, depending on the third argument an elog, ewarn, or eerror message |
188 |
# is emitted. |
189 |
collectd_plugin_kernel_linux() { |
190 |
local multi_opt opt |
191 |
if has ${1} ${COLLECTD_ALL_PLUGINS}; then |
192 |
if use collectd_plugins_${1}; then |
193 |
for opt in ${2}; do |
194 |
if linux_chkconfig_present ${opt}; then return 0; fi |
195 |
done |
196 |
multi_opt=${2//\ /\ or\ } |
197 |
case ${3} in |
198 |
(info) |
199 |
elog "The ${1} plug-in can use kernel features that are disabled now; enable ${multi_opt} in your kernel" |
200 |
;; |
201 |
(warn) |
202 |
ewarn "The ${1} plug-in uses kernel features that are disabled now; enable ${multi_opt} in your kernel" |
203 |
;; |
204 |
(error) |
205 |
eerror "The ${1} plug-in needs kernel features that are disabled now; enable ${multi_opt} in your kernel" |
206 |
;; |
207 |
(*) |
208 |
die "function collectd_plugin_kernel_linux called with invalid third argument" |
209 |
;; |
210 |
esac |
211 |
fi |
212 |
fi |
213 |
} |
214 |
|
215 |
collectd_linux_kernel_checks() { |
216 |
linux-info_pkg_setup |
217 |
|
218 |
# battery.c:/proc/pmu/battery_%i |
219 |
# battery.c:/proc/acpi/battery |
220 |
collectd_plugin_kernel_linux battery ACPI_BATTERY warn |
221 |
|
222 |
# cpufreq.c:/sys/devices/system/cpu/cpu%d/cpufreq/ |
223 |
collectd_plugin_kernel_linux cpufreq SYSFS warn |
224 |
collectd_plugin_kernel_linux cpufreq CPU_FREQ_STAT warn |
225 |
|
226 |
# nfs.c:/proc/net/rpc/nfs |
227 |
# nfs.c:/proc/net/rpc/nfsd |
228 |
collectd_plugin_kernel_linux nfs NFS_COMMON warn |
229 |
|
230 |
# serial.c:/proc/tty/driver/serial |
231 |
# serial.c:/proc/tty/driver/ttyS |
232 |
collectd_plugin_kernel_linux serial SERIAL_CORE warn |
233 |
|
234 |
# swap.c:/proc/meminfo |
235 |
collectd_plugin_kernel_linux swap SWAP warn |
236 |
|
237 |
# thermal.c:/proc/acpi/thermal_zone |
238 |
# thermal.c:/sys/class/thermal |
239 |
collectd_plugin_kernel_linux thermal "PROC_FS SYSFS" warn |
240 |
collectd_plugin_kernel_linux thermal ACPI_THERMAL warn |
241 |
|
242 |
# vmem.c:/proc/vmstat |
243 |
collectd_plugin_kernel_linux vmem VM_EVENT_COUNTERS warn |
244 |
|
245 |
# uuid.c:/sys/hypervisor/uuid |
246 |
collectd_plugin_kernel_linux uuid SYSFS info |
247 |
|
248 |
# wireless.c:/proc/net/wireless |
249 |
collectd_plugin_kernel_linux wireless "MAC80211 IEEE80211" warn |
250 |
} |
251 |
|
252 |
pkg_setup() { |
253 |
if use kernel_linux; then |
254 |
if linux_config_exists; then |
255 |
einfo |
256 |
einfo "Checking your linux kernel configuration:" |
257 |
collectd_linux_kernel_checks |
258 |
else |
259 |
elog "Cannot find a linux kernel configuration. Continuing anyway." |
260 |
fi |
261 |
fi |
262 |
} |
263 |
|
264 |
src_prepare() { |
265 |
base_src_prepare |
266 |
|
267 |
# There's some strange prefix handling in the default config file, resulting in |
268 |
# paths like "/usr/var/..." |
269 |
sed -i -e "s:@prefix@/var:/var:g" src/collectd.conf.in || die |
270 |
|
271 |
eautoreconf |
272 |
} |
273 |
|
274 |
src_configure() { |
275 |
# Now come the lists of os-dependent plugins. Any plugin that is not listed anywhere here |
276 |
# should work independent of the operating system. |
277 |
|
278 |
local linux_plugins="battery cpu cpufreq disk entropy interface iptables ipvs irq load |
279 |
memory netlink nfs processes serial swap tcpconns thermal users vmem vserver |
280 |
wireless" |
281 |
|
282 |
local libstatgrab_plugins="cpu disk interface load memory swap users" |
283 |
local bsd_plugins="cpu tcpconns ${libstatgrab_plugins}" |
284 |
|
285 |
local darwin_plugins="apple_sensors battery cpu disk interface memory processes tcpconns" |
286 |
|
287 |
local osdependent_plugins="${linux_plugins} ${bsd_plugins} ${darwin_plugins}" |
288 |
local myos_plugins="" |
289 |
if use kernel_linux; then |
290 |
einfo "Enabling Linux plugins." |
291 |
myos_plugins=${linux_plugins} |
292 |
elif use kernel_FreeBSD; then |
293 |
einfo "Enabling FreeBSD plugins." |
294 |
myos_plugins=${bsd_plugins} |
295 |
elif use kernel_Darwin; then |
296 |
einfo "Enabling Darwin plugins." |
297 |
myos_plugins=${darwin_plugins} |
298 |
fi |
299 |
|
300 |
# Do we debug? |
301 |
local myconf="$(use_enable debug)" |
302 |
|
303 |
local plugin |
304 |
|
305 |
# Disable what needs to be disabled. |
306 |
for plugin in ${COLLECTD_DISABLED_PLUGINS}; do |
307 |
myconf+=" --disable-${plugin}" |
308 |
done |
309 |
|
310 |
# Set enable/disable for each single plugin. |
311 |
for plugin in ${COLLECTD_ALL_PLUGINS}; do |
312 |
if has ${plugin} ${osdependent_plugins}; then |
313 |
# plugin is os-dependent ... |
314 |
if has ${plugin} ${myos_plugins}; then |
315 |
# ... and available in this os |
316 |
myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" |
317 |
else |
318 |
# ... and NOT available in this os |
319 |
if use collectd_plugins_${plugin}; then |
320 |
ewarn "You try to enable the ${plugin} plugin, but it is not available for this" |
321 |
ewarn "kernel. Disabling it automatically." |
322 |
fi |
323 |
myconf+=" --disable-${plugin}" |
324 |
fi |
325 |
else |
326 |
myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" |
327 |
fi |
328 |
done |
329 |
|
330 |
# Need JAVA_HOME for java. |
331 |
if use collectd_plugins_java; then |
332 |
myconf+=" --with-java=$(java-config -g JAVA_HOME)" |
333 |
fi |
334 |
|
335 |
# Need libiptc ONLY for iptables. If we try to use it otherwise bug 340109 happens. |
336 |
if ! use collectd_plugins_iptables; then |
337 |
myconf+=" --with-libiptc=no" |
338 |
fi |
339 |
|
340 |
# Finally, run econf. |
341 |
KERNEL_DIR="${KERNEL_DIR}" econf --config-cache --without-included-ltdl --localstatedir=/var ${myconf} |
342 |
} |
343 |
|
344 |
src_install() { |
345 |
emake DESTDIR="${D}" install || die |
346 |
|
347 |
fixlocalpod |
348 |
|
349 |
dodoc AUTHORS ChangeLog NEWS README TODO || die |
350 |
|
351 |
if use contrib ; then |
352 |
insinto /usr/share/doc/${PF} |
353 |
doins -r contrib || die |
354 |
fi |
355 |
|
356 |
keepdir /var/lib/${PN} || die |
357 |
|
358 |
newinitd "${FILESDIR}/${PN}.initd" ${PN} || die |
359 |
newconfd "${FILESDIR}/${PN}.confd" ${PN} || die |
360 |
|
361 |
insinto /etc/logrotate.d |
362 |
newins "${FILESDIR}/logrotate" collectd || die |
363 |
} |
364 |
|
365 |
collectd_rdeps() { |
366 |
if (use collectd_plugins_${1} && ! has_version "${2}"); then |
367 |
elog "The ${1} plug-in needs ${2} to be installed locally or remotely to work." |
368 |
fi |
369 |
} |
370 |
|
371 |
pkg_postinst() { |
372 |
collectd_rdeps apcups sys-power/apcupsd |
373 |
collectd_rdeps hddtemp app-admin/hddtemp |
374 |
collectd_rdeps mbmon sys-apps/xmbmon |
375 |
collectd_rdeps memcached ">=net-misc/memcached-1.2.2-r2" |
376 |
collectd_rdeps ntpd net-misc/ntp |
377 |
collectd_rdeps openvpn ">=net-misc/openvpn-2.0.9" |
378 |
} |