Date: Sun, 5 Oct 2014 23:25:47 +0000 (UTC) From: John Marino <marino@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r370134 - in head/net-mgmt/collectd: . files Message-ID: <201410052325.s95NPlpU080274@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marino Date: Sun Oct 5 23:25:46 2014 New Revision: 370134 URL: https://svnweb.freebsd.org/changeset/ports/370134 QAT: https://qat.redports.org/buildarchive/r370134/ Log: net-mgmt/collectd: Fix network IF plugin to avoid log spam While here, remove redundant @dirrm and strip installed libraries. PR: 191388 Reported by: Fredrik Lennmark Fix by: maintainer (Krzysztof Stryjek) Added: head/net-mgmt/collectd/files/patch-src__interface.c (contents, props changed) Modified: head/net-mgmt/collectd/Makefile head/net-mgmt/collectd/pkg-plist Modified: head/net-mgmt/collectd/Makefile ============================================================================== --- head/net-mgmt/collectd/Makefile Sun Oct 5 23:03:54 2014 (r370133) +++ head/net-mgmt/collectd/Makefile Sun Oct 5 23:25:46 2014 (r370134) @@ -3,7 +3,7 @@ PORTNAME= collectd PORTVERSION= 4.10.9 -PORTREVISION= 14 +PORTREVISION= 15 CATEGORIES= net-mgmt MASTER_SITES= http://collectd.org/files/ @@ -16,6 +16,7 @@ LIB_DEPENDS= libltdl.so:${PORTSDIR}/deve GNU_CONFIGURE= yes USES= autoreconf gmake libtool +INSTALL_TARGET= install-strip OPTIONS_DEFINE= CGI BIND DEBUG GCRYPT LIBVIRT OPTIONS_GROUP= INPUT OUTPUT Added: head/net-mgmt/collectd/files/patch-src__interface.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/collectd/files/patch-src__interface.c Sun Oct 5 23:25:46 2014 (r370134) @@ -0,0 +1,36 @@ +--- src/interface.c.orig 2014-01-05 00:36:58.000000000 +0400 ++++ src/interface.c 2014-01-05 00:45:10.000000000 +0400 +@@ -212,20 +212,19 @@ static int interface_read (void) + return (-1); + + for (if_ptr = if_list; if_ptr != NULL; if_ptr = if_ptr->ifa_next) +- { +- if ((if_data = (struct IFA_DATA *) if_ptr->ifa_data) == NULL) +- continue; +- +- if_submit (if_ptr->ifa_name, "if_octets", +- if_data->IFA_RX_BYTES, +- if_data->IFA_TX_BYTES); +- if_submit (if_ptr->ifa_name, "if_packets", +- if_data->IFA_RX_PACKT, +- if_data->IFA_TX_PACKT); +- if_submit (if_ptr->ifa_name, "if_errors", +- if_data->IFA_RX_ERROR, +- if_data->IFA_TX_ERROR); +- } ++ if (if_ptr->ifa_addr != NULL && if_ptr->ifa_addr->sa_family == AF_LINK) { ++ if_data = (struct IFA_DATA *) if_ptr->ifa_data; ++ ++ if_submit (if_ptr->ifa_name, "if_octets", ++ if_data->IFA_RX_BYTES, ++ if_data->IFA_TX_BYTES); ++ if_submit (if_ptr->ifa_name, "if_packets", ++ if_data->IFA_RX_PACKT, ++ if_data->IFA_TX_PACKT); ++ if_submit (if_ptr->ifa_name, "if_errors", ++ if_data->IFA_RX_ERROR, ++ if_data->IFA_TX_ERROR); ++ } + + freeifaddrs (if_list); + /* #endif HAVE_GETIFADDRS */ Modified: head/net-mgmt/collectd/pkg-plist ============================================================================== --- head/net-mgmt/collectd/pkg-plist Sun Oct 5 23:03:54 2014 (r370133) +++ head/net-mgmt/collectd/pkg-plist Sun Oct 5 23:25:46 2014 (r370134) @@ -4,7 +4,6 @@ sbin/collectdmon @sample etc/collectd.conf.sample %%CGI%%%%WWWDIR%%/collection.cgi %%CGI%%@sample %%WWWDIR%%/collection.conf.sample -%%CGI%%@dirrmtry %%WWWDIR%% bin/collectd-nagios lib/libcollectdclient.so lib/libcollectdclient.so.0 @@ -76,6 +75,3 @@ man/man5/collectd.conf.5.gz man/man5/types.db.5.gz %%DATADIR%%/postgresql_default.conf %%DATADIR%%/types.db -@dirrm lib/collectd -@dirrm include/collectd -@dirrm %%DATADIR%%
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410052325.s95NPlpU080274>