Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add collectd5 here for pre 2014Q1 releases, so that we can remove fro…

…m wip
  • Loading branch information...
commit 202ec354fa5a5b606e5fd090ad156c86a46fbb54 1 parent 331ba9a
@mamash mamash authored
View
1  collectd5-rrdtool/DESCR
@@ -0,0 +1 @@
+rrdtool plugin for collectd
View
13 collectd5-rrdtool/Makefile
@@ -0,0 +1,13 @@
+# $NetBSD$
+
+COLLECTD_PACKAGE= rrdtool
+COLLECTD_PLUGINS= rrdtool rrdcached
+
+COMMENT= Statistics collection daemon - rrdtool plugins
+
+.include "../../joyent/collectd5/Makefile.common"
+
+CONFIGURE_ARGS+= --with-librrd=${BUILDLINK_PREFIX.rrdtool}
+
+.include "../../databases/rrdtool/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
View
3  collectd5/DESCR
@@ -0,0 +1,3 @@
+collectd is a daemon which collects system performance statistics periodically
+and provides mechanisms to store the values in a variety of ways, for example
+in RRD-files.
View
44 collectd5/Makefile
@@ -0,0 +1,44 @@
+# $NetBSD$
+#
+
+.include "../../joyent/collectd5/Makefile.common"
+
+COMMENT= Statistics collection daemon base
+
+RCD_SCRIPTS= collectd
+
+.include "../../mk/bsd.prefs.mk"
+
+SMF_SRCDIR= ${WRKSRC}/contrib/solaris-smf
+SMF_MANIFEST= collectd.xml
+SMF_MANIFEST_SRC= ${SMF_SRCDIR}/${SMF_MANIFEST}
+
+# Simple plugins that have no dependencies
+DEFAULT_PLUGINS+= aggregation apcups csv email exec filecount \
+ hddtemp logfile match_empty_counter match_hashed\
+ match_regex match_timediff match_value mbmon \
+ ntpd olsrd openvpn powerdns statsd table tail \
+ tail_csv target_notification target_replace \
+ target_scale target_set target_v5upgrade \
+ teamspeak2 threshold unixsock uuid write_graphite
+
+.for option in ${DEFAULT_PLUGINS}
+CONFIGURE_ARGS+= --enable-${option}
+.endfor
+
+.include "options.mk"
+
+CONF_FILES+= share/examples/collectd/collectd.conf \
+ ${PKG_SYSCONFDIR}/collectd.conf
+
+OWN_DIRS+= ${VARBASE}/db/collectd
+
+COLLECTD_USER?= collectd
+COLLECTD_GROUP?= ${COLLECTD_USER}
+PKG_USERS_VARS+= COLLECTD_USER
+PKG_GROUPS_VARS+= COLLECTD_GROUP
+PKG_GROUPS= ${COLLECTD_GROUP}
+PKG_USERS= ${COLLECTD_USER}:${COLLECTD_GROUP}
+PKG_GECOS.${COLLECTD_USER}= collectd unprivileged user
+
+.include "../../mk/bsd.pkg.mk"
View
71 collectd5/Makefile.common
@@ -0,0 +1,71 @@
+# $NetBSD$
+#
+# used by joyent/collectd5/Makefile
+# used by joyent/collectd5-curl/Makefile
+# used by joyent/collectd5-dbi/Makefile
+# used by joyent/collectd5-dns/Makefile
+# used by joyent/collectd5-memcached/Makefile
+# used by joyent/collectd5-mysql/Makefile
+# used by joyent/collectd5-network/Makefile
+# used by joyent/collectd5-notify-email/Makefile
+# used by joyent/collectd5-postgresql/Makefile
+# used by joyent/collectd5-rrdtool/Makefile
+# used by joyent/collectd5-snmp/Makefile
+
+DISTNAME= collectd-5.4.0
+MASTER_SITES= http://collectd.org/files/
+CATEGORIES= sysutils
+
+MAINTAINER= msporleder@gmail.com
+HOMEPAGE= http://collectd.org/
+LICENSE= gnu-gpl-v2
+
+GNU_CONFIGURE= yes
+USE_LIBTOOL= yes
+USE_TOOLS+= pkg-config
+USE_LANGUAGES= c c++
+
+DISTINFO_FILE= ${.CURDIR}/../../joyent/collectd5/distinfo
+PATCHDIR= ${.CURDIR}/../../joyent/collectd5/patches
+
+.if !empty(COLLECTD_PACKAGE)
+PKGNAME?= ${DISTNAME:S/collectd/collectd-${COLLECTD_PACKAGE}/}
+
+DEPENDS+= ${DISTNAME}:../../joyent/collectd5
+
+COLLECTD_PLUGINS?= ${COLLECTD_PACKAGE:S/-/_/}
+
+BUILD_DIRS= src
+BUILD_TARGET= ${COLLECTD_PLUGINS:S/$/.la/}
+INSTALL_DIRS= src
+INSTALL_TARGET= install-pkglibLTLIBRARIES
+. for plugin in ${COLLECTD_PLUGINS}
+CONFIGURE_ARGS+= --enable-${plugin}
+GENERATE_PLIST+= ${ECHO} "lib/collectd/${plugin}.la";
+. endfor
+.endif
+
+.include "../../mk/bsd.prefs.mk"
+
+BUILD_DEFS+= VARBASE
+
+# Disable all libs support by default
+DISABLED_LIBS= aquaero5 credis curl dbi esmtp ganglia gcrypt \
+ iptc lvm2app memcached mnl modbus mongoc mysql \
+ netsnmp notify oping owcapi pcap perl pq \
+ rabbitmq routeros rrd sensors sigrok statgrab \
+ tokyotyrant upsclient varnish xml2 xmms yajl
+CONFIGURE_ARGS+= --with-java=no --with-mic=no --with-oracle=no \
+ --with-perl-bindings=no --with-python=no \
+ --disable-all-plugins
+.for lib in ${DISABLED_LIBS}
+CONFIGURE_ARGS+= --with-lib${lib}=no
+.endfor
+CONFIGURE_ARGS+= --localstatedir=${VARBASE}
+CONFIGURE_ARGS+= --with-ltdl-lib=${BUILDLINK_PREFIX.libltdl}/lib
+CONFIGURE_ARGS+= --with-ltdl-include=${BUILDLINK_PREFIX.libltdl}/include
+
+CPPFLAGS.SunOS+= -D__EXTENSIONS__ -DSOLARIS2=11
+
+.include "../../devel/libltdl/buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
View
83 collectd5/PLIST
@@ -0,0 +1,83 @@
+@comment $NetBSD$
+bin/collectd-nagios
+bin/collectd-tg
+bin/collectdctl
+include/collectd/client.h
+include/collectd/lcc_features.h
+include/collectd/network.h
+include/collectd/network_buffer.h
+lib/collectd/aggregation.la
+lib/collectd/apcups.la
+${PLIST.apple-sensors}lib/collectd/apple_sensors.la
+${PLIST.battery}lib/collectd/battery.la
+${PLIST.contextswitch}lib/collectd/contextswitch.la
+${PLIST.cpu}lib/collectd/cpu.la
+lib/collectd/csv.la
+${PLIST.df}lib/collectd/df.la
+${PLIST.disk}lib/collectd/disk.la
+lib/collectd/email.la
+lib/collectd/exec.la
+lib/collectd/filecount.la
+lib/collectd/hddtemp.la
+${PLIST.interface}lib/collectd/interface.la
+${PLIST.load}lib/collectd/load.la
+lib/collectd/logfile.la
+lib/collectd/match_empty_counter.la
+lib/collectd/match_hashed.la
+lib/collectd/match_regex.la
+lib/collectd/match_timediff.la
+lib/collectd/match_value.la
+lib/collectd/mbmon.la
+${PLIST.memory}lib/collectd/memory.la
+${PLIST.nfs}lib/collectd/nfs.la
+lib/collectd/ntpd.la
+lib/collectd/olsrd.la
+lib/collectd/openvpn.la
+${PLIST.perl}lib/collectd/perl.la
+${PLIST.pf}lib/collectd/pf.la
+lib/collectd/powerdns.la
+${PLIST.processes}lib/collectd/processes.la
+${PLIST.python}lib/collectd/python.la
+lib/collectd/statsd.la
+${PLIST.swap}lib/collectd/swap.la
+${PLIST.syslog}lib/collectd/syslog.la
+lib/collectd/table.la
+lib/collectd/tail.la
+lib/collectd/tail_csv.la
+lib/collectd/target_notification.la
+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/threshold.la
+lib/collectd/unixsock.la
+${PLIST.uptime}lib/collectd/uptime.la
+${PLIST.users}lib/collectd/users.la
+lib/collectd/uuid.la
+lib/collectd/write_graphite.la
+${PLIST.zfs-arc}lib/collectd/zfs_arc.la
+lib/libcollectdclient.la
+lib/pkgconfig/libcollectdclient.pc
+man/man1/collectd-nagios.1
+man/man1/collectd-tg.1
+man/man1/collectd.1
+man/man1/collectdctl.1
+man/man1/collectdmon.1
+man/man5/collectd-email.5
+man/man5/collectd-exec.5
+man/man5/collectd-java.5
+man/man5/collectd-perl.5
+man/man5/collectd-python.5
+man/man5/collectd-snmp.5
+man/man5/collectd-threshold.5
+man/man5/collectd-unixsock.5
+man/man5/collectd.conf.5
+man/man5/types.db.5
+sbin/collectd
+sbin/collectdmon
+share/collectd/postgresql_default.conf
+share/collectd/types.db
+share/examples/collectd/collectd.conf
+share/examples/rc.d/collectd
View
15 collectd5/distinfo
@@ -0,0 +1,15 @@
+$NetBSD$
+
+SHA1 (collectd-5.4.0.tar.gz) = a90fe6cc53b76b7bdd56dc57950d90787cb9c96e
+RMD160 (collectd-5.4.0.tar.gz) = be426e95b872fcf76fdaa01d330dfdd313cab470
+Size (collectd-5.4.0.tar.gz) = 1893721 bytes
+SHA1 (patch-Makefile.in) = 17e77b6d31b45947366ca37bb3fc79cf8acf2104
+SHA1 (patch-configure) = 8ae2897c21e80bead8280d1350173313714774c4
+SHA1 (patch-contrib_solaris-smf_collectd.xml) = 938580577302a738365046eb7b6b0b9d28db99d5
+SHA1 (patch-src_Makefile.in) = 45b29dcf57676637a010fffed9170794cf4db63e
+SHA1 (patch-src_collectd.c) = df5f970d77dcb091469c1a5aaa7ed340a610c9b2
+SHA1 (patch-src_collectd.conf.in) = e6704c89c2382cf80cd1af1223bb09e7cace5f7f
+SHA1 (patch-src_curl__xml.c) = 9c236c568ad9cd399a377befc423b16200a92dfb
+SHA1 (patch-src_df.c) = cdafede12153097b7a3958a20401493059244cfc
+SHA1 (patch-src_libcollectclient_network__buffer.c) = a91a7e375dcbfd26a62072baac1d54d40b3c2903
+SHA1 (patch-src_network.c) = 15b92c7be6c843b4e5b56a1f28c6f4687fb5098c
View
26 collectd5/files/collectd.sh
@@ -0,0 +1,26 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD$
+#
+# PROVIDE: collectd
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# You will need to set some variables in /etc/rc.conf to start collectd:
+#
+# collectd=YES
+#
+
+if [ -f /etc/rc.subr ]
+then
+ . /etc/rc.subr
+fi
+
+name="collectd"
+rcvar=${name}
+command=@PREFIX@/sbin/collectd
+pidfile="@VARBASE@/run/collectd.pid"
+required_files=@PKG_SYSCONFDIR@/collectd.conf
+
+load_rc_config ${name}
+run_rc_command "$1"
View
54 collectd5/options.mk
@@ -0,0 +1,54 @@
+# $NetBSD$
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.collectd
+PKG_SUPPORTED_OPTIONS= cpu df interface load memory perl python syslog uptime
+PKG_SUGGESTED_OPTIONS+= cpu df interface load memory syslog uptime
+
+.if ${OPSYS} == "NetBSD"
+PKG_SUPPORTED_OPTIONS+= contextswitch pf tcpconns users
+PKG_SUGGESTED_OPTIONS+= contextswitch pf tcpconns users
+.endif
+
+.if ${OPSYS} == "FreeBSD"
+PKG_SUPPORTED_OPTIONS+= contextswitch pf processes swap tcpconns zfs-arc
+PKG_SUGGESTED_OPTIONS+= contextswitch pf processes swap tcpconns zfs-arc
+.endif
+
+.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
+
+.include "../../mk/bsd.options.mk"
+
+PLIST_VARS+= apple-sensors battery contextswitch cpu df disk \
+ interface load memory nfs perl pf processes python swap \
+ syslog tcpconns uptime users zfs-arc
+
+.for option in ${PLIST_VARS}
+. if !empty(PKG_OPTIONS:M${option})
+CONFIGURE_ARGS+= --enable-${option:S/-/_/}
+PLIST.${option}= yes
+. endif
+.endfor
+
+.if !empty(PKG_OPTIONS:Mperl)
+USE_TOOLS+= perl
+PERL5_CONFIGURE= no
+PERL5_PACKLIST+= auto/Collectd/.packlist
+CONFIGURE_ARGS+= --with-libperl=${BUILDLINK_PREFIX.perl}
+CONFIGURE_ARGS+= --with-perl-bindings=${MAKE_PARAMS:Q}
+. include "../../lang/perl5/module.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mpython)
+CONFIGURE_ARGS+= --with-python=${PYTHONBIN}
+. include "../../lang/python/application.mk"
+.endif
View
14 collectd5/patches/patch-Makefile.in
@@ -0,0 +1,14 @@
+$NetBSD$
+
+Use a reasonable db dir.
+--- Makefile.in.orig 2013-08-18 10:25:00.482540421 +0000
++++ Makefile.in
+@@ -875,7 +875,7 @@ uninstall-am:
+
+ install-exec-hook:
+ $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run
+- $(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/$(PACKAGE_NAME)
++ $(mkinstalldirs) $(DESTDIR)$(localstatedir)/db/$(PACKAGE_NAME)
+ $(mkinstalldirs) $(DESTDIR)$(localstatedir)/log
+
+ maintainer-clean-local:
View
47 collectd5/patches/patch-configure
@@ -0,0 +1,47 @@
+$NetBSD$
+
+Remove m4 cruft.
+Fix IOKit linking on modern OS X.
+--- configure.orig 2013-08-18 10:25:01.622558671 +0000
++++ configure
+@@ -18292,19 +18292,19 @@ $as_echo_n "checking if have htonll defi
+ have_htonll="no"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-[
++
+ #include <sys/types.h>
+ #include <netinet/in.h>
+ #if HAVE_INTTYPES_H
+ # include <inttypes.h>
+ #endif
+-]
++
+ int
+ main ()
+ {
+-[
++
+ return htonll(0);
+-]
++
+
+ ;
+ return 0;
+@@ -19120,13 +19120,13 @@ fi
+
+
+ with_libiokit="no"
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IOServiceGetMatchingServices in -lIOKit" >&5
+-$as_echo_n "checking for IOServiceGetMatchingServices in -lIOKit... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IOServiceGetMatchingServices in '-framework IOKit'" >&5
++$as_echo_n "checking for IOServiceGetMatchingServices in '-framework IOKit'... " >&6; }
+ if ${ac_cv_lib_IOKit_IOServiceGetMatchingServices+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lIOKit $LIBS"
++LIBS="-framework IOKit $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
View
37 collectd5/patches/patch-contrib_solaris-smf_collectd.xml
@@ -0,0 +1,37 @@
+$NetBSD$
+
+Fix provided SMF manifest.
+--- contrib/solaris-smf/collectd.xml.orig 2013-08-18 10:24:25.057973183 +0000
++++ contrib/solaris-smf/collectd.xml
+@@ -3,11 +3,11 @@
+
+ <service_bundle type='manifest' name='collectd'>
+ <service
+- name='application/collectd'
++ name='@SMF_PREFIX@/collectd'
+ type='service'
+ version='1'>
+
+- <create_default_instance enabled='true' />
++ <create_default_instance enabled='false' />
+
+ <single_instance/>
+
+@@ -30,7 +30,7 @@
+ <exec_method
+ type='method'
+ name='start'
+- exec='/lib/svc/method/collectd start'
++ exec='@PREFIX@/sbin/collectd'
+ timeout_seconds='60'>
+ <method_context>
+ <method_credential user='root' group='root' />
+@@ -41,7 +41,7 @@
+ <exec_method
+ type='method'
+ name='stop'
+- exec='/lib/svc/method/collectd stop'
++ exec=':kill'
+ timeout_seconds='60'>
+ <method_context>
+ <method_credential user='root' group='root' />
View
76 collectd5/patches/patch-src_Makefile.in
@@ -0,0 +1,76 @@
+$NetBSD$
+
+Fix IOKit linking on modern OS X.
+Use a reasonable db dir.
+Install config file into examples.
+--- src/Makefile.in.orig 2013-08-18 10:25:00.134534849 +0000
++++ src/Makefile.in
+@@ -90,7 +90,7 @@ bin_PROGRAMS = collectd-nagios$(EXEEXT)
+ @BUILD_PLUGIN_ASCENT_TRUE@am__append_45 = "-dlopen" ascent.la
+ @BUILD_PLUGIN_ASCENT_TRUE@am__append_46 = ascent.la
+ @BUILD_PLUGIN_BATTERY_TRUE@am__append_47 = battery.la
+-@BUILD_PLUGIN_BATTERY_TRUE@@BUILD_WITH_LIBIOKIT_TRUE@am__append_48 = -lIOKit
++@BUILD_PLUGIN_BATTERY_TRUE@@BUILD_WITH_LIBIOKIT_TRUE@am__append_48 = -framework IOKit
+ @BUILD_PLUGIN_BATTERY_TRUE@am__append_49 = "-dlopen" battery.la
+ @BUILD_PLUGIN_BATTERY_TRUE@am__append_50 = battery.la
+ @BUILD_PLUGIN_BIND_TRUE@am__append_51 = bind.la
+@@ -142,7 +142,7 @@ bin_PROGRAMS = collectd-nagios$(EXEEXT)
+ @BUILD_PLUGIN_DISK_TRUE@am__append_97 = disk.la
+ @BUILD_PLUGIN_DISK_TRUE@@BUILD_WITH_LIBKSTAT_TRUE@am__append_98 = -lkstat
+ @BUILD_PLUGIN_DISK_TRUE@@BUILD_WITH_LIBDEVINFO_TRUE@am__append_99 = -ldevinfo
+-@BUILD_PLUGIN_DISK_TRUE@@BUILD_WITH_LIBIOKIT_TRUE@am__append_100 = -lIOKit
++@BUILD_PLUGIN_DISK_TRUE@@BUILD_WITH_LIBIOKIT_TRUE@am__append_100 = -framework IOKit
+ @BUILD_PLUGIN_DISK_TRUE@@BUILD_WITH_LIBSTATGRAB_TRUE@am__append_101 = $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
+ @BUILD_PLUGIN_DISK_TRUE@@BUILD_WITH_LIBSTATGRAB_TRUE@am__append_102 = $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
+ @BUILD_PLUGIN_DISK_TRUE@@BUILD_WITH_PERFSTAT_TRUE@am__append_103 = -lperfstat
+@@ -2197,6 +2197,7 @@ srcdir = @srcdir@
+ subdirs = @subdirs@
+ sys_symbol_underscore = @sys_symbol_underscore@
+ sysconfdir = @sysconfdir@
++egdir = @exec_prefix@/share/examples/@PACKAGE@
+ target_alias = @target_alias@
+ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+@@ -2206,7 +2207,7 @@ SUBDIRS = libcollectdclient $(am__append
+ AM_CPPFLAGS = -DPREFIX='"${prefix}"' \
+ -DCONFIGFILE='"${sysconfdir}/${PACKAGE_NAME}.conf"' \
+ -DLOCALSTATEDIR='"${localstatedir}"' \
+- -DPKGLOCALSTATEDIR='"${localstatedir}/lib/${PACKAGE_NAME}"' \
++ -DPKGLOCALSTATEDIR='"${localstatedir}/db/${PACKAGE_NAME}"' \
+ $(am__append_2) -DPLUGINDIR='"${pkglibdir}"' \
+ -DPKGDATADIR='"${pkgdatadir}"'
+ collectd_SOURCES = collectd.c collectd.h \
+@@ -2403,7 +2404,7 @@ CLEANFILES = $(am__append_449)
+ @BUILD_PLUGIN_APCUPS_TRUE@apcups_la_LIBADD = $(am__append_35)
+ @BUILD_PLUGIN_APPLE_SENSORS_TRUE@apple_sensors_la_SOURCES = apple_sensors.c
+ @BUILD_PLUGIN_APPLE_SENSORS_TRUE@apple_sensors_la_LDFLAGS = -module -avoid-version
+-@BUILD_PLUGIN_APPLE_SENSORS_TRUE@apple_sensors_la_LIBADD = -lIOKit
++@BUILD_PLUGIN_APPLE_SENSORS_TRUE@apple_sensors_la_LIBADD = -framework IOKit
+ @BUILD_PLUGIN_AQUAERO_TRUE@aquaero_la_SOURCES = aquaero.c
+ @BUILD_PLUGIN_AQUAERO_TRUE@aquaero_la_LDFLAGS = -module -avoid-version
+ @BUILD_PLUGIN_AQUAERO_TRUE@aquaero_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBAQUAERO5_CFLAGS)
+@@ -4820,13 +4821,8 @@ uninstall-man: uninstall-man1 uninstall-
+ @HAVE_PROTOC_C_TRUE@ protoc-c -I$(srcdir) --c_out . $(srcdir)/riemann.proto
+
+ 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 \
+@@ -4834,7 +4830,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;
+
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
View
14 collectd5/patches/patch-src_collectd.c
@@ -0,0 +1,14 @@
+$NetBSD$
+
+sg_init() expects an arg.
+--- src/collectd.c.orig 2013-08-18 10:24:25.065973312 +0000
++++ src/collectd.c
+@@ -288,7 +288,7 @@ static int do_init (void)
+ #endif
+
+ #if HAVE_LIBSTATGRAB
+- if (sg_init ())
++ if (sg_init (0))
+ {
+ ERROR ("sg_init: %s", sg_str_error (sg_get_error ()));
+ return (-1);
View
94 collectd5/patches/patch-src_collectd.conf.in
@@ -0,0 +1,94 @@
+$NetBSD$
+
+Fix default dirs.
+--- src/collectd.conf.in.orig 2013-08-18 10:24:25.065973312 +0000
++++ src/collectd.conf.in
+@@ -12,7 +12,7 @@
+
+ #Hostname "localhost"
+ #FQDNLookup true
+-#BaseDir "@localstatedir@/lib/@PACKAGE_NAME@"
++#BaseDir "@localstatedir@/db/@PACKAGE_NAME@"
+ #PIDFile "@localstatedir@/run/@PACKAGE_NAME@.pid"
+ #PluginDir "@libdir@/@PACKAGE_NAME@"
+ #TypesDB "@prefix@/share/@PACKAGE_NAME@/types.db"
+@@ -273,7 +273,7 @@
+ #</Plugin>
+
+ #<Plugin csv>
+-# DataDir "@localstatedir@/lib/@PACKAGE_NAME@/csv"
++# DataDir "@localstatedir@/db/@PACKAGE_NAME@/csv"
+ # StoreRates false
+ #</Plugin>
+
+@@ -559,7 +559,7 @@
+ #
+ # <Database db_name2>
+ # Host "localhost"
+-# Socket "/var/run/mysql/mysqld.sock"
++# Socket "@localstatedir@/run/mysql/mysqld.sock"
+ # SlaveStats true
+ # SlaveNotifications true
+ # </Database>
+@@ -820,14 +820,14 @@
+ # <Server "server_name">
+ # Collect "latency"
+ # Collect "udp-answers" "udp-queries"
+-# Socket "/var/run/pdns.controlsocket"
++# Socket "@localstatedir@/run/pdns.controlsocket"
+ # </Server>
+ # <Recursor "recursor_name">
+ # Collect "questions"
+ # Collect "cache-hits" "cache-misses"
+-# Socket "/var/run/pdns_recursor.controlsocket"
++# Socket "@localstatedir@/run/pdns_recursor.controlsocket"
+ # </Recursor>
+-# LocalSocket "/opt/collectd/var/run/collectd-powerdns"
++# LocalSocket "@localstatedir@/run/collectd-powerdns"
+ #</Plugin>
+
+ #<Plugin processes>
+@@ -875,14 +875,14 @@
+
+ #<Plugin rrdcached>
+ # DaemonAddress "unix:/tmp/rrdcached.sock"
+-# DataDir "@localstatedir@/lib/@PACKAGE_NAME@/rrd"
++# DataDir "@localstatedir@/db/@PACKAGE_NAME@/rrd"
+ # CreateFiles true
+ # CreateFilesAsync false
+ # CollectStatistics true
+ #</Plugin>
+
+ #<Plugin rrdtool>
+-# DataDir "@localstatedir@/lib/@PACKAGE_NAME@/rrd"
++# DataDir "@localstatedir@/db/@PACKAGE_NAME@/rrd"
+ # CreateFilesAsync false
+ # CacheTimeout 120
+ # CacheFlush 900
+@@ -987,7 +987,7 @@
+ #</Plugin>
+
+ #<Plugin "tail">
+-# <File "/var/log/exim4/mainlog">
++# <File "@localstatedir@/log/exim4/mainlog">
+ # Instance "exim"
+ # <Match>
+ # Regex "S=([1-9][0-9]*)"
+@@ -1024,7 +1024,7 @@
+ # Type "kpackets_wire_per_sec.realtime"
+ # ValueFrom 4
+ # </Metric>
+-# <File "/var/log/snort/snort.stats">
++# <File "@localstatedir@/log/snort/snort.stats">
+ # Instance "snort-eth0"
+ # Interval 600
+ # Collect "dropped" "mbps" "alerts" "kpps"
+@@ -1061,7 +1061,7 @@
+ #</Plugin>
+
+ #<Plugin unixsock>
+-# SocketFile "@prefix@/var/run/@PACKAGE_NAME@-unixsock"
++# SocketFile "@localstatedir@/run/@PACKAGE_NAME@-unixsock"
+ # SocketGroup "collectd"
+ # SocketPerms "0660"
+ # DeleteSocket false
View
16 collectd5/patches/patch-src_curl__xml.c
@@ -0,0 +1,16 @@
+$NetBSD$
+
+Fix clang build as per
+
+http://svnweb.freebsd.org/ports/head/net-mgmt/collectd5/files/patch-src-curl_xml.c
+--- src/curl_xml.c.orig 2013-08-18 10:24:25.069973376 +0000
++++ src/curl_xml.c
+@@ -607,7 +607,7 @@ static int cx_curl_perform (cx_t *db, CU
+ int status;
+ long rc;
+ char *ptr;
+- char *url;
++ char *url = NULL;
+
+ db->buffer_fill = 0;
+ status = curl_easy_perform (curl);
View
16 collectd5/patches/patch-src_df.c
@@ -0,0 +1,16 @@
+$NetBSD$
+
+NetBSD doesn't have float_t.
+--- src/df.c.orig 2013-08-18 10:24:25.069973376 +0000
++++ src/df.c
+@@ -28,6 +28,10 @@
+ #include "utils_mount.h"
+ #include "utils_ignorelist.h"
+
++#if defined(__NetBSD__)
++typedef float float_t;
++#endif
++
+ #if HAVE_STATVFS
+ # if HAVE_SYS_STATVFS_H
+ # include <sys/statvfs.h>
View
23 collectd5/patches/patch-src_libcollectclient_network__buffer.c
@@ -0,0 +1,23 @@
+$NetBSD$
+
+Need the workaround on at least SunOS too.
+--- src/libcollectdclient/network_buffer.c.orig 2013-08-18 10:24:25.073973439 +0000
++++ src/libcollectdclient/network_buffer.c
+@@ -37,7 +37,7 @@
+
+ #if HAVE_LIBGCRYPT
+ # include <pthread.h>
+-# if defined __APPLE__
++# 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 @@
+ */
+ # define GCRYPT_NO_DEPRECATED
+ # include <gcrypt.h>
+-# if defined __APPLE__
++# if defined(__APPLE__) || defined(__sun)
+ /* Re enable deprecation warnings */
+ # pragma GCC diagnostic warning "-Wdeprecated-declarations"
+ # endif
View
23 collectd5/patches/patch-src_network.c
@@ -0,0 +1,23 @@
+$NetBSD$
+
+Need the workaround on at least SunOS too.
+--- src/network.c.orig 2013-08-18 10:24:25.077973503 +0000
++++ src/network.c
+@@ -59,7 +59,7 @@
+
+ #if HAVE_LIBGCRYPT
+ # include <pthread.h>
+-# if defined __APPLE__
++# 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
+@@ -72,7 +72,7 @@
+ */
+ # define GCRYPT_NO_DEPRECATED
+ # include <gcrypt.h>
+-# if defined __APPLE__
++# if defined(__APPLE__) || defined(__sun)
+ /* Re enable deprecation warnings */
+ # pragma GCC diagnostic warning "-Wdeprecated-declarations"
+ # endif
Please sign in to comment.
Something went wrong with that request. Please try again.