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