Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netdata: 1.45.4 -> 1.46.1 #321644

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion nixos/modules/services/monitoring/netdata.nix
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,8 @@ in {
++ lib.optional cfg.python.enable (pkgs.python3.withPackages cfg.python.extraPackages)
++ lib.optional config.virtualisation.libvirtd.enable config.virtualisation.libvirtd.package
++ lib.optional config.virtualisation.docker.enable config.virtualisation.docker.package
++ lib.optionals config.virtualisation.podman.enable [ pkgs.jq config.virtualisation.podman.package ];
++ lib.optionals config.virtualisation.podman.enable [ pkgs.jq config.virtualisation.podman.package ]
++ lib.optional config.boot.zfs.enabled config.boot.zfs.package;
environment = {
PYTHONPATH = "${cfg.package}/libexec/netdata/python.d/python_modules";
NETDATA_PIPENAME = "/run/netdata/ipc";
Expand Down
25 changes: 25 additions & 0 deletions pkgs/tools/system/netdata/dashboard-v2-removal.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Original: https://github.com/netdata/netdata/pull/17240

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f37cbd18a..6db4c9f52 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -134,6 +134,7 @@ mark_as_advanced(DEFAULT_FEATURE_STATE)
# High-level features
option(ENABLE_ACLK "Enable Netdata Cloud support (ACLK)" ${DEFAULT_FEATURE_STATE})
option(ENABLE_CLOUD "Enable Netdata Cloud by default at runtime" ${DEFAULT_FEATURE_STATE})
+option(ENABLE_DASHBOARD_V2 "enable dashboard v2" True)
option(ENABLE_ML "Enable machine learning features" ${DEFAULT_FEATURE_STATE})
option(ENABLE_DBENGINE "Enable dbengine metrics storage" True)

@@ -2946,7 +2947,9 @@ endif()
#

include(src/web/gui/v1/dashboard_v1.cmake)
-include(src/web/gui/v2/dashboard_v2.cmake)
+if(ENABLE_DASHBOARD_V2)
+ include(src/web/gui/v2/dashboard_v2.cmake)
+endif()
include(src/web/gui/gui.cmake)

function(cat IN_FILE OUT_FILE)
26 changes: 10 additions & 16 deletions pkgs/tools/system/netdata/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, pkg-config, makeWrapper
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, makeWrapper
, CoreFoundation, IOKit, libossp_uuid
, nixosTests
, bash, curl, jemalloc, json_c, libuv, zlib, libyaml, libelf, libbpf
Expand All @@ -20,17 +20,17 @@
}:

stdenv.mkDerivation rec {
version = "1.45.4";
version = "1.46.1";
pname = "netdata";

src = fetchFromGitHub {
owner = "netdata";
repo = "netdata";
rev = "v${version}";
hash = if withCloudUi
then "sha256-g/wxKtpNsDw/ZaUokdip39enQHMysJE6pYGsApuL4po="
then "sha256-tFjczhJ7bIEUDZx3MxYBu4tGkJhoQn5V79D4sLV2o8U="
# we delete the v2 GUI after fetching
else "sha256-Mkrmvdr19sWzFOkdpt46mcsbA3CNpXy4w8um95xaWlo=";
else "sha256-uW3jRiJjFIFSfmmavM3KVF985F8nMKa+lQAgNBZvKyE=";
fetchSubmodules = true;

# Remove v2 dashboard distributed under NCUL1. Make sure an empty
Expand Down Expand Up @@ -60,18 +60,12 @@ stdenv.mkDerivation rec {
++ lib.optionals withSsl [ openssl ];

patches = [
# Allow ndsudo to use non-hardcoded `PATH`
# See https://github.com/netdata/netdata/pull/17377#issuecomment-2183017868
# https://github.com/netdata/netdata/security/advisories/GHSA-pmhq-4cxq-wj93
./ndsudo-fix-path.patch
# Allow building without non-free v2 dashboard.
(fetchpatch {
url = "https://github.com/netdata/netdata/pull/17240/commits/b108df72281633234b731b223d99ec99f1d36adf.patch";
hash = "sha256-tgsnbNY0pxFU3bz1J1qPaAeVsozsk2bpHV2mNy8A9is=";
})
# Allow for go.d plugins to access the right directory.
# Can be removed once > v1.45.4 is released
# https://github.com/netdata/netdata/pull/17661
(fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/netdata/netdata/pull/17661.patch";
sha256 = "sha256-j+mrwkibQio2KO8UnV7sxzCoHmkcsalHNzP+YvrRz74=";
})
./dashboard-v2-removal.patch
];

# Guard against unused buld-time development inputs in closure. Without
Expand Down Expand Up @@ -186,7 +180,7 @@ stdenv.mkDerivation rec {

sourceRoot = "${src.name}/src/go/collectors/go.d.plugin";

vendorHash = "sha256-KO+xMk6fpZCYRyxxKrsGfOHJ2bwjBaSmkgz1jIUHaZs=";
vendorHash = "sha256-fK6pboXgJom77iakb+CJvNuweQjLIrpS7suWRNY/KM4=";
doCheck = false;
proxyVendor = true;

Expand Down
16 changes: 16 additions & 0 deletions pkgs/tools/system/netdata/ndsudo-fix-path.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# See https://github.com/netdata/netdata/pull/17377#issuecomment-2183017868
# https://github.com/netdata/netdata/security/advisories/GHSA-pmhq-4cxq-wj93

diff --git a/src/collectors/plugins.d/ndsudo.c b/src/collectors/plugins.d/ndsudo.c
index 8b4d76f46..68fa52d38 100644
--- a/src/collectors/plugins.d/ndsudo.c
+++ b/src/collectors/plugins.d/ndsudo.c
@@ -357,9 +357,6 @@ int main(int argc, char *argv[]) {
return 3;
}

- char new_path[] = "PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin";
- putenv(new_path);
-
bool found = false;
char filename[FILENAME_MAX];