unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: L  p R n  d n    <guix@lprndn.info>
To: 41207@debbugs.gnu.org
Subject: bug#41207: accountsservice daemon lacks dbus interfaces
Date: Tue, 12 May 2020 14:04:20 +0200	[thread overview]
Message-ID: <87y2pxwe9n.fsf@lprndn.info> (raw)

[-- Attachment #1: Type: text/plain, Size: 889 bytes --]

Hello,

The accountsservice service hasn't access to dbus' interfaces throwing
an error when they're needed.The problem, at least, appears with LightDM.
The error looks like:

WARNING: Error updating user /org/freedesktop/Accounts/User1000:
GDBus.Error:org.freedesktop.DBus.Error.InvalidArgs: No such interface
"org.freedesktop.DisplayManager.AccountsService"

For information, it already occured[0] and was resolved[1][2] in NixOS.

After testing, simply wrapping the accountsservice package with relevant
XDG_DATA_DIRS directories as done in the attached patch resolves the
issue. However, there might be a proper solution I'm not aware of.
Also the patch used in [2] doesn't seem to be needed in Guix.

Have a nice day,

L  p R n  d n

[0]: https://github.com/NixOS/nixpkgs/issues/45059
[1]: https://github.com/NixOS/nixpkgs/pull/45107
[2]: https://github.com/NixOS/nixpkgs/pull/72400


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-accountsservice-Wrap-program.patch --]
[-- Type: text/x-patch, Size: 2860 bytes --]

From b9c379d068266c9fdc506f60ff05de3b39346999 Mon Sep 17 00:00:00 2001
From: L  p R n  d n <guix@lprndn.info>
Date: Tue, 12 May 2020 13:28:47 +0200
Subject: [PATCH] gnu: accountsservice: Wrap program.

* gnu/packages/freedesktop.scm (accountsservice): Add a wrap-program phase
setting XDG_DATA_DIRS to provide dbus interfaces.
---
 gnu/packages/freedesktop.scm | 32 +++++++++++++++++++-------------
 1 file changed, 19 insertions(+), 13 deletions(-)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index b59d09d15f..01969e03a1 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -1020,19 +1020,25 @@ message bus.")
                (("/bin/cat") (which "cat")))
              #t))
          (add-before
-          'configure 'pre-configure
-          (lambda* (#:key inputs #:allow-other-keys)
-            ;; Don't try to create /var/lib/AccountsService.
-            (substitute* "src/Makefile.in"
-              (("\\$\\(MKDIR_P\\).*/lib/AccountsService.*") "true"))
-            (let ((shadow (assoc-ref inputs "shadow")))
-              (substitute* '("src/user.c" "src/daemon.c")
-                (("/usr/sbin/usermod") (string-append shadow "/sbin/usermod"))
-                (("/usr/sbin/useradd") (string-append shadow "/sbin/useradd"))
-                (("/usr/sbin/userdel") (string-append shadow "/sbin/userdel"))
-                (("/usr/bin/passwd")   (string-append shadow "/bin/passwd"))
-                (("/usr/bin/chage")    (string-append shadow "/bin/chage"))))
-            #t)))))
+             'configure 'pre-configure
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; Don't try to create /var/lib/AccountsService.
+             (substitute* "src/Makefile.in"
+               (("\\$\\(MKDIR_P\\).*/lib/AccountsService.*") "true"))
+             (let ((shadow (assoc-ref inputs "shadow")))
+               (substitute* '("src/user.c" "src/daemon.c")
+                 (("/usr/sbin/usermod") (string-append shadow "/sbin/usermod"))
+                 (("/usr/sbin/useradd") (string-append shadow "/sbin/useradd"))
+                 (("/usr/sbin/userdel") (string-append shadow "/sbin/userdel"))
+                 (("/usr/bin/passwd")   (string-append shadow "/bin/passwd"))
+                 (("/usr/bin/chage")    (string-append shadow "/bin/chage"))))
+             #t))
+         (add-after 'install 'wrap-program
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (wrap-program (string-append out "/libexec/accounts-daemon")
+                 `("XDG_DATA_DIRS" ":" prefix ("/run/current-system/profile/share")))
+               #t))))))
     (native-inputs
      `(("glib:bin" ,glib "bin") ; for gdbus-codegen, etc.
        ("gobject-introspection" ,gobject-introspection)
-- 
2.26.1


             reply	other threads:[~2020-05-12 12:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-12 12:04 L p R n d n [this message]
2020-05-31 22:01 ` bug#41207: accountsservice daemon lacks dbus interfaces Ludovic Courtès
2020-06-02 14:46   ` L p R n d n
2020-06-03  9:39     ` Ludovic Courtès
2020-06-03 12:37       ` L p R n d n
2020-06-11 10:27         ` Ludovic Courtès
2023-07-30 13:21           ` Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y2pxwe9n.fsf@lprndn.info \
    --to=guix@lprndn.info \
    --cc=41207@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).