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 <[email protected]>
+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 <[email protected]>
+ **/
+ 
+-#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>

Reply via email to