Chroot builds: Provide world-readable /nix/store
This was causing NixOS VM tests to fail mysteriously since
5ce50cd99e
. Nscd could (sometimes) no
longer read /etc/hosts:
open("/etc/hosts", O_RDONLY|O_CLOEXEC) = -1 EACCES (Permission denied)
Probably there was some wacky interaction between the guest kernel and
the 9pfs implementation in QEMU.
This commit is contained in:
parent
be1ff23352
commit
afa433e58c
|
@ -1895,7 +1895,7 @@ void DerivationGoal::startBuilder()
|
||||||
build user. */
|
build user. */
|
||||||
Path chrootStoreDir = chrootRootDir + settings.nixStore;
|
Path chrootStoreDir = chrootRootDir + settings.nixStore;
|
||||||
createDirs(chrootStoreDir);
|
createDirs(chrootStoreDir);
|
||||||
chmod_(chrootStoreDir, 0730);
|
chmod_(chrootStoreDir, 0735);
|
||||||
|
|
||||||
if (chown(chrootStoreDir.c_str(), 0, buildUser.getGID()) == -1)
|
if (chown(chrootStoreDir.c_str(), 0, buildUser.getGID()) == -1)
|
||||||
throw SysError(format("cannot change ownership of ‘%1%’") % chrootStoreDir);
|
throw SysError(format("cannot change ownership of ‘%1%’") % chrootStoreDir);
|
||||||
|
|
Loading…
Reference in a new issue