Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

Merge pull request #50459 from marsam/feature/netdata-darwin

netdata: 1.10.0 -> 1.11.0

authored by

Jörg Thalheim and committed by
GitHub
dfd77bc2 2d96b9a2

+111 -20
+2 -2
nixos/modules/services/monitoring/netdata.nix
··· 12 12 13 13 localConfig = { 14 14 global = { 15 - "plugins directory" = "${wrappedPlugins}/libexec/netdata/plugins.d ${pkgs.netdata}/libexec/netdata/plugins.d"; 15 + "plugins directory" = "${pkgs.netdata}/libexec/netdata/plugins.d ${wrappedPlugins}/libexec/netdata/plugins.d"; 16 16 }; 17 17 web = { 18 18 "web files owner" = "root"; ··· 96 96 }; 97 97 98 98 security.wrappers."apps.plugin" = { 99 - source = "${pkgs.netdata}/libexec/netdata/plugins.d/apps.plugin"; 99 + source = "${pkgs.netdata}/libexec/netdata/plugins.d/apps.plugin.org"; 100 100 capabilities = "cap_dac_read_search,cap_sys_ptrace+ep"; 101 101 owner = cfg.user; 102 102 group = cfg.group;
+20 -17
pkgs/tools/system/netdata/default.nix
··· 1 - { stdenv, fetchFromGitHub, autoreconfHook, zlib, pkgconfig, libuuid }: 1 + { stdenv, fetchurl, autoreconfHook, pkgconfig, zlib, libuuid, libossp_uuid, CoreFoundation, IOKit }: 2 2 3 3 stdenv.mkDerivation rec{ 4 - version = "1.10.0"; 4 + version = "1.11.0"; 5 5 name = "netdata-${version}"; 6 6 7 - src = fetchFromGitHub { 8 - rev = "v${version}"; 9 - owner = "firehol"; 10 - repo = "netdata"; 11 - sha256 = "02spfisabjkkgd9fairldlf84n83vbv2xafg0g5jrpfa972pjl9r"; 7 + src = fetchurl { 8 + url = "https://github.com/netdata/netdata/releases/download/v${version}/netdata-v${version}.tar.gz"; 9 + sha256 = "17b14w34jif6bviw3s81imbazkvvafwxff7d5zjy6wicq88q8b64"; 12 10 }; 13 11 14 12 nativeBuildInputs = [ autoreconfHook pkgconfig ]; 15 - buildInputs = [ zlib libuuid ]; 13 + buildInputs = [ zlib ] 14 + ++ (if stdenv.isDarwin then [ libossp_uuid CoreFoundation IOKit ] else [ libuuid ]); 15 + 16 + patches = [ 17 + ./no-files-in-etc-and-var.patch 18 + ]; 16 19 17 - # Build will fail trying to create /var/{cache,lib,log}/netdata without this 18 - postPatch = '' 19 - sed -i '/dist_.*_DATA = \.keep/d' src/Makefile.am 20 + postInstall = stdenv.lib.optionalString (!stdenv.isDarwin) '' 21 + # rename this plugin so netdata will look for setuid wrapper 22 + mv $out/libexec/netdata/plugins.d/apps.plugin \ 23 + $out/libexec/netdata/plugins.d/apps.plugin.org 20 24 ''; 21 25 22 26 configureFlags = [ 23 27 "--localstatedir=/var" 28 + "--sysconfdir=/etc" 24 29 ]; 25 30 26 - # App fails on runtime if the default config file is not detected 27 - # The upstream installer does prepare an empty file too 28 - postInstall = '' 29 - touch $out/etc/netdata/netdata.conf 31 + postFixup = '' 32 + rm -r $out/sbin 30 33 ''; 31 34 32 35 meta = with stdenv.lib; { 33 36 description = "Real-time performance monitoring tool"; 34 - homepage = http://netdata.firehol.org; 37 + homepage = https://my-netdata.io/; 35 38 license = licenses.gpl3; 36 - platforms = platforms.linux; 39 + platforms = platforms.unix; 37 40 maintainers = [ maintainers.lethalman ]; 38 41 }; 39 42
+86
pkgs/tools/system/netdata/no-files-in-etc-and-var.patch
··· 1 + diff -ruN orig/Makefile.am new/Makefile.am 2 + --- orig/Makefile.am 2018-11-02 08:56:21.000000000 -0500 3 + +++ new/Makefile.am 2018-11-16 10:30:22.000000000 -0500 4 + @@ -99,10 +99,10 @@ 5 + $(NULL) 6 + 7 + sbin_PROGRAMS = 8 + -dist_cache_DATA = installer/.keep 9 + -dist_varlib_DATA = installer/.keep 10 + -dist_registry_DATA = installer/.keep 11 + -dist_log_DATA = installer/.keep 12 + +dist_cache_DATA = 13 + +dist_varlib_DATA = 14 + +dist_registry_DATA = 15 + +dist_log_DATA = 16 + plugins_PROGRAMS = 17 + 18 + LIBNETDATA_FILES = \ 19 + diff -ruN orig/collectors/charts.d.plugin/Makefile.am new/collectors/charts.d.plugin/Makefile.am 20 + --- orig/collectors/charts.d.plugin/Makefile.am 2018-11-02 08:56:21.000000000 -0500 21 + +++ new/collectors/charts.d.plugin/Makefile.am 2018-11-16 11:16:47.000000000 -0500 22 + @@ -32,7 +32,6 @@ 23 + 24 + userchartsconfigdir=$(configdir)/charts.d 25 + dist_userchartsconfig_DATA = \ 26 + - $(top_srcdir)/installer/.keep \ 27 + $(NULL) 28 + 29 + chartsconfigdir=$(libconfigdir)/charts.d 30 + diff -ruN orig/collectors/node.d.plugin/Makefile.am new/collectors/node.d.plugin/Makefile.am 31 + --- orig/collectors/node.d.plugin/Makefile.am 2018-11-02 08:56:21.000000000 -0500 32 + +++ new/collectors/node.d.plugin/Makefile.am 2018-11-16 11:16:42.000000000 -0500 33 + @@ -23,7 +23,6 @@ 34 + 35 + usernodeconfigdir=$(configdir)/node.d 36 + dist_usernodeconfig_DATA = \ 37 + - $(top_srcdir)/installer/.keep \ 38 + $(NULL) 39 + 40 + nodeconfigdir=$(libconfigdir)/node.d 41 + diff -ruN orig/collectors/python.d.plugin/Makefile.am new/collectors/python.d.plugin/Makefile.am 42 + --- orig/collectors/python.d.plugin/Makefile.am 2018-11-02 08:56:21.000000000 -0500 43 + +++ new/collectors/python.d.plugin/Makefile.am 2018-11-16 10:56:06.000000000 -0500 44 + @@ -29,7 +29,6 @@ 45 + 46 + userpythonconfigdir=$(configdir)/python.d 47 + dist_userpythonconfig_DATA = \ 48 + - $(top_srcdir)/installer/.keep \ 49 + $(NULL) 50 + 51 + pythonconfigdir=$(libconfigdir)/python.d 52 + diff -ruN orig/collectors/statsd.plugin/Makefile.am new/collectors/statsd.plugin/Makefile.am 53 + --- orig/collectors/statsd.plugin/Makefile.am 2018-11-02 08:56:21.000000000 -0500 54 + +++ new/collectors/statsd.plugin/Makefile.am 2018-11-16 10:53:04.000000000 -0500 55 + @@ -15,6 +15,5 @@ 56 + 57 + userstatsdconfigdir=$(configdir)/statsd.d 58 + dist_userstatsdconfig_DATA = \ 59 + - $(top_srcdir)/installer/.keep \ 60 + $(NULL) 61 + 62 + diff -ruN orig/health/Makefile.am new/health/Makefile.am 63 + --- orig/health/Makefile.am 2018-11-02 08:56:21.000000000 -0500 64 + +++ new/health/Makefile.am 2018-11-16 10:56:30.000000000 -0500 65 + @@ -16,7 +16,6 @@ 66 + 67 + userhealthconfigdir=$(configdir)/health.d 68 + dist_userhealthconfig_DATA = \ 69 + - $(top_srcdir)/installer/.keep \ 70 + $(NULL) 71 + 72 + healthconfigdir=$(libconfigdir)/health.d 73 + diff -ruN orig/system/Makefile.am new/system/Makefile.am 74 + --- orig/system/Makefile.am 2018-11-02 08:56:21.000000000 -0500 75 + +++ new/system/Makefile.am 2018-11-16 10:29:21.000000000 -0500 76 + @@ -17,10 +17,6 @@ 77 + include $(top_srcdir)/build/subst.inc 78 + SUFFIXES = .in 79 + 80 + -dist_config_SCRIPTS = \ 81 + - edit-config \ 82 + - $(NULL) 83 + - 84 + nodist_noinst_DATA = \ 85 + netdata-openrc \ 86 + netdata.logrotate \
+3 -1
pkgs/top-level/all-packages.nix
··· 3766 3766 pythonPackages = python3Packages; 3767 3767 }; 3768 3768 3769 - netdata = callPackage ../tools/system/netdata { }; 3769 + netdata = callPackage ../tools/system/netdata { 3770 + inherit (darwin.apple_sdk.frameworks) CoreFoundation IOKit; 3771 + }; 3770 3772 3771 3773 netsurf = recurseIntoAttrs (let callPackage = newScope pkgs.netsurf; in rec { 3772 3774 # ui could be gtk, sixel or framebuffer. Note that console display (sixel)