pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: dconf/dbus: Unable to load /var/lib/dbus/machine-id



On Sat, Mar 27, 2021 at 03:30:17PM +0100, Dan Cîrnaț wrote:
> I don't have a definitive solution for this, but I've encountered
> similar things while working on the GNOME port.
> 
> On 27.03.21 11:37, Thomas Klausner wrote:
> > Hi!
> > 
> > gnucash on pkgsrc-current/NetBSD-current is complaining:
> > 
> > dconf-WARNING **: 11:33:46.619: failed to commit changes to dconf: Cannot spawn a message bus without a machine-id: Unable to load /var/lib/dbus/machine-id or /etc/machine-id: Failed to open file "/var/lib/dbus/machine-id": No such file or directory
> > 
> 
> These paths are hardcoded in glib, or a build-time configuration in the
> latest version. [0]
> On my machine the id file is at `/var/db/dbus/machine-id`.
> 
> > I have the latest dbus rc.d script installed and dbus=YES in my
> > /etc/mk.conf.
> > 
> > Does anyone know which package we have to fix for that and how?
> > Or if we can ignore this warning?Patching `devel/glib2` with the correct path could work. I don't use
> GnuCash so can't tell if the warning can be ignored.
> 
> [0] https://gitlab.gnome.org/GNOME/glib/-/commit/05ff2f877ca301096106991c4f455519b5695cad

Even with that patch, they look in ${VARBASE}/lib/dbus

Thanks to your hints I found the patches for dbus that change this, patch-ak and patch-al

--- dbus/Makefile.in.orig       2017-11-13 13:36:10.000000000 +0000
+++ dbus/Makefile.in
@@ -619,7 +619,7 @@ dbusdatadir = $(datadir)/dbus-1
 AM_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS) -I$(top_builddir) \
        -I$(top_srcdir) $(DBUS_STATIC_BUILD_CPPFLAGS) \
        $(SYSTEMD_CFLAGS) $(VALGRIND_CFLAGS) -DDBUS_COMPILATION \
-       -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/lib/dbus/machine-id"\" \
+       -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/db/dbus/machine-id"\" \
        -DDBUS_SYSTEM_CONFIG_FILE=\""$(dbusdatadir)/system.conf"\" \
        -DDBUS_SESSION_CONFIG_FILE=\""$(dbusdatadir)/session.conf"\" \
        -DDBUS_RUNSTATEDIR=\""$(runstatedir)"\" $(NULL) \

--- tools/Makefile.in.orig      2017-11-13 13:36:10.000000000 +0000
+++ tools/Makefile.in
@@ -515,7 +515,7 @@ AM_CPPFLAGS = \
        $(DBUS_STATIC_BUILD_CPPFLAGS) \
        $(DBUS_X_CFLAGS) \
        -DDBUS_COMPILATION \
-       -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/lib/dbus/machine-id"\" \
+       -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/db/dbus/machine-id"\" \
        $(NULL)
 
 AM_CFLAGS = \
@@ -1092,9 +1092,9 @@ uninstall-am: uninstall-binPROGRAMS unin
 @DBUS_WIN_TRUE%disable-uac.rc@localhost: Win32.Manifest
 @DBUS_WIN_TRUE@        echo '1 24 "$<"' > $@
 
-# create the /var/lib/dbus directory for dbus-uuidgen
+# create the /var/db/dbus directory for dbus-uuidgen
 install-data-local:
-       $(MKDIR_P) $(DESTDIR)$(localstatedir)/lib/dbus
+       $(MKDIR_P) $(DESTDIR)$(localstatedir)/db/dbus
 
 installcheck-local:
        test -d $(DESTDIR)$(localstatedir)/lib/dbus


I think these patches were added out of some understanding of path
"correctness", but it hurts us more than it helps, so I plan on
removing them after the branch.

Cheers,
 Thomas


Home | Main Index | Thread Index | Old Index