Support path hierarchies for system-db
Currently, aiui, a system-db:hello
entry in a dconf profile will cause a database to be loaded from exactly /etc/dconf/db/hello
. A distro vendor may wish to override default values.
For immutable/image based distributions (such as Endless OS and Silverblue, which use OSTree), putting a distribution-controlled database file in /etc
is not as straightforward as on package-based distributions, as /etc
is outside the OS image.
It might make this easier if system-db
supported looking in a hierarchy of well-defined paths, much as systemd does for its configuration. For a given database hello
, it would look in order at:
/etc/dconf/db/hello
/var/run/dconf/db/hello
/usr/local/share/dconf/db/hello
/usr/share/dconf/db/hello
The first file that is readable is loaded. No merging is done with subsequent files.
This is currently supported by creating a custom dconf profile with file-db
entries for the fallback databases to load. However, new dconf profiles can only be stored in /etc/dconf/profile
, which raises the same problem (of storing OS-image-controlled configuration in /etc
) again. A custom profile could be stored elsewhere on the system, but then every user would have to have DCONF_PROFILE=/path/to/profile/probably/in/usr/share
set in their session, which is fragile and ugly.
How does this sound?