diff options
author | Andreas K. Hüttel <dilfridge@gentoo.org> | 2012-05-07 00:41:37 +0000 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2012-05-07 00:41:37 +0000 |
commit | aba1ca26b5caebf6248c379b95d693f41a7dbc16 (patch) | |
tree | 9ff4eabdd4f5125c010279877fcf932a54f42ecd /app-admin/collectd | |
parent | Version bump; remove old (diff) | |
download | gentoo-2-aba1ca26b5caebf6248c379b95d693f41a7dbc16.tar.gz gentoo-2-aba1ca26b5caebf6248c379b95d693f41a7dbc16.tar.bz2 gentoo-2-aba1ca26b5caebf6248c379b95d693f41a7dbc16.zip |
Fix compilation with newest iproute2 / libnetlink, bug 413993
(Portage version: 2.2.0_alpha101/cvs/Linux x86_64)
Diffstat (limited to 'app-admin/collectd')
-rw-r--r-- | app-admin/collectd/ChangeLog | 12 | ||||
-rw-r--r-- | app-admin/collectd/collectd-5.1.0-r1.ebuild (renamed from app-admin/collectd/collectd-5.0.2-r1.ebuild) | 24 | ||||
-rw-r--r-- | app-admin/collectd/collectd-5.1.0.ebuild | 4 | ||||
-rw-r--r-- | app-admin/collectd/files/collectd-5.0.0-varnish.patch | 64 | ||||
-rw-r--r-- | app-admin/collectd/files/collectd-5.0.0-yajl2-2.patch | 19 | ||||
-rw-r--r-- | app-admin/collectd/files/collectd-5.0.0-yajl2.patch | 125 | ||||
-rw-r--r-- | app-admin/collectd/files/collectd-5.0.1-varnish.patch | 159 | ||||
-rw-r--r-- | app-admin/collectd/files/collectd-5.0.2-irq.patch | 76 | ||||
-rw-r--r-- | app-admin/collectd/files/collectd-5.0.2-message.patch | 11 | ||||
-rw-r--r-- | app-admin/collectd/files/collectd-5.1.0-netlink.patch | 22 |
10 files changed, 46 insertions, 470 deletions
diff --git a/app-admin/collectd/ChangeLog b/app-admin/collectd/ChangeLog index 2cc74ea493eb..430b194bdd44 100644 --- a/app-admin/collectd/ChangeLog +++ b/app-admin/collectd/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for app-admin/collectd # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/collectd/ChangeLog,v 1.36 2012/05/03 18:02:21 jdhore Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/collectd/ChangeLog,v 1.37 2012/05/07 00:41:36 dilfridge Exp $ + +*collectd-5.1.0-r1 (07 May 2012) + + 07 May 2012; Andreas K. Huettel <dilfridge@gentoo.org> + -files/collectd-5.0.0-varnish.patch, -files/collectd-5.0.0-yajl2-2.patch, + -files/collectd-5.0.0-yajl2.patch, -files/collectd-5.0.1-varnish.patch, + -collectd-5.0.2-r1.ebuild, -files/collectd-5.0.2-irq.patch, + -files/collectd-5.0.2-message.patch, collectd-5.1.0.ebuild, + +collectd-5.1.0-r1.ebuild, +files/collectd-5.1.0-netlink.patch: + Fix compilation with newest iproute2 / libnetlink, bug 413993 03 May 2012; Jeff Horelick <jdhore@gentoo.org> collectd-5.0.2-r1.ebuild, collectd-5.1.0.ebuild: diff --git a/app-admin/collectd/collectd-5.0.2-r1.ebuild b/app-admin/collectd/collectd-5.1.0-r1.ebuild index 06028e6d12ec..fbba217bb10a 100644 --- a/app-admin/collectd/collectd-5.0.2-r1.ebuild +++ b/app-admin/collectd/collectd-5.1.0-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/collectd/collectd-5.0.2-r1.ebuild,v 1.3 2012/05/03 18:02:20 jdhore Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/collectd/collectd-5.1.0-r1.ebuild,v 1.1 2012/05/07 00:41:36 dilfridge Exp $ EAPI=4 @@ -25,15 +25,15 @@ COLLECTD_UNTESTED_PLUGINS="ipvs apple_sensors tape zfs_arc modbus amqp genericjm # Plugins that have been (compile) tested and can be enabled via COLLECTD_PLUGINS COLLECTD_TESTED_PLUGINS="apache apcups ascent battery bind conntrack contextswitch - cpu cpufreq curl curl_json curl_xml dbi df disk dns email entropy exec filecount fscache gmond - hddtemp interface ipmi iptables irq java libvirt load madwifi mbmon memcachec - memcached memory multimeter mysql netlink network nfs nginx ntpd nut olsrd + cpu cpufreq curl curl_json curl_xml dbi df disk dns email entropy ethstat exec filecount fscache gmond + hddtemp interface ipmi iptables irq java libvirt load madwifi mbmon md memcachec + memcached memory multimeter mysql netlink network nfs nginx ntpd numa nut olsrd onewire openvpn perl ping postgresql powerdns processes protocols python rrdcached sensors serial snmp swap table tail tcpconns teamspeak2 ted thermal tokyotyrant uptime users varnish vmem vserver wireless csv exec logfile network notify_desktop notify_email oracle perl python routeros rrdcached rrdtool syslog unixsock - write_http match_empty_counter match_hashed match_regex match_timediff match_value - target_notification target_replace target_scale target_set uuid" + write_graphite write_http write_mongodb match_empty_counter match_hashed match_regex match_timediff + match_value target_notification target_replace target_scale target_set uuid" COLLECTD_DISABLED_PLUGINS="${COLLECTD_IMPOSSIBLE_PLUGINS} ${COLLECTD_UNTESTED_PLUGINS}" @@ -65,7 +65,7 @@ COMMON_DEPEND=" collectd_plugins_libvirt? ( app-emulation/libvirt dev-libs/libxml2 ) collectd_plugins_memcachec? ( dev-libs/libmemcached ) collectd_plugins_mysql? ( >=virtual/mysql-5.0 ) - collectd_plugins_netlink? ( >=sys-apps/iproute2-2.6.34 ) + collectd_plugins_netlink? ( >=sys-apps/iproute2-3.3.0 ) collectd_plugins_nginx? ( net-misc/curl ) collectd_plugins_notify_desktop? ( x11-libs/libnotify ) collectd_plugins_notify_email? ( >=net-libs/libesmtp-1.0.4 dev-libs/openssl ) @@ -104,12 +104,10 @@ RDEPEND="${COMMON_DEPEND} collectd_plugins_syslog? ( virtual/logger )" PATCHES=( - "${FILESDIR}/${PN}-4.10.1"-{libperl,libiptc,noowniptc}.patch + "${FILESDIR}/${PN}-4.10.1"-libperl.patch "${FILESDIR}/${PN}-4.10.2"-{libocci,nohal}.patch "${FILESDIR}/${PN}-4.10.3"-{lt,werror}.patch - "${FILESDIR}/${PN}-5.0.1"-varnish.patch - "${FILESDIR}/${PN}-5.0.2"-irq.patch - "${FILESDIR}/${PN}-5.0.2"-message.patch + "${FILESDIR}/${PN}-5.1.0"-netlink.patch ) # @FUNCTION: collectd_plugin_kernel_linux @@ -211,8 +209,8 @@ 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 interface iptables ipvs irq load - memory netlink nfs processes serial swap tcpconns thermal users vmem vserver + 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" diff --git a/app-admin/collectd/collectd-5.1.0.ebuild b/app-admin/collectd/collectd-5.1.0.ebuild index 5e2563d2f891..7fac44fe3923 100644 --- a/app-admin/collectd/collectd-5.1.0.ebuild +++ b/app-admin/collectd/collectd-5.1.0.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/collectd/collectd-5.1.0.ebuild,v 1.2 2012/05/03 18:02:20 jdhore Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/collectd/collectd-5.1.0.ebuild,v 1.3 2012/05/07 00:41:36 dilfridge Exp $ EAPI=4 @@ -65,7 +65,7 @@ COMMON_DEPEND=" collectd_plugins_libvirt? ( app-emulation/libvirt dev-libs/libxml2 ) collectd_plugins_memcachec? ( dev-libs/libmemcached ) collectd_plugins_mysql? ( >=virtual/mysql-5.0 ) - collectd_plugins_netlink? ( >=sys-apps/iproute2-2.6.34 ) + collectd_plugins_netlink? ( >=sys-apps/iproute2-2.6.34 <sys-apps/iproute2-3.3.0 ) collectd_plugins_nginx? ( net-misc/curl ) collectd_plugins_notify_desktop? ( x11-libs/libnotify ) collectd_plugins_notify_email? ( >=net-libs/libesmtp-1.0.4 dev-libs/openssl ) diff --git a/app-admin/collectd/files/collectd-5.0.0-varnish.patch b/app-admin/collectd/files/collectd-5.0.0-varnish.patch deleted file mode 100644 index 43870d5cc750..000000000000 --- a/app-admin/collectd/files/collectd-5.0.0-varnish.patch +++ /dev/null @@ -1,64 +0,0 @@ -diff --git a/src/varnish.c b/src/varnish.c -index 859df21..37fd4bb 100644 ---- a/src/varnish.c -+++ b/src/varnish.c -@@ -307,9 +307,9 @@ static void varnish_monitor (const user_config_t *conf, struct varnish_stats *VS - /* outstanding allocations */ - varnish_submit_gauge (conf->instance, "sm", "requests", "outstanding", VSL_stats->sm_nobj); - /* bytes allocated */ -- varnish_submit_gauge (conf->instance, "sm", "total_bytes", "allocated", VSL_stats->sm_balloc); -+ varnish_submit_derive (conf->instance, "sm", "total_bytes", "allocated", VSL_stats->sm_balloc); - /* bytes free */ -- varnish_submit_gauge (conf->instance, "sm", "total_bytes", "free", VSL_stats->sm_bfree); -+ varnish_submit_derive (conf->instance, "sm", "total_bytes", "free", VSL_stats->sm_bfree); - } - - if (conf->collect_sma) -@@ -321,9 +321,9 @@ static void varnish_monitor (const user_config_t *conf, struct varnish_stats *VS - /* SMA outstanding bytes */ - varnish_submit_gauge (conf->instance, "sma", "bytes", "outstanding", VSL_stats->sma_nbytes); - /* SMA bytes allocated */ -- varnish_submit_gauge (conf->instance, "sma", "total_bytes", "allocated", VSL_stats->sma_balloc); -+ varnish_submit_derive (conf->instance, "sma", "total_bytes", "allocated", VSL_stats->sma_balloc); - /* SMA bytes free */ -- varnish_submit_gauge (conf->instance, "sma", "total_bytes", "free" , VSL_stats->sma_bfree); -+ varnish_submit_derive (conf->instance, "sma", "total_bytes", "free" , VSL_stats->sma_bfree); - } - - if (conf->collect_sms) -@@ -335,9 +335,9 @@ static void varnish_monitor (const user_config_t *conf, struct varnish_stats *VS - /* SMS outstanding bytes */ - varnish_submit_gauge (conf->instance, "sms", "bytes", "outstanding", VSL_stats->sms_nbytes); - /* SMS bytes allocated */ -- varnish_submit_gauge (conf->instance, "sms", "total_bytes", "allocated", VSL_stats->sms_balloc); -+ varnish_submit_derive (conf->instance, "sms", "total_bytes", "allocated", VSL_stats->sms_balloc); - /* SMS bytes freed */ -- varnish_submit_gauge (conf->instance, "sms", "total_bytes", "free", VSL_stats->sms_bfree); -+ varnish_submit_derive (conf->instance, "sms", "total_bytes", "free", VSL_stats->sms_bfree); - } - - if (conf->collect_totals) -@@ -363,17 +363,17 @@ static void varnish_monitor (const user_config_t *conf, struct varnish_stats *VS - /* worker threads */ - varnish_submit_gauge (conf->instance, "workers", "threads", "worker", VSL_stats->n_wrk); - /* worker threads created */ -- varnish_submit_gauge (conf->instance, "workers", "total_threads", "created", VSL_stats->n_wrk_create); -+ varnish_submit_derive (conf->instance, "workers", "total_threads", "created", VSL_stats->n_wrk_create); - /* worker threads not created */ -- varnish_submit_gauge (conf->instance, "workers", "total_threads", "failed", VSL_stats->n_wrk_failed); -+ varnish_submit_derive (conf->instance, "workers", "total_threads", "failed", VSL_stats->n_wrk_failed); - /* worker threads limited */ -- varnish_submit_gauge (conf->instance, "workers", "total_threads", "limited", VSL_stats->n_wrk_max); -+ varnish_submit_derive (conf->instance, "workers", "total_threads", "limited", VSL_stats->n_wrk_max); - /* queued work requests */ -- varnish_submit_gauge (conf->instance, "workers", "total_requests", "queued", VSL_stats->n_wrk_queue); -+ varnish_submit_derive (conf->instance, "workers", "total_requests", "queued", VSL_stats->n_wrk_queue); - /* overflowed work requests */ -- varnish_submit_gauge (conf->instance, "workers", "total_requests", "overflowed", VSL_stats->n_wrk_overflow); -+ varnish_submit_derive (conf->instance, "workers", "total_requests", "overflowed", VSL_stats->n_wrk_overflow); - /* dropped work requests */ -- varnish_submit_gauge (conf->instance, "workers", "total_requests", "dropped", VSL_stats->n_wrk_drop); -+ varnish_submit_derive (conf->instance, "workers", "total_requests", "dropped", VSL_stats->n_wrk_drop); - } - } /* }}} void varnish_monitor */ - diff --git a/app-admin/collectd/files/collectd-5.0.0-yajl2-2.patch b/app-admin/collectd/files/collectd-5.0.0-yajl2-2.patch deleted file mode 100644 index 30e6c0ddc272..000000000000 --- a/app-admin/collectd/files/collectd-5.0.0-yajl2-2.patch +++ /dev/null @@ -1,19 +0,0 @@ -X-Git-Url: https://collectd.org/gerrit/gitweb?p=collectd.git;a=blobdiff_plain;f=src%2Fcurl_json.c;h=857e276bb585e16a9f872d4863f43e86c20d1e2d;hp=988ed58df3442459d23ef25b20894df6f82ae21e;hb=0471475841a912322c50200c5fb7a45b790ad576;hpb=4b962d32365228d8984759d36269904527927cf3 - -diff --git a/src/curl_json.c b/src/curl_json.c -index 988ed58..857e276 100644 ---- a/src/curl_json.c -+++ b/src/curl_json.c -@@ -763,7 +763,11 @@ static int cj_curl_perform (cj_t *db, CURL *curl) /* {{{ */ - return (-1); - } - -- status = yajl_parse_complete (db->yajl); -+#if HAVE_YAJL_V2 -+ status = yajl_complete_parse(db->yajl); -+#else -+ status = yajl_parse_complete(db->yajl); -+#endif - if (status != yajl_status_ok) - { - unsigned char *errmsg; diff --git a/app-admin/collectd/files/collectd-5.0.0-yajl2.patch b/app-admin/collectd/files/collectd-5.0.0-yajl2.patch deleted file mode 100644 index 3d2f77332909..000000000000 --- a/app-admin/collectd/files/collectd-5.0.0-yajl2.patch +++ /dev/null @@ -1,125 +0,0 @@ -diff -ruN collectd-5.0.0.orig/configure.in collectd-5.0.0/configure.in ---- collectd-5.0.0.orig/configure.in 2011-03-27 18:35:08.000000000 +0200 -+++ collectd-5.0.0/configure.in 2011-07-18 11:56:01.053544558 +0200 -@@ -3863,6 +3863,7 @@ - CPPFLAGS="$CPPFLAGS $with_libyajl_cppflags" - - AC_CHECK_HEADERS(yajl/yajl_parse.h, [with_libyajl="yes"], [with_libyajl="no (yajl/yajl_parse.h not found)"]) -+ AC_CHECK_HEADERS(yajl/yajl_version.h) - - CPPFLAGS="$SAVE_CPPFLAGS" - fi -diff -ruN collectd-5.0.0.orig/src/curl_json.c collectd-5.0.0/src/curl_json.c ---- collectd-5.0.0.orig/src/curl_json.c 2011-03-27 18:35:08.000000000 +0200 -+++ collectd-5.0.0/src/curl_json.c 2011-07-18 12:03:00.741544705 +0200 -@@ -1,7 +1,7 @@ - /** - * collectd - src/curl_json.c - * Copyright (C) 2009 Doug MacEachern -- * Copyright (C) 2006-2010 Florian octo Forster -+ * Copyright (C) 2006-2011 Florian octo Forster - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the -@@ -18,7 +18,7 @@ - * - * Authors: - * Doug MacEachern <dougm at hyperic.com> -- * Florian octo Forster <octo at verplant.org> -+ * Florian octo Forster <octo at collectd.org> - **/ - - #include "collectd.h" -@@ -29,6 +29,13 @@ - - #include <curl/curl.h> - #include <yajl/yajl_parse.h> -+#if HAVE_YAJL_YAJL_VERSION_H -+# include <yajl/yajl_version.h> -+#endif -+ -+#if defined(YAJL_MAJOR) && (YAJL_MAJOR > 1) -+# define HAVE_YAJL_V2 1 -+#endif - - #define CJ_DEFAULT_HOST "localhost" - #define CJ_KEY_MAGIC 0x43484b59UL /* CHKY */ -@@ -77,6 +84,12 @@ - }; - typedef struct cj_s cj_t; /* }}} */ - -+#if HAVE_YAJL_V2 -+typedef size_t yajl_len_t; -+#else -+typedef unsigned int yajl_len_t; -+#endif -+ - static int cj_read (user_data_t *ud); - static int cj_curl_perform (cj_t *db, CURL *curl); - static void cj_submit (cj_t *db, cj_key_t *key, value_t *value); -@@ -98,8 +111,21 @@ - return (0); - - status = yajl_parse(db->yajl, (unsigned char *)buf, len); -- if ((status != yajl_status_ok) -- && (status != yajl_status_insufficient_data)) -+ if (status == yajl_status_ok) -+ { -+#if HAVE_YAJL_V2 -+ status = yajl_complete_parse(db->yajl); -+#else -+ status = yajl_parse_complete(db->yajl); -+#endif -+ return (len); -+ } -+#if !HAVE_YAJL_V2 -+ else if (status == yajl_status_insufficient_data) -+ return (len); -+#endif -+ -+ if (status != yajl_status_ok) - { - unsigned char *msg = - yajl_get_error(db->yajl, /* verbose = */ 1, -@@ -130,7 +156,7 @@ - /* "number" may not be null terminated, so copy it into a buffer before - * parsing. */ - static int cj_cb_number (void *ctx, -- const char *number, unsigned int number_len) -+ const char *number, yajl_len_t number_len) - { - char buffer[number_len + 1]; - -@@ -159,7 +185,7 @@ - } /* int cj_cb_number */ - - static int cj_cb_map_key (void *ctx, const unsigned char *val, -- unsigned int len) -+ yajl_len_t len) - { - cj_t *db = (cj_t *)ctx; - c_avl_tree_t *tree; -@@ -187,7 +213,7 @@ - } - - static int cj_cb_string (void *ctx, const unsigned char *val, -- unsigned int len) -+ yajl_len_t len) - { - cj_t *db = (cj_t *)ctx; - char str[len + 1]; -@@ -697,7 +723,13 @@ - char *url; - yajl_handle yprev = db->yajl; - -- db->yajl = yajl_alloc (&ycallbacks, NULL, NULL, (void *)db); -+ db->yajl = yajl_alloc (&ycallbacks, -+#if HAVE_YAJL_V2 -+ /* alloc funcs = */ NULL, -+#else -+ /* alloc funcs = */ NULL, NULL, -+#endif -+ /* context = */ (void *)db); - if (db->yajl == NULL) - { - ERROR ("curl_json plugin: yajl_alloc failed."); diff --git a/app-admin/collectd/files/collectd-5.0.1-varnish.patch b/app-admin/collectd/files/collectd-5.0.1-varnish.patch deleted file mode 100644 index 2f1a4e996d65..000000000000 --- a/app-admin/collectd/files/collectd-5.0.1-varnish.patch +++ /dev/null @@ -1,159 +0,0 @@ ---- a/external/collectd/5.0.0-r2-gen2/configure.in -+++ a/external/collectd/5.0.0-r2-gen2/configure.in -@@ -3959,9 +3959,17 @@ then - CPPFLAGS="$CPPFLAGS $with_libvarnish_cflags" - #LDFLAGS="$LDFLAGS $with_libvarnish_libs" - -- AC_CHECK_LIB(varnishapi, VSL_OpenStats, -+### Varnish 2 ### -+# AC_CHECK_LIB(varnishapi, VSL_OpenStats, -+# [with_libvarnish="yes"], -+# [with_libvarnish="no (symbol VSL_OpenStats not found)"], -+# [$with_libvarnish_libs]) -+ -+### Varnish 3 ### -+# Replaced VSL_OpenStats with VSC_Main -+ AC_CHECK_LIB(varnishapi, VSC_Main, - [with_libvarnish="yes"], -- [with_libvarnish="no (symbol VSL_OpenStats not found)"], -+ [with_libvarnish="no (symbol VSC_Main not found)"], - [$with_libvarnish_libs]) - - CPPFLAGS="$SAVE_CPPFLAGS" ---- a/external/collectd/5.0.0-r2-gen2/src/varnish.c -+++ a/external/collectd/5.0.0-r2-gen2/src/varnish.c -@@ -127,12 +127,17 @@ - * esi_errors ESI parse errors (unlock) Y - * }}} - */ -+// enable the Varnish 3 interface. -+#define VARNISH3 - #include "collectd.h" - #include "common.h" - #include "plugin.h" - #include "configfile.h" - - #include <varnish/varnishapi.h> -+#ifdef VARNISH3 -+#include <varnish/vsc.h> -+#endif - - /* {{{ user_config_s */ - struct user_config_s { -@@ -204,7 +209,11 @@ static int varnish_submit_derive (const char *plugin_instance, /* {{{ */ - return (varnish_submit (plugin_instance, category, type, type_instance, value)); - } /* }}} int varnish_submit_derive */ - -+#ifdef VARNISH3 -+static void varnish_monitor (const user_config_t *conf, struct VSC_C_main *VSL_stats) -+#else - static void varnish_monitor (const user_config_t *conf, struct varnish_stats *VSL_stats) /* {{{ */ -+#endif - { - if (conf->collect_cache) - { -@@ -229,7 +238,11 @@ static void varnish_monitor (const user_config_t *conf, struct varnish_stats *VS - if (conf->collect_esi) - { - /* Objects ESI parsed (unlock) */ -+#ifdef VARNISH3 -+ varnish_submit_derive (conf->instance, "esi", "total_operations", "warnings", VSL_stats->esi_warnings); -+#else - varnish_submit_derive (conf->instance, "esi", "total_operations", "parsed", VSL_stats->esi_parse); -+#endif - /* ESI parse errors (unlock) */ - varnish_submit_derive (conf->instance, "esi", "total_operations", "error", VSL_stats->esi_errors); - } -@@ -250,8 +263,13 @@ static void varnish_monitor (const user_config_t *conf, struct varnish_stats *VS - varnish_submit_derive (conf->instance, "backend", "connections", "was-closed" , VSL_stats->backend_toolate); - /* Backend conn. recycles */ - varnish_submit_derive (conf->instance, "backend", "connections", "recycled" , VSL_stats->backend_recycle); -+#ifdef VARNISH3 -+ /* Backend conn. retries */ -+ varnish_submit_derive (conf->instance, "backend", "connections", "retries" , VSL_stats->backend_retry); -+#else - /* Backend conn. unused */ - varnish_submit_derive (conf->instance, "backend", "connections", "unused" , VSL_stats->backend_unused); -+#endif - } - - if (conf->collect_fetch) -@@ -300,6 +318,10 @@ static void varnish_monitor (const user_config_t *conf, struct varnish_stats *VS - varnish_submit_derive (conf->instance, "shm", "total_operations", "cycles" , VSL_stats->shm_cycles); - } - -+#ifdef VARNISH3 -+ /* sm & sma stats seem to have gone away. The SMA stuff looks like it may -+ have been moved into another structure somewhere else. */ -+#else - if (conf->collect_sm) - { - /* allocator requests */ -@@ -325,6 +347,7 @@ static void varnish_monitor (const user_config_t *conf, struct varnish_stats *VS - /* SMA bytes free */ - varnish_submit_derive (conf->instance, "sma", "total_bytes", "free" , VSL_stats->sma_bfree); - } -+#endif - - if (conf->collect_sms) - { -@@ -368,10 +391,17 @@ static void varnish_monitor (const user_config_t *conf, struct varnish_stats *VS - varnish_submit_derive (conf->instance, "workers", "total_threads", "failed", VSL_stats->n_wrk_failed); - /* worker threads limited */ - varnish_submit_derive (conf->instance, "workers", "total_threads", "limited", VSL_stats->n_wrk_max); -+#ifdef VARNISH3 -+ /* work requests queue length */ -+ varnish_submit_derive (conf->instance, "workers", "total_requests", "queue_length",VSL_stats->n_wrk_lqueue); -+ /* queued work requests */ -+ varnish_submit_derive (conf->instance, "workers", "total_requests", "queued", VSL_stats->n_wrk_queued); -+#else - /* queued work requests */ - varnish_submit_derive (conf->instance, "workers", "total_requests", "queued", VSL_stats->n_wrk_queue); - /* overflowed work requests */ - varnish_submit_derive (conf->instance, "workers", "total_requests", "overflowed", VSL_stats->n_wrk_overflow); -+#endif - /* dropped work requests */ - varnish_submit_derive (conf->instance, "workers", "total_requests", "dropped", VSL_stats->n_wrk_drop); - } -@@ -379,7 +409,12 @@ static void varnish_monitor (const user_config_t *conf, struct varnish_stats *VS - - static int varnish_read (user_data_t *ud) /* {{{ */ - { -+#ifdef VARNISH3 -+ struct VSM_data *vd; -+ struct VSC_C_main *VSL_stats; -+#else - struct varnish_stats *VSL_stats; -+#endif - user_config_t *conf; - - if ((ud == NULL) || (ud->data == NULL)) -@@ -387,15 +422,28 @@ static int varnish_read (user_data_t *ud) /* {{{ */ - - conf = ud->data; - -+#ifdef VARNISH3 -+ vd = VSM_New(); -+ VSC_Setup(vd); -+ if(conf->instance) VSM_n_Arg(vd, conf->instance); -+ if(VSC_Open(vd, 1) || (VSL_stats = VSC_Main(vd))==NULL) -+#else - VSL_stats = VSL_OpenStats (conf->instance); - if (VSL_stats == NULL) -+#endif - { -+#ifdef VARNISH3 -+ VSM_Delete(vd); -+#endif - ERROR ("Varnish plugin : unable to load statistics"); - - return (-1); - } - - varnish_monitor (conf, VSL_stats); -+#ifdef VARNISH3 -+ VSM_Delete(vd); -+#endif - - return (0); - } /* }}} */ diff --git a/app-admin/collectd/files/collectd-5.0.2-irq.patch b/app-admin/collectd/files/collectd-5.0.2-irq.patch deleted file mode 100644 index ceee96d6edde..000000000000 --- a/app-admin/collectd/files/collectd-5.0.2-irq.patch +++ /dev/null @@ -1,76 +0,0 @@ -From c72720c41bb2577b1b9db9e12b299869708491c7 Mon Sep 17 00:00:00 2001 -From: Bostjan Skufca <bostjan@a2o.si> -Date: Fri, 3 Feb 2012 03:10:08 +0100 -Subject: [PATCH] Changes in irq plugin: - - fixes errors described here: http://mailman.verplant.org/pipermail/collectd/2011-July/004638.html - - refactored parsing code in order to make it a bit more intuitive - - added a few additional comments - ---- - src/irq.c | 24 +++++++++++++++++++++--- - 1 files changed, 21 insertions(+), 3 deletions(-) - -diff --git a/src/irq.c b/src/irq.c -index 96bf7f0..f3d5730 100644 ---- a/src/irq.c -+++ b/src/irq.c -@@ -94,6 +94,8 @@ static int irq_read (void) - { - FILE *fh; - char buffer[1024]; -+ int cpu_count; -+ char *fields[64]; - - fh = fopen ("/proc/interrupts", "r"); - if (fh == NULL) -@@ -104,20 +106,36 @@ static int irq_read (void) - return (-1); - } - -+ /* Get CPU count from the first line */ -+ if(fgets (buffer, sizeof (buffer), fh) != NULL) { -+ cpu_count = strsplit (buffer, fields, 64); -+ } else { -+ ERROR ("irq plugin: unable to get CPU count from first line of /proc/interrupts"); -+ return (-1); -+ } -+ - while (fgets (buffer, sizeof (buffer), fh) != NULL) - { - char *irq_name; - size_t irq_name_len; - derive_t irq_value; - int i; -- -- char *fields[64]; - int fields_num; -+ int irq_values_to_parse; - - fields_num = strsplit (buffer, fields, 64); - if (fields_num < 2) - continue; - -+ /* Parse this many numeric fields, skip the rest -+ * (+1 because first there is a name of irq in each line) */ -+ if (fields_num >= cpu_count+1) { -+ irq_values_to_parse = cpu_count; -+ } else { -+ irq_values_to_parse = fields_num - 1; -+ } -+ -+ /* First field is irq name */ - irq_name = fields[0]; - irq_name_len = strlen (irq_name); - if (irq_name_len < 2) -@@ -132,7 +150,7 @@ static int irq_read (void) - irq_name_len--; - - irq_value = 0; -- for (i = 1; i < fields_num; i++) -+ for (i = 1; i <= irq_values_to_parse; i++) - { - /* Per-CPU value */ - value_t v; --- -1.7.3.4 - diff --git a/app-admin/collectd/files/collectd-5.0.2-message.patch b/app-admin/collectd/files/collectd-5.0.2-message.patch deleted file mode 100644 index 85b908150286..000000000000 --- a/app-admin/collectd/files/collectd-5.0.2-message.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/memcached.c.orig 2011-03-26 18:04:35.000000000 +0200 -+++ src/memcached.c 2011-10-29 12:21:08.714557170 +0300 -@@ -358,7 +358,7 @@ - - static int memcached_read (void) /* {{{ */ - { -- char buf[1024]; -+ char buf[2048]; - char *fields[3]; - char *ptr; - char *line; diff --git a/app-admin/collectd/files/collectd-5.1.0-netlink.patch b/app-admin/collectd/files/collectd-5.1.0-netlink.patch new file mode 100644 index 000000000000..be25c2fd2a1b --- /dev/null +++ b/app-admin/collectd/files/collectd-5.1.0-netlink.patch @@ -0,0 +1,22 @@ +--- collectd-5.0.2/src/netlink.c~ 2012-01-22 12:10:04.000000000 +0100 ++++ collectd-5.0.2/src/netlink.c 2012-01-23 14:59:51.180465183 +0100 +@@ -570,8 +570,7 @@ + return (-1); + } + +- if (rtnl_dump_filter (&rth, link_filter, /* arg1 = */ NULL, +- NULL, NULL) != 0) ++ if (rtnl_dump_filter (&rth, link_filter, /* arg1 = */ NULL) != 0) + { + ERROR ("netlink plugin: ir_read: rtnl_dump_filter failed."); + return (-1); +@@ -608,8 +607,7 @@ + continue; + } + +- if (rtnl_dump_filter (&rth, qos_filter, (void *) &ifindex, +- NULL, NULL) != 0) ++ if (rtnl_dump_filter (&rth, qos_filter, (void *) &ifindex) != 0) + { + ERROR ("netlink plugin: ir_read: rtnl_dump_filter failed."); + continue; |