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
WIP: reintroduce the systemd lib output #99881
base: staging
Are you sure you want to change the base?
Conversation
Since we previously stripped down the features of `qemu_test` some of the features users are used to while running tests through the (impure) driver didn't work anymore. Most notably we lost support for graphical output and audio. With this change the `driver` attribute uses are more feature complete version of QEmu compared to the one used in the pure Nix builds. This gives us the best of both worlds. Users are able to see the graphical windows of VMs while CI and regular nix builds do not have to download all the (unnecessary) dependencies.
This allows much faster VM-test based systemd testing as the closure of qemu suddenly shrinks to reasonable sizes again.
Now that $lib doesn't refer to rootprefixdir anymore, the cyclic dependnecy should be gone
cc @edolstra |
|
||
# Keep only libudev and libsystemd in the lib output. | ||
mkdir -p $out/lib | ||
mv $lib/lib/security $lib/lib/libnss* $out/lib/ |
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.
I actually wonder why
./lib/libnss_myhostname.so.2
./lib/libnss_systemd.so.2
./lib/libnss_mymachines.so.2
./lib/libnss_resolve.so.2
are not part of the $lib
output? Commit history doesnt really help here. But I see no point in not having them in $lib
? This is not your fault; but I just wonder what the historic reason is... I would actually just move them to the $lib
output
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.
Yes, I agree. I've, in the past, often questioned what we moved to lib and what not. Eventually I think that even lib
might not be granular enough. I could think of separating libraries for udev
, runtime plugins (like nss) etc in their output so the closures of things that aren't really part of a NixOS system will not be present on systems that just use nixpkgs outside of NixOS.
I marked this as stale due to inactivity. → More info |
Motivation for this change
Yesterday I started hacking on some changes for systemd and I think the approach might be suitable for one of our current problems with closure bloat (due to not having a
lib
output) anymore.The basic idea is to distinguish between build-time and run-time paths in the meson world. There are paths where build results should be installed to but those aren't always the same during runtime.
One concern, to this approach, was that we must always popluate
/run/current-system/systemd
before stage-2. That is currently the case and not a reason to worry. It will be more difficult once we migrate to initrd in stage-1 but for that to happen we should probably start cleaning up a lot of other things first.Right now I also have some changes in here that cut down on the test closure size of NixOS tests. I'm willing to file them as another PR if you do not want to mix these things.
Things done
sandbox
innix.conf
on non-NixOS linux)small
release set and most of the "normal" NixOS tests. Haven't seen any new issues that do not look like normal test flakiness.