Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "Collects and summarises system performance statistics" |
| 2 | 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." |
Andrew Geissler | 2013739 | 2023-10-12 04:59:14 -0600 | [diff] [blame] | 3 | HOMEPAGE = "https://collectd.org/" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 4 | LICENSE = "GPL-2.0-only & MIT" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=1bd21f19f7f0c61a7be8ecacb0e28854" |
| 6 | |
| 7 | DEPENDS = "rrdtool curl libpcap libxml2 yajl libgcrypt libtool lvm2" |
| 8 | |
Andrew Geissler | 2013739 | 2023-10-12 04:59:14 -0600 | [diff] [blame] | 9 | SRC_URI = "https://collectd.org/files/collectd-${PV}.tar.bz2 \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 10 | file://collectd.init \ |
| 11 | file://collectd.service \ |
| 12 | file://no-gcrypt-badpath.patch \ |
| 13 | file://0001-fix-to-build-with-glibc-2.25.patch \ |
| 14 | file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch \ |
| 15 | file://0005-Disable-new-gcc8-warnings.patch \ |
| 16 | file://0006-libcollectdclient-Fix-string-overflow-errors.patch \ |
| 17 | file://0001-Remove-including-sys-sysctl.h-on-glibc-based-systems.patch \ |
| 18 | " |
Andrew Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 19 | SRC_URI[md5sum] = "2b23a65960bc323d065234776a542e04" |
| 20 | SRC_URI[sha256sum] = "5bae043042c19c31f77eb8464e56a01a5454e0b39fa07cf7ad0f1bfc9c3a09d6" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 21 | |
| 22 | inherit autotools python3native update-rc.d pkgconfig systemd |
| 23 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 24 | SYSTEMD_SERVICE:${PN} = "collectd.service" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 25 | |
| 26 | # Floatingpoint layout, architecture dependent |
| 27 | # 'nothing', 'endianflip' or 'intswap' |
| 28 | FPLAYOUT ?= "--with-fp-layout=nothing" |
| 29 | |
| 30 | PACKAGECONFIG ??= "" |
| 31 | PACKAGECONFIG[openjdk] = "--with-java=${STAGING_DIR_TARGET}${libdir}/jvm,--without-java,openjdk-7" |
| 32 | PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp --with-libnetsnmp=no,net-snmp" |
| 33 | PACKAGECONFIG[libmemcached] = "--with-libmemcached,--without-libmemcached,libmemcached" |
| 34 | PACKAGECONFIG[iptables] = "--enable-iptables,--disable-iptables,iptables" |
| 35 | PACKAGECONFIG[postgresql] = "--enable-postgresql --with-libpq=yes, \ |
| 36 | --disable-postgresql --with-libpq=no,postgresql" |
| 37 | PACKAGECONFIG[mysql] = "--enable-mysql --with-libmysql=yes, \ |
| 38 | --disable-mysql --with-libmysql=no,mysql5" |
| 39 | PACKAGECONFIG[dbi] = "--enable-dbi,--disable-dbi,libdbi" |
| 40 | PACKAGECONFIG[modbus] = "--enable-modbus,--disable-modbus,libmodbus" |
| 41 | PACKAGECONFIG[libowcapi] = "--with-libowcapi,--without-libowcapi,owfs" |
| 42 | PACKAGECONFIG[sensors] = "--enable-sensors --with-libsensors=yes, \ |
| 43 | --disable-sensors --with-libsensors=no,lmsensors" |
| 44 | PACKAGECONFIG[amqp] = "--enable-amqp --with-librabbitmq=yes, \ |
| 45 | --disable-amqp --with-librabbitmq=no,rabbitmq-c" |
| 46 | # protobuf-c, libvirt that are currently only available in meta-virtualization layer |
| 47 | PACKAGECONFIG[pinba] = "--enable-pinba,--disable-pinba,protobuf-c-native protobuf-c" |
| 48 | PACKAGECONFIG[libvirt] = "--enable-virt,--disable-virt,libvirt" |
| 49 | PACKAGECONFIG[libesmtp] = "--with-libesmtp,--without-libesmtp,libesmtp" |
| 50 | PACKAGECONFIG[libmnl] = "--with-libmnl,--without-libmnl,libmnl" |
| 51 | PACKAGECONFIG[libatasmart] = "--with-libatasmart,--without-libatasmart,libatasmart" |
| 52 | PACKAGECONFIG[ldap] = "--enable-openldap --with-libldap,--disable-openldap --without-libldap, openldap" |
Andrew Geissler | a2681d9 | 2020-10-16 10:17:07 -0500 | [diff] [blame] | 53 | PACKAGECONFIG[rrdtool] = "--enable-rrdtool,--disable-rrdtool,rrdtool" |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 54 | PACKAGECONFIG[rrdcached] = "--enable-rrdcached,--disable-rrdcached,rrdtool" |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 55 | PACKAGECONFIG[python] = "--enable-python,--disable-python" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 56 | |
| 57 | EXTRA_OECONF = " \ |
| 58 | ${FPLAYOUT} \ |
| 59 | --disable-perl --with-libperl=no --with-perl-bindings=no \ |
| 60 | --with-libgcrypt=${STAGING_BINDIR_CROSS}/libgcrypt-config \ |
Andrew Geissler | 4b7c115 | 2020-11-30 19:55:29 -0600 | [diff] [blame] | 61 | --disable-notify_desktop --disable-werror \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 62 | " |
| 63 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 64 | do_install:append() { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 65 | install -d ${D}${sysconfdir}/init.d |
| 66 | install -m 0755 ${WORKDIR}/collectd.init ${D}${sysconfdir}/init.d/collectd |
| 67 | sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/collectd |
| 68 | sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/collectd |
| 69 | sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/collectd |
| 70 | sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/collectd |
| 71 | install -Dm 0640 ${B}/src/collectd.conf ${D}${sysconfdir}/collectd.conf |
| 72 | # Fix configuration file to allow collectd to start up |
| 73 | sed -i 's!^#FQDNLookup[ \t]*true!FQDNLookup false!g' ${D}${sysconfdir}/collectd.conf |
| 74 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 75 | rmdir ${D}${localstatedir}/run ${D}${localstatedir}/log |
| 76 | rmdir --ignore-fail-on-non-empty ${D}${localstatedir} |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 77 | |
| 78 | # Install systemd unit files |
| 79 | install -d ${D}${systemd_unitdir}/system |
| 80 | install -m 0644 ${WORKDIR}/collectd.service ${D}${systemd_unitdir}/system |
| 81 | sed -i -e 's,@SBINDIR@,${sbindir},g' \ |
| 82 | ${D}${systemd_unitdir}/system/collectd.service |
| 83 | } |
| 84 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 85 | CONFFILES:${PN} = "${sysconfdir}/collectd.conf" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 86 | |
| 87 | INITSCRIPT_NAME = "collectd" |
| 88 | INITSCRIPT_PARAMS = "defaults" |
| 89 | |
| 90 | # threshold.so load.so are also provided by gegl |
| 91 | # disk.so is also provided by libgphoto2-camlibs |
| 92 | PRIVATE_LIBS = "threshold.so load.so disk.so" |