From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Feb 10 05:30:01 2014 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9BB8C431 for ; Mon, 10 Feb 2014 05:30:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 72E3D1458 for ; Mon, 10 Feb 2014 05:30:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id s1A5U1Ir056478 for ; Mon, 10 Feb 2014 05:30:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s1A5U16d056477; Mon, 10 Feb 2014 05:30:01 GMT (envelope-from gnats) Resent-Date: Mon, 10 Feb 2014 05:30:01 GMT Resent-Message-Id: <201402100530.s1A5U16d056477@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Henry Hu Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B6E4932A for ; Mon, 10 Feb 2014 05:20:31 +0000 (UTC) Received: from newred.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 95C2C131F for ; Mon, 10 Feb 2014 05:20:31 +0000 (UTC) Received: from cgiserv.freebsd.org ([127.0.1.6]) by newred.freebsd.org (8.14.7/8.14.7) with ESMTP id s1A5KVYN090609 for ; Mon, 10 Feb 2014 05:20:31 GMT (envelope-from nobody@cgiserv.freebsd.org) Received: (from nobody@localhost) by cgiserv.freebsd.org (8.14.7/8.14.7/Submit) id s1A5KVMU090608; Mon, 10 Feb 2014 05:20:31 GMT (envelope-from nobody) Message-Id: <201402100520.s1A5KVMU090608@cgiserv.freebsd.org> Date: Mon, 10 Feb 2014 05:20:31 GMT From: Henry Hu To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/186616: [patch] devel/dconf: load profile and db from correct dir X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2014 05:30:01 -0000 >Number: 186616 >Category: ports >Synopsis: [patch] devel/dconf: load profile and db from correct dir >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Feb 10 05:30:01 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Henry Hu >Release: FreeBSD 11-CURRENT >Organization: Columbia University >Environment: FreeBSD pepsi 11.0-CURRENT FreeBSD 11.0-CURRENT #4 r260031M: Mon Jan 20 19:26:20 EST 2014 root@pepsi:/usr/obj/usr/src/sys/MYKERNEL amd64 >Description: 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. >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. >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: diff -urN /usr/ports/devel/dconf/files/patch-engine-prefix ./files/patch-engine-prefix --- /usr/ports/devel/dconf/files/patch-engine-prefix 1969-12-31 19:00:00.000000000 -0500 +++ ./files/patch-engine-prefix 2014-02-10 00:07:27.000000000 -0500 @@ -0,0 +1,33 @@ +diff -uNr engine.orig/dconf-engine-profile.c engine/dconf-engine-profile.c +--- engine.orig/dconf-engine-profile.c 2014-02-10 00:04:59.000000000 -0500 ++++ engine/dconf-engine-profile.c 2014-02-10 00:05:39.000000000 -0500 +@@ -188,7 +188,7 @@ + + if (profile == NULL) + { +- file = fopen ("/etc/dconf/profile/user", "r"); ++ file = fopen ("/usr/local/etc/dconf/profile/user", "r"); + + /* Only in the case that no profile was specified do we use this + * fallback. +@@ -198,7 +198,7 @@ + } + else if (profile[0] != '/') + { +- gchar *filename = g_build_filename ("/etc/dconf/profile", profile, NULL); ++ gchar *filename = g_build_filename ("/usr/local/etc/dconf/profile", profile, NULL); + file = fopen (filename, "r"); + g_free (filename); + } +diff -uNr engine.orig/dconf-engine-source-system.c engine/dconf-engine-source-system.c +--- engine.orig/dconf-engine-source-system.c 2014-02-10 00:04:59.000000000 -0500 ++++ engine/dconf-engine-source-system.c 2014-02-10 00:05:14.000000000 -0500 +@@ -48,7 +48,7 @@ + GvdbTable *table; + gchar *filename; + +- filename = g_build_filename ("/etc/dconf/db", source->name, NULL); ++ filename = g_build_filename ("/usr/local/etc/dconf/db", source->name, NULL); + table = gvdb_table_new (filename, FALSE, &error); + + if (table == NULL) >Release-Note: >Audit-Trail: >Unformatted: