GNOME Bugzilla – Bug 722241
fixup dconf setup
Last modified: 2014-10-01 14:17:59 UTC
dconf now has a few features to make usecases like gdm's a bit more sane. Let's use them.
Created attachment 266339 [details] [review] move over to using 'dconf compile' and file-db Instead of installing keyfiles in /etc and running 'dconf update' to generate the database in place (or requiring package system triggers to do so for us), just build the database in-tree using the new 'dconf compile' command. We can install that in our pkgdatadir. dconf now also looks in XDG_DATA_DIRS in addition to /etc when finding profiles, so install ours there too. This makes gdm /etc-clean with respect to dconf. If users want to make additional customisations to the gdm login session then they should create their own dconf database in /etc/dconf and then replace the 'gdm' profile with one that references their new db (by way of /etc/dconf/profile/gdm, which is searched first).
Created attachment 266340 [details] [review] data: removing 'workingdir' dconf manipulations According to Ray, this is left over from the (now very) old way of generating the dconf database at install time and should be removed.
Review of attachment 266340 [details] [review]: ::: data/Makefile.am @@ -317,3 @@ - $(mkinstalldirs) $(DESTDIR)$(workingdir); \ - chmod 1770 $(DESTDIR)$(workingdir); \ - chown root:gdm $(DESTDIR)$(workingdir) || : ; \ well this part isn't really related to dconf, it's just creating the GDM users home directory. Though it's weird that it's owned by root, and I guess useradd will create the directory for us anyway... @@ -324,3 @@ - chmod 0755 $(DESTDIR)$(workingdir)/.config/dconf; \ - chown gdm:gdm $(DESTDIR)$(workingdir)/.config/dconf || : ; \ - fi sure @@ -330,3 @@ - chmod 0755 $(DESTDIR)$(workingdir)/.local/share/applications; \ - chown gdm:gdm $(DESTDIR)$(workingdir)/.local/share/applications || : ; \ - fi This one also is unrelated to dconf. Thinking about it more, maybe these are important to prevent glib's file monitoring code from polling in a loop?
Review of attachment 266339 [details] [review]: thanks for working on this. ::: data/Makefile.am @@ +49,3 @@ + dconf-settings/locks/00-upstream-settings-locks + +pkgdata_DATA = greeter-dconf-defaults the other place we install pkg data, we do: schemasdir = $(pkgdatadir) probably should be consistent, here. That also prevents someone adding pkgdata_DATA= down lower in the file and accidentally breaking this. @@ +54,3 @@ + +dconfprofiledir = $(DATADIR)/dconf/profile +dconfprofile_DATA = dconf-profile/gdm i think a better file structure would be: data/dconf/gdm.in data/dconf/gdm data/dconf/defaults/00-upstream-settings data/dconf/defaults/locks ::: data/dconf-profile/gdm.in @@ +1,1 @@ +user-db:user I think i'd rather there be a system-db: here by default (and the directory already created and ready to go, so the admin can find it when sniffing around /etc), but if you strongly disagree i'm not going to push the issue. What's your take?
(In reply to comment #4) > schemasdir = $(pkgdatadir) > > probably should be consistent, here. That also prevents someone adding > pkgdata_DATA= down lower in the file and accidentally breaking this. sure. > i think a better file structure would be: > > data/dconf/gdm.in > data/dconf/gdm > data/dconf/defaults/00-upstream-settings > data/dconf/defaults/locks sure. > I think i'd rather there be a system-db: here by default (and the directory > already created and ready to go, so the admin can find it when sniffing around > /etc), but if you strongly disagree i'm not going to push the issue. What's > your take? strongly disagree. I think /etc should be completely empty by default (except for files created during the system setup like fstab, hostname, localtime, etc.) My recommendation here is to have good documentation (and maybe we could add some /usr/share/doc/gdm/examples/etc that the user could copy in place to get started). Thoughts?
Hi, > strongly disagree. I think /etc should be completely empty by default (except > for files created during the system setup like fstab, hostname, localtime, > etc.) k. > My recommendation here is to have good documentation (and maybe we could add > some /usr/share/doc/gdm/examples/etc that the user could copy in place to get > started). Thoughts? well GDM's docs are in a dire state of disrepair at the moment. Though, we should definitely make sure the sysadmin guide is updated. https://help.gnome.org/admin/system-admin-guide/stable/login-logo.html.en https://help.gnome.org/admin/system-admin-guide/stable/login-background.html.en https://help.gnome.org/admin/system-admin-guide/stable/login-banner.html.en
if we aren't going to ship these by default, maybe we shouldn't be shipping custom.conf by default either
Created attachment 267692 [details] [review] data: removing 'workingdir' dconf manipulations According to Ray, this is left over from the (now very) old way of generating the dconf database at install time and should be removed.
Created attachment 267696 [details] [review] move over to using 'dconf compile' and file-db Made the requested updates, but no docs yet.
Kat promises that she will update the sysadmin guide about this -- perhaps as early as this weekend.
Review of attachment 267692 [details] [review]: Sure, as long as you're confident dconf / glib / whatever doesn't create a file monitor on the non-existent directory. I just don't want to inadvertently fall back to glib's file polling every n seconds in a loop.
Review of attachment 267696 [details] [review]: sure.
> Sure, as long as you're confident dconf / glib / whatever doesn't create a file > monitor on the non-existent directory. I just don't want to inadvertently fall > back to glib's file polling every n seconds in a loop. The reason that XDG_RUNTIME_DIR was invented was so that I could put a flag file there so that I didn't need to monitor/poll in case the dconf database in the home directory was missing :)
Attachment 267692 [details] pushed as 139de6f - data: removing 'workingdir' dconf manipulations Attachment 267696 [details] pushed as feb6dda - move over to using 'dconf compile' and file-db
Potential fallout in https://bugzilla.gnome.org/show_bug.cgi?id=723553 I don't have any obvious log failures offhand though.
So where previously I had to create a file in /etc/dconf/db/gdm.d, remove the old /etc/dconf/db/gdm file due to some dependency bug and then run 'dconf update', I now also have to create /etc/dconf/profile/gdm. The documentation at https://help.gnome.org/admin/system-admin-guide/stable/login-banner.html.en tells me that, but shouldn't it include the line "file-db:/$prefix/share/gdm/greeter-dconf-defaults" in what it tells me to include in that file?
Yes -- it probably should, unless you copy the contents of the system database into your own one in /etc (which would really be a bit silly).
See bug 737723.