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
In my config I've been using fetchTarball to download proton-ge builds but after updating to nix 2.21.0 I am now getting this error from fetchTarball error: adding a file to a tree builder: failed to insert entry: invalid name for a tree entry - .git
Steps To Reproduce
run nix repl --expr 'fetchTarball { url = "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton9-4/GE-Proton9-4.tar.gz"; sha256 = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; }'
(older versions have the same problem)
Expected behavior
fetchTarball should be able to unpack the tar file with no errors
nix-env --version output
babbaj@nixos:~ ❯ nix --version
nix (Nix) 2.21.0
Additional context
There is a .git folder included in the protonfixes subdirectory which is probably what is triggering the error.
I believe the error comes specifically from here
throwError("adding a file to a tree builder: %s", git_error_last()->message);
It doesn't make sense to me why git is involved in fetchTarball when it should and seemingly has been able to unpack any abitrary files in stable releases.
This commit is most likely what introduced this regression. cabee98
proton-ge was also added to nixpkgs recently and uses fetchzip instead of fetchTarball. Using fetchzip in place of fetchTarball works fine.
cc @edolstra . I can confirm this, and cabee98 is a very likely culprit indeed. If we want to keep this git hashing thing, we'll need to be able to bail out of work around this kind of file names that aren't accepted by libgit2
Describe the bug
In my config I've been using fetchTarball to download proton-ge builds but after updating to nix 2.21.0 I am now getting this error from fetchTarball
error: adding a file to a tree builder: failed to insert entry: invalid name for a tree entry - .git
Steps To Reproduce
run
nix repl --expr 'fetchTarball { url = "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton9-4/GE-Proton9-4.tar.gz"; sha256 = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; }'
(older versions have the same problem)
Expected behavior
fetchTarball should be able to unpack the tar file with no errors
nix-env --version
outputAdditional context
There is a .git folder included in the
protonfixes
subdirectory which is probably what is triggering the error.I believe the error comes specifically from here
nix/src/libfetchers/git-utils.cc
Line 820 in 8c4c215
It doesn't make sense to me why git is involved in fetchTarball when it should and seemingly has been able to unpack any abitrary files in stable releases.
This commit is most likely what introduced this regression.
cabee98
proton-ge was also added to nixpkgs recently and uses
fetchzip
instead offetchTarball
. Usingfetchzip
in place offetchTarball
works fine.Priorities
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: