You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When hard-linking files into the chroot files, the builder aborts with an error.
However when the file system setup is to some extent similar to what we do in NixOS VM tests, which is using an 9p share from the host as the lower dir for an overlay file system, the hard link will cross filesystem boundaries and thus will fail with EPERM (not EXDEV though, because it's still the same overlayfs).
Maybe it makes sense to fall back to copying here, like it's done when errno is EMLINK but for all errors.
The text was updated successfully, but these errors were encountered:
aszlig
added a commit
to NixOS/nixpkgs
that referenced
this issue
Aug 2, 2018
Since 4f6df27, nix.useSandbox defaults
to true which causes the Nix build within the containers-imperative test
to fail while trying to hardlink files into the chroot:
link("/nix/store/foo", "/nix/store/bar.drv.chroot/nix/store/foo")
= -1 EPERM (Operation not permitted)
The reason this happens is that the hosts store is mounted using 9p and
an overlayfs is mounted on top, so even if we would disable the tmpfs
for the upper directory the hardlink would still cross filesystem
boundaries, which then fails with the above error code.
I haven't yet seen any other test which fails in a similar way, which
might be because building within VM tests is not very common and the
installer tests build in a separate store, so they're not affected.
Signed-off-by: aszlig <aszlig@nix.build>
Issue: NixOS/nix#2324
Cc: @aristidb, @edolstra, @chaoflow, @kampfschlaefer
When hard-linking files into the chroot files, the builder aborts with an error.
However when the file system setup is to some extent similar to what we do in NixOS VM tests, which is using an
9p
share from the host as the lower dir for an overlay file system, the hard link will cross filesystem boundaries and thus will fail withEPERM
(notEXDEV
though, because it's still the same overlayfs).Maybe it makes sense to fall back to copying here, like it's done when
errno
isEMLINK
but for all errors.The text was updated successfully, but these errors were encountered: