Mon Feb 17 11:21:55 2014 UTC ()
Import collectd-5.4.1 as sysutils/collectd (+ plugins), based on wip/collectd5.
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.
(fhajny)
diff -r0 -r1.1 pkgsrc/sysutils/collectd/DESCR
diff -r0 -r1.1 pkgsrc/sysutils/collectd/Makefile
diff -r0 -r1.1 pkgsrc/sysutils/collectd/Makefile.common
diff -r0 -r1.1 pkgsrc/sysutils/collectd/PLIST
diff -r0 -r1.1 pkgsrc/sysutils/collectd/distinfo
diff -r0 -r1.1 pkgsrc/sysutils/collectd/options.mk
diff -r0 -r1.1 pkgsrc/sysutils/collectd-amqp/DESCR
diff -r0 -r1.1 pkgsrc/sysutils/collectd-amqp/Makefile
diff -r0 -r1.1 pkgsrc/sysutils/collectd-curl/DESCR
diff -r0 -r1.1 pkgsrc/sysutils/collectd-curl/Makefile
diff -r0 -r1.1 pkgsrc/sysutils/collectd-dbi/DESCR
diff -r0 -r1.1 pkgsrc/sysutils/collectd-dbi/Makefile
diff -r0 -r1.1 pkgsrc/sysutils/collectd-dns/DESCR
diff -r0 -r1.1 pkgsrc/sysutils/collectd-dns/Makefile
diff -r0 -r1.1 pkgsrc/sysutils/collectd-memcached/DESCR
diff -r0 -r1.1 pkgsrc/sysutils/collectd-memcached/Makefile
diff -r0 -r1.1 pkgsrc/sysutils/collectd-mysql/DESCR
diff -r0 -r1.1 pkgsrc/sysutils/collectd-mysql/Makefile
diff -r0 -r1.1 pkgsrc/sysutils/collectd-network/DESCR
diff -r0 -r1.1 pkgsrc/sysutils/collectd-network/Makefile
diff -r0 -r1.1 pkgsrc/sysutils/collectd-notify-email/DESCR
diff -r0 -r1.1 pkgsrc/sysutils/collectd-notify-email/Makefile
diff -r0 -r1.1 pkgsrc/sysutils/collectd-postgresql/DESCR
diff -r0 -r1.1 pkgsrc/sysutils/collectd-postgresql/Makefile
diff -r0 -r1.1 pkgsrc/sysutils/collectd-rrdtool/DESCR
diff -r0 -r1.1 pkgsrc/sysutils/collectd-rrdtool/Makefile
diff -r0 -r1.1 pkgsrc/sysutils/collectd-snmp/DESCR
diff -r0 -r1.1 pkgsrc/sysutils/collectd-snmp/Makefile
diff -r0 -r1.1 pkgsrc/sysutils/collectd/files/collectd.sh
diff -r0 -r1.1 pkgsrc/sysutils/collectd/patches/patch-Makefile.in
diff -r0 -r1.1 pkgsrc/sysutils/collectd/patches/patch-configure
diff -r0 -r1.1 pkgsrc/sysutils/collectd/patches/patch-src_Makefile.in
diff -r0 -r1.1 pkgsrc/sysutils/collectd/patches/patch-src_collectd.c
diff -r0 -r1.1 pkgsrc/sysutils/collectd/patches/patch-src_collectd.conf.in
diff -r0 -r1.1 pkgsrc/sysutils/collectd/patches/patch-src_df.c
diff -r0 -r1.1 pkgsrc/sysutils/collectd/patches/patch-src_libcollectclient_network__buffer.c
diff -r0 -r1.1 pkgsrc/sysutils/collectd/patches/patch-src_network.c
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.
# $NetBSD: Makefile,v 1.1 2014/02/17 11:21:54 fhajny Exp $
#
.include "../../sysutils/collectd/Makefile.common"
COMMENT= Statistics collection daemon base
RCD_SCRIPTS= collectd
.include "../../mk/bsd.prefs.mk"
# 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"
# $NetBSD: Makefile.common,v 1.1 2014/02/17 11:21:54 fhajny Exp $
#
# used by sysutils/collectd/Makefile
# used by sysutils/collectd-amqp/Makefile
# used by sysutils/collectd-curl/Makefile
# used by sysutils/collectd-dbi/Makefile
# used by sysutils/collectd-dns/Makefile
# used by sysutils/collectd-memcached/Makefile
# used by sysutils/collectd-mysql/Makefile
# used by sysutils/collectd-network/Makefile
# used by sysutils/collectd-notify-email/Makefile
# used by sysutils/collectd-postgresql/Makefile
# used by sysutils/collectd-rrdtool/Makefile
# used by sysutils/collectd-snmp/Makefile
DISTNAME= collectd-5.4.1
MASTER_SITES= http://collectd.org/files/
CATEGORIES= sysutils
MAINTAINER= filip@joyent.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}/../../sysutils/collectd/distinfo
PATCHDIR= ${.CURDIR}/../../sysutils/collectd/patches
.if !empty(COLLECTD_PACKAGE)
PKGNAME?= ${DISTNAME:S/collectd/collectd-${COLLECTD_PACKAGE}/}
DEPENDS+= ${DISTNAME}:../../sysutils/collectd
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"
@comment $NetBSD: PLIST,v 1.1 2014/02/17 11:21:54 fhajny Exp $
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
$NetBSD: distinfo,v 1.1 2014/02/17 11:21:54 fhajny Exp $
SHA1 (collectd-5.4.1.tar.gz) = faaccac4daf48449bcefc9d6f9236f98a5dd5b4b
RMD160 (collectd-5.4.1.tar.gz) = a98ff2d845238d4792f732aa7518effdc95e24f9
Size (collectd-5.4.1.tar.gz) = 1894132 bytes
SHA1 (patch-Makefile.in) = 197307399312fa26c71ca168b92bbe41d31d556d
SHA1 (patch-configure) = 34bb022fbe3b3b072a6ea5d86de0711a37ebfa0f
SHA1 (patch-src_Makefile.in) = 3d227fa1c483944f44b11e49cabb6390ab3b8338
SHA1 (patch-src_collectd.c) = 31106ca27dd4911c40285fece48f76a1c36e2407
SHA1 (patch-src_collectd.conf.in) = 97400dbc16a31a440750beed0bc16927afdcb570
SHA1 (patch-src_df.c) = 19cca888b183a90759b359702e4d65c8afa6e58d
SHA1 (patch-src_libcollectclient_network__buffer.c) = e07d403d299613fa0885a0e7285849eb85510253
SHA1 (patch-src_network.c) = 03ed5169903bb579470e77228400dec077ff16cb
# $NetBSD: options.mk,v 1.1 2014/02/17 11:21:54 fhajny Exp $
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
rrdtool plugin for collectd
# $NetBSD: Makefile,v 1.1 2014/02/17 11:21:55 fhajny Exp $
COLLECTD_PACKAGE= amqp
COMMENT= Statistics collection daemon - amqp plugin
.include "../../sysutils/collectd/Makefile.common"
CONFIGURE_ARGS+= --with-librabbitmq=${BUILDLINK_PREFIX.rabbitmq-c}
.include "../../net/rabbitmq-c/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
CURL-based plugins for collectd (curl, curl_json, curl_xml,
apache, bind, nginx, write_http).
# $NetBSD: Makefile,v 1.1 2014/02/17 11:21:55 fhajny Exp $
COLLECTD_PACKAGE= curl
COLLECTD_PLUGINS= curl curl_json curl_xml apache bind nginx write_http
COMMENT= Statistics collection daemon - curl-based plugins
.include "../../sysutils/collectd/Makefile.common"
CONFIGURE_ARGS+= --with-libcurl=${BUILDLINK_PREFIX.curl}
CONFIGURE_ARGS+= --with-libyajl=${BUILDLINK_PREFIX.yajl}
CONFIGURE_ARGS+= --with-libxml2=${BUILDLINK_PREFIX.libxml2}
.include "../../devel/yajl/buildlink3.mk"
.include "../../textproc/libxml2/buildlink3.mk"
.include "../../www/curl/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
rrdtool plugin for collectd
# $NetBSD: Makefile,v 1.1 2014/02/17 11:21:55 fhajny Exp $
COLLECTD_PACKAGE= dbi
COMMENT= Statistics collection daemon - dbi plugin
.include "../../sysutils/collectd/Makefile.common"
CONFIGURE_ARGS+= --with-libdbi=${BUILDLINK_PREFIX.libdbi}
.include "../../databases/libdbi/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
rrdtool plugin for collectd
# $NetBSD: Makefile,v 1.1 2014/02/17 11:21:55 fhajny Exp $
COLLECTD_PACKAGE= dns
COMMENT= Statistics collection daemon - dns plugin
.include "../../sysutils/collectd/Makefile.common"
CONFIGURE_ARGS+= --with-libpcap=${BUILDLINK_PREFIX.libpcap}
.include "../../net/libpcap/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
rrdtool plugin for collectd
# $NetBSD: Makefile,v 1.1 2014/02/17 11:21:55 fhajny Exp $
COLLECTD_PACKAGE= memcached
COLLECTD_PLUGINS= memcachec memcached
COMMENT= Statistics collection daemon - memcached plugins
.include "../../sysutils/collectd/Makefile.common"
CONFIGURE_ARGS+= --with-libmemcached=${BUILDLINK_PREFIX.libmemcached}
.include "../../devel/libmemcached/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
rrdtool plugin for collectd
# $NetBSD: Makefile,v 1.1 2014/02/17 11:21:55 fhajny Exp $
COLLECTD_PACKAGE= mysql
PKGNAME= ${DISTNAME:S/collectd/collectd-${COLLECTD_PACKAGE}${MYSQL_VERSION}/}
COMMENT= Statistics collection daemon - mysql plugin
.include "../../sysutils/collectd/Makefile.common"
CONFIGURE_ARGS+= --with-libmysql=${BUILDLINK_PREFIX.mysql-client}
.include "../../mk/mysql.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
rrdtool plugin for collectd
# $NetBSD: Makefile,v 1.1 2014/02/17 11:21:55 fhajny Exp $
COLLECTD_PACKAGE= network
COMMENT= Statistics collection daemon - network plugin
.include "../../sysutils/collectd/Makefile.common"
CONFIGURE_ARGS+= --with-libgcrypt=${BUILDLINK_PREFIX.libgcrypt}
.include "../../security/libgcrypt/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
rrdtool plugin for collectd
# $NetBSD: Makefile,v 1.1 2014/02/17 11:21:55 fhajny Exp $
COLLECTD_PACKAGE= notify-email
COMMENT= Statistics collection daemon - notify_email plugin
.include "../../sysutils/collectd/Makefile.common"
CONFIGURE_ARGS+= --with-libesmtp=${BUILDLINK_PREFIX.libesmtp}
.include "../../mail/libesmtp/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
rrdtool plugin for collectd
# $NetBSD: Makefile,v 1.1 2014/02/17 11:21:55 fhajny Exp $
COLLECTD_PACKAGE= postgresql
PKGNAME= ${DISTNAME:S/collectd/collectd-${COLLECTD_PACKAGE}${PGSQL_VERSION}/}
COMMENT= Statistics collection daemon - postgresql plugin
.include "../../sysutils/collectd/Makefile.common"
CONFIGURE_ARGS+= --with-libpq=${PGSQL_PREFIX}
.include "../../mk/pgsql.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
rrdtool plugin for collectd
# $NetBSD: Makefile,v 1.1 2014/02/17 11:21:55 fhajny Exp $
COLLECTD_PACKAGE= rrdtool
COLLECTD_PLUGINS= rrdtool rrdcached
COMMENT= Statistics collection daemon - rrdtool plugins
.include "../../sysutils/collectd/Makefile.common"
CONFIGURE_ARGS+= --with-librrd=${BUILDLINK_PREFIX.rrdtool}
.include "../../databases/rrdtool/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
rrdtool plugin for collectd
# $NetBSD: Makefile,v 1.1 2014/02/17 11:21:55 fhajny Exp $
COLLECTD_PACKAGE= snmp
COMMENT= Statistics collection daemon - snmp plugin
.include "../../sysutils/collectd/Makefile.common"
CONFIGURE_ARGS+= --with-libnetsnmp=${BUILDLINK_PREFIX.net-snmp}/bin/net-snmp-config
.include "../../net/net-snmp/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: collectd.sh,v 1.1 2014/02/17 11:21:55 fhajny Exp $
#
# 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"
$NetBSD: patch-Makefile.in,v 1.1 2014/02/17 11:21:55 fhajny Exp $
Use a reasonable db dir.
--- Makefile.in.orig 2014-01-26 08:09:57.577219038 +0000
+++ Makefile.in
@@ -882,7 +882,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:
$NetBSD: patch-configure,v 1.1 2014/02/17 11:21:55 fhajny Exp $
Remove m4 cruft.
--- configure.orig 2014-01-26 08:10:00.249270750 +0000
+++ configure
@@ -18338,19 +18338,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;
$NetBSD: patch-src_Makefile.in,v 1.1 2014/02/17 11:21:55 fhajny Exp $
Use a reasonable db dir.
Install config file into examples.
--- src/Makefile.in.orig 2014-01-26 08:09:56.685201776 +0000
+++ src/Makefile.in
@@ -2230,6 +2230,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@
@@ -2239,7 +2240,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 \
@@ -4856,13 +4857,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 \
@@ -4870,7 +4866,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.
$NetBSD: patch-src_collectd.c,v 1.1 2014/02/17 11:21:55 fhajny Exp $
sg_init() expects an arg.
--- src/collectd.c.orig 2014-01-26 08:09:14.840391576 +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);
$NetBSD: patch-src_collectd.conf.in,v 1.1 2014/02/17 11:21:55 fhajny Exp $
Fix default dirs.
--- src/collectd.conf.in.orig 2014-01-26 08:09:23.516559631 +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"
@@ -278,7 +278,7 @@
#</Plugin>
#<Plugin csv>
-# DataDir "@localstatedir@/lib/@PACKAGE_NAME@/csv"
+# DataDir "@localstatedir@/db/@PACKAGE_NAME@/csv"
# StoreRates false
#</Plugin>
@@ -566,7 +566,7 @@
#
# <Database db_name2>
# Host "localhost"
-# Socket "/var/run/mysql/mysqld.sock"
+# Socket "@localstatedir@/run/mysql/mysqld.sock"
# SlaveStats true
# SlaveNotifications true
# </Database>
@@ -827,14 +827,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>
@@ -882,14 +882,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
@@ -994,7 +994,7 @@
#</Plugin>
#<Plugin "tail">
-# <File "/var/log/exim4/mainlog">
+# <File "@localstatedir@/log/exim4/mainlog">
# Instance "exim"
# <Match>
# Regex "S=([1-9][0-9]*)"
@@ -1031,7 +1031,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"
@@ -1068,7 +1068,7 @@
#</Plugin>
#<Plugin unixsock>
-# SocketFile "@prefix@/var/run/@PACKAGE_NAME@-unixsock"
+# SocketFile "@localstatedir@/run/@PACKAGE_NAME@-unixsock"
# SocketGroup "collectd"
# SocketPerms "0660"
# DeleteSocket false
$NetBSD: patch-src_df.c,v 1.1 2014/02/17 11:21:55 fhajny Exp $
NetBSD doesn't have float_t.
--- src/df.c.orig 2014-01-26 08:09:14.856391886 +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>
$NetBSD: patch-src_libcollectclient_network__buffer.c,v 1.1 2014/02/17 11:21:55 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
@@ -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
$NetBSD: patch-src_network.c,v 1.1 2014/02/17 11:21:55 fhajny Exp $
Need the workaround on at least SunOS too.
--- src/network.c.orig 2014-01-26 08:09:23.532559941 +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