[gentoo-commits] repo/gentoo:master commit in: app-metrics/collectd/files/, app-metrics/collectd/

2023-12-03 Thread Sam James
commit: 70e9a9462d2ab905cc2daeba69bc3a502de0729c
Author: Sam James  gentoo  org>
AuthorDate: Mon Dec  4 07:32:00 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Dec  4 07:32:14 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=70e9a946

app-metrics/collectd: fix another modern c issue in configure (for nut)

Bug: https://bugs.gentoo.org/879633
Signed-off-by: Sam James  gentoo.org>

 app-metrics/collectd/collectd-5.12.0-r9.ebuild | 563 +
 .../collectd/files/collectd-5.12.0-nut-c99.patch   | 143 ++
 2 files changed, 706 insertions(+)

diff --git a/app-metrics/collectd/collectd-5.12.0-r9.ebuild 
b/app-metrics/collectd/collectd-5.12.0-r9.ebuild
new file mode 100644
index ..04af4bc67d49
--- /dev/null
+++ b/app-metrics/collectd/collectd-5.12.0-r9.ebuild
@@ -0,0 +1,563 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+JAVA_PKG_OPT_USE="collectd_plugins_java"
+LUA_COMPAT=( lua5-{1..4} )
+PYTHON_COMPAT=( python3_{9..11} )
+
+inherit autotools fcaps java-pkg-opt-2 linux-info lua-single perl-functions 
python-single-r1 systemd tmpfiles udev
+
+DESCRIPTION="Collects system statistics and provides mechanisms to store the 
values"
+
+HOMEPAGE="https://collectd.org/;
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/${P}/${P}.tar.bz2;
+
+LICENSE="MIT GPL-2 GPL-2+ GPL-3 GPL-3+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~x86"
+IUSE="contrib debug java 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
+# amqp1:  Requires libqpid-proton
+# aquaero:Requires aerotools-ng/libaquaero5
+# barometer:  Requires libi2c (i2c_smbus_read_i2c_block_data)
+# dpdkevents: Requires dpdk
+# dpdkstat:   Requires dpdk
+# dpdk_telemetry: Requires dpdk
+# grpc:   Requires libgrpc
+# intel_pmu:  Requires libjevents (pmu-tools)
+# 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)
+# onewire:Requires sys-fs/owfs which was removed from repository
+# pf: Requires BSD packet filter
+# pinba:  Requires MySQL Pinba engine (http://pinba.org/)
+# redfish:Requires libredfish
+# tape:   Requires libkstat (Solaris only)
+# tokyotyrant:Requires tokyotyrant
+# write_riemann:  Requires riemann-c-client
+# xmms:   Requires libxmms (v1)
+# zone:   Solaris only...
+COLLECTD_IMPOSSIBLE_PLUGINS="apple_sensors amqp1 aquaero barometer
+   dpdkevents dpdkstat dpdk_telemetry grpc intel_pmu intel_rdt lpar
+   mic netapp onewire pf pinba redfish tape tokyotyrant 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
+   buddyinfo capabilities ceph cgroups check_uptime chrony connectivity
+   conntrack contextswitch cpu cpufreq cpusleep csv curl curl_json
+   curl_xml dbi df disk dns drbd email entropy ethstat exec fhcount
+   filecount fscache gps gpu_nvidia hddtemp hugepages interface ipc
+   ipmi iptables ipvs irq java lua load logfile logparser log_logstash
+   madwifi match_empty_counter match_hashed match_regex match_timediff
+   match_value mbmon mcelog 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 ovs_events ovs_stats pcie_errors perl ping postgresql
+   powerdns procevent processes protocols python redis routeros
+   rrdcached rrdtool sensors serial sigrok slurm smart snmp snmp_agent
+   statsd swap synproxy sysevent syslog table tail tail_csv
+   target_notification target_replace target_scale target_set tcpconns
+   teamspeak2 ted thermal threshold turbostat ubi unixsock uptime users
+   uuid varnish virt vmem vserver wireless write_graphite write_http
+   write_influxdb_udp write_kafka write_log write_mongodb write_prometheus
+   write_redis write_sensu write_stackdriver write_syslog 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="
+   acct-group/collectd
+   acct-user/collectd
+   dev-libs/libgcrypt:=
+   

[gentoo-commits] repo/gentoo:master commit in: app-metrics/collectd/files/, app-metrics/collectd/

2023-04-13 Thread Sam James
commit: eff1ccb300e56b56ceea1fa204946647366afff3
Author: Sam James  gentoo  org>
AuthorDate: Fri Apr 14 02:50:58 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Apr 14 03:23:02 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eff1ccb3

app-metrics/collectd: fix configure w/ clang 16

Closes: https://bugs.gentoo.org/879633
Closes: https://bugs.gentoo.org/900392
Signed-off-by: Sam James  gentoo.org>

 ...-5.12.0-r7.ebuild => collectd-5.12.0-r8.ebuild} |   1 +
 .../files/collectd-5.12.0-clang16-configure.patch  | 127 +
 2 files changed, 128 insertions(+)

diff --git a/app-metrics/collectd/collectd-5.12.0-r7.ebuild 
b/app-metrics/collectd/collectd-5.12.0-r8.ebuild
similarity index 99%
rename from app-metrics/collectd/collectd-5.12.0-r7.ebuild
rename to app-metrics/collectd/collectd-5.12.0-r8.ebuild
index 9662889050c6..0c8c8c88baa4 100644
--- a/app-metrics/collectd/collectd-5.12.0-r7.ebuild
+++ b/app-metrics/collectd/collectd-5.12.0-r8.ebuild
@@ -173,6 +173,7 @@ REQUIRED_USE="
 PATCHES=(
"${FILESDIR}"/${PN}-5.11.0-libsigrok-0.4+.patch
"${FILESDIR}"/${PN}-5.12.0-python3_11.patch
+   "${FILESDIR}"/${PN}-5.12.0-clang16-configure.patch
 )
 
 # @FUNCTION: collectd_plugin_kernel_linux

diff --git a/app-metrics/collectd/files/collectd-5.12.0-clang16-configure.patch 
b/app-metrics/collectd/files/collectd-5.12.0-clang16-configure.patch
new file mode 100644
index ..578099579c47
--- /dev/null
+++ b/app-metrics/collectd/files/collectd-5.12.0-clang16-configure.patch
@@ -0,0 +1,127 @@
+https://bugs.gentoo.org/879633
+https://bugs.gentoo.org/900392
+https://github.com/collectd/collectd/pull/4106
+
+From f23164e589502ff675b3b54fa598bd9efd1422ed Mon Sep 17 00:00:00 2001
+From: Florian Weimer 
+Date: Thu, 6 Apr 2023 19:00:08 +0200
+Subject: [PATCH] Fix glibc feature macro handling for timegm
+
+The way strptime is activated using feature macros, _DEFAULT_SOURCE
+(successor to _BSD_SOURCE) is disabled implicitly, so timegm is
+hidden.  Defining _DEFAULT_SOURCE at the same time as the other
+feature macros solves this, and removes the need for the
+TIMEGM_NEEDS_BSD configure macro.
+
+This avoids an implicit declaration of timegm in src/bind.c, and build
+failures with future compilers.
+---
+ configure.ac | 53 
+ src/bind.c   | 10 +-
+ 2 files changed, 17 insertions(+), 46 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index bbe65a7e99..78bbff6624 100644
+--- a/configure.ac
 b/configure.ac
+@@ -974,6 +974,12 @@ if test "x$have_strptime" = "xyes" && test 
"x$c_cv_have_strptime_default" = "xno
+   #ifndef _XOPEN_SOURCE
+   # define _XOPEN_SOURCE 500
+   #endif
++  # ifndef _BSD_SOURCE
++  #  define _BSD_SOURCE
++  # endif
++  # ifndef _DEFAULT_SOURCE
++  #  define _DEFAULT_SOURCE
++  # endif
+   #include 
+ ]],
+ [[
+@@ -1024,6 +1030,12 @@ AC_CACHE_CHECK([for timegm],
+ # ifndef _XOPEN_SOURCE
+ #  define _XOPEN_SOURCE 500
+ # endif
++# ifndef _BSD_SOURCE
++#  define _BSD_SOURCE
++# endif
++# ifndef _DEFAULT_SOURCE
++#  define _DEFAULT_SOURCE
++# endif
+ #endif
+ #include 
+ ]]],
+@@ -1039,50 +1051,9 @@ AC_CACHE_CHECK([for timegm],
+   )
+ )
+ 
+-if test "x$c_cv_have_timegm" != "xyes"
+-then
+-  AC_CACHE_CHECK([for timegm with _BSD_SOURCE],
+-[c_cv_have_timegm_bsd],
+-AC_LINK_IFELSE(
+-  [AC_LANG_PROGRAM(
+-[[[
+-#if STRPTIME_NEEDS_STANDARDS
+-# ifndef _ISOC99_SOURCE
+-#  define _ISOC99_SOURCE 1
+-# endif
+-# ifndef _POSIX_C_SOURCE
+-#  define _POSIX_C_SOURCE 200112L
+-# endif
+-# ifndef _XOPEN_SOURCE
+-#  define _XOPEN_SOURCE 500
+-# endif
+-#endif
+-#ifndef _BSD_SOURCE
+-# define _BSD_SOURCE 1
+-#endif
+-#include 
+-]]],
+-[[[
+- time_t t = timegm(&(struct tm){0});
+- if (t == ((time_t) -1)) {
+-   return 1;
+- }
+-]]]
+-  )],
+-  [c_cv_have_timegm_bsd="yes"
+-   c_cv_have_timegm="yes"],
+-  [c_cv_have_timegm_bsd="no"]
+-)
+-  )
+-fi
+-
+ if test "x$c_cv_have_timegm" = "xyes"
+ then
+   AC_DEFINE(HAVE_TIMEGM, 1, [Define if the timegm(3) function is available.])
+-  if test "x$c_cv_have_timegm_bsd" = "xyes"
+-  then
+-AC_DEFINE(TIMEGM_NEEDS_BSD, 1, [Set to true if timegm is only exported in 
BSD mode.])
+-  fi
+ fi
+ 
+ CFLAGS="$SAVE_CFLAGS"
+diff --git a/src/bind.c b/src/bind.c
+index a246f1aacf..4a7c024253 100644
+--- a/src/bind.c
 b/src/bind.c
+@@ -33,13 +33,13 @@
+ #ifndef _XOPEN_SOURCE
+ #define _XOPEN_SOURCE 500
+ #endif
+-#endif /* STRPTIME_NEEDS_STANDARDS */
+-
+-#if TIMEGM_NEEDS_BSD
+ #ifndef _BSD_SOURCE
+-#define _BSD_SOURCE 1
++#define _BSD_SOURCE
+ #endif
+-#endif /* TIMEGM_NEEDS_BSD */
++#ifndef _DEFAULT_SOURCE
++#define _DEFAULT_SOURCE
++#endif
++#endif /* STRPTIME_NEEDS_STANDARDS */
+ 
+ #include "collectd.h"
+ 
+



[gentoo-commits] repo/gentoo:master commit in: app-metrics/collectd/files/, app-metrics/collectd/

2022-11-10 Thread Conrad Kostecki
commit: d5b4e4f0eaa2057de7dda8b3e2af437fca7016c9
Author: Conrad Kostecki  gentoo  org>
AuthorDate: Thu Nov 10 23:00:10 2022 +
Commit: Conrad Kostecki  gentoo  org>
CommitDate: Thu Nov 10 23:03:42 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5b4e4f0

app-metrics/collectd: fix compilation with python3_11

Closes: https://bugs.gentoo.org/880445
Signed-off-by: Conrad Kostecki  gentoo.org>

 app-metrics/collectd/collectd-5.12.0-r7.ebuild |  5 +++-
 .../files/collectd-5.12.0-python3_11.patch | 33 ++
 2 files changed, 37 insertions(+), 1 deletion(-)

diff --git a/app-metrics/collectd/collectd-5.12.0-r7.ebuild 
b/app-metrics/collectd/collectd-5.12.0-r7.ebuild
index 1b25586eb8fc..26990d0f4680 100644
--- a/app-metrics/collectd/collectd-5.12.0-r7.ebuild
+++ b/app-metrics/collectd/collectd-5.12.0-r7.ebuild
@@ -170,7 +170,10 @@ REQUIRED_USE="
collectd_plugins_smart? ( udev )
contrib?( perl )"
 
-PATCHES=( "${FILESDIR}"/${PN}-5.11.0-libsigrok-0.4+.patch )
+PATCHES=(
+   "${FILESDIR}"/${PN}-5.11.0-libsigrok-0.4+.patch
+   "${FILESDIR}"/${PN}-5.12.0-python3_11.patch
+)
 
 # @FUNCTION: collectd_plugin_kernel_linux
 # @DESCRIPTION:

diff --git a/app-metrics/collectd/files/collectd-5.12.0-python3_11.patch 
b/app-metrics/collectd/files/collectd-5.12.0-python3_11.patch
new file mode 100644
index ..3c0572889559
--- /dev/null
+++ b/app-metrics/collectd/files/collectd-5.12.0-python3_11.patch
@@ -0,0 +1,33 @@
+From 623e95394e0e62e7f9ced2104b786d21e9c0bf53 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
+ 
+Date: Wed, 21 Sep 2022 22:21:58 +0700
+Subject: [PATCH] cpython: fix build with Python 3.11
+
+Python 3.11 moves longintrepr.h into cpython sub-directory.
+However, in this version, longintrepr.h is always included.
+---
+ src/cpython.h | 8 +++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/src/cpython.h b/src/cpython.h
+index 11e64fa62f..bcfa406feb 100644
+--- a/src/cpython.h
 b/src/cpython.h
+@@ -24,9 +24,15 @@
+  *   Sven Trenkel 
+  **/
+ 
++#include 
+ /* Some python versions don't include this by default. */
+-
++#if PY_VERSION_HEX < 0x030B
++/*
++ * Python 3.11 move longintrepr.h to cpython/longintrepr.h
++ * And it's always included
++ */
+ #include 
++#endif /* PY_VERSION_HEX < 0x030B */
+ 
+ /* These two macros are basically Py_BEGIN_ALLOW_THREADS and
+  * Py_BEGIN_ALLOW_THREADS



[gentoo-commits] repo/gentoo:master commit in: app-metrics/collectd/files/, app-metrics/collectd/

2022-06-07 Thread Conrad Kostecki
commit: 27e246bff6899e93be3c31e1368f08f02d404c2b
Author: Conrad Kostecki  gentoo  org>
AuthorDate: Tue Jun  7 17:58:03 2022 +
Commit: Conrad Kostecki  gentoo  org>
CommitDate: Tue Jun  7 17:58:03 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=27e246bf

app-metrics/collectd: drop 5.12.0-r5

Signed-off-by: Conrad Kostecki  gentoo.org>

 app-metrics/collectd/collectd-5.12.0-r5.ebuild | 552 -
 app-metrics/collectd/files/collectd.initd-r2   |  70 
 2 files changed, 622 deletions(-)

diff --git a/app-metrics/collectd/collectd-5.12.0-r5.ebuild 
b/app-metrics/collectd/collectd-5.12.0-r5.ebuild
deleted file mode 100644
index 31e9c7f7be72..
--- a/app-metrics/collectd/collectd-5.12.0-r5.ebuild
+++ /dev/null
@@ -1,552 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-JAVA_PKG_OPT_USE="collectd_plugins_java"
-LUA_COMPAT=( lua5-{1..3} )
-PYTHON_COMPAT=( python3_{7..9} )
-
-inherit autotools fcaps flag-o-matic java-pkg-opt-2 linux-info lua-single \
-   multilib perl-functions python-single-r1 systemd tmpfiles udev
-
-DESCRIPTION="Collects system statistics and provides mechanisms to store the 
values"
-
-HOMEPAGE="https://collectd.org/;
-SRC_URI="https://github.com/${PN}/${PN}/releases/download/${P}/${P}.tar.bz2;
-
-LICENSE="MIT GPL-2 GPL-2+ GPL-3 GPL-3+"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm x86"
-IUSE="contrib debug java 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
-# amqp1:  Requires libqpid-proton
-# aquaero:Requires aerotools-ng/libaquaero5
-# barometer:  Requires libi2c (i2c_smbus_read_i2c_block_data)
-# dpdkevents: Requires dpdk
-# dpdkstat:   Requires dpdk
-# dpdk_telemetry: Requires dpdk
-# grpc:   Requires libgrpc
-# intel_pmu:  Requires libjevents (pmu-tools)
-# 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)
-# onewire:Requires sys-fs/owfs which was removed from repository
-# pf: Requires BSD packet filter
-# pinba:  Requires MySQL Pinba engine (http://pinba.org/)
-# redfish:Requires libredfish
-# tape:   Requires libkstat (Solaris only)
-# tokyotyrant:Requires tokyotyrant
-# write_riemann:  Requires riemann-c-client
-# xmms:   Requires libxmms (v1)
-# zone:   Solaris only...
-COLLECTD_IMPOSSIBLE_PLUGINS="apple_sensors amqp1 aquaero barometer
-   dpdkevents dpdkstat dpdk_telemetry grpc intel_pmu intel_rdt lpar
-   mic netapp onewire pf pinba redfish tape tokyotyrant 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
-   buddyinfo capabilities ceph cgroups check_uptime chrony connectivity
-   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 gpu_nvidia hddtemp hugepages interface ipc
-   ipmi iptables ipvs irq java lua load logfile logparser log_logstash
-   madwifi match_empty_counter match_hashed match_regex match_timediff
-   match_value mbmon mcelog 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 ovs_events ovs_stats pcie_errors perl ping postgresql
-   powerdns procevent processes protocols python redis routeros
-   rrdcached rrdtool sensors serial sigrok slurm smart snmp snmp_agent
-   statsd swap synproxy sysevent syslog table tail tail_csv
-   target_notification target_replace target_scale target_set tcpconns
-   teamspeak2 ted thermal threshold turbostat ubi unixsock uptime users
-   uuid varnish virt vmem vserver wireless write_graphite write_http
-   write_influxdb_udp write_kafka write_log write_mongodb write_prometheus
-   write_redis write_sensu write_stackdriver write_syslog 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="
-   acct-group/collectd
-   acct-user/collectd
-   dev-libs/libgcrypt:=
-   dev-libs/libltdl:0=
-   

[gentoo-commits] repo/gentoo:master commit in: app-metrics/collectd/files/, app-metrics/collectd/

2022-06-05 Thread Conrad Kostecki
commit: c1983aebe66b95bd9da87d40db1f608ba90c7528
Author: Conrad Kostecki  gentoo  org>
AuthorDate: Tue Apr  5 19:18:08 2022 +
Commit: Conrad Kostecki  gentoo  org>
CommitDate: Sun Jun  5 14:06:07 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1983aeb

app-metrics/collectd: fix missing group in init script

Signed-off-by: Conrad Kostecki  gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/24922
Signed-off-by: Conrad Kostecki  gentoo.org>

 ...-5.12.0-r6.ebuild => collectd-5.12.0-r7.ebuild} |  2 +-
 app-metrics/collectd/files/collectd.initd-r3   | 71 ++
 2 files changed, 72 insertions(+), 1 deletion(-)

diff --git a/app-metrics/collectd/collectd-5.12.0-r6.ebuild 
b/app-metrics/collectd/collectd-5.12.0-r7.ebuild
similarity index 99%
rename from app-metrics/collectd/collectd-5.12.0-r6.ebuild
rename to app-metrics/collectd/collectd-5.12.0-r7.ebuild
index 608f269fb2c6..1e9d0b18e23e 100644
--- a/app-metrics/collectd/collectd-5.12.0-r6.ebuild
+++ b/app-metrics/collectd/collectd-5.12.0-r7.ebuild
@@ -464,7 +464,7 @@ src_install() {
keepdir /var/lib/${PN}
fowners collectd:collectd /var/lib/${PN}
 
-   newinitd "${FILESDIR}/${PN}.initd-r2" ${PN}
+   newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
newconfd "${FILESDIR}/${PN}.confd-r2" ${PN}
systemd_newunit "contrib/systemd.${PN}.service" ${PN}.service
 

diff --git a/app-metrics/collectd/files/collectd.initd-r3 
b/app-metrics/collectd/files/collectd.initd-r3
new file mode 100644
index ..aa3396d5a451
--- /dev/null
+++ b/app-metrics/collectd/files/collectd.initd-r3
@@ -0,0 +1,71 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 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.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}\" -f"
+command_background=true
+command_group="${COLLECTD_GROUP}"
+command_user="${COLLECTD_USER}"
+start_stop_daemon_args="${COLLECTD_SSDARGS} --nice ${COLLECTD_NICELEVEL}"
+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
+}
+
+stop_pre() {
+   if [ "${RC_CMD}" = "restart" ]; then
+   configtest || return 1
+   fi
+}



[gentoo-commits] repo/gentoo:master commit in: app-metrics/collectd/files/

2021-07-31 Thread Sam James
commit: 5f67d29ba38a54c74818f82a7c2902b89892de44
Author: Sam James  gentoo  org>
AuthorDate: Sat Jul 31 04:09:49 2021 +
Commit: Sam James  gentoo  org>
CommitDate: Sat Jul 31 22:13:45 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f67d29b

app-metrics/collectd: fix tmpfiles path in conf.d

Signed-off-by: Sam James  gentoo.org>

 app-metrics/collectd/files/collectd.confd-r2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-metrics/collectd/files/collectd.confd-r2 
b/app-metrics/collectd/files/collectd.confd-r2
index 835936d5bce..38fb9a6057e 100644
--- a/app-metrics/collectd/files/collectd.confd-r2
+++ b/app-metrics/collectd/files/collectd.confd-r2
@@ -27,7 +27,7 @@
 # isn't used anymore.
 # If you are going to change UNIX socket location or change COLLECTD_USER
 # setting above, make sure you overwrite /usr/lib/tmpfiles.d/collectd.conf
-# via copy in /etc/tmpfiles.d/collectd.conf to match your setup.
+# via copy in /usr/lib/tmpfiles.d/collectd.conf to match your setup.
 #COLLECTD_GROUP="collectd"
 
 # You can use this configuration option to pass additional options to the



[gentoo-commits] repo/gentoo:master commit in: app-metrics/collectd/files/, app-metrics/collectd/

2020-08-05 Thread Thomas Deutschmann
commit: 8bcb791ad645e34183dc17e3c05aca6f28689128
Author: Thomas Deutschmann  gentoo  org>
AuthorDate: Wed Aug  5 15:34:15 2020 +
Commit: Thomas Deutschmann  gentoo  org>
CommitDate: Wed Aug  5 15:35:35 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8bcb791a

app-metrics/collectd: fix building with >=libsigrok-0.4

Closes: https://bugs.gentoo.org/730514
Package-Manager: Portage-3.0.1, Repoman-2.3.23
Signed-off-by: Thomas Deutschmann  gentoo.org>

 ...-5.11.0-r2.ebuild => collectd-5.11.0-r3.ebuild} |   4 +-
 .../files/collectd-5.11.0-libsigrok-0.4+.patch | 157 +
 2 files changed, 160 insertions(+), 1 deletion(-)

diff --git a/app-metrics/collectd/collectd-5.11.0-r2.ebuild 
b/app-metrics/collectd/collectd-5.11.0-r3.ebuild
similarity index 99%
rename from app-metrics/collectd/collectd-5.11.0-r2.ebuild
rename to app-metrics/collectd/collectd-5.11.0-r3.ebuild
index d8acd70eb21..e3d3fc157a4 100644
--- a/app-metrics/collectd/collectd-5.11.0-r2.ebuild
+++ b/app-metrics/collectd/collectd-5.11.0-r3.ebuild
@@ -129,7 +129,7 @@ COMMON_DEPEND="
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_slurm? ( sys-cluster/slurm )
collectd_plugins_smart? ( dev-libs/libatasmart:0= )
collectd_plugins_snmp?  ( net-analyzer/net-snmp )
@@ -170,6 +170,8 @@ REQUIRED_USE="
collectd_plugins_smart? ( udev )
contrib?( perl )"
 
+PATCHES=( "${FILESDIR}"/${PN}-5.11.0-libsigrok-0.4+.patch )
+
 # @FUNCTION: collectd_plugin_kernel_linux
 # @DESCRIPTION:
 # USAGE:   

diff --git a/app-metrics/collectd/files/collectd-5.11.0-libsigrok-0.4+.patch 
b/app-metrics/collectd/files/collectd-5.11.0-libsigrok-0.4+.patch
new file mode 100644
index 000..981864e81c3
--- /dev/null
+++ b/app-metrics/collectd/files/collectd-5.11.0-libsigrok-0.4+.patch
@@ -0,0 +1,157 @@
+Backport of 
https://github.com/u1f35c/collectd/commit/9e36cd85a2bbd6daa55f1f392f60f9c95573ae2c
+aka https://github.com/collectd/collectd/issues/1574
+
+--- a/configure.ac
 b/configure.ac
+@@ -5367,7 +5367,7 @@ AC_SUBST([BUILD_WITH_LIBSENSORS_LIBS])
+ # libsigrok {{{
+ AC_SUBST([LIBSIGROK_CFLAGS])
+ AC_SUBST([LIBSIGROK_LIBS])
+-PKG_CHECK_MODULES([LIBSIGROK], [libsigrok < 0.4],
++PKG_CHECK_MODULES([LIBSIGROK], [libsigrok >= 0.4],
+   [with_libsigrok="yes"],
+   [with_libsigrok="no (pkg-config could not find libsigrok)"]
+ )
+--- a/src/sigrok.c
 b/src/sigrok.c
+@@ -127,22 +127,22 @@ static int sigrok_config(oconfig_item_t *ci) {
+   return 0;
+ }
+ 
+-static const char *sigrok_value_type(const struct sr_datafeed_analog *analog) 
{
++static const char *sigrok_value_type(const struct sr_analog_meaning *meaning) 
{
+   const char *s;
+ 
+-  if (analog->mq == SR_MQ_VOLTAGE)
++  if (meaning->mq == SR_MQ_VOLTAGE)
+ s = "voltage";
+-  else if (analog->mq == SR_MQ_CURRENT)
++  else if (meaning->mq == SR_MQ_CURRENT)
+ s = "current";
+-  else if (analog->mq == SR_MQ_FREQUENCY)
++  else if (meaning->mq == SR_MQ_FREQUENCY)
+ s = "frequency";
+-  else if (analog->mq == SR_MQ_POWER)
++  else if (meaning->mq == SR_MQ_POWER)
+ s = "power";
+-  else if (analog->mq == SR_MQ_TEMPERATURE)
++  else if (meaning->mq == SR_MQ_TEMPERATURE)
+ s = "temperature";
+-  else if (analog->mq == SR_MQ_RELATIVE_HUMIDITY)
++  else if (meaning->mq == SR_MQ_RELATIVE_HUMIDITY)
+ s = "humidity";
+-  else if (analog->mq == SR_MQ_SOUND_PRESSURE_LEVEL)
++  else if (meaning->mq == SR_MQ_SOUND_PRESSURE_LEVEL)
+ s = "spl";
+   else
+ s = "gauge";
+@@ -172,7 +172,7 @@ static void sigrok_feed_callback(const struct sr_dev_inst 
*sdi,
+ ERROR("sigrok plugin: Received data from driver \"%s\" but "
+   "can't find a configuration / device matching "
+   "it.",
+-  sdi->driver->name);
++  sr_dev_inst_driver_get(sdi)->name);
+ return;
+   }
+ 
+@@ -191,11 +191,11 @@ static void sigrok_feed_callback(const struct 
sr_dev_inst *sdi,
+ 
+   /* Ignore all but the first sample on the first probe. */
+   analog = packet->payload;
+-  vl.values = &(value_t){.gauge = analog->data[0]};
++  vl.values = &(value_t){.gauge = ((float *) analog->data)[0]};
+   vl.values_len = 1;
+   sstrncpy(vl.plugin, "sigrok", sizeof(vl.plugin));
+   sstrncpy(vl.plugin_instance, cfdev->name, sizeof(vl.plugin_instance));
+-  sstrncpy(vl.type, sigrok_value_type(analog), sizeof(vl.type));
++  sstrncpy(vl.type, sigrok_value_type(>meaning[0]), sizeof(vl.type));
+ 
+   plugin_dispatch_values();
+   cfdev->last_dispatch = cdtime();
+@@ -207,6 +207,7 @@ static void sigrok_free_drvopts(struct sr_config *src) {
+ }
+ 
+ 

[gentoo-commits] repo/gentoo:master commit in: app-metrics/collectd/files/, app-metrics/collectd/

2019-08-21 Thread Thomas Deutschmann
commit: 7628e513e894f1fa4d23dd8b4b5a052a4a068dd9
Author: Thomas Deutschmann  gentoo  org>
AuthorDate: Wed Aug 21 22:52:35 2019 +
Commit: Thomas Deutschmann  gentoo  org>
CommitDate: Wed Aug 21 22:53:44 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7628e513

app-metrics/collectd: unbreack v5.9.1

Add some upstream patches to fix broken v5.9.1 release.

Package-Manager: Portage-2.3.72, Repoman-2.3.17
Signed-off-by: Thomas Deutschmann  gentoo.org>

 ...lectd-5.9.1.ebuild => collectd-5.9.1-r1.ebuild} |  2 +-
 .../collectd/files/collectd-5.9.1-fixup.patch  | 81 ++
 2 files changed, 82 insertions(+), 1 deletion(-)

diff --git a/app-metrics/collectd/collectd-5.9.1.ebuild 
b/app-metrics/collectd/collectd-5.9.1-r1.ebuild
similarity index 99%
rename from app-metrics/collectd/collectd-5.9.1.ebuild
rename to app-metrics/collectd/collectd-5.9.1-r1.ebuild
index e79b4d6e0e4..052e491c929 100644
--- a/app-metrics/collectd/collectd-5.9.1.ebuild
+++ b/app-metrics/collectd/collectd-5.9.1-r1.ebuild
@@ -160,7 +160,7 @@ REQUIRED_USE="
collectd_plugins_python?( ${PYTHON_REQUIRED_USE} )
collectd_plugins_smart? ( udev )"
 
-PATCHES=()
+PATCHES=( "${FILESDIR}"/${P}-fixup.patch )
 
 S="${WORKDIR}/${PN}-${PN}-${PV}"
 

diff --git a/app-metrics/collectd/files/collectd-5.9.1-fixup.patch 
b/app-metrics/collectd/files/collectd-5.9.1-fixup.patch
new file mode 100644
index 000..93f97d95a9c
--- /dev/null
+++ b/app-metrics/collectd/files/collectd-5.9.1-fixup.patch
@@ -0,0 +1,81 @@
+--- a/src/daemon/plugin.c
 b/src/daemon/plugin.c
+@@ -647,7 +647,8 @@ static void start_read_threads(size_t num) /* {{{ */
+ }
+ 
+ char name[THREAD_NAME_MAX];
+-snprintf(name, sizeof(name), "reader#%" PRIu64, 
(uint64_t)read_threads_num);
++ssnprintf(name, sizeof(name), "reader#%" PRIu64,
++  (uint64_t)read_threads_num);
+ set_thread_name(read_threads[read_threads_num], name);
+ 
+ read_threads_num++;
+@@ -836,8 +837,8 @@ static void start_write_threads(size_t num) /* {{{ */
+ }
+ 
+ char name[THREAD_NAME_MAX];
+-snprintf(name, sizeof(name), "writer#%" PRIu64,
+- (uint64_t)write_threads_num);
++ssnprintf(name, sizeof(name), "writer#%" PRIu64,
++  (uint64_t)write_threads_num);
+ set_thread_name(write_threads[write_threads_num], name);
+ 
+ write_threads_num++;
+--- a/src/intel_rdt.c
 b/src/intel_rdt.c
+@@ -325,8 +325,12 @@ static int strlisttoarray(char *str_list, char ***names, 
size_t *names_num) {
+   continue;
+ 
+ if ((isdupstr((const char **)*names, *names_num, token))) {
+-  ERROR(RDT_PLUGIN ": Duplicated process name \'%s\' in group \'%s\'",
+-token, str_list);
++  if (str_list != NULL)
++ERROR(RDT_PLUGIN ": Duplicated process name \'%s\' in group \'%s\'",
++  token, str_list);
++  else
++ERROR(RDT_PLUGIN ": Duplicated process name \'%s\'", token);
++
+   return -EINVAL;
+ } else {
+   if (0 != strarray_add(names, names_num, token)) {
+--- a/src/intel_rdt.c
 b/src/intel_rdt.c
+@@ -325,11 +325,7 @@ static int strlisttoarray(char *str_list, char ***names, 
size_t *names_num) {
+   continue;
+ 
+ if ((isdupstr((const char **)*names, *names_num, token))) {
+-  if (str_list != NULL)
+-ERROR(RDT_PLUGIN ": Duplicated process name \'%s\' in group \'%s\'",
+-  token, str_list);
+-  else
+-ERROR(RDT_PLUGIN ": Duplicated process name \'%s\'", token);
++  ERROR(RDT_PLUGIN ": Duplicated process name \'%s\'", token);
+ 
+   return -EINVAL;
+ } else {
+--- a/src/syslog.c
 b/src/syslog.c
+@@ -51,8 +51,7 @@ static int sl_config(const char *key, const char *value) {
+ log_level = parse_log_severity(value);
+ if (log_level < 0) {
+   log_level = LOG_INFO;
+-  ERROR("syslog: invalid loglevel [%s] defaulting to 'info'", value);
+-  return 1;
++  WARNING("syslog: invalid loglevel [%s] defaulting to 'info'", value);
+ }
+   } else if (strcasecmp(key, "NotifyLevel") == 0) {
+ notif_severity = parse_notif_severity(value);
+--- a/src/utils/common/common.c
 b/src/utils/common/common.c
+@@ -99,10 +99,7 @@ int ssnprintf(char *str, size_t sz, const char *format, 
...) {
+ 
+   va_end(ap);
+ 
+-  if (ret < 0) {
+-return ret;
+-  }
+-  return (size_t)ret >= sz;
++  return ret;
+ } /* int ssnprintf */
+ 
+ char *ssnprintf_alloc(char const *format, ...) /* {{{ */



[gentoo-commits] repo/gentoo:master commit in: app-metrics/collectd/files/, app-metrics/collectd/

2019-07-19 Thread Thomas Deutschmann
commit: 3afefc69ca98b1871e724df2528786f38e4c0903
Author: Thomas Deutschmann  gentoo  org>
AuthorDate: Fri Jul 19 17:41:55 2019 +
Commit: Thomas Deutschmann  gentoo  org>
CommitDate: Sat Jul 20 00:13:16 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3afefc69

app-metrics/collectd: drop old

Package-Manager: Portage-2.3.68, Repoman-2.3.16
Signed-off-by: Thomas Deutschmann  gentoo.org>

 app-metrics/collectd/Manifest  |   1 -
 app-metrics/collectd/collectd-5.8.0-r1.ebuild  | 536 -
 .../collectd-5.8.0-disk-plugin-udev-fix.patch  |  98 
 3 files changed, 635 deletions(-)

diff --git a/app-metrics/collectd/Manifest b/app-metrics/collectd/Manifest
index ae878e1916e..f639ce1d2be 100644
--- a/app-metrics/collectd/Manifest
+++ b/app-metrics/collectd/Manifest
@@ -1,2 +1 @@
-DIST collectd-5.8.0.tar.bz2 1686017 BLAKE2B 
26d995cdb9c25869bf96a056e6ba879de9f009fd4bbf1364a7dedba93b822e57c4b606ca8c84da68cc29db8e77333047695e85d7eb101080de9cee783240f5ea
 SHA512 
1b3d0cc44e2ca54e13eebf292074f1efa8b33d6800d04405e0eaaa2dd1cb2416c6eae580729fb5aead23a5039f41ffe8a9989a907a8c18be8f867f1099fc0008
 DIST collectd-5.8.1.tar.bz2 1789228 BLAKE2B 
739f961172978db33bdf95c8f93bde0036a26b2ed2abd3396a734d4b97c4ae117bb26a62fcdbb3d77bd63d9f64a38f83d0c8a0665e8fa7bf5ed2efc6838b0e8e
 SHA512 
8c75448c6e59ee1ea5c1cf486c07040d20fb36d5b7a1be2ab45facea330166e8c1d1fa38e3fa82ec905428d7b2c92c66aae35ee8e3546f67ce76f7f410739901

diff --git a/app-metrics/collectd/collectd-5.8.0-r1.ebuild 
b/app-metrics/collectd/collectd-5.8.0-r1.ebuild
deleted file mode 100644
index 64b897cee82..000
--- a/app-metrics/collectd/collectd-5.8.0-r1.ebuild
+++ /dev/null
@@ -1,536 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} )
-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 tmpfiles user
-
-DESCRIPTION="Collects system statistics and provides mechanisms to store the 
values"
-
-HOMEPAGE="https://collectd.org/;
-SRC_URI="${HOMEPAGE%/}/files/${P}.tar.bz2"
-
-LICENSE="MIT GPL-2 GPL-2+ GPL-3 GPL-3+"
-SLOT="0"
-KEYWORDS="alpha 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)
-# dpdkevents:Requires dpdk
-# dpdkstat:  Requires dpdk
-# grpc:  Requires libgrpc
-# intel_pmu: Requires libjevents (pmu-tools)
-# 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_riemann: Requires riemann-c-client
-# xmms:  Requires libxmms (v1)
-# zone:  Solaris only...
-COLLECTD_IMPOSSIBLE_PLUGINS="apple_sensors aquaero barometer dpdkstat grpc
-   intel_pmu intel_rdt lpar mic netapp pf pinba tape 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 mcelog 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 ovs_events
-   ovs_stats perl ping postgresql powerdns processes protocols python
-   python redis routeros rrdcached rrdtool sensors serial sigrok smart
-   snmp snmp_agent 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_mongodb write_prometheus
-   write_redis write_sensu write_tsdb xencpu 

[gentoo-commits] repo/gentoo:master commit in: app-metrics/collectd/files/, app-metrics/collectd/

2018-11-30 Thread Thomas Deutschmann
commit: 7dbfccac96626dd3bcc4b54577427924e40410f8
Author: Thomas Deutschmann  gentoo  org>
AuthorDate: Fri Nov 30 19:49:25 2018 +
Commit: Thomas Deutschmann  gentoo  org>
CommitDate: Fri Nov 30 19:49:57 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7dbfccac

app-metrics/collectd: allow lm_sensors-4.5.0 usage

Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Thomas Deutschmann  gentoo.org>

 app-metrics/collectd/collectd-5.8.1.ebuild |  2 +
 ...ectd-5.8.1-lm_sensors-4.5.0-compatibility.patch | 70 ++
 2 files changed, 72 insertions(+)

diff --git a/app-metrics/collectd/collectd-5.8.1.ebuild 
b/app-metrics/collectd/collectd-5.8.1.ebuild
index 9ce52b83d6c..d58a3a63c4d 100644
--- a/app-metrics/collectd/collectd-5.8.1.ebuild
+++ b/app-metrics/collectd/collectd-5.8.1.ebuild
@@ -159,6 +159,8 @@ REQUIRED_USE="
collectd_plugins_python?( ${PYTHON_REQUIRED_USE} )
collectd_plugins_smart? ( udev )"
 
+PATCHES=( "${FILESDIR}"/${PN}-5.8.1-lm_sensors-4.5.0-compatibility.patch )
+
 # @FUNCTION: collectd_plugin_kernel_linux
 # @DESCRIPTION:
 # USAGE:   

diff --git 
a/app-metrics/collectd/files/collectd-5.8.1-lm_sensors-4.5.0-compatibility.patch
 
b/app-metrics/collectd/files/collectd-5.8.1-lm_sensors-4.5.0-compatibility.patch
new file mode 100644
index 000..3476d50664a
--- /dev/null
+++ 
b/app-metrics/collectd/files/collectd-5.8.1-lm_sensors-4.5.0-compatibility.patch
@@ -0,0 +1,70 @@
+https://github.com/collectd/collectd/issues/3006
+
+--- old/src/sensors.c
 new/src/sensors.c
+@@ -149,7 +149,7 @@
+ static char *conffile = SENSORS_CONF_PATH;
+ /* #endif SENSORS_API_VERSION < 0x400 */
+ 
+-#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500)
++#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x600)
+ typedef struct featurelist {
+   const sensors_chip_name *chip;
+   const sensors_feature *feature;
+@@ -159,9 +159,9 @@
+ 
+ static char *conffile = NULL;
+ static _Bool use_labels = 0;
+-/* #endif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) */
++/* #endif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x600) */
+ 
+-#else /* if SENSORS_API_VERSION >= 0x500 */
++#else /* if SENSORS_API_VERSION >= 0x600 */
+ #error "This version of libsensors is not supported yet. Please report this " 
\
+   "as bug."
+ #endif
+@@ -223,7 +223,7 @@
+ if (IS_TRUE(value))
+   ignorelist_set_invert(sensor_list, 0);
+   }
+-#if (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500)
++#if (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x600)
+   else if (strcasecmp(key, "UseLabels") == 0) {
+ use_labels = IS_TRUE(value) ? 1 : 0;
+   }
+@@ -353,7 +353,7 @@
+   }   /* while sensors_get_detected_chips */
+ /* #endif SENSORS_API_VERSION < 0x400 */
+ 
+-#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500)
++#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x600)
+   chip_num = 0;
+   while ((chip = sensors_get_detected_chips(NULL, _num)) != NULL) {
+ const sensors_feature *feature;
+@@ -410,7 +410,7 @@
+   } /* while (subfeature) */
+ }   /* while (feature) */
+   } /* while (chip) */
+-#endif /* (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) */
++#endif /* (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x600) */
+ 
+   if (first_feature == NULL) {
+ sensors_cleanup();
+@@ -485,7 +485,7 @@
+   } /* for fl = first_feature .. NULL */
+ /* #endif SENSORS_API_VERSION < 0x400 */
+ 
+-#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500)
++#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x600)
+   for (featurelist_t *fl = first_feature; fl != NULL; fl = fl->next) {
+ double value;
+ int status;
+@@ -528,7 +528,7 @@
+ 
+ sensors_submit(plugin_instance, type, type_instance, value);
+   } /* for fl = first_feature .. NULL */
+-#endif /* (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) */
++#endif /* (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x600) */
+ 
+   return 0;
+ } /* int sensors_read */



[gentoo-commits] repo/gentoo:master commit in: app-metrics/collectd/files/, app-metrics/collectd/

2018-08-02 Thread Thomas Deutschmann
commit: 230977ee8c2ce01b6b5d1e8c5900f6c4e496c550
Author: Thomas Deutschmann  gentoo  org>
AuthorDate: Thu Aug  2 18:40:08 2018 +
Commit: Thomas Deutschmann  gentoo  org>
CommitDate: Thu Aug  2 18:40:33 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=230977ee

app-metrics/collectd: drop old

Package-Manager: Portage-2.3.44, Repoman-2.3.10

 app-metrics/collectd/Manifest  |1 -
 app-metrics/collectd/collectd-5.7.2-r3.ebuild  |  548 ---
 .../collectd/files/collectd-5.6.0-gentoo.patch |  153 ---
 .../files/collectd-5.7.2-CVE-2017-16820.patch  |   39 -
 .../collectd/files/collectd-5.7.2-issue-2443.patch |  160 ---
 .../files/collectd-5.7.2-varnish-5.2+.patch| 1018 
 6 files changed, 1919 deletions(-)

diff --git a/app-metrics/collectd/Manifest b/app-metrics/collectd/Manifest
index 9fb11846c23..36255f3caad 100644
--- a/app-metrics/collectd/Manifest
+++ b/app-metrics/collectd/Manifest
@@ -1,2 +1 @@
-DIST collectd-5.7.2.tar.bz2 1798777 BLAKE2B 
4af359a773457bb9c05b6a301d7728eea7598c200f7ca534875b07d1d011b280ab138f680d9607723f14523dd71dcbec3a41e0d8d183848c8ef809cef86c2b8f
 SHA512 
8844b67159f8da2203b5ac57ef19fce0a01050a016174d196b48b5fb24925ad2935af9bdd9af06097ff663499abc496cdcc2d9e9a10f403f8d707c465c1a88f3
 DIST collectd-5.8.0.tar.bz2 1686017 BLAKE2B 
26d995cdb9c25869bf96a056e6ba879de9f009fd4bbf1364a7dedba93b822e57c4b606ca8c84da68cc29db8e77333047695e85d7eb101080de9cee783240f5ea
 SHA512 
1b3d0cc44e2ca54e13eebf292074f1efa8b33d6800d04405e0eaaa2dd1cb2416c6eae580729fb5aead23a5039f41ffe8a9989a907a8c18be8f867f1099fc0008

diff --git a/app-metrics/collectd/collectd-5.7.2-r3.ebuild 
b/app-metrics/collectd/collectd-5.7.2-r3.ebuild
deleted file mode 100644
index 32854c2b44a..000
--- a/app-metrics/collectd/collectd-5.7.2-r3.ebuild
+++ /dev/null
@@ -1,548 +0,0 @@
-# Copyright 1999-2018 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 tmpfiles 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="alpha 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