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
I have /nix set up as a symlink, which has been working so long as I have the NIX_IGNORE_SYMLINK_STORE set. Since upgrading nix, running nix-channel --update nixpkgs has failed:
$ nix-channel --update nixpkgs
unpacking channels...
error: failed to extract archive (Cannot extract through symlink /nix/store/z80i5ddckxmgn615ql8hjh53fa5crhcw-nixpkgs-21.11pre327016.550dab224a2/nixpkgs-21.11pre327016.550dab224a2)
error: builder for '/nix/store/3rj42ir1zp9hymapmrraars7sng0lbkj-nixpkgs-21.11pre327016.550dab224a2.drv' failed with exit code 1
error: program '/nix/store/jw96hf2xbbb0kw7hia79zlry1v67pzdq-nix-2.4pre-rc1/bin/nix-env' failed with exit code 100
I was going to submit a patch for this problem, which would only add the ARCHIVE_EXTRACT_SECURE_SYMLINKS flag if the allowSymlinkedStore setting was not enabled. Unfortunately, tarfile.cc doesn't seem to have access to the global settings, and so fixing this bug in this manner would require extra plumbing. One alternative would be to just remove the flag entirely (which shouldn't be any less secure than what was being done previously), but it'd probably be preferable to conditionally disable it.
The text was updated successfully, but these errors were encountered:
This is the diff that I've been using locally. It removes the requisite flag and stops nix from running tests on nix-build, so that nix-build for the repo runs faster.
I have
/nix
set up as a symlink, which has been working so long as I have theNIX_IGNORE_SYMLINK_STORE
set. Since upgradingnix
, runningnix-channel --update nixpkgs
has failed:Steps To Reproduce
/nix
as a symlinkNIX_IGNORE_SYMLINK_STORE
to1
nix-channel --update nix-pkgs
Expected behavior
Nix should successfully fetch the new channels
nix-env --version
outputRoot cause
Presumable for security reasons, Nix passes the
ARCHIVE_EXTRACT_SECURE_SYMLINKS
flag to libarchive. As a result,libarchive
refuses to extract through the/nix
symlink.I was going to submit a patch for this problem, which would only add the
ARCHIVE_EXTRACT_SECURE_SYMLINKS
flag if theallowSymlinkedStore
setting was not enabled. Unfortunately,tarfile.cc
doesn't seem to have access to the global settings, and so fixing this bug in this manner would require extra plumbing. One alternative would be to just remove the flag entirely (which shouldn't be any less secure than what was being done previously), but it'd probably be preferable to conditionally disable it.The text was updated successfully, but these errors were encountered: