make-initrd: use closureInfo again#372931
Conversation
philiptaron
left a comment
There was a problem hiding this comment.
The diff looks good to me. How should it be tested? I ran a few nixos tests, since it looks like this is version of making the initrd is the one used there. They all came out fine.
@mweinelt told me that things that make all nixos tests rebuild ought to go to staging, even if they have small rebuild counts here.
Nix 2.* is widely used now, so closureInfo should be used instead.
e9943fa to
e540245
Compare
retargeted it at staging and removed pathsFromGraph I tested it by building my own |
|
Also when testing, make sure the |
philiptaron
left a comment
There was a problem hiding this comment.
I'm sad to report that you've triggered the following bug in Nix:
For details, read:
To show this, run the nixosTests.installer.simple test. With this PR, it fails with an inscrutable curl error (per the bug).
How to fix? I think it's something like:
But I don't see the line that's triggering the bug immediately.
|
@philiptaron how do you see that it triggers: NixOS/nix#11503 ? |
|
@philiptaron I believe the issue isn't NixOS/nix#11503 but rather just an ordinary case of a missing dependency in the installer test. diff --git a/nixos/modules/profiles/installation-device.nix b/nixos/modules/profiles/installation-device.nix
index a4e5a4aac790..f01867c7e29c 100644
--- a/nixos/modules/profiles/installation-device.nix
+++ b/nixos/modules/profiles/installation-device.nix
@@ -102,7 +102,7 @@ with lib;
stdenv
stdenvNoCC # for runCommand
busybox
- jq # for closureInfo
+ (lib.getDev jq) # for closureInfo
# For boot.initrd.systemd
makeInitrdNGTool
];Alternatively, we could append |
Jörg, @Mic92, My evidence is circumstantial: most triggers of this bug cause |
Still need to make the nixosTests.installer.simple test pass
ElvishJerricco
left a comment
There was a problem hiding this comment.
See above comment about jq for the installer tests.
As discovered in NixOS#372931, we need the dev output of jq for closureInfo. We opt to add the whole thing.
nixosTests.installer.simple passes now.
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/issue-building-linux-kernel-modules-after-flake-update/62322/8 |
|
Proposed a minor cleanup to drop no longer used |
nix 1.* is quite old now (the original issue #36268 was closed many years ago)
Things done
This is basically a revert of 165b32d
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.