From 06e7054b9a3383ac28e851e2351b0d8bf56d1300 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 3 Sep 2014 09:56:48 -0700 Subject: collectd: Upgrade to 5.4.1 and fix with glibc 2.20 Signed-off-by: Khem Raj Signed-off-by: Martin Jansa --- .../collectd/glibc-2.20-compatiblity.patch | 102 +++++++++++++++++++++ .../collectd/collectd/no-gcrypt-badpath.patch | 10 +- .../recipes-extended/collectd/collectd_5.2.2.bb | 65 ------------- .../recipes-extended/collectd/collectd_5.4.1.bb | 65 +++++++++++++ 4 files changed, 172 insertions(+), 70 deletions(-) create mode 100644 meta-oe/recipes-extended/collectd/collectd/glibc-2.20-compatiblity.patch delete mode 100644 meta-oe/recipes-extended/collectd/collectd_5.2.2.bb create mode 100644 meta-oe/recipes-extended/collectd/collectd_5.4.1.bb diff --git a/meta-oe/recipes-extended/collectd/collectd/glibc-2.20-compatiblity.patch b/meta-oe/recipes-extended/collectd/collectd/glibc-2.20-compatiblity.patch new file mode 100644 index 0000000000..2596bedf90 --- /dev/null +++ b/meta-oe/recipes-extended/collectd/collectd/glibc-2.20-compatiblity.patch @@ -0,0 +1,102 @@ +This makes it forward compatible with glibc 2.20+ where _BSD_SOURCE +macro has been deprecated. + +Fixes warnings like + +usr/include/features.h:148:3: error: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Werror=cpp] +| # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" + +Signed-off-by: Khem Raj +Upstream-Status: Pending +Index: collectd-5.4.1/configure.ac +=================================================================== +--- collectd-5.4.1.orig/configure.ac 2014-09-03 01:21:10.666084244 -0700 ++++ collectd-5.4.1/configure.ac 2014-09-03 01:31:27.794084244 -0700 +@@ -1288,6 +1288,7 @@ + + AC_CHECK_MEMBERS([struct udphdr.uh_dport, struct udphdr.uh_sport], [], [], + [#define _BSD_SOURCE ++#define _DEFAULT_SOURCE 1 + #if HAVE_STDINT_H + # include + #endif +@@ -1309,6 +1310,7 @@ + ]) + AC_CHECK_MEMBERS([struct udphdr.dest, struct udphdr.source], [], [], + [#define _BSD_SOURCE ++#define _DEFAULT_SOURCE 1 + #if HAVE_STDINT_H + # include + #endif +Index: collectd-5.4.1/src/dns.c +=================================================================== +--- collectd-5.4.1.orig/src/dns.c 2014-01-26 00:09:14.856391886 -0800 ++++ collectd-5.4.1/src/dns.c 2014-09-03 01:32:37.666084244 -0700 +@@ -22,6 +22,7 @@ + **/ + + #define _BSD_SOURCE ++#define _DEFAULT_SOURCE 1 + + #include "collectd.h" + #include "common.h" +Index: collectd-5.4.1/src/exec.c +=================================================================== +--- collectd-5.4.1.orig/src/exec.c 2014-01-26 00:09:14.860391963 -0800 ++++ collectd-5.4.1/src/exec.c 2014-09-03 01:32:28.874084244 -0700 +@@ -24,6 +24,7 @@ + **/ + + #define _BSD_SOURCE /* For setgroups */ ++#define _DEFAULT_SOURCE 1 + + #include "collectd.h" + #include "common.h" +Index: collectd-5.4.1/src/load.c +=================================================================== +--- collectd-5.4.1.orig/src/load.c 2014-01-26 00:09:23.532559941 -0800 ++++ collectd-5.4.1/src/load.c 2014-09-03 01:32:51.462084244 -0700 +@@ -22,6 +22,7 @@ + **/ + + #define _BSD_SOURCE ++#define _DEFAULT_SOURCE 1 + + #include "collectd.h" + #include "common.h" +Index: collectd-5.4.1/src/network.c +=================================================================== +--- collectd-5.4.1.orig/src/network.c 2014-01-26 00:09:23.532559941 -0800 ++++ collectd-5.4.1/src/network.c 2014-09-03 01:32:44.522084244 -0700 +@@ -23,6 +23,7 @@ + **/ + + #define _BSD_SOURCE /* For struct ip_mreq */ ++#define _DEFAULT_SOURCE 1 + + #include "collectd.h" + #include "plugin.h" +Index: collectd-5.4.1/src/ntpd.c +=================================================================== +--- collectd-5.4.1.orig/src/ntpd.c 2014-01-26 00:09:14.880392351 -0800 ++++ collectd-5.4.1/src/ntpd.c 2014-09-03 01:32:20.350084244 -0700 +@@ -20,6 +20,7 @@ + **/ + + #define _BSD_SOURCE /* For NI_MAXHOST */ ++#define _DEFAULT_SOURCE 1 + + #include "collectd.h" + #include "common.h" +Index: collectd-5.4.1/src/utils_dns.c +=================================================================== +--- collectd-5.4.1.orig/src/utils_dns.c 2014-01-26 00:09:14.908392893 -0800 ++++ collectd-5.4.1/src/utils_dns.c 2014-09-03 01:31:47.062084244 -0700 +@@ -34,6 +34,7 @@ + */ + + #define _BSD_SOURCE ++#define _DEFAULT_SOURCE 1 + + #include "collectd.h" + #include "plugin.h" 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 02b160109e..0e876ae85c 100644 --- a/meta-oe/recipes-extended/collectd/collectd/no-gcrypt-badpath.patch +++ b/meta-oe/recipes-extended/collectd/collectd/no-gcrypt-badpath.patch @@ -7,11 +7,11 @@ Upstream-Status: Inappropriate [configuration] Signed-off-by: Paul Eggleton -diff --git a/configure.in b/configure.in -index 98395ed..81c3a2c 100644 ---- a/configure.in -+++ b/configure.in -@@ -1777,11 +1777,11 @@ then +Index: collectd-5.4.1/configure.ac +=================================================================== +--- collectd-5.4.1.orig/configure.ac 2014-09-03 01:20:22.062084244 -0700 ++++ collectd-5.4.1/configure.ac 2014-09-03 01:20:22.058084244 -0700 +@@ -1867,11 +1867,11 @@ GCRYPT_CPPFLAGS=`"$with_libgcrypt_config" --cflags 2>/dev/null` fi diff --git a/meta-oe/recipes-extended/collectd/collectd_5.2.2.bb b/meta-oe/recipes-extended/collectd/collectd_5.2.2.bb deleted file mode 100644 index 69a5a7e133..0000000000 --- a/meta-oe/recipes-extended/collectd/collectd_5.2.2.bb +++ /dev/null @@ -1,65 +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" -LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" - -DEPENDS = "rrdtool curl mysql5 libpcap libxml2 yajl libgcrypt libtool" - -SRC_URI = "http://collectd.org/files/collectd-${PV}.tar.bz2 \ - file://no-gcrypt-badpath.patch \ - file://collectd-version.patch \ - file://collectd.init" - -SRC_URI[md5sum] = "29e61411e51845d5ae71ab676078867e" -SRC_URI[sha256sum] = "7b8906d1c8866155b31820ef108be92abcee7fcd278d386bf0d449e704ba4696" - -inherit autotools pythonnative update-rc.d pkgconfig - -# Floatingpoint layout, architecture dependent -# 'nothing', 'endianflip' or 'intswap' -FPLAYOUT ?= "--with-fp-layout=nothing" - -PACKAGECONFIG ??= "" -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[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 that is currently only available in meta-virtualization layer -PACKAGECONFIG[pinba] = "--enable-pinba,--disable-pinba,protobuf-c-native protobuf-c" - -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}" -} - -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.4.1.bb b/meta-oe/recipes-extended/collectd/collectd_5.4.1.bb new file mode 100644 index 0000000000..dc5f88fd75 --- /dev/null +++ b/meta-oe/recipes-extended/collectd/collectd_5.4.1.bb @@ -0,0 +1,65 @@ +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" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" + +DEPENDS = "rrdtool curl mysql5 libpcap libxml2 yajl libgcrypt libtool lvm2 libmnl" + +SRC_URI = "http://collectd.org/files/collectd-${PV}.tar.bz2 \ + file://no-gcrypt-badpath.patch \ + file://collectd-version.patch \ + file://glibc-2.20-compatiblity.patch \ + file://collectd.init" +SRC_URI[md5sum] = "6f56c71c96573a7f4f7fb3bfab185974" +SRC_URI[sha256sum] = "75452129f271cb0aad28e57f12a49070618bbb7b6a9d64cf869e8766fa2f66e0" + +inherit autotools pythonnative update-rc.d pkgconfig + +# Floatingpoint layout, architecture dependent +# 'nothing', 'endianflip' or 'intswap' +FPLAYOUT ?= "--with-fp-layout=nothing" + +PACKAGECONFIG ??= "" +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[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 that is currently only available in meta-virtualization layer +PACKAGECONFIG[pinba] = "--enable-pinba,--disable-pinba,protobuf-c-native protobuf-c" + +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}" +} + +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 v1.2.3-54-g00ecf