mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Merge from bittboy/buildroot@26c91a9
This commit is contained in:
@@ -1,49 +0,0 @@
|
||||
From bfb85f1840f3672518979dd4b52f012fc08b4f88 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Tue, 6 Aug 2019 09:36:13 +0200
|
||||
Subject: [PATCH] configure.ac: fix activation of snmp_agent
|
||||
|
||||
If netsnmp library has been built without mib loading support (through
|
||||
--disable-mib-loading), build of snmp_agent fails on:
|
||||
|
||||
src/snmp_agent.c: In function 'snmp_agent_get_asn_type':
|
||||
src/snmp_agent.c:160:47: error: dereferencing pointer to incomplete type 'struct tree'
|
||||
return (node != NULL) ? mib_to_asn_type(node->type) : 0;
|
||||
|
||||
struct tree is defined in net-snmp/libray/parse.h which is included by
|
||||
net-snmp/mib_api.h only if NETSNMP_DISABLE_MIB_LOADING is not set.
|
||||
|
||||
To fix this error, check for get_tree function in netsnmp library in
|
||||
addition to init_agent in netsnmpagent library
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/6d7ac28f154f83208f949c62d28411855f1817f8
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Upstream status: https://github.com/collectd/collectd/pull/3241]
|
||||
---
|
||||
configure.ac | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index add1556b..5ac33dc7 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -3950,7 +3950,13 @@ if test "x$with_libnetsnmpagent" = "xyes"; then
|
||||
)
|
||||
|
||||
AC_CHECK_LIB([netsnmpagent], [init_agent],
|
||||
- [with_libnetsnmpagent="yes"],
|
||||
+ [
|
||||
+ # libnetsnmp can be built without without mib loading support
|
||||
+ AC_CHECK_LIB([netsnmp], [get_tree],
|
||||
+ [with_libnetsnmpagent="yes"],
|
||||
+ [with_libnetsnmpagent="no (libnetsnmp doesn't support mib loading)"]
|
||||
+ )
|
||||
+ ],
|
||||
[with_libnetsnmpagent="no (libnetsnmpagent not found)"],
|
||||
[$libnetsnmphelpers]
|
||||
)
|
||||
--
|
||||
2.20.1
|
||||
|
||||
43
package/collectd/0001-src-netlink.c-remove-REG_NOERROR.patch
Normal file
43
package/collectd/0001-src-netlink.c-remove-REG_NOERROR.patch
Normal file
@@ -0,0 +1,43 @@
|
||||
From 5e600ae2ad370ddbb759e84ce55a7dfaa9a0bdd7 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Sun, 6 Sep 2020 14:17:23 +0200
|
||||
Subject: [PATCH] src/netlink.c: remove REG_NOERROR
|
||||
|
||||
REG_NOERROR is used since version 5.12.0 and
|
||||
https://github.com/collectd/collectd/commit/f7fd32e5209e188db7985a42054252fc4cbfe7c1
|
||||
|
||||
However, REG_NOERROR is not defined by musl, even GNU regex do not
|
||||
mention REG_NOERROR, so just remove it to avoid the following build
|
||||
failure:
|
||||
|
||||
src/netlink.c: In function 'check_ignorelist':
|
||||
src/netlink.c:243:51: error: 'REG_NOERROR' undeclared (first use in this function); did you mean 'REG_NOTBOL'?
|
||||
if (regexec(i->rdevice, dev, 0, NULL, 0) != REG_NOERROR)
|
||||
^~~~~~~~~~~
|
||||
REG_NOTBOL
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/cd4d75888b5259b028132dd224be34f69bcbb702
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Upstream status: https://github.com/collectd/collectd/pull/3569]
|
||||
---
|
||||
src/netlink.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/netlink.c b/src/netlink.c
|
||||
index 7a5da762..fac2fb1e 100644
|
||||
--- a/src/netlink.c
|
||||
+++ b/src/netlink.c
|
||||
@@ -240,7 +240,7 @@ static int check_ignorelist(const char *dev, const char *type,
|
||||
for (ir_ignorelist_t *i = ir_ignorelist_head; i != NULL; i = i->next) {
|
||||
#if HAVE_REGEX_H
|
||||
if (i->rdevice != NULL) {
|
||||
- if (regexec(i->rdevice, dev, 0, NULL, 0) != REG_NOERROR)
|
||||
+ if (regexec(i->rdevice, dev, 0, NULL, 0))
|
||||
continue;
|
||||
} else
|
||||
#endif
|
||||
--
|
||||
2.28.0
|
||||
|
||||
@@ -63,6 +63,16 @@ config BR2_PACKAGE_COLLECTD_LOGSTASH
|
||||
help
|
||||
Writes log messages formatted as logstash JSON events.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_LUA
|
||||
bool "lua"
|
||||
depends on BR2_PACKAGE_HAS_LUAINTERPRETER
|
||||
help
|
||||
Embeds a Lua interpreter into collectd and provides an
|
||||
interface to collectd's plugin system.
|
||||
|
||||
comment "lua support needs a Lua interpreter"
|
||||
depends on !BR2_PACKAGE_HAS_LUAINTERPRETER
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_NOTIFY_EMAIL
|
||||
bool "notify_email"
|
||||
depends on !BR2_STATIC_LIBS # libesmtp
|
||||
@@ -121,6 +131,21 @@ config BR2_PACKAGE_COLLECTD_BIND
|
||||
help
|
||||
Collects BIND DNS statistics.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_BUDDYINFO
|
||||
bool "buddyinfo"
|
||||
help
|
||||
Statistics from buddyinfo file about memory fragmentation.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_CAPABILITIES
|
||||
bool "capabilities"
|
||||
depends on BR2_aarch64 || BR2_i386 || BR2_x86_64 # dmidecode
|
||||
select BR2_PACKAGE_DMIDECODE # runtime
|
||||
select BR2_PACKAGE_JANSSON
|
||||
select BR2_PACKAGE_LIBMICROHTTPD
|
||||
help
|
||||
Collects selected static platform data using dmidecode and
|
||||
expose it through micro embedded webserver.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_CEPH
|
||||
bool "ceph"
|
||||
select BR2_PACKAGE_YAJL
|
||||
@@ -203,6 +228,13 @@ config BR2_PACKAGE_COLLECTD_DNS
|
||||
help
|
||||
Collects statistics of DNS traffic using libpcap.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_DPDK_TELEMETRY
|
||||
bool "dpdk_telemetry"
|
||||
select BR2_PACKAGE_JANSSON
|
||||
help
|
||||
Collects DPDK ethernet device metrics via dpdk_telemetry
|
||||
library.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_DRBD
|
||||
bool "drbd"
|
||||
help
|
||||
@@ -354,11 +386,29 @@ config BR2_PACKAGE_COLLECTD_NTPD
|
||||
help
|
||||
Queries an NTP server and extracts parameters.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_NUT
|
||||
bool "nut"
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
select BR2_PACKAGE_NUT
|
||||
help
|
||||
The NUT plugin collects uninterruptible power supply (UPS)
|
||||
statistics using the Network UPS Tools (NUT).
|
||||
|
||||
comment "nut needs a toolchain w/ C++"
|
||||
depends on !BR2_INSTALL_LIBSTDCPP
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_OLSRD
|
||||
bool "olsrd"
|
||||
help
|
||||
Reads information about meshed networks from olsrd.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_ONEWIRE
|
||||
bool "onewire"
|
||||
select BR2_PACKAGE_OWFS
|
||||
help
|
||||
Collects temperature information from sensors connected over
|
||||
the OneWire bus.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_OPENLDAP
|
||||
bool "openldap"
|
||||
depends on BR2_USE_WCHAR
|
||||
@@ -549,9 +599,25 @@ config BR2_PACKAGE_COLLECTD_GRAPHITE
|
||||
Writes data collected to Carbon (Graphite's) storage API.
|
||||
http://graphite.wikidot.com/start
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_GRPC
|
||||
bool "grpc"
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC # grpc
|
||||
depends on BR2_INSTALL_LIBSTDCPP # grpc -> protobuf
|
||||
depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS # grpc -> protobuf
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # grpc -> protobuf
|
||||
depends on BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS # grpc
|
||||
select BR2_PACKAGE_GRPC
|
||||
help
|
||||
Send/receive values using the gRPC protocol.
|
||||
|
||||
comment "grpc needs a toolchain w/ C++, gcc >= 4.8"
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
|
||||
depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
|
||||
depends on BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS # grpc
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_MQTT
|
||||
bool "mqtt"
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4 # mosquitto
|
||||
select BR2_PACKAGE_MOSQUITTO
|
||||
help
|
||||
Sends metrics to and/or receives metrics from an MQTT broker.
|
||||
@@ -561,6 +627,14 @@ config BR2_PACKAGE_COLLECTD_NETWORK
|
||||
help
|
||||
Send/receive values from other instances of collectd.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_NETWORK_GCRYPT
|
||||
bool "crypto support"
|
||||
depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS # libgcrypt
|
||||
depends on BR2_PACKAGE_COLLECTD_NETWORK
|
||||
select BR2_PACKAGE_LIBGCRYPT
|
||||
help
|
||||
Enable crypto support
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_RRDTOOL
|
||||
bool "rrdtool"
|
||||
depends on BR2_USE_WCHAR # rrdtool
|
||||
@@ -576,7 +650,6 @@ config BR2_PACKAGE_COLLECTD_RIEMANN
|
||||
# riemann-c-client -> protobuf-c
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
|
||||
depends on BR2_HOST_GCC_AT_LEAST_4_8
|
||||
select BR2_PACKAGE_RIEMANN_C_CLIENT
|
||||
select BR2_PACKAGE_LIBTOOL
|
||||
help
|
||||
@@ -596,6 +669,12 @@ config BR2_PACKAGE_COLLECTD_WRITEHTTP
|
||||
Sends values collected to a web-server using HTTP POST and
|
||||
PUTVAL.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_WRITEINFLUXDBUDP
|
||||
bool "write_influxdb_udp"
|
||||
help
|
||||
Sends data to an instance of InfluxDB using the "Line
|
||||
Protocol".
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_WRITELOG
|
||||
bool "write_log"
|
||||
help
|
||||
@@ -605,15 +684,14 @@ config BR2_PACKAGE_COLLECTD_WRITEPROMETHEUS
|
||||
bool "write_prometheus"
|
||||
depends on BR2_INSTALL_LIBSTDCPP # protobuf-c
|
||||
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" # protobuf-c
|
||||
depends on BR2_HOST_GCC_AT_LEAST_4_8 # protobuf-c
|
||||
select BR2_PACKAGE_LIBMICROHTTPD
|
||||
select BR2_PACKAGE_PROTOBUF_C
|
||||
help
|
||||
Publishes values using an embedded HTTP server, in a format
|
||||
compatible with Prometheus' collectd_exporter.
|
||||
|
||||
comment "write_prometheus needs a toolchain w/ C++, host gcc >= 4.8"
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_HOST_GCC_AT_LEAST_4_8
|
||||
comment "write_prometheus needs a toolchain w/ C++"
|
||||
depends on !BR2_INSTALL_LIBSTDCPP
|
||||
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_WRITEREDIS
|
||||
|
||||
51
package/collectd/S90collectd
Normal file
51
package/collectd/S90collectd
Normal file
@@ -0,0 +1,51 @@
|
||||
#!/bin/sh
|
||||
|
||||
DAEMON="collectd"
|
||||
EXEC="/usr/sbin/$DAEMON"
|
||||
PIDFILE="/var/run/$DAEMON.pid"
|
||||
COLLECTD_ARGS=""
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON"
|
||||
|
||||
start() {
|
||||
printf 'Starting %s: ' "$DAEMON"
|
||||
# shellcheck disable=SC2086 # we need the word splitting
|
||||
start-stop-daemon -S -q -p "$PIDFILE" -x "$EXEC" \
|
||||
-- $COLLECTD_ARGS
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf 'Stopping %s: ' "$DAEMON"
|
||||
start-stop-daemon -K -q -p "$PIDFILE"
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
sleep 1
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start|stop|restart)
|
||||
"$1";;
|
||||
reload)
|
||||
restart;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|reload}"
|
||||
exit 1
|
||||
esac
|
||||
@@ -1,9 +1,5 @@
|
||||
# From https://collectd.org/files/SHA512SUM
|
||||
sha512 f2bf9896dd8fa116834418ea46aabdb160002da7f2600b7d5120d40eb7a956ccc845299696c854c2335946903374c84bbaeb28667319bf07b7a54ea465cccd54 collectd-5.9.0.tar.bz2
|
||||
# From https://collectd.org/files/SHA256SUM
|
||||
sha256 7b220f8898a061f6e7f29a8c16697d1a198277f813da69474a67911097c0626b collectd-5.9.0.tar.bz2
|
||||
# From https://collectd.org/files/SHA1SUM
|
||||
sha1 58cd22ef8130f17c714e9609053cf45d311ac6c7 collectd-5.9.0.tar.bz2
|
||||
|
||||
# Hash for license files
|
||||
# Locally computed checksums
|
||||
sha512 7a15e4c0ae587db4987d673a790a4f3bea1cab29ce24a506fb21fa7bd2f60bfec70867eaa1c1395cb5b0e0ae81a024fb6109b064da0ef50e7c146d2198871c70 collectd-5.12.0.tar.bz2
|
||||
sha256 5bae043042c19c31f77eb8464e56a01a5454e0b39fa07cf7ad0f1bfc9c3a09d6 collectd-5.12.0.tar.bz2
|
||||
sha1 af36fe83e2995270b5632fc21e5a001e6702cdce collectd-5.12.0.tar.bz2
|
||||
sha256 ed0409b2b1c30566dab5fcdaf46ee70e140c99788e22f0267645a9357b476ae4 COPYING
|
||||
|
||||
@@ -4,22 +4,21 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
COLLECTD_VERSION = 5.9.0
|
||||
COLLECTD_SITE = http://collectd.org/files
|
||||
COLLECTD_VERSION = 5.12.0
|
||||
COLLECTD_SITE = \
|
||||
https://github.com/collectd/collectd/releases/download/collectd-$(COLLECTD_VERSION)
|
||||
COLLECTD_SOURCE = collectd-$(COLLECTD_VERSION).tar.bz2
|
||||
COLLECTD_CONF_ENV = ac_cv_lib_yajl_yajl_alloc=yes
|
||||
COLLECTD_INSTALL_STAGING = YES
|
||||
COLLECTD_LICENSE = MIT (daemon, plugins), GPL-2.0 (plugins), LGPL-2.1 (plugins)
|
||||
COLLECTD_LICENSE_FILES = COPYING
|
||||
# We're patching configure.ac
|
||||
COLLECTD_AUTORECONF = YES
|
||||
|
||||
# These require unmet dependencies, are fringe, pointless or deprecated
|
||||
COLLECTD_PLUGINS_DISABLE = \
|
||||
apple_sensors aquaero ascent barometer dbi dpdkstat email \
|
||||
gmond grpc hddtemp intel_rdt ipmi java lpar lua lvm \
|
||||
gmond hddtemp intel_rdt ipmi java lpar \
|
||||
madwifi mbmon mic multimeter netapp notify_desktop numa \
|
||||
nut onewire oracle perl pf pinba powerdns python routeros \
|
||||
oracle perl pf pinba powerdns python routeros \
|
||||
rrdcached sigrok tape target_v5upgrade teamspeak2 ted \
|
||||
tokyotyrant turbostat uuid varnish virt vserver write_kafka \
|
||||
write_mongodb xencpu xmms zfs_arc zone
|
||||
@@ -52,6 +51,8 @@ COLLECTD_CONF_OPTS += \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_APCUPS),--enable-apcups,--disable-apcups) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_BATTERY),--enable-battery,--disable-battery) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_BIND),--enable-bind,--disable-bind) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_BUDDYINFO),--enable-buddyinfo,--disable-buddyinfo) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CAPABILITIES),--enable-capabilities,--disable-capabilities) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CEPH),--enable-ceph,--disable-ceph) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CHRONY),--enable-chrony,--disable-chrony) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CGROUPS),--enable-cgroups,--disable-cgroups) \
|
||||
@@ -67,6 +68,7 @@ COLLECTD_CONF_OPTS += \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_DF),--enable-df,--disable-df) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_DISK),--enable-disk,--disable-disk) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_DNS),--enable-dns,--disable-dns) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_DPDK_TELEMETRY),--enable-dpdk_telemetry,--disable-dpdk_telemetry) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_DRBD),--enable-drbd,--disable-drbd) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_EMPTY_COUNTER),--enable-match_empty_counter,--disable-match_empty_counter) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_ENTROPY),--enable-entropy,--disable-entropy) \
|
||||
@@ -77,6 +79,7 @@ COLLECTD_CONF_OPTS += \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_FSCACHE),--enable-fscache,--disable-fscache) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_GPS),--enable-gps,--disable-gps) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_GRAPHITE),--enable-write_graphite,--disable-write_graphite) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_GRPC),--enable-grpc,--disable-grpc) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_HASHED),--enable-match_hashed,--disable-match_hashed) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_HUGEPAGES),--enable-hugepages,--disable-hugepages) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_INTERFACE),--enable-interface,--disable-interface) \
|
||||
@@ -87,6 +90,7 @@ COLLECTD_CONF_OPTS += \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_LOAD),--enable-load,--disable-load) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_LOGFILE),--enable-logfile,--disable-logfile) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_LOGSTASH),--enable-log_logstash,--disable-log_logstash) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_LUA),--enable-lua,--disable-lua) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_MD),--enable-md,--disable-md) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_MEMCACHEC),--enable-memcachec,--disable-memcachec) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_MEMCACHED),--enable-memcached,--disable-memcached) \
|
||||
@@ -102,7 +106,9 @@ COLLECTD_CONF_OPTS += \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NOTIFY_EMAIL),--enable-notify_email,--disable-notify_email) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NOTIFY_NAGIOS),--enable-notify_nagios,--disable-notify_nagios) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NTPD),--enable-ntpd,--disable-ntpd) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NUT),--enable-nut,--disable-nut) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_OLSRD),--enable-olsrd,--disable-olsrd) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_ONEWIRE),--enable-onewire,--disable-onewire) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_OPENLDAP),--enable-openldap,--disable-openldap) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_OPENVPN),--enable-openvpn,--disable-openvpn) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_PING),--enable-ping,--disable-ping) \
|
||||
@@ -137,6 +143,7 @@ COLLECTD_CONF_OPTS += \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_VMEM),--enable-vmem,--disable-vmem) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_WIRELESS),--enable-wireless,--disable-wireless) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_WRITEHTTP),--enable-write_http,--disable-write_http) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_WRITEINFLUXDBUDP),--enable-write_influxdb_udp,--disable-write_influxdb_udp) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_WRITELOG),--enable-write_log,--disable-write_log) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_WRITEPROMETHEUS),--enable-write_prometheus,--disable-write_prometheus) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_WRITEREDIS),--enable-write_redis,--disable-write_redis) \
|
||||
@@ -149,14 +156,18 @@ COLLECTD_DEPENDENCIES = \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_AMQP),rabbitmq-c) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_APACHE),libcurl) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_BIND),libcurl libxml2) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CAPABILITIES),jansson libmicrohttpd) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CEPH),yajl) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CURL),libcurl) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CURL_JSON),libcurl yajl) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CURL_XML),libcurl libxml2) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_DNS),libpcap) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_DPDK_TELEMETRY),jansson) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_GPS),gpsd) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_GRPC),grpc) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_IPTABLES),iptables) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_LOGSTASH),yajl) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_LUA),luainterpreter) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_MEMCACHEC),libmemcached) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_MODBUS),libmodbus) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_MQTT),mosquitto) \
|
||||
@@ -164,6 +175,8 @@ COLLECTD_DEPENDENCIES = \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NETLINK),libmnl) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NGINX),libcurl) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NOTIFY_EMAIL),libesmtp) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NUT),nut) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_ONEWIRE),owfs) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_OPENLDAP),openldap) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_PING),liboping) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_POSTGRESQL),postgresql) \
|
||||
@@ -178,9 +191,18 @@ COLLECTD_DEPENDENCIES = \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_WRITEREDIS),hiredis)
|
||||
|
||||
# include/library fixups
|
||||
ifeq ($(BR2_PACKAGE_GRPC),y)
|
||||
COLLECTD_CONF_OPTS += --with-libgrpc++=$(STAGING_DIR)/usr
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_JANSSON),y)
|
||||
COLLECTD_CONF_OPTS += --with-libjansson=$(STAGING_DIR)/usr
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_LIBCURL),y)
|
||||
COLLECTD_CONF_OPTS += --with-libcurl=$(STAGING_DIR)/usr
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_LUAJIT),y)
|
||||
COLLECTD_CONF_ENV += LIBLUA_PKG_CONFIG_NAME=luajit
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_MYSQL),y)
|
||||
COLLECTD_CONF_OPTS += --with-libmysql=$(STAGING_DIR)/usr
|
||||
endif
|
||||
@@ -192,7 +214,7 @@ COLLECTD_CONF_OPTS += --with-libpq=$(STAGING_DIR)/usr/bin/pg_config
|
||||
COLLECTD_CONF_ENV += LIBS="-lpthread -lm"
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_YAJL),y)
|
||||
COLLECTD_CONF_OPTS += --with-yajl=$(STAGING_DIR)/usr
|
||||
COLLECTD_CONF_OPTS += --with-libyajl=$(STAGING_DIR)/usr
|
||||
endif
|
||||
|
||||
# network can use libgcrypt
|
||||
@@ -206,15 +228,23 @@ endif
|
||||
define COLLECTD_INSTALL_TARGET_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install
|
||||
rm -f $(TARGET_DIR)/usr/bin/collectd-nagios
|
||||
endef
|
||||
|
||||
ifeq ($(BR2_PACKAGE_COLLECTD_POSTGRESQL),)
|
||||
define COLLECTD_REMOVE_UNNEEDED_POSTGRESQL_DEFAULT_CONF
|
||||
rm -f $(TARGET_DIR)/usr/share/collectd/postgresql_default.conf
|
||||
endef
|
||||
COLLECTD_POST_INSTALL_TARGET_HOOKS += COLLECTD_REMOVE_UNNEEDED_POSTGRESQL_DEFAULT_CONF
|
||||
endif
|
||||
|
||||
define COLLECTD_INSTALL_INIT_SYSTEMD
|
||||
$(INSTALL) -D -m 644 package/collectd/collectd.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/collectd.service
|
||||
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
|
||||
ln -fs ../../../../usr/lib/systemd/system/collectd.service \
|
||||
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/collectd.service
|
||||
endef
|
||||
|
||||
define COLLECTD_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -D -m 0755 package/collectd/S90collectd \
|
||||
$(TARGET_DIR)/etc/init.d/S90collectd
|
||||
endef
|
||||
|
||||
$(eval $(autotools-package))
|
||||
|
||||
Reference in New Issue
Block a user