diff mbox series

[1/1] netdata: enable Go-based plugins

Message ID 20240915175305.3390769-2-jan.vermaete@gmail.com
State New
Headers show
Series RFC: some issues with go? | expand

Commit Message

Jan Vermaete Sept. 15, 2024, 5:53 p.m. UTC
Default enabled because netdata is transforming the plugins from Python to Go rapidly.

Signed-off-by: Jan Vermaete <jan.vermaete@gmail.com>
---
 .../recipes-webadmin/netdata/netdata_1.47.1.bb  | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/meta-webserver/recipes-webadmin/netdata/netdata_1.47.1.bb b/meta-webserver/recipes-webadmin/netdata/netdata_1.47.1.bb
index e134c06b0..7d922dbca 100644
--- a/meta-webserver/recipes-webadmin/netdata/netdata_1.47.1.bb
+++ b/meta-webserver/recipes-webadmin/netdata/netdata_1.47.1.bb
@@ -7,6 +7,17 @@  LIC_FILES_CHKSUM = "file://LICENSE;md5=fc9b848046ef54b5eaee6071947abd24"
 
 DEPENDS += "json-c libuv libyaml util-linux zlib lz4"
 
+GO_ROOT = "${STAGING_LIBDIR}/go"
+export GO_ROOT
+#export GOPROXY = "https://proxy.golang.org,direct"
+
+# Workaround for network access issue during compile step
+# this needs to be fixed in the recipes buildsystem to move
+# this such that it can be accomplished during do_fetch task
+do_compile[network] = "1"
+
+INSANE_SKIP:${PN} += "already-stripped buildpaths"
+
 SRC_URI = "\
     https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BPN}-v${PV}.tar.gz \
     file://netdata.conf \
@@ -42,7 +53,7 @@  SYSTEMD_AUTO_ENABLE:${PN} = "enable"
 USERADD_PACKAGES = "${PN}"
 USERADD_PARAM:${PN} = "--system --no-create-home --home-dir ${localstatedir}/run/netdata --user-group netdata"
 
-PACKAGECONFIG ??= "openssl freeipmi ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
+PACKAGECONFIG ??= "openssl freeipmi ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} go"
 PACKAGECONFIG[brotli] = ",,brotli"
 PACKAGECONFIG[cloud] = "-DENABLE_CLOUD=ON,-DENABLE_CLOUD=OFF,"
 PACKAGECONFIG[openssl] = "-DENABLE_OPENSSL=ON,-DENABLE_OPENSSL=OFF,openssl"
@@ -53,8 +64,10 @@  PACKAGECONFIG[xenstat] = "-DENABLE_PLUGIN_XENSTAT=ON,-DENABLE_PLUGIN_XENSTAT=OFF
 PACKAGECONFIG[cups] = "-DENABLE_PLUGIN_CUPS=ON,-DENABLE_PLUGIN_CUPS=OFF,cups"
 PACKAGECONFIG[systemd] = "-DENABLE_PLUGIN_SYSTEMD_JOURNAL=ON,-DENABLE_PLUGIN_SYSTEMD_JOURNAL=OFF,systemd"
 
+PACKAGECONFIG[go] = "-DENABLE_PLUGIN_GO=ON,-DENABLE_PLUGIN_GO=OFF,go-native"
+
 # ebpf doesn't compile (or detect) the cross compilation well
-EXTRA_OECMAKE += "-DENABLE_PLUGIN_EBPF=OFF -DENABLE_PLUGIN_GO=OFF \
+EXTRA_OECMAKE += "-DENABLE_PLUGIN_EBPF=OFF \
                   -DENABLE_ACLK=OFF -DENABLE_EXPORTER_PROMETHEUS_REMOTE_WRITE=OFF -DCMAKE_INSTALL_PREFIX='${base_prefix}'"
 
 do_install:append() {