GNU bug report logs - #56050
[PATCH] home: services: environment-variables: Fix XDG base directories.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Philip McGrath <philip@HIDDEN>; Keywords: moreinfo patch; dated Sat, 18 Jun 2022 05:26:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.
Added tag(s) moreinfo. Request was from Maxim Cournoyer <maxim.cournoyer@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 56050 <at> debbugs.gnu.org:


Received: (at 56050) by debbugs.gnu.org; 12 Jul 2022 06:45:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 12 02:45:05 2022
Received: from localhost ([127.0.0.1]:41504 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oB9do-0003hk-QJ
	for submit <at> debbugs.gnu.org; Tue, 12 Jul 2022 02:45:05 -0400
Received: from relay10.mail.gandi.net ([217.70.178.230]:42391)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andrew@HIDDEN>) id 1oB9dm-0003gr-8s
 for 56050 <at> debbugs.gnu.org; Tue, 12 Jul 2022 02:45:02 -0400
Received: (Authenticated sender: andrew@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 40096240011;
 Tue, 12 Jul 2022 06:44:54 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1;
 t=1657608296;
 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=aGHOD+r+SpBjcBq8LLLaEqiWKGsMQ2GYXfUomuiMxG8=;
 b=mU3WEEG52kgnSOAZpMQW2GBEMibgRWo3HNlBQamLH20HIAI/b+o9oTn7gPTQgzSmaAf8L7
 sTjm+c+7jRU+1dFbXe3VqEJzAB3Yws/xt4VjAydWQsp1XxW+9X3SDF+w68wDWvJ2Qcg5xy
 Sjak6WdeuPoNfmG+NxMysb031zUhm7BxAR2fSjkluoubvPmI9+Yn8v3b5iYyH9gEJ6iuYU
 NWk2aXYnSrIVOXG9xfwB/kyycD6wai9BGzVWmi3gY4D2WeJRKZehlUTghBP7/d9ERQXYNG
 /2EsfHutNjQku5Ujz68hcn5hJl8GRoW0WG379kE/AdKk+ubZ+zWwjALD5WQZwg==
From: Andrew Tropin <andrew@HIDDEN>
To: Philip McGrath <philip@HIDDEN>, 56050 <at> debbugs.gnu.org
Subject: Re: [bug#56050] [PATCH v2 2/2] etc/guix-install.sh: Check for
 profile from 'guix home'.
In-Reply-To: <9e68ef3237150756a97d0e3eba94a6b08879eeca.1656899134.git.philip@HIDDEN>
References: <cover.1656899134.git.philip@HIDDEN>
 <9e68ef3237150756a97d0e3eba94a6b08879eeca.1656899134.git.philip@HIDDEN>
Date: Tue, 12 Jul 2022 09:44:51 +0300
Message-ID: <87r12q25jw.fsf@HIDDEN>
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: 56050
Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>,
 Philip McGrath <philip@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On 2022-07-03 22:35, Philip McGrath wrote:

> If "$HOME/.guix-home/profile" exists, use it for GUIX_PROFILE instead of
> "$HOME/.guix-profile".
>
> * etc/guix-install.sh (sys_create_init_profile): Check for 'guix home'
> profile.
> ---
>  etc/guix-install.sh | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/etc/guix-install.sh b/etc/guix-install.sh
> index 62a33a55c4..300681e111 100755
> --- a/etc/guix-install.sh
> +++ b/etc/guix-install.sh
> @@ -524,7 +524,9 @@ export PATH=3D"$_GUIX_PROFILE/bin${PATH:+:}$PATH"
>  export INFOPATH=3D"$_GUIX_PROFILE/share/info:$INFOPATH"
>=20=20
>  # GUIX_PROFILE: User's default profile
> -GUIX_PROFILE=3D"$HOME/.guix-profile"
> +# Prefer the one from 'guix home' if it exists.
> +GUIX_PROFILE=3D"$HOME/.guix-home/profile"
> +[ -L $GUIX_PROFILE ] || GUIX_PROFILE=3D"$HOME/.guix-profile"
>  [ -L $GUIX_PROFILE ] || return
>  GUIX_LOCPATH=3D"$GUIX_PROFILE/lib/locale"
>  export GUIX_LOCPATH

I think here we don't need to prefer one over another.  Let's just
repeat the process for both of them.  If home profile exists source it,
if user profile exists source it as well.

=2D-=20
Best regards,
Andrew Tropin

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmLNGGMACgkQIgjSCVjB
3rAL+Q/+PwVXkPWCwr3FHfpGhZmheO1TIT5ybtxnCGLIH0Du6znYAfMeRn9Zu9SL
Fl5EAtGixEwpOklzu1vF/M72ISYQ84w2uBUCR7HYBHoz2NJT1AksAWznKX4tG7ZD
GxBqV0aylkbIkEao6Abdf9Gwq21O7pOYwdHEw/X1XW4ItK6ofOkZ07ga2KllVgDE
dE1f32bWIFnYLdGDwwYlOfm9ximtOzt552t0D08AineXESh49Rk/ejcxViTNCOrz
d6GEE6tu5D9yy0+/wp/Fytfe1LtbOBD3ZynBEHb2Nprw8sLxAsLsJ2AVRcC75eQ8
dcpzuUsdAkeKxCmBr4Eu1jzkbAgwUjgMpJ/azMCVx7yyEW7c9e8JrJI7pL6M/Yij
frCVMQJI2ShR7YrTDFksNj9utMpAnFtccikuMfZUj/4MNd37pSKRfinEq8wC7SFZ
J11NeVURUUUk/PM85omWzcIgG2rSpUIvQNbmsue9BWW7Ft9u/zO7eozjSSInOmwD
A9dpxPolov9H9xtdqPUmEEu8Myr2aGZS2niPLKiSGA1yehvjHZANHQrgTUOMzqr5
mAen0mXJaEokgzwJpGcnYAOLV0WcmiQKFgrc/fiY7HlCeRohKncPQAYiP/P3CHoF
soqs3B8ebXQ/v2mRXg+W8KyLanq/yxKZIN6e2Lw5q0KkUEdpuYQ=
=yfgI
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#56050; Package guix-patches. Full text available.

Message received at 56050 <at> debbugs.gnu.org:


Received: (at 56050) by debbugs.gnu.org; 4 Jul 2022 21:01:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 04 17:01:47 2022
Received: from localhost ([127.0.0.1]:48741 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o8TCV-0001Xn-Ay
	for submit <at> debbugs.gnu.org; Mon, 04 Jul 2022 17:01:47 -0400
Received: from eggs.gnu.org ([209.51.188.92]:41278)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1o8TCS-0001XZ-Bu
 for 56050 <at> debbugs.gnu.org; Mon, 04 Jul 2022 17:01:46 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:43642)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1o8TCM-00012Q-Vi; Mon, 04 Jul 2022 17:01:38 -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=rOm7AqOJn0oXCCsy6sJiVwJv5hVDn25u95anXaZLpvc=; b=NcRLZ54an9KQWO3Lom4h
 UrcnG9Waq9OjIGIu+cPpHxZ563pEiJZRx/iMhZTC7vSK7DDV2LVyYB0rmJIzoW9WOIaN7qut1hnmj
 J/72S9g/h+AfFSaGdKRmBTH2WbkFNHg5MHnPKfyMabtytYkDOHVyWpGZQWxMYWyVw7SpBqTc5BzF2
 iRfJTI61kWCdZk7wWYJdg80tpAeYw6BJ0xB3XsswD9Qkz+4hDK3en0oIBU9Krh2aVFI6ICKkTsO4N
 KDQIkqZVKMnd+bRvoxpZZBOVidXvPGW4xzxgY9O7nlF2vSn0waOx1fj758kp8MujFKodWIDrQnx/F
 mAUpHZvjCYkJ5Q==;
Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:58672
 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1o8TCK-00084b-AA; Mon, 04 Jul 2022 17:01:38 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: "Philip McGrath" <philip@HIDDEN>
Subject: Re: [PATCH v2 1/2] etc/guix-install.sh: Initialize XDG base
 directories.
References: <cover.1656899134.git.philip@HIDDEN>
 <605a74b1f064e2b057f6c9d57692dda5bccf8edf.1656899134.git.philip@HIDDEN>
 <877d4tgs2u.fsf@HIDDEN>
 <99286d24-c62d-4506-b172-dbac712acf9e@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: Sextidi 16 Messidor an 230 de la =?utf-8?Q?R=C3=A9vo?=
 =?utf-8?Q?lution=2C?= jour du Tabac
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: Mon, 04 Jul 2022 23:01:34 +0200
In-Reply-To: <99286d24-c62d-4506-b172-dbac712acf9e@HIDDEN> (Philip
 McGrath's message of "Mon, 04 Jul 2022 12:36:44 -0400")
Message-ID: <87r1307ftd.fsf@HIDDEN>
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: 56050
Cc: 56050 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

"Philip McGrath" <philip@HIDDEN> skribis:

> AFAICT, this seems to work. I think this is because of a rule I didn't kn=
ow about before from the section "Here Documents" under `info "(bash)Redire=
ctions"`:
>
>> If any part of *word* is quoted, the *delimiter* is the result of
>> quote removal on *word*, and the lines in the here-document
>> are not expanded.
>
> and the beginning EOF is quoted, so it works like this:
>
> $ cat quoted-here-doc.sh=20
> #!/bin/sh
> cat <<"EOF" > out.sh
> export PATH=3D"$PATH:foobar"
> EOF
> $ ./quoted-here-doc.sh=20
> $ cat out.sh=20
> export PATH=3D"$PATH:foobar"
>
> I'm certainly no expert on shell quoting, though.

Woow, I learned something, thanks!  Crazy.  (I wonder what Dash does
with that, given that it doesn=E2=80=99t support multi-digit file descriptor
numbers for redirects=E2=80=A6)

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#56050; Package guix-patches. Full text available.

Message received at 56050 <at> debbugs.gnu.org:


Received: (at 56050) by debbugs.gnu.org; 4 Jul 2022 20:18:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 04 16:18:21 2022
Received: from localhost ([127.0.0.1]:48730 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o8SWS-0000Oi-1g
	for submit <at> debbugs.gnu.org; Mon, 04 Jul 2022 16:18:21 -0400
Received: from eggs.gnu.org ([209.51.188.92]:35820)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1o8SWF-0000O9-Dv
 for 56050 <at> debbugs.gnu.org; Mon, 04 Jul 2022 16:18:17 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:41552)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1o8SWA-0003n5-1L; Mon, 04 Jul 2022 16:18:02 -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=SYH0CchTvfJKHNUCBl0LO8f2MHPqhRC9ZGSjlWsLFe4=; b=YSA8ZwzZJWovowMplgE9
 gd7P43kMc6A7djD8Vlo6sOuLLlmcoFuLTU1TgN+ODI1BMhUO291/R+BrVr9dtxjOYQcCyyfpWCTdv
 5rSzPFXgYmrsB+2mOBANesnY1Lwxmz7Rv5B52Hr6n/UL7Y/hdnMNUyhdSAcboSbeXFZpwi10a+2m0
 2TDj4rmPvNzdRtZHrdKYDmbhNVf2FweACtpmpl6ExdNhegZNifhcppN7r1/gaFVyy4TbsY5SJlxeq
 gKN8OpzmiD/44o4SzxxjHnWfnV0tP8YT0afsOUGMXsRvDFTRjUT/82HMEAKbb3x7PTz9olncA2mQ5
 108RerS3Jpe+Eg==;
Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:62173
 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1o8SW9-0005YD-LH; Mon, 04 Jul 2022 16:18:01 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Philip McGrath <philip@HIDDEN>
Subject: Re: bug#56050: [PATCH] home: services: environment-variables: Fix
 XDG base directories.
References: <cover.1656899134.git.philip@HIDDEN>
 <605a74b1f064e2b057f6c9d57692dda5bccf8edf.1656899134.git.philip@HIDDEN>
Date: Mon, 04 Jul 2022 22:18:00 +0200
In-Reply-To: <605a74b1f064e2b057f6c9d57692dda5bccf8edf.1656899134.git.philip@HIDDEN>
 (Philip McGrath's message of "Sun, 3 Jul 2022 22:35:02 -0400")
Message-ID: <87tu7w7htz.fsf_-_@HIDDEN>
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: 56050
Cc: 56050 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Philip McGrath <philip@HIDDEN> skribis:

> The default values from the XDG base directory specification make little
> sense for Guix System, and some scripts in Guix assume that they are not
> "empty or unset": for example, see <https://issues.guix.gnu.org/56050>.
> On foreign distros, however, omitting the default values is likely to
> break software from the distro, perhaps even preventing the desktop
> environment from starting. To smooth over the difference, use the
> system-wide configuration to ensure the environment variables are always
> explicitly set on foreign distros.
>
> * etc/guix-install.sh (sys_create_init_profile): Explicitly initialize
> XDG base directory variables.

[...]

> If "$HOME/.guix-home/profile" exists, use it for GUIX_PROFILE instead of
> "$HOME/.guix-profile".
>
> * etc/guix-install.sh (sys_create_init_profile): Check for 'guix home'
> profile.

Applied now, thanks, and sorry again for displaying my ignorance!  :-)

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#56050; Package guix-patches. Full text available.

Message received at 56050 <at> debbugs.gnu.org:


Received: (at 56050) by debbugs.gnu.org; 4 Jul 2022 16:38:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 04 12:38:15 2022
Received: from localhost ([127.0.0.1]:48559 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o8P5P-0002s6-KP
	for submit <at> debbugs.gnu.org; Mon, 04 Jul 2022 12:38:15 -0400
Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:55017)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1o8P5L-0002rd-OL
 for 56050 <at> debbugs.gnu.org; Mon, 04 Jul 2022 12:38:10 -0400
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44])
 by mailout.west.internal (Postfix) with ESMTP id CBB70320096F;
 Mon,  4 Jul 2022 12:38:00 -0400 (EDT)
Received: from imap52 ([10.202.2.102])
 by compute4.internal (MEProxy); Mon, 04 Jul 2022 12:38:01 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 philipmcgrath.com; h=cc:cc:content-transfer-encoding
 :content-type:date:date:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:sender:subject
 :subject:to:to; s=fm2; t=1656952680; x=1657039080; bh=ew/U6UYTB8
 KpeBuejPXlCx1Y+B3unqoDGP/K25C53bk=; b=SAyHcJH7mMsP5KsSYQ01deM1+C
 u1sLJSg3P2Qy0pf1l3HB+d1IOwStVpgBxEAs+tza0JE2YB2W5ncRWrKT9Dq81Ijm
 /NVEnNRf7xLUiKKZfPPk988qUFnVDEZp5YTfbiJoeI/6cLpNnShgiWCdM4pr7QAd
 DilWlV8kvhXGtXQs7rNkcZbEy8msJuidNImztOKDtV1dgnfDVM2Pc+cXtKNlXR8D
 8WqQM3Xo9AEieG9gOvGtw/dyxLjxJHO2fDJ5Fuo3nnJEtqt7ltEYNvHywn/Pc0qd
 bZTTQkSnsPHKZ53Gp0kFIjxuQCc1yd6C5GEFFe4VjDN55o3XShqo3ZRXyIBw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:date:date:feedback-id:feedback-id:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1656952680; x=
 1657039080; bh=ew/U6UYTB8KpeBuejPXlCx1Y+B3unqoDGP/K25C53bk=; b=L
 te9Fk8rtiiCvNOH3rK1z6HyttSvrD9r9UiyJy8RR+uyZtnV4FNVSZBdXHLX4VmEw
 77mmOeCUDaKcUVM9eFQvm/lG6RlFivEcvxk2BkZEffYde8/wKlNpgLPlnGWa0mwZ
 esUeJaVfDceCvl/Vn9ev5pEQv/ENyRPDvaQRGE4x5fKG2WbOyP2mLKfT2jY3VEGv
 yZj5lXohvRfcpUx2jIq6Coch46l0tSijCVMF2rj9yjYGFIHADiLoc9xRw2/nwJii
 eJQ+i4mp2XoHZgYShMRVvi9zXLgmqTf4udG9KqX2AWb32Wa6F1h6aOZ9Nvpe45zs
 q3E+RJH9DkYFsNq5tQung==
X-ME-Sender: <xms:aBfDYh4tdmkua5CW4DwDOM1VVn5OpSjeGmjZseydUxMppRNdADELcA>
 <xme:aBfDYu5FePcxWT_OsiaUz35ptehJ2y1g13xqidzR7nMkuZJjh_9uhmskNbkbL0jC2
 7mkQEqJU7YtHaQDFbA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudehledguddthecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefofgggkfgjfhffhffvvefutgfgsehtqhertderreejnecuhfhrohhmpedf
 rfhhihhlihhpucfotgfirhgrthhhfdcuoehphhhilhhiphesphhhihhlihhpmhgtghhrrg
 hthhdrtghomheqnecuggftrfgrthhtvghrnhepfefhgedtheejhffgteejvddttdejtdev
 leegvdefteelkeekffdvhfeggeetkeefnecuffhomhgrihhnpehgnhhurdhorhhgpdhhoh
 hmvgdrlhhotggrlhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl
 fhhrohhmpehphhhilhhiphesphhhihhlihhpmhgtghhrrghthhdrtghomh
X-ME-Proxy: <xmx:aBfDYofy0T9MOOnGNQ4cSbwEhc7XmBM4Ok8O_0i5EhQ8qgVjr8BerA>
 <xmx:aBfDYqL5oLezVGNFXqA_iop2kXtHCbrS-ewJ-7AW0S56-tcx9N5m8w>
 <xmx:aBfDYlKabakkYcvXdtVKGSckCx_RrDfJhIM4qQw1k_LryCkd_7oAag>
 <xmx:aBfDYl1OS2liGGooeP-NRlHubm8Tfwel_YN3jp3w_Bnh7paS8DhX5A>
Feedback-ID: i2b1146f3:Fastmail
Received: by mailuser.nyi.internal (Postfix, from userid 501)
 id 01737C6008B; Mon,  4 Jul 2022 12:37:59 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.7.0-alpha0-713-g1f035dc716-fm-20220617.001-g1f035dc7
Mime-Version: 1.0
Message-Id: <99286d24-c62d-4506-b172-dbac712acf9e@HIDDEN>
In-Reply-To: <877d4tgs2u.fsf@HIDDEN>
References: <cover.1656899134.git.philip@HIDDEN>
 <605a74b1f064e2b057f6c9d57692dda5bccf8edf.1656899134.git.philip@HIDDEN>
 <877d4tgs2u.fsf@HIDDEN>
Date: Mon, 04 Jul 2022 12:36:44 -0400
From: "Philip McGrath" <philip@HIDDEN>
To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [PATCH v2 1/2] etc/guix-install.sh: Initialize XDG base
 directories.
Content-Type: text/plain;charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 56050
Cc: 56050 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hi,

On Mon, Jul 4, 2022, at 5:11 AM, Ludovic Court=C3=A8s wrote:
> Hi!
>
> Philip McGrath <philip@HIDDEN> skribis:
>
>> The default values from the XDG base directory specification make lit=
tle
>> sense for Guix System, and some scripts in Guix assume that they are =
not
>> "empty or unset": for example, see <https://issues.guix.gnu.org/56050=
>.
>> On foreign distros, however, omitting the default values is likely to
>> break software from the distro, perhaps even preventing the desktop
>> environment from starting. To smooth over the difference, use the
>> system-wide configuration to ensure the environment variables are alw=
ays
>> explicitly set on foreign distros.
>>
>> * etc/guix-install.sh (sys_create_init_profile): Explicitly initialize
>> XDG base directory variables.
>
> [...]
>
>> +# Explicitly initialize XDG base directory variables to ease compati=
bility
>> +# with Guix System: see <https://issues.guix.gnu.org/56050#3>.
>> +export XDG_DATA_HOME=3D"${XDG_DATA_HOME:-$HOME/.local/share}"
>> +export XDG_CONFIG_HOME=3D"${XDG_CONFIG_HOME:-$HOME/.config}"
>
> I think variable expansion happens at the wrong time:
>
> --8<---------------cut here---------------start------------->8---
> $ cat > /tmp/t <<EOF
>> export PATH=3D"$PATH:foobar"
>> EOF
> $ cat /tmp/t
> export=20
> PATH=3D"/gnu/store/lq7ysaq5qbxh9xavx1zffgwrg4r8yhsy-profile/bin:/gnu/s=
tore/lq7ysaq5qbxh9xavx1zffgwrg4r8yhsy-profile/sbin:/home/ludo/.guix-home=
/profile/bin:/home/ludo/.guix-home/profile/sbin:/home/ludo/.guix-home/pr=
ofile/bin:/home/ludo/.guix-home/profile/sbin:/run/setuid-programs:/home/=
ludo/.config/guix/current/bin:/home/ludo/.guix-profile/bin:/home/ludo/.g=
uix-profile/sbin:/run/current-system/profile/bin:/run/current-system/pro=
file/sbin:/gnu/store/0c1yfbxyv877mlgychfgvmk5ha2jqh52-gzip-1.10/bin:/gnu=
/store/8fpk2cja3f07xls48jfnpgrzrljpqivr-coreutils-8.32/bin:foobar"
> --8<---------------cut here---------------end--------------->8---
>
> (The problem already exists, and should be fixed, but it=E2=80=99s abo=
ut
> variables that are less likely to be used.)
>
> Could you address that by escaping dollars?
>
> Otherwise LGTM.
>

AFAICT, this seems to work. I think this is because of a rule I didn't k=
now about before from the section "Here Documents" under `info "(bash)Re=
directions"`:

> If any part of *word* is quoted, the *delimiter* is the result of
> quote removal on *word*, and the lines in the here-document
> are not expanded.

and the beginning EOF is quoted, so it works like this:

--8<---------------cut here---------------start------------->8---
$ cat quoted-here-doc.sh=20
#!/bin/sh
cat <<"EOF" > out.sh
export PATH=3D"$PATH:foobar"
EOF
$ ./quoted-here-doc.sh=20
$ cat out.sh=20
export PATH=3D"$PATH:foobar"
--8<---------------cut here---------------end--------------->8---

I'm certainly no expert on shell quoting, though.

-Philip




Information forwarded to guix-patches@HIDDEN:
bug#56050; Package guix-patches. Full text available.

Message received at 56050 <at> debbugs.gnu.org:


Received: (at 56050) by debbugs.gnu.org; 4 Jul 2022 09:13:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 04 05:13:11 2022
Received: from localhost ([127.0.0.1]:46070 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o8I8l-0004cf-Ml
	for submit <at> debbugs.gnu.org; Mon, 04 Jul 2022 05:13:11 -0400
Received: from eggs.gnu.org ([209.51.188.92]:53804)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1o8I8j-0004cQ-KB
 for 56050 <at> debbugs.gnu.org; Mon, 04 Jul 2022 05:13:10 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:49812)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1o8I8e-0001w5-Et; Mon, 04 Jul 2022 05:13:04 -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=XzykigmZEuRg4RIpAoN9P0EaU5chjUTfAT7ubFRU4JA=; b=fNw7aqLSe1f1bsYtDMcl
 1p6ztCwV+Yo0/oL/RrIiUOT1Pen9CdMjRTyxKtxh1QsJi7DFRibLywOQ5lr5x4iw/ZfDoAKFlT1hX
 EdS9y95DXNvVt2LIsI+I8j36CR26njwNkryBtrEqbQJ3a3PPSw58Ft/opy7L4OXmNBECNTpE0EJYv
 m55Gl4E1PBcug5Fenuks0S8OVCofsX8ITu0+mVBuKg3sfZdPutT1Ys1hgVUV2pFyEBR9cCsIy2VXa
 9MVr/stWsB3l2ff2RCx23U8We3E/frUTOPy4ebVGvWzAqfPo2fRLGn8ju4I+ZA9ySNshK8Fkk3kFA
 UpoTrIubGygG6g==;
Received: from [193.50.110.235] (port=44622 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1o8I8c-0002Gz-1k; Mon, 04 Jul 2022 05:13:03 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Philip McGrath <philip@HIDDEN>
Subject: Re: [PATCH v2 2/2] etc/guix-install.sh: Check for profile from
 'guix home'.
References: <cover.1656899134.git.philip@HIDDEN>
 <9e68ef3237150756a97d0e3eba94a6b08879eeca.1656899134.git.philip@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: Sextidi 16 Messidor an 230 de la =?utf-8?Q?R=C3=A9vo?=
 =?utf-8?Q?lution=2C?= jour du Tabac
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: Mon, 04 Jul 2022 11:13:00 +0200
In-Reply-To: <9e68ef3237150756a97d0e3eba94a6b08879eeca.1656899134.git.philip@HIDDEN>
 (Philip McGrath's message of "Sun, 3 Jul 2022 22:35:03 -0400")
Message-ID: <8735fhgs0z.fsf@HIDDEN>
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: 56050
Cc: 56050 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Philip McGrath <philip@HIDDEN> skribis:

> If "$HOME/.guix-home/profile" exists, use it for GUIX_PROFILE instead of
> "$HOME/.guix-profile".
>
> * etc/guix-install.sh (sys_create_init_profile): Check for 'guix home'
> profile.

[...]

> +# Prefer the one from 'guix home' if it exists.
> +GUIX_PROFILE=3D"$HOME/.guix-home/profile"
> +[ -L $GUIX_PROFILE ] || GUIX_PROFILE=3D"$HOME/.guix-profile"

Likewise, we should escape dollar signs.

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#56050; Package guix-patches. Full text available.

Message received at 56050 <at> debbugs.gnu.org:


Received: (at 56050) by debbugs.gnu.org; 4 Jul 2022 09:12:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 04 05:12:03 2022
Received: from localhost ([127.0.0.1]:46065 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o8I7f-0004ap-A6
	for submit <at> debbugs.gnu.org; Mon, 04 Jul 2022 05:12:03 -0400
Received: from eggs.gnu.org ([209.51.188.92]:53614)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1o8I7d-0004aJ-K5
 for 56050 <at> debbugs.gnu.org; Mon, 04 Jul 2022 05:12:02 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:49804)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1o8I7Y-0001my-5o; Mon, 04 Jul 2022 05:11:56 -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=a8ldjhLNMmzS2DShFeVBiWs4GkIweou1XQBn2k5bQMY=; b=AcRTdErUG4IeQYN8dwhb
 aTr8eSJBFlt01vBqXxjZ/CrpBL4QAon9NMXxsdV5qF1ByHsuOcT0RpFTrTUYGc31lNfK4Zsh1bS+k
 N6OSmXZm18MvGBUfKaTem46R8X7AthgtUI1Xlzsbeo4gjS18Fa66XofPBzsAZYIfebYBVKzZYfz72
 BSNyv9ezAf6S0OPVE0Ouhxn/PdroRpg3T1eEK5O3LGIeZjvHFQaiGsfgPs2xoCvRwnD00Q475Adr/
 rlxhM/64Kq0XJN4/G478VfpChRcaO/A/9bhArNpM19NdlS3SYH+qOLMmUUU1TIfUgRL8W7rGhkpKJ
 ci/wrVIbtJdw0w==;
Received: from [193.50.110.235] (port=52740 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1o8I7X-00026x-Pt; Mon, 04 Jul 2022 05:11:56 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Philip McGrath <philip@HIDDEN>
Subject: Re: [PATCH v2 1/2] etc/guix-install.sh: Initialize XDG base
 directories.
References: <cover.1656899134.git.philip@HIDDEN>
 <605a74b1f064e2b057f6c9d57692dda5bccf8edf.1656899134.git.philip@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: Sextidi 16 Messidor an 230 de la =?utf-8?Q?R=C3=A9vo?=
 =?utf-8?Q?lution=2C?= jour du Tabac
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: Mon, 04 Jul 2022 11:11:53 +0200
In-Reply-To: <605a74b1f064e2b057f6c9d57692dda5bccf8edf.1656899134.git.philip@HIDDEN>
 (Philip McGrath's message of "Sun, 3 Jul 2022 22:35:02 -0400")
Message-ID: <877d4tgs2u.fsf@HIDDEN>
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: 56050
Cc: 56050 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi!

Philip McGrath <philip@HIDDEN> skribis:

> The default values from the XDG base directory specification make little
> sense for Guix System, and some scripts in Guix assume that they are not
> "empty or unset": for example, see <https://issues.guix.gnu.org/56050>.
> On foreign distros, however, omitting the default values is likely to
> break software from the distro, perhaps even preventing the desktop
> environment from starting. To smooth over the difference, use the
> system-wide configuration to ensure the environment variables are always
> explicitly set on foreign distros.
>
> * etc/guix-install.sh (sys_create_init_profile): Explicitly initialize
> XDG base directory variables.

[...]

> +# Explicitly initialize XDG base directory variables to ease compatibili=
ty
> +# with Guix System: see <https://issues.guix.gnu.org/56050#3>.
> +export XDG_DATA_HOME=3D"${XDG_DATA_HOME:-$HOME/.local/share}"
> +export XDG_CONFIG_HOME=3D"${XDG_CONFIG_HOME:-$HOME/.config}"

I think variable expansion happens at the wrong time:

--8<---------------cut here---------------start------------->8---
$ cat > /tmp/t <<EOF
> export PATH=3D"$PATH:foobar"
> EOF
$ cat /tmp/t
export PATH=3D"/gnu/store/lq7ysaq5qbxh9xavx1zffgwrg4r8yhsy-profile/bin:/gnu=
/store/lq7ysaq5qbxh9xavx1zffgwrg4r8yhsy-profile/sbin:/home/ludo/.guix-home/=
profile/bin:/home/ludo/.guix-home/profile/sbin:/home/ludo/.guix-home/profil=
e/bin:/home/ludo/.guix-home/profile/sbin:/run/setuid-programs:/home/ludo/.c=
onfig/guix/current/bin:/home/ludo/.guix-profile/bin:/home/ludo/.guix-profil=
e/sbin:/run/current-system/profile/bin:/run/current-system/profile/sbin:/gn=
u/store/0c1yfbxyv877mlgychfgvmk5ha2jqh52-gzip-1.10/bin:/gnu/store/8fpk2cja3=
f07xls48jfnpgrzrljpqivr-coreutils-8.32/bin:foobar"
--8<---------------cut here---------------end--------------->8---

(The problem already exists, and should be fixed, but it=E2=80=99s about
variables that are less likely to be used.)

Could you address that by escaping dollars?

Otherwise LGTM.

Thanks,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#56050; Package guix-patches. Full text available.

Message received at 56050 <at> debbugs.gnu.org:


Received: (at 56050) by debbugs.gnu.org; 4 Jul 2022 02:35:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 03 22:35:54 2022
Received: from localhost ([127.0.0.1]:45748 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o8BwI-0000i8-O7
	for submit <at> debbugs.gnu.org; Sun, 03 Jul 2022 22:35:54 -0400
Received: from mail-qt1-f174.google.com ([209.85.160.174]:42685)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1o8BwG-0000hD-BK
 for 56050 <at> debbugs.gnu.org; Sun, 03 Jul 2022 22:35:52 -0400
Received: by mail-qt1-f174.google.com with SMTP id g14so8208448qto.9
 for <56050 <at> debbugs.gnu.org>; Sun, 03 Jul 2022 19:35:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=philipmcgrath.com; s=google;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=kFdYf/ErQ/xtl0T3oGKVHl1DFMsHEaLWR9C9JbPPfIE=;
 b=bqmyt3CRc9d2yF635tVc1+HRXl2KHR/Hb+8ur1+ktBpTwHxPPYc7Obtv5o8olweUbm
 Dl9EoC7M3cNkSutt/jGkORQVAZs0Yvij2zvF0tIE5Tjg84aN3EdqFzGKrB3+gsbcqcXy
 VjoVeYMo64kcn+004v9Pp6GJJ3M5cvAIc6Sk4mCks/LKZA/z/iYCXpgwQLgYUcqf+Erz
 LrvfsGoTw7Th9+j1T2wMFXnZF+iHxhO9jklC6WIhYzHtKaH7mkNehvvLzR9Z2ptnGjcQ
 UhUgsrRXAELnIJv92EQ2Mx1oajVuAc16Wk/jWYXMJ8ki1CKSUUX+V0jkN6CW15psDLhj
 oFew==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=kFdYf/ErQ/xtl0T3oGKVHl1DFMsHEaLWR9C9JbPPfIE=;
 b=k7V64ThcQ4fH0JZvqX0IizT71nqbl71NNEE1d4Cr4KdlKq+kQ5tWC+kgpJzgUA/mbH
 t/jDbLorXhg1dJn0CAj8lLT6Z6j08zODRNs1a6EBGa1FAb37/Fz8MIOMxnAiPTykpKSv
 lxZ9jM8WEirQKYe/gYSJrpOGgEejm0KanEjzJI76DcuwuU6OKFKzClA4HnWN9FR3ahrR
 qQaajLof+x5CZnFs3NsOWKOMylbesooi0gZSDKEmDNfrT+twXeetHOFnQqNP0zw0TnF9
 Dfooh/MWXwTnvszXRdq9SDCQyHH+6rMMV8D8Yiet/ytaNq/dzbvFcztKebUYlvo33lum
 q6Tg==
X-Gm-Message-State: AJIora9cplWdXRkQM0uwqfuIm3XL+Qhd1FUAY0SnAA/OtcnlXGopy3U0
 WMVwO5zP5FkPNpMHtRRgPsBbfcUQj1mVSauUnCU=
X-Google-Smtp-Source: AGRyM1vDLXG4mCxfSr27uGlQff6I8oqen5OCiMg0+k5IxOPWHkHxZiYS1qi2b+OwdN5Dq7Bgia44eA==
X-Received: by 2002:a05:6214:29ca:b0:472:fa99:100 with SMTP id
 gh10-20020a05621429ca00b00472fa990100mr822904qvb.87.1656902151939; 
 Sun, 03 Jul 2022 19:35:51 -0700 (PDT)
Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51])
 by smtp.gmail.com with UTF8SMTPSA id
 c3-20020ac84e03000000b00304f55e56e4sm19302605qtw.40.2022.07.03.19.35.51
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sun, 03 Jul 2022 19:35:51 -0700 (PDT)
From: Philip McGrath <philip@HIDDEN>
To: 56050 <at> debbugs.gnu.org
Subject: [PATCH v2 2/2] etc/guix-install.sh: Check for profile from 'guix
 home'.
Date: Sun,  3 Jul 2022 22:35:03 -0400
Message-Id: <9e68ef3237150756a97d0e3eba94a6b08879eeca.1656899134.git.philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <cover.1656899134.git.philip@HIDDEN>
References: <cover.1656899134.git.philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: 56050
Cc: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Philip McGrath <philip@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

If "$HOME/.guix-home/profile" exists, use it for GUIX_PROFILE instead of
"$HOME/.guix-profile".

* etc/guix-install.sh (sys_create_init_profile): Check for 'guix home'
profile.
---
 etc/guix-install.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 62a33a55c4..300681e111 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -524,7 +524,9 @@ export PATH="$_GUIX_PROFILE/bin${PATH:+:}$PATH"
 export INFOPATH="$_GUIX_PROFILE/share/info:$INFOPATH"
 
 # GUIX_PROFILE: User's default profile
-GUIX_PROFILE="$HOME/.guix-profile"
+# Prefer the one from 'guix home' if it exists.
+GUIX_PROFILE="$HOME/.guix-home/profile"
+[ -L $GUIX_PROFILE ] || GUIX_PROFILE="$HOME/.guix-profile"
 [ -L $GUIX_PROFILE ] || return
 GUIX_LOCPATH="$GUIX_PROFILE/lib/locale"
 export GUIX_LOCPATH
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#56050; Package guix-patches. Full text available.

Message received at 56050 <at> debbugs.gnu.org:


Received: (at 56050) by debbugs.gnu.org; 4 Jul 2022 02:35:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 03 22:35:52 2022
Received: from localhost ([127.0.0.1]:45745 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o8BwG-0000hr-A0
	for submit <at> debbugs.gnu.org; Sun, 03 Jul 2022 22:35:52 -0400
Received: from mail-qt1-f172.google.com ([209.85.160.172]:43669)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1o8BwE-0000hd-QT
 for 56050 <at> debbugs.gnu.org; Sun, 03 Jul 2022 22:35:51 -0400
Received: by mail-qt1-f172.google.com with SMTP id c13so8201684qtq.10
 for <56050 <at> debbugs.gnu.org>; Sun, 03 Jul 2022 19:35:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=philipmcgrath.com; s=google;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=op+cPVIL/6T6NLzv7IcLjEr1kvipP/0PcITee3iGHJY=;
 b=Xsm0ydVgcKZR53dxdFHsEwGNj8UWD/bPrmPHKBfT+qLfWVDVzLnrBRPVMYlMchfV0G
 QcLSQUzWsFgyipj4FHt3u3XCUMcH1lo0RjVJlK+DQHUb+mrZlKpLjLhDERlDil1tb3fY
 bDH6glgzW9eGIzbWvMFC60QpD2krJnDhmqzUaHmAbxM0IInLB/v4aRqpVEz1EHvI3PsY
 u+V/Pgtjvlt78YdU5FfKMK6lYcKSZjH36ItDWDDOwgi3w2GRCEWeRA5hVZZeGSHeQcd1
 J0EQanM+tbavdZTn8+ORK2OY9AbS4AIhDmsjc6xi1DGuEgmjS/OptT7TIOG+Yrki9OiI
 DxbA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=op+cPVIL/6T6NLzv7IcLjEr1kvipP/0PcITee3iGHJY=;
 b=ZsMKZiBigGIWd4t0vAn/GmD0o5fkoCGHCZXLnYkMRB+XFAXQee952mP3+5I0erRZ/o
 q4SZub/tWHGLNfpTh29hXvK2OFPT4x7l5wWVRulJnmTBASsvDbQRt+b0oYkeU3NhwyoV
 1mzOUK0o8bGNfpUcfA8kHYVEiMExTGPic/ciFq8ja//8O5yc1+MH9WlcCQBfywavD16W
 4FOiCPmbtP48OhSJQK4Dsj8dVTbOjdIgNjvZ6sTyP/pSPU+5SGR0DoG2xepNzTYKbo0f
 tQYg203PIofVjdFjL3KrtpcrZbBi8lZ12Hgs1Sc3eCmEXozyCR7Vh7RhmPhMio3SLg/8
 I9BQ==
X-Gm-Message-State: AJIora8SFoC8+osT6NEqxzQ/AX6mrrTkLzGdBESdqYnOWkAzWFOcdNIq
 rPnrQ5NQdU6GHd6e0Bh2P/rSIuAmygXrJ+ITcxM=
X-Google-Smtp-Source: AGRyM1ucKlvUEWcoa8sK+Ybi/wzFBZQrqBmVgm9bZxzHT7MwSzkMKo6vsGZQ+jRy+uuEMNKAhIVauQ==
X-Received: by 2002:ad4:594b:0:b0:470:852e:2efd with SMTP id
 eo11-20020ad4594b000000b00470852e2efdmr25918541qvb.115.1656902145266; 
 Sun, 03 Jul 2022 19:35:45 -0700 (PDT)
Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51])
 by smtp.gmail.com with UTF8SMTPSA id
 a20-20020a05620a16d400b0069fe1dfbeffsm23354694qkn.92.2022.07.03.19.35.44
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sun, 03 Jul 2022 19:35:45 -0700 (PDT)
From: Philip McGrath <philip@HIDDEN>
To: 56050 <at> debbugs.gnu.org
Subject: [PATCH v2 1/2] etc/guix-install.sh: Initialize XDG base directories.
Date: Sun,  3 Jul 2022 22:35:02 -0400
Message-Id: <605a74b1f064e2b057f6c9d57692dda5bccf8edf.1656899134.git.philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <cover.1656899134.git.philip@HIDDEN>
References: <cover.1656899134.git.philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: 56050
Cc: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Philip McGrath <philip@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

The default values from the XDG base directory specification make little
sense for Guix System, and some scripts in Guix assume that they are not
"empty or unset": for example, see <https://issues.guix.gnu.org/56050>.
On foreign distros, however, omitting the default values is likely to
break software from the distro, perhaps even preventing the desktop
environment from starting. To smooth over the difference, use the
system-wide configuration to ensure the environment variables are always
explicitly set on foreign distros.

* etc/guix-install.sh (sys_create_init_profile): Explicitly initialize
XDG base directory variables.
---
 etc/guix-install.sh | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index cd1a1c34c1..62a33a55c4 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -504,6 +504,16 @@ sys_create_init_profile()
   # This will not take effect until the next shell or desktop session!
     [ -d "/etc/profile.d" ] || mkdir /etc/profile.d # Just in case
     cat <<"EOF" > /etc/profile.d/guix.sh
+# Explicitly initialize XDG base directory variables to ease compatibility
+# with Guix System: see <https://issues.guix.gnu.org/56050#3>.
+export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
+export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
+export XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}"
+export XDG_DATA_DIRS="${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/}"
+export XDG_CONFIG_DIRS="${XDG_CONFIG_DIRS:-/etc/xdg}"
+export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}"
+# no default for XDG_RUNTIME_DIR (depends on foreign distro for semantics)
+
 # _GUIX_PROFILE: `guix pull` profile
 _GUIX_PROFILE="$HOME/.config/guix/current"
 export PATH="$_GUIX_PROFILE/bin${PATH:+:}$PATH"
@@ -522,7 +532,7 @@ export GUIX_LOCPATH
 [ -f "$GUIX_PROFILE/etc/profile" ] && . "$GUIX_PROFILE/etc/profile"
 
 # set XDG_DATA_DIRS to include Guix installations
-export XDG_DATA_DIRS="$GUIX_PROFILE/share:${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/}"
+export XDG_DATA_DIRS="$GUIX_PROFILE/share:$XDG_DATA_DIRS"
 EOF
 }
 
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#56050; Package guix-patches. Full text available.

Message received at 56050 <at> debbugs.gnu.org:


Received: (at 56050) by debbugs.gnu.org; 4 Jul 2022 02:35:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 03 22:35:41 2022
Received: from localhost ([127.0.0.1]:45742 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o8Bw4-0000hR-SA
	for submit <at> debbugs.gnu.org; Sun, 03 Jul 2022 22:35:41 -0400
Received: from mail-qt1-f174.google.com ([209.85.160.174]:42685)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1o8Bw2-0000hD-RE
 for 56050 <at> debbugs.gnu.org; Sun, 03 Jul 2022 22:35:40 -0400
Received: by mail-qt1-f174.google.com with SMTP id g14so8207784qto.9
 for <56050 <at> debbugs.gnu.org>; Sun, 03 Jul 2022 19:35:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=philipmcgrath.com; s=google;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=tVP1vIaJpH0xQ8gOlJZ42blfbRn3c6snP5eKg1OLMNI=;
 b=N6hxPtvnmRcvjyqO8Q+YKhCeo8cm3A9lxXRsXITniQNbYv82S7EZ8ed1hvrtGl8lyp
 G3byeUi5Ex3MS6EebVBb7OKG+Cnk8c2uotYdItPNb8U4KccxdrdMY1IxqR85P7L7ijqC
 r3QJrEPLt9AkBdTJ6boWz+z86qUDRGWpH45dwD8aJgTA8pj2wfwbTSYLpSZ6fCmMICVE
 YAaWnQIj3R0JgsHvhltEVv3d+8CXEYz/dhMCkmhcpfhntOa/HmmF9ARyJX7WQrAyUiSg
 klP1u5lVr6+WUFoppfltiSFH+iZSpmVp8RDImF63wzbSJCHlGZ/fslW52qRqQv679UkW
 dHxA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=tVP1vIaJpH0xQ8gOlJZ42blfbRn3c6snP5eKg1OLMNI=;
 b=0rVLoETTbzKk6y9QrciT52+PJlHjXWLx5PaeNvHIsL0rl7O5CrbyP5gVrVhEOsEWC5
 +JVQvWziFwvQUUQDVC6B1qbpFbRbsDIXsDBUTQF2X4m6RtQAXsgaHH1IBxPV2XcWegUA
 +I2MMswRe09LOue9utDGurSil2oGsSq8oHGgzjzcP2FpBA4/1DHaNraLZNCgNa6Uusjd
 zPzRVUZSuKyIb7O+iE7cipV7EP/MT92fnuPvt/uE8ozKTAqKWSP1kaknqhUw+065BtsX
 xwxblbSofC2YrBfEWhc32U8roCqbTk+qcagQ+do24Qt07GaLknr2ngPu6qWJLifFGbcp
 IQzQ==
X-Gm-Message-State: AJIora99n6ubgO+iSf8ceBNd3akCQh795vJRL6IAWoA77o+EpdPeNCFe
 cc8ns9njUsN12jQch1dH79VU6W4boFum/dB061c=
X-Google-Smtp-Source: AGRyM1u4JNV7Qo71U9bLvCfubKybOwVcZblLAH1IUSYo3usmv9PhjjOBWzQmDw7U8gEX0q1oyk29Ww==
X-Received: by 2002:a05:622a:3d1:b0:31d:2a61:56a2 with SMTP id
 k17-20020a05622a03d100b0031d2a6156a2mr18666837qtx.222.1656902132669; 
 Sun, 03 Jul 2022 19:35:32 -0700 (PDT)
Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51])
 by smtp.gmail.com with UTF8SMTPSA id
 g6-20020a05620a40c600b006a6bb044740sm16239375qko.66.2022.07.03.19.35.31
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sun, 03 Jul 2022 19:35:32 -0700 (PDT)
From: Philip McGrath <philip@HIDDEN>
To: 56050 <at> debbugs.gnu.org
Subject: [PATCH v2 0/2] etc/guix-install.sh: Initialize XDG base directories.
Date: Sun,  3 Jul 2022 22:35:01 -0400
Message-Id: <cover.1656899134.git.philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <878rpktobq.fsf_-_@HIDDEN>
References: <c8f5f8b21bc299011bd598e9bbdd3d19999d1071.1655528190.git.philip@HIDDEN>
 <871qvg303w.fsf@HIDDEN> <10145966.nUPlyArG6x@avalon>
 <878rpktobq.fsf_-_@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: 56050
Cc: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Philip McGrath <philip@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

Hi,

Here is a v2! I've changed the ‘/etc/profile.d/guix.sh’ generated by
‘etc/guix-install.sh’ to initialize all of the XDG base directory
variables---some seem less likely to cause problems, but it should be harmless
to make them all explicit---and to check for ‘~/.guix-home/profile’ before
‘~/.guix-profile’ when looking for the default profile.

I still haven't done anything here about `XCURSOR_PATH`, but I've looked into
the situation more, and there is a Chromium bug [1] that confirms what I
previously thought: the default search path [2] can be overridden by
configuring libXcursor with `--with-cursorpath=`, and Gentoo, at least, does
so [3]. (So far, Gentoo is the only distro I've found that does so.) It seems
like the only way to find out the system's default path is, with
`XCURSOR_PATH` unset, to `dlopen` libXcursor and call `XcursorLibraryPath`.

A further complication is that the default path:

    ~/.local/share/icons:~/.icons:/usr/share/icons:/usr/share/pixmaps

contains both user-specific and system-wide locations, seemingly with no
reliable way to interject between them.

I think it would not be so bad to ignore this issue, and that's what I propose
doing for now: unlike the problems with the XDG variables, which for me
produced a black screen instead of a desktop environment, the only symptom of
the missing `XCURSOR_PATH` for me was that my cursor disapeared when hovering
over the edges of windows, rather than transforming into a bidirectional
resize cursor.

It might also be reasonable to initialize `XCURSOR_PATH` to
"/usr/share/icons:/usr/share/pixmaps". Even Gentoo's default value for
`XCURSOR_PATH` seems to include those directories.

But I wonder if it really makes sense for
`environment-variables->setup-environment-script` from `(gnu home services)`
to always set `XCURSOR_PATH`. I, for one, don't have any cursors in
`$HOME_ENVIRONMENT/profile/share/icons` (though I do have other kinds of icons
in that path). If we just left `XCURSOR_PATH` alone, we could at least limit
the problem to people who actually want to manage cursors with `guix home`.

In any case, `XCURSOR_PATH` need not block these patches.

 -Philip

[1]: https://bugs.chromium.org/p/chromium/issues/detail?id=1127712
[2]: https://gitlab.freedesktop.org/xorg/lib/libxcursor/-/blob/master/configure.ac#L70
[3]: https://gitweb.gentoo.org/repo/gentoo.git/tree/x11-libs/libXcursor/libXcursor-1.2.1.ebuild?id=b8516dc07a786a1aff6cd493376a7b2810a9a82c

Philip McGrath (2):
  etc/guix-install.sh: Initialize XDG base directories.
  etc/guix-install.sh: Check for profile from 'guix home'.

 etc/guix-install.sh | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)


base-commit: 4a2f487740fc4a000480226fd25ff2452efa9012
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#56050; Package guix-patches. Full text available.

Message received at 56050 <at> debbugs.gnu.org:


Received: (at 56050) by debbugs.gnu.org; 25 Jun 2022 21:40:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 25 17:40:00 2022
Received: from localhost ([127.0.0.1]:46324 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o5DVL-0004m2-68
	for submit <at> debbugs.gnu.org; Sat, 25 Jun 2022 17:40:00 -0400
Received: from eggs.gnu.org ([209.51.188.92]:39320)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1o5DVJ-0004lq-MX
 for 56050 <at> debbugs.gnu.org; Sat, 25 Jun 2022 17:39:46 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:38394)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1o5DVE-00038c-6T; Sat, 25 Jun 2022 17:39:40 -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=9fhqbCX2g+9P1f1fFkBxOX0crxy0zZZ73eZt9eva+ps=; b=GNbjzi1BG8BcxR3oiq7r
 Yp3IzXSYSS9CVPiTDqb3uHJ84d+XCQql1r2NBx310JdYmv/A+L9QWSgRSQElVKfuI3oJijHOs2TOE
 RIb0NC1kfFIKIoI06Pdcq2Vd3VqdPS7W+DORwBiLHrjZmlkor/h6S2Lo4/OYe2fEfaKKRXbRfR2MM
 V3kdwZnHr7ohcU19EIqj2yvd8KqogFKhG+iEYv7IQhn5fNLJ6JbKJj93ydfIYElPYDdSC9EU5DbtQ
 FFuZ31ITA/uEBfZNHb/Nq8DC29KJZY6Vv92qmdKxoVfYptw5Q19jaxno1ETxheLp0U37FsL0zm+r2
 gAhYb2/kMBWiUg==;
Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:52920
 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1o5DVD-0006Nl-Qb; Sat, 25 Jun 2022 17:39:40 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Philip McGrath <philip@HIDDEN>
Subject: Re: bug#56050: [PATCH] home: services: environment-variables: Fix
 XDG base directories.
References: <c8f5f8b21bc299011bd598e9bbdd3d19999d1071.1655528190.git.philip@HIDDEN>
 <871qvg303w.fsf@HIDDEN> <10145966.nUPlyArG6x@avalon>
Date: Sat, 25 Jun 2022 23:39:37 +0200
In-Reply-To: <10145966.nUPlyArG6x@avalon> (Philip McGrath's message of "Thu,
 23 Jun 2022 17:33:16 -0400")
Message-ID: <878rpktobq.fsf_-_@HIDDEN>
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: 56050
Cc: 56050 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Philip,

Philip McGrath <philip@HIDDEN> skribis:

> I based this patch on the file that gets installed as /etc/profile.d/guix=
.sh (I haven't found its source yet). Maybe we could leave this code alone =
if we change that file, instead? Then, both on Guix System and on foreign d=
istros, some system-wide code would be responsible for initializing these s=
earch paths, and we could assume in contexts like this that they are explic=
itly set and not empty.

Yes, changing /etc/profile.d/guix.sh sounds better: it allows us to
provide a solution specifically for foreign distros.

This file is created by =E2=80=98etc/guix-install.sh=E2=80=99, the installa=
tion script
given at <https://guix.gnu.org/manual/en/html_node/Binary-Installation.html=
>.

> One catch is that, right now, this is what was installed for me into /etc=
/profile.d/guix.sh:

[...]

> but $HOME/.guix-profile doesn't exist for me (only $HOME/.guix-home), so =
this script exits without setting GUIX_LOCPATH or XDG_DATA_DIRS. Maybe some=
thing about that should change?

Yes, that too!  We should change it so that it checks
~/.guix-home/profile and ~/.guix-profile (in that order) and picks the
right one.

Would you like to give it a try?

Thanks,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#56050; Package guix-patches. Full text available.

Message received at 56050 <at> debbugs.gnu.org:


Received: (at 56050) by debbugs.gnu.org; 23 Jun 2022 21:33:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 23 17:33:37 2022
Received: from localhost ([127.0.0.1]:40166 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o4USH-0007pe-8O
	for submit <at> debbugs.gnu.org; Thu, 23 Jun 2022 17:33:37 -0400
Received: from out1-smtp.messagingengine.com ([66.111.4.25]:38485)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1o4USF-0007pT-No
 for 56050 <at> debbugs.gnu.org; Thu, 23 Jun 2022 17:33:36 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.46])
 by mailout.nyi.internal (Postfix) with ESMTP id A3A5B5C0056;
 Thu, 23 Jun 2022 17:33:30 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute2.internal (MEProxy); Thu, 23 Jun 2022 17:33:30 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 philipmcgrath.com; h=cc:cc:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:sender:subject:subject:to:to; s=fm2; t=1656020010; x=
 1656106410; bh=Vc4OPtEC84JYzJAb+c/O+r/9D1jUSIVf07MBW9gYQec=; b=m
 6+za5xOqbCf0Efh88qx+0OqqVdB+hsmSg8KHKvSDbHaaSonNhAfQ6AU1UWqdDLG8
 AU70B0hBeEY1k52QdAAub1WpbGseOREr5MCF8qGkmuEJKaMbpj8mWceDbiqPTfJC
 sF8TPzmiDJpOt/fDf39+0aRf5pkZFegB4jdehi0pWub+3HCUU/XO9xly5J7Kpd34
 7Yoph02Cl9OxTaHtJ54hzLGR5s3N6HsEYOeWAWyC+5rstH+9O8HBY6S7H43km0vJ
 SDbM+80yWtBR6zPQHevcKygB+Ss8C+TdlFTuDr2YDY+imIUSttCvlG2/GfdfARzl
 348gLb//Hcgs67py+M1qg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:date:date:feedback-id
 :feedback-id:from:from:in-reply-to:in-reply-to:message-id
 :mime-version:references:reply-to:sender:subject:subject:to:to
 :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=
 fm2; t=1656020010; x=1656106410; bh=Vc4OPtEC84JYzJAb+c/O+r/9D1jU
 SIVf07MBW9gYQec=; b=JlNyAQ5Pv9hvhd2aD1Hj4MDpDnsix1ZucdEtABsKJ/8B
 crm2pZ71u8P+pkjOM5wTTG0i/RXzYi1U1vqCsqdh7JR6bwJ8OHvfGsyRR2wC9uIS
 KuiYcyP1QGMiAfHIYWstXotfTs+rec8Vh4VXxtogWbhJO4qWBleNLhvagQQvFQBm
 0KB4exuJdSlNvv9Q6x42ERbzHMUmcuqrwtmu5Su3oWrDArtMCGtus12re2Wa7w/0
 COR5k53tpgR+UDbKuqv5oFSGov5lmBtTr1MKZuMf0O4VxrWC9EcXGBy6BFGBtx75
 lF5ORMbq5KVEytfo1tNqSDR38LY5PZQII+ppOSntZw==
X-ME-Sender: <xms:Kty0YoZOSV7paVxv0j6fsTYf1BAdoY1WU8v1mBuJ-RZNaGuVM71VPA>
 <xme:Kty0YjbvQOG4ULWgr1ObNGjwvLRHhqjzNqOiVjHskDQyFZ3siysZ5ybl6iojiZ5HR
 -TSos-s9fKE4GOa5OY>
X-ME-Received: <xmr:Kty0Yi-2uJBNQfUGBb_BKJXTX9HlKSOhth53w2Wj3dmvnX2hjXNGx824_QsWpDOAJFh7joTOPDSW5qj9aphQ0fJE8lkHnXblHctoYQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudefjedgudeifecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefhvfevufffkfgjfhggtgesghdtreertddtudenucfhrhhomheprfhhihhl
 ihhpucfotgfirhgrthhhuceophhhihhlihhpsehphhhilhhiphhmtghgrhgrthhhrdgtoh
 hmqeenucggtffrrghtthgvrhhnpeekgfduteefuefhjeehieeiuefhtdfgtdeuueekledu
 ffejjeffueehffelhfffkeenucffohhmrghinhepghhnuhdrohhrghenucevlhhushhtvg
 hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehphhhilhhiphesphhhihhl
 ihhpmhgtghhrrghthhdrtghomh
X-ME-Proxy: <xmx:Kty0Yio4i4zCiotb0Y8dn-ofPoiC3vjBGKvTcKIfu-hmkTyFm-CN4g>
 <xmx:Kty0YjpquFrSgyeCHWK5zoJBNSPQzigl4YWhptk5XwgJfJ484DNPmQ>
 <xmx:Kty0YgTzUwouph_HZYyuD-4etPcRAPdGCZb1SPjKODo0oHIfuBWZFw>
 <xmx:Kty0Ykl-q8GlWPt6qLsODWV8InUkTKC8P2J__4f0dpr-dn8J-EWZLA>
Feedback-ID: i2b1146f3:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu,
 23 Jun 2022 17:33:30 -0400 (EDT)
From: Philip McGrath <philip@HIDDEN>
To: Ludovic =?ISO-8859-1?Q?Court=E8s?= <ludo@HIDDEN>
Subject: Re: bug#56050: [PATCH] home: services: environment-variables: Fix XDG
 base directories.
Date: Thu, 23 Jun 2022 17:33:16 -0400
Message-ID: <10145966.nUPlyArG6x@avalon>
In-Reply-To: <871qvg303w.fsf@HIDDEN>
References: <c8f5f8b21bc299011bd598e9bbdd3d19999d1071.1655528190.git.philip@HIDDEN>
 <871qvg303w.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart2233006.iZASKD2KPV";
 micalg="pgp-sha512"; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 56050
Cc: 56050 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--nextPart2233006.iZASKD2KPV
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="iso-8859-1"; protected-headers="v1"
From: Philip McGrath <philip@HIDDEN>
To: Ludovic =?ISO-8859-1?Q?Court=E8s?= <ludo@HIDDEN>
Cc: 56050 <at> debbugs.gnu.org
Date: Thu, 23 Jun 2022 17:33:16 -0400
Message-ID: <10145966.nUPlyArG6x@avalon>
In-Reply-To: <871qvg303w.fsf@HIDDEN>

On Wednesday, June 22, 2022 4:38:11 PM EDT Ludovic Court=E8s wrote:
> Philip McGrath <philip@HIDDEN> skribis:
> > When the environment initialization script is run, XDG_DATA_DIRS and/or
> > XDG_CONFIG_DIRS may be empty or unset, in which case we must use their
> > respective defaults from the specification, rather than ending the value
> > with a trailing ":". For further discussion, see
> > <https://lists.gnu.org/archive/html/help-guix/2022-05/msg00147.html>.
> >=20
> > * gnu/home/services.scm
> > (environment-variables->setup-environment-script): Use conditional
> > parameter expansion for XDG_DATA_DIRS and XDG_CONFIG_DIRS.
>=20
> [...]
>=20
> > +++ b/gnu/home/services.scm
> > @@ -208,7 +208,7 @@ (define
> > (environment-variables->setup-environment-script vars)>=20
> >  case $XDG_DATA_DIRS in
> > =20
> >    *$HOME_ENVIRONMENT/profile/share*) ;;
> >=20
> > -  *) export XDG_DATA_DIRS=3D$HOME_ENVIRONMENT/profile/share:$XDG_DATA_=
DIRS
> > ;; +  *) export
> > XDG_DATA_DIRS=3D$HOME_ENVIRONMENT/profile/share:${XDG_DATA_DIRS:-/usr/l=
ocal
> > /share/:/usr/share/} ;;
> What about doing it this way:
>=20
>   export
> "XDG_DATA_DIRS=3D$HOME_ENVIRONMENT/profile/share${XDG_DATA_DIRS:+:}$XDG_D=
ATA_
> DIRS"
>=20
> That would avoid adding /usr, which makes little sense for Guix and
> could lead to bad surprises on foreign distros, such as loading
> incompatible data from the host distro.
>=20
> WDYT?
>=20
> >  case $XDG_CONFIG_DIRS in
> > =20
> >    *$HOME_ENVIRONMENT/profile/etc/xdg*) ;;
> >=20
> > -  *) export
> > XDG_CONFIG_DIRS=3D$HOME_ENVIRONMENT/profile/etc/xdg:$XDG_CONFIG_DIRS ;;=
 +=20
> > *) export
> > XDG_CONFIG_DIRS=3D$HOME_ENVIRONMENT/profile/etc/xdg:${XDG_CONFIG_DIRS:-=
/etc
> > /xdg} ;;
> Same question here, though /etc/xdg is a bit less problematic as it
> could exist on Guix System too.
>=20

Unfortunately this doesn't work: on a foreign distro (concretely, for me, K=
ubuntu 22.04) when XDG_CONFIG_DIRS isn't set globally, this would expand eq=
uivalent to just:

    XDG_CONFIG_DIRS=3D$HOME_ENVIRONMENT/profile/etc/xdg

Arguably, that's slightly better than ending with a trailing ":", since the=
 semantics of an empty element in or at the end of the path list doesn't se=
em to be defined by the specification. However, it leaves me with the same =
problem: SDDM can't find the configuration it needs to start my KDE Plasma =
session successfully.

I do see how /usr would not make a lot of sense for Guix System. Since thos=
e paths are written into the spec for empty or unset variables, it seems li=
ke Guix System probably should arrange for all of the XDG variables to be s=
et to something non-empty very early, maybe in /etc/profile itself.

I based this patch on the file that gets installed as /etc/profile.d/guix.s=
h (I haven't found its source yet). Maybe we could leave this code alone if=
 we change that file, instead? Then, both on Guix System and on foreign dis=
tros, some system-wide code would be responsible for initializing these sea=
rch paths, and we could assume in contexts like this that they are explicit=
ly set and not empty.

One catch is that, right now, this is what was installed for me into /etc/p=
rofile.d/guix.sh:

```
# _GUIX_PROFILE: `guix pull` profile
_GUIX_PROFILE=3D"$HOME/.config/guix/current"
if [ -L $_GUIX_PROFILE ]; then
  export PATH=3D"$_GUIX_PROFILE/bin${PATH:+:}$PATH"
  # Export INFOPATH so that the updated info pages can be found
  # and read by both /usr/bin/info and/or $GUIX_PROFILE/bin/info
  # When INFOPATH is unset, add a trailing colon so that Emacs
  # searches 'Info-default-directory-list'.
  export INFOPATH=3D"$_GUIX_PROFILE/share/info:$INFOPATH"
fi

# GUIX_PROFILE: User's default profile
GUIX_PROFILE=3D"$HOME/.guix-profile"
[ -L $GUIX_PROFILE ] || return
GUIX_LOCPATH=3D"$GUIX_PROFILE/lib/locale"
export GUIX_PROFILE GUIX_LOCPATH

[ -f "$GUIX_PROFILE/etc/profile" ] && . "$GUIX_PROFILE/etc/profile"

# set XDG_DATA_DIRS to include Guix installations
export XDG_DATA_DIRS=3D"$GUIX_PROFILE/share:${XDG_DATA_DIRS:-/usr/local/sha=
re/:/usr/share/}"
```

but $HOME/.guix-profile doesn't exist for me (only $HOME/.guix-home), so th=
is script exits without setting GUIX_LOCPATH or XDG_DATA_DIRS. Maybe someth=
ing about that should change?

=2DPhilip
--nextPart2233006.iZASKD2KPV
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part.
Content-Transfer-Encoding: 7Bit

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE9GWrrNY3rqwUFVXPygNjjfo/HHoFAmK03BwACgkQygNjjfo/
HHpzdQ/+LLJJdwhXvKCVZEacdIOCoOsyOPerGZkKTCEKSzauB84iBt/rBtA7TJIO
0xTp8PDNF2x/wE/UzLpd4RShwrummsxkSeVVo1fys7Kjf30/1fn2cHMjqGn2oORK
XGkN7eX+pIjQntjUP5hrf7Xi47uyp/F4zCFTFT1SceJ+FUghGtDRI8K61a+ktguD
Qf5Q4R0sE8heuX3+l5CPGoNt2Zq0O0LQ6OJqGM9tsjlGqG3FJrrLbAqiR0cqsweA
ea54z1bgJeZzwBKjNpztCy+JamuueVoAw7IwF3wge2DIkO5II41G9usHM0rBIMFK
t3rlS4JELRkNfBykZVvG6krAAfXKweQrI6AgeKP8puXRGzkXPdfQ8H9SL1IL0Dat
IbZmgxydav2oHVeW9a9Q0ryph2zeZBwe5XicbjBRQKPMHO4NnIa/Cl7Tch9kaw8i
cwAVjE/7vbqj9xiCavoZpMkLbAS7VtgoddxBJgk7+SZD49L4JmnOwqBSv1Uss6nk
ADw+GgAjEB8nghHfBqwe0n5TC3glSET3rJ8iID7TAJKwj+1LQK7epLNaBtaaQSvy
K3ZJM+Su7W3Dtnmce5HitGy8lanD8I068zLaCPmr3//7eJCNYXkPoQ5/MZ4w5iv9
QUOyMfeKQiGK8UtFe20lv58ztrLNjDOrhE1TvS2oGVM+BfAxWWY=
=w65O
-----END PGP SIGNATURE-----

--nextPart2233006.iZASKD2KPV--







Information forwarded to guix-patches@HIDDEN:
bug#56050; Package guix-patches. Full text available.

Message received at 56050 <at> debbugs.gnu.org:


Received: (at 56050) by debbugs.gnu.org; 22 Jun 2022 20:38:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 22 16:38:29 2022
Received: from localhost ([127.0.0.1]:36707 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o477F-0008HY-LI
	for submit <at> debbugs.gnu.org; Wed, 22 Jun 2022 16:38:29 -0400
Received: from eggs.gnu.org ([209.51.188.92]:34246)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1o477D-0008HL-G4
 for 56050 <at> debbugs.gnu.org; Wed, 22 Jun 2022 16:38:20 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:51996)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1o4778-0002j7-3O; Wed, 22 Jun 2022 16:38:14 -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=imuQGtbSSwc3O50edoq+ii4sXIEiqP71fDaTQtQdUeE=; b=aYX4BFOn7mD9DxZCpwod
 1XT0HU4PGnzBKhaenAkv9irHJcQLIJKRX6Qw1BBlZY1k8u3hZDoeYK0Zy9wid9FZafZ38LwW5zeUr
 q1ceXOoQRehUFvP141yJ6vITXc9hmFMam9GM7Gz2sNR6TkMlNEV6Xfzsvb+KknFBKuJdd6ID+fIC1
 5mrl6QFegz/L2L95yRu6lFRbbxtEzFFRjVrbngVZonnxbE+CujHqsNBBNBUsqiwCra+nmMewMIcR7
 qx1W8rCMVFuEH/Ni6hW9s4WK4eaBBRmf8dx+zwS430j7/K2PgIr0aS44nPG4gtruYJTuKQYOr/1qE
 FrelAmGf/AkC6Q==;
Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:51274
 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1o4777-0003t4-NS; Wed, 22 Jun 2022 16:38:13 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Philip McGrath <philip@HIDDEN>
Subject: Re: bug#56050: [PATCH] home: services: environment-variables: Fix
 XDG base directories.
References: <c8f5f8b21bc299011bd598e9bbdd3d19999d1071.1655528190.git.philip@HIDDEN>
Date: Wed, 22 Jun 2022 22:38:11 +0200
In-Reply-To: <c8f5f8b21bc299011bd598e9bbdd3d19999d1071.1655528190.git.philip@HIDDEN>
 (Philip McGrath's message of "Sat, 18 Jun 2022 01:25:23 -0400")
Message-ID: <871qvg303w.fsf@HIDDEN>
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: 56050
Cc: 56050 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Philip McGrath <philip@HIDDEN> skribis:

> When the environment initialization script is run, XDG_DATA_DIRS and/or
> XDG_CONFIG_DIRS may be empty or unset, in which case we must use their
> respective defaults from the specification, rather than ending the value
> with a trailing ":". For further discussion, see
> <https://lists.gnu.org/archive/html/help-guix/2022-05/msg00147.html>.
>
> * gnu/home/services.scm
> (environment-variables->setup-environment-script): Use conditional
> parameter expansion for XDG_DATA_DIRS and XDG_CONFIG_DIRS.

[...]

> +++ b/gnu/home/services.scm
> @@ -208,7 +208,7 @@ (define (environment-variables->setup-environment-scr=
ipt vars)
>=20=20
>  case $XDG_DATA_DIRS in
>    *$HOME_ENVIRONMENT/profile/share*) ;;
> -  *) export XDG_DATA_DIRS=3D$HOME_ENVIRONMENT/profile/share:$XDG_DATA_DI=
RS ;;
> +  *) export XDG_DATA_DIRS=3D$HOME_ENVIRONMENT/profile/share:${XDG_DATA_D=
IRS:-/usr/local/share/:/usr/share/} ;;

What about doing it this way:

  export "XDG_DATA_DIRS=3D$HOME_ENVIRONMENT/profile/share${XDG_DATA_DIRS:+:=
}$XDG_DATA_DIRS"

That would avoid adding /usr, which makes little sense for Guix and
could lead to bad surprises on foreign distros, such as loading
incompatible data from the host distro.

WDYT?

>  case $XDG_CONFIG_DIRS in
>    *$HOME_ENVIRONMENT/profile/etc/xdg*) ;;
> -  *) export XDG_CONFIG_DIRS=3D$HOME_ENVIRONMENT/profile/etc/xdg:$XDG_CON=
FIG_DIRS ;;
> +  *) export XDG_CONFIG_DIRS=3D$HOME_ENVIRONMENT/profile/etc/xdg:${XDG_CO=
NFIG_DIRS:-/etc/xdg} ;;

Same question here, though /etc/xdg is a bit less problematic as it
could exist on Guix System too.

Thanks,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#56050; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 18 Jun 2022 05:25:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 18 01:25:36 2022
Received: from localhost ([127.0.0.1]:47392 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o2Qxj-0006yV-Ud
	for submit <at> debbugs.gnu.org; Sat, 18 Jun 2022 01:25:36 -0400
Received: from lists.gnu.org ([209.51.188.17]:57828)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1o2Qxf-0006yK-ME
 for submit <at> debbugs.gnu.org; Sat, 18 Jun 2022 01:25:35 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:44456)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <philip@HIDDEN>)
 id 1o2Qxf-0006F2-Eh
 for guix-patches@HIDDEN; Sat, 18 Jun 2022 01:25:31 -0400
Received: from mail-qv1-xf30.google.com ([2607:f8b0:4864:20::f30]:33389)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <philip@HIDDEN>)
 id 1o2Qxc-0006mP-1Q
 for guix-patches@HIDDEN; Sat, 18 Jun 2022 01:25:29 -0400
Received: by mail-qv1-xf30.google.com with SMTP id 89so9250331qvc.0
 for <guix-patches@HIDDEN>; Fri, 17 Jun 2022 22:25:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=philipmcgrath.com; s=google;
 h=from:to:subject:date:message-id:mime-version
 :content-transfer-encoding;
 bh=QjwKyJ2e+bvjFXk+UXmFvz9mwHUCHBZquJEGkyogtfA=;
 b=FwSFe5aXL1rKQp2PHmWJ+fIuqEZCDvyvIm1ZgsdYjtLMGO8RswKrEYabEuZ8Gv1kzm
 ips2tBjnFnXXo6e1tc2lJkkAR8VSRXTfLkvw4XWYgNBaNF5FmVCL7SpRafZxmlJfC6/P
 j27cklAQujgOEH8HhXzd2wyVXw0RzTBcT2u8KBlUBHXWsr+8qLE44BWZBAxJBF0kp8ao
 QC4+1XkNyHIQxRi9MeAL1ylgMrx5VeH59z5UJdfMWqxKmm9jqDq1Lp60o/O40wCqZyAt
 hI7hIcykjAv6pkI+j3/Unk41exhmP+2faSwn4Mx2hR2ESREJzRN51/lTdXUGLQF3km1I
 G2WQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:subject:date:message-id:mime-version
 :content-transfer-encoding;
 bh=QjwKyJ2e+bvjFXk+UXmFvz9mwHUCHBZquJEGkyogtfA=;
 b=V+4utEVi+p2so8s1I9RUcAipM9dIRL6ZCxh2USodtErosdlGjOkgWbhBvN7ybMFMBU
 xSxIFmH2YGo3UEm1mgNHbVuH92EuVkVna9KUua5yVzKEY59tFhKPBiMIA2s1ZwziyNT4
 HSclKVdEesg3keX2ydl4nW15pdUz94mGcoR/bEKodnzWgxlln/fDepb+RPfhk3nr1K3p
 usFJJzWjBHEF715rY9p5Lf7yC1VZLQaIc1HH12pIeph34ng5pMAEUWdLgAoxU5voi9pZ
 Ngr+Qw1b7VsE6mbL8W9wqEMEvG3m1nqWTqz201d7/d6SrP1HODAQykaW/QIiOyev5u6k
 q2ow==
X-Gm-Message-State: AJIora9VeGtapEtOWQ6BTndMrAmGnjd9aTbtPxPevHB/bSW8UdMku2fi
 P+F/1qw/MenetcmKg3aRVzJjjaG8d7tC9tVpkDc=
X-Google-Smtp-Source: AGRyM1sbX938k9eUZxKz3mNjRRFjNzWMoGRRCvQUAX+VC2XTunGntBDFYzETRqPtPZ7OIGRNOT8Y3w==
X-Received: by 2002:ad4:5cab:0:b0:464:643b:1099 with SMTP id
 q11-20020ad45cab000000b00464643b1099mr11205147qvh.95.1655529925033; 
 Fri, 17 Jun 2022 22:25:25 -0700 (PDT)
Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51])
 by smtp.gmail.com with UTF8SMTPSA id
 ay35-20020a05620a17a300b006a716fed4d6sm5568971qkb.50.2022.06.17.22.25.24
 for <guix-patches@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Fri, 17 Jun 2022 22:25:24 -0700 (PDT)
From: Philip McGrath <philip@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] home: services: environment-variables: Fix XDG base
 directories.
Date: Sat, 18 Jun 2022 01:25:23 -0400
Message-Id: <c8f5f8b21bc299011bd598e9bbdd3d19999d1071.1655528190.git.philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
MIME-Version: 1.0
X-Debbugs-CC: Philip McGrath <philip@HIDDEN>
Content-Transfer-Encoding: 8bit
Received-SPF: permerror client-ip=2607:f8b0:4864:20::f30;
 envelope-from=philip@HIDDEN; helo=mail-qv1-xf30.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 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_NONE=-0.0001, SPF_HELO_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01,
 T_SPF_PERMERROR=0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.7 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.7 (--)

When the environment initialization script is run, XDG_DATA_DIRS and/or
XDG_CONFIG_DIRS may be empty or unset, in which case we must use their
respective defaults from the specification, rather than ending the value
with a trailing ":". For further discussion, see
<https://lists.gnu.org/archive/html/help-guix/2022-05/msg00147.html>.

* gnu/home/services.scm
(environment-variables->setup-environment-script): Use conditional
parameter expansion for XDG_DATA_DIRS and XDG_CONFIG_DIRS.
---

MANPATH and INFOPATH don't have this problem because they have
well-defined behavior for a trailing ":".

XCURSOR_PATH, on the other hand, does seem to have a similar problem. In
my KDE Plasma Wayland session, at least, omiting the default caused the
cursor to disappear when hovering over the border of a window. I could
fix this on my Debian-based distribution by putting:

    export XCURSOR_PATH="${XCURSOR_PATH:-/usr/share/icons:/usr/share/pixmaps}"

in a file under "/etc/profile.d", but I'm not sure if that default is
truly portable even among FHS-based distros. For example, it sounds like
Gentoo uses "/usr/share/cursors/xorg-x11". So I haven't tried to address
XCURSOR_PATH for now.

  -Philip

 gnu/home/services.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/home/services.scm b/gnu/home/services.scm
index 5ee3357792..ba14d8a119 100644
--- a/gnu/home/services.scm
+++ b/gnu/home/services.scm
@@ -208,7 +208,7 @@ (define (environment-variables->setup-environment-script vars)
 
 case $XDG_DATA_DIRS in
   *$HOME_ENVIRONMENT/profile/share*) ;;
-  *) export XDG_DATA_DIRS=$HOME_ENVIRONMENT/profile/share:$XDG_DATA_DIRS ;;
+  *) export XDG_DATA_DIRS=$HOME_ENVIRONMENT/profile/share:${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/} ;;
 esac
 case $MANPATH in
   *$HOME_ENVIRONMENT/profile/share/man*) ;;
@@ -220,7 +220,7 @@ (define (environment-variables->setup-environment-script vars)
 esac
 case $XDG_CONFIG_DIRS in
   *$HOME_ENVIRONMENT/profile/etc/xdg*) ;;
-  *) export XDG_CONFIG_DIRS=$HOME_ENVIRONMENT/profile/etc/xdg:$XDG_CONFIG_DIRS ;;
+  *) export XDG_CONFIG_DIRS=$HOME_ENVIRONMENT/profile/etc/xdg:${XDG_CONFIG_DIRS:-/etc/xdg} ;;
 esac
 case $XCURSOR_PATH in
   *$HOME_ENVIRONMENT/profile/share/icons*) ;;

base-commit: 3154b582567539d8d607344fbd03a3d8456f66cb
-- 
2.32.0





Acknowledgement sent to Philip McGrath <philip@HIDDEN>:
New bug report received and forwarded. Copy sent to philip@HIDDEN, guix-patches@HIDDEN. Full text available.
Report forwarded to philip@HIDDEN, guix-patches@HIDDEN:
bug#56050; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 3 Jan 2023 22:30:02 UTC

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