Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<nix/fetchurl.nix> ignores hashed mirrors for executables #5804

Open
spacefrogg opened this issue Dec 20, 2021 · 1 comment
Open

<nix/fetchurl.nix> ignores hashed mirrors for executables #5804

spacefrogg opened this issue Dec 20, 2021 · 1 comment

Comments

@spacefrogg
Copy link

fetchurl.nix uses recursive hashing for executables. (I guess, that enables (re-)storing access bits.) The fetcher code explicitly excludes store paths with recursive hashes. (I guess again, because hashed-mirrors do not support directories.)

The bug/protocol deficiency is that nix cannot distinguish between the two. It looks like, it only concerns the busybox binary that builds the stdenv and it is only relevant when using hashed-mirrors (i.e. in an enterprise-environment without access to a substituter).

Question
Is it really necessary to store executable files as executables on the server? Would it not be easier to make files, marked executable, executable after download?

I'd be happy to supply a fix but want to check first if there is any interest in fixing this in the first place.

Current Workaround
It is not a show stopper for the sketched scenario but bad enough. The current workaround for nixpkgs is to do something along the lines of:

import nixpkgs { stdenvStages = args: 
  import (nixpkgs + /pkgs/stdenv/linux) (args // {
    bootstrapFiles = import ./files-with-fixed-urls.nix; 
  });
}
@spacefrogg spacefrogg added the bug label Dec 20, 2021
@stale
Copy link

stale bot commented Jun 20, 2022

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant