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

netdata: Disable files in /etc and /var

authored by

Jörg Thalheim and committed by
Mario Rodas
d417ca7b 49ac683e

+90 -4
+4 -4
pkgs/tools/system/netdata/default.nix
··· 13 buildInputs = [ zlib ] 14 ++ (if stdenv.isDarwin then [ libossp_uuid CoreFoundation IOKit ] else [ libuuid ]); 15 16 - # Build will fail trying to create /var/{cache,lib,log}/netdata without this 17 - postPatch = '' 18 - substituteInPlace Makefile.am --replace "installer/.keep" "" 19 - ''; 20 21 configureFlags = [ 22 "--localstatedir=/var" 23 ]; 24 25 postFixup = ''
··· 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 + ]; 19 20 configureFlags = [ 21 "--localstatedir=/var" 22 + "--sysconfdir=/etc" 23 ]; 24 25 postFixup = ''
+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 \