From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 SNKXNN8+HmVjUwEA9RJhRA:P1 (envelope-from ) for ; Thu, 05 Oct 2023 06:43:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id SNKXNN8+HmVjUwEA9RJhRA (envelope-from ) for ; Thu, 05 Oct 2023 06:43:11 +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 8BA263846C for ; Thu, 5 Oct 2023 06:43:11 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=WuC9cYEa; 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=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1696480991; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: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=4yEHzEHPp33iPQIcJMyydRFXdEB36omKfth58YMxjRc=; b=FJJW3CNr63eh1eawKxqdWWd7mmMHPQFMK5cpG1Eu5nueDmHUwYR/5eOSnsq9o2JMR9RAS3 Ub321r3yUQvfD7K3pPPrCrXx2QC7ZVcrwhG5jgV94EarG9opLlZ7g/evY6nIp1s1w0/Jo4 sYeHAfWfcSMApP3CScf7N26mjD9n5V3dJ63XJ31jyXJ7r3wVmFL/zb6pcwrd/As8CBTyzu VcTb4zWNMEMJ/OYzVhfj99O/5UN/8VgDlUnBK8GtgPWmt94v3YIxRQXtLos9SI6zudXPDP qJtilBs/WiAE+uVSvDxCj8weMv0Av1/qVlfo77AbnzRdeUgnL/Z2v+5qqiH61A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=WuC9cYEa; 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=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1696480991; a=rsa-sha256; cv=none; b=Id61WbWBx89+TOmpvFTIFHvConovuXKl4tRwuF1UUcz7xQqvz5QSbUoTp+BDiwKhue+3k4 cwt4gLL5LQ1lH1gi8THFB2EvKLTK7zy+zJTQ2FsNP2LuVhKRsbxIRoFMe0baG0YTNcGPdH iQSlbxf/o1I9+7ZzcixUHWhKHnMMCczDAPoYs1nDpHasKhvQhosCZtPYBlRclWF6ideIu4 BNQ4e9jJZKOQ6eF3Ih03tAx0eCyH4bw3GJlZq6P4YcFc4U6jiygYMeMGQEu517Y5d1SDmg T9/0CILngLt4Ncn9+tsytHgkiiylRdVs4apBJPcDw2/io9Z1ZKxoKPG4POMQnQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qoGCG-00038E-Gj; Thu, 05 Oct 2023 00:42:48 -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 1qoGCC-00037m-TW for bug-guix@gnu.org; Thu, 05 Oct 2023 00:42: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 1qoGCC-00047w-EY for bug-guix@gnu.org; Thu, 05 Oct 2023 00:42:44 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qoGCU-0000Jk-Bf for bug-guix@gnu.org; Thu, 05 Oct 2023 00:43:02 -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: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 05 Oct 2023 04:43:02 +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: Vivien Kraus , 66339@debbugs.gnu.org Cc: rg@raghavgururajan.name, maxim.cournoyer@gmail.com Received: via spool by 66339-submit@debbugs.gnu.org id=B66339.16964809311145 (code B ref 66339); Thu, 05 Oct 2023 04:43:02 +0000 Received: (at 66339) by debbugs.gnu.org; 5 Oct 2023 04:42:11 +0000 Received: from localhost ([127.0.0.1]:45709 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoGBf-0000IM-2L for submit@debbugs.gnu.org; Thu, 05 Oct 2023 00:42:11 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:50647) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoGBc-0000I5-E6 for 66339@debbugs.gnu.org; Thu, 05 Oct 2023 00:42:09 -0400 Received: by mail-wr1-x442.google.com with SMTP id ffacd0b85a97d-32487efc319so578390f8f.1 for <66339@debbugs.gnu.org>; Wed, 04 Oct 2023 21:41:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696480904; x=1697085704; darn=debbugs.gnu.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=4yEHzEHPp33iPQIcJMyydRFXdEB36omKfth58YMxjRc=; b=WuC9cYEa3pDTpD4OXfVxlX+fmJEkG3jKZl181pV1JeQSKfcVsNC2GMntimht7EQjOu ROlg80oqL/w89P1zgMs41/R/aDv1rjHduRdVQ1dZS+1urjSrpzAfW7FYpFjBpnrT7NCu iQVRTHXYFrCkIBWkiATFRWdETeURyQa1J2iJ0EV0u7ZdWwAueN5ObQjRyD/wXWbYQuX1 nKsOnnJycbqSxaS5GAkm+AbR4h+bkjeMNCEzILue9+yQD+cW+/DH5t1zYXitXqIqrAKu RgkdHEr4MdzsHirwNFpJxp7rTS6oCHr68Ztctt1J4bCiCwQy/SugIVJ9iR2QnYimmP6P flwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696480904; x=1697085704; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=4yEHzEHPp33iPQIcJMyydRFXdEB36omKfth58YMxjRc=; b=S5LDZ07tZ0J+EyIok6GEBksdcoJ9o56y0sH4c5/+0nvEmRssPoAsbR4SQma++Xme9o UX6pawUoV6nF9/CGT70ePvUdCOHUsTTbv+ukoOcZmkWF3aAvuB92tuJiPtE4vBGKqzPO T/1/bqyGijX5XbNXVKaF+CwT3XfJH+my6Ihy8YuCQWcLo2QM+d7P1RFA7lIXhXv1mmPk qIDgbBvnboHIIJiRX/8M2TVC6Ca4obj4/z55JqVBCTBGGFozwngPeJZNDoM4JS7KSFOC wMiVmMo88MPkqfkG7JBJsyf8yNuJAkPcZ6AKWSnBcX13eynMO02futV94IBFZUyVWJck xE2g== X-Gm-Message-State: AOJu0YwSrosmXjOovQmJ/0bxwD/NlNi1qFr9EOynOY2Uflup+ofIzZ44 H6pc7WIXxMuUdN//sQgEW8ZRXwM+Fv1Klw== X-Google-Smtp-Source: AGHT+IGnwFL3821RZUdJlG74GolFKESP/pvqpPpPJf02WC5PVUDQhAH8skhgfpkYWj06ujRvb+HhaQ== X-Received: by 2002:a5d:504e:0:b0:320:bbb:5ab1 with SMTP id h14-20020a5d504e000000b003200bbb5ab1mr3829146wrt.14.1696480903917; Wed, 04 Oct 2023 21:41:43 -0700 (PDT) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id p16-20020a5d4e10000000b0031fa870d4b3sm727299wrt.60.2023.10.04.21.41.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 21:41:42 -0700 (PDT) Message-ID: From: Liliana Marie Prikler Date: Thu, 05 Oct 2023 06:41:41 +0200 In-Reply-To: <751681ee8d9123e869111a11ce1446d9156117da.1696456123.git.vivien@planete-kraus.eu> References: <479a5d9dda7ac8bb26589f755e4caf3a820325a6.camel@gmail.com> <751681ee8d9123e869111a11ce1446d9156117da.1696456123.git.vivien@planete-kraus.eu> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 MIME-Version: 1.0 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: , 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: -3.59 X-Migadu-Scanner: mx2.migadu.com X-Migadu-Queue-Id: 8BA263846C X-Spam-Score: -3.59 X-TUID: sUKWk4aPRdh3 Am Mittwoch, dem 04.10.2023 um 12:47 +0200 schrieb Vivien Kraus: > 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. >=20 > For interoperability with the dbus standard, /run/dbus is also > symlinked to /var/run/dbus. >=20 > * 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. > --- >=20 > Le mercredi 04 octobre 2023 =C3=A0 20:30 +0200, Liliana Marie Prikler a > =C3=A9crit : > > 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. > > > --- > > > =C2=A0gnu/services/dbus.scm | 1 + > > > =C2=A01 file changed, 1 insertion(+) > > >=20 > > > 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) > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ;; This = directory contains the daemon's socket so it > > > must > > > be > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ;; world= -readable. > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (mkdir-p= /perms "/var/run/dbus" user #o755)) > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (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=E2=80=99s only valid to use /run =E2=80=93 rather than /var/run = =E2=80=93 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. > >=20 > > Thus, the order of the two ought to be reversed.=C2=A0 Alternatively, w= e > > could add '-Druntime_dir=3D/var/run' to glib.=C2=A0 WDYT? > >=20 > > [1]: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3101 >=20 > 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. >=20 > I=E2=80=99m still concerned about doing a symlink in the activation funct= ion. > What if we activate a new system from an existing one? Won=E2=80=99t 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. >=20 > What do you think? If we go this route, I think we should first check whether /var/run/dbus is indeed a symlink to /run/dbus and move the existing files if not before deleting the directory and creating the symlink.=20 But before that, we should try to symlink, which will fail with EEXIST if the file already exists, regardless of whether it's a symlink =E2=80=93 thereafter you can check the cause of this failure through lstat. > Best regards, >=20 > Vivien >=20 > =C2=A0gnu/services/dbus.scm | 10 +++++++--- > =C2=A01 file changed, 7 insertions(+), 3 deletions(-) >=20 > 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 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (group "messagebus= ") > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (system? #t) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (comment "D-Bus sy= stem bus user") > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (home-directory "/var/r= un/dbus") > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (home-directory "/run/d= bus") > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (shell (file-appen= d shadow "/sbin/nologin"))))) > =C2=A0 > =C2=A0(define dbus-setuid-programs > @@ -186,7 +186,11 @@ (define (dbus-activation config) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (let ((user (getpwnam "m= essagebus"))) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ;; This dire= ctory contains the daemon's socket so it must > be > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ;; world-rea= dable. > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (mkdir-p/perms "/= var/run/dbus" user #o755)) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (mkdir-p/perms "/= run/dbus" user #o755)) > + > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (when (file-exists? "/var/run= /dbus") > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (delete-file "/va= r/run/dbus")) This assumes "/var/run/dbus" to be a regular file or symlink, which it's not on reconfiguration IIUC. > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (symlink "/run/dbus" "/var/ru= n/dbus") > =C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (unless (file-exists? "/= etc/machine-id") > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (format #t "= creating /etc/machine-id...~%") > @@ -210,7 +214,7 @@ (define dbus-shepherd-service > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 '(#:environment-variables > '("DBUS_VERBOSE=3D1") > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #:log-file "/var/log/dbus- > daemon.log") > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 '()) > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #:pid-file "/var/run= /dbus/pid")) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #:pid-file "/run/dbu= s/pid")) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = (stop #~(make-kill-destructor))))))) > =C2=A0 > =C2=A0(define dbus-root-service-type >=20 > base-commit: b18b2d13488f2a92331ccad2dc8cbb54ee15582f Cheers