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
Fixes grub1 installer tests #46769
Fixes grub1 installer tests #46769
Conversation
@GrahamcOfBorg test installer.grub1 |
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: tests.installer.grub1 Partial log (click to expand)
|
No attempt on x86_64-darwin (full log) The following builds were skipped because they don't evaluate on x86_64-darwin: grub Partial log (click to expand)
|
Unexpected error: command failed with exit code 1 on aarch64-linux (full log) Attempted: grub Partial log (click to expand)
|
Welp, something else on master seems wrong :/. On top of |
Unexpected error: command failed with exit code 1 on x86_64-linux (full log) Attempted: tests.installer.grub1 Partial log (click to expand)
|
Unexpected error: command failed with exit code 1 on x86_64-linux (full log) Attempted: grub Partial log (click to expand)
|
And, apparently the source URLs for the patches isn't stable? What is going on? Checking using |
@samueldr |
Thank you for debugging this! I spent some time on it and just couldn't figure out what was wrong... |
pkgs/tools/misc/grub/default.nix
Outdated
|
||
let | ||
baseUrl = "https://sources.debian.org/data/main/g/grub/0.97-73/debian/patches"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sources.debian.org
is not version controlled, they tend to remove/change files so we get 404s and broken hashes later.
Can you please try to find the patches in their gitlab repo: https://salsa.debian.org/grub-team/grub/tree/master/debian/patches - they should all be there somewhere, although maybe not all int the grub-team
project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can change baseUrl
to -> https://salsa.debian.org/grub-team/grub-legacy/raw/debian/0.97-73/debian/patches
The corrected hashes are the same.
I also checked and all the files referenced here are there also.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm! Though I hadn't verified elsewhere whether it was a safe location, I verified that other locations in Nixpkgs used sources.debian.org
. You say "not version controlled", but I see the version in the URL, which I would assume always match with a released version (since I see those). Is it that even though they are versioned, they may change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've had issues fetchpatch-ing from sources.debian.org
before. The content is not guaranteed to be stable, they do sometimes change or remove files even under the same version in the URL.
It's still used in nixpkgs but let's try to avoid it in the future. So the gitlab repo is the best option if you can find the patches there.
Fixes #39025 |
GCC 7 wasn't kind to grub.
Instead of using Gentoo's patchset, uses Debian's. Gentoo's doesn't work anymore.
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: tests.installer.grub1 Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: tests.installer.grub1 Partial log (click to expand)
|
Ah, as far as the hashes are concerned: it's a difference I didn't know about I have also included the script I used to generate the file, and made it work more like the existing maintainers script; but made specially for this use. It might be wise to check into refactoring the maintainers script so it works using salsa.debian.org instead of the (apparently) problematic sources.debian.org url. |
I also ran |
Motivation for this change
For #45960, needs backport to 18.09.
This upgrades grub to the latest Debian patchset. Also tried updating to the latest Gentoo patchset, didn't work better.
Additionally, gcc6 is required for building grub1.
I'm not 100% positive on the method used to fix the installer test (creating /tmp after the partitioning), but 100% positive that it is the fix required. This was found by using
grub-install --debug
(through modfying the nixos grub installer script). (Note that--debug
ongrub-install
FORCIBLY exits with error code1
.)As for: "what broke the build?", the switch to gcc7 was the initial breakpoint. At that moment, the grub1 build was failing.
Why the segfaults aren't visible in the failure logs? I thought I had found clues in #46763, but turns out that by validating whether gcc6 was required or not, I found out that my initial assumptions were wrong. Still an open question.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)