Bug 186616 - [patch] devel/dconf: load profile and db from correct dir
Summary: [patch] devel/dconf: load profile and db from correct dir
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-gnome (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-10 05:30 UTC by Henry Hu
Modified: 2014-03-10 19:50 UTC (History)
0 users

See Also:


Attachments
file.diff (1.58 KB, patch)
2014-02-10 05:30 UTC, Henry Hu
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Henry Hu 2014-02-10 05:30:01 UTC
devel/dconf currently loads db and profile from /etc/dconf/db and /etc/dconf profile. It should load these things from /usr/local/etc/dconf.
Because ports install profiles into /usr/local/etc/dconf/profile, and ports install db description into /usr/local/etc/dconf/db, and `dconf update` creates db in /usr/local/etc/dconf/db, these bugs prevent applications from using dconf correctly.
This is required for the upcoming ibus update.

Fix: Some paths with prefix "/etc" are hardcoded in dconf. Prepending "/usr/local" to these paths fixes the problem.
I'm not sure if "/usr/local" is appropriate, or the patch should refer to ${PREFIX}.

Patch attached with submission follows:
How-To-Repeat: 1. use some application which use custom profile and db (like experimental ibus in https://svn.redports.org/henryhu/textproc/ibus)
2. try to read/write settings and fail
For example, with ibus-daemon running, run

qdbus --address `ibus address` org.freedesktop.IBus.Config /org/freedesktop/IBus/Config org.freedesktop/IBus.Config.SetValue engine/Pinyin TestValue 1

results in

    Error: org.gtk.GDBus.UnmappedGError.Quark._dconf_20error_20quark.Code1
    The operation attempted to modify one or more non-writable keys

, and with the proposed fix, it works correctly.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-02-10 05:30:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->gnome

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2014-03-10 19:42:39 UTC
Author: kwm
Date: Mon Mar 10 19:42:32 2014
New Revision: 347804
URL: http://svnweb.freebsd.org/changeset/ports/347804
QAT: https://qat.redports.org/buildarchive/r347804/

Log:
  Fix dconf db paths. We put the dconf db in LOCALBASE.
  While here stagify.
  
  PR:		ports/186616 (based on)
  Submitted by:	Henry Hu <henry.hu.sh@gmail.com>

Modified:
  head/devel/dconf/Makefile
  head/devel/dconf/pkg-plist

Modified: head/devel/dconf/Makefile
==============================================================================
--- head/devel/dconf/Makefile	Mon Mar 10 19:36:56 2014	(r347803)
+++ head/devel/dconf/Makefile	Mon Mar 10 19:42:32 2014	(r347804)
@@ -4,7 +4,7 @@
 
 PORTNAME?=	dconf
 PORTVERSION=	0.14.1
-PORTREVISION?=	0
+PORTREVISION?=	1
 CATEGORIES=	devel gnome
 MASTER_SITES=	GNOME
 DISTNAME=	dconf-${PORTVERSION}
@@ -37,16 +37,13 @@ LIB_DEPENDS+=	libdconf.so:${PORTSDIR}/de
 CONFIGURE_ARGS+=--disable-editor
 .endif
 
-.if ${DCONF_SLAVE} == "no"
-MAN1=		dconf-editor.1 dconf-service.1 dconf.1
-MAN7=		dconf.7
-.endif
-
-NO_STAGE=	yes
 post-patch:
 	@${REINPLACE_CMD} -e 's|/etc/|${PREFIX}/etc/|g' \
 		${WRKSRC}/engine/dconf-engine.c \
-		${WRKSRC}/bin/dconf-update.c
+		${WRKSRC}/engine/dconf-engine-profile.c \
+		${WRKSRC}/engine/dconf-engine-source-system.c \
+		${WRKSRC}/bin/dconf-update.c \
+		${WRKSRC}/tests/engine.c
 	@${REINPLACE_CMD} -e 's|/usr/local/|${LOCALBASE}/|g' \
 		${WRKSRC}/editor/dconf-model.c
 	@${REINPLACE_CMD} -e 's|/usr/share|${LOCALBASE}/share|g' \
@@ -56,12 +53,7 @@ post-patch:
 		${WRKSRC}/client/Makefile.in \
 		${WRKSRC}/editor/Makefile.in
 
-#pre-build:
-#	${GMAKE} -C ${WRKSRC}/client dconf-client.c libdconf.so.0
-#	${GMAKE} -C ${WRKSRC}/dbus-1 dconf-dbus-1.c libdconf-dbus-1.so.0
-
 post-install:
-	-${LOCALBASE}/bin/gio-querymodules ${PREFIX}/lib/gio/modules
 	@${MKDIR} ${PREFIX}/etc/dconf/db
 	@${MKDIR} ${PREFIX}/etc/dconf/profile
 

Modified: head/devel/dconf/pkg-plist
==============================================================================
--- head/devel/dconf/pkg-plist	Mon Mar 10 19:36:56 2014	(r347803)
+++ head/devel/dconf/pkg-plist	Mon Mar 10 19:42:32 2014	(r347804)
@@ -5,7 +5,6 @@ include/dconf-dbus-1/dconf-dbus-1.h
 include/dconf/common/dconf-paths.h
 include/dconf/dconf.h
 lib/gio/modules/libdconfsettings.so
-lib/gio/modules/giomodule.cache
 lib/libdconf.so
 lib/libdconf.so.1
 lib/libdconf-dbus-1.so
@@ -13,6 +12,10 @@ lib/libdconf-dbus-1.so.0
 libdata/pkgconfig/dconf.pc
 libdata/pkgconfig/dconf-dbus-1.pc
 libexec/dconf-service
+man/man1/dconf-editor.1.gz
+man/man1/dconf-service.1.gz
+man/man1/dconf.1.gz
+man/man7/dconf.7.gz
 share/bash-completion/completions/dconf
 share/dbus-1/services/ca.desrt.dconf.service
 share/gtk-doc/html/dconf/dconf-DConfChangeset.html
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Koop Mast freebsd_committer freebsd_triage 2014-03-10 19:42:57 UTC
State Changed
From-To: open->closed

committed thanks!