Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2d96b9a2942d
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dfd77bc26f62
Choose a head ref
  • 4 commits
  • 4 files changed
  • 3 contributors

Commits on Nov 16, 2018

  1. netdata: 1.10.0 -> 1.11.0

    marsam committed Nov 16, 2018
    Copy the full SHA
    49ac683 View commit details
  2. netdata: Disable files in /etc and /var

    Mic92 authored and marsam committed Nov 16, 2018
    1

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d417ca7 View commit details
  3. nixos/netdata: own plugins must the looked up first

    Otherwise netdata will not find python modules.
    To make sure netdata still pick up our setuid version of apps.plugin
    we rename the original executable.
    Mic92 authored and marsam committed Nov 16, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    348b7b8 View commit details

Commits on Nov 17, 2018

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

    netdata: 1.10.0 -> 1.11.0
    Mic92 authored Nov 17, 2018
    Copy the full SHA
    dfd77bc View commit details
4 changes: 2 additions & 2 deletions nixos/modules/services/monitoring/netdata.nix
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ let

localConfig = {
global = {
"plugins directory" = "${wrappedPlugins}/libexec/netdata/plugins.d ${pkgs.netdata}/libexec/netdata/plugins.d";
"plugins directory" = "${pkgs.netdata}/libexec/netdata/plugins.d ${wrappedPlugins}/libexec/netdata/plugins.d";
};
web = {
"web files owner" = "root";
@@ -96,7 +96,7 @@ in {
};

security.wrappers."apps.plugin" = {
source = "${pkgs.netdata}/libexec/netdata/plugins.d/apps.plugin";
source = "${pkgs.netdata}/libexec/netdata/plugins.d/apps.plugin.org";
capabilities = "cap_dac_read_search,cap_sys_ptrace+ep";
owner = cfg.user;
group = cfg.group;
37 changes: 20 additions & 17 deletions pkgs/tools/system/netdata/default.nix
Original file line number Diff line number Diff line change
@@ -1,39 +1,42 @@
{ stdenv, fetchFromGitHub, autoreconfHook, zlib, pkgconfig, libuuid }:
{ stdenv, fetchurl, autoreconfHook, pkgconfig, zlib, libuuid, libossp_uuid, CoreFoundation, IOKit }:

stdenv.mkDerivation rec{
version = "1.10.0";
version = "1.11.0";
name = "netdata-${version}";

src = fetchFromGitHub {
rev = "v${version}";
owner = "firehol";
repo = "netdata";
sha256 = "02spfisabjkkgd9fairldlf84n83vbv2xafg0g5jrpfa972pjl9r";
src = fetchurl {
url = "https://github.com/netdata/netdata/releases/download/v${version}/netdata-v${version}.tar.gz";
sha256 = "17b14w34jif6bviw3s81imbazkvvafwxff7d5zjy6wicq88q8b64";
};

nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ zlib libuuid ];
buildInputs = [ zlib ]
++ (if stdenv.isDarwin then [ libossp_uuid CoreFoundation IOKit ] else [ libuuid ]);

# Build will fail trying to create /var/{cache,lib,log}/netdata without this
postPatch = ''
sed -i '/dist_.*_DATA = \.keep/d' src/Makefile.am
patches = [
./no-files-in-etc-and-var.patch
];

postInstall = stdenv.lib.optionalString (!stdenv.isDarwin) ''
# rename this plugin so netdata will look for setuid wrapper
mv $out/libexec/netdata/plugins.d/apps.plugin \
$out/libexec/netdata/plugins.d/apps.plugin.org
'';

configureFlags = [
"--localstatedir=/var"
"--sysconfdir=/etc"
];

# App fails on runtime if the default config file is not detected
# The upstream installer does prepare an empty file too
postInstall = ''
touch $out/etc/netdata/netdata.conf
postFixup = ''
rm -r $out/sbin
'';

meta = with stdenv.lib; {
description = "Real-time performance monitoring tool";
homepage = http://netdata.firehol.org;
homepage = https://my-netdata.io/;
license = licenses.gpl3;
platforms = platforms.linux;
platforms = platforms.unix;
maintainers = [ maintainers.lethalman ];
};

86 changes: 86 additions & 0 deletions pkgs/tools/system/netdata/no-files-in-etc-and-var.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
diff -ruN orig/Makefile.am new/Makefile.am
--- orig/Makefile.am 2018-11-02 08:56:21.000000000 -0500
+++ new/Makefile.am 2018-11-16 10:30:22.000000000 -0500
@@ -99,10 +99,10 @@
$(NULL)

sbin_PROGRAMS =
-dist_cache_DATA = installer/.keep
-dist_varlib_DATA = installer/.keep
-dist_registry_DATA = installer/.keep
-dist_log_DATA = installer/.keep
+dist_cache_DATA =
+dist_varlib_DATA =
+dist_registry_DATA =
+dist_log_DATA =
plugins_PROGRAMS =

LIBNETDATA_FILES = \
diff -ruN orig/collectors/charts.d.plugin/Makefile.am new/collectors/charts.d.plugin/Makefile.am
--- orig/collectors/charts.d.plugin/Makefile.am 2018-11-02 08:56:21.000000000 -0500
+++ new/collectors/charts.d.plugin/Makefile.am 2018-11-16 11:16:47.000000000 -0500
@@ -32,7 +32,6 @@

userchartsconfigdir=$(configdir)/charts.d
dist_userchartsconfig_DATA = \
- $(top_srcdir)/installer/.keep \
$(NULL)

chartsconfigdir=$(libconfigdir)/charts.d
diff -ruN orig/collectors/node.d.plugin/Makefile.am new/collectors/node.d.plugin/Makefile.am
--- orig/collectors/node.d.plugin/Makefile.am 2018-11-02 08:56:21.000000000 -0500
+++ new/collectors/node.d.plugin/Makefile.am 2018-11-16 11:16:42.000000000 -0500
@@ -23,7 +23,6 @@

usernodeconfigdir=$(configdir)/node.d
dist_usernodeconfig_DATA = \
- $(top_srcdir)/installer/.keep \
$(NULL)

nodeconfigdir=$(libconfigdir)/node.d
diff -ruN orig/collectors/python.d.plugin/Makefile.am new/collectors/python.d.plugin/Makefile.am
--- orig/collectors/python.d.plugin/Makefile.am 2018-11-02 08:56:21.000000000 -0500
+++ new/collectors/python.d.plugin/Makefile.am 2018-11-16 10:56:06.000000000 -0500
@@ -29,7 +29,6 @@

userpythonconfigdir=$(configdir)/python.d
dist_userpythonconfig_DATA = \
- $(top_srcdir)/installer/.keep \
$(NULL)

pythonconfigdir=$(libconfigdir)/python.d
diff -ruN orig/collectors/statsd.plugin/Makefile.am new/collectors/statsd.plugin/Makefile.am
--- orig/collectors/statsd.plugin/Makefile.am 2018-11-02 08:56:21.000000000 -0500
+++ new/collectors/statsd.plugin/Makefile.am 2018-11-16 10:53:04.000000000 -0500
@@ -15,6 +15,5 @@

userstatsdconfigdir=$(configdir)/statsd.d
dist_userstatsdconfig_DATA = \
- $(top_srcdir)/installer/.keep \
$(NULL)

diff -ruN orig/health/Makefile.am new/health/Makefile.am
--- orig/health/Makefile.am 2018-11-02 08:56:21.000000000 -0500
+++ new/health/Makefile.am 2018-11-16 10:56:30.000000000 -0500
@@ -16,7 +16,6 @@

userhealthconfigdir=$(configdir)/health.d
dist_userhealthconfig_DATA = \
- $(top_srcdir)/installer/.keep \
$(NULL)

healthconfigdir=$(libconfigdir)/health.d
diff -ruN orig/system/Makefile.am new/system/Makefile.am
--- orig/system/Makefile.am 2018-11-02 08:56:21.000000000 -0500
+++ new/system/Makefile.am 2018-11-16 10:29:21.000000000 -0500
@@ -17,10 +17,6 @@
include $(top_srcdir)/build/subst.inc
SUFFIXES = .in

-dist_config_SCRIPTS = \
- edit-config \
- $(NULL)
-
nodist_noinst_DATA = \
netdata-openrc \
netdata.logrotate \
4 changes: 3 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
@@ -3766,7 +3766,9 @@ with pkgs;
pythonPackages = python3Packages;
};

netdata = callPackage ../tools/system/netdata { };
netdata = callPackage ../tools/system/netdata {
inherit (darwin.apple_sdk.frameworks) CoreFoundation IOKit;
};

netsurf = recurseIntoAttrs (let callPackage = newScope pkgs.netsurf; in rec {
# ui could be gtk, sixel or framebuffer. Note that console display (sixel)