[gdm] move over to using 'dconf compile' and file-db



commit feb6ddaff33a3e58a20e94264313322534963f98
Author: Ryan Lortie <desrt desrt ca>
Date:   Tue Jan 14 09:52:55 2014 -0500

    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).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=722241

 configure.ac                                       |    1 +
 data/.gitignore                                    |    1 +
 data/Makefile.am                                   |   57 ++++++--------------
 data/dconf-profile                                 |    2 -
 data/dconf/.gitignore                              |    1 +
 data/{ => dconf/defaults}/00-upstream-settings     |    0
 .../defaults/locks}/00-upstream-settings-locks     |    0
 data/dconf/gdm.in                                  |    2 +
 8 files changed, 21 insertions(+), 43 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 75f29f7..0850ce7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1569,6 +1569,7 @@ data/pixmaps/Makefile
 data/pixmaps/16x16/Makefile
 data/pixmaps/32x32/Makefile
 data/pixmaps/48x48/Makefile
+data/dconf/gdm
 common/Makefile
 po/Makefile.in
 tests/Makefile
diff --git a/data/.gitignore b/data/.gitignore
index d9c62cb..c95bb39 100644
--- a/data/.gitignore
+++ b/data/.gitignore
@@ -1 +1,2 @@
 /gdm.service
+/greeter-dconf-defaults
diff --git a/data/Makefile.am b/data/Makefile.am
index d725faa..2652ecc 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -43,6 +43,19 @@ dbusconf_DATA = $(dbusconf_in_files:.conf.in=.conf)
 @INTLTOOL_SCHEMAS_RULE@
 @INTLTOOL_XML_NOMERGE_RULE@
 
+# dconf database and profile
+dconf_db_files = \
+       dconf/defaults/00-upstream-settings             \
+       dconf/defaults/locks/00-upstream-settings-locks
+
+dconfdbdir = $(pkgdatadir)
+dconfdb_DATA = greeter-dconf-defaults
+greeter-dconf-defaults: $(dconf_db_files)
+       $(AM_V_GEN) dconf compile $@ $(srcdir)/dconf/defaults
+
+dconfprofiledir = $(DATADIR)/dconf/profile
+dconfprofile_DATA = dconf/gdm
+
 gsettings_SCHEMAS = org.gnome.login-screen.gschema.xml
 @GSETTINGS_RULES@
 
@@ -141,6 +154,7 @@ pam_files = $(pam_lfs_files)
 endif
 
 EXTRA_DIST +=                  \
+       $(dconf_db_files)       \
        $(schemas_in_files)     \
        $(schemas_DATA)         \
        $(dbusconf_in_files)    \
@@ -152,9 +166,6 @@ EXTRA_DIST +=                       \
        PreSession.in           \
        PostSession.in          \
        PostLogin               \
-       dconf-profile \
-       00-upstream-settings \
-       00-upstream-settings-locks \
        org.gnome.login-screen.gschema.xml.in \
        $(NULL)
 
@@ -165,6 +176,7 @@ CLEANFILES =                                \
        PreSession                      \
        PostSession                     \
        $(gsettings_SCHEMAS)            \
+       greeter-dconf-defaults          \
        $(NULL)
 
 DISTCLEANFILES =                       \
@@ -204,25 +216,18 @@ uninstall-hook:
        $(DESTDIR)$(sysconfdir)/dconf/db/gdm \
        $(DESTDIR)$(sysconfdir)/dconf/profile/gdm \
        -rf \
-       $(DESTDIR)$(sysconfdir)/dconf/db/gdm.d \
        $(DESTDIR)$(workingdir)/.config/dconf \
        $(DESTDIR)$(screenshotdir) \
        $(DESTDIR)$(xauthdir) \
        $(DESTDIR)$(PAM_PREFIX)/pam.d
 
-       -rmdir \
-       $(DESTDIR)$(sysconfdir)/dconf/db/gdm.d/locks \
-       $(DESTDIR)$(sysconfdir)/dconf/db/gdm.d \
-       $(DESTDIR)$(sysconfdir)/dconf/db \
-       $(DESTDIR)$(sysconfdir)/dconf
-
        if test -n "$(systemdsystemunit)"; then \
                rm -f $(DESTDIR)$(SYSTEMD_SYSTEM_UNIT_DIR)/$(systemdsystemunit); \
                rmdir $(DESTDIR)$(SYSTEMD_SYSTEM_UNIT_DIR) || : ; \
        fi
 
 
-install-data-hook: gdm.conf-custom Xsession Init PostSession PreSession 00-upstream-settings 
00-upstream-settings-locks $(systemdsystemunit)
+install-data-hook: gdm.conf-custom Xsession Init PostSession PreSession $(systemdsystemunit)
        if test '!' -d $(DESTDIR)$(gdmconfdir); then \
                $(mkinstalldirs) $(DESTDIR)$(gdmconfdir); \
                chmod 755 $(DESTDIR)$(gdmconfdir); \
@@ -327,38 +332,8 @@ install-data-hook: gdm.conf-custom Xsession Init PostSession PreSession 00-upstr
                chown gdm:gdm $(DESTDIR)$(workingdir)/.local/share/applications || : ; \
        fi
 
-       if test '!' -d $(DESTDIR)$(sysconfdir)/dconf/profile; then \
-               $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/dconf/profile; \
-               chmod 0755 $(DESTDIR)$(sysconfdir)/dconf/profile; \
-               chown root:root $(DESTDIR)$(sysconfdir)/dconf/profile || : ; \
-       fi
-
-       if test '!' -d $(DESTDIR)$(sysconfdir)/dconf/db; then \
-               $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/dconf/db; \
-               chmod 0755 $(DESTDIR)$(sysconfdir)/dconf/db; \
-               chown root:root $(DESTDIR)$(sysconfdir)/dconf/db || : ; \
-       fi
-
-       if test '!' -d $(DESTDIR)$(sysconfdir)/dconf/db/gdm.d; then \
-               $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/dconf/db/gdm.d; \
-               chmod 0755 $(DESTDIR)$(sysconfdir)/dconf/db/gdm.d; \
-               chown root:root $(DESTDIR)$(sysconfdir)/dconf/db/gdm.d || : ; \
-       fi
-
-       if test '!' -d $(DESTDIR)$(sysconfdir)/dconf/db/gdm.d/locks; then \
-               $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/dconf/db/gdm.d/locks; \
-               chmod 0755 $(DESTDIR)$(sysconfdir)/dconf/db/gdm.d/locks; \
-               chown root:root $(DESTDIR)$(sysconfdir)/dconf/db/gdm.d/locks || : ; \
-       fi
-
        if test '!' -d $(DESTDIR)$(cachedir); then \
                $(mkinstalldirs) $(DESTDIR)$(cachedir); \
                chmod 1755 $(DESTDIR)$(cachedir); \
                chown root:gdm $(DESTDIR)$(cachedir) || : ; \
        fi
-
-       $(INSTALL_DATA) $(srcdir)/dconf-profile $(DESTDIR)$(sysconfdir)/dconf/profile/gdm
-       $(INSTALL_DATA) $(srcdir)/00-upstream-settings $(DESTDIR)$(sysconfdir)/dconf/db/gdm.d
-       $(INSTALL_DATA) $(srcdir)/00-upstream-settings-locks $(DESTDIR)$(sysconfdir)/dconf/db/gdm.d/locks
-       test -z "$(DESTDIR)" && dconf update || :
-
diff --git a/data/dconf/.gitignore b/data/dconf/.gitignore
new file mode 100644
index 0000000..f0047b3
--- /dev/null
+++ b/data/dconf/.gitignore
@@ -0,0 +1 @@
+/gdm
diff --git a/data/00-upstream-settings b/data/dconf/defaults/00-upstream-settings
similarity index 100%
rename from data/00-upstream-settings
rename to data/dconf/defaults/00-upstream-settings
diff --git a/data/00-upstream-settings-locks b/data/dconf/defaults/locks/00-upstream-settings-locks
similarity index 100%
rename from data/00-upstream-settings-locks
rename to data/dconf/defaults/locks/00-upstream-settings-locks
diff --git a/data/dconf/gdm.in b/data/dconf/gdm.in
new file mode 100644
index 0000000..4d8bf17
--- /dev/null
+++ b/data/dconf/gdm.in
@@ -0,0 +1,2 @@
+user-db:user
+file-db:@DATADIR@/@PACKAGE@/greeter-dconf-defaults


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]