1 |
commit: 5e3a95e9046e01ac2f2021fe20fd05c9408fe2e7 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Apr 29 18:15:04 2020 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Apr 29 18:31:08 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e3a95e9 |
7 |
|
8 |
app-metrics/collectd: drop old |
9 |
|
10 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
11 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
12 |
|
13 |
app-metrics/collectd/Manifest | 3 - |
14 |
app-metrics/collectd/collectd-5.8.1-r1.ebuild | 536 -------------------- |
15 |
app-metrics/collectd/collectd-5.9.1-r2.ebuild | 543 --------------------- |
16 |
app-metrics/collectd/collectd-5.9.2.ebuild | 541 -------------------- |
17 |
...ectd-5.8.1-lm_sensors-4.5.0-compatibility.patch | 70 --- |
18 |
.../collectd/files/collectd-5.9.1-fixup.patch | 81 --- |
19 |
6 files changed, 1774 deletions(-) |
20 |
|
21 |
diff --git a/app-metrics/collectd/Manifest b/app-metrics/collectd/Manifest |
22 |
index 377f9b07844..a38fa25f542 100644 |
23 |
--- a/app-metrics/collectd/Manifest |
24 |
+++ b/app-metrics/collectd/Manifest |
25 |
@@ -1,4 +1 @@ |
26 |
DIST collectd-5.10.0.tar.bz2 1856377 BLAKE2B d4c011c5d2d9bfcf8400a35ca92f0b8c82fd58c3201b1b57a6b48c98af63efaab03c5fb1144bae28e7661743626871eaa962959929ff7fcdd5778b72c7054c4e SHA512 1296085fb19bba0c7b7d8684ec877851158b25c9f7b58fc3ae602fba7d7dc718876e730e1cdba96d39101cc5452705bb3445aaee717b219025ae816299b6a3c5 |
27 |
-DIST collectd-5.8.1.tar.bz2 1789228 BLAKE2B 739f961172978db33bdf95c8f93bde0036a26b2ed2abd3396a734d4b97c4ae117bb26a62fcdbb3d77bd63d9f64a38f83d0c8a0665e8fa7bf5ed2efc6838b0e8e SHA512 8c75448c6e59ee1ea5c1cf486c07040d20fb36d5b7a1be2ab45facea330166e8c1d1fa38e3fa82ec905428d7b2c92c66aae35ee8e3546f67ce76f7f410739901 |
28 |
-DIST collectd-5.9.1.tar.gz 1501178 BLAKE2B ed0984637161427f3b354002850b7ea8c49a4aca64b637b864e5513c8057f52a4a479477b21e2a4cff436728c16d66c6d561df14308adcaeb7d597c290f543ce SHA512 424ef12a3ba6997a71e6eda1a62d73fec588c9c4d90542c2381c1f9f4e118b2c02e18c71507e8984e20fb255b69b7f42afe83085b3df5e225c576d1eee1655fb |
29 |
-DIST collectd-5.9.2.tar.gz 1501275 BLAKE2B f878dc9ee0d1948643dcbfcf3a427558a1c17adedcc31f02f4f4bb689e841760dcf732866c0617b8b139b4aecb094f8ca4aa5e7c7c707adf5589fc8767a1d2f9 SHA512 cbbc8d6409242108550b974f388d15c6084753dd51c6056614db34bceb3b72abb0237892ea65086093b9a5c5569087666c0430eb16021d22c3dde8e6d1ae7922 |
30 |
|
31 |
diff --git a/app-metrics/collectd/collectd-5.8.1-r1.ebuild b/app-metrics/collectd/collectd-5.8.1-r1.ebuild |
32 |
deleted file mode 100644 |
33 |
index 8c6d11da757..00000000000 |
34 |
--- a/app-metrics/collectd/collectd-5.8.1-r1.ebuild |
35 |
+++ /dev/null |
36 |
@@ -1,536 +0,0 @@ |
37 |
-# Copyright 1999-2020 Gentoo Authors |
38 |
-# Distributed under the terms of the GNU General Public License v2 |
39 |
- |
40 |
-EAPI="6" |
41 |
- |
42 |
-PYTHON_COMPAT=( python{3_6,3_7} ) |
43 |
-JAVA_PKG_OPT_USE="collectd_plugins_java" |
44 |
- |
45 |
-inherit autotools fcaps flag-o-matic java-pkg-opt-2 linux-info multilib perl-functions python-single-r1 systemd tmpfiles user |
46 |
- |
47 |
-DESCRIPTION="Collects system statistics and provides mechanisms to store the values" |
48 |
- |
49 |
-HOMEPAGE="https://collectd.org/" |
50 |
-SRC_URI="https://collectd.org/files/${P}.tar.bz2" |
51 |
- |
52 |
-LICENSE="MIT GPL-2 GPL-2+ GPL-3 GPL-3+" |
53 |
-SLOT="0" |
54 |
-KEYWORDS="~alpha amd64 arm x86" |
55 |
-IUSE="contrib debug java kernel_Darwin kernel_FreeBSD kernel_linux perl selinux static-libs udev xfs" |
56 |
- |
57 |
-# The plugin lists have to follow here since they extend IUSE |
58 |
- |
59 |
-# Plugins that don't build (e.g. dependencies not in Gentoo) |
60 |
-# apple_sensors: Requires libIOKit |
61 |
-# aquaero: Requires aerotools-ng/libaquaero5 |
62 |
-# barometer: Requires libi2c (i2c_smbus_read_i2c_block_data) |
63 |
-# dpdkevents: Requires dpdk |
64 |
-# dpdkstat: Requires dpdk |
65 |
-# grpc: Requires libgrpc |
66 |
-# intel_pmu: Requires libjevents (pmu-tools) |
67 |
-# intel_rdt: Requires libpqos from intel-cmt-cat project |
68 |
-# lpar: Requires libperfstat (AIX only) |
69 |
-# mic: Requires Intel Many Integrated Core Architecture API |
70 |
-# (part of Intel's Xeon Phi software) |
71 |
-# netapp: Requires libnetapp (http://communities.netapp.com/docs/DOC-1110) |
72 |
-# pf: Requires BSD packet filter |
73 |
-# pinba: Requires MySQL Pinba engine (http://pinba.org/) |
74 |
-# tape: Requires libkstat (Solaris only) |
75 |
-# write_riemann: Requires riemann-c-client |
76 |
-# xmms: Requires libxmms (v1) |
77 |
-# zone: Solaris only... |
78 |
-COLLECTD_IMPOSSIBLE_PLUGINS="apple_sensors aquaero barometer dpdkstat grpc |
79 |
- intel_pmu intel_rdt lpar mic netapp pf pinba tape write_riemann |
80 |
- xmms zone" |
81 |
- |
82 |
-# Plugins that have been (compile) tested and can be enabled via COLLECTD_PLUGINS |
83 |
-COLLECTD_TESTED_PLUGINS="aggregation amqp apache apcups ascent battery bind |
84 |
- ceph cgroups chrony conntrack contextswitch cpu cpufreq cpusleep |
85 |
- csv curl curl_json curl_xml dbi df disk dns drbd email |
86 |
- entropy ethstat exec fhcount filecount fscache gmond gps hddtemp |
87 |
- hugepages interface ipc ipmi iptables ipvs irq java lua |
88 |
- load logfile log_logstash lvm madwifi match_empty_counter |
89 |
- match_hashed match_regex match_timediff match_value mbmon mcelog md |
90 |
- memcachec memcached memory modbus mqtt multimeter mysql netlink |
91 |
- network network nfs nginx notify_desktop notify_email notify_nagios |
92 |
- ntpd numa nut olsrd onewire openldap openvpn oracle ovs_events |
93 |
- ovs_stats perl ping postgresql powerdns processes protocols python |
94 |
- python redis routeros rrdcached rrdtool sensors serial sigrok smart |
95 |
- snmp snmp_agent statsd swap syslog table tail tail_csv |
96 |
- target_notification target_replace target_scale target_set tcpconns |
97 |
- teamspeak2 ted thermal threshold tokyotyrant turbostat unixsock |
98 |
- uptime users uuid varnish virt vmem vserver wireless write_graphite |
99 |
- write_http write_kafka write_log write_mongodb write_prometheus |
100 |
- write_redis write_sensu write_tsdb xencpu zfs_arc zookeeper" |
101 |
- |
102 |
-COLLECTD_DISABLED_PLUGINS="${COLLECTD_IMPOSSIBLE_PLUGINS}" |
103 |
- |
104 |
-COLLECTD_ALL_PLUGINS=${COLLECTD_TESTED_PLUGINS} |
105 |
- |
106 |
-for plugin in ${COLLECTD_ALL_PLUGINS}; do |
107 |
- IUSE="${IUSE} collectd_plugins_${plugin}" |
108 |
-done |
109 |
-unset plugin |
110 |
- |
111 |
-# Now come the dependencies. |
112 |
- |
113 |
-COMMON_DEPEND=" |
114 |
- dev-libs/libgcrypt:= |
115 |
- dev-libs/libltdl:0= |
116 |
- perl? ( dev-lang/perl:=[ithreads] ) |
117 |
- udev? ( virtual/udev ) |
118 |
- xfs? ( sys-fs/xfsprogs ) |
119 |
- collectd_plugins_amqp? ( net-libs/rabbitmq-c ) |
120 |
- collectd_plugins_apache? ( net-misc/curl:0= ) |
121 |
- collectd_plugins_ascent? ( net-misc/curl:0= dev-libs/libxml2:2= ) |
122 |
- collectd_plugins_bind? ( net-misc/curl:0= dev-libs/libxml2:2= ) |
123 |
- collectd_plugins_ceph? ( dev-libs/yajl:= ) |
124 |
- collectd_plugins_curl? ( net-misc/curl:0= ) |
125 |
- collectd_plugins_curl_json? ( net-misc/curl:0= dev-libs/yajl:= ) |
126 |
- collectd_plugins_curl_xml? ( net-misc/curl:0= dev-libs/libxml2:2= ) |
127 |
- collectd_plugins_dbi? ( dev-db/libdbi ) |
128 |
- collectd_plugins_dns? ( net-libs/libpcap ) |
129 |
- collectd_plugins_gmond? ( sys-cluster/ganglia ) |
130 |
- collectd_plugins_gps? ( sci-geosciences/gpsd:= ) |
131 |
- collectd_plugins_ipmi? ( >=sys-libs/openipmi-2.0.16-r1 ) |
132 |
- collectd_plugins_iptables? ( >=net-firewall/iptables-1.4.13:0= ) |
133 |
- collectd_plugins_log_logstash? ( dev-libs/yajl:= ) |
134 |
- collectd_plugins_lua? ( dev-lang/lua:0= ) |
135 |
- collectd_plugins_lvm? ( sys-fs/lvm2 ) |
136 |
- collectd_plugins_memcachec? ( dev-libs/libmemcached ) |
137 |
- collectd_plugins_modbus? ( dev-libs/libmodbus ) |
138 |
- collectd_plugins_mqtt? ( app-misc/mosquitto ) |
139 |
- collectd_plugins_mysql? ( dev-db/mysql-connector-c:= ) |
140 |
- collectd_plugins_netlink? ( net-libs/libmnl ) |
141 |
- collectd_plugins_nginx? ( net-misc/curl:0= ) |
142 |
- collectd_plugins_notify_desktop? ( x11-libs/libnotify ) |
143 |
- collectd_plugins_notify_email? ( net-libs/libesmtp ) |
144 |
- collectd_plugins_nut? ( >=sys-power/nut-2.7.2-r2 ) |
145 |
- collectd_plugins_openldap? ( net-nds/openldap ) |
146 |
- collectd_plugins_onewire? ( >=sys-fs/owfs-3.1:= ) |
147 |
- collectd_plugins_oracle? ( dev-db/oracle-instantclient-basic ) |
148 |
- collectd_plugins_ovs_events? ( dev-libs/yajl:= ) |
149 |
- collectd_plugins_ovs_stats? ( dev-libs/yajl:= ) |
150 |
- collectd_plugins_perl? ( dev-lang/perl:=[ithreads] ) |
151 |
- collectd_plugins_ping? ( net-libs/liboping ) |
152 |
- collectd_plugins_postgresql? ( dev-db/postgresql:= ) |
153 |
- collectd_plugins_python? ( ${PYTHON_DEPS} ) |
154 |
- collectd_plugins_redis? ( dev-libs/hiredis:= ) |
155 |
- collectd_plugins_routeros? ( net-libs/librouteros ) |
156 |
- collectd_plugins_rrdcached? ( net-analyzer/rrdtool:= ) |
157 |
- collectd_plugins_rrdtool? ( net-analyzer/rrdtool:= ) |
158 |
- collectd_plugins_sensors? ( sys-apps/lm-sensors:= ) |
159 |
- collectd_plugins_sigrok? ( <sci-libs/libsigrok-0.4:= dev-libs/glib:2 ) |
160 |
- collectd_plugins_smart? ( dev-libs/libatasmart ) |
161 |
- collectd_plugins_snmp? ( net-analyzer/net-snmp ) |
162 |
- collectd_plugins_snmp_agent? ( net-analyzer/net-snmp ) |
163 |
- collectd_plugins_tokyotyrant? ( net-misc/tokyotyrant ) |
164 |
- collectd_plugins_varnish? ( www-servers/varnish:= ) |
165 |
- collectd_plugins_virt? ( app-emulation/libvirt:= dev-libs/libxml2:2= ) |
166 |
- collectd_plugins_write_http? ( net-misc/curl:0= dev-libs/yajl:= ) |
167 |
- collectd_plugins_write_kafka? ( >=dev-libs/librdkafka-0.9.0.99:= dev-libs/yajl:= ) |
168 |
- collectd_plugins_write_mongodb? ( >=dev-libs/mongo-c-driver-1.8.2:= ) |
169 |
- collectd_plugins_write_prometheus? ( >=dev-libs/protobuf-c-1.2.1-r1:= net-libs/libmicrohttpd:= ) |
170 |
- collectd_plugins_write_redis? ( dev-libs/hiredis:= ) |
171 |
- collectd_plugins_xencpu? ( app-emulation/xen-tools:= ) |
172 |
- |
173 |
- kernel_FreeBSD? ( |
174 |
- collectd_plugins_disk? ( sys-libs/libstatgrab:= ) |
175 |
- collectd_plugins_interface? ( sys-libs/libstatgrab:= ) |
176 |
- collectd_plugins_load? ( sys-libs/libstatgrab:= ) |
177 |
- collectd_plugins_memory? ( sys-libs/libstatgrab:= ) |
178 |
- collectd_plugins_swap? ( sys-libs/libstatgrab:= ) |
179 |
- collectd_plugins_users? ( sys-libs/libstatgrab:= ) |
180 |
- )" |
181 |
- |
182 |
-# Enforcing !=sys-kernel/linux-headers-4.5 > due to #577846 |
183 |
-DEPEND="${COMMON_DEPEND} |
184 |
- collectd_plugins_iptables? ( || ( <=sys-kernel/linux-headers-4.4 >=sys-kernel/linux-headers-4.6 ) ) |
185 |
- collectd_plugins_java? ( >=virtual/jdk-1.6 ) |
186 |
- virtual/pkgconfig" |
187 |
- |
188 |
-RDEPEND="${COMMON_DEPEND} |
189 |
- collectd_plugins_java? ( >=virtual/jre-1.6 ) |
190 |
- collectd_plugins_syslog? ( virtual/logger ) |
191 |
- selinux? ( sec-policy/selinux-collectd ) |
192 |
- !<sys-apps/openrc-0.18.2" |
193 |
- |
194 |
-REQUIRED_USE=" |
195 |
- collectd_plugins_python? ( ${PYTHON_REQUIRED_USE} ) |
196 |
- collectd_plugins_smart? ( udev )" |
197 |
- |
198 |
-PATCHES=( "${FILESDIR}"/${PN}-5.8.1-lm_sensors-4.5.0-compatibility.patch ) |
199 |
- |
200 |
-# @FUNCTION: collectd_plugin_kernel_linux |
201 |
-# @DESCRIPTION: |
202 |
-# USAGE: <plugin name> <kernel_options> <severity> |
203 |
-# kernel_options is a list of kernel configurations options; the check tests whether at least |
204 |
-# one of them is enabled. If no, depending on the third argument an elog, ewarn, or eerror message |
205 |
-# is emitted. |
206 |
-collectd_plugin_kernel_linux() { |
207 |
- local multi_opt opt |
208 |
- if has ${1} ${COLLECTD_ALL_PLUGINS}; then |
209 |
- if use collectd_plugins_${1}; then |
210 |
- for opt in ${2}; do |
211 |
- if linux_chkconfig_present ${opt}; then |
212 |
- return 0; |
213 |
- fi |
214 |
- done |
215 |
- multi_opt=${2//\ /\ or\ } |
216 |
- case ${3} in |
217 |
- (info) |
218 |
- elog "The ${1} plugin can use kernel features that are disabled now; enable ${multi_opt} in your kernel" |
219 |
- ;; |
220 |
- (warn) |
221 |
- ewarn "The ${1} plugin uses kernel features that are disabled now; enable ${multi_opt} in your kernel" |
222 |
- ;; |
223 |
- (error) |
224 |
- eerror "The ${1} plugin needs kernel features that are disabled now; enable ${multi_opt} in your kernel" |
225 |
- ;; |
226 |
- (*) |
227 |
- die "function collectd_plugin_kernel_linux called with invalid third argument" |
228 |
- ;; |
229 |
- esac |
230 |
- fi |
231 |
- fi |
232 |
-} |
233 |
- |
234 |
-collectd_linux_kernel_checks() { |
235 |
- if ! linux_chkconfig_present PROC_FS; then |
236 |
- ewarn "/proc file system support is disabled, many plugins will not be able to read any statistics from your system unless you enable PROC_FS in your kernel" |
237 |
- fi |
238 |
- |
239 |
- if ! linux_chkconfig_present SYSFS; then |
240 |
- ewarn "/sys file system support is disabled, many plugins will not be able to read any statistics from your system unless you enable SYSFS in your kernel" |
241 |
- fi |
242 |
- |
243 |
- # battery.c: /proc/pmu/battery_%i |
244 |
- # battery.c: /proc/acpi/battery |
245 |
- collectd_plugin_kernel_linux battery ACPI_BATTERY warn |
246 |
- |
247 |
- # cgroups.c: /sys/fs/cgroup/ |
248 |
- collectd_plugin_kernel_linux cgroups CGROUPS 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 |
- # drbd.c: /proc/drbd |
255 |
- collectd_plugin_kernel_linux drbd BLK_DEV_DRBD warn |
256 |
- |
257 |
- # conntrack.c: /proc/sys/net/netfilter/* |
258 |
- collectd_plugin_kernel_linux conntrack NETFILTER warn |
259 |
- |
260 |
- # fscache.c: /proc/fs/fscache/stats |
261 |
- collectd_plugin_kernel_linux fscache FSCACHE warn |
262 |
- |
263 |
- # nfs.c: /proc/net/rpc/nfs |
264 |
- # nfs.c: /proc/net/rpc/nfsd |
265 |
- collectd_plugin_kernel_linux nfs NFS_COMMON warn |
266 |
- |
267 |
- # serial.c: /proc/tty/driver/serial |
268 |
- # serial.c: /proc/tty/driver/ttyS |
269 |
- collectd_plugin_kernel_linux serial SERIAL_CORE warn |
270 |
- |
271 |
- # swap.c: /proc/meminfo |
272 |
- collectd_plugin_kernel_linux swap SWAP warn |
273 |
- |
274 |
- # thermal.c: /proc/acpi/thermal_zone |
275 |
- # thermal.c: /sys/class/thermal |
276 |
- collectd_plugin_kernel_linux thermal ACPI_THERMAL warn |
277 |
- |
278 |
- # turbostat.c: /dev/cpu/%d/msr |
279 |
- collectd_plugin_kernel_linux turbostat X86_MSR warn |
280 |
- |
281 |
- # vmem.c: /proc/vmstat |
282 |
- collectd_plugin_kernel_linux vmem VM_EVENT_COUNTERS warn |
283 |
- |
284 |
- # vserver.c: /proc/virtual |
285 |
- collectd_plugin_kernel_linux vserver VSERVER warn |
286 |
- |
287 |
- # uuid.c: /sys/hypervisor/uuid |
288 |
- collectd_plugin_kernel_linux uuid SYSFS info |
289 |
- |
290 |
- # wireless.c: /proc/net/wireless |
291 |
- collectd_plugin_kernel_linux wireless "WIRELESS MAC80211 IEEE80211" warn |
292 |
- |
293 |
- # zfs_arc.c: /proc/spl/kstat/zfs/arcstats |
294 |
- collectd_plugin_kernel_linux zfs_arc "SPL ZFS" warn |
295 |
-} |
296 |
- |
297 |
-pkg_setup() { |
298 |
- if use kernel_linux; then |
299 |
- linux-info_pkg_setup |
300 |
- |
301 |
- if linux_config_exists; then |
302 |
- einfo "Checking your linux kernel configuration:" |
303 |
- collectd_linux_kernel_checks |
304 |
- else |
305 |
- elog "Cannot find a linux kernel configuration. Continuing anyway." |
306 |
- fi |
307 |
- fi |
308 |
- |
309 |
- if use collectd_plugins_java; then |
310 |
- java-pkg-opt-2_pkg_setup |
311 |
- fi |
312 |
- |
313 |
- use collectd_plugins_python && python-single-r1_pkg_setup |
314 |
- |
315 |
- enewgroup collectd |
316 |
- enewuser collectd -1 -1 /var/lib/collectd collectd |
317 |
-} |
318 |
- |
319 |
-src_prepare() { |
320 |
- default |
321 |
- |
322 |
- # There's some strange prefix handling in the default config file, resulting in |
323 |
- # paths like "/usr/var/..." |
324 |
- sed -i -e "s:@prefix@/var:/var:g" src/collectd.conf.in || die |
325 |
- |
326 |
- # Adjust upstream's systemd unit |
327 |
- # - Get rid of EnvironmentFile directive; These files don't exist on Gentoo! |
328 |
- # - Add User=collectd to run collectd as user "collectd" per default |
329 |
- sed -i \ |
330 |
- -e '/^EnvironmentFile=.*/d' \ |
331 |
- -e '/^\[Service\]/aUser=collectd' \ |
332 |
- contrib/systemd.${PN}.service || die |
333 |
- |
334 |
- eautoreconf |
335 |
-} |
336 |
- |
337 |
-src_configure() { |
338 |
- # Now come the lists of os-dependent plugins. Any plugin that is not listed anywhere here |
339 |
- # should work independent of the operating system. |
340 |
- |
341 |
- local linux_plugins="barometer battery cpu cpufreq disk |
342 |
- drbd entropy ethstat hugepages interface iptables |
343 |
- ipvs irq ipc load memory md netlink nfs numa processes |
344 |
- serial swap tcpconns thermal turbostat users vmem wireless |
345 |
- zfc_arc" |
346 |
- |
347 |
- local need_libstatgrab=0 |
348 |
- local libstatgrab_plugins="cpu disk interface load memory swap users" |
349 |
- local bsd_plugins="cpu tcpconns ${libstatgrab_plugins} zfc_arc" |
350 |
- |
351 |
- local darwin_plugins="apple_sensors battery cpu disk interface memory processes tcpconns" |
352 |
- |
353 |
- local osdependent_plugins="${linux_plugins} ${bsd_plugins} ${darwin_plugins}" |
354 |
- local myos_plugins="" |
355 |
- if use kernel_linux; then |
356 |
- einfo "Enabling Linux plugins." |
357 |
- myos_plugins=${linux_plugins} |
358 |
- elif use kernel_FreeBSD; then |
359 |
- einfo "Enabling FreeBSD plugins." |
360 |
- myos_plugins=${bsd_plugins} |
361 |
- elif use kernel_Darwin; then |
362 |
- einfo "Enabling Darwin plugins." |
363 |
- myos_plugins=${darwin_plugins} |
364 |
- fi |
365 |
- |
366 |
- local myconf="--disable-werror" |
367 |
- |
368 |
- # Do we debug? |
369 |
- myconf+=" $(use_enable debug)" |
370 |
- |
371 |
- # udev support? |
372 |
- # Required for smart plugin via REQUIRED_USE; Optional for disk plugin |
373 |
- if use udev; then |
374 |
- myconf+=" --with-libudev" |
375 |
- else |
376 |
- myconf+=" --without-libudev" |
377 |
- fi |
378 |
- |
379 |
- local plugin |
380 |
- |
381 |
- # Disable what needs to be disabled. |
382 |
- for plugin in ${COLLECTD_DISABLED_PLUGINS}; do |
383 |
- myconf+=" --disable-${plugin}" |
384 |
- done |
385 |
- |
386 |
- # Set enable/disable for each single plugin. |
387 |
- for plugin in ${COLLECTD_ALL_PLUGINS}; do |
388 |
- if has ${plugin} ${osdependent_plugins}; then |
389 |
- # plugin is os-dependent ... |
390 |
- if has ${plugin} ${myos_plugins}; then |
391 |
- # ... and available in this os |
392 |
- myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" |
393 |
- # ... must we link against libstatgrab? Bug #541518 |
394 |
- if use kernel_FreeBSD && has ${plugin} ${libstatgrab_plugins}; then |
395 |
- einfo "We must link against libstatgrab due to plugin \"${plugin}\" ..." |
396 |
- need_libstatgrab=1 |
397 |
- fi |
398 |
- else |
399 |
- # ... and NOT available in this os |
400 |
- if use collectd_plugins_${plugin}; then |
401 |
- ewarn "You try to enable the ${plugin} plugin, but it is not available for this" |
402 |
- ewarn "kernel. Disabling it automatically." |
403 |
- fi |
404 |
- myconf+=" --disable-${plugin}" |
405 |
- fi |
406 |
- elif [[ "${plugin}" = "collectd_plugins_perl" ]]; then |
407 |
- if use collectd_plugins_perl && ! use perl; then |
408 |
- ewarn "Perl plugin disabled as perl bindings disabled by -perl use flag" |
409 |
- myconf+= --disable-perl |
410 |
- else |
411 |
- myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" |
412 |
- fi |
413 |
- else |
414 |
- myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" |
415 |
- fi |
416 |
- done |
417 |
- |
418 |
- if [ "${need_libstatgrab}" -eq 1 ]; then |
419 |
- myconf+=" --with-libstatgrab" |
420 |
- else |
421 |
- myconf+=" --without-libstatgrab" |
422 |
- fi |
423 |
- |
424 |
- # JAVA_HOME is set by eclasses. |
425 |
- if use collectd_plugins_java; then |
426 |
- myconf+=" --with-java" |
427 |
- fi |
428 |
- |
429 |
- # Need libiptc ONLY for iptables. If we try to use it otherwise bug 340109 happens. |
430 |
- # lots of libs are only needed for plugins, if they are disabled, also disable the lib |
431 |
- use collectd_plugins_iptables || myconf+=" --with-libiptc=no" |
432 |
- use collectd_plugins_openldap || myconf+=" --with-libldap=no" |
433 |
- use collectd_plugins_redis || use collectd_plugins_write_redis || myconf+=" --with-libhiredis=no" |
434 |
- use collectd_plugins_smart || myconf+=" --with-libatasmart=no" |
435 |
- use collectd_plugins_gps || myconf+=" --with-libgps=no" |
436 |
- |
437 |
- if use perl; then |
438 |
- myconf+=" --with-perl-bindings=INSTALLDIRS=vendor" |
439 |
- else |
440 |
- myconf+=" --without-perl-bindings" |
441 |
- fi |
442 |
- |
443 |
- # No need for v5upgrade |
444 |
- myconf+=" --disable-target_v5upgrade" |
445 |
- |
446 |
- # Python |
447 |
- if use collectd_plugins_python; then |
448 |
- myconf+=" --with-libpython=yes" |
449 |
- export PYTHON_CONFIG=$(python_get_PYTHON_CONFIG) |
450 |
- else |
451 |
- myconf+=" --with-libpython=no" |
452 |
- fi |
453 |
- |
454 |
- # XFS support |
455 |
- myconf+=" $(use_enable xfs)" |
456 |
- |
457 |
- # Finally, run econf. |
458 |
- KERNEL_DIR="${KERNEL_DIR}" econf --config-cache \ |
459 |
- $(use_enable static-libs static) \ |
460 |
- --localstatedir=/var ${myconf} |
461 |
-} |
462 |
- |
463 |
-src_install() { |
464 |
- emake DESTDIR="${D%/}" install |
465 |
- |
466 |
- perl_delete_localpod |
467 |
- |
468 |
- find "${ED}"usr/ -name "*.la" -delete || die |
469 |
- |
470 |
- if use collectd_plugins_java; then |
471 |
- java-pkg_regjar "${ED}"usr/share/${PN}/java/*.jar |
472 |
- fi |
473 |
- |
474 |
- fowners root:collectd /etc/collectd.conf |
475 |
- fperms u=rw,g=r,o= /etc/collectd.conf |
476 |
- |
477 |
- dodoc AUTHORS ChangeLog README |
478 |
- |
479 |
- if use contrib ; then |
480 |
- insinto /usr/share/doc/${PF} |
481 |
- doins -r contrib |
482 |
- fi |
483 |
- |
484 |
- keepdir /var/lib/${PN} |
485 |
- fowners collectd:collectd /var/lib/${PN} |
486 |
- |
487 |
- newinitd "${FILESDIR}/${PN}.initd-r2" ${PN} |
488 |
- newconfd "${FILESDIR}/${PN}.confd-r2" ${PN} |
489 |
- systemd_newunit "contrib/systemd.${PN}.service" ${PN}.service |
490 |
- |
491 |
- insinto /etc/logrotate.d |
492 |
- newins "${FILESDIR}/${PN}.logrotate" ${PN} |
493 |
- |
494 |
- newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf |
495 |
- |
496 |
- sed -i -e 's:^.*PIDFile "/var/run/collectd.pid":#PIDFile "/run/collectd.pid":' "${ED}"etc/collectd.conf || die |
497 |
- sed -i -e 's:^# SocketFile "/var/run/collectd-unixsock":# SocketFile "/run/collectd/collectd.socket":' "${ED}"etc/collectd.conf || die |
498 |
- sed -i -e 's:^.*LoadPlugin perl$:# The new, correct way to load the perl plugin -- \n# <LoadPlugin perl>\n# Globals true\n# </LoadPlugin>:' "${ED}"etc/collectd.conf || die |
499 |
- sed -i -e 's:^.*LoadPlugin python$:# The new, correct way to load the python plugin -- \n# <LoadPlugin python>\n# Globals true\n# </LoadPlugin>:' "${ED}"etc/collectd.conf || die |
500 |
-} |
501 |
- |
502 |
-pkg_postinst() { |
503 |
- tmpfiles_process "${PN}.conf" |
504 |
- |
505 |
- if use filecaps; then |
506 |
- local caps=() |
507 |
- use collectd_plugins_ceph && caps+=('CAP_DAC_OVERRIDE') |
508 |
- use collectd_plugins_exec && caps+=('CAP_SETUID' 'CAP_SETGID') |
509 |
- use collectd_plugins_iptables && caps+=('CAP_NET_ADMIN') |
510 |
- use collectd_plugins_filecount && caps+=('CAP_DAC_READ_SEARCH') |
511 |
- |
512 |
- if use collectd_plugins_dns || use collectd_plugins_ping; then |
513 |
- caps+=('CAP_NET_RAW') |
514 |
- fi |
515 |
- |
516 |
- if use collectd_plugins_turbostat || use collectd_plugins_smart; then |
517 |
- caps+=('CAP_SYS_RAWIO') |
518 |
- fi |
519 |
- |
520 |
- if [ ${#caps[@]} -gt 0 ]; then |
521 |
- local caps_str=$(IFS=","; echo "${caps[*]}") |
522 |
- fcaps ${caps_str} usr/sbin/collectd |
523 |
- elog "Capabilities for ${EROOT}usr/sbin/collectd set to:" |
524 |
- elog " ${caps_str}+EP" |
525 |
- elog |
526 |
- |
527 |
- local systemd_unit="$(systemd_get_systemunitdir)/collectd.service" |
528 |
- if [[ -e "${systemd_unit}" ]]; then |
529 |
- caps_str="${caps[*]}" |
530 |
- sed -i -e "s:^CapabilityBoundingSet=.*:CapabilityBoundingSet=${caps_str}:" "${systemd_unit}" || \ |
531 |
- die "Failed to set CapabilityBoundingSet in '${systemd_unit}'" |
532 |
- |
533 |
- elog "CapabilityBoundingSet in '${systemd_unit}'" |
534 |
- elog "updated to match capabilities set above." |
535 |
- elog |
536 |
- else |
537 |
- if has_version "sys-apps/systemd"; then |
538 |
- # Bug 596852 |
539 |
- ewarn "Failed to update CapabilityBoundingSet in '${systemd_unit}'" |
540 |
- ewarn "because unit was not found. Please file a bug about this." |
541 |
- fi |
542 |
- fi |
543 |
- fi |
544 |
- fi |
545 |
- |
546 |
- elog "Note: Collectd is only the collector." |
547 |
- elog " You need to install 'data' sources (applications) locally or" |
548 |
- elog " remotely on your own." |
549 |
- |
550 |
- elog |
551 |
- elog "Collectd is configured to run as unprivileged user by default." |
552 |
- elog "You may want to revisit the configuration." |
553 |
- elog |
554 |
- |
555 |
- if use collectd_plugins_email; then |
556 |
- ewarn "The email plug-in is deprecated. To submit statistics please use the unixsock plugin." |
557 |
- fi |
558 |
- |
559 |
- if use collectd_plugins_smart; then |
560 |
- elog "" |
561 |
- elog "If you are using smart plugin and don't run collectd as root make sure" |
562 |
- elog "that the collectd user is allowed to access the disk you want to monitor" |
563 |
- elog "(can be done via udev rule for example) and that collectd has the required" |
564 |
- elog "capabilities set (which is the default when package was emerged with" |
565 |
- elog "'filecaps' USE flag set)." |
566 |
- fi |
567 |
- |
568 |
- if use contrib; then |
569 |
- elog "The scripts in /usr/share/doc/${PF}/collection3 for generating graphs need dev-perl/HTML-Parser," |
570 |
- elog "dev-perl/config-general, dev-perl/regexp-common, and net-analyzer/rrdtool[perl] to be installed." |
571 |
- fi |
572 |
-} |
573 |
|
574 |
diff --git a/app-metrics/collectd/collectd-5.9.1-r2.ebuild b/app-metrics/collectd/collectd-5.9.1-r2.ebuild |
575 |
deleted file mode 100644 |
576 |
index e35d63e8387..00000000000 |
577 |
--- a/app-metrics/collectd/collectd-5.9.1-r2.ebuild |
578 |
+++ /dev/null |
579 |
@@ -1,543 +0,0 @@ |
580 |
-# Copyright 1999-2020 Gentoo Authors |
581 |
-# Distributed under the terms of the GNU General Public License v2 |
582 |
- |
583 |
-EAPI="6" |
584 |
- |
585 |
-PYTHON_COMPAT=( python{3_6,3_7} ) |
586 |
-JAVA_PKG_OPT_USE="collectd_plugins_java" |
587 |
- |
588 |
-inherit autotools fcaps flag-o-matic java-pkg-opt-2 linux-info multilib perl-functions python-single-r1 systemd tmpfiles user |
589 |
- |
590 |
-DESCRIPTION="Collects system statistics and provides mechanisms to store the values" |
591 |
- |
592 |
-HOMEPAGE="https://collectd.org/" |
593 |
-SRC_URI="https://github.com/${PN}/${PN}/archive/${PN}-${PV}.tar.gz" |
594 |
- |
595 |
-LICENSE="MIT GPL-2 GPL-2+ GPL-3 GPL-3+" |
596 |
-SLOT="0" |
597 |
-KEYWORDS="~alpha ~amd64 ~arm ~x86" |
598 |
-IUSE="contrib debug java kernel_Darwin kernel_FreeBSD kernel_linux perl selinux static-libs udev xfs" |
599 |
- |
600 |
-# The plugin lists have to follow here since they extend IUSE |
601 |
- |
602 |
-# Plugins that don't build (e.g. dependencies not in Gentoo) |
603 |
-# apple_sensors: Requires libIOKit |
604 |
-# amqp1: Requires libqpid-proton |
605 |
-# aquaero: Requires aerotools-ng/libaquaero5 |
606 |
-# barometer: Requires libi2c (i2c_smbus_read_i2c_block_data) |
607 |
-# dpdkevents: Requires dpdk |
608 |
-# dpdkstat: Requires dpdk |
609 |
-# grpc: Requires libgrpc |
610 |
-# intel_pmu: Requires libjevents (pmu-tools) |
611 |
-# intel_rdt: Requires libpqos from intel-cmt-cat project |
612 |
-# lpar: Requires libperfstat (AIX only) |
613 |
-# mic: Requires Intel Many Integrated Core Architecture API |
614 |
-# (part of Intel's Xeon Phi software) |
615 |
-# netapp: Requires libnetapp (http://communities.netapp.com/docs/DOC-1110) |
616 |
-# pf: Requires BSD packet filter |
617 |
-# pinba: Requires MySQL Pinba engine (http://pinba.org/) |
618 |
-# tape: Requires libkstat (Solaris only) |
619 |
-# write_riemann: Requires riemann-c-client |
620 |
-# xmms: Requires libxmms (v1) |
621 |
-# zone: Solaris only... |
622 |
-COLLECTD_IMPOSSIBLE_PLUGINS="apple_sensors amqp1 aquaero barometer dpdkstat |
623 |
- grpc intel_pmu intel_rdt lpar mic netapp pf pinba tape write_riemann |
624 |
- xmms zone" |
625 |
- |
626 |
-# Plugins that have been (compile) tested and can be enabled via COLLECTD_PLUGINS |
627 |
-COLLECTD_TESTED_PLUGINS="aggregation amqp apache apcups ascent battery bind |
628 |
- ceph cgroups chrony conntrack contextswitch cpu cpufreq cpusleep |
629 |
- csv curl curl_json curl_xml dbi df disk dns drbd email |
630 |
- entropy ethstat exec fhcount filecount fscache gmond gps hddtemp |
631 |
- hugepages interface ipc ipmi iptables ipvs irq java lua |
632 |
- load logfile log_logstash lvm madwifi match_empty_counter |
633 |
- match_hashed match_regex match_timediff match_value mbmon mcelog md |
634 |
- memcachec memcached memory modbus mqtt multimeter mysql netlink |
635 |
- network network nfs nginx notify_desktop notify_email notify_nagios |
636 |
- ntpd numa nut olsrd onewire openldap openvpn oracle ovs_events |
637 |
- ovs_stats perl ping postgresql powerdns processes protocols python |
638 |
- python redis routeros rrdcached rrdtool sensors serial sigrok smart |
639 |
- snmp snmp_agent statsd swap syslog table tail tail_csv |
640 |
- target_notification target_replace target_scale target_set tcpconns |
641 |
- teamspeak2 ted thermal threshold tokyotyrant turbostat unixsock |
642 |
- uptime users uuid varnish virt vmem vserver wireless write_graphite |
643 |
- write_http write_kafka write_log write_mongodb write_prometheus |
644 |
- write_redis write_sensu write_tsdb xencpu zfs_arc zookeeper" |
645 |
- |
646 |
-COLLECTD_DISABLED_PLUGINS="${COLLECTD_IMPOSSIBLE_PLUGINS}" |
647 |
- |
648 |
-COLLECTD_ALL_PLUGINS=${COLLECTD_TESTED_PLUGINS} |
649 |
- |
650 |
-for plugin in ${COLLECTD_ALL_PLUGINS}; do |
651 |
- IUSE="${IUSE} collectd_plugins_${plugin}" |
652 |
-done |
653 |
-unset plugin |
654 |
- |
655 |
-# Now come the dependencies. |
656 |
- |
657 |
-COMMON_DEPEND=" |
658 |
- dev-libs/libgcrypt:= |
659 |
- dev-libs/libltdl:0= |
660 |
- perl? ( dev-lang/perl:=[ithreads] ) |
661 |
- udev? ( virtual/udev ) |
662 |
- xfs? ( sys-fs/xfsprogs ) |
663 |
- collectd_plugins_amqp? ( net-libs/rabbitmq-c ) |
664 |
- collectd_plugins_apache? ( net-misc/curl:0= ) |
665 |
- collectd_plugins_ascent? ( net-misc/curl:0= dev-libs/libxml2:2= ) |
666 |
- collectd_plugins_bind? ( net-misc/curl:0= dev-libs/libxml2:2= ) |
667 |
- collectd_plugins_ceph? ( dev-libs/yajl:= ) |
668 |
- collectd_plugins_curl? ( net-misc/curl:0= ) |
669 |
- collectd_plugins_curl_json? ( net-misc/curl:0= dev-libs/yajl:= ) |
670 |
- collectd_plugins_curl_xml? ( net-misc/curl:0= dev-libs/libxml2:2= ) |
671 |
- collectd_plugins_dbi? ( dev-db/libdbi ) |
672 |
- collectd_plugins_dns? ( net-libs/libpcap ) |
673 |
- collectd_plugins_gmond? ( sys-cluster/ganglia ) |
674 |
- collectd_plugins_gps? ( sci-geosciences/gpsd:= ) |
675 |
- collectd_plugins_ipmi? ( >=sys-libs/openipmi-2.0.16-r1 ) |
676 |
- collectd_plugins_iptables? ( >=net-firewall/iptables-1.4.13:0= ) |
677 |
- collectd_plugins_log_logstash? ( dev-libs/yajl:= ) |
678 |
- collectd_plugins_lua? ( dev-lang/lua:0= ) |
679 |
- collectd_plugins_lvm? ( sys-fs/lvm2 ) |
680 |
- collectd_plugins_memcachec? ( dev-libs/libmemcached ) |
681 |
- collectd_plugins_modbus? ( dev-libs/libmodbus ) |
682 |
- collectd_plugins_mqtt? ( app-misc/mosquitto ) |
683 |
- collectd_plugins_mysql? ( dev-db/mysql-connector-c:= ) |
684 |
- collectd_plugins_netlink? ( net-libs/libmnl ) |
685 |
- collectd_plugins_nginx? ( net-misc/curl:0= ) |
686 |
- collectd_plugins_notify_desktop? ( x11-libs/libnotify ) |
687 |
- collectd_plugins_notify_email? ( net-libs/libesmtp ) |
688 |
- collectd_plugins_nut? ( >=sys-power/nut-2.7.2-r2 ) |
689 |
- collectd_plugins_openldap? ( net-nds/openldap ) |
690 |
- collectd_plugins_onewire? ( >=sys-fs/owfs-3.1:= ) |
691 |
- collectd_plugins_oracle? ( dev-db/oracle-instantclient-basic ) |
692 |
- collectd_plugins_ovs_events? ( dev-libs/yajl:= ) |
693 |
- collectd_plugins_ovs_stats? ( dev-libs/yajl:= ) |
694 |
- collectd_plugins_perl? ( dev-lang/perl:=[ithreads] ) |
695 |
- collectd_plugins_ping? ( net-libs/liboping ) |
696 |
- collectd_plugins_postgresql? ( dev-db/postgresql:= ) |
697 |
- collectd_plugins_python? ( ${PYTHON_DEPS} ) |
698 |
- collectd_plugins_redis? ( dev-libs/hiredis:= ) |
699 |
- collectd_plugins_routeros? ( net-libs/librouteros ) |
700 |
- collectd_plugins_rrdcached? ( net-analyzer/rrdtool:= ) |
701 |
- collectd_plugins_rrdtool? ( net-analyzer/rrdtool:= ) |
702 |
- collectd_plugins_sensors? ( sys-apps/lm-sensors:= ) |
703 |
- collectd_plugins_sigrok? ( <sci-libs/libsigrok-0.4:= dev-libs/glib:2 ) |
704 |
- collectd_plugins_smart? ( dev-libs/libatasmart ) |
705 |
- collectd_plugins_snmp? ( net-analyzer/net-snmp ) |
706 |
- collectd_plugins_snmp_agent? ( net-analyzer/net-snmp ) |
707 |
- collectd_plugins_tokyotyrant? ( net-misc/tokyotyrant ) |
708 |
- collectd_plugins_varnish? ( www-servers/varnish:= ) |
709 |
- collectd_plugins_virt? ( app-emulation/libvirt:= dev-libs/libxml2:2= ) |
710 |
- collectd_plugins_write_http? ( net-misc/curl:0= dev-libs/yajl:= ) |
711 |
- collectd_plugins_write_kafka? ( >=dev-libs/librdkafka-0.9.0.99:= dev-libs/yajl:= ) |
712 |
- collectd_plugins_write_mongodb? ( >=dev-libs/mongo-c-driver-1.8.2:= ) |
713 |
- collectd_plugins_write_prometheus? ( >=dev-libs/protobuf-c-1.2.1-r1:= net-libs/libmicrohttpd:= ) |
714 |
- collectd_plugins_write_redis? ( dev-libs/hiredis:= ) |
715 |
- collectd_plugins_xencpu? ( app-emulation/xen-tools:= ) |
716 |
- |
717 |
- kernel_FreeBSD? ( |
718 |
- collectd_plugins_disk? ( sys-libs/libstatgrab:= ) |
719 |
- collectd_plugins_interface? ( sys-libs/libstatgrab:= ) |
720 |
- collectd_plugins_load? ( sys-libs/libstatgrab:= ) |
721 |
- collectd_plugins_memory? ( sys-libs/libstatgrab:= ) |
722 |
- collectd_plugins_swap? ( sys-libs/libstatgrab:= ) |
723 |
- collectd_plugins_users? ( sys-libs/libstatgrab:= ) |
724 |
- )" |
725 |
- |
726 |
-# Enforcing !=sys-kernel/linux-headers-4.5 > due to #577846 |
727 |
-DEPEND="${COMMON_DEPEND} |
728 |
- collectd_plugins_iptables? ( || ( <=sys-kernel/linux-headers-4.4 >=sys-kernel/linux-headers-4.6 ) ) |
729 |
- collectd_plugins_java? ( >=virtual/jdk-1.6 ) |
730 |
- virtual/pkgconfig" |
731 |
- |
732 |
-RDEPEND="${COMMON_DEPEND} |
733 |
- collectd_plugins_java? ( >=virtual/jre-1.6 ) |
734 |
- collectd_plugins_syslog? ( virtual/logger ) |
735 |
- selinux? ( sec-policy/selinux-collectd ) |
736 |
- !<sys-apps/openrc-0.18.2" |
737 |
- |
738 |
-REQUIRED_USE=" |
739 |
- collectd_plugins_python? ( ${PYTHON_REQUIRED_USE} ) |
740 |
- collectd_plugins_smart? ( udev )" |
741 |
- |
742 |
-PATCHES=( "${FILESDIR}"/${P}-fixup.patch ) |
743 |
- |
744 |
-S="${WORKDIR}/${PN}-${PN}-${PV}" |
745 |
- |
746 |
-# @FUNCTION: collectd_plugin_kernel_linux |
747 |
-# @DESCRIPTION: |
748 |
-# USAGE: <plugin name> <kernel_options> <severity> |
749 |
-# kernel_options is a list of kernel configurations options; the check tests whether at least |
750 |
-# one of them is enabled. If no, depending on the third argument an elog, ewarn, or eerror message |
751 |
-# is emitted. |
752 |
-collectd_plugin_kernel_linux() { |
753 |
- local multi_opt opt |
754 |
- if has ${1} ${COLLECTD_ALL_PLUGINS}; then |
755 |
- if use collectd_plugins_${1}; then |
756 |
- for opt in ${2}; do |
757 |
- if linux_chkconfig_present ${opt}; then |
758 |
- return 0; |
759 |
- fi |
760 |
- done |
761 |
- multi_opt=${2//\ /\ or\ } |
762 |
- case ${3} in |
763 |
- (info) |
764 |
- elog "The ${1} plugin can use kernel features that are disabled now; enable ${multi_opt} in your kernel" |
765 |
- ;; |
766 |
- (warn) |
767 |
- ewarn "The ${1} plugin uses kernel features that are disabled now; enable ${multi_opt} in your kernel" |
768 |
- ;; |
769 |
- (error) |
770 |
- eerror "The ${1} plugin needs kernel features that are disabled now; enable ${multi_opt} in your kernel" |
771 |
- ;; |
772 |
- (*) |
773 |
- die "function collectd_plugin_kernel_linux called with invalid third argument" |
774 |
- ;; |
775 |
- esac |
776 |
- fi |
777 |
- fi |
778 |
-} |
779 |
- |
780 |
-collectd_linux_kernel_checks() { |
781 |
- if ! linux_chkconfig_present PROC_FS; then |
782 |
- ewarn "/proc file system support is disabled, many plugins will not be able to read any statistics from your system unless you enable PROC_FS in your kernel" |
783 |
- fi |
784 |
- |
785 |
- if ! linux_chkconfig_present SYSFS; then |
786 |
- ewarn "/sys file system support is disabled, many plugins will not be able to read any statistics from your system unless you enable SYSFS in your kernel" |
787 |
- fi |
788 |
- |
789 |
- # battery.c: /proc/pmu/battery_%i |
790 |
- # battery.c: /proc/acpi/battery |
791 |
- collectd_plugin_kernel_linux battery ACPI_BATTERY warn |
792 |
- |
793 |
- # cgroups.c: /sys/fs/cgroup/ |
794 |
- collectd_plugin_kernel_linux cgroups CGROUPS warn |
795 |
- |
796 |
- # cpufreq.c: /sys/devices/system/cpu/cpu%d/cpufreq/ |
797 |
- collectd_plugin_kernel_linux cpufreq SYSFS warn |
798 |
- collectd_plugin_kernel_linux cpufreq CPU_FREQ_STAT warn |
799 |
- |
800 |
- # drbd.c: /proc/drbd |
801 |
- collectd_plugin_kernel_linux drbd BLK_DEV_DRBD warn |
802 |
- |
803 |
- # conntrack.c: /proc/sys/net/netfilter/* |
804 |
- collectd_plugin_kernel_linux conntrack NETFILTER warn |
805 |
- |
806 |
- # fscache.c: /proc/fs/fscache/stats |
807 |
- collectd_plugin_kernel_linux fscache FSCACHE warn |
808 |
- |
809 |
- # nfs.c: /proc/net/rpc/nfs |
810 |
- # nfs.c: /proc/net/rpc/nfsd |
811 |
- collectd_plugin_kernel_linux nfs NFS_COMMON warn |
812 |
- |
813 |
- # serial.c: /proc/tty/driver/serial |
814 |
- # serial.c: /proc/tty/driver/ttyS |
815 |
- collectd_plugin_kernel_linux serial SERIAL_CORE warn |
816 |
- |
817 |
- # swap.c: /proc/meminfo |
818 |
- collectd_plugin_kernel_linux swap SWAP warn |
819 |
- |
820 |
- # thermal.c: /proc/acpi/thermal_zone |
821 |
- # thermal.c: /sys/class/thermal |
822 |
- collectd_plugin_kernel_linux thermal ACPI_THERMAL warn |
823 |
- |
824 |
- # turbostat.c: /dev/cpu/%d/msr |
825 |
- collectd_plugin_kernel_linux turbostat X86_MSR warn |
826 |
- |
827 |
- # vmem.c: /proc/vmstat |
828 |
- collectd_plugin_kernel_linux vmem VM_EVENT_COUNTERS warn |
829 |
- |
830 |
- # vserver.c: /proc/virtual |
831 |
- collectd_plugin_kernel_linux vserver VSERVER warn |
832 |
- |
833 |
- # uuid.c: /sys/hypervisor/uuid |
834 |
- collectd_plugin_kernel_linux uuid SYSFS info |
835 |
- |
836 |
- # wireless.c: /proc/net/wireless |
837 |
- collectd_plugin_kernel_linux wireless "WIRELESS MAC80211 IEEE80211" warn |
838 |
- |
839 |
- # zfs_arc.c: /proc/spl/kstat/zfs/arcstats |
840 |
- collectd_plugin_kernel_linux zfs_arc "SPL ZFS" warn |
841 |
-} |
842 |
- |
843 |
-pkg_setup() { |
844 |
- if use kernel_linux; then |
845 |
- linux-info_pkg_setup |
846 |
- |
847 |
- if linux_config_exists; then |
848 |
- einfo "Checking your linux kernel configuration:" |
849 |
- collectd_linux_kernel_checks |
850 |
- else |
851 |
- elog "Cannot find a linux kernel configuration. Continuing anyway." |
852 |
- fi |
853 |
- fi |
854 |
- |
855 |
- if use collectd_plugins_java; then |
856 |
- java-pkg-opt-2_pkg_setup |
857 |
- fi |
858 |
- |
859 |
- use collectd_plugins_python && python-single-r1_pkg_setup |
860 |
- |
861 |
- enewgroup collectd |
862 |
- enewuser collectd -1 -1 /var/lib/collectd collectd |
863 |
-} |
864 |
- |
865 |
-src_prepare() { |
866 |
- default |
867 |
- |
868 |
- # There's some strange prefix handling in the default config file, resulting in |
869 |
- # paths like "/usr/var/..." |
870 |
- sed -i -e "s:@prefix@/var:/var:g" src/collectd.conf.in || die |
871 |
- |
872 |
- # Adjust upstream's systemd unit |
873 |
- # - Get rid of EnvironmentFile directive; These files don't exist on Gentoo! |
874 |
- # - Add User=collectd to run collectd as user "collectd" per default |
875 |
- sed -i \ |
876 |
- -e '/^EnvironmentFile=.*/d' \ |
877 |
- -e '/^\[Service\]/aUser=collectd' \ |
878 |
- contrib/systemd.${PN}.service || die |
879 |
- |
880 |
- eautoreconf |
881 |
-} |
882 |
- |
883 |
-src_configure() { |
884 |
- # Now come the lists of os-dependent plugins. Any plugin that is not listed anywhere here |
885 |
- # should work independent of the operating system. |
886 |
- |
887 |
- local linux_plugins="barometer battery cpu cpufreq disk |
888 |
- drbd entropy ethstat hugepages interface iptables |
889 |
- ipvs irq ipc load memory md netlink nfs numa processes |
890 |
- serial swap tcpconns thermal turbostat users vmem wireless |
891 |
- zfc_arc" |
892 |
- |
893 |
- local need_libstatgrab=0 |
894 |
- local libstatgrab_plugins="cpu disk interface load memory swap users" |
895 |
- local bsd_plugins="cpu tcpconns ${libstatgrab_plugins} zfc_arc" |
896 |
- |
897 |
- local darwin_plugins="apple_sensors battery cpu disk interface memory processes tcpconns" |
898 |
- |
899 |
- local osdependent_plugins="${linux_plugins} ${bsd_plugins} ${darwin_plugins}" |
900 |
- local myos_plugins="" |
901 |
- if use kernel_linux; then |
902 |
- einfo "Enabling Linux plugins." |
903 |
- myos_plugins=${linux_plugins} |
904 |
- elif use kernel_FreeBSD; then |
905 |
- einfo "Enabling FreeBSD plugins." |
906 |
- myos_plugins=${bsd_plugins} |
907 |
- elif use kernel_Darwin; then |
908 |
- einfo "Enabling Darwin plugins." |
909 |
- myos_plugins=${darwin_plugins} |
910 |
- fi |
911 |
- |
912 |
- local myconf="--disable-werror" |
913 |
- |
914 |
- # Do we debug? |
915 |
- myconf+=" $(use_enable debug)" |
916 |
- |
917 |
- # udev support? |
918 |
- # Required for smart plugin via REQUIRED_USE; Optional for disk plugin |
919 |
- if use udev; then |
920 |
- myconf+=" --with-libudev" |
921 |
- else |
922 |
- myconf+=" --without-libudev" |
923 |
- fi |
924 |
- |
925 |
- local plugin |
926 |
- |
927 |
- # Disable what needs to be disabled. |
928 |
- for plugin in ${COLLECTD_DISABLED_PLUGINS}; do |
929 |
- if [[ "${plugin}" == 'dpdkstat' ]]; then |
930 |
- myconf+=" --without-libdpdk" |
931 |
- else |
932 |
- myconf+=" --disable-${plugin}" |
933 |
- fi |
934 |
- done |
935 |
- |
936 |
- # Set enable/disable for each single plugin. |
937 |
- for plugin in ${COLLECTD_ALL_PLUGINS}; do |
938 |
- if has ${plugin} ${osdependent_plugins}; then |
939 |
- # plugin is os-dependent ... |
940 |
- if has ${plugin} ${myos_plugins}; then |
941 |
- # ... and available in this os |
942 |
- myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" |
943 |
- # ... must we link against libstatgrab? Bug #541518 |
944 |
- if use kernel_FreeBSD && has ${plugin} ${libstatgrab_plugins}; then |
945 |
- einfo "We must link against libstatgrab due to plugin \"${plugin}\" ..." |
946 |
- need_libstatgrab=1 |
947 |
- fi |
948 |
- else |
949 |
- # ... and NOT available in this os |
950 |
- if use collectd_plugins_${plugin}; then |
951 |
- ewarn "You try to enable the ${plugin} plugin, but it is not available for this" |
952 |
- ewarn "kernel. Disabling it automatically." |
953 |
- fi |
954 |
- myconf+=" --disable-${plugin}" |
955 |
- fi |
956 |
- elif [[ "${plugin}" = "collectd_plugins_perl" ]]; then |
957 |
- if use collectd_plugins_perl && ! use perl; then |
958 |
- ewarn "Perl plugin disabled as perl bindings disabled by -perl use flag" |
959 |
- myconf+= --disable-perl |
960 |
- else |
961 |
- myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" |
962 |
- fi |
963 |
- else |
964 |
- myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" |
965 |
- fi |
966 |
- done |
967 |
- |
968 |
- if [ "${need_libstatgrab}" -eq 1 ]; then |
969 |
- myconf+=" --with-libstatgrab" |
970 |
- else |
971 |
- myconf+=" --without-libstatgrab" |
972 |
- fi |
973 |
- |
974 |
- # JAVA_HOME is set by eclasses. |
975 |
- if use collectd_plugins_java; then |
976 |
- myconf+=" --with-java" |
977 |
- fi |
978 |
- |
979 |
- # Need libiptc ONLY for iptables. If we try to use it otherwise bug 340109 happens. |
980 |
- # lots of libs are only needed for plugins, if they are disabled, also disable the lib |
981 |
- use collectd_plugins_iptables || myconf+=" --with-libiptc=no" |
982 |
- use collectd_plugins_openldap || myconf+=" --with-libldap=no" |
983 |
- use collectd_plugins_redis || use collectd_plugins_write_redis || myconf+=" --with-libhiredis=no" |
984 |
- use collectd_plugins_smart || myconf+=" --with-libatasmart=no" |
985 |
- use collectd_plugins_gps || myconf+=" --with-libgps=no" |
986 |
- |
987 |
- if use perl; then |
988 |
- myconf+=" --with-perl-bindings=INSTALLDIRS=vendor" |
989 |
- else |
990 |
- myconf+=" --without-perl-bindings" |
991 |
- fi |
992 |
- |
993 |
- # No need for v5upgrade |
994 |
- myconf+=" --disable-target_v5upgrade" |
995 |
- |
996 |
- # Python |
997 |
- if use collectd_plugins_python; then |
998 |
- myconf+=" --with-libpython=yes" |
999 |
- export PYTHON_CONFIG=$(python_get_PYTHON_CONFIG) |
1000 |
- else |
1001 |
- myconf+=" --with-libpython=no" |
1002 |
- fi |
1003 |
- |
1004 |
- # XFS support |
1005 |
- myconf+=" $(use_enable xfs)" |
1006 |
- |
1007 |
- # Finally, run econf. |
1008 |
- KERNEL_DIR="${KERNEL_DIR}" econf --config-cache \ |
1009 |
- $(use_enable static-libs static) \ |
1010 |
- --localstatedir=/var ${myconf} |
1011 |
-} |
1012 |
- |
1013 |
-src_install() { |
1014 |
- emake DESTDIR="${D%/}" install |
1015 |
- |
1016 |
- perl_delete_localpod |
1017 |
- |
1018 |
- find "${ED}"usr/ -name "*.la" -delete || die |
1019 |
- |
1020 |
- if use collectd_plugins_java; then |
1021 |
- java-pkg_regjar "${ED}"usr/share/${PN}/java/*.jar |
1022 |
- fi |
1023 |
- |
1024 |
- fowners root:collectd /etc/collectd.conf |
1025 |
- fperms u=rw,g=r,o= /etc/collectd.conf |
1026 |
- |
1027 |
- dodoc AUTHORS ChangeLog README |
1028 |
- |
1029 |
- if use contrib ; then |
1030 |
- insinto /usr/share/doc/${PF} |
1031 |
- doins -r contrib |
1032 |
- fi |
1033 |
- |
1034 |
- keepdir /var/lib/${PN} |
1035 |
- fowners collectd:collectd /var/lib/${PN} |
1036 |
- |
1037 |
- newinitd "${FILESDIR}/${PN}.initd-r2" ${PN} |
1038 |
- newconfd "${FILESDIR}/${PN}.confd-r2" ${PN} |
1039 |
- systemd_newunit "contrib/systemd.${PN}.service" ${PN}.service |
1040 |
- |
1041 |
- insinto /etc/logrotate.d |
1042 |
- newins "${FILESDIR}/${PN}.logrotate" ${PN} |
1043 |
- |
1044 |
- newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf |
1045 |
- |
1046 |
- sed -i -e 's:^.*PIDFile "/var/run/collectd.pid":#PIDFile "/run/collectd.pid":' "${ED}"etc/collectd.conf || die |
1047 |
- sed -i -e 's:^# SocketFile "/var/run/collectd-unixsock":# SocketFile "/run/collectd/collectd.socket":' "${ED}"etc/collectd.conf || die |
1048 |
- sed -i -e 's:^.*LoadPlugin perl$:# The new, correct way to load the perl plugin -- \n# <LoadPlugin perl>\n# Globals true\n# </LoadPlugin>:' "${ED}"etc/collectd.conf || die |
1049 |
- sed -i -e 's:^.*LoadPlugin python$:# The new, correct way to load the python plugin -- \n# <LoadPlugin python>\n# Globals true\n# </LoadPlugin>:' "${ED}"etc/collectd.conf || die |
1050 |
-} |
1051 |
- |
1052 |
-pkg_postinst() { |
1053 |
- tmpfiles_process "${PN}.conf" |
1054 |
- |
1055 |
- if use filecaps; then |
1056 |
- local caps=() |
1057 |
- use collectd_plugins_ceph && caps+=('CAP_DAC_OVERRIDE') |
1058 |
- use collectd_plugins_exec && caps+=('CAP_SETUID' 'CAP_SETGID') |
1059 |
- use collectd_plugins_iptables && caps+=('CAP_NET_ADMIN') |
1060 |
- use collectd_plugins_filecount && caps+=('CAP_DAC_READ_SEARCH') |
1061 |
- |
1062 |
- if use collectd_plugins_dns || use collectd_plugins_ping; then |
1063 |
- caps+=('CAP_NET_RAW') |
1064 |
- fi |
1065 |
- |
1066 |
- if use collectd_plugins_turbostat || use collectd_plugins_smart; then |
1067 |
- caps+=('CAP_SYS_RAWIO') |
1068 |
- fi |
1069 |
- |
1070 |
- if [ ${#caps[@]} -gt 0 ]; then |
1071 |
- local caps_str=$(IFS=","; echo "${caps[*]}") |
1072 |
- fcaps ${caps_str} usr/sbin/collectd |
1073 |
- elog "Capabilities for ${EROOT}usr/sbin/collectd set to:" |
1074 |
- elog " ${caps_str}+EP" |
1075 |
- elog |
1076 |
- |
1077 |
- local systemd_unit="$(systemd_get_systemunitdir)/collectd.service" |
1078 |
- if [[ -e "${systemd_unit}" ]]; then |
1079 |
- caps_str="${caps[*]}" |
1080 |
- sed -i -e "s:^CapabilityBoundingSet=.*:CapabilityBoundingSet=${caps_str}:" "${systemd_unit}" || \ |
1081 |
- die "Failed to set CapabilityBoundingSet in '${systemd_unit}'" |
1082 |
- |
1083 |
- elog "CapabilityBoundingSet in '${systemd_unit}'" |
1084 |
- elog "updated to match capabilities set above." |
1085 |
- elog |
1086 |
- else |
1087 |
- if has_version "sys-apps/systemd"; then |
1088 |
- # Bug 596852 |
1089 |
- ewarn "Failed to update CapabilityBoundingSet in '${systemd_unit}'" |
1090 |
- ewarn "because unit was not found. Please file a bug about this." |
1091 |
- fi |
1092 |
- fi |
1093 |
- fi |
1094 |
- fi |
1095 |
- |
1096 |
- elog "Note: Collectd is only the collector." |
1097 |
- elog " You need to install 'data' sources (applications) locally or" |
1098 |
- elog " remotely on your own." |
1099 |
- |
1100 |
- elog |
1101 |
- elog "Collectd is configured to run as unprivileged user by default." |
1102 |
- elog "You may want to revisit the configuration." |
1103 |
- elog |
1104 |
- |
1105 |
- if use collectd_plugins_email; then |
1106 |
- ewarn "The email plug-in is deprecated. To submit statistics please use the unixsock plugin." |
1107 |
- fi |
1108 |
- |
1109 |
- if use collectd_plugins_smart; then |
1110 |
- elog "" |
1111 |
- elog "If you are using smart plugin and don't run collectd as root make sure" |
1112 |
- elog "that the collectd user is allowed to access the disk you want to monitor" |
1113 |
- elog "(can be done via udev rule for example) and that collectd has the required" |
1114 |
- elog "capabilities set (which is the default when package was emerged with" |
1115 |
- elog "'filecaps' USE flag set)." |
1116 |
- fi |
1117 |
- |
1118 |
- if use contrib; then |
1119 |
- elog "The scripts in /usr/share/doc/${PF}/collection3 for generating graphs need dev-perl/HTML-Parser," |
1120 |
- elog "dev-perl/config-general, dev-perl/regexp-common, and net-analyzer/rrdtool[perl] to be installed." |
1121 |
- fi |
1122 |
-} |
1123 |
|
1124 |
diff --git a/app-metrics/collectd/collectd-5.9.2.ebuild b/app-metrics/collectd/collectd-5.9.2.ebuild |
1125 |
deleted file mode 100644 |
1126 |
index 689a52ab817..00000000000 |
1127 |
--- a/app-metrics/collectd/collectd-5.9.2.ebuild |
1128 |
+++ /dev/null |
1129 |
@@ -1,541 +0,0 @@ |
1130 |
-# Copyright 1999-2020 Gentoo Authors |
1131 |
-# Distributed under the terms of the GNU General Public License v2 |
1132 |
- |
1133 |
-EAPI="6" |
1134 |
- |
1135 |
-PYTHON_COMPAT=( python{3_6,3_7} ) |
1136 |
-JAVA_PKG_OPT_USE="collectd_plugins_java" |
1137 |
- |
1138 |
-inherit autotools fcaps flag-o-matic java-pkg-opt-2 linux-info multilib perl-functions python-single-r1 systemd tmpfiles user |
1139 |
- |
1140 |
-DESCRIPTION="Collects system statistics and provides mechanisms to store the values" |
1141 |
- |
1142 |
-HOMEPAGE="https://collectd.org/" |
1143 |
-SRC_URI="https://github.com/${PN}/${PN}/archive/${PN}-${PV}.tar.gz" |
1144 |
- |
1145 |
-LICENSE="MIT GPL-2 GPL-2+ GPL-3 GPL-3+" |
1146 |
-SLOT="0" |
1147 |
-KEYWORDS="~alpha ~amd64 ~arm ~x86" |
1148 |
-IUSE="contrib debug java kernel_Darwin kernel_FreeBSD kernel_linux perl selinux static-libs udev xfs" |
1149 |
- |
1150 |
-# The plugin lists have to follow here since they extend IUSE |
1151 |
- |
1152 |
-# Plugins that don't build (e.g. dependencies not in Gentoo) |
1153 |
-# apple_sensors: Requires libIOKit |
1154 |
-# amqp1: Requires libqpid-proton |
1155 |
-# aquaero: Requires aerotools-ng/libaquaero5 |
1156 |
-# barometer: Requires libi2c (i2c_smbus_read_i2c_block_data) |
1157 |
-# dpdkevents: Requires dpdk |
1158 |
-# dpdkstat: Requires dpdk |
1159 |
-# grpc: Requires libgrpc |
1160 |
-# intel_pmu: Requires libjevents (pmu-tools) |
1161 |
-# intel_rdt: Requires libpqos from intel-cmt-cat project |
1162 |
-# lpar: Requires libperfstat (AIX only) |
1163 |
-# mic: Requires Intel Many Integrated Core Architecture API |
1164 |
-# (part of Intel's Xeon Phi software) |
1165 |
-# netapp: Requires libnetapp (http://communities.netapp.com/docs/DOC-1110) |
1166 |
-# pf: Requires BSD packet filter |
1167 |
-# pinba: Requires MySQL Pinba engine (http://pinba.org/) |
1168 |
-# tape: Requires libkstat (Solaris only) |
1169 |
-# write_riemann: Requires riemann-c-client |
1170 |
-# xmms: Requires libxmms (v1) |
1171 |
-# zone: Solaris only... |
1172 |
-COLLECTD_IMPOSSIBLE_PLUGINS="apple_sensors amqp1 aquaero barometer dpdkstat |
1173 |
- grpc intel_pmu intel_rdt lpar mic netapp pf pinba tape write_riemann |
1174 |
- xmms zone" |
1175 |
- |
1176 |
-# Plugins that have been (compile) tested and can be enabled via COLLECTD_PLUGINS |
1177 |
-COLLECTD_TESTED_PLUGINS="aggregation amqp apache apcups ascent battery bind |
1178 |
- ceph cgroups chrony conntrack contextswitch cpu cpufreq cpusleep |
1179 |
- csv curl curl_json curl_xml dbi df disk dns drbd email |
1180 |
- entropy ethstat exec fhcount filecount fscache gmond gps hddtemp |
1181 |
- hugepages interface ipc ipmi iptables ipvs irq java lua |
1182 |
- load logfile log_logstash lvm madwifi match_empty_counter |
1183 |
- match_hashed match_regex match_timediff match_value mbmon mcelog md |
1184 |
- memcachec memcached memory modbus mqtt multimeter mysql netlink |
1185 |
- network network nfs nginx notify_desktop notify_email notify_nagios |
1186 |
- ntpd numa nut olsrd onewire openldap openvpn oracle ovs_events |
1187 |
- ovs_stats perl ping postgresql powerdns processes protocols python |
1188 |
- python redis routeros rrdcached rrdtool sensors serial sigrok smart |
1189 |
- snmp snmp_agent statsd swap syslog table tail tail_csv |
1190 |
- target_notification target_replace target_scale target_set tcpconns |
1191 |
- teamspeak2 ted thermal threshold tokyotyrant turbostat unixsock |
1192 |
- uptime users uuid varnish virt vmem vserver wireless write_graphite |
1193 |
- write_http write_kafka write_log write_mongodb write_prometheus |
1194 |
- write_redis write_sensu write_tsdb xencpu zfs_arc zookeeper" |
1195 |
- |
1196 |
-COLLECTD_DISABLED_PLUGINS="${COLLECTD_IMPOSSIBLE_PLUGINS}" |
1197 |
- |
1198 |
-COLLECTD_ALL_PLUGINS=${COLLECTD_TESTED_PLUGINS} |
1199 |
- |
1200 |
-for plugin in ${COLLECTD_ALL_PLUGINS}; do |
1201 |
- IUSE="${IUSE} collectd_plugins_${plugin}" |
1202 |
-done |
1203 |
-unset plugin |
1204 |
- |
1205 |
-# Now come the dependencies. |
1206 |
- |
1207 |
-COMMON_DEPEND=" |
1208 |
- dev-libs/libgcrypt:= |
1209 |
- dev-libs/libltdl:0= |
1210 |
- perl? ( dev-lang/perl:=[ithreads] ) |
1211 |
- udev? ( virtual/udev ) |
1212 |
- xfs? ( sys-fs/xfsprogs ) |
1213 |
- collectd_plugins_amqp? ( net-libs/rabbitmq-c ) |
1214 |
- collectd_plugins_apache? ( net-misc/curl:0= ) |
1215 |
- collectd_plugins_ascent? ( net-misc/curl:0= dev-libs/libxml2:2= ) |
1216 |
- collectd_plugins_bind? ( net-misc/curl:0= dev-libs/libxml2:2= ) |
1217 |
- collectd_plugins_ceph? ( dev-libs/yajl:= ) |
1218 |
- collectd_plugins_curl? ( net-misc/curl:0= ) |
1219 |
- collectd_plugins_curl_json? ( net-misc/curl:0= dev-libs/yajl:= ) |
1220 |
- collectd_plugins_curl_xml? ( net-misc/curl:0= dev-libs/libxml2:2= ) |
1221 |
- collectd_plugins_dbi? ( dev-db/libdbi ) |
1222 |
- collectd_plugins_dns? ( net-libs/libpcap ) |
1223 |
- collectd_plugins_gmond? ( sys-cluster/ganglia ) |
1224 |
- collectd_plugins_gps? ( sci-geosciences/gpsd:= ) |
1225 |
- collectd_plugins_ipmi? ( >=sys-libs/openipmi-2.0.16-r1 ) |
1226 |
- collectd_plugins_iptables? ( >=net-firewall/iptables-1.4.13:0= ) |
1227 |
- collectd_plugins_log_logstash? ( dev-libs/yajl:= ) |
1228 |
- collectd_plugins_lua? ( dev-lang/lua:0= ) |
1229 |
- collectd_plugins_lvm? ( sys-fs/lvm2 ) |
1230 |
- collectd_plugins_memcachec? ( dev-libs/libmemcached ) |
1231 |
- collectd_plugins_modbus? ( dev-libs/libmodbus ) |
1232 |
- collectd_plugins_mqtt? ( app-misc/mosquitto ) |
1233 |
- collectd_plugins_mysql? ( dev-db/mysql-connector-c:= ) |
1234 |
- collectd_plugins_netlink? ( net-libs/libmnl ) |
1235 |
- collectd_plugins_nginx? ( net-misc/curl:0= ) |
1236 |
- collectd_plugins_notify_desktop? ( x11-libs/libnotify ) |
1237 |
- collectd_plugins_notify_email? ( net-libs/libesmtp ) |
1238 |
- collectd_plugins_nut? ( >=sys-power/nut-2.7.2-r2 ) |
1239 |
- collectd_plugins_openldap? ( net-nds/openldap ) |
1240 |
- collectd_plugins_onewire? ( >=sys-fs/owfs-3.1:= ) |
1241 |
- collectd_plugins_oracle? ( dev-db/oracle-instantclient-basic ) |
1242 |
- collectd_plugins_ovs_events? ( dev-libs/yajl:= ) |
1243 |
- collectd_plugins_ovs_stats? ( dev-libs/yajl:= ) |
1244 |
- collectd_plugins_perl? ( dev-lang/perl:=[ithreads] ) |
1245 |
- collectd_plugins_ping? ( net-libs/liboping ) |
1246 |
- collectd_plugins_postgresql? ( dev-db/postgresql:= ) |
1247 |
- collectd_plugins_python? ( ${PYTHON_DEPS} ) |
1248 |
- collectd_plugins_redis? ( dev-libs/hiredis:= ) |
1249 |
- collectd_plugins_routeros? ( net-libs/librouteros ) |
1250 |
- collectd_plugins_rrdcached? ( net-analyzer/rrdtool:= ) |
1251 |
- collectd_plugins_rrdtool? ( net-analyzer/rrdtool:= ) |
1252 |
- collectd_plugins_sensors? ( sys-apps/lm-sensors:= ) |
1253 |
- collectd_plugins_sigrok? ( <sci-libs/libsigrok-0.4:= dev-libs/glib:2 ) |
1254 |
- collectd_plugins_smart? ( dev-libs/libatasmart ) |
1255 |
- collectd_plugins_snmp? ( net-analyzer/net-snmp ) |
1256 |
- collectd_plugins_snmp_agent? ( net-analyzer/net-snmp ) |
1257 |
- collectd_plugins_tokyotyrant? ( net-misc/tokyotyrant ) |
1258 |
- collectd_plugins_varnish? ( www-servers/varnish:= ) |
1259 |
- collectd_plugins_virt? ( app-emulation/libvirt:= dev-libs/libxml2:2= ) |
1260 |
- collectd_plugins_write_http? ( net-misc/curl:0= dev-libs/yajl:= ) |
1261 |
- collectd_plugins_write_kafka? ( >=dev-libs/librdkafka-0.9.0.99:= dev-libs/yajl:= ) |
1262 |
- collectd_plugins_write_mongodb? ( >=dev-libs/mongo-c-driver-1.8.2:= ) |
1263 |
- collectd_plugins_write_prometheus? ( >=dev-libs/protobuf-c-1.2.1-r1:= net-libs/libmicrohttpd:= ) |
1264 |
- collectd_plugins_write_redis? ( dev-libs/hiredis:= ) |
1265 |
- collectd_plugins_xencpu? ( app-emulation/xen-tools:= ) |
1266 |
- |
1267 |
- kernel_FreeBSD? ( |
1268 |
- collectd_plugins_disk? ( sys-libs/libstatgrab:= ) |
1269 |
- collectd_plugins_interface? ( sys-libs/libstatgrab:= ) |
1270 |
- collectd_plugins_load? ( sys-libs/libstatgrab:= ) |
1271 |
- collectd_plugins_memory? ( sys-libs/libstatgrab:= ) |
1272 |
- collectd_plugins_swap? ( sys-libs/libstatgrab:= ) |
1273 |
- collectd_plugins_users? ( sys-libs/libstatgrab:= ) |
1274 |
- )" |
1275 |
- |
1276 |
-# Enforcing !=sys-kernel/linux-headers-4.5 > due to #577846 |
1277 |
-DEPEND="${COMMON_DEPEND} |
1278 |
- collectd_plugins_iptables? ( || ( <=sys-kernel/linux-headers-4.4 >=sys-kernel/linux-headers-4.6 ) ) |
1279 |
- collectd_plugins_java? ( >=virtual/jdk-1.6 ) |
1280 |
- virtual/pkgconfig" |
1281 |
- |
1282 |
-RDEPEND="${COMMON_DEPEND} |
1283 |
- collectd_plugins_java? ( >=virtual/jre-1.6 ) |
1284 |
- collectd_plugins_syslog? ( virtual/logger ) |
1285 |
- selinux? ( sec-policy/selinux-collectd ) |
1286 |
- !<sys-apps/openrc-0.18.2" |
1287 |
- |
1288 |
-REQUIRED_USE=" |
1289 |
- collectd_plugins_python? ( ${PYTHON_REQUIRED_USE} ) |
1290 |
- collectd_plugins_smart? ( udev )" |
1291 |
- |
1292 |
-S="${WORKDIR}/${PN}-${PN}-${PV}" |
1293 |
- |
1294 |
-# @FUNCTION: collectd_plugin_kernel_linux |
1295 |
-# @DESCRIPTION: |
1296 |
-# USAGE: <plugin name> <kernel_options> <severity> |
1297 |
-# kernel_options is a list of kernel configurations options; the check tests whether at least |
1298 |
-# one of them is enabled. If no, depending on the third argument an elog, ewarn, or eerror message |
1299 |
-# is emitted. |
1300 |
-collectd_plugin_kernel_linux() { |
1301 |
- local multi_opt opt |
1302 |
- if has ${1} ${COLLECTD_ALL_PLUGINS}; then |
1303 |
- if use collectd_plugins_${1}; then |
1304 |
- for opt in ${2}; do |
1305 |
- if linux_chkconfig_present ${opt}; then |
1306 |
- return 0; |
1307 |
- fi |
1308 |
- done |
1309 |
- multi_opt=${2//\ /\ or\ } |
1310 |
- case ${3} in |
1311 |
- (info) |
1312 |
- elog "The ${1} plugin can use kernel features that are disabled now; enable ${multi_opt} in your kernel" |
1313 |
- ;; |
1314 |
- (warn) |
1315 |
- ewarn "The ${1} plugin uses kernel features that are disabled now; enable ${multi_opt} in your kernel" |
1316 |
- ;; |
1317 |
- (error) |
1318 |
- eerror "The ${1} plugin needs kernel features that are disabled now; enable ${multi_opt} in your kernel" |
1319 |
- ;; |
1320 |
- (*) |
1321 |
- die "function collectd_plugin_kernel_linux called with invalid third argument" |
1322 |
- ;; |
1323 |
- esac |
1324 |
- fi |
1325 |
- fi |
1326 |
-} |
1327 |
- |
1328 |
-collectd_linux_kernel_checks() { |
1329 |
- if ! linux_chkconfig_present PROC_FS; then |
1330 |
- ewarn "/proc file system support is disabled, many plugins will not be able to read any statistics from your system unless you enable PROC_FS in your kernel" |
1331 |
- fi |
1332 |
- |
1333 |
- if ! linux_chkconfig_present SYSFS; then |
1334 |
- ewarn "/sys file system support is disabled, many plugins will not be able to read any statistics from your system unless you enable SYSFS in your kernel" |
1335 |
- fi |
1336 |
- |
1337 |
- # battery.c: /proc/pmu/battery_%i |
1338 |
- # battery.c: /proc/acpi/battery |
1339 |
- collectd_plugin_kernel_linux battery ACPI_BATTERY warn |
1340 |
- |
1341 |
- # cgroups.c: /sys/fs/cgroup/ |
1342 |
- collectd_plugin_kernel_linux cgroups CGROUPS warn |
1343 |
- |
1344 |
- # cpufreq.c: /sys/devices/system/cpu/cpu%d/cpufreq/ |
1345 |
- collectd_plugin_kernel_linux cpufreq SYSFS warn |
1346 |
- collectd_plugin_kernel_linux cpufreq CPU_FREQ_STAT warn |
1347 |
- |
1348 |
- # drbd.c: /proc/drbd |
1349 |
- collectd_plugin_kernel_linux drbd BLK_DEV_DRBD warn |
1350 |
- |
1351 |
- # conntrack.c: /proc/sys/net/netfilter/* |
1352 |
- collectd_plugin_kernel_linux conntrack NETFILTER warn |
1353 |
- |
1354 |
- # fscache.c: /proc/fs/fscache/stats |
1355 |
- collectd_plugin_kernel_linux fscache FSCACHE warn |
1356 |
- |
1357 |
- # nfs.c: /proc/net/rpc/nfs |
1358 |
- # nfs.c: /proc/net/rpc/nfsd |
1359 |
- collectd_plugin_kernel_linux nfs NFS_COMMON warn |
1360 |
- |
1361 |
- # serial.c: /proc/tty/driver/serial |
1362 |
- # serial.c: /proc/tty/driver/ttyS |
1363 |
- collectd_plugin_kernel_linux serial SERIAL_CORE warn |
1364 |
- |
1365 |
- # swap.c: /proc/meminfo |
1366 |
- collectd_plugin_kernel_linux swap SWAP warn |
1367 |
- |
1368 |
- # thermal.c: /proc/acpi/thermal_zone |
1369 |
- # thermal.c: /sys/class/thermal |
1370 |
- collectd_plugin_kernel_linux thermal ACPI_THERMAL warn |
1371 |
- |
1372 |
- # turbostat.c: /dev/cpu/%d/msr |
1373 |
- collectd_plugin_kernel_linux turbostat X86_MSR warn |
1374 |
- |
1375 |
- # vmem.c: /proc/vmstat |
1376 |
- collectd_plugin_kernel_linux vmem VM_EVENT_COUNTERS warn |
1377 |
- |
1378 |
- # vserver.c: /proc/virtual |
1379 |
- collectd_plugin_kernel_linux vserver VSERVER warn |
1380 |
- |
1381 |
- # uuid.c: /sys/hypervisor/uuid |
1382 |
- collectd_plugin_kernel_linux uuid SYSFS info |
1383 |
- |
1384 |
- # wireless.c: /proc/net/wireless |
1385 |
- collectd_plugin_kernel_linux wireless "WIRELESS MAC80211 IEEE80211" warn |
1386 |
- |
1387 |
- # zfs_arc.c: /proc/spl/kstat/zfs/arcstats |
1388 |
- collectd_plugin_kernel_linux zfs_arc "SPL ZFS" warn |
1389 |
-} |
1390 |
- |
1391 |
-pkg_setup() { |
1392 |
- if use kernel_linux; then |
1393 |
- linux-info_pkg_setup |
1394 |
- |
1395 |
- if linux_config_exists; then |
1396 |
- einfo "Checking your linux kernel configuration:" |
1397 |
- collectd_linux_kernel_checks |
1398 |
- else |
1399 |
- elog "Cannot find a linux kernel configuration. Continuing anyway." |
1400 |
- fi |
1401 |
- fi |
1402 |
- |
1403 |
- if use collectd_plugins_java; then |
1404 |
- java-pkg-opt-2_pkg_setup |
1405 |
- fi |
1406 |
- |
1407 |
- use collectd_plugins_python && python-single-r1_pkg_setup |
1408 |
- |
1409 |
- enewgroup collectd |
1410 |
- enewuser collectd -1 -1 /var/lib/collectd collectd |
1411 |
-} |
1412 |
- |
1413 |
-src_prepare() { |
1414 |
- default |
1415 |
- |
1416 |
- # There's some strange prefix handling in the default config file, resulting in |
1417 |
- # paths like "/usr/var/..." |
1418 |
- sed -i -e "s:@prefix@/var:/var:g" src/collectd.conf.in || die |
1419 |
- |
1420 |
- # Adjust upstream's systemd unit |
1421 |
- # - Get rid of EnvironmentFile directive; These files don't exist on Gentoo! |
1422 |
- # - Add User=collectd to run collectd as user "collectd" per default |
1423 |
- sed -i \ |
1424 |
- -e '/^EnvironmentFile=.*/d' \ |
1425 |
- -e '/^\[Service\]/aUser=collectd' \ |
1426 |
- contrib/systemd.${PN}.service || die |
1427 |
- |
1428 |
- eautoreconf |
1429 |
-} |
1430 |
- |
1431 |
-src_configure() { |
1432 |
- # Now come the lists of os-dependent plugins. Any plugin that is not listed anywhere here |
1433 |
- # should work independent of the operating system. |
1434 |
- |
1435 |
- local linux_plugins="barometer battery cpu cpufreq disk |
1436 |
- drbd entropy ethstat hugepages interface iptables |
1437 |
- ipvs irq ipc load memory md netlink nfs numa processes |
1438 |
- serial swap tcpconns thermal turbostat users vmem wireless |
1439 |
- zfc_arc" |
1440 |
- |
1441 |
- local need_libstatgrab=0 |
1442 |
- local libstatgrab_plugins="cpu disk interface load memory swap users" |
1443 |
- local bsd_plugins="cpu tcpconns ${libstatgrab_plugins} zfc_arc" |
1444 |
- |
1445 |
- local darwin_plugins="apple_sensors battery cpu disk interface memory processes tcpconns" |
1446 |
- |
1447 |
- local osdependent_plugins="${linux_plugins} ${bsd_plugins} ${darwin_plugins}" |
1448 |
- local myos_plugins="" |
1449 |
- if use kernel_linux; then |
1450 |
- einfo "Enabling Linux plugins." |
1451 |
- myos_plugins=${linux_plugins} |
1452 |
- elif use kernel_FreeBSD; then |
1453 |
- einfo "Enabling FreeBSD plugins." |
1454 |
- myos_plugins=${bsd_plugins} |
1455 |
- elif use kernel_Darwin; then |
1456 |
- einfo "Enabling Darwin plugins." |
1457 |
- myos_plugins=${darwin_plugins} |
1458 |
- fi |
1459 |
- |
1460 |
- local myconf="--disable-werror" |
1461 |
- |
1462 |
- # Do we debug? |
1463 |
- myconf+=" $(use_enable debug)" |
1464 |
- |
1465 |
- # udev support? |
1466 |
- # Required for smart plugin via REQUIRED_USE; Optional for disk plugin |
1467 |
- if use udev; then |
1468 |
- myconf+=" --with-libudev" |
1469 |
- else |
1470 |
- myconf+=" --without-libudev" |
1471 |
- fi |
1472 |
- |
1473 |
- local plugin |
1474 |
- |
1475 |
- # Disable what needs to be disabled. |
1476 |
- for plugin in ${COLLECTD_DISABLED_PLUGINS}; do |
1477 |
- if [[ "${plugin}" == 'dpdkstat' ]]; then |
1478 |
- myconf+=" --without-libdpdk" |
1479 |
- else |
1480 |
- myconf+=" --disable-${plugin}" |
1481 |
- fi |
1482 |
- done |
1483 |
- |
1484 |
- # Set enable/disable for each single plugin. |
1485 |
- for plugin in ${COLLECTD_ALL_PLUGINS}; do |
1486 |
- if has ${plugin} ${osdependent_plugins}; then |
1487 |
- # plugin is os-dependent ... |
1488 |
- if has ${plugin} ${myos_plugins}; then |
1489 |
- # ... and available in this os |
1490 |
- myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" |
1491 |
- # ... must we link against libstatgrab? Bug #541518 |
1492 |
- if use kernel_FreeBSD && has ${plugin} ${libstatgrab_plugins}; then |
1493 |
- einfo "We must link against libstatgrab due to plugin \"${plugin}\" ..." |
1494 |
- need_libstatgrab=1 |
1495 |
- fi |
1496 |
- else |
1497 |
- # ... and NOT available in this os |
1498 |
- if use collectd_plugins_${plugin}; then |
1499 |
- ewarn "You try to enable the ${plugin} plugin, but it is not available for this" |
1500 |
- ewarn "kernel. Disabling it automatically." |
1501 |
- fi |
1502 |
- myconf+=" --disable-${plugin}" |
1503 |
- fi |
1504 |
- elif [[ "${plugin}" = "collectd_plugins_perl" ]]; then |
1505 |
- if use collectd_plugins_perl && ! use perl; then |
1506 |
- ewarn "Perl plugin disabled as perl bindings disabled by -perl use flag" |
1507 |
- myconf+= --disable-perl |
1508 |
- else |
1509 |
- myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" |
1510 |
- fi |
1511 |
- else |
1512 |
- myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" |
1513 |
- fi |
1514 |
- done |
1515 |
- |
1516 |
- if [ "${need_libstatgrab}" -eq 1 ]; then |
1517 |
- myconf+=" --with-libstatgrab" |
1518 |
- else |
1519 |
- myconf+=" --without-libstatgrab" |
1520 |
- fi |
1521 |
- |
1522 |
- # JAVA_HOME is set by eclasses. |
1523 |
- if use collectd_plugins_java; then |
1524 |
- myconf+=" --with-java" |
1525 |
- fi |
1526 |
- |
1527 |
- # Need libiptc ONLY for iptables. If we try to use it otherwise bug 340109 happens. |
1528 |
- # lots of libs are only needed for plugins, if they are disabled, also disable the lib |
1529 |
- use collectd_plugins_iptables || myconf+=" --with-libiptc=no" |
1530 |
- use collectd_plugins_openldap || myconf+=" --with-libldap=no" |
1531 |
- use collectd_plugins_redis || use collectd_plugins_write_redis || myconf+=" --with-libhiredis=no" |
1532 |
- use collectd_plugins_smart || myconf+=" --with-libatasmart=no" |
1533 |
- use collectd_plugins_gps || myconf+=" --with-libgps=no" |
1534 |
- |
1535 |
- if use perl; then |
1536 |
- myconf+=" --with-perl-bindings=INSTALLDIRS=vendor" |
1537 |
- else |
1538 |
- myconf+=" --without-perl-bindings" |
1539 |
- fi |
1540 |
- |
1541 |
- # No need for v5upgrade |
1542 |
- myconf+=" --disable-target_v5upgrade" |
1543 |
- |
1544 |
- # Python |
1545 |
- if use collectd_plugins_python; then |
1546 |
- myconf+=" --with-libpython=yes" |
1547 |
- export PYTHON_CONFIG=$(python_get_PYTHON_CONFIG) |
1548 |
- else |
1549 |
- myconf+=" --with-libpython=no" |
1550 |
- fi |
1551 |
- |
1552 |
- # XFS support |
1553 |
- myconf+=" $(use_enable xfs)" |
1554 |
- |
1555 |
- # Finally, run econf. |
1556 |
- KERNEL_DIR="${KERNEL_DIR}" econf --config-cache \ |
1557 |
- $(use_enable static-libs static) \ |
1558 |
- --localstatedir=/var ${myconf} |
1559 |
-} |
1560 |
- |
1561 |
-src_install() { |
1562 |
- emake DESTDIR="${D%/}" install |
1563 |
- |
1564 |
- perl_delete_localpod |
1565 |
- |
1566 |
- find "${ED}"usr/ -name "*.la" -delete || die |
1567 |
- |
1568 |
- if use collectd_plugins_java; then |
1569 |
- java-pkg_regjar "${ED}"usr/share/${PN}/java/*.jar |
1570 |
- fi |
1571 |
- |
1572 |
- fowners root:collectd /etc/collectd.conf |
1573 |
- fperms u=rw,g=r,o= /etc/collectd.conf |
1574 |
- |
1575 |
- dodoc AUTHORS ChangeLog README |
1576 |
- |
1577 |
- if use contrib ; then |
1578 |
- insinto /usr/share/doc/${PF} |
1579 |
- doins -r contrib |
1580 |
- fi |
1581 |
- |
1582 |
- keepdir /var/lib/${PN} |
1583 |
- fowners collectd:collectd /var/lib/${PN} |
1584 |
- |
1585 |
- newinitd "${FILESDIR}/${PN}.initd-r2" ${PN} |
1586 |
- newconfd "${FILESDIR}/${PN}.confd-r2" ${PN} |
1587 |
- systemd_newunit "contrib/systemd.${PN}.service" ${PN}.service |
1588 |
- |
1589 |
- insinto /etc/logrotate.d |
1590 |
- newins "${FILESDIR}/${PN}.logrotate" ${PN} |
1591 |
- |
1592 |
- newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf |
1593 |
- |
1594 |
- sed -i -e 's:^.*PIDFile "/var/run/collectd.pid":#PIDFile "/run/collectd.pid":' "${ED}"etc/collectd.conf || die |
1595 |
- sed -i -e 's:^# SocketFile "/var/run/collectd-unixsock":# SocketFile "/run/collectd/collectd.socket":' "${ED}"etc/collectd.conf || die |
1596 |
- sed -i -e 's:^.*LoadPlugin perl$:# The new, correct way to load the perl plugin -- \n# <LoadPlugin perl>\n# Globals true\n# </LoadPlugin>:' "${ED}"etc/collectd.conf || die |
1597 |
- sed -i -e 's:^.*LoadPlugin python$:# The new, correct way to load the python plugin -- \n# <LoadPlugin python>\n# Globals true\n# </LoadPlugin>:' "${ED}"etc/collectd.conf || die |
1598 |
-} |
1599 |
- |
1600 |
-pkg_postinst() { |
1601 |
- tmpfiles_process "${PN}.conf" |
1602 |
- |
1603 |
- if use filecaps; then |
1604 |
- local caps=() |
1605 |
- use collectd_plugins_ceph && caps+=('CAP_DAC_OVERRIDE') |
1606 |
- use collectd_plugins_exec && caps+=('CAP_SETUID' 'CAP_SETGID') |
1607 |
- use collectd_plugins_iptables && caps+=('CAP_NET_ADMIN') |
1608 |
- use collectd_plugins_filecount && caps+=('CAP_DAC_READ_SEARCH') |
1609 |
- |
1610 |
- if use collectd_plugins_dns || use collectd_plugins_ping; then |
1611 |
- caps+=('CAP_NET_RAW') |
1612 |
- fi |
1613 |
- |
1614 |
- if use collectd_plugins_turbostat || use collectd_plugins_smart; then |
1615 |
- caps+=('CAP_SYS_RAWIO') |
1616 |
- fi |
1617 |
- |
1618 |
- if [ ${#caps[@]} -gt 0 ]; then |
1619 |
- local caps_str=$(IFS=","; echo "${caps[*]}") |
1620 |
- fcaps ${caps_str} usr/sbin/collectd |
1621 |
- elog "Capabilities for ${EROOT}usr/sbin/collectd set to:" |
1622 |
- elog " ${caps_str}+EP" |
1623 |
- elog |
1624 |
- |
1625 |
- local systemd_unit="$(systemd_get_systemunitdir)/collectd.service" |
1626 |
- if [[ -e "${systemd_unit}" ]]; then |
1627 |
- caps_str="${caps[*]}" |
1628 |
- sed -i -e "s:^CapabilityBoundingSet=.*:CapabilityBoundingSet=${caps_str}:" "${systemd_unit}" || \ |
1629 |
- die "Failed to set CapabilityBoundingSet in '${systemd_unit}'" |
1630 |
- |
1631 |
- elog "CapabilityBoundingSet in '${systemd_unit}'" |
1632 |
- elog "updated to match capabilities set above." |
1633 |
- elog |
1634 |
- else |
1635 |
- if has_version "sys-apps/systemd"; then |
1636 |
- # Bug 596852 |
1637 |
- ewarn "Failed to update CapabilityBoundingSet in '${systemd_unit}'" |
1638 |
- ewarn "because unit was not found. Please file a bug about this." |
1639 |
- fi |
1640 |
- fi |
1641 |
- fi |
1642 |
- fi |
1643 |
- |
1644 |
- elog "Note: Collectd is only the collector." |
1645 |
- elog " You need to install 'data' sources (applications) locally or" |
1646 |
- elog " remotely on your own." |
1647 |
- |
1648 |
- elog |
1649 |
- elog "Collectd is configured to run as unprivileged user by default." |
1650 |
- elog "You may want to revisit the configuration." |
1651 |
- elog |
1652 |
- |
1653 |
- if use collectd_plugins_email; then |
1654 |
- ewarn "The email plug-in is deprecated. To submit statistics please use the unixsock plugin." |
1655 |
- fi |
1656 |
- |
1657 |
- if use collectd_plugins_smart; then |
1658 |
- elog "" |
1659 |
- elog "If you are using smart plugin and don't run collectd as root make sure" |
1660 |
- elog "that the collectd user is allowed to access the disk you want to monitor" |
1661 |
- elog "(can be done via udev rule for example) and that collectd has the required" |
1662 |
- elog "capabilities set (which is the default when package was emerged with" |
1663 |
- elog "'filecaps' USE flag set)." |
1664 |
- fi |
1665 |
- |
1666 |
- if use contrib; then |
1667 |
- elog "The scripts in /usr/share/doc/${PF}/collection3 for generating graphs need dev-perl/HTML-Parser," |
1668 |
- elog "dev-perl/config-general, dev-perl/regexp-common, and net-analyzer/rrdtool[perl] to be installed." |
1669 |
- fi |
1670 |
-} |
1671 |
|
1672 |
diff --git a/app-metrics/collectd/files/collectd-5.8.1-lm_sensors-4.5.0-compatibility.patch b/app-metrics/collectd/files/collectd-5.8.1-lm_sensors-4.5.0-compatibility.patch |
1673 |
deleted file mode 100644 |
1674 |
index 3476d50664a..00000000000 |
1675 |
--- a/app-metrics/collectd/files/collectd-5.8.1-lm_sensors-4.5.0-compatibility.patch |
1676 |
+++ /dev/null |
1677 |
@@ -1,70 +0,0 @@ |
1678 |
-https://github.com/collectd/collectd/issues/3006 |
1679 |
- |
1680 |
---- old/src/sensors.c |
1681 |
-+++ new/src/sensors.c |
1682 |
-@@ -149,7 +149,7 @@ |
1683 |
- static char *conffile = SENSORS_CONF_PATH; |
1684 |
- /* #endif SENSORS_API_VERSION < 0x400 */ |
1685 |
- |
1686 |
--#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) |
1687 |
-+#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x600) |
1688 |
- typedef struct featurelist { |
1689 |
- const sensors_chip_name *chip; |
1690 |
- const sensors_feature *feature; |
1691 |
-@@ -159,9 +159,9 @@ |
1692 |
- |
1693 |
- static char *conffile = NULL; |
1694 |
- static _Bool use_labels = 0; |
1695 |
--/* #endif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) */ |
1696 |
-+/* #endif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x600) */ |
1697 |
- |
1698 |
--#else /* if SENSORS_API_VERSION >= 0x500 */ |
1699 |
-+#else /* if SENSORS_API_VERSION >= 0x600 */ |
1700 |
- #error "This version of libsensors is not supported yet. Please report this " \ |
1701 |
- "as bug." |
1702 |
- #endif |
1703 |
-@@ -223,7 +223,7 @@ |
1704 |
- if (IS_TRUE(value)) |
1705 |
- ignorelist_set_invert(sensor_list, 0); |
1706 |
- } |
1707 |
--#if (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) |
1708 |
-+#if (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x600) |
1709 |
- else if (strcasecmp(key, "UseLabels") == 0) { |
1710 |
- use_labels = IS_TRUE(value) ? 1 : 0; |
1711 |
- } |
1712 |
-@@ -353,7 +353,7 @@ |
1713 |
- } /* while sensors_get_detected_chips */ |
1714 |
- /* #endif SENSORS_API_VERSION < 0x400 */ |
1715 |
- |
1716 |
--#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) |
1717 |
-+#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x600) |
1718 |
- chip_num = 0; |
1719 |
- while ((chip = sensors_get_detected_chips(NULL, &chip_num)) != NULL) { |
1720 |
- const sensors_feature *feature; |
1721 |
-@@ -410,7 +410,7 @@ |
1722 |
- } /* while (subfeature) */ |
1723 |
- } /* while (feature) */ |
1724 |
- } /* while (chip) */ |
1725 |
--#endif /* (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) */ |
1726 |
-+#endif /* (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x600) */ |
1727 |
- |
1728 |
- if (first_feature == NULL) { |
1729 |
- sensors_cleanup(); |
1730 |
-@@ -485,7 +485,7 @@ |
1731 |
- } /* for fl = first_feature .. NULL */ |
1732 |
- /* #endif SENSORS_API_VERSION < 0x400 */ |
1733 |
- |
1734 |
--#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) |
1735 |
-+#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x600) |
1736 |
- for (featurelist_t *fl = first_feature; fl != NULL; fl = fl->next) { |
1737 |
- double value; |
1738 |
- int status; |
1739 |
-@@ -528,7 +528,7 @@ |
1740 |
- |
1741 |
- sensors_submit(plugin_instance, type, type_instance, value); |
1742 |
- } /* for fl = first_feature .. NULL */ |
1743 |
--#endif /* (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) */ |
1744 |
-+#endif /* (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x600) */ |
1745 |
- |
1746 |
- return 0; |
1747 |
- } /* int sensors_read */ |
1748 |
|
1749 |
diff --git a/app-metrics/collectd/files/collectd-5.9.1-fixup.patch b/app-metrics/collectd/files/collectd-5.9.1-fixup.patch |
1750 |
deleted file mode 100644 |
1751 |
index 93f97d95a9c..00000000000 |
1752 |
--- a/app-metrics/collectd/files/collectd-5.9.1-fixup.patch |
1753 |
+++ /dev/null |
1754 |
@@ -1,81 +0,0 @@ |
1755 |
---- a/src/daemon/plugin.c |
1756 |
-+++ b/src/daemon/plugin.c |
1757 |
-@@ -647,7 +647,8 @@ static void start_read_threads(size_t num) /* {{{ */ |
1758 |
- } |
1759 |
- |
1760 |
- char name[THREAD_NAME_MAX]; |
1761 |
-- snprintf(name, sizeof(name), "reader#%" PRIu64, (uint64_t)read_threads_num); |
1762 |
-+ ssnprintf(name, sizeof(name), "reader#%" PRIu64, |
1763 |
-+ (uint64_t)read_threads_num); |
1764 |
- set_thread_name(read_threads[read_threads_num], name); |
1765 |
- |
1766 |
- read_threads_num++; |
1767 |
-@@ -836,8 +837,8 @@ static void start_write_threads(size_t num) /* {{{ */ |
1768 |
- } |
1769 |
- |
1770 |
- char name[THREAD_NAME_MAX]; |
1771 |
-- snprintf(name, sizeof(name), "writer#%" PRIu64, |
1772 |
-- (uint64_t)write_threads_num); |
1773 |
-+ ssnprintf(name, sizeof(name), "writer#%" PRIu64, |
1774 |
-+ (uint64_t)write_threads_num); |
1775 |
- set_thread_name(write_threads[write_threads_num], name); |
1776 |
- |
1777 |
- write_threads_num++; |
1778 |
---- a/src/intel_rdt.c |
1779 |
-+++ b/src/intel_rdt.c |
1780 |
-@@ -325,8 +325,12 @@ static int strlisttoarray(char *str_list, char ***names, size_t *names_num) { |
1781 |
- continue; |
1782 |
- |
1783 |
- if ((isdupstr((const char **)*names, *names_num, token))) { |
1784 |
-- ERROR(RDT_PLUGIN ": Duplicated process name \'%s\' in group \'%s\'", |
1785 |
-- token, str_list); |
1786 |
-+ if (str_list != NULL) |
1787 |
-+ ERROR(RDT_PLUGIN ": Duplicated process name \'%s\' in group \'%s\'", |
1788 |
-+ token, str_list); |
1789 |
-+ else |
1790 |
-+ ERROR(RDT_PLUGIN ": Duplicated process name \'%s\'", token); |
1791 |
-+ |
1792 |
- return -EINVAL; |
1793 |
- } else { |
1794 |
- if (0 != strarray_add(names, names_num, token)) { |
1795 |
---- a/src/intel_rdt.c |
1796 |
-+++ b/src/intel_rdt.c |
1797 |
-@@ -325,11 +325,7 @@ static int strlisttoarray(char *str_list, char ***names, size_t *names_num) { |
1798 |
- continue; |
1799 |
- |
1800 |
- if ((isdupstr((const char **)*names, *names_num, token))) { |
1801 |
-- if (str_list != NULL) |
1802 |
-- ERROR(RDT_PLUGIN ": Duplicated process name \'%s\' in group \'%s\'", |
1803 |
-- token, str_list); |
1804 |
-- else |
1805 |
-- ERROR(RDT_PLUGIN ": Duplicated process name \'%s\'", token); |
1806 |
-+ ERROR(RDT_PLUGIN ": Duplicated process name \'%s\'", token); |
1807 |
- |
1808 |
- return -EINVAL; |
1809 |
- } else { |
1810 |
---- a/src/syslog.c |
1811 |
-+++ b/src/syslog.c |
1812 |
-@@ -51,8 +51,7 @@ static int sl_config(const char *key, const char *value) { |
1813 |
- log_level = parse_log_severity(value); |
1814 |
- if (log_level < 0) { |
1815 |
- log_level = LOG_INFO; |
1816 |
-- ERROR("syslog: invalid loglevel [%s] defaulting to 'info'", value); |
1817 |
-- return 1; |
1818 |
-+ WARNING("syslog: invalid loglevel [%s] defaulting to 'info'", value); |
1819 |
- } |
1820 |
- } else if (strcasecmp(key, "NotifyLevel") == 0) { |
1821 |
- notif_severity = parse_notif_severity(value); |
1822 |
---- a/src/utils/common/common.c |
1823 |
-+++ b/src/utils/common/common.c |
1824 |
-@@ -99,10 +99,7 @@ int ssnprintf(char *str, size_t sz, const char *format, ...) { |
1825 |
- |
1826 |
- va_end(ap); |
1827 |
- |
1828 |
-- if (ret < 0) { |
1829 |
-- return ret; |
1830 |
-- } |
1831 |
-- return (size_t)ret >= sz; |
1832 |
-+ return ret; |
1833 |
- } /* int ssnprintf */ |
1834 |
- |
1835 |
- char *ssnprintf_alloc(char const *format, ...) /* {{{ */ |