From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 25 05:46:41 2022 Received: (at submit) by debbugs.gnu.org; 25 Jul 2022 09:46:41 +0000 Received: from localhost ([127.0.0.1]:49290 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oFufg-0004z7-G7 for submit@debbugs.gnu.org; Mon, 25 Jul 2022 05:46:40 -0400 Received: from lists.gnu.org ([209.51.188.17]:47386) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oFufe-0004yz-P8 for submit@debbugs.gnu.org; Mon, 25 Jul 2022 05:46:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46072) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFufe-0003Js-Ft for guix-patches@gnu.org; Mon, 25 Jul 2022 05:46:38 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:41319) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFufa-0005o4-Kr for guix-patches@gnu.org; Mon, 25 Jul 2022 05:46:37 -0400 Received: (Authenticated sender: andrew@trop.in) by mail.gandi.net (Postfix) with ESMTPSA id 49ABB24000B for ; Mon, 25 Jul 2022 09:46:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1658742390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=nmKVQe2/RYUl9zZkz2ZghI3w0uMMed4qVNjT9n61JNg=; b=b8BkpYn4xZENLbQaibJ7UeE2tgSLcasF0wpPb8c5EzXvckj9uzfqbyfNOcVYrxUaUXg6in HMkD2yNrocUSj9+AmJt+jaHWg9biCInuO/h0LiGkddx2gScaSOZjjRIayjyLJa9GhKiRcc hZaPllozWgNw6csGTlkJKpGA0HoOl5PV+jajHPW6nQrAe5B5HNpedtsGQ+hhDOhTTMsa5d azy3Qhm253wekosqscOZUYYN4sV0CcxSp+4/ADFePKlMVxpMWHFkdUDh2GGu3zk6ans1KT lnNCTvEb2p/EBTcbmXk0IwWwVY+ZSl5Evn3Vo6FMszvmrPP1Vj32kHGfdPXxbQ== From: Andrew Tropin To: guix-patches@gnu.org Subject: [PATCH 0/2] Don't try to mkdir XDG_RUNTIME_DIR Date: Mon, 25 Jul 2022 12:43:47 +0300 Message-ID: <87wnc1zfrh.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=217.70.178.230; envelope-from=andrew@trop.in; helo=relay10.mail.gandi.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Andrew Tropin (2): home: xdg: Use closures in activation scripts. home: xdg: Skip mkdir XDG_RUNTIME_DIR in activation script. gnu/home/services/xdg.scm | 46 ++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 18 deletions(-) =2D-=20 2.37.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-home-xdg-Use-closures-in-activation-scripts.patch Content-Transfer-Encoding: quoted-printable From=20d08ed8de3ead1a704a96e0e6673dffb62f859597 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 script= s. =2D-- gnu/home/services/xdg.scm | 41 ++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/gnu/home/services/xdg.scm b/gnu/home/services/xdg.scm index 71c028c788..5a41dc4994 100644 =2D-- a/gnu/home/services/xdg.scm +++ b/gnu/home/services/xdg.scm @@ -23,6 +23,7 @@ (define-module (gnu home services xdg) #:use-module (gnu packages freedesktop) #:use-module (gnu home services utils) #:use-module (guix gexp) + #:use-module (guix modules) #:use-module (guix records) #:use-module (guix i18n) #:use-module (guix diagnostics) @@ -105,16 +106,17 @@ (define (home-xdg-base-directories-environment-variab= les-service config) home-xdg-base-directories-configuration-fields)) =20 (define (ensure-xdg-base-dirs-on-activation config) =2D #~(map (lambda (xdg-base-dir-variable) =2D ((@@ (guix build utils) mkdir-p) =2D (getenv =2D xdg-base-dir-variable))) =2D '#$(map (lambda (field) =2D (format =2D #f "XDG_~a" =2D (object->snake-case-string =2D (configuration-field-name field) 'upper))) =2D home-xdg-base-directories-configuration-fields))) + (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))) + home-xdg-base-directories-configuration-fields)))) =20 (define (last-extension-or-cfg config extensions) "Picks configuration value from last provided extension. If there @@ -205,14 +207,17 @@ (define (home-xdg-user-directories-activation-service= config) (let ((dirs (map (lambda (field) ((configuration-field-getter field) config)) home-xdg-user-directories-configuration-fields))) =2D #~(let ((ensure-dir =2D (lambda (path) =2D (mkdir-p =2D ((@@ (ice-9 string-fun) string-replace-substring) =2D path "$HOME" (getenv "HOME")))))) =2D (display "Creating XDG user directories...") =2D (map ensure-dir '#$dirs) =2D (display " done\n")))) + (with-imported-modules `((guix build utils) + ,@(source-module-closure + '((ice-9 string-fun)))) + #~(let ((ensure-dir + (lambda (path) + ((@ (guix build utils) mkdir-p) + ((@ (ice-9 string-fun) string-replace-substring) + path "$HOME" (getenv "HOME")))))) + (display "Creating XDG user directories...") + (map ensure-dir '#$dirs) + (display " done\n"))))) =20 (define home-xdg-user-directories-service-type (service-type (name 'home-xdg-user-directories) =2D-=20 2.37.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0002-home-xdg-Skip-mkdir-XDG_RUNTIME_DIR-in-activation-sc.patch Content-Transfer-Encoding: quoted-printable From=20da332f8272ea3c240fc4e3664051da3b3a4e18c6 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 mkdir XDG_RUNTIME_DIR in activation script. =2D-- 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 =2D-- 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) =2D (getenv =2D xdg-base-dir-variable))) =2D '#$(map (lambda (field) =2D (format =2D #f "XDG_~a" =2D (object->snake-case-string =2D (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 activati= on + ;; 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 (define (last-extension-or-cfg config extensions) =2D-=20 2.37.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmLeZnIACgkQIgjSCVjB 3rDgOA//YAHIzdu//xKHVLh/qsavFcj1Zl/mI8KJAr4o4+oCrWR4UwVC9pf5Zx5Z eUcU36I0qs7MwuVa3LlrrCWtuDxi3twpLs1V94FyloP0X8p5og1loX91BF4iM9Wh 3xwgrMWzsHWZ3crl1VlkhsoastPXGZss85ZJQJzZgc+YuG+s+n6M/M/bL+Qq5ZXM mAUMB7w6PKcp0x1K8dOHfjDVqLcA/Z67qgdZBD2CXh9icZ2n1RcV+0WpOSPAN6Wn krJfsOOvlr0Kgw5jmA6Hu4ljLoLxmLNnhDgr0yA5hnDW1i3U5wx0oa/rT4I8mWAj jQd7J1XRo5WpZg+nI7S4+bsCL2from3AButKTF/UI79fu5b7Ru1Fr8Mt19Mr9Dgj M5L3QatXMNZI9e1uTXxGeZPqaHh0VYk9BWFolA+lRCgoRGV7VzOfotpg2YioBs7R 96F0srzreWWWnOeHwTTb8L8L2S/3BANhm+9cWKzTxcx99KHOAIlYiacvdIEjKqDE y0l1kLo5mSD88jWTFH+w7Auy8kQk8ZbuNzHhe9gTkfhKVwyiUAuG3/yDAo0b2T9M VCCF6n8vLD2CjEc4OOt1AUUgHbDuSeNSJbNaUEy3D4iqsZiIPu0YnER6c9lHFEiP Q8qHJjkTBxTSxpXIq+nHh9pj6B+Yf1SWg91cNhKst42pb26x/M8= =tjzv -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 01 06:08:54 2022 Received: (at 56758) by debbugs.gnu.org; 1 Aug 2022 10:08:54 +0000 Received: from localhost ([127.0.0.1]:39377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oISM2-0003mx-0b for submit@debbugs.gnu.org; Mon, 01 Aug 2022 06:08:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35406) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oISLx-0003mT-Dc for 56758@debbugs.gnu.org; Mon, 01 Aug 2022 06:08:52 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46208) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oISLr-0000lr-3A; Mon, 01 Aug 2022 06:08:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=kG/7fHYFS55sqAGcqUIEammUMi94hbPZxLdE1Xa3w4w=; b=PVL76ZTwuhwT6yGwdE3g msG+wSmQ3hkuA16VyipC2dV4qUKNKTAr6db2MK4rZCoD5uHEMxZycMok3PQLkSzYejpWV1VNViaRz o5rtQs9qu9Lp++ZdXUD0yCKk1KJq/ss5+jDligPIojIeVe35tv13KVTSe+XnB63l1B08DF10GSTY8 AmWn52Ka8yU9su9sZfTFEfkfxQTb2Z1QslLzUEfGsExDMFLQG0PxGucMjmT/xkOd9oAs5vGhlyBJZ 6eQscuzvzObX2W2dPKxNJCPykMVli1NnByeh+t5SEqhI0aJBMU5mTGkvtQeCNuu4/tUQdusqiH+rw fxp1jYLoh3SZag==; Received: from [193.50.110.235] (port=41056 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oISLp-0006eQ-HZ; Mon, 01 Aug 2022 06:08:41 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Andrew Tropin Subject: Re: bug#56758: [PATCH 0/2] Don't try to mkdir XDG_RUNTIME_DIR References: <87wnc1zfrh.fsf@trop.in> Date: Mon, 01 Aug 2022 12:08:39 +0200 In-Reply-To: <87wnc1zfrh.fsf@trop.in> (Andrew Tropin's message of "Mon, 25 Jul 2022 12:43:47 +0300") Message-ID: <87r120z36g.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56758 Cc: 56758@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 scri= pts. [...] > (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. > + (with-imported-modules `((guix build utils) > + ,@(source-module-closure > + '((ice-9 string-fun)))) However this one is incorrect is 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=9Coutside= =E2=80=9D (you may have seen a warning like =E2=80=9Cimporting (ice-9 string-fun) from the host=E2=80=9D.) > 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 mk= dir > 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 activa= tion > + ;; 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 w= arning about XDG_RUNTIME_DIR not existing that goes to standard output of =E2=80=98guix = 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 t= he script by running '$HOME/.guix-home/on-first-login'++ guix home container h= ome.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, alo= ng 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 t= he script by running '\''$HOME/.guix-home/on-first-login'\''/home/ludo' =3D /h= ome/ludo --8<---------------cut here---------------end--------------->8--- Thoughts? Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-home-xdg-Skip-mkdir-XDG_RUNTIME_DIR-in-activation-sc.patch Content-Transfer-Encoding: quoted-printable Content-Description: the modified patch >From f6ff733aaaea7e5b8277b65430e7dc090dffa9aa Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Thu, 21 Jul 2022 17:06:24 +0300 Subject: [PATCH] home: xdg: Skip mkdir XDG_RUNTIME_DIR in activation script. MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit * gnu/home/services/xdg.scm (ensure-xdg-base-dirs-on-activation): Skip mkdir XDG_RUNTIME_DIR in activation script. Co-authored-by: Ludovic Court=C3=A8s --- gnu/home/services/xdg.scm | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/gnu/home/services/xdg.scm b/gnu/home/services/xdg.scm index 71c028c788..0219bc93e0 100644 --- a/gnu/home/services/xdg.scm +++ b/gnu/home/services/xdg.scm @@ -109,12 +109,18 @@ (define (ensure-xdg-base-dirs-on-activation config) ((@@ (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))) + '#$(filter-map + (lambda (field) + (let ((variable + (string-append + "XDG_" + (object->snake-case-string + (configuration-field-name field) 'upper)))) + ;; XDG_RUNTIME_DIR shouldn't be created during activation + ;; and will be provided by elogind or other service. + (and (not (string=3D? "XDG_RUNTIME_DIR" variable)) + variable))) + home-xdg-base-directories-configuration-fields))) =20 (define (last-extension-or-cfg config extensions) "Picks configuration value from last provided extension. If there --=20 2.37.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 01 08:49:29 2022 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 To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#56758: [PATCH 0/2] Don't try to mkdir XDG_RUNTIME_DIR 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-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 56758 Cc: 56758@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= 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----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 01 10:10:13 2022 Received: (at 56758) by debbugs.gnu.org; 1 Aug 2022 14:10:13 +0000 Received: from localhost ([127.0.0.1]:41338 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIW7Y-0007Ed-9V for submit@debbugs.gnu.org; Mon, 01 Aug 2022 10:10:13 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:42673) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIW7V-0007EJ-UP for 56758@debbugs.gnu.org; Mon, 01 Aug 2022 10:10:10 -0400 Received: (Authenticated sender: andrew@trop.in) by mail.gandi.net (Postfix) with ESMTPSA id EB8A3C0016; Mon, 1 Aug 2022 14:10:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1659363004; 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=MaKWsg/IkCLa6gHPLIoycpn5h4NFnP6v5TntcXNq08w=; b=lq1P7sxn5JvfCuQFdIxXlLShNNSyQKy7/c/9PdnYmlpFeu09Z5gJn1yrJUYFRZzFRV1fQi K5PhmljZMTmVN8lkLqGO0Cgw97arL3cwlcBrlLhPHyhI+Bm1SVywp/5EdArmqmvce263Dq C5aqfKjT04SD1M2Mauq/I/WwQgt9TpAcT9cq7V3Ojly7tpbXdzZyYZOpQN5zGfkwn6qg/X 2DACVrR2eUPqbYsViV13UFcaTzgFgz5wZVp5DSiqnMgOJMjFXLNwuW3NBFB1kmT8ue+ALD C7/RCtOc2QeyrwQPlprTxERboH/MGw9xcVl8Q3hoZuzuo7iTJRd1sqPZ0oXlBA== From: Andrew Tropin To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#56758: [PATCH 0/2] Don't try to mkdir XDG_RUNTIME_DIR In-Reply-To: <87r120b039.fsf@trop.in> References: <87wnc1zfrh.fsf@trop.in> <87r120z36g.fsf@gnu.org> <87r120b039.fsf@trop.in> Date: Mon, 01 Aug 2022 17:09:59 +0300 Message-ID: <87o7x4awco.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 56758 Cc: 56758@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2022-08-01 15:49, Andrew Tropin wrote: > 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 sc= ripts. >> >> [...] >> >>> (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=9Coutsi= de=E2=80=9D (you >> may have seen a warning like =E2=80=9Cimporting (ice-9 string-fun) from = the >> 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 = mkdir >>> 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 confi= g) >>> (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 acti= vation >>> + ;; and will be provided by elogind or other service. >>> + (and (not (string=3D? "XDG_RUNTIME_DIR" env-var-nam= e)) >>> + 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=98gu= ix 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 execut= e the >> script by running '$HOME/.guix-home/on-first-login'++ guix home containe= r 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, = along >> 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 exist= s, >> XDG_RUNTIME_DIR variable is set to appropriate value and manually execut= e 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. > > --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 > --8<---------------cut here---------------end--------------->8--- > > > The same with guix home container. > > --8<---------------cut here---------------start------------->8--- > guix home container ~/tmp/he.scm -- false > WARNING: (guile-user): imported module (guix build utils) overrides core = binding `delete' > Symlinking /home/bob/.profile -> /gnu/store/dann7r1095xll0kji5yl0ql07096r= c8j-shell-profile... done > Symlinking /home/bob/.bash_profile -> /gnu/store/q0i9j1fbxwdr7sqin1hi16zh= ir8b4qwd-bash_profile... done > Symlinking /home/bob/.bashrc -> /gnu/store/0hblljbzbbrbawhcv2hlz14narb78s= 2m-bashrc... done > Symlinking /home/bob/.config/fontconfig/fonts.conf -> /gnu/store/4261pxaf= ny0g2myhh9yj1771ry7k05lc-fonts.conf... done > done > Finished updating symlinks. > > Comparing /gnu/store/non-existing-generation/profile/share/fonts and > /gnu/store/f2bc4zy8hqv3in72yg4kxdxppigfafn1-home/profile/share/= fonts... done (same) > Evaluating on-change gexps. > > On-change gexps evaluation finished. > --8<---------------cut here---------------end--------------->8--- Ok, I found the problem. guix container uses hosts $SHELL variable, which in my case is zsh and this makes the shell inside container not to source ~/.profile, so on-first-login isn't executed. I was able to reproduce test fail and message inside container. My thoughts: 1. home container in tests must always use bash. 2. Error message should be printed to stderr. 3. Right now I experiment with elogind-less system, trying out seatd and greetd, and try to figure out when and how process (especially shepherd) should be started and killed. I'll share my findings on this later, but it's very likely that we will get rid of on-first-login at all (or at least won't source it automatically by login shell in all or some the cases). Do you want me to prepare patch for #2? =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmLn3rcACgkQIgjSCVjB 3rBH4A//YpW40v0B7AGpnlc4Btqy9Ud/ZDDg/mTmRd+j2zCKAHzB7p2P5tEFtf67 kcrg8kDJ2E+XW0DJ8ruIULymuM0Q5igltyTjUfCs52SajYyNVv72LnIkAQB5iWhJ 1rWI8F3eIPMklfewWJ89QDwywXO/runUcEzJxboR9uySmspZCakdAACqJVQwMx+i KPzTcYKXclp4n6FnRifPZSHO//tOi14w+amYHIL52NJ5uNpEbmuyTPQarCueCnpX fcxAGRSoeSkVBSatsYcnFtpUaF02wSRs9gjMbuJrQ6ovYJ88rQObCvJtiVamitLu 5uVJiPAOT+9hPRg8JQI4QYO8DpozRFs0dtxcPtzSiNf/JqmiTq8Yk6C1tP3yhNRP SkMX3ThWxdvTR0cESbGiLrQaa3OvAYWQN0NoeqthqwpJuF9ikawMMK3z8zPJKYje eLabrvFbGqtplSsQR3PYGknyB6Nbql7pAgCFs+TpQ6kbMaU4uZla7uoL/mDiIGGY EY981owxArCTLRDaJ6Bf20Rc92B4CIqAs6v+n5Ih10AYM4PM8eQ3TjVoV8E3edv4 OSHN897Eu6f6xhMXNBl7mToLwFU4ezyx1rspD8dR+6SNke3kKs6GeujWVfnnXye7 fOVQVoHWc9rBs+kJ5qEzppdpV9nnAGkBalISK7MJ9BvvqqtDYoY= =eCwA -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 01 18:12:26 2022 Received: (at 56758) by debbugs.gnu.org; 1 Aug 2022 22:12:26 +0000 Received: from localhost ([127.0.0.1]:41810 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIdeE-0008A1-0w for submit@debbugs.gnu.org; Mon, 01 Aug 2022 18:12:26 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:58504) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIdeB-00089s-Qa for 56758@debbugs.gnu.org; Mon, 01 Aug 2022 18:12:24 -0400 Received: from [IPV6:2a02:1811:8c09:9d00:5dba:d409:33f7:a16] ([IPv6:2a02:1811:8c09:9d00:5dba:d409:33f7:a16]) by laurent.telenet-ops.be with bizsmtp id 2NCK2800520ykKC01NCKjB; Tue, 02 Aug 2022 00:12:20 +0200 Message-ID: Date: Tue, 2 Aug 2022 00:12:19 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Content-Language: en-US To: Andrew Tropin , =?UTF-8?Q?Ludovic_Court=c3=a8s?= References: <87wnc1zfrh.fsf@trop.in> <87r120z36g.fsf@gnu.org> <87r120b039.fsf@trop.in> From: Maxime Devos Subject: Re: [bug#56758] [PATCH 0/2] Don't try to mkdir XDG_RUNTIME_DIR In-Reply-To: <87r120b039.fsf@trop.in> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------MW1qcecrB6MpJLCy1WTbR6vI" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1659391940; bh=J42jNznca8UdDSUJ+HZhQLyTLi66q+kbbBbL2NuKd4k=; h=Date:To:Cc:References:From:Subject:In-Reply-To; b=HqJMO0EMbTWvkRY92cCVFh4ZBAgQ9gTrAlEaOJKIR3Y1ZW8M4TTHcCm/orH+zrjdM ht4Z7YUUI4ohn5MU7YGlZuePqDuOk1ZW8/B57BD4C11GJkI9ozL/cMDMojBxudwygr KpaKuPXM6lLcrXfQdrQyfGPxZpMqljgQLOgTqr2qKJ0GsSQ4Oi4TuN4x9eja2Toh79 1qpr0omegbYJDRrqP95huaagYJtgfF3qingY0RqkyN0IXrfn0tNKbQStg7q7OUtZpY LAaaIR6wq+rtlJgFu3QvrffhL/F/aZK0CAtsIU5I/sNVFv6V9yoDulwB79dtryxv4W DbiNFaoJWhc9w== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 56758 Cc: 56758@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------MW1qcecrB6MpJLCy1WTbR6vI Content-Type: multipart/mixed; boundary="------------Gq0X5N49R50YHQtWKF0c080Q"; protected-headers="v1" From: Maxime Devos To: Andrew Tropin , =?UTF-8?Q?Ludovic_Court=c3=a8s?= Cc: 56758@debbugs.gnu.org Message-ID: Subject: Re: [bug#56758] [PATCH 0/2] Don't try to mkdir XDG_RUNTIME_DIR References: <87wnc1zfrh.fsf@trop.in> <87r120z36g.fsf@gnu.org> <87r120b039.fsf@trop.in> In-Reply-To: <87r120b039.fsf@trop.in> --------------Gq0X5N49R50YHQtWKF0c080Q Content-Type: multipart/mixed; boundary="------------ElZxUksNYV0S8chXSrj1mIv2" --------------ElZxUksNYV0S8chXSrj1mIv2 Content-Type: multipart/alternative; boundary="------------t9eV0HMzkyX6gVWUL2fqzH9A" --------------t9eV0HMzkyX6gVWUL2fqzH9A Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 T24gMDEtMDgtMjAyMiAxNDo0OSwgQW5kcmV3IFRyb3BpbiB3cm90ZToNCg0KPj4gSG93ZXZl ciB0aGlzIG9uZSBpcyBpbmNvcnJlY3QgYXMgaXQgd291bGQgbGVhZCAoaWNlLTkgc3RyaW5n LWZ1bikgZnJvbQ0KPj4gdGhlIGhvc3QgR3VpbGUgdG8gYmUgaW1wb3J0ZWQgaW50byB0aGUg YnVpbGQgZW52aXJvbm1lbnQsIHRoZXJlYnkgbWFraW5nDQo+PiB0aGUgcmVzdWx0IGRlcGVu ZGVudCBvbiB0aGUgdmVyc2lvbiBvZiBHdWlsZSB0aGF0IGlzIHVzZWQg4oCcb3V0c2lkZeKA nSAoeW91DQo+PiBtYXkgaGF2ZSBzZWVuIGEgd2FybmluZyBsaWtlIOKAnGltcG9ydGluZyAo aWNlLTkgc3RyaW5nLWZ1bikgZnJvbSB0aGUNCj4+IGhvc3TigJ0uKQ0KPiBXaHkgc28/ICBJ IGV4cGVjdGVkIG1vZHVsZXMgY2xvc3VyZSB0byBiZSBjb21waWxlZCBvbiBidWlsZCBzaWRl IGFuZA0KPiBwcm92aWRlZCB0byBhY3RpdmF0aW9uIHNjcmlwdCB2aWEgcHJlc2V0IGxvYWQt cGF0aC4NCg0KVGhpcyBpcyB0cnVlLCBhbmQgdGhpcyBjYXVzZXMgdGhlIHByb2JsZW0gdGhh dCBMdWRvJyBkZXNjcmliZXM6DQoNClR3byBwcm9ibGVtczoNCg0KKiAoaWNlLTkgc3RyaW5n LWZ1bikgaXMgcGFydCBvZiBHdWlsZSwgc28gY29tcGlsaW5nIGl0IGFnYWluIGlzIA0KcG9p bnRsZXNzIChhbmQgcG90ZW50aWFsbHkgaGFybWZ1bCwgaWYgaWNlLTkvc3RyaW5nLWZ1bi5z Y20gY29udGFpbnMgYSANCnJlZmVyZW5jZSAvZ251L3N0b3JlLy4uLi9zb21lLXRhcmdldC1z cGVjaWZpYy1saWJyYXJ5LnNvKQ0KDQoqIGEgZm9ybSBvZiBub24tZGV0ZXJtaW5pc20gYW5k IG5vbi1yZXByb2R1Y2liaWxpdHkgLS0geW91IGFyZSBjb3B5aW5nIA0KdGhlIG1vZHVsZXMg ZnJvbSB0aGUgR3VpbGUgdGhhdCAnZ3VpeCcgaXMgcnVuIHdpdGgsIGluc3RlYWQgb2YgYWx3 YXlzIA0KdXNpbmcgdGhlIG1vZHVsZXMgZnJvbSB0aGUgR3VpbGUgdGhhdCBpcyBkZWZpbmVk IGluc2lkZSBHdWl4Lg0KDQoqIGFkZGl0aW9uYWxseSwgbWF5YmUgdGhlIGluc2lkZS1HdWl4 IGFuZCB3aGF0LUd1aXgtaXMtY29tcGlsZWQtd2l0aCANCkd1aWxlIGV4cGVjdCBkaWZmZXJl bnQgYmVoYXZpb3VyIG9mIChpY2UtOSBzdHJpbmctZnVuKSwgY2F1c2luZyBidWdzDQoNCkdy ZWV0aW5ncywNCk1heGltZS4NCg0KDQo= --------------t9eV0HMzkyX6gVWUL2fqzH9A Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On 01-08-2022 14:49, Andrew Tropin wrote:

However this one is incorr=
ect 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.

This is true, and this causes the problem that Ludo' describes:

Two problems:

* (ice-9 string-fun) is part of Guile, so compiling it again is pointless (and potentially harmful, if ice-9/string-fun.scm contains a reference /gnu/store/.../some-target-specific-library.so)

* a form of non-determinism and non-reproducibility -- you are copying the modules from the Guile that 'guix' is run with, instead of always using the modules from the Guile that is defined inside Guix.

* additionally, maybe the inside-Guix and what-Guix-is-compiled-with Guile expect different behaviour of (ice-9 string-fun), causing bugs

Greetings,
Maxime.


--------------t9eV0HMzkyX6gVWUL2fqzH9A-- --------------ElZxUksNYV0S8chXSrj1mIv2 Content-Type: application/pgp-keys; name="OpenPGP_0x49E3EE22191725EE.asc" Content-Disposition: attachment; filename="OpenPGP_0x49E3EE22191725EE.asc" Content-Description: OpenPGP public key Content-Transfer-Encoding: quoted-printable -----BEGIN PGP PUBLIC KEY BLOCK----- xjMEX4ch6BYJKwYBBAHaRw8BAQdANPb/d6MrGnGi5HyvODCkBUJPRjiFQcRU5V+m xvMaAa/NL01heGltZSBEZXZvcyA8bWF4aW1lLmRldm9zQHN0dWRlbnQua3VsZXV2 ZW4uYmU+wpAEExYIADgWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCX4ch6AIbAwUL CQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRBJ4+4iGRcl7japAQC3opZ2KGWzWmRc /gIWSu0AAcfMwyinFEEPa/QhUt2CogD/e2RdF4CYAgaRHJJmZ9WU7piKbLZ7llB4 LzgezVDHggzNJU1heGltZSBEZXZvcyA8bWF4aW1lZGV2b3NAdGVsZW5ldC5iZT7C kAQTFggAOBYhBMHzPuIMUo/bfdcBH0nj7iIZFyXuBQJf56ycAhsDBQsJCAcDBRUK CQgLBRYCAwEAAh4BAheAAAoJEEnj7iIZFyXujpQBAKV1SwDDl4f24rXciDlB9L8W ycZt30CgbewMSRQk4mvbAP9dFMbVVixYBd6C8cfhR+NsOBGiOJnQABlUmgNuqGFJ Dc44BF+HIegSCisGAQQBl1UBBQEBB0BOlzIWiJzgobMF6/cqwLaLk7jIcFSZ++c0 k9cCNT6YXwMBCAfCeAQYFggAIBYhBMHzPuIMUo/bfdcBH0nj7iIZFyXuBQJfhyHo AhsMAAoJEEnj7iIZFyXuMr0BAJc8cl5PGvVmVuSQVKjleNl4DK1/XAaPAYPe34AE fZJPAP9IqLCQhH/FeJanHqBP8gNdGNI2qn8RnnLVfRJgUjZ1BA=3D=3D =3DOVqp -----END PGP PUBLIC KEY BLOCK----- --------------ElZxUksNYV0S8chXSrj1mIv2-- --------------Gq0X5N49R50YHQtWKF0c080Q-- --------------MW1qcecrB6MpJLCy1WTbR6vI Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wnsEABYIACMWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYuhPwwUDAAAAAAAKCRBJ4+4iGRcl7h9Q AP0TfD4wqnF/TBijrSKLuh7iwcutpHH1Ro+vinmQH12joQEAynL3RbG+8QaSNoPR9ULBVdy8KTg6 frd1Wb0cpfv40QE= =lzG5 -----END PGP SIGNATURE----- --------------MW1qcecrB6MpJLCy1WTbR6vI-- From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 02 02:05:22 2022 Received: (at 56758) by debbugs.gnu.org; 2 Aug 2022 06:05:22 +0000 Received: from localhost ([127.0.0.1]:42069 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIl1t-0008Cl-GL for submit@debbugs.gnu.org; Tue, 02 Aug 2022 02:05:22 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:53015) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIl1p-0008CU-2V for 56758@debbugs.gnu.org; Tue, 02 Aug 2022 02:05:20 -0400 Received: (Authenticated sender: andrew@trop.in) by mail.gandi.net (Postfix) with ESMTPSA id 04B4440002; Tue, 2 Aug 2022 06:05:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1659420311; 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; bh=rWUhI/JRigSbeUHE5Lk/EyDUZ+NEBx3Dm30QzEW/jYM=; b=WB5X46dHYN8NkYJzwAEIoFN1yTdgorCFEKMf/Ud/G/tXkgZHhA15KjZ1qv72+oeeSUc9NX Oft2vVbwg+lxrADJmxvj5vRQNLByDkIeAobfM/GnkRGBimML5DIG4AK8wsOFw9YayC2gZT pszoIb8OY4x0ak/Qw9kSFiee5k4ySn/IsGyfsKVhNMbvGs2M7w+o9iNza39/EaJgUTm6fd JLtSPgKzdRRn8Ucy9Fb6KcvIdwFrcGVJEBjV/RsUz9qZZ3fbESvwsPVLi/NNBDuPx6xerv qUw6WBllvNW+XirNGBzBfmRnKhoA1Br4vziHIeSdcXuUHh3inT1xpIzrh1z5KA== From: Andrew Tropin To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: [PATCH v2 0/4] Don't try to mkdir XDG_RUNTIME_DIR In-Reply-To: <87r120z36g.fsf@gnu.org> Date: Tue, 2 Aug 2022 09:00:17 +0300 Message-ID: <875yjbi3ji.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 56758 Cc: 56758@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Changes since v1: =2D Don't use modules closure. =2D Use string-append instead of format. =2D Use warning instead of display. =2D Hardcode SHELL=3Dbash for home tests inside container. Andrew Tropin (4): home: xdg: Use single @ intsead of @@. home: xdg: Skip mkdir XDG_RUNTIME_DIR in activation script. home: Use warning instead of display. tests: Make tests inside container reproducible. gnu/home/services.scm | 8 +++++--- gnu/home/services/xdg.scm | 25 ++++++++++++++++--------- tests/guix-home.sh | 5 ++++- 3 files changed, 25 insertions(+), 13 deletions(-) =2D-=20 2.37.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=v2-0001-home-xdg-Use-single-intsead-of.patch Content-Transfer-Encoding: quoted-printable From=20e4b582654903d2cc227f8824df7873bf75f8b100 Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Thu, 21 Jul 2022 15:24:32 +0300 Subject: [PATCH v2 1/4] home: xdg: Use single @ intsead of @@. * gnu/home/services/xdg.scm (ensure-xdg-base-dirs-on-activation, home-xdg-user-directories-files-service): Use single @ intsead of @@. =2D-- gnu/home/services/xdg.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gnu/home/services/xdg.scm b/gnu/home/services/xdg.scm index 71c028c788..04cf9d0aed 100644 =2D-- a/gnu/home/services/xdg.scm +++ b/gnu/home/services/xdg.scm @@ -23,6 +23,7 @@ (define-module (gnu home services xdg) #:use-module (gnu packages freedesktop) #:use-module (gnu home services utils) #:use-module (guix gexp) + #:use-module (guix modules) #:use-module (guix records) #:use-module (guix i18n) #:use-module (guix diagnostics) @@ -106,7 +107,7 @@ (define (home-xdg-base-directories-environment-variable= s-service config) =20 (define (ensure-xdg-base-dirs-on-activation config) #~(map (lambda (xdg-base-dir-variable) =2D ((@@ (guix build utils) mkdir-p) + ((@ (guix build utils) mkdir-p) (getenv xdg-base-dir-variable))) '#$(map (lambda (field) @@ -207,8 +208,8 @@ (define (home-xdg-user-directories-activation-service c= onfig) home-xdg-user-directories-configuration-fields))) #~(let ((ensure-dir (lambda (path) =2D (mkdir-p =2D ((@@ (ice-9 string-fun) string-replace-substring) + ((@ (guix build utils) mkdir-p) + ((@ (ice-9 string-fun) string-replace-substring) path "$HOME" (getenv "HOME")))))) (display "Creating XDG user directories...") (map ensure-dir '#$dirs) =2D-=20 2.37.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=v2-0002-home-xdg-Skip-mkdir-XDG_RUNTIME_DIR-in-activation.patch Content-Transfer-Encoding: quoted-printable From=2035125e96522c0539308f09a151ff67571a865900 Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Tue, 2 Aug 2022 08:00:21 +0300 Subject: [PATCH v2 2/4] home: xdg: Skip mkdir XDG_RUNTIME_DIR in activation script. * gnu/home/services/xdg.scm (ensure-xdg-base-dirs-on-activation): Skip mkdir XDG_RUNTIME_DIR in activation script. =2D-- gnu/home/services/xdg.scm | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/gnu/home/services/xdg.scm b/gnu/home/services/xdg.scm index 04cf9d0aed..63c6041cd4 100644 =2D-- a/gnu/home/services/xdg.scm +++ b/gnu/home/services/xdg.scm @@ -110,12 +110,18 @@ (define (ensure-xdg-base-dirs-on-activation config) ((@ (guix build utils) mkdir-p) (getenv xdg-base-dir-variable))) =2D '#$(map (lambda (field) =2D (format =2D #f "XDG_~a" =2D (object->snake-case-string =2D (configuration-field-name field) 'upper))) =2D home-xdg-base-directories-configuration-fields))) + '#$(filter-map + (lambda (field) + (let ((variable + (string-append + "XDG_" + (object->snake-case-string + (configuration-field-name field) 'upper)))) + ;; XDG_RUNTIME_DIR shouldn't be created during activation + ;; and will be provided by elogind or other service. + (and (not (string=3D? "XDG_RUNTIME_DIR" variable)) + variable))) + home-xdg-base-directories-configuration-fields))) =20 (define (last-extension-or-cfg config extensions) "Picks configuration value from last provided extension. If there =2D-=20 2.37.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=v2-0003-home-Use-warning-instead-of-display.patch Content-Transfer-Encoding: quoted-printable From=20b67b8217830ee6e1afdf7532a961835fd77a5519 Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Tue, 2 Aug 2022 08:20:38 +0300 Subject: [PATCH v2 3/4] home: Use warning instead of display. * gnu/home/services/xdg.scm (compute-on-first-login-script): Use warning instead of display. =2D-- gnu/home/services.scm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gnu/home/services.scm b/gnu/home/services.scm index 6fbc91fab2..4376422014 100644 =2D-- a/gnu/home/services.scm +++ b/gnu/home/services.scm @@ -368,9 +368,11 @@ (define %initialize-gettext (define (compute-on-first-login-script _ gexps) (program-file "on-first-login" =2D (with-imported-modules (source-module-closure '((guix i18n))) + (with-imported-modules (source-module-closure '((guix i18n) + (guix diagnostics))) #~(begin =2D (use-modules (guix i18n)) + (use-modules (guix i18n) + (guix diagnostics)) #$%initialize-gettext =20 (let* ((xdg-runtime-dir (or (getenv "XDG_RUNTIME_DIR") @@ -387,7 +389,7 @@ (define (compute-on-first-login-script _ gexps) (begin #$@gexps (touch flag-file-path))) ;; TRANSLATORS: 'on-first-login' is the name of a service and ;; shouldn't be translated =2D (display (G_ "XDG_RUNTIME_DIR doesn't exists, on-first-logi= n script + (warning (G_ "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'")))))))) =2D-=20 2.37.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=v2-0004-tests-Make-tests-inside-container-reproducible.patch Content-Transfer-Encoding: quoted-printable From=204c7084308338aa3eaedb3097b43117c421c39580 Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Tue, 2 Aug 2022 08:40:31 +0300 Subject: [PATCH v2 4/4] tests: Make tests inside container reproducible. * tests/guix-home.sh: Make tests inside container reproducible. =2D-- tests/guix-home.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/guix-home.sh b/tests/guix-home.sh index 1d1acbfd6e..d5e2dadbb5 100644 =2D-- a/tests/guix-home.sh +++ b/tests/guix-home.sh @@ -107,7 +107,10 @@ EOF =20 if container_supported then =2D # Run the home in a container. + # Run the home in a container. Always use bash inside container for + # reproducibility of the tests. + # TODO: Make container independent from external environment varia= bles. + SHELL=3Dbash guix home container home.scm -- true ! guix home container home.scm -- false test "$(guix home container home.scm -- echo '$HOME')" =3D "$HOME" =2D-=20 2.37.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmLovpEACgkQIgjSCVjB 3rB/aA//QxSig+eZBo1FoDfHDQ7JKPxLbDS+nqj50QBceJxQnXVe6orXzgJYbYNm sTRiYBhf81GmtojMcssMk0bQM8CBhRTSUmw5tWa+aX1ssVaNFdH6qltPiz3ECwjz 3aZZnRfpoSZ6KMll9W2OEF0Rm3kJdI2yFgFUih4YCfYB4H0Az+3KbXR/n3qwcrhc bDNQsGnzEr9ycURqq1rf6GlCkysFp6maLj7Jm/YTegQSLLrFtF3/skMw/ROj2gNs nVChUGQaKQG0DyH29ZeCzSflaBGQJ2vFFzRkEf/iw3Tr8+glS0BvUjfJfhcw0Dkb QsWYl6rZmtbALBtm7rJl1GHEiasOPX/RWbnglZmtafQNu+H0Odh2Tf6RdOmNU3Yl u5wct2gH0hfggfKaP+brdCuDydrstNzyAB2E0djJKHjx6Otxn/2VjzFUJU+WaJgM Mz1ZmAR9ZTJMNDu4l/goFWclKChfKy/JmNXOcUe7k3s2HfhAiuoas1hEBLMO1T5o Kn6dI8xurAlh4adlq+BxFUQREJbuUyDy+PAH7W5CGQlV8ZAs3qQTNGDd/ugmTvbA 6Qi3hUyIs/dtTGdKvwDghyaaThm4bnU6SZpuMlZMSzfNExUZPNpU9dwsGCkW7zZZ SWzqpoFCfRZq5pQsU/bfhGH9Tp8oMso9AAvyMRDgvDx1XXfy5d0= =9dQS -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 05 05:06:20 2022 Received: (at 56758-done) by debbugs.gnu.org; 5 Aug 2022 09:06:20 +0000 Received: from localhost ([127.0.0.1]:56159 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJtHg-00070i-1J for submit@debbugs.gnu.org; Fri, 05 Aug 2022 05:06:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58270) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJtHd-00070T-2Q for 56758-done@debbugs.gnu.org; Fri, 05 Aug 2022 05:06:18 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35490) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJtHW-0004Ys-FJ; Fri, 05 Aug 2022 05:06:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=y5dzm7p4s/cvYUPo4UXxG//PagEuiIdLbZZdQ5WE6K8=; b=rvZ/XiT1aT7aWQmFOnBo J9y/fvdvCcrcZXRtMFkivWIeI+qD9h8tl9rtBRSLPPp3PMc9U72qlJBBsPCIgiGtxJR7ME7VJWxZV LQrnF6yCA8V9yMWT/RD2Ad4vw4jsBDzxjIIsHgfurkn8jrR6X5ZQZxPaSuEZhiofE82ea3Z+exUP4 A/u/HyXGJJEFrUtE88Oe0pz/QbHJdl8KcsG/fUXof2EhDO/APineirmHjnPGnpk8fGsKWNC5NSJT8 TrKM3QewufcNH1Y/f42YhMJa9j7ZLOzra5WlSeZroWP3WdVx9zg8ulUiCXyFpq5rKz3aVk95GkPnt krNT7aF789ztXw==; Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=58120 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJtHV-0005u0-Vy; Fri, 05 Aug 2022 05:06:10 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Andrew Tropin Subject: Re: [PATCH v2 0/4] Don't try to mkdir XDG_RUNTIME_DIR References: <875yjbi3ji.fsf@trop.in> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Octidi 18 Thermidor an 230 de la =?utf-8?Q?R=C3=A9vo?= =?utf-8?Q?lution=2C?= jour de l'Amande X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Fri, 05 Aug 2022 11:06:07 +0200 In-Reply-To: <875yjbi3ji.fsf@trop.in> (Andrew Tropin's message of "Tue, 2 Aug 2022 09:00:17 +0300") Message-ID: <87y1w3hxfk.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56758-done Cc: 56758-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Andrew, Andrew Tropin skribis: > home: xdg: Use single @ intsead of @@. > home: xdg: Skip mkdir XDG_RUNTIME_DIR in activation script. > home: Use warning instead of display. > tests: Make tests inside container reproducible. Applied, thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 05 11:03:39 2022 Received: (at 56758-done) by debbugs.gnu.org; 5 Aug 2022 15:03:39 +0000 Received: from localhost ([127.0.0.1]:60233 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJyrT-0005AJ-Jb for submit@debbugs.gnu.org; Fri, 05 Aug 2022 11:03:39 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:57103) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJyrP-0005A3-Gv for 56758-done@debbugs.gnu.org; Fri, 05 Aug 2022 11:03:38 -0400 Received: (Authenticated sender: andrew@trop.in) by mail.gandi.net (Postfix) with ESMTPSA id 37684200016; Fri, 5 Aug 2022 15:03:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1659711809; 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=B0Yxdvja/7mPip9n+4SmRHbZSuRdsoHBy+ll9gAmuOQ=; b=CMuKfvSUSN1EfNZtW4RqKLNJYTVPNPTLHUnxzaB1iWkZ3tvVqQ8zH2DH+BRNVVI3RcBgqO t4O9fKBhbLdu2Lk2OWztRfNBiIKLXvLA+71KvUc9p3yIm2VXv7x5DT7LpaKJN0ExAMMc2H sfKqJ81gofcool/NY71eQ6yJvsvgMYr8YvAptx+4b0AzOAf1LOurF7OF4BPdgOjZOhUgdn +rvvO5YWCLSRIn3huQbo2RiVpLEYA9VCvufXLVd9CpJ6mjabOZ6b4erzbwN4CPSg9DuNLf BBMWLvcDWb+bfLcPI7yNwX75i3obOXJEIB0onPzhakPNRRhoB9FACjZAWqejCw== From: Andrew Tropin To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [PATCH v2 0/4] Don't try to mkdir XDG_RUNTIME_DIR In-Reply-To: <87y1w3hxfk.fsf@gnu.org> References: <875yjbi3ji.fsf@trop.in> <87y1w3hxfk.fsf@gnu.org> Date: Fri, 05 Aug 2022 18:03:25 +0300 Message-ID: <875yj6buma.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 56758-done Cc: 56758-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2022-08-05 11:06, Ludovic Court=C3=A8s wrote: > Hi Andrew, > > Andrew Tropin skribis: > >> home: xdg: Use single @ intsead of @@. >> home: xdg: Skip mkdir XDG_RUNTIME_DIR in activation script. >> home: Use warning instead of display. >> tests: Make tests inside container reproducible. > > Applied, thanks! > > Ludo=E2=80=99. Thank you very much!) =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmLtMT0ACgkQIgjSCVjB 3rDseBAAln4kF4eb0yWaJXtmXgYA/fUQ8CxlVgkDpVfbdJ6xmtoINrOF+Tqpzp7+ heTNtQ1MtpeagCE1X2cPpO6ebHm5JKwf9gRxAafatpbvkFZ11jU7K6vgjDVGOAxG GyW6uVQY49lbwqNPUQ7E0Q8uyxxgKT4kUGSPkoy/5cfvyGSHQdpiXqz0WT1rHub0 aArYy72/rBQdd2l3NTv1n54wtma5IDyNrnHWm3HsgW/vOn/98xZPptICiSdNEhwW J9DuX+gCkmYoS7FDn165uZ+gF1lISjZdX0bx/o24D4eSR3T2cWSOLhkGUIjC6AYG yrZB1scOsoPxo7QvCFZ4bA2nW48lkPGhKGN1iYf1/FkSadCNje+CJCK83aPUZ4zN uark4ZjhbLxtyxx8r3IlcrKWdq1cqSDGLYpxsEpclAbj4L+bibcLBuFyPdHmNFR1 8w1ayyFUCNtEH5fBofRYSEs+QmUDtvwXcIizFuOCBNQLn29Wnnko0vg4dNuDqQCc VMW0VMctVqxhUhl33TmWsgzUO0KrI45bYuBCiHgbHmk9W6KQKxRqdfAxxjppL5rz kTeU9qr3QMyiKmrio+Usjt8eKLulOxww3jVs5zjIzlOspQAJ7onxfLfHabsoQKKn 88TY1egCcMrzkmczd2NhhBGTeDVzMXOhWSMElChwS4QydbVvrVw= =un1H -----END PGP SIGNATURE----- --=-=-=-- From unknown Sun Jun 22 08:05:21 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 03 Sep 2022 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator