util-linux: split mount, login and swap utils into their own outputs#236463
util-linux: split mount, login and swap utils into their own outputs#236463ElvishJerricco merged 1 commit intoNixOS:stagingfrom
Conversation
ElvishJerricco
left a comment
There was a problem hiding this comment.
I like it!
I guess systemd stage 1 does have this bit:
nixpkgs/nixos/modules/system/boot/systemd/initrd.nix
Lines 352 to 354 in b313b30
But that shouldn't need updating, since that only copies the specific programs in already, and it does chase symlinks.
7af5117 to
eb0b013
Compare
| postInstall = '' | ||
| moveToOutput bin/mount "$mount" | ||
| moveToOutput bin/umount "$mount" | ||
| ln -svf "$mount/bin/"* $bin/bin/ |
There was a problem hiding this comment.
I'm generally fearful of bash globs. I know this works as expected, but nonetheless is this fear too paranoid in this case?
There was a problem hiding this comment.
I think so; the one weird case here would be if nothing exists in $mount/bin (so it expands to nothing rather than the literal glob due to stdenv's nullglob) and we end up with no argument, and ln creates a symlink to $bin/bin in the working directory.
|
We have some initrd issues, surely because of this: |
|
Also installer tests complain: |
|
Thanks for tracking them down to this! I'll have a look. |
The split of util-linux into further outputs (#236463) resulted in ${util-linux.bin}/bin/mount becoming a symlink. This broke zfs in some cases.
Description of changes
This reduces closure size of systemd by a couple of MB by omitting some unnecessary pieces of util-linux from its dependencies.
Things done
sandbox = trueset innix.conf? (See Nix manual)nixos/tests/login.nixnix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)