GNU bug report logs - #67819
[PATCH] services: xorg: dbus-daemon-wrapper handle guix home directory.

Previous Next

Package: guix-patches;

Reported by: Feng Shu <tumashu <at> 163.com>

Date: Thu, 14 Dec 2023 03:11:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 67819 in the body.
You can then email your comments to 67819 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#67819; Package guix-patches. (Thu, 14 Dec 2023 03:11:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Feng Shu <tumashu <at> 163.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 14 Dec 2023 03:11:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Feng Shu <tumashu <at> 163.com>
To: "guix-patches" <guix-patches <at> gnu.org>
Subject: [PATCH] services: xorg: dbus-daemon-wrapper handle guix home
 directory.
Date: Thu, 14 Dec 2023 11:02:51 +0800
From 1b8047ebb18d52923950f988adf612b251b39107 Mon Sep 17 00:00:00 2001

* gnu/services/xorg.scm (dbus-daemon-wrapper): Handle guix home directory.
---
 gnu/services/xorg.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 9235295dd6..56d3c737d9 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -987,6 +987,11 @@ (define user-profile
                 (lambda (pw)
                   (string-append (passwd:dir pw) "/.guix-profile"))))
 
+       (define guix-home-profile
+         (and=> (getpw (getuid))
+                (lambda (pw)
+                  (string-append (passwd:dir pw) "/.guix-home/profile"))))
+
        ;; If we are able to find the user's profile, we can add it to
        ;; the search paths set below.  We need to do this so that D-Bus
        ;; can start services installed by the user.  This allows
@@ -995,7 +1000,9 @@ (define user-profile
        ;; in the user's profile.  See <https://bugs.gnu.org/35267>.
        (define profiles
          (if user-profile
-             (list user-profile system-profile)
+             (if guix-home-profile
+                 (list user-profile guix-home-profile system-profile)
+                 (list user-profile system-profile))
              (list system-profile)))
 
        (setenv "XDG_CONFIG_DIRS"
-- 
2.39.2




-- 





Information forwarded to guix-patches <at> gnu.org:
bug#67819; Package guix-patches. (Fri, 15 Dec 2023 00:36:01 GMT) Full text and rfc822 format available.

Message #8 received at 67819 <at> debbugs.gnu.org (full text, mbox):

From: Feng Shu <tumashu <at> 163.com>
To: 67819 <at> debbugs.gnu.org
Subject: [PATCH v2] services: xorg: dbus-daemon-wrapper handle guix home
Date: Fri, 15 Dec 2023 08:35:38 +0800
[v2-0001-services-xorg-dbus-daemon-wrapper-handle-guix-hom.patch (text/x-patch, inline)]
From e4a5ee8fd8a71782fdc15a8177cd1474e3135d99 Mon Sep 17 00:00:00 2001
From: Feng Shu <tumashu <at> 163.com>
Date: Thu, 14 Dec 2023 11:02:51 +0800
Subject: [PATCH v2] services: xorg: dbus-daemon-wrapper handle guix home
 directory.

* gnu/services/xorg.scm (dbus-daemon-wrapper): Handle guix home directory.
---
 gnu/services/xorg.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 9235295dd6..56d3c737d9 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -987,6 +987,11 @@ (define user-profile
                 (lambda (pw)
                   (string-append (passwd:dir pw) "/.guix-profile"))))
 
+       (define guix-home-profile
+         (and=> (getpw (getuid))
+                (lambda (pw)
+                  (string-append (passwd:dir pw) "/.guix-home/profile"))))
+
        ;; If we are able to find the user's profile, we can add it to
        ;; the search paths set below.  We need to do this so that D-Bus
        ;; can start services installed by the user.  This allows
@@ -995,7 +1000,9 @@ (define user-profile
        ;; in the user's profile.  See <https://bugs.gnu.org/35267>.
        (define profiles
          (if user-profile
-             (list user-profile system-profile)
+             (if guix-home-profile
+                 (list user-profile guix-home-profile system-profile)
+                 (list user-profile system-profile))
              (list system-profile)))
 
        (setenv "XDG_CONFIG_DIRS"
-- 
2.39.2





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Fri, 05 Jan 2024 16:21:02 GMT) Full text and rfc822 format available.

Notification sent to Feng Shu <tumashu <at> 163.com>:
bug acknowledged by developer. (Fri, 05 Jan 2024 16:21:02 GMT) Full text and rfc822 format available.

Message #13 received at 67819-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Feng Shu <tumashu <at> 163.com>
Cc: 67819-done <at> debbugs.gnu.org
Subject: Re: [bug#67819] [PATCH v2] services: xorg: dbus-daemon-wrapper
 handle guix home
Date: Fri, 05 Jan 2024 17:19:33 +0100
Hi,

Feng Shu <tumashu <at> 163.com> skribis:

>>From e4a5ee8fd8a71782fdc15a8177cd1474e3135d99 Mon Sep 17 00:00:00 2001
> From: Feng Shu <tumashu <at> 163.com>
> Date: Thu, 14 Dec 2023 11:02:51 +0800
> Subject: [PATCH v2] services: xorg: dbus-daemon-wrapper handle guix home
>  directory.
>
> * gnu/services/xorg.scm (dbus-daemon-wrapper): Handle guix home directory.

Good idea.

>         (define profiles
>           (if user-profile
> -             (list user-profile system-profile)
> +             (if guix-home-profile
> +                 (list user-profile guix-home-profile system-profile)
> +                 (list user-profile system-profile))
>               (list system-profile)))

I tweaked for clarity:

       (define profiles
         (append (if home-profile
                     (list home-profile)
                     '())
                 (if user-profile
                     (list user-profile)
                     '())
                 (list system-profile)))

Applied, thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 03 Feb 2024 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 221 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.