Gentoo Archives: gentoo-commits

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