systemd: Fix systemd-cryptenroll TPM2 + fix systemd-tmpfiles-setup-dev.service#171242
systemd: Fix systemd-cryptenroll TPM2 + fix systemd-tmpfiles-setup-dev.service#171242dasJ wants to merge 3 commits intoNixOS:stagingfrom
Conversation
0423158 re-introduced a previously removed mv call.
K900
left a comment
There was a problem hiding this comment.
LGTM, this (partially) fixes systemd-in-stage1 on my setup
| # Wrap in the correct path for LUKS2 tokens. Must be after the fixup phase | ||
| # or the rpath cleanup removes the directories again. |
There was a problem hiding this comment.
This comment doesn't look right. Down there, we set LD_LIBRARY_PATH, not set rpath. Also, I'd propose moving the comment above postFixup, so iterating on the comment itself doesn't trigger rebuilds.
| # Wrap in the correct path for LUKS2 tokens. Must be after the fixup phase | ||
| # or the rpath cleanup removes the directories again. | ||
| for f in lib/systemd/systemd-cryptsetup bin/systemd-cryptenroll; do | ||
| wrapProgram $out/$f --prefix LD_LIBRARY_PATH : ${placeholder "out"}/lib/cryptsetup |
There was a problem hiding this comment.
Why do we need to set LD_LIBRARY_PATH? I was under the assumption that ${systemd}/lib being in rpath of all systemd binaries calling out libcryptsetup code is sufficient…
There was a problem hiding this comment.
No, ${systemd}/lib is not the same thing as ${systemd}/lib/cryptsetup
There was a problem hiding this comment.
So patchelf --add-rpath, and disable the rpath trimming?
There was a problem hiding this comment.
Agreed. LD_LIBRARY_PATH is not the solution.
Also, in systemdMinimal, these executables don't exist, so the build fails.
| # Wrap in the correct path for LUKS2 tokens. Must be after the fixup phase | ||
| # or the rpath cleanup removes the directories again. | ||
| for f in lib/systemd/systemd-cryptsetup bin/systemd-cryptenroll; do | ||
| wrapProgram $out/$f --prefix LD_LIBRARY_PATH : ${placeholder "out"}/lib/cryptsetup |
There was a problem hiding this comment.
Agreed. LD_LIBRARY_PATH is not the solution.
Also, in systemdMinimal, these executables don't exist, so the build fails.
|
@dasJ is there a follow-up PR on this? |
|
None planned |
|
e01a082 definitely needs to go in one way or another. |
Description of changes
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