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

Build failure: grub2 #346264

Open
sh01 opened this issue Oct 3, 2024 · 13 comments · Fixed by #346349
Open

Build failure: grub2 #346264

sh01 opened this issue Oct 3, 2024 · 13 comments · Fixed by #346349

Comments

@sh01
Copy link
Contributor

sh01 commented Oct 3, 2024

Steps To Reproduce

Steps to reproduce the behavior:

  1. build grub2

Build log

these 2 derivations will be built:
  /nix/store/mqfr1xk19l9k3czwsbg6qka5hnpr0mnf-source.drv
  /nix/store/06bj7iy75xjj586dz43c2ch58zfbm0j0-grub-2.12.drv
building '/nix/store/mqfr1xk19l9k3czwsbg6qka5hnpr0mnf-source.drv'...
error: builder for '/nix/store/mqfr1xk19l9k3czwsbg6qka5hnpr0mnf-source.drv' failed with exit code 1;
       last 7 log lines:
       >
       > trying https://git.savannah.gnu.org/cgit/gnulib.git/snapshot/gnulib-9f48fb992a3d7e96610c4ce8be969cff2d61a01b.tar.gz
       >   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
       >                                  Dload  Upload   Total   Spent    Left  Speed
       >   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
       > curl: (22) The requested URL returned error: 400
       > error: cannot download source from any mirror
       For full logs, run 'nix log /nix/store/mqfr1xk19l9k3czwsbg6qka5hnpr0mnf-source.drv'.
error: 1 dependencies of derivation '/nix/store/06bj7iy75xjj586dz43c2ch58zfbm0j0-grub-2.12.drv' failed to build

Additional context

Looks like the specified source became unavailable recently. This breaks nixos-rebuild on one of my systems. I ran into this on 24.05, but glancing at the nixpkgs source it looks like it will also affect master.

Notify maintainers

@samueldr

Metadata

 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.60, NixOS, 24.05 (Uakari), 24.05pre-git`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.5`
 - nixpkgs: `/nix/store/884mbvnyz1xbr5y8aqzb87a89q0dlcy7-source

Add a 👍 reaction to issues you find important.

@samueldr
Copy link
Member

samueldr commented Oct 3, 2024

Wrong maintainer. I don't know who picked that up since #321436.

@sh01 sh01 changed the title Build failure: PACKAGENAME Build failure: grub2 Oct 3, 2024
@sh01
Copy link
Contributor Author

sh01 commented Oct 3, 2024

Ah, indeed; I got your username from the 24.05 version of grub/default.nix; sorry for that.

@JohnRTitor
Copy link
Contributor

JohnRTitor commented Oct 4, 2024

Could be an issue with fetchFromSavannah?

url = "https://git.savannah.gnu.org/cgit/${repo}.git/snapshot/${repo}-${rev}.tar.gz";

I can access https://git.savannah.gnu.org/cgit/gnulib.git just fine just the fetcher fails. Perhaps they changed their API? I can't seem to find any docs on that.

And gnulib should be updated, but I am unable to do so due to this error.

       >
       > trying https://git.savannah.gnu.org/cgit/gnulib.git/snapshot/gnulib-2dd1a7984c6b3e6056cef7e3f9933e0039c21634.tar.gz
       >   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
       >                                  Dload  Upload   Total   Spent    Left  Speed
       >   0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
       > curl: (22) The requested URL returned error: 400
       > error: cannot download source from any mirror
       For full logs, run 'nix log /nix/store/vwfm92xmfxz6ss1kgj19zrj8d44v8l21-source.drv'.

@JohnRTitor
Copy link
Contributor

CC @Mic92 @RossComputerGuy

(I have no idea who to ping)

This will likely cause a lot of build failures without cache.

@honnip
Copy link
Contributor

honnip commented Oct 4, 2024

On master:

> nix build --rebuild --keep-failed --print-out-paths --option substitute false .#gnulib
note: keeping build directory '/var/tmp/nix-build-source.drv-0'
error: builder for '/nix/store/w47d02qhwhdp6l1r5k6f1wcyj8ms5hjx-source.drv' failed with exit code 1;
       last 7 log lines:
       >
       > trying https://git.savannah.gnu.org/cgit/gnulib.git/snapshot/gnulib-2dd1a7984c6b3e6056cef7e3f9933e0039c21634.tar.gz
       >   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
       >                                  Dload  Upload   Total   Spent    Left  Speed
       >   0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
       > curl: (22) The requested URL returned error: 400
       > error: cannot download source from any mirror
       For full logs, run 'nix log /nix/store/w47d02qhwhdp6l1r5k6f1wcyj8ms5hjx-source.drv'.
error: 1 dependencies of derivation '/nix/store/051mw1c68z11g9myqd6d0jcr6x4pivkj-gnulib-20231109.drv' failed to build

(edit: it failed)

Maybe related https://hostux.social/@fsfstatus/113242881236519916

JohnRTitor added a commit to JohnRTitor/nixpkgs that referenced this issue Oct 4, 2024
@honnip
Copy link
Contributor

honnip commented Oct 4, 2024

https://lists.gnu.org/archive/html/savannah-users/2024-09/msg00009.html

This appears to be a known issue on the mirror.

@JohnRTitor
Copy link
Contributor

As the underlying fetchzip is not working/broken in some cases, I propose making fetchFromSavannah more in line with fetchFromGitHub, moving the inner fetchzip to fetchgit.

@RossComputerGuy
Copy link
Member

Will poke and prod at this when I have the chance. Currently traveling to Orlando so I'm stuck on planes. Should be able to on Saturday.

@thundertheidiot
Copy link

I'm pretty sure this can't be closed yet, grub seems to download it's own gnulib instead of relying on the gnulib package.

Grub derivation

gnulib = fetchFromSavannah {
    repo = "gnulib";
    # NOTE: keep in sync with bootstrap.conf!
    rev = "9f48fb992a3d7e96610c4ce8be969cff2d61a01b";
    hash = "sha256-mzbF66SNqcSlI+xmjpKpNMwzi13yEWoc1Fl7p4snTto=";
  };

@JohnRTitor JohnRTitor reopened this Oct 13, 2024
@JohnRTitor
Copy link
Contributor

We should really fix fetchFromSavanna instead.

@thundertheidiot
Copy link

thundertheidiot commented Oct 13, 2024

https://git.savannah.gnu.org/gitweb/?p=gnulib.git&view=view+git+repository

It looks like you can get a snapshot from https://git.savannah.gnu.org/gitweb/?p=${repo}.git;a=snapshot;h=${rev};sf=tgz

I made a patch and I'm now trying to test that it actually downloads grub successfully with the same hash. I did not find a nix-build flag that lets me not substitute only one package, so I'm currently building glibc, this will take a while.

@thundertheidiot
Copy link

I am pretty sure I have fixed fetchFromSavannah
#348328

@thundertheidiot
Copy link

#348328

The issue is not with fetchFromSavannah.

nix-build --expr 'let pkgs = import <nixpkgs> {}; in pkgs.fetchFromSavannah { repo = "grub"; rev = "03e6ea18f6f834f177cad017279bedbb0a3de594"; hash = "sha256-lathsBb2f7urh8R86ihpTdwo3h1hAHnRiHd5gCLVpBc="; }' --check
fetching path input 'path:/nix/store/60sn02zhawl3kwn0r515zff3h6hg6ydz-source'
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
checking outputs of '/nix/store/26insl93pj226y8zrgjzch91dc8d2qda-source.drv'...

trying https://git.savannah.gnu.org/cgit/grub.git/snapshot/grub-03e6ea18f6f834f177cad017279bedbb0a3de594.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 4977k    0 4977k    0     0  2541k      0 --:--:--  0:00:01 --:--:-- 2540k
unpacking source archive /build/grub-03e6ea18f6f834f177cad017279bedbb0a3de594.tar.gz
/nix/store/q73f2dbr8pmpj8d1cmmsjc0g8s9gl8nd-source
nix-build --expr 'let pkgs = import <nixpkgs> {}; in pkgs.fetchFromSavannah { repo = "gnulib"; rev = "9f48fb992a3d7e96610c4ce8be969cff2d61a01b"; hash = "sha256-mzbF66SNqcSlI+xmjpKpNMwzi13yEWoc1Fl7p4snTto="; }' --check
fetching path input 'path:/nix/store/60sn02zhawl3kwn0r515zff3h6hg6ydz-source'
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
checking outputs of '/nix/store/ifmqapblwzjjr3kh3pvf7g9mdkqjncmn-source.drv'...

trying https://git.savannah.gnu.org/cgit/gnulib.git/snapshot/gnulib-9f48fb992a3d7e96610c4ce8be969cff2d61a01b.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 400
error: cannot download source from any mirror
error: builder for '/nix/store/ifmqapblwzjjr3kh3pvf7g9mdkqjncmn-source.drv' failed with exit code 1;
       last 7 log lines:
       >
       > trying https://git.savannah.gnu.org/cgit/gnulib.git/snapshot/gnulib-9f48fb992a3d7e96610c4ce8be969cff2d61a01b.tar.gz
       >   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
       >                                  Dload  Upload   Total   Spent    Left  Speed
       >   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
       > curl: (22) The requested URL returned error: 400
       > error: cannot download source from any mirror
       For full logs, run 'nix log /nix/store/ifmqapblwzjjr3kh3pvf7g9mdkqjncmn-source.drv'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants