Summary: | System services activation does not respect XDG_DATA_DIRS | ||
---|---|---|---|
Product: | dbus | Reporter: | Marco Pesenti Gritti <mpgritti> |
Component: | core | Assignee: | Simon McVittie <smcv> |
Status: | RESOLVED FIXED | QA Contact: | John (J5) Palmieri <johnp> |
Severity: | normal | ||
Priority: | medium | CC: | lennart, walters |
Version: | unspecified | Keywords: | patch |
Hardware: | Other | ||
OS: | All | ||
URL: | http://cgit.freedesktop.org/~smcv/dbus/log/?h=system-search-paths-21620 | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Bug Depends on: | 35306 | ||
Bug Blocks: | 36164 | ||
Attachments: | Explicitly don't search XDG_DATA_DIRS for system services, and document it |
Description
Marco Pesenti Gritti
2009-05-07 11:38:48 UTC
We also don't respect $XDG_DATA_HOME (or its default) for the system bus, although anything involving the home directory is meaningless for the system bus anyway. I'm not at all sure that we *should* be respecting XDG_DATA_DIRS for the system bus or system services: it's system-wide and security-sensitive, and the services are meant to be run in a (relatively) "clean", isolated environment similar to the one provided by systemd or Upstart. What's your use-case for varying this path? I'd be very tempted to replace this with one of: - a hard-coded, configure-time search path, with the default being something like /usr/local/share:/usr/share:/lib:${datadir} (see Bug #35229 which asks to add /lib to the search path, and Bug #35306 which asks to document it) - a configuration option in /etc/system.conf, defaulting to the above - a hard-coded /usr/local/share:/usr/share:${datadir} (equivalent to what we do now), and document that people who don't like that search-path should patch their /etc/dbus-1/system.conf to replace <standard_system_servicedirs/> with their own preferred search path Cc Lennart since he also wants to change the search path (to add /lib). I agree with Simon that XDG_DATA_DIRS and friends have little relevance really for system software. I am not totally against software honouring this env var, but I see little reason to fix it do this. Created attachment 56756 [details] [review] Explicitly don't search XDG_DATA_DIRS for system services, and document it In practice, it never works, because the activation helper doesn't respect environment variables for security reasons. If you want to vary the search path, alter system.conf instead, to replace or augment <standard_system_servicedirs/> with your preferred search path. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=21620 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Review requested. ssh://people.freedesktop.org/~smcv/dbus.git system-search-paths-21620 Looks good to me. Thanks, fixed in git for 1.5.10. To be clear: the change made here was not actually what Marco requested, it was to stop pretending XDG_* were respected at all for the system bus. Marco, I assume you were using jhbuild or something? If you're trying to run a sub-system-bus in something like jhbuild, I'm not at all sure that that makes sense... but you can edit system.conf or a file in system.d if you've managed to make a sub-system-bus work and you need a different search path. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.