systemd: introduce more options for a more minimal build#101886
Merged
flokli merged 28 commits intoNixOS:stagingfrom Nov 1, 2020
Merged
systemd: introduce more options for a more minimal build#101886flokli merged 28 commits intoNixOS:stagingfrom
flokli merged 28 commits intoNixOS:stagingfrom
Conversation
7833003 to
b9d20b6
Compare
Member
|
I rebased this on current staging so that the test sets eval |
b9d20b6 to
e4f5694
Compare
Member
Member
Author
|
Yeah, I didn't intend to, and the feedback cycle/general story on staging isn't good. |
This is a no-op and makes things a bit smaller.
These are all unconditianally anyways.
This was only used to patch a circular output reference from lib to out on aarch64, but was removed in b68bddf, This commit forgot to remove perl, so remove it now.
upstreams TODO mentions iptables-dev (libiptc) is also used for nspawn, but it seems like it only makes use of this via networkd anyways (or does these days) - at least systemdMinimal compiles successfully without iptables in the build closure.
This makes curl optional if both remote and importd are disabled, and makes some assertions more robust by switching from curl.dev != null to lib.getDev curl != null.
use lib.getDev to retrieve the dev output. Don't pass it to buildInputs if we don't build with withCryptsetup set to true.
This will build systemd without some compression utils, useful for systemdMinimal.
This is already configurable above.
This was missed.
… and default it to false for systemdMinimal
This isn't used anywhere.
fsck.c doesn't refer to any of these binaries anymore, and the whole systmed codebase not to /sbin/mke2fs.
f8f036e to
6dbc23e
Compare
Member
Author
|
This was rebased once again to include #101843. |
nlewo
reviewed
Oct 31, 2020
| , withNss ? true | ||
| , withPCRE2 ? true | ||
| , withPolkit ? true | ||
| , withRemote ? false # has always been disabled on NixOS, upstream version appears broken anyway |
Member
There was a problem hiding this comment.
In 20.03, the systemd-journal-gatewayd feature was working fine and we have an option in the NixOS module to enable it. Note the systemd-journal-gatewayd is turned off when the REMOTE option is false.
So, i think we should enable it by default.
Member
Author
There was a problem hiding this comment.
I'm fine with enabling more features here, if we disable it in systemdMinimal and have tests ensuring its functionality :-)
Member
|
I like the idea of this. CC @kloenk |
arianvp
approved these changes
Nov 1, 2020
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation for this change
Paired with @andir on this. Apart from some cleanups, this adds some more flags to the systemd derivation, both cutting down the runtime and build closure size of
systemdMinimal.Sizes:
Things done
sandboxinnix.confon non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)nix path-info -Sbefore and after)