From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id uIjVGweDG2HxEQAAgWs5BA (envelope-from ) for ; Tue, 17 Aug 2021 11:36:07 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id SE12FweDG2GJBAAAbx9fmQ (envelope-from ) for ; Tue, 17 Aug 2021 09:36:07 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id F2A1311E7 for ; Tue, 17 Aug 2021 11:36:06 +0200 (CEST) Received: from localhost ([::1]:47762 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mFvVt-0008VR-Vx for larch@yhetil.org; Tue, 17 Aug 2021 05:36:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41580) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mFvVq-0008VD-Gj for guix-patches@gnu.org; Tue, 17 Aug 2021 05:36:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40156) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mFvVq-0005Jz-6D for guix-patches@gnu.org; Tue, 17 Aug 2021 05:36:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mFvVq-0002q1-1J for guix-patches@gnu.org; Tue, 17 Aug 2021 05:36:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48434] [PATCH] guile: allow pre-inst-env inject local paths Resent-From: Sergei Trofimovich Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 17 Aug 2021 09:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48434 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos Cc: 48434@debbugs.gnu.org Received: via spool by 48434-submit@debbugs.gnu.org id=B48434.162919295510894 (code B ref 48434); Tue, 17 Aug 2021 09:36:01 +0000 Received: (at 48434) by debbugs.gnu.org; 17 Aug 2021 09:35:55 +0000 Received: from localhost ([127.0.0.1]:51702 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFvVj-0002pd-5l for submit@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 ) id 1mFvVh-0002pQ-CP for 48434@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@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 Message-ID: <20210817103539.205800bd@zn3> In-Reply-To: <20210817092830.7a86d795@zn3> References: <20210515095227.3245343-1-slyfox@gentoo.org> <20210816182822.654d3e1f@zn3> <430b0e953bf76a13ff2290004d3e7ac1f0bdef7c.camel@telenet.be> <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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1629192967; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=uedwg5W9z6ZKQW88Ey5UaoofH+mZgD+/XyiDZRf39nc=; b=SjSv40ogqa92oe3QBdQ3k/GMgIrYSZZmpsfnhiwJ0VUIDu1pbp5Gl+rM04dF0ME83AvXCP 09gXNWHhfPBqkeakk/t/fPxz3QD4q4J20R2l8Q15/icyYsmaD79Y5xos6nUc/3PKiuEon6 QgBJluwvkcnyMr7oNpQna/HIDueVn39EmicuWimQ7RMFo4wUzqhgqdFI/fvDMHklZFvlRf OTkyTeiZqZuLIrVXay9LxJdUs1//MnyRUXlBc+qdOuyA63KJXFrUKnLIiu5oaY8zDS87Hu QmmmzM/RRMjhsQl6h+naD2wb49rePexh9ir6/Z66FdR8h8FfEhzXSYlheEdljQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1629192967; a=rsa-sha256; cv=none; b=O7YI2fUR4iAfJTkoFPn6OSMiA6Y36U8UVjaVNQqMb0aK8OxLaXsg8SKkVfPSnNbQFlXP0n ANbIp9GZ/Ssjr8ohLNHTlJCmbLU/zcW6ghIBlKscnxR2Fn+osBT89Ap3B3Hof7c7je1em+ KB1RskzeraiCdrQwzYpXCMJPJf2F/ugDGoVtXy2O6ceEcQx8ENryMQe2NRmiJKAWDcLy7j 4ZJJ7qldsAAjqoziAjJLcV675BXFq8ujvtNHyixzXAVLlXYHHPg/kg5SMHHk6ZflZnFRuv YLhQfQE0I3V2WYwAm56qcMmkeUWASPtiQcgARZZNw1J/DnmvX7QFoBa+hM0iSQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=RxyPQmie; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -2.92 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=RxyPQmie; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: F2A1311E7 X-Spam-Score: -2.92 X-Migadu-Scanner: scn1.migadu.com X-TUID: USlp8lxuRgRk --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 wrote: > On Mon, 16 Aug 2021 20:52:48 +0200 > Maxime Devos 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 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--