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 739299 - --sysconfdir is not honoured
--sysconfdir is not honoured
Status: RESOLVED FIXED
Product: dconf
Classification: Core
Component: general
git master
Other All
: Normal normal
: ---
Assigned To: dconf-maint
dconf-maint
Depends on:
Blocks:
 
 
Reported: 2014-10-28 13:42 UTC by Patrick Welche
Modified: 2018-08-16 17:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Replace all hard-coded /etc path with $(sysconfdir) (9.31 KB, patch)
2015-02-21 12:16 UTC, Ting-Wei Lan
none Details | Review
Replace all hard-coded /etc path with $(sysconfdir) (9.32 KB, patch)
2016-07-16 15:31 UTC, Ting-Wei Lan
none Details | Review
Replace all hard-coded /etc path with sysconfdir (8.72 KB, patch)
2017-12-22 13:47 UTC, Ting-Wei Lan
none Details | Review
Replace all hard-coded /etc path with sysconfdir (8.74 KB, patch)
2018-08-14 16:52 UTC, Ting-Wei Lan
none Details | Review
Replace all hard-coded /etc path with sysconfdir (10.23 KB, patch)
2018-08-16 15:19 UTC, Ting-Wei Lan
committed Details | Review

Description Patrick Welche 2014-10-28 13:42:17 UTC
I was surprised to discover that ./configure --sysconfdir=/some/other/dir has no effect - the problem was actually finding where I hid dconf/db. Before launching into an autotools patch, I see that the long comment at the beginning of dconf-engine-profile.c needs consideration.

https://git.gnome.org/browse/dconf/tree/engine/dconf-engine-profile.c

The search order for the profile seems to be:
1) "as defined by API" (not sure how, but nevermind)
2) DCONF_PROFILE environment variable
3) /etc/dconf/profile
4) directories listed in XDG_DATA_DIRS with dconf/profile appended

I would suggest that between 2) and 3) ought to be $sysconfdir/dconf/profile

My actual problem was rather with /etc/dconf/db than profiles, and /etc/dconf/db seems to be hard coded. I would suggest the same as the amended search above, possibly with a DCONF_DB variable.

Thoughts?
Comment 1 Ting-Wei Lan 2015-02-21 12:16:48 UTC
Created attachment 297489 [details] [review]
Replace all hard-coded /etc path with $(sysconfdir)
Comment 2 Ting-Wei Lan 2016-07-16 15:31:04 UTC
Created attachment 331631 [details] [review]
Replace all hard-coded /etc path with $(sysconfdir)

This is useful in JHBuild environments and systems that don't want to use
/etc/dconf.

Updated patch that can be applied on the current master branch.
Comment 3 Ting-Wei Lan 2017-12-22 13:47:19 UTC
Created attachment 365879 [details] [review]
Replace all hard-coded /etc path with sysconfdir

This is useful for JHBuild environments and systems that don't want
to use /etc/dconf.
Comment 4 Ting-Wei Lan 2018-01-18 06:48:18 UTC
Since all patches I uploaded here are never reviewed, I wonder what is the plan of dconf developers for this issue. Will all generated files be moved to /var instead of /etc?
Comment 5 Ting-Wei Lan 2018-04-22 07:27:21 UTC
Hello, will the patch get reviewed, or is there an alternative solution being worked on? We have kept sed patch in FreeBSD ports for a long time and it is also needed in JHBuild environment.
Comment 6 Ting-Wei Lan 2018-08-14 16:52:43 UTC
Created attachment 373336 [details] [review]
Replace all hard-coded /etc path with sysconfdir

This is useful for JHBuild environments and systems that don't want
to use /etc/dconf.
Comment 7 Ting-Wei Lan 2018-08-16 15:19:20 UTC
Created attachment 373360 [details] [review]
Replace all hard-coded /etc path with sysconfdir

This is useful for JHBuild environments and systems that don't want
to use /etc/dconf.

Fix test failure and open a merge request on GitLab:
https://gitlab.gnome.org/GNOME/dconf/merge_requests/21
Comment 8 Ting-Wei Lan 2018-08-16 17:56:33 UTC
Attachment 373360 [details] pushed as 46574fc - Replace all hard-coded /etc path with sysconfdir

The patch has been reviewed and accepted on GitLab.