public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-admin/collectd/files/, app-admin/collectd/
@ 2017-04-06 15:50 Thomas Deutschmann
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Deutschmann @ 2017-04-06 15:50 UTC (permalink / raw
  To: gentoo-commits

commit:     06fd84be0f99d0192caf0f4e4f5a713f85a49a7e
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Apr  6 15:42:46 2017 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Apr  6 15:42:46 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06fd84be

app-admin/collectd: Rev bump to add patch for CVE-2017-7401 (bug #614848)

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 app-admin/collectd/collectd-5.6.2-r2.ebuild        | 531 +++++++++++++++++++++
 .../files/collectd-5.6.2-CVE-2017-7401.patch       |  56 +++
 2 files changed, 587 insertions(+)

diff --git a/app-admin/collectd/collectd-5.6.2-r2.ebuild b/app-admin/collectd/collectd-5.6.2-r2.ebuild
new file mode 100644
index 00000000000..885fbf1a446
--- /dev/null
+++ b/app-admin/collectd/collectd-5.6.2-r2.ebuild
@@ -0,0 +1,531 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+JAVA_PKG_OPT_USE="collectd_plugins_java"
+
+inherit autotools fcaps flag-o-matic java-pkg-opt-2 linux-info multilib perl-functions python-single-r1 systemd user
+
+DESCRIPTION="Collects system statistics and provides mechanisms to store the values"
+
+HOMEPAGE="https://collectd.org/"
+SRC_URI="${HOMEPAGE%/}/files/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="contrib debug java kernel_Darwin kernel_FreeBSD kernel_linux perl selinux static-libs udev xfs"
+
+# The plugin lists have to follow here since they extend IUSE
+
+# Plugins that don't build (e.g. dependencies not in Gentoo)
+# apple_sensors: Requires libIOKit
+# aquaero:       Requires aerotools-ng/libaquaero5
+# barometer:     Requires libi2c (i2c_smbus_read_i2c_block_data)
+# grpc:          Requires libgrpc
+# lpar:          Requires libperfstat (AIX only)
+# mic:           Requires Intel Many Integrated Core Architecture API
+#                (part of Intel's  Xeon Phi software)
+# netapp:        Requires libnetapp (http://communities.netapp.com/docs/DOC-1110)
+# pf:            Requires BSD packet filter
+# pinba:         Requires MySQL Pinba engine (http://pinba.org/)
+# tape:          Requires libkstat (Solaris only)
+# write_mongodb: https://github.com/collectd/collectd/issues/492
+# write_riemann: Requires riemann-c-client
+# xmms:          Requires libxmms (v1)
+# zone:          Solaris only...
+COLLECTD_IMPOSSIBLE_PLUGINS="apple_sensors aquaero barometer grpc lpar mic
+	netapp pf pinba tape write_kafka write_mongodb write_riemann xmms
+	zone"
+
+# Plugins that have been (compile) tested and can be enabled via COLLECTD_PLUGINS
+COLLECTD_TESTED_PLUGINS="aggregation amqp apache apcups ascent battery bind
+	ceph cgroups chrony conntrack contextswitch cpu cpufreq cpusleep
+	csv curl curl_json curl_xml dbi df disk dns drbd email entropy
+	ethstat exec fhcount filecount fscache gmond gps hddtemp interface
+	ipc ipmi iptables ipvs irq java lua load logfile log_logstash lvm
+	madwifi match_empty_counter match_hashed match_regex match_timediff
+	match_value mbmon md memcachec memcached memory modbus mqtt
+	multimeter mysql netlink network network nfs nginx notify_desktop
+	notify_email notify_nagios ntpd numa nut olsrd onewire openldap
+	openvpn oracle perl ping postgresql powerdns processes protocols
+	python python redis routeros rrdcached rrdtool sensors serial
+	sigrok smart snmp statsd swap syslog table tail tail_csv
+	target_notification target_replace target_scale target_set tcpconns
+	teamspeak2 ted thermal threshold tokyotyrant turbostat unixsock
+	uptime users uuid varnish virt vmem vserver wireless write_graphite
+	write_http write_kafka write_log write_redis write_sensu write_tsdb
+	xencpu zfs_arc zookeeper"
+
+COLLECTD_DISABLED_PLUGINS="${COLLECTD_IMPOSSIBLE_PLUGINS}"
+
+COLLECTD_ALL_PLUGINS=${COLLECTD_TESTED_PLUGINS}
+
+for plugin in ${COLLECTD_ALL_PLUGINS}; do
+	IUSE="${IUSE} collectd_plugins_${plugin}"
+done
+unset plugin
+
+# Now come the dependencies.
+
+COMMON_DEPEND="
+	dev-libs/libgcrypt:=
+	dev-libs/libltdl:0=
+	perl?					( dev-lang/perl:=[ithreads] )
+	udev?					( virtual/udev )
+	xfs?					( sys-fs/xfsprogs )
+	collectd_plugins_amqp?			( net-libs/rabbitmq-c )
+	collectd_plugins_apache?		( net-misc/curl:0= )
+	collectd_plugins_ascent?		( net-misc/curl:0= dev-libs/libxml2:2= )
+	collectd_plugins_bind?			( net-misc/curl:0= dev-libs/libxml2:2= )
+	collectd_plugins_ceph?			( dev-libs/yajl:= )
+	collectd_plugins_curl?			( net-misc/curl:0= )
+	collectd_plugins_curl_json?		( net-misc/curl:0= dev-libs/yajl:= )
+	collectd_plugins_curl_xml?		( net-misc/curl:0= dev-libs/libxml2:2= )
+	collectd_plugins_dbi?			( dev-db/libdbi )
+	collectd_plugins_dns?			( net-libs/libpcap )
+	collectd_plugins_gmond?			( sys-cluster/ganglia )
+	collectd_plugins_gps?			( sci-geosciences/gpsd )
+	collectd_plugins_ipmi?			( >=sys-libs/openipmi-2.0.16-r1 )
+	collectd_plugins_iptables?		( >=net-firewall/iptables-1.4.13:0= )
+	collectd_plugins_log_logstash?		( dev-libs/yajl:= )
+	collectd_plugins_lua?			( dev-lang/lua:0= )
+	collectd_plugins_lvm?			( sys-fs/lvm2 )
+	collectd_plugins_memcachec?		( dev-libs/libmemcached )
+	collectd_plugins_modbus?		( dev-libs/libmodbus )
+	collectd_plugins_mqtt?			( app-misc/mosquitto )
+	collectd_plugins_mysql?			( >=virtual/mysql-5.0 )
+	collectd_plugins_netlink?		( net-libs/libmnl )
+	collectd_plugins_nginx?			( net-misc/curl:0= )
+	collectd_plugins_notify_desktop?	( x11-libs/libnotify )
+	collectd_plugins_notify_email?		( net-libs/libesmtp )
+	collectd_plugins_nut?			( >=sys-power/nut-2.7.2-r2 )
+	collectd_plugins_openldap?		( net-nds/openldap )
+	collectd_plugins_onewire?		( >=sys-fs/owfs-3.1:= )
+	collectd_plugins_oracle?		( dev-db/oracle-instantclient-basic )
+	collectd_plugins_perl?			( dev-lang/perl:=[ithreads] )
+	collectd_plugins_ping?			( net-libs/liboping )
+	collectd_plugins_postgresql?		( dev-db/postgresql:= )
+	collectd_plugins_python?		( ${PYTHON_DEPS} )
+	collectd_plugins_redis?			( dev-libs/hiredis:= )
+	collectd_plugins_routeros?		( net-libs/librouteros )
+	collectd_plugins_rrdcached?		( net-analyzer/rrdtool:= )
+	collectd_plugins_rrdtool?		( net-analyzer/rrdtool:= )
+	collectd_plugins_sensors?		( sys-apps/lm_sensors )
+	collectd_plugins_sigrok?		( <sci-libs/libsigrok-0.4 dev-libs/glib:2 )
+	collectd_plugins_smart?			( dev-libs/libatasmart )
+	collectd_plugins_snmp?			( net-analyzer/net-snmp )
+	collectd_plugins_tokyotyrant?		( net-misc/tokyotyrant )
+	collectd_plugins_varnish?		( www-servers/varnish )
+	collectd_plugins_virt?			( app-emulation/libvirt:= dev-libs/libxml2:2= )
+	collectd_plugins_write_http?		( net-misc/curl:0= dev-libs/yajl:= )
+	collectd_plugins_write_kafka?		( >=dev-libs/librdkafka-0.9.0.99:= dev-libs/yajl:= )
+	collectd_plugins_write_redis?		( dev-libs/hiredis:= )
+	collectd_plugins_xencpu?		( app-emulation/xen-tools:= )
+
+	kernel_FreeBSD? (
+		collectd_plugins_disk?		( sys-libs/libstatgrab:= )
+		collectd_plugins_interface?	( sys-libs/libstatgrab:= )
+		collectd_plugins_load?		( sys-libs/libstatgrab:= )
+		collectd_plugins_memory?	( sys-libs/libstatgrab:= )
+		collectd_plugins_swap?		( sys-libs/libstatgrab:= )
+		collectd_plugins_users?		( sys-libs/libstatgrab:= )
+	)"
+
+# Enforcing <=sys-kernel/linux-headers-4.4 due to #577846
+DEPEND="${COMMON_DEPEND}
+	collectd_plugins_iptables?		( <=sys-kernel/linux-headers-4.4 )
+	collectd_plugins_java?			( >=virtual/jdk-1.6 )
+	virtual/pkgconfig"
+
+RDEPEND="${COMMON_DEPEND}
+	collectd_plugins_java?			( >=virtual/jre-1.6 )
+	collectd_plugins_syslog?		( virtual/logger )
+	selinux?				( sec-policy/selinux-collectd )
+	!<sys-apps/openrc-0.18.2"
+
+REQUIRED_USE="
+	collectd_plugins_python?		( ${PYTHON_REQUIRED_USE} )
+	collectd_plugins_smart?			( udev )"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-5.6.0-gentoo.patch
+	"${FILESDIR}"/${PN}-5.6.2-CVE-2017-7401.patch
+)
+
+# @FUNCTION: collectd_plugin_kernel_linux
+# @DESCRIPTION:
+# USAGE: <plugin name> <kernel_options> <severity>
+# kernel_options is a list of kernel configurations options; the check tests whether at least
+#   one of them is enabled. If no, depending on the third argument an elog, ewarn, or eerror message
+#   is emitted.
+collectd_plugin_kernel_linux() {
+	local multi_opt opt
+	if has ${1} ${COLLECTD_ALL_PLUGINS}; then
+		if use collectd_plugins_${1}; then
+			for opt in ${2}; do
+				if linux_chkconfig_present ${opt}; then
+					return 0;
+				fi
+			done
+			multi_opt=${2//\ /\ or\ }
+			case ${3} in
+				(info)
+					elog "The ${1} plugin can use kernel features that are disabled now; enable ${multi_opt} in your kernel"
+				;;
+				(warn)
+					ewarn "The ${1} plugin uses kernel features that are disabled now; enable ${multi_opt} in your kernel"
+				;;
+				(error)
+					eerror "The ${1} plugin needs kernel features that are disabled now; enable ${multi_opt} in your kernel"
+				;;
+				(*)
+					die "function collectd_plugin_kernel_linux called with invalid third argument"
+				;;
+			esac
+		fi
+	fi
+}
+
+collectd_linux_kernel_checks() {
+	if ! linux_chkconfig_present PROC_FS; then
+		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"
+	fi
+
+	if ! linux_chkconfig_present SYSFS; then
+		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"
+	fi
+
+	# battery.c: /proc/pmu/battery_%i
+	# battery.c: /proc/acpi/battery
+	collectd_plugin_kernel_linux battery ACPI_BATTERY warn
+
+	# cgroups.c: /sys/fs/cgroup/
+	collectd_plugin_kernel_linux cgroups CGROUPS warn
+
+	# cpufreq.c: /sys/devices/system/cpu/cpu%d/cpufreq/
+	collectd_plugin_kernel_linux cpufreq SYSFS warn
+	collectd_plugin_kernel_linux cpufreq CPU_FREQ_STAT warn
+
+	# drbd.c: /proc/drbd
+	collectd_plugin_kernel_linux drbd BLK_DEV_DRBD warn
+
+	# conntrack.c: /proc/sys/net/netfilter/*
+	collectd_plugin_kernel_linux conntrack NETFILTER warn
+
+	# fscache.c: /proc/fs/fscache/stats
+	collectd_plugin_kernel_linux fscache FSCACHE warn
+
+	# nfs.c: /proc/net/rpc/nfs
+	# nfs.c: /proc/net/rpc/nfsd
+	collectd_plugin_kernel_linux nfs NFS_COMMON warn
+
+	# serial.c: /proc/tty/driver/serial
+	# serial.c: /proc/tty/driver/ttyS
+	collectd_plugin_kernel_linux serial SERIAL_CORE warn
+
+	# swap.c: /proc/meminfo
+	collectd_plugin_kernel_linux swap SWAP warn
+
+	# thermal.c: /proc/acpi/thermal_zone
+	# thermal.c: /sys/class/thermal
+	collectd_plugin_kernel_linux thermal ACPI_THERMAL warn
+
+	# turbostat.c: /dev/cpu/%d/msr
+	collectd_plugin_kernel_linux turbostat X86_MSR warn
+
+	# vmem.c: /proc/vmstat
+	collectd_plugin_kernel_linux vmem VM_EVENT_COUNTERS warn
+
+	# vserver.c: /proc/virtual
+	collectd_plugin_kernel_linux vserver VSERVER warn
+
+	# uuid.c: /sys/hypervisor/uuid
+	collectd_plugin_kernel_linux uuid SYSFS info
+
+	# wireless.c: /proc/net/wireless
+	collectd_plugin_kernel_linux wireless "WIRELESS MAC80211 IEEE80211" warn
+
+	# zfs_arc.c: /proc/spl/kstat/zfs/arcstats
+	collectd_plugin_kernel_linux zfs_arc "SPL ZFS" warn
+}
+
+pkg_setup() {
+	if use kernel_linux; then
+		linux-info_pkg_setup
+
+		if linux_config_exists; then
+			einfo "Checking your linux kernel configuration:"
+			collectd_linux_kernel_checks
+		else
+			elog "Cannot find a linux kernel configuration. Continuing anyway."
+		fi
+	fi
+
+	if use collectd_plugins_java; then
+		java-pkg-opt-2_pkg_setup
+	fi
+
+	use collectd_plugins_python && python-single-r1_pkg_setup
+
+	enewgroup collectd
+	enewuser collectd -1 -1 /var/lib/collectd collectd
+}
+
+src_prepare() {
+	default
+
+	# There's some strange prefix handling in the default config file, resulting in
+	# paths like "/usr/var/..."
+	sed -i -e "s:@prefix@/var:/var:g" src/collectd.conf.in || die
+
+	# fix installdirs for perl, bug 444360
+	sed -i -e 's/INSTALL_BASE=$(DESTDIR)$(prefix) //' bindings/Makefile.am || die
+
+	# Adjust upstream's systemd unit
+	#   - Get rid of EnvironmentFile directive; These files don't exist on Gentoo!
+	#   - Add User=collectd to run collectd as user "collectd" per default
+	sed -i \
+		-e '/^EnvironmentFile=.*/d' \
+		-e '/^\[Service\]/aUser=collectd' \
+		contrib/systemd.${PN}.service || die
+
+	if use collectd_plugins_java; then
+		# Set javac -source and -target flags according to (R)DEPEND.
+		sed -i -e "s/\$(JAVAC)/\0 $(java-pkg_javac-args)/g" bindings/java/Makefile.am || die
+	fi
+
+	ebegin "Removing bundled libltdl"
+	rm -rf libltdl || die
+	eend 0
+
+	eautoreconf
+}
+
+src_configure() {
+	# Now come the lists of os-dependent plugins. Any plugin that is not listed anywhere here
+	# should work independent of the operating system.
+
+	local linux_plugins="barometer battery cpu cpufreq disk drbd entropy
+		ethstat interface iptables ipvs irq ipc load memory md netlink nfs
+		numa processes serial swap tcpconns thermal turbostat users vmem
+		wireless zfc_arc"
+
+	local need_libstatgrab=0
+	local libstatgrab_plugins="cpu disk interface load memory swap users"
+	local bsd_plugins="cpu tcpconns ${libstatgrab_plugins} zfc_arc"
+
+	local darwin_plugins="apple_sensors battery cpu disk interface memory processes tcpconns"
+
+	local osdependent_plugins="${linux_plugins} ${bsd_plugins} ${darwin_plugins}"
+	local myos_plugins=""
+	if use kernel_linux; then
+		einfo "Enabling Linux plugins."
+		myos_plugins=${linux_plugins}
+	elif use kernel_FreeBSD; then
+		einfo "Enabling FreeBSD plugins."
+		myos_plugins=${bsd_plugins}
+	elif use kernel_Darwin; then
+		einfo "Enabling Darwin plugins."
+		myos_plugins=${darwin_plugins}
+	fi
+
+	local myconf="--disable-werror"
+
+	# Do we debug?
+	myconf+=" $(use_enable debug)"
+
+	# udev support?
+	# Required for smart plugin via REQUIRED_USE; Optional for disk plugin
+	if use udev; then
+		myconf+=" --with-libudev"
+	else
+		myconf+=" --without-libudev"
+	fi
+
+	local plugin
+
+	# Disable what needs to be disabled.
+	for plugin in ${COLLECTD_DISABLED_PLUGINS}; do
+		myconf+=" --disable-${plugin}"
+	done
+
+	# Set enable/disable for each single plugin.
+	for plugin in ${COLLECTD_ALL_PLUGINS}; do
+		if has ${plugin} ${osdependent_plugins}; then
+			# plugin is os-dependent ...
+			if has ${plugin} ${myos_plugins}; then
+				# ... and available in this os
+				myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
+				# ... must we link against libstatgrab? Bug #541518
+				if use kernel_FreeBSD && has ${plugin} ${libstatgrab_plugins}; then
+					einfo "We must link against libstatgrab due to plugin \"${plugin}\" ..."
+					need_libstatgrab=1
+				fi
+			else
+				# ... and NOT available in this os
+				if use collectd_plugins_${plugin}; then
+					ewarn "You try to enable the ${plugin} plugin, but it is not available for this"
+					ewarn "kernel. Disabling it automatically."
+				fi
+				myconf+=" --disable-${plugin}"
+			fi
+		elif [[ "${plugin}" = "collectd_plugins_perl" ]]; then
+			if use collectd_plugins_perl && ! use perl; then
+				ewarn "Perl plugin disabled as perl bindings disabled by -perl use flag"
+				myconf+= --disable-perl
+			else
+				myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
+			fi
+		else
+			myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
+		fi
+	done
+
+	if [ "${need_libstatgrab}" -eq 1 ]; then
+		myconf+=" --with-libstatgrab"
+	else
+		myconf+=" --without-libstatgrab"
+	fi
+
+	# JAVA_HOME is set by eclasses.
+	if use collectd_plugins_java; then
+		myconf+=" --with-java"
+	fi
+
+	# Need libiptc ONLY for iptables. If we try to use it otherwise bug 340109 happens.
+	# lots of libs are only needed for plugins, if they are disabled, also disable the lib
+	use collectd_plugins_iptables || myconf+=" --with-libiptc=no"
+	use collectd_plugins_openldap || myconf+=" --with-libldap=no"
+	use collectd_plugins_redis    || use collectd_plugins_write_redis || myconf+=" --with-libhiredis=no"
+	use collectd_plugins_smart    || myconf+=" --with-libatasmart=no"
+	use collectd_plugins_gps      || myconf+=" --with-libgps=no"
+
+	if use perl; then
+		myconf+=" --with-perl-bindings=INSTALLDIRS=vendor"
+	else
+		myconf+=" --without-perl-bindings"
+	fi
+
+	# No need for v5upgrade
+	myconf+=" --disable-target_v5upgrade"
+
+	# Python
+	if use collectd_plugins_python; then
+		myconf+=" --with-libpython=yes"
+		export PYTHON_CONFIG=$(python_get_PYTHON_CONFIG)
+	else
+		myconf+=" --with-libpython=no"
+	fi
+
+	# XFS support
+	myconf+=" $(use_enable xfs)"
+
+	# Finally, run econf.
+	KERNEL_DIR="${KERNEL_DIR}" econf --config-cache \
+		$(use_enable static-libs static) \
+		--localstatedir=/var ${myconf}
+}
+
+src_install() {
+	emake DESTDIR="${D%/}" install
+
+	perl_delete_localpod
+
+	find "${ED}"usr/ -name "*.la" -delete || die
+
+	if use collectd_plugins_java; then
+		java-pkg_regjar "${ED}"usr/share/${PN}/java/*.jar
+	fi
+
+	fowners root:collectd /etc/collectd.conf
+	fperms u=rw,g=r,o= /etc/collectd.conf
+
+	dodoc AUTHORS ChangeLog NEWS README TODO
+
+	if use contrib ; then
+		insinto /usr/share/doc/${PF}
+		doins -r contrib
+	fi
+
+	keepdir /var/lib/${PN}
+	fowners collectd:collectd /var/lib/${PN}
+
+	newinitd "${FILESDIR}/${PN}.initd-r1" ${PN}
+	newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
+	systemd_newunit "contrib/systemd.${PN}.service" ${PN}.service
+
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+	sed -i -e 's:^.*PIDFile     "/var/run/collectd.pid":PIDFile     "/run/collectd/collectd.pid":' "${ED}"etc/collectd.conf || die
+	sed -i -e 's:^#	SocketFile "/var/run/collectd-unixsock":#	SocketFile "/run/collectd/collectd.socket":' "${ED}"etc/collectd.conf || die
+	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
+	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
+}
+
+pkg_postinst() {
+	if use filecaps; then
+		local caps=()
+		use collectd_plugins_ceph      && caps+=('CAP_DAC_OVERRIDE')
+		use collectd_plugins_exec      && caps+=('CAP_SETUID' 'CAP_SETGID')
+		use collectd_plugins_iptables  && caps+=('CAP_NET_ADMIN')
+		use collectd_plugins_filecount && caps+=('CAP_DAC_READ_SEARCH')
+
+		if use collectd_plugins_dns || use collectd_plugins_ping; then
+			caps+=('CAP_NET_RAW')
+		fi
+
+		if use collectd_plugins_turbostat || use collectd_plugins_smart; then
+			caps+=('CAP_SYS_RAWIO')
+		fi
+
+		if [ ${#caps[@]} -gt 0 ]; then
+			local caps_str=$(IFS=","; echo "${caps[*]}")
+			fcaps ${caps_str} usr/sbin/collectd
+			elog "Capabilities for ${EROOT}usr/sbin/collectd set to:"
+			elog "  ${caps_str}+EP"
+			elog
+
+			local systemd_unit="${EROOT}usr/lib/systemd/system/collectd.service"
+			if [[ -e "${systemd_unit}" ]]; then
+				caps_str="${caps[*]}"
+				sed -i -e "s:^CapabilityBoundingSet=.*:CapabilityBoundingSet=${caps_str}:" "${systemd_unit}" || \
+					die "Failed to set CapabilityBoundingSet in '${systemd_unit}'"
+
+				elog "CapabilityBoundingSet in '${systemd_unit}'"
+				elog "updated to match capabilities set above."
+				elog
+			fi
+		fi
+	fi
+
+	elog "Note: Collectd is only the collector."
+	elog "      You need to install 'data' sources (applications) locally or"
+	elog "      remotely on your own."
+
+	elog
+	elog "Collectd is configured to run as unprivileged user by default."
+	elog "You may want to revisit the configuration."
+	elog
+
+	if use collectd_plugins_email; then
+		ewarn "The email plug-in is deprecated. To submit statistics please use the unixsock plugin."
+	fi
+
+	if use collectd_plugins_smart; then
+		elog ""
+		elog "If you are using smart plugin and don't run collectd as root make sure"
+		elog "that the collectd user is allowed to access the disk you want to monitor"
+		elog "(can be done via udev rule for example) and that collectd has the required"
+		elog "capabilities set (which is the default when package was emerged with"
+		elog "'filecaps' USE flag set)."
+	fi
+
+	if use contrib; then
+		elog "The scripts in /usr/share/doc/${PF}/collection3 for generating graphs need dev-perl/HTML-Parser,"
+		elog "dev-perl/config-general, dev-perl/regexp-common, and net-analyzer/rrdtool[perl] to be installed."
+	fi
+}

diff --git a/app-admin/collectd/files/collectd-5.6.2-CVE-2017-7401.patch b/app-admin/collectd/files/collectd-5.6.2-CVE-2017-7401.patch
new file mode 100644
index 00000000000..7c23ac18d8f
--- /dev/null
+++ b/app-admin/collectd/files/collectd-5.6.2-CVE-2017-7401.patch
@@ -0,0 +1,56 @@
+From f6be4f9b49b949b379326c3d7002476e6ce4f211 Mon Sep 17 00:00:00 2001
+From: Pavel Rochnyack <pavel2000@ngs.ru>
+Date: Mon, 3 Apr 2017 11:57:09 +0600
+Subject: [PATCH] network plugin: Fix endless loop DOS in parse_packet()
+
+When correct 'Signature part' is received by Collectd, configured without
+AuthFile option, condition for endless loop occurs due to missing increase
+of pointer to next unprocessed part.
+
+This is a forward-port of #2233.
+
+Fixes: CVE-2017-7401
+Closes: #2174
+Signed-off-by: Florian Forster <octo@collectd.org>
+---
+ src/network.c | 20 ++++++++++++--------
+ 1 file changed, 12 insertions(+), 8 deletions(-)
+
+diff --git a/src/network.c b/src/network.c
+index be4c3ba..2ff09af 100644
+--- a/src/network.c
++++ b/src/network.c
+@@ -1003,14 +1003,6 @@ static int parse_part_sign_sha256(sockent_t *se, /* {{{ */
+   buffer_len = *ret_buffer_len;
+   buffer_offset = 0;
+ 
+-  if (se->data.server.userdb == NULL) {
+-    c_complain(
+-        LOG_NOTICE, &complain_no_users,
+-        "network plugin: Received signed network packet but can't verify it "
+-        "because no user DB has been configured. Will accept it.");
+-    return (0);
+-  }
+-
+   /* Check if the buffer has enough data for this structure. */
+   if (buffer_len <= PART_SIGNATURE_SHA256_SIZE)
+     return (-ENOMEM);
+@@ -1027,6 +1019,18 @@ static int parse_part_sign_sha256(sockent_t *se, /* {{{ */
+     return (-1);
+   }
+ 
++  if (se->data.server.userdb == NULL) {
++    c_complain(
++        LOG_NOTICE, &complain_no_users,
++        "network plugin: Received signed network packet but can't verify it "
++        "because no user DB has been configured. Will accept it.");
++
++    *ret_buffer = buffer + pss_head_length;
++    *ret_buffer_len -= pss_head_length;
++
++    return (0);
++  }
++
+   /* Copy the hash. */
+   BUFFER_READ(pss.hash, sizeof(pss.hash));
+ 


^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-admin/collectd/files/, app-admin/collectd/
@ 2018-03-03 16:43 Thomas Deutschmann
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Deutschmann @ 2018-03-03 16:43 UTC (permalink / raw
  To: gentoo-commits

commit:     c148c069385caf68d0bc5609ce13db4ba9e71415
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Mar  3 16:41:59 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Mar  3 16:43:51 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c148c069

app-admin/collectd: Security cleanup

Bug: https://bugs.gentoo.org/628540
Package-Manager: Portage-2.3.24, Repoman-2.3.6

 app-admin/collectd/Manifest                        |   2 -
 app-admin/collectd/collectd-5.6.2-r4.ebuild        | 532 --------------------
 app-admin/collectd/collectd-5.7.1.ebuild           | 537 ---------------------
 app-admin/collectd/collectd-5.7.2.ebuild           | 536 --------------------
 .../files/collectd-5.6.2-CVE-2017-7401.patch       |  56 ---
 .../collectd/files/collectd-5.6.2-issue2303.patch  |  44 --
 app-admin/collectd/files/collectd.confd-r1         |  45 --
 app-admin/collectd/files/collectd.initd-r1         |  78 ---
 8 files changed, 1830 deletions(-)

diff --git a/app-admin/collectd/Manifest b/app-admin/collectd/Manifest
index d53ee560fa0..bac7ff56a18 100644
--- a/app-admin/collectd/Manifest
+++ b/app-admin/collectd/Manifest
@@ -1,3 +1 @@
-DIST collectd-5.6.2.tar.bz2 1806969 BLAKE2B 2311b6cc51297264e1bfc705553c728ad2ae3355ce8b5fb25b8ac91aaef4b78921235c675ff26535e3388c1b1af37aec4d810b2e6c6b60fcc3d79e0149841989 SHA512 81438e2e653649cf8a447f475b41844b7adb8ec436b43fb395ba9cf8b09b56a068633fe4b6c802d5cde3909d85a3af2542f5804005b3843f7936a37553911d61
-DIST collectd-5.7.1.tar.bz2 1797725 BLAKE2B 5a24d74ff26ed8745d3b50d3b22db0a939aedc6048ff279880f892572d5e5799b1e3b4630250ebb9066325b2583f99b441a42d0bd0ab4a3c20b1aba82b9d16f2 SHA512 f2edf4ecf3bbf5f4e10c797614a7ae39c18678601038574cec4f2ea6a8773444af4592e2872ed75a5afe5f746adaff2449df51443d98d2560a23722e46bef164
 DIST collectd-5.7.2.tar.bz2 1798777 BLAKE2B 4af359a773457bb9c05b6a301d7728eea7598c200f7ca534875b07d1d011b280ab138f680d9607723f14523dd71dcbec3a41e0d8d183848c8ef809cef86c2b8f SHA512 8844b67159f8da2203b5ac57ef19fce0a01050a016174d196b48b5fb24925ad2935af9bdd9af06097ff663499abc496cdcc2d9e9a10f403f8d707c465c1a88f3

diff --git a/app-admin/collectd/collectd-5.6.2-r4.ebuild b/app-admin/collectd/collectd-5.6.2-r4.ebuild
deleted file mode 100644
index af56c138d93..00000000000
--- a/app-admin/collectd/collectd-5.6.2-r4.ebuild
+++ /dev/null
@@ -1,532 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
-JAVA_PKG_OPT_USE="collectd_plugins_java"
-
-inherit autotools fcaps flag-o-matic java-pkg-opt-2 linux-info multilib perl-functions python-single-r1 systemd user
-
-DESCRIPTION="Collects system statistics and provides mechanisms to store the values"
-
-HOMEPAGE="https://collectd.org/"
-SRC_URI="${HOMEPAGE%/}/files/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 arm x86"
-IUSE="contrib debug java kernel_Darwin kernel_FreeBSD kernel_linux perl selinux static-libs udev xfs"
-
-# The plugin lists have to follow here since they extend IUSE
-
-# Plugins that don't build (e.g. dependencies not in Gentoo)
-# apple_sensors: Requires libIOKit
-# aquaero:       Requires aerotools-ng/libaquaero5
-# barometer:     Requires libi2c (i2c_smbus_read_i2c_block_data)
-# grpc:          Requires libgrpc
-# lpar:          Requires libperfstat (AIX only)
-# mic:           Requires Intel Many Integrated Core Architecture API
-#                (part of Intel's  Xeon Phi software)
-# netapp:        Requires libnetapp (http://communities.netapp.com/docs/DOC-1110)
-# pf:            Requires BSD packet filter
-# pinba:         Requires MySQL Pinba engine (http://pinba.org/)
-# tape:          Requires libkstat (Solaris only)
-# write_mongodb: https://github.com/collectd/collectd/issues/492
-# write_riemann: Requires riemann-c-client
-# xmms:          Requires libxmms (v1)
-# zone:          Solaris only...
-COLLECTD_IMPOSSIBLE_PLUGINS="apple_sensors aquaero barometer grpc lpar mic
-	netapp pf pinba tape write_kafka write_mongodb write_riemann xmms
-	zone"
-
-# Plugins that have been (compile) tested and can be enabled via COLLECTD_PLUGINS
-COLLECTD_TESTED_PLUGINS="aggregation amqp apache apcups ascent battery bind
-	ceph cgroups chrony conntrack contextswitch cpu cpufreq cpusleep
-	csv curl curl_json curl_xml dbi df disk dns drbd email entropy
-	ethstat exec fhcount filecount fscache gmond gps hddtemp interface
-	ipc ipmi iptables ipvs irq java lua load logfile log_logstash lvm
-	madwifi match_empty_counter match_hashed match_regex match_timediff
-	match_value mbmon md memcachec memcached memory modbus mqtt
-	multimeter mysql netlink network network nfs nginx notify_desktop
-	notify_email notify_nagios ntpd numa nut olsrd onewire openldap
-	openvpn oracle perl ping postgresql powerdns processes protocols
-	python python redis routeros rrdcached rrdtool sensors serial
-	sigrok smart snmp statsd swap syslog table tail tail_csv
-	target_notification target_replace target_scale target_set tcpconns
-	teamspeak2 ted thermal threshold tokyotyrant turbostat unixsock
-	uptime users uuid varnish virt vmem vserver wireless write_graphite
-	write_http write_kafka write_log write_redis write_sensu write_tsdb
-	xencpu zfs_arc zookeeper"
-
-COLLECTD_DISABLED_PLUGINS="${COLLECTD_IMPOSSIBLE_PLUGINS}"
-
-COLLECTD_ALL_PLUGINS=${COLLECTD_TESTED_PLUGINS}
-
-for plugin in ${COLLECTD_ALL_PLUGINS}; do
-	IUSE="${IUSE} collectd_plugins_${plugin}"
-done
-unset plugin
-
-# Now come the dependencies.
-
-COMMON_DEPEND="
-	dev-libs/libgcrypt:=
-	dev-libs/libltdl:0=
-	perl?					( dev-lang/perl:=[ithreads] )
-	udev?					( virtual/udev )
-	xfs?					( sys-fs/xfsprogs )
-	collectd_plugins_amqp?			( net-libs/rabbitmq-c )
-	collectd_plugins_apache?		( net-misc/curl:0= )
-	collectd_plugins_ascent?		( net-misc/curl:0= dev-libs/libxml2:2= )
-	collectd_plugins_bind?			( net-misc/curl:0= dev-libs/libxml2:2= )
-	collectd_plugins_ceph?			( dev-libs/yajl:= )
-	collectd_plugins_curl?			( net-misc/curl:0= )
-	collectd_plugins_curl_json?		( net-misc/curl:0= dev-libs/yajl:= )
-	collectd_plugins_curl_xml?		( net-misc/curl:0= dev-libs/libxml2:2= )
-	collectd_plugins_dbi?			( dev-db/libdbi )
-	collectd_plugins_dns?			( net-libs/libpcap )
-	collectd_plugins_gmond?			( sys-cluster/ganglia )
-	collectd_plugins_gps?			( sci-geosciences/gpsd:= )
-	collectd_plugins_ipmi?			( >=sys-libs/openipmi-2.0.16-r1 )
-	collectd_plugins_iptables?		( >=net-firewall/iptables-1.4.13:0= )
-	collectd_plugins_log_logstash?		( dev-libs/yajl:= )
-	collectd_plugins_lua?			( dev-lang/lua:0= )
-	collectd_plugins_lvm?			( sys-fs/lvm2 )
-	collectd_plugins_memcachec?		( dev-libs/libmemcached )
-	collectd_plugins_modbus?		( dev-libs/libmodbus )
-	collectd_plugins_mqtt?			( app-misc/mosquitto )
-	collectd_plugins_mysql?			( >=virtual/mysql-5.0 )
-	collectd_plugins_netlink?		( net-libs/libmnl )
-	collectd_plugins_nginx?			( net-misc/curl:0= )
-	collectd_plugins_notify_desktop?	( x11-libs/libnotify )
-	collectd_plugins_notify_email?		( net-libs/libesmtp )
-	collectd_plugins_nut?			( >=sys-power/nut-2.7.2-r2 )
-	collectd_plugins_openldap?		( net-nds/openldap )
-	collectd_plugins_onewire?		( >=sys-fs/owfs-3.1:= )
-	collectd_plugins_oracle?		( dev-db/oracle-instantclient-basic )
-	collectd_plugins_perl?			( dev-lang/perl:=[ithreads] )
-	collectd_plugins_ping?			( net-libs/liboping )
-	collectd_plugins_postgresql?		( dev-db/postgresql:= )
-	collectd_plugins_python?		( ${PYTHON_DEPS} )
-	collectd_plugins_redis?			( dev-libs/hiredis:= )
-	collectd_plugins_routeros?		( net-libs/librouteros )
-	collectd_plugins_rrdcached?		( net-analyzer/rrdtool:= )
-	collectd_plugins_rrdtool?		( net-analyzer/rrdtool:= )
-	collectd_plugins_sensors?		( sys-apps/lm_sensors )
-	collectd_plugins_sigrok?		( <sci-libs/libsigrok-0.4:= dev-libs/glib:2 )
-	collectd_plugins_smart?			( dev-libs/libatasmart )
-	collectd_plugins_snmp?			( net-analyzer/net-snmp )
-	collectd_plugins_tokyotyrant?		( net-misc/tokyotyrant )
-	collectd_plugins_varnish?		( www-servers/varnish )
-	collectd_plugins_virt?			( app-emulation/libvirt:= dev-libs/libxml2:2= )
-	collectd_plugins_write_http?		( net-misc/curl:0= dev-libs/yajl:= )
-	collectd_plugins_write_kafka?		( >=dev-libs/librdkafka-0.9.0.99:= dev-libs/yajl:= )
-	collectd_plugins_write_redis?		( dev-libs/hiredis:= )
-	collectd_plugins_xencpu?		( app-emulation/xen-tools:= )
-
-	kernel_FreeBSD? (
-		collectd_plugins_disk?		( sys-libs/libstatgrab:= )
-		collectd_plugins_interface?	( sys-libs/libstatgrab:= )
-		collectd_plugins_load?		( sys-libs/libstatgrab:= )
-		collectd_plugins_memory?	( sys-libs/libstatgrab:= )
-		collectd_plugins_swap?		( sys-libs/libstatgrab:= )
-		collectd_plugins_users?		( sys-libs/libstatgrab:= )
-	)"
-
-# Enforcing !=sys-kernel/linux-headers-4.5 > due to #577846
-DEPEND="${COMMON_DEPEND}
-	collectd_plugins_iptables?		( || ( <=sys-kernel/linux-headers-4.4 >=sys-kernel/linux-headers-4.6 ) )
-	collectd_plugins_java?			( >=virtual/jdk-1.6 )
-	virtual/pkgconfig"
-
-RDEPEND="${COMMON_DEPEND}
-	collectd_plugins_java?			( >=virtual/jre-1.6 )
-	collectd_plugins_syslog?		( virtual/logger )
-	selinux?				( sec-policy/selinux-collectd )
-	!<sys-apps/openrc-0.18.2"
-
-REQUIRED_USE="
-	collectd_plugins_python?		( ${PYTHON_REQUIRED_USE} )
-	collectd_plugins_smart?			( udev )"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-5.6.0-gentoo.patch
-	"${FILESDIR}"/${PN}-5.6.2-CVE-2017-7401.patch
-	"${FILESDIR}"/${PN}-5.6.2-issue2303.patch
-)
-
-# @FUNCTION: collectd_plugin_kernel_linux
-# @DESCRIPTION:
-# USAGE: <plugin name> <kernel_options> <severity>
-# kernel_options is a list of kernel configurations options; the check tests whether at least
-#   one of them is enabled. If no, depending on the third argument an elog, ewarn, or eerror message
-#   is emitted.
-collectd_plugin_kernel_linux() {
-	local multi_opt opt
-	if has ${1} ${COLLECTD_ALL_PLUGINS}; then
-		if use collectd_plugins_${1}; then
-			for opt in ${2}; do
-				if linux_chkconfig_present ${opt}; then
-					return 0;
-				fi
-			done
-			multi_opt=${2//\ /\ or\ }
-			case ${3} in
-				(info)
-					elog "The ${1} plugin can use kernel features that are disabled now; enable ${multi_opt} in your kernel"
-				;;
-				(warn)
-					ewarn "The ${1} plugin uses kernel features that are disabled now; enable ${multi_opt} in your kernel"
-				;;
-				(error)
-					eerror "The ${1} plugin needs kernel features that are disabled now; enable ${multi_opt} in your kernel"
-				;;
-				(*)
-					die "function collectd_plugin_kernel_linux called with invalid third argument"
-				;;
-			esac
-		fi
-	fi
-}
-
-collectd_linux_kernel_checks() {
-	if ! linux_chkconfig_present PROC_FS; then
-		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"
-	fi
-
-	if ! linux_chkconfig_present SYSFS; then
-		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"
-	fi
-
-	# battery.c: /proc/pmu/battery_%i
-	# battery.c: /proc/acpi/battery
-	collectd_plugin_kernel_linux battery ACPI_BATTERY warn
-
-	# cgroups.c: /sys/fs/cgroup/
-	collectd_plugin_kernel_linux cgroups CGROUPS warn
-
-	# cpufreq.c: /sys/devices/system/cpu/cpu%d/cpufreq/
-	collectd_plugin_kernel_linux cpufreq SYSFS warn
-	collectd_plugin_kernel_linux cpufreq CPU_FREQ_STAT warn
-
-	# drbd.c: /proc/drbd
-	collectd_plugin_kernel_linux drbd BLK_DEV_DRBD warn
-
-	# conntrack.c: /proc/sys/net/netfilter/*
-	collectd_plugin_kernel_linux conntrack NETFILTER warn
-
-	# fscache.c: /proc/fs/fscache/stats
-	collectd_plugin_kernel_linux fscache FSCACHE warn
-
-	# nfs.c: /proc/net/rpc/nfs
-	# nfs.c: /proc/net/rpc/nfsd
-	collectd_plugin_kernel_linux nfs NFS_COMMON warn
-
-	# serial.c: /proc/tty/driver/serial
-	# serial.c: /proc/tty/driver/ttyS
-	collectd_plugin_kernel_linux serial SERIAL_CORE warn
-
-	# swap.c: /proc/meminfo
-	collectd_plugin_kernel_linux swap SWAP warn
-
-	# thermal.c: /proc/acpi/thermal_zone
-	# thermal.c: /sys/class/thermal
-	collectd_plugin_kernel_linux thermal ACPI_THERMAL warn
-
-	# turbostat.c: /dev/cpu/%d/msr
-	collectd_plugin_kernel_linux turbostat X86_MSR warn
-
-	# vmem.c: /proc/vmstat
-	collectd_plugin_kernel_linux vmem VM_EVENT_COUNTERS warn
-
-	# vserver.c: /proc/virtual
-	collectd_plugin_kernel_linux vserver VSERVER warn
-
-	# uuid.c: /sys/hypervisor/uuid
-	collectd_plugin_kernel_linux uuid SYSFS info
-
-	# wireless.c: /proc/net/wireless
-	collectd_plugin_kernel_linux wireless "WIRELESS MAC80211 IEEE80211" warn
-
-	# zfs_arc.c: /proc/spl/kstat/zfs/arcstats
-	collectd_plugin_kernel_linux zfs_arc "SPL ZFS" warn
-}
-
-pkg_setup() {
-	if use kernel_linux; then
-		linux-info_pkg_setup
-
-		if linux_config_exists; then
-			einfo "Checking your linux kernel configuration:"
-			collectd_linux_kernel_checks
-		else
-			elog "Cannot find a linux kernel configuration. Continuing anyway."
-		fi
-	fi
-
-	if use collectd_plugins_java; then
-		java-pkg-opt-2_pkg_setup
-	fi
-
-	use collectd_plugins_python && python-single-r1_pkg_setup
-
-	enewgroup collectd
-	enewuser collectd -1 -1 /var/lib/collectd collectd
-}
-
-src_prepare() {
-	default
-
-	# There's some strange prefix handling in the default config file, resulting in
-	# paths like "/usr/var/..."
-	sed -i -e "s:@prefix@/var:/var:g" src/collectd.conf.in || die
-
-	# fix installdirs for perl, bug 444360
-	sed -i -e 's/INSTALL_BASE=$(DESTDIR)$(prefix) //' bindings/Makefile.am || die
-
-	# Adjust upstream's systemd unit
-	#   - Get rid of EnvironmentFile directive; These files don't exist on Gentoo!
-	#   - Add User=collectd to run collectd as user "collectd" per default
-	sed -i \
-		-e '/^EnvironmentFile=.*/d' \
-		-e '/^\[Service\]/aUser=collectd' \
-		contrib/systemd.${PN}.service || die
-
-	if use collectd_plugins_java; then
-		# Set javac -source and -target flags according to (R)DEPEND.
-		sed -i -e "s/\$(JAVAC)/\0 $(java-pkg_javac-args)/g" bindings/java/Makefile.am || die
-	fi
-
-	ebegin "Removing bundled libltdl"
-	rm -rf libltdl || die
-	eend 0
-
-	eautoreconf
-}
-
-src_configure() {
-	# Now come the lists of os-dependent plugins. Any plugin that is not listed anywhere here
-	# should work independent of the operating system.
-
-	local linux_plugins="barometer battery cpu cpufreq disk drbd entropy
-		ethstat interface iptables ipvs irq ipc load memory md netlink nfs
-		numa processes serial swap tcpconns thermal turbostat users vmem
-		wireless zfc_arc"
-
-	local need_libstatgrab=0
-	local libstatgrab_plugins="cpu disk interface load memory swap users"
-	local bsd_plugins="cpu tcpconns ${libstatgrab_plugins} zfc_arc"
-
-	local darwin_plugins="apple_sensors battery cpu disk interface memory processes tcpconns"
-
-	local osdependent_plugins="${linux_plugins} ${bsd_plugins} ${darwin_plugins}"
-	local myos_plugins=""
-	if use kernel_linux; then
-		einfo "Enabling Linux plugins."
-		myos_plugins=${linux_plugins}
-	elif use kernel_FreeBSD; then
-		einfo "Enabling FreeBSD plugins."
-		myos_plugins=${bsd_plugins}
-	elif use kernel_Darwin; then
-		einfo "Enabling Darwin plugins."
-		myos_plugins=${darwin_plugins}
-	fi
-
-	local myconf="--disable-werror"
-
-	# Do we debug?
-	myconf+=" $(use_enable debug)"
-
-	# udev support?
-	# Required for smart plugin via REQUIRED_USE; Optional for disk plugin
-	if use udev; then
-		myconf+=" --with-libudev"
-	else
-		myconf+=" --without-libudev"
-	fi
-
-	local plugin
-
-	# Disable what needs to be disabled.
-	for plugin in ${COLLECTD_DISABLED_PLUGINS}; do
-		myconf+=" --disable-${plugin}"
-	done
-
-	# Set enable/disable for each single plugin.
-	for plugin in ${COLLECTD_ALL_PLUGINS}; do
-		if has ${plugin} ${osdependent_plugins}; then
-			# plugin is os-dependent ...
-			if has ${plugin} ${myos_plugins}; then
-				# ... and available in this os
-				myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
-				# ... must we link against libstatgrab? Bug #541518
-				if use kernel_FreeBSD && has ${plugin} ${libstatgrab_plugins}; then
-					einfo "We must link against libstatgrab due to plugin \"${plugin}\" ..."
-					need_libstatgrab=1
-				fi
-			else
-				# ... and NOT available in this os
-				if use collectd_plugins_${plugin}; then
-					ewarn "You try to enable the ${plugin} plugin, but it is not available for this"
-					ewarn "kernel. Disabling it automatically."
-				fi
-				myconf+=" --disable-${plugin}"
-			fi
-		elif [[ "${plugin}" = "collectd_plugins_perl" ]]; then
-			if use collectd_plugins_perl && ! use perl; then
-				ewarn "Perl plugin disabled as perl bindings disabled by -perl use flag"
-				myconf+= --disable-perl
-			else
-				myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
-			fi
-		else
-			myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
-		fi
-	done
-
-	if [ "${need_libstatgrab}" -eq 1 ]; then
-		myconf+=" --with-libstatgrab"
-	else
-		myconf+=" --without-libstatgrab"
-	fi
-
-	# JAVA_HOME is set by eclasses.
-	if use collectd_plugins_java; then
-		myconf+=" --with-java"
-	fi
-
-	# Need libiptc ONLY for iptables. If we try to use it otherwise bug 340109 happens.
-	# lots of libs are only needed for plugins, if they are disabled, also disable the lib
-	use collectd_plugins_iptables || myconf+=" --with-libiptc=no"
-	use collectd_plugins_openldap || myconf+=" --with-libldap=no"
-	use collectd_plugins_redis    || use collectd_plugins_write_redis || myconf+=" --with-libhiredis=no"
-	use collectd_plugins_smart    || myconf+=" --with-libatasmart=no"
-	use collectd_plugins_gps      || myconf+=" --with-libgps=no"
-
-	if use perl; then
-		myconf+=" --with-perl-bindings=INSTALLDIRS=vendor"
-	else
-		myconf+=" --without-perl-bindings"
-	fi
-
-	# No need for v5upgrade
-	myconf+=" --disable-target_v5upgrade"
-
-	# Python
-	if use collectd_plugins_python; then
-		myconf+=" --with-libpython=yes"
-		export PYTHON_CONFIG=$(python_get_PYTHON_CONFIG)
-	else
-		myconf+=" --with-libpython=no"
-	fi
-
-	# XFS support
-	myconf+=" $(use_enable xfs)"
-
-	# Finally, run econf.
-	KERNEL_DIR="${KERNEL_DIR}" econf --config-cache \
-		$(use_enable static-libs static) \
-		--localstatedir=/var ${myconf}
-}
-
-src_install() {
-	emake DESTDIR="${D%/}" install
-
-	perl_delete_localpod
-
-	find "${ED}"usr/ -name "*.la" -delete || die
-
-	if use collectd_plugins_java; then
-		java-pkg_regjar "${ED}"usr/share/${PN}/java/*.jar
-	fi
-
-	fowners root:collectd /etc/collectd.conf
-	fperms u=rw,g=r,o= /etc/collectd.conf
-
-	dodoc AUTHORS ChangeLog NEWS README TODO
-
-	if use contrib ; then
-		insinto /usr/share/doc/${PF}
-		doins -r contrib
-	fi
-
-	keepdir /var/lib/${PN}
-	fowners collectd:collectd /var/lib/${PN}
-
-	newinitd "${FILESDIR}/${PN}.initd-r1" ${PN}
-	newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
-	systemd_newunit "contrib/systemd.${PN}.service" ${PN}.service
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}/${PN}.logrotate" ${PN}
-
-	sed -i -e 's:^.*PIDFile     "/var/run/collectd.pid":PIDFile     "/run/collectd/collectd.pid":' "${ED}"etc/collectd.conf || die
-	sed -i -e 's:^#	SocketFile "/var/run/collectd-unixsock":#	SocketFile "/run/collectd/collectd.socket":' "${ED}"etc/collectd.conf || die
-	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
-	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
-}
-
-pkg_postinst() {
-	if use filecaps; then
-		local caps=()
-		use collectd_plugins_ceph      && caps+=('CAP_DAC_OVERRIDE')
-		use collectd_plugins_exec      && caps+=('CAP_SETUID' 'CAP_SETGID')
-		use collectd_plugins_iptables  && caps+=('CAP_NET_ADMIN')
-		use collectd_plugins_filecount && caps+=('CAP_DAC_READ_SEARCH')
-
-		if use collectd_plugins_dns || use collectd_plugins_ping; then
-			caps+=('CAP_NET_RAW')
-		fi
-
-		if use collectd_plugins_turbostat || use collectd_plugins_smart; then
-			caps+=('CAP_SYS_RAWIO')
-		fi
-
-		if [ ${#caps[@]} -gt 0 ]; then
-			local caps_str=$(IFS=","; echo "${caps[*]}")
-			fcaps ${caps_str} usr/sbin/collectd
-			elog "Capabilities for ${EROOT}usr/sbin/collectd set to:"
-			elog "  ${caps_str}+EP"
-			elog
-
-			local systemd_unit="${EROOT}usr/lib/systemd/system/collectd.service"
-			if [[ -e "${systemd_unit}" ]]; then
-				caps_str="${caps[*]}"
-				sed -i -e "s:^CapabilityBoundingSet=.*:CapabilityBoundingSet=${caps_str}:" "${systemd_unit}" || \
-					die "Failed to set CapabilityBoundingSet in '${systemd_unit}'"
-
-				elog "CapabilityBoundingSet in '${systemd_unit}'"
-				elog "updated to match capabilities set above."
-				elog
-			fi
-		fi
-	fi
-
-	elog "Note: Collectd is only the collector."
-	elog "      You need to install 'data' sources (applications) locally or"
-	elog "      remotely on your own."
-
-	elog
-	elog "Collectd is configured to run as unprivileged user by default."
-	elog "You may want to revisit the configuration."
-	elog
-
-	if use collectd_plugins_email; then
-		ewarn "The email plug-in is deprecated. To submit statistics please use the unixsock plugin."
-	fi
-
-	if use collectd_plugins_smart; then
-		elog ""
-		elog "If you are using smart plugin and don't run collectd as root make sure"
-		elog "that the collectd user is allowed to access the disk you want to monitor"
-		elog "(can be done via udev rule for example) and that collectd has the required"
-		elog "capabilities set (which is the default when package was emerged with"
-		elog "'filecaps' USE flag set)."
-	fi
-
-	if use contrib; then
-		elog "The scripts in /usr/share/doc/${PF}/collection3 for generating graphs need dev-perl/HTML-Parser,"
-		elog "dev-perl/config-general, dev-perl/regexp-common, and net-analyzer/rrdtool[perl] to be installed."
-	fi
-}

diff --git a/app-admin/collectd/collectd-5.7.1.ebuild b/app-admin/collectd/collectd-5.7.1.ebuild
deleted file mode 100644
index 300d0261307..00000000000
--- a/app-admin/collectd/collectd-5.7.1.ebuild
+++ /dev/null
@@ -1,537 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
-JAVA_PKG_OPT_USE="collectd_plugins_java"
-
-inherit autotools fcaps flag-o-matic java-pkg-opt-2 linux-info multilib perl-functions python-single-r1 systemd user
-
-DESCRIPTION="Collects system statistics and provides mechanisms to store the values"
-
-HOMEPAGE="https://collectd.org/"
-SRC_URI="${HOMEPAGE%/}/files/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~x86"
-IUSE="contrib debug java kernel_Darwin kernel_FreeBSD kernel_linux perl selinux static-libs udev xfs"
-
-# The plugin lists have to follow here since they extend IUSE
-
-# Plugins that don't build (e.g. dependencies not in Gentoo)
-# apple_sensors: Requires libIOKit
-# aquaero:       Requires aerotools-ng/libaquaero5
-# barometer:     Requires libi2c (i2c_smbus_read_i2c_block_data)
-# dpdkstat:      Requires dpdk
-# grpc:          Requires libgrpc
-# intel_rdt      Requires libpqos from intel-cmt-cat project
-# lpar:          Requires libperfstat (AIX only)
-# mic:           Requires Intel Many Integrated Core Architecture API
-#                (part of Intel's  Xeon Phi software)
-# netapp:        Requires libnetapp (http://communities.netapp.com/docs/DOC-1110)
-# pf:            Requires BSD packet filter
-# pinba:         Requires MySQL Pinba engine (http://pinba.org/)
-# tape:          Requires libkstat (Solaris only)
-# write_mongodb: https://github.com/collectd/collectd/issues/492
-# write_riemann: Requires riemann-c-client
-# xmms:          Requires libxmms (v1)
-# zone:          Solaris only...
-COLLECTD_IMPOSSIBLE_PLUGINS="apple_sensors aquaero barometer dpdkstat grpc
-	intel_rdt lpar mic netapp pf pinba tape write_mongodb
-	write_riemann xmms zone"
-
-# Plugins that have been (compile) tested and can be enabled via COLLECTD_PLUGINS
-COLLECTD_TESTED_PLUGINS="aggregation amqp apache apcups ascent battery bind
-	ceph cgroups chrony conntrack contextswitch cpu cpufreq cpusleep
-	csv curl curl_json curl_xml dbi df disk dns drbd email
-	entropy ethstat exec fhcount filecount fscache gmond gps hddtemp
-	hugepages interface ipc ipmi iptables ipvs irq java lua
-	load logfile log_logstash lvm madwifi match_empty_counter
-	match_hashed match_regex match_timediff match_value mbmon md
-	memcachec memcached memory modbus mqtt multimeter mysql netlink
-	network network nfs nginx notify_desktop notify_email notify_nagios
-	ntpd numa nut olsrd onewire openldap openvpn oracle perl ping
-	postgresql powerdns processes protocols python python redis
-	routeros rrdcached rrdtool sensors serial sigrok smart snmp statsd
-	swap syslog table tail tail_csv target_notification target_replace
-	target_scale target_set tcpconns teamspeak2 ted thermal threshold
-	tokyotyrant turbostat unixsock uptime users uuid varnish virt
-	vmem vserver wireless write_graphite write_http write_kafka
-	write_log write_prometheus write_redis write_sensu write_tsdb
-	xencpu zfs_arc zookeeper"
-
-COLLECTD_DISABLED_PLUGINS="${COLLECTD_IMPOSSIBLE_PLUGINS}"
-
-COLLECTD_ALL_PLUGINS=${COLLECTD_TESTED_PLUGINS}
-
-for plugin in ${COLLECTD_ALL_PLUGINS}; do
-	IUSE="${IUSE} collectd_plugins_${plugin}"
-done
-unset plugin
-
-# Now come the dependencies.
-
-COMMON_DEPEND="
-	dev-libs/libgcrypt:=
-	dev-libs/libltdl:0=
-	perl?					( dev-lang/perl:=[ithreads] )
-	udev?					( virtual/udev )
-	xfs?					( sys-fs/xfsprogs )
-	collectd_plugins_amqp?			( net-libs/rabbitmq-c )
-	collectd_plugins_apache?		( net-misc/curl:0= )
-	collectd_plugins_ascent?		( net-misc/curl:0= dev-libs/libxml2:2= )
-	collectd_plugins_bind?			( net-misc/curl:0= dev-libs/libxml2:2= )
-	collectd_plugins_ceph?			( dev-libs/yajl:= )
-	collectd_plugins_curl?			( net-misc/curl:0= )
-	collectd_plugins_curl_json?		( net-misc/curl:0= dev-libs/yajl:= )
-	collectd_plugins_curl_xml?		( net-misc/curl:0= dev-libs/libxml2:2= )
-	collectd_plugins_dbi?			( dev-db/libdbi )
-	collectd_plugins_dns?			( net-libs/libpcap )
-	collectd_plugins_gmond?			( sys-cluster/ganglia )
-	collectd_plugins_gps?			( sci-geosciences/gpsd:= )
-	collectd_plugins_ipmi?			( >=sys-libs/openipmi-2.0.16-r1 )
-	collectd_plugins_iptables?		( >=net-firewall/iptables-1.4.13:0= )
-	collectd_plugins_log_logstash?		( dev-libs/yajl:= )
-	collectd_plugins_lua?			( dev-lang/lua:0= )
-	collectd_plugins_lvm?			( sys-fs/lvm2 )
-	collectd_plugins_memcachec?		( dev-libs/libmemcached )
-	collectd_plugins_modbus?		( dev-libs/libmodbus )
-	collectd_plugins_mqtt?			( app-misc/mosquitto )
-	collectd_plugins_mysql?			( >=virtual/mysql-5.0 )
-	collectd_plugins_netlink?		( net-libs/libmnl )
-	collectd_plugins_nginx?			( net-misc/curl:0= )
-	collectd_plugins_notify_desktop?	( x11-libs/libnotify )
-	collectd_plugins_notify_email?		( net-libs/libesmtp )
-	collectd_plugins_nut?			( >=sys-power/nut-2.7.2-r2 )
-	collectd_plugins_openldap?		( net-nds/openldap )
-	collectd_plugins_onewire?		( >=sys-fs/owfs-3.1:= )
-	collectd_plugins_oracle?		( dev-db/oracle-instantclient-basic )
-	collectd_plugins_perl?			( dev-lang/perl:=[ithreads] )
-	collectd_plugins_ping?			( net-libs/liboping )
-	collectd_plugins_postgresql?		( dev-db/postgresql:= )
-	collectd_plugins_python?		( ${PYTHON_DEPS} )
-	collectd_plugins_redis?			( dev-libs/hiredis:= )
-	collectd_plugins_routeros?		( net-libs/librouteros )
-	collectd_plugins_rrdcached?		( net-analyzer/rrdtool:= )
-	collectd_plugins_rrdtool?		( net-analyzer/rrdtool:= )
-	collectd_plugins_sensors?		( sys-apps/lm_sensors )
-	collectd_plugins_sigrok?		( <sci-libs/libsigrok-0.4:= dev-libs/glib:2 )
-	collectd_plugins_smart?			( dev-libs/libatasmart )
-	collectd_plugins_snmp?			( net-analyzer/net-snmp )
-	collectd_plugins_tokyotyrant?		( net-misc/tokyotyrant )
-	collectd_plugins_varnish?		( www-servers/varnish )
-	collectd_plugins_virt?			( app-emulation/libvirt:= dev-libs/libxml2:2= )
-	collectd_plugins_write_http?		( net-misc/curl:0= dev-libs/yajl:= )
-	collectd_plugins_write_kafka?		( >=dev-libs/librdkafka-0.9.0.99:= dev-libs/yajl:= )
-	collectd_plugins_write_prometheus?	( >=dev-libs/protobuf-c-1.2.1-r1:= net-libs/libmicrohttpd:= )
-	collectd_plugins_write_redis?		( dev-libs/hiredis:= )
-	collectd_plugins_xencpu?		( app-emulation/xen-tools:= )
-
-	kernel_FreeBSD? (
-		collectd_plugins_disk?		( sys-libs/libstatgrab:= )
-		collectd_plugins_interface?	( sys-libs/libstatgrab:= )
-		collectd_plugins_load?		( sys-libs/libstatgrab:= )
-		collectd_plugins_memory?	( sys-libs/libstatgrab:= )
-		collectd_plugins_swap?		( sys-libs/libstatgrab:= )
-		collectd_plugins_users?		( sys-libs/libstatgrab:= )
-	)"
-
-# Enforcing !=sys-kernel/linux-headers-4.5 > due to #577846
-DEPEND="${COMMON_DEPEND}
-	collectd_plugins_iptables?		( || ( <=sys-kernel/linux-headers-4.4 >=sys-kernel/linux-headers-4.6 ) )
-	collectd_plugins_java?			( >=virtual/jdk-1.6 )
-	virtual/pkgconfig"
-
-RDEPEND="${COMMON_DEPEND}
-	collectd_plugins_java?			( >=virtual/jre-1.6 )
-	collectd_plugins_syslog?		( virtual/logger )
-	selinux?				( sec-policy/selinux-collectd )
-	!<sys-apps/openrc-0.18.2"
-
-REQUIRED_USE="
-	collectd_plugins_python?		( ${PYTHON_REQUIRED_USE} )
-	collectd_plugins_smart?			( udev )"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-5.6.0-gentoo.patch
-	"${FILESDIR}"/${PN}-5.6.2-CVE-2017-7401.patch
-	"${FILESDIR}"/${PN}-5.6.2-issue2303.patch
-)
-
-# @FUNCTION: collectd_plugin_kernel_linux
-# @DESCRIPTION:
-# USAGE: <plugin name> <kernel_options> <severity>
-# kernel_options is a list of kernel configurations options; the check tests whether at least
-#   one of them is enabled. If no, depending on the third argument an elog, ewarn, or eerror message
-#   is emitted.
-collectd_plugin_kernel_linux() {
-	local multi_opt opt
-	if has ${1} ${COLLECTD_ALL_PLUGINS}; then
-		if use collectd_plugins_${1}; then
-			for opt in ${2}; do
-				if linux_chkconfig_present ${opt}; then
-					return 0;
-				fi
-			done
-			multi_opt=${2//\ /\ or\ }
-			case ${3} in
-				(info)
-					elog "The ${1} plugin can use kernel features that are disabled now; enable ${multi_opt} in your kernel"
-				;;
-				(warn)
-					ewarn "The ${1} plugin uses kernel features that are disabled now; enable ${multi_opt} in your kernel"
-				;;
-				(error)
-					eerror "The ${1} plugin needs kernel features that are disabled now; enable ${multi_opt} in your kernel"
-				;;
-				(*)
-					die "function collectd_plugin_kernel_linux called with invalid third argument"
-				;;
-			esac
-		fi
-	fi
-}
-
-collectd_linux_kernel_checks() {
-	if ! linux_chkconfig_present PROC_FS; then
-		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"
-	fi
-
-	if ! linux_chkconfig_present SYSFS; then
-		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"
-	fi
-
-	# battery.c: /proc/pmu/battery_%i
-	# battery.c: /proc/acpi/battery
-	collectd_plugin_kernel_linux battery ACPI_BATTERY warn
-
-	# cgroups.c: /sys/fs/cgroup/
-	collectd_plugin_kernel_linux cgroups CGROUPS warn
-
-	# cpufreq.c: /sys/devices/system/cpu/cpu%d/cpufreq/
-	collectd_plugin_kernel_linux cpufreq SYSFS warn
-	collectd_plugin_kernel_linux cpufreq CPU_FREQ_STAT warn
-
-	# drbd.c: /proc/drbd
-	collectd_plugin_kernel_linux drbd BLK_DEV_DRBD warn
-
-	# conntrack.c: /proc/sys/net/netfilter/*
-	collectd_plugin_kernel_linux conntrack NETFILTER warn
-
-	# fscache.c: /proc/fs/fscache/stats
-	collectd_plugin_kernel_linux fscache FSCACHE warn
-
-	# nfs.c: /proc/net/rpc/nfs
-	# nfs.c: /proc/net/rpc/nfsd
-	collectd_plugin_kernel_linux nfs NFS_COMMON warn
-
-	# serial.c: /proc/tty/driver/serial
-	# serial.c: /proc/tty/driver/ttyS
-	collectd_plugin_kernel_linux serial SERIAL_CORE warn
-
-	# swap.c: /proc/meminfo
-	collectd_plugin_kernel_linux swap SWAP warn
-
-	# thermal.c: /proc/acpi/thermal_zone
-	# thermal.c: /sys/class/thermal
-	collectd_plugin_kernel_linux thermal ACPI_THERMAL warn
-
-	# turbostat.c: /dev/cpu/%d/msr
-	collectd_plugin_kernel_linux turbostat X86_MSR warn
-
-	# vmem.c: /proc/vmstat
-	collectd_plugin_kernel_linux vmem VM_EVENT_COUNTERS warn
-
-	# vserver.c: /proc/virtual
-	collectd_plugin_kernel_linux vserver VSERVER warn
-
-	# uuid.c: /sys/hypervisor/uuid
-	collectd_plugin_kernel_linux uuid SYSFS info
-
-	# wireless.c: /proc/net/wireless
-	collectd_plugin_kernel_linux wireless "WIRELESS MAC80211 IEEE80211" warn
-
-	# zfs_arc.c: /proc/spl/kstat/zfs/arcstats
-	collectd_plugin_kernel_linux zfs_arc "SPL ZFS" warn
-}
-
-pkg_setup() {
-	if use kernel_linux; then
-		linux-info_pkg_setup
-
-		if linux_config_exists; then
-			einfo "Checking your linux kernel configuration:"
-			collectd_linux_kernel_checks
-		else
-			elog "Cannot find a linux kernel configuration. Continuing anyway."
-		fi
-	fi
-
-	if use collectd_plugins_java; then
-		java-pkg-opt-2_pkg_setup
-	fi
-
-	use collectd_plugins_python && python-single-r1_pkg_setup
-
-	enewgroup collectd
-	enewuser collectd -1 -1 /var/lib/collectd collectd
-}
-
-src_prepare() {
-	default
-
-	# There's some strange prefix handling in the default config file, resulting in
-	# paths like "/usr/var/..."
-	sed -i -e "s:@prefix@/var:/var:g" src/collectd.conf.in || die
-
-	# fix installdirs for perl, bug 444360
-	sed -i -e 's/INSTALL_BASE=$(DESTDIR)$(prefix) //' bindings/Makefile.am || die
-
-	# Adjust upstream's systemd unit
-	#   - Get rid of EnvironmentFile directive; These files don't exist on Gentoo!
-	#   - Add User=collectd to run collectd as user "collectd" per default
-	sed -i \
-		-e '/^EnvironmentFile=.*/d' \
-		-e '/^\[Service\]/aUser=collectd' \
-		contrib/systemd.${PN}.service || die
-
-	if use collectd_plugins_java; then
-		# Set javac -source and -target flags according to (R)DEPEND.
-		sed -i -e "s/\$(JAVAC)/\0 $(java-pkg_javac-args)/g" bindings/java/Makefile.am || die
-	fi
-
-	ebegin "Removing bundled libltdl"
-	rm -rf libltdl || die
-	eend 0
-
-	eautoreconf
-}
-
-src_configure() {
-	# Now come the lists of os-dependent plugins. Any plugin that is not listed anywhere here
-	# should work independent of the operating system.
-
-	local linux_plugins="barometer battery cpu cpufreq disk
-		drbd entropy ethstat hugepages interface iptables
-		ipvs irq ipc load memory md netlink nfs numa processes
-		serial swap tcpconns thermal turbostat users vmem wireless
-		zfc_arc"
-
-	local need_libstatgrab=0
-	local libstatgrab_plugins="cpu disk interface load memory swap users"
-	local bsd_plugins="cpu tcpconns ${libstatgrab_plugins} zfc_arc"
-
-	local darwin_plugins="apple_sensors battery cpu disk interface memory processes tcpconns"
-
-	local osdependent_plugins="${linux_plugins} ${bsd_plugins} ${darwin_plugins}"
-	local myos_plugins=""
-	if use kernel_linux; then
-		einfo "Enabling Linux plugins."
-		myos_plugins=${linux_plugins}
-	elif use kernel_FreeBSD; then
-		einfo "Enabling FreeBSD plugins."
-		myos_plugins=${bsd_plugins}
-	elif use kernel_Darwin; then
-		einfo "Enabling Darwin plugins."
-		myos_plugins=${darwin_plugins}
-	fi
-
-	local myconf="--disable-werror"
-
-	# Do we debug?
-	myconf+=" $(use_enable debug)"
-
-	# udev support?
-	# Required for smart plugin via REQUIRED_USE; Optional for disk plugin
-	if use udev; then
-		myconf+=" --with-libudev"
-	else
-		myconf+=" --without-libudev"
-	fi
-
-	local plugin
-
-	# Disable what needs to be disabled.
-	for plugin in ${COLLECTD_DISABLED_PLUGINS}; do
-		myconf+=" --disable-${plugin}"
-	done
-
-	# Set enable/disable for each single plugin.
-	for plugin in ${COLLECTD_ALL_PLUGINS}; do
-		if has ${plugin} ${osdependent_plugins}; then
-			# plugin is os-dependent ...
-			if has ${plugin} ${myos_plugins}; then
-				# ... and available in this os
-				myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
-				# ... must we link against libstatgrab? Bug #541518
-				if use kernel_FreeBSD && has ${plugin} ${libstatgrab_plugins}; then
-					einfo "We must link against libstatgrab due to plugin \"${plugin}\" ..."
-					need_libstatgrab=1
-				fi
-			else
-				# ... and NOT available in this os
-				if use collectd_plugins_${plugin}; then
-					ewarn "You try to enable the ${plugin} plugin, but it is not available for this"
-					ewarn "kernel. Disabling it automatically."
-				fi
-				myconf+=" --disable-${plugin}"
-			fi
-		elif [[ "${plugin}" = "collectd_plugins_perl" ]]; then
-			if use collectd_plugins_perl && ! use perl; then
-				ewarn "Perl plugin disabled as perl bindings disabled by -perl use flag"
-				myconf+= --disable-perl
-			else
-				myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
-			fi
-		else
-			myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
-		fi
-	done
-
-	if [ "${need_libstatgrab}" -eq 1 ]; then
-		myconf+=" --with-libstatgrab"
-	else
-		myconf+=" --without-libstatgrab"
-	fi
-
-	# JAVA_HOME is set by eclasses.
-	if use collectd_plugins_java; then
-		myconf+=" --with-java"
-	fi
-
-	# Need libiptc ONLY for iptables. If we try to use it otherwise bug 340109 happens.
-	# lots of libs are only needed for plugins, if they are disabled, also disable the lib
-	use collectd_plugins_iptables || myconf+=" --with-libiptc=no"
-	use collectd_plugins_openldap || myconf+=" --with-libldap=no"
-	use collectd_plugins_redis    || use collectd_plugins_write_redis || myconf+=" --with-libhiredis=no"
-	use collectd_plugins_smart    || myconf+=" --with-libatasmart=no"
-	use collectd_plugins_gps      || myconf+=" --with-libgps=no"
-
-	if use perl; then
-		myconf+=" --with-perl-bindings=INSTALLDIRS=vendor"
-	else
-		myconf+=" --without-perl-bindings"
-	fi
-
-	# No need for v5upgrade
-	myconf+=" --disable-target_v5upgrade"
-
-	# Python
-	if use collectd_plugins_python; then
-		myconf+=" --with-libpython=yes"
-		export PYTHON_CONFIG=$(python_get_PYTHON_CONFIG)
-	else
-		myconf+=" --with-libpython=no"
-	fi
-
-	# XFS support
-	myconf+=" $(use_enable xfs)"
-
-	# Finally, run econf.
-	KERNEL_DIR="${KERNEL_DIR}" econf --config-cache \
-		$(use_enable static-libs static) \
-		--localstatedir=/var ${myconf}
-}
-
-src_install() {
-	emake DESTDIR="${D%/}" install
-
-	perl_delete_localpod
-
-	find "${ED}"usr/ -name "*.la" -delete || die
-
-	if use collectd_plugins_java; then
-		java-pkg_regjar "${ED}"usr/share/${PN}/java/*.jar
-	fi
-
-	fowners root:collectd /etc/collectd.conf
-	fperms u=rw,g=r,o= /etc/collectd.conf
-
-	dodoc AUTHORS ChangeLog README
-
-	if use contrib ; then
-		insinto /usr/share/doc/${PF}
-		doins -r contrib
-	fi
-
-	keepdir /var/lib/${PN}
-	fowners collectd:collectd /var/lib/${PN}
-
-	newinitd "${FILESDIR}/${PN}.initd-r1" ${PN}
-	newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
-	systemd_newunit "contrib/systemd.${PN}.service" ${PN}.service
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}/${PN}.logrotate" ${PN}
-
-	sed -i -e 's:^.*PIDFile     "/var/run/collectd.pid":PIDFile     "/run/collectd/collectd.pid":' "${ED}"etc/collectd.conf || die
-	sed -i -e 's:^#	SocketFile "/var/run/collectd-unixsock":#	SocketFile "/run/collectd/collectd.socket":' "${ED}"etc/collectd.conf || die
-	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
-	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
-}
-
-pkg_postinst() {
-	if use filecaps; then
-		local caps=()
-		use collectd_plugins_ceph      && caps+=('CAP_DAC_OVERRIDE')
-		use collectd_plugins_exec      && caps+=('CAP_SETUID' 'CAP_SETGID')
-		use collectd_plugins_iptables  && caps+=('CAP_NET_ADMIN')
-		use collectd_plugins_filecount && caps+=('CAP_DAC_READ_SEARCH')
-
-		if use collectd_plugins_dns || use collectd_plugins_ping; then
-			caps+=('CAP_NET_RAW')
-		fi
-
-		if use collectd_plugins_turbostat || use collectd_plugins_smart; then
-			caps+=('CAP_SYS_RAWIO')
-		fi
-
-		if [ ${#caps[@]} -gt 0 ]; then
-			local caps_str=$(IFS=","; echo "${caps[*]}")
-			fcaps ${caps_str} usr/sbin/collectd
-			elog "Capabilities for ${EROOT}usr/sbin/collectd set to:"
-			elog "  ${caps_str}+EP"
-			elog
-
-			local systemd_unit="${EROOT}usr/lib/systemd/system/collectd.service"
-			if [[ -e "${systemd_unit}" ]]; then
-				caps_str="${caps[*]}"
-				sed -i -e "s:^CapabilityBoundingSet=.*:CapabilityBoundingSet=${caps_str}:" "${systemd_unit}" || \
-					die "Failed to set CapabilityBoundingSet in '${systemd_unit}'"
-
-				elog "CapabilityBoundingSet in '${systemd_unit}'"
-				elog "updated to match capabilities set above."
-				elog
-			fi
-		fi
-	fi
-
-	elog "Note: Collectd is only the collector."
-	elog "      You need to install 'data' sources (applications) locally or"
-	elog "      remotely on your own."
-
-	elog
-	elog "Collectd is configured to run as unprivileged user by default."
-	elog "You may want to revisit the configuration."
-	elog
-
-	if use collectd_plugins_email; then
-		ewarn "The email plug-in is deprecated. To submit statistics please use the unixsock plugin."
-	fi
-
-	if use collectd_plugins_smart; then
-		elog ""
-		elog "If you are using smart plugin and don't run collectd as root make sure"
-		elog "that the collectd user is allowed to access the disk you want to monitor"
-		elog "(can be done via udev rule for example) and that collectd has the required"
-		elog "capabilities set (which is the default when package was emerged with"
-		elog "'filecaps' USE flag set)."
-	fi
-
-	if use contrib; then
-		elog "The scripts in /usr/share/doc/${PF}/collection3 for generating graphs need dev-perl/HTML-Parser,"
-		elog "dev-perl/config-general, dev-perl/regexp-common, and net-analyzer/rrdtool[perl] to be installed."
-	fi
-}

diff --git a/app-admin/collectd/collectd-5.7.2.ebuild b/app-admin/collectd/collectd-5.7.2.ebuild
deleted file mode 100644
index a24d03f2715..00000000000
--- a/app-admin/collectd/collectd-5.7.2.ebuild
+++ /dev/null
@@ -1,536 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
-JAVA_PKG_OPT_USE="collectd_plugins_java"
-
-inherit autotools fcaps flag-o-matic java-pkg-opt-2 linux-info multilib perl-functions python-single-r1 systemd user
-
-DESCRIPTION="Collects system statistics and provides mechanisms to store the values"
-
-HOMEPAGE="https://collectd.org/"
-SRC_URI="${HOMEPAGE%/}/files/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~x86"
-IUSE="contrib debug java kernel_Darwin kernel_FreeBSD kernel_linux perl selinux static-libs udev xfs"
-
-# The plugin lists have to follow here since they extend IUSE
-
-# Plugins that don't build (e.g. dependencies not in Gentoo)
-# apple_sensors: Requires libIOKit
-# aquaero:       Requires aerotools-ng/libaquaero5
-# barometer:     Requires libi2c (i2c_smbus_read_i2c_block_data)
-# dpdkstat:      Requires dpdk
-# grpc:          Requires libgrpc
-# intel_rdt      Requires libpqos from intel-cmt-cat project
-# lpar:          Requires libperfstat (AIX only)
-# mic:           Requires Intel Many Integrated Core Architecture API
-#                (part of Intel's  Xeon Phi software)
-# netapp:        Requires libnetapp (http://communities.netapp.com/docs/DOC-1110)
-# pf:            Requires BSD packet filter
-# pinba:         Requires MySQL Pinba engine (http://pinba.org/)
-# tape:          Requires libkstat (Solaris only)
-# write_mongodb: https://github.com/collectd/collectd/issues/492
-# write_riemann: Requires riemann-c-client
-# xmms:          Requires libxmms (v1)
-# zone:          Solaris only...
-COLLECTD_IMPOSSIBLE_PLUGINS="apple_sensors aquaero barometer dpdkstat grpc
-	intel_rdt lpar mic netapp pf pinba tape write_mongodb
-	write_riemann xmms zone"
-
-# Plugins that have been (compile) tested and can be enabled via COLLECTD_PLUGINS
-COLLECTD_TESTED_PLUGINS="aggregation amqp apache apcups ascent battery bind
-	ceph cgroups chrony conntrack contextswitch cpu cpufreq cpusleep
-	csv curl curl_json curl_xml dbi df disk dns drbd email
-	entropy ethstat exec fhcount filecount fscache gmond gps hddtemp
-	hugepages interface ipc ipmi iptables ipvs irq java lua
-	load logfile log_logstash lvm madwifi match_empty_counter
-	match_hashed match_regex match_timediff match_value mbmon md
-	memcachec memcached memory modbus mqtt multimeter mysql netlink
-	network network nfs nginx notify_desktop notify_email notify_nagios
-	ntpd numa nut olsrd onewire openldap openvpn oracle perl ping
-	postgresql powerdns processes protocols python python redis
-	routeros rrdcached rrdtool sensors serial sigrok smart snmp statsd
-	swap syslog table tail tail_csv target_notification target_replace
-	target_scale target_set tcpconns teamspeak2 ted thermal threshold
-	tokyotyrant turbostat unixsock uptime users uuid varnish virt
-	vmem vserver wireless write_graphite write_http write_kafka
-	write_log write_prometheus write_redis write_sensu write_tsdb
-	xencpu zfs_arc zookeeper"
-
-COLLECTD_DISABLED_PLUGINS="${COLLECTD_IMPOSSIBLE_PLUGINS}"
-
-COLLECTD_ALL_PLUGINS=${COLLECTD_TESTED_PLUGINS}
-
-for plugin in ${COLLECTD_ALL_PLUGINS}; do
-	IUSE="${IUSE} collectd_plugins_${plugin}"
-done
-unset plugin
-
-# Now come the dependencies.
-
-COMMON_DEPEND="
-	dev-libs/libgcrypt:=
-	dev-libs/libltdl:0=
-	perl?					( dev-lang/perl:=[ithreads] )
-	udev?					( virtual/udev )
-	xfs?					( sys-fs/xfsprogs )
-	collectd_plugins_amqp?			( net-libs/rabbitmq-c )
-	collectd_plugins_apache?		( net-misc/curl:0= )
-	collectd_plugins_ascent?		( net-misc/curl:0= dev-libs/libxml2:2= )
-	collectd_plugins_bind?			( net-misc/curl:0= dev-libs/libxml2:2= )
-	collectd_plugins_ceph?			( dev-libs/yajl:= )
-	collectd_plugins_curl?			( net-misc/curl:0= )
-	collectd_plugins_curl_json?		( net-misc/curl:0= dev-libs/yajl:= )
-	collectd_plugins_curl_xml?		( net-misc/curl:0= dev-libs/libxml2:2= )
-	collectd_plugins_dbi?			( dev-db/libdbi )
-	collectd_plugins_dns?			( net-libs/libpcap )
-	collectd_plugins_gmond?			( sys-cluster/ganglia )
-	collectd_plugins_gps?			( sci-geosciences/gpsd:= )
-	collectd_plugins_ipmi?			( >=sys-libs/openipmi-2.0.16-r1 )
-	collectd_plugins_iptables?		( >=net-firewall/iptables-1.4.13:0= )
-	collectd_plugins_log_logstash?		( dev-libs/yajl:= )
-	collectd_plugins_lua?			( dev-lang/lua:0= )
-	collectd_plugins_lvm?			( sys-fs/lvm2 )
-	collectd_plugins_memcachec?		( dev-libs/libmemcached )
-	collectd_plugins_modbus?		( dev-libs/libmodbus )
-	collectd_plugins_mqtt?			( app-misc/mosquitto )
-	collectd_plugins_mysql?			( >=virtual/mysql-5.0 )
-	collectd_plugins_netlink?		( net-libs/libmnl )
-	collectd_plugins_nginx?			( net-misc/curl:0= )
-	collectd_plugins_notify_desktop?	( x11-libs/libnotify )
-	collectd_plugins_notify_email?		( net-libs/libesmtp )
-	collectd_plugins_nut?			( >=sys-power/nut-2.7.2-r2 )
-	collectd_plugins_openldap?		( net-nds/openldap )
-	collectd_plugins_onewire?		( >=sys-fs/owfs-3.1:= )
-	collectd_plugins_oracle?		( dev-db/oracle-instantclient-basic )
-	collectd_plugins_perl?			( dev-lang/perl:=[ithreads] )
-	collectd_plugins_ping?			( net-libs/liboping )
-	collectd_plugins_postgresql?		( dev-db/postgresql:= )
-	collectd_plugins_python?		( ${PYTHON_DEPS} )
-	collectd_plugins_redis?			( dev-libs/hiredis:= )
-	collectd_plugins_routeros?		( net-libs/librouteros )
-	collectd_plugins_rrdcached?		( net-analyzer/rrdtool:= )
-	collectd_plugins_rrdtool?		( net-analyzer/rrdtool:= )
-	collectd_plugins_sensors?		( sys-apps/lm_sensors )
-	collectd_plugins_sigrok?		( <sci-libs/libsigrok-0.4:= dev-libs/glib:2 )
-	collectd_plugins_smart?			( dev-libs/libatasmart )
-	collectd_plugins_snmp?			( net-analyzer/net-snmp )
-	collectd_plugins_tokyotyrant?		( net-misc/tokyotyrant )
-	collectd_plugins_varnish?		( www-servers/varnish )
-	collectd_plugins_virt?			( app-emulation/libvirt:= dev-libs/libxml2:2= )
-	collectd_plugins_write_http?		( net-misc/curl:0= dev-libs/yajl:= )
-	collectd_plugins_write_kafka?		( >=dev-libs/librdkafka-0.9.0.99:= dev-libs/yajl:= )
-	collectd_plugins_write_prometheus?	( >=dev-libs/protobuf-c-1.2.1-r1:= net-libs/libmicrohttpd:= )
-	collectd_plugins_write_redis?		( dev-libs/hiredis:= )
-	collectd_plugins_xencpu?		( app-emulation/xen-tools:= )
-
-	kernel_FreeBSD? (
-		collectd_plugins_disk?		( sys-libs/libstatgrab:= )
-		collectd_plugins_interface?	( sys-libs/libstatgrab:= )
-		collectd_plugins_load?		( sys-libs/libstatgrab:= )
-		collectd_plugins_memory?	( sys-libs/libstatgrab:= )
-		collectd_plugins_swap?		( sys-libs/libstatgrab:= )
-		collectd_plugins_users?		( sys-libs/libstatgrab:= )
-	)"
-
-# Enforcing !=sys-kernel/linux-headers-4.5 > due to #577846
-DEPEND="${COMMON_DEPEND}
-	collectd_plugins_iptables?		( || ( <=sys-kernel/linux-headers-4.4 >=sys-kernel/linux-headers-4.6 ) )
-	collectd_plugins_java?			( >=virtual/jdk-1.6 )
-	virtual/pkgconfig"
-
-RDEPEND="${COMMON_DEPEND}
-	collectd_plugins_java?			( >=virtual/jre-1.6 )
-	collectd_plugins_syslog?		( virtual/logger )
-	selinux?				( sec-policy/selinux-collectd )
-	!<sys-apps/openrc-0.18.2"
-
-REQUIRED_USE="
-	collectd_plugins_python?		( ${PYTHON_REQUIRED_USE} )
-	collectd_plugins_smart?			( udev )"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-5.6.0-gentoo.patch
-	"${FILESDIR}"/${PN}-5.7.2-issue-2443.patch
-)
-
-# @FUNCTION: collectd_plugin_kernel_linux
-# @DESCRIPTION:
-# USAGE: <plugin name> <kernel_options> <severity>
-# kernel_options is a list of kernel configurations options; the check tests whether at least
-#   one of them is enabled. If no, depending on the third argument an elog, ewarn, or eerror message
-#   is emitted.
-collectd_plugin_kernel_linux() {
-	local multi_opt opt
-	if has ${1} ${COLLECTD_ALL_PLUGINS}; then
-		if use collectd_plugins_${1}; then
-			for opt in ${2}; do
-				if linux_chkconfig_present ${opt}; then
-					return 0;
-				fi
-			done
-			multi_opt=${2//\ /\ or\ }
-			case ${3} in
-				(info)
-					elog "The ${1} plugin can use kernel features that are disabled now; enable ${multi_opt} in your kernel"
-				;;
-				(warn)
-					ewarn "The ${1} plugin uses kernel features that are disabled now; enable ${multi_opt} in your kernel"
-				;;
-				(error)
-					eerror "The ${1} plugin needs kernel features that are disabled now; enable ${multi_opt} in your kernel"
-				;;
-				(*)
-					die "function collectd_plugin_kernel_linux called with invalid third argument"
-				;;
-			esac
-		fi
-	fi
-}
-
-collectd_linux_kernel_checks() {
-	if ! linux_chkconfig_present PROC_FS; then
-		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"
-	fi
-
-	if ! linux_chkconfig_present SYSFS; then
-		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"
-	fi
-
-	# battery.c: /proc/pmu/battery_%i
-	# battery.c: /proc/acpi/battery
-	collectd_plugin_kernel_linux battery ACPI_BATTERY warn
-
-	# cgroups.c: /sys/fs/cgroup/
-	collectd_plugin_kernel_linux cgroups CGROUPS warn
-
-	# cpufreq.c: /sys/devices/system/cpu/cpu%d/cpufreq/
-	collectd_plugin_kernel_linux cpufreq SYSFS warn
-	collectd_plugin_kernel_linux cpufreq CPU_FREQ_STAT warn
-
-	# drbd.c: /proc/drbd
-	collectd_plugin_kernel_linux drbd BLK_DEV_DRBD warn
-
-	# conntrack.c: /proc/sys/net/netfilter/*
-	collectd_plugin_kernel_linux conntrack NETFILTER warn
-
-	# fscache.c: /proc/fs/fscache/stats
-	collectd_plugin_kernel_linux fscache FSCACHE warn
-
-	# nfs.c: /proc/net/rpc/nfs
-	# nfs.c: /proc/net/rpc/nfsd
-	collectd_plugin_kernel_linux nfs NFS_COMMON warn
-
-	# serial.c: /proc/tty/driver/serial
-	# serial.c: /proc/tty/driver/ttyS
-	collectd_plugin_kernel_linux serial SERIAL_CORE warn
-
-	# swap.c: /proc/meminfo
-	collectd_plugin_kernel_linux swap SWAP warn
-
-	# thermal.c: /proc/acpi/thermal_zone
-	# thermal.c: /sys/class/thermal
-	collectd_plugin_kernel_linux thermal ACPI_THERMAL warn
-
-	# turbostat.c: /dev/cpu/%d/msr
-	collectd_plugin_kernel_linux turbostat X86_MSR warn
-
-	# vmem.c: /proc/vmstat
-	collectd_plugin_kernel_linux vmem VM_EVENT_COUNTERS warn
-
-	# vserver.c: /proc/virtual
-	collectd_plugin_kernel_linux vserver VSERVER warn
-
-	# uuid.c: /sys/hypervisor/uuid
-	collectd_plugin_kernel_linux uuid SYSFS info
-
-	# wireless.c: /proc/net/wireless
-	collectd_plugin_kernel_linux wireless "WIRELESS MAC80211 IEEE80211" warn
-
-	# zfs_arc.c: /proc/spl/kstat/zfs/arcstats
-	collectd_plugin_kernel_linux zfs_arc "SPL ZFS" warn
-}
-
-pkg_setup() {
-	if use kernel_linux; then
-		linux-info_pkg_setup
-
-		if linux_config_exists; then
-			einfo "Checking your linux kernel configuration:"
-			collectd_linux_kernel_checks
-		else
-			elog "Cannot find a linux kernel configuration. Continuing anyway."
-		fi
-	fi
-
-	if use collectd_plugins_java; then
-		java-pkg-opt-2_pkg_setup
-	fi
-
-	use collectd_plugins_python && python-single-r1_pkg_setup
-
-	enewgroup collectd
-	enewuser collectd -1 -1 /var/lib/collectd collectd
-}
-
-src_prepare() {
-	default
-
-	# There's some strange prefix handling in the default config file, resulting in
-	# paths like "/usr/var/..."
-	sed -i -e "s:@prefix@/var:/var:g" src/collectd.conf.in || die
-
-	# fix installdirs for perl, bug 444360
-	sed -i -e 's/INSTALL_BASE=$(DESTDIR)$(prefix) //' bindings/Makefile.am || die
-
-	# Adjust upstream's systemd unit
-	#   - Get rid of EnvironmentFile directive; These files don't exist on Gentoo!
-	#   - Add User=collectd to run collectd as user "collectd" per default
-	sed -i \
-		-e '/^EnvironmentFile=.*/d' \
-		-e '/^\[Service\]/aUser=collectd' \
-		contrib/systemd.${PN}.service || die
-
-	if use collectd_plugins_java; then
-		# Set javac -source and -target flags according to (R)DEPEND.
-		sed -i -e "s/\$(JAVAC)/\0 $(java-pkg_javac-args)/g" bindings/java/Makefile.am || die
-	fi
-
-	ebegin "Removing bundled libltdl"
-	rm -rf libltdl || die
-	eend 0
-
-	eautoreconf
-}
-
-src_configure() {
-	# Now come the lists of os-dependent plugins. Any plugin that is not listed anywhere here
-	# should work independent of the operating system.
-
-	local linux_plugins="barometer battery cpu cpufreq disk
-		drbd entropy ethstat hugepages interface iptables
-		ipvs irq ipc load memory md netlink nfs numa processes
-		serial swap tcpconns thermal turbostat users vmem wireless
-		zfc_arc"
-
-	local need_libstatgrab=0
-	local libstatgrab_plugins="cpu disk interface load memory swap users"
-	local bsd_plugins="cpu tcpconns ${libstatgrab_plugins} zfc_arc"
-
-	local darwin_plugins="apple_sensors battery cpu disk interface memory processes tcpconns"
-
-	local osdependent_plugins="${linux_plugins} ${bsd_plugins} ${darwin_plugins}"
-	local myos_plugins=""
-	if use kernel_linux; then
-		einfo "Enabling Linux plugins."
-		myos_plugins=${linux_plugins}
-	elif use kernel_FreeBSD; then
-		einfo "Enabling FreeBSD plugins."
-		myos_plugins=${bsd_plugins}
-	elif use kernel_Darwin; then
-		einfo "Enabling Darwin plugins."
-		myos_plugins=${darwin_plugins}
-	fi
-
-	local myconf="--disable-werror"
-
-	# Do we debug?
-	myconf+=" $(use_enable debug)"
-
-	# udev support?
-	# Required for smart plugin via REQUIRED_USE; Optional for disk plugin
-	if use udev; then
-		myconf+=" --with-libudev"
-	else
-		myconf+=" --without-libudev"
-	fi
-
-	local plugin
-
-	# Disable what needs to be disabled.
-	for plugin in ${COLLECTD_DISABLED_PLUGINS}; do
-		myconf+=" --disable-${plugin}"
-	done
-
-	# Set enable/disable for each single plugin.
-	for plugin in ${COLLECTD_ALL_PLUGINS}; do
-		if has ${plugin} ${osdependent_plugins}; then
-			# plugin is os-dependent ...
-			if has ${plugin} ${myos_plugins}; then
-				# ... and available in this os
-				myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
-				# ... must we link against libstatgrab? Bug #541518
-				if use kernel_FreeBSD && has ${plugin} ${libstatgrab_plugins}; then
-					einfo "We must link against libstatgrab due to plugin \"${plugin}\" ..."
-					need_libstatgrab=1
-				fi
-			else
-				# ... and NOT available in this os
-				if use collectd_plugins_${plugin}; then
-					ewarn "You try to enable the ${plugin} plugin, but it is not available for this"
-					ewarn "kernel. Disabling it automatically."
-				fi
-				myconf+=" --disable-${plugin}"
-			fi
-		elif [[ "${plugin}" = "collectd_plugins_perl" ]]; then
-			if use collectd_plugins_perl && ! use perl; then
-				ewarn "Perl plugin disabled as perl bindings disabled by -perl use flag"
-				myconf+= --disable-perl
-			else
-				myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
-			fi
-		else
-			myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
-		fi
-	done
-
-	if [ "${need_libstatgrab}" -eq 1 ]; then
-		myconf+=" --with-libstatgrab"
-	else
-		myconf+=" --without-libstatgrab"
-	fi
-
-	# JAVA_HOME is set by eclasses.
-	if use collectd_plugins_java; then
-		myconf+=" --with-java"
-	fi
-
-	# Need libiptc ONLY for iptables. If we try to use it otherwise bug 340109 happens.
-	# lots of libs are only needed for plugins, if they are disabled, also disable the lib
-	use collectd_plugins_iptables || myconf+=" --with-libiptc=no"
-	use collectd_plugins_openldap || myconf+=" --with-libldap=no"
-	use collectd_plugins_redis    || use collectd_plugins_write_redis || myconf+=" --with-libhiredis=no"
-	use collectd_plugins_smart    || myconf+=" --with-libatasmart=no"
-	use collectd_plugins_gps      || myconf+=" --with-libgps=no"
-
-	if use perl; then
-		myconf+=" --with-perl-bindings=INSTALLDIRS=vendor"
-	else
-		myconf+=" --without-perl-bindings"
-	fi
-
-	# No need for v5upgrade
-	myconf+=" --disable-target_v5upgrade"
-
-	# Python
-	if use collectd_plugins_python; then
-		myconf+=" --with-libpython=yes"
-		export PYTHON_CONFIG=$(python_get_PYTHON_CONFIG)
-	else
-		myconf+=" --with-libpython=no"
-	fi
-
-	# XFS support
-	myconf+=" $(use_enable xfs)"
-
-	# Finally, run econf.
-	KERNEL_DIR="${KERNEL_DIR}" econf --config-cache \
-		$(use_enable static-libs static) \
-		--localstatedir=/var ${myconf}
-}
-
-src_install() {
-	emake DESTDIR="${D%/}" install
-
-	perl_delete_localpod
-
-	find "${ED}"usr/ -name "*.la" -delete || die
-
-	if use collectd_plugins_java; then
-		java-pkg_regjar "${ED}"usr/share/${PN}/java/*.jar
-	fi
-
-	fowners root:collectd /etc/collectd.conf
-	fperms u=rw,g=r,o= /etc/collectd.conf
-
-	dodoc AUTHORS ChangeLog README
-
-	if use contrib ; then
-		insinto /usr/share/doc/${PF}
-		doins -r contrib
-	fi
-
-	keepdir /var/lib/${PN}
-	fowners collectd:collectd /var/lib/${PN}
-
-	newinitd "${FILESDIR}/${PN}.initd-r1" ${PN}
-	newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
-	systemd_newunit "contrib/systemd.${PN}.service" ${PN}.service
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}/${PN}.logrotate" ${PN}
-
-	sed -i -e 's:^.*PIDFile     "/var/run/collectd.pid":PIDFile     "/run/collectd/collectd.pid":' "${ED}"etc/collectd.conf || die
-	sed -i -e 's:^#	SocketFile "/var/run/collectd-unixsock":#	SocketFile "/run/collectd/collectd.socket":' "${ED}"etc/collectd.conf || die
-	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
-	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
-}
-
-pkg_postinst() {
-	if use filecaps; then
-		local caps=()
-		use collectd_plugins_ceph      && caps+=('CAP_DAC_OVERRIDE')
-		use collectd_plugins_exec      && caps+=('CAP_SETUID' 'CAP_SETGID')
-		use collectd_plugins_iptables  && caps+=('CAP_NET_ADMIN')
-		use collectd_plugins_filecount && caps+=('CAP_DAC_READ_SEARCH')
-
-		if use collectd_plugins_dns || use collectd_plugins_ping; then
-			caps+=('CAP_NET_RAW')
-		fi
-
-		if use collectd_plugins_turbostat || use collectd_plugins_smart; then
-			caps+=('CAP_SYS_RAWIO')
-		fi
-
-		if [ ${#caps[@]} -gt 0 ]; then
-			local caps_str=$(IFS=","; echo "${caps[*]}")
-			fcaps ${caps_str} usr/sbin/collectd
-			elog "Capabilities for ${EROOT}usr/sbin/collectd set to:"
-			elog "  ${caps_str}+EP"
-			elog
-
-			local systemd_unit="${EROOT}usr/lib/systemd/system/collectd.service"
-			if [[ -e "${systemd_unit}" ]]; then
-				caps_str="${caps[*]}"
-				sed -i -e "s:^CapabilityBoundingSet=.*:CapabilityBoundingSet=${caps_str}:" "${systemd_unit}" || \
-					die "Failed to set CapabilityBoundingSet in '${systemd_unit}'"
-
-				elog "CapabilityBoundingSet in '${systemd_unit}'"
-				elog "updated to match capabilities set above."
-				elog
-			fi
-		fi
-	fi
-
-	elog "Note: Collectd is only the collector."
-	elog "      You need to install 'data' sources (applications) locally or"
-	elog "      remotely on your own."
-
-	elog
-	elog "Collectd is configured to run as unprivileged user by default."
-	elog "You may want to revisit the configuration."
-	elog
-
-	if use collectd_plugins_email; then
-		ewarn "The email plug-in is deprecated. To submit statistics please use the unixsock plugin."
-	fi
-
-	if use collectd_plugins_smart; then
-		elog ""
-		elog "If you are using smart plugin and don't run collectd as root make sure"
-		elog "that the collectd user is allowed to access the disk you want to monitor"
-		elog "(can be done via udev rule for example) and that collectd has the required"
-		elog "capabilities set (which is the default when package was emerged with"
-		elog "'filecaps' USE flag set)."
-	fi
-
-	if use contrib; then
-		elog "The scripts in /usr/share/doc/${PF}/collection3 for generating graphs need dev-perl/HTML-Parser,"
-		elog "dev-perl/config-general, dev-perl/regexp-common, and net-analyzer/rrdtool[perl] to be installed."
-	fi
-}

diff --git a/app-admin/collectd/files/collectd-5.6.2-CVE-2017-7401.patch b/app-admin/collectd/files/collectd-5.6.2-CVE-2017-7401.patch
deleted file mode 100644
index 7c23ac18d8f..00000000000
--- a/app-admin/collectd/files/collectd-5.6.2-CVE-2017-7401.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From f6be4f9b49b949b379326c3d7002476e6ce4f211 Mon Sep 17 00:00:00 2001
-From: Pavel Rochnyack <pavel2000@ngs.ru>
-Date: Mon, 3 Apr 2017 11:57:09 +0600
-Subject: [PATCH] network plugin: Fix endless loop DOS in parse_packet()
-
-When correct 'Signature part' is received by Collectd, configured without
-AuthFile option, condition for endless loop occurs due to missing increase
-of pointer to next unprocessed part.
-
-This is a forward-port of #2233.
-
-Fixes: CVE-2017-7401
-Closes: #2174
-Signed-off-by: Florian Forster <octo@collectd.org>
----
- src/network.c | 20 ++++++++++++--------
- 1 file changed, 12 insertions(+), 8 deletions(-)
-
-diff --git a/src/network.c b/src/network.c
-index be4c3ba..2ff09af 100644
---- a/src/network.c
-+++ b/src/network.c
-@@ -1003,14 +1003,6 @@ static int parse_part_sign_sha256(sockent_t *se, /* {{{ */
-   buffer_len = *ret_buffer_len;
-   buffer_offset = 0;
- 
--  if (se->data.server.userdb == NULL) {
--    c_complain(
--        LOG_NOTICE, &complain_no_users,
--        "network plugin: Received signed network packet but can't verify it "
--        "because no user DB has been configured. Will accept it.");
--    return (0);
--  }
--
-   /* Check if the buffer has enough data for this structure. */
-   if (buffer_len <= PART_SIGNATURE_SHA256_SIZE)
-     return (-ENOMEM);
-@@ -1027,6 +1019,18 @@ static int parse_part_sign_sha256(sockent_t *se, /* {{{ */
-     return (-1);
-   }
- 
-+  if (se->data.server.userdb == NULL) {
-+    c_complain(
-+        LOG_NOTICE, &complain_no_users,
-+        "network plugin: Received signed network packet but can't verify it "
-+        "because no user DB has been configured. Will accept it.");
-+
-+    *ret_buffer = buffer + pss_head_length;
-+    *ret_buffer_len -= pss_head_length;
-+
-+    return (0);
-+  }
-+
-   /* Copy the hash. */
-   BUFFER_READ(pss.hash, sizeof(pss.hash));
- 

diff --git a/app-admin/collectd/files/collectd-5.6.2-issue2303.patch b/app-admin/collectd/files/collectd-5.6.2-issue2303.patch
deleted file mode 100644
index 0fffcd6b922..00000000000
--- a/app-admin/collectd/files/collectd-5.6.2-issue2303.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From fd01cdd0546ccbbda7f4cf5db2d0ae28e1e770cd Mon Sep 17 00:00:00 2001
-From: Ruben Kerkhof <ruben@rubenkerkhof.com>
-Date: Tue, 30 May 2017 17:25:17 +0200
-Subject: [PATCH] Bind plugin: plug a few leaks
-
-Fixes: #2303
----
- src/bind.c | 10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/src/bind.c b/src/bind.c
-index 4860f1b604..853b9c26a3 100644
---- a/src/bind.c
-+++ b/src/bind.c
-@@ -526,8 +526,10 @@ static int bind_parse_generic_name_value(const char *xpath_expression, /* {{{ */
-         status = bind_xml_read_gauge(doc, counter, &value.gauge);
-       else
-         status = bind_xml_read_derive(doc, counter, &value.derive);
--      if (status != 0)
-+      if (status != 0) {
-+        xmlFree(name);
-         continue;
-+      }
- 
-       status = (*list_callback)(name, value, current_time, user_data);
-       if (status == 0)
-@@ -659,12 +661,16 @@ static int bind_parse_generic_name_attr_value_list(
-         status = bind_xml_read_gauge(doc, child, &value.gauge);
-       else
-         status = bind_xml_read_derive(doc, child, &value.derive);
--      if (status != 0)
-+      if (status != 0) {
-+        xmlFree(attr_name);
-         continue;
-+      }
- 
-       status = (*list_callback)(attr_name, value, current_time, user_data);
-       if (status == 0)
-         num_entries++;
-+
-+      xmlFree(attr_name);
-     }
-   }
- 

diff --git a/app-admin/collectd/files/collectd.confd-r1 b/app-admin/collectd/files/collectd.confd-r1
deleted file mode 100644
index 1ad78f839d8..00000000000
--- a/app-admin/collectd/files/collectd.confd-r1
+++ /dev/null
@@ -1,45 +0,0 @@
-# Distributed under the terms of the GNU General Public License v2
-
-# Nice value used to launch collectd, to change priority of the process. As
-# you usually we want to run it in background, a default of 5 is used.
-#
-#COLLECTD_NICELEVEL=5
-
-# Location of configuration file. Modify if you don't like the standard
-# one.
-#
-#COLLECTD_CONFIGFILE="/etc/collectd.conf"
-
-# File used to store the PID file. Usually you won't need to touch it.
-#
-#COLLECTD_PIDFILE="/run/collectd/collectd.pid"
-
-# User to run collectd as (default is collectd, change to root or give
-# collectd user appropriate privileges if you use one of the plugins that 
-# require it, as e.g. ping or iptables plugins)
-#
-#COLLECTD_USER="collectd"
-
-# The group is only important if you are using collectd's UNIX socket
-# in the default location (/run/collectd) because we will chown the
-# default location to COLLECTD_USER:COLLECTD_GROUP. The default value
-# is "collectd".
-#COLLECTD_GROUP="collectd"
-
-# You can use this configuration option to pass additional options to the
-# start-stop-daemon, see start-stop-daemon(8) for more details.
-# Per default we wait 1000ms after we have started the service to ensure
-# that the daemon is really up and running.
-#COLLECTD_SSDARGS="--wait 1000"
-
-# The termination timeout (start-stop-daemon parameter "retry") ensures
-# that the service will be terminated within a given time (25 + 5 seconds
-# per default) when you are stopping the service.
-#COLLECTD_TERMTIMEOUT="TERM/25/KILL/5"
-
-# Options to collectd
-# See collectd(8) for more details
-# Notes:
-# * Do not specify another PIDFILE but use the variable above to change the location
-# * Do not specify another CONFIGFILE but use the variable above to change the location
-#COLLECTD_OPTS=""

diff --git a/app-admin/collectd/files/collectd.initd-r1 b/app-admin/collectd/files/collectd.initd-r1
deleted file mode 100644
index e65f85a7bcb..00000000000
--- a/app-admin/collectd/files/collectd.initd-r1
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-COLLECTD_CONFIGFILE=${COLLECTD_CONFIGFILE:-"/etc/collectd.conf"}
-COLLECTD_PIDFILE=${COLLECTD_PIDFILE:-"/run/collectd/collectd.pid"}
-COLLECTD_NICELEVEL=${COLLECTD_NICELEVEL:-5}
-COLLECTD_USER=${COLLECTD_USER:-"collectd"}
-COLLECTD_GROUP=${COLLECTD_GROUP:-"collectd"}
-COLLECTD_SSDARGS=${COLLECTD_SSDARGS:-"--wait 1000"}
-COLLECTD_TERMTIMEOUT=${COLLECTD_TERMTIMEOUT:-"TERM/25/KILL/5"}
-COLLECTD_OPTS=${COLLECTD_OPTS:-""}
-
-command="/usr/sbin/collectd"
-command_args="${COLLECTD_OPTS} -C \"${COLLECTD_CONFIGFILE}\" -P \"${COLLECTD_PIDFILE}\""
-start_stop_daemon_args="${COLLECTD_SSDARGS} --nice ${COLLECTD_NICELEVEL} --user ${COLLECTD_USER}:${COLLECTD_GROUP}"
-pidfile="${COLLECTD_PIDFILE}"
-retry="${COLLECTD_TERMTIMEOUT}"
-
-extra_commands="configtest"
-description_configtest="Run collectd's internal config check."
-
-required_files="\"${COLLECTD_CONFIGFILE}\""
-
-depend() {
-	use dns
-}
-
-_checkconfig() {
-	if [ $(sed '/^$\|^#/d' "${COLLECTD_CONFIGFILE}" | grep 'LoadPlugin[[:space:]]\+oracle' | wc -l) -ge 1 ] ; then
-		if [ -e /etc/env.d/50oracle-instantclient-basic ] ; then
-			. /etc/env.d/50oracle-instantclient-basic
-			export ORACLE_HOME
-			export TNS_ADMIN
-		else
-			ewarn "Unable to set Oracle environment, Oracle plugin wont work"
-		fi
-	fi
-
-	local test_command="${command} -t -C \"${COLLECTD_CONFIGFILE}\""
-
-	eval ${test_command} 1>/dev/null 2>&1
-	ret=$?
-	if [ $ret -ne 0 ]; then
-		eerror "${SVCNAME} has detected an error in your configuration:"
-		eval ${test_command}
-	fi
-
-	return $ret
-}
-
-configtest() {
-	ebegin "Checking ${SVCNAME} configuration"
-	_checkconfig
-	eend $?
-}
-
-start_pre() {
-	if [ "${RC_CMD}" != "restart" ]; then
-		configtest || return 1
-	fi
-
-	checkpath --directory --mode 0770 --owner ${COLLECTD_USER}:${COLLECTD_GROUP} "$(dirname "${COLLECTD_PIDFILE}")"
-}
-
-stop_pre() {
-	if [ "${RC_CMD}" = "restart" ]; then
-		configtest || return 1
-	fi
-}
-
-stop_post() {
-	if [ -f "${COLLECTD_PIDFILE}" ]; then
-		vebegin "Removing stale PID file"
-		rm --force "${COLLECTD_PIDFILE}"
-		veend $?
-	fi
-}


^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-admin/collectd/files/, app-admin/collectd/
@ 2018-03-03 16:43 Thomas Deutschmann
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Deutschmann @ 2018-03-03 16:43 UTC (permalink / raw
  To: gentoo-commits

commit:     e369f0a8f5cc98cb2ebced162e3327a1bf9b987d
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Mar  3 16:39:09 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Mar  3 16:43:49 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e369f0a8

app-admin/collectd: Fix building against >=www-servers/varnish-5.2

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 app-admin/collectd/collectd-5.7.2-r1.ebuild        |    1 +
 .../files/collectd-5.7.2-varnish-5.2+.patch        | 1018 ++++++++++++++++++++
 2 files changed, 1019 insertions(+)

diff --git a/app-admin/collectd/collectd-5.7.2-r1.ebuild b/app-admin/collectd/collectd-5.7.2-r1.ebuild
index a040f5e72fc..c2cd8a8283e 100644
--- a/app-admin/collectd/collectd-5.7.2-r1.ebuild
+++ b/app-admin/collectd/collectd-5.7.2-r1.ebuild
@@ -158,6 +158,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-5.6.0-gentoo.patch
 	"${FILESDIR}"/${PN}-5.7.2-issue-2443.patch
 	"${FILESDIR}"/${PN}-5.7.2-CVE-2017-16820.patch
+	"${FILESDIR}"/${PN}-5.7.2-varnish-5.2+.patch
 )
 
 # @FUNCTION: collectd_plugin_kernel_linux

diff --git a/app-admin/collectd/files/collectd-5.7.2-varnish-5.2+.patch b/app-admin/collectd/files/collectd-5.7.2-varnish-5.2+.patch
new file mode 100644
index 00000000000..60830042fa6
--- /dev/null
+++ b/app-admin/collectd/files/collectd-5.7.2-varnish-5.2+.patch
@@ -0,0 +1,1018 @@
+Fix building against >=www-servers/varnish-5.2
+
+https://github.com/collectd/collectd/commit/3c42182e912e3d634fe8c4f6a636053959fcde49
+https://github.com/collectd/collectd/commit/3ab73ae8b23b9816fb69fde630c5ad667aa1e09f
+https://github.com/collectd/collectd/commit/7978b43670472a000831f7ff37a6a30771a6ee6f
+https://github.com/collectd/collectd/commit/68123637814ea09efff5bf56f3209eefbe41287a
+https://github.com/collectd/collectd/commit/8192bfcf975ff6275505c99193a23e2a066927d0
+https://github.com/collectd/collectd/commit/c1e2bf3d2bfa1a1da3a6b42186577f635795e7f8
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -5614,13 +5614,18 @@ then
+ 
+ 	CPPFLAGS="$CPPFLAGS $with_libvarnish_cflags"
+ 
+-	AC_CHECK_HEADERS(vapi/vsc.h,
+-		[AC_DEFINE([HAVE_VARNISH_V4], [1], [Varnish 4 API support])],
+-		[AC_CHECK_HEADERS(vsc.h,
+-			[AC_DEFINE([HAVE_VARNISH_V3], [1], [Varnish 3 API support])],
+-			[AC_CHECK_HEADERS(varnishapi.h,
+-				[AC_DEFINE([HAVE_VARNISH_V2], [1], [Varnish 2 API support])],
+-				[with_libvarnish="no (found none of the varnish header files)"])])])
++	$PKG_CONFIG --atleast-version=5.2 'varnishapi' 2>/dev/null
++	if test $? -eq 0; then
++		AC_DEFINE([HAVE_VARNISH_V5], [1], [Varnish 5 API support])
++	else
++		AC_CHECK_HEADERS(vapi/vsc.h,
++			[AC_DEFINE([HAVE_VARNISH_V4], [1], [Varnish 4 API support])],
++			[AC_CHECK_HEADERS(vsc.h,
++				[AC_DEFINE([HAVE_VARNISH_V3], [1], [Varnish 3 API support])],
++				[AC_CHECK_HEADERS(varnishapi.h,
++					[AC_DEFINE([HAVE_VARNISH_V2], [1], [Varnish 2 API support])],
++					[with_libvarnish="no (found none of the varnish header files)"])])])
++	fi
+ 
+ 	CPPFLAGS="$SAVE_CPPFLAGS"
+ fi
+--- a/src/varnish.c
++++ b/src/varnish.c
+@@ -21,6 +21,7 @@
+  *   Jérôme Renard <jerome.renard at gmail.com>
+  *   Marc Fournier <marc.fournier at camptocamp.com>
+  *   Florian octo Forster <octo at collectd.org>
++ *   Denes Matetelki <dmatetelki at varnish-software.com>
+  **/
+ 
+ #include "collectd.h"
+@@ -28,7 +29,7 @@
+ #include "common.h"
+ #include "plugin.h"
+ 
+-#if HAVE_VARNISH_V4
++#if HAVE_VARNISH_V4 || HAVE_VARNISH_V5
+ #include <vapi/vsc.h>
+ #include <vapi/vsm.h>
+ typedef struct VSC_C_main c_varnish_stats_t;
+@@ -69,17 +70,25 @@ struct user_config_s {
+   _Bool collect_sms;
+ #if HAVE_VARNISH_V2
+   _Bool collect_sm;
++#endif
++#if HAVE_VARNISH_V2 || HAVE_VARNISH_V4 || HAVE_VARNISH_V5
+   _Bool collect_sma;
+ #endif
+   _Bool collect_struct;
+   _Bool collect_totals;
+-#if HAVE_VARNISH_V3 || HAVE_VARNISH_V4
++#if HAVE_VARNISH_V3 || HAVE_VARNISH_V4 || HAVE_VARNISH_V5
+   _Bool collect_uptime;
+ #endif
+   _Bool collect_vcl;
+   _Bool collect_workers;
+-#if HAVE_VARNISH_V4
++#if HAVE_VARNISH_V4 || HAVE_VARNISH_V5
+   _Bool collect_vsm;
++  _Bool collect_lck;
++  _Bool collect_mempool;
++  _Bool collect_mgt;
++  _Bool collect_smf;
++  _Bool collect_vbe;
++  _Bool collect_mse;
+ #endif
+ };
+ typedef struct user_config_s user_config_t; /* }}} */
+@@ -98,60 +107,70 @@ static int varnish_submit(const char *plugin_instance, /* {{{ */
+ 
+   if (plugin_instance == NULL)
+     plugin_instance = "default";
+-  ssnprintf(vl.plugin_instance, sizeof(vl.plugin_instance), "%s-%s",
+-            plugin_instance, category);
++  snprintf(vl.plugin_instance, sizeof(vl.plugin_instance), "%s-%s",
++           plugin_instance, category);
+ 
+   sstrncpy(vl.type, type, sizeof(vl.type));
+ 
+   if (type_instance != NULL)
+     sstrncpy(vl.type_instance, type_instance, sizeof(vl.type_instance));
+ 
+-  return (plugin_dispatch_values(&vl));
++  return plugin_dispatch_values(&vl);
+ } /* }}} int varnish_submit */
+ 
+ static int varnish_submit_gauge(const char *plugin_instance, /* {{{ */
+                                 const char *category, const char *type,
+                                 const char *type_instance,
+                                 uint64_t gauge_value) {
+-  return (varnish_submit(plugin_instance, category, type, type_instance,
+-                         (value_t){.gauge = (gauge_t)gauge_value}));
++  return varnish_submit(plugin_instance, category, type, type_instance,
++                        (value_t){
++                            .gauge = (gauge_t)gauge_value,
++                        });
+ } /* }}} int varnish_submit_gauge */
+ 
+ static int varnish_submit_derive(const char *plugin_instance, /* {{{ */
+                                  const char *category, const char *type,
+                                  const char *type_instance,
+                                  uint64_t derive_value) {
+-  return (varnish_submit(plugin_instance, category, type, type_instance,
+-                         (value_t){.derive = (derive_t)derive_value}));
++  return varnish_submit(plugin_instance, category, type, type_instance,
++                        (value_t){
++                            .derive = (derive_t)derive_value,
++                        });
+ } /* }}} int varnish_submit_derive */
+ 
+-#if HAVE_VARNISH_V3 || HAVE_VARNISH_V4
++#if HAVE_VARNISH_V3 || HAVE_VARNISH_V4 || HAVE_VARNISH_V5
+ static int varnish_monitor(void *priv,
+                            const struct VSC_point *const pt) /* {{{ */
+ {
+   uint64_t val;
+   const user_config_t *conf;
+-  const char *class;
+   const char *name;
+ 
+   if (pt == NULL)
+-    return (0);
++    return 0;
+ 
+   conf = priv;
+ 
+-#if HAVE_VARNISH_V4
+-  class = pt->section->fantom->type;
+-  name = pt->desc->name;
++#if HAVE_VARNISH_V5
++  char namebuff[DATA_MAX_NAME_LEN];
+ 
+-  if (strcmp(class, "MAIN") != 0)
+-    return (0);
++  char const *c = strrchr(pt->name, '.');
++  if (c == NULL) {
++    return EINVAL;
++  }
++  sstrncpy(namebuff, c + 1, sizeof(namebuff));
++  name = namebuff;
++
++#elif HAVE_VARNISH_V4
++  if (strcmp(pt->section->fantom->type, "MAIN") != 0)
++    return 0;
+ 
++  name = pt->desc->name;
+ #elif HAVE_VARNISH_V3
+-  class = pt->class;
+-  name = pt->name;
++  if (strcmp(pt->class, "") != 0)
++    return 0;
+ 
+-  if (strcmp(class, "") != 0)
+-    return (0);
++  name = pt->name;
+ #endif
+ 
+   val = *(const volatile uint64_t *)pt->ptr;
+@@ -178,6 +197,14 @@ static int varnish_monitor(void *priv,
+     else if (strcmp(name, "client_req") == 0)
+       return varnish_submit_derive(conf->instance, "connections", "connections",
+                                    "received", val);
++#if HAVE_VARNISH_V4 || HAVE_VARNISH_V5
++    else if (strcmp(name, "client_req_400") == 0)
++      return varnish_submit_derive(conf->instance, "connections", "connections",
++                                   "error_400", val);
++    else if (strcmp(name, "client_req_417") == 0)
++      return varnish_submit_derive(conf->instance, "connections", "connections",
++                                   "error_417", val);
++#endif
+   }
+ 
+ #ifdef HAVE_VARNISH_V3
+@@ -207,6 +234,9 @@ static int varnish_monitor(void *priv,
+     else if (strcmp(name, "esi_warnings") == 0)
+       return varnish_submit_derive(conf->instance, "esi", "total_operations",
+                                    "warning", val);
++    else if (strcmp(name, "esi_maxdepth") == 0)
++      return varnish_submit_derive(conf->instance, "esi", "total_operations",
++                                   "max_depth", val);
+   }
+ 
+   if (conf->collect_backend) {
+@@ -282,6 +312,20 @@ static int varnish_monitor(void *priv,
+     else if (strcmp(name, "fetch_304") == 0)
+       return varnish_submit_derive(conf->instance, "fetch", "http_requests",
+                                    "no_body_304", val);
++#if HAVE_VARNISH_V4 || HAVE_VARNISH_V5
++    else if (strcmp(name, "fetch_no_thread") == 0)
++      return varnish_submit_derive(conf->instance, "fetch", "http_requests",
++                                   "no_thread", val);
++    else if (strcmp(name, "fetch_none") == 0)
++      return varnish_submit_derive(conf->instance, "fetch", "http_requests",
++                                   "none", val);
++    else if (strcmp(name, "busy_sleep") == 0)
++      return varnish_submit_derive(conf->instance, "fetch", "http_requests",
++                                   "busy_sleep", val);
++    else if (strcmp(name, "busy_wakeup") == 0)
++      return varnish_submit_derive(conf->instance, "fetch", "http_requests",
++                                   "busy_wakeup", val);
++#endif
+   }
+ 
+   if (conf->collect_hcb) {
+@@ -327,6 +371,14 @@ static int varnish_monitor(void *priv,
+     else if (strcmp(name, "n_objoverflow") == 0)
+       return varnish_submit_derive(conf->instance, "objects", "total_objects",
+                                    "workspace_overflow", val);
++#if HAVE_VARNISH_V4 || HAVE_VARNISH_V5
++    else if (strcmp(name, "exp_mailed") == 0)
++      return varnish_submit_gauge(conf->instance, "struct", "objects",
++                                  "exp_mailed", val);
++    else if (strcmp(name, "exp_received") == 0)
++      return varnish_submit_gauge(conf->instance, "struct", "objects",
++                                  "exp_received", val);
++#endif
+   }
+ 
+ #if HAVE_VARNISH_V3
+@@ -351,7 +403,7 @@ static int varnish_monitor(void *priv,
+                                    "duplicate", val);
+   }
+ #endif
+-#if HAVE_VARNISH_V4
++#if HAVE_VARNISH_V4 || HAVE_VARNISH_V5
+   if (conf->collect_ban) {
+     if (strcmp(name, "bans") == 0)
+       return varnish_submit_derive(conf->instance, "ban", "total_operations",
+@@ -377,6 +429,33 @@ static int varnish_monitor(void *priv,
+     else if (strcmp(name, "bans_dups") == 0)
+       return varnish_submit_derive(conf->instance, "ban", "total_operations",
+                                    "duplicate", val);
++    else if (strcmp(name, "bans_tested") == 0)
++      return varnish_submit_derive(conf->instance, "ban", "total_operations",
++                                   "tested", val);
++    else if (strcmp(name, "bans_lurker_contention") == 0)
++      return varnish_submit_derive(conf->instance, "ban", "total_operations",
++                                   "lurker_contention", val);
++    else if (strcmp(name, "bans_lurker_obj_killed") == 0)
++      return varnish_submit_derive(conf->instance, "ban", "total_operations",
++                                   "lurker_obj_killed", val);
++    else if (strcmp(name, "bans_lurker_tested") == 0)
++      return varnish_submit_derive(conf->instance, "ban", "total_operations",
++                                   "lurker_tested", val);
++    else if (strcmp(name, "bans_lurker_tests_tested") == 0)
++      return varnish_submit_derive(conf->instance, "ban", "total_operations",
++                                   "lurker_tests_tested", val);
++    else if (strcmp(name, "bans_obj_killed") == 0)
++      return varnish_submit_derive(conf->instance, "ban", "total_operations",
++                                   "obj_killed", val);
++    else if (strcmp(name, "bans_persisted_bytes") == 0)
++      return varnish_submit_derive(conf->instance, "ban", "total_bytes",
++                                   "persisted_bytes", val);
++    else if (strcmp(name, "bans_persisted_fragmentation") == 0)
++      return varnish_submit_derive(conf->instance, "ban", "total_bytes",
++                                   "persisted_fragmentation", val);
++    else if (strcmp(name, "bans_tests_tested") == 0)
++      return varnish_submit_derive(conf->instance, "ban", "total_operations",
++                                   "tests_tested", val);
+   }
+ #endif
+ 
+@@ -411,6 +490,15 @@ static int varnish_monitor(void *priv,
+     else if (strcmp(name, "sess_herd") == 0)
+       return varnish_submit_derive(conf->instance, "session",
+                                    "total_operations", "herd", val);
++#if HAVE_VARNISH_V4 || HAVE_VARNISH_V5
++    else if (strcmp(name, "sess_closed_err") == 0)
++      return varnish_submit_derive(conf->instance, "session",
++                                   "total_operations", "closed_err", val);
++    else if (strcmp(name, "sess_dropped") == 0)
++      return varnish_submit_derive(conf->instance, "session",
++                                   "total_operations", "dropped_for_thread",
++                                   val);
++#endif
+   }
+ 
+   if (conf->collect_shm) {
+@@ -510,12 +598,18 @@ static int varnish_monitor(void *priv,
+     else if (strcmp(name, "s_req_bodybytes") == 0)
+       return varnish_submit_derive(conf->instance, "totals", "total_bytes",
+                                    "req_body", val);
++    else if (strcmp(name, "s_req_protobytes") == 0)
++      return varnish_submit_derive(conf->instance, "totals", "total_bytes",
++                                   "req_proto", val);
+     else if (strcmp(name, "s_resp_hdrbytes") == 0)
+       return varnish_submit_derive(conf->instance, "totals", "total_bytes",
+                                    "resp_header", val);
+     else if (strcmp(name, "s_resp_bodybytes") == 0)
+       return varnish_submit_derive(conf->instance, "totals", "total_bytes",
+                                    "resp_body", val);
++    else if (strcmp(name, "s_resp_protobytes") == 0)
++      return varnish_submit_derive(conf->instance, "totals", "total_bytes",
++                                   "resp_proto", val);
+     else if (strcmp(name, "s_pipe_hdrbytes") == 0)
+       return varnish_submit_derive(conf->instance, "totals", "total_bytes",
+                                    "pipe_header", val);
+@@ -580,8 +674,8 @@ static int varnish_monitor(void *priv,
+       return varnish_submit_derive(conf->instance, "workers", "total_threads",
+                                    "dropped", val);
+     else if (strcmp(name, "thread_queue_len") == 0)
+-      return varnish_submit_derive(conf->instance, "workers", "queue_length",
+-                                   "threads", val);
++      return varnish_submit_gauge(conf->instance, "workers", "queue_length",
++                                  "threads", val);
+     else if (strcmp(name, "n_wrk") == 0)
+       return varnish_submit_gauge(conf->instance, "workers", "threads",
+                                   "worker", val);
+@@ -609,9 +703,17 @@ static int varnish_monitor(void *priv,
+     else if (strcmp(name, "n_wrk_lqueue") == 0)
+       return varnish_submit_derive(conf->instance, "workers", "total_requests",
+                                    "queue_length", val);
++#if HAVE_VARNISH_V4 || HAVE_VARNISH_V5
++    else if (strcmp(name, "pools") == 0)
++      return varnish_submit_gauge(conf->instance, "workers", "pools", "pools",
++                                  val);
++    else if (strcmp(name, "busy_killed") == 0)
++      return varnish_submit_derive(conf->instance, "workers", "http_requests",
++                                   "busy_killed", val);
++#endif
+   }
+ 
+-#if HAVE_VARNISH_V4
++#if HAVE_VARNISH_V4 || HAVE_VARNISH_V5
+   if (conf->collect_vsm) {
+     if (strcmp(name, "vsm_free") == 0)
+       return varnish_submit_gauge(conf->instance, "vsm", "bytes", "free", val);
+@@ -627,9 +729,262 @@ static int varnish_monitor(void *priv,
+       return varnish_submit_derive(conf->instance, "vsm", "total_bytes",
+                                    "overflowed", val);
+   }
++
++  if (conf->collect_vbe) {
++    /* @TODO figure out the collectd type for bitmap
++    if (strcmp(name, "happy") == 0)
++      return varnish_submit_derive(conf->instance, "vbe",
++                                   "bitmap", "happy_hprobes", val);
++    */
++    if (strcmp(name, "bereq_hdrbytes") == 0)
++      return varnish_submit_derive(conf->instance, "vbe", "total_bytes",
++                                   "bereq_hdrbytes", val);
++    else if (strcmp(name, "bereq_bodybytes") == 0)
++      return varnish_submit_derive(conf->instance, "vbe", "total_bytes",
++                                   "bereq_bodybytes", val);
++    else if (strcmp(name, "bereq_protobytes") == 0)
++      return varnish_submit_derive(conf->instance, "vbe", "total_bytes",
++                                   "bereq_protobytes", val);
++    else if (strcmp(name, "beresp_hdrbytes") == 0)
++      return varnish_submit_derive(conf->instance, "vbe", "total_bytes",
++                                   "beresp_hdrbytes", val);
++    else if (strcmp(name, "beresp_bodybytes") == 0)
++      return varnish_submit_derive(conf->instance, "vbe", "total_bytes",
++                                   "beresp_bodybytes", val);
++    else if (strcmp(name, "beresp_protobytes") == 0)
++      return varnish_submit_derive(conf->instance, "vbe", "total_bytes",
++                                   "beresp_protobytes", val);
++    else if (strcmp(name, "pipe_hdrbytes") == 0)
++      return varnish_submit_derive(conf->instance, "vbe", "total_bytes",
++                                   "pipe_hdrbytes", val);
++    else if (strcmp(name, "pipe_out") == 0)
++      return varnish_submit_derive(conf->instance, "vbe", "total_bytes",
++                                   "pipe_out", val);
++    else if (strcmp(name, "pipe_in") == 0)
++      return varnish_submit_derive(conf->instance, "vbe", "total_bytes",
++                                   "pipe_in", val);
++    else if (strcmp(name, "conn") == 0)
++      return varnish_submit_derive(conf->instance, "vbe", "connections",
++                                   "c_conns", val);
++    else if (strcmp(name, "req") == 0)
++      return varnish_submit_derive(conf->instance, "vbe", "http_requests",
++                                   "b_reqs", val);
++  }
++
++  /* All Stevedores support these counters */
++  if (conf->collect_sma || conf->collect_smf || conf->collect_mse) {
++
++    char category[4];
++    if (conf->collect_sma)
++      strncpy(category, "sma", 4);
++    else if (conf->collect_smf)
++      strncpy(category, "smf", 4);
++    else
++      strncpy(category, "mse", 4);
++
++    if (strcmp(name, "c_req") == 0)
++      return varnish_submit_derive(conf->instance, category, "total_operations",
++                                   "alloc_req", val);
++    else if (strcmp(name, "c_fail") == 0)
++      return varnish_submit_derive(conf->instance, category, "total_operations",
++                                   "alloc_fail", val);
++    else if (strcmp(name, "c_bytes") == 0)
++      return varnish_submit_derive(conf->instance, category, "total_bytes",
++                                   "bytes_allocated", val);
++    else if (strcmp(name, "c_freed") == 0)
++      return varnish_submit_derive(conf->instance, category, "total_bytes",
++                                   "bytes_freed", val);
++    else if (strcmp(name, "g_alloc") == 0)
++      return varnish_submit_derive(conf->instance, category, "total_operations",
++                                   "alloc_outstanding", val);
++    else if (strcmp(name, "g_bytes") == 0)
++      return varnish_submit_gauge(conf->instance, category, "bytes",
++                                  "bytes_outstanding", val);
++    else if (strcmp(name, "g_space") == 0)
++      return varnish_submit_gauge(conf->instance, category, "bytes",
++                                  "bytes_available", val);
++  }
++
++  /* No SMA specific counters */
++
++  if (conf->collect_smf) {
++    if (strcmp(name, "g_smf") == 0)
++      return varnish_submit_gauge(conf->instance, "smf", "objects",
++                                  "n_struct_smf", val);
++    else if (strcmp(name, "g_smf_frag") == 0)
++      return varnish_submit_gauge(conf->instance, "smf", "objects",
++                                  "n_small_free_smf", val);
++    else if (strcmp(name, "g_smf_large") == 0)
++      return varnish_submit_gauge(conf->instance, "smf", "objects",
++                                  "n_large_free_smf", val);
++  }
++
++  if (conf->collect_mgt) {
++    if (strcmp(name, "uptime") == 0)
++      return varnish_submit_gauge(conf->instance, "mgt", "uptime",
++                                  "mgt_proc_uptime", val);
++    else if (strcmp(name, "child_start") == 0)
++      return varnish_submit_derive(conf->instance, "mgt", "total_operations",
++                                   "child_start", val);
++    else if (strcmp(name, "child_exit") == 0)
++      return varnish_submit_derive(conf->instance, "mgt", "total_operations",
++                                   "child_exit", val);
++    else if (strcmp(name, "child_stop") == 0)
++      return varnish_submit_derive(conf->instance, "mgt", "total_operations",
++                                   "child_stop", val);
++    else if (strcmp(name, "child_died") == 0)
++      return varnish_submit_derive(conf->instance, "mgt", "total_operations",
++                                   "child_died", val);
++    else if (strcmp(name, "child_dump") == 0)
++      return varnish_submit_derive(conf->instance, "mgt", "total_operations",
++                                   "child_dump", val);
++    else if (strcmp(name, "child_panic") == 0)
++      return varnish_submit_derive(conf->instance, "mgt", "total_operations",
++                                   "child_panic", val);
++  }
++
++  if (conf->collect_lck) {
++    if (strcmp(name, "creat") == 0)
++      return varnish_submit_gauge(conf->instance, "lck", "objects", "created",
++                                  val);
++    else if (strcmp(name, "destroy") == 0)
++      return varnish_submit_gauge(conf->instance, "lck", "objects", "destroyed",
++                                  val);
++    else if (strcmp(name, "locks") == 0)
++      return varnish_submit_derive(conf->instance, "lck", "total_operations",
++                                   "lock_ops", val);
++  }
++
++  if (conf->collect_mempool) {
++    if (strcmp(name, "live") == 0)
++      return varnish_submit_gauge(conf->instance, "mempool", "objects",
++                                  "in_use", val);
++    else if (strcmp(name, "pool") == 0)
++      return varnish_submit_gauge(conf->instance, "mempool", "objects",
++                                  "in_pool", val);
++    else if (strcmp(name, "sz_wanted") == 0)
++      return varnish_submit_gauge(conf->instance, "mempool", "bytes",
++                                  "size_requested", val);
++    else if (strcmp(name, "sz_actual") == 0)
++      return varnish_submit_gauge(conf->instance, "mempool", "bytes",
++                                  "size_allocated", val);
++    else if (strcmp(name, "allocs") == 0)
++      return varnish_submit_derive(conf->instance, "mempool",
++                                   "total_operations", "allocations", val);
++    else if (strcmp(name, "frees") == 0)
++      return varnish_submit_derive(conf->instance, "mempool",
++                                   "total_operations", "frees", val);
++    else if (strcmp(name, "recycle") == 0)
++      return varnish_submit_gauge(conf->instance, "mempool", "objects",
++                                  "recycled", val);
++    else if (strcmp(name, "timeout") == 0)
++      return varnish_submit_gauge(conf->instance, "mempool", "objects",
++                                  "timed_out", val);
++    else if (strcmp(name, "toosmall") == 0)
++      return varnish_submit_gauge(conf->instance, "mempool", "objects",
++                                  "too_small", val);
++    else if (strcmp(name, "surplus") == 0)
++      return varnish_submit_gauge(conf->instance, "mempool", "objects",
++                                  "surplus", val);
++    else if (strcmp(name, "randry") == 0)
++      return varnish_submit_gauge(conf->instance, "mempool", "objects",
++                                  "ran_dry", val);
++  }
++
++  if (conf->collect_mse) {
++    if (strcmp(name, "c_full") == 0)
++      return varnish_submit_derive(conf->instance, "mse", "total_operations",
++                                   "full_allocs", val);
++    else if (strcmp(name, "c_truncated") == 0)
++      return varnish_submit_derive(conf->instance, "mse", "total_operations",
++                                   "truncated_allocs", val);
++    else if (strcmp(name, "c_expanded") == 0)
++      return varnish_submit_derive(conf->instance, "mse", "total_operations",
++                                   "expanded_allocs", val);
++    else if (strcmp(name, "c_failed") == 0)
++      return varnish_submit_derive(conf->instance, "mse", "total_operations",
++                                   "failed_allocs", val);
++    else if (strcmp(name, "c_bytes") == 0)
++      return varnish_submit_derive(conf->instance, "mse", "total_bytes",
++                                   "bytes_allocated", val);
++    else if (strcmp(name, "c_freed") == 0)
++      return varnish_submit_derive(conf->instance, "mse", "total_bytes",
++                                   "bytes_freed", val);
++    else if (strcmp(name, "g_fo_alloc") == 0)
++      return varnish_submit_derive(conf->instance, "mse", "total_operations",
++                                   "fo_allocs_outstanding", val);
++    else if (strcmp(name, "g_fo_bytes") == 0)
++      return varnish_submit_gauge(conf->instance, "mse", "bytes",
++                                  "fo_bytes_outstanding", val);
++    else if (strcmp(name, "g_membuf_alloc") == 0)
++      return varnish_submit_gauge(conf->instance, "mse", "objects",
++                                  "membufs_allocated", val);
++    else if (strcmp(name, "g_membuf_inuse") == 0)
++      return varnish_submit_gauge(conf->instance, "mse", "objects",
++                                  "membufs_inuse", val);
++    else if (strcmp(name, "g_bans_bytes") == 0)
++      return varnish_submit_gauge(conf->instance, "mse", "bytes",
++                                  "persisted_banspace_used", val);
++    else if (strcmp(name, "g_bans_space") == 0)
++      return varnish_submit_gauge(conf->instance, "mse", "bytes",
++                                  "persisted_banspace_available", val);
++    else if (strcmp(name, "g_bans_persisted") == 0)
++      return varnish_submit_derive(conf->instance, "mse", "total_operations",
++                                   "bans_persisted", val);
++    else if (strcmp(name, "g_bans_lost") == 0)
++      return varnish_submit_derive(conf->instance, "mse", "total_operations",
++                                   "bans_lost", val);
++
++    /* mse seg */
++    else if (strcmp(name, "g_journal_bytes") == 0)
++      return varnish_submit_gauge(conf->instance, "mse_reg", "bytes",
++                                  "journal_bytes_used", val);
++    else if (strcmp(name, "g_journal_space") == 0)
++      return varnish_submit_gauge(conf->instance, "mse_reg", "bytes",
++                                  "journal_bytes_free", val);
++
++    /* mse segagg */
++    else if (strcmp(name, "g_bigspace") == 0)
++      return varnish_submit_gauge(conf->instance, "mse_segagg", "bytes",
++                                  "big_extents_bytes_available", val);
++    else if (strcmp(name, "g_extfree") == 0)
++      return varnish_submit_gauge(conf->instance, "mse_segagg", "objects",
++                                  "free_extents", val);
++    else if (strcmp(name, "g_sparenode") == 0)
++      return varnish_submit_gauge(conf->instance, "mse_segagg", "objects",
++                                  "spare_nodes_available", val);
++    else if (strcmp(name, "g_objnode") == 0)
++      return varnish_submit_gauge(conf->instance, "mse_segagg", "objects",
++                                  "object_nodes_in_use", val);
++    else if (strcmp(name, "g_extnode") == 0)
++      return varnish_submit_gauge(conf->instance, "mse_segagg", "objects",
++                                  "extent_nodes_in_use", val);
++    else if (strcmp(name, "g_bigextfree") == 0)
++      return varnish_submit_gauge(conf->instance, "mse_segagg", "objects",
++                                  "free_big_extents", val);
++    else if (strcmp(name, "c_pruneloop") == 0)
++      return varnish_submit_derive(conf->instance, "mse_segagg",
++                                   "total_operations", "prune_loops", val);
++    else if (strcmp(name, "c_pruned") == 0)
++      return varnish_submit_derive(conf->instance, "mse_segagg",
++                                   "total_objects", "pruned_objects", val);
++    else if (strcmp(name, "c_spared") == 0)
++      return varnish_submit_derive(conf->instance, "mse_segagg",
++                                   "total_operations", "spared_objects", val);
++    else if (strcmp(name, "c_skipped") == 0)
++      return varnish_submit_derive(conf->instance, "mse_segagg",
++                                   "total_operations", "missed_objects", val);
++    else if (strcmp(name, "c_nuked") == 0)
++      return varnish_submit_derive(conf->instance, "mse_segagg",
++                                   "total_operations", "nuked_objects", val);
++    else if (strcmp(name, "c_sniped") == 0)
++      return varnish_submit_derive(conf->instance, "mse_segagg",
++                                   "total_operations", "sniped_objects", val);
++  }
++
+ #endif
+ 
+-  return (0);
++  return 0;
+ 
+ } /* }}} static int varnish_monitor */
+ #else /* if HAVE_VARNISH_V2 */
+@@ -971,21 +1326,32 @@ static void varnish_monitor(const user_config_t *conf, /* {{{ */
+ } /* }}} void varnish_monitor */
+ #endif
+ 
+-#if HAVE_VARNISH_V3 || HAVE_VARNISH_V4
++#if HAVE_VARNISH_V3 || HAVE_VARNISH_V4 || HAVE_VARNISH_V5
+ static int varnish_read(user_data_t *ud) /* {{{ */
+ {
++#if HAVE_VARNISH_V3 || HAVE_VARNISH_V4
+   struct VSM_data *vd;
+-  const c_varnish_stats_t *stats;
+   _Bool ok;
++  const c_varnish_stats_t *stats;
++#elif HAVE_VARNISH_V5
++  struct vsm *vd;
++  struct vsc *vsc;
++  int vsm_status;
++#endif
+ 
+   user_config_t *conf;
+ 
+   if ((ud == NULL) || (ud->data == NULL))
+-    return (EINVAL);
++    return EINVAL;
+ 
+   conf = ud->data;
+ 
+   vd = VSM_New();
++
++#if HAVE_VARNISH_V5
++  vsc = VSC_New();
++#endif
++
+ #if HAVE_VARNISH_V3
+   VSC_Setup(vd);
+ #endif
+@@ -993,48 +1359,85 @@ static int varnish_read(user_data_t *ud) /* {{{ */
+   if (conf->instance != NULL) {
+     int status;
+ 
++#if HAVE_VARNISH_V3 || HAVE_VARNISH_V4
+     status = VSM_n_Arg(vd, conf->instance);
++#elif HAVE_VARNISH_V5
++    status = VSM_Arg(vd, 'n', conf->instance);
++#endif
++
+     if (status < 0) {
++#if HAVE_VARNISH_V3 || HAVE_VARNISH_V4
+       VSM_Delete(vd);
+-      ERROR("varnish plugin: VSM_n_Arg (\"%s\") failed "
++#elif HAVE_VARNISH_V5
++      VSC_Destroy(&vsc, vd);
++      VSM_Destroy(&vd);
++#endif
++      ERROR("varnish plugin: VSM_Arg (\"%s\") failed "
+             "with status %i.",
+             conf->instance, status);
+-      return (-1);
++      return -1;
+     }
+   }
+ 
+ #if HAVE_VARNISH_V3
+   ok = (VSC_Open(vd, /* diag = */ 1) == 0);
+-#else /* if HAVE_VARNISH_V4 */
++#elif HAVE_VARNISH_V4
+   ok = (VSM_Open(vd) == 0);
+ #endif
++#if HAVE_VARNISH_V3 || HAVE_VARNISH_V4
+   if (!ok) {
+     VSM_Delete(vd);
+     ERROR("varnish plugin: Unable to open connection.");
+-
+-    return (-1);
++    return -1;
+   }
++#endif
+ 
+ #if HAVE_VARNISH_V3
+   stats = VSC_Main(vd);
+-#else /* if HAVE_VARNISH_V4 */
++#elif HAVE_VARNISH_V4
+   stats = VSC_Main(vd, NULL);
+ #endif
++#if HAVE_VARNISH_V3 || HAVE_VARNISH_V4
+   if (!stats) {
+     VSM_Delete(vd);
+     ERROR("varnish plugin: Unable to get statistics.");
++    return -1;
++  }
++#endif
++
++#if HAVE_VARNISH_V5
++  if (VSM_Attach(vd, STDERR_FILENO)) {
++    ERROR("varnish plugin: Cannot attach to varnish. %s", VSM_Error(vd));
++    VSC_Destroy(&vsc, vd);
++    VSM_Destroy(&vd);
++    return -1;
++  }
+ 
+-    return (-1);
++  vsm_status = VSM_Status(vd);
++  if (vsm_status & ~(VSM_MGT_RUNNING | VSM_WRK_RUNNING)) {
++    ERROR("varnish plugin: Unable to get statistics.");
++    VSC_Destroy(&vsc, vd);
++    VSM_Destroy(&vd);
++    return -1;
+   }
++#endif
+ 
+ #if HAVE_VARNISH_V3
+   VSC_Iter(vd, varnish_monitor, conf);
+-#else /* if HAVE_VARNISH_V4 */
++#elif HAVE_VARNISH_V4
+   VSC_Iter(vd, NULL, varnish_monitor, conf);
++#elif HAVE_VARNISH_V5
++  VSC_Iter(vsc, vd, varnish_monitor, conf);
+ #endif
++
++#if HAVE_VARNISH_V3 || HAVE_VARNISH_V4
+   VSM_Delete(vd);
++#elif HAVE_VARNISH_V5
++  VSC_Destroy(&vsc, vd);
++  VSM_Destroy(&vd);
++#endif
+ 
+-  return (0);
++  return 0;
+ } /* }}} */
+ #else /* if HAVE_VARNISH_V2 */
+ static int varnish_read(user_data_t *ud) /* {{{ */
+@@ -1044,7 +1447,7 @@ static int varnish_read(user_data_t *ud) /* {{{ */
+   user_config_t *conf;
+ 
+   if ((ud == NULL) || (ud->data == NULL))
+-    return (EINVAL);
++    return EINVAL;
+ 
+   conf = ud->data;
+ 
+@@ -1052,12 +1455,12 @@ static int varnish_read(user_data_t *ud) /* {{{ */
+   if (stats == NULL) {
+     ERROR("Varnish plugin : unable to load statistics");
+ 
+-    return (-1);
++    return -1;
+   }
+ 
+   varnish_monitor(conf, stats);
+ 
+-  return (0);
++  return 0;
+ } /* }}} */
+ #endif
+ 
+@@ -1075,7 +1478,7 @@ static void varnish_config_free(void *ptr) /* {{{ */
+ static int varnish_config_apply_default(user_config_t *conf) /* {{{ */
+ {
+   if (conf == NULL)
+-    return (EINVAL);
++    return EINVAL;
+ 
+   conf->collect_backend = 1;
+   conf->collect_cache = 1;
+@@ -1096,21 +1499,29 @@ static int varnish_config_apply_default(user_config_t *conf) /* {{{ */
+   conf->collect_shm = 1;
+ #if HAVE_VARNISH_V2
+   conf->collect_sm = 0;
++#endif
++#if HAVE_VARNISH_V2 || HAVE_VARNISH_V4 || HAVE_VARNISH_V5
+   conf->collect_sma = 0;
+ #endif
+   conf->collect_sms = 0;
+   conf->collect_struct = 0;
+   conf->collect_totals = 0;
+-#if HAVE_VARNISH_V3 || HAVE_VARNISH_V4
++#if HAVE_VARNISH_V3 || HAVE_VARNISH_V4 || HAVE_VARNISH_V5
+   conf->collect_uptime = 0;
+ #endif
+   conf->collect_vcl = 0;
+   conf->collect_workers = 0;
+-#if HAVE_VARNISH_V4
++#if HAVE_VARNISH_V4 || HAVE_VARNISH_V5
+   conf->collect_vsm = 0;
++  conf->collect_lck = 0;
++  conf->collect_mempool = 0;
++  conf->collect_mgt = 0;
++  conf->collect_smf = 0;
++  conf->collect_vbe = 0;
++  conf->collect_mse = 0;
+ #endif
+ 
+-  return (0);
++  return 0;
+ } /* }}} int varnish_config_apply_default */
+ 
+ static int varnish_init(void) /* {{{ */
+@@ -1118,11 +1529,11 @@ static int varnish_init(void) /* {{{ */
+   user_config_t *conf;
+ 
+   if (have_instance)
+-    return (0);
++    return 0;
+ 
+   conf = calloc(1, sizeof(*conf));
+   if (conf == NULL)
+-    return (ENOMEM);
++    return ENOMEM;
+ 
+   /* Default settings: */
+   conf->instance = NULL;
+@@ -1133,11 +1544,12 @@ static int varnish_init(void) /* {{{ */
+       /* group = */ "varnish",
+       /* name      = */ "varnish/localhost",
+       /* callback  = */ varnish_read,
+-      /* interval  = */ 0, &(user_data_t){
+-                               .data = conf, .free_func = varnish_config_free,
+-                           });
++      /* interval  = */ 0,
++      &(user_data_t){
++          .data = conf, .free_func = varnish_config_free,
++      });
+ 
+-  return (0);
++  return 0;
+ } /* }}} int varnish_init */
+ 
+ static int varnish_config_instance(const oconfig_item_t *ci) /* {{{ */
+@@ -1147,7 +1559,7 @@ static int varnish_config_instance(const oconfig_item_t *ci) /* {{{ */
+ 
+   conf = calloc(1, sizeof(*conf));
+   if (conf == NULL)
+-    return (ENOMEM);
++    return ENOMEM;
+   conf->instance = NULL;
+ 
+   varnish_config_apply_default(conf);
+@@ -1158,7 +1570,7 @@ static int varnish_config_instance(const oconfig_item_t *ci) /* {{{ */
+     status = cf_util_get_string(ci, &conf->instance);
+     if (status != 0) {
+       sfree(conf);
+-      return (status);
++      return status;
+     }
+     assert(conf->instance != NULL);
+ 
+@@ -1170,7 +1582,7 @@ static int varnish_config_instance(const oconfig_item_t *ci) /* {{{ */
+     WARNING("Varnish plugin: \"Instance\" blocks accept only "
+             "one argument.");
+     sfree(conf);
+-    return (EINVAL);
++    return EINVAL;
+   }
+ 
+   for (int i = 0; i < ci->children_num; i++) {
+@@ -1218,11 +1630,11 @@ static int varnish_config_instance(const oconfig_item_t *ci) /* {{{ */
+     else if (strcasecmp("CollectSMS", child->key) == 0)
+       cf_util_get_boolean(child, &conf->collect_sms);
+     else if (strcasecmp("CollectSMA", child->key) == 0)
+-#if HAVE_VARNISH_V2
++#if HAVE_VARNISH_V2 || HAVE_VARNISH_V4 || HAVE_VARNISH_V5
+       cf_util_get_boolean(child, &conf->collect_sma);
+ #else
+       WARNING("Varnish plugin: \"%s\" is available for Varnish %s only.",
+-              child->key, "v2");
++              child->key, "v2 and v4");
+ #endif
+     else if (strcasecmp("CollectSM", child->key) == 0)
+ #if HAVE_VARNISH_V2
+@@ -1236,7 +1648,7 @@ static int varnish_config_instance(const oconfig_item_t *ci) /* {{{ */
+     else if (strcasecmp("CollectTotals", child->key) == 0)
+       cf_util_get_boolean(child, &conf->collect_totals);
+     else if (strcasecmp("CollectUptime", child->key) == 0)
+-#if HAVE_VARNISH_V3 || HAVE_VARNISH_V4
++#if HAVE_VARNISH_V3 || HAVE_VARNISH_V4 || HAVE_VARNISH_V5
+       cf_util_get_boolean(child, &conf->collect_uptime);
+ #else
+       WARNING("Varnish plugin: \"%s\" is available for Varnish %s only.",
+@@ -1247,11 +1659,60 @@ static int varnish_config_instance(const oconfig_item_t *ci) /* {{{ */
+     else if (strcasecmp("CollectWorkers", child->key) == 0)
+       cf_util_get_boolean(child, &conf->collect_workers);
+     else if (strcasecmp("CollectVSM", child->key) == 0)
+-#if HAVE_VARNISH_V4
++#if HAVE_VARNISH_V4 || HAVE_VARNISH_V5
+       cf_util_get_boolean(child, &conf->collect_vsm);
+ #else
+       WARNING("Varnish plugin: \"%s\" is available for Varnish %s only.",
+               child->key, "v4");
++#endif
++    else if (strcasecmp("CollectLock", child->key) == 0)
++#if HAVE_VARNISH_V4 || HAVE_VARNISH_V5
++      cf_util_get_boolean(child, &conf->collect_lck);
++#else
++      WARNING("Varnish plugin: \"%s\" is available for Varnish %s only.",
++              child->key, "v4");
++#endif
++    else if (strcasecmp("CollectMempool", child->key) == 0)
++#if HAVE_VARNISH_V4 || HAVE_VARNISH_V5
++      cf_util_get_boolean(child, &conf->collect_mempool);
++#else
++      WARNING("Varnish plugin: \"%s\" is available for Varnish %s only.",
++              child->key, "v4");
++#endif
++    else if (strcasecmp("CollectManagement", child->key) == 0)
++#if HAVE_VARNISH_V4 || HAVE_VARNISH_V5
++      cf_util_get_boolean(child, &conf->collect_mgt);
++#else
++      WARNING("Varnish plugin: \"%s\" is available for Varnish %s only.",
++              child->key, "v4");
++#endif
++    else if (strcasecmp("CollectSMF", child->key) == 0)
++#if HAVE_VARNISH_V4 || HAVE_VARNISH_V5
++      cf_util_get_boolean(child, &conf->collect_smf);
++#else
++      WARNING("Varnish plugin: \"%s\" is available for Varnish %s only.",
++              child->key, "v4");
++#endif
++    else if (strcasecmp("CollectSMF", child->key) == 0)
++#if HAVE_VARNISH_V4 || HAVE_VARNISH_V5
++      cf_util_get_boolean(child, &conf->collect_smf);
++#else
++      WARNING("Varnish plugin: \"%s\" is available for Varnish %s only.",
++              child->key, "v4");
++#endif
++    else if (strcasecmp("CollectVBE", child->key) == 0)
++#if HAVE_VARNISH_V4 || HAVE_VARNISH_V5
++      cf_util_get_boolean(child, &conf->collect_vbe);
++#else
++      WARNING("Varnish plugin: \"%s\" is available for Varnish %s only.",
++              child->key, "v4");
++#endif
++    else if (strcasecmp("CollectMSE", child->key) == 0)
++#if HAVE_VARNISH_V4 || HAVE_VARNISH_V5
++      cf_util_get_boolean(child, &conf->collect_mse);
++#else
++      WARNING("Varnish plugin: \"%s\" is available for Varnish %s only.",
++              child->key, "Plus v4");
+ #endif
+     else {
+       WARNING("Varnish plugin: Ignoring unknown "
+@@ -1275,38 +1736,44 @@ static int varnish_config_instance(const oconfig_item_t *ci) /* {{{ */
+ #endif
+       && !conf->collect_session && !conf->collect_shm && !conf->collect_sms
+ #if HAVE_VARNISH_V2
+-      && !conf->collect_sma && !conf->collect_sm
++      && !conf->collect_sm
++#endif
++#if HAVE_VARNISH_V2 || HAVE_VARNISH_V4 || HAVE_VARNISH_V5
++      && !conf->collect_sma
+ #endif
+       && !conf->collect_struct && !conf->collect_totals
+-#if HAVE_VARNISH_V3 || HAVE_VARNISH_V4
++#if HAVE_VARNISH_V3 || HAVE_VARNISH_V4 || HAVE_VARNISH_V5
+       && !conf->collect_uptime
+ #endif
+       && !conf->collect_vcl && !conf->collect_workers
+-#if HAVE_VARNISH_V4
+-      && !conf->collect_vsm
++#if HAVE_VARNISH_V4 || HAVE_VARNISH_V5
++      && !conf->collect_vsm && !conf->collect_vbe && !conf->collect_smf &&
++      !conf->collect_mgt && !conf->collect_lck && !conf->collect_mempool &&
++      !conf->collect_mse
+ #endif
+       ) {
+     WARNING("Varnish plugin: No metric has been configured for "
+             "instance \"%s\". Disabling this instance.",
+             (conf->instance == NULL) ? "localhost" : conf->instance);
+     sfree(conf);
+-    return (EINVAL);
++    return EINVAL;
+   }
+ 
+-  ssnprintf(callback_name, sizeof(callback_name), "varnish/%s",
+-            (conf->instance == NULL) ? "localhost" : conf->instance);
++  snprintf(callback_name, sizeof(callback_name), "varnish/%s",
++           (conf->instance == NULL) ? "localhost" : conf->instance);
+ 
+   plugin_register_complex_read(
+       /* group = */ "varnish",
+       /* name      = */ callback_name,
+       /* callback  = */ varnish_read,
+-      /* interval  = */ 0, &(user_data_t){
+-                               .data = conf, .free_func = varnish_config_free,
+-                           });
++      /* interval  = */ 0,
++      &(user_data_t){
++          .data = conf, .free_func = varnish_config_free,
++      });
+ 
+   have_instance = 1;
+ 
+-  return (0);
++  return 0;
+ } /* }}} int varnish_config_instance */
+ 
+ static int varnish_config(oconfig_item_t *ci) /* {{{ */
+@@ -1323,7 +1790,7 @@ static int varnish_config(oconfig_item_t *ci) /* {{{ */
+     }
+   }
+ 
+-  return (0);
++  return 0;
+ } /* }}} int varnish_config */
+ 
+ void module_register(void) /* {{{ */
+@@ -1331,5 +1798,3 @@ void module_register(void) /* {{{ */
+   plugin_register_complex_config("varnish", varnish_config);
+   plugin_register_init("varnish", varnish_init);
+ } /* }}} */
+-
+-/* vim: set sw=8 noet fdm=marker : */


^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-admin/collectd/files/, app-admin/collectd/
@ 2016-10-13 20:49 Thomas Deutschmann
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Deutschmann @ 2016-10-13 20:49 UTC (permalink / raw
  To: gentoo-commits

commit:     180eeb25679dbf994da5571521187938e8ec8354
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 13 20:48:26 2016 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Oct 13 20:48:52 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=180eeb25

app-admin/collectd: Revision bump to address multiple issues

 - When collectd was emerged with "filecaps" USE flag set and at least one
   chosen plugin required special capabilities systemd was unable to start
   collectd because CapabilityBoundingSet option in collectd's systemd unit
   file did not match with the capabilities actual set for
   "/usr/sbin/collectd". (bug #596852)

 - Cherry picked upstream commit 5e4f2ae61d to get rid of

     > capability: warning: `collectd' uses 32-bit capabilities (legacy support in use)

   message.

Gentoo-Bug: https://bugs.gentoo.org/596852

Package-Manager: portage-2.3.2

 app-admin/collectd/Manifest                        |   1 -
 app-admin/collectd/collectd-5.6.0.ebuild           | 499 ---------------------
 ...lectd-5.6.1.ebuild => collectd-5.6.1-r1.ebuild} |  54 ++-
 .../files/collectd-5.6.0-fix-apache-plugin.patch   |  26 --
 .../collectd/files/collectd-5.6.0-issue-1896.patch |  76 ----
 ...ctd-5.6.0-use-_LINUX_CAPABILITY_VERSION_3.patch |  37 ++
 6 files changed, 75 insertions(+), 618 deletions(-)

diff --git a/app-admin/collectd/Manifest b/app-admin/collectd/Manifest
index 2485930..ad706b1 100644
--- a/app-admin/collectd/Manifest
+++ b/app-admin/collectd/Manifest
@@ -1,3 +1,2 @@
 DIST collectd-5.5.2.tar.bz2 1800476 SHA256 017f3a4062187e594d8ab6af685655fb82a8a942dc574668e68242bdb8ba820f SHA512 9d311db4f3677b95e3a47c03af01bdf1127957f6fccb6c601455632d0ea3b39e3f4cd9a6f8f510083e208714bbb0da2e04aaa574a90b0ad6fe984506675475b3 WHIRLPOOL 98ed4fb29eec0ae660d3e1651380a3f17f7bf7f22e687633c4a44974bc84e49cf8de11fd6fea349bfe24809ac3c29a407459a1203b72bcf741e1587c6c0b1773
-DIST collectd-5.6.0.tar.bz2 1818470 SHA256 f0ffbbd91fac3682bd324a74b9b4c9eabe781394b303b5cfd457c4cfbe748623 SHA512 5eecd7fe1619850b29e7853e0ab8f9eb7688d0fdf5687cf04930c75a94181c53d7dc0601a1dfa02417bdeb63cccf09b87acd7129e7f155b8d11147ec46982ed8 WHIRLPOOL 690e50f16318e9df39eac62010f8b0a57059356deeedd72505cc4a980876261a198edac095317f97b03913167dcfc49bf9f3b46986bbc3653628856e3a005111
 DIST collectd-5.6.1.tar.bz2 1903962 SHA256 c30ff644f91407b4dc2d99787b99cc45ec00e538bd1cc269429d3c5e8a4aee2c SHA512 da25f1a9cbaf47533f5a4d2f5f78b966317d4f21865c5a714954ad9d7d02b4798a3e0471ce52199dc80e01dc2808376cb10a7e19c402aafc984bf595f09951a6 WHIRLPOOL 68ed2b27bbd48f5af5e29743dcd2871ab4c2904d5593bbb6f3e68129f318389e32e13b256d489ea7842b90c406974511c8f324383253c7b438e7b6a9d36d299d

diff --git a/app-admin/collectd/collectd-5.6.0.ebuild b/app-admin/collectd/collectd-5.6.0.ebuild
deleted file mode 100644
index 9233874..00000000
--- a/app-admin/collectd/collectd-5.6.0.ebuild
+++ /dev/null
@@ -1,499 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="6"
-
-PYTHON_COMPAT=( python{2_7,3_4,3_5} )
-JAVA_PKG_OPT_USE="collectd_plugins_java"
-
-inherit autotools fcaps flag-o-matic java-pkg-opt-2 linux-info multilib perl-functions python-single-r1 systemd user
-
-DESCRIPTION="Collects system statistics and provides mechanisms to store the values"
-
-HOMEPAGE="https://collectd.org/"
-SRC_URI="${HOMEPAGE}/files/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~x86"
-IUSE="contrib debug java kernel_Darwin kernel_FreeBSD kernel_linux perl selinux static-libs udev xfs"
-
-# The plugin lists have to follow here since they extend IUSE
-
-# Plugins that don't build (e.g. dependencies not in Gentoo)
-# apple_sensors: Requires libIOKit
-# aquaero:       Requires aerotools-ng/libaquaero5
-# barometer:     Requires libi2c (i2c_smbus_read_i2c_block_data)
-# grpc:          Requires libgrpc
-# lpar:          Requires libperfstat (AIX only)
-# mic:           Requires Intel Many Integrated Core Architecture API
-#                (part of Intel's  Xeon Phi software)
-# netapp:        Requires libnetapp (http://communities.netapp.com/docs/DOC-1110)
-# pf:            Requires BSD packet filter
-# pinba:         Requires MySQL Pinba engine (http://pinba.org/)
-# tape:          Requires libkstat (Solaris only)
-# write_mongodb: https://github.com/collectd/collectd/issues/492
-# write_riemann: Requires riemann-c-client
-# xmms:          Requires libxmms (v1)
-# zone:          Solaris only...
-COLLECTD_IMPOSSIBLE_PLUGINS="apple_sensors aquaero barometer grpc lpar mic
-	netapp pf pinba tape write_kafka write_mongodb write_riemann xmms
-	zone"
-
-# Plugins that have been (compile) tested and can be enabled via COLLECTD_PLUGINS
-COLLECTD_TESTED_PLUGINS="aggregation amqp apache apcups ascent battery bind
-	ceph cgroups chrony conntrack contextswitch cpu cpufreq cpusleep
-	csv curl curl_json curl_xml dbi df disk dns drbd email entropy
-	ethstat exec fhcount filecount fscache gmond gps hddtemp interface
-	ipc ipmi iptables ipvs irq java lua load logfile log_logstash lvm
-	madwifi match_empty_counter match_hashed match_regex match_timediff
-	match_value mbmon md memcachec memcached memory modbus mqtt
-	multimeter mysql netlink network network nfs nginx notify_desktop
-	notify_email notify_nagios ntpd numa nut olsrd onewire openldap
-	openvpn oracle perl ping postgresql powerdns processes protocols
-	python python redis routeros rrdcached rrdtool sensors serial
-	sigrok smart snmp statsd swap syslog table tail tail_csv
-	target_notification target_replace target_scale target_set tcpconns
-	teamspeak2 ted thermal threshold tokyotyrant turbostat unixsock
-	uptime users uuid varnish virt vmem vserver wireless write_graphite
-	write_http write_kafka write_log write_redis write_sensu write_tsdb
-	xencpu zfs_arc zookeeper"
-
-COLLECTD_DISABLED_PLUGINS="${COLLECTD_IMPOSSIBLE_PLUGINS}"
-
-COLLECTD_ALL_PLUGINS=${COLLECTD_TESTED_PLUGINS}
-
-for plugin in ${COLLECTD_ALL_PLUGINS}; do
-	IUSE="${IUSE} collectd_plugins_${plugin}"
-done
-unset plugin
-
-# Now come the dependencies.
-
-COMMON_DEPEND="
-	dev-libs/libgcrypt:=
-	dev-libs/libltdl:0=
-	perl?					( dev-lang/perl:=[ithreads] )
-	udev?					( virtual/udev )
-	xfs?					( sys-fs/xfsprogs )
-	collectd_plugins_amqp?			( net-libs/rabbitmq-c )
-	collectd_plugins_apache?		( net-misc/curl:0= )
-	collectd_plugins_ascent?		( net-misc/curl:0= dev-libs/libxml2:2= )
-	collectd_plugins_bind?			( dev-libs/libxml2:2= )
-	collectd_plugins_ceph?			( dev-libs/yajl:= )
-	collectd_plugins_curl?			( net-misc/curl:0= )
-	collectd_plugins_curl_json?		( net-misc/curl:0= dev-libs/yajl:= )
-	collectd_plugins_curl_xml?		( net-misc/curl:0= dev-libs/libxml2:2= )
-	collectd_plugins_dbi?			( dev-db/libdbi )
-	collectd_plugins_dns?			( net-libs/libpcap )
-	collectd_plugins_gmond?			( sys-cluster/ganglia )
-	collectd_plugins_gps?			( sci-geosciences/gpsd )
-	collectd_plugins_ipmi?			( >=sys-libs/openipmi-2.0.16-r1 )
-	collectd_plugins_iptables?		( >=net-firewall/iptables-1.4.13:0= )
-	collectd_plugins_log_logstash?		( dev-libs/yajl:= )
-	collectd_plugins_lua?			( dev-lang/lua:0= )
-	collectd_plugins_lvm?			( sys-fs/lvm2 )
-	collectd_plugins_memcachec?		( dev-libs/libmemcached )
-	collectd_plugins_modbus?		( dev-libs/libmodbus )
-	collectd_plugins_mqtt?			( app-misc/mosquitto )
-	collectd_plugins_mysql?			( >=virtual/mysql-5.0 )
-	collectd_plugins_netlink?		( net-libs/libmnl )
-	collectd_plugins_nginx?			( net-misc/curl:0= )
-	collectd_plugins_notify_desktop?	( x11-libs/libnotify )
-	collectd_plugins_notify_email?		( net-libs/libesmtp )
-	collectd_plugins_nut?			( >=sys-power/nut-2.7.2-r2 )
-	collectd_plugins_openldap?		( net-nds/openldap )
-	collectd_plugins_onewire?		( >=sys-fs/owfs-3.1:= )
-	collectd_plugins_oracle?		( dev-db/oracle-instantclient-basic )
-	collectd_plugins_perl?			( dev-lang/perl:=[ithreads] )
-	collectd_plugins_ping?			( net-libs/liboping )
-	collectd_plugins_postgresql?		( dev-db/postgresql:= )
-	collectd_plugins_python?		( ${PYTHON_DEPS} )
-	collectd_plugins_redis?			( dev-libs/hiredis:= )
-	collectd_plugins_routeros?		( net-libs/librouteros )
-	collectd_plugins_rrdcached?		( net-analyzer/rrdtool:= )
-	collectd_plugins_rrdtool?		( net-analyzer/rrdtool:= )
-	collectd_plugins_sensors?		( sys-apps/lm_sensors )
-	collectd_plugins_sigrok?		( <sci-libs/libsigrok-0.4 )
-	collectd_plugins_smart?			( dev-libs/libatasmart )
-	collectd_plugins_snmp?			( net-analyzer/net-snmp )
-	collectd_plugins_tokyotyrant?		( net-misc/tokyotyrant )
-	collectd_plugins_varnish?		( www-servers/varnish )
-	collectd_plugins_virt?			( app-emulation/libvirt:= dev-libs/libxml2:2= )
-	collectd_plugins_write_http?		( net-misc/curl:0= )
-	collectd_plugins_write_kafka?		( >=dev-libs/librdkafka-0.9.0.99:= )
-	collectd_plugins_write_redis?		( dev-libs/hiredis:= )
-	collectd_plugins_xencpu?		( app-emulation/xen-tools )
-
-	kernel_FreeBSD? (
-		collectd_plugins_disk?		( sys-libs/libstatgrab:= )
-		collectd_plugins_interface?	( sys-libs/libstatgrab:= )
-		collectd_plugins_load?		( sys-libs/libstatgrab:= )
-		collectd_plugins_memory?	( sys-libs/libstatgrab:= )
-		collectd_plugins_swap?		( sys-libs/libstatgrab:= )
-		collectd_plugins_users?		( sys-libs/libstatgrab:= )
-	)"
-
-# Enforcing <=sys-kernel/linux-headers-4.4 due to #577846
-DEPEND="${COMMON_DEPEND}
-	collectd_plugins_iptables?		( <=sys-kernel/linux-headers-4.4 )
-	collectd_plugins_java?			( >=virtual/jdk-1.6 )
-	virtual/pkgconfig"
-
-RDEPEND="${COMMON_DEPEND}
-	collectd_plugins_java?			( >=virtual/jre-1.6 )
-	collectd_plugins_syslog?		( virtual/logger )
-	selinux?				( sec-policy/selinux-collectd )"
-
-REQUIRED_USE="
-	collectd_plugins_python?		( ${PYTHON_REQUIRED_USE} )
-	collectd_plugins_smart?			( udev )"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-5.6.0-gentoo.patch
-	"${FILESDIR}"/${PN}-5.6.0-issue-1896.patch
-	"${FILESDIR}"/${PN}-5.6.0-fix-apache-plugin.patch
-)
-
-# @FUNCTION: collectd_plugin_kernel_linux
-# @DESCRIPTION:
-# USAGE: <plugin name> <kernel_options> <severity>
-# kernel_options is a list of kernel configurations options; the check tests whether at least
-#   one of them is enabled. If no, depending on the third argument an elog, ewarn, or eerror message
-#   is emitted.
-collectd_plugin_kernel_linux() {
-	local multi_opt opt
-	if has ${1} ${COLLECTD_ALL_PLUGINS}; then
-		if use collectd_plugins_${1}; then
-			for opt in ${2}; do
-				if linux_chkconfig_present ${opt}; then
-					return 0;
-				fi
-			done
-			multi_opt=${2//\ /\ or\ }
-			case ${3} in
-				(info)
-					elog "The ${1} plugin can use kernel features that are disabled now; enable ${multi_opt} in your kernel"
-				;;
-				(warn)
-					ewarn "The ${1} plugin uses kernel features that are disabled now; enable ${multi_opt} in your kernel"
-				;;
-				(error)
-					eerror "The ${1} plugin needs kernel features that are disabled now; enable ${multi_opt} in your kernel"
-				;;
-				(*)
-					die "function collectd_plugin_kernel_linux called with invalid third argument"
-				;;
-			esac
-		fi
-	fi
-}
-
-collectd_linux_kernel_checks() {
-	if ! linux_chkconfig_present PROC_FS; then
-		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"
-	fi
-
-	if ! linux_chkconfig_present SYSFS; then
-		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"
-	fi
-
-	# battery.c: /proc/pmu/battery_%i
-	# battery.c: /proc/acpi/battery
-	collectd_plugin_kernel_linux battery ACPI_BATTERY warn
-
-	# cgroups.c: /sys/fs/cgroup/
-	collectd_plugin_kernel_linux cgroups CGROUPS warn
-
-	# cpufreq.c: /sys/devices/system/cpu/cpu%d/cpufreq/
-	collectd_plugin_kernel_linux cpufreq SYSFS warn
-	collectd_plugin_kernel_linux cpufreq CPU_FREQ_STAT warn
-
-	# drbd.c: /proc/drbd
-	collectd_plugin_kernel_linux drbd BLK_DEV_DRBD warn
-
-	# conntrack.c: /proc/sys/net/netfilter/*
-	collectd_plugin_kernel_linux conntrack NETFILTER warn
-
-	# fscache.c: /proc/fs/fscache/stats
-	collectd_plugin_kernel_linux fscache FSCACHE warn
-
-	# nfs.c: /proc/net/rpc/nfs
-	# nfs.c: /proc/net/rpc/nfsd
-	collectd_plugin_kernel_linux nfs NFS_COMMON warn
-
-	# serial.c: /proc/tty/driver/serial
-	# serial.c: /proc/tty/driver/ttyS
-	collectd_plugin_kernel_linux serial SERIAL_CORE warn
-
-	# swap.c: /proc/meminfo
-	collectd_plugin_kernel_linux swap SWAP warn
-
-	# thermal.c: /proc/acpi/thermal_zone
-	# thermal.c: /sys/class/thermal
-	collectd_plugin_kernel_linux thermal ACPI_THERMAL warn
-
-	# turbostat.c: /dev/cpu/%d/msr
-	collectd_plugin_kernel_linux turbostat X86_MSR warn
-
-	# vmem.c: /proc/vmstat
-	collectd_plugin_kernel_linux vmem VM_EVENT_COUNTERS warn
-
-	# vserver.c: /proc/virtual
-	collectd_plugin_kernel_linux vserver VSERVER warn
-
-	# uuid.c: /sys/hypervisor/uuid
-	collectd_plugin_kernel_linux uuid SYSFS info
-
-	# wireless.c: /proc/net/wireless
-	collectd_plugin_kernel_linux wireless "WIRELESS MAC80211 IEEE80211" warn
-
-	# zfs_arc.c: /proc/spl/kstat/zfs/arcstats
-	collectd_plugin_kernel_linux zfs_arc "SPL ZFS" warn
-}
-
-pkg_setup() {
-	if use kernel_linux; then
-		linux-info_pkg_setup
-
-		if linux_config_exists; then
-			einfo "Checking your linux kernel configuration:"
-			collectd_linux_kernel_checks
-		else
-			elog "Cannot find a linux kernel configuration. Continuing anyway."
-		fi
-	fi
-
-	if use collectd_plugins_java; then
-		java-pkg-opt-2_pkg_setup
-	fi
-
-	use collectd_plugins_python && python-single-r1_pkg_setup
-
-	enewgroup collectd
-	enewuser collectd -1 -1 /var/lib/collectd collectd
-}
-
-src_prepare() {
-	default
-
-	# There's some strange prefix handling in the default config file, resulting in
-	# paths like "/usr/var/..."
-	sed -i -e "s:@prefix@/var:/var:g" src/collectd.conf.in || die
-
-	# fix installdirs for perl, bug 444360
-	sed -i -e 's/INSTALL_BASE=$(DESTDIR)$(prefix) //' bindings/Makefile.am || die
-
-	if use collectd_plugins_java; then
-		# Set javac -source and -target flags according to (R)DEPEND.
-		sed -i -e "s/\$(JAVAC)/\0 $(java-pkg_javac-args)/g" bindings/java/Makefile.am || die
-	fi
-
-	ebegin "Removing bundled libltdl"
-	rm -rf libltdl || die
-	eend 0
-
-	eautoreconf
-}
-
-src_configure() {
-	# Now come the lists of os-dependent plugins. Any plugin that is not listed anywhere here
-	# should work independent of the operating system.
-
-	local linux_plugins="barometer battery cpu cpufreq disk drbd entropy
-		ethstat interface iptables ipvs irq ipc load memory md netlink nfs
-		numa processes serial swap tcpconns thermal turbostat users vmem
-		wireless zfc_arc"
-
-	local need_libstatgrab=0
-	local libstatgrab_plugins="cpu disk interface load memory swap users"
-	local bsd_plugins="cpu tcpconns ${libstatgrab_plugins} zfc_arc"
-
-	local darwin_plugins="apple_sensors battery cpu disk interface memory processes tcpconns"
-
-	local osdependent_plugins="${linux_plugins} ${bsd_plugins} ${darwin_plugins}"
-	local myos_plugins=""
-	if use kernel_linux; then
-		einfo "Enabling Linux plugins."
-		myos_plugins=${linux_plugins}
-	elif use kernel_FreeBSD; then
-		einfo "Enabling FreeBSD plugins."
-		myos_plugins=${bsd_plugins}
-	elif use kernel_Darwin; then
-		einfo "Enabling Darwin plugins."
-		myos_plugins=${darwin_plugins}
-	fi
-
-	local myconf="--disable-werror"
-
-	# Do we debug?
-	myconf+=" $(use_enable debug)"
-
-	# udev support?
-	# Required for smart plugin via REQUIRED_USE; Optional for disk plugin
-	if use udev; then
-		myconf+=" --with-libudev"
-	else
-		myconf+=" --without-libudev"
-	fi
-
-	local plugin
-
-	# Disable what needs to be disabled.
-	for plugin in ${COLLECTD_DISABLED_PLUGINS}; do
-		myconf+=" --disable-${plugin}"
-	done
-
-	# Set enable/disable for each single plugin.
-	for plugin in ${COLLECTD_ALL_PLUGINS}; do
-		if has ${plugin} ${osdependent_plugins}; then
-			# plugin is os-dependent ...
-			if has ${plugin} ${myos_plugins}; then
-				# ... and available in this os
-				myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
-				# ... must we link against libstatgrab? Bug #541518
-				if use kernel_FreeBSD && has ${plugin} ${libstatgrab_plugins}; then
-					einfo "We must link against libstatgrab due to plugin \"${plugin}\" ..."
-					need_libstatgrab=1
-				fi
-			else
-				# ... and NOT available in this os
-				if use collectd_plugins_${plugin}; then
-					ewarn "You try to enable the ${plugin} plugin, but it is not available for this"
-					ewarn "kernel. Disabling it automatically."
-				fi
-				myconf+=" --disable-${plugin}"
-			fi
-		elif [[ "${plugin}" = "collectd_plugins_perl" ]]; then
-			if use collectd_plugins_perl && ! use perl; then
-				ewarn "Perl plugin disabled as perl bindings disabled by -perl use flag"
-				myconf+= --disable-perl
-			else
-				myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
-			fi
-		else
-			myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
-		fi
-	done
-
-	if [ "${need_libstatgrab}" -eq 1 ]; then
-		myconf+=" --with-libstatgrab"
-	else
-		myconf+=" --without-libstatgrab"
-	fi
-
-	# JAVA_HOME is set by eclasses.
-	if use collectd_plugins_java; then
-		myconf+=" --with-java"
-	fi
-
-	# Need libiptc ONLY for iptables. If we try to use it otherwise bug 340109 happens.
-	# lots of libs are only needed for plugins, if they are disabled, also disable the lib
-	use collectd_plugins_iptables || myconf+=" --with-libiptc=no"
-	use collectd_plugins_openldap || myconf+=" --with-libldap=no"
-	use collectd_plugins_redis    || use collectd_plugins_write_redis || myconf+=" --with-libhiredis=no"
-	use collectd_plugins_smart    || myconf+=" --with-libatasmart=no"
-	use collectd_plugins_gps      || myconf+=" --with-libgps=no"
-
-	if use perl; then
-		myconf+=" --with-perl-bindings=INSTALLDIRS=vendor"
-	else
-		myconf+=" --without-perl-bindings"
-	fi
-
-	# No need for v5upgrade
-	myconf+=" --disable-target_v5upgrade"
-
-	# Python
-	if use collectd_plugins_python; then
-		myconf+=" --with-libpython=yes"
-		export PYTHON_CONFIG=$(python_get_PYTHON_CONFIG)
-	else
-		myconf+=" --with-libpython=no"
-	fi
-
-	# XFS support
-	myconf+=" $(use_enable xfs)"
-
-	# Finally, run econf.
-	KERNEL_DIR="${KERNEL_DIR}" econf --config-cache \
-		$(use_enable static-libs static) \
-		--localstatedir=/var ${myconf}
-}
-
-src_install() {
-	emake DESTDIR="${D%/}" install
-
-	perl_delete_localpod
-
-	find "${ED}"usr/ -name "*.la" -delete || die
-
-	if use collectd_plugins_java; then
-		java-pkg_regjar "${ED}"usr/share/${PN}/java/*.jar
-	fi
-
-	fowners root:collectd /etc/collectd.conf
-	fperms u=rw,g=r,o= /etc/collectd.conf
-
-	dodoc AUTHORS ChangeLog NEWS README TODO
-
-	if use contrib ; then
-		insinto /usr/share/doc/${PF}
-		doins -r contrib
-	fi
-
-	keepdir /var/lib/${PN}
-	fowners collectd:collectd /var/lib/${PN}
-
-	newinitd "${FILESDIR}/${PN}.initd-r1" ${PN}
-	newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
-	systemd_newunit "contrib/systemd.${PN}.service" ${PN}.service
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}/${PN}.logrotate" ${PN}
-
-	sed -i -e 's:^.*PIDFile     "/var/run/collectd.pid":PIDFile     "/run/collectd/collectd.pid":' "${ED}"etc/collectd.conf || die
-	sed -i -e 's:^#	SocketFile "/var/run/collectd-unixsock":#	SocketFile "/run/collectd/collectd.socket":' "${ED}"etc/collectd.conf || die
-	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
-	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
-}
-
-pkg_postinst() {
-	local caps=()
-	use collectd_plugins_ceph      && caps+=('cap_dac_override')
-	use collectd_plugins_exec      && caps+=('cap_setuid' 'cap_setgid')
-	use collectd_plugins_iptables  && caps+=('cap_net_admin')
-	use collectd_plugins_filecount && caps+=('cap_dac_read_search')
-	use collectd_plugins_turbostat && caps+=('cap_sys_rawio')
-
-	if use collectd_plugins_dns || use collectd_plugins_ping; then
-		caps+=('cap_net_raw')
-	fi
-
-	if [ ${#caps[@]} -gt 0 ]; then
-		local caps_str=$(IFS=","; echo "${caps[*]}")
-		fcaps ${caps_str} usr/sbin/collectd
-		elog "Capabilities for ${EROOT}usr/sbin/collectd set to:"
-		elog "  ${caps_str}+ep"
-		elog
-	fi
-
-	elog "Note: Collectd is only the collector."
-	elog "      You need to install 'data' sources (applications) locally or"
-	elog "      remotely on your own."
-
-	elog
-	elog "Collectd is configured to run as unprivileged user by default."
-	elog "You may want to revisit the configuration."
-	elog
-
-	if use collectd_plugins_email; then
-		ewarn "The email plug-in is deprecated. To submit statistics please use the unixsock plugin."
-	fi
-
-	if use contrib; then
-		elog "The scripts in /usr/share/doc/${PF}/collection3 for generating graphs need dev-perl/HTML-Parser,"
-		elog "dev-perl/config-general, dev-perl/regexp-common, and net-analyzer/rrdtool[perl] to be installed."
-	fi
-}

diff --git a/app-admin/collectd/collectd-5.6.1.ebuild b/app-admin/collectd/collectd-5.6.1-r1.ebuild
similarity index 92%
rename from app-admin/collectd/collectd-5.6.1.ebuild
rename to app-admin/collectd/collectd-5.6.1-r1.ebuild
index fc4601c..d4d794e 100644
--- a/app-admin/collectd/collectd-5.6.1.ebuild
+++ b/app-admin/collectd/collectd-5.6.1-r1.ebuild
@@ -152,6 +152,7 @@ REQUIRED_USE="
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-5.6.0-gentoo.patch
+	"${FILESDIR}"/${PN}-5.6.0-use-_LINUX_CAPABILITY_VERSION_3.patch
 )
 
 # @FUNCTION: collectd_plugin_kernel_linux
@@ -283,6 +284,14 @@ src_prepare() {
 	# fix installdirs for perl, bug 444360
 	sed -i -e 's/INSTALL_BASE=$(DESTDIR)$(prefix) //' bindings/Makefile.am || die
 
+	# Adjust upstream's systemd unit
+	#   - Get rid of EnvironmentFile directive; These files don't exist on Gentoo!
+	#   - Add User=collectd to run collectd as user "collectd" per default
+	sed -i \
+		-e '/^EnvironmentFile=.*/d' \
+		-e '/^\[Service\]/aUser=collectd' \
+		contrib/systemd.${PN}.service || die
+
 	if use collectd_plugins_java; then
 		# Set javac -source and -target flags according to (R)DEPEND.
 		sed -i -e "s/\$(JAVAC)/\0 $(java-pkg_javac-args)/g" bindings/java/Makefile.am || die
@@ -458,23 +467,36 @@ src_install() {
 }
 
 pkg_postinst() {
-	local caps=()
-	use collectd_plugins_ceph      && caps+=('cap_dac_override')
-	use collectd_plugins_exec      && caps+=('cap_setuid' 'cap_setgid')
-	use collectd_plugins_iptables  && caps+=('cap_net_admin')
-	use collectd_plugins_filecount && caps+=('cap_dac_read_search')
-	use collectd_plugins_turbostat && caps+=('cap_sys_rawio')
-
-	if use collectd_plugins_dns || use collectd_plugins_ping; then
-		caps+=('cap_net_raw')
-	fi
+	if use filecaps; then
+		local caps=()
+		use collectd_plugins_ceph      && caps+=('CAP_DAC_OVERRIDE')
+		use collectd_plugins_exec      && caps+=('CAP_SETUID' 'CAP_SETGID')
+		use collectd_plugins_iptables  && caps+=('CAP_NET_ADMIN')
+		use collectd_plugins_filecount && caps+=('CAP_DAC_READ_SEARCH')
+		use collectd_plugins_turbostat && caps+=('CAP_SYS_RAWIO')
+
+		if use collectd_plugins_dns || use collectd_plugins_ping; then
+			caps+=('CAP_NET_RAW')
+		fi
 
-	if [ ${#caps[@]} -gt 0 ]; then
-		local caps_str=$(IFS=","; echo "${caps[*]}")
-		fcaps ${caps_str} usr/sbin/collectd
-		elog "Capabilities for ${EROOT}usr/sbin/collectd set to:"
-		elog "  ${caps_str}+ep"
-		elog
+		if [ ${#caps[@]} -gt 0 ]; then
+			local caps_str=$(IFS=","; echo "${caps[*]}")
+			fcaps ${caps_str} usr/sbin/collectd
+			elog "Capabilities for ${EROOT}usr/sbin/collectd set to:"
+			elog "  ${caps_str}+EP"
+			elog
+
+			local systemd_unit="${EROOT}usr/lib/systemd/system/collectd.service"
+			if [[ -e "${systemd_unit}" ]]; then
+				caps_str="${caps[*]}"
+				sed -i -e "s:^CapabilityBoundingSet=.*:CapabilityBoundingSet=${caps_str}:" "${systemd_unit}" || \
+					die "Failed to set CapabilityBoundingSet in '${systemd_unit}'"
+
+				elog "CapabilityBoundingSet in '${systemd_unit}'"
+				elog "updated to match capabilities set above."
+				elog
+			fi
+		fi
 	fi
 
 	elog "Note: Collectd is only the collector."

diff --git a/app-admin/collectd/files/collectd-5.6.0-fix-apache-plugin.patch b/app-admin/collectd/files/collectd-5.6.0-fix-apache-plugin.patch
deleted file mode 100644
index e3afaeb..00000000
--- a/app-admin/collectd/files/collectd-5.6.0-fix-apache-plugin.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 60ec28dd104bdeef4c5ed6882fb2b663ca9da2eb Mon Sep 17 00:00:00 2001
-From: Florian Forster <octo@collectd.org>
-Date: Sun, 11 Sep 2016 20:31:31 +0200
-Subject: [PATCH] apache plugin: End statements with semi-colons.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-If only I knew why this wasn't considered a syntax error …
----
- src/apache.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/apache.c b/src/apache.c
-index c515e3c..5b6914c 100644
---- a/src/apache.c
-+++ b/src/apache.c
-@@ -250,7 +250,7 @@ static int config_add (oconfig_item_t *ci)
- 		ssnprintf (callback_name, sizeof (callback_name),
- 				"apache/%s/%s",
- 				(st->host != NULL) ? st->host : hostname_g,
--				(st->name != NULL) ? st->name : "default"),
-+				(st->name != NULL) ? st->name : "default");
- 
- 		status = plugin_register_complex_read (/* group = */ NULL,
- 				/* name      = */ callback_name,

diff --git a/app-admin/collectd/files/collectd-5.6.0-issue-1896.patch b/app-admin/collectd/files/collectd-5.6.0-issue-1896.patch
deleted file mode 100644
index afcd8d0..00000000
--- a/app-admin/collectd/files/collectd-5.6.0-issue-1896.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From ba52f94929822b1968f05cfbb37985af2e0b83a4 Mon Sep 17 00:00:00 2001
-From: Florian Forster <octo@collectd.org>
-Date: Tue, 13 Sep 2016 10:44:46 +0200
-Subject: [PATCH] curl_json plugin: Skip unexpected non-map values.
-
-Assume, for example, the config `Key "*/foo"`. This config expects JSON
-in the form:
-
-    {
-      "bar": {
-        "foo": 1337
-      }
-    }
-
-If the available JSON is instead:
-
-    {
-      "error_code": 0,
-      "bar": {
-        "foo": 1337
-      }
-    }
-
-the code will take a look at the zero associated with "error_code" and
-determine that a map (with key "foo") is expected instead. Previously
-the code would continue, eventually calling `cj_get_type()` which
-expects that `key->type` is a valid pointer, resulting in a segmentation
-fault.
-
-This patch does three things to ensure that this segmentation fault does
-not happen again:
-
-1.  `cj_get_type()` checks its argument to make sure it is valid before
-    dereferencing any pointers.
-2.  In case a non-map is found when a map is expected, the code will
-    return instead of limping on.
-3.  After calling `cj_cb_inc_array_index()`, which may update the key,
-    make sure that it actually did and that key is valid now.
-
-Fixes: #1896
----
- src/curl_json.c | 10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/src/curl_json.c b/src/curl_json.c
-index 4188f37..a547ddc 100644
---- a/src/curl_json.c
-+++ b/src/curl_json.c
-@@ -143,6 +143,9 @@ static int cj_get_type (cj_key_t *key)
- {
-   const data_set_t *ds;
- 
-+  if ((key == NULL) || !CJ_IS_KEY (key))
-+    return -EINVAL;
-+
-   ds = plugin_get_ds (key->type);
-   if (ds == NULL)
-   {
-@@ -226,12 +229,15 @@ static int cj_cb_number (void *ctx,
-   buffer[sizeof (buffer) - 1] = 0;
- 
-   if ((key == NULL) || !CJ_IS_KEY (key)) {
--    if (key != NULL && !db->state[db->depth].in_array/*can be inhomogeneous*/)
-+    if (key != NULL && !db->state[db->depth].in_array/*can be inhomogeneous*/) {
-       NOTICE ("curl_json plugin: Found \"%s\", but the configuration expects"
-               " a map.", buffer);
-+      return (CJ_CB_CONTINUE);
-+    }
-+
-     cj_cb_inc_array_index (ctx, /* update_key = */ 1);
-     key = db->state[db->depth].key;
--    if (key == NULL) {
-+    if ((key == NULL) || !CJ_IS_KEY (key)) {
-       return (CJ_CB_CONTINUE);
-     }
-   }

diff --git a/app-admin/collectd/files/collectd-5.6.0-use-_LINUX_CAPABILITY_VERSION_3.patch b/app-admin/collectd/files/collectd-5.6.0-use-_LINUX_CAPABILITY_VERSION_3.patch
new file mode 100644
index 00000000..6c7e635
--- /dev/null
+++ b/app-admin/collectd/files/collectd-5.6.0-use-_LINUX_CAPABILITY_VERSION_3.patch
@@ -0,0 +1,37 @@
+From 5e4f2ae61dc39938c4df857854724ba1d36f3232 Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi@gentoo.org>
+Date: Tue, 11 Oct 2016 16:16:23 +0200
+Subject: [PATCH] common.c: Use _LINUX_CAPABILITY_VERSION_3 in cap_header
+
+While check_capability() function already requires
+_LINUX_CAPABILITY_VERSION_3 via "#ifdef" since commit 448627953c we still
+set the cap_header's version to deprecated _LINUX_CAPABILITY_VERSION. This
+results in a warning like
+
+ > capability: warning: `collectd' uses 32-bit capabilities (legacy support in use)
+
+from the kernel when a plugin (like iptables) calls our check_capability()
+function.
+
+With this commit we will set cap_header to kernel's current capability
+version (_LINUX_CAPABILITY_VERSION_3), which is default since
+kernel 2.6.26.
+
+Signed-off-by: Florian Forster <octo@collectd.org>
+---
+ src/daemon/common.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/daemon/common.c b/src/daemon/common.c
+index e489449..477d759 100644
+--- a/src/daemon/common.c
++++ b/src/daemon/common.c
+@@ -1698,7 +1698,7 @@ int check_capability (int capability) /* {{{ */
+ 	}
+ 
+ 	cap_header->pid = getpid();
+-	cap_header->version = _LINUX_CAPABILITY_VERSION;
++	cap_header->version = _LINUX_CAPABILITY_VERSION_3;
+ 	if (capget(cap_header, cap_data) < 0)
+ 	{
+ 		ERROR("check_capability: capget failed");


^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-admin/collectd/files/, app-admin/collectd/
@ 2016-08-11 16:33 Thomas Deutschmann
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Deutschmann @ 2016-08-11 16:33 UTC (permalink / raw
  To: gentoo-commits

commit:     9d5c0697e68fde681d07d283a2a8a3c67d5a7823
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 11 16:26:01 2016 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Aug 11 16:32:44 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d5c0697

app-admin/collectd: Bump to v5.5.2

  - New upstream release (Fixes CVE-2016-6254)

  - Dependency on sys-fs/xfsprogs atom can now be controlled using the
    new "xfs" USE flag.
    If you don't enable "xfs" USE flag the df plugin will be unable to
    filter on XFS partitions.

  - Fixes build issues with sys-fs/xfsprogs-4.7.0 (#590998)

  - Cherry-picked patches for upstream issue "network plugin causes core
    dumps" (#1870)

Gentoo-Bug: https://bugs.gentoo.org/590998

Package-Manager: portage-2.3.0

 app-admin/collectd/Manifest                        |   1 +
 app-admin/collectd/collectd-5.5.2.ebuild           | 479 +++++++++++++++++++++
 .../collectd/files/collectd-5.5.2-issue-1870.patch | 127 ++++++
 .../collectd/files/collectd-5.5.2-issue-1877.patch |  37 ++
 app-admin/collectd/metadata.xml                    |   1 +
 5 files changed, 645 insertions(+)

diff --git a/app-admin/collectd/Manifest b/app-admin/collectd/Manifest
index fd5ba08..bd7c879 100644
--- a/app-admin/collectd/Manifest
+++ b/app-admin/collectd/Manifest
@@ -1 +1,2 @@
 DIST collectd-5.5.1.tar.bz2 1797852 SHA256 f9c5d526e1f0429a7db1ccd90bdf9e23923a2fd43b7285cfda8f0341e5c0bc3f SHA512 1935809571b8f0e0870399385312a5687f441d11e08a0c7d1337384b3790c3436ba84f89226aad979584045cc13bdf88f1350a0f49c94bcd0dbcf12ae4704dae WHIRLPOOL 3efeeb9262344a8a1c0aa068e64f5d45ff536d1fc1399b4599143a6e47740d5a33aedf482dbf9110cc5f0345d624fbe71ff00fc6f7afeee891326617f7979e41
+DIST collectd-5.5.2.tar.bz2 1800476 SHA256 017f3a4062187e594d8ab6af685655fb82a8a942dc574668e68242bdb8ba820f SHA512 9d311db4f3677b95e3a47c03af01bdf1127957f6fccb6c601455632d0ea3b39e3f4cd9a6f8f510083e208714bbb0da2e04aaa574a90b0ad6fe984506675475b3 WHIRLPOOL 98ed4fb29eec0ae660d3e1651380a3f17f7bf7f22e687633c4a44974bc84e49cf8de11fd6fea349bfe24809ac3c29a407459a1203b72bcf741e1587c6c0b1773

diff --git a/app-admin/collectd/collectd-5.5.2.ebuild b/app-admin/collectd/collectd-5.5.2.ebuild
new file mode 100644
index 0000000..cfb74e9
--- /dev/null
+++ b/app-admin/collectd/collectd-5.5.2.ebuild
@@ -0,0 +1,479 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="6"
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+
+inherit autotools fcaps flag-o-matic java-pkg-opt-2 linux-info multilib perl-functions python-single-r1 systemd user
+
+DESCRIPTION="Collects system statistics and provides mechanisms to store the values"
+
+HOMEPAGE="http://collectd.org/"
+SRC_URI="${HOMEPAGE}/files/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="contrib debug java kernel_Darwin kernel_FreeBSD kernel_linux perl selinux static-libs udev xfs"
+
+# The plugin lists have to follow here since they extend IUSE
+
+# Plugins that don't build (e.g. dependencies not in Gentoo)
+# apple_sensors: Requires libIOKit
+# aquaero:       Requires aerotools-ng/libaquaero5
+# barometer:     Requires libi2c (i2c_smbus_read_i2c_block_data)
+# lpar:          Requires libperfstat (AIX only)
+# mic:           Requires Intel Many Integrated Core Architecture API
+#                (part of Intel's  Xeon Phi software)
+# netapp:        Requires libnetapp (http://communities.netapp.com/docs/DOC-1110)
+# pf:            Requires BSD packet filter
+# pinba:         Requires MySQL Pinba engine (http://pinba.org/)
+# tape:          Requires libkstat (Solaris only)
+# write_mongodb: https://github.com/collectd/collectd/issues/492
+# xmms:          Requires libxmms (v1)
+COLLECTD_IMPOSSIBLE_PLUGINS="apple_sensors aquaero mic netapp pf pinba tape write_kafka write_mongodb xmms"
+
+# Plugins that have been (compile) tested and can be enabled via COLLECTD_PLUGINS
+COLLECTD_TESTED_PLUGINS="amqp aggregation apache apcups ascent battery bind ceph
+	cgroups conntrack contextswitch cpu cpufreq csv curl curl_json curl_xml dbi df
+	disk dns drbd email entropy ethstat exec fhcount filecount fscache genericjmx
+	gmond hddtemp interface ipc ipmi iptables ipvs irq java load logfile log_logstash
+	lvm madwifi match_empty_counter match_hashed match_regex match_timediff match_value
+	mbmon md memcachec memcached memory modbus multimeter mysql netlink network network
+	nfs nginx notify_desktop notify_email ntpd numa nut olsrd onewire openldap openvpn
+	oracle perl ping postgresql powerdns processes protocols python python redis
+	routeros rrdcached rrdtool sensors serial sigrok smart snmp statsd swap syslog
+	table tail tail_csv target_notification target_replace target_scale target_set
+	tcpconns teamspeak2 ted thermal threshold tokyotyrant turbostat unixsock uptime
+	users uuid varnish virt vmem vserver wireless write_graphite write_http write_kafka
+	write_log write_redis write_riemann write_sensu write_tsdb zfs_arc zookeeper"
+
+COLLECTD_DISABLED_PLUGINS="${COLLECTD_IMPOSSIBLE_PLUGINS}"
+
+COLLECTD_ALL_PLUGINS=${COLLECTD_TESTED_PLUGINS}
+
+for plugin in ${COLLECTD_ALL_PLUGINS}; do
+	IUSE="${IUSE} collectd_plugins_${plugin}"
+done
+unset plugin
+
+# Now come the dependencies.
+
+COMMON_DEPEND="
+	dev-libs/libgcrypt:=
+	dev-libs/libltdl:0=
+	perl?					( dev-lang/perl:=[ithreads] )
+	udev?					( virtual/udev )
+	xfs?					( sys-fs/xfsprogs )
+	collectd_plugins_amqp?			( net-libs/rabbitmq-c )
+	collectd_plugins_apache?		( net-misc/curl:0= )
+	collectd_plugins_ascent?		( net-misc/curl:0= dev-libs/libxml2:2= )
+	collectd_plugins_bind?			( dev-libs/libxml2:2= )
+	collectd_plugins_ceph?			( dev-libs/yajl:= )
+	collectd_plugins_curl?			( net-misc/curl:0= )
+	collectd_plugins_curl_json?		( net-misc/curl:0= dev-libs/yajl:= )
+	collectd_plugins_curl_xml?		( net-misc/curl:0= dev-libs/libxml2:2= )
+	collectd_plugins_dbi?			( dev-db/libdbi )
+	collectd_plugins_dns?			( net-libs/libpcap )
+	collectd_plugins_gmond?			( sys-cluster/ganglia )
+	collectd_plugins_ipmi?			( >=sys-libs/openipmi-2.0.16-r1 )
+	collectd_plugins_iptables?		( >=net-firewall/iptables-1.4.13:0= )
+	collectd_plugins_log_logstash?		( dev-libs/yajl:= )
+	collectd_plugins_lvm?			( sys-fs/lvm2 )
+	collectd_plugins_memcachec?		( dev-libs/libmemcached )
+	collectd_plugins_modbus?		( dev-libs/libmodbus )
+	collectd_plugins_mysql?			( >=virtual/mysql-5.0 )
+	collectd_plugins_netlink?		( net-libs/libmnl )
+	collectd_plugins_nginx?			( net-misc/curl:0= )
+	collectd_plugins_notify_desktop?	( x11-libs/libnotify )
+	collectd_plugins_notify_email?		( net-libs/libesmtp )
+	collectd_plugins_nut?			( >=sys-power/nut-2.7.2-r2 )
+	collectd_plugins_openldap?		( net-nds/openldap )
+	collectd_plugins_onewire?		( >=sys-fs/owfs-3.1:= )
+	collectd_plugins_oracle?		( dev-db/oracle-instantclient-basic )
+	collectd_plugins_perl?			( dev-lang/perl:=[ithreads] )
+	collectd_plugins_ping?			( net-libs/liboping )
+	collectd_plugins_postgresql?		( dev-db/postgresql:= )
+	collectd_plugins_python?		( ${PYTHON_DEPS} )
+	collectd_plugins_redis?			( dev-libs/hiredis:= )
+	collectd_plugins_routeros?		( net-libs/librouteros )
+	collectd_plugins_rrdcached?		( net-analyzer/rrdtool:= )
+	collectd_plugins_rrdtool?		( net-analyzer/rrdtool:= )
+	collectd_plugins_sensors?		( sys-apps/lm_sensors )
+	collectd_plugins_sigrok?		( <sci-libs/libsigrok-0.4 )
+	collectd_plugins_smart?			( dev-libs/libatasmart )
+	collectd_plugins_snmp?			( net-analyzer/net-snmp )
+	collectd_plugins_tokyotyrant?		( net-misc/tokyotyrant )
+	collectd_plugins_varnish?		( www-servers/varnish )
+	collectd_plugins_virt?			( app-emulation/libvirt:= dev-libs/libxml2:2= )
+	collectd_plugins_write_http?		( net-misc/curl:0= )
+	collectd_plugins_write_kafka?		( >=dev-libs/librdkafka-0.9.0.99:= )
+	collectd_plugins_write_redis?		( dev-libs/hiredis:= )
+	collectd_plugins_write_riemann?		( dev-libs/protobuf-c:= )
+
+	kernel_FreeBSD? (
+		collectd_plugins_disk?		( sys-libs/libstatgrab:= )
+		collectd_plugins_interface?	( sys-libs/libstatgrab:= )
+		collectd_plugins_load?		( sys-libs/libstatgrab:= )
+		collectd_plugins_memory?	( sys-libs/libstatgrab:= )
+		collectd_plugins_swap?		( sys-libs/libstatgrab:= )
+		collectd_plugins_users?		( sys-libs/libstatgrab:= )
+	)"
+
+# Enforcing <=sys-kernel/linux-headers-4.4 due to #577846
+DEPEND="${COMMON_DEPEND}
+	collectd_plugins_genericjmx?		( >=virtual/jdk-1.6 )
+	collectd_plugins_iptables?		( <=sys-kernel/linux-headers-4.4 )
+	collectd_plugins_java?			( >=virtual/jdk-1.6 )
+	virtual/pkgconfig"
+
+RDEPEND="${COMMON_DEPEND}
+	collectd_plugins_genericjmx?		( >=virtual/jre-1.6 )
+	collectd_plugins_java?			( >=virtual/jre-1.6 )
+	collectd_plugins_syslog?		( virtual/logger )
+	selinux?				( sec-policy/selinux-collectd )"
+
+REQUIRED_USE="
+	collectd_plugins_genericjmx?		( java )
+	collectd_plugins_java?			( java )
+	collectd_plugins_python?		( ${PYTHON_REQUIRED_USE} )
+	collectd_plugins_smart?			( udev )"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-4.10.3-werror.patch
+	"${FILESDIR}"/${PN}-5.5.1-{libocci,lt,nohal}.patch
+	"${FILESDIR}"/${PN}-5.5.2-issue-{1870,1877}.patch
+)
+
+# @FUNCTION: collectd_plugin_kernel_linux
+# @DESCRIPTION:
+# USAGE: <plugin name> <kernel_options> <severity>
+# kernel_options is a list of kernel configurations options; the check tests whether at least
+#   one of them is enabled. If no, depending on the third argument an elog, ewarn, or eerror message
+#   is emitted.
+collectd_plugin_kernel_linux() {
+	local multi_opt opt
+	if has ${1} ${COLLECTD_ALL_PLUGINS}; then
+		if use collectd_plugins_${1}; then
+			for opt in ${2}; do
+				if linux_chkconfig_present ${opt}; then
+					return 0;
+				fi
+			done
+			multi_opt=${2//\ /\ or\ }
+			case ${3} in
+				(info)
+					elog "The ${1} plugin can use kernel features that are disabled now; enable ${multi_opt} in your kernel"
+				;;
+				(warn)
+					ewarn "The ${1} plugin uses kernel features that are disabled now; enable ${multi_opt} in your kernel"
+				;;
+				(error)
+					eerror "The ${1} plugin needs kernel features that are disabled now; enable ${multi_opt} in your kernel"
+				;;
+				(*)
+					die "function collectd_plugin_kernel_linux called with invalid third argument"
+				;;
+			esac
+		fi
+	fi
+}
+
+collectd_linux_kernel_checks() {
+	if ! linux_chkconfig_present PROC_FS; then
+		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"
+	fi
+
+	if ! linux_chkconfig_present SYSFS; then
+		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"
+	fi
+
+	# battery.c: /proc/pmu/battery_%i
+	# battery.c: /proc/acpi/battery
+	collectd_plugin_kernel_linux battery ACPI_BATTERY warn
+
+	# cgroups.c: /sys/fs/cgroup/
+	collectd_plugin_kernel_linux cgroups CGROUPS warn
+
+	# cpufreq.c: /sys/devices/system/cpu/cpu%d/cpufreq/
+	collectd_plugin_kernel_linux cpufreq SYSFS warn
+	collectd_plugin_kernel_linux cpufreq CPU_FREQ_STAT warn
+
+	# drbd.c: /proc/drbd
+	collectd_plugin_kernel_linux drbd BLK_DEV_DRBD warn
+
+	# conntrack.c: /proc/sys/net/netfilter/*
+	collectd_plugin_kernel_linux conntrack NETFILTER warn
+
+	# fscache.c: /proc/fs/fscache/stats
+	collectd_plugin_kernel_linux fscache FSCACHE warn
+
+	# nfs.c: /proc/net/rpc/nfs
+	# nfs.c: /proc/net/rpc/nfsd
+	collectd_plugin_kernel_linux nfs NFS_COMMON warn
+
+	# serial.c: /proc/tty/driver/serial
+	# serial.c: /proc/tty/driver/ttyS
+	collectd_plugin_kernel_linux serial SERIAL_CORE warn
+
+	# swap.c: /proc/meminfo
+	collectd_plugin_kernel_linux swap SWAP warn
+
+	# thermal.c: /proc/acpi/thermal_zone
+	# thermal.c: /sys/class/thermal
+	collectd_plugin_kernel_linux thermal ACPI_THERMAL warn
+
+	# turbostat.c: /dev/cpu/%d/msr
+	collectd_plugin_kernel_linux turbostat X86_MSR warn
+
+	# vmem.c: /proc/vmstat
+	collectd_plugin_kernel_linux vmem VM_EVENT_COUNTERS warn
+
+	# vserver.c: /proc/virtual
+	collectd_plugin_kernel_linux vserver VSERVER warn
+
+	# uuid.c: /sys/hypervisor/uuid
+	collectd_plugin_kernel_linux uuid SYSFS info
+
+	# wireless.c: /proc/net/wireless
+	collectd_plugin_kernel_linux wireless "WIRELESS MAC80211 IEEE80211" warn
+
+	# zfs_arc.c: /proc/spl/kstat/zfs/arcstats
+	collectd_plugin_kernel_linux zfs_arc "SPL ZFS" warn
+}
+
+pkg_setup() {
+	if use kernel_linux; then
+		linux-info_pkg_setup
+
+		if linux_config_exists; then
+			einfo "Checking your linux kernel configuration:"
+			collectd_linux_kernel_checks
+		else
+			elog "Cannot find a linux kernel configuration. Continuing anyway."
+		fi
+	fi
+
+	if use collectd_plugins_java || use collectd_plugins_genericjmx; then
+		java-pkg-opt-2_pkg_setup
+	fi
+
+	use collectd_plugins_python && python-single-r1_pkg_setup
+
+	enewgroup collectd
+	enewuser collectd -1 -1 /var/lib/collectd collectd
+}
+
+src_prepare() {
+	default
+
+	# There's some strange prefix handling in the default config file, resulting in
+	# paths like "/usr/var/..."
+	sed -i -e "s:@prefix@/var:/var:g" src/collectd.conf.in || die
+
+	sed -i -e "s:/etc/collectd/collectd.conf:/etc/collectd.conf:g" contrib/collectd.service || die
+
+	# fix installdirs for perl, bug 444360
+	sed -i -e 's/INSTALL_BASE=$(DESTDIR)$(prefix) //' bindings/Makefile.am || die
+
+	if use collectd_plugins_java || use collectd_plugins_genericjmx; then
+		# Set javac -source and -target flags according to (R)DEPEND.
+		sed -i -e "s/\$(JAVAC)/\0 $(java-pkg_javac-args)/g" bindings/java/Makefile.am || die
+	fi
+
+	ebegin "Removing bundled libltdl"
+	rm -r libltdl || die
+	eend 0
+
+	eautoreconf
+}
+
+src_configure() {
+	# Now come the lists of os-dependent plugins. Any plugin that is not listed anywhere here
+	# should work independent of the operating system.
+
+	local linux_plugins="barometer battery cpu cpufreq disk drbd entropy
+		ethstat interface iptables ipvs irq ipc load memory md netlink nfs
+		numa processes serial swap tcpconns thermal turbostat users vmem
+		wireless zfc_arc"
+
+	local need_libstatgrab=0
+	local libstatgrab_plugins="cpu disk interface load memory swap users"
+	local bsd_plugins="cpu tcpconns ${libstatgrab_plugins} zfc_arc"
+
+	local darwin_plugins="apple_sensors battery cpu disk interface memory processes tcpconns"
+
+	local osdependent_plugins="${linux_plugins} ${bsd_plugins} ${darwin_plugins}"
+	local myos_plugins=""
+	if use kernel_linux; then
+		einfo "Enabling Linux plugins."
+		myos_plugins=${linux_plugins}
+	elif use kernel_FreeBSD; then
+		einfo "Enabling FreeBSD plugins."
+		myos_plugins=${bsd_plugins}
+	elif use kernel_Darwin; then
+		einfo "Enabling Darwin plugins."
+		myos_plugins=${darwin_plugins}
+	fi
+
+	# Do we debug?
+	local myconf="$(use_enable debug)"
+
+	# udev support?
+	# Required for smart plugin via REQUIRED_USE; Optional for disk plugin
+	if use udev; then
+		myconf+=" --with-libudev"
+	else
+		myconf+=" --without-libudev"
+	fi
+
+	local plugin
+
+	# Disable what needs to be disabled.
+	for plugin in ${COLLECTD_DISABLED_PLUGINS}; do
+		myconf+=" --disable-${plugin}"
+	done
+
+	# Set enable/disable for each single plugin.
+	for plugin in ${COLLECTD_ALL_PLUGINS}; do
+		if has ${plugin} ${osdependent_plugins}; then
+			# plugin is os-dependent ...
+			if has ${plugin} ${myos_plugins}; then
+				# ... and available in this os
+				myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
+				# ... must we link against libstatgrab? Bug #541518
+				if use kernel_FreeBSD && has ${plugin} ${libstatgrab_plugins}; then
+					einfo "We must link against libstatgrab due to plugin \"${plugin}\" ..."
+					need_libstatgrab=1
+				fi
+			else
+				# ... and NOT available in this os
+				if use collectd_plugins_${plugin}; then
+					ewarn "You try to enable the ${plugin} plugin, but it is not available for this"
+					ewarn "kernel. Disabling it automatically."
+				fi
+				myconf+=" --disable-${plugin}"
+			fi
+		elif [[ "${plugin}" = "collectd_plugins_perl" ]]; then
+			if use collectd_plugins_perl && ! use perl; then
+				ewarn "Perl plugin disabled as perl bindings disabled by -perl use flag"
+				myconf+= --disable-perl
+			else
+				myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
+			fi
+		else
+			myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
+		fi
+	done
+
+	if [ "${need_libstatgrab}" -eq 1 ]; then
+		myconf+=" --with-libstatgrab"
+	else
+		myconf+=" --without-libstatgrab"
+	fi
+
+	# JAVA_HOME is set by eclasses.
+	if use collectd_plugins_java || use collectd_plugins_genericjmx; then
+		myconf+=" --with-java"
+	fi
+
+	# Need libiptc ONLY for iptables. If we try to use it otherwise bug 340109 happens.
+	# lots of libs are only needed for plugins, if they are disabled, also disable the lib
+	use collectd_plugins_iptables || myconf+=" --with-libiptc=no"
+	use collectd_plugins_openldap || myconf+=" --with-libldap=no"
+	use collectd_plugins_redis    || use collectd_plugins_write_redis || myconf+=" --with-libhiredis=no"
+	use collectd_plugins_smart    || myconf+=" --with-libatasmart=no"
+	use collectd_plugins_virt     || myconf+=" --with-libvirt=no"
+
+	if use perl; then
+		myconf+=" --with-perl-bindings=INSTALLDIRS=vendor"
+	else
+		myconf+=" --without-perl-bindings"
+	fi
+
+	# No need for v5upgrade
+	myconf+=" --disable-target_v5upgrade"
+
+	# Finally, run econf.
+	KERNEL_DIR="${KERNEL_DIR}" econf --config-cache --disable-ltdl-install \
+		--without-included-ltdl $(use_enable static-libs static) \
+		--localstatedir=/var ${myconf}
+
+	if ! use xfs; then
+		# Workaround for https://github.com/collectd/collectd/issues/1878
+		einfo "Disabling XFS support ..."
+		sed -i -e "s/HAVE_XFS_XQM_H 1/HAVE_XFS_XQM_H 0/" src/config.h || die
+	fi
+}
+
+src_install() {
+	emake DESTDIR="${D%/}" install
+
+	perl_delete_localpod
+
+	find "${ED}"usr/ -name "*.la" -delete || die
+
+	if use collectd_plugins_java || use collectd_plugins_genericjmx; then
+		java-pkg_regjar "${ED}"usr/share/${PN}/java/*.jar
+	fi
+
+	fowners root:collectd /etc/collectd.conf
+	fperms u=rw,g=r,o= /etc/collectd.conf
+
+	dodoc AUTHORS ChangeLog NEWS README TODO
+
+	if use contrib ; then
+		insinto /usr/share/doc/${PF}
+		doins -r contrib
+	fi
+
+	keepdir /var/lib/${PN}
+	fowners collectd:collectd /var/lib/${PN}
+
+	newinitd "${FILESDIR}/${PN}.initd-r1" ${PN}
+	newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
+	systemd_dounit "contrib/${PN}.service"
+
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+	sed -i -e 's:^.*PIDFile     "/var/run/collectd.pid":PIDFile     "/run/collectd/collectd.pid":' "${ED}"etc/collectd.conf || die
+	sed -i -e 's:^#	SocketFile "/var/run/collectd-unixsock":#	SocketFile "/run/collectd/collectd.socket":' "${ED}"etc/collectd.conf || die
+	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
+	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
+}
+
+pkg_postinst() {
+	local caps=()
+	use collectd_plugins_ping      && caps+=('cap_net_raw')
+	use collectd_plugins_iptables  && caps+=('cap_net_admin')
+	use collectd_plugins_filecount && caps+=('cap_dac_read_search')
+
+	if [ ${#caps[@]} -gt 0 ]; then
+		local caps_str=$(IFS=","; echo "${caps[*]}")
+		fcaps ${caps_str} usr/sbin/collectd
+		elog "Capabilities for ${EROOT}usr/sbin/collectd set to:"
+		elog "  ${caps_str}+ep"
+		elog
+	fi
+
+	elog "Note: Collectd is only the collector."
+	elog "      You need to install 'data' sources (applications) locally or"
+	elog "      remotely on your own."
+
+	elog
+	elog "Collectd is configured to run as unprivileged user by default."
+	elog "You may want to revisit the configuration."
+	elog
+
+	if use collectd_plugins_email; then
+		ewarn "The email plug-in is deprecated. To submit statistics please use the unixsock plugin."
+	fi
+
+	if use contrib; then
+		elog "The scripts in /usr/share/doc/${PF}/collection3 for generating graphs need dev-perl/HTML-Parser,"
+		elog "dev-perl/config-general, dev-perl/regexp-common, and net-analyzer/rrdtool[perl] to be installed."
+	fi
+}

diff --git a/app-admin/collectd/files/collectd-5.5.2-issue-1870.patch b/app-admin/collectd/files/collectd-5.5.2-issue-1870.patch
new file mode 100644
index 0000000..6497271
--- /dev/null
+++ b/app-admin/collectd/files/collectd-5.5.2-issue-1870.patch
@@ -0,0 +1,127 @@
+From 262915c450f3a45579069212560ca9715aa5bd4b Mon Sep 17 00:00:00 2001
+From: Florian Forster <octo@collectd.org>
+Date: Tue, 26 Jul 2016 08:54:42 +0200
+Subject: [PATCH] network plugin: Fix error message for GCRYCTL_INIT_SECMEM
+ failure.
+
+---
+ src/network.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/network.c b/src/network.c
+index b347f4a..45f2436 100644
+--- a/src/network.c
++++ b/src/network.c
+@@ -527,7 +527,7 @@ static void network_init_gcrypt (void) /* {{{ */
+   err = gcry_control (GCRYCTL_INIT_SECMEM, 32768);
+   if (err)
+   {
+-    ERROR ("network plugin: gcry_control (GCRYCTL_SET_THREAD_CBS) failed: %s", gcry_strerror (err));
++    ERROR ("network plugin: gcry_control (GCRYCTL_INIT_SECMEM) failed: %s", gcry_strerror (err));
+     abort ();
+   }
+ 
+--
+2.9.2
+
+
+From a3000cbe3a12163148a28c818269bbdabda1cf5c Mon Sep 17 00:00:00 2001
+From: Sebastian Harl <sh@tokkee.org>
+Date: Wed, 27 Jul 2016 09:45:48 +0200
+Subject: [PATCH] network plugin: Don't abort() if gcrypt initialization
+ failed.
+
+Instead, report an error and let plugin initialization fail.
+---
+ src/network.c | 31 +++++++++++++++++++++++--------
+ 1 file changed, 23 insertions(+), 8 deletions(-)
+
+diff --git a/src/network.c b/src/network.c
+index 45f2436..71eb1f2 100644
+--- a/src/network.c
++++ b/src/network.c
+@@ -496,7 +496,7 @@ static int network_dispatch_notification (notification_t *n) /* {{{ */
+ } /* }}} int network_dispatch_notification */
+ 
+ #if HAVE_LIBGCRYPT
+-static void network_init_gcrypt (void) /* {{{ */
++static int network_init_gcrypt (void) /* {{{ */
+ {
+   gcry_error_t err;
+ 
+@@ -504,7 +504,7 @@ static void network_init_gcrypt (void) /* {{{ */
+    * Because you can't know in a library whether another library has
+    * already initialized the library */
+   if (gcry_control (GCRYCTL_ANY_INITIALIZATION_P))
+-    return;
++    return (0);
+ 
+  /* http://www.gnupg.org/documentation/manuals/gcrypt/Multi_002dThreading.html
+   * To ensure thread-safety, it's important to set GCRYCTL_SET_THREAD_CBS
+@@ -518,7 +518,7 @@ static void network_init_gcrypt (void) /* {{{ */
+   if (err)
+   {
+     ERROR ("network plugin: gcry_control (GCRYCTL_SET_THREAD_CBS) failed: %s", gcry_strerror (err));
+-    abort ();
++    return (-1);
+   }
+ # endif
+ 
+@@ -528,11 +528,12 @@ static void network_init_gcrypt (void) /* {{{ */
+   if (err)
+   {
+     ERROR ("network plugin: gcry_control (GCRYCTL_INIT_SECMEM) failed: %s", gcry_strerror (err));
+-    abort ();
++    return (-1);
+   }
+ 
+   gcry_control (GCRYCTL_INITIALIZATION_FINISHED);
+-} /* }}} void network_init_gcrypt */
++  return (0);
++} /* }}} int network_init_gcrypt */
+ 
+ static gcry_cipher_hd_t network_get_aes256_cypher (sockent_t *se, /* {{{ */
+     const void *iv, size_t iv_size, const char *username)
+@@ -2066,7 +2067,12 @@ static int sockent_init_crypto (sockent_t *se) /* {{{ */
+ 	{
+ 		if (se->data.client.security_level > SECURITY_LEVEL_NONE)
+ 		{
+-			network_init_gcrypt ();
++			if (network_init_gcrypt () < 0)
++			{
++				ERROR ("network plugin: Cannot configure client socket with "
++						"security: Failed to initialize crypto library.");
++				return (-1);
++			}
+ 
+ 			if ((se->data.client.username == NULL)
+ 					|| (se->data.client.password == NULL))
+@@ -2086,7 +2092,12 @@ static int sockent_init_crypto (sockent_t *se) /* {{{ */
+ 	{
+ 		if (se->data.server.security_level > SECURITY_LEVEL_NONE)
+ 		{
+-			network_init_gcrypt ();
++			if (network_init_gcrypt () < 0)
++			{
++				ERROR ("network plugin: Cannot configure server socket with "
++						"security: Failed to initialize crypto library.");
++				return (-1);
++			}
+ 
+ 			if (se->data.server.auth_file == NULL)
+ 			{
+@@ -3519,7 +3530,11 @@ static int network_init (void)
+ 	have_init = 1;
+ 
+ #if HAVE_LIBGCRYPT
+-	network_init_gcrypt ();
++	if (network_init_gcrypt () < 0)
++	{
++		ERROR ("network plugin: Failed to initialize crypto library.");
++		return (-1);
++	}
+ #endif
+ 
+ 	if (network_config_stats != 0)
+--
+2.9.2

diff --git a/app-admin/collectd/files/collectd-5.5.2-issue-1877.patch b/app-admin/collectd/files/collectd-5.5.2-issue-1877.patch
new file mode 100644
index 0000000..658dc1e
--- /dev/null
+++ b/app-admin/collectd/files/collectd-5.5.2-issue-1877.patch
@@ -0,0 +1,37 @@
+[PATCH 5/5] Fix compilation against >=xfsprogs-4.7.0
+
+Gentoo-Bug: https://bugs.gentoo.org/590998
+Bug: https://github.com/collectd/collectd/issues/1877
+---
+ src/utils_mount.c | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/src/utils_mount.c b/src/utils_mount.c
+index da53b98..37b52d6 100644
+--- a/src/utils_mount.c
++++ b/src/utils_mount.c
+@@ -24,16 +24,17 @@
+ # include "config.h"
+ #endif
+ 
++#define _GNU_SOURCE
++
++#include "collectd.h"
++#include "utils_mount.h"
++
+ #if HAVE_XFS_XQM_H
+-# define _GNU_SOURCE
+ # include <xfs/xqm.h>
+ #define XFS_SUPER_MAGIC_STR "XFSB"
+ #define XFS_SUPER_MAGIC2_STR "BSFX"
+ #endif
+ 
+-#include "collectd.h"
+-#include "utils_mount.h"
+-
+ #include "common.h" /* sstrncpy() et alii */
+ #include "plugin.h" /* ERROR() macro */
+ 
+-- 
+2.9.2
+

diff --git a/app-admin/collectd/metadata.xml b/app-admin/collectd/metadata.xml
index 95f0467..29a819a 100644
--- a/app-admin/collectd/metadata.xml
+++ b/app-admin/collectd/metadata.xml
@@ -151,5 +151,6 @@
 		<flag name="filecaps">When set collectd daemon will have set required capabilities to run most plugins even if run as unprivileged user</flag>
 		<flag name="java">Must be set (workaround for java-pkg-opt-2 eclass limitation) when you want java or genericjmx plugin</flag>
 		<flag name="udev">Enable optional udev usage in disk plugin; Required for smart plugin</flag>
+		<flag name="xfs">Enable optional capability to filter on XFS file system in df plugin; Requires XFS headers from <pkg>sys-fs/xfsprogs</pkg></flag>
 	</use>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-admin/collectd/files/, app-admin/collectd/
@ 2016-03-29 13:53 Ian Delaney
  0 siblings, 0 replies; 10+ messages in thread
From: Ian Delaney @ 2016-03-29 13:53 UTC (permalink / raw
  To: gentoo-commits

commit:     5fb0a46e73890b4189cdeb73523e1dde0cea9429
Author:     Thomas D <whissi <AT> whissi <DOT> de>
AuthorDate: Mon Mar 28 17:28:15 2016 +0000
Commit:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Tue Mar 29 13:42:09 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5fb0a46e

app-admin/collectd: Revbump to fix multiple issues

- Fix building with sys-fs/xfsprogs-4.5.0 (upstream issues #1637)

- Workaround for bug #577846 applied

  We are now enforcing <=sys-kernel/linux-headers-4.4 when building
  collectd_plugins_iptables until the problem gets fixed in
  non-collectd upstram.

- virtual/udev dependency is now optional for disk plugin

Package-Manager: portage-2.2.28
Closes: https://github.com/gentoo/gentoo/pull/1156

Signed-off-by: Ian Delaney <idella4 <AT> gentoo.org>

 ...td-5.5.1-r1.ebuild => collectd-5.5.1-r2.ebuild} | 23 ++++++--
 .../collectd/files/collectd-5.5.1-issue-1637.patch | 68 ++++++++++++++++++++++
 app-admin/collectd/metadata.xml                    |  3 +
 3 files changed, 89 insertions(+), 5 deletions(-)

diff --git a/app-admin/collectd/collectd-5.5.1-r1.ebuild b/app-admin/collectd/collectd-5.5.1-r2.ebuild
similarity index 96%
rename from app-admin/collectd/collectd-5.5.1-r1.ebuild
rename to app-admin/collectd/collectd-5.5.1-r2.ebuild
index 441d156..13b5778 100644
--- a/app-admin/collectd/collectd-5.5.1-r1.ebuild
+++ b/app-admin/collectd/collectd-5.5.1-r2.ebuild
@@ -16,7 +16,7 @@ SRC_URI="${HOMEPAGE}/files/${P}.tar.bz2"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE="contrib debug java kernel_Darwin kernel_FreeBSD kernel_linux perl selinux static-libs"
+IUSE="contrib debug java kernel_Darwin kernel_FreeBSD kernel_linux perl selinux static-libs udev"
 
 # The plugin lists have to follow here since they extend IUSE
 
@@ -65,6 +65,7 @@ COMMON_DEPEND="
 	dev-libs/libgcrypt:=
 	sys-devel/libtool
 	perl?					( dev-lang/perl:=[ithreads] )
+	udev?					( virtual/udev )
 	collectd_plugins_amqp?			( net-libs/rabbitmq-c )
 	collectd_plugins_apache?		( net-misc/curl )
 	collectd_plugins_ascent?		( net-misc/curl dev-libs/libxml2 )
@@ -74,7 +75,6 @@ COMMON_DEPEND="
 	collectd_plugins_curl_json?		( net-misc/curl dev-libs/yajl )
 	collectd_plugins_curl_xml?		( net-misc/curl dev-libs/libxml2:= )
 	collectd_plugins_dbi?			( dev-db/libdbi )
-	collectd_plugins_disk?			( virtual/udev )
 	collectd_plugins_dns?			( net-libs/libpcap )
 	collectd_plugins_genericjmx?		( virtual/jre:= dev-java/java-config-wrapper )
 	collectd_plugins_gmond?			( sys-cluster/ganglia )
@@ -104,7 +104,7 @@ COMMON_DEPEND="
 	collectd_plugins_rrdtool?		( net-analyzer/rrdtool )
 	collectd_plugins_sensors?		( sys-apps/lm_sensors )
 	collectd_plugins_sigrok?		( sci-libs/libsigrok )
-	collectd_plugins_smart?			( virtual/udev dev-libs/libatasmart )
+	collectd_plugins_smart?			( dev-libs/libatasmart )
 	collectd_plugins_snmp?			( net-analyzer/net-snmp )
 	collectd_plugins_tokyotyrant?		( net-misc/tokyotyrant )
 	collectd_plugins_varnish?		( www-servers/varnish )
@@ -123,8 +123,12 @@ COMMON_DEPEND="
 		collectd_plugins_users?		( sys-libs/libstatgrab:= )
 	)"
 
+# Enforcing <=sys-kernel/linux-headers-4.4 due to #577846
 DEPEND="${COMMON_DEPEND}
+	collectd_plugins_cgroups?		( sys-fs/xfsprogs )
+	collectd_plugins_df?			( sys-fs/xfsprogs )
 	collectd_plugins_genericjmx?		( >=virtual/jdk-1.6 )
+	collectd_plugins_iptables?		( <=sys-kernel/linux-headers-4.4 )
 	collectd_plugins_java?			( >=virtual/jdk-1.6 )
 	virtual/pkgconfig"
 
@@ -135,11 +139,12 @@ RDEPEND="${COMMON_DEPEND}
 REQUIRED_USE="
 	collectd_plugins_genericjmx?		( java )
 	collectd_plugins_java?			( java )
-	collectd_plugins_python?		( ${PYTHON_REQUIRED_USE} )"
+	collectd_plugins_python?		( ${PYTHON_REQUIRED_USE} )
+	collectd_plugins_smart			( udev )"
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-4.10.3-werror.patch
-	"${FILESDIR}"/${PN}-5.5.1-{libocci,lt,nohal}.patch
+	"${FILESDIR}"/${PN}-5.5.1-{libocci,lt,nohal,issue-1637}.patch
 )
 
 # @FUNCTION: collectd_plugin_kernel_linux
@@ -316,6 +321,14 @@ src_configure() {
 	# Do we debug?
 	local myconf="$(use_enable debug)"
 
+	# udev support?
+	# Required for smart plugin via REQUIRED_USE; Optional for disk plugin
+	if use udev; then
+		myconf+=" --with-libudev"
+	else
+		myconf+=" --without-libudev"
+	fi
+
 	local plugin
 
 	# Disable what needs to be disabled.

diff --git a/app-admin/collectd/files/collectd-5.5.1-issue-1637.patch b/app-admin/collectd/files/collectd-5.5.1-issue-1637.patch
new file mode 100644
index 0000000..89baa12
--- /dev/null
+++ b/app-admin/collectd/files/collectd-5.5.1-issue-1637.patch
@@ -0,0 +1,68 @@
+From 7630585ca596af6334f89db26272d80f4ef02a8a Mon Sep 17 00:00:00 2001
+From: Ruben Kerkhof <ruben@rubenkerkhof.com>
+Date: Sat, 26 Mar 2016 18:18:44 +0100
+Subject: [PATCH 4/4] Fix building with xfsprogs 4.5.0
+
+commit 865a6c83250e3d4381596a0d937df31d563f97c6 upstream.
+
+xfsprogs 4.5.0 started to use off64_t in its headers,
+which is hidden behind _GNU_SOURCE
+
+Fixes #1637
+---
+ configure.ac      |  7 ++++++-
+ src/utils_mount.c | 13 ++++++++-----
+ 2 files changed, 14 insertions(+), 6 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 129b9d4..a2058d0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -593,7 +593,12 @@ AC_CHECK_HEADERS(linux/un.h, [], [],
+ #endif
+ ])
+ 
+-AC_CHECK_HEADERS(pwd.h grp.h sys/un.h ctype.h limits.h xfs/xqm.h fs_info.h fshelp.h paths.h mntent.h mnttab.h sys/fstyp.h sys/fs_types.h sys/mntent.h sys/mnttab.h sys/statfs.h sys/statvfs.h sys/vfs.h sys/vfstab.h sys/vmmeter.h kvm.h wordexp.h locale.h)
++AC_CHECK_HEADERS(pwd.h grp.h sys/un.h ctype.h limits.h fs_info.h fshelp.h paths.h mntent.h mnttab.h sys/fstyp.h sys/fs_types.h sys/mntent.h sys/mnttab.h sys/statfs.h sys/statvfs.h sys/vfs.h sys/vfstab.h sys/vmmeter.h kvm.h wordexp.h locale.h)
++
++AC_CHECK_HEADERS([xfs/xqm.h], [], [],
++[
++#define _GNU_SOURCE
++])
+ 
+ # For the dns plugin
+ AC_CHECK_HEADERS(arpa/nameser.h)
+diff --git a/src/utils_mount.c b/src/utils_mount.c
+index f2b7943..cf5e97a 100644
+--- a/src/utils_mount.c
++++ b/src/utils_mount.c
+@@ -21,18 +21,21 @@
+  *   Niki W. Waibel <niki.waibel@gmx.net>
+ **/
+ 
+-#include "collectd.h"
+-#include "utils_mount.h"
+-
+-#include "common.h" /* sstrncpy() et alii */
+-#include "plugin.h" /* ERROR() macro */
++#if HAVE_CONFIG_H
++# include "config.h"
++#endif
+ 
+ #if HAVE_XFS_XQM_H
++# define _GNU_SOURCE
+ # include <xfs/xqm.h>
+ #define XFS_SUPER_MAGIC_STR "XFSB"
+ #define XFS_SUPER_MAGIC2_STR "BSFX"
+ #endif
+ 
++#include "common.h"
++#include "plugin.h"
++#include "utils_mount.h"
++
+ #if HAVE_GETVFSSTAT
+ #  if HAVE_SYS_TYPES_H
+ #    include <sys/types.h>
+-- 
+2.7.4
+

diff --git a/app-admin/collectd/metadata.xml b/app-admin/collectd/metadata.xml
index 7b80d9c..b3df3aa 100644
--- a/app-admin/collectd/metadata.xml
+++ b/app-admin/collectd/metadata.xml
@@ -33,6 +33,7 @@
 		<flag name="collectd_plugins_apache">Build the apache input plugin (collects statistics from Apache's mod_status module)</flag>
 		<flag name="collectd_plugins_apcups">Build the apcups input plugin (reads various statistics about a connected uninterruptible power supply (UPS))</flag>
 		<flag name="collectd_plugins_ascent">Build the ascent input plugin (reads and parses the statistics page of Ascent)</flag>
+		<flag name="collectd_plugins_barometer">Build the barometer input plugin (reads sensor data from various Freescale and Bosch digital barometers)</flag>
 		<flag name="collectd_plugins_battery">Build the battery input plugin (collects the battery's charge, the drawn current and the battery's voltage)</flag>
 		<flag name="collectd_plugins_bind">Build the bind input plugin (collects statistics from bind instances)</flag>
 		<flag name="collectd_plugins_ceph">Build the Ceph input plugin (collects statistics from the Ceph distributed storage system)</flag>
@@ -145,6 +146,7 @@
 		<flag name="collectd_plugins_write_http">Build the write_http output plugin (sends metrics to a web-server using HTTP POST requests)</flag>
 		<flag name="collectd_plugins_write_kafka">Build the Kafka output plugin (sends metrics to Apache Kafka)</flag>
 		<flag name="collectd_plugins_write_log">Build the write_log output plugin (writes metrics to a file)</flag>
+		<flag name="collectd_plugins_write_mongodb">Build the MongoDB output plugin (writes metrics to a MongoDB)</flag>
 		<flag name="collectd_plugins_write_redis">Build the Redis output plugin (stores values in Redis)</flag>
 		<flag name="collectd_plugins_write_riemann">Build the Riemann output plugin (stores values in Riemann, a stream processing and monitoring system)</flag>
 		<flag name="collectd_plugins_write_sensu">Build the Sensu output plugin (sends metrics to Sensu Core, an open-source monitoring project)</flag>
@@ -154,5 +156,6 @@
 		<flag name="contrib">Install user-contributed files in the doc directory</flag>
 		<flag name="filecaps">When set collectd daemon will have set required capabilities to run most plugins even if run as unprivileged user</flag>
 		<flag name="java">Must be set (workaround for java-pkg-opt-2 eclass limitation) when you want java or genericjmx plugin</flag>
+		<flag name="udev">Enable optional udev usage in disk plugin; Required for smart plugin</flag>
 	</use>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-admin/collectd/files/, app-admin/collectd/
@ 2016-03-23 23:41 Ian Delaney
  0 siblings, 0 replies; 10+ messages in thread
From: Ian Delaney @ 2016-03-23 23:41 UTC (permalink / raw
  To: gentoo-commits

commit:     cf1113f83d2502056f28f2daa9e8bae796f11576
Author:     Thomas D <whissi <AT> whissi <DOT> de>
AuthorDate: Mon Mar 21 00:10:49 2016 +0000
Commit:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Wed Mar 23 23:41:25 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf1113f8

app-admin/collectd: Dropped old

Package-Manager: portage-2.2.28
Closes: https://github.com/gentoo/gentoo/pull/1101

 app-admin/collectd/Manifest                        |   2 -
 app-admin/collectd/collectd-5.4.1-r2.ebuild        | 386 --------------------
 app-admin/collectd/collectd-5.5.0.ebuild           | 398 ---------------------
 app-admin/collectd/collectd-5.5.1.ebuild           |   2 +-
 .../collectd/files/collectd-5.4.1-libocci.patch    |  21 --
 .../collectd/files/collectd-5.4.1-libperl.patch    |  29 --
 app-admin/collectd/files/collectd-5.4.1-lt.patch   |  32 --
 .../collectd/files/collectd-5.4.1-nohal.patch      |  24 --
 app-admin/collectd/files/collectd-5.5.0-lt.patch   |  35 --
 app-admin/collectd/files/collectd.confd            |  22 --
 app-admin/collectd/files/collectd.initd            |  62 ----
 .../files/{logrotate => collectd.logrotate}        |   0
 app-admin/collectd/metadata.xml                    |   1 -
 13 files changed, 1 insertion(+), 1013 deletions(-)

diff --git a/app-admin/collectd/Manifest b/app-admin/collectd/Manifest
index c44ebaf..fd5ba08 100644
--- a/app-admin/collectd/Manifest
+++ b/app-admin/collectd/Manifest
@@ -1,3 +1 @@
-DIST collectd-5.4.1.tar.bz2 1521907 SHA256 75452129f271cb0aad28e57f12a49070618bbb7b6a9d64cf869e8766fa2f66e0 SHA512 96289f52d3d1da55c862ae9ee2f57972682d7eab87387e97efa41fb5197599e097abd71aed2fe014e26af37c9ae98471e06dd181c725849976242642ce5c9492 WHIRLPOOL 2ed85b9d6d00c4e7dc6af236b637e282f17c6c0b20c1ba3da9c12ea85c5fdea1add2e29165874c7e9620852e422282d489436a4e245b161902f8926185edec16
-DIST collectd-5.5.0.tar.bz2 1824495 SHA256 847684cf5c10de1dc34145078af3fcf6e0d168ba98c14f1343b1062a4b569e88 SHA512 d2c2840f681c10345e02ad8df0f7c581dcb45bee276589fcd96b3dadd281a79ebb3b9a34a186242ef41285dde7fc505432376138ff4f72c4f60f1b840e640017 WHIRLPOOL 6223ca363984ab3777ca89e2cd5011f059b6ca7f5c66c5e7325d3155ce38ef2829caced3ad27e4d5016c5fdba59bb21b9b47d840ea0c4d164c3674b6ee5062ac
 DIST collectd-5.5.1.tar.bz2 1797852 SHA256 f9c5d526e1f0429a7db1ccd90bdf9e23923a2fd43b7285cfda8f0341e5c0bc3f SHA512 1935809571b8f0e0870399385312a5687f441d11e08a0c7d1337384b3790c3436ba84f89226aad979584045cc13bdf88f1350a0f49c94bcd0dbcf12ae4704dae WHIRLPOOL 3efeeb9262344a8a1c0aa068e64f5d45ff536d1fc1399b4599143a6e47740d5a33aedf482dbf9110cc5f0345d624fbe71ff00fc6f7afeee891326617f7979e41

diff --git a/app-admin/collectd/collectd-5.4.1-r2.ebuild b/app-admin/collectd/collectd-5.4.1-r2.ebuild
deleted file mode 100644
index feea5d7..0000000
--- a/app-admin/collectd/collectd-5.4.1-r2.ebuild
+++ /dev/null
@@ -1,386 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-GENTOO_DEPEND_ON_PERL="no"
-JAVA_PKG_OPT_USE="collectd_plugins_java"
-# XXX: 5.4.1-r0 stated 2* but it builds fine against 3.4
-PYTHON_COMPAT=( python2_7 )
-
-inherit autotools base eutils java-pkg-opt-2 linux-info multilib perl-app python-single-r1 systemd user
-
-DESCRIPTION="Collects system statistics and provides mechanisms to store the values"
-
-HOMEPAGE="http://collectd.org"
-SRC_URI="${HOMEPAGE}/files/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="contrib debug kernel_linux kernel_FreeBSD kernel_Darwin perl selinux static-libs"
-
-# The plugin lists have to follow here since they extend IUSE
-
-# Plugins that to my knowledge cannot be supported (eg. dependencies not in gentoo)
-COLLECTD_IMPOSSIBLE_PLUGINS="aquaero mic netapp pinba sigrok xmms"
-
-# Plugins that still need some work
-COLLECTD_UNTESTED_PLUGINS="amqp apple_sensors genericjmx ipvs lpar modbus redis
-	tape write_redis zfs_arc"
-
-# Plugins that have been (compile) tested and can be enabled via COLLECTD_PLUGINS
-COLLECTD_TESTED_PLUGINS="aggregation apache apcups ascent battery bind cgroups
-	conntrack contextswitch cpu cpufreq csv curl curl_json curl_xml dbi df disk dns
-	email entropy ethstat exec filecount fscache gmond hddtemp interface ipmi
-	iptables irq java libvirt load logfile lvm madwifi match_empty_counter
-	match_hashed match_regex match_timediff match_value mbmon md memcachec memcached
-	memory multimeter mysql netlink network network nfs nginx notify_desktop
-	notify_email ntpd numa nut olsrd onewire openvpn oracle perl perl ping postgresql
-	powerdns processes protocols python python routeros rrdcached rrdcached rrdtool
-	sensors serial snmp statsd swap syslog table tail target_notification
-	target_replace target_scale target_set tcpconns teamspeak2 ted thermal threshold
-	tokyotyrant unixsock uptime users uuid varnish vmem wireless
-	write_graphite write_http write_mongodb"
-
-COLLECTD_DISABLED_PLUGINS="${COLLECTD_IMPOSSIBLE_PLUGINS} ${COLLECTD_UNTESTED_PLUGINS}"
-
-COLLECTD_ALL_PLUGINS=${COLLECTD_TESTED_PLUGINS}
-
-for plugin in ${COLLECTD_ALL_PLUGINS}; do
-	IUSE="${IUSE} collectd_plugins_${plugin}"
-done
-unset plugin
-
-# Now come the dependencies.
-
-COMMON_DEPEND="
-	dev-libs/libgcrypt:0
-	sys-devel/libtool
-	perl?					( dev-lang/perl:=[ithreads] )
-	collectd_plugins_apache?		( net-misc/curl )
-	collectd_plugins_ascent?		( net-misc/curl dev-libs/libxml2 )
-	collectd_plugins_bind?			( dev-libs/libxml2 )
-	collectd_plugins_curl?			( net-misc/curl )
-	collectd_plugins_curl_json?		( net-misc/curl dev-libs/yajl )
-	collectd_plugins_curl_xml?		( net-misc/curl dev-libs/libxml2 )
-	collectd_plugins_dbi?			( dev-db/libdbi )
-	collectd_plugins_dns?			( net-libs/libpcap )
-	collectd_plugins_gmond?			( sys-cluster/ganglia )
-	collectd_plugins_ipmi?			( >=sys-libs/openipmi-2.0.16-r1 )
-	collectd_plugins_iptables?		( >=net-firewall/iptables-1.4.13 )
-	collectd_plugins_libvirt?		( app-emulation/libvirt dev-libs/libxml2 )
-	collectd_plugins_lvm?			( sys-fs/lvm2 )
-	collectd_plugins_memcachec?		( dev-libs/libmemcached )
-	collectd_plugins_mysql?			( >=virtual/mysql-5.0 )
-	collectd_plugins_netlink?		( net-libs/libmnl )
-	collectd_plugins_nginx?			( net-misc/curl )
-	collectd_plugins_notify_desktop?	( x11-libs/libnotify )
-	collectd_plugins_notify_email?		( net-libs/libesmtp dev-libs/openssl:= )
-	collectd_plugins_nut?			( >=sys-power/nut-2.7.2-r2 )
-	collectd_plugins_onewire?		( sys-fs/owfs )
-	collectd_plugins_oracle?		( dev-db/oracle-instantclient-basic )
-	collectd_plugins_perl?			( dev-lang/perl:=[ithreads] )
-	collectd_plugins_ping?			( net-libs/liboping )
-	collectd_plugins_postgresql?		( dev-db/postgresql:= )
-	collectd_plugins_python?		( ${PYTHON_DEPS} )
-	collectd_plugins_routeros?		( net-libs/librouteros )
-	collectd_plugins_rrdcached?		( net-analyzer/rrdtool )
-	collectd_plugins_rrdtool?		( net-analyzer/rrdtool )
-	collectd_plugins_sensors?		( sys-apps/lm_sensors )
-	collectd_plugins_snmp?			( net-analyzer/net-snmp )
-	collectd_plugins_tokyotyrant?		( net-misc/tokyotyrant )
-	collectd_plugins_varnish?		( www-servers/varnish )
-	collectd_plugins_write_http?		( net-misc/curl )
-	collectd_plugins_write_mongodb?		( dev-libs/mongo-c-driver )
-
-	kernel_FreeBSD? (
-		collectd_plugins_disk?		( sys-libs/libstatgrab )
-		collectd_plugins_interface?	( sys-libs/libstatgrab )
-		collectd_plugins_load?		( sys-libs/libstatgrab )
-		collectd_plugins_memory?	( sys-libs/libstatgrab )
-		collectd_plugins_swap?		( sys-libs/libstatgrab )
-		collectd_plugins_users?		( sys-libs/libstatgrab )
-	)"
-
-DEPEND="${COMMON_DEPEND}
-	virtual/pkgconfig
-	collectd_plugins_java?			( >=virtual/jdk-1.6 )
-"
-
-RDEPEND="${COMMON_DEPEND}
-	collectd_plugins_java?			( >=virtual/jre-1.6 )
-	collectd_plugins_syslog?		( virtual/logger )
-	selinux?						( sec-policy/selinux-collectd )"
-
-REQUIRED_USE="
-	collectd_plugins_python?		( ${PYTHON_REQUIRED_USE} )"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-5.4.1"-{nohal,libocci,libperl,lt}.patch
-	"${FILESDIR}/${PN}-4.10.3"-werror.patch
-)
-
-# @FUNCTION: collectd_plugin_kernel_linux
-# @DESCRIPTION:
-# USAGE: <plug-in name> <kernel_options> <severity>
-# kernel_options is a list of kernel configurations options; the check tests whether at least
-#   one of them is enabled. If no, depending on the third argument an elog, ewarn, or eerror message
-#   is emitted.
-collectd_plugin_kernel_linux() {
-	local multi_opt opt
-	if has ${1} ${COLLECTD_ALL_PLUGINS}; then
-		if use collectd_plugins_${1}; then
-			for opt in ${2}; do
-				if linux_chkconfig_present ${opt}; then return 0; fi
-			done
-			multi_opt=${2//\ /\ or\ }
-			case ${3} in
-				(info)
-					elog "The ${1} plug-in can use kernel features that are disabled now; enable ${multi_opt} in your kernel"
-				;;
-				(warn)
-					ewarn "The ${1} plug-in uses kernel features that are disabled now; enable ${multi_opt} in your kernel"
-				;;
-				(error)
-					eerror "The ${1} plug-in needs kernel features that are disabled now; enable ${multi_opt} in your kernel"
-				;;
-				(*)
-					die "function collectd_plugin_kernel_linux called with invalid third argument"
-				;;
-			esac
-		fi
-	fi
-}
-
-collectd_linux_kernel_checks() {
-	linux-info_pkg_setup
-
-	# battery.c:/proc/pmu/battery_%i
-	# battery.c:/proc/acpi/battery
-	collectd_plugin_kernel_linux battery ACPI_BATTERY warn
-
-	# cgroups.c:/sys/fs/cgroup/
-	collectd_plugin_kernel_linux cgroups CONFIG_CGROUPS warn
-
-	# cpufreq.c:/sys/devices/system/cpu/cpu%d/cpufreq/
-	collectd_plugin_kernel_linux cpufreq SYSFS warn
-	collectd_plugin_kernel_linux cpufreq CPU_FREQ_STAT warn
-
-	# nfs.c:/proc/net/rpc/nfs
-	# nfs.c:/proc/net/rpc/nfsd
-	collectd_plugin_kernel_linux nfs NFS_COMMON warn
-
-	# serial.c:/proc/tty/driver/serial
-	# serial.c:/proc/tty/driver/ttyS
-	collectd_plugin_kernel_linux serial SERIAL_CORE warn
-
-	# swap.c:/proc/meminfo
-	collectd_plugin_kernel_linux swap SWAP warn
-
-	# thermal.c:/proc/acpi/thermal_zone
-	# thermal.c:/sys/class/thermal
-	collectd_plugin_kernel_linux thermal "PROC_FS SYSFS" warn
-	collectd_plugin_kernel_linux thermal ACPI_THERMAL warn
-
-	# vmem.c:/proc/vmstat
-	collectd_plugin_kernel_linux vmem VM_EVENT_COUNTERS warn
-
-	# uuid.c:/sys/hypervisor/uuid
-	collectd_plugin_kernel_linux uuid SYSFS info
-
-	# wireless.c:/proc/net/wireless
-	collectd_plugin_kernel_linux wireless "MAC80211 IEEE80211" warn
-}
-
-pkg_setup() {
-	if use kernel_linux; then
-		if linux_config_exists; then
-			einfo "Checking your linux kernel configuration:"
-			collectd_linux_kernel_checks
-		else
-			elog "Cannot find a linux kernel configuration. Continuing anyway."
-		fi
-	fi
-
-	java-pkg-opt-2_pkg_setup
-	use collectd_plugins_python && python-single-r1_pkg_setup
-
-	enewgroup collectd
-	enewuser collectd -1 -1 /var/lib/collectd collectd
-}
-
-src_prepare() {
-	base_src_prepare
-
-	# There's some strange prefix handling in the default config file, resulting in
-	# paths like "/usr/var/..."
-	sed -i -e "s:@prefix@/var:/var:g" src/collectd.conf.in || die
-
-	sed -i -e "s:/etc/collectd/collectd.conf:/etc/collectd.conf:g" contrib/collectd.service || die
-
-	# fix installdirs for perl, bug 444360
-	sed -i -e 's/INSTALL_BASE=$(DESTDIR)$(prefix) //' bindings/Makefile.am || die
-
-	if use collectd_plugins_java; then
-		# Set javac -source and -target flags according to (R)DEPEND.
-		sed -i -e "s/\$(JAVAC)/\0 $(java-pkg_javac-args)/g" bindings/java/Makefile.am || die
-	fi
-
-	rm -r libltdl || die
-
-	eautoreconf
-}
-
-src_configure() {
-	# Now come the lists of os-dependent plugins. Any plugin that is not listed anywhere here
-	# should work independent of the operating system.
-
-	local linux_plugins="battery cpu cpufreq disk entropy ethstat interface iptables ipvs irq load
-		memory md netlink nfs numa processes serial swap tcpconns thermal users vmem
-		wireless"
-
-	local libstatgrab_plugins="cpu disk interface load memory swap users"
-	local bsd_plugins="cpu tcpconns ${libstatgrab_plugins}"
-
-	local darwin_plugins="apple_sensors battery cpu disk interface memory processes tcpconns"
-
-	local osdependent_plugins="${linux_plugins} ${bsd_plugins} ${darwin_plugins}"
-	local myos_plugins=""
-	if use kernel_linux; then
-		einfo "Enabling Linux plugins."
-		myos_plugins=${linux_plugins}
-	elif use kernel_FreeBSD; then
-		einfo "Enabling FreeBSD plugins."
-		myos_plugins=${bsd_plugins}
-	elif use kernel_Darwin; then
-		einfo "Enabling Darwin plugins."
-		myos_plugins=${darwin_plugins}
-	fi
-
-	# Do we debug?
-	local myconf="$(use_enable debug)"
-
-	local plugin
-
-	# Disable what needs to be disabled.
-	for plugin in ${COLLECTD_DISABLED_PLUGINS}; do
-		myconf+=" --disable-${plugin}"
-	done
-
-	# Set enable/disable for each single plugin.
-	for plugin in ${COLLECTD_ALL_PLUGINS}; do
-		if has ${plugin} ${osdependent_plugins}; then
-			# plugin is os-dependent ...
-			if has ${plugin} ${myos_plugins}; then
-				# ... and available in this os
-				myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
-			else
-				# ... and NOT available in this os
-				if use collectd_plugins_${plugin}; then
-					ewarn "You try to enable the ${plugin} plugin, but it is not available for this"
-					ewarn "kernel. Disabling it automatically."
-				fi
-				myconf+=" --disable-${plugin}"
-			fi
-		elif [[ "${plugin}" = "collectd_plugins_perl" ]]; then
-			if use collectd_plugins_perl && ! use perl; then
-				ewarn "Perl plugin disabled as perl bindings disabled by -perl use flag"
-				myconf+= --disable-perl
-			else
-				myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
-			fi
-		else
-			myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
-		fi
-	done
-
-	# JAVA_HOME is set by eclasses.
-	if use collectd_plugins_java; then
-		myconf+=" --with-java"
-	fi
-
-	# Need libiptc ONLY for iptables. If we try to use it otherwise bug 340109 happens.
-	if ! use collectd_plugins_iptables; then
-		myconf+=" --with-libiptc=no"
-	fi
-
-	if use perl; then
-		myconf+=" --with-perl-bindings=INSTALLDIRS=vendor"
-	else
-		myconf+=" --without-perl-bindings"
-	fi
-
-	# No need for v5upgrade
-	myconf+=" --disable-target_v5upgrade"
-
-	# Finally, run econf.
-	KERNEL_DIR="${KERNEL_DIR}" econf --config-cache --without-included-ltdl $(use_enable static-libs static) --localstatedir=/var ${myconf}
-}
-
-src_install() {
-	emake DESTDIR="${D}" install
-
-	perl_delete_localpod
-
-	find "${D}/usr/" -name "*.la" -exec rm -f {} +
-
-	use collectd_plugins_java && java-pkg_regjar "${ED}"/usr/share/${PN}/java/*.jar
-	# use collectd_plugins_ping && setcap cap_net_raw+ep ${D}/usr/sbin/collectd
-	# we cannot do this yet
-
-	fowners root:collectd /etc/collectd.conf
-	fperms u=rw,g=r,o= /etc/collectd.conf
-
-	dodoc AUTHORS ChangeLog NEWS README TODO
-
-	if use contrib ; then
-		insinto /usr/share/doc/${PF}
-		doins -r contrib
-	fi
-
-	keepdir /var/lib/${PN}
-	fowners collectd:collectd /var/lib/${PN}
-
-	newinitd "${FILESDIR}/${PN}.initd" ${PN}
-	newconfd "${FILESDIR}/${PN}.confd" ${PN}
-	systemd_dounit "contrib/${PN}.service"
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}/logrotate" collectd
-
-	sed -i -e 's:^.*PIDFile     "/var/run/collectd.pid":PIDFile     "/var/run/collectd/collectd.pid":' "${D}"/etc/collectd.conf || die
-	sed -i -e 's:^#	SocketFile "/var/run/collectd-unixsock":#	SocketFile "/var/run/collectd/collectd-unixsock":' "${D}"/etc/collectd.conf || die
-	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
-	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
-}
-
-collectd_rdeps() {
-	if (use collectd_plugins_${1} && ! has_version "${2}"); then
-		elog "The ${1} plug-in needs ${2} to be installed locally or remotely to work."
-	fi
-}
-
-pkg_postinst() {
-	collectd_rdeps apcups sys-power/apcupsd
-	collectd_rdeps hddtemp app-admin/hddtemp
-	collectd_rdeps mbmon sys-apps/xmbmon
-	collectd_rdeps memcached ">=net-misc/memcached-1.2.2-r2"
-	collectd_rdeps ntpd net-misc/ntp
-	collectd_rdeps openvpn ">=net-misc/openvpn-2.0.9"
-	collectd_rdeps write_mongodb "dev-db/mongodb"
-
-	echo
-	elog "collectd is now started as unprivileged user by default."
-	elog "You may want to revisit the configuration."
-	elog
-
-	if use collectd_plugins_email; then
-		ewarn "The email plug-in is deprecated. To submit statistics please use the unixsock plugin."
-	fi
-	if use contrib; then
-		elog "The scripts in /usr/share/doc/${PF}/collection3 for generating graphs need dev-perl/HTML-Parser,"
-		elog "dev-perl/config-general, dev-perl/regexp-common, and net-analyzer/rrdtool[perl] to be installed."
-	fi
-}

diff --git a/app-admin/collectd/collectd-5.5.0.ebuild b/app-admin/collectd/collectd-5.5.0.ebuild
deleted file mode 100644
index a06c442..0000000
--- a/app-admin/collectd/collectd-5.5.0.ebuild
+++ /dev/null
@@ -1,398 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-GENTOO_DEPEND_ON_PERL="no"
-JAVA_PKG_OPT_USE="collectd_plugins_java"
-# XXX: 5.4.1-r0 stated 2* but it builds fine against 3.4
-PYTHON_COMPAT=( python2_7 )
-
-inherit autotools eutils fcaps java-pkg-opt-2 linux-info multilib perl-app python-single-r1 systemd user
-
-DESCRIPTION="Collects system statistics and provides mechanisms to store the values"
-
-HOMEPAGE="http://collectd.org"
-SRC_URI="${HOMEPAGE}/files/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="contrib debug kernel_linux kernel_FreeBSD kernel_Darwin perl selinux static-libs"
-
-# The plugin lists have to follow here since they extend IUSE
-
-# Plugins that to my knowledge cannot be supported (eg. dependencies not in gentoo)
-COLLECTD_IMPOSSIBLE_PLUGINS="aquaero mic netapp pinba sigrok write_kafka xmms"
-
-# Plugins that still need some work
-COLLECTD_UNTESTED_PLUGINS="amqp apple_sensors genericjmx ipvs lpar modbus tape"
-
-# Plugins that have been (compile) tested and can be enabled via COLLECTD_PLUGINS
-COLLECTD_TESTED_PLUGINS="aggregation apache apcups ascent battery bind ceph
-	cgroups conntrack contextswitch cpu cpufreq csv curl curl_json curl_xml dbi df
-	disk dns drbd email entropy ethstat exec fhcount filecount fscache gmond
-	hddtemp interface ipc ipmi iptables irq java load log_logstash logfile lvm
-	madwifi match_empty_counter match_hashed match_regex match_timediff match_value
-	mbmon md memcachec memcached memory multimeter mysql netlink network nfs nginx
-	notify_desktop notify_email ntpd numa nut olsrd onewire openldap openvpn oracle
-	perl ping postgresql powerdns processes protocols python redis routeros
-	rrdcached rrdtool sensors serial smart snmp statsd swap syslog table tail
-	target_notification target_replace target_scale target_set tcpconns teamspeak2
-	ted thermal threshold tokyotyrant turbostat unixsock uptime users uuid varnish
-	virt vmem wireless write_graphite write_http write_log write_mongodb
-	write_redis write_sensu write_tsdb zfs_arc zookeeper"
-
-COLLECTD_DISABLED_PLUGINS="${COLLECTD_IMPOSSIBLE_PLUGINS} ${COLLECTD_UNTESTED_PLUGINS}"
-
-COLLECTD_ALL_PLUGINS=${COLLECTD_TESTED_PLUGINS}
-
-for plugin in ${COLLECTD_ALL_PLUGINS}; do
-	IUSE="${IUSE} collectd_plugins_${plugin}"
-done
-unset plugin
-
-# Now come the dependencies.
-
-COMMON_DEPEND="
-	dev-libs/libgcrypt:0
-	sys-devel/libtool
-	perl?							( dev-lang/perl:=[ithreads] )
-	collectd_plugins_apache?		( net-misc/curl )
-	collectd_plugins_ascent?		( net-misc/curl dev-libs/libxml2 )
-	collectd_plugins_bind?			( dev-libs/libxml2:= )
-	collectd_plugins_ceph?			( dev-libs/yajl:= )
-	collectd_plugins_curl?			( net-misc/curl )
-	collectd_plugins_curl_json?		( net-misc/curl dev-libs/yajl:= )
-	collectd_plugins_curl_xml?		( net-misc/curl dev-libs/libxml2:= )
-	collectd_plugins_dbi?			( dev-db/libdbi:= )
-	collectd_plugins_dns?			( net-libs/libpcap:= )
-	collectd_plugins_gmond?			( sys-cluster/ganglia )
-	collectd_plugins_ipmi?			( >=sys-libs/openipmi-2.0.16-r1 )
-	collectd_plugins_iptables?		( >=net-firewall/iptables-1.4.13 )
-	collectd_plugins_log_logstash?	( dev-libs/yajl:= )
-	collectd_plugins_lvm?			( sys-fs/lvm2 )
-	collectd_plugins_memcachec?		( dev-libs/libmemcached:= )
-	collectd_plugins_mysql?			( >=virtual/mysql-5.0 )
-	collectd_plugins_netlink?		( net-libs/libmnl:= )
-	collectd_plugins_nginx?			( net-misc/curl )
-	collectd_plugins_notify_desktop?	( x11-libs/libnotify:= )
-	collectd_plugins_notify_email?	( net-libs/libesmtp dev-libs/openssl:0= )
-	collectd_plugins_nut?			( >=sys-power/nut-2.7.2-r2 )
-	collectd_plugins_onewire?		( sys-fs/owfs )
-	collectd_plugins_oracle?		( dev-db/oracle-instantclient-basic )
-	collectd_plugins_openldap?		( net-nds/openldap )
-	collectd_plugins_perl?			( dev-lang/perl:=[ithreads] )
-	collectd_plugins_ping?			( net-libs/liboping:= )
-	collectd_plugins_postgresql?	( dev-db/postgresql:= )
-	collectd_plugins_python?		( ${PYTHON_DEPS} )
-	collectd_plugins_redis?			( dev-libs/hiredis:= )
-	collectd_plugins_routeros?		( net-libs/librouteros:= )
-	collectd_plugins_rrdcached?		( net-analyzer/rrdtool )
-	collectd_plugins_rrdtool?		( net-analyzer/rrdtool )
-	collectd_plugins_sensors?		( sys-apps/lm_sensors )
-	collectd_plugins_smart?			( dev-libs/libatasmart:= )
-	collectd_plugins_snmp?			( net-analyzer/net-snmp )
-	collectd_plugins_tokyotyrant?	( net-misc/tokyotyrant )
-	collectd_plugins_varnish?		( www-servers/varnish )
-	collectd_plugins_virt?			( app-emulation/libvirt dev-libs/libxml2 )
-	collectd_plugins_write_http?	( net-misc/curl )
-	collectd_plugins_write_mongodb?	( dev-libs/mongo-c-driver:= )
-	collectd_plugins_write_redis?	( dev-libs/hiredis:= )
-
-	kernel_FreeBSD? (
-		collectd_plugins_disk?		( sys-libs/libstatgrab:= )
-		collectd_plugins_interface?	( sys-libs/libstatgrab:= )
-		collectd_plugins_load?		( sys-libs/libstatgrab:= )
-		collectd_plugins_memory?	( sys-libs/libstatgrab:= )
-		collectd_plugins_swap?		( sys-libs/libstatgrab:= )
-		collectd_plugins_users?		( sys-libs/libstatgrab:= )
-	)"
-
-DEPEND="${COMMON_DEPEND}
-	virtual/pkgconfig
-	collectd_plugins_java?			( >=virtual/jdk-1.6 )
-"
-
-RDEPEND="${COMMON_DEPEND}
-	collectd_plugins_java?			( >=virtual/jre-1.6 )
-	collectd_plugins_syslog?		( virtual/logger )
-	selinux?						( sec-policy/selinux-collectd )"
-
-REQUIRED_USE="
-	collectd_plugins_python?		( ${PYTHON_REQUIRED_USE} )"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-5.4.1-libocci.patch"
-	"${FILESDIR}/${PN}-5.5.0-lt.patch"
-	"${FILESDIR}/${PN}-4.10.3-werror.patch"
-)
-
-# @FUNCTION: collectd_plugin_kernel_linux
-# @DESCRIPTION:
-# USAGE: <plug-in name> <kernel_options> <severity>
-# kernel_options is a list of kernel configurations options; the check tests whether at least
-#   one of them is enabled. If no, depending on the third argument an elog, ewarn, or eerror message
-#   is emitted.
-collectd_plugin_kernel_linux() {
-	local multi_opt opt
-	if has ${1} ${COLLECTD_ALL_PLUGINS}; then
-		if use collectd_plugins_${1}; then
-			for opt in ${2}; do
-				if linux_chkconfig_present ${opt}; then return 0; fi
-			done
-			multi_opt=${2//\ /\ or\ }
-			case ${3} in
-				(info)
-					elog "The ${1} plug-in can use kernel features that are disabled now; enable ${multi_opt} in your kernel"
-				;;
-				(warn)
-					ewarn "The ${1} plug-in uses kernel features that are disabled now; enable ${multi_opt} in your kernel"
-				;;
-				(error)
-					eerror "The ${1} plug-in needs kernel features that are disabled now; enable ${multi_opt} in your kernel"
-				;;
-				(*)
-					die "function collectd_plugin_kernel_linux called with invalid third argument"
-				;;
-			esac
-		fi
-	fi
-}
-
-collectd_linux_kernel_checks() {
-	linux-info_pkg_setup
-
-	# battery.c:/proc/pmu/battery_%i
-	# battery.c:/proc/acpi/battery
-	collectd_plugin_kernel_linux battery ACPI_BATTERY warn
-
-	# cgroups.c:/sys/fs/cgroup/
-	collectd_plugin_kernel_linux cgroups CONFIG_CGROUPS warn
-
-	# cpufreq.c:/sys/devices/system/cpu/cpu%d/cpufreq/
-	collectd_plugin_kernel_linux cpufreq SYSFS warn
-	collectd_plugin_kernel_linux cpufreq CPU_FREQ_STAT warn
-
-	# nfs.c:/proc/net/rpc/nfs
-	# nfs.c:/proc/net/rpc/nfsd
-	collectd_plugin_kernel_linux nfs NFS_COMMON warn
-
-	# serial.c:/proc/tty/driver/serial
-	# serial.c:/proc/tty/driver/ttyS
-	collectd_plugin_kernel_linux serial SERIAL_CORE warn
-
-	# swap.c:/proc/meminfo
-	collectd_plugin_kernel_linux swap SWAP warn
-
-	# thermal.c:/proc/acpi/thermal_zone
-	# thermal.c:/sys/class/thermal
-	collectd_plugin_kernel_linux thermal "PROC_FS SYSFS" warn
-	collectd_plugin_kernel_linux thermal ACPI_THERMAL warn
-
-	# vmem.c:/proc/vmstat
-	collectd_plugin_kernel_linux vmem VM_EVENT_COUNTERS warn
-
-	# uuid.c:/sys/hypervisor/uuid
-	collectd_plugin_kernel_linux uuid SYSFS info
-
-	# wireless.c:/proc/net/wireless
-	collectd_plugin_kernel_linux wireless "MAC80211 IEEE80211" warn
-}
-
-pkg_setup() {
-	if use kernel_linux; then
-		if linux_config_exists; then
-			einfo "Checking your linux kernel configuration:"
-			collectd_linux_kernel_checks
-		else
-			elog "Cannot find a linux kernel configuration. Continuing anyway."
-		fi
-	fi
-
-	java-pkg-opt-2_pkg_setup
-	use collectd_plugins_python && python-single-r1_pkg_setup
-
-	enewgroup collectd
-	enewuser collectd -1 -1 /var/lib/collectd collectd
-}
-
-src_prepare() {
-	epatch ${PATCHES[@]}
-	epatch_user
-
-	# There's some strange prefix handling in the default config file, resulting in
-	# paths like "/usr/var/..."
-	sed -i -e "s:@prefix@/var:/var:g" src/collectd.conf.in || die
-
-	sed -i -e "s:/etc/collectd/collectd.conf:/etc/collectd.conf:g" contrib/collectd.service || die
-
-	# fix installdirs for perl, bug 444360
-	sed -i -e 's/INSTALL_BASE=$(DESTDIR)$(prefix) //' bindings/Makefile.am || die
-
-	if use collectd_plugins_java; then
-		# Set javac -source and -target flags according to (R)DEPEND.
-		sed -i -e "s/\$(JAVAC)/\0 $(java-pkg_javac-args)/g" bindings/java/Makefile.am || die
-	fi
-
-	rm -r libltdl || die
-
-	eautoreconf
-}
-
-src_configure() {
-	# Now come the lists of os-dependent plugins. Any plugin that is not listed anywhere here
-	# should work independent of the operating system.
-
-	local linux_plugins="barometer battery cpu cpufreq disk drbd entropy
-		ethstat interface iptables ipvs irq ipc load memory md netlink nfs
-		numa processes serial swap tcpconns thermal turbostat users vmem
-		wireless zfs_arc"
-
-	local libstatgrab_plugins="cpu disk interface load memory swap users"
-	local bsd_plugins="cpu tcpconns ${libstatgrab_plugins} zfs_arc"
-
-	local darwin_plugins="apple_sensors battery cpu disk interface memory processes tcpconns"
-
-	local osdependent_plugins="${linux_plugins} ${bsd_plugins} ${darwin_plugins}"
-	local myos_plugins=""
-	if use kernel_linux; then
-		einfo "Enabling Linux plugins."
-		myos_plugins=${linux_plugins}
-	elif use kernel_FreeBSD; then
-		einfo "Enabling FreeBSD plugins."
-		myos_plugins=${bsd_plugins}
-	elif use kernel_Darwin; then
-		einfo "Enabling Darwin plugins."
-		myos_plugins=${darwin_plugins}
-	fi
-
-	# Do we debug?
-	local myconf="$(use_enable debug)"
-
-	local plugin
-
-	# Disable what needs to be disabled.
-	for plugin in ${COLLECTD_DISABLED_PLUGINS}; do
-		myconf+=" --disable-${plugin}"
-	done
-
-	# Set enable/disable for each single plugin.
-	for plugin in ${COLLECTD_ALL_PLUGINS}; do
-		if has ${plugin} ${osdependent_plugins}; then
-			# plugin is os-dependent ...
-			if has ${plugin} ${myos_plugins}; then
-				# ... and available in this os
-				myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
-			else
-				# ... and NOT available in this os
-				if use collectd_plugins_${plugin}; then
-					ewarn "You try to enable the ${plugin} plugin, but it is not available for this"
-					ewarn "kernel. Disabling it automatically."
-				fi
-				myconf+=" --disable-${plugin}"
-			fi
-		elif [[ "${plugin}" = "collectd_plugins_perl" ]]; then
-			if use collectd_plugins_perl && ! use perl; then
-				ewarn "Perl plugin disabled as perl bindings disabled by -perl use flag"
-				myconf+= --disable-perl
-			else
-				myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
-			fi
-		else
-			myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
-		fi
-	done
-
-	# JAVA_HOME is set by eclasses.
-	if use collectd_plugins_java; then
-		myconf+=" --with-java"
-	fi
-
-	# Need libiptc ONLY for iptables. If we try to use it otherwise bug 340109 happens.
-	# lots of libs are only needed for plugins, if they are disabled, also disable the lib
-	use collectd_plugins_iptables || myconf+=" --with-libiptc=no"
-	use collectd_plugins_openldap || myconf+=" --with-libldap=no"
-	use collectd_plugins_redis || use collectd_plugins_write_redis || myconf+=" --with-libhiredis=no"
-	use collectd_plugins_smart || myconf+=" --with-libatasmart=no"
-	use collectd_plugins_virt || myconf+=" --with-libvirt=no"
-
-	if use perl; then
-		myconf+=" --with-perl-bindings=INSTALLDIRS=vendor"
-	else
-		myconf+=" --without-perl-bindings"
-	fi
-
-	# No need for v5upgrade
-	myconf+=" --disable-target_v5upgrade"
-
-	# Finally, run econf.
-	KERNEL_DIR="${KERNEL_DIR}" econf --config-cache --without-included-ltdl $(use_enable static-libs static) --localstatedir=/var ${myconf}
-}
-
-src_install() {
-	emake DESTDIR="${D}" install
-
-	perl_delete_localpod
-
-	find "${D}/usr/" -name "*.la" -exec rm -f {} + || die
-
-	use collectd_plugins_java && java-pkg_regjar "${ED}"/usr/share/${PN}/java/*.jar
-
-	fowners root:collectd /etc/collectd.conf
-	fperms u=rw,g=r,o= /etc/collectd.conf
-
-	dodoc AUTHORS ChangeLog NEWS README TODO
-
-	if use contrib ; then
-		insinto /usr/share/doc/${PF}
-		doins -r contrib
-	fi
-
-	keepdir /var/lib/${PN}
-	fowners collectd:collectd /var/lib/${PN}
-
-	newinitd "${FILESDIR}/${PN}.initd" ${PN}
-	newconfd "${FILESDIR}/${PN}.confd" ${PN}
-	systemd_dounit "contrib/${PN}.service"
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}/logrotate" collectd
-
-	sed -i -e 's:^.*PIDFile     "/var/run/collectd.pid":PIDFile     "/var/run/collectd/collectd.pid":' "${D}"/etc/collectd.conf || die
-	sed -i -e 's:^#	SocketFile "/var/run/collectd-unixsock":#	SocketFile "/var/run/collectd/collectd-unixsock":' "${D}"/etc/collectd.conf || die
-	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
-	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
-}
-
-collectd_rdeps() {
-	if (use collectd_plugins_${1} && ! has_version "${2}"); then
-		elog "The ${1} plug-in needs ${2} to be installed locally or remotely to work."
-	fi
-}
-
-pkg_postinst() {
-	use collectd_plugins_ping && fcaps cap_net_raw usr/sbin/collectd
-
-	collectd_rdeps apcups sys-power/apcupsd
-	collectd_rdeps hddtemp app-admin/hddtemp
-	collectd_rdeps mbmon sys-apps/xmbmon
-	collectd_rdeps memcached ">=net-misc/memcached-1.2.2-r2"
-	collectd_rdeps ntpd net-misc/ntp
-	collectd_rdeps openvpn ">=net-misc/openvpn-2.0.9"
-	collectd_rdeps write_mongodb "dev-db/mongodb"
-
-	echo
-	elog "collectd is now started as unprivileged user by default."
-	elog "You may want to revisit the configuration."
-	elog
-
-	if use collectd_plugins_email; then
-		ewarn "The email plug-in is deprecated. To submit statistics please use the unixsock plugin."
-	fi
-	if use contrib; then
-		elog "The scripts in /usr/share/doc/${PF}/collection3 for generating graphs need dev-perl/HTML-Parser,"
-		elog "dev-perl/config-general, dev-perl/regexp-common, and net-analyzer/rrdtool[perl] to be installed."
-	fi
-}

diff --git a/app-admin/collectd/collectd-5.5.1.ebuild b/app-admin/collectd/collectd-5.5.1.ebuild
index 5d65a4a..2f0983f 100644
--- a/app-admin/collectd/collectd-5.5.1.ebuild
+++ b/app-admin/collectd/collectd-5.5.1.ebuild
@@ -418,7 +418,7 @@ src_install() {
 	systemd_dounit "contrib/${PN}.service"
 
 	insinto /etc/logrotate.d
-	newins "${FILESDIR}/logrotate" collectd
+	newins "${FILESDIR}/${PN}.logrotate" ${PN}
 
 	sed -i -e 's:^.*PIDFile     "/var/run/collectd.pid":PIDFile     "/run/collectd/collectd.pid":' "${ED}"etc/collectd.conf || die
 	sed -i -e 's:^#	SocketFile "/var/run/collectd-unixsock":#	SocketFile "/run/collectd/collectd.socket":' "${ED}"etc/collectd.conf || die

diff --git a/app-admin/collectd/files/collectd-5.4.1-libocci.patch b/app-admin/collectd/files/collectd-5.4.1-libocci.patch
deleted file mode 100644
index 14b7d69..0000000
--- a/app-admin/collectd/files/collectd-5.4.1-libocci.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff --git configure.ac configure.ac
-index 7029e1e..72f6ff4 100644
---- configure.ac
-+++ configure.ac
-@@ -2941,14 +2941,14 @@ AC_ARG_WITH(oracle, [AS_HELP_STRING([--with-oracle@<:@=ORACLE_HOME@:>@], [Path t
- ])
- if test "x$ORACLE_HOME" != "x"
- then
--	with_oracle_cppflags="-I$ORACLE_HOME/rdbms/public"
-+	with_oracle_cppflags="-I$ORACLE_HOME/rdbms/public -locci"
-
- 	if test -e "$ORACLE_HOME/lib/ldflags"
- 	then
- 		with_oracle_libs=`cat "$ORACLE_HOME/lib/ldflags"`
- 	fi
- 	#with_oracle_libs="-L$ORACLE_HOME/lib $with_oracle_libs -lclntsh"
--	with_oracle_libs="-L$ORACLE_HOME/lib -lclntsh"
-+	with_oracle_libs="-L$ORACLE_HOME/lib -lclntsh -locci"
- fi
- if test "x$with_oracle" = "xyes"
- then
\ No newline at end of file

diff --git a/app-admin/collectd/files/collectd-5.4.1-libperl.patch b/app-admin/collectd/files/collectd-5.4.1-libperl.patch
deleted file mode 100644
index 4f60802..0000000
--- a/app-admin/collectd/files/collectd-5.4.1-libperl.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-diff --git configure.ac configure.ac
-index ce8a9bc..eaa464e 100644
---- configure.ac
-+++ configure.ac
-@@ -3109,11 +3109,13 @@ if test "x$with_libperl" = "xyes" \
- then
-   SAVE_CFLAGS="$CFLAGS"
-   SAVE_LDFLAGS="$LDFLAGS"
-+  SAVE_LIBS="$LIBS"
- dnl ARCHFLAGS="" -> disable multi -arch on OSX (see Config_heavy.pl:fetch_string)
-   PERL_CFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ccopts`
-   PERL_LDFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ldopts`
-   CFLAGS="$CFLAGS $PERL_CFLAGS"
-   LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
-+  LIBS="$LIBS -lperl -lpthread"
-
-   AC_CACHE_CHECK([for libperl],
-     [c_cv_have_libperl],
-@@ -3132,7 +3134,10 @@ dnl ARCHFLAGS="" -> disable multi -arch on OSX (see Config_heavy.pl:fetch_string
- ]]]
-       )],
-       [c_cv_have_libperl="yes"],
--      [c_cv_have_libperl="no"]
-+      [
-+        c_cv_have_libperl="no"
-+        LIBS="$SAVE_LIBS"
-+      ]
-     )
-   )

diff --git a/app-admin/collectd/files/collectd-5.4.1-lt.patch b/app-admin/collectd/files/collectd-5.4.1-lt.patch
deleted file mode 100644
index bac1809..0000000
--- a/app-admin/collectd/files/collectd-5.4.1-lt.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-diff --git Makefile.am Makefile.am
-index 5267123..a7e0d0c 100644
---- Makefile.am
-+++ Makefile.am
-@@ -1,6 +1,4 @@
--ACLOCAL_AMFLAGS = -I libltdl/m4
--
--SUBDIRS = libltdl src bindings .
-+SUBDIRS = src bindings .
-
- INCLUDES = $(LTDLINCL)
-
-diff --git configure.ac configure.ac
-index eaa464e..d652d46 100644
---- configure.ac
-+++ configure.ac
-@@ -7,7 +7,6 @@ AC_CONFIG_AUX_DIR([libltdl/config])
- m4_ifdef([LT_PACKAGE_VERSION],
- 	# libtool >= 2.2
- 	[
--	 LT_CONFIG_LTDL_DIR([libltdl])
- 	 LT_INIT([dlopen])
- 	 LTDL_INIT([convenience])
- 	 AC_DEFINE(LIBTOOL_VERSION, 2, [Define to used libtool version.])
-@@ -19,7 +18,6 @@ m4_ifdef([LT_PACKAGE_VERSION],
- 	 AC_SUBST(LTDLINCL)
- 	 AC_SUBST(LIBLTDL)
- 	 AC_LIBTOOL_DLOPEN
--	 AC_CONFIG_SUBDIRS(libltdl)
- 	 AC_DEFINE(LIBTOOL_VERSION, 1, [Define to used libtool version.])
- 	]
- )
\ No newline at end of file

diff --git a/app-admin/collectd/files/collectd-5.4.1-nohal.patch b/app-admin/collectd/files/collectd-5.4.1-nohal.patch
deleted file mode 100644
index 9978296..0000000
--- a/app-admin/collectd/files/collectd-5.4.1-nohal.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff --git configure.ac configure.ac
-index 7029e1e..ad5e336 100644
---- configure.ac
-+++ configure.ac
-@@ -1351,18 +1351,7 @@ AC_CHECK_LIB(resolv, res_search,
- AM_CONDITIONAL(BUILD_WITH_LIBRESOLV, test "x$with_libresolv" = "xyes")
-
- dnl Check for HAL (hardware abstraction library)
--with_libhal="yes"
--AC_CHECK_LIB(hal,libhal_device_property_exists,
--	     [AC_DEFINE(HAVE_LIBHAL, 1, [Define to 1 if you have 'hal' library])],
--	     [with_libhal="no"])
--if test "x$with_libhal" = "xyes"; then
--	if test "x$PKG_CONFIG" != "x"; then
--		BUILD_WITH_LIBHAL_CFLAGS="`pkg-config --cflags hal`"
--		BUILD_WITH_LIBHAL_LIBS="`pkg-config --libs hal`"
--		AC_SUBST(BUILD_WITH_LIBHAL_CFLAGS)
--		AC_SUBST(BUILD_WITH_LIBHAL_LIBS)
--	fi
--fi
-+with_libhal="no"
-
- m4_divert_once([HELP_WITH], [
- collectd additional packages:])
\ No newline at end of file

diff --git a/app-admin/collectd/files/collectd-5.5.0-lt.patch b/app-admin/collectd/files/collectd-5.5.0-lt.patch
deleted file mode 100644
index b14736b..0000000
--- a/app-admin/collectd/files/collectd-5.5.0-lt.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-diff --git Makefile.am Makefile.am
-index 5267123..a7e0d0c 100644
---- Makefile.am
-+++ Makefile.am
-@@ -1,6 +1,4 @@
--ACLOCAL_AMFLAGS = -I libltdl/m4
--
--SUBDIRS = libltdl src bindings .
-+SUBDIRS = src bindings .
-
- INCLUDES = $(LTDLINCL)
-
---- configure.ac.old	2016-01-04 13:55:39.286846436 +0400
-+++ configure.ac	2016-01-04 13:56:07.905362298 +0400
-@@ -2,12 +2,10 @@
- AC_INIT([collectd],[m4_esyscmd(./version-gen.sh)])
- AC_CONFIG_SRCDIR(src/)
- AC_CONFIG_HEADERS(src/config.h)
--AC_CONFIG_AUX_DIR([libltdl/config])
- 
- m4_ifdef([LT_PACKAGE_VERSION],
- 	# libtool >= 2.2
- 	[
--	 LT_CONFIG_LTDL_DIR([libltdl])
- 	 LT_INIT([dlopen])
- 	 LTDL_INIT([convenience])
- 	 AC_DEFINE(LIBTOOL_VERSION, 2, [Define to used libtool version.])
-@@ -19,7 +17,6 @@
- 	 AC_SUBST(LTDLINCL)
- 	 AC_SUBST(LIBLTDL)
- 	 AC_LIBTOOL_DLOPEN
--	 AC_CONFIG_SUBDIRS(libltdl)
- 	 AC_DEFINE(LIBTOOL_VERSION, 1, [Define to used libtool version.])
- 	]
- )

diff --git a/app-admin/collectd/files/collectd.confd b/app-admin/collectd/files/collectd.confd
deleted file mode 100644
index 979b725..0000000
--- a/app-admin/collectd/files/collectd.confd
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-# Nice value used to launch collectd, to change priority of the process. As
-# you usually will want to run it in background, a default of 5 is used.
-#
-#COLLECTD_NICELVL='5'
-
-# Location of configuration file. Modify if you don't like the standard one.
-#
-#COLLECTD_CFGFILE='/etc/collectd.conf'
-
-# File used to store the PID file. Usually you won't need to touch it.
-#
-#COLLECTD_PIDFILE='/var/run/collectd/collectd.pid'
-
-# User to run collectd as (default is collectd, change to root or give
-# collectd user appropriate privileges if you use one of the plugins that 
-# require it, as e.g. ping or iptables plugins)
-#
-#COLLECTD_USER='collectd'

diff --git a/app-admin/collectd/files/collectd.initd b/app-admin/collectd/files/collectd.initd
deleted file mode 100644
index 10d2952..0000000
--- a/app-admin/collectd/files/collectd.initd
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-: ${COLLECTD_PIDFILE:='/var/run/collectd/collectd.pid'}
-: ${COLLECTD_CFGFILE:='/etc/collectd.conf'}
-: ${COLLECTD_NICELVL:='5'}
-: ${COLLECTD_USER:='collectd'}
-
-extra_commands="configtest"
-
-depend() {
-	use net
-}
-
-configtest() {
-	ebegin "Checking ${SVCNAME} configuration"
-	checkconfig
-	eend $?
-}
-
-checkconfig() {
-	if [ $(sed '/^$\|^#/d' ${COLLECTD_CFGFILE} | grep -c 'LoadPlugin\w\+oracle') != 0 ] ; then
-		if [ -e /etc/env.d/50oracle-instantclient-basic ] ; then
-			. /etc/env.d/50oracle-instantclient-basic
-		        export ORACLE_HOME
-		        export TNS_ADMIN
-		else
-			ewarn "Unable to set Oracle environment, Oracle plugin wont work"
-		fi
-	fi
-
-	/usr/sbin/collectd -t -C "${COLLECTD_CFGFILE}" 1>/dev/null 2>&1
-	ret=$?
-	if [ $ret -ne 0 ]; then
-		eerror "${SVCNAME} has detected an error in your setup:"
-		/usr/sbin/collectd -t -C "${COLLECTD_CFGFILE}"
-	fi
-
-	return $ret
-}
-
-start() {
-	checkconfig || return 1
-	[ -d /var/run/collectd ] || mkdir /var/run/collectd && chown collectd:collectd /var/run/collectd
-
-	ebegin "Starting collectd"
-	start-stop-daemon --start --user "${COLLECTD_USER}:collectd" \
-		--env LC_NUMERIC=C \
-		--nicelevel "${COLLECTD_NICELVL}" --exec /usr/sbin/collectd -- \
-			-P "${COLLECTD_PIDFILE}" -C "${COLLECTD_CFGFILE}"
-	eend $? "Failed to start collectd"
-}
-
-stop() {
-	ebegin "Stopping collectd"
-	start-stop-daemon --stop \
-		--env LC_NUMERIC=C \
-		--pidfile "${COLLECTD_PIDFILE}"
-	eend $? "Failed to stop collectd"
-}

diff --git a/app-admin/collectd/files/logrotate b/app-admin/collectd/files/collectd.logrotate
similarity index 100%
rename from app-admin/collectd/files/logrotate
rename to app-admin/collectd/files/collectd.logrotate

diff --git a/app-admin/collectd/metadata.xml b/app-admin/collectd/metadata.xml
index 2576b59..cbf3a3e 100644
--- a/app-admin/collectd/metadata.xml
+++ b/app-admin/collectd/metadata.xml
@@ -67,7 +67,6 @@
 		<flag name="collectd_plugins_ipvs">Build the IPVS input plugin (collects statistics from Linux IP Virtual Server)</flag>
 		<flag name="collectd_plugins_irq">Build the irq input plugin (collects the number of times each interrupt has been handled by the operating system)</flag>
 		<flag name="collectd_plugins_java">Build the java input plugin (embeds a JVM into collectd for writing plugins)</flag>
-		<flag name="collectd_plugins_libvirt">Build the (lib)virt input plugin (collects statistics about virtualized guests on a system)</flag>
 		<flag name="collectd_plugins_load">Build the load input plugin (collects the system load)</flag>
 		<flag name="collectd_plugins_logfile">Build the logfile output plugin (receives log messages from collectd and writes them to a text file)</flag>
 		<flag name="collectd_plugins_log_logstash">Build the Logstash output plugin (writes collectd logs and events as Logstash JSON formatted events)</flag>


^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-admin/collectd/files/, app-admin/collectd/
@ 2016-02-29 16:21 Patrice Clement
  0 siblings, 0 replies; 10+ messages in thread
From: Patrice Clement @ 2016-02-29 16:21 UTC (permalink / raw
  To: gentoo-commits

commit:     3b459b6d37f22f9da2c070173756bf12de2591f0
Author:     Thomas D <whissi <AT> whissi <DOT> de>
AuthorDate: Fri Feb 19 23:11:26 2016 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Tue Feb 23 10:04:16 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b459b6d

app-admin/collectd: Bumped to v5.5.1

- New upstream version (Closes #570766, #517060)

- Bumped to EAPI=6

- Non-functional mongodb plugin disabled in ebuild (see upstream
  issue #492, closes #524400)

- Multiple dependency problems fixed

- linux-info eclass usage fixed (Closes #570778)

- Support for new plugins added (amqp, genericjmx, ipvs, modbus, sigrok,
  tail_csv, vserver, write_riemann)

- PYTHON_SINGLE_TARGET support for Python 3.4 and 3.5 enabled

- Documentation improved (USE flag description, elogs)

- Linux capabilities usage expanded to improve running collectd as
  unprivileged user (disable via filecaps USE flag)

- Runscript rewritten

  - Runscript now supports OpenRC's default status function

  - Runscript now guarantees service shutdown

  - Validating configuration before (re)starting daemon

 app-admin/collectd/Manifest                        |   1 +
 app-admin/collectd/collectd-5.5.1.ebuild           | 460 +++++++++++++++++++++
 .../collectd/files/collectd-5.5.1-libocci.patch    |  33 ++
 app-admin/collectd/files/collectd-5.5.1-lt.patch   |  60 +++
 .../collectd/files/collectd-5.5.1-nohal.patch      |  35 ++
 app-admin/collectd/files/collectd.confd-r1         |  46 +++
 app-admin/collectd/files/collectd.initd-r1         |  79 ++++
 app-admin/collectd/metadata.xml                    | 204 +++++----
 8 files changed, 830 insertions(+), 88 deletions(-)

diff --git a/app-admin/collectd/Manifest b/app-admin/collectd/Manifest
index 81e7cd7..c44ebaf 100644
--- a/app-admin/collectd/Manifest
+++ b/app-admin/collectd/Manifest
@@ -1,2 +1,3 @@
 DIST collectd-5.4.1.tar.bz2 1521907 SHA256 75452129f271cb0aad28e57f12a49070618bbb7b6a9d64cf869e8766fa2f66e0 SHA512 96289f52d3d1da55c862ae9ee2f57972682d7eab87387e97efa41fb5197599e097abd71aed2fe014e26af37c9ae98471e06dd181c725849976242642ce5c9492 WHIRLPOOL 2ed85b9d6d00c4e7dc6af236b637e282f17c6c0b20c1ba3da9c12ea85c5fdea1add2e29165874c7e9620852e422282d489436a4e245b161902f8926185edec16
 DIST collectd-5.5.0.tar.bz2 1824495 SHA256 847684cf5c10de1dc34145078af3fcf6e0d168ba98c14f1343b1062a4b569e88 SHA512 d2c2840f681c10345e02ad8df0f7c581dcb45bee276589fcd96b3dadd281a79ebb3b9a34a186242ef41285dde7fc505432376138ff4f72c4f60f1b840e640017 WHIRLPOOL 6223ca363984ab3777ca89e2cd5011f059b6ca7f5c66c5e7325d3155ce38ef2829caced3ad27e4d5016c5fdba59bb21b9b47d840ea0c4d164c3674b6ee5062ac
+DIST collectd-5.5.1.tar.bz2 1797852 SHA256 f9c5d526e1f0429a7db1ccd90bdf9e23923a2fd43b7285cfda8f0341e5c0bc3f SHA512 1935809571b8f0e0870399385312a5687f441d11e08a0c7d1337384b3790c3436ba84f89226aad979584045cc13bdf88f1350a0f49c94bcd0dbcf12ae4704dae WHIRLPOOL 3efeeb9262344a8a1c0aa068e64f5d45ff536d1fc1399b4599143a6e47740d5a33aedf482dbf9110cc5f0345d624fbe71ff00fc6f7afeee891326617f7979e41

diff --git a/app-admin/collectd/collectd-5.5.1.ebuild b/app-admin/collectd/collectd-5.5.1.ebuild
new file mode 100644
index 0000000..63ded29
--- /dev/null
+++ b/app-admin/collectd/collectd-5.5.1.ebuild
@@ -0,0 +1,460 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="6"
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+
+inherit autotools fcaps java-pkg-opt-2 linux-info multilib perl-functions python-single-r1 systemd user
+
+DESCRIPTION="Collects system statistics and provides mechanisms to store the values"
+
+HOMEPAGE="http://collectd.org/"
+SRC_URI="${HOMEPAGE}/files/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="contrib debug java kernel_Darwin kernel_FreeBSD kernel_linux perl selinux static-libs"
+
+# The plugin lists have to follow here since they extend IUSE
+
+# Plugins that don't build (e.g. dependencies not in Gentoo)
+# apple_sensors: Requires libIOKit
+# aquaero:       Requires aerotools-ng/libaquaero5
+# barometer:     Requires libi2c (i2c_smbus_read_i2c_block_data)
+# lpar:          Requires libperfstat (AIX only)
+# mic:           Requires Intel Many Integrated Core Architecture API
+#                (part of Intel's  Xeon Phi software)
+# netapp:        Requires libnetapp (http://communities.netapp.com/docs/DOC-1110)
+# pf:            Requires BSD packet filter
+# pinba:         Requires MySQL Pinba engine (http://pinba.org/)
+# tape:          Requires libkstat (Solaris only)
+# write_kafka:   Requires librdkafka
+# write_mongodb: https://github.com/collectd/collectd/issues/492
+# xmms:          Requires libxmms (v1)
+COLLECTD_IMPOSSIBLE_PLUGINS="apple_sensors aquaero mic netapp pf pinba tape write_kafka write_mongodb xmms"
+
+# Plugins that have been (compile) tested and can be enabled via COLLECTD_PLUGINS
+COLLECTD_TESTED_PLUGINS="amqp aggregation apache apcups ascent battery bind ceph
+	cgroups conntrack contextswitch cpu cpufreq csv curl curl_json curl_xml dbi df
+	disk dns drbd email entropy ethstat exec fhcount filecount fscache genericjmx
+	gmond hddtemp interface ipc ipmi iptables ipvs irq java load logfile log_logstash
+	lvm madwifi match_empty_counter match_hashed match_regex match_timediff match_value
+	mbmon md memcachec memcached memory modbus multimeter mysql netlink network network
+	nfs nginx notify_desktop notify_email ntpd numa nut olsrd onewire openldap openvpn
+	oracle perl ping postgresql powerdns processes protocols python python redis
+	routeros rrdcached rrdtool sensors serial sigrok smart snmp statsd swap syslog
+	table tail tail_csv target_notification target_replace target_scale target_set
+	tcpconns teamspeak2 ted thermal threshold tokyotyrant turbostat unixsock uptime
+	users uuid varnish virt vmem vserver wireless write_graphite write_http
+	write_log write_redis write_riemann write_sensu write_tsdb zfs_arc zookeeper"
+
+COLLECTD_DISABLED_PLUGINS="${COLLECTD_IMPOSSIBLE_PLUGINS}"
+
+COLLECTD_ALL_PLUGINS=${COLLECTD_TESTED_PLUGINS}
+
+for plugin in ${COLLECTD_ALL_PLUGINS}; do
+	IUSE="${IUSE} collectd_plugins_${plugin}"
+done
+unset plugin
+
+# Now come the dependencies.
+
+COMMON_DEPEND="
+	dev-libs/libgcrypt:=
+	sys-devel/libtool
+	perl?					( dev-lang/perl:=[ithreads] )
+	collectd_plugins_amqp?			( net-libs/rabbitmq-c )
+	collectd_plugins_apache?		( net-misc/curl )
+	collectd_plugins_ascent?		( net-misc/curl dev-libs/libxml2 )
+	collectd_plugins_bind?			( dev-libs/libxml2:= )
+	collectd_plugins_ceph?			( dev-libs/yajl )
+	collectd_plugins_curl?			( net-misc/curl )
+	collectd_plugins_curl_json?		( net-misc/curl dev-libs/yajl )
+	collectd_plugins_curl_xml?		( net-misc/curl dev-libs/libxml2:= )
+	collectd_plugins_dbi?			( dev-db/libdbi )
+	collectd_plugins_disk?			( virtual/udev )
+	collectd_plugins_dns?			( net-libs/libpcap )
+	collectd_plugins_genericjmx?		( virtual/jre:= dev-java/java-config-wrapper )
+	collectd_plugins_gmond?			( sys-cluster/ganglia )
+	collectd_plugins_ipmi?			( >=sys-libs/openipmi-2.0.16-r1 )
+	collectd_plugins_iptables?		( >=net-firewall/iptables-1.4.13:= )
+	collectd_plugins_java?			( virtual/jre:= dev-java/java-config-wrapper )
+	collectd_plugins_log_logstash?		( dev-libs/yajl )
+	collectd_plugins_lvm?			( sys-fs/lvm2 )
+	collectd_plugins_memcachec?		( dev-libs/libmemcached )
+	collectd_plugins_modbus?		( dev-libs/libmodbus )
+	collectd_plugins_mysql?			( >=virtual/mysql-5.0 )
+	collectd_plugins_netlink?		( net-libs/libmnl )
+	collectd_plugins_nginx?			( net-misc/curl )
+	collectd_plugins_notify_desktop?	( x11-libs/libnotify )
+	collectd_plugins_notify_email?		( net-libs/libesmtp )
+	collectd_plugins_nut?			( sys-power/nut )
+	collectd_plugins_openldap?		( net-nds/openldap )
+	collectd_plugins_onewire?		( >=sys-fs/owfs-3.1 )
+	collectd_plugins_oracle?		( dev-db/oracle-instantclient-basic )
+	collectd_plugins_perl?			( dev-lang/perl:=[ithreads] )
+	collectd_plugins_ping?			( net-libs/liboping )
+	collectd_plugins_postgresql?		( dev-db/postgresql:= )
+	collectd_plugins_python?		( ${PYTHON_DEPS} )
+	collectd_plugins_redis?			( dev-libs/hiredis:= )
+	collectd_plugins_routeros?		( net-libs/librouteros )
+	collectd_plugins_rrdcached?		( net-analyzer/rrdtool )
+	collectd_plugins_rrdtool?		( net-analyzer/rrdtool )
+	collectd_plugins_sensors?		( sys-apps/lm_sensors )
+	collectd_plugins_sigrok?		( sci-libs/libsigrok )
+	collectd_plugins_smart?			( virtual/udev dev-libs/libatasmart )
+	collectd_plugins_snmp?			( net-analyzer/net-snmp )
+	collectd_plugins_tokyotyrant?		( net-misc/tokyotyrant )
+	collectd_plugins_varnish?		( www-servers/varnish )
+	collectd_plugins_virt?			( app-emulation/libvirt dev-libs/libxml2:= )
+	collectd_plugins_write_http?		( net-misc/curl )
+	collectd_plugins_write_redis?		( dev-libs/hiredis:= )
+	collectd_plugins_write_riemann?		( dev-libs/protobuf-c )
+
+	kernel_FreeBSD? (
+		collectd_plugins_disk?		( sys-libs/libstatgrab:= )
+		collectd_plugins_interface?	( sys-libs/libstatgrab:= )
+		collectd_plugins_load?		( sys-libs/libstatgrab:= )
+		collectd_plugins_memory?	( sys-libs/libstatgrab:= )
+		collectd_plugins_swap?		( sys-libs/libstatgrab:= )
+		collectd_plugins_users?		( sys-libs/libstatgrab:= )
+	)"
+
+DEPEND="${COMMON_DEPEND}
+	collectd_plugins_genericjmx?		( >=virtual/jdk-1.6 )
+	collectd_plugins_java?			( >=virtual/jdk-1.6 )
+	virtual/pkgconfig"
+
+RDEPEND="${COMMON_DEPEND}
+	collectd_plugins_syslog?		( virtual/logger )
+	selinux?				( sec-policy/selinux-collectd )"
+
+REQUIRED_USE="
+	collectd_plugins_genericjmx?		( java )
+	collectd_plugins_java?			( java )
+	collectd_plugins_python?		( ${PYTHON_REQUIRED_USE} )"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-4.10.3"-werror.patch
+	"${FILESDIR}/${PN}-5.5.1"-{libocci,lt,nohal}.patch
+)
+
+# @FUNCTION: collectd_plugin_kernel_linux
+# @DESCRIPTION:
+# USAGE: <plugin name> <kernel_options> <severity>
+# kernel_options is a list of kernel configurations options; the check tests whether at least
+#   one of them is enabled. If no, depending on the third argument an elog, ewarn, or eerror message
+#   is emitted.
+collectd_plugin_kernel_linux() {
+	local multi_opt opt
+	if has ${1} ${COLLECTD_ALL_PLUGINS}; then
+		if use collectd_plugins_${1}; then
+			for opt in ${2}; do
+				if linux_chkconfig_present ${opt}; then
+					return 0;
+				fi
+			done
+			multi_opt=${2//\ /\ or\ }
+			case ${3} in
+				(info)
+					elog "The ${1} plugin can use kernel features that are disabled now; enable ${multi_opt} in your kernel"
+				;;
+				(warn)
+					ewarn "The ${1} plugin uses kernel features that are disabled now; enable ${multi_opt} in your kernel"
+				;;
+				(error)
+					eerror "The ${1} plugin needs kernel features that are disabled now; enable ${multi_opt} in your kernel"
+				;;
+				(*)
+					die "function collectd_plugin_kernel_linux called with invalid third argument"
+				;;
+			esac
+		fi
+	fi
+}
+
+collectd_linux_kernel_checks() {
+	if ! linux_chkconfig_present PROC_FS; then
+		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"
+	fi
+
+	if ! linux_chkconfig_present SYSFS; then
+		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"
+	fi
+
+	# battery.c: /proc/pmu/battery_%i
+	# battery.c: /proc/acpi/battery
+	collectd_plugin_kernel_linux battery ACPI_BATTERY warn
+
+	# cgroups.c: /sys/fs/cgroup/
+	collectd_plugin_kernel_linux cgroups CONFIG_CGROUPS warn
+
+	# cpufreq.c: /sys/devices/system/cpu/cpu%d/cpufreq/
+	collectd_plugin_kernel_linux cpufreq SYSFS warn
+	collectd_plugin_kernel_linux cpufreq CPU_FREQ_STAT warn
+
+	# drbd.c: /proc/drbd
+	collectd_plugin_kernel_linux drbd BLK_DEV_DRBD warn
+
+	# conntrack.c: /proc/sys/net/netfilter/*
+	collectd_plugin_kernel_linux conntrack NETFILTER warn
+
+	# fscache.c: /proc/fs/fscache/stats
+	collectd_plugin_kernel_linux fscache FSCACHE warn
+
+	# nfs.c: /proc/net/rpc/nfs
+	# nfs.c: /proc/net/rpc/nfsd
+	collectd_plugin_kernel_linux nfs NFS_COMMON warn
+
+	# serial.c: /proc/tty/driver/serial
+	# serial.c: /proc/tty/driver/ttyS
+	collectd_plugin_kernel_linux serial SERIAL_CORE warn
+
+	# swap.c: /proc/meminfo
+	collectd_plugin_kernel_linux swap SWAP warn
+
+	# thermal.c: /proc/acpi/thermal_zone
+	# thermal.c: /sys/class/thermal
+	collectd_plugin_kernel_linux thermal ACPI_THERMAL warn
+
+	# turbostat.c: /dev/cpu/%d/msr
+	collectd_plugin_kernel_linux turbostat X86_MSR warn
+
+	# vmem.c: /proc/vmstat
+	collectd_plugin_kernel_linux vmem VM_EVENT_COUNTERS warn
+
+	# vserver.c: /proc/virtual
+	collectd_plugin_kernel_linux vserver VSERVER warn
+
+	# uuid.c: /sys/hypervisor/uuid
+	collectd_plugin_kernel_linux uuid SYSFS info
+
+	# wireless.c: /proc/net/wireless
+	collectd_plugin_kernel_linux wireless "WIRELESS MAC80211 IEEE80211" warn
+
+	# zfs_arc.c: /proc/spl/kstat/zfs/arcstats
+	collectd_plugin_kernel_linux zfs_arc "SPL ZFS" warn
+}
+
+pkg_setup() {
+	if use kernel_linux; then
+		linux-info_pkg_setup
+
+		if linux_config_exists; then
+			einfo "Checking your linux kernel configuration:"
+			collectd_linux_kernel_checks
+		else
+			elog "Cannot find a linux kernel configuration. Continuing anyway."
+		fi
+	fi
+
+	if use collectd_plugins_java || use collectd_plugins_genericjmx; then
+		java-pkg-opt-2_pkg_setup
+	fi
+
+	use collectd_plugins_python && python-single-r1_pkg_setup
+
+	enewgroup collectd
+	enewuser collectd -1 -1 /var/lib/collectd collectd
+}
+
+src_prepare() {
+	default
+
+	# There's some strange prefix handling in the default config file, resulting in
+	# paths like "/usr/var/..."
+	sed -i -e "s:@prefix@/var:/var:g" src/collectd.conf.in || die
+
+	sed -i -e "s:/etc/collectd/collectd.conf:/etc/collectd.conf:g" contrib/collectd.service || die
+
+	# fix installdirs for perl, bug 444360
+	sed -i -e 's/INSTALL_BASE=$(DESTDIR)$(prefix) //' bindings/Makefile.am || die
+
+	if use collectd_plugins_java || use collectd_plugins_genericjmx; then
+		# Set javac -source and -target flags according to (R)DEPEND.
+		sed -i -e "s/\$(JAVAC)/\0 $(java-pkg_javac-args)/g" bindings/java/Makefile.am || die
+	fi
+
+	ebegin "Removing bundled libltdl"
+	rm -r libltdl || die
+	eend 0
+
+	eautoreconf
+}
+
+src_configure() {
+	# Now come the lists of os-dependent plugins. Any plugin that is not listed anywhere here
+	# should work independent of the operating system.
+
+	local linux_plugins="barometer battery cpu cpufreq disk drbd entropy
+		ethstat interface iptables ipvs irq ipc load memory md netlink nfs
+		numa processes serial swap tcpconns thermal turbostat users vmem
+		wireless zfc_arc"
+
+	local need_libstatgrab=0
+	local libstatgrab_plugins="cpu disk interface load memory swap users"
+	local bsd_plugins="cpu tcpconns ${libstatgrab_plugins} zfc_arc"
+
+	local darwin_plugins="apple_sensors battery cpu disk interface memory processes tcpconns"
+
+	local osdependent_plugins="${linux_plugins} ${bsd_plugins} ${darwin_plugins}"
+	local myos_plugins=""
+	if use kernel_linux; then
+		einfo "Enabling Linux plugins."
+		myos_plugins=${linux_plugins}
+	elif use kernel_FreeBSD; then
+		einfo "Enabling FreeBSD plugins."
+		myos_plugins=${bsd_plugins}
+	elif use kernel_Darwin; then
+		einfo "Enabling Darwin plugins."
+		myos_plugins=${darwin_plugins}
+	fi
+
+	# Do we debug?
+	local myconf="$(use_enable debug)"
+
+	local plugin
+
+	# Disable what needs to be disabled.
+	for plugin in ${COLLECTD_DISABLED_PLUGINS}; do
+		myconf+=" --disable-${plugin}"
+	done
+
+	# Set enable/disable for each single plugin.
+	for plugin in ${COLLECTD_ALL_PLUGINS}; do
+		if has ${plugin} ${osdependent_plugins}; then
+			# plugin is os-dependent ...
+			if has ${plugin} ${myos_plugins}; then
+				# ... and available in this os
+				myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
+				# ... must we link against libstatgrab? Bug #541518
+				if use kernel_FreeBSD && has ${plugin} ${libstatgrab_plugins}; then
+					einfo "We must link against libstatgrab due to plugin \"${plugin}\" ..."
+					need_libstatgrab=1
+				fi
+			else
+				# ... and NOT available in this os
+				if use collectd_plugins_${plugin}; then
+					ewarn "You try to enable the ${plugin} plugin, but it is not available for this"
+					ewarn "kernel. Disabling it automatically."
+				fi
+				myconf+=" --disable-${plugin}"
+			fi
+		elif [[ "${plugin}" = "collectd_plugins_perl" ]]; then
+			if use collectd_plugins_perl && ! use perl; then
+				ewarn "Perl plugin disabled as perl bindings disabled by -perl use flag"
+				myconf+= --disable-perl
+			else
+				myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
+			fi
+		else
+			myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
+		fi
+	done
+
+	if [ "${need_libstatgrab}" -eq 1 ]; then
+		myconf+=" --with-libstatgrab"
+	else
+		myconf+=" --without-libstatgrab"
+	fi
+
+	# JAVA_HOME is set by eclasses.
+	if use collectd_plugins_java || use collectd_plugins_genericjmx; then
+		myconf+=" --with-java"
+	fi
+
+	# Need libiptc ONLY for iptables. If we try to use it otherwise bug 340109 happens.
+	# lots of libs are only needed for plugins, if they are disabled, also disable the lib
+	use collectd_plugins_iptables || myconf+=" --with-libiptc=no"
+	use collectd_plugins_openldap || myconf+=" --with-libldap=no"
+	use collectd_plugins_redis    || use collectd_plugins_write_redis || myconf+=" --with-libhiredis=no"
+	use collectd_plugins_smart    || myconf+=" --with-libatasmart=no"
+	use collectd_plugins_virt     || myconf+=" --with-libvirt=no"
+
+	if use perl; then
+		myconf+=" --with-perl-bindings=INSTALLDIRS=vendor"
+	else
+		myconf+=" --without-perl-bindings"
+	fi
+
+	# No need for v5upgrade
+	myconf+=" --disable-target_v5upgrade"
+
+	# Finally, run econf.
+	KERNEL_DIR="${KERNEL_DIR}" econf --config-cache --disable-ltdl-install \
+		--without-included-ltdl $(use_enable static-libs static) \
+		--localstatedir=/var ${myconf}
+}
+
+src_install() {
+	emake DESTDIR="${D%/}" install
+
+	perl_delete_localpod
+
+	find "${ED}"usr/ -name "*.la" -delete || die
+
+	if use collectd_plugins_java || use collectd_plugins_genericjmx; then
+		java-pkg_regjar "${ED}"usr/share/${PN}/java/*.jar
+	fi
+
+	fowners root:collectd /etc/collectd.conf
+	fperms u=rw,g=r,o= /etc/collectd.conf
+
+	dodoc AUTHORS ChangeLog NEWS README TODO
+
+	if use contrib ; then
+		insinto /usr/share/doc/${PF}
+		doins -r contrib
+	fi
+
+	keepdir /var/lib/${PN}
+	fowners collectd:collectd /var/lib/${PN}
+
+	newinitd "${FILESDIR}/${PN}.initd-r1" ${PN}
+	newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
+	systemd_dounit "contrib/${PN}.service"
+
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}/logrotate" collectd
+
+	sed -i -e 's:^.*PIDFile     "/var/run/collectd.pid":PIDFile     "/run/collectd/collectd.pid":' "${ED}"etc/collectd.conf || die
+	sed -i -e 's:^#	SocketFile "/var/run/collectd-unixsock":#	SocketFile "/run/collectd/collectd.socket":' "${ED}"etc/collectd.conf || die
+	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
+	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
+}
+
+pkg_postinst() {
+	local caps=()
+	use collectd_plugins_ping      && caps+=('cap_net_raw')
+	use collectd_plugins_iptables  && caps+=('cap_net_admin')
+	use collectd_plugins_filecount && caps+=('cap_dac_read_search')
+
+	if [ ${#caps[@]} -gt 0 ]; then
+		local caps_str=$(IFS=","; echo "${caps[*]}")
+		fcaps ${caps_str} usr/sbin/collectd
+		elog "Capabilities for ${EROOT}usr/sbin/collectd set to:"
+		elog "  ${caps_str}+ep"
+		elog
+	fi
+
+	elog "Note: Collectd is only the collector."
+	elog "      You need to install 'data' sources (applications) locally or"
+	elog "      remotely on your own."
+
+	elog
+	elog "Collectd is configured to run as unprivileged user by default."
+	elog "You may want to revisit the configuration."
+	elog
+
+	if use collectd_plugins_email; then
+		ewarn "The email plug-in is deprecated. To submit statistics please use the unixsock plugin."
+	fi
+
+	if use contrib; then
+		elog "The scripts in /usr/share/doc/${PF}/collection3 for generating graphs need dev-perl/HTML-Parser,"
+		elog "dev-perl/config-general, dev-perl/regexp-common, and net-analyzer/rrdtool[perl] to be installed."
+	fi
+}

diff --git a/app-admin/collectd/files/collectd-5.5.1-libocci.patch b/app-admin/collectd/files/collectd-5.5.1-libocci.patch
new file mode 100644
index 0000000..e7baaa06
--- /dev/null
+++ b/app-admin/collectd/files/collectd-5.5.1-libocci.patch
@@ -0,0 +1,33 @@
+[PATCH 1/3] Link Oracle plug-in against libocci
+
+Author: Aurelien Minet
+X-Gentoo-Bug: 347607
+X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=347607
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index fc1e11c..b977a0a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3248,14 +3248,14 @@ AC_ARG_WITH(oracle, [AS_HELP_STRING([--with-oracle@<:@=ORACLE_HOME@:>@], [Path t
+ ])
+ if test "x$ORACLE_HOME" != "x"
+ then
+-	with_oracle_cppflags="-I$ORACLE_HOME/rdbms/public"
++	with_oracle_cppflags="-I$ORACLE_HOME/rdbms/public -locci"
+ 
+ 	if test -e "$ORACLE_HOME/lib/ldflags"
+ 	then
+ 		with_oracle_libs=`cat "$ORACLE_HOME/lib/ldflags"`
+ 	fi
+ 	#with_oracle_libs="-L$ORACLE_HOME/lib $with_oracle_libs -lclntsh"
+-	with_oracle_libs="-L$ORACLE_HOME/lib -lclntsh"
++	with_oracle_libs="-L$ORACLE_HOME/lib -lclntsh -locci"
+ fi
+ if test "x$with_oracle" = "xyes"
+ then
+-- 
+2.7.1
+

diff --git a/app-admin/collectd/files/collectd-5.5.1-lt.patch b/app-admin/collectd/files/collectd-5.5.1-lt.patch
new file mode 100644
index 0000000..eff1de8
--- /dev/null
+++ b/app-admin/collectd/files/collectd-5.5.1-lt.patch
@@ -0,0 +1,60 @@
+[PATCH 2/3] Remove bundled libltdl
+
+---
+ Makefile.am  | 6 ------
+ configure.ac | 5 -----
+ 2 files changed, 11 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index b79ea1c..d574601 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,11 +1,5 @@
+-ACLOCAL_AMFLAGS = -I libltdl/m4
+-
+ SUBDIRS =
+ 
+-if BUILD_INCLUDED_LTDL
+-SUBDIRS += libltdl
+-endif
+-
+ SUBDIRS += src bindings .
+ 
+ AM_CPPFLAGS = $(LTDLINCL)
+diff --git a/configure.ac b/configure.ac
+index b977a0a..78f3bee 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2,7 +2,6 @@ dnl Process this file with autoconf to produce a configure script.
+ AC_INIT([collectd],[m4_esyscmd(./version-gen.sh)])
+ AC_CONFIG_SRCDIR(src/)
+ AC_CONFIG_HEADERS(src/config.h)
+-AC_CONFIG_AUX_DIR([libltdl/config])
+ 
+ dnl older automake's default of ARFLAGS=cru is noisy on newer binutils;
+ dnl we don't really need the 'u' even in older toolchains.  Then there is
+@@ -12,7 +11,6 @@ m4_divert_text([DEFAULTS], [: "${ARFLAGS=cr} ${AR_FLAGS=cr}"])
+ m4_ifdef([LT_PACKAGE_VERSION],
+ 	# libtool >= 2.2
+ 	[
+-	 LT_CONFIG_LTDL_DIR([libltdl])
+ 	 LT_INIT([dlopen])
+ 	 LTDL_INIT([convenience])
+ 	 AC_DEFINE(LIBTOOL_VERSION, 2, [Define to used libtool version.])
+@@ -24,13 +22,10 @@ m4_ifdef([LT_PACKAGE_VERSION],
+ 	 AC_SUBST(LTDLINCL)
+ 	 AC_SUBST(LIBLTDL)
+ 	 AC_LIBTOOL_DLOPEN
+-	 AC_CONFIG_SUBDIRS(libltdl)
+ 	 AC_DEFINE(LIBTOOL_VERSION, 1, [Define to used libtool version.])
+ 	]
+ )
+ 
+-AM_CONDITIONAL([BUILD_INCLUDED_LTDL], [test "x$LTDLDEPS" != "x"])
+-
+ AM_INIT_AUTOMAKE([tar-pax dist-bzip2 foreign])
+ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+ AC_LANG(C)
+-- 
+2.7.1
+

diff --git a/app-admin/collectd/files/collectd-5.5.1-nohal.patch b/app-admin/collectd/files/collectd-5.5.1-nohal.patch
new file mode 100644
index 0000000..fcdebb5
--- /dev/null
+++ b/app-admin/collectd/files/collectd-5.5.1-nohal.patch
@@ -0,0 +1,35 @@
+[PATCH 3/3] Remove libhal dependency
+
+X-Gentoo-Bug: 353839
+X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=353839
+---
+ configure.ac | 13 +------------
+ 1 file changed, 1 insertion(+), 12 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1c85964..cf38159 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1500,18 +1500,7 @@ AC_CHECK_LIB(resolv, res_search,
+ AM_CONDITIONAL(BUILD_WITH_LIBRESOLV, test "x$with_libresolv" = "xyes")
+ 
+ dnl Check for HAL (hardware abstraction library)
+-with_libhal="yes"
+-AC_CHECK_LIB(hal,libhal_device_property_exists,
+-	     [AC_DEFINE(HAVE_LIBHAL, 1, [Define to 1 if you have 'hal' library])],
+-	     [with_libhal="no"])
+-if test "x$with_libhal" = "xyes"; then
+-	if test "x$PKG_CONFIG" != "x"; then
+-		BUILD_WITH_LIBHAL_CFLAGS="`$PKG_CONFIG --cflags hal`"
+-		BUILD_WITH_LIBHAL_LIBS="`$PKG_CONFIG --libs hal`"
+-		AC_SUBST(BUILD_WITH_LIBHAL_CFLAGS)
+-		AC_SUBST(BUILD_WITH_LIBHAL_LIBS)
+-	fi
+-fi
++with_libhal="no"
+ 
+ # --with-libpthread {{{
+ AC_ARG_WITH(libpthread, [AS_HELP_STRING([--with-libpthread=@<:@=PREFIX@:>@], [Path to libpthread.])],
+-- 
+2.7.1
+

diff --git a/app-admin/collectd/files/collectd.confd-r1 b/app-admin/collectd/files/collectd.confd-r1
new file mode 100644
index 0000000..2633ab0
--- /dev/null
+++ b/app-admin/collectd/files/collectd.confd-r1
@@ -0,0 +1,46 @@
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Nice value used to launch collectd, to change priority of the process. As
+# you usually we want to run it in background, a default of 5 is used.
+#
+#COLLECTD_NICELEVEL=5
+
+# Location of configuration file. Modify if you don't like the standard
+# one.
+#
+#COLLECTD_CONFIGFILE="/etc/collectd.conf"
+
+# File used to store the PID file. Usually you won't need to touch it.
+#
+#COLLECTD_PIDFILE="/run/collectd/collectd.pid"
+
+# User to run collectd as (default is collectd, change to root or give
+# collectd user appropriate privileges if you use one of the plugins that 
+# require it, as e.g. ping or iptables plugins)
+#
+#COLLECTD_USER="collectd"
+
+# The group is only important if you are using collectd's UNIX socket
+# in the default location (/run/collectd) because we will chown the
+# default location to COLLECTD_USER:COLLECTD_GROUP. The default value
+# is "collectd".
+#COLLECTD_GROUP="collectd"
+
+# You can use this configuration option to pass additional options to the
+# start-stop-daemon, see start-stop-daemon(8) for more details.
+# Per default we wait 1000ms after we have started the service to ensure
+# that the daemon is really up and running.
+#COLLECTD_SSDARGS="--wait 1000"
+
+# The termination timeout (start-stop-daemon parameter "retry") ensures
+# that the service will be terminated within a given time (25 + 5 seconds
+# per default) when you are stopping the service.
+#COLLECTD_TERMTIMEOUT="TERM/25/KILL/5"
+
+# Options to collectd
+# See collectd(8) for more details
+# Notes:
+# * Do not specify another PIDFILE but use the variable above to change the location
+# * Do not specify another CONFIGFILE but use the variable above to change the location
+#COLLECTD_OPTS=""

diff --git a/app-admin/collectd/files/collectd.initd-r1 b/app-admin/collectd/files/collectd.initd-r1
new file mode 100644
index 0000000..a90ec50
--- /dev/null
+++ b/app-admin/collectd/files/collectd.initd-r1
@@ -0,0 +1,79 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+COLLECTD_CONFIGFILE=${COLLECTD_CONFIGFILE:-"/etc/collectd.conf"}
+COLLECTD_PIDFILE=${COLLECTD_PIDFILE:-"/run/collectd/collectd.pid"}
+COLLECTD_NICELEVEL=${COLLECTD_NICELEVEL:-5}
+COLLECTD_USER=${COLLECTD_USER:-"collectd"}
+COLLECTD_GROUP=${COLLECTD_GROUP:-"collectd"}
+COLLECTD_SSDARGS=${COLLECTD_SSDARGS:-"--wait 1000"}
+COLLECTD_TERMTIMEOUT=${COLLECTD_TERMTIMEOUT:-"TERM/25/KILL/5"}
+COLLECTD_OPTS=${COLLECTD_OPTS:-""}
+
+command="/usr/sbin/collectd"
+command_args="${COLLECTD_OPTS} -C \"${COLLECTD_CONFIGFILE}\" -P \"${COLLECTD_PIDFILE}\""
+start_stop_daemon_args="${COLLECTD_SSDARGS} --nice ${COLLECTD_NICELEVEL} --user ${COLLECTD_USER}:${COLLECTD_GROUP}"
+pidfile="${COLLECTD_PIDFILE}"
+retry="${COLLECTD_TERMTIMEOUT}"
+
+extra_commands="configtest"
+description_configtest="Run collectd's internal config check."
+
+required_files="\"${COLLECTD_CONFIGFILE}\""
+
+depend() {
+	use dns
+}
+
+_checkconfig() {
+	if [ $(eval sed '/^$\|^#/d' \"${COLLECTD_CONFIGFILE}\" | grep --count 'LoadPlugin[[:space:]]\+oracle') -ge 1 ] ; then
+		if [ -e /etc/env.d/50oracle-instantclient-basic ] ; then
+			. /etc/env.d/50oracle-instantclient-basic
+			export ORACLE_HOME
+			export TNS_ADMIN
+		else
+			ewarn "Unable to set Oracle environment, Oracle plugin wont work"
+		fi
+	fi
+
+	local test_command="${command} -t -C \"${COLLECTD_CONFIGFILE}\""
+
+	eval ${test_command} 1>/dev/null 2>&1
+	ret=$?
+	if [ $ret -ne 0 ]; then
+		eerror "${SVCNAME} has detected an error in your configuration:"
+		eval ${test_command}
+	fi
+
+	return $ret
+}
+
+configtest() {
+	ebegin "Checking ${SVCNAME} configuration"
+	_checkconfig
+	eend $?
+}
+
+start_pre() {
+	if [ "${RC_CMD}" != "restart" ]; then
+		configtest || return 1
+	fi
+
+	checkpath --directory --mode 0770 --owner ${COLLECTD_USER}:${COLLECTD_GROUP} "$(dirname "${COLLECTD_PIDFILE}")"
+}
+
+stop_pre() {
+	if [ "${RC_CMD}" = "restart" ]; then
+		configtest || return 1
+	fi
+}
+
+stop_post() {
+	if [ -f "${COLLECTD_PIDFILE}" ]; then
+		vebegin "Removing stale PID file"
+		rm --force "${COLLECTD_PIDFILE}"
+		veend $?
+	fi
+}

diff --git a/app-admin/collectd/metadata.xml b/app-admin/collectd/metadata.xml
index 2b9b9b4..91a0680 100644
--- a/app-admin/collectd/metadata.xml
+++ b/app-admin/collectd/metadata.xml
@@ -1,133 +1,161 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-	<longdescription>Collectd gathers statistics about the system it is running on and stores this information. Those statistics can then be used to find current performance bottlenecks (i.e. performance analysis) and predict future system load (i.e. capacity planning). Or if you just want pretty graphs of your private server and are fed up with some homegrown solution you're at the right place.</longdescription>
 	<maintainer type="person">
 		<email>bugs@bergstroem.nu</email>
 		<name>Johan Bergström</name>
 		<description>Proxied Maintainer</description>
 	</maintainer>
+	<maintainer type="person">
+		<email>whissi@whissi.de</email>
+		<name>Thomas D.</name>
+		<description>Proxied Maintainer</description>
+	</maintainer>
 	<maintainer type="project">
 		<email>proxy-maint@gentoo.org</email>
 		<name>Proxy Maintainers</name>
 	</maintainer>
+	<longdescription lang="en">
+		Collectd gathers statistics about the system it is running on and stores this
+		information. Those statistics can then be used to find current performance
+		bottlenecks (i.e. performance analysis) and predict future system load (i.e.
+		capacity planning). Or if you just want pretty graphs of your private server
+		and are fed up with some homegrown solution you're at the right place.
+	</longdescription>
+	<upstream>
+		<bugs-to>https://github.com/collectd/collectd/issues</bugs-to>
+		<doc lang="en">https://collectd.org/documentation.shtml</doc>
+		<remote-id type="github">collectd/collectd</remote-id>
+	</upstream>
 	<use>
-		<flag name="collectd_plugins_aggregation">Build the aggregation plugin (aggregate multiplte values into a single value)</flag>
-		<flag name="collectd_plugins_apache">Build the apache input plugin (transferred bytes, handled requests, detailed scoreboard statistics)</flag>
-		<flag name="collectd_plugins_apcups">Build the apcups input plugin (UPS charge, load, input/output/battery voltage, etc.)</flag>
-		<flag name="collectd_plugins_ascent">Build the ascent input plugin (statistics about a free server for World of Warcraft)</flag>
-		<flag name="collectd_plugins_battery">Build the battery input plugin (charge, current and voltage of ACPI and PMU based laptop batteries)</flag>
-		<flag name="collectd_plugins_bind">Build the bind input plugin (name server and resolver statistics)</flag>
-		<flag name="collectd_plugins_ceph">Build the plugin for <pkg>sys-cluster/ceph</pkg></flag>
-		<flag name="collectd_plugins_cgroups">Build the cgroups CPU accounting collection plugin</flag>
-		<flag name="collectd_plugins_conntrack">Build the conntrack input plugin (number of nf_conntrack entries)</flag>
-		<flag name="collectd_plugins_contextswitch">Build the contextswitch input plugin (number of context switches done by the operating system)</flag>
-		<flag name="collectd_plugins_cpu">Build the cpu input plugin (time spent in the system, user, nice, idle, and related states)</flag>
-		<flag name="collectd_plugins_cpufreq">Build the cpufreq input plugin (CPU frequency, for laptops with speedstep or similar)</flag>
-		<flag name="collectd_plugins_csv">Build the csv output plugin (write to comma separated values (CSV) files)</flag>
-		<flag name="collectd_plugins_curl">Build the curl input plugin (parse statistics from websites using regular expressions)</flag>
-		<flag name="collectd_plugins_curl_json">Build the curl_json input plugin (get json data via curl and parse it)</flag>
-		<flag name="collectd_plugins_curl_xml">Build the curl_xml input plugin (get xml data via curl and parse it)</flag>
-		<flag name="collectd_plugins_dbi">Build the dbi input plugin (execute SQL statements on databases and interpret the reply)</flag>
-		<flag name="collectd_plugins_df">Build the df input plugin (mountpoint usage)</flag>
-		<flag name="collectd_plugins_disk">Build the disk input plugin (sectors read/written, number of read/write actions, average completion time of IO-operations)</flag>
-		<flag name="collectd_plugins_dns">Build the dns input plugin (collects statistics of your DNS traffic on port udp/53)</flag>
-		<flag name="collectd_plugins_drbd">Build the plugin for DRBD statistics</flag>
+		<flag name="collectd_plugins_aggregation">Build the aggregation plugin (aggregates multiplte values into a single value)</flag>
+		<flag name="collectd_plugins_amqp">Build the AMQP output plugin (transmits or receives values collected by collectd via the Advanced Message Queuing Protocol (AMQP))</flag>
+		<flag name="collectd_plugins_apache">Build the apache input plugin (collects statistics from Apache's mod_status module)</flag>
+		<flag name="collectd_plugins_apcups">Build the apcups input plugin (reads various statistics about a connected uninterruptible power supply (UPS))</flag>
+		<flag name="collectd_plugins_ascent">Build the ascent input plugin (reads and parses the statistics page of Ascent)</flag>
+		<flag name="collectd_plugins_barometer">Build the barometer input plugin (reads sensor data from various Freescale and Bosch digital barometers)</flag>
+		<flag name="collectd_plugins_battery">Build the battery input plugin (collects the battery's charge, the drawn current and the battery's voltage)</flag>
+		<flag name="collectd_plugins_bind">Build the bind input plugin (collects statistics from bind instances)</flag>
+		<flag name="collectd_plugins_ceph">Build the Ceph input plugin (collects statistics from the Ceph distributed storage system)</flag>
+		<flag name="collectd_plugins_cgroups">Build the cgroups input plugin (collects CPU accounting information for processes in a cgroup)</flag>
+		<flag name="collectd_plugins_conntrack">Build the conntrack input plugin (tracks the number of entries in Linux's connection tracking table)</flag>
+		<flag name="collectd_plugins_contextswitch">Build the contextswitch input plugin (collects the number of context switches done by the operating system)</flag>
+		<flag name="collectd_plugins_cpu">Build the cpu input plugin (collects the amount of time spent by the CPU in various states)</flag>
+		<flag name="collectd_plugins_cpufreq">Build the cpufreq input plugin (collects the current CPU's frequency)</flag>
+		<flag name="collectd_plugins_csv">Build the csv output plugin (writes to comma separated values (CSV) files)</flag>
+		<flag name="collectd_plugins_curl">Build the curl input plugin (reads streams using <pkg>net-misc/curl</pkg> and then parses them according to the configuration)</flag>
+		<flag name="collectd_plugins_curl_json">Build the curl_json input plugin (queries JavaScript Object Notation (JSON) data using <pkg>net-misc/curl</pkg> and parses it according to the user's configuration using <pkg>dev-libs/yajl</pkg>)</flag>
+		<flag name="collectd_plugins_curl_xml">Build the curl_xml input plugin (reads files using <pkg>net-misc/curl</pkg> and parses it as Extensible Markup Language (XML))</flag>
+		<flag name="collectd_plugins_dbi">Build the dbi input plugin (executes SQL statements on databases and reads back the result)</flag>
+		<flag name="collectd_plugins_df">Build the df input plugin (collects file system usage information, i. e. basically how much space on a mounted partition is used and how much is available)</flag>
+		<flag name="collectd_plugins_disk">Build the disk input plugin (collects performance statistics of disks and, where supported, partitions)</flag>
+		<flag name="collectd_plugins_dns">Build the dns input plugin (collects statistics of your DNS traffic on port udp/53 using <pkg>net-libs/libpcap</pkg>)</flag>
+		<flag name="collectd_plugins_drbd">Build the Linux's Distributed Replicated Block Device (DRBD) input plugin (reads Linux's DRBD statistics)</flag>
 		<flag name="collectd_plugins_email">Build the email input plugin (opens a UNIX domain socket and starts accepting connections on that socket)</flag>
-		<flag name="collectd_plugins_entropy">Build the entropy input plugin (available entropy on a system)</flag>
-		<flag name="collectd_plugins_ethstat">Build the ethstat input plugin (performance statistics of Linux ethernet cards)</flag>
+		<flag name="collectd_plugins_entropy">Build the entropy input plugin (collects the available entropy on a system)</flag>
+		<flag name="collectd_plugins_ethstat">Build the ethstat input plugin (reads performance statistics directly from ethernet cards)</flag>
 		<flag name="collectd_plugins_exec">Build the exec input/output plugin (executes scripts / applications and reads values back)</flag>
-		<flag name="collectd_plugins_fhcount">Build the plugin for File handles statistics</flag>
-		<flag name="collectd_plugins_filecount">Build the filecount input plugin (countd the number of files in a directory and all its subdirectories)</flag>
-		<flag name="collectd_plugins_fscache">Build the fscache input plugin (information about the caching infrastructure for network file-systems etc)</flag>
-		<flag name="collectd_plugins_gmond">Build the gmond input plugin (receive data from gmond, the client daemon of the Ganglia project)</flag>
-		<flag name="collectd_plugins_hddtemp">Build the hddtemp input plugin (temperature of hard disks)</flag>
-		<flag name="collectd_plugins_interface">Build the interface input plugin (information about traffic, packets and errors of interfaces)</flag>
-		<flag name="collectd_plugins_ipc">Build the plugin for IPC statistics</flag>
-		<flag name="collectd_plugins_ipmi">Build the ipmi input plugin (read hardware sensors from servers using the Intelligent Platform Management Interface (IPMI))</flag>
-		<flag name="collectd_plugins_iptables">Build the iptables input plugin (statistics from a ip_tables based packet filter)</flag>
-		<flag name="collectd_plugins_irq">Build the irq input plugin (number of times each interrupt has been handled by the os)</flag>
+		<flag name="collectd_plugins_fhcount">Build the file handles input plugin (reports the number of used file handles)</flag>
+		<flag name="collectd_plugins_filecount">Build the filecount input plugin (counts the number of files in a directory and all its subdirectories)</flag>
+		<flag name="collectd_plugins_fscache">Build the fscache input plugin (collects information about the file-system based caching infrastructure for network file-systems and other slow media)</flag>
+		<flag name="collectd_plugins_genericjmx">Build the GenericJMX input plugin (reads Managed Beans (MBeans) from an MBeanServer using JMX input plugin; Requires JAVA)</flag>
+		<flag name="collectd_plugins_gmond">Build the gmond input plugin (receives data from gmond, the client daemon of the Ganglia project)</flag>
+		<flag name="collectd_plugins_hddtemp">Build the hddtemp input plugin (collects the temperature of disks from hddtemp daemon)</flag>
+		<flag name="collectd_plugins_interface">Build the interface input plugin (collects information about the traffic, packets per second and errors of interfaces)</flag>
+		<flag name="collectd_plugins_ipc">Build the IPC input plugin (collects information related to shared memory)</flag>
+		<flag name="collectd_plugins_ipmi">Build the ipmi input plugin (reads hardware sensors from servers using the Intelligent Platform Management Interface (IPMI))</flag>
+		<flag name="collectd_plugins_iptables">Build the iptables input plugin (collects statistics from a ip_tables based packet filter)</flag>
+		<flag name="collectd_plugins_ipvs">Build the IPVS input plugin (collects statistics from Linux IP Virtual Server)</flag>
+		<flag name="collectd_plugins_irq">Build the irq input plugin (collects the number of times each interrupt has been handled by the operating system)</flag>
 		<flag name="collectd_plugins_java">Build the java input plugin (embeds a JVM into collectd for writing plugins)</flag>
-		<flag name="collectd_plugins_libvirt">Build the libvirt input plugin (statistics about virtualized guests on a system)</flag>
-		<flag name="collectd_plugins_load">Build the load input plugin (system load)</flag>
-		<flag name="collectd_plugins_log_logstash">Build the plugin for Logstash json_event compatible logging</flag>
-		<flag name="collectd_plugins_logfile">Build the logfile output plugin (writes log messages to a text file)</flag>
-		<flag name="collectd_plugins_lvm">Build the LVM input plugin</flag>
-		<flag name="collectd_plugins_madwifi">Build the madwifi input plugin (information about Atheros wireless LAN chipsets)</flag>
+		<flag name="collectd_plugins_libvirt">Build the (lib)virt input plugin (collects statistics about virtualized guests on a system)</flag>
+		<flag name="collectd_plugins_load">Build the load input plugin (collects the system load)</flag>
+		<flag name="collectd_plugins_logfile">Build the logfile output plugin (receives log messages from collectd and writes them to a text file)</flag>
+		<flag name="collectd_plugins_log_logstash">Build the Logstash output plugin (writes collectd logs and events as Logstash JSON formatted events)</flag>
+		<flag name="collectd_plugins_lvm">Build the LVM input plugin (collects the size of logical volumes (LV) and free space inside a volume group (VG) from Linux' Logical Volume Manager (LVM))</flag>
+		<flag name="collectd_plugins_madwifi">Build the madwifi input plugin (collects information about Atheros wireless LAN chipsets from the MadWifi driver)</flag>
 		<flag name="collectd_plugins_match_empty_counter">Build the match_empty_counter filter plugin</flag>
 		<flag name="collectd_plugins_match_hashed">Build the match_hashed filter plugin</flag>
 		<flag name="collectd_plugins_match_regex">Build the match_regex filter plugin</flag>
 		<flag name="collectd_plugins_match_timediff">Build the match_timediff filter plugin</flag>
 		<flag name="collectd_plugins_match_value">Build the match_value filter plugin</flag>
-		<flag name="collectd_plugins_mbmon">Build the mbmon input plugin (information from mainboard sensors)</flag>
-		<flag name="collectd_plugins_md">Build the md input plugin (disk states in Linux md devices)</flag>
-		<flag name="collectd_plugins_memcachec">Build the memcachec input plugin (connects to a memcached server)</flag>
-		<flag name="collectd_plugins_memcached">Build the memcached input plugin (connects to a memcached daemon)</flag>
-		<flag name="collectd_plugins_memory">Build the memory input plugin (physical memory utilization)</flag>
+		<flag name="collectd_plugins_mbmon">Build the mbmon input plugin (collects information from mainboard sensors)</flag>
+		<flag name="collectd_plugins_md">Build the md input plugin (reports the number of disks in various states in Linux software RAID devices)</flag>
+		<flag name="collectd_plugins_memcachec">Build the memcachec input plugin (queries one or more given pages from a memcached instance and parses the returned data according to user specification)</flag>
+		<flag name="collectd_plugins_memcached">Build the memcached input plugin (collects statistics from memcached daemon)</flag>
+		<flag name="collectd_plugins_memory">Build the memory input plugin (collects physical memory utilization)</flag>
+		<flag name="collectd_plugins_modbus">Build the Modbus input plugin (reads register values from a Modbus "slave" via Modbus/TCP)</flag>
 		<flag name="collectd_plugins_multimeter">Build the multimeter input plugin (reads a voltage or current from a multimeter connected to a serial bus)</flag>
-		<flag name="collectd_plugins_mysql">Build the mysql input plugin (connects to an MySQL-database and issues a SHOW STATUS command)</flag>
-		<flag name="collectd_plugins_netlink">Build the netlink input plugin (opens a netlink socket to the Linux kernel for getting statistics)</flag>
-		<flag name="collectd_plugins_network">Build the network input/output plugin (communicates with other instances of collectd)</flag>
-		<flag name="collectd_plugins_nfs">Build the nfs input plugin (usage of the Network File System)</flag>
-		<flag name="collectd_plugins_nginx">Build the nginx input plugin (number of requests handled by the nginx daemon)</flag>
-		<flag name="collectd_plugins_notify_desktop">Build the notify_desktop output plugin (uses libnotify to display notifications to the user)</flag>
-		<flag name="collectd_plugins_notify_email">Build the notify_email output plugin (uses libESMTP to send notifications to a configured email address)</flag>
-		<flag name="collectd_plugins_ntpd">Build the ntpd input plugin (queries an NTP server)</flag>
-		<flag name="collectd_plugins_numa">Build the numa input plugin (statistics of the Linux Non-Uniform Memory Access (NUMA) subsystem)</flag>
+		<flag name="collectd_plugins_mysql">Build the mysql input plugin (collects values from 'SHOW STATUS' command of a MySQL server)</flag>
+		<flag name="collectd_plugins_netlink">Build the netlink input plugin (collects statistics for interfaces, qdiscs, classes and filters using netlink socket)</flag>
+		<flag name="collectd_plugins_network">Build the network input/output plugin (send values to other and/or receive values from from other collectd instances)</flag>
+		<flag name="collectd_plugins_nfs">Build the nfs input plugin (collects information about the usage of the Network File System (NFS))</flag>
+		<flag name="collectd_plugins_nginx">Build the nginx input plugin (collects number of requests handled and the number of current connections by connection state by the nginx daemon)</flag>
+		<flag name="collectd_plugins_notify_desktop">Build the notify_desktop output plugin (uses <pkg>x11-libs/libnotify</pkg> to display notifications to the user)</flag>
+		<flag name="collectd_plugins_notify_email">Build the notify_email output plugin (uses <pkg>net-libs/libesmtp</pkg> to send notifications to a configured email address)</flag>
+		<flag name="collectd_plugins_ntpd">Build the ntpd input plugin (collects statistics from a NTP server)</flag>
+		<flag name="collectd_plugins_numa">Build the numa input plugin (collects statistics of the Linux Non-Uniform Memory Access (NUMA) subsystem)</flag>
 		<flag name="collectd_plugins_nut">Build the nut input plugin (collects UPS statistics using the Network UPS Tools)</flag>
 		<flag name="collectd_plugins_olsrd">Build the olsrd input plugin (reads information about the Optimized Link State Routing daemon)</flag>
-		<flag name="collectd_plugins_onewire">Build the onewire input plugin (collects temperature information from sensors)</flag>
-		<flag name="collectd_plugins_openldap">Build the plugin for OpenLDAP statistics</flag>
+		<flag name="collectd_plugins_onewire">Build the onewire (1-Wire) input plugin (collects temperature information from sensors)</flag>
+		<flag name="collectd_plugins_openldap">Build the OpenLDAP input plugin (reads monitoring information from OpenLDAP's cn=Monitor subtree)</flag>
 		<flag name="collectd_plugins_openvpn">Build the openvpn input plugin (reads the status file printed by OpenVPN)</flag>
-		<flag name="collectd_plugins_oracle">Build the oracle input plugin (SQL-queries one or more Oracle database systems)</flag>
+		<flag name="collectd_plugins_oracle">Build the oracle input plugin (executes SQL statements against Oracle database systems)</flag>
 		<flag name="collectd_plugins_perl">Build the perl language binding plugin (embeds a Perl interpreter into collectd for writing plugins)</flag>
 		<flag name="collectd_plugins_ping">Build the ping input plugin (measures network latency)</flag>
-		<flag name="collectd_plugins_postgresql">Build the postgresql input plugin (connects to and executes SQL statements on a PostgreSQL database)</flag>
-		<flag name="collectd_plugins_powerdns">Build the powerdns input plugin (connects to a local PowerDNS instance)</flag>
-		<flag name="collectd_plugins_processes">Build the processes input plugin (statistics about processes)</flag>
-		<flag name="collectd_plugins_protocols">Build the protocols input plugin (network protocols)</flag>
+		<flag name="collectd_plugins_postgresql">Build the postgresql input plugin (executes SQL statements against a PostgreSQL database)</flag>
+		<flag name="collectd_plugins_powerdns">Build the powerdns input plugin (collects statistics from the PowerDNS name server or recursor via control socket)</flag>
+		<flag name="collectd_plugins_processes">Build the processes input plugin (collects the number of processes, grouped by their state or detailed statistics about selected processes)</flag>
+		<flag name="collectd_plugins_protocols">Build the protocols input plugin (collects information about the network protocols supported by the system)</flag>
 		<flag name="collectd_plugins_python">Build the python language binding plugin (embeds a Python interpreter into collectd for writing plugins)</flag>
-		<flag name="collectd_plugins_redis">Build the Redis input plugin</flag>
-		<flag name="collectd_plugins_routeros">Build the routeros input plugin (collect information on devices running RouterOS)</flag>
+		<flag name="collectd_plugins_redis">Build the Redis input plugin (collects usage information from Redis instances)</flag>
+		<flag name="collectd_plugins_routeros">Build the routeros input plugin (collects information from devices running RouterOS)</flag>
 		<flag name="collectd_plugins_rrdcached">Build the rrdcached input/output plugin (connects to rrdcached and submits updates for RRD files)</flag>
 		<flag name="collectd_plugins_rrdtool">Build the rrdtool output plugin (writes values to RRD-files)</flag>
-		<flag name="collectd_plugins_sensors">Build the sensors input plugin (uses lm-sensors to read hardware sensors)</flag>
+		<flag name="collectd_plugins_sensors">Build the sensors input plugin (reads hardware sensors from lm-sensors)</flag>
 		<flag name="collectd_plugins_serial">Build the serial input plugin (collects the traffic on serial interfaces)</flag>
-		<flag name="collectd_plugins_smart">Build the plugin for SMART statistics</flag>
-		<flag name="collectd_plugins_snmp">Build the snmp input plugin (read values from network devices using SNMP)</flag>
+		<flag name="collectd_plugins_sigrok">Build the sigrok input plugin (reads measurements from any supported hardware from sigrok project)</flag>
+		<flag name="collectd_plugins_smart">Build the S.M.A.R.T input plugin (collects S.M.A.R.T statistics from disk drives)</flag>
+		<flag name="collectd_plugins_snmp">Build the snmp input plugin (reads values from network devices using SNMP)</flag>
 		<flag name="collectd_plugins_statsd">Build the statsd input plugin (accepts statsd-type metrics from a UDP socket)</flag>
-		<flag name="collectd_plugins_swap">Build the swap input plugin (amount of memory currently written to swap)</flag>
+		<flag name="collectd_plugins_swap">Build the swap input plugin (collects amount of memory currently written to swap)</flag>
 		<flag name="collectd_plugins_syslog">Build the syslog output plugin (receives messages from collectd and dispatches them to syslog)</flag>
 		<flag name="collectd_plugins_table">Build the table input plugin (parses table-like structured plain text)</flag>
-		<flag name="collectd_plugins_tail">Build the tail input plugin (follows logfiles as e.g. tail -f)</flag>
+		<flag name="collectd_plugins_tail">Build the tail input plugin (follows logfiles, e.g. tail -f)</flag>
+		<flag name="collectd_plugins_tail_csv">Build the tail_csv input plugin (follows and parses CSV files, e.g. tail -f *.csv)</flag>
 		<flag name="collectd_plugins_target_notification">Build the target_notification filter plugin</flag>
 		<flag name="collectd_plugins_target_replace">Build the target_replace filter plugin</flag>
 		<flag name="collectd_plugins_target_scale">Build the target_scale filter plugin</flag>
 		<flag name="collectd_plugins_target_set">Build the target_set filter plugin</flag>
-		<flag name="collectd_plugins_tcpconns">Build the tcpconns input plugin (number of TCP connections to or from a specified port)</flag>
+		<flag name="collectd_plugins_tcpconns">Build the tcpconns input plugin (collects numbers of TCP connections to or from a specified port)</flag>
 		<flag name="collectd_plugins_teamspeak2">Build the teamspeak2 input plugin (collects traffic statistics from a teamspeak2 instance)</flag>
 		<flag name="collectd_plugins_ted">Build the ted input plugin (connects to The Energy Detective and reads the current power over connected power lines)</flag>
-		<flag name="collectd_plugins_thermal">Build the thermal input plugin (ACPI thermal zone information)</flag>
+		<flag name="collectd_plugins_thermal">Build the thermal input plugin (reads ACPI thermal zone information)</flag>
 		<flag name="collectd_plugins_threshold">Build the threshold plugin (checks values against configured thresholds and creates notifications if values are out of bounds)</flag>
-		<flag name="collectd_plugins_tokyotyrant">Build the tokyotyrant input plugin (number of records and file size from a running Tokyo Tyrant server)</flag>
-		<flag name="collectd_plugins_turbostat">Build the plugin for Advanced statistic on Intel cpu states</flag>
-		<flag name="collectd_plugins_unixsock">Build the unixsock output plugin (opens a UNIX domain socket and accepts connections)</flag>
-		<flag name="collectd_plugins_uptime">Build the uptime input plugin (system uptime)</flag>
-		<flag name="collectd_plugins_users">Build the users input plugin (number of users currently logged in)</flag>
+		<flag name="collectd_plugins_tokyotyrant">Build the tokyotyrant input plugin (collects number of records and file size from a running Tokyo Tyrant server)</flag>
+		<flag name="collectd_plugins_turbostat">Build the turbostat input plugin (reads CPU frequency and C-state residency on modern Intel turbo-capable processors)</flag>
+		<flag name="collectd_plugins_unixsock">Build the unixsock input/output plugin (opens a UNIX domain socket and accepts connections)</flag>
+		<flag name="collectd_plugins_uptime">Build the uptime input plugin (keeps track of the system uptime)</flag>
+		<flag name="collectd_plugins_users">Build the users input plugin (counts the number of users currently logged into the system)</flag>
 		<flag name="collectd_plugins_uuid">Build the uuid plugin (tries hard to determine the UUID of the system it is running on)</flag>
-		<flag name="collectd_plugins_varnish">Build the varnish input plugin</flag>
-		<flag name="collectd_plugins_virt">Build the libvirt input plugin (statistics about virtualized guests on a system)</flag>
-		<flag name="collectd_plugins_vmem">Build the vmem input plugin (information about the virtual memory subsystem)</flag>
-		<flag name="collectd_plugins_wireless">Build the wireless input plugin (signal quality, signal power and signal-to-noise ratio for wireless LAN cards)</flag>
-		<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>
-		<flag name="collectd_plugins_write_http">Build the write_http output plugin (sends the values collected by collectd to a web-server)</flag>
-		<flag name="collectd_plugins_write_log">Build the Log output plugin</flag>
-		<flag name="collectd_plugins_write_mongodb">Build the write_mongodb output plugin (sends the values collected by collectd to a MongoDB)</flag>
-		<flag name="collectd_plugins_write_redis">Build the Redis output plugin</flag>
-		<flag name="collectd_plugins_write_sensu">Build the Sensu output plugin</flag>
-		<flag name="collectd_plugins_write_tsdb">Build the TSDB output plugin</flag>
-		<flag name="collectd_plugins_zfs_arc">Build the plugin for ZFS ARC statistics</flag>
-		<flag name="collectd_plugins_zookeeper">Build the plugin for Zookeeper statistics</flag>
+		<flag name="collectd_plugins_varnish">Build the varnish input plugin (collects information about Varnish)</flag>
+		<flag name="collectd_plugins_virt">Build the (lib)virt input plugin (collects statistics about virtualized guests on a system)</flag>
+		<flag name="collectd_plugins_vmem">Build the vmem input plugin (collects information about the virtual memory subsystem of the kernel)</flag>
+		<flag name="collectd_plugins_vserver">Build the vserver input plugin (collects information about the virtual servers running on a system, using Linux-Vserver)</flag>
+		<flag name="collectd_plugins_wireless">Build the wireless input plugin (collects signal quality, signal power and signal-to-noise ratio for wireless LAN cards)</flag>
+		<flag name="collectd_plugins_write_graphite">Build the write_graphite output plugin (stores values in Carbon, the storage layer of Graphite)</flag>
+		<flag name="collectd_plugins_write_http">Build the write_http output plugin (sends metrics to a web-server using HTTP POST requests)</flag>
+		<flag name="collectd_plugins_write_kafka">Build the Kafka output plugin (sends metrics to Apache Kafka)</flag>
+		<flag name="collectd_plugins_write_log">Build the write_log output plugin (writes metrics to a file)</flag>
+		<flag name="collectd_plugins_write_mongodb">Build the MongoDB output plugin (writes metrics to a MongoDB)</flag>
+		<flag name="collectd_plugins_write_redis">Build the Redis output plugin (stores values in Redis)</flag>
+		<flag name="collectd_plugins_write_riemann">Build the Riemann output plugin (stores values in Riemann, a stream processing and monitoring system)</flag>
+		<flag name="collectd_plugins_write_sensu">Build the Sensu output plugin (sends metrics to Sensu Core, an open-source monitoring project)</flag>
+		<flag name="collectd_plugins_write_tsdb">Build the TSDB output plugin (writes metrics to OpenTSDB, an open-source distributed time-series database based on Apache HBase)</flag>
+		<flag name="collectd_plugins_zfs_arc">Build the ZFS ARC input plugin (reports information such as the cache size, the various hits and misses (also as a ratio) and the transferred data)</flag>
+		<flag name="collectd_plugins_zookeeper">Build the zookeeper input plugin (reads data from Apache Zookeeper MNTR command)</flag>
 		<flag name="contrib">Install user-contributed files in the doc directory</flag>
+		<flag name="filecaps">When set collectd daemon will have set required capabilities to run most plugins even if run as unprivileged user</flag>
+		<flag name="java">Must be set (workaround for java-pkg-opt-2 eclass limitation) when you want java or genericjmx plugin</flag>
 	</use>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-admin/collectd/files/, app-admin/collectd/
@ 2016-01-04 10:04 Jason Zaman
  0 siblings, 0 replies; 10+ messages in thread
From: Jason Zaman @ 2016-01-04 10:04 UTC (permalink / raw
  To: gentoo-commits

commit:     255bbef4ec73371480d70ddcf331e1a1c9db1574
Author:     Jason Zaman <perfinion <AT> gentoo <DOT> org>
AuthorDate: Mon Jan  4 10:03:02 2016 +0000
Commit:     Jason Zaman <perfinion <AT> gentoo <DOT> org>
CommitDate: Mon Jan  4 10:04:35 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=255bbef4

app-admin/collectd: update patch to unbundle libltdl

Package-Manager: portage-2.2.26

 app-admin/collectd/collectd-5.5.0.ebuild         |  7 +++--
 app-admin/collectd/files/collectd-5.5.0-lt.patch | 35 ++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 3 deletions(-)

diff --git a/app-admin/collectd/collectd-5.5.0.ebuild b/app-admin/collectd/collectd-5.5.0.ebuild
index 012278f..64af3dd 100644
--- a/app-admin/collectd/collectd-5.5.0.ebuild
+++ b/app-admin/collectd/collectd-5.5.0.ebuild
@@ -126,8 +126,9 @@ REQUIRED_USE="
 	collectd_plugins_python?		( ${PYTHON_REQUIRED_USE} )"
 
 PATCHES=(
-	"${FILESDIR}/${PN}-5.4.1"-{libocci,lt}.patch
-	"${FILESDIR}/${PN}-4.10.3"-werror.patch
+	"${FILESDIR}/${PN}-5.4.1-libocci.patch"
+	"${FILESDIR}/${PN}-5.5.0-lt.patch"
+	"${FILESDIR}/${PN}-4.10.3-werror.patch"
 )
 
 # @FUNCTION: collectd_plugin_kernel_linux
@@ -220,7 +221,7 @@ pkg_setup() {
 }
 
 src_prepare() {
-	default
+	epatch ${PATCHES[@]}
 	epatch_user
 
 	# There's some strange prefix handling in the default config file, resulting in

diff --git a/app-admin/collectd/files/collectd-5.5.0-lt.patch b/app-admin/collectd/files/collectd-5.5.0-lt.patch
new file mode 100644
index 0000000..b14736b
--- /dev/null
+++ b/app-admin/collectd/files/collectd-5.5.0-lt.patch
@@ -0,0 +1,35 @@
+diff --git Makefile.am Makefile.am
+index 5267123..a7e0d0c 100644
+--- Makefile.am
++++ Makefile.am
+@@ -1,6 +1,4 @@
+-ACLOCAL_AMFLAGS = -I libltdl/m4
+-
+-SUBDIRS = libltdl src bindings .
++SUBDIRS = src bindings .
+
+ INCLUDES = $(LTDLINCL)
+
+--- configure.ac.old	2016-01-04 13:55:39.286846436 +0400
++++ configure.ac	2016-01-04 13:56:07.905362298 +0400
+@@ -2,12 +2,10 @@
+ AC_INIT([collectd],[m4_esyscmd(./version-gen.sh)])
+ AC_CONFIG_SRCDIR(src/)
+ AC_CONFIG_HEADERS(src/config.h)
+-AC_CONFIG_AUX_DIR([libltdl/config])
+ 
+ m4_ifdef([LT_PACKAGE_VERSION],
+ 	# libtool >= 2.2
+ 	[
+-	 LT_CONFIG_LTDL_DIR([libltdl])
+ 	 LT_INIT([dlopen])
+ 	 LTDL_INIT([convenience])
+ 	 AC_DEFINE(LIBTOOL_VERSION, 2, [Define to used libtool version.])
+@@ -19,7 +17,6 @@
+ 	 AC_SUBST(LTDLINCL)
+ 	 AC_SUBST(LIBLTDL)
+ 	 AC_LIBTOOL_DLOPEN
+-	 AC_CONFIG_SUBDIRS(libltdl)
+ 	 AC_DEFINE(LIBTOOL_VERSION, 1, [Define to used libtool version.])
+ 	]
+ )


^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-admin/collectd/files/, app-admin/collectd/
@ 2015-09-03  9:00 James Le Cuirot
  0 siblings, 0 replies; 10+ messages in thread
From: James Le Cuirot @ 2015-09-03  9:00 UTC (permalink / raw
  To: gentoo-commits

commit:     07c66554e03e557e567120737131cc9dce8560c8
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Thu Sep  3 09:00:14 2015 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Thu Sep  3 09:00:14 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=07c66554

app-admin/collectd: Remove old

Package-Manager: portage-2.2.20.1

 app-admin/collectd/Manifest                        |   1 -
 app-admin/collectd/collectd-5.4.0.ebuild           | 374 --------------------
 app-admin/collectd/collectd-5.4.1-r1.ebuild        | 379 ---------------------
 app-admin/collectd/collectd-5.4.1.ebuild           | 372 --------------------
 .../collectd/files/collectd-4.10.2-libocci.patch   |  20 --
 .../collectd/files/collectd-4.10.2-nohal.patch     |  23 --
 .../collectd/files/collectd-5.1.0-libperl.patch    |  30 --
 app-admin/collectd/files/collectd-5.1.1-lt.patch   |  32 --
 8 files changed, 1231 deletions(-)

diff --git a/app-admin/collectd/Manifest b/app-admin/collectd/Manifest
index 6698b99..3bb23b2 100644
--- a/app-admin/collectd/Manifest
+++ b/app-admin/collectd/Manifest
@@ -1,2 +1 @@
-DIST collectd-5.4.0.tar.bz2 1506520 SHA256 90973894a1f10775d409fe23ce7bc4d89c1b7c6f4d9918b305d160605871923e SHA512 10de94d082e6bf2e0a8e2f0b179868c0f25b223c61cb8a5fda641d01f90d6332062459410d54d74a4d666f7149bb429976e9542dabeda988ed6772df9001b222 WHIRLPOOL 19db89217dfaf38fd358a60a64155e01bd68d4c8ca4fad13b97667eb3e4e4d8dbe4e9cae8568e970d8d6fe5e8dde960b06159b3026d1a554fad7a455f973ff0a
 DIST collectd-5.4.1.tar.bz2 1521907 SHA256 75452129f271cb0aad28e57f12a49070618bbb7b6a9d64cf869e8766fa2f66e0 SHA512 96289f52d3d1da55c862ae9ee2f57972682d7eab87387e97efa41fb5197599e097abd71aed2fe014e26af37c9ae98471e06dd181c725849976242642ce5c9492 WHIRLPOOL 2ed85b9d6d00c4e7dc6af236b637e282f17c6c0b20c1ba3da9c12ea85c5fdea1add2e29165874c7e9620852e422282d489436a4e245b161902f8926185edec16

diff --git a/app-admin/collectd/collectd-5.4.0.ebuild b/app-admin/collectd/collectd-5.4.0.ebuild
deleted file mode 100644
index 6e56ffb..0000000
--- a/app-admin/collectd/collectd-5.4.0.ebuild
+++ /dev/null
@@ -1,374 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-GENTOO_DEPEND_ON_PERL="no"
-
-inherit autotools base eutils linux-info multilib perl-app systemd user
-
-DESCRIPTION="A a daemon which collects system statistic and provides mechanisms to store the values"
-
-HOMEPAGE="http://collectd.org"
-SRC_URI="${HOMEPAGE}/files/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="contrib debug kernel_linux kernel_FreeBSD kernel_Darwin perl selinux static-libs"
-
-# The plugin lists have to follow here since they extend IUSE
-
-# Plugins that to my knowledge cannot be supported (eg. dependencies not in gentoo)
-COLLECTD_IMPOSSIBLE_PLUGINS="aquaero mic netapp pinba sigrok xmms"
-
-# Plugins that still need some work
-COLLECTD_UNTESTED_PLUGINS="amqp apple_sensors genericjmx ipvs lpar modbus redis
-	tape write_redis zfs_arc"
-
-# Plugins that have been (compile) tested and can be enabled via COLLECTD_PLUGINS
-COLLECTD_TESTED_PLUGINS="aggregation apache apcups ascent battery bind cgroups
-	conntrack contextswitch cpu cpufreq csv curl curl_json curl_xml dbi df disk dns
-	email entropy ethstat exec filecount fscache gmond hddtemp interface ipmi
-	iptables irq java libvirt load logfile lvm madwifi match_empty_counter
-	match_hashed match_regex match_timediff match_value mbmon md memcachec memcached
-	memory multimeter mysql netlink network network nfs nginx notify_desktop
-	notify_email ntpd numa nut olsrd onewire openvpn oracle perl perl ping postgresql
-	powerdns processes protocols python python routeros rrdcached rrdcached rrdtool
-	sensors serial snmp statsd swap syslog table tail target_notification
-	target_replace target_scale target_set tcpconns teamspeak2 ted thermal threshold
-	tokyotyrant unixsock uptime users uuid varnish vmem vserver wireless
-	write_graphite write_http write_mongodb"
-
-COLLECTD_DISABLED_PLUGINS="${COLLECTD_IMPOSSIBLE_PLUGINS} ${COLLECTD_UNTESTED_PLUGINS}"
-
-COLLECTD_ALL_PLUGINS=${COLLECTD_TESTED_PLUGINS}
-
-for plugin in ${COLLECTD_ALL_PLUGINS}; do
-	IUSE="${IUSE} collectd_plugins_${plugin}"
-done
-unset plugin
-
-# Now come the dependencies.
-
-COMMON_DEPEND="
-	dev-libs/libgcrypt:0
-	sys-devel/libtool
-	perl?					( dev-lang/perl:=[ithreads] )
-	collectd_plugins_apache?		( net-misc/curl )
-	collectd_plugins_ascent?		( net-misc/curl dev-libs/libxml2 )
-	collectd_plugins_bind?			( dev-libs/libxml2 )
-	collectd_plugins_curl?			( net-misc/curl )
-	collectd_plugins_curl_json?		( net-misc/curl dev-libs/yajl )
-	collectd_plugins_curl_xml?		( net-misc/curl dev-libs/libxml2 )
-	collectd_plugins_dbi?			( dev-db/libdbi )
-	collectd_plugins_dns?			( net-libs/libpcap )
-	collectd_plugins_gmond?			( sys-cluster/ganglia )
-	collectd_plugins_ipmi?			( >=sys-libs/openipmi-2.0.16-r1 )
-	collectd_plugins_iptables?		( >=net-firewall/iptables-1.4.13 )
-	collectd_plugins_java?			( virtual/jre dev-java/java-config-wrapper )
-	collectd_plugins_libvirt?		( app-emulation/libvirt dev-libs/libxml2 )
-	collectd_plugins_lvm?			( sys-fs/lvm2 )
-	collectd_plugins_memcachec?		( dev-libs/libmemcached )
-	collectd_plugins_mysql?			( >=virtual/mysql-5.0 )
-	collectd_plugins_netlink?		( net-libs/libmnl )
-	collectd_plugins_nginx?			( net-misc/curl )
-	collectd_plugins_notify_desktop?	( x11-libs/libnotify )
-	collectd_plugins_notify_email?		( net-libs/libesmtp dev-libs/openssl )
-	collectd_plugins_nut?			( sys-power/nut )
-	collectd_plugins_onewire?		( sys-fs/owfs )
-	collectd_plugins_oracle?		( dev-db/oracle-instantclient-basic )
-	collectd_plugins_perl?			( dev-lang/perl:=[ithreads] )
-	collectd_plugins_ping?			( net-libs/liboping )
-	collectd_plugins_postgresql?		( dev-db/postgresql )
-	collectd_plugins_python?		( =dev-lang/python-2* )
-	collectd_plugins_routeros?		( net-libs/librouteros )
-	collectd_plugins_rrdcached?		( net-analyzer/rrdtool )
-	collectd_plugins_rrdtool?		( net-analyzer/rrdtool )
-	collectd_plugins_sensors?		( sys-apps/lm_sensors )
-	collectd_plugins_snmp?			( net-analyzer/net-snmp )
-	collectd_plugins_tokyotyrant?		( net-misc/tokyotyrant )
-	collectd_plugins_varnish?		( www-servers/varnish )
-	collectd_plugins_write_http?		( net-misc/curl )
-	collectd_plugins_write_mongodb?		( dev-libs/mongo-c-driver )
-
-	kernel_FreeBSD? (
-		collectd_plugins_disk?		( sys-libs/libstatgrab )
-		collectd_plugins_interface?	( sys-libs/libstatgrab )
-		collectd_plugins_load?		( sys-libs/libstatgrab )
-		collectd_plugins_memory?	( sys-libs/libstatgrab )
-		collectd_plugins_swap?		( sys-libs/libstatgrab )
-		collectd_plugins_users?		( sys-libs/libstatgrab )
-	)"
-
-DEPEND="${COMMON_DEPEND}
-	virtual/pkgconfig
-	kernel_linux? (
-		collectd_plugins_vserver?	( sys-kernel/vserver-sources )
-	)"
-
-RDEPEND="${COMMON_DEPEND}
-	collectd_plugins_syslog?		( virtual/logger )
-	selinux?						( sec-policy/selinux-collectd )"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-4.10.2"-{libocci,nohal}.patch
-	"${FILESDIR}/${PN}-4.10.3"-werror.patch
-	"${FILESDIR}/${PN}-5.1.0"-libperl.patch
-	"${FILESDIR}/${PN}-5.1.1"-lt.patch
-)
-
-# @FUNCTION: collectd_plugin_kernel_linux
-# @DESCRIPTION:
-# USAGE: <plug-in name> <kernel_options> <severity>
-# kernel_options is a list of kernel configurations options; the check tests whether at least
-#   one of them is enabled. If no, depending on the third argument an elog, ewarn, or eerror message
-#   is emitted.
-collectd_plugin_kernel_linux() {
-	local multi_opt opt
-	if has ${1} ${COLLECTD_ALL_PLUGINS}; then
-		if use collectd_plugins_${1}; then
-			for opt in ${2}; do
-				if linux_chkconfig_present ${opt}; then return 0; fi
-			done
-			multi_opt=${2//\ /\ or\ }
-			case ${3} in
-				(info)
-					elog "The ${1} plug-in can use kernel features that are disabled now; enable ${multi_opt} in your kernel"
-				;;
-				(warn)
-					ewarn "The ${1} plug-in uses kernel features that are disabled now; enable ${multi_opt} in your kernel"
-				;;
-				(error)
-					eerror "The ${1} plug-in needs kernel features that are disabled now; enable ${multi_opt} in your kernel"
-				;;
-				(*)
-					die "function collectd_plugin_kernel_linux called with invalid third argument"
-				;;
-			esac
-		fi
-	fi
-}
-
-collectd_linux_kernel_checks() {
-	linux-info_pkg_setup
-
-	# battery.c:/proc/pmu/battery_%i
-	# battery.c:/proc/acpi/battery
-	collectd_plugin_kernel_linux battery ACPI_BATTERY warn
-
-	# cgroups.c:/sys/fs/cgroup/
-	collectd_plugin_kernel_linux cgroups CONFIG_CGROUPS warn
-
-	# cpufreq.c:/sys/devices/system/cpu/cpu%d/cpufreq/
-	collectd_plugin_kernel_linux cpufreq SYSFS warn
-	collectd_plugin_kernel_linux cpufreq CPU_FREQ_STAT warn
-
-	# nfs.c:/proc/net/rpc/nfs
-	# nfs.c:/proc/net/rpc/nfsd
-	collectd_plugin_kernel_linux nfs NFS_COMMON warn
-
-	# serial.c:/proc/tty/driver/serial
-	# serial.c:/proc/tty/driver/ttyS
-	collectd_plugin_kernel_linux serial SERIAL_CORE warn
-
-	# swap.c:/proc/meminfo
-	collectd_plugin_kernel_linux swap SWAP warn
-
-	# thermal.c:/proc/acpi/thermal_zone
-	# thermal.c:/sys/class/thermal
-	collectd_plugin_kernel_linux thermal "PROC_FS SYSFS" warn
-	collectd_plugin_kernel_linux thermal ACPI_THERMAL warn
-
-	# vmem.c:/proc/vmstat
-	collectd_plugin_kernel_linux vmem VM_EVENT_COUNTERS warn
-
-	# uuid.c:/sys/hypervisor/uuid
-	collectd_plugin_kernel_linux uuid SYSFS info
-
-	# wireless.c:/proc/net/wireless
-	collectd_plugin_kernel_linux wireless "MAC80211 IEEE80211" warn
-}
-
-pkg_setup() {
-	if use kernel_linux; then
-		if linux_config_exists; then
-			einfo "Checking your linux kernel configuration:"
-			collectd_linux_kernel_checks
-		else
-			elog "Cannot find a linux kernel configuration. Continuing anyway."
-		fi
-	fi
-
-	enewgroup collectd
-	enewuser collectd -1 -1 /var/lib/collectd collectd
-}
-
-src_prepare() {
-	base_src_prepare
-
-	# There's some strange prefix handling in the default config file, resulting in
-	# paths like "/usr/var/..."
-	sed -i -e "s:@prefix@/var:/var:g" src/collectd.conf.in || die
-
-	sed -i -e "s:/etc/collectd/collectd.conf:/etc/collectd.conf:g" contrib/collectd.service || die
-
-	# fix installdirs for perl, bug 444360
-	sed -i -e 's/INSTALL_BASE=$(DESTDIR)$(prefix) //' bindings/Makefile.am || die
-
-	rm -r libltdl || die
-
-	eautoreconf
-}
-
-src_configure() {
-	# Now come the lists of os-dependent plugins. Any plugin that is not listed anywhere here
-	# should work independent of the operating system.
-
-	local linux_plugins="battery cpu cpufreq disk entropy ethstat interface iptables ipvs irq load
-		memory md netlink nfs numa processes serial swap tcpconns thermal users vmem vserver
-		wireless"
-
-	local libstatgrab_plugins="cpu disk interface load memory swap users"
-	local bsd_plugins="cpu tcpconns ${libstatgrab_plugins}"
-
-	local darwin_plugins="apple_sensors battery cpu disk interface memory processes tcpconns"
-
-	local osdependent_plugins="${linux_plugins} ${bsd_plugins} ${darwin_plugins}"
-	local myos_plugins=""
-	if use kernel_linux; then
-		einfo "Enabling Linux plugins."
-		myos_plugins=${linux_plugins}
-	elif use kernel_FreeBSD; then
-		einfo "Enabling FreeBSD plugins."
-		myos_plugins=${bsd_plugins}
-	elif use kernel_Darwin; then
-		einfo "Enabling Darwin plugins."
-		myos_plugins=${darwin_plugins}
-	fi
-
-	# Do we debug?
-	local myconf="$(use_enable debug)"
-
-	local plugin
-
-	# Disable what needs to be disabled.
-	for plugin in ${COLLECTD_DISABLED_PLUGINS}; do
-		myconf+=" --disable-${plugin}"
-	done
-
-	# Set enable/disable for each single plugin.
-	for plugin in ${COLLECTD_ALL_PLUGINS}; do
-		if has ${plugin} ${osdependent_plugins}; then
-			# plugin is os-dependent ...
-			if has ${plugin} ${myos_plugins}; then
-				# ... and available in this os
-				myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
-			else
-				# ... and NOT available in this os
-				if use collectd_plugins_${plugin}; then
-					ewarn "You try to enable the ${plugin} plugin, but it is not available for this"
-					ewarn "kernel. Disabling it automatically."
-				fi
-				myconf+=" --disable-${plugin}"
-			fi
-		elif [[ "${plugin}" = "collectd_plugins_perl" ]]; then
-			if use collectd_plugins_perl && ! use perl; then
-				ewarn "Perl plugin disabled as perl bindings disabled by -perl use flag"
-				myconf+= --disable-perl
-			else
-				myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
-			fi
-		else
-			myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
-		fi
-	done
-
-	# Need JAVA_HOME for java.
-	if use collectd_plugins_java; then
-		myconf+=" --with-java=$(java-config -g JAVA_HOME)"
-	fi
-
-	# Need libiptc ONLY for iptables. If we try to use it otherwise bug 340109 happens.
-	if ! use collectd_plugins_iptables; then
-		myconf+=" --with-libiptc=no"
-	fi
-
-	if use perl; then
-		myconf+=" --with-perl-bindings=INSTALLDIRS=vendor"
-	else
-		myconf+=" --without-perl-bindings"
-	fi
-
-	# No need for v5upgrade
-	myconf+=" --disable-target_v5upgrade"
-
-	# Finally, run econf.
-	KERNEL_DIR="${KERNEL_DIR}" econf --config-cache --without-included-ltdl $(use_enable static-libs static) --localstatedir=/var ${myconf}
-}
-
-src_install() {
-	emake DESTDIR="${D}" install
-
-	perl_delete_localpod
-
-	find "${D}/usr/" -name "*.la" -exec rm -f {} +
-
-	# use collectd_plugins_ping && setcap cap_net_raw+ep ${D}/usr/sbin/collectd
-	# we cannot do this yet
-
-	fowners root:collectd /etc/collectd.conf
-	fperms u=rw,g=r,o= /etc/collectd.conf
-
-	dodoc AUTHORS ChangeLog NEWS README TODO
-
-	if use contrib ; then
-		insinto /usr/share/doc/${PF}
-		doins -r contrib
-	fi
-
-	keepdir /var/lib/${PN}
-	fowners collectd:collectd /var/lib/${PN}
-
-	newinitd "${FILESDIR}/${PN}.initd" ${PN}
-	newconfd "${FILESDIR}/${PN}.confd" ${PN}
-	systemd_dounit "contrib/${PN}.service"
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}/logrotate" collectd
-
-	sed -i -e 's:^.*PIDFile     "/var/run/collectd.pid":PIDFile     "/var/run/collectd/collectd.pid":' "${D}"/etc/collectd.conf || die
-	sed -i -e 's:^#	SocketFile "/var/run/collectd-unixsock":#	SocketFile "/var/run/collectd/collectd-unixsock":' "${D}"/etc/collectd.conf || die
-	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
-	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
-}
-
-collectd_rdeps() {
-	if (use collectd_plugins_${1} && ! has_version "${2}"); then
-		elog "The ${1} plug-in needs ${2} to be installed locally or remotely to work."
-	fi
-}
-
-pkg_postinst() {
-	collectd_rdeps apcups sys-power/apcupsd
-	collectd_rdeps hddtemp app-admin/hddtemp
-	collectd_rdeps mbmon sys-apps/xmbmon
-	collectd_rdeps memcached ">=net-misc/memcached-1.2.2-r2"
-	collectd_rdeps ntpd net-misc/ntp
-	collectd_rdeps openvpn ">=net-misc/openvpn-2.0.9"
-	collectd_rdeps write_mongodb "dev-db/mongodb"
-
-	echo
-	elog "collectd is now started as unprivileged user by default."
-	elog "You may want to recheck the configuration."
-	elog
-
-	if use collectd_plugins_email; then
-		ewarn "The email plug-in is deprecated. To submit statistics please use the unixsock plugin."
-	fi
-	if use contrib; then
-		elog "The scripts in /usr/share/doc/${PF}/collection3 for generating graphs need dev-perl/HTML-Parser,"
-		elog "dev-perl/config-general, dev-perl/regexp-common, and net-analyzer/rrdtool[perl] to be installed."
-	fi
-}

diff --git a/app-admin/collectd/collectd-5.4.1-r1.ebuild b/app-admin/collectd/collectd-5.4.1-r1.ebuild
deleted file mode 100644
index e0c3192..0000000
--- a/app-admin/collectd/collectd-5.4.1-r1.ebuild
+++ /dev/null
@@ -1,379 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-GENTOO_DEPEND_ON_PERL="no"
-# XXX: 5.4.1-r0 stated 2* but it builds fine against 3.4
-PYTHON_COMPAT=( python2_7 )
-
-inherit autotools base eutils linux-info multilib perl-app python-single-r1 systemd user
-
-DESCRIPTION="A a daemon which collects system statistic and provides mechanisms to store the values"
-
-HOMEPAGE="http://collectd.org"
-SRC_URI="${HOMEPAGE}/files/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="contrib debug kernel_linux kernel_FreeBSD kernel_Darwin perl selinux static-libs"
-
-# The plugin lists have to follow here since they extend IUSE
-
-# Plugins that to my knowledge cannot be supported (eg. dependencies not in gentoo)
-COLLECTD_IMPOSSIBLE_PLUGINS="aquaero mic netapp pinba sigrok xmms"
-
-# Plugins that still need some work
-COLLECTD_UNTESTED_PLUGINS="amqp apple_sensors genericjmx ipvs lpar modbus redis
-	tape write_redis zfs_arc"
-
-# Plugins that have been (compile) tested and can be enabled via COLLECTD_PLUGINS
-COLLECTD_TESTED_PLUGINS="aggregation apache apcups ascent battery bind cgroups
-	conntrack contextswitch cpu cpufreq csv curl curl_json curl_xml dbi df disk dns
-	email entropy ethstat exec filecount fscache gmond hddtemp interface ipmi
-	iptables irq java libvirt load logfile lvm madwifi match_empty_counter
-	match_hashed match_regex match_timediff match_value mbmon md memcachec memcached
-	memory multimeter mysql netlink network network nfs nginx notify_desktop
-	notify_email ntpd numa nut olsrd onewire openvpn oracle perl perl ping postgresql
-	powerdns processes protocols python python routeros rrdcached rrdcached rrdtool
-	sensors serial snmp statsd swap syslog table tail target_notification
-	target_replace target_scale target_set tcpconns teamspeak2 ted thermal threshold
-	tokyotyrant unixsock uptime users uuid varnish vmem vserver wireless
-	write_graphite write_http write_mongodb"
-
-COLLECTD_DISABLED_PLUGINS="${COLLECTD_IMPOSSIBLE_PLUGINS} ${COLLECTD_UNTESTED_PLUGINS}"
-
-COLLECTD_ALL_PLUGINS=${COLLECTD_TESTED_PLUGINS}
-
-for plugin in ${COLLECTD_ALL_PLUGINS}; do
-	IUSE="${IUSE} collectd_plugins_${plugin}"
-done
-unset plugin
-
-# Now come the dependencies.
-
-COMMON_DEPEND="
-	dev-libs/libgcrypt:0
-	sys-devel/libtool
-	perl?					( dev-lang/perl:=[ithreads] )
-	collectd_plugins_apache?		( net-misc/curl )
-	collectd_plugins_ascent?		( net-misc/curl dev-libs/libxml2 )
-	collectd_plugins_bind?			( dev-libs/libxml2 )
-	collectd_plugins_curl?			( net-misc/curl )
-	collectd_plugins_curl_json?		( net-misc/curl dev-libs/yajl )
-	collectd_plugins_curl_xml?		( net-misc/curl dev-libs/libxml2 )
-	collectd_plugins_dbi?			( dev-db/libdbi )
-	collectd_plugins_dns?			( net-libs/libpcap )
-	collectd_plugins_gmond?			( sys-cluster/ganglia )
-	collectd_plugins_ipmi?			( >=sys-libs/openipmi-2.0.16-r1 )
-	collectd_plugins_iptables?		( >=net-firewall/iptables-1.4.13 )
-	collectd_plugins_java?			( virtual/jre dev-java/java-config-wrapper )
-	collectd_plugins_libvirt?		( app-emulation/libvirt dev-libs/libxml2 )
-	collectd_plugins_lvm?			( sys-fs/lvm2 )
-	collectd_plugins_memcachec?		( dev-libs/libmemcached )
-	collectd_plugins_mysql?			( >=virtual/mysql-5.0 )
-	collectd_plugins_netlink?		( net-libs/libmnl )
-	collectd_plugins_nginx?			( net-misc/curl )
-	collectd_plugins_notify_desktop?	( x11-libs/libnotify )
-	collectd_plugins_notify_email?		( net-libs/libesmtp dev-libs/openssl )
-	collectd_plugins_nut?			( sys-power/nut )
-	collectd_plugins_onewire?		( sys-fs/owfs )
-	collectd_plugins_oracle?		( dev-db/oracle-instantclient-basic )
-	collectd_plugins_perl?			( dev-lang/perl:=[ithreads] )
-	collectd_plugins_ping?			( net-libs/liboping )
-	collectd_plugins_postgresql?		( dev-db/postgresql )
-	collectd_plugins_python?		( ${PYTHON_DEPS} )
-	collectd_plugins_routeros?		( net-libs/librouteros )
-	collectd_plugins_rrdcached?		( net-analyzer/rrdtool )
-	collectd_plugins_rrdtool?		( net-analyzer/rrdtool )
-	collectd_plugins_sensors?		( sys-apps/lm_sensors )
-	collectd_plugins_snmp?			( net-analyzer/net-snmp )
-	collectd_plugins_tokyotyrant?		( net-misc/tokyotyrant )
-	collectd_plugins_varnish?		( www-servers/varnish )
-	collectd_plugins_write_http?		( net-misc/curl )
-	collectd_plugins_write_mongodb?		( dev-libs/mongo-c-driver )
-
-	kernel_FreeBSD? (
-		collectd_plugins_disk?		( sys-libs/libstatgrab )
-		collectd_plugins_interface?	( sys-libs/libstatgrab )
-		collectd_plugins_load?		( sys-libs/libstatgrab )
-		collectd_plugins_memory?	( sys-libs/libstatgrab )
-		collectd_plugins_swap?		( sys-libs/libstatgrab )
-		collectd_plugins_users?		( sys-libs/libstatgrab )
-	)"
-
-DEPEND="${COMMON_DEPEND}
-	virtual/pkgconfig
-	kernel_linux? (
-		collectd_plugins_vserver?	( sys-kernel/vserver-sources )
-	)"
-
-RDEPEND="${COMMON_DEPEND}
-	collectd_plugins_syslog?		( virtual/logger )
-	selinux?						( sec-policy/selinux-collectd )"
-
-REQUIRED_USE="
-	collectd_plugins_python?		( ${PYTHON_REQUIRED_USE} )"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-5.4.1"-{nohal,libocci,libperl,lt}.patch
-	"${FILESDIR}/${PN}-4.10.3"-werror.patch
-)
-
-# @FUNCTION: collectd_plugin_kernel_linux
-# @DESCRIPTION:
-# USAGE: <plug-in name> <kernel_options> <severity>
-# kernel_options is a list of kernel configurations options; the check tests whether at least
-#   one of them is enabled. If no, depending on the third argument an elog, ewarn, or eerror message
-#   is emitted.
-collectd_plugin_kernel_linux() {
-	local multi_opt opt
-	if has ${1} ${COLLECTD_ALL_PLUGINS}; then
-		if use collectd_plugins_${1}; then
-			for opt in ${2}; do
-				if linux_chkconfig_present ${opt}; then return 0; fi
-			done
-			multi_opt=${2//\ /\ or\ }
-			case ${3} in
-				(info)
-					elog "The ${1} plug-in can use kernel features that are disabled now; enable ${multi_opt} in your kernel"
-				;;
-				(warn)
-					ewarn "The ${1} plug-in uses kernel features that are disabled now; enable ${multi_opt} in your kernel"
-				;;
-				(error)
-					eerror "The ${1} plug-in needs kernel features that are disabled now; enable ${multi_opt} in your kernel"
-				;;
-				(*)
-					die "function collectd_plugin_kernel_linux called with invalid third argument"
-				;;
-			esac
-		fi
-	fi
-}
-
-collectd_linux_kernel_checks() {
-	linux-info_pkg_setup
-
-	# battery.c:/proc/pmu/battery_%i
-	# battery.c:/proc/acpi/battery
-	collectd_plugin_kernel_linux battery ACPI_BATTERY warn
-
-	# cgroups.c:/sys/fs/cgroup/
-	collectd_plugin_kernel_linux cgroups CONFIG_CGROUPS warn
-
-	# cpufreq.c:/sys/devices/system/cpu/cpu%d/cpufreq/
-	collectd_plugin_kernel_linux cpufreq SYSFS warn
-	collectd_plugin_kernel_linux cpufreq CPU_FREQ_STAT warn
-
-	# nfs.c:/proc/net/rpc/nfs
-	# nfs.c:/proc/net/rpc/nfsd
-	collectd_plugin_kernel_linux nfs NFS_COMMON warn
-
-	# serial.c:/proc/tty/driver/serial
-	# serial.c:/proc/tty/driver/ttyS
-	collectd_plugin_kernel_linux serial SERIAL_CORE warn
-
-	# swap.c:/proc/meminfo
-	collectd_plugin_kernel_linux swap SWAP warn
-
-	# thermal.c:/proc/acpi/thermal_zone
-	# thermal.c:/sys/class/thermal
-	collectd_plugin_kernel_linux thermal "PROC_FS SYSFS" warn
-	collectd_plugin_kernel_linux thermal ACPI_THERMAL warn
-
-	# vmem.c:/proc/vmstat
-	collectd_plugin_kernel_linux vmem VM_EVENT_COUNTERS warn
-
-	# uuid.c:/sys/hypervisor/uuid
-	collectd_plugin_kernel_linux uuid SYSFS info
-
-	# wireless.c:/proc/net/wireless
-	collectd_plugin_kernel_linux wireless "MAC80211 IEEE80211" warn
-}
-
-pkg_setup() {
-	if use kernel_linux; then
-		if linux_config_exists; then
-			einfo "Checking your linux kernel configuration:"
-			collectd_linux_kernel_checks
-		else
-			elog "Cannot find a linux kernel configuration. Continuing anyway."
-		fi
-	fi
-
-	use collectd_plugins_python && python-single-r1_pkg_setup
-
-	enewgroup collectd
-	enewuser collectd -1 -1 /var/lib/collectd collectd
-}
-
-src_prepare() {
-	base_src_prepare
-
-	# There's some strange prefix handling in the default config file, resulting in
-	# paths like "/usr/var/..."
-	sed -i -e "s:@prefix@/var:/var:g" src/collectd.conf.in || die
-
-	sed -i -e "s:/etc/collectd/collectd.conf:/etc/collectd.conf:g" contrib/collectd.service || die
-
-	# fix installdirs for perl, bug 444360
-	sed -i -e 's/INSTALL_BASE=$(DESTDIR)$(prefix) //' bindings/Makefile.am || die
-
-	rm -r libltdl || die
-
-	eautoreconf
-}
-
-src_configure() {
-	# Now come the lists of os-dependent plugins. Any plugin that is not listed anywhere here
-	# should work independent of the operating system.
-
-	local linux_plugins="battery cpu cpufreq disk entropy ethstat interface iptables ipvs irq load
-		memory md netlink nfs numa processes serial swap tcpconns thermal users vmem vserver
-		wireless"
-
-	local libstatgrab_plugins="cpu disk interface load memory swap users"
-	local bsd_plugins="cpu tcpconns ${libstatgrab_plugins}"
-
-	local darwin_plugins="apple_sensors battery cpu disk interface memory processes tcpconns"
-
-	local osdependent_plugins="${linux_plugins} ${bsd_plugins} ${darwin_plugins}"
-	local myos_plugins=""
-	if use kernel_linux; then
-		einfo "Enabling Linux plugins."
-		myos_plugins=${linux_plugins}
-	elif use kernel_FreeBSD; then
-		einfo "Enabling FreeBSD plugins."
-		myos_plugins=${bsd_plugins}
-	elif use kernel_Darwin; then
-		einfo "Enabling Darwin plugins."
-		myos_plugins=${darwin_plugins}
-	fi
-
-	# Do we debug?
-	local myconf="$(use_enable debug)"
-
-	local plugin
-
-	# Disable what needs to be disabled.
-	for plugin in ${COLLECTD_DISABLED_PLUGINS}; do
-		myconf+=" --disable-${plugin}"
-	done
-
-	# Set enable/disable for each single plugin.
-	for plugin in ${COLLECTD_ALL_PLUGINS}; do
-		if has ${plugin} ${osdependent_plugins}; then
-			# plugin is os-dependent ...
-			if has ${plugin} ${myos_plugins}; then
-				# ... and available in this os
-				myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
-			else
-				# ... and NOT available in this os
-				if use collectd_plugins_${plugin}; then
-					ewarn "You try to enable the ${plugin} plugin, but it is not available for this"
-					ewarn "kernel. Disabling it automatically."
-				fi
-				myconf+=" --disable-${plugin}"
-			fi
-		elif [[ "${plugin}" = "collectd_plugins_perl" ]]; then
-			if use collectd_plugins_perl && ! use perl; then
-				ewarn "Perl plugin disabled as perl bindings disabled by -perl use flag"
-				myconf+= --disable-perl
-			else
-				myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
-			fi
-		else
-			myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
-		fi
-	done
-
-	# Need JAVA_HOME for java.
-	if use collectd_plugins_java; then
-		myconf+=" --with-java=$(java-config -g JAVA_HOME)"
-	fi
-
-	# Need libiptc ONLY for iptables. If we try to use it otherwise bug 340109 happens.
-	if ! use collectd_plugins_iptables; then
-		myconf+=" --with-libiptc=no"
-	fi
-
-	if use perl; then
-		myconf+=" --with-perl-bindings=INSTALLDIRS=vendor"
-	else
-		myconf+=" --without-perl-bindings"
-	fi
-
-	# No need for v5upgrade
-	myconf+=" --disable-target_v5upgrade"
-
-	# Finally, run econf.
-	KERNEL_DIR="${KERNEL_DIR}" econf --config-cache --without-included-ltdl $(use_enable static-libs static) --localstatedir=/var ${myconf}
-}
-
-src_install() {
-	emake DESTDIR="${D}" install
-
-	perl_delete_localpod
-
-	find "${D}/usr/" -name "*.la" -exec rm -f {} +
-
-	# use collectd_plugins_ping && setcap cap_net_raw+ep ${D}/usr/sbin/collectd
-	# we cannot do this yet
-
-	fowners root:collectd /etc/collectd.conf
-	fperms u=rw,g=r,o= /etc/collectd.conf
-
-	dodoc AUTHORS ChangeLog NEWS README TODO
-
-	if use contrib ; then
-		insinto /usr/share/doc/${PF}
-		doins -r contrib
-	fi
-
-	keepdir /var/lib/${PN}
-	fowners collectd:collectd /var/lib/${PN}
-
-	newinitd "${FILESDIR}/${PN}.initd" ${PN}
-	newconfd "${FILESDIR}/${PN}.confd" ${PN}
-	systemd_dounit "contrib/${PN}.service"
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}/logrotate" collectd
-
-	sed -i -e 's:^.*PIDFile     "/var/run/collectd.pid":PIDFile     "/var/run/collectd/collectd.pid":' "${D}"/etc/collectd.conf || die
-	sed -i -e 's:^#	SocketFile "/var/run/collectd-unixsock":#	SocketFile "/var/run/collectd/collectd-unixsock":' "${D}"/etc/collectd.conf || die
-	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
-	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
-}
-
-collectd_rdeps() {
-	if (use collectd_plugins_${1} && ! has_version "${2}"); then
-		elog "The ${1} plug-in needs ${2} to be installed locally or remotely to work."
-	fi
-}
-
-pkg_postinst() {
-	collectd_rdeps apcups sys-power/apcupsd
-	collectd_rdeps hddtemp app-admin/hddtemp
-	collectd_rdeps mbmon sys-apps/xmbmon
-	collectd_rdeps memcached ">=net-misc/memcached-1.2.2-r2"
-	collectd_rdeps ntpd net-misc/ntp
-	collectd_rdeps openvpn ">=net-misc/openvpn-2.0.9"
-	collectd_rdeps write_mongodb "dev-db/mongodb"
-
-	echo
-	elog "collectd is now started as unprivileged user by default."
-	elog "You may want to revisit the configuration."
-	elog
-
-	if use collectd_plugins_email; then
-		ewarn "The email plug-in is deprecated. To submit statistics please use the unixsock plugin."
-	fi
-	if use contrib; then
-		elog "The scripts in /usr/share/doc/${PF}/collection3 for generating graphs need dev-perl/HTML-Parser,"
-		elog "dev-perl/config-general, dev-perl/regexp-common, and net-analyzer/rrdtool[perl] to be installed."
-	fi
-}

diff --git a/app-admin/collectd/collectd-5.4.1.ebuild b/app-admin/collectd/collectd-5.4.1.ebuild
deleted file mode 100644
index 554a27e..0000000
--- a/app-admin/collectd/collectd-5.4.1.ebuild
+++ /dev/null
@@ -1,372 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-GENTOO_DEPEND_ON_PERL="no"
-
-inherit autotools base eutils linux-info multilib perl-app systemd user
-
-DESCRIPTION="A a daemon which collects system statistic and provides mechanisms to store the values"
-
-HOMEPAGE="http://collectd.org"
-SRC_URI="${HOMEPAGE}/files/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="contrib debug kernel_linux kernel_FreeBSD kernel_Darwin perl selinux static-libs"
-
-# The plugin lists have to follow here since they extend IUSE
-
-# Plugins that to my knowledge cannot be supported (eg. dependencies not in gentoo)
-COLLECTD_IMPOSSIBLE_PLUGINS="aquaero mic netapp pinba sigrok xmms"
-
-# Plugins that still need some work
-COLLECTD_UNTESTED_PLUGINS="amqp apple_sensors genericjmx ipvs lpar modbus redis
-	tape write_redis zfs_arc"
-
-# Plugins that have been (compile) tested and can be enabled via COLLECTD_PLUGINS
-COLLECTD_TESTED_PLUGINS="aggregation apache apcups ascent battery bind cgroups
-	conntrack contextswitch cpu cpufreq csv curl curl_json curl_xml dbi df disk dns
-	email entropy ethstat exec filecount fscache gmond hddtemp interface ipmi
-	iptables irq java libvirt load logfile lvm madwifi match_empty_counter
-	match_hashed match_regex match_timediff match_value mbmon md memcachec memcached
-	memory multimeter mysql netlink network network nfs nginx notify_desktop
-	notify_email ntpd numa nut olsrd onewire openvpn oracle perl perl ping postgresql
-	powerdns processes protocols python python routeros rrdcached rrdcached rrdtool
-	sensors serial snmp statsd swap syslog table tail target_notification
-	target_replace target_scale target_set tcpconns teamspeak2 ted thermal threshold
-	tokyotyrant unixsock uptime users uuid varnish vmem vserver wireless
-	write_graphite write_http write_mongodb"
-
-COLLECTD_DISABLED_PLUGINS="${COLLECTD_IMPOSSIBLE_PLUGINS} ${COLLECTD_UNTESTED_PLUGINS}"
-
-COLLECTD_ALL_PLUGINS=${COLLECTD_TESTED_PLUGINS}
-
-for plugin in ${COLLECTD_ALL_PLUGINS}; do
-	IUSE="${IUSE} collectd_plugins_${plugin}"
-done
-unset plugin
-
-# Now come the dependencies.
-
-COMMON_DEPEND="
-	dev-libs/libgcrypt:0
-	sys-devel/libtool
-	perl?					( dev-lang/perl:=[ithreads] )
-	collectd_plugins_apache?		( net-misc/curl )
-	collectd_plugins_ascent?		( net-misc/curl dev-libs/libxml2 )
-	collectd_plugins_bind?			( dev-libs/libxml2 )
-	collectd_plugins_curl?			( net-misc/curl )
-	collectd_plugins_curl_json?		( net-misc/curl dev-libs/yajl )
-	collectd_plugins_curl_xml?		( net-misc/curl dev-libs/libxml2 )
-	collectd_plugins_dbi?			( dev-db/libdbi )
-	collectd_plugins_dns?			( net-libs/libpcap )
-	collectd_plugins_gmond?			( sys-cluster/ganglia )
-	collectd_plugins_ipmi?			( >=sys-libs/openipmi-2.0.16-r1 )
-	collectd_plugins_iptables?		( >=net-firewall/iptables-1.4.13 )
-	collectd_plugins_java?			( virtual/jre dev-java/java-config-wrapper )
-	collectd_plugins_libvirt?		( app-emulation/libvirt dev-libs/libxml2 )
-	collectd_plugins_lvm?			( sys-fs/lvm2 )
-	collectd_plugins_memcachec?		( dev-libs/libmemcached )
-	collectd_plugins_mysql?			( >=virtual/mysql-5.0 )
-	collectd_plugins_netlink?		( net-libs/libmnl )
-	collectd_plugins_nginx?			( net-misc/curl )
-	collectd_plugins_notify_desktop?	( x11-libs/libnotify )
-	collectd_plugins_notify_email?		( net-libs/libesmtp dev-libs/openssl )
-	collectd_plugins_nut?			( sys-power/nut )
-	collectd_plugins_onewire?		( sys-fs/owfs )
-	collectd_plugins_oracle?		( dev-db/oracle-instantclient-basic )
-	collectd_plugins_perl?			( dev-lang/perl:=[ithreads] )
-	collectd_plugins_ping?			( net-libs/liboping )
-	collectd_plugins_postgresql?		( dev-db/postgresql )
-	collectd_plugins_python?		( =dev-lang/python-2* )
-	collectd_plugins_routeros?		( net-libs/librouteros )
-	collectd_plugins_rrdcached?		( net-analyzer/rrdtool )
-	collectd_plugins_rrdtool?		( net-analyzer/rrdtool )
-	collectd_plugins_sensors?		( sys-apps/lm_sensors )
-	collectd_plugins_snmp?			( net-analyzer/net-snmp )
-	collectd_plugins_tokyotyrant?		( net-misc/tokyotyrant )
-	collectd_plugins_varnish?		( www-servers/varnish )
-	collectd_plugins_write_http?		( net-misc/curl )
-	collectd_plugins_write_mongodb?		( dev-libs/mongo-c-driver )
-
-	kernel_FreeBSD? (
-		collectd_plugins_disk?		( sys-libs/libstatgrab )
-		collectd_plugins_interface?	( sys-libs/libstatgrab )
-		collectd_plugins_load?		( sys-libs/libstatgrab )
-		collectd_plugins_memory?	( sys-libs/libstatgrab )
-		collectd_plugins_swap?		( sys-libs/libstatgrab )
-		collectd_plugins_users?		( sys-libs/libstatgrab )
-	)"
-
-DEPEND="${COMMON_DEPEND}
-	virtual/pkgconfig
-	kernel_linux? (
-		collectd_plugins_vserver?	( sys-kernel/vserver-sources )
-	)"
-
-RDEPEND="${COMMON_DEPEND}
-	collectd_plugins_syslog?		( virtual/logger )
-	selinux?						( sec-policy/selinux-collectd )"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-5.4.1"-{nohal,libocci,libperl,lt}.patch
-	"${FILESDIR}/${PN}-4.10.3"-werror.patch
-)
-
-# @FUNCTION: collectd_plugin_kernel_linux
-# @DESCRIPTION:
-# USAGE: <plug-in name> <kernel_options> <severity>
-# kernel_options is a list of kernel configurations options; the check tests whether at least
-#   one of them is enabled. If no, depending on the third argument an elog, ewarn, or eerror message
-#   is emitted.
-collectd_plugin_kernel_linux() {
-	local multi_opt opt
-	if has ${1} ${COLLECTD_ALL_PLUGINS}; then
-		if use collectd_plugins_${1}; then
-			for opt in ${2}; do
-				if linux_chkconfig_present ${opt}; then return 0; fi
-			done
-			multi_opt=${2//\ /\ or\ }
-			case ${3} in
-				(info)
-					elog "The ${1} plug-in can use kernel features that are disabled now; enable ${multi_opt} in your kernel"
-				;;
-				(warn)
-					ewarn "The ${1} plug-in uses kernel features that are disabled now; enable ${multi_opt} in your kernel"
-				;;
-				(error)
-					eerror "The ${1} plug-in needs kernel features that are disabled now; enable ${multi_opt} in your kernel"
-				;;
-				(*)
-					die "function collectd_plugin_kernel_linux called with invalid third argument"
-				;;
-			esac
-		fi
-	fi
-}
-
-collectd_linux_kernel_checks() {
-	linux-info_pkg_setup
-
-	# battery.c:/proc/pmu/battery_%i
-	# battery.c:/proc/acpi/battery
-	collectd_plugin_kernel_linux battery ACPI_BATTERY warn
-
-	# cgroups.c:/sys/fs/cgroup/
-	collectd_plugin_kernel_linux cgroups CONFIG_CGROUPS warn
-
-	# cpufreq.c:/sys/devices/system/cpu/cpu%d/cpufreq/
-	collectd_plugin_kernel_linux cpufreq SYSFS warn
-	collectd_plugin_kernel_linux cpufreq CPU_FREQ_STAT warn
-
-	# nfs.c:/proc/net/rpc/nfs
-	# nfs.c:/proc/net/rpc/nfsd
-	collectd_plugin_kernel_linux nfs NFS_COMMON warn
-
-	# serial.c:/proc/tty/driver/serial
-	# serial.c:/proc/tty/driver/ttyS
-	collectd_plugin_kernel_linux serial SERIAL_CORE warn
-
-	# swap.c:/proc/meminfo
-	collectd_plugin_kernel_linux swap SWAP warn
-
-	# thermal.c:/proc/acpi/thermal_zone
-	# thermal.c:/sys/class/thermal
-	collectd_plugin_kernel_linux thermal "PROC_FS SYSFS" warn
-	collectd_plugin_kernel_linux thermal ACPI_THERMAL warn
-
-	# vmem.c:/proc/vmstat
-	collectd_plugin_kernel_linux vmem VM_EVENT_COUNTERS warn
-
-	# uuid.c:/sys/hypervisor/uuid
-	collectd_plugin_kernel_linux uuid SYSFS info
-
-	# wireless.c:/proc/net/wireless
-	collectd_plugin_kernel_linux wireless "MAC80211 IEEE80211" warn
-}
-
-pkg_setup() {
-	if use kernel_linux; then
-		if linux_config_exists; then
-			einfo "Checking your linux kernel configuration:"
-			collectd_linux_kernel_checks
-		else
-			elog "Cannot find a linux kernel configuration. Continuing anyway."
-		fi
-	fi
-
-	enewgroup collectd
-	enewuser collectd -1 -1 /var/lib/collectd collectd
-}
-
-src_prepare() {
-	base_src_prepare
-
-	# There's some strange prefix handling in the default config file, resulting in
-	# paths like "/usr/var/..."
-	sed -i -e "s:@prefix@/var:/var:g" src/collectd.conf.in || die
-
-	sed -i -e "s:/etc/collectd/collectd.conf:/etc/collectd.conf:g" contrib/collectd.service || die
-
-	# fix installdirs for perl, bug 444360
-	sed -i -e 's/INSTALL_BASE=$(DESTDIR)$(prefix) //' bindings/Makefile.am || die
-
-	rm -r libltdl || die
-
-	eautoreconf
-}
-
-src_configure() {
-	# Now come the lists of os-dependent plugins. Any plugin that is not listed anywhere here
-	# should work independent of the operating system.
-
-	local linux_plugins="battery cpu cpufreq disk entropy ethstat interface iptables ipvs irq load
-		memory md netlink nfs numa processes serial swap tcpconns thermal users vmem vserver
-		wireless"
-
-	local libstatgrab_plugins="cpu disk interface load memory swap users"
-	local bsd_plugins="cpu tcpconns ${libstatgrab_plugins}"
-
-	local darwin_plugins="apple_sensors battery cpu disk interface memory processes tcpconns"
-
-	local osdependent_plugins="${linux_plugins} ${bsd_plugins} ${darwin_plugins}"
-	local myos_plugins=""
-	if use kernel_linux; then
-		einfo "Enabling Linux plugins."
-		myos_plugins=${linux_plugins}
-	elif use kernel_FreeBSD; then
-		einfo "Enabling FreeBSD plugins."
-		myos_plugins=${bsd_plugins}
-	elif use kernel_Darwin; then
-		einfo "Enabling Darwin plugins."
-		myos_plugins=${darwin_plugins}
-	fi
-
-	# Do we debug?
-	local myconf="$(use_enable debug)"
-
-	local plugin
-
-	# Disable what needs to be disabled.
-	for plugin in ${COLLECTD_DISABLED_PLUGINS}; do
-		myconf+=" --disable-${plugin}"
-	done
-
-	# Set enable/disable for each single plugin.
-	for plugin in ${COLLECTD_ALL_PLUGINS}; do
-		if has ${plugin} ${osdependent_plugins}; then
-			# plugin is os-dependent ...
-			if has ${plugin} ${myos_plugins}; then
-				# ... and available in this os
-				myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
-			else
-				# ... and NOT available in this os
-				if use collectd_plugins_${plugin}; then
-					ewarn "You try to enable the ${plugin} plugin, but it is not available for this"
-					ewarn "kernel. Disabling it automatically."
-				fi
-				myconf+=" --disable-${plugin}"
-			fi
-		elif [[ "${plugin}" = "collectd_plugins_perl" ]]; then
-			if use collectd_plugins_perl && ! use perl; then
-				ewarn "Perl plugin disabled as perl bindings disabled by -perl use flag"
-				myconf+= --disable-perl
-			else
-				myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
-			fi
-		else
-			myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})"
-		fi
-	done
-
-	# Need JAVA_HOME for java.
-	if use collectd_plugins_java; then
-		myconf+=" --with-java=$(java-config -g JAVA_HOME)"
-	fi
-
-	# Need libiptc ONLY for iptables. If we try to use it otherwise bug 340109 happens.
-	if ! use collectd_plugins_iptables; then
-		myconf+=" --with-libiptc=no"
-	fi
-
-	if use perl; then
-		myconf+=" --with-perl-bindings=INSTALLDIRS=vendor"
-	else
-		myconf+=" --without-perl-bindings"
-	fi
-
-	# No need for v5upgrade
-	myconf+=" --disable-target_v5upgrade"
-
-	# Finally, run econf.
-	KERNEL_DIR="${KERNEL_DIR}" econf --config-cache --without-included-ltdl $(use_enable static-libs static) --localstatedir=/var ${myconf}
-}
-
-src_install() {
-	emake DESTDIR="${D}" install
-
-	perl_delete_localpod
-
-	find "${D}/usr/" -name "*.la" -exec rm -f {} +
-
-	# use collectd_plugins_ping && setcap cap_net_raw+ep ${D}/usr/sbin/collectd
-	# we cannot do this yet
-
-	fowners root:collectd /etc/collectd.conf
-	fperms u=rw,g=r,o= /etc/collectd.conf
-
-	dodoc AUTHORS ChangeLog NEWS README TODO
-
-	if use contrib ; then
-		insinto /usr/share/doc/${PF}
-		doins -r contrib
-	fi
-
-	keepdir /var/lib/${PN}
-	fowners collectd:collectd /var/lib/${PN}
-
-	newinitd "${FILESDIR}/${PN}.initd" ${PN}
-	newconfd "${FILESDIR}/${PN}.confd" ${PN}
-	systemd_dounit "contrib/${PN}.service"
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}/logrotate" collectd
-
-	sed -i -e 's:^.*PIDFile     "/var/run/collectd.pid":PIDFile     "/var/run/collectd/collectd.pid":' "${D}"/etc/collectd.conf || die
-	sed -i -e 's:^#	SocketFile "/var/run/collectd-unixsock":#	SocketFile "/var/run/collectd/collectd-unixsock":' "${D}"/etc/collectd.conf || die
-	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
-	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
-}
-
-collectd_rdeps() {
-	if (use collectd_plugins_${1} && ! has_version "${2}"); then
-		elog "The ${1} plug-in needs ${2} to be installed locally or remotely to work."
-	fi
-}
-
-pkg_postinst() {
-	collectd_rdeps apcups sys-power/apcupsd
-	collectd_rdeps hddtemp app-admin/hddtemp
-	collectd_rdeps mbmon sys-apps/xmbmon
-	collectd_rdeps memcached ">=net-misc/memcached-1.2.2-r2"
-	collectd_rdeps ntpd net-misc/ntp
-	collectd_rdeps openvpn ">=net-misc/openvpn-2.0.9"
-	collectd_rdeps write_mongodb "dev-db/mongodb"
-
-	echo
-	elog "collectd is now started as unprivileged user by default."
-	elog "You may want to revisit the configuration."
-	elog
-
-	if use collectd_plugins_email; then
-		ewarn "The email plug-in is deprecated. To submit statistics please use the unixsock plugin."
-	fi
-	if use contrib; then
-		elog "The scripts in /usr/share/doc/${PF}/collection3 for generating graphs need dev-perl/HTML-Parser,"
-		elog "dev-perl/config-general, dev-perl/regexp-common, and net-analyzer/rrdtool[perl] to be installed."
-	fi
-}

diff --git a/app-admin/collectd/files/collectd-4.10.2-libocci.patch b/app-admin/collectd/files/collectd-4.10.2-libocci.patch
deleted file mode 100644
index 2ae42dc..0000000
--- a/app-admin/collectd/files/collectd-4.10.2-libocci.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff -r -u collectd-4.10.2.orig/configure.in collectd-4.10.2/configure.in
---- collectd-4.10.2.orig/configure.in	2010-11-28 03:27:47.000000000 +0100
-+++ collectd-4.10.2/configure.in	2010-11-28 03:28:23.000000000 +0100
-@@ -2446,14 +2446,14 @@
- ])
- if test "x$ORACLE_HOME" != "x"
- then
--	with_oracle_cppflags="-I$ORACLE_HOME/rdbms/public"
-+	with_oracle_cppflags="-I$ORACLE_HOME/rdbms/public -locci"
- 
- 	if test -e "$ORACLE_HOME/lib/ldflags"
- 	then
- 		with_oracle_libs=`cat "$ORACLE_HOME/lib/ldflags"`
- 	fi
- 	#with_oracle_libs="-L$ORACLE_HOME/lib $with_oracle_libs -lclntsh"
--	with_oracle_libs="-L$ORACLE_HOME/lib -lclntsh"
-+	with_oracle_libs="-L$ORACLE_HOME/lib -lclntsh -locci"
- fi
- if test "x$with_oracle" = "xyes"
- then

diff --git a/app-admin/collectd/files/collectd-4.10.2-nohal.patch b/app-admin/collectd/files/collectd-4.10.2-nohal.patch
deleted file mode 100644
index a82a3bc..0000000
--- a/app-admin/collectd/files/collectd-4.10.2-nohal.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff -ruN collectd-4.10.2.orig/configure.in collectd-4.10.2/configure.in
---- collectd-4.10.2.orig/configure.in	2010-11-27 11:10:38.000000000 +0100
-+++ collectd-4.10.2/configure.in	2011-02-07 21:55:22.000000000 +0100
-@@ -1109,18 +1109,7 @@
- AM_CONDITIONAL(BUILD_WITH_LIBRESOLV, test "x$with_libresolv" = "xyes")
- 
- dnl Check for HAL (hardware abstraction library)
--with_libhal="yes"
--AC_CHECK_LIB(hal,libhal_device_property_exists,
--	     [AC_DEFINE(HAVE_LIBHAL, 1, [Define to 1 if you have 'hal' library])],
--	     [with_libhal="no"])
--if test "x$with_libhal" = "xyes"; then
--	if test "x$PKG_CONFIG" != "x"; then
--		BUILD_WITH_LIBHAL_CFLAGS="`pkg-config --cflags hal`"
--		BUILD_WITH_LIBHAL_LIBS="`pkg-config --libs hal`"
--		AC_SUBST(BUILD_WITH_LIBHAL_CFLAGS)
--		AC_SUBST(BUILD_WITH_LIBHAL_LIBS)
--	fi
--fi
-+with_libhal="no"
- 
- m4_divert_once([HELP_WITH], [
- collectd additional packages:])

diff --git a/app-admin/collectd/files/collectd-5.1.0-libperl.patch b/app-admin/collectd/files/collectd-5.1.0-libperl.patch
deleted file mode 100644
index 9a44d5b..0000000
--- a/app-admin/collectd/files/collectd-5.1.0-libperl.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-diff --git a/configure.in b/configure.in
-index 1cfc2fc..384c298 100644
---- a/configure.in
-+++ b/configure.in
-@@ -2944,11 +2944,13 @@ if test "x$with_libperl" = "xyes" \
- then
-   SAVE_CFLAGS="$CFLAGS"
-   SAVE_LDFLAGS="$LDFLAGS"
-+  SAVE_LIBS="$LIBS"
- dnl ARCHFLAGS="" -> disable multi -arch on OSX (see Config_heavy.pl:fetch_string)
-   PERL_CFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ccopts`
-   PERL_LDFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ldopts`
-   CFLAGS="$CFLAGS $PERL_CFLAGS"
-   LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
-+  LIBS="$LIBS -lperl -lpthread"
- 
-   AC_CACHE_CHECK([for libperl],
-     [c_cv_have_libperl],
-@@ -2967,7 +2969,10 @@ dnl ARCHFLAGS="" -> disable multi -arch on OSX (see Config_heavy.pl:fetch_string
- 			 Nullsv);
-       ]]),
-       [c_cv_have_libperl="yes"],
--      [c_cv_have_libperl="no"]
-+      [ 
-+        c_cv_have_libperl="no" 
-+        LIBS="$SAVE_LIBS"
-+      ]
-     )
-   )
- 
\ No newline at end of file

diff --git a/app-admin/collectd/files/collectd-5.1.1-lt.patch b/app-admin/collectd/files/collectd-5.1.1-lt.patch
deleted file mode 100644
index 4aa734b..0000000
--- a/app-admin/collectd/files/collectd-5.1.1-lt.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-diff --git a/Makefile.am b/Makefile.am
-index 5267123..a7e0d0c 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1,6 +1,4 @@
--ACLOCAL_AMFLAGS = -I libltdl/m4
--
--SUBDIRS = libltdl src bindings .
-+SUBDIRS = src bindings .
- 
- INCLUDES = $(LTDLINCL)
- 
-diff --git a/configure.in b/configure.in
-index eff8d61..a22a561 100644
---- a/configure.in
-+++ b/configure.in
-@@ -7,7 +7,6 @@ AC_CONFIG_AUX_DIR([libltdl/config])
- m4_ifdef([LT_PACKAGE_VERSION],
- 	# libtool >= 2.2
- 	[
--	 LT_CONFIG_LTDL_DIR([libltdl])
- 	 LT_INIT([dlopen])
- 	 LTDL_INIT([convenience])
- 	 AC_DEFINE(LIBTOOL_VERSION, 2, [Define to used libtool version.])
-@@ -19,7 +18,6 @@ m4_ifdef([LT_PACKAGE_VERSION],
- 	 AC_SUBST(LTDLINCL)
- 	 AC_SUBST(LIBLTDL)
- 	 AC_LIBTOOL_DLOPEN
--	 AC_CONFIG_SUBDIRS(libltdl)
- 	 AC_DEFINE(LIBTOOL_VERSION, 1, [Define to used libtool version.])
- 	]
- )
\ No newline at end of file


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-03-03 16:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-06 15:50 [gentoo-commits] repo/gentoo:master commit in: app-admin/collectd/files/, app-admin/collectd/ Thomas Deutschmann
  -- strict thread matches above, loose matches on Subject: below --
2018-03-03 16:43 Thomas Deutschmann
2018-03-03 16:43 Thomas Deutschmann
2016-10-13 20:49 Thomas Deutschmann
2016-08-11 16:33 Thomas Deutschmann
2016-03-29 13:53 Ian Delaney
2016-03-23 23:41 Ian Delaney
2016-02-29 16:21 Patrice Clement
2016-01-04 10:04 Jason Zaman
2015-09-03  9:00 James Le Cuirot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox