lix/src/libstore
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
..
binary-cache-store.cc Compress NAR listings using the "text-compression" method 2017-03-15 16:50:19 +01:00
binary-cache-store.hh S3BinaryCacheStore: Set Content-Type 2017-03-15 16:50:19 +01:00
build.cc Sandbox: Fix /dev/ptmx on recent kernels 2017-03-31 18:20:19 +02:00
builtins.cc Support netrc in <nix/fetchurl.nix> 2017-02-16 15:51:50 +01:00
builtins.hh Support netrc in <nix/fetchurl.nix> 2017-02-16 15:51:50 +01:00
crypto.cc Restore cache.nixos.org as the default substituter 2017-03-21 15:06:46 +01:00
crypto.hh Revert "Get rid of unicode quotes (#1140)" 2016-11-26 00:38:01 +01:00
derivations.cc Move istringstream_nocopy to a separate file 2017-03-21 14:43:03 +01:00
derivations.hh Add a mechanism for derivation attributes to reference the derivation's outputs 2016-08-17 17:19:32 +02:00
download.cc Retry curl error 16 2017-03-31 15:50:11 +02:00
download.hh S3BinaryCacheStore: Support compression of narinfo and log files 2017-03-15 16:49:28 +01:00
export-import.cc TeeSink: Pre-reserve string space 2017-03-01 16:16:04 +01:00
fs-accessor.hh Add NAR / Store accessor abstraction 2016-02-25 17:43:19 +01:00
gc.cc AutoCloseDir: Use std::unique_ptr 2017-01-16 22:39:27 +01:00
globals.cc Add exec primop behind allow-unsafe-native-code-during-evaluation. 2017-03-30 08:04:21 -04:00
globals.hh Add exec primop behind allow-unsafe-native-code-during-evaluation. 2017-03-30 08:04:21 -04:00
http-binary-cache-store.cc S3BinaryCacheStore: Set Content-Type 2017-03-15 16:50:19 +01:00
legacy-ssh-store.cc ssh:// -> ssh-ng://, legacy-ssh:// -> ssh:// 2017-03-16 14:19:32 +01:00
local-binary-cache-store.cc S3BinaryCacheStore: Set Content-Type 2017-03-15 16:50:19 +01:00
local-fs-store.cc LocalFSStore::getBuildLog(): Handle corrupted logs 2017-03-21 19:23:35 +01:00
local-store.cc Require signatures by default 2017-03-21 15:10:48 +01:00
local-store.hh copyPaths(): Use queryValidPaths() to reduce SSH latency 2017-03-16 13:50:01 +01:00
local.mk Revert "Merge branch 'seccomp' of https://github.com/aszlig/nix" 2016-12-19 11:52:57 +01:00
misc.cc Revert "Get rid of unicode quotes (#1140)" 2016-11-26 00:38:01 +01:00
nar-accessor.cc Fix warning on 32-bit systems 2016-12-08 20:37:58 +01:00
nar-accessor.hh Add NAR / Store accessor abstraction 2016-02-25 17:43:19 +01:00
nar-info-disk-cache.cc NarInfoDiskCache: Handle SQLite busy errors 2017-02-28 13:44:11 +01:00
nar-info-disk-cache.hh HttpBinaryCacheStore: Fix caching of WantMassQuery 2016-06-01 16:24:17 +02:00
nar-info.cc Ignore broken "Deriver: unknown-deriver" fields in .narinfo 2017-03-28 13:08:13 +02:00
nar-info.hh Make the store directory a member variable of Store 2016-06-01 16:24:17 +02:00
nix-store.pc.in Install some pkgconfig files 2014-09-18 12:00:40 +02:00
optimise-store.cc Include config.h implicitly with '-include config.h' in CFLAGS 2017-02-08 21:51:02 +02:00
pathlocks.cc Fix assertion failure when a path is locked 2017-01-26 20:40:33 +01:00
pathlocks.hh openLockFile: Return an AutoCloseFD 2017-01-26 20:40:33 +01:00
profiles.cc Revert "Get rid of unicode quotes (#1140)" 2016-11-26 00:38:01 +01:00
profiles.hh Allow setting the state directory as a store parameter 2016-06-02 16:02:48 +02:00
references.cc Revert "Get rid of unicode quotes (#1140)" 2016-11-26 00:38:01 +01:00
references.hh Use "#pragma once" to prevent repeated header file inclusion 2012-07-18 14:59:03 -04:00
remote-fs-accessor.cc Revert "Get rid of unicode quotes (#1140)" 2016-11-26 00:38:01 +01:00
remote-fs-accessor.hh Factor a general remote FS accessor out of BinaryCacheStore 2016-09-02 14:24:34 -04:00
remote-store.cc copyPaths(): Use queryValidPaths() to reduce SSH latency 2017-03-16 13:50:01 +01:00
remote-store.hh copyPaths(): Use queryValidPaths() to reduce SSH latency 2017-03-16 13:50:01 +01:00
s3-binary-cache-store.cc Move istringstream_nocopy to a separate file 2017-03-21 14:43:03 +01:00
s3-binary-cache-store.hh Fix getS3Stats() 2016-10-06 17:00:52 +02:00
s3.hh Add aws-region param to S3 store URLs 2017-03-03 16:12:17 -05:00
sandbox-defaults.sb.in Revert "remove sandbox-defaults.sb" 2015-11-21 16:40:24 -05:00
schema.sql Mark content-addressed paths in the Nix database and in .narinfo 2016-08-10 18:05:35 +02:00
serve-protocol.hh Provide default implementations for a couple of Store methods 2017-02-07 19:29:21 +01:00
sqlite.cc Improve SQLite busy handling 2017-02-28 13:59:11 +01:00
sqlite.hh Improve SQLite busy handling 2017-02-28 13:59:11 +01:00
ssh-store.cc ssh:// -> ssh-ng://, legacy-ssh:// -> ssh:// 2017-03-16 14:19:32 +01:00
ssh.cc Honor $NIX_SSHOPTS again 2017-03-21 14:35:50 +01:00
ssh.hh Honor $NIX_SSHOPTS again 2017-03-21 14:35:50 +01:00
store-api.cc Only use cache.nixos.org when the store is /nix/store 2017-03-21 17:59:18 +01:00
store-api.hh copyPaths(): Use queryValidPaths() to reduce SSH latency 2017-03-16 13:50:01 +01:00
worker-protocol.hh Merge branch 'ssh-store' of https://github.com/shlevy/nix 2016-11-09 18:57:22 +01:00