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

builtin:fetchurl should provide more info about where it fetched from #8432

Open
flokli opened this issue Jun 1, 2023 · 1 comment
Open
Labels
feature Feature request or proposal

Comments

@flokli
Copy link
Contributor

flokli commented Jun 1, 2023

Is your feature request related to a problem? Please describe.
While testing a PR against nixpkgs staging, I was chasing a fixed-output derivation mismatch in the gettext sources: NixOS/nixpkgs#235398

I initially assumed, due to not being "officially released", gettext 0.21.1 changed sources, and proposed a revert to the previous version. After further inspection however, and successfully building on other machines, it looks like this file was simply faulty on one of the gnu mirrors, unluckily one of the ones my Nix has been using.

I extracted the derivation:

❯ nix show-derivation /nix/store/2c90gp52cvdprpj314d86qii9qil4fkb-gettext-0.21.1.tar.gz.drv
{
  "/nix/store/2c90gp52cvdprpj314d86qii9qil4fkb-gettext-0.21.1.tar.gz.drv": {
    "args": [],
    "builder": "builtin:fetchurl",
    "env": {
      "builder": "builtin:fetchurl",
      "executable": "",
      "impureEnvVars": "http_proxy https_proxy ftp_proxy all_proxy no_proxy",
      "name": "gettext-0.21.1.tar.gz",
      "out": "/nix/store/y2h7bqjpc4q9g887w8pbwncjrmr4g9sx-gettext-0.21.1.tar.gz",
      "outputHash": "sha256-6MNlDh2M7odcTzVWQjgsHfgwWL1aEe6FVcDPJ21kbUU=",
      "outputHashAlgo": "sha256",
      "outputHashMode": "flat",
      "preferLocalBuild": "1",
      "system": "builtin",
      "unpack": "",
      "url": "https://ftpmirror.gnu.org/gettext/gettext-0.21.1.tar.gz",
      "urls": "https://ftpmirror.gnu.org/gettext/gettext-0.21.1.tar.gz"
    },
    "inputDrvs": {},
    "inputSrcs": [],
    "outputs": {
      "out": {
        "hash": "e8c3650e1d8cee875c4f355642382c1df83058bd5a11ee8555c0cf276d646d45",
        "hashAlgo": "sha256",
        "path": "/nix/store/y2h7bqjpc4q9g887w8pbwncjrmr4g9sx-gettext-0.21.1.tar.gz"
      }
    },
    "system": "builtin"
  }
}

Unfotunately, neither here, nor in the error message

error: hash mismatch in fixed-output derivation '/nix/store/2c90gp52cvdprpj314d86qii9qil4fkb-gettext-0.21.1.tar.gz.drv':
         specified: sha256-6MNlDh2M7odcTzVWQjgsHfgwWL1aEe6FVcDPJ21kbUU=
            got:    sha256-97ddKLyBBjjVpNWg633BaeMOQwv3nxwH+YUTOpmX3tA=

it's clear where we actually downloaded from (aka, which IP we picked for ftpmirror.gnu.org).

Describe the solution you'd like
The builtin fetcher should probably log the exact endpoint IP it's fetching from.

Describe alternatives you've considered

Additional context

Priorities

Add 👍 to issues you find important.

@flokli flokli added the feature Feature request or proposal label Jun 1, 2023
@flokli
Copy link
Contributor Author

flokli commented Jun 2, 2023

This could have been nic.funet.fi, as in #8027 (at least the hash mismatch looks similar), but due to the missing info it's hard to tell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request or proposal
Projects
None yet
Development

No branches or pull requests

1 participant