View | Details | Raw Unified | Return to bug 212832
Collapse All | Expand All

(-)net-mgmt/collectd5.new/Makefile (-3 / +11 lines)
Lines 2-8 Link Here
2
# $FreeBSD: head/net-mgmt/collectd5/Makefile 419862 2016-08-08 15:50:17Z brd $
2
# $FreeBSD: head/net-mgmt/collectd5/Makefile 419862 2016-08-08 15:50:17Z brd $
3
3
4
PORTNAME=	collectd
4
PORTNAME=	collectd
5
PORTVERSION=	5.5.2
5
PORTVERSION=	5.6.0
6
CATEGORIES=	net-mgmt
6
CATEGORIES=	net-mgmt
7
MASTER_SITES=	https://collectd.org/files/ \
7
MASTER_SITES=	https://collectd.org/files/ \
8
		http://collectd.org/files/
8
		http://collectd.org/files/
Lines 25-37 Link Here
25
OPTIONS_GROUP=		INPUT OUTPUT
25
OPTIONS_GROUP=		INPUT OUTPUT
26
OPTIONS_GROUP_OUTPUT=	KAFKA MONGODB NOTIFYDESKTOP NOTIFYEMAIL RIEMANN RRDTOOL \
26
OPTIONS_GROUP_OUTPUT=	KAFKA MONGODB NOTIFYDESKTOP NOTIFYEMAIL RIEMANN RRDTOOL \
27
			TSDB
27
			TSDB
28
OPTIONS_GROUP_INPUT=	CURL CURL_JSON CURL_XML DBI IPMI JSON MEMCACHEC \
28
OPTIONS_GROUP_INPUT=	CHRONY CURL CURL_JSON CURL_XML DBI IPMI JSON \
29
			MODBUS MYSQL NUTUPS OLSRD ONEWIRE OPENLDAP \
29
			MEMCACHEC MODBUS MQTT MYSQL NUTUPS OLSRD ONEWIRE OPENLDAP \
30
			PERL PGSQL PINBA PING PYTHON RABBITMQ REDIS ROUTEROS \
30
			PERL PGSQL PINBA PING PYTHON RABBITMQ REDIS ROUTEROS \
31
			SIGROK SNMP STATSD TOKYOTYRANT VARNISH XML \
31
			SIGROK SNMP STATSD TOKYOTYRANT VARNISH XML \
32
			XMMS ZOOKEEPER
32
			XMMS ZOOKEEPER
33
33
34
CGI_DESC=		Install collection.cgi (requires rrdtool)
34
CGI_DESC=		Install collection.cgi (requires rrdtool)
35
CHRONY_DESC=		Enable chronyd plugin
35
CURL_DESC=		Enable curl-based plugins (apache, nginx, etc)
36
CURL_DESC=		Enable curl-based plugins (apache, nginx, etc)
36
CURL_JSON_DESC=		Enable curl_json plugin (implies curl and json)
37
CURL_JSON_DESC=		Enable curl_json plugin (implies curl and json)
37
CURL_XML_DESC=		Enable ascent, bind, curl_xml plugins (implies curl and xml)
38
CURL_XML_DESC=		Enable ascent, bind, curl_xml plugins (implies curl and xml)
Lines 45-50 Link Here
45
MEMCACHEC_DESC=		Enable memcachec plugin
46
MEMCACHEC_DESC=		Enable memcachec plugin
46
MODBUS_DESC=		Enable modbus plugin
47
MODBUS_DESC=		Enable modbus plugin
47
MONGODB_DESC=		Enable write_mongodb plugin (BROKEN)
48
MONGODB_DESC=		Enable write_mongodb plugin (BROKEN)
49
MQTT_DESC=		Enable MQTT broker metrics
48
MYSQL_DESC=		Enable mysql-based plugins
50
MYSQL_DESC=		Enable mysql-based plugins
49
NOTIFYDESKTOP_DESC=	Enable desktop notifications
51
NOTIFYDESKTOP_DESC=	Enable desktop notifications
50
NOTIFYEMAIL_DESC=	Enable notifications via email
52
NOTIFYEMAIL_DESC=	Enable notifications via email
Lines 115-120 Link Here
115
				p5-HTML-Parser>=0:www/p5-HTML-Parser
117
				p5-HTML-Parser>=0:www/p5-HTML-Parser
116
CGI_IMPLIES=			RRDTOOL
118
CGI_IMPLIES=			RRDTOOL
117
119
120
CHRONY_CONFIGURE_ENABLE=	chrony
121
118
CURL_LIB_DEPENDS=		libcurl.so:ftp/curl
122
CURL_LIB_DEPENDS=		libcurl.so:ftp/curl
119
CURL_CONFIGURE_ENABLE=		apache curl nginx write_http
123
CURL_CONFIGURE_ENABLE=		apache curl nginx write_http
120
CURL_CONFIGURE_WITH=		libcurl=${LOCALBASE}
124
CURL_CONFIGURE_WITH=		libcurl=${LOCALBASE}
Lines 162-167 Link Here
162
MONGODB_CONFIGURE_WITH=		libmongoc=${LOCALBASE}
166
MONGODB_CONFIGURE_WITH=		libmongoc=${LOCALBASE}
163
MONGODB_BROKEN=			fails to configure with write_mongodb option
167
MONGODB_BROKEN=			fails to configure with write_mongodb option
164
168
169
MQTT_LIB_DEPENDS=		libmosquitto.so:net/mosquitto
170
MQTT_CONFIGURE_ENABLE=		mqtt
171
MQTT_CONFIGURE_WITH=		libmosquitto=${LOCALBASE}
172
165
MYSQL_USE=			mysql=yes
173
MYSQL_USE=			mysql=yes
166
MYSQL_CONFIGURE_ENABLE=		mysql
174
MYSQL_CONFIGURE_ENABLE=		mysql
167
MYSQL_CONFIGURE_WITH=		libmysql=${LOCALBASE}
175
MYSQL_CONFIGURE_WITH=		libmysql=${LOCALBASE}
(-)net-mgmt/collectd5.new/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1469564676
1
TIMESTAMP = 1474290609
2
SHA256 (collectd-5.5.2.tar.bz2) = 017f3a4062187e594d8ab6af685655fb82a8a942dc574668e68242bdb8ba820f
2
SHA256 (collectd-5.6.0.tar.bz2) = f0ffbbd91fac3682bd324a74b9b4c9eabe781394b303b5cfd457c4cfbe748623
3
SIZE (collectd-5.5.2.tar.bz2) = 1800476
3
SIZE (collectd-5.6.0.tar.bz2) = 1818470
(-)net-mgmt/collectd5.new/files/patch-Makefile.am (-2 / +2 lines)
Lines 1-6 Link Here
1
--- Makefile.am.orig	2016-01-22 08:33:25 UTC
1
--- Makefile.am.orig	2016-09-11 08:10:25 UTC
2
+++ Makefile.am
2
+++ Makefile.am
3
@@ -14,7 +14,6 @@ EXTRA_DIST = contrib version-gen.sh
3
@@ -14,7 +14,6 @@ EXTRA_DIST = contrib version-gen.sh test
4
 
4
 
5
 install-exec-hook:
5
 install-exec-hook:
6
 	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/run
6
 	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/run
(-)net-mgmt/collectd5.new/files/patch-configure.ac (-55 / +11 lines)
Lines 1-6 Link Here
1
--- configure.ac.orig	2016-01-22 09:51:17 UTC
1
--- configure.ac.orig	2016-09-11 08:10:25 UTC
2
+++ configure.ac
2
+++ configure.ac
3
@@ -155,7 +155,7 @@ then
3
@@ -185,7 +185,7 @@ then
4
 fi
4
 fi
5
 
5
 
6
 # Where to install .pc files.
6
 # Where to install .pc files.
Lines 9-15 Link Here
9
 AC_SUBST(pkgconfigdir)
9
 AC_SUBST(pkgconfigdir)
10
 
10
 
11
 # Check for standards compliance mode
11
 # Check for standards compliance mode
12
@@ -715,7 +715,7 @@ SAVE_CFLAGS="$CFLAGS"
12
@@ -841,7 +841,7 @@ SAVE_CFLAGS="$CFLAGS"
13
 # Emulate behavior of src/Makefile.am
13
 # Emulate behavior of src/Makefile.am
14
 if test "x$GCC" = "xyes"
14
 if test "x$GCC" = "xyes"
15
 then
15
 then
Lines 18-24 Link Here
18
 fi
18
 fi
19
 
19
 
20
 AC_CACHE_CHECK([for strtok_r],
20
 AC_CACHE_CHECK([for strtok_r],
21
@@ -844,7 +844,7 @@ AC_CHECK_FUNCS(getutxent, [have_getutxen
21
@@ -968,7 +968,7 @@ AC_CHECK_FUNCS(getutxent, [have_getutxen
22
 if test "x$GCC" = "xyes"
22
 if test "x$GCC" = "xyes"
23
 then
23
 then
24
 	SAVE_CFLAGS="$CFLAGS"
24
 	SAVE_CFLAGS="$CFLAGS"
Lines 27-33 Link Here
27
 fi
27
 fi
28
 
28
 
29
 AC_CHECK_FUNCS(strptime, [have_strptime="yes"], [have_strptime="no"])
29
 AC_CHECK_FUNCS(strptime, [have_strptime="yes"], [have_strptime="no"])
30
@@ -1571,6 +1571,7 @@ if test "x$with_kstat" = "xyes"
30
@@ -1757,6 +1757,7 @@ if test "x$with_kstat" = "xyes"
31
 then
31
 then
32
 	AC_CHECK_LIB(kstat, kstat_open, [with_kstat="yes"], [with_kstat="no (libkstat not found)"], [])
32
 	AC_CHECK_LIB(kstat, kstat_open, [with_kstat="yes"], [with_kstat="no (libkstat not found)"], [])
33
 fi
33
 fi
Lines 35-41 Link Here
35
 if test "x$with_kstat" = "xyes"
35
 if test "x$with_kstat" = "xyes"
36
 then
36
 then
37
 	AC_CHECK_LIB(devinfo, di_init, [with_devinfo="yes"], [with_devinfo="no (not found)"], [])
37
 	AC_CHECK_LIB(devinfo, di_init, [with_devinfo="yes"], [with_devinfo="no (not found)"], [])
38
@@ -1580,6 +1581,8 @@ if test "x$with_kstat" = "xyes"
38
@@ -1766,6 +1767,8 @@ if test "x$with_kstat" = "xyes"
39
 then
39
 then
40
 	AC_DEFINE(HAVE_LIBKSTAT, 1,
40
 	AC_DEFINE(HAVE_LIBKSTAT, 1,
41
 		  [Define to 1 if you have the 'kstat' library (-lkstat)])
41
 		  [Define to 1 if you have the 'kstat' library (-lkstat)])
Lines 44-50 Link Here
44
 fi
44
 fi
45
 AM_CONDITIONAL(BUILD_WITH_LIBKSTAT, test "x$with_kstat" = "xyes")
45
 AM_CONDITIONAL(BUILD_WITH_LIBKSTAT, test "x$with_kstat" = "xyes")
46
 AM_CONDITIONAL(BUILD_WITH_LIBDEVINFO, test "x$with_devinfo" = "xyes")
46
 AM_CONDITIONAL(BUILD_WITH_LIBDEVINFO, test "x$with_devinfo" = "xyes")
47
@@ -2624,8 +2627,8 @@ AC_ARG_WITH(libmongoc, [AS_HELP_STRING([
47
@@ -3053,8 +3056,8 @@ AC_ARG_WITH(libmongoc, [AS_HELP_STRING([
48
 	 with_libmongoc="no"
48
 	 with_libmongoc="no"
49
  else
49
  else
50
 	 with_libmongoc="yes"
50
 	 with_libmongoc="yes"
Lines 55-61 Link Here
55
  fi; fi
55
  fi; fi
56
 ],
56
 ],
57
 [with_libmongoc="yes"])
57
 [with_libmongoc="yes"])
58
@@ -2642,7 +2645,7 @@ then
58
@@ -3071,7 +3074,7 @@ then
59
 	then
59
 	then
60
 		AC_MSG_NOTICE([libmongoc CPPFLAGS: $LIBMONGOC_CPPFLAGS])
60
 		AC_MSG_NOTICE([libmongoc CPPFLAGS: $LIBMONGOC_CPPFLAGS])
61
 	fi
61
 	fi
Lines 64-70 Link Here
64
 	[with_libmongoc="yes"],
64
 	[with_libmongoc="yes"],
65
 	[with_libmongoc="no ('mongo.h' not found)"],
65
 	[with_libmongoc="no ('mongo.h' not found)"],
66
 [#if HAVE_STDINT_H
66
 [#if HAVE_STDINT_H
67
@@ -2658,7 +2661,7 @@ then
67
@@ -3087,7 +3090,7 @@ then
68
 	then
68
 	then
69
 		AC_MSG_NOTICE([libmongoc LDFLAGS: $LIBMONGOC_LDFLAGS])
69
 		AC_MSG_NOTICE([libmongoc LDFLAGS: $LIBMONGOC_LDFLAGS])
70
 	fi
70
 	fi
Lines 73-79 Link Here
73
 	[with_libmongoc="yes"],
73
 	[with_libmongoc="yes"],
74
 	[with_libmongoc="no (symbol 'mongo_run_command' not found)"])
74
 	[with_libmongoc="no (symbol 'mongo_run_command' not found)"])
75
 fi
75
 fi
76
@@ -3415,7 +3418,7 @@ then
76
@@ -3873,7 +3876,7 @@ then
77
 	SAVE_LIBS="$LIBS"
77
 	SAVE_LIBS="$LIBS"
78
 	# trigger an error if Perl_load_module*() uses __attribute__nonnull__(3)
78
 	# trigger an error if Perl_load_module*() uses __attribute__nonnull__(3)
79
 	# (see issues #41 and #42)
79
 	# (see issues #41 and #42)
Lines 82-124 Link Here
82
 	LIBS="$LIBS $PERL_LIBS"
82
 	LIBS="$LIBS $PERL_LIBS"
83
 
83
 
84
 	AC_CACHE_CHECK([for broken Perl_load_module()],
84
 	AC_CACHE_CHECK([for broken Perl_load_module()],
85
@@ -3645,7 +3648,7 @@ fi
85
@@ -5249,8 +5252,8 @@ AC_ARG_WITH(libvarnish, [AS_HELP_STRING(
86
 if test "x$with_python" = "xyes"
87
 then
88
 	AC_MSG_CHECKING([for Python CPPFLAGS])
89
-	python_include_path=`echo "import distutils.sysconfig;import sys;sys.stdout.write(distutils.sysconfig.get_python_inc())" | "$with_python_prog" 2>&1`
90
+	python_include_path=`echo "import distutils.sysconfig;import sys;sys.stdout.write(distutils.sysconfig.get_python_inc())" | "$with_python_prog" 2>/dev/null`
91
 	python_config_status=$?
92
 
93
 	if test "$python_config_status" -ne 0 || test "x$python_include_path" = "x"
94
@@ -3668,7 +3671,7 @@ fi
95
 if test "x$with_python" = "xyes"
96
 then
97
 	AC_MSG_CHECKING([for Python LDFLAGS])
98
-	python_library_path=`echo "import distutils.sysconfig;import sys;sys.stdout.write(distutils.sysconfig.get_config_vars(\"LIBDIR\").__getitem__(0))" | "$with_python_prog" 2>&1`
99
+	python_library_path=`echo "import distutils.sysconfig;import sys;sys.stdout.write(distutils.sysconfig.get_config_vars(\"LIBDIR\").__getitem__(0))" | "$with_python_prog" 2>/dev/null`
100
 	python_config_status=$?
101
 
102
 	if test "$python_config_status" -ne 0 || test "x$python_library_path" = "x"
103
@@ -3683,7 +3686,7 @@ fi
104
 if test "x$with_python" = "xyes"
105
 then
106
 	AC_MSG_CHECKING([for Python LIBS])
107
-	python_library_flags=`echo "import distutils.sysconfig;import sys;sys.stdout.write(distutils.sysconfig.get_config_vars(\"BLDLIBRARY\").__getitem__(0))" | "$with_python_prog" 2>&1`
108
+	python_library_flags=`echo "import distutils.sysconfig;import sys;sys.stdout.write(distutils.sysconfig.get_config_vars(\"BLDLIBRARY\").__getitem__(0))" | "$with_python_prog" 2>/dev/null`
109
 	python_config_status=$?
110
 
111
 	if test "$python_config_status" -ne 0 || test "x$python_library_flags" = "x"
112
@@ -3698,7 +3701,7 @@ fi
113
 if test "x$with_python" = "xyes"
114
 then
115
 	LDFLAGS="-L$python_library_path $LDFLAGS"
116
-	LIBS="$python_library_flags $LIBS"
117
+	LIBS="$python_library_flags $LIBS -lm -lpthread -lutil"
118
 
119
 	AC_CHECK_FUNC(PyObject_CallFunction,
120
 		      [with_python="yes"],
121
@@ -4761,8 +4764,8 @@ AC_ARG_WITH(libvarnish, [AS_HELP_STRING(
122
 	else if test -d "$with_libvarnish/lib"
86
 	else if test -d "$with_libvarnish/lib"
123
 	then
87
 	then
124
 		AC_MSG_NOTICE([Not checking for libvarnish: Manually configured])
88
 		AC_MSG_NOTICE([Not checking for libvarnish: Manually configured])
Lines 129-139 Link Here
129
 		with_libvarnish="yes"
93
 		with_libvarnish="yes"
130
 	fi; fi; fi
94
 	fi; fi; fi
131
 ],
95
 ],
132
@@ -5334,6 +5337,7 @@ fi
133
 
134
 if test "x$ac_system" = "xFreeBSD"
135
 then
136
+	plugin_disk="yes"
137
 	plugin_zfs_arc="yes"
138
 fi
139
 
(-)net-mgmt/collectd5.new/files/patch-src__Makefile.am (-24 / +16 lines)
Lines 1-14 Link Here
1
--- src/Makefile.am.orig	2016-01-22 09:51:17 UTC
1
--- src/Makefile.am.orig	2016-09-11 08:10:25 UTC
2
+++ src/Makefile.am
2
+++ src/Makefile.am
3
@@ -7,14 +7,14 @@ SUBDIRS += daemon
3
@@ -10,7 +10,7 @@ AM_CPPFLAGS = -I$(srcdir)/daemon
4
 PLUGIN_LDFLAGS = -module -avoid-version -export-symbols-regex '\<module_register\>'
5
 
6
 if COMPILER_IS_GCC
7
-AM_CFLAGS = -Wall -Werror
8
+AM_CFLAGS = -Wall 
9
 endif
10
 
11
 AM_CPPFLAGS = -I$(srcdir)/daemon
12
 AM_CPPFLAGS += -DPREFIX='"${prefix}"'
4
 AM_CPPFLAGS += -DPREFIX='"${prefix}"'
13
 AM_CPPFLAGS += -DCONFIGFILE='"${sysconfdir}/${PACKAGE_NAME}.conf"'
5
 AM_CPPFLAGS += -DCONFIGFILE='"${sysconfdir}/${PACKAGE_NAME}.conf"'
14
 AM_CPPFLAGS += -DLOCALSTATEDIR='"${localstatedir}"'
6
 AM_CPPFLAGS += -DLOCALSTATEDIR='"${localstatedir}"'
Lines 17-23 Link Here
17
 if BUILD_FEATURE_DAEMON
9
 if BUILD_FEATURE_DAEMON
18
 AM_CPPFLAGS += -DPIDFILE='"${localstatedir}/run/${PACKAGE_NAME}.pid"'
10
 AM_CPPFLAGS += -DPIDFILE='"${localstatedir}/run/${PACKAGE_NAME}.pid"'
19
 endif
11
 endif
20
@@ -218,7 +218,7 @@ cpu_la_CFLAGS = $(AM_CFLAGS)
12
@@ -274,7 +274,7 @@ cpu_la_CFLAGS = $(AM_CFLAGS)
21
 cpu_la_LDFLAGS = $(PLUGIN_LDFLAGS)
13
 cpu_la_LDFLAGS = $(PLUGIN_LDFLAGS)
22
 cpu_la_LIBADD =
14
 cpu_la_LIBADD =
23
 if BUILD_WITH_LIBKSTAT
15
 if BUILD_WITH_LIBKSTAT
Lines 26-32 Link Here
26
 endif
18
 endif
27
 if BUILD_WITH_LIBDEVINFO
19
 if BUILD_WITH_LIBDEVINFO
28
 cpu_la_LIBADD += -ldevinfo
20
 cpu_la_LIBADD += -ldevinfo
29
@@ -301,7 +301,7 @@ disk_la_CFLAGS = $(AM_CFLAGS)
21
@@ -358,7 +358,7 @@ disk_la_CFLAGS = $(AM_CFLAGS)
30
 disk_la_LDFLAGS = $(PLUGIN_LDFLAGS)
22
 disk_la_LDFLAGS = $(PLUGIN_LDFLAGS)
31
 disk_la_LIBADD =
23
 disk_la_LIBADD =
32
 if BUILD_WITH_LIBKSTAT
24
 if BUILD_WITH_LIBKSTAT
Lines 35-41 Link Here
35
 endif
27
 endif
36
 if BUILD_WITH_LIBDEVINFO
28
 if BUILD_WITH_LIBDEVINFO
37
 disk_la_LIBADD += -ldevinfo
29
 disk_la_LIBADD += -ldevinfo
38
@@ -319,6 +319,9 @@ endif
30
@@ -381,6 +381,9 @@ endif
39
 if BUILD_WITH_PERFSTAT
31
 if BUILD_WITH_PERFSTAT
40
 disk_la_LIBADD += -lperfstat
32
 disk_la_LIBADD += -lperfstat
41
 endif
33
 endif
Lines 45-51 Link Here
45
 endif
37
 endif
46
 
38
 
47
 if BUILD_PLUGIN_DNS
39
 if BUILD_PLUGIN_DNS
48
@@ -405,7 +408,7 @@ interface_la_CFLAGS += $(BUILD_WITH_LIBS
40
@@ -481,7 +484,7 @@ interface_la_CFLAGS += $(BUILD_WITH_LIBS
49
 interface_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
41
 interface_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
50
 else
42
 else
51
 if BUILD_WITH_LIBKSTAT
43
 if BUILD_WITH_LIBKSTAT
Lines 54-60 Link Here
54
 endif
46
 endif
55
 if BUILD_WITH_LIBDEVINFO
47
 if BUILD_WITH_LIBDEVINFO
56
 interface_la_LIBADD += -ldevinfo
48
 interface_la_LIBADD += -ldevinfo
57
@@ -584,7 +587,7 @@ memory_la_CFLAGS = $(AM_CFLAGS)
49
@@ -669,7 +672,7 @@ memory_la_CFLAGS = $(AM_CFLAGS)
58
 memory_la_LDFLAGS = $(PLUGIN_LDFLAGS)
50
 memory_la_LDFLAGS = $(PLUGIN_LDFLAGS)
59
 memory_la_LIBADD =
51
 memory_la_LIBADD =
60
 if BUILD_WITH_LIBKSTAT
52
 if BUILD_WITH_LIBKSTAT
Lines 63-69 Link Here
63
 endif
55
 endif
64
 if BUILD_WITH_LIBDEVINFO
56
 if BUILD_WITH_LIBDEVINFO
65
 memory_la_LIBADD += -ldevinfo
57
 memory_la_LIBADD += -ldevinfo
66
@@ -951,7 +954,7 @@ swap_la_CFLAGS = $(AM_CFLAGS)
58
@@ -1034,7 +1037,7 @@ swap_la_CFLAGS = $(AM_CFLAGS)
67
 swap_la_LDFLAGS = $(PLUGIN_LDFLAGS)
59
 swap_la_LDFLAGS = $(PLUGIN_LDFLAGS)
68
 swap_la_LIBADD =
60
 swap_la_LIBADD =
69
 if BUILD_WITH_LIBKSTAT
61
 if BUILD_WITH_LIBKSTAT
Lines 72-78 Link Here
72
 endif
64
 endif
73
 if BUILD_WITH_LIBDEVINFO
65
 if BUILD_WITH_LIBDEVINFO
74
 swap_la_LIBADD += -ldevinfo
66
 swap_la_LIBADD += -ldevinfo
75
@@ -997,7 +1000,7 @@ if BUILD_PLUGIN_TAPE
67
@@ -1080,7 +1083,7 @@ if BUILD_PLUGIN_TAPE
76
 pkglib_LTLIBRARIES += tape.la
68
 pkglib_LTLIBRARIES += tape.la
77
 tape_la_SOURCES = tape.c
69
 tape_la_SOURCES = tape.c
78
 tape_la_LDFLAGS = $(PLUGIN_LDFLAGS)
70
 tape_la_LDFLAGS = $(PLUGIN_LDFLAGS)
Lines 81-87 Link Here
81
 endif
73
 endif
82
 
74
 
83
 if BUILD_PLUGIN_TARGET_NOTIFICATION
75
 if BUILD_PLUGIN_TARGET_NOTIFICATION
84
@@ -1102,7 +1105,7 @@ uptime_la_CFLAGS = $(AM_CFLAGS)
76
@@ -1184,7 +1187,7 @@ uptime_la_CFLAGS = $(AM_CFLAGS)
85
 uptime_la_LDFLAGS = $(PLUGIN_LDFLAGS)
77
 uptime_la_LDFLAGS = $(PLUGIN_LDFLAGS)
86
 uptime_la_LIBADD =
78
 uptime_la_LIBADD =
87
 if BUILD_WITH_LIBKSTAT
79
 if BUILD_WITH_LIBKSTAT
Lines 90-105 Link Here
90
 endif
82
 endif
91
 if BUILD_WITH_PERFSTAT
83
 if BUILD_WITH_PERFSTAT
92
 uptime_la_LIBADD += -lperfstat
84
 uptime_la_LIBADD += -lperfstat
93
@@ -1260,7 +1263,7 @@ if BUILD_LINUX
85
@@ -1340,7 +1343,7 @@ if BUILD_FREEBSD
94
 # zfs_arc requires no library on linux
86
 zfs_arc_la_LIBADD = -lm
95
 else
87
 endif
96
 # solaris
88
 if BUILD_SOLARIS
97
-zfs_arc_la_LIBADD = -lkstat
89
-zfs_arc_la_LIBADD = -lkstat
98
+zfs_arc_la_LIBADD = $(BUILD_WITH_LIBKSTAT_LIBS)
90
+zfs_arc_la_LIBADD = $(BUILD_WITH_LIBKSTAT_LIBS)
99
 endif
91
 endif
100
 endif
92
 endif
101
 endif
93
 
102
@@ -1354,12 +1357,7 @@ endif
94
@@ -1433,12 +1436,7 @@ endif
103
 
95
 
104
 install-exec-hook:
96
 install-exec-hook:
105
 	$(mkinstalldirs) $(DESTDIR)$(sysconfdir)
97
 	$(mkinstalldirs) $(DESTDIR)$(sysconfdir)
(-)net-mgmt/collectd5.new/files/patch-src__daemon__Makefile.am (-2 / +2 lines)
Lines 1-6 Link Here
1
--- src/daemon/Makefile.am.orig	2016-01-22 09:51:17 UTC
1
--- src/daemon/Makefile.am.orig	2016-09-11 08:10:25 UTC
2
+++ src/daemon/Makefile.am
2
+++ src/daemon/Makefile.am
3
@@ -6,7 +6,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/src
3
@@ -2,7 +2,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/src
4
 AM_CPPFLAGS += -DPREFIX='"${prefix}"'
4
 AM_CPPFLAGS += -DPREFIX='"${prefix}"'
5
 AM_CPPFLAGS += -DCONFIGFILE='"${sysconfdir}/${PACKAGE_NAME}.conf"'
5
 AM_CPPFLAGS += -DCONFIGFILE='"${sysconfdir}/${PACKAGE_NAME}.conf"'
6
 AM_CPPFLAGS += -DLOCALSTATEDIR='"${localstatedir}"'
6
 AM_CPPFLAGS += -DLOCALSTATEDIR='"${localstatedir}"'
(-)net-mgmt/collectd5.new/files/patch-src__daemon__collectd.h (-8 / +8 lines)
Lines 1-21 Link Here
1
--- src/daemon/collectd.h.orig	2016-01-22 09:51:17 UTC
1
--- src/daemon/collectd.h.orig	2016-09-11 08:10:25 UTC
2
+++ src/daemon/collectd.h
2
+++ src/daemon/collectd.h
3
@@ -240,15 +240,15 @@ typedef int _Bool;
3
@@ -243,15 +243,15 @@ typedef int _Bool;
4
 #endif
4
 #endif
5
 
5
 
6
 #ifndef LOCALSTATEDIR
6
 #ifndef LOCALSTATEDIR
7
-#define LOCALSTATEDIR PREFIX "/var"
7
-# define LOCALSTATEDIR PREFIX "/var"
8
+#define LOCALSTATEDIR "/var"
8
+# define LOCALSTATEDIR "/var"
9
 #endif
9
 #endif
10
 
10
 
11
 #ifndef PKGLOCALSTATEDIR
11
 #ifndef PKGLOCALSTATEDIR
12
-#define PKGLOCALSTATEDIR PREFIX "/var/lib/" PACKAGE_NAME
12
-# define PKGLOCALSTATEDIR PREFIX "/var/lib/" PACKAGE_NAME
13
+#define PKGLOCALSTATEDIR PREFIX "/var/db/" PACKAGE_NAME
13
+# define PKGLOCALSTATEDIR PREFIX "/var/db/" PACKAGE_NAME
14
 #endif
14
 #endif
15
 
15
 
16
 #ifndef PIDFILE
16
 #ifndef PIDFILE
17
-#define PIDFILE PREFIX "/var/run/" PACKAGE_NAME ".pid"
17
-# define PIDFILE PREFIX "/var/run/" PACKAGE_NAME ".pid"
18
+#define PIDFILE "/var/run/" PACKAGE_NAME ".pid"
18
+# define PIDFILE "/var/run/" PACKAGE_NAME ".pid"
19
 #endif
19
 #endif
20
 
20
 
21
 #ifndef PLUGINDIR
21
 #ifndef PLUGINDIR
(-)net-mgmt/collectd5.new/files/patch-src__dns.c (-2 / +2 lines)
Lines 1-6 Link Here
1
--- src/dns.c.orig	2016-01-22 09:51:17 UTC
1
--- src/dns.c.orig	2016-09-11 08:10:25 UTC
2
+++ src/dns.c
2
+++ src/dns.c
3
@@ -223,6 +223,15 @@ static int dns_run_pcap_loop (void)
3
@@ -225,6 +225,15 @@ static int dns_run_pcap_loop (void)
4
 		pthread_sigmask (SIG_SETMASK, &sigmask, NULL);
4
 		pthread_sigmask (SIG_SETMASK, &sigmask, NULL);
5
 	}
5
 	}
6
 
6
 
(-)net-mgmt/collectd5.new/files/patch-src__modbus.c (-2 / +2 lines)
Lines 1-8 Link Here
1
--- src/modbus.c.orig	2016-01-22 09:51:17 UTC
1
--- src/modbus.c.orig	2016-09-11 08:10:25 UTC
2
+++ src/modbus.c
2
+++ src/modbus.c
3
@@ -25,6 +25,9 @@
3
@@ -25,6 +25,9 @@
4
 #include "common.h"
4
 #include "plugin.h"
5
 #include "plugin.h"
5
 #include "configfile.h"
6
 
6
 
7
+/* FreeBSD needs this */
7
+/* FreeBSD needs this */
8
+#include <sys/socket.h> 
8
+#include <sys/socket.h> 
(-)net-mgmt/collectd5.new/files/patch-src_config.h.in (-6 / +6 lines)
Lines 1-6 Link Here
1
--- src/config.h.in.orig	2016-01-22 09:56:33 UTC
1
--- src/config.h.in.orig	2016-09-11 08:10:42 UTC
2
+++ src/config.h.in
2
+++ src/config.h.in
3
@@ -562,8 +562,8 @@
3
@@ -587,8 +587,8 @@
4
 /* Define to 1 if you have the <modbus.h> header file. */
4
 /* Define to 1 if you have the <modbus.h> header file. */
5
 #undef HAVE_MODBUS_H
5
 #undef HAVE_MODBUS_H
6
 
6
 
Lines 9-17 Link Here
9
+/* Define to 1 if you have the <mongoc.h> header file. */
9
+/* Define to 1 if you have the <mongoc.h> header file. */
10
+#undef HAVE_MONGOC_H
10
+#undef HAVE_MONGOC_H
11
 
11
 
12
 /* Define to 1 if you have the <mysql.h> header file. */
12
 /* Define to 1 if you have the <mosquitto.h> header file. */
13
 #undef HAVE_MYSQL_H
13
 #undef HAVE_MOSQUITTO_H
14
@@ -1541,13 +1541,15 @@
14
@@ -1617,13 +1617,15 @@
15
    module search path. */
15
    module search path. */
16
 #undef LT_MODULE_PATH_VAR
16
 #undef LT_MODULE_PATH_VAR
17
 
17
 
Lines 29-35 Link Here
29
 /* Define if NAN is defined by default and can initialize static variables. */
29
 /* Define if NAN is defined by default and can initialize static variables. */
30
 #undef NAN_STATIC_DEFAULT
30
 #undef NAN_STATIC_DEFAULT
31
 
31
 
32
@@ -1644,7 +1646,7 @@
32
@@ -1715,7 +1717,7 @@
33
 /* Define to empty if `const' does not conform to ANSI C. */
33
 /* Define to empty if `const' does not conform to ANSI C. */
34
 #undef const
34
 #undef const
35
 
35
 
(-)net-mgmt/collectd5.new/files/patch-src_disk.c (-160 lines)
Lines 1-160 Link Here
1
--- src/disk.c.orig	2016-01-22 09:51:17 UTC
2
+++ src/disk.c
3
@@ -53,6 +53,10 @@
4
 #if HAVE_IOKIT_IOBSD_H
5
 #  include <IOKit/IOBSD.h>
6
 #endif
7
+#if KERNEL_FREEBSD
8
+#include <devstat.h>
9
+#include <libgeom.h>
10
+#endif
11
 
12
 #if HAVE_LIMITS_H
13
 # include <limits.h>
14
@@ -107,6 +111,9 @@ typedef struct diskstats
15
 
16
 static diskstats_t *disklist;
17
 /* #endif KERNEL_LINUX */
18
+#elif KERNEL_FREEBSD
19
+static struct gmesh geom_tree;
20
+/* #endif KERNEL_FREEBSD */
21
 
22
 #elif HAVE_LIBKSTAT
23
 #define MAX_NUMDISK 1024
24
@@ -222,6 +229,21 @@ static int disk_init (void)
25
 	/* do nothing */
26
 /* #endif KERNEL_LINUX */
27
 
28
+#elif KERNEL_FREEBSD
29
+	int rv;
30
+
31
+	rv = geom_gettree(&geom_tree);
32
+	if (rv != 0) {
33
+		ERROR ("geom_gettree() failed, returned %d", rv);
34
+		return (-1);
35
+	}
36
+	rv = geom_stats_open();
37
+	if (rv != 0) {
38
+		ERROR ("geom_stats_open() failed, returned %d", rv);
39
+		return (-1);
40
+	}
41
+/* #endif KERNEL_FREEBSD */
42
+
43
 #elif HAVE_LIBKSTAT
44
 	kstat_t *ksp_chain;
45
 
46
@@ -505,6 +527,114 @@ static int disk_read (void)
47
 	IOObjectRelease (disk_list);
48
 /* #endif HAVE_IOKIT_IOKITLIB_H */
49
 
50
+#elif KERNEL_FREEBSD
51
+	int retry, dirty;
52
+
53
+	void *snap = NULL;
54
+	struct devstat *snap_iter;
55
+
56
+	struct gident *geom_id;
57
+
58
+	const char *disk_name;
59
+	long double read_time, write_time;
60
+
61
+	for (retry = 0, dirty = 1; retry < 5 && dirty == 1; retry++) {
62
+		if (snap != NULL)
63
+			geom_stats_snapshot_free(snap);
64
+
65
+		/* Get a fresh copy of stats snapshot */
66
+		snap = geom_stats_snapshot_get();
67
+		if (snap == NULL) {
68
+			ERROR("disk plugin: geom_stats_snapshot_get() failed.");
69
+			return (-1);
70
+		}
71
+
72
+		/* Check if we have dirty read from this snapshot */
73
+		dirty = 0;
74
+		geom_stats_snapshot_reset(snap);
75
+		while ((snap_iter = geom_stats_snapshot_next(snap)) != NULL) {
76
+			if (snap_iter->id == NULL)
77
+				continue;
78
+			geom_id = geom_lookupid(&geom_tree, snap_iter->id);
79
+
80
+			/* New device? refresh GEOM tree */
81
+			if (geom_id == NULL) {
82
+				geom_deletetree(&geom_tree);
83
+				if (geom_gettree(&geom_tree) != 0) {
84
+					ERROR("disk plugin: geom_gettree() failed");
85
+					geom_stats_snapshot_free(snap);
86
+					return (-1);
87
+				}
88
+				geom_id = geom_lookupid(&geom_tree, snap_iter->id);
89
+			}
90
+			/*
91
+			 * This should be rare: the device come right before we take the
92
+			 * snapshot and went away right after it.  We will handle this
93
+			 * case later, so don't mark dirty but silently ignore it.
94
+			 */
95
+			if (geom_id == NULL)
96
+				continue;
97
+
98
+			/* Only collect PROVIDER data */
99
+			if (geom_id->lg_what != ISPROVIDER)
100
+				continue;
101
+
102
+			/* Only collect data when rank is 1 (physical devices) */
103
+			if (((struct gprovider *)(geom_id->lg_ptr))->lg_geom->lg_rank != 1)
104
+				continue;
105
+
106
+			/* Check if this is a dirty read quit for another try */
107
+			if (snap_iter->sequence0 != snap_iter->sequence1) {
108
+				dirty = 1;
109
+				break;
110
+			}
111
+		}
112
+	}
113
+
114
+	/* Reset iterator */
115
+	geom_stats_snapshot_reset(snap);
116
+	for (;;) {
117
+		snap_iter = geom_stats_snapshot_next(snap);
118
+		if (snap_iter == NULL)
119
+			break;
120
+
121
+		if (snap_iter->id == NULL)
122
+			continue;
123
+		geom_id = geom_lookupid(&geom_tree, snap_iter->id);
124
+		if (geom_id == NULL)
125
+			continue;
126
+		if (geom_id->lg_what != ISPROVIDER)
127
+			continue;
128
+		if (((struct gprovider *)(geom_id->lg_ptr))->lg_geom->lg_rank != 1)
129
+			continue;
130
+		/* Skip dirty reads, if present */
131
+		if (dirty && (snap_iter->sequence0 != snap_iter->sequence1))
132
+			continue;
133
+
134
+		disk_name = ((struct gprovider *)geom_id->lg_ptr)->lg_name;
135
+
136
+		if ((snap_iter->bytes[1] != 0) || (snap_iter->bytes[2] != 0)) {
137
+			disk_submit(disk_name, "disk_octets",
138
+					(derive_t)snap_iter->bytes[1],
139
+					(derive_t)snap_iter->bytes[2]);
140
+		}
141
+
142
+		if ((snap_iter->operations[1] != 0) || (snap_iter->operations[2] != 0)) {
143
+			disk_submit(disk_name, "disk_ops",
144
+					(derive_t)snap_iter->operations[1],
145
+					(derive_t)snap_iter->operations[2]);
146
+		}
147
+
148
+		read_time = devstat_compute_etime(&snap_iter->duration[DEVSTAT_READ], NULL);
149
+		write_time = devstat_compute_etime(&snap_iter->duration[DEVSTAT_WRITE], NULL);
150
+		if ((read_time != 0) || (write_time != 0)) {
151
+			disk_submit (disk_name, "disk_time",
152
+					(derive_t)(read_time*1000), (derive_t)(write_time*1000));
153
+		}
154
+	}
155
+	geom_stats_snapshot_free(snap);
156
+/* #endif KERNEL_FREEBSD */
157
+
158
 #elif KERNEL_LINUX
159
 	FILE *fh;
160
 	char buffer[1024];
(-)net-mgmt/collectd5.new/files/patch-src_write__mongodb.c (-2 / +2 lines)
Lines 1-6 Link Here
1
--- src/write_mongodb.c.orig	2015-12-01 15:28:11 UTC
1
--- src/write_mongodb.c.orig	2016-09-11 08:10:25 UTC
2
+++ src/write_mongodb.c
2
+++ src/write_mongodb.c
3
@@ -41,7 +41,7 @@
3
@@ -39,7 +39,7 @@
4
 #else
4
 #else
5
 # define MONGO_USE_LONG_LONG_INT 1
5
 # define MONGO_USE_LONG_LONG_INT 1
6
 #endif
6
 #endif
(-)net-mgmt/collectd5.new/files/patch-src_zfs__arc.c (-13 lines)
Lines 1-13 Link Here
1
--- src/zfs_arc.c.orig	2016-07-26 05:57:19 UTC
2
+++ src/zfs_arc.c
3
@@ -270,10 +270,6 @@ static int za_read (void)
4
 	za_read_derive (ksp, "deleted",  "cache_operation", "deleted");
5
 #if __FreeBSD__
6
 	za_read_derive (ksp, "allocated","cache_operation", "allocated");
7
-#if defined(__FreeBSD_version) && (__FreeBSD_version < 1002501)
8
-	/* stolen removed from sysctl kstat.zfs.misc.arcstats on FreeBSD 10.2+ */
9
-	za_read_derive (ksp, "stolen",   "cache_operation", "stolen");
10
-#endif
11
 #endif
12
 
13
 	/* Issue indicators */
(-)net-mgmt/collectd5.new/files/patch-version-gen.sh (-8 / +8 lines)
Lines 1-17 Link Here
1
--- version-gen.sh.orig	2016-08-05 21:19:57 UTC
1
--- version-gen.sh.orig	2016-09-11 08:10:25 UTC
2
+++ version-gen.sh
2
+++ version-gen.sh
3
@@ -1,13 +1,3 @@
3
@@ -1,13 +1,2 @@
4
 #!/bin/sh
4
 #!/bin/sh
5
 
6
-DEFAULT_VERSION="5.5.2.git"
7
-
5
-
8
-VERSION="`git describe 2> /dev/null | grep collectd | sed -e 's/^collectd-//'`"
6
-DEFAULT_VERSION="5.6.0.git"
7
-
8
-if [ -d .git ]; then
9
-	VERSION="`git describe --dirty=+ --abbrev=7 2> /dev/null | grep collectd | sed -e 's/^collectd-//' -e 's/-/./g'`"
10
-fi
9
-
11
-
10
-if test -z "$VERSION"; then
12
-if test -z "$VERSION"; then
11
-	VERSION="$DEFAULT_VERSION"
13
-	VERSION="$DEFAULT_VERSION"
12
-fi
14
-fi
13
-
15
-
14
-VERSION="`echo \"$VERSION\" | sed -e 's/-/./g'`"
15
-
16
-printf "%s" "$VERSION"
16
-printf "%s" "$VERSION"
17
+echo -n '5.5.2.git'
17
+echo -n '5.6.0.git'
(-)net-mgmt/collectd5.new/pkg-plist (+3 lines)
Lines 18-23 Link Here
18
lib/collectd/apcups.so
18
lib/collectd/apcups.so
19
%%CURL_XML%%lib/collectd/ascent.so
19
%%CURL_XML%%lib/collectd/ascent.so
20
%%CURL_XML%%lib/collectd/bind.so
20
%%CURL_XML%%lib/collectd/bind.so
21
%%CHRONY%%lib/collectd/chrony.so
21
lib/collectd/contextswitch.so
22
lib/collectd/contextswitch.so
22
lib/collectd/cpu.so
23
lib/collectd/cpu.so
23
lib/collectd/csv.so
24
lib/collectd/csv.so
Lines 46-51 Link Here
46
lib/collectd/memcached.so
47
lib/collectd/memcached.so
47
lib/collectd/memory.so
48
lib/collectd/memory.so
48
%%MODBUS%%lib/collectd/modbus.so
49
%%MODBUS%%lib/collectd/modbus.so
50
%%MQTT%%lib/collectd/mqtt.so
49
%%MYSQL%%lib/collectd/mysql.so
51
%%MYSQL%%lib/collectd/mysql.so
50
lib/collectd/network.so
52
lib/collectd/network.so
51
%%CURL%%lib/collectd/nginx.so
53
%%CURL%%lib/collectd/nginx.so
Lines 119-124 Link Here
119
man/man5/collectd-email.5.gz
121
man/man5/collectd-email.5.gz
120
man/man5/collectd-exec.5.gz
122
man/man5/collectd-exec.5.gz
121
man/man5/collectd-java.5.gz
123
man/man5/collectd-java.5.gz
124
man/man5/collectd-lua.5.gz
122
man/man5/collectd-perl.5.gz
125
man/man5/collectd-perl.5.gz
123
man/man5/collectd-python.5.gz
126
man/man5/collectd-python.5.gz
124
man/man5/collectd-snmp.5.gz
127
man/man5/collectd-snmp.5.gz

Return to bug 212832