From owner-svn-ports-all@FreeBSD.ORG Sun Oct 5 23:25:48 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2ADBD8D1; Sun, 5 Oct 2014 23:25:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 17C89A91; Sun, 5 Oct 2014 23:25:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s95NPloR080280; Sun, 5 Oct 2014 23:25:47 GMT (envelope-from marino@FreeBSD.org) Received: (from marino@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s95NPlpU080274; Sun, 5 Oct 2014 23:25:47 GMT (envelope-from marino@FreeBSD.org) Message-Id: <201410052325.s95NPlpU080274@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marino set sender to marino@FreeBSD.org using -f From: John Marino Date: Sun, 5 Oct 2014 23:25:47 +0000 (UTC) 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 X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Oct 2014 23:25:48 -0000 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%%