Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Feb 2008 04:42:41 -0600 (CST)
From:      Justin Head <ports@encarnate.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        Justin Head <ports@encarnate.com>, Matt Peterson <matt@peterson.org>
Subject:   ports/121048: [patch]; net-mgmt/collectd Update to 4.3.0
Message-ID:  <200802241042.m1OAgfni015749@ego.bmi.encarnate.net>
Resent-Message-ID: <200802241110.m1OBA2lT014614@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         121048
>Category:       ports
>Synopsis:       [patch]; net-mgmt/collectd Update to 4.3.0
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 24 11:10:02 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Justin Head <ports@encarnate.com>
>Release:        FreeBSD 7.0-PRERELEASE i386
>Organization:
Encarnate
>Environment:
System: FreeBSD xxx.encarnate.net 7.0-PRERELEASE FreeBSD 7.0-PRERELEASE #0: Sun Jan 13 22:57:24 CST 2008 root@xxx.encarnate.net:/usr/obj/usr/src/sys/XXX i386


>Description:
	Update net-mgmt/collectd to v4.3.0

	New files:
	files/collectd.sh.in
	files/patch-src_tcpconns.c
  
>How-To-Repeat:
	N/A.

>Fix:
	Diff of changes.

--- patch.net-mgmt.collectd begins here ---
diff -ruN collectd.orig/Makefile collectd/Makefile
--- collectd.orig/Makefile	2007-10-08 13:28:19.000000000 -0500
+++ collectd/Makefile	2008-02-24 03:33:27.000000000 -0600
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	collectd
-PORTVERSION=	4.1.2
+PORTVERSION=	4.3.0
 CATEGORIES=	net-mgmt
 MASTER_SITES=	http://collectd.org/files/ \
 		http://matt.peterson.org/FreeBSD/ports/
@@ -14,8 +14,11 @@
 MAINTAINER=	matt@peterson.org
 COMMENT=	Systems & network statistics collection daemon
 
-USE_GMAKE=	yes
 GNU_CONFIGURE=	yes
+USE_GMAKE=	yes
+USE_GNOME=	yes
+USE_RC_SUBR=	collectd.sh
+SUB_LIST=	NAME=collectd
 
 OPTIONS=	APACHE "Apache mod_status statistics (libcurl)" Off \
 		APCUPS "APC UPS support" Off \
@@ -28,27 +31,15 @@
 		SNMP "SNMP support" On \
 		XMMS "XMMS statistics" Off
 
-MAN1=		collectd.1 collectd-nagios.1
+MAN1=		collectd.1 collectd-nagios.1 collectdmon.1
 MAN5=		collectd.conf.5 collectd-email.5 collectd-exec.5 \
-		collectd-snmp.5 collectd-unixsock.5 collectd-perl.5
+		collectd-snmp.5 collectd-unixsock.5 collectd-perl.5 \
+		types.db.5
 
 CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
 		LDFLAGS="-L${LOCALBASE}/lib"
 
-.if defined(WITH_XMMS) || defined(WITH_INTERFACE)
-USE_GNOME=	pkgconfig
-. if defined(WITH_XMMS)
-USE_GNOME+=	glib
-. endif
-.endif
-
-.include <bsd.port.pre.mk>
-
-.if ( ${OSVERSION} < 601103 )
-BROKEN=	Need bind9 import post 6.1
-.endif
-
-CONFIGURE_ARGS=	--disable-apple_sensors \
+CONFIGURE_ARGS= --disable-apple_sensors \
 		--disable-battery \
 		--disable-hddtemp \
 		--disable-multimeter \
@@ -57,7 +48,21 @@
 		--disable-sensors \
 		--disable-serial \
 		--disable-vserver \
-		--disable-wireless
+		--disable-wireless \
+		--localstatedir=/var
+
+.include <bsd.port.pre.mk>
+
+.if (${OSVERSION} < 601103)
+BROKEN=	Need bind9 import post 6.1
+.endif
+
+.if defined(WITH_XMMS) || defined(WITH_INTERFACE)
+USE_GNOME=		pkgconfig
+. if defined(WITH_XMMS)
+USE_GNOME+=		glib
+. endif
+.endif
 
 .if defined(WITH_DEBUG)
 CONFIGURE_ARGS+=	--enable-debug
@@ -148,4 +153,14 @@
 PLIST_SUB+=		XMMS="@comment "
 .endif
 
+post-patch:
+	@${REINPLACE_CMD} 's|collectd.conf.pkg-orig|collectd.conf.sample|' \
+		${WRKSRC}/src/Makefile.in
+
+	@${REINPLACE_CMD} 's|@prefix@/var|/var|g' \
+		${WRKSRC}/src/collectd.conf.in
+
+post-install:
+	${CP} -p ${WRKSRC}/src/collectd.conf ${PREFIX}/etc/collectd.conf.sample
+
 .include <bsd.port.post.mk>
diff -ruN collectd.orig/distinfo collectd/distinfo
--- collectd.orig/distinfo	2007-10-08 13:28:19.000000000 -0500
+++ collectd/distinfo	2008-02-24 02:30:24.000000000 -0600
@@ -1,3 +1,3 @@
-MD5 (collectd-4.1.2.tar.gz) = 40458dabe8ec5df87323c1862a03cb94
-SHA256 (collectd-4.1.2.tar.gz) = fba4423378a8a270de8b48f98dc2f102f4f3c630381672267344776885a6e690
-SIZE (collectd-4.1.2.tar.gz) = 999229
+MD5 (collectd-4.3.0.tar.gz) = 3a15b8c791eb347d060855f926d5265c
+SHA256 (collectd-4.3.0.tar.gz) = 04821ebc7ad6bc902e177f7a740a0c411f6bebfcdccc32120a5b6d9c7f619cf6
+SIZE (collectd-4.3.0.tar.gz) = 1110891
diff -ruN collectd.orig/files/collectd.sh.in collectd/files/collectd.sh.in
--- collectd.orig/files/collectd.sh.in	1969-12-31 18:00:00.000000000 -0600
+++ collectd/files/collectd.sh.in	2008-02-24 02:33:46.000000000 -0600
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+# PROVIDE: %%NAME%%
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+
+# Add the following line to /etc/rc.conf to enable `%%NAME%%':
+#
+#%%NAME%%_enable="YES"
+#
+# See %%NAME%%(1) for %%NAME%%_flags
+#
+
+. "%%RC_SUBR%%"
+
+name="%%NAME%%"
+rcvar=`set_rcvar`
+
+command="%%PREFIX%%/sbin/collectdmon"
+pidfile="/var/run/${name}mon.pid"
+required_files="%%PREFIX%%/etc/$name.conf"
+
+# read configuration and set defaults
+load_rc_config "$name"
+: ${%%NAME%%_enable="NO"}
+: ${%%NAME%%_flags=""}
+
+run_rc_command "$1"
diff -ruN collectd.orig/files/patch-src_tcpconns.c collectd/files/patch-src_tcpconns.c
--- collectd.orig/files/patch-src_tcpconns.c	1969-12-31 18:00:00.000000000 -0600
+++ collectd/files/patch-src_tcpconns.c	2008-02-17 04:22:06.000000000 -0600
@@ -0,0 +1,11 @@
+--- src/tcpconns.c.orig	2008-01-21 04:00:58.000000000 -0600
++++ src/tcpconns.c	2008-02-17 04:21:24.000000000 -0600
+@@ -31,6 +31,8 @@
+ /* #endif KERNEL_LINUX */
+ 
+ #elif HAVE_SYSCTLBYNAME
++# include <sys/types.h>
++# include <sys/socket.h>
+ # include <sys/socketvar.h>
+ # include <sys/sysctl.h>
+ # include <net/route.h>
diff -ruN collectd.orig/pkg-plist collectd/pkg-plist
--- collectd.orig/pkg-plist	2007-10-08 13:28:19.000000000 -0500
+++ collectd/pkg-plist	2008-02-24 03:32:06.000000000 -0600
@@ -1,5 +1,7 @@
 bin/collectd-nagios
-etc/collectd.conf
+@unexec if cmp -s %D/etc/collectd.conf.sample %D/etc/collectd.conf; then rm -f %D/etc/collectd.conf; fi
+etc/collectd.conf.sample
+@exec if [ ! -f %D/etc/collectd.conf ]; then cp -p %D/%F %B/collectd.conf; fi
 %%APACHE%%lib/collectd/apache.la
 %%APACHE%%lib/collectd/apache.so
 %%APCUPS%%lib/collectd/apcups.la
@@ -24,6 +26,8 @@
 lib/collectd/logfile.so
 %%MBMON%%lib/collectd/mbmon.la
 %%MBMON%%lib/collectd/mbmon.so
+lib/collectd/memcached.la
+lib/collectd/memcached.so
 lib/collectd/memory.la
 lib/collectd/memory.so
 %%MYSQL%%lib/collectd/mysql.la
@@ -42,11 +46,22 @@
 lib/collectd/swap.so
 lib/collectd/syslog.la
 lib/collectd/syslog.so
+lib/collectd/tcpconns.la
+lib/collectd/tcpconns.so
 lib/collectd/types.db
 lib/collectd/unixsock.la
 lib/collectd/unixsock.so
+lib/collectd/uuid.la
+lib/collectd/uuid.so
 %%XMMS%%lib/collectd/xmms.la
 %%XMMS%%lib/collectd/xmms.so
-@dirrm lib/collectd
+/lib/perl5/%%PERL_VERSION%%/%%PERL_ARCH%%/perllocal.pod
+/lib/perl5/%%PERL_VERSION%%/man/man3/Collectd::Unixsock.3
+%%SITE_PERL%%/Collectd.pm
+%%SITE_PERL%%/Collectd/Unixsock.pm
+%%SITE_PERL%%/%%PERL_ARCH%%/auto/Collectd/.packlist
 sbin/collectd
+@dirrm lib/collectd
 @dirrmtry var/lib/collectd
+@dirrm %%SITE_PERL%%/Collectd
+@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Collectd
--- patch.net-mgmt.collectd ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802241042.m1OAgfni015749>