GNU bug report logs - #48434
[PATCH] guile: allow pre-inst-env inject local paths

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: Sergei Trofimovich <slyfox@HIDDEN>; Keywords: patch; dated Sat, 15 May 2021 09:53:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

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


Received: (at 48434) by debbugs.gnu.org; 17 Aug 2021 12:16:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 17 08:16:04 2021
Received: from localhost ([127.0.0.1]:52014 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFy0i-0002zy-0r
	for submit <at> debbugs.gnu.org; Tue, 17 Aug 2021 08:16:04 -0400
Received: from mail-wm1-f49.google.com ([209.85.128.49]:47023)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <slyich@HIDDEN>) id 1mFy0f-0002zN-TD
 for 48434 <at> debbugs.gnu.org; Tue, 17 Aug 2021 08:16:02 -0400
Received: by mail-wm1-f49.google.com with SMTP id
 h24-20020a1ccc180000b029022e0571d1a0so1981362wmb.5
 for <48434 <at> debbugs.gnu.org>; Tue, 17 Aug 2021 05:16:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=date:from:to:cc:subject:message-id:in-reply-to:references
 :mime-version; bh=P4UBpxDmM7cMew/XT54VKLNmZ/hMOdXMSpOsuPvifKM=;
 b=P36q0DkAIIO6WC7xGhKe5KBRfT9jb2x3DLOnaVG2LAmgGr4E5KwK84XNppgx61jHQ1
 n7fMjb+zBTi12Y104VUaXb8I9518AqqRPMXtjGRgkj0sc2J2N+1dLySgZWny2ASC78Ct
 QzrdmiaIkUYfqRkT9JSh+Hmpab1+hRNkE0Pcszl60qDhiR6A5lA8DfUCasgU3wYWNRxb
 YHUmQ9IfeijRUMAyMgNNqt5QvJsmwZkdztwPtsS+prs14llDMQU09hUd8iVD5eiBnMsw
 5hHE5l/6waLmbm8Fc0Q115w+9occFNS9Q2YcAo1sNuvgSRUMxbR7iQ3Oafp4HDPtvAU5
 4osA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to
 :references:mime-version;
 bh=P4UBpxDmM7cMew/XT54VKLNmZ/hMOdXMSpOsuPvifKM=;
 b=QpFSuRHgrersnnzxKdzMWu/pwkDe3nhzt92zc3w9rbYGAlqAe2I1FglYYgevBHxLF1
 Orw/AcFdooDm7/4ONBlil2m5+VtDqEDLvEDWpmU658C8h1WSrDXjyByfXzc/d16pOUhQ
 ld0aKGd8Z/Vzy36O3S5EWG6+TpDU96Iqdp1w7cZTQIH4EMRJfX7l2JXkS+oEgBB0F8we
 mNq9vSc6+LB/vOWAch3uXXF7imrW331D8iPB2F0lfneLBjvzUiPwniCrBKjJCimlcAxc
 FuruUSjhB+2e0x99SI7mEbLDNZR3XGvaVTxjFL5WfOIrCffa6WZobiBk4639qzdSCNNI
 tXUA==
X-Gm-Message-State: AOAM533RyNCmubdlFe8lgz839wDv6f4utdTO61Pxt8GutJnNZErRmqLl
 +K0pk+BlCbEZ1/Z0OQlY+zQ=
X-Google-Smtp-Source: ABdhPJykCftrEgrFLS8ZntG4jMl2xh7TuijcGC9NO+VsCIsiiJTPhbN6+MqBon5Q6Kv8qKSV3Bbwdw==
X-Received: by 2002:a05:600c:1d11:: with SMTP id
 l17mr2977336wms.58.1629202556029; 
 Tue, 17 Aug 2021 05:15:56 -0700 (PDT)
Received: from zn3 (host81-129-83-184.range81-129.btcentralplus.com.
 [81.129.83.184])
 by smtp.gmail.com with ESMTPSA id v17sm2778755wro.45.2021.08.17.05.15.55
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 17 Aug 2021 05:15:55 -0700 (PDT)
Date: Tue, 17 Aug 2021 13:15:51 +0100
From: Sergei Trofimovich <slyich@HIDDEN>
To: Maxime Devos <maximedevos@HIDDEN>
Subject: Re: [bug#48434] [PATCH] guile: allow pre-inst-env inject local paths
Message-ID: <20210817131551.68222eee@zn3>
In-Reply-To: <1c0ddae642a3ffc341ae8d904c8fc2d5eecfef5f.camel@HIDDEN>
References: <20210515095227.3245343-1-slyfox@HIDDEN>
 <20210816182822.654d3e1f@zn3>
 <430b0e953bf76a13ff2290004d3e7ac1f0bdef7c.camel@HIDDEN>
 <20210817092830.7a86d795@zn3>
 <1c0ddae642a3ffc341ae8d904c8fc2d5eecfef5f.camel@HIDDEN>
X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.29; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="Sig_/ZqBk.NEHdqYiVw9YX+=nKx4";
 protocol="application/pgp-signature"; micalg=pgp-sha512
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 48434
Cc: 48434 <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 (-)

--Sig_/ZqBk.NEHdqYiVw9YX+=nKx4
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

On Tue, 17 Aug 2021 12:24:50 +0200
Maxime Devos <maximedevos@HIDDEN> wrote:

> Sergei Trofimovich schreef op di 17-08-2021 om 09:28 [+0100]:
> > It's a bit hard to test right now as guix-master is slightly broken due=
 to
> > missing installed files when installed as a primary package manager, bu=
t at
> > least fetch part works fine:
> >=20
> > $ guix pull
> > Updating channel 'guix' from Git repository at 'https://git.savannah.gn=
u.org/git/guix.git'...
> > Authenticating channel 'guix', commits 9edb3f6 to f7094f5 (29 new commi=
ts)...
> > Building from this channel:
> >   guix      https://git.savannah.gnu.org/git/guix.git   f7094f5 =20
>=20
> I meant something like "$ guix pull --url=3D. --commit=3D... --root=3Dgui=
x0"
> or "$ ./pre-inst-env guix pull --url=3D. --commit=3D... --root=3Dguix1" or
> "$ ./pre-inst-env guix pull --root=3Dguix2".  Simply running "$
> guix pull",
> outside "./pre-inst-env", would simply test the (unpatched) guix you have
> installed (with "make install" or "apt-get install guix" or "guix pull"),
> and doesn't test the patched guix.

Ah. I did install patched guix into the system (and that's how
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D50090).

I still don't quite understand if channel we pull from also should be patch=
ed.
Let's assume it should:

  $ LANG=3DC ./pre-inst-env guix pull --url=3D. --commit=3De9029ed5eae45ee8=
f53f055ee66f9bce353cac84 --root=3Dguix0
  guix pull: error: root=3Dguix0: unrecognized option

I'm not sure what --root=3D does. Is it a user name? Or a profile name?

--=20

  Sergei

--Sig_/ZqBk.NEHdqYiVw9YX+=nKx4
Content-Type: application/pgp-signature
Content-Description: Цифровая подпись OpenPGP

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQKTBAEBCgB9FiEE+g11JqJ4cL44QkmN7V5F4G8qwpMFAmEbqHdfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEZB
MEQ3NTI2QTI3ODcwQkUzODQyNDk4REVENUU0NUUwNkYyQUMyOTMACgkQ7V5F4G8q
wpNUOhAApkFGbFmIRphayF0JPO+gPl/p7a9ZxeDnaaviZ7SjFS98Nb3r6wKW2Fkj
ztMnAT8H9ZkFumNXVvCwqv8LGd4eLy1OdcYT0rR1iYJJxvVrlcEh3dN3/8rRY3qE
qCDFG7rjnP/QxcNRgRHw2HY8BR5X94Yet68Bvi/d59FZ5104tSvAc0aVUITIZVVh
sarjfTLSWhJOtZ83JfbCQ5wnfr2gA3OZi4+J8hQdOqERWXN7te538KYKAfglJy0A
5F/EvsSSu1i3jtqyvSAaF2EbEPaj1iJdqO1RyU43cSUVXzQTvouIk3FIiclvCpNw
waonZyKuer3lxBmrh2766tp9HEh4bL036Mu4wgYbXkB7jQWbEd2LoLorZsJHPgVm
IFGhQXjfHqkRIW9QlkwLOnY+4ymvSyTXnVdejkx13Y24uSNYs9OFJVl40UmPT7hi
FKsgzg5eypv73J/FM28boaYZov7Ck91tiu0EYvULhnUAQC+UjyRwN7SGSdpk9FoW
SA8KAeXAhNizmNpNxQAF92umff25PszqJL2lWfeIybvHSl/aQlxQBN8F9nbb73zE
Sj73W4Wka+Sxy6iC8SBDXXSfAYeKKJ/jJ3xDHH/hWIY/xstMLE74P1ygMlUiwhXB
Z30effVGFMNqKM+j32ij/+d6MX7nxf6pukqt6Fn6nxiMP0Z+Bhw=
=hbyi
-----END PGP SIGNATURE-----

--Sig_/ZqBk.NEHdqYiVw9YX+=nKx4--




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

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


Received: (at 48434) by debbugs.gnu.org; 17 Aug 2021 10:25:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 17 06:25:02 2021
Received: from localhost ([127.0.0.1]:51790 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFwHC-000468-BC
	for submit <at> debbugs.gnu.org; Tue, 17 Aug 2021 06:25:02 -0400
Received: from xavier.telenet-ops.be ([195.130.132.52]:51708)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1mFwH6-00045v-NF
 for 48434 <at> debbugs.gnu.org; Tue, 17 Aug 2021 06:24:56 -0400
Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be
 ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d])
 by xavier.telenet-ops.be with bizsmtp
 id iaQq2500X0mfAB401aQrq2; Tue, 17 Aug 2021 12:24:51 +0200
Message-ID: <1c0ddae642a3ffc341ae8d904c8fc2d5eecfef5f.camel@HIDDEN>
Subject: Re: [bug#48434] [PATCH] guile: allow pre-inst-env inject local paths
From: Maxime Devos <maximedevos@HIDDEN>
To: Sergei Trofimovich <slyich@HIDDEN>
Date: Tue, 17 Aug 2021 12:24:50 +0200
In-Reply-To: <20210817092830.7a86d795@zn3>
References: <20210515095227.3245343-1-slyfox@HIDDEN>
 <20210816182822.654d3e1f@zn3>
 <430b0e953bf76a13ff2290004d3e7ac1f0bdef7c.camel@HIDDEN>
 <20210817092830.7a86d795@zn3>
Content-Type: multipart/signed; micalg="pgp-sha512";
 protocol="application/pgp-signature"; boundary="=-UNaloqV9SyNhAzBMjXlT"
User-Agent: Evolution 3.34.2 
MIME-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21;
 t=1629195891; bh=CTNNVRN0sCr0TpVAc3Tpy34iRGyRqINW6VCOCgNQn+k=;
 h=Subject:From:To:Cc:Date:In-Reply-To:References;
 b=b69LDu7AJGZQ9r6O6/inkLB5M0QO3rXU4I3XbTecuUK0oT3tYLTz4lXC42c2QcNu9
 2sW1Y4flrZh6UP+en8c583yM3/MypafvozQ6LnQcqabmdaew4iU0bSgFDwPK6t8gRm
 zLYayiDmzVw4/K/khqkO+63BZOOwrMp5G6EHEKH27Wb9UxPSBXoy85AwNzKZkjeBz0
 idG2xfkHfsm6FutDQYGMxt+fe6Ms6mapbCzRTXZtwowtbZO8DOY7AEsYlGasMB/gK1
 RRKS2OQchGIqrnxEgizMz5lpmafWqptDHIK7k8s0K7+6hRmPH54HbF7W3ZVnOUhJ+X
 +fIc6s5IqhLfA==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 48434
Cc: 48434 <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 (-)


--=-UNaloqV9SyNhAzBMjXlT
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Sergei Trofimovich schreef op di 17-08-2021 om 09:28 [+0100]:
> It's a bit hard to test right now as guix-master is slightly broken due t=
o
> missing installed files when installed as a primary package manager, but =
at
> least fetch part works fine:
>=20
> $ guix pull
> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.=
org/git/guix.git'...
> Authenticating channel 'guix', commits 9edb3f6 to f7094f5 (29 new commits=
)...
> Building from this channel:
>   guix      https://git.savannah.gnu.org/git/guix.git   f7094f5

I meant something like "$ guix pull --url=3D. --commit=3D... --root=3Dguix0=
"
or "$ ./pre-inst-env guix pull --url=3D. --commit=3D... --root=3Dguix1" or
"$ ./pre-inst-env guix pull --root=3Dguix2".  Simply running "$
guix pull",
outside "./pre-inst-env", would simply test the (unpatched) guix you have
installed (with "make install" or "apt-get install guix" or "guix pull"),
and doesn't test the patched guix.

Greetings,
Maxime.

--=-UNaloqV9SyNhAzBMjXlT
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYRuOchccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7tw8AQCokkS8Gg1Ix1CIl1Le1GSRfGHs
k6d7RXNLeoB11b8JtwEA9VIokkouqtdTpcn5QbrgsFnt1a8jTR85CUPX+1se/QU=
=5YcE
-----END PGP SIGNATURE-----

--=-UNaloqV9SyNhAzBMjXlT--





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

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


Received: (at 48434) by debbugs.gnu.org; 17 Aug 2021 09:35:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 17 05:35:55 2021
Received: from localhost ([127.0.0.1]:51702 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFvVj-0002pd-5l
	for submit <at> debbugs.gnu.org; Tue, 17 Aug 2021 05:35:55 -0400
Received: from mail-wr1-f53.google.com ([209.85.221.53]:44678)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <slyich@HIDDEN>) id 1mFvVh-0002pQ-CP
 for 48434 <at> debbugs.gnu.org; Tue, 17 Aug 2021 05:35:54 -0400
Received: by mail-wr1-f53.google.com with SMTP id x12so27582411wrr.11
 for <48434 <at> debbugs.gnu.org>; Tue, 17 Aug 2021 02:35:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=date:from:to:cc:subject:message-id:in-reply-to:references
 :mime-version; bh=uedwg5W9z6ZKQW88Ey5UaoofH+mZgD+/XyiDZRf39nc=;
 b=RxyPQmievGMaPasWoMk6mCaqMTHhuxlSJ3IMt/QQ9j0d27vslDm6EJZl7gl5AcxSdR
 36dgshO12s7MhZNQF1hsYv7rir0bWlO2240zmcArIf8djdvHYpve7r7lNsoV0J4s0lDD
 eAeTj145ErJ5uy1ApcBZpjqGZvchn1MwWNaUtqC3UuKqv3JJVSSD0Jf040GTp3tC10nA
 KKkcTuAyOu9iVxMGo+2Y7Roud/xr4rVaGnjuRv/0ZGKxzqOoZpL2CzBTPQnOgJeLMKUV
 bmSaXXxz7pwinOq3UgJhwk3q3RWm2TPmiBypKA/63lIbK9plKETXYqyWyrYhotXTTWVW
 f5nQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to
 :references:mime-version;
 bh=uedwg5W9z6ZKQW88Ey5UaoofH+mZgD+/XyiDZRf39nc=;
 b=aisSvY5Yy1x0p7v8y2xX2BDAoKE3b4cQZ134uQSsFJD3cGQepLBum8mD5iBeJzB2Xs
 GJoSKGzB3RBQwJobUNvsFqp6QwWqI4T+6YAX6Qi9cyGKuT+An2onR34ldUgVUCg8IYBL
 Sr5SwwSDUCOayQxMcv+DF4jAFBxnuY/3kJoo4WD9J+gnklnWFE3BaB7Oc5y7CXfDvy6Z
 T2uaLX+PXJ67VK8tSKcp/l3aiGWg6pD958OWjRJaNrOR8YlFbfPKvBNV7DeEJPyLb/9n
 yRfuQ+VsbNWvK4FVUufq0h9wR+0EaTDwCYtYEsLQ/ZiZgsUau2SUWLz2NvU7apcJ0oSe
 am4Q==
X-Gm-Message-State: AOAM530aGUb7WqQbK6Y3dTDFFeDuFtkMo5TN+Uzt/QZ9dlXCFDhs/pEs
 Bph3kion9l7Ei2Wy+xMs9Sk=
X-Google-Smtp-Source: ABdhPJwqAw1PAs9mSIj3Pw/g56Jz2M5yct0ExL9C0Bwwg9ICipdwe7BNa4M8rrFKrLEgxjo2gJdYag==
X-Received: by 2002:a5d:474d:: with SMTP id o13mr2817920wrs.256.1629192947393; 
 Tue, 17 Aug 2021 02:35:47 -0700 (PDT)
Received: from zn3 (host81-129-83-184.range81-129.btcentralplus.com.
 [81.129.83.184])
 by smtp.gmail.com with ESMTPSA id e10sm1705573wrt.82.2021.08.17.02.35.44
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 17 Aug 2021 02:35:46 -0700 (PDT)
Date: Tue, 17 Aug 2021 10:35:39 +0100
From: Sergei Trofimovich <slyich@HIDDEN>
To: Maxime Devos <maximedevos@HIDDEN>
Subject: Re: [bug#48434] [PATCH] guile: allow pre-inst-env inject local paths
Message-ID: <20210817103539.205800bd@zn3>
In-Reply-To: <20210817092830.7a86d795@zn3>
References: <20210515095227.3245343-1-slyfox@HIDDEN>
 <20210816182822.654d3e1f@zn3>
 <430b0e953bf76a13ff2290004d3e7ac1f0bdef7c.camel@HIDDEN>
 <20210817092830.7a86d795@zn3>
X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.29; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="Sig_/3Z31k7RZtJpa6VifmqWhZGb";
 protocol="application/pgp-signature"; micalg=pgp-sha512
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 48434
Cc: 48434 <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 (-)

--Sig_/3Z31k7RZtJpa6VifmqWhZGb
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Tue, 17 Aug 2021 09:28:30 +0100
Sergei Trofimovich <slyich@HIDDEN> wrote:

> On Mon, 16 Aug 2021 20:52:48 +0200
> Maxime Devos <maximedevos@HIDDEN> wrote:
>=20
> > Sergei Trofimovich schreef op ma 16-08-2021 om 18:28 [+0100]: =20
> > > On Sat, 15 May 2021 10:52:27 +0100
> > > Sergei Trofimovich <slyfox@HIDDEN> wrote:
> > >    =20
> > > > I observed the problem when tried to run 'guix refresh' from local =
git checkout:
> > > >=20
> > > >     $ strace -f ./pre-inst-env guix refresh -u re2c |& fgrep re2c.s=
cm
> > > >     ...
> > > >     [pid 3014757] openat(AT_FDCWD, "/usr/share/guile/site/3.0/gnu/p=
ackages/re2c.scm.qilB0R",
> > > >         O_RDWR|O_CREAT|O_EXCL, 0600) =3D -1 EACCES (Permission deni=
ed)
> > > >=20
> > > > Attempt to /usr/share happens because local directory override is i=
gnored: =20
>=20
> > The local directory isn't ignored, it's at the end (the effect is about=
 the same though). =20
>=20
> Reworded to: "because local directory override has too low priority".
>=20
> > > > The change keeps GUILE_LOAD_PATH / GUILE_LOAD_COMPILED_PATH for ./p=
re-inst-env.
> > > >=20
> > > > * gnu/packages/aux-files/guile-launcher.c (main): don't ignore
> > > > GUILE_LOAD_PATH / GUILE_LOAD_COMPILED_PATH in GUIX_UNINSTALLED=3D1 =
mode.   =20
> >=20
> > Could you do something like
> >=20
> > #define GUIX_UNINSTALLED 1
> > #if GUIX_UNINSTALLED
> > new behaviour
> > #else
> > OLD BEHAVIOUR
> > #endif
> >=20
> > and change "Makefile.am" to compile two variants of "guile",
> > one with "DGUIX_UNINSTALLED=3D1" which goes into libexec, and another
> > with "DGUIX_UNINSTALLED=3D0" named "$CHECKOUT/guile" which isn't instal=
led
> > anywhere but will be added to PATH by "pre-inst-env", or something like=
 that? =20
>=20
> Attached v2 patch that should solve all the above.
>=20
> Added two 'guile' flavours:
>     inplace/guile (to be used inplace)
>     store/guile (to be installed to libexec)
> While at it moved 'guix-daemon' to 'inplace/' as well to make it clear th=
at
> tests use inplace variant sometimes. Installation location did not change.
>=20
> Also moved scripts/guix to inplace/guix as ./pre-inst-env relies on it to
> be injected to PATH.
>=20
> > Also, "guile-launcher.c" is used by 'quiet-quile" in (guix self).  It s=
hould probably be
> > verified that "guix pull" still works well. =20
>=20
> It's a bit hard to test right now as guix-master is slightly broken due to
> missing installed files when installed as a primary package manager, but =
at
> least fetch part works fine:
>=20
> $ guix pull
> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.=
org/git/guix.git'...
> Authenticating channel 'guix', commits 9edb3f6 to f7094f5 (29 new commits=
)...
> Building from this channel:
>   guix      https://git.savannah.gnu.org/git/guix.git   f7094f5
> Backtrace:
> In ice-9/boot-9.scm:
>    222:29 19 (map1 (((guix store)) ((guix records)) ((guix #)) (#) =E2=80=
=A6))
>    222:29 18 (map1 (((guix records)) ((guix profiles)) ((guix #)) # =E2=
=80=A6))
>    222:29 17 (map1 (((guix profiles)) ((guix discovery)) ((guix =E2=80=A6=
)) =E2=80=A6))
>    222:29 16 (map1 (((guix discovery)) ((guix combinators)) ((# =E2=80=A6=
)) =E2=80=A6))
>    222:29 15 (map1 (((guix combinators)) ((guix channels)) ((# #)) =E2=80=
=A6))
>    222:29 14 (map1 (((guix channels)) ((guix describe)) ((guix #)) =E2=80=
=A6))
>    222:29 13 (map1 (((guix describe)) ((guix sets)) ((guix ui)) (#) =E2=
=80=A6))
>    222:29 12 (map1 (((guix sets)) ((guix ui)) ((guix diagnostics)) =E2=80=
=A6))
>    222:29 11 (map1 (((guix ui)) ((guix diagnostics)) ((guix #)) (#) =E2=
=80=A6))
>    222:29 10 (map1 (((guix diagnostics)) ((guix modules)) ((# #)) # =E2=
=80=A6))
>    222:29  9 (map1 (((guix modules)) ((guix packages)) ((guix #)) # =E2=
=80=A6))
>    222:29  8 (map1 (((guix packages)) ((guix utils)) ((gnu # #)) # =E2=80=
=A6))
>    222:29  7 (map1 (((guix utils)) ((gnu packages base)) ((gnu =E2=80=A6)=
) =E2=80=A6))
>    222:29  6 (map1 (((gnu packages base)) ((gnu packages bash)) (#) =E2=
=80=A6))
>    222:29  5 (map1 (((gnu packages bash)) ((gnu packages hurd)) (#) =E2=
=80=A6))
>    222:29  4 (map1 (((gnu packages hurd)) ((gnu system setuid)) (#) =E2=
=80=A6))
>    222:17  3 (map1 (((gnu system setuid)) ((srfi srfi-1)) ((# #)) # =E2=
=80=A6))
>    3329:6  2 (resolve-interface (gnu system setuid) #:select _ #:hide =E2=
=80=A6)
>   1685:16  1 (raise-exception _ #:continuable? _)
>   1685:16  0 (raise-exception _ #:continuable? _)
>=20
> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> no code for module (gnu system setuid)

With https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D50090 applied 'guix pu=
ll'
works successfully on a multi-user foreign distribution.

--=20

  Sergei

--Sig_/3Z31k7RZtJpa6VifmqWhZGb
Content-Type: application/pgp-signature
Content-Description: Цифровая подпись OpenPGP

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQKTBAEBCgB9FiEE+g11JqJ4cL44QkmN7V5F4G8qwpMFAmEbgutfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEZB
MEQ3NTI2QTI3ODcwQkUzODQyNDk4REVENUU0NUUwNkYyQUMyOTMACgkQ7V5F4G8q
wpPKXw/+OcS0qx0cxflo0VmNqJ4kEUoPtEDLbrkrsZYOTEAaIqkv1Tjp+dZdRb3p
0b/Q+dE5jbKXfSgoMnfju8r1UFjInwwe0rtysH/4wm14dYgHuITSCS2QROmkXgyY
smFW52iRfxYdy7q7rsBnoSSaf3BVwB/5FMP8ytxFosqwb3vmaHX7VurjNNXam3zo
i7zXtz0VV00xcHxLIvF5uOJGqFwQITGridPtNlLOC7JfaOj7bsJwrFpbhmvMiRAd
+YSBVsWXo9Ou57qmbtyd4t5s8EPGt3mzcjXr0xbp2jdWwMXXvSBrQRIMBoMmnVJc
vLuWRsEUaXYJcU6j5yMXG5j0D7Q+Q1eP+K/1vDJj5Eh3IAtPWGJOnQ1DP5/sKnFQ
pf1KmotcmtmUcLn2LBNqUyrmUTvBx4mX3moc5DctNpwCcxV/U/I3Np2+L6TMAOgS
nd1Z+uqGnqngbhczfQ4MqoEKSgq/9K3V7SD636Jmq/EdptPIC8XKwLMaqJcbnjPw
SwjwwQgNJ9nZEkTGna+pSU0RrPYIsBslI1lvUShdcOPAGa8RwBI5ZbSXla+pT3FP
4hd6uO/ryCSUnzGn+riSeW93POkY1MchyNO8f5ahTClJ7FnKsdd8XAzL4/2fw7JV
Uz0mxtjVfLHAQOIx+0Q/nZ9haXxWPvhobJp/ZuTtRLD1P5Fd0Yc=
=6d4Q
-----END PGP SIGNATURE-----

--Sig_/3Z31k7RZtJpa6VifmqWhZGb--




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

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


Received: (at 48434) by debbugs.gnu.org; 17 Aug 2021 08:28:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 17 04:28:52 2021
Received: from localhost ([127.0.0.1]:51634 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFuSh-00017M-7W
	for submit <at> debbugs.gnu.org; Tue, 17 Aug 2021 04:28:52 -0400
Received: from mail-wr1-f53.google.com ([209.85.221.53]:44734)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <slyich@HIDDEN>) id 1mFuSd-000177-Kv
 for 48434 <at> debbugs.gnu.org; Tue, 17 Aug 2021 04:28:42 -0400
Received: by mail-wr1-f53.google.com with SMTP id x12so27322614wrr.11
 for <48434 <at> debbugs.gnu.org>; Tue, 17 Aug 2021 01:28:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=date:from:to:cc:subject:message-id:in-reply-to:references
 :mime-version; bh=SGmvcJyOw//4KULGHVwXTfF0ywu9A57Mqjkx88uHJgY=;
 b=O6ZJZm+iN3YFENhdFGL8NRYxpBdAHZFCl+SUy0QtkCkUr+2Dg0J+4THLW272mu0lY4
 SrvZ6d9axuYrLJWX8zUzKNcACTWGH/s7DWWoFygssvb35zoCSazW004r3OCEZ8jXWoCi
 rmvFe3flE8wgcP5W0Pa4HTw1X1CsySEPPNHyBZF5xI8XCkDm9nlyN/JiMvcr6jvd1E6e
 NPATGfQrsy4ZzJ/DZjdkdEUhxlxrG9VyKVNu+Hun+uj+da0ALt/aBFQdfIQprxRhUX/N
 qC6JwdfpcWRtlNNiFgDGPJXy5+P33Tp1pmc1j8pNSN+4wCV8e7rvAn/5y+if/LIuEKmv
 n1vA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to
 :references:mime-version;
 bh=SGmvcJyOw//4KULGHVwXTfF0ywu9A57Mqjkx88uHJgY=;
 b=RqsQo5tRic815MGQjvmru1lp0wyP4PPcCtk3J7B5O6Kjumy0gV9pim1tprU8z20Efr
 Iksc1TKG6X2ObqPNepeiJCggRGEQ1L7kiEnUyf2ulE52lliM9p7m7R+v1is3v9lo7nMh
 yGTxuJzoZRZOAZdPFmSuTz/uw0Tsr6PPemmn6hSFQXarPkyGj9fbPDfg0NSpp5xDLREx
 bfNJR7+WlLYClvqhfGpgAIuuwLajYP5+wgfmH7G+pPlEjU/YkM1bU+o79WFHmxBjZDL1
 TCf+4UC2VWQ69oYrw25J1yTFc+rtUUgKCCMDaCfx0220fZImrCG5Z+8dXTBJel/0JmGO
 BWdA==
X-Gm-Message-State: AOAM532TU5VwXE+BAilx3Kdmny383ayVRNLg2VbbHx+mtDd1m9lH+FBq
 /A29mkcv8DuYpQLsxRWvHXo=
X-Google-Smtp-Source: ABdhPJz/T6aUapfDUx07V0vt5WFBRrIJm4r0cQYYE2i9YnJHOpfAGn3F5blB5Yjmly41JOUQdwJcXQ==
X-Received: by 2002:adf:f288:: with SMTP id k8mr2508517wro.350.1629188913727; 
 Tue, 17 Aug 2021 01:28:33 -0700 (PDT)
Received: from zn3 (host81-129-83-184.range81-129.btcentralplus.com.
 [81.129.83.184])
 by smtp.gmail.com with ESMTPSA id r129sm1327675wmr.7.2021.08.17.01.28.31
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 17 Aug 2021 01:28:32 -0700 (PDT)
Date: Tue, 17 Aug 2021 09:28:30 +0100
From: Sergei Trofimovich <slyich@HIDDEN>
To: Maxime Devos <maximedevos@HIDDEN>
Subject: Re: [bug#48434] [PATCH] guile: allow pre-inst-env inject local paths
Message-ID: <20210817092830.7a86d795@zn3>
In-Reply-To: <430b0e953bf76a13ff2290004d3e7ac1f0bdef7c.camel@HIDDEN>
References: <20210515095227.3245343-1-slyfox@HIDDEN>
 <20210816182822.654d3e1f@zn3>
 <430b0e953bf76a13ff2290004d3e7ac1f0bdef7c.camel@HIDDEN>
X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.29; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="Sig_/+zH9YEm8Mpk6GNrjf_3ofWP";
 protocol="application/pgp-signature"; micalg=pgp-sha512
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 48434
Cc: 48434 <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 (-)

--Sig_/+zH9YEm8Mpk6GNrjf_3ofWP
Content-Type: multipart/mixed; boundary="MP_/KvBLaPGTpTNYDfXBv0KwG/w"

--MP_/KvBLaPGTpTNYDfXBv0KwG/w
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On Mon, 16 Aug 2021 20:52:48 +0200
Maxime Devos <maximedevos@HIDDEN> wrote:

> Sergei Trofimovich schreef op ma 16-08-2021 om 18:28 [+0100]:
> > On Sat, 15 May 2021 10:52:27 +0100
> > Sergei Trofimovich <slyfox@HIDDEN> wrote:
> >  =20
> > > I observed the problem when tried to run 'guix refresh' from local gi=
t checkout:
> > >=20
> > >     $ strace -f ./pre-inst-env guix refresh -u re2c |& fgrep re2c.scm
> > >     ...
> > >     [pid 3014757] openat(AT_FDCWD, "/usr/share/guile/site/3.0/gnu/pac=
kages/re2c.scm.qilB0R",
> > >         O_RDWR|O_CREAT|O_EXCL, 0600) =3D -1 EACCES (Permission denied)
> > >=20
> > > Attempt to /usr/share happens because local directory override is ign=
ored:

> The local directory isn't ignored, it's at the end (the effect is about t=
he same though).

Reworded to: "because local directory override has too low priority".

> > > The change keeps GUILE_LOAD_PATH / GUILE_LOAD_COMPILED_PATH for ./pre=
-inst-env.
> > >=20
> > > * gnu/packages/aux-files/guile-launcher.c (main): don't ignore
> > > GUILE_LOAD_PATH / GUILE_LOAD_COMPILED_PATH in GUIX_UNINSTALLED=3D1 mo=
de. =20
>=20
> Could you do something like
>=20
> #define GUIX_UNINSTALLED 1
> #if GUIX_UNINSTALLED
> new behaviour
> #else
> OLD BEHAVIOUR
> #endif
>=20
> and change "Makefile.am" to compile two variants of "guile",
> one with "DGUIX_UNINSTALLED=3D1" which goes into libexec, and another
> with "DGUIX_UNINSTALLED=3D0" named "$CHECKOUT/guile" which isn't installed
> anywhere but will be added to PATH by "pre-inst-env", or something like t=
hat?

Attached v2 patch that should solve all the above.

Added two 'guile' flavours:
    inplace/guile (to be used inplace)
    store/guile (to be installed to libexec)
While at it moved 'guix-daemon' to 'inplace/' as well to make it clear that
tests use inplace variant sometimes. Installation location did not change.

Also moved scripts/guix to inplace/guix as ./pre-inst-env relies on it to
be injected to PATH.

> Also, "guile-launcher.c" is used by 'quiet-quile" in (guix self).  It sho=
uld probably be
> verified that "guix pull" still works well.

It's a bit hard to test right now as guix-master is slightly broken due to
missing installed files when installed as a primary package manager, but at
least fetch part works fine:

$ guix pull
Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.or=
g/git/guix.git'...
Authenticating channel 'guix', commits 9edb3f6 to f7094f5 (29 new commits).=
..
Building from this channel:
  guix      https://git.savannah.gnu.org/git/guix.git   f7094f5
Backtrace:
In ice-9/boot-9.scm:
   222:29 19 (map1 (((guix store)) ((guix records)) ((guix #)) (#) =E2=80=
=A6))
   222:29 18 (map1 (((guix records)) ((guix profiles)) ((guix #)) # =E2=80=
=A6))
   222:29 17 (map1 (((guix profiles)) ((guix discovery)) ((guix =E2=80=A6))=
 =E2=80=A6))
   222:29 16 (map1 (((guix discovery)) ((guix combinators)) ((# =E2=80=A6))=
 =E2=80=A6))
   222:29 15 (map1 (((guix combinators)) ((guix channels)) ((# #)) =E2=80=
=A6))
   222:29 14 (map1 (((guix channels)) ((guix describe)) ((guix #)) =E2=80=
=A6))
   222:29 13 (map1 (((guix describe)) ((guix sets)) ((guix ui)) (#) =E2=80=
=A6))
   222:29 12 (map1 (((guix sets)) ((guix ui)) ((guix diagnostics)) =E2=80=
=A6))
   222:29 11 (map1 (((guix ui)) ((guix diagnostics)) ((guix #)) (#) =E2=80=
=A6))
   222:29 10 (map1 (((guix diagnostics)) ((guix modules)) ((# #)) # =E2=80=
=A6))
   222:29  9 (map1 (((guix modules)) ((guix packages)) ((guix #)) # =E2=80=
=A6))
   222:29  8 (map1 (((guix packages)) ((guix utils)) ((gnu # #)) # =E2=80=
=A6))
   222:29  7 (map1 (((guix utils)) ((gnu packages base)) ((gnu =E2=80=A6)) =
=E2=80=A6))
   222:29  6 (map1 (((gnu packages base)) ((gnu packages bash)) (#) =E2=80=
=A6))
   222:29  5 (map1 (((gnu packages bash)) ((gnu packages hurd)) (#) =E2=80=
=A6))
   222:29  4 (map1 (((gnu packages hurd)) ((gnu system setuid)) (#) =E2=80=
=A6))
   222:17  3 (map1 (((gnu system setuid)) ((srfi srfi-1)) ((# #)) # =E2=80=
=A6))
   3329:6  2 (resolve-interface (gnu system setuid) #:select _ #:hide =E2=
=80=A6)
  1685:16  1 (raise-exception _ #:continuable? _)
  1685:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
no code for module (gnu system setuid)

Thanks!

--=20

  Sergei

--MP_/KvBLaPGTpTNYDfXBv0KwG/w
Content-Type: text/x-patch
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
 filename=v2-0001-guile-allow-pre-inst-env-inject-local-paths.patch

=46rom 20fea816b93f31f6b079aa752c0a2ec681649cd0 Mon Sep 17 00:00:00 2001
From: Sergei Trofimovich <slyich@HIDDEN>
Date: Sat, 15 May 2021 10:40:12 +0100
Subject: [PATCH v2] guile: allow pre-inst-env inject local paths

I observed the problem when tried to run 'guix refresh' from local git chec=
kout:

    $ strace -f ./pre-inst-env guix refresh -u re2c |& fgrep re2c.scm
    ...
    [pid 3014757] openat(AT_FDCWD, "/usr/share/guile/site/3.0/gnu/packages/=
re2c.scm.qilB0R",
        O_RDWR|O_CREAT|O_EXCL, 0600) =3D -1 EACCES (Permission denied)

Attempt to /usr/share happens because local directory override has too low =
priority:

    $ ./pre-inst-env guile -c '(display (search-path %load-path "gnu/packag=
es/re2c.scm")) (newline) (display %load-path) (newline)'
    /usr/share/guile/site/3.0/gnu/packages/re2c.scm
    (/usr/share/guile/3.0 \
     /usr/share/guile/site/3.0 \
     /usr/share/guile/site \
     /usr/share/guile \
     /home/slyfox/dev/git/guix \
     /home/slyfox/dev/git/guix)

It happens because ./guile ignores GUILE_LOAD_PATH / GUILE_LOAD_COMPILED_PA=
TH
unconditionally.

The change drops 'GUILE_LOAD_PATH' environment variable handling. Instead
we bake the constant with into 'guile' binary by distinguishing 'store/guil=
e'
and 'inplace/guile'. And we bake '%guix-is-inplace' in 'inplace/guix' and
in '/usr/bin/guix'. While at it also move 'guix-daemon' to
'inplace/guix-daemon' to make it clear it is used locally by tests.

	* .gitignore: Ignore new 'store' and 'inplace' directories, ignore
	two new 'guile-launcher' object files.
	* Makefile.am: Move 'scripts/guix' to 'inplace/guix'. Move './guile'
	to 'inplace/guile'. Add 'store/guile' that differes from 'inplace/guile'
	by absence of '-DGUIX_INPLACE_GUILE=3D1' define.
	* build-aux/pre-inst-env.in: Don't add '$abs_top_builddir' to the
	'PATH'. Add only '$abs_top_builddir/inplace' to the 'PATH'. Drop
	'GUIX_UNINSTALLED' environment variable.
	* build-aux/test-env.in: Update to new 'inplace/guix-daemon' location.
	* doc/local.mk: Update to new 'inplace/guix-daemon' location.
	* gnu/packages/aux-files/guile-launcher.c (main): Use compile-time
	* nix/local.mk: Move 'guix-daemon' to 'inplace/guix-daemon'.
	'GUIX_INPLACE_GUILE' define to distinguish 'guile' binary used inplace
	and used from store.
	* scripts/guix.in: Drop 'GUIX_UNINSTALLED' environment variable
	handling in favour of new '%guix-is-inplace' constant.
---
 .gitignore                              |  5 ++++-
 Makefile.am                             | 29 +++++++++++++++++--------
 build-aux/pre-inst-env.in               | 12 ++++------
 build-aux/test-env.in                   |  4 ++--
 doc/local.mk                            |  2 +-
 gnu/packages/aux-files/guile-launcher.c | 26 ++++++++++++++++------
 nix/local.mk                            | 14 ++++++------
 scripts/guix.in                         |  6 +++--
 8 files changed, 61 insertions(+), 37 deletions(-)

diff --git a/.gitignore b/.gitignore
index 88fe24586d..5a7dfa1f31 100644
--- a/.gitignore
+++ b/.gitignore
@@ -78,6 +78,7 @@
 /etc/openrc/guix-daemon
 /guix-*
 /guix/config.scm
+/inplace
 /libformat.a
 /libstore.a
 /libutil.a
@@ -132,6 +133,7 @@
 /pre-inst-env
 /release-*
 /scripts/guix
+/store
 /test-env
 /test-tmp
 /tests/*.trs
@@ -152,5 +154,6 @@ tmp
 /.version
 /doc/stamp-*
 /gnu/packages/bootstrap
-/gnu/packages/aux-files/guile-guile-launcher.o
+/gnu/packages/aux-files/inplace_guile-guile-launcher.o
+/gnu/packages/aux-files/store_guile-guile-launcher.o
 /guile
diff --git a/Makefile.am b/Makefile.am
index 5542aa1c56..0666c7b7c2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -33,33 +33,44 @@
=20
 MSGMERGE_UPDATE =3D @MSGMERGE@ --update
=20
-bin_SCRIPTS =3D scripts/guix
+bin_SCRIPTS =3D inplace/guix
=20
 # Handle substitution of fully-expanded Autoconf variables.
 do_subst =3D $(SED)					\
   -e 's,[@]GUILE[@],$(GUILE),g'				\
   -e 's,[@]guilemoduledir[@],$(guilemoduledir),g'	\
   -e 's,[@]guileobjectdir[@],$(guileobjectdir),g'	\
+  -e 's,[@]guix_is_inplace[@],t,g'			\
   -e 's,[@]abs_top_builddir[@],$(abs_top_builddir),g'	\
   -e 's,[@]localedir[@],$(localedir),g'
=20
-scripts/guix: scripts/guix.in Makefile
+inplace/guix: scripts/guix.in Makefile
 	$(AM_V_at)rm -f $@ $@-t
 	$(AM_V_at)$(MKDIR_P) "$(@D)"
-	$(AM_V_GEN)$(do_subst) < "$(srcdir)/$@.in" > "$@-t"
+	$(AM_V_GEN)$(do_subst) < "$(srcdir)/$<" > "$@-t"
 	$(AM_V_at)chmod a+x,a-w "$@-t" && mv -f "$@-t" "$@"
=20
 # This is our variant of the 'guile' executable, one that doesn't complain
-# about locales.
-pkglibexec_PROGRAMS =3D guile
-guile_SOURCES =3D gnu/packages/aux-files/guile-launcher.c
-guile_LDADD   =3D $(GUILE_LIBS)
-guile_CFLAGS  =3D $(GUILE_CFLAGS)
+# about locales. Intended to be executed from store.
+pkglibexec_PROGRAMS =3D store/guile
+store_guile_SOURCES =3D gnu/packages/aux-files/guile-launcher.c
+store_guile_LDADD   =3D $(GUILE_LIBS)
+store_guile_CFLAGS  =3D $(GUILE_CFLAGS)
+
+# This is similar to pkglibexec_PROGRAMS with an exception of honoring loc=
al
+# modules:
+# - GUILE_LOAD_PATH / GUILE_LOAD_COMPILED_PATH to allow './pre-inst-env gu=
ix refresh'
+#   and friends access to inplace sources: http://issues.guix.gnu.org/4843=
4.
+noinst_PROGRAMS =3D inplace/guile
+inplace_guile_SOURCES =3D gnu/packages/aux-files/guile-launcher.c
+inplace_guile_LDADD   =3D $(GUILE_LIBS)
+inplace_guile_CFLAGS  =3D $(GUILE_CFLAGS) -DGUIX_INPLACE_GUILE=3D1
=20
 # Have the 'guix' command refer to our 'guile'.
 install-exec-hook:
 	$(SED) -i "$(DESTDIR)$(bindir)/guix"				\
-	       -e 's,^#![[:graph:]]\+,#!$(pkglibexecdir)/guile,g'
+	       -e 's,^#![[:graph:]]\+,#!$(pkglibexecdir)/guile,g'	\
+	       -e 's,define %guix-is-inplace #t,define %guix-is-inplace #f,g'
=20
 nodist_noinst_SCRIPTS =3D				\
   pre-inst-env					\
diff --git a/build-aux/pre-inst-env.in b/build-aux/pre-inst-env.in
index cd90a06cbc..d4e03a92fb 100644
--- a/build-aux/pre-inst-env.in
+++ b/build-aux/pre-inst-env.in
@@ -39,17 +39,13 @@ export GUILE_LOAD_COMPILED_PATH GUILE_LOAD_PATH
=20
 # Define $PATH so that `guix' and friends are easily found.
=20
-PATH=3D"$abs_top_builddir/scripts:$abs_top_builddir:$PATH"
+PATH=3D"$abs_top_builddir/inplace:$PATH"
 export PATH
=20
 # The daemon invokes 'guix'; tell it which one to use.
-GUIX=3D"$abs_top_builddir/scripts/guix"
+# Use inpalce `guix' to honor local GUILE_LOAD_PATH / GUILE_LOAD_COMPILED_=
PATH:
+# http://issues.guix.gnu.org/48434
+GUIX=3D"$abs_top_builddir/inplace/guix"
 export GUIX
=20
-# Define $GUIX_UNINSTALLED to prevent `guix' from
-# prepending @guilemoduledir@ to the Guile load paths.
-
-GUIX_UNINSTALLED=3D1
-export GUIX_UNINSTALLED
-
 exec "$@"
diff --git a/build-aux/test-env.in b/build-aux/test-env.in
index 7efc43206c..b41662393d 100644
--- a/build-aux/test-env.in
+++ b/build-aux/test-env.in
@@ -39,7 +39,7 @@ case "$1" in
 	;;
 esac
=20
-if [ -x "@abs_top_builddir@/guix-daemon" ]
+if [ -x "@abs_top_builddir@/inplace/guix-daemon" ]
 then
     NIX_STORE_DIR=3D"@GUIX_TEST_ROOT@/store"
=20
@@ -100,7 +100,7 @@ then
     # Launch the daemon without chroot support because is may be
     # unavailable, for instance if we're not running as root.
     "@abs_top_builddir@/pre-inst-env"				\
-	"@abs_top_builddir@/guix-daemon" --disable-chroot	\
+	"@abs_top_builddir@/inplace/guix-daemon" --disable-chroot	\
 	--substitute-urls=3D"$GUIX_BINARY_SUBSTITUTE_URL" &
=20
     daemon_pid=3D$!
diff --git a/doc/local.mk b/doc/local.mk
index 8340b75a87..6068a2cd2b 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -251,7 +251,7 @@ if !CROSS_COMPILING
=20
 dist_man1_MANS +=3D $(srcdir)/%D%/guix-daemon.1
=20
-$(srcdir)/%D%/guix-daemon.1: guix-daemon$(EXEEXT)
+$(srcdir)/%D%/guix-daemon.1: inplace/guix-daemon$(EXEEXT)
 	-$(AM_V_HELP2MAN)$(gen_man) --output=3D"$@" `basename "$@" .1`
=20
 endif
diff --git a/gnu/packages/aux-files/guile-launcher.c b/gnu/packages/aux-fil=
es/guile-launcher.c
index 47ba069de1..3dbd738573 100644
--- a/gnu/packages/aux-files/guile-launcher.c
+++ b/gnu/packages/aux-files/guile-launcher.c
@@ -66,6 +66,12 @@ inner_main (void *unused, int argc, char **argv)
 int
 main (int argc, char **argv)
 {
+#if defined(GUIX_INPLACE_GUILE)
+  int run_guile_from_store =3D 0;
+#else
+  int run_guile_from_store =3D 1;
+#endif
+
   /* Try to install the current locale; remain silent if it fails.  */
   if (setlocale (LC_ALL, "") =3D=3D NULL)
     /* The 'guix pull'-provided 'guix' includes at least en_US.utf8 so use
@@ -73,14 +79,20 @@ main (int argc, char **argv)
        which is always preferable over the C locale.  */
     setlocale (LC_ALL, "en_US.utf8");
=20
-  const char *str;
-  str =3D getenv ("GUILE_LOAD_PATH");
-  load_path =3D str !=3D NULL ? strdup (str) : NULL;
-  str =3D getenv ("GUILE_LOAD_COMPILED_PATH");
-  load_compiled_path =3D str ? strdup (str) : NULL;
=20
-  unsetenv ("GUILE_LOAD_PATH");
-  unsetenv ("GUILE_LOAD_COMPILED_PATH");
+  /* Allow ./pre-inst-env to inject local paths. That way local sources
+     are preferred for most operations.  */
+  if (run_guile_from_store)
+    {
+      const char *str;
+      str =3D getenv ("GUILE_LOAD_PATH");
+      load_path =3D str !=3D NULL ? strdup (str) : NULL;
+      str =3D getenv ("GUILE_LOAD_COMPILED_PATH");
+      load_compiled_path =3D str ? strdup (str) : NULL;
+
+      unsetenv ("GUILE_LOAD_PATH");
+      unsetenv ("GUILE_LOAD_COMPILED_PATH");
+    }
=20
   /* XXX: Do not let GMP allocate via libgc as this can lead to memory
      corruption in GnuTLS/Nettle since Nettle also uses GMP:
diff --git a/nix/local.mk b/nix/local.mk
index 7c438ea78c..1d7705b1e5 100644
--- a/nix/local.mk
+++ b/nix/local.mk
@@ -111,33 +111,33 @@ libstore_a_CPPFLAGS =3D				\
 libstore_a_CXXFLAGS =3D $(AM_CXXFLAGS)		\
   $(SQLITE3_CFLAGS) $(LIBGCRYPT_CFLAGS)
=20
-bin_PROGRAMS =3D guix-daemon
+bin_PROGRAMS =3D inplace/guix-daemon
=20
-guix_daemon_SOURCES =3D				\
+inplace_guix_daemon_SOURCES =3D			\
   %D%/nix-daemon/nix-daemon.cc			\
   %D%/nix-daemon/guix-daemon.cc
=20
-guix_daemon_CPPFLAGS =3D				\
+inplace_guix_daemon_CPPFLAGS =3D			\
   -DLOCALEDIR=3D\"$(localedir)\"			\
   $(libutil_a_CPPFLAGS)				\
   -I$(top_srcdir)/%D%/libstore
=20
-guix_daemon_LDADD =3D				\
+inplace_guix_daemon_LDADD =3D			\
   libstore.a libutil.a libformat.a -lz		\
   $(SQLITE3_LIBS) $(LIBGCRYPT_LIBS)
=20
-guix_daemon_headers =3D				\
+inplace_guix_daemon_headers =3D			\
   %D%/nix-daemon/shared.hh
=20
 if HAVE_LIBBZ2
=20
-guix_daemon_LDADD +=3D -lbz2
+inplace_guix_daemon_LDADD +=3D -lbz2
=20
 endif HAVE_LIBBZ2
=20
 noinst_HEADERS =3D						\
   $(libformat_headers) $(libutil_headers) $(libstore_headers)	\
-  $(guix_daemon_headers)
+  $(inplace_guix_daemon_headers)
=20
 %D%/libstore/schema.sql.hh: guix/store/schema.sql
 	$(AM_V_GEN)$(GUILE) --no-auto-compile -c		\
diff --git a/scripts/guix.in b/scripts/guix.in
index e0194d6ea2..a9fc29baa4 100644
--- a/scripts/guix.in
+++ b/scripts/guix.in
@@ -1,4 +1,4 @@
-#!@abs_top_builddir@/guile \
+#!@abs_top_builddir@/inplace/guile \
 --no-auto-compile -e main -s
 !#
 ;;; GNU Guix --- Functional package management for GNU
@@ -31,8 +31,10 @@
   (push! "@guilemoduledir@" %load-path)
   (push! "@guileobjectdir@" %load-compiled-path))
=20
+(define %guix-is-inplace #@guix_is_inplace@)
+
 (define* (main #:optional (args (command-line)))
-  (unless (getenv "GUIX_UNINSTALLED")
+  (unless %guix-is-inplace
     (augment-load-paths!))
=20
   (let ((guix-main (module-ref (resolve-interface '(guix ui))
--=20
2.32.0


--MP_/KvBLaPGTpTNYDfXBv0KwG/w--

--Sig_/+zH9YEm8Mpk6GNrjf_3ofWP
Content-Type: application/pgp-signature
Content-Description: Цифровая подпись OpenPGP

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQKTBAEBCgB9FiEE+g11JqJ4cL44QkmN7V5F4G8qwpMFAmEbcy5fFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEZB
MEQ3NTI2QTI3ODcwQkUzODQyNDk4REVENUU0NUUwNkYyQUMyOTMACgkQ7V5F4G8q
wpNFdw//XKDejSC5UcZ0uGEqXcpWL8Cz+RjiXFHOqQBZR7grr4EV3cME6GSONBe9
jgKXhO44xJa2+uv5IRFGqWNqcwKThFZw4Is4cOfkNxKI2BL5/AMXJOmoYV5aARRf
jE/UxkI3DplzB69d5iWbUmRwzFUk0FB88hxchjxmfl0pvmUV1KEdBv75rwaGALlE
KbcVJWVhOeoVTDIYNLpLuIHjpE4xIYSOYEaeLBCzlUERYw0ddI3dj/PBGL1QOSlK
xoyRctXBzO/LglKJv9AaA++Lbx3+GdxrXTxijRfLPsJFfm/CDVr5Z/l742URZ8Mv
fLxKGuA5EflTGR37wf192+8kPNgdVBIes2aoQMxmbkBk39u1jWmUvflYSHVKCRvm
jde9ctTO/ZdxRFL34VPHXspCSSe7s84ZFz67Pj/BBwG6+1vud45XacHxDpOeCQRD
NFRofFF1FOhIm7mJEwxbfTu1mtCPcavhSehXhkha1EghychYJS/65P4THz0qZ9qh
DlxjNpBRa73tCuJ12jYpgGr5bU0QInhbM+YRt+cZ5sQQHjs0kMhay9y0WabM+VPy
Dn1cbxhxqXWNPmjpD2iQNukAeD3bmb/vwCXrw0OGDgus5vtN5yFo5FiJTjsEhWKg
PxjclmWVgFD49ww70doX570+0vI/ufnrraFP5Qzbancy2hQKbKw=
=Pz9u
-----END PGP SIGNATURE-----

--Sig_/+zH9YEm8Mpk6GNrjf_3ofWP--




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

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


Received: (at 48434) by debbugs.gnu.org; 16 Aug 2021 18:53:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 16 14:53:08 2021
Received: from localhost ([127.0.0.1]:50985 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFhjH-0003sA-Dz
	for submit <at> debbugs.gnu.org; Mon, 16 Aug 2021 14:53:08 -0400
Received: from michel.telenet-ops.be ([195.130.137.88]:34650)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1mFhjD-0003rz-5a
 for 48434 <at> debbugs.gnu.org; Mon, 16 Aug 2021 14:52:58 -0400
Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be
 ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d])
 by michel.telenet-ops.be with bizsmtp
 id iJst2500N0mfAB406JstuL; Mon, 16 Aug 2021 20:52:53 +0200
Message-ID: <430b0e953bf76a13ff2290004d3e7ac1f0bdef7c.camel@HIDDEN>
Subject: Re: [bug#48434] [PATCH] guile: allow pre-inst-env inject local paths
From: Maxime Devos <maximedevos@HIDDEN>
To: Sergei Trofimovich <slyich@HIDDEN>, 48434 <at> debbugs.gnu.org
Date: Mon, 16 Aug 2021 20:52:48 +0200
In-Reply-To: <20210816182822.654d3e1f@zn3>
References: <20210515095227.3245343-1-slyfox@HIDDEN>
 <20210816182822.654d3e1f@zn3>
Content-Type: multipart/signed; micalg="pgp-sha512";
 protocol="application/pgp-signature"; boundary="=-d0Mlw//aovHJZ5t/P6Ax"
User-Agent: Evolution 3.34.2 
MIME-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21;
 t=1629139973; bh=oDLXYlPwen2JQZDin5Mp9ZGoRECElaKbFuP1YYPYnTE=;
 h=Subject:From:To:Date:In-Reply-To:References;
 b=k4e91VMJvJvNh2/qh/oJXuWh+8MFbKjaF9isDIynGdK39Gq/OeN8EuaPLYsmQs4rU
 bzeJ4H0BjDdNAXbul1MSQdTjDd8GX4UNIfNskHG94y/i5o+SC4s4i7fvK9I0eEy9AC
 iUOY/avb0Yfy1s46ulyHP9u+TohhxAj5v8sMy7cHrI71bzCe2lWMZKlWhr+0Iad0oW
 7MBGfjwCGQF0zOhWFRfTOHDhZstKPdG9sddG3NMF3vYG1P3KwCQiY0KPruhtR/FfwM
 LNfcZt7LTEsfE46/a9ZIkF6pxkjN/94HHdHkMemUlJrH7LeZyHgoD2dJ0obaCCvjN8
 fJmfzzhKkgeRA==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 48434
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 (-)


--=-d0Mlw//aovHJZ5t/P6Ax
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Sergei Trofimovich schreef op ma 16-08-2021 om 18:28 [+0100]:
> On Sat, 15 May 2021 10:52:27 +0100
> Sergei Trofimovich <slyfox@HIDDEN> wrote:
>=20
> > I observed the problem when tried to run 'guix refresh' from local git =
checkout:
> >=20
> >     $ strace -f ./pre-inst-env guix refresh -u re2c |& fgrep re2c.scm
> >     ...
> >     [pid 3014757] openat(AT_FDCWD, "/usr/share/guile/site/3.0/gnu/packa=
ges/re2c.scm.qilB0R",
> >         O_RDWR|O_CREAT|O_EXCL, 0600) =3D -1 EACCES (Permission denied)
> >=20
> > Attempt to /usr/share happens because local directory override is ignor=
ed:
> >=20
> >     $ ./pre-inst-env guile -c '(display (search-path %load-path "gnu/pa=
ckages/re2c.scm")) (newline) (display %load-path) (newline)'
> >     /usr/share/guile/site/3.0/gnu/packages/re2c.scm
> >     (/usr/share/guile/3.0 \
> >      /usr/share/guile/site/3.0 \
> >      /usr/share/guile/site \
> >      /usr/share/guile \
> >      /home/slyfox/dev/git/guix \
> >      /home/slyfox/dev/git/guix)

         ^ here's the checkout in the load path

> >=20
> > It happens because ./guile ignores GUILE_LOAD_PATH / GUILE_LOAD_COMPILE=
D_PATH
> > unconditionally.

The local directory isn't ignored, it's at the end (the effect is about the=
 same though).

> > The change keeps GUILE_LOAD_PATH / GUILE_LOAD_COMPILED_PATH for ./pre-i=
nst-env.
> >=20
> > * gnu/packages/aux-files/guile-launcher.c (main): don't ignore
> > GUILE_LOAD_PATH / GUILE_LOAD_COMPILED_PATH in GUIX_UNINSTALLED=3D1 mode=
.

Could you do something like

#define GUIX_UNINSTALLED 1
#if GUIX_UNINSTALLED
new behaviour
#else
OLD BEHAVIOUR
#endif

and change "Makefile.am" to compile two variants of "guile",
one with "DGUIX_UNINSTALLED=3D1" which goes into libexec, and another
with "DGUIX_UNINSTALLED=3D0" named "$CHECKOUT/guile" which isn't installed
anywhere but will be added to PATH by "pre-inst-env", or something like tha=
t?

I've a bit of an aversion towards using $..._UNINSTALLED environment variab=
les,
as it leads to difficult situations like =E2=80=98what should happen if I /=
gnu/store/.../bin/guix
is run with GUIX_UNINSTALLED set to 1=E2=80=99:

  (a): Reset "GUILE_LOAD{,_COMPILED}_PATH" because we're running directly f=
rom the store
  (b): Don't reset "GUILE_LOAD_{,_COMPILED}_PATH" because GUIX_UNINSTALLED =
is set to 1.

As a comparison, GUIX_UNINSTALLED, the preprocessor variable, is like a =E2=
=80=98lexical variable=E2=80=99,
and GUIX_UNINSTALLED, the environment variable, is like a
=E2=80=98parameter object=E2=80=99/=E2=80=98dynamically bound variable=E2=
=80=99 (see, e.g., 6.11.12 Parameters in the Guile
manual).  I tend to prefer the former, except for dynamic things like LC_AL=
L, $[...]_PATH
(when used by "guile", "gcc" -- applications typically shouldn't depend on =
$GUILE_LOAD_PATH,
if they do, they need 'wrap-program' or the like=E2=80=99).

Also, "guile-launcher.c" is used by 'quiet-quile" in (guix self).  It shoul=
d probably be
verified that "guix pull" still works well.

Greetings,
Maxime.

--=-d0Mlw//aovHJZ5t/P6Ax
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYRq0ABccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7u7dAP9nyeKHaysuBDca+a/M++uXSwnB
KuxMRdGln5+HLg/dJgEArmz16fXyIH98bXEO/VAu3uc7l/Mk5c9cdYsIDx9XqAM=
=ipRd
-----END PGP SIGNATURE-----

--=-d0Mlw//aovHJZ5t/P6Ax--





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

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


Received: (at 48434) by debbugs.gnu.org; 16 Aug 2021 17:28:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 16 13:28:44 2021
Received: from localhost ([127.0.0.1]:50888 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFgPk-0001YJ-2k
	for submit <at> debbugs.gnu.org; Mon, 16 Aug 2021 13:28:44 -0400
Received: from mail-wm1-f43.google.com ([209.85.128.43]:42873)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <slyich@HIDDEN>) id 1mFgPf-0001Y3-Nv
 for 48434 <at> debbugs.gnu.org; Mon, 16 Aug 2021 13:28:42 -0400
Received: by mail-wm1-f43.google.com with SMTP id
 w21-20020a7bc1150000b02902e69ba66ce6so443722wmi.1
 for <48434 <at> debbugs.gnu.org>; Mon, 16 Aug 2021 10:28:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=date:from:to:subject:message-id:in-reply-to:references:mime-version
 :content-transfer-encoding;
 bh=15vOQ7xUyAHjrsVEwTH5ulSFoIw/A7shNSc2A6QXDY0=;
 b=rPv2RLhK3yolwY8F80jSqaGkFD03Aknk3ROkByW3Jvpf6UDisNdWm9h1qS7tB9L0Xb
 JpHnr7OBHwAzHRg4LKNwewiYT0Jzc+xDHJw5wGvpHwYSQF4kBB5gmYfaIZdQ2OmHdx62
 qJ+gbiDM9pS/18iLCVMFXbwxc5hPyNYevbtt26ubKkcUEbKuKfo1/TuucKQ25t4BQ3UE
 lV8e0o+NFO29on5AeprdqsvWK0OZgGnUsKw4d4YFUeT+hQLg/Qkloef/f8C4fbkCLNEC
 +1OmYSk/kIZIW5w5R4+Ls3Wr/nlpX3E7LmhdvDKhfzBl2HztCscxcH7dh2HR5US/jsLC
 /d0w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=15vOQ7xUyAHjrsVEwTH5ulSFoIw/A7shNSc2A6QXDY0=;
 b=RmaulGE+V343tTvOqBPg8mvUKinRakO4BERVfgZZ5nL+4QNeitThPvH7FHMEhfNZz6
 tnYydv8gMEf6bGJ4rYRM0E+y2iiXREQLZqzo4FiBW0YnnrqoUg//h1pNbOBHcP62VpNI
 D68xgEfQo2PZklz6PmfKfSoQyI+2ediuU5QFcBjuys+2qswejuQroYkcaGOzAbc368y1
 xxzIcJj4uVNfYaYbmzt8UHjK757IoPtwLztRgKRoO0H6s7P48RXdeq43WPn9jdaO5ZjS
 kzNYntrhE/S8w/HRIX5iLujZhqDO49rDffP/DijPXhdEGwU76+sVHYgy7hwCfP2Su1DM
 NzOw==
X-Gm-Message-State: AOAM532IMRsW7cdLSeR50mXXyCb6SH9jl7C3bn3BK3BmeySb3VhgYBy5
 GdhSAf8hrnsfqMz3SoXi/VrouNY+GrA=
X-Google-Smtp-Source: ABdhPJxCALSzP2iiRM+vf4Rxj5cMdoQhOnUHkXn/KOhD8o9kk0oF0SFqORAPYRBxsrCKlLTZqQZ3uQ==
X-Received: by 2002:a1c:2905:: with SMTP id p5mr198982wmp.146.1629134913657;
 Mon, 16 Aug 2021 10:28:33 -0700 (PDT)
Received: from zn3 (host81-129-83-184.range81-129.btcentralplus.com.
 [81.129.83.184])
 by smtp.gmail.com with ESMTPSA id p8sm137324wme.22.2021.08.16.10.28.32
 for <48434 <at> debbugs.gnu.org>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 16 Aug 2021 10:28:33 -0700 (PDT)
Date: Mon, 16 Aug 2021 18:28:31 +0100
From: Sergei Trofimovich <slyich@HIDDEN>
To: 48434 <at> debbugs.gnu.org
Subject: Re: [PATCH] guile: allow pre-inst-env inject local paths
Message-ID: <20210816182822.654d3e1f@zn3>
In-Reply-To: <20210515095227.3245343-1-slyfox@HIDDEN>
References: <20210515095227.3245343-1-slyfox@HIDDEN>
X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.29; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 48434
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 (-)

On Sat, 15 May 2021 10:52:27 +0100
Sergei Trofimovich <slyfox@HIDDEN> wrote:

> I observed the problem when tried to run 'guix refresh' from local git checkout:
> 
>     $ strace -f ./pre-inst-env guix refresh -u re2c |& fgrep re2c.scm
>     ...
>     [pid 3014757] openat(AT_FDCWD, "/usr/share/guile/site/3.0/gnu/packages/re2c.scm.qilB0R",
>         O_RDWR|O_CREAT|O_EXCL, 0600) = -1 EACCES (Permission denied)
> 
> Attempt to /usr/share happens because local directory override is ignored:
> 
>     $ ./pre-inst-env guile -c '(display (search-path %load-path "gnu/packages/re2c.scm")) (newline) (display %load-path) (newline)'
>     /usr/share/guile/site/3.0/gnu/packages/re2c.scm
>     (/usr/share/guile/3.0 \
>      /usr/share/guile/site/3.0 \
>      /usr/share/guile/site \
>      /usr/share/guile \
>      /home/slyfox/dev/git/guix \
>      /home/slyfox/dev/git/guix)
> 
> It happens because ./guile ignores GUILE_LOAD_PATH / GUILE_LOAD_COMPILED_PATH
> unconditionally.
> 
> The change keeps GUILE_LOAD_PATH / GUILE_LOAD_COMPILED_PATH for ./pre-inst-env.
> 
> * gnu/packages/aux-files/guile-launcher.c (main): don't ignore
> GUILE_LOAD_PATH / GUILE_LOAD_COMPILED_PATH in GUIX_UNINSTALLED=1 mode.
> 
> Signed-off-by: Sergei Trofimovich <slyfox@HIDDEN>
> ---
>  gnu/packages/aux-files/guile-launcher.c | 19 ++++++++++++-------
>  1 file changed, 12 insertions(+), 7 deletions(-)
> 
> diff --git a/gnu/packages/aux-files/guile-launcher.c b/gnu/packages/aux-files/guile-launcher.c
> index 47ba069de1..bed63353a9 100644
> --- a/gnu/packages/aux-files/guile-launcher.c
> +++ b/gnu/packages/aux-files/guile-launcher.c
> @@ -73,14 +73,19 @@ main (int argc, char **argv)
>         which is always preferable over the C locale.  */
>      setlocale (LC_ALL, "en_US.utf8");
>  
> -  const char *str;
> -  str = getenv ("GUILE_LOAD_PATH");
> -  load_path = str != NULL ? strdup (str) : NULL;
> -  str = getenv ("GUILE_LOAD_COMPILED_PATH");
> -  load_compiled_path = str ? strdup (str) : NULL;
> +  /* Allow ./pre-inst-env to inject local paths. That way local sources
> +     are preferred for most operations.  */
> +  if (getenv ("GUIX_UNINSTALLED") == NULL)
> +    {
> +      const char *str;
> +      str = getenv ("GUILE_LOAD_PATH");
> +      load_path = str != NULL ? strdup (str) : NULL;
> +      str = getenv ("GUILE_LOAD_COMPILED_PATH");
> +      load_compiled_path = str ? strdup (str) : NULL;
>  
> -  unsetenv ("GUILE_LOAD_PATH");
> -  unsetenv ("GUILE_LOAD_COMPILED_PATH");
> +      unsetenv ("GUILE_LOAD_PATH");
> +      unsetenv ("GUILE_LOAD_COMPILED_PATH");
> +    }
>  
>    /* XXX: Do not let GMP allocate via libgc as this can lead to memory
>       corruption in GnuTLS/Nettle since Nettle also uses GMP:

Stumbled on it again today when cloned fresh guix repo and forgot to
apply this patch. Is it a reasonable approach? Or something else is
at fault here?

Thanks!

-- 

  Sergei




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

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


Received: (at submit) by debbugs.gnu.org; 15 May 2021 09:52:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 15 05:52:55 2021
Received: from localhost ([127.0.0.1]:47643 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lhqyd-00077c-3V
	for submit <at> debbugs.gnu.org; Sat, 15 May 2021 05:52:55 -0400
Received: from lists.gnu.org ([209.51.188.17]:48078)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <slyfox@HIDDEN>) id 1lhqya-00077T-Eq
 for submit <at> debbugs.gnu.org; Sat, 15 May 2021 05:52:54 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:60846)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <slyfox@HIDDEN>) id 1lhqya-0004SU-3J
 for guix-patches@HIDDEN; Sat, 15 May 2021 05:52:52 -0400
Received: from mail.gentoo.org ([2001:470:ea4a:1:5054:ff:fec7:86e4]:45135
 helo=smtp.gentoo.org)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <slyfox@HIDDEN>)
 id 1lhqyR-0007gh-FS; Sat, 15 May 2021 05:52:51 -0400
Received: by sf.home (Postfix, from userid 1000)
 id D6FCC5A22061; Sat, 15 May 2021 10:52:34 +0100 (BST)
From: Sergei Trofimovich <slyfox@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] guile: allow pre-inst-env inject local paths
Date: Sat, 15 May 2021 10:52:27 +0100
Message-Id: <20210515095227.3245343-1-slyfox@HIDDEN>
X-Mailer: git-send-email 2.31.1
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=2001:470:ea4a:1:5054:ff:fec7:86e4;
 envelope-from=slyfox@HIDDEN; helo=smtp.gentoo.org
X-Spam_score_int: -41
X-Spam_score: -4.2
X-Spam_bar: ----
X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: submit
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>,
 Sergei Trofimovich <slyfox@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: -2.6 (--)

I observed the problem when tried to run 'guix refresh' from local git checkout:

    $ strace -f ./pre-inst-env guix refresh -u re2c |& fgrep re2c.scm
    ...
    [pid 3014757] openat(AT_FDCWD, "/usr/share/guile/site/3.0/gnu/packages/re2c.scm.qilB0R",
        O_RDWR|O_CREAT|O_EXCL, 0600) = -1 EACCES (Permission denied)

Attempt to /usr/share happens because local directory override is ignored:

    $ ./pre-inst-env guile -c '(display (search-path %load-path "gnu/packages/re2c.scm")) (newline) (display %load-path) (newline)'
    /usr/share/guile/site/3.0/gnu/packages/re2c.scm
    (/usr/share/guile/3.0 \
     /usr/share/guile/site/3.0 \
     /usr/share/guile/site \
     /usr/share/guile \
     /home/slyfox/dev/git/guix \
     /home/slyfox/dev/git/guix)

It happens because ./guile ignores GUILE_LOAD_PATH / GUILE_LOAD_COMPILED_PATH
unconditionally.

The change keeps GUILE_LOAD_PATH / GUILE_LOAD_COMPILED_PATH for ./pre-inst-env.

* gnu/packages/aux-files/guile-launcher.c (main): don't ignore
GUILE_LOAD_PATH / GUILE_LOAD_COMPILED_PATH in GUIX_UNINSTALLED=1 mode.

Signed-off-by: Sergei Trofimovich <slyfox@HIDDEN>
---
 gnu/packages/aux-files/guile-launcher.c | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/aux-files/guile-launcher.c b/gnu/packages/aux-files/guile-launcher.c
index 47ba069de1..bed63353a9 100644
--- a/gnu/packages/aux-files/guile-launcher.c
+++ b/gnu/packages/aux-files/guile-launcher.c
@@ -73,14 +73,19 @@ main (int argc, char **argv)
        which is always preferable over the C locale.  */
     setlocale (LC_ALL, "en_US.utf8");
 
-  const char *str;
-  str = getenv ("GUILE_LOAD_PATH");
-  load_path = str != NULL ? strdup (str) : NULL;
-  str = getenv ("GUILE_LOAD_COMPILED_PATH");
-  load_compiled_path = str ? strdup (str) : NULL;
+  /* Allow ./pre-inst-env to inject local paths. That way local sources
+     are preferred for most operations.  */
+  if (getenv ("GUIX_UNINSTALLED") == NULL)
+    {
+      const char *str;
+      str = getenv ("GUILE_LOAD_PATH");
+      load_path = str != NULL ? strdup (str) : NULL;
+      str = getenv ("GUILE_LOAD_COMPILED_PATH");
+      load_compiled_path = str ? strdup (str) : NULL;
 
-  unsetenv ("GUILE_LOAD_PATH");
-  unsetenv ("GUILE_LOAD_COMPILED_PATH");
+      unsetenv ("GUILE_LOAD_PATH");
+      unsetenv ("GUILE_LOAD_COMPILED_PATH");
+    }
 
   /* XXX: Do not let GMP allocate via libgc as this can lead to memory
      corruption in GnuTLS/Nettle since Nettle also uses GMP:
-- 
2.31.1





Acknowledgement sent to Sergei Trofimovich <slyfox@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#48434; 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, 17 Aug 2021 12:30:02 UTC

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