lix/src
Eelco Dolstra 29d35805c6
Sandbox: Fix /dev/ptmx on recent kernels
This fixes "No such file or directory" when opening /dev/ptmx
(e.g. http://hydra.nixos.org/build/51094249).

The reason appears to be some changes to /dev/ptmx / /dev/pts handling
between Linux 4.4 and 4.9. See
https://patchwork.kernel.org/patch/7832531/.

The fix is to go back to mounting a proper /dev/pts instance inside
the sandbox. Happily, this now works inside user namespaces, even for
unprivileged users. So

  NIX_REMOTE=local?root=/tmp/nix nix-build \
    '<nixpkgs/nixos/tests/misc.nix>' -A test

works for non-root users.

The downside is that the fix breaks sandbox builds on older kernels
(probably pre-4.6), since mounting a devpts fails inside user
namespaces for some reason I've never been able to figure out. Builds
on those systems will fail with

  error: while setting up the build environment: mounting /dev/pts: Invalid argument

Ah well.
2017-03-31 18:20:19 +02:00
..
boost Force stack trace for boost format errors 2016-03-02 15:46:07 +01:00
build-remote ssh:// -> ssh-ng://, legacy-ssh:// -> ssh:// 2017-03-16 14:19:32 +01:00
buildenv Fix Fedora build 2016-08-30 13:56:22 +02:00
libexpr builtins.exec: Make the argument just a list 2017-03-31 11:58:41 -04:00
libmain Remove "killing process <pid>" messages 2017-03-16 10:52:28 +01:00
libstore Sandbox: Fix /dev/ptmx on recent kernels 2017-03-31 18:20:19 +02:00
libutil Fix xz decompression 2017-03-22 11:53:33 +01:00
nix nix copy: Make -r option use the "from" store 2017-03-16 14:25:54 +01:00
nix-build nix-shell/pure: keep environment variable SHLVL 2017-03-12 01:04:21 +01:00
nix-channel nix-channel: Fix --update <CHANNELS> 2016-11-21 15:54:19 +01:00
nix-collect-garbage printMsg(lvlError, ...) -> printError(...) etc. 2016-09-21 16:54:53 +02:00
nix-copy-closure ssh:// -> ssh-ng://, legacy-ssh:// -> ssh:// 2017-03-16 14:19:32 +01:00
nix-daemon TeeSink: Pre-reserve string space 2017-03-01 16:16:04 +01:00
nix-env printMsg(lvlError, ...) -> printError(...) etc. 2016-09-21 16:54:53 +02:00
nix-instantiate Allow setting the state directory as a store parameter 2016-06-02 16:02:48 +02:00
nix-prefetch-url runProgram(): Distinguish between empty input and no input 2017-03-15 16:50:19 +01:00
nix-store Merge branch 'remove-perl' of https://github.com/shlevy/nix 2017-03-31 14:13:32 +02:00
resolve-system-dependencies printMsg(lvlError, ...) -> printError(...) etc. 2016-09-21 16:54:53 +02:00