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
Redo DBus configuration #22864
Redo DBus configuration #22864
Conversation
Use XSLT transform to modify stock dbus configuration file. This is needed because some dbus components doesn't support <include> so we need to put our core configuration in the main file.
@abbradar, thanks for your PR! By analyzing the history of the files in this pull request, we identified @edolstra, @wkennington and @peti to be potential reviewers. |
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.
This is a neat piece of code, but I am not sure this is worth it. It's a +108 −39 diff that introduces xsl scripts. I think sed is better understood by maintainers.
Anyway, having makeDbusConf at top-level needs to be changed.
@@ -7094,6 +7094,11 @@ with pkgs; | |||
dbus_libs = dbus; | |||
dbus_daemon = dbus.daemon; | |||
|
|||
makeDBusConf = { suidHelper, serviceDirectories }: |
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.
makeDBusConf should not be a top-level package. Maybe place it at that pkgs.dbus.makeDBusConf. It would also be specific to the dbus package on which it is called (override compatible).
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.
Sounds good to me (fontconfig
also does this, we may want to refactor both).
sed would be much more difficult now that we transform upstream XML instead of just inserting strings into our own in pre-defined places (like we did). Complex changes of XML with regexes (filtering |
Oh, right, I did not fully understand the motivation explained in the OP. If you really need to rewrite the xml, then xsl is a good option. I still think that makeDBusConfig should not be toplevel ;-) |
I'll make a PR to move both this one and |
Motivation for this change
Fix #22354 (comment). We now don't use any extra configuration files. Instead we embed our configuration into the main config using XSLT. See the issue and description in commits on why this is necessary.
With this
blueman
starts correctly for me in a virtual machine.Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)cc @layus (was interested in previous DBus changes)
XSLT solution is heavily
copied frominspired bymakeFontsConf
-- thanks to original authors!