Bug 174903 - [PATCH] net-mgmt/collectd: Allow not selecting INPUT/OUTPUT so RRDTOOL is not required
Summary: [PATCH] net-mgmt/collectd: Allow not selecting INPUT/OUTPUT so RRDTOOL is not...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Steve Wills
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-02 16:40 UTC by Bryan Drewery
Modified: 2013-01-13 22:20 UTC (History)
1 user (show)

See Also:


Attachments
patch-collectd-group.txt (1.55 KB, patch)
2013-01-02 16:40 UTC, Bryan Drewery
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bryan Drewery freebsd_committer freebsd_triage 2013-01-02 16:40:00 UTC
	The conversion to the new options framework ended up requiring that *at least* 1 of INPUT and OUTPUT is selected. This, for example, requires RRDTOOL to be selected, when it may not be wanted on a particular system. The previous port version did not require this.

Fix: The attached patch uses the new GROUP option type to allow selecting *0 or more*. Which allows to deselect all INPUT/OUTPUT, or select multiple.
How-To-Repeat: 	'make config' and deselect all INPUT/OUTPUT options, it will require you to select at least one.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-01-02 16:40:12 UTC
Maintainer of net-mgmt/collectd,

Please note that PR ports/174903 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/174903

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2013-01-02 16:40:13 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 Krzysztof 2013-01-03 08:53:23 UTC
Hello,

On Wed, Jan 02, 2013 at 04:40:12PM +0000, Edwin Groothuis wrote:
> Maintainer of net-mgmt/collectd,
> 
> Please note that PR ports/174903 has just been submitted.
> 
> If it contains a patch for an upgrade, an enhancement or a bug fix
> you agree on, reply to this email stating that you approve the patch
> and a committer will take care of it.
> 
> The full text of the PR can be found at:
>     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/174903
> 
Yes, I approve this patch. Thanks a lot for your help to improve
collectd ports.

Greetings,
-- 
Krzysztof Stryjek
UNIX administrator/Juniper Networks Specialist
email: wtp (at) bsdserwis (dot) com
http://www.linkedin.com/in/KrzysztofStryjek
GPG fingerprint: 8BD7 40CE 8994 0BBE CE6C  91CD 1292 8959 DC61 0E76

In theory, there is no difference between theory and practice.
In practice, there is.
Comment 4 Steve Wills freebsd_committer freebsd_triage 2013-01-13 21:42:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->swills

I'll take it.
Comment 5 dfilter service freebsd_committer freebsd_triage 2013-01-13 22:15:57 UTC
Author: swills
Date: Sun Jan 13 22:15:45 2013
New Revision: 310342
URL: http://svnweb.freebsd.org/changeset/ports/310342

Log:
  - Allow not selecting INPUT/OUTPUT so RRDTOOL is not required
  
  PR:		ports/174903
  Submitted by:	bdrewery
  Approved by:	Krzysztof Stryjek <ports@bsdserwis.com> (maintainer)

Modified:
  head/net-mgmt/collectd/Makefile

Modified: head/net-mgmt/collectd/Makefile
==============================================================================
--- head/net-mgmt/collectd/Makefile	Sun Jan 13 22:14:17 2013	(r310341)
+++ head/net-mgmt/collectd/Makefile	Sun Jan 13 22:15:45 2013	(r310342)
@@ -16,9 +16,9 @@ USE_AUTOTOOLS=	autoconf autoheader autom
 WANT_GNOME=	yes
 
 OPTIONS_DEFINE=		CGI BIND DEBUG GCRYPT VIRT
-OPTIONS_MULTI=		INPUT OUTPUT
-OPTIONS_MULTI_OUTPUT=	RRDTOOL RRDCACHED WRITE_HTTP
-OPTIONS_MULTI_INPUT=	APACHE APCUPS CURL CURL_JSON CURL_XML DBI DISK \
+OPTIONS_GROUP=		INPUT OUTPUT
+OPTIONS_GROUP_OUTPUT=	RRDTOOL RRDCACHED WRITE_HTTP
+OPTIONS_GROUP_INPUT=	APACHE APCUPS CURL CURL_JSON CURL_XML DBI DISK \
 			NUTUPS INTERFACE MBMON MEMCACHED MYSQL NGINX OPENVPN \
 			PDNS PGSQL PING PYTHON ROUTEROS SNMP TOKYOTYRANT XMMS
 OPTIONS_DEFAULT=	BIND INTERFACE PING SNMP RRDTOOL RRDCACHED
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 6 Steve Wills freebsd_committer freebsd_triage 2013-01-13 22:18:18 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!
Comment 7 dfilter service freebsd_committer freebsd_triage 2013-01-13 22:18:21 UTC
Author: swills
Date: Sun Jan 13 22:18:07 2013
New Revision: 310343
URL: http://svnweb.freebsd.org/changeset/ports/310343

Log:
  - Add additional plugins - ipmi, table, notify_email, varnish [1]
  - Allow not selecting INPUT/OUTPUT so RRDTOOL is not required [2]
  
  PR:		ports/174953 [1]
  PR:		ports/174903 [2]
  Submitted by:	Eric Freeman <freebsdports@chillibear.com> [1]
  Submitted by:	bdrewery [2]
  Approved by:	Krzysztof Stryjek <ports@bsdserwis.com> (maintainer)

Modified:
  head/net-mgmt/collectd5/Makefile   (contents, props changed)
  head/net-mgmt/collectd5/files/patch-configure.in   (contents, props changed)
  head/net-mgmt/collectd5/files/patch-src__Makefile.am   (contents, props changed)
  head/net-mgmt/collectd5/pkg-plist   (contents, props changed)

Modified: head/net-mgmt/collectd5/Makefile
==============================================================================
--- head/net-mgmt/collectd5/Makefile	Sun Jan 13 22:15:45 2013	(r310342)
+++ head/net-mgmt/collectd5/Makefile	Sun Jan 13 22:18:07 2013	(r310343)
@@ -17,11 +17,13 @@ WANT_GNOME=	yes
 LATEST_LINK=	collectd5
 
 OPTIONS_DEFINE=		CGI BIND DEBUG GCRYPT VIRT
-OPTIONS_MULTI=		INPUT OUTPUT
-OPTIONS_MULTI_OUTPUT=	RRDTOOL RRDCACHED WRITE_GRAPHITE WRITE_HTTP
-OPTIONS_MULTI_INPUT=	APACHE APCUPS CURL CURL_JSON CURL_XML DBI DISK \
-			GCRYPT NUTUPS INTERFACE MBMON MEMCACHED MYSQL NGINX OPENVPN \
-			PDNS PGSQL PING PYTHON ROUTEROS SNMP TOKYOTYRANT XMMS
+OPTIONS_GROUP=		INPUT OUTPUT
+OPTIONS_GROUP_OUTPUT=	RRDTOOL RRDCACHED WRITE_GRAPHITE WRITE_HTTP NOTIFYEMAIL
+OPTIONS_GROUP_INPUT=	APACHE APCUPS CURL CURL_JSON CURL_XML DBI DISK GCRYPT \
+			NUTUPS INTERFACE IPMI MBMON MEMCACHED MYSQL NGINX \
+			OPENVPN PDNS PGSQL PING PYTHON ROUTEROS SNMP TABLE \
+			TOKYOTYRANT VARNISH XMMS
+
 OPTIONS_DEFAULT=	BIND INTERFACE PING SNMP RRDTOOL RRDCACHED
 
 CGI_DESC=		Install collection.cgi (requires RRDTOOL)
@@ -39,9 +41,11 @@ DBI_DESC=		database abstraction library
 DISK_DESC=		Disk performance statistics
 NUTUPS_DESC=		NUT UPS daemon
 INTERFACE_DESC=		Network interfaces (libstatgrab)
+IPMI_DESC=		IPMI plugin (openipmi)
 MBMON_DESC=		MBMon 
 MEMCACHED_DESC=		Memcached
 MYSQL_DESC=		MySQL
+NOTIFYEMAIL_DESC=	Email notifications (libesmtp)
 NGINX_DESC=		Nginx
 OPENVPN_DESC=		OpenVPN statistics
 PDNS_DESC=		PowerDNS
@@ -50,7 +54,9 @@ PING_DESC=		Network latency (liboping)
 PYTHON_DESC=		Python plugin
 ROUTEROS_DESC=		RouterOS plugin
 SNMP_DESC=		SNMP
+TABLE_DESC=		Table plugin
 TOKYOTYRANT_DESC=	Tokyotyrant database
+VARNISH_DESC=		Varnish plugin
 XMMS_DESC=		XMMS
 # OUTPUT
 RRDTOOL_DESC=		RRDTool
@@ -290,6 +296,26 @@ CONFIGURE_ARGS+=--disable-mysql
 PLIST_SUB+=	MYSQL="@comment "
 .endif
 
+.if ${PORT_OPTIONS:MIPMI}
+USE_PKGCONFIG=	yes
+CONFIGURE_ARGS+=--enable-ipmi
+LIB_DEPENDS+=	OpenIPMI:${PORTSDIR}/sysutils/openipmi
+PLIST_SUB+=	IPMI=""
+.else
+CONFIGURE_ARGS+=--disable-ipmi
+PLIST_SUB+=	IPMI="@comment "
+.endif
+
+.if ${PORT_OPTIONS:MNOTIFYEMAIL}
+LIB_DEPENDS+=	esmtp:${PORTSDIR}/mail/libesmtp
+CONFIGURE_ARGS+=--enable-notify_email
+CONFIGURE_ARGS+=--with-libesmtp=${PREFIX}
+PLIST_SUB+=	NOTIFYEMAIL=""
+.else
+CONFIGURE_ARGS+=--disable-notify_email
+PLIST_SUB+=	NOTIFYEMAIL="@comment "
+.endif
+
 .if ${PORT_OPTIONS:MNGINX}
 RUN_DEPENDS+=	nginx:${PORTSDIR}/www/nginx
 LIB_DEPENDS+=	curl:${PORTSDIR}/ftp/curl
@@ -380,6 +406,14 @@ CONFIGURE_ARGS+=--disable-snmp
 PLIST_SUB+=	SNMP="@comment "
 .endif
 
+.if ${PORT_OPTIONS:MTABLE}
+CONFIGURE_ARGS+=--enable-table
+PLIST_SUB+=	TABLE=""
+.else
+CONFIGURE_ARGS+=--disable-table
+PLIST_SUB+=	TABLE="@comment "
+.endif
+
 .if ${PORT_OPTIONS:MTOKYOTYRANT}
 LIB_DEPENDS+=	tokyotyrant:${PORTSDIR}/databases/tokyotyrant
 CONFIGURE_ARGS+=--enable-tokyotyrant
@@ -390,6 +424,16 @@ CONFIGURE_ARGS+=--disable-tokyotyrant --
 PLIST_SUB+=	TOKYOTYRANT="@comment "
 .endif
 
+.if ${PORT_OPTIONS:MVARNISH}
+LIB_DEPENDS+=	varnishapi:${PORTSDIR}/www/varnish
+CONFIGURE_ARGS+=--enable-varnish
+CONFIGURE_ARGS+=--with-libvarnish=${PREFIX}
+PLIST_SUB+=	VARNISH=""
+.else
+CONFIGURE_ARGS+=--disable-varnish
+PLIST_SUB+=	VARNISH="@comment "
+.endif
+
 .if ${PORT_OPTIONS:MVIRT}
 CONFIGURE_ARGS+=--enable-libvirt
 LIB_DEPENDS+=	virt.1000:${PORTSDIR}/devel/libvirt

Modified: head/net-mgmt/collectd5/files/patch-configure.in
==============================================================================
--- head/net-mgmt/collectd5/files/patch-configure.in	Sun Jan 13 22:15:45 2013	(r310342)
+++ head/net-mgmt/collectd5/files/patch-configure.in	Sun Jan 13 22:18:07 2013	(r310343)
@@ -64,6 +64,17 @@
  
  	AC_CHECK_FUNC(PyObject_CallFunction,
  		      [with_python="yes"],
+--- configure.in.orig	2013-01-03 17:07:22.000000000 +0000
++++ configure.in	2013-01-03 17:07:58.000000000 +0000
+@@ -4057,7 +4057,7 @@
+ 	then
+ 		AC_MSG_NOTICE([Not checking for libvarnish: Manually configured])
+ 		with_libvarnish_cflags="-I$withval/include"
+-		with_libvarnish_libs="-L$withval/lib -lvarnish -lvarnishcompat -lvarnishapi"
++		with_libvarnish_libs="-L$withval/lib/varnish -lvarnish -lvarnishcompat -lvarnishapi"
+ 		with_libvarnish="yes"
+ 	fi; fi; fi
+ ],
 @@ -4580,6 +4583,12 @@
  	plugin_zfs_arc="yes"
  fi

Modified: head/net-mgmt/collectd5/files/patch-src__Makefile.am
==============================================================================
--- head/net-mgmt/collectd5/files/patch-src__Makefile.am	Sun Jan 13 22:15:45 2013	(r310342)
+++ head/net-mgmt/collectd5/files/patch-src__Makefile.am	Sun Jan 13 22:18:07 2013	(r310343)
@@ -45,6 +45,15 @@
  endif
  if BUILD_WITH_LIBDEVINFO
  memory_la_LIBADD += -ldevinfo
+@@ -763,7 +763,7 @@
+ pkglib_LTLIBRARIES += notify_email.la
+ notify_email_la_SOURCES = notify_email.c
+ notify_email_la_LDFLAGS = -module -avoid-version
+-notify_email_la_LIBADD = -lesmtp -lssl -lcrypto -lpthread -ldl
++notify_email_la_LIBADD = -lesmtp -lssl -lcrypto -lpthread
+ collectd_LDADD += "-dlopen" notify_email.la
+ collectd_DEPENDENCIES += notify_email.la
+ endif
 @@ -1021,7 +1021,7 @@
  collectd_LDADD += "-dlopen" swap.la
  collectd_DEPENDENCIES += swap.la

Modified: head/net-mgmt/collectd5/pkg-plist
==============================================================================
--- head/net-mgmt/collectd5/pkg-plist	Sun Jan 13 22:15:45 2013	(r310342)
+++ head/net-mgmt/collectd5/pkg-plist	Sun Jan 13 22:18:07 2013	(r310343)
@@ -45,6 +45,8 @@ lib/collectd/filecount.la
 lib/collectd/filecount.so
 %%INTERFACE%%lib/collectd/interface.la
 %%INTERFACE%%lib/collectd/interface.so
+%%IPMI%%lib/collectd/ipmi.la
+%%IPMI%%lib/collectd/ipmi.so
 lib/collectd/load.la
 lib/collectd/load.so
 lib/collectd/logfile.la
@@ -57,6 +59,8 @@ lib/collectd/memory.la
 lib/collectd/memory.so
 %%MYSQL%%lib/collectd/mysql.la
 %%MYSQL%%lib/collectd/mysql.so
+%%NOTIFYEMAIL%%lib/collectd/notify_email.la
+%%NOTIFYEMAIL%%lib/collectd/notify_email.so
 %%NGINX%%lib/collectd/nginx.la
 %%NGINX%%lib/collectd/nginx.so
 lib/collectd/network.la
@@ -97,6 +101,8 @@ lib/collectd/tcpconns.la
 lib/collectd/tcpconns.so
 lib/collectd/threshold.la
 lib/collectd/threshold.so
+%%TABLE%%lib/collectd/table.la
+%%TABLE%%lib/collectd/table.so
 %%TOKYOTYRANT%%lib/collectd/tokyotyrant.la
 %%TOKYOTYRANT%%lib/collectd/tokyotyrant.so
 lib/collectd/unixsock.la
@@ -107,6 +113,8 @@ lib/collectd/users.la
 lib/collectd/users.so
 lib/collectd/uuid.la
 lib/collectd/uuid.so
+%%VARNISH%%lib/collectd/varnish.la
+%%VARNISH%%lib/collectd/varnish.so
 %%VIRT%%lib/collectd/libvirt.la
 %%VIRT%%lib/collectd/libvirt.so
 %%WRITE_GRAPHITE%%lib/collectd/write_graphite.so
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"