From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id mCFYNCDM52IVcAAAbAwnHQ (envelope-from ) for ; Mon, 01 Aug 2022 14:50:40 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id gDZqNCDM52JMPwAAauVa8A (envelope-from ) for ; Mon, 01 Aug 2022 14:50:40 +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 6F2AA1D6A3 for ; Mon, 1 Aug 2022 14:50:40 +0200 (CEST) Received: from localhost ([::1]:40150 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIUsZ-0008Rg-AL for larch@yhetil.org; Mon, 01 Aug 2022 08:50:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51104) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIUs9-0008R7-Jo for guix-patches@gnu.org; Mon, 01 Aug 2022 08:50:13 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49880) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oIUry-0003Ic-6A for guix-patches@gnu.org; Mon, 01 Aug 2022 08:50:13 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oIUry-0002M9-2e for guix-patches@gnu.org; Mon, 01 Aug 2022 08:50:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56758] [PATCH 0/2] Don't try to mkdir XDG_RUNTIME_DIR Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 01 Aug 2022 12:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56758 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 56758@debbugs.gnu.org Received: via spool by 56758-submit@debbugs.gnu.org id=B56758.16593581699004 (code B ref 56758); Mon, 01 Aug 2022 12:50:02 +0000 Received: (at 56758) by debbugs.gnu.org; 1 Aug 2022 12:49:29 +0000 Received: from localhost ([127.0.0.1]:39629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIUrQ-0002L9-Sj for submit@debbugs.gnu.org; Mon, 01 Aug 2022 08:49:29 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:57273) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIUrO-0002Ks-Ux for 56758@debbugs.gnu.org; Mon, 01 Aug 2022 08:49:28 -0400 Received: (Authenticated sender: andrew@trop.in) by mail.gandi.net (Postfix) with ESMTPSA id EF300240007; Mon, 1 Aug 2022 12:49:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1659358160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pe3ieMg/YpyPO4iywWH4NEqaGZjv6SPKpZZNp0cvYqk=; b=Fv21bZ6TbGEBzQX9FwFes0uQ1pe4OKuB2QEsAHeOmeIYsb4Mk5IAfm0ECvK2P0jsYSs2ar iRfHK14d78qxAQrT071SQXLgMe8JpVvd3A2wVzURCumKczPYWiu9b2G07zhVj19sIOsPnX /lcPEjiyg6c2A7wGpcaobNRN9VTfFVxjgTFjzt8r2kGwkYfJu0YFBdR98LeH2zC4q9VtCH 8E724ID9aorOorcJddDwZY4qSjis5HfWcHgHzVz3/WJP11FjIt8x5LgYl4aKC6EcXBcBHR wu8QuQJWoznqlzrceSjpPzJM6LIDXtMoYxPuQSdaK7qAm6fNUJGpjPg/8t5EXA== From: Andrew Tropin In-Reply-To: <87r120z36g.fsf@gnu.org> References: <87wnc1zfrh.fsf@trop.in> <87r120z36g.fsf@gnu.org> Date: Mon, 01 Aug 2022 15:49:14 +0300 Message-ID: <87r120b039.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1659358240; 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: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=pe3ieMg/YpyPO4iywWH4NEqaGZjv6SPKpZZNp0cvYqk=; b=dzbNlqsBiVrnxnPLxSwkkjeKiQuu7FrSV2ADKtBCp6Jawsjb0xv9prsUHtoIlt7mCuioP9 w5eCMyOCRuugrmV/sQHVOXAJ9eL79x7pOkKhnhAoVPVsC7Aad8kX+Z4bJWqnQW3DRxgP/1 suBU+Zg8rlhfRReGa171yJ+vgm47tsX+T+Rd6+SNrmUcGV2CUy8xt0VHKR/lZa2kxoVt2y OccpCAMpeAb6zv7dCBdy/coLyG7qAeuON7hgzWgA7hWEJPDkw4uCID+pDnhbrGoyxZ2SWP SMd2iTKoD88v+0IaJiApEGxY8UqN3glvqmCmHkZ+YGI8Wg98v7gMENgY14FNWQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1659358240; a=rsa-sha256; cv=none; b=lryipC8npC0aIexIgORxfzQ4R+Yf6nGrif5HsvPuLruOrW2LziCuuT8dA/TZcNxplFywe/ GK7I/iUwHbjCWSiTHESd2mApTj/5rqDICZ2aJrXCHg7KtdwU4RVtmsiIqiNUNBVd+B6suv yXBj34D6og4skqsyBUSAcFK7ZortIYqlu9lr8PSeSqObfRQD1NqvnxYNh0NRc6gqY6/IBA YfAMOCPZ9musnmgJjSifXEnFzNZccn6d8hXczV7LYQuumUnJznyHsrG2ju8YNzNZG1yXGD puTiXalBFW/irt1g9WR7xvtiA82uFe/GtoyjtYjKal3j6DqnUuw/r1OVqwQETQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop.in header.s=gm1 header.b=Fv21bZ6T; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 0.08 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop.in header.s=gm1 header.b=Fv21bZ6T; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 6F2AA1D6A3 X-Spam-Score: 0.08 X-Migadu-Scanner: scn0.migadu.com X-TUID: GINbUvYkVdpH --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2022-08-01 12:08, Ludovic Court=C3=A8s wrote: > Hi, > > Andrew Tropin skribis: > >> From d08ed8de3ead1a704a96e0e6673dffb62f859597 Mon Sep 17 00:00:00 2001 >> From: Andrew Tropin >> Date: Thu, 21 Jul 2022 15:24:32 +0300 >> Subject: [PATCH 1/2] home: xdg: Use closures in activation scripts. >> >> * gnu/home/services/xdg.scm (ensure-xdg-base-dirs-on-activation, >> home-xdg-user-directories-files-service): Use closures in activation scr= ipts. > > [...] > >> (define (ensure-xdg-base-dirs-on-activation config) >> - #~(map (lambda (xdg-base-dir-variable) >> - ((@@ (guix build utils) mkdir-p) >> - (getenv >> - xdg-base-dir-variable))) >> - '#$(map (lambda (field) >> - (format >> - #f "XDG_~a" >> - (object->snake-case-string >> - (configuration-field-name field) 'upper))) >> - home-xdg-base-directories-configuration-fields))) >> + (with-imported-modules '((guix build utils)) >> + #~(map (lambda (xdg-base-dir-variable) >> + ((@ (guix build utils) mkdir-p) > > This change doesn=E2=80=99t hurt but it=E2=80=99s apparently unnecessary. At least it removes the usage of @@ :) > >> + (with-imported-modules `((guix build utils) >> + ,@(source-module-closure >> + '((ice-9 string-fun)))) > > However this one is incorrect as it would lead (ice-9 string-fun) from > the host Guile to be imported into the build environment, thereby making > the result dependent on the version of Guile that is used =E2=80=9Coutsid= e=E2=80=9D (you > may have seen a warning like =E2=80=9Cimporting (ice-9 string-fun) from t= he > host=E2=80=9D.) Why so? I expected modules closure to be compiled on build side and provided to activation script via preset load-path. BTW, I don't see this warning. > >> From da332f8272ea3c240fc4e3664051da3b3a4e18c6 Mon Sep 17 00:00:00 2001 >> From: Andrew Tropin >> Date: Thu, 21 Jul 2022 17:06:24 +0300 >> Subject: [PATCH 2/2] home: xdg: Skip mkdir XDG_RUNTIME_DIR in activation >> script. >> >> * gnu/home/services/xdg.scm (ensure-xdg-base-dirs-on-activation): Skip m= kdir >> XDG_RUNTIME_DIR in activation script. >> --- >> gnu/home/services/xdg.scm | 19 ++++++++++++------- >> 1 file changed, 12 insertions(+), 7 deletions(-) >> >> diff --git a/gnu/home/services/xdg.scm b/gnu/home/services/xdg.scm >> index 5a41dc4994..541f64a379 100644 >> --- a/gnu/home/services/xdg.scm >> +++ b/gnu/home/services/xdg.scm >> @@ -109,13 +109,18 @@ (define (ensure-xdg-base-dirs-on-activation config) >> (with-imported-modules '((guix build utils)) >> #~(map (lambda (xdg-base-dir-variable) >> ((@ (guix build utils) mkdir-p) >> - (getenv >> - xdg-base-dir-variable))) >> - '#$(map (lambda (field) >> - (format >> - #f "XDG_~a" >> - (object->snake-case-string >> - (configuration-field-name field) 'upper))) >> + (getenv xdg-base-dir-variable))) >> + '#$(filter-map >> + (lambda (field) >> + (let ((env-var-name >> + (format >> + #f "XDG_~a" >> + (object->snake-case-string >> + (configuration-field-name field) 'upper)))) >> + ;; XDG_RUNTIME_DIR shouldn't be created during activ= ation >> + ;; and will be provided by elogind or other service. >> + (and (not (string=3D? "XDG_RUNTIME_DIR" env-var-name= )) >> + env-var-name))) >> home-xdg-base-directories-configuration-fields)))) >>=20=20 >> (define (last-extension-or-cfg config extensions) > > I tweaked that accordingly (patch attached), but that leads to a test > failure in =E2=80=98tests/guix-home.sh=E2=80=99 because there=E2=80=99s a= warning about > XDG_RUNTIME_DIR not existing that goes to standard output of =E2=80=98gui= x home > container=E2=80=99: > > --8<---------------cut here---------------start------------->8--- > + guix home container home.scm -- false > XDG_RUNTIME_DIR doesn't exists, on-first-login script > won't execute anything. You can check if xdg runtime directory exists, > XDG_RUNTIME_DIR variable is set to appropriate value and manually execute= the > script by running '$HOME/.guix-home/on-first-login'++ guix home container= home.scm -- echo '$HOME' > guix home: warning: only 4.1 GiB of free space available on /gnu/store > hint: Consider deleting old profile generations and collecting garbage, a= long > these lines: > > guix gc --delete-generations=3D1m > > + test 'XDG_RUNTIME_DIR doesn'\''t exists, on-first-login script > won'\''t execute anything. You can check if xdg runtime directory exists, > XDG_RUNTIME_DIR variable is set to appropriate value and manually execute= the > script by running '\''$HOME/.guix-home/on-first-login'\''/home/ludo' =3D = /home/ludo > --8<---------------cut here---------------end--------------->8--- > > Thoughts? Hm, I tried with both your and my patches, but I don't get a test fail. =2D-8<---------------cut here---------------start------------->8--- make check TESTS=3D"tests/guix-home.sh" make check-recursive make[1]: Entering directory '/home/bob/work/gnu/guix' Making check in po/guix make[2]: Entering directory '/home/bob/work/gnu/guix/po/guix' make[2]: Nothing to be done for 'check'. make[2]: Leaving directory '/home/bob/work/gnu/guix/po/guix' Making check in po/packages make[2]: Entering directory '/home/bob/work/gnu/guix/po/packages' make[2]: Nothing to be done for 'check'. make[2]: Leaving directory '/home/bob/work/gnu/guix/po/packages' make[2]: Entering directory '/home/bob/work/gnu/guix' Compiling Scheme modules... Compiling Scheme modules... Compiling Scheme modules... Compiling Scheme modules... make check-TESTS check-local make[3]: Entering directory '/home/bob/work/gnu/guix' make[4]: Entering directory '/home/bob/work/gnu/guix' PASS: tests/guix-home.sh =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D Testsuite summary for GNU Guix 1.3.0.22216-446db =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D # TOTAL: 1 # PASS: 1 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D make[4]: Leaving directory '/home/bob/work/gnu/guix' make[3]: Nothing to be done for 'check-local'. make[3]: Leaving directory '/home/bob/work/gnu/guix' make[2]: Leaving directory '/home/bob/work/gnu/guix' make[1]: Leaving directory '/home/bob/work/gnu/guix' Compilation finished at Mon Aug 1 15:42:20 =2D-8<---------------cut here---------------end--------------->8--- The same with guix home container. =2D-8<---------------cut here---------------start------------->8--- guix home container ~/tmp/he.scm -- false WARNING: (guile-user): imported module (guix build utils) overrides core bi= nding `delete' Symlinking /home/bob/.profile -> /gnu/store/dann7r1095xll0kji5yl0ql07096rc8= j-shell-profile... done Symlinking /home/bob/.bash_profile -> /gnu/store/q0i9j1fbxwdr7sqin1hi16zhir= 8b4qwd-bash_profile... done Symlinking /home/bob/.bashrc -> /gnu/store/0hblljbzbbrbawhcv2hlz14narb78s2m= -bashrc... done Symlinking /home/bob/.config/fontconfig/fonts.conf -> /gnu/store/4261pxafny= 0g2myhh9yj1771ry7k05lc-fonts.conf... done done Finished updating symlinks. Comparing /gnu/store/non-existing-generation/profile/share/fonts and /gnu/store/f2bc4zy8hqv3in72yg4kxdxppigfafn1-home/profile/share/fo= nts... done (same) Evaluating on-change gexps. On-change gexps evaluation finished. =2D-8<---------------cut here---------------end--------------->8--- =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmLny8oACgkQIgjSCVjB 3rAE3Q//UHkSaxiihGmGzQ9tAv96S8jgf5Cf8KnsNQIKCwoGjYxGJrj3tIEbUNus 60j2aH5E4qgH4+HUeltl+EgLP5vQFttfQvoNGhish1W+aDL+wqJYoMaofmsrUNT/ Vtql8TSl8JTKGunuDLs1ioFfOxfBs2YYlyhsSH8cHsCAhAU9OtRGPNu73+hZQJYs +irMd6VnmsEPi+96xgPrXJvSc3biBlCIIxjizqNVCFA8hOKVkeFLAtDzTT0eM/12 NsVxHS4EZydGdqzhZmqGLqY2LEzDYdblL0v49iImeSO0ToLoBpgtoCJ6QjS5z863 TBIzC4UYHiFyXM6k2ByGYVs80PXLcWw0L2X8zA0wmhwHXKbmLwIVznNZzJh1WF4D 3+GZTOJ/xPQYLDNW+qqOdRPTXaKErjJ4RWr7zIhxzfsgIzylx0NUkW7PyceIvVnQ gXq//RNu30UdwlRg0WiBhdlhK4/g+IbpDwt3tm04E5ZxFwry2EiJ5XmhYyw7k42U NzdseQM6W97rhykp0NBKnSuivPAXUHbNSMX2j5KOvqFifJju0rQHTIPiiUY1c5fC h+pvlYgYnrZ4GN91OWCG9LtiErSvSDYPR12rqMMji8epvO93TwMCKSR9+AVVYjAF pksBMnKel6HOCRX+QBB1ylxBZ9kRYtLWp6SW97HFWHhRk4K6+bc= =qgHH -----END PGP SIGNATURE----- --=-=-=--