From 7a586794d4378d7a6432192700a4706083d58388 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 15 Dec 2016 13:06:05 +0100 Subject: [PATCH] make-tarball.nix: Fix running as root MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since Nix now runs builds in a user namespace with uid == 0, this triggered the message warning: the group ‘nixbld’ specified in ‘build-users-group’ does not exist which make-tarball.nix turns into a fatal error. So clear build-users-group. http://hydra.nixos.org/build/44817408 --- pkgs/top-level/make-tarball.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/make-tarball.nix b/pkgs/top-level/make-tarball.nix index 88f027157968..a69e7019c874 100644 --- a/pkgs/top-level/make-tarball.nix +++ b/pkgs/top-level/make-tarball.nix @@ -35,6 +35,7 @@ releaseTools.sourceTarball rec { export NIX_DB_DIR=$TMPDIR export NIX_STATE_DIR=$TMPDIR export NIX_PATH=nixpkgs=$TMPDIR/barf.nix + opts=(--option build-users-group "") nix-store --init echo 'abort "Illegal use of in Nixpkgs."' > $TMPDIR/barf.nix @@ -68,7 +69,8 @@ releaseTools.sourceTarball rec { nix-env -f . \ --show-trace --argstr system "$platform" \ - -qa --drv-path --system-filter \* --system 2>&1 >/dev/null | tee eval-warnings.log + -qa --drv-path --system-filter \* --system \ + "''${opts[@]}" 2>&1 >/dev/null | tee eval-warnings.log if [ -s eval-warnings.log ]; then echo "Nixpkgs on $platform evaluated with warnings, aborting" @@ -78,7 +80,8 @@ releaseTools.sourceTarball rec { nix-env -f . \ --show-trace --argstr system "$platform" \ - -qa --drv-path --system-filter \* --system --meta --xml > /dev/null + -qa --drv-path --system-filter \* --system --meta --xml \ + "''${opts[@]}" > /dev/null stopNest done