more information https://github.com/netdata/netdata/releases/tag/v2.5.2
The patch will speed up the update.
Working on this unfortunately there's some issues with the vendored libbacktrace build I'm trying to fix
(In reply to Namkhai B. from comment #2) I wish you success with the development of port version 2.5.2 :) I have tried to use kickstart method of using netdata. I have do: curl https://get.netdata.cloud/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh --stable-channel It works for almost 2 days with 2.5.1, then it has probably tried upgrade to newer version, but actually it crashed and never started again. Now i'm back to net-mgmt/netdata port version 2.40 which works as expected.
Created attachment 260746 [details] net-mgmt/netdata: Update to v2.5.2 Initial v2.5.2 update
1. The port is statically linked with the libbacktrace.a library at build time, rather than dynamically with libbacktrace.so: -BUILD_DEPENDS= ${LOCALBASE}/bin/mmv:misc/mmv +BUILD_DEPENDS= ${LOCALBASE}/bin/mmv:misc/mmv \ + ${LOCALBASE}/lib/libbacktrace.a:devel/libbacktrace 2. Remove go version after default go version was increased to 1.24: GOPLUGIN_DISTFILES= go.mod:goplugin GOPLUGIN_FETCH_DEPENDS= go${GO_SUFFIX}:lang/go${GO_SUFFIX} GOPLUGIN_USES= go:no_targets,modules GOPLUGIN_CMAKE_BOOL= ENABLE_PLUGIN_GO 3. Reducing the number of calls REINPLACE_CMD: pre-patch: - @${REINPLACE_CMD} -e 's|usr/lib/|lib/|g' ${WRKSRC}/CMakeLists.txt - @${REINPLACE_CMD} -e 's|usr/libexec/|libexec/|g' ${WRKSRC}/CMakeLists.txt - @${REINPLACE_CMD} -e 's|usr/share/|share/|g' ${WRKSRC}/CMakeLists.txt + @${REINPLACE_CMD} -e 's|usr/lib/|lib/|g; s|usr/libexec/|libexec/|g; \ + s|usr/share/|share/|g' ${WRKSRC}/CMakeLists.txt post-patch: - @${REINPLACE_CMD} -e 's|%%NETDATA_CACHE%%|${NETDATA_CACHE}|g' \ - ${PATCH_WRKSRC}/CMakeLists.txt - @${REINPLACE_CMD} -e 's|%%NETDATA_LOG%%|${NETDATA_LOG}|g' \ - ${PATCH_WRKSRC}/CMakeLists.txt - @${REINPLACE_CMD} -e 's|%%NETDATA_PERST%%|${NETDATA_PERST}|g' \ - ${PATCH_WRKSRC}/CMakeLists.txt - @${REINPLACE_CMD} -e 's|%%NETDATA_RUN%%|${NETDATA_RUN}|g' \ - ${PATCH_WRKSRC}/CMakeLists.txt - @${REINPLACE_CMD} -e 's|%%ETCDIR%%|${ETCDIR}|g' \ + @${REINPLACE_CMD} -e 's|%%NETDATA_CACHE%%|${NETDATA_CACHE}|g; \ + s|%%NETDATA_LOG%%|${NETDATA_LOG}|g; \ + s|%%NETDATA_PERST%%|${NETDATA_PERST}|g; \ + s|%%NETDATA_RUN%%|${NETDATA_RUN}|g; \ + s|%%ETCDIR%%|${ETCDIR}|g' \ ${PATCH_WRKSRC}/CMakeLists.txt 4. Reducing the number of calls MKDIR: - ${MKDIR} ${STAGEDIR}${ETCDIR} + ${MKDIR} ${STAGEDIR}${ETCDIR} \ + ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d \ + ${STAGEDIR}${NETDATA_CACHE} \ + ${STAGEDIR}${NETDATA_LOG} \ + ${STAGEDIR}${NETDATA_PERST} ${INSTALL_DATA} ${WRKDIR}/netdata.conf.sample ${STAGEDIR}${ETCDIR}/netdata.conf.sample _ ${MKDIR} ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d ${INSTALL_DATA} ${FILESDIR}/netdata.newsyslog.conf.sample ${STAGEDIR}${ETCDIR}/netdata.newsyslog.conf.sample ${TOUCH} ${STAGEDIR}${ETCDIR}/.opt-out-from-anonymous-statistics - ${MKDIR} ${STAGEDIR}${NETDATA_CACHE} - ${MKDIR} ${STAGEDIR}${NETDATA_LOG} - ${MKDIR} ${STAGEDIR}${NETDATA_PERST} This reduce IO during build on build servers. Tested in poudriere, but please check too - what if I made a mistake somewhere.
Changelogs: https://github.com/netdata/netdata/releases/tag/v2.5.0 https://github.com/netdata/netdata/releases/tag/v2.5.1 https://github.com/netdata/netdata/releases/tag/v2.5.2
Created attachment 260779 [details] net-mgmt/netdata: Update to v2.5.2 Thanks Vladimir for the suggested changes
Indents should be 4 spaces, not tab While the suggestions reduces calls it also reduces readability but that's up to the maintainer.
(In reply to Daniel Engberg from comment #8) ...while it is slower in theory there barely any practical impact given that everything is cached. That being said, we don't need to make ports unnecessary slow just because but there is almost always a tradeoff. If you want to reduce I/O and build times there are much larger fishes to catch in the tree.
(In reply to Daniel Engberg from comment #8) Good formatting will only improve readability. Compare: - @${REINPLACE_CMD} -e 's|%%NETDATA_CACHE%%|${NETDATA_CACHE}|g' \ - ${PATCH_WRKSRC}/CMakeLists.txt - @${REINPLACE_CMD} -e 's|%%NETDATA_LOG%%|${NETDATA_LOG}|g' \ - ${PATCH_WRKSRC}/CMakeLists.txt - @${REINPLACE_CMD} -e 's|%%NETDATA_PERST%%|${NETDATA_PERST}|g' \ - ${PATCH_WRKSRC}/CMakeLists.txt - @${REINPLACE_CMD} -e 's|%%NETDATA_RUN%%|${NETDATA_RUN}|g' \ - ${PATCH_WRKSRC}/CMakeLists.txt - @${REINPLACE_CMD} -e 's|%%ETCDIR%%|${ETCDIR}|g' \ - ${PATCH_WRKSRC}/CMakeLists.txt with + @${REINPLACE_CMD} -e '\ + s|%%NETDATA_CACHE%%|${NETDATA_CACHE}|g; \ + s|%%NETDATA_LOG%%|${NETDATA_LOG}|g; \ + s|%%NETDATA_PERST%%|${NETDATA_PERST}|g; \ + s|%%NETDATA_RUN%%|${NETDATA_RUN}|g; \ + s|%%ETCDIR%%|${ETCDIR}|g' \ + ${PATCH_WRKSRC}/CMakeLists.txt
(In reply to Daniel Engberg from comment #9) I fix it in the ports I touch. But really, just "rm -rf /usr/port/lang/rust" alone would help significantly more. :-D
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=8a16dc3383ba2fc713b36fee340867f51d6bf3c8 commit 8a16dc3383ba2fc713b36fee340867f51d6bf3c8 Author: Namkhai B. <nk@nkeor.me> AuthorDate: 2025-05-29 12:32:49 +0000 Commit: Vladimir Druzenko <vvd@FreeBSD.org> CommitDate: 2025-05-29 12:44:05 +0000 net-mgmt/netdata: Update 2.40 => 2.5.2 Changelogs: https://github.com/netdata/netdata/releases/tag/v2.5.0 https://github.com/netdata/netdata/releases/tag/v2.5.1 https://github.com/netdata/netdata/releases/tag/v2.5.2 Improve port: - Reducing the number of calls REINPLACE_CMD and MKDIR. - Remove go version after default go version was increased to 1.24. - Fix ident in MASTER_SITES. - Refresh patches. PR: 287028 net-mgmt/netdata/Makefile | 52 ++--- net-mgmt/netdata/distinfo | 14 +- net-mgmt/netdata/files/patch-CMakeLists.txt | 22 +- ...ging_cmake_Modules_NetdataBacktrace.cmake (new) | 50 ++++ ...ch-packaging_cmake_Modules_NetdataGoTools.cmake | 4 +- ...ch-packaging_cmake_Modules_NetdataVersion.cmake | 4 +- net-mgmt/netdata/pkg-plist | 260 +++++++++++---------- 7 files changed, 237 insertions(+), 169 deletions(-)
Thanks.
(In reply to Vladimir Druzenko from comment #11) Please refrain from off topic rants ..and idents are still wrong.
..and we should hardcode PREFIX to /usr/local/ in packaging/cmake/Modules/NetdataBacktrace.cmake
(In reply to Daniel Engberg from comment #15) err.. shouldn't
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=0f06c18df2a81178b35e56404e79f817c1ae6520 commit 0f06c18df2a81178b35e56404e79f817c1ae6520 Author: Vladimir Druzenko <vvd@FreeBSD.org> AuthorDate: 2025-05-29 18:37:03 +0000 Commit: Vladimir Druzenko <vvd@FreeBSD.org> CommitDate: 2025-05-29 18:43:52 +0000 net-mgmt/netdata: Replace hardcoded /usr/local with LOCALBASE in patch PR: 287028 Reported by: diizzy Approved by: Namkhai B. <nk@nkeor.me> (maintainer, implicit) net-mgmt/netdata/Makefile | 2 ++ .../netdata/files/patch-packaging_cmake_Modules_NetdataBacktrace.cmake | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)
(In reply to Daniel Engberg from comment #14) > ..and idents are still wrong. Can you show me what you mean? And so that it does not spoil the readability of the code.
Something like this? https://projects.pyret.net/files/freebsd-patches/netdata-fixup-indent.patch
(In reply to Daniel Engberg from comment #19) This patch makes the code less readable. But if the porter's handbook says to do it this way and/or the maintainer asks to do it this way, I'll fix it. Otherwise I'd leave it as is now.