After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 722241 - fixup dconf setup
fixup dconf setup
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2014-01-15 06:48 UTC by Allison Karlitskaya (desrt)
Modified: 2014-10-01 14:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
move over to using 'dconf compile' and file-db (7.13 KB, patch)
2014-01-15 06:48 UTC, Allison Karlitskaya (desrt)
reviewed Details | Review
data: removing 'workingdir' dconf manipulations (2.16 KB, patch)
2014-01-15 06:48 UTC, Allison Karlitskaya (desrt)
reviewed Details | Review
data: removing 'workingdir' dconf manipulations (1.45 KB, patch)
2014-01-31 00:36 UTC, Allison Karlitskaya (desrt)
committed Details | Review
move over to using 'dconf compile' and file-db (7.08 KB, patch)
2014-01-31 00:54 UTC, Allison Karlitskaya (desrt)
committed Details | Review

Description Allison Karlitskaya (desrt) 2014-01-15 06:48:12 UTC
dconf now has a few features to make usecases like gdm's a bit more sane.  Let's use them.
Comment 1 Allison Karlitskaya (desrt) 2014-01-15 06:48:14 UTC
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).
Comment 2 Allison Karlitskaya (desrt) 2014-01-15 06:48:16 UTC
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.
Comment 3 Ray Strode [halfline] 2014-01-15 15:43:29 UTC
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?
Comment 4 Ray Strode [halfline] 2014-01-15 16:03:04 UTC
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?
Comment 5 Allison Karlitskaya (desrt) 2014-01-15 18:24:40 UTC
(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?
Comment 6 Ray Strode [halfline] 2014-01-15 21:40:34 UTC
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
Comment 7 Ray Strode [halfline] 2014-01-15 21:41:32 UTC
if we aren't going to ship these by default, maybe we shouldn't be shipping custom.conf by default either
Comment 8 Allison Karlitskaya (desrt) 2014-01-31 00:36:15 UTC
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.
Comment 9 Allison Karlitskaya (desrt) 2014-01-31 00:54:04 UTC
Created attachment 267696 [details] [review]
move over to using 'dconf compile' and file-db

Made the requested updates, but no docs yet.
Comment 10 Allison Karlitskaya (desrt) 2014-01-31 00:54:45 UTC
Kat promises that she will update the sysadmin guide about this -- perhaps as early as this weekend.
Comment 11 Ray Strode [halfline] 2014-01-31 17:18:56 UTC
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.
Comment 12 Ray Strode [halfline] 2014-01-31 17:22:23 UTC
Review of attachment 267696 [details] [review]:

sure.
Comment 13 Allison Karlitskaya (desrt) 2014-02-01 10:05:37 UTC
> 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 :)
Comment 14 Allison Karlitskaya (desrt) 2014-02-01 10:06:39 UTC
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
Comment 15 Colin Walters 2014-02-11 19:38:18 UTC
Potential fallout in https://bugzilla.gnome.org/show_bug.cgi?id=723553

I don't have any obvious log failures offhand though.
Comment 16 David Woodhouse 2014-10-01 12:05:44 UTC
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?
Comment 17 Allison Karlitskaya (desrt) 2014-10-01 14:13:35 UTC
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).
Comment 18 Allison Karlitskaya (desrt) 2014-10-01 14:17:59 UTC
See bug 737723.