From ff4e6ece49e7772ffee05ed170bfa8758e74749e Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 9 May 2018 22:05:56 -0700 Subject: collectd: Upgrade to 5.8.0 Fix build with gcc8 along the way Forward port existing patches Signed-off-by: Khem Raj Signed-off-by: Armin Kuster --- .../0001-conditionally-check-libvirt.patch | 33 ++++---- ...heck-for-Wno-error-format-truncation-comp.patch | 32 +++----- .../collectd/0005-Disable-new-gcc8-warnings.patch | 65 ++++++++++++++++ .../collectd/collectd/no-gcrypt-badpath.patch | 80 +++++++++----------- .../recipes-extended/collectd/collectd_5.7.2.bb | 86 --------------------- .../recipes-extended/collectd/collectd_5.8.0.bb | 87 ++++++++++++++++++++++ 6 files changed, 217 insertions(+), 166 deletions(-) create mode 100644 meta-oe/recipes-extended/collectd/collectd/0005-Disable-new-gcc8-warnings.patch delete mode 100644 meta-oe/recipes-extended/collectd/collectd_5.7.2.bb create mode 100644 meta-oe/recipes-extended/collectd/collectd_5.8.0.bb (limited to 'meta-oe') diff --git a/meta-oe/recipes-extended/collectd/collectd/0001-conditionally-check-libvirt.patch b/meta-oe/recipes-extended/collectd/collectd/0001-conditionally-check-libvirt.patch index 1ceacd8c40..5ee75cb4de 100644 --- a/meta-oe/recipes-extended/collectd/collectd/0001-conditionally-check-libvirt.patch +++ b/meta-oe/recipes-extended/collectd/collectd/0001-conditionally-check-libvirt.patch @@ -1,28 +1,31 @@ -[PATCH] conditionally check libvirt +From 385bf1c2ec57942e17ee529e57eef0dcd99904e6 Mon Sep 17 00:00:00 2001 +From: Roy Li +Date: Tue, 1 Sep 2015 17:00:33 +0800 +Subject: [PATCH] [PATCH] conditionally check libvirt Upstream-Statue: Pending check if libvirt is available only when a user wants to use libvirt Signed-off-by: Roy Li + --- - configure.ac | 14 ++++++++------ - 1 file changed, 8 insertions(+), 6 deletions(-) + configure.ac | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) -Index: collectd-5.7.1/configure.ac -=================================================================== ---- collectd-5.7.1.orig/configure.ac -+++ collectd-5.7.1/configure.ac -@@ -5556,12 +5556,14 @@ else - with_libxml2="no (pkg-config doesn't know libxml-2.0)" +diff --git a/configure.ac b/configure.ac +index 101d6f9f..a7eca97d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -5758,11 +5758,14 @@ else + with_libxml2="no (pkg-config doesn't know libxml-2.0)" fi -$PKG_CONFIG --exists libvirt 2>/dev/null --if test "$?" = "0" --then -- with_libvirt="yes" +-if test $? = 0; then +- with_libvirt="yes" -else -- with_libvirt="no (pkg-config doesn't know libvirt)" +- with_libvirt="no (pkg-config doesn't know libvirt)" +if test "x$enable_libvirt" = "xyes"; then + $PKG_CONFIG --exists libvirt 2>/dev/null + if test "$?" = "0" @@ -32,5 +35,5 @@ Index: collectd-5.7.1/configure.ac + with_libvirt="no (pkg-config doesn't know libvirt)" + fi fi - if test "x$with_libxml2" = "xyes" - then + + if test "x$with_libxml2" = "xyes"; then diff --git a/meta-oe/recipes-extended/collectd/collectd/0001-configure-Check-for-Wno-error-format-truncation-comp.patch b/meta-oe/recipes-extended/collectd/collectd/0001-configure-Check-for-Wno-error-format-truncation-comp.patch index 5069a639c1..d2c7268005 100644 --- a/meta-oe/recipes-extended/collectd/collectd/0001-configure-Check-for-Wno-error-format-truncation-comp.patch +++ b/meta-oe/recipes-extended/collectd/collectd/0001-configure-Check-for-Wno-error-format-truncation-comp.patch @@ -1,4 +1,4 @@ -From b459c55e4968321e5a82272cb39aa69d4054990f Mon Sep 17 00:00:00 2001 +From b0a64db90a24469e36978c748417ebe456b34d59 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 22 Apr 2017 11:54:57 -0700 Subject: [PATCH] configure: Check for -Wno-error=format-truncation compiler @@ -14,35 +14,26 @@ client.c:834:23: error: '%s' directive output may be truncated writing up to 102 Signed-off-by: Khem Raj --- - configure.ac | 3 +- - m4/ax_check_compile_flag.m4 | 74 +++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 76 insertions(+), 1 deletion(-) + configure.ac | 1 + + m4/ax_check_compile_flag.m4 | 74 +++++++++++++++++++++++++++++++++++++ + 2 files changed, 75 insertions(+) create mode 100644 m4/ax_check_compile_flag.m4 diff --git a/configure.ac b/configure.ac -index 8854542..edb8cfb 100644 +index a7eca97d..560eb988 100644 --- a/configure.ac +++ b/configure.ac -@@ -4,7 +4,6 @@ AC_INIT([collectd],[m4_esyscmd(./version-gen.sh)]) - AC_CONFIG_SRCDIR(src/target_set.c) - AC_CONFIG_HEADERS(src/config.h) - AC_CONFIG_AUX_DIR([libltdl/config]) -- - dnl older automake's default of ARFLAGS=cru is noisy on newer binutils; - dnl we don't really need the 'u' even in older toolchains. Then there is - dnl older libtool, which spelled it AR_FLAGS -@@ -6688,6 +6687,8 @@ then - AM_CFLAGS="$AM_CFLAGS -Werror" - AM_CXXFLAGS="$AM_CXXFLAGS -Werror" +@@ -6794,6 +6794,7 @@ if test "x$enable_werror" != "xno"; then + AM_CFLAGS="$AM_CFLAGS -Werror" + AM_CXXFLAGS="$AM_CXXFLAGS -Werror" fi +AX_CHECK_COMPILE_FLAG([-Werror -Werror=format-truncation],[AM_CFLAGS="$AM_CFLAGS -Wno-error=format-truncation" AM_CXXFLAGS="$AM_CXXFLAGS -Wno-error=format-truncation"]) -+ + AC_SUBST([AM_CFLAGS]) AC_SUBST([AM_CXXFLAGS]) - diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4 new file mode 100644 -index 0000000..dcabb92 +index 00000000..dcabb92a --- /dev/null +++ b/m4/ax_check_compile_flag.m4 @@ -0,0 +1,74 @@ @@ -120,6 +111,3 @@ index 0000000..dcabb92 + [m4_default([$3], :)]) +AS_VAR_POPDEF([CACHEVAR])dnl +])dnl AX_CHECK_COMPILE_FLAGS --- -2.13.4 - diff --git a/meta-oe/recipes-extended/collectd/collectd/0005-Disable-new-gcc8-warnings.patch b/meta-oe/recipes-extended/collectd/collectd/0005-Disable-new-gcc8-warnings.patch new file mode 100644 index 0000000000..b12690b327 --- /dev/null +++ b/meta-oe/recipes-extended/collectd/collectd/0005-Disable-new-gcc8-warnings.patch @@ -0,0 +1,65 @@ +From d65e48b68076d5b304e6d865967003ae1fea0e6c Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 9 May 2018 21:45:38 -0700 +Subject: [PATCH] Disable new gcc8 warnings + +GCC seems to be not able to detect the checks for size are +already in place + +Signed-off-by: Khem Raj +--- +Upstream-Status: Submitted [https://github.com/collectd/collectd/pull/2768] + src/libcollectdclient/network_parse.c | 7 +++++++ + src/write_sensu.c | 7 +++++++ + 2 files changed, 14 insertions(+) + +diff --git a/src/libcollectdclient/network_parse.c b/src/libcollectdclient/network_parse.c +index 2365ab0a..79e6ed96 100644 +--- a/src/libcollectdclient/network_parse.c ++++ b/src/libcollectdclient/network_parse.c +@@ -163,6 +163,11 @@ static int parse_int(void *payload, size_t payload_size, uint64_t *out) { + return 0; + } + ++#pragma GCC diagnostic push ++#if __GNUC__ == 8 ++#pragma GCC diagnostic ignored "-Wstringop-truncation" ++#endif ++ + static int parse_string(void *payload, size_t payload_size, char *out, + size_t out_size) { + char *in = payload; +@@ -175,6 +180,8 @@ static int parse_string(void *payload, size_t payload_size, char *out, + return 0; + } + ++#pragma GCC diagnostic pop ++ + static int parse_identifier(uint16_t type, void *payload, size_t payload_size, + lcc_value_list_t *state) { + char buf[LCC_NAME_LEN]; +diff --git a/src/write_sensu.c b/src/write_sensu.c +index ce23e654..63e1f599 100644 +--- a/src/write_sensu.c ++++ b/src/write_sensu.c +@@ -569,6 +569,11 @@ static char *sensu_value_to_json(struct sensu_host const *host, /* {{{ */ + return ret_str; + } /* }}} char *sensu_value_to_json */ + ++#pragma GCC diagnostic push ++#if __GNUC__ == 8 ++#pragma GCC diagnostic ignored "-Wstringop-overflow" ++#pragma GCC diagnostic ignored "-Wstringop-truncation" ++#endif + /* + * Uses replace_str2() implementation from + * http://creativeandcritical.net/str-replace-c/ +@@ -631,6 +636,8 @@ static char *replace_str(const char *str, const char *old, /* {{{ */ + return ret; + } /* }}} char *replace_str */ + ++#pragma GCC diagnostic pop ++ + static char *replace_json_reserved(const char *message) /* {{{ */ + { + char *msg = replace_str(message, "\\", "\\\\"); diff --git a/meta-oe/recipes-extended/collectd/collectd/no-gcrypt-badpath.patch b/meta-oe/recipes-extended/collectd/collectd/no-gcrypt-badpath.patch index 1fde6a0711..f12b16cb91 100644 --- a/meta-oe/recipes-extended/collectd/collectd/no-gcrypt-badpath.patch +++ b/meta-oe/recipes-extended/collectd/collectd/no-gcrypt-badpath.patch @@ -1,43 +1,37 @@ -Index: collectd-5.7.1/configure.ac -=================================================================== ---- collectd-5.7.1.orig/configure.ac -+++ collectd-5.7.1/configure.ac -@@ -2305,7 +2305,7 @@ AC_ARG_WITH(libgcrypt, [AS_HELP_STRING([ - with_libgcrypt="yes" - else if test -f "$withval/bin/gcrypt-config" && test -x "$withval/bin/gcrypt-config" - then -- with_libgcrypt_config="$withval/bin/gcrypt-config" -+ with_libgcrypt_config="$withval/bin/pkg-config" - with_libgcrypt="yes" - else if test -d "$withval" - then -@@ -2313,12 +2313,12 @@ AC_ARG_WITH(libgcrypt, [AS_HELP_STRING([ - GCRYPT_LDFLAGS="$GCRYPT_LDFLAGS -L$withval/lib" - with_libgcrypt="yes" - else -- with_libgcrypt_config="gcrypt-config" -+ with_libgcrypt_config="pkg-config" - with_libgcrypt="$withval" - fi; fi; fi - ], - [ -- with_libgcrypt_config="libgcrypt-config" -+ with_libgcrypt_config="pkg-config" - with_libgcrypt="yes" - ]) - -@@ -2326,12 +2326,12 @@ if test "x$with_libgcrypt" = "xyes" && t - then - if test "x$GCRYPT_CPPFLAGS" = "x" - then -- GCRYPT_CPPFLAGS=`"$with_libgcrypt_config" --cflags 2>/dev/null` -+ GCRYPT_CPPFLAGS=`"$with_libgcrypt_config" --cflags libgcrypt 2>/dev/null` - fi - - if test "x$GCRYPT_LIBS" = "x" - then -- GCRYPT_LIBS=`"$with_libgcrypt_config" --libs 2>/dev/null` -+ GCRYPT_LIBS=`"$with_libgcrypt_config" --lib libgcrypt 2>/dev/null` - fi - fi - +From d9b954bd9d0b084d9a1f5159a9f0c45802a51809 Mon Sep 17 00:00:00 2001 +From: Paul Eggleton +Date: Mon, 22 Apr 2013 16:28:16 +0000 + +--- + configure.ac | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index e869a6a0..101d6f9f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2514,20 +2514,20 @@ AC_ARG_WITH([libgcrypt], + if test -f "$withval" && test -x "$withval"; then + with_libgcrypt_config="$withval" + with_libgcrypt="yes" +- else if test -f "$withval/bin/gcrypt-config" && test -x "$withval/bin/gcrypt-config"; then +- with_libgcrypt_config="$withval/bin/gcrypt-config" ++ else if test -f "$withval/bin/pkg-config" && test -x "$withval/bin/pkg-config"; then ++ with_libgcrypt_config="$withval/bin/pkg-config" + with_libgcrypt="yes" + else if test -d "$withval"; then + GCRYPT_CPPFLAGS="$GCRYPT_CPPFLAGS -I$withval/include" + GCRYPT_LDFLAGS="$GCRYPT_LDFLAGS -L$withval/lib" + with_libgcrypt="yes" + else +- with_libgcrypt_config="gcrypt-config" ++ with_libgcrypt_config="pkg-config" + with_libgcrypt="$withval" + fi; fi; fi + ], + [ +- with_libgcrypt_config="libgcrypt-config" ++ with_libgcrypt_config="libpkg-config" + with_libgcrypt="yes" + ] + ) diff --git a/meta-oe/recipes-extended/collectd/collectd_5.7.2.bb b/meta-oe/recipes-extended/collectd/collectd_5.7.2.bb deleted file mode 100644 index c156ea19c9..0000000000 --- a/meta-oe/recipes-extended/collectd/collectd_5.7.2.bb +++ /dev/null @@ -1,86 +0,0 @@ -SUMMARY = "Collects and summarises system performance statistics" -DESCRIPTION = "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." -LICENSE = "GPLv2 & MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=1bd21f19f7f0c61a7be8ecacb0e28854" - -DEPENDS = "rrdtool curl libpcap libxml2 yajl libgcrypt libtool lvm2" - -SRC_URI = "http://collectd.org/files/collectd-${PV}.tar.bz2 \ - file://collectd.init \ - file://collectd.service \ - file://no-gcrypt-badpath.patch \ - file://0001-conditionally-check-libvirt.patch \ - file://0001-fix-to-build-with-glibc-2.25.patch \ - file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch \ -" -SRC_URI[md5sum] = "5da2b69c286a064db35c6cc1e758b039" -SRC_URI[sha256sum] = "9d20a0221569a8d6b80bbc52b86e5e84965f5bafdbf5dfc3790e0fed0763e592" - -inherit autotools pythonnative update-rc.d pkgconfig systemd - -SYSTEMD_SERVICE_${PN} = "collectd.service" - -# Floatingpoint layout, architecture dependent -# 'nothing', 'endianflip' or 'intswap' -FPLAYOUT ?= "--with-fp-layout=nothing" - -PACKAGECONFIG ??= "" -PACKAGECONFIG[openjdk] = "--with-java=${STAGING_DIR_TARGET}${libdir}/jvm,--without-java,openjdk-7" -PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp --with-libnetsnmp=no,net-snmp" -PACKAGECONFIG[libmemcached] = "--with-libmemcached,--without-libmemcached,libmemcached" -PACKAGECONFIG[iptables] = "--enable-iptables,--disable-iptables,iptables" -PACKAGECONFIG[postgresql] = "--enable-postgresql --with-libpq=yes, \ - --disable-postgresql --with-libpq=no,postgresql" -PACKAGECONFIG[mysql] = "--enable-mysql --with-libmysql=yes, \ - --disable-mysql --with-libmysql=no,mysql5" -PACKAGECONFIG[dbi] = "--enable-dbi,--disable-dbi,libdbi" -PACKAGECONFIG[modbus] = "--enable-modbus,--disable-modbus,libmodbus" -PACKAGECONFIG[libowcapi] = "--with-libowcapi,--without-libowcapi,owfs" -PACKAGECONFIG[sensors] = "--enable-sensors --with-libsensors=yes, \ - --disable-sensors --with-libsensors=no,lmsensors" -PACKAGECONFIG[amqp] = "--enable-amqp --with-librabbitmq=yes, \ - --disable-amqp --with-librabbitmq=no,rabbitmq-c" -# protobuf-c, libvirt that are currently only available in meta-virtualization layer -PACKAGECONFIG[pinba] = "--enable-pinba,--disable-pinba,protobuf-c-native protobuf-c" -PACKAGECONFIG[libvirt] = "--enable-libvirt,--disable-libvirt,libvirt" -PACKAGECONFIG[libesmtp] = "--with-libesmtp,--without-libesmtp,libesmtp" -PACKAGECONFIG[libmnl] = "--with-libmnl,--without-libmnl,libmnl" -PACKAGECONFIG[libatasmart] = "--with-libatasmart,--without-libatasmart,libatasmart" -PACKAGECONFIG[ldap] = "--enable-openldap --with-libldap,--disable-openldap --without-libldap, openldap" - -EXTRA_OECONF = " \ - ${FPLAYOUT} \ - --disable-perl --with-libperl=no --with-perl-bindings=no \ - --with-libgcrypt=${STAGING_BINDIR_CROSS}/libgcrypt-config \ - --disable-notify_desktop \ -" - -do_install_append() { - install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/collectd.init ${D}${sysconfdir}/init.d/collectd - sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/collectd - sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/collectd - sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/collectd - sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/collectd - - # Fix configuration file to allow collectd to start up - sed -i 's!^#FQDNLookup[ \t]*true!FQDNLookup false!g' ${D}${sysconfdir}/collectd.conf - - rmdir "${D}${localstatedir}/run" - rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" - - # Install systemd unit files - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/collectd.service ${D}${systemd_unitdir}/system - sed -i -e 's,@SBINDIR@,${sbindir},g' \ - ${D}${systemd_unitdir}/system/collectd.service -} - -CONFFILES_${PN} = "${sysconfdir}/collectd.conf" - -INITSCRIPT_NAME = "collectd" -INITSCRIPT_PARAMS = "defaults" - -# threshold.so load.so are also provided by gegl -# disk.so is also provided by libgphoto2-camlibs -PRIVATE_LIBS = "threshold.so load.so disk.so" diff --git a/meta-oe/recipes-extended/collectd/collectd_5.8.0.bb b/meta-oe/recipes-extended/collectd/collectd_5.8.0.bb new file mode 100644 index 0000000000..92b619e227 --- /dev/null +++ b/meta-oe/recipes-extended/collectd/collectd_5.8.0.bb @@ -0,0 +1,87 @@ +SUMMARY = "Collects and summarises system performance statistics" +DESCRIPTION = "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." +LICENSE = "GPLv2 & MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=1bd21f19f7f0c61a7be8ecacb0e28854" + +DEPENDS = "rrdtool curl libpcap libxml2 yajl libgcrypt libtool lvm2" + +SRC_URI = "http://collectd.org/files/collectd-${PV}.tar.bz2 \ + file://collectd.init \ + file://collectd.service \ + file://no-gcrypt-badpath.patch \ + file://0001-conditionally-check-libvirt.patch \ + file://0001-fix-to-build-with-glibc-2.25.patch \ + file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch \ + file://0005-Disable-new-gcc8-warnings.patch \ + " +SRC_URI[md5sum] = "a841159323624f18bf03198e9f5aa364" +SRC_URI[sha256sum] = "b06ff476bbf05533cb97ae6749262cc3c76c9969f032bd8496690084ddeb15c9" + +inherit autotools pythonnative update-rc.d pkgconfig systemd + +SYSTEMD_SERVICE_${PN} = "collectd.service" + +# Floatingpoint layout, architecture dependent +# 'nothing', 'endianflip' or 'intswap' +FPLAYOUT ?= "--with-fp-layout=nothing" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[openjdk] = "--with-java=${STAGING_DIR_TARGET}${libdir}/jvm,--without-java,openjdk-7" +PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp --with-libnetsnmp=no,net-snmp" +PACKAGECONFIG[libmemcached] = "--with-libmemcached,--without-libmemcached,libmemcached" +PACKAGECONFIG[iptables] = "--enable-iptables,--disable-iptables,iptables" +PACKAGECONFIG[postgresql] = "--enable-postgresql --with-libpq=yes, \ + --disable-postgresql --with-libpq=no,postgresql" +PACKAGECONFIG[mysql] = "--enable-mysql --with-libmysql=yes, \ + --disable-mysql --with-libmysql=no,mysql5" +PACKAGECONFIG[dbi] = "--enable-dbi,--disable-dbi,libdbi" +PACKAGECONFIG[modbus] = "--enable-modbus,--disable-modbus,libmodbus" +PACKAGECONFIG[libowcapi] = "--with-libowcapi,--without-libowcapi,owfs" +PACKAGECONFIG[sensors] = "--enable-sensors --with-libsensors=yes, \ + --disable-sensors --with-libsensors=no,lmsensors" +PACKAGECONFIG[amqp] = "--enable-amqp --with-librabbitmq=yes, \ + --disable-amqp --with-librabbitmq=no,rabbitmq-c" +# protobuf-c, libvirt that are currently only available in meta-virtualization layer +PACKAGECONFIG[pinba] = "--enable-pinba,--disable-pinba,protobuf-c-native protobuf-c" +PACKAGECONFIG[libvirt] = "--enable-libvirt,--disable-libvirt,libvirt" +PACKAGECONFIG[libesmtp] = "--with-libesmtp,--without-libesmtp,libesmtp" +PACKAGECONFIG[libmnl] = "--with-libmnl,--without-libmnl,libmnl" +PACKAGECONFIG[libatasmart] = "--with-libatasmart,--without-libatasmart,libatasmart" +PACKAGECONFIG[ldap] = "--enable-openldap --with-libldap,--disable-openldap --without-libldap, openldap" + +EXTRA_OECONF = " \ + ${FPLAYOUT} \ + --disable-perl --with-libperl=no --with-perl-bindings=no \ + --with-libgcrypt=${STAGING_BINDIR_CROSS}/libgcrypt-config \ + --disable-notify_desktop \ +" + +do_install_append() { + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/collectd.init ${D}${sysconfdir}/init.d/collectd + sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/collectd + sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/collectd + sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/collectd + sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/collectd + install -Dm 0640 ${B}/src/collectd.conf ${D}${sysconfdir}/collectd.conf + # Fix configuration file to allow collectd to start up + sed -i 's!^#FQDNLookup[ \t]*true!FQDNLookup false!g' ${D}${sysconfdir}/collectd.conf + + rmdir "${D}${localstatedir}/run" + rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" + + # Install systemd unit files + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/collectd.service ${D}${systemd_unitdir}/system + sed -i -e 's,@SBINDIR@,${sbindir},g' \ + ${D}${systemd_unitdir}/system/collectd.service +} + +CONFFILES_${PN} = "${sysconfdir}/collectd.conf" + +INITSCRIPT_NAME = "collectd" +INITSCRIPT_PARAMS = "defaults" + +# threshold.so load.so are also provided by gegl +# disk.so is also provided by libgphoto2-camlibs +PRIVATE_LIBS = "threshold.so load.so disk.so" -- cgit 1.2.3-korg