diff options
Diffstat (limited to 'meta-webserver/recipes-webadmin/netdata/netdata_1.47.0.bb')
| -rw-r--r-- | meta-webserver/recipes-webadmin/netdata/netdata_1.47.0.bb | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/meta-webserver/recipes-webadmin/netdata/netdata_1.47.0.bb b/meta-webserver/recipes-webadmin/netdata/netdata_1.47.0.bb new file mode 100644 index 0000000000..9fa322b74c --- /dev/null +++ b/meta-webserver/recipes-webadmin/netdata/netdata_1.47.0.bb | |||
| @@ -0,0 +1,92 @@ | |||
| 1 | SUMMARY = "Real-time performance monitoring" | ||
| 2 | DESCRIPTION = "Netdata is high-fidelity infrastructure monitoring and troubleshooting. \ | ||
| 3 | Open-source, free, preconfigured, opinionated, and always real-time." | ||
| 4 | HOMEPAGE = "https://github.com/netdata/netdata/" | ||
| 5 | LICENSE = "GPL-3.0-only" | ||
| 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=fc9b848046ef54b5eaee6071947abd24" | ||
| 7 | |||
| 8 | DEPENDS += "json-c libuv libyaml util-linux zlib lz4" | ||
| 9 | |||
| 10 | SRC_URI = "\ | ||
| 11 | https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BPN}-v${PV}.tar.gz \ | ||
| 12 | file://netdata.conf \ | ||
| 13 | file://netdata.service \ | ||
| 14 | file://netdata-volatiles.conf \ | ||
| 15 | " | ||
| 16 | SRC_URI[sha256sum] = "6735222ffcff941508b92c8edddc26fbcd719b15880be4911d77fbfd9dbd9a1d" | ||
| 17 | |||
| 18 | UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/tags" | ||
| 19 | UPSTREAM_CHECK_REGEX = "${BPN}/releases/tag/v(?P<pver>\d+(?:\.\d+)*)" | ||
| 20 | |||
| 21 | S = "${WORKDIR}/${BPN}-v${PV}" | ||
| 22 | |||
| 23 | # Stop sending anonymous statistics to Google Analytics | ||
| 24 | NETDATA_ANONYMOUS ??= "enabled" | ||
| 25 | |||
| 26 | inherit pkgconfig cmake useradd systemd | ||
| 27 | |||
| 28 | TARGET_CC_ARCH:append:libc-musl = " -D_LARGEFILE64_SOURCE" | ||
| 29 | |||
| 30 | LIBS:toolchain-clang:x86 = "-latomic" | ||
| 31 | LIBS:riscv64 = "-latomic" | ||
| 32 | LIBS:riscv32 = "-latomic" | ||
| 33 | LIBS:mips = "-latomic" | ||
| 34 | export LIBS | ||
| 35 | |||
| 36 | #systemd | ||
| 37 | SYSTEMD_PACKAGES = "${PN}" | ||
| 38 | SYSTEMD_SERVICE:${PN} = "netdata.service" | ||
| 39 | SYSTEMD_AUTO_ENABLE:${PN} = "enable" | ||
| 40 | |||
| 41 | #User specific | ||
| 42 | USERADD_PACKAGES = "${PN}" | ||
| 43 | USERADD_PARAM:${PN} = "--system --no-create-home --home-dir ${localstatedir}/run/netdata --user-group netdata" | ||
| 44 | |||
| 45 | PACKAGECONFIG ??= "openssl freeipmi ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" | ||
| 46 | PACKAGECONFIG[brotli] = ",,brotli" | ||
| 47 | PACKAGECONFIG[cloud] = "-DENABLE_CLOUD=ON,-DENABLE_CLOUD=OFF," | ||
| 48 | PACKAGECONFIG[openssl] = "-DENABLE_OPENSSL=ON,-DENABLE_OPENSSL=OFF,openssl" | ||
| 49 | PACKAGECONFIG[freeipmi] = "-DENABLE_PLUGIN_FREEIPMI=ON,-DENABLE_PLUGIN_FREEIPMI=OFF,freeipmi" | ||
| 50 | PACKAGECONFIG[nfacct] = "-DENABLE_PLUGIN_NFACCT=ON,-DENABLE_PLUGIN_NFACCT=OFF,libmnl" | ||
| 51 | # needs meta-virtualization | ||
| 52 | PACKAGECONFIG[xenstat] = "-DENABLE_PLUGIN_XENSTAT=ON,-DENABLE_PLUGIN_XENSTAT=OFF,xen-tools" | ||
| 53 | PACKAGECONFIG[cups] = "-DENABLE_PLUGIN_CUPS=ON,-DENABLE_PLUGIN_CUPS=OFF,cups" | ||
| 54 | PACKAGECONFIG[systemd] = "-DENABLE_PLUGIN_SYSTEMD_JOURNAL=ON,-DENABLE_PLUGIN_SYSTEMD_JOURNAL=OFF,systemd" | ||
| 55 | |||
| 56 | # ebpf doesn't compile (or detect) the cross compilation well | ||
| 57 | EXTRA_OECMAKE += "-DENABLE_PLUGIN_EBPF=OFF -DENABLE_PLUGIN_GO=OFF \ | ||
| 58 | -DENABLE_ACLK=OFF -DENABLE_EXPORTER_PROMETHEUS_REMOTE_WRITE=OFF -DCMAKE_INSTALL_PREFIX='${base_prefix}'" | ||
| 59 | |||
| 60 | do_install:append() { | ||
| 61 | #set S UID for plugins | ||
| 62 | chmod 4755 ${D}${libexecdir}/netdata/plugins.d/apps.plugin | ||
| 63 | rm -rf ${D}/${localstatedir}/ | ||
| 64 | |||
| 65 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | ||
| 66 | # Install systemd unit files | ||
| 67 | install -d ${D}${systemd_unitdir}/system | ||
| 68 | install -m 0644 ${UNPACKDIR}/netdata.service ${D}${systemd_unitdir}/system | ||
| 69 | sed -i -e 's,@@datadir,${datadir_native},g' ${D}${systemd_unitdir}/system/netdata.service | ||
| 70 | install -Dm 0644 ${UNPACKDIR}/netdata-volatiles.conf ${D}${sysconfdir}/tmpfiles.d/netdata.conf | ||
| 71 | fi | ||
| 72 | |||
| 73 | # Install default netdata.conf | ||
| 74 | install -d ${D}${sysconfdir}/netdata | ||
| 75 | install -m 0644 ${UNPACKDIR}/netdata.conf ${D}${sysconfdir}/netdata/ | ||
| 76 | sed -i -e 's,@@sysconfdir,${sysconfdir},g' ${D}${sysconfdir}/netdata/netdata.conf | ||
| 77 | sed -i -e 's,@@libdir,${libexecdir},g' ${D}${sysconfdir}/netdata/netdata.conf | ||
| 78 | sed -i -e 's,@@datadir,${datadir},g' ${D}${sysconfdir}/netdata/netdata.conf | ||
| 79 | |||
| 80 | if [ "${NETDATA_ANONYMOUS}" = "enabled" ]; then | ||
| 81 | touch ${D}${sysconfdir}/netdata/.opt-out-from-anonymous-statistics | ||
| 82 | fi | ||
| 83 | |||
| 84 | install --group netdata --owner netdata --directory ${D}${localstatedir}/cache/netdata | ||
| 85 | install --group netdata --owner netdata --directory ${D}${localstatedir}/lib/netdata | ||
| 86 | |||
| 87 | chown -R netdata:netdata ${D}${datadir}/netdata/web | ||
| 88 | } | ||
| 89 | |||
| 90 | FILES:${PN} += "${localstatedir}/cache/netdata/ ${localstatedir}/lib/netdata/" | ||
| 91 | |||
| 92 | RDEPENDS:${PN} = "bash python3-core zlib" | ||
