From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id iGs9JDjfHWUqEAAAG6o9tA:P1 (envelope-from ) for ; Wed, 04 Oct 2023 23:55:04 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id iGs9JDjfHWUqEAAAG6o9tA (envelope-from ) for ; Wed, 04 Oct 2023 23:55:04 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 63875412B9 for ; Wed, 4 Oct 2023 23:55:04 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=planete-kraus.eu header.s=albinoniB header.b="M G4EmJK"; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1696456504; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=KRXixbRMWRDDmC7f2cZ9wbay0WM719KPXQdPjMl1kJM=; b=FH7eEaJ92UILQdWK+LDJsr5+8wVJucl/JAXM8BDRhPs197pux7jb8uoMAo/Nk6NXkiFDcR D9qbMGYi/yGg7xfK1wnAOoLsdsiSKunCKT7FeV8x7tOoY5hsQ9HNHWOqDW223RwAiY76W9 /WJAJ85WgmedQJtUBkzuMAvffQCLp3+KhC0zQtI6WnwLKheTGZqSW0/KLLq65SA9JIFdVN dQLoRJOPssEKfd2WLkzY+gr01I6X0IMEhmuYekwLfvIwHiaFHSVjpxLEkV2SPs+J+xQifF nZRZzpEn5FyVS6WgE5myD1Ba/UnBMhqSUDbcd47Tva7JqK22VF/yRwjeTLewhw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=planete-kraus.eu header.s=albinoniB header.b="M G4EmJK"; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1696456504; a=rsa-sha256; cv=none; b=qay9i0S2fzAWcSGxPH1TsD5xj5pgi7vjYfweaKe7bR7Wg16oXNM7OkuJVI0vjJpDMMyL1v aaIv6FlHJGl6w0k1x0SlbFFCmyEZJrHLVbin+lcqYooQSwC7026LTG1iffbZGFbyEM/EFN 7vrUqIKWYP1nRFpccQ3CFqGlPehDOOgpouFr07XnOR7a6o4dy4wXKdne82BjcCvNOQCexa XhZtYqoFrJK03PfvjyAxcjk3K6BpZk2gJVOtSHxUGFb/Mwjv3i67Pt415PFVJ9LzE65Nxf MFXQs9KO84SCe7uxXJyk3y1+YaX4Y0j6VBdn/YFcxjKnSWj6V58GZXCUfVje7A== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qo9pO-00020T-6Z; Wed, 04 Oct 2023 17:54:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qo9pM-0001zI-Ar for bug-guix@gnu.org; Wed, 04 Oct 2023 17:54:44 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qo9pL-0001rV-R4 for bug-guix@gnu.org; Wed, 04 Oct 2023 17:54:43 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qo9pd-0005Vr-LG for bug-guix@gnu.org; Wed, 04 Oct 2023 17:55:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#66339: [PATCH gnome-team v2] gnu: dbus-service: make the session available under /run/dbus Resent-From: Vivien Kraus Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 04 Oct 2023 21:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66339 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Liliana Marie Prikler , 66339@debbugs.gnu.org Cc: rg@raghavgururajan.name, maxim.cournoyer@gmail.com Received: via spool by 66339-submit@debbugs.gnu.org id=B66339.169645648421157 (code B ref 66339); Wed, 04 Oct 2023 21:55:01 +0000 Received: (at 66339) by debbugs.gnu.org; 4 Oct 2023 21:54:44 +0000 Received: from localhost ([127.0.0.1]:45517 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qo9pL-0005VA-LU for submit@debbugs.gnu.org; Wed, 04 Oct 2023 17:54:44 -0400 Received: from planete-kraus.eu ([89.234.140.182]:46124) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qo9pI-0005V1-Qd for 66339@debbugs.gnu.org; Wed, 04 Oct 2023 17:54:41 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id 9da6d370; Wed, 4 Oct 2023 21:54:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=planete-kraus.eu; h= message-id:in-reply-to:references:from:date:subject:to:cc :mime-version; s=albinoniB; bh=Wsg8QleBxi3m+T4suhjBorKOHzM=; b=M G4EmJKFERBsPE3UpGZashmruIQEqWcMYhRwC5i0UluSJswUeYW9kO3N+bClTQsNO zNNoVmdMxP/GWgJIKJbMwAoYb/B1Byk6fDSBboUWBOjQ80zFF4//RCQQUSnf+FJk stmUJZgRxvEWL04AgvLRm3YdRb3/Y06Sl+o8KMJBA9bzuKB8/WW/fHz/bI+6+C2g teKThRLnUBkk2hObmdJ1z//VQHdUwbybLJfL1dV6vqlfdCpT4PWaJzS51HMuN5bk eNUwalHxnUdFF9FQjHAFkIqaam5uKZdnqF6PXwZPpI7BUyuJHrsWAVsM8llh9hbn QD/KHLmNuMCzylhdIzKuw== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 9a82b992 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Wed, 4 Oct 2023 21:54:21 +0000 (UTC) Message-ID: <751681ee8d9123e869111a11ce1446d9156117da.1696456123.git.vivien@planete-kraus.eu> In-Reply-To: <479a5d9dda7ac8bb26589f755e4caf3a820325a6.camel@gmail.com> References: <479a5d9dda7ac8bb26589f755e4caf3a820325a6.camel@gmail.com> Date: Wed, 4 Oct 2023 12:47:04 +0200 MIME-Version: 1.0 User-Agent: Evolution 3.46.4 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Vivien Kraus From: Vivien Kraus via Bug reports for GNU Guix Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -1.69 X-Migadu-Scanner: mx2.migadu.com X-Migadu-Queue-Id: 63875412B9 X-Spam-Score: -1.69 X-TUID: 4ETlO5fIRG/J According to https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3101, glib now searches for the session bus socket in runstatedir. The dbus service must thus have its socket in /run/dbus. For interoperability with the dbus standard, /run/dbus is also symlinked to /var/run/dbus. * gnu/services/dbus.scm (dbus-activation): Symlink /run/dbus to /var/run/dbus. (%dbus-accounts): Run dbus in /run/dbus. (dbus-root-service-type): Save the pid file in /run/dbus. --- Le mercredi 04 octobre 2023 à 20:30 +0200, Liliana Marie Prikler a écrit : > Am Mittwoch, dem 04.10.2023 um 12:47 +0200 schrieb Vivien Kraus: > > * gnu/services/dbus.scm (dbus-activation): Symlink /var/run/dbus to > > /run/dbus. > > --- > > gnu/services/dbus.scm | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/gnu/services/dbus.scm b/gnu/services/dbus.scm > > index 5a0c634393..80968ac1a4 100644 > > --- a/gnu/services/dbus.scm > > +++ b/gnu/services/dbus.scm > > @@ -187,6 +187,7 @@ (define (dbus-activation config) > > ;; This directory contains the daemon's socket so it > > must > > be > > ;; world-readable. > > (mkdir-p/perms "/var/run/dbus" user #o755)) > > + (symlink "/var/run/dbus" "/run/dbus") > From [1]: > > As documented in the NEWS file in > > https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/209, it’s > > only valid to use /run – rather than /var/run – for D-Bus if the > > two > > paths are interoperable. i.e. /var/run should be a symlink to /run, > > and the D-Bus daemon should be configured to put its socket there. > > Thus, the order of the two ought to be reversed. Alternatively, we > could add '-Druntime_dir=/var/run' to glib. WDYT? > > [1]: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3101 Thank you for finding this information. I think we should follow glib, and have the socket in /run/dbus, with the symlink for standard interoperability. I’m still concerned about doing a symlink in the activation function. What if we activate a new system from an existing one? Won’t the symlink fail? I think we should preemptively delete /var/run/dbus and make a new symlink every time. But I could be wrong, maybe this is not needed. What do you think? Best regards, Vivien gnu/services/dbus.scm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gnu/services/dbus.scm b/gnu/services/dbus.scm index 5a0c634393..53efa7adea 100644 --- a/gnu/services/dbus.scm +++ b/gnu/services/dbus.scm @@ -163,7 +163,7 @@ (define %dbus-accounts (group "messagebus") (system? #t) (comment "D-Bus system bus user") - (home-directory "/var/run/dbus") + (home-directory "/run/dbus") (shell (file-append shadow "/sbin/nologin"))))) (define dbus-setuid-programs @@ -186,7 +186,11 @@ (define (dbus-activation config) (let ((user (getpwnam "messagebus"))) ;; This directory contains the daemon's socket so it must be ;; world-readable. - (mkdir-p/perms "/var/run/dbus" user #o755)) + (mkdir-p/perms "/run/dbus" user #o755)) + + (when (file-exists? "/var/run/dbus") + (delete-file "/var/run/dbus")) + (symlink "/run/dbus" "/var/run/dbus") (unless (file-exists? "/etc/machine-id") (format #t "creating /etc/machine-id...~%") @@ -210,7 +214,7 @@ (define dbus-shepherd-service '(#:environment-variables '("DBUS_VERBOSE=1") #:log-file "/var/log/dbus-daemon.log") '()) - #:pid-file "/var/run/dbus/pid")) + #:pid-file "/run/dbus/pid")) (stop #~(make-kill-destructor))))))) (define dbus-root-service-type base-commit: b18b2d13488f2a92331ccad2dc8cbb54ee15582f -- 2.41.0