make-initrd-ng: support wrapped executables#215381
make-initrd-ng: support wrapped executables#215381ElvishJerricco merged 4 commits intoNixOS:masterfrom
Conversation
There was a problem hiding this comment.
It's definitely weird that we had the unwrapped one here and the wrapped one in luksroot.nix. But maybe we should leave the wrapped one in luksroot.nix and simply remove the line from this file? I'm pretty sure we don't want this in initrd unless LUKS is actually being used.
There was a problem hiding this comment.
It looks like there is a reference to the exe that could get dynamically added from systemd-gpt-auto-generator, but that's because the discoverable partitions spec does allow discovery of LUKS partitions and it's probably not important to have work if LUKS devices aren't defined in the config (someone can just boot.initrd.luks.forceLuksSupportInInitrd anyway to get it even if the device itself isn't in the config)
I'll push an update in a second
There was a problem hiding this comment.
I've no clue why it was added to begin with though so 🤷🏻♀️
There was a problem hiding this comment.
It looks like it came from #189676. I assume because they ran into the wrapped issue but they added it to the systemd-initrd module instead of the LUKS one for some reason
@zhaofengli Was there a reason for adding the wrapped executable here or can it be removed now that make-initrd-ng supports wrapped files with this PR?
dd6a1da to
d6d9f43
Compare
ElvishJerricco
left a comment
There was a problem hiding this comment.
I think the last thing this PR needs is a change to the README in pkgs/build-support/kernel/make-initrd-ng/README.md. That file outlines what the program does in detail, so it needs to be updated with information about this new behavior.
d6d9f43 to
1fa1b58
Compare
|
@ofborg build nixosTests.systemd-initrd-vconsole I added one line to the file to document this new behavior. It's pretty short but so is the change itself, so let me know if this is still insufficient |
Description of changes
This makes it so that
make-initrd-ngautomatically copies the unwrapped files when it encounters wrapped files, preventing the need to predict and add each wrapped file to the systemd-initrd store paths manuallyThe issue was noticed when
gzipbecame wrapped and vconsole setup in systemd-initrd stopped working because only the wrapped was copied and not the unwrapped executable, so I added a test that vconsole setup works correctly in systemd-initrd (though technically gzip won't necessarily always be wrapped so this test only indirectly tests the change right now)cc: @ElvishJerricco (since we talked about this in
#stage1-systemd:nixos.org)Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notes