[prev in list] [next in list] [prev in thread] [next in thread]
List: nix-commits
Subject: [Nix-commits] [NixOS/nix] 29d358: Sandbox: Fix /dev/ptmx on recent kernels
From: Eelco Dolstra <edolstra () gmail ! com>
Date: 2017-03-31 16:21:00
Message-ID: 58de81ec31fa_2aaf3fd98574fc406448e () hookshot-fe6-cp1-prd ! iad ! github ! net ! mail
[Download RAW message or body]
Branch: refs/heads/master
Home: https://github.com/NixOS/nix
Commit: 29d35805c63f316aa19b33a481f953ca332d9b65
https://github.com/NixOS/nix/commit/29d35805c63f316aa19b33a481f953ca332d9b65
Author: Eelco Dolstra <edolstra@gmail.com>
Date: 2017-03-31 (Fri, 31 Mar 2017)
Changed paths:
M src/libstore/build.cc
Log Message:
-----------
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.
_______________________________________________
nix-commits mailing list
nix-commits@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic