pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/sysutils
Module Name: pkgsrc
Committed By: fhajny
Date: Thu Oct 13 15:17:29 UTC 2016
Modified Files:
pkgsrc/sysutils/collectd: Makefile Makefile.common PLIST distinfo
options.mk
pkgsrc/sysutils/collectd-amqp: Makefile
pkgsrc/sysutils/collectd-curl: Makefile
pkgsrc/sysutils/collectd-notify-email: Makefile
pkgsrc/sysutils/collectd-postgresql: Makefile
pkgsrc/sysutils/collectd-riemann: Makefile
pkgsrc/sysutils/collectd-snmp: Makefile
pkgsrc/sysutils/collectd/patches: patch-configure.ac
patch-src_Makefile.am patch-src_cpu.c patch-src_irq.c
patch-src_libcollectclient_network__buffer.c patch-src_memory.c
patch-src_swap.c
pkgsrc/sysutils/p5-collectd: Makefile
pkgsrc/sysutils/py-collectd: Makefile
Added Files:
pkgsrc/sysutils/collectd/patches: patch-src_daemon_Makefile.am
Removed Files:
pkgsrc/sysutils/collectd/patches: patch-Makefile.in patch-configure
patch-src_Makefile.in patch-src_collectd-tg.c patch-src_config.h.in
patch-version-gen.sh
Log Message:
Update sysutils/collectd and subpackages to 5.6.1.
- Simplify patching somewhat by calling automake
- Temporarily disable the processes plugin patch for NetBSD, until
its code is amended for collectd code changes.
Version 5.6.1
- Build system: Unnecessary linking of the Write Graphite plugin
with libyajl has been removed.
- collectd: A bug in the FlushInterval option that caused a
segmentation fault in the Write HTTP plugin has been fixed.
- Apache plugin: A syntax error has been fixed.
- cURL-JSON plugin: A segmentation fault that occurred when
handling JSON with unexpected structure has been fixed.
- PostgreSQL plugin: Handling of NULL values in the query_plans
and query_plans_by_table queries has been fixed.
- RRDCacheD plugin: Reconnection behavior has been added.
- VServer plugin: Use of a deprecated API (readdir_r()) has been
fixed.
- Write Graphite plugin: Make default values configurable at
compile time again.
- Write HTTP plugin: A bug has been fixed that lead to flush
callbacks being registered twice.
Version 5.6.0
- Build system: An option to to avoid building the DF plugin
against XFS has been added.
- Build system: Autoconf >=2.60, a C99-capable compiler and
pkg-config are now required.
- Build system: Building with -Werror is now optional.
- Build system: Many compilation issues on non-Linux platforms
have been fixed, leading to wider plugin support.
- Build system: The configuration summary now also ends up in
config.log.
- collectd: All command-line options now override global options
from the config file.
- collectd: A number of unit tests for commonly used functions
have been added.
- collectd: Plugins start up and read timeouts are now logged.
- collectd: Support for a timeout has been added to FLUSH
callbacks.
- collectd: The -T command line switch now reports more errors.
- collectd: The max size of value list elements
(DATA_MAX_NAME_LEN) has been doubled and is now configurable at
build time.
- Set target: The MetaData option has been added.
- AMQP plugin, Write_HTTP plugin, Write_Kafka plugin: Support for
libyajl < 2 has been added.
- APC UPS plugin: Parsing of end markers has been fixed.
- APC UPS plugin: The PersistentConnection option has been added.
- ceph plugin, DNS plugin, Exec plugin, IPTables plugin, Ping
plugin, turbostat plugin: When running unprivileged, these
plugins will now warn about insuffiscient permissions or
capabilities(7).
- Chrony plugin: This new plugin collects NTP data from the chrony
NTP server.
- cpusleep plugin: This new plugin measures time spent by CPU in
deep sleep mode.
- CPU plugin: The ReportNumCpu option has been added.
- cURL plugin, cURL-JSON plugin, cURL-XML plugin: The new
Statistics reports various per-HTTP connection timers.
- DBI plugin: The Interval option has been added to Database
blocks.
- Disk plugin: Support for FreeBSD has been added.
- Empty Counter match: Support for derives has been implemented.
- GenericJMX plugin: Support for TabularData and the PluginName
option have been added.
- GPS plugin: This new plugin reports the number of sattelites
seen by and precision of a GPS receiver.
- gRPC plugin: This new client and server plugin allows sending
and receiving metrics using the gRPC protocol. Comparable to the
UnixSock plugin, but using TCP and TLS.
- Interface plugin: Reporting dropped packets has been added.
- Interface plugin: The ReportInactive has been added, letting
users skip inactive network interfaces.
- Interface plugin: The new, Solaris-only UniqueName option has
been added.
- Lua plugin: This new language binding allows writing plugins
using the Lua programming language.
- Memory plugin: Reporting of ARC memory on Solaris has been
added.
- MQTT plugin: This new plugin sends metrics to and/or receives
metrics from an MQTT broker.
- MySQL plugin: Connection to the database server can now be done
over SSL.
- MySQL plugin: Monitoring slow queries has been added.
- MySQL plugin: mysql_bpool_pages-flushed has been renamed to
mysql_bpool_counters-pages_flushed because the value is
cumulative.
- MySQL plugin: Support for Galera statistics has been added.
- MySQL plugin: Support for InnoDB metrics was improved.
- MySQL plugin: The mysql_sort type has been split into 3
different types.
- Network plugin: Decryption error logging has been improved.
- Notify Nagios plugin: This new plugin sends notifications to
Nagios as a passive check result.
- NTPd plugin: The plugin now detects if the ntp daemon reports
nanoseconds instead of microseconds.
- OpenLDAP plugin: Several connection-related improvements have
been made.
- OpenLDAP plugin: Support for "simple authentication" has been
added.
- Ping plugin: The Size option has been added, allowing the ICMP
data payload size to be configured.
- PostgreSQL plugin, DBI plugin, Oracle plugin: The new
PluginInstanceFrom option has been added.
- PowerDNS plugin: The recursor metrics have been updated to 3.7.3
and missing rr types have been added.
- Processes plugin: Counting of context switches was added for
Linux.
- Processes plugin: Improve reliability of thread counts on Linux.
- Python plugin: Minimal Python version requirement has been
bumped to 2.6.
- Redis plugin: Several additional metrics are now collected.
- Sensors plugin: The UseLabels option has been added.
- SMART plugin: The new IgnoreSleepMode option has been added.
- SMART plugin: The new UseSerial option allows identifying
devices in a stable way.
- SNMP plugin: The IpAddress can now be used for instances.
- StatsD plugin: Latency calculation histogram is now able to
shrink automatically to optimal size.
- StatsD plugin: The CounterSum option has been added.
- UUID plugin: The plugin now also looks in in smbios system table
and /sys/class/dmi.
- virt plugin: The PluginInstanceFormat option has been added.
- Write Graphite plugin: The ReconnectInterval option has been
added.
- Write HTTP plugin: A KairosDB formatter has been added.
- Write HTTP plugin: Notifications are now handled by this plugin.
- Write HTTP plugin: The LogHttpError option has been added.
- Write HTTP plugin: The new Headers option allows setting custom
HTTP headers in outgoing requests.
- Write Kafka plugin: Key handling has been made more
comprehensive and reliable.
- Write Redis plugin: The Database, MaxSetSize, Prefix and
StoreRates options have been added.
- Write Riemann plugin: The new BatchFlushTimeout and Timeout
option have been added.
- Write Riemann plugin: This plugin now requires the
riemann-c-client library, version 1.6.0+. This adds support for
submitting values to Riemann over TLS.
- Write TSDB plugin, Write Sensu plugin, Write Riemann plugin,
Write Graphite plugin, Write TSDB plugin: TCP keepalive is now
enabled, helping graceful recovery from unclean network
disconnections.
- XenCPU plugin: This new plugin collects XEN Hypervisor CPU
stats.
- ZFS ARC plugin: Several new statistics have been added and a
couple of obsolete ones removed.
- Zone plugin: This new plugin reads per-zone CPU usage on
Solaris.
Version 5.5.2
- collectd: A division by zero has been fixed in the
plugin_dispatch_multivalue() function.
- collectd: The address of the Free Software Foundation has been
fixed in GPL license headers.
- Build system: Detection and handling of librrd 1.6 and later has
been fixed.
- Apache plugin: A warning about a possible misconfiguration has
been added.
- cURL, cURL-JSON and cURL-XML plugins: A memory leak when
allocating more memory fails has been fixed.
- DF plugin: A build issue on DragonFlyBSD has been fixed.
- Ethstat plugin: Code to strip leading whitespace from device
names. This works around an issue in the VMXNet3 driver.
- Exec plugin: A problem in the error handling of an fdopen()
failure has been fixed.
- Modbus plugin: The debug output has been disabled by default. It
is now only enabled when building with --enable-debug.
- Network plugin: A check for the initialization of secure memory
has been added. Previously, failure to initialize this memory
was ignored.
- Network plugin: A heap overflow has been fixed in the server
code. This issue can be triggered remotely and is potentially
exploitable.
- Perl plugin: Init callbacks have been changed to run essentially
single-threaded to avoid race conditions by init functions which
create additional threads.
- Processes plugin: A compilation error on systems without regex.h
has been fixed.
- Processes plugin: A memory leak on Solaris has been fixed.
- Processes plugin: A warning about too long process names has
been added.
- Redis plugin: A memory leak in an error handling code path has
been fixed.
- Redis plugin: The data source type of the expired_keys metric
has been corrected to DERIVE.
- SMART plugin: A build dependency on libudev has been added.
- StatsD plugin: A deadlock on plugin shutdown has been fixed.
- Write HTTP plugin: Freeing of memory holding HTTP headers during
shutdown has been fixed.
- Write Sensu plugin: A segfault when the Tag was unset has been
fixed.
- ZFS ARC plugin: The cache_operation-stolen metric has been
removed for FreeBSD 10.2 and later.
To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 pkgsrc/sysutils/collectd/Makefile
cvs rdiff -u -r1.11 -r1.12 pkgsrc/sysutils/collectd/Makefile.common
cvs rdiff -u -r1.6 -r1.7 pkgsrc/sysutils/collectd/PLIST
cvs rdiff -u -r1.27 -r1.28 pkgsrc/sysutils/collectd/distinfo
cvs rdiff -u -r1.7 -r1.8 pkgsrc/sysutils/collectd/options.mk
cvs rdiff -u -r1.2 -r1.3 pkgsrc/sysutils/collectd-amqp/Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/sysutils/collectd-curl/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/sysutils/collectd-notify-email/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/sysutils/collectd-postgresql/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/sysutils/collectd-riemann/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/sysutils/collectd-snmp/Makefile
cvs rdiff -u -r1.2 -r0 pkgsrc/sysutils/collectd/patches/patch-Makefile.in
cvs rdiff -u -r1.11 -r0 pkgsrc/sysutils/collectd/patches/patch-configure
cvs rdiff -u -r1.9 -r1.10 pkgsrc/sysutils/collectd/patches/patch-configure.ac
cvs rdiff -u -r1.2 -r1.3 \
pkgsrc/sysutils/collectd/patches/patch-src_Makefile.am \
pkgsrc/sysutils/collectd/patches/patch-src_irq.c \
pkgsrc/sysutils/collectd/patches/patch-src_memory.c \
pkgsrc/sysutils/collectd/patches/patch-src_swap.c
cvs rdiff -u -r1.5 -r0 pkgsrc/sysutils/collectd/patches/patch-src_Makefile.in
cvs rdiff -u -r1.1 -r0 \
pkgsrc/sysutils/collectd/patches/patch-src_collectd-tg.c \
pkgsrc/sysutils/collectd/patches/patch-version-gen.sh
cvs rdiff -u -r1.4 -r0 pkgsrc/sysutils/collectd/patches/patch-src_config.h.in
cvs rdiff -u -r1.1 -r1.2 pkgsrc/sysutils/collectd/patches/patch-src_cpu.c \
pkgsrc/sysutils/collectd/patches/patch-src_libcollectclient_network__buffer.c
cvs rdiff -u -r0 -r1.1 \
pkgsrc/sysutils/collectd/patches/patch-src_daemon_Makefile.am
cvs rdiff -u -r1.3 -r1.4 pkgsrc/sysutils/p5-collectd/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/sysutils/py-collectd/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/sysutils/collectd/Makefile
diff -u pkgsrc/sysutils/collectd/Makefile:1.17 pkgsrc/sysutils/collectd/Makefile:1.18
--- pkgsrc/sysutils/collectd/Makefile:1.17 Sat Jul 9 06:38:58 2016
+++ pkgsrc/sysutils/collectd/Makefile Thu Oct 13 15:17:28 2016
@@ -1,6 +1,5 @@
-# $NetBSD: Makefile,v 1.17 2016/07/09 06:38:58 wiz Exp $
+# $NetBSD: Makefile,v 1.18 2016/10/13 15:17:28 fhajny Exp $
-PKGREVISION= 12
.include "../../sysutils/collectd/Makefile.common"
COMMENT= Statistics collection daemon base
@@ -25,6 +24,8 @@ CONFIGURE_ARGS+= --enable-${option}
# Several libs not generated in time for linking collectd
MAKE_JOBS_SAFE= no
+INSTALL_MAKE_FLAGS+= sysconfdir=${PREFIX}/share/examples/collectd
+
.include "options.mk"
CONF_FILES+= share/examples/collectd/collectd.conf \
Index: pkgsrc/sysutils/collectd/Makefile.common
diff -u pkgsrc/sysutils/collectd/Makefile.common:1.11 pkgsrc/sysutils/collectd/Makefile.common:1.12
--- pkgsrc/sysutils/collectd/Makefile.common:1.11 Wed Oct 28 11:46:07 2015
+++ pkgsrc/sysutils/collectd/Makefile.common Thu Oct 13 15:17:28 2016
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.11 2015/10/28 11:46:07 jperkin Exp $
+# $NetBSD: Makefile.common,v 1.12 2016/10/13 15:17:28 fhajny Exp $
#
# used by sysutils/collectd/Makefile
# used by sysutils/collectd-amqp/Makefile
@@ -16,9 +16,10 @@
# used by sysutils/p5-collectd/Makefile
# used by sysutils/py-collectd/Makefile
-DISTNAME= collectd-5.5.0
+DISTNAME= collectd-5.6.1
MASTER_SITES= http://collectd.org/files/
CATEGORIES= sysutils
+EXTRACT_SUFX= .tar.bz2
MAINTAINER= filip%joyent.com@localhost
HOMEPAGE= http://collectd.org/
@@ -26,7 +27,7 @@ LICENSE= gnu-gpl-v2
GNU_CONFIGURE= yes
USE_LIBTOOL= yes
-USE_TOOLS+= pkg-config
+USE_TOOLS+= autoconf automake pkg-config
USE_LANGUAGES= c c99 c++
DISTINFO_FILE= ${.CURDIR}/../../sysutils/collectd/distinfo
@@ -69,6 +70,8 @@ CONFIGURE_ARGS+= --localstatedir=${VARBA
CONFIGURE_ARGS+= --with-ltdl-lib=${BUILDLINK_PREFIX.libltdl}/lib
CONFIGURE_ARGS+= --with-ltdl-include=${BUILDLINK_PREFIX.libltdl}/include
+CONFIGURE_ARGS.NetBSD+= ac_cv_func_getfsstat=no
+
CPPFLAGS.SunOS+= -DSOLARIS2=${OS_VERSION:C/5.//}
.include "../../mk/compiler.mk"
@@ -78,5 +81,14 @@ CFLAGS+= -Wno-error=tautological-pointer
-Wno-error=pointer-bool-conversion
.endif
+SUBST_CLASSES+= ver
+SUBST_MESSAGE.ver= Fixing canonical version number
+SUBST_STAGE.ver= pre-configure
+SUBST_FILES.ver= configure.ac
+SUBST_SED.ver= -e 's,m4_esyscmd(./version-gen.sh),${PKGVERSION_NOREV},'
+
+pre-configure:
+ cd ${WRKSRC} && autoreconf
+
.include "../../devel/libltdl/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
Index: pkgsrc/sysutils/collectd/PLIST
diff -u pkgsrc/sysutils/collectd/PLIST:1.6 pkgsrc/sysutils/collectd/PLIST:1.7
--- pkgsrc/sysutils/collectd/PLIST:1.6 Sat Sep 12 19:04:56 2015
+++ pkgsrc/sysutils/collectd/PLIST Thu Oct 13 15:17:28 2016
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.6 2015/09/12 19:04:56 he Exp $
+@comment $NetBSD: PLIST,v 1.7 2016/10/13 15:17:28 fhajny Exp $
bin/collectd-nagios
bin/collectd-tg
bin/collectdctl
@@ -13,10 +13,10 @@ ${PLIST.battery}lib/collectd/battery.la
${PLIST.contextswitch}lib/collectd/contextswitch.la
${PLIST.cpu}lib/collectd/cpu.la
lib/collectd/csv.la
-${PLIST.entropy}lib/collectd/entropy.la
${PLIST.df}lib/collectd/df.la
${PLIST.disk}lib/collectd/disk.la
lib/collectd/email.la
+${PLIST.entropy}lib/collectd/entropy.la
lib/collectd/exec.la
lib/collectd/filecount.la
lib/collectd/hddtemp.la
@@ -50,8 +50,8 @@ lib/collectd/target_replace.la
lib/collectd/target_scale.la
lib/collectd/target_set.la
lib/collectd/target_v5upgrade.la
-lib/collectd/teamspeak2.la
${PLIST.tcpconns}lib/collectd/tcpconns.la
+lib/collectd/teamspeak2.la
lib/collectd/threshold.la
lib/collectd/unixsock.la
${PLIST.uptime}lib/collectd/uptime.la
@@ -59,6 +59,7 @@ ${PLIST.users}lib/collectd/users.la
lib/collectd/uuid.la
lib/collectd/write_graphite.la
${PLIST.zfs-arc}lib/collectd/zfs_arc.la
+${PLIST.zone}lib/collectd/zone.la
lib/libcollectdclient.la
lib/pkgconfig/libcollectdclient.pc
man/man1/collectd-nagios.1
@@ -69,6 +70,7 @@ man/man1/collectdmon.1
man/man5/collectd-email.5
man/man5/collectd-exec.5
man/man5/collectd-java.5
+man/man5/collectd-lua.5
man/man5/collectd-perl.5
man/man5/collectd-python.5
man/man5/collectd-snmp.5
Index: pkgsrc/sysutils/collectd/distinfo
diff -u pkgsrc/sysutils/collectd/distinfo:1.27 pkgsrc/sysutils/collectd/distinfo:1.28
--- pkgsrc/sysutils/collectd/distinfo:1.27 Wed Feb 3 15:10:43 2016
+++ pkgsrc/sysutils/collectd/distinfo Thu Oct 13 15:17:28 2016
@@ -1,28 +1,23 @@
-$NetBSD: distinfo,v 1.27 2016/02/03 15:10:43 he Exp $
+$NetBSD: distinfo,v 1.28 2016/10/13 15:17:28 fhajny Exp $
-SHA1 (collectd-5.5.0.tar.gz) = d24e284c1eae20c5e75b846c8b2612ab65bd5565
-RMD160 (collectd-5.5.0.tar.gz) = 2197758942a5fe56e4eabda3786f09d4138e943a
-SHA512 (collectd-5.5.0.tar.gz) = b7ab9db91bf8c0eadbf9893421c019239acf85d2d84a5adb834582ed218a7dd03f750b7279dc4b1bb0030a8b9d3302bea9ae9f201c913128e1896cbd1349b5a9
-Size (collectd-5.5.0.tar.gz) = 2244454 bytes
+SHA1 (collectd-5.6.1.tar.bz2) = 20b773928743b346e0962fc1dc37167390a16d80
+RMD160 (collectd-5.6.1.tar.bz2) = 5247f6b4a0936ac9715189e16afe6f65bee94788
+SHA512 (collectd-5.6.1.tar.bz2) = da25f1a9cbaf47533f5a4d2f5f78b966317d4f21865c5a714954ad9d7d02b4798a3e0471ce52199dc80e01dc2808376cb10a7e19c402aafc984bf595f09951a6
+Size (collectd-5.6.1.tar.bz2) = 1903962 bytes
SHA1 (patch-Makefile.am) = ed45b75293a4ea2dd577d04eeb3b9017b8f47319
-SHA1 (patch-Makefile.in) = a7cf69ca29c526be643af0ef85544e3a2dc80a77
-SHA1 (patch-configure) = f4bf389b98f03152347f0d1c6fba34e948e81625
-SHA1 (patch-configure.ac) = 8313b139c3b23f10e26a42a976e97b09ad72e656
-SHA1 (patch-src_Makefile.am) = 45930ca400c6c67927020c9a264d3d5adc30ca46
-SHA1 (patch-src_Makefile.in) = 46bea4aa9a045e56478ff96730245134ddb0b362
-SHA1 (patch-src_collectd-tg.c) = f9f41dfb0b1b55a62202128a165d5c9943faf5bc
+SHA1 (patch-configure.ac) = f450d6b00e5c7c37214b4d90ca057c515ed08fa1
+SHA1 (patch-src_Makefile.am) = 1d5cc2f58ce776df04feab2afc937f12ee7b0765
SHA1 (patch-src_collectd.conf.in) = f0b35085cf0ddfd766e140b145177ab1f1326f5f
-SHA1 (patch-src_config.h.in) = be17db23b6ee7a90ba57e73f073ed5be11c369c5
-SHA1 (patch-src_cpu.c) = 55b5cfc69bf0df279d1a12003eb6a8e681155e18
+SHA1 (patch-src_cpu.c) = 32af60d7e49edf9d16481b705bc1ea429c90c82b
+SHA1 (patch-src_daemon_Makefile.am) = e38d465faf8bdd750fd9cb7f0bd9f041fcc8f83c
SHA1 (patch-src_df.c) = 7e75dfbc72ecad48eb0eb7427a19329daf6b9a60
SHA1 (patch-src_disk.c) = 159862e8ca1e841e3c4013c03ba03f059fdbbab5
SHA1 (patch-src_entropy.c) = 4fa683654936f57fb7366faebb93d572af08db9c
-SHA1 (patch-src_irq.c) = 8d5c516fea31bf2ab9736c32540be3223dea15d9
-SHA1 (patch-src_libcollectclient_network__buffer.c) = e07d403d299613fa0885a0e7285849eb85510253
-SHA1 (patch-src_memory.c) = f48d50245176426e26af7fa1b1f4ff6fbf0b1d95
+SHA1 (patch-src_irq.c) = 6e414b6fd664e784edd5aa9f907c8cfa80a0cd48
+SHA1 (patch-src_libcollectclient_network__buffer.c) = 76c94284b4078259985b70168342ac306b4505b7
+SHA1 (patch-src_memory.c) = b15225915ff23beed0b75c45be2eb3940d3717fd
SHA1 (patch-src_netstat__udp.c) = 30cb12d25f56c60959658dbd181783212e00cc61
SHA1 (patch-src_processes.c) = e00d2edf6b4e6bfe3663e34fffb05f40652affe5
-SHA1 (patch-src_swap.c) = e7602eb83eed6b90752b8293b9666b94bdd42493
+SHA1 (patch-src_swap.c) = 304a25324099495fb875127221ed5fc95173a164
SHA1 (patch-src_tcpconns.c) = 712af1b821d62217283df884dd283d5b1218ab7c
SHA1 (patch-src_utils__dns.c) = c3782dc9127f42da30e3142b853aa2cb2259af94
-SHA1 (patch-version-gen.sh) = 07d830019e22ac651514b75acf299b1f50c4632d
Index: pkgsrc/sysutils/collectd/options.mk
diff -u pkgsrc/sysutils/collectd/options.mk:1.7 pkgsrc/sysutils/collectd/options.mk:1.8
--- pkgsrc/sysutils/collectd/options.mk:1.7 Fri Feb 26 10:24:11 2016
+++ pkgsrc/sysutils/collectd/options.mk Thu Oct 13 15:17:28 2016
@@ -1,13 +1,13 @@
-# $NetBSD: options.mk,v 1.7 2016/02/26 10:24:11 jperkin Exp $
+# $NetBSD: options.mk,v 1.8 2016/10/13 15:17:28 fhajny Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.collectd
PKG_SUPPORTED_OPTIONS= cpu df interface load memory syslog uptime
PKG_SUGGESTED_OPTIONS+= cpu df interface load memory syslog uptime
PKG_SUPPORTED_OPTIONS.NetBSD+= contextswitch disk entropy irq pf netstat_udp
-PKG_SUPPORTED_OPTIONS.NetBSD+= processes swap tcpconns users
+PKG_SUPPORTED_OPTIONS.NetBSD+= swap tcpconns users
PKG_SUGGESTED_OPTIONS.NetBSD+= contextswitch disk entropy irq pf netstat_udp
-PKG_SUGGESTED_OPTIONS.NetBSD+= processes swap tcpconns users
+PKG_SUGGESTED_OPTIONS.NetBSD+= swap tcpconns users
PKG_SUPPORTED_OPTIONS.FreeBSD+= contextswitch pf processes swap tcpconns zfs-arc
PKG_SUGGESTED_OPTIONS.FreeBSD+= contextswitch pf processes swap tcpconns zfs-arc
@@ -17,8 +17,8 @@ PKG_SUPPORTED_OPTIONS.Darwin+= processes
PKG_SUGGESTED_OPTIONS.Darwin+= apple-sensors battery contextswitch disk
PKG_SUGGESTED_OPTIONS.Darwin+= processes swap tcpconns users
-PKG_SUPPORTED_OPTIONS.SunOS+= disk nfs swap users zfs-arc
-PKG_SUGGESTED_OPTIONS.SunOS+= disk nfs swap users zfs-arc
+PKG_SUPPORTED_OPTIONS.SunOS+= disk nfs swap users zfs-arc zone
+PKG_SUGGESTED_OPTIONS.SunOS+= disk nfs swap users zfs-arc zone
.include "../../mk/bsd.options.mk"
@@ -26,7 +26,7 @@ PLIST_VARS+= apple-sensors battery cont
df disk \
interface irq load netstat_udp \
memory nfs pf processes swap \
- syslog tcpconns uptime users zfs-arc
+ syslog tcpconns uptime users zfs-arc zone
.for option in ${PLIST_VARS}
. if !empty(PKG_OPTIONS:M${option})
Index: pkgsrc/sysutils/collectd-amqp/Makefile
diff -u pkgsrc/sysutils/collectd-amqp/Makefile:1.2 pkgsrc/sysutils/collectd-amqp/Makefile:1.3
--- pkgsrc/sysutils/collectd-amqp/Makefile:1.2 Sat Mar 5 11:29:28 2016
+++ pkgsrc/sysutils/collectd-amqp/Makefile Thu Oct 13 15:17:28 2016
@@ -1,9 +1,8 @@
-# $NetBSD: Makefile,v 1.2 2016/03/05 11:29:28 jperkin Exp $
+# $NetBSD: Makefile,v 1.3 2016/10/13 15:17:28 fhajny Exp $
COLLECTD_PACKAGE= amqp
COMMENT= Statistics collection daemon - amqp plugin
-PKGREVISION= 1
.include "../../sysutils/collectd/Makefile.common"
Index: pkgsrc/sysutils/collectd-curl/Makefile
diff -u pkgsrc/sysutils/collectd-curl/Makefile:1.3 pkgsrc/sysutils/collectd-curl/Makefile:1.4
--- pkgsrc/sysutils/collectd-curl/Makefile:1.3 Fri Oct 7 18:26:10 2016
+++ pkgsrc/sysutils/collectd-curl/Makefile Thu Oct 13 15:17:28 2016
@@ -1,10 +1,9 @@
-# $NetBSD: Makefile,v 1.3 2016/10/07 18:26:10 adam Exp $
+# $NetBSD: Makefile,v 1.4 2016/10/13 15:17:28 fhajny Exp $
COLLECTD_PACKAGE= curl
COLLECTD_PLUGINS= curl curl_json curl_xml apache bind nginx write_http
COMMENT= Statistics collection daemon - curl-based plugins
-PKGREVISION= 2
.include "../../sysutils/collectd/Makefile.common"
Index: pkgsrc/sysutils/collectd-notify-email/Makefile
diff -u pkgsrc/sysutils/collectd-notify-email/Makefile:1.2 pkgsrc/sysutils/collectd-notify-email/Makefile:1.3
--- pkgsrc/sysutils/collectd-notify-email/Makefile:1.2 Sat Mar 5 11:29:29 2016
+++ pkgsrc/sysutils/collectd-notify-email/Makefile Thu Oct 13 15:17:28 2016
@@ -1,9 +1,8 @@
-# $NetBSD: Makefile,v 1.2 2016/03/05 11:29:29 jperkin Exp $
+# $NetBSD: Makefile,v 1.3 2016/10/13 15:17:28 fhajny Exp $
COLLECTD_PACKAGE= notify-email
COMMENT= Statistics collection daemon - notify_email plugin
-PKGREVISION= 1
.include "../../sysutils/collectd/Makefile.common"
Index: pkgsrc/sysutils/collectd-postgresql/Makefile
diff -u pkgsrc/sysutils/collectd-postgresql/Makefile:1.4 pkgsrc/sysutils/collectd-postgresql/Makefile:1.5
--- pkgsrc/sysutils/collectd-postgresql/Makefile:1.4 Sun Oct 9 21:42:03 2016
+++ pkgsrc/sysutils/collectd-postgresql/Makefile Thu Oct 13 15:17:28 2016
@@ -1,9 +1,8 @@
-# $NetBSD: Makefile,v 1.4 2016/10/09 21:42:03 wiz Exp $
+# $NetBSD: Makefile,v 1.5 2016/10/13 15:17:28 fhajny Exp $
COLLECTD_PACKAGE= postgresql
PKGNAME= ${DISTNAME:S/collectd/collectd-${COLLECTD_PACKAGE}${PGSQL_VERSION}/}
-PKGREVISION= 1
COMMENT= Statistics collection daemon - postgresql plugin
.include "../../sysutils/collectd/Makefile.common"
Index: pkgsrc/sysutils/collectd-riemann/Makefile
diff -u pkgsrc/sysutils/collectd-riemann/Makefile:1.1 pkgsrc/sysutils/collectd-riemann/Makefile:1.2
--- pkgsrc/sysutils/collectd-riemann/Makefile:1.1 Wed Oct 28 11:44:52 2015
+++ pkgsrc/sysutils/collectd-riemann/Makefile Thu Oct 13 15:17:28 2016
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2015/10/28 11:44:52 jperkin Exp $
+# $NetBSD: Makefile,v 1.2 2016/10/13 15:17:28 fhajny Exp $
COLLECTD_PACKAGE= riemann
COLLECTD_PLUGINS= write_riemann
@@ -7,8 +7,6 @@ COMMENT= Statistics collection daemon -
.include "../../sysutils/collectd/Makefile.common"
-# Work around incorrect dependencies in src/Makefile
-BUILD_TARGET= riemann.pb-c.lo write_riemann.la
-
.include "../../devel/protobuf-c/buildlink3.mk"
+.include "../../sysutils/riemann-client/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/sysutils/collectd-snmp/Makefile
diff -u pkgsrc/sysutils/collectd-snmp/Makefile:1.2 pkgsrc/sysutils/collectd-snmp/Makefile:1.3
--- pkgsrc/sysutils/collectd-snmp/Makefile:1.2 Sat Mar 5 11:29:29 2016
+++ pkgsrc/sysutils/collectd-snmp/Makefile Thu Oct 13 15:17:29 2016
@@ -1,9 +1,8 @@
-# $NetBSD: Makefile,v 1.2 2016/03/05 11:29:29 jperkin Exp $
+# $NetBSD: Makefile,v 1.3 2016/10/13 15:17:29 fhajny Exp $
COLLECTD_PACKAGE= snmp
COMMENT= Statistics collection daemon - snmp plugin
-PKGREVISION= 1
.include "../../sysutils/collectd/Makefile.common"
Index: pkgsrc/sysutils/collectd/patches/patch-configure.ac
diff -u pkgsrc/sysutils/collectd/patches/patch-configure.ac:1.9 pkgsrc/sysutils/collectd/patches/patch-configure.ac:1.10
--- pkgsrc/sysutils/collectd/patches/patch-configure.ac:1.9 Wed Feb 3 13:10:27 2016
+++ pkgsrc/sysutils/collectd/patches/patch-configure.ac Thu Oct 13 15:17:28 2016
@@ -1,87 +1,20 @@
-$NetBSD: patch-configure.ac,v 1.9 2016/02/03 13:10:27 he Exp $
+$NetBSD: patch-configure.ac,v 1.10 2016/10/13 15:17:28 fhajny Exp $
Add KERNEL_NETBSD, add entry and disk plugins for NetBSD,
and also do swap for "have_swapctl_three_args" (as for NetBSD).
Also, the start of process support, but that's not yet finished.
---- configure.ac.orig 2015-05-27 07:51:35.000000000 +0000
+--- configure.ac.orig 2016-09-11 08:10:25.243038749 +0000
+++ configure.ac
-@@ -77,6 +77,10 @@ case $host_os in
- AC_DEFINE([KERNEL_OPENBSD], 1, [True if program is to be compiled for an OpenBSD kernel])
- ac_system="OpenBSD"
- ;;
-+ *netbsd*)
-+ AC_DEFINE([KERNEL_NETBSD], 1, [True if program is to be compiled for a NetBSD kernel])
-+ ac_system="NetBSD"
-+ ;;
- *aix*)
- AC_DEFINE([KERNEL_AIX], 1, [True if program is to be compiled for a AIX kernel])
- ac_system="AIX"
-@@ -151,6 +155,18 @@ AC_HEADER_STDBOOL
+@@ -147,6 +147,7 @@ AM_CONDITIONAL([BUILD_DARWIN], [test "x$
+ AM_CONDITIONAL([BUILD_FREEBSD], [test "x$ac_system" = "xFreeBSD"])
+ AM_CONDITIONAL([BUILD_LINUX], [test "x$ac_system" = "xLinux"])
+ AM_CONDITIONAL([BUILD_OPENBSD], [test "x$ac_system" = "xOpenBSD"])
++AM_CONDITIONAL([BUILD_NETBSD], [test "x$ac_system" = "xNetBSD"])
+ AM_CONDITIONAL([BUILD_SOLARIS], [test "x$ac_system" = "xSolaris"])
- AC_CHECK_HEADERS(stdio.h errno.h math.h stdarg.h syslog.h fcntl.h signal.h assert.h sys/types.h sys/socket.h sys/select.h poll.h netdb.h arpa/inet.h sys/resource.h sys/param.h kstat.h regex.h
sys/ioctl.h endian.h sys/isa_defs.h fnmatch.h libgen.h)
-
-+# For entropy plugin on newer NetBSD
-+AC_CHECK_HEADERS(sys/rndio.h, [], [],
-+[#if HAVE_SYS_TYPES_H
-+# include <sys/types.h>
-+#endif
-+#if HAVE_SYS_IOCTL_H
-+# include <sys/ioctl.h>
-+#endif
-+#if HAVE_SYS_PARAM_H
-+# include <sys/param.h>
-+#endif
-+])
- # For ping library
- AC_CHECK_HEADERS(netinet/in_systm.h, [], [],
- [#if HAVE_STDINT_H
-@@ -329,6 +345,22 @@ then
- else
- AC_MSG_RESULT([no])
- fi
-+AC_MSG_CHECKING([for sysctl kern.cp_time])
-+if test -x /sbin/sysctl
-+then
-+ /sbin/sysctl kern.cp_time 2>/dev/null
-+ if test $? -eq 0
-+ then
-+ AC_MSG_RESULT([yes])
-+ AC_DEFINE(HAVE_SYSCTL_KERN_CP_TIME, 1,
-+ [Define if sysctl supports kern.cp_time])
-+ else
-+ AC_MSG_RESULT([no])
-+ fi
-+else
-+ AC_MSG_RESULT([no])
-+fi
-+
-
- # For hddtemp module
- AC_CHECK_HEADERS(linux/major.h)
-@@ -1363,6 +1395,21 @@ AC_CHECK_MEMBERS([struct kinfo_proc.p_pi
- #include <kvm.h>
- ])
-
-+AC_CHECK_MEMBERS([struct kinfo_proc2.p_pid, struct kinfo_proc2.p_uru_maxrss],
-+ [
-+ AC_DEFINE(HAVE_STRUCT_KINFO_PROC2_NETBSD, 1,
-+ [Define if struct kinfo_proc2 exists in the NetBSD variant.])
-+ have_struct_kinfo_proc2_netbsd="yes"
-+ ],
-+ [
-+ have_struct_kinfo_proc2_netbsd="no"
-+ ],
-+ [
-+#include <sys/param.h>
-+#include <sys/sysctl.h>
-+#include <kvm.h>
-+ ])
-+
- AC_CHECK_MEMBERS([struct udphdr.uh_dport, struct udphdr.uh_sport], [], [],
- [#define _BSD_SOURCE
- #define _DEFAULT_SOURCE
-@@ -5175,6 +5222,7 @@ plugin_load="no"
+ if test "x$ac_system" = "xLinux"
+@@ -5717,6 +5718,7 @@ plugin_load="no"
plugin_log_logstash="no"
plugin_memory="no"
plugin_multimeter="no"
@@ -89,47 +22,27 @@ Also, the start of process support, but
plugin_nfs="no"
plugin_numa="no"
plugin_perl="no"
-@@ -5244,6 +5292,15 @@ then
- plugin_tcpconns="yes"
+@@ -5803,6 +5805,7 @@ then
+ plugin_entropy="yes"
+ plugin_irq="yes"
+ plugin_processes="yes"
++ plugin_netstat_udp="yes"
fi
-+if test "x$ac_system" = "xNetBSD"
-+then
-+ plugin_entropy="yes"
-+ plugin_irq="yes"
-+ plugin_processes="yes"
-+ plugin_disk="yes"
-+ plugin_netstat_udp="yes"
-+fi
-+
# Mac OS X devices
- if test "x$with_libiokit" = "xyes"
- then
-@@ -5482,6 +5539,11 @@ then
- plugin_swap="yes"
- fi
-
-+if test "x$have_swapctl" = "xyes" && test "x$c_cv_have_swapctl_three_args" = "xyes"
-+then
-+ plugin_swap="yes"
-+fi
-+
- if test "x$with_kvm_openfiles$with_kvm_nlist" = "xyesyes"
- then
- plugin_tcpconns="yes"
-@@ -5585,6 +5647,7 @@ AC_PLUGIN([multimeter], [$plugin_multim
- AC_PLUGIN([mysql], [$with_libmysql], [MySQL statistics])
- AC_PLUGIN([netapp], [$with_libnetapp], [NetApp plugin])
- AC_PLUGIN([netlink], [$with_libmnl], [Enhanced Linux network statistics])
-+AC_PLUGIN([netstat_udp], [$plugin_netstat_udp], [UDP network statistics])
- AC_PLUGIN([network], [yes], [Network communication plugin])
- AC_PLUGIN([nfs], [$plugin_nfs], [NFS statistics])
- AC_PLUGIN([nginx], [$with_libcurl], [nginx statistics])
-@@ -5963,6 +6026,7 @@ Configuration:
- mysql . . . . . . . . $enable_mysql
- netapp . . . . . . . $enable_netapp
- netlink . . . . . . . $enable_netlink
-+ netstat_udp . . . . . $enable_netstat_udp
- network . . . . . . . $enable_network
- nfs . . . . . . . . . $enable_nfs
- nginx . . . . . . . . $enable_nginx
+@@ -6194,6 +6197,7 @@ AC_PLUGIN([multimeter], [$plugi
+ AC_PLUGIN([mysql], [$with_libmysql], [MySQL statistics])
+ AC_PLUGIN([netapp], [$with_libnetapp], [NetApp plugin])
+ AC_PLUGIN([netlink], [$with_libmnl], [Enhanced Linux network statistics])
++AC_PLUGIN([netstat_udp], [$plugin_netstat_udp], [UDP network statistics])
+ AC_PLUGIN([network], [yes], [Network communication plugin])
+ AC_PLUGIN([nfs], [$plugin_nfs], [NFS statistics])
+ AC_PLUGIN([nginx], [$with_libcurl], [nginx statistics])
+@@ -6624,6 +6628,7 @@ AC_MSG_RESULT([ multimeter . . . . .
+ AC_MSG_RESULT([ mysql . . . . . . . . $enable_mysql])
+ AC_MSG_RESULT([ netapp . . . . . . . $enable_netapp])
+ AC_MSG_RESULT([ netlink . . . . . . . $enable_netlink])
++AC_MSG_RESULT([ netstat_udp . . . . . $enable_netstat_udp])
+ AC_MSG_RESULT([ network . . . . . . . $enable_network])
+ AC_MSG_RESULT([ nfs . . . . . . . . . $enable_nfs])
+ AC_MSG_RESULT([ nginx . . . . . . . . $enable_nginx])
Index: pkgsrc/sysutils/collectd/patches/patch-src_Makefile.am
diff -u pkgsrc/sysutils/collectd/patches/patch-src_Makefile.am:1.2 pkgsrc/sysutils/collectd/patches/patch-src_Makefile.am:1.3
--- pkgsrc/sysutils/collectd/patches/patch-src_Makefile.am:1.2 Sat Sep 12 19:04:56 2015
+++ pkgsrc/sysutils/collectd/patches/patch-src_Makefile.am Thu Oct 13 15:17:28 2016
@@ -1,10 +1,10 @@
-$NetBSD: patch-src_Makefile.am,v 1.2 2015/09/12 19:04:56 he Exp $
+$NetBSD: patch-src_Makefile.am,v 1.3 2016/10/13 15:17:28 fhajny Exp $
Install config file in example directory.
---- src/Makefile.am.orig 2015-05-26 19:38:14.000000000 +0000
+--- src/Makefile.am.orig 2016-09-11 08:10:25.251038738 +0000
+++ src/Makefile.am
-@@ -14,13 +14,15 @@ AM_CPPFLAGS = -I$(srcdir)/daemon
+@@ -10,7 +10,7 @@ AM_CPPFLAGS = -I$(srcdir)/daemon
AM_CPPFLAGS += -DPREFIX='"${prefix}"'
AM_CPPFLAGS += -DCONFIGFILE='"${sysconfdir}/${PACKAGE_NAME}.conf"'
AM_CPPFLAGS += -DLOCALSTATEDIR='"${localstatedir}"'
@@ -13,15 +13,7 @@ Install config file in example directory
if BUILD_FEATURE_DAEMON
AM_CPPFLAGS += -DPIDFILE='"${localstatedir}/run/${PACKAGE_NAME}.pid"'
endif
- AM_CPPFLAGS += -DPLUGINDIR='"${pkglibdir}"'
- AM_CPPFLAGS += -DPKGDATADIR='"${pkgdatadir}"'
-
-+egdir = @exec_prefix@/share/examples/@PACKAGE@
-+
- AUTOMAKE_OPTIONS = subdir-objects
-
- noinst_LTLIBRARIES = libmount.la liblookup.la
-@@ -657,6 +659,12 @@ netlink_la_CFLAGS = $(AM_CFLAGS) $(BUILD
+@@ -737,6 +737,12 @@ netlink_la_CFLAGS = $(AM_CFLAGS) $(BUILD
netlink_la_LIBADD = $(BUILD_WITH_LIBMNL_LIBS)
endif
@@ -34,28 +26,3 @@ Install config file in example directory
if BUILD_PLUGIN_NETWORK
pkglib_LTLIBRARIES += network.la
network_la_SOURCES = network.c network.h \
-@@ -1363,13 +1371,8 @@ riemann.pb-c.c riemann.pb-c.h: riemann.p
- endif
-
- install-exec-hook:
-- $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
-- if test -e $(DESTDIR)$(sysconfdir)/collectd.conf; \
-- then \
-- $(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf.pkg-orig; \
-- else \
-- $(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf; \
-- fi; \
-+ $(mkinstalldirs) $(DESTDIR)$(egdir)
-+ $(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(egdir)/collectd.conf
- $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
- $(INSTALL) -m 0644 $(srcdir)/types.db $(DESTDIR)$(pkgdatadir)/types.db;
- $(INSTALL) -m 0644 $(srcdir)/postgresql_default.conf \
-@@ -1377,7 +1380,7 @@ install-exec-hook:
-
- uninstall-hook:
- rm -f $(DESTDIR)$(pkgdatadir)/types.db;
-- rm -f $(DESTDIR)$(sysconfdir)/collectd.conf
-+ rm -f $(DESTDIR)$(egdir)/collectd.conf
- rm -f $(DESTDIR)$(pkgdatadir)/postgresql_default.conf;
-
- check_PROGRAMS = test_utils_mount test_utils_vl_lookup
Index: pkgsrc/sysutils/collectd/patches/patch-src_irq.c
diff -u pkgsrc/sysutils/collectd/patches/patch-src_irq.c:1.2 pkgsrc/sysutils/collectd/patches/patch-src_irq.c:1.3
--- pkgsrc/sysutils/collectd/patches/patch-src_irq.c:1.2 Wed Feb 3 15:10:43 2016
+++ pkgsrc/sysutils/collectd/patches/patch-src_irq.c Thu Oct 13 15:17:28 2016
@@ -1,11 +1,11 @@
-$NetBSD: patch-src_irq.c,v 1.2 2016/02/03 15:10:43 he Exp $
+$NetBSD: patch-src_irq.c,v 1.3 2016/10/13 15:17:28 fhajny Exp $
Provide a port to NetBSD.
---- src/irq.c.orig 2014-09-05 08:57:01.000000000 +0000
+--- src/irq.c.orig 2016-09-11 08:10:25.263038721 +0000
+++ src/irq.c
-@@ -27,10 +27,22 @@
- #include "configfile.h"
+@@ -27,10 +27,20 @@
+ #include "plugin.h"
#include "utils_ignorelist.h"
-#if !KERNEL_LINUX
@@ -23,12 +23,10 @@ Provide a port to NetBSD.
+
+#endif /* KERNEL_NETBSD */
+
-+
-+
/*
* (Module-)Global variables
*/
-@@ -90,6 +102,7 @@ static void irq_submit (const char *irq_
+@@ -90,6 +100,7 @@ static void irq_submit (const char *irq_
plugin_dispatch_values (&vl);
} /* void irq_submit */
@@ -36,7 +34,7 @@ Provide a port to NetBSD.
static int irq_read (void)
{
FILE *fh;
-@@ -183,6 +196,64 @@ static int irq_read (void)
+@@ -188,6 +199,64 @@ static int irq_read (void)
return (0);
} /* int irq_read */
Index: pkgsrc/sysutils/collectd/patches/patch-src_memory.c
diff -u pkgsrc/sysutils/collectd/patches/patch-src_memory.c:1.2 pkgsrc/sysutils/collectd/patches/patch-src_memory.c:1.3
--- pkgsrc/sysutils/collectd/patches/patch-src_memory.c:1.2 Sun Aug 16 08:01:58 2015
+++ pkgsrc/sysutils/collectd/patches/patch-src_memory.c Thu Oct 13 15:17:28 2016
@@ -1,11 +1,11 @@
-$NetBSD: patch-src_memory.c,v 1.2 2015/08/16 08:01:58 he Exp $
+$NetBSD: patch-src_memory.c,v 1.3 2016/10/13 15:17:28 fhajny Exp $
Add a port for NetBSD using VM_UVMEXP2, and preferring
sysctl over sysctlbyname.
---- src/memory.c.orig 2015-03-10 14:14:45.000000000 +0000
+--- src/memory.c.orig 2016-09-11 08:10:25.267038716 +0000
+++ src/memory.c
-@@ -65,6 +65,10 @@ static mach_port_t port_host;
+@@ -66,6 +66,10 @@ static mach_port_t port_host;
static vm_size_t pagesize;
/* #endif HAVE_HOST_STATISTICS */
@@ -16,8 +16,8 @@ sysctl over sysctlbyname.
#elif HAVE_SYSCTLBYNAME
/* no global variables */
/* #endif HAVE_SYSCTLBYNAME */
-@@ -78,10 +82,6 @@ static int pagesize;
- static kstat_t *ksp;
+@@ -80,10 +84,6 @@ static kstat_t *ksp;
+ static kstat_t *ksz;
/* #endif HAVE_LIBKSTAT */
-#elif HAVE_SYSCTL
@@ -27,7 +27,7 @@ sysctl over sysctlbyname.
#elif HAVE_LIBSTATGRAB
/* no global variables */
/* endif HAVE_LIBSTATGRAB */
-@@ -92,6 +92,10 @@ static int pagesize;
+@@ -94,6 +94,10 @@ static int pagesize;
# error "No applicable input method."
#endif
@@ -54,8 +54,8 @@ sysctl over sysctlbyname.
#elif HAVE_SYSCTLBYNAME
/* no init stuff */
/* #endif HAVE_SYSCTLBYNAME */
-@@ -139,15 +152,6 @@ static int memory_init (void)
- }
+@@ -145,15 +158,6 @@ static int memory_init (void)
+
/* #endif HAVE_LIBKSTAT */
-#elif HAVE_SYSCTL
@@ -70,7 +70,7 @@ sysctl over sysctlbyname.
#elif HAVE_LIBSTATGRAB
/* no init stuff */
/* #endif HAVE_LIBSTATGRAB */
-@@ -221,6 +225,46 @@ static int memory_read_internal (value_l
+@@ -227,6 +231,46 @@ static int memory_read_internal (value_l
/* #endif HAVE_HOST_STATISTICS */
#elif HAVE_SYSCTLBYNAME
@@ -117,7 +117,7 @@ sysctl over sysctlbyname.
/*
* vm.stats.vm.v_page_size: 4096
* vm.stats.vm.v_page_count: 246178
-@@ -272,6 +316,8 @@ static int memory_read_internal (value_l
+@@ -276,6 +320,8 @@ static int memory_read_internal (value_l
"active", (gauge_t) sysctl_vals[4],
"inactive", (gauge_t) sysctl_vals[5],
"cache", (gauge_t) sysctl_vals[6]);
Index: pkgsrc/sysutils/collectd/patches/patch-src_swap.c
diff -u pkgsrc/sysutils/collectd/patches/patch-src_swap.c:1.2 pkgsrc/sysutils/collectd/patches/patch-src_swap.c:1.3
--- pkgsrc/sysutils/collectd/patches/patch-src_swap.c:1.2 Tue Aug 11 14:15:00 2015
+++ pkgsrc/sysutils/collectd/patches/patch-src_swap.c Thu Oct 13 15:17:28 2016
@@ -1,11 +1,11 @@
-$NetBSD: patch-src_swap.c,v 1.2 2015/08/11 14:15:00 he Exp $
+$NetBSD: patch-src_swap.c,v 1.3 2016/10/13 15:17:28 fhajny Exp $
Extend support for NetBSD, and add per-swap-device
reporting for HAVE_SWAPCTL_THREE_ARGS.
---- src/swap.c.orig 2015-05-20 12:04:47.000000000 +0000
+--- src/swap.c.orig 2016-09-11 08:10:25.271038709 +0000
+++ src/swap.c
-@@ -76,9 +76,12 @@ static _Bool report_bytes = 0;
+@@ -77,9 +77,12 @@ static _Bool report_bytes = 0;
static _Bool report_by_device = 0;
/* #endif KERNEL_LINUX */
@@ -19,7 +19,7 @@ reporting for HAVE_SWAPCTL_THREE_ARGS.
static _Bool report_by_device = 0;
/* #endif HAVE_SWAPCTL && HAVE_SWAPCTL_TWO_ARGS */
-@@ -114,7 +117,7 @@ static int swap_config (oconfig_item_t *
+@@ -117,7 +120,7 @@ static int swap_config (oconfig_item_t *
{
oconfig_item_t *child = ci->children + i;
if (strcasecmp ("ReportBytes", child->key) == 0)
@@ -28,7 +28,7 @@ reporting for HAVE_SWAPCTL_THREE_ARGS.
cf_util_get_boolean (child, &report_bytes);
#else
WARNING ("swap plugin: The \"ReportBytes\" option "
-@@ -147,7 +150,7 @@ static int swap_init (void) /* {{{ */
+@@ -150,7 +153,7 @@ static int swap_init (void) /* {{{ */
pagesize = (derive_t) sysconf (_SC_PAGESIZE);
/* #endif KERNEL_LINUX */
@@ -37,7 +37,7 @@ reporting for HAVE_SWAPCTL_THREE_ARGS.
/* getpagesize(3C) tells me this does not fail.. */
pagesize = (derive_t) getpagesize ();
/* #endif HAVE_SWAPCTL */
-@@ -213,7 +216,7 @@ static void swap_submit_usage (char cons
+@@ -216,7 +219,7 @@ static void swap_submit_usage (char cons
other_name, other_value, NULL);
} /* }}} void swap_submit_usage */
@@ -46,7 +46,7 @@ reporting for HAVE_SWAPCTL_THREE_ARGS.
__attribute__((nonnull(1)))
static void swap_submit_derive (char const *type_instance, /* {{{ */
derive_t value)
-@@ -614,6 +617,43 @@ static int swap_read (void) /* {{{ */
+@@ -618,6 +621,43 @@ static int swap_read (void) /* {{{ */
/* #endif HAVE_SWAPCTL && HAVE_SWAPCTL_TWO_ARGS */
#elif HAVE_SWAPCTL && HAVE_SWAPCTL_THREE_ARGS
@@ -90,14 +90,14 @@ reporting for HAVE_SWAPCTL_THREE_ARGS.
static int swap_read (void) /* {{{ */
{
struct swapent *swap_entries;
-@@ -660,23 +700,53 @@ static int swap_read (void) /* {{{ */
+@@ -663,12 +703,33 @@ static int swap_read (void) /* {{{ */
* swap_entries[i].se_path */
- for (i = 0; i < swap_num; i++)
+ for (int i = 0; i < swap_num; i++)
{
+ char path[PATH_MAX];
+ gauge_t this_used;
+ gauge_t this_total;
-+
++
if ((swap_entries[i].se_flags & SWF_ENABLE) == 0)
continue;
@@ -108,8 +108,8 @@ reporting for HAVE_SWAPCTL_THREE_ARGS.
+ * C_SWAP_BLOCK_SIZE;
+ this_total = ((gauge_t) swap_entries[i].se_nblks)
+ * C_SWAP_BLOCK_SIZE;
-+
-+
++
++
+ /* Shortcut for the "combined" setting (default) */
+ if (!report_by_device)
+ {
@@ -122,26 +122,21 @@ reporting for HAVE_SWAPCTL_THREE_ARGS.
+ escape_slashes (path, sizeof (path));
+
+ swap_submit_usage (path, this_used, this_total - this_used,
-+ NULL, NAN);
++ NULL, NAN);
+ } /* for (swap_num) */
-+
if (total < used)
{
- ERROR ("swap plugin: Total swap space (%g) is less than used swap space (%g).",
- total, used);
-+ sfree (swap_entries);
- return (-1);
+@@ -679,8 +740,15 @@ static int swap_read (void) /* {{{ */
}
-- swap_submit_usage (NULL, used, total - used, NULL, NAN);
+ swap_submit_usage (NULL, used, total - used, NULL, NAN);
+ /* If the "separate" option was specified (report_by_device == 1), all
+ * values have already been dispatched from within the loop. */
+ if (!report_by_device)
+ swap_submit_usage (NULL, used, total - used, NULL, NAN);
sfree (swap_entries);
-+
+#if KERNEL_NETBSD
+ swap_read_io ();
+#endif
Index: pkgsrc/sysutils/collectd/patches/patch-src_cpu.c
diff -u pkgsrc/sysutils/collectd/patches/patch-src_cpu.c:1.1 pkgsrc/sysutils/collectd/patches/patch-src_cpu.c:1.2
--- pkgsrc/sysutils/collectd/patches/patch-src_cpu.c:1.1 Wed Aug 26 12:19:27 2015
+++ pkgsrc/sysutils/collectd/patches/patch-src_cpu.c Thu Oct 13 15:17:28 2016
@@ -1,10 +1,10 @@
-$NetBSD: patch-src_cpu.c,v 1.1 2015/08/26 12:19:27 he Exp $
+$NetBSD: patch-src_cpu.c,v 1.2 2016/10/13 15:17:28 fhajny Exp $
Port this too to NetBSD.
---- src/cpu.c.orig 2015-03-10 14:14:45.000000000 +0000
+--- src/cpu.c.orig 2016-09-11 08:10:25.255038733 +0000
+++ src/cpu.c
-@@ -79,7 +79,9 @@
+@@ -80,7 +80,9 @@
#if HAVE_SYSCTL
# if defined(CTL_HW) && defined(HW_NCPU) \
@@ -15,36 +15,36 @@ Port this too to NetBSD.
# define CAN_USE_SYSCTL 1
# else
# define CAN_USE_SYSCTL 0
-@@ -676,6 +678,24 @@ static int cpu_read (void)
+@@ -696,6 +698,24 @@ static int cpu_read (void)
memset (cpuinfo, 0, sizeof (cpuinfo));
+#if defined(KERN_CP_TIME) && defined(KERNEL_NETBSD)
-+ {
-+ int mib[] = {CTL_KERN, KERN_CP_TIME};
++ {
++ int mib[] = {CTL_KERN, KERN_CP_TIME};
+
-+ cpuinfo_size = sizeof(cpuinfo[0]) * numcpu * CPUSTATES;
-+ status = sysctl(mib, 2, cpuinfo, &cpuinfo_size, NULL, 0);
-+ if (status == -1) {
-+ char errbuf[1024];
++ cpuinfo_size = sizeof(cpuinfo[0]) * numcpu * CPUSTATES;
++ status = sysctl(mib, 2, cpuinfo, &cpuinfo_size, NULL, 0);
++ if (status == -1) {
++ char errbuf[1024];
+
-+ ERROR ("cpu plugin: sysctl failed: %s.",
-+ sstrerror (errno, errbuf, sizeof (errbuf)));
-+ return -1;
-+ }
-+ if (cpuinfo_size == (sizeof(cpuinfo[0]) * CPUSTATES)) {
-+ numcpu = 1;
-+ }
-+ }
++ ERROR ("cpu plugin: sysctl failed: %s.",
++ sstrerror (errno, errbuf, sizeof (errbuf)));
++ return -1;
++ }
++ if (cpuinfo_size == (sizeof(cpuinfo[0]) * CPUSTATES)) {
++ numcpu = 1;
++ }
++ }
+#else /* defined(KERN_CP_TIME) && defined(KERNEL_NETBSD) */
#if defined(KERN_CPTIME2)
if (numcpu > 1) {
- for (i = 0; i < numcpu; i++) {
-@@ -715,6 +735,7 @@ static int cpu_read (void)
+ for (int i = 0; i < numcpu; i++) {
+@@ -735,6 +755,7 @@ static int cpu_read (void)
cpuinfo[0][i] = cpuinfo_tmp[i];
}
}
+#endif /* defined(KERN_CP_TIME) && defined(KERNEL_NETBSD) */
- for (i = 0; i < numcpu; i++) {
+ for (int i = 0; i < numcpu; i++) {
cpu_stage (i, COLLECTD_CPU_STATE_USER, (derive_t) cpuinfo[i][CP_USER], now);
Index: pkgsrc/sysutils/collectd/patches/patch-src_libcollectclient_network__buffer.c
diff -u pkgsrc/sysutils/collectd/patches/patch-src_libcollectclient_network__buffer.c:1.1 pkgsrc/sysutils/collectd/patches/patch-src_libcollectclient_network__buffer.c:1.2
--- pkgsrc/sysutils/collectd/patches/patch-src_libcollectclient_network__buffer.c:1.1 Mon Feb 17 11:21:55 2014
+++ pkgsrc/sysutils/collectd/patches/patch-src_libcollectclient_network__buffer.c Thu Oct 13 15:17:28 2016
@@ -1,18 +1,18 @@
-$NetBSD: patch-src_libcollectclient_network__buffer.c,v 1.1 2014/02/17 11:21:55 fhajny Exp $
+$NetBSD: patch-src_libcollectclient_network__buffer.c,v 1.2 2016/10/13 15:17:28 fhajny Exp $
Need the workaround on at least SunOS too.
---- src/libcollectdclient/network_buffer.c.orig 2014-01-26 08:09:14.868392118 +0000
+--- src/libcollectdclient/network_buffer.c.orig 2016-09-11 08:10:25.263038721 +0000
+++ src/libcollectdclient/network_buffer.c
-@@ -37,7 +37,7 @@
+@@ -36,7 +36,7 @@
+ #include <pthread.h>
#if HAVE_LIBGCRYPT
- # include <pthread.h>
-# if defined __APPLE__
-+# if defined(__APPLE__) || defined(__sun)
++# if defined __APPLE__ || defined(__sun)
/* default xcode compiler throws warnings even when deprecated functionality
* is not used. -Werror breaks the build because of erroneous warnings.
* http://stackoverflow.com/questions/10556299/compiler-warnings-with-libgcrypt-v1-5-0/12830209#12830209
-@@ -50,7 +50,7 @@
+@@ -49,7 +49,7 @@
*/
# define GCRYPT_NO_DEPRECATED
# include <gcrypt.h>
Index: pkgsrc/sysutils/p5-collectd/Makefile
diff -u pkgsrc/sysutils/p5-collectd/Makefile:1.3 pkgsrc/sysutils/p5-collectd/Makefile:1.4
--- pkgsrc/sysutils/p5-collectd/Makefile:1.3 Wed Jun 8 19:24:27 2016
+++ pkgsrc/sysutils/p5-collectd/Makefile Thu Oct 13 15:17:29 2016
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.3 2016/06/08 19:24:27 wiz Exp $
+# $NetBSD: Makefile,v 1.4 2016/10/13 15:17:29 fhajny Exp $
PKGNAME= p5-${DISTNAME}
-PKGREVISION= 2
COLLECTD_PACKAGE= perl
COMMENT= Statistics collection daemon - perl plugin
Index: pkgsrc/sysutils/py-collectd/Makefile
diff -u pkgsrc/sysutils/py-collectd/Makefile:1.1 pkgsrc/sysutils/py-collectd/Makefile:1.2
--- pkgsrc/sysutils/py-collectd/Makefile:1.1 Tue Apr 14 11:27:30 2015
+++ pkgsrc/sysutils/py-collectd/Makefile Thu Oct 13 15:17:29 2016
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2015/04/14 11:27:30 fhajny Exp $
+# $NetBSD: Makefile,v 1.2 2016/10/13 15:17:29 fhajny Exp $
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
COLLECTD_PACKAGE= python
@@ -7,7 +7,8 @@ COMMENT= Statistics collection daemon -
.include "../../sysutils/collectd/Makefile.common"
-CONFIGURE_ARGS+= --with-python=${PYTHONBIN}
+CONFIGURE_ARGS+= --enable-python
+CONFIGURE_ENV+= PYTHON_CONFIG=${PREFIX}/bin/python${PYVERSSUFFIX}-config
.include "../../lang/python/application.mk"
.include "../../mk/bsd.pkg.mk"
Added files:
Index: pkgsrc/sysutils/collectd/patches/patch-src_daemon_Makefile.am
diff -u /dev/null pkgsrc/sysutils/collectd/patches/patch-src_daemon_Makefile.am:1.1
--- /dev/null Thu Oct 13 15:17:29 2016
+++ pkgsrc/sysutils/collectd/patches/patch-src_daemon_Makefile.am Thu Oct 13 15:17:28 2016
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_daemon_Makefile.am,v 1.1 2016/10/13 15:17:28 fhajny Exp $
+
+Use other data directory.
+
+--- src/daemon/Makefile.am.orig 2016-10-07 06:49:37.631866621 +0000
++++ src/daemon/Makefile.am
+@@ -2,7 +2,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/src
+ AM_CPPFLAGS += -DPREFIX='"${prefix}"'
+ AM_CPPFLAGS += -DCONFIGFILE='"${sysconfdir}/${PACKAGE_NAME}.conf"'
+ AM_CPPFLAGS += -DLOCALSTATEDIR='"${localstatedir}"'
+-AM_CPPFLAGS += -DPKGLOCALSTATEDIR='"${localstatedir}/lib/${PACKAGE_NAME}"'
++AM_CPPFLAGS += -DPKGLOCALSTATEDIR='"${localstatedir}/db/${PACKAGE_NAME}"'
+ if BUILD_FEATURE_DAEMON
+ AM_CPPFLAGS += -DPIDFILE='"${localstatedir}/run/${PACKAGE_NAME}.pid"'
+ endif
Home |
Main Index |
Thread Index |
Old Index