diff options
| -rw-r--r-- | meta-webserver/recipes-webadmin/netdata/netdata/0001-Add-check-for-64bit-builtin-atomics.patch | 49 | ||||
| -rw-r--r-- | meta-webserver/recipes-webadmin/netdata/netdata/netdata.service | 15 | ||||
| -rw-r--r-- | meta-webserver/recipes-webadmin/netdata/netdata_1.47.5.bb (renamed from meta-webserver/recipes-webadmin/netdata/netdata_1.47.3.bb) | 20 |
3 files changed, 13 insertions, 71 deletions
diff --git a/meta-webserver/recipes-webadmin/netdata/netdata/0001-Add-check-for-64bit-builtin-atomics.patch b/meta-webserver/recipes-webadmin/netdata/netdata/0001-Add-check-for-64bit-builtin-atomics.patch deleted file mode 100644 index bb4a5235fe..0000000000 --- a/meta-webserver/recipes-webadmin/netdata/netdata/0001-Add-check-for-64bit-builtin-atomics.patch +++ /dev/null | |||
| @@ -1,49 +0,0 @@ | |||
| 1 | From 555cfa9c4d5b1114d975be5208ab066c7924a171 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Tue, 17 Sep 2024 05:29:13 +0000 | ||
| 4 | Subject: [PATCH] Add check for 64bit builtin atomics | ||
| 5 | |||
| 6 | Compilers for some architectures e.g. RISCV32 do not have 64bit atomics | ||
| 7 | therefore, its important to deduce that and use it to pass right flags to | ||
| 8 | compiler to use them, e.g. h2o module | ||
| 9 | |||
| 10 | Fixes | ||
| 11 | nection.c.o): in function `h2o_create_connection': | ||
| 12 | | /usr/src/debug/netdata/1.47.1/src/web/server/h2o/libh2o/include/h2o.h:1917:(.text.create_conn+0x5e): undefined reference to `__sync_add_and_fetch_8' | ||
| 13 | | collect2: error: ld returned 1 exit status | ||
| 14 | |||
| 15 | Upstream-Status: Submitted [https://github.com/netdata/netdata/pull/18565] | ||
| 16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 17 | --- | ||
| 18 | CMakeLists.txt | 11 +++++++++++ | ||
| 19 | 1 file changed, 11 insertions(+) | ||
| 20 | |||
| 21 | Index: netdata-v1.47.3/CMakeLists.txt | ||
| 22 | =================================================================== | ||
| 23 | --- netdata-v1.47.3.orig/CMakeLists.txt | ||
| 24 | +++ netdata-v1.47.3/CMakeLists.txt | ||
| 25 | @@ -448,6 +448,15 @@ int main() { | ||
| 26 | } | ||
| 27 | " HAVE_BUILTIN_ATOMICS) | ||
| 28 | |||
| 29 | +check_cxx_source_compiles(" | ||
| 30 | +#include <stdint.h> | ||
| 31 | +int main(void) { | ||
| 32 | + uint64_t a; | ||
| 33 | + __sync_add_and_fetch(&a, 1); | ||
| 34 | + return 0; | ||
| 35 | +} | ||
| 36 | +" ARCH_SUPPORTS_64BIT_ATOMICS) | ||
| 37 | + | ||
| 38 | check_c_source_compiles(" | ||
| 39 | void my_printf(char const *s, ...) __attribute__((format(gnu_printf, 1, 2))); | ||
| 40 | int main() { return 0; } | ||
| 41 | @@ -1528,6 +1537,8 @@ if(ENABLE_H2O) | ||
| 42 | |||
| 43 | target_compile_options(h2o PUBLIC -DH2O_USE_LIBUV=0) | ||
| 44 | target_link_libraries(h2o PRIVATE PkgConfig::TLS) | ||
| 45 | + target_compile_definitions(h2o PRIVATE | ||
| 46 | + "$<$<NOT:$<BOOL:${ARCH_SUPPORTS_64BIT_ATOMICS}>>:H2O_NO_64BIT_ATOMICS>") | ||
| 47 | endif() | ||
| 48 | |||
| 49 | # | ||
diff --git a/meta-webserver/recipes-webadmin/netdata/netdata/netdata.service b/meta-webserver/recipes-webadmin/netdata/netdata/netdata.service deleted file mode 100644 index f4911f3b6e..0000000000 --- a/meta-webserver/recipes-webadmin/netdata/netdata/netdata.service +++ /dev/null | |||
| @@ -1,15 +0,0 @@ | |||
| 1 | # SPDX-License-Identifier: GPL-3.0-or-later | ||
| 2 | [Unit] | ||
| 3 | Description=Real time performance monitoring | ||
| 4 | RequiresMountsFor=/var | ||
| 5 | After=network.target | ||
| 6 | |||
| 7 | [Service] | ||
| 8 | Type=simple | ||
| 9 | ExecStartPre=/bin/mkdir -p /var/log/netdata | ||
| 10 | ExecStartPre=/bin/chown -R netdata:netdata /var/log/netdata | ||
| 11 | ExecStart=/usr/sbin/netdata -D -u netdata | ||
| 12 | |||
| 13 | |||
| 14 | [Install] | ||
| 15 | WantedBy=multi-user.target | ||
diff --git a/meta-webserver/recipes-webadmin/netdata/netdata_1.47.3.bb b/meta-webserver/recipes-webadmin/netdata/netdata_1.47.5.bb index 5c3ceabf8b..88dbe19e47 100644 --- a/meta-webserver/recipes-webadmin/netdata/netdata_1.47.3.bb +++ b/meta-webserver/recipes-webadmin/netdata/netdata_1.47.5.bb | |||
| @@ -5,22 +5,28 @@ HOMEPAGE = "https://github.com/netdata/netdata/" | |||
| 5 | LICENSE = "GPL-3.0-only" | 5 | LICENSE = "GPL-3.0-only" |
| 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=fc9b848046ef54b5eaee6071947abd24" | 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=fc9b848046ef54b5eaee6071947abd24" |
| 7 | 7 | ||
| 8 | DEPENDS += "json-c libuv libyaml util-linux zlib lz4" | 8 | DEPENDS += "\ |
| 9 | json-c \ | ||
| 10 | libuv \ | ||
| 11 | libyaml \ | ||
| 12 | lz4 \ | ||
| 13 | util-linux \ | ||
| 14 | zlib \ | ||
| 15 | " | ||
| 9 | 16 | ||
| 10 | SRC_URI = " \ | 17 | SRC_URI = "\ |
| 11 | https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BPN}-v${PV}.tar.gz \ | 18 | https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BPN}-v${PV}.tar.gz \ |
| 12 | file://0001-Add-check-for-64bit-builtin-atomics.patch \ | ||
| 13 | file://0002-Do-not-hardcode-systemd-unit-directories.patch \ | 19 | file://0002-Do-not-hardcode-systemd-unit-directories.patch \ |
| 14 | file://netdata.conf \ | 20 | file://netdata.conf \ |
| 15 | file://netdata-volatiles.conf \ | 21 | file://netdata-volatiles.conf \ |
| 16 | ${@bb.utils.contains('PACKAGECONFIG', 'go', 'file://go.d.conf', '', d)} \ | 22 | ${@bb.utils.contains('PACKAGECONFIG', 'go', 'file://go.d.conf', '', d)} \ |
| 17 | " | 23 | " |
| 18 | SRC_URI[sha256sum] = "cf906c304ac49ca335bef8f085664efe4c567d47877a91e0744a7942ba351053" | 24 | SRC_URI[sha256sum] = "8073eee2392f92daa1f8bb5cf13fb988b8c3b52ff9574b50706ff69bdbdb51ce" |
| 19 | 25 | ||
| 20 | UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/tags" | 26 | UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/tags" |
| 21 | UPSTREAM_CHECK_REGEX = "${BPN}/releases/tag/v(?P<pver>\d+(?:\.\d+)*)" | 27 | UPSTREAM_CHECK_REGEX = "${BPN}/releases/tag/v(?P<pver>(?!1\.99)\d+(?:\.\d+)*)" |
| 22 | 28 | ||
| 23 | S = "${WORKDIR}/${BPN}-v${PV}" | 29 | S = "${UNPACKDIR}/${BPN}-v${PV}" |
| 24 | 30 | ||
| 25 | # Stop sending anonymous statistics to Google Analytics | 31 | # Stop sending anonymous statistics to Google Analytics |
| 26 | NETDATA_ANONYMOUS ??= "enabled" | 32 | NETDATA_ANONYMOUS ??= "enabled" |
| @@ -120,7 +126,7 @@ do_install:append() { | |||
| 120 | chown -R netdata:netdata ${D}${datadir}/netdata/web | 126 | chown -R netdata:netdata ${D}${datadir}/netdata/web |
| 121 | } | 127 | } |
| 122 | 128 | ||
| 123 | FILES:${PN} += " \ | 129 | FILES:${PN} += "\ |
| 124 | ${localstatedir}/cache/netdata/ \ | 130 | ${localstatedir}/cache/netdata/ \ |
| 125 | ${localstatedir}/lib/netdata/ \ | 131 | ${localstatedir}/lib/netdata/ \ |
| 126 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}/journald@netdata.conf.d', '', d)} \ | 132 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}/journald@netdata.conf.d', '', d)} \ |
