Import of pkgsrc-2016Q3

This commit is contained in:
2016-10-14 07:49:11 +02:00
committed by Lionel Sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949749 additions and 377083 deletions

View File

@@ -1,6 +1,6 @@
# $NetBSD: Makefile,v 1.13 2015/09/12 19:04:56 he Exp $
# $NetBSD: Makefile,v 1.17 2016/07/09 06:38:58 wiz Exp $
PKGREVISION= 8
PKGREVISION= 12
.include "../../sysutils/collectd/Makefile.common"
COMMENT= Statistics collection daemon base

View File

@@ -1,4 +1,4 @@
# $NetBSD: Makefile.common,v 1.10 2015/09/07 12:57:29 jperkin Exp $
# $NetBSD: Makefile.common,v 1.11 2015/10/28 11:46:07 jperkin Exp $
#
# used by sysutils/collectd/Makefile
# used by sysutils/collectd-amqp/Makefile
@@ -10,6 +10,7 @@
# used by sysutils/collectd-network/Makefile
# used by sysutils/collectd-notify-email/Makefile
# used by sysutils/collectd-postgresql/Makefile
# used by sysutils/collectd-riemann/Makefile
# used by sysutils/collectd-rrdtool/Makefile
# used by sysutils/collectd-snmp/Makefile
# used by sysutils/p5-collectd/Makefile

View File

@@ -1,12 +1,13 @@
$NetBSD: distinfo,v 1.22 2015/09/17 11:24:11 he Exp $
$NetBSD: distinfo,v 1.27 2016/02/03 15:10:43 he 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 (patch-Makefile.am) = ed45b75293a4ea2dd577d04eeb3b9017b8f47319
SHA1 (patch-Makefile.in) = a7cf69ca29c526be643af0ef85544e3a2dc80a77
SHA1 (patch-configure) = ca4c1e3429ac6ca35f0973f91c84eaf70b04bc1f
SHA1 (patch-configure.ac) = f23be9bb5179cbfc8ca5b3414e62d220b10f8540
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
@@ -15,8 +16,8 @@ SHA1 (patch-src_config.h.in) = be17db23b6ee7a90ba57e73f073ed5be11c369c5
SHA1 (patch-src_cpu.c) = 55b5cfc69bf0df279d1a12003eb6a8e681155e18
SHA1 (patch-src_df.c) = 7e75dfbc72ecad48eb0eb7427a19329daf6b9a60
SHA1 (patch-src_disk.c) = 159862e8ca1e841e3c4013c03ba03f059fdbbab5
SHA1 (patch-src_entropy.c) = 46d5357d8407584943e9259325989e64a8710cc0
SHA1 (patch-src_irq.c) = 6b621474de35a5879105025d1a2848e4896b8479
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_netstat__udp.c) = 30cb12d25f56c60959658dbd181783212e00cc61

View File

@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type='manifest' name='collectd'>
<service_bundle type='manifest' name='export'>
<service name='@SMF_PREFIX@/@SMF_NAME@' type='service' version='1'>
<create_default_instance enabled='false' />
<single_instance />
@@ -25,6 +25,5 @@
<!-- sub-process core dumps shouldn't restart session -->
<propval name='ignore_error' type='astring' value='core,signal' />
</property_group>
<stability value='Evolving' />
</service>
</service_bundle>

View File

@@ -1,33 +1,24 @@
# $NetBSD: options.mk,v 1.6 2015/09/12 19:04:56 he Exp $
# $NetBSD: options.mk,v 1.7 2016/02/26 10:24:11 jperkin 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
.if ${OPSYS} == "NetBSD"
PKG_SUPPORTED_OPTIONS+= contextswitch disk entropy irq pf netstat_udp
PKG_SUPPORTED_OPTIONS+= processes swap tcpconns users
PKG_SUPPORTED_OPTIONS.NetBSD+= contextswitch disk entropy irq pf netstat_udp
PKG_SUPPORTED_OPTIONS.NetBSD+= processes 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+= contextswitch disk entropy irq pf netstat_udp
PKG_SUGGESTED_OPTIONS+= processes swap tcpconns users
.endif
PKG_SUPPORTED_OPTIONS.FreeBSD+= contextswitch pf processes swap tcpconns zfs-arc
PKG_SUGGESTED_OPTIONS.FreeBSD+= contextswitch pf processes swap tcpconns zfs-arc
.if ${OPSYS} == "FreeBSD"
PKG_SUPPORTED_OPTIONS+= contextswitch pf processes swap tcpconns zfs-arc
PKG_SUGGESTED_OPTIONS+= contextswitch pf processes swap tcpconns zfs-arc
.endif
PKG_SUPPORTED_OPTIONS.Darwin+= apple-sensors battery contextswitch disk
PKG_SUPPORTED_OPTIONS.Darwin+= processes swap tcpconns users
PKG_SUGGESTED_OPTIONS.Darwin+= apple-sensors battery contextswitch disk
PKG_SUGGESTED_OPTIONS.Darwin+= processes swap tcpconns users
.if ${OPSYS} == "Darwin"
PKG_SUPPORTED_OPTIONS+= apple-sensors battery contextswitch disk processes swap \
tcpconns users
PKG_SUGGESTED_OPTIONS+= apple-sensors battery contextswitch disk processes swap \
tcpconns users
.endif
.if ${OPSYS} == "SunOS"
PKG_SUPPORTED_OPTIONS+= disk nfs swap users zfs-arc
PKG_SUGGESTED_OPTIONS+= disk nfs swap users zfs-arc
.endif
PKG_SUPPORTED_OPTIONS.SunOS+= disk nfs swap users zfs-arc
PKG_SUGGESTED_OPTIONS.SunOS+= disk nfs swap users zfs-arc
.include "../../mk/bsd.options.mk"

View File

@@ -1,8 +1,8 @@
$NetBSD: patch-configure,v 1.10 2015/09/17 11:24:11 he Exp $
$NetBSD: patch-configure,v 1.11 2016/02/03 13:10:27 he Exp $
Regen from configure.ac.
--- configure.orig 2015-09-10 18:56:19.000000000 +0000
--- configure.orig 2015-05-27 07:51:50.000000000 +0000
+++ configure
@@ -797,6 +797,8 @@ BUILD_PLUGIN_NFS_FALSE
BUILD_PLUGIN_NFS_TRUE
@@ -125,7 +125,7 @@ Regen from configure.ac.
+$as_echo_n "checking for sysctl kern.cp_time... " >&6; }
+if test -x /sbin/sysctl
+then
+ /sbin/sysctl kern.cp_times 2>/dev/null
+ /sbin/sysctl kern.cp_time 2>/dev/null
+ if test $? -eq 0
+ then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5

View File

@@ -1,4 +1,4 @@
$NetBSD: patch-configure.ac,v 1.8 2015/09/17 11:24:11 he Exp $
$NetBSD: patch-configure.ac,v 1.9 2016/02/03 13:10:27 he Exp $
Add KERNEL_NETBSD, add entry and disk plugins for NetBSD,
and also do swap for "have_swapctl_three_args" (as for NetBSD).
@@ -43,7 +43,7 @@ Also, the start of process support, but that's not yet finished.
+AC_MSG_CHECKING([for sysctl kern.cp_time])
+if test -x /sbin/sysctl
+then
+ /sbin/sysctl kern.cp_times 2>/dev/null
+ /sbin/sysctl kern.cp_time 2>/dev/null
+ if test $? -eq 0
+ then
+ AC_MSG_RESULT([yes])

View File

@@ -1,6 +1,9 @@
$NetBSD: patch-src_entropy.c,v 1.4 2015/09/01 09:31:46 he Exp $
$NetBSD: patch-src_entropy.c,v 1.6 2015/12/12 22:23:32 he Exp $
Provide a NetBSD implementation for graphing available entropy.
This version tries to keep /dev/urandom open (for repeated use),
instead of constantly re-opening/closing it, since the latter will
needlessly reduce the kernel's entropy estimate.
--- src/entropy.c.orig 2015-03-10 14:14:45.000000000 +0000
+++ src/entropy.c
@@ -13,33 +16,33 @@ Provide a NetBSD implementation for graphing available entropy.
-#endif
-
-#define ENTROPY_FILE "/proc/sys/kernel/random/entropy_avail"
+static void entropy_submit (double);
+static int entropy_read (void);
-
-static void entropy_submit (double entropy)
-{
- value_t values[1];
- value_list_t vl = VALUE_LIST_INIT;
+static void entropy_submit (double);
+static int entropy_read (void);
- values[0].gauge = entropy;
+#if !KERNEL_LINUX && !KERNEL_NETBSD
+# error "No applicable input method."
+#endif
- values[0].gauge = entropy;
+#if KERNEL_LINUX
- vl.values = values;
- vl.values_len = 1;
- sstrncpy (vl.host, hostname_g, sizeof (vl.host));
- sstrncpy (vl.plugin, "entropy", sizeof (vl.plugin));
- sstrncpy (vl.type, "entropy", sizeof (vl.type));
-
+#if KERNEL_LINUX
- plugin_dispatch_values (&vl);
-}
+#define ENTROPY_FILE "/proc/sys/kernel/random/entropy_avail"
static int entropy_read (void)
{
@@ -74,6 +63,56 @@ static int entropy_read (void)
@@ -74,6 +63,68 @@ static int entropy_read (void)
return (0);
}
@@ -48,6 +51,12 @@ Provide a NetBSD implementation for graphing available entropy.
+#if KERNEL_NETBSD
+/* Provide a NetBSD implementation, partial from rndctl.c */
+
+/*
+ * Improved to keep the /dev/urandom open, since there's a consumption
+ * of entropy from /dev/random for every open of /dev/urandom, and this
+ * will end up opening /dev/urandom lots of times.
+ */
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/param.h>
@@ -61,18 +70,24 @@ Provide a NetBSD implementation for graphing available entropy.
+entropy_read (void)
+{
+ rndpoolstat_t rs;
+ int fd;
+ static int fd;
+
+ fd = open(_PATH_URANDOM, O_RDONLY, 0644);
+ if (fd < 0)
+ return -1;
+ if (fd == 0) {
+ fd = open(_PATH_URANDOM, O_RDONLY, 0644);
+ if (fd < 0) {
+ fd = 0;
+ return -1;
+ }
+ }
+
+ if (ioctl(fd, RNDGETPOOLSTAT, &rs) < 0)
+ if (ioctl(fd, RNDGETPOOLSTAT, &rs) < 0) {
+ (void) close(fd);
+ fd = 0; /* signal a reopening on next attempt */
+ return -1;
+ }
+
+ entropy_submit (rs.curentropy);
+
+ close(fd);
+ return 0;
+}
+

View File

@@ -1,4 +1,4 @@
$NetBSD: patch-src_irq.c,v 1.1 2015/08/18 07:47:46 he Exp $
$NetBSD: patch-src_irq.c,v 1.2 2016/02/03 15:10:43 he Exp $
Provide a port to NetBSD.
@@ -36,7 +36,7 @@ Provide a port to NetBSD.
static int irq_read (void)
{
FILE *fh;
@@ -183,6 +196,63 @@ static int irq_read (void)
@@ -183,6 +196,64 @@ static int irq_read (void)
return (0);
} /* int irq_read */
@@ -60,6 +60,7 @@ Provide a port to NetBSD.
+ size_t newlen;
+ int error;
+
+ newlen = buflen;
+ if (buflen)
+ buf = malloc(buflen);
+ error = sysctl(mib, __arraycount(mib),
@@ -93,7 +94,7 @@ Provide a port to NetBSD.
+ buflen -= evs->ev_len;
+ evs =(const void*)((const uint64_t *)evs + evs->ev_len);
+ }
+
+ free(buf);
+ return 0;
+}
+#endif /* KERNEL_NETBSD */