From unknown Sat Jun 21 03:21:33 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#59771 <59771@debbugs.gnu.org> To: bug#59771 <59771@debbugs.gnu.org> Subject: Status: Conda 22.9.0 needs "sudo" as dependency Reply-To: bug#59771 <59771@debbugs.gnu.org> Date: Sat, 21 Jun 2025 10:21:33 +0000 retitle 59771 Conda 22.9.0 needs "sudo" as dependency reassign 59771 guix submitter 59771 Hugo Buddelmeijer severity 59771 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 02 06:36:48 2022 Received: (at submit) by debbugs.gnu.org; 2 Dec 2022 11:36:49 +0000 Received: from localhost ([127.0.0.1]:46172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p14LU-0008BM-TJ for submit@debbugs.gnu.org; Fri, 02 Dec 2022 06:36:48 -0500 Received: from lists.gnu.org ([209.51.188.17]:41756) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p14LP-0008BE-N2 for submit@debbugs.gnu.org; Fri, 02 Dec 2022 06:36:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p14LP-0004jY-FC for bug-guix@gnu.org; Fri, 02 Dec 2022 06:36:39 -0500 Received: from mail-ej1-f45.google.com ([209.85.218.45]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p14LN-0000b8-AG for bug-guix@gnu.org; Fri, 02 Dec 2022 06:36:39 -0500 Received: by mail-ej1-f45.google.com with SMTP id n20so10998752ejh.0 for ; Fri, 02 Dec 2022 03:36:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=PZ5zz5BL4EOAOHDtd7GAR+QRd6aZGw3Fmw6URNNVxSM=; b=jwWw4AUIj3GR+Or1DcpT4az6BD7j9gjolV081J8eDm/ppluClap+lnpUt9y0Iv6pPl o5yWLTpg30Uux2haESleRMtA632KXvxB1ClEXO+JpDMOsNlbokxwbhU7GCBxcySdL/AO tYgO3fYrUzeiEie/ZEDjVw4Q3B+/tYPtBjUKAkojq1MveXszYrjJbI0Y6RCpnyM7S9Zy NPWTjoISZD2aHKzZjesIp39IMe4hVDoYHoGwJP209SIU//c3Q0RRkpYg8sKFJMBFEzwZ V9G8HO5qaNY/yG/VZL44Q/YrdrXeMFFC1cduS3g8sod0J6fThUEOaZGInZ9168ZPom2W ZAMQ== X-Gm-Message-State: ANoB5pnWJ0QFeVElIZRwhoTZ93upTNNK4DMhm8Kh9KB6G4SgqAFHo11i h4C9QGWoFXGFtb3bOHcUbBCjRSfkdo8EbwUvVyKhRdlFRuvjfw== X-Google-Smtp-Source: AA0mqf6Eq8n9Ju2TVgn1pV0LlKwIky/9CRCzPotH+8QQamCsULfCw0iMni1EHuOv1zrzgQsXyy/NZPJtqo1c6YPnpp4= X-Received: by 2002:a17:906:b241:b0:7bc:1f2c:41b5 with SMTP id ce1-20020a170906b24100b007bc1f2c41b5mr30934254ejb.463.1669980994817; Fri, 02 Dec 2022 03:36:34 -0800 (PST) MIME-Version: 1.0 From: Hugo Buddelmeijer Date: Fri, 2 Dec 2022 12:36:23 +0100 Message-ID: Subject: Conda 22.9.0 needs "sudo" as dependency To: bug-guix@gnu.org Content-Type: multipart/alternative; boundary="000000000000fa52b805eed6bf39" Received-SPF: pass client-ip=209.85.218.45; envelope-from=blackshift@gmail.com; helo=mail-ej1-f45.google.com X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) --000000000000fa52b805eed6bf39 Content-Type: text/plain; charset="UTF-8" Hi all, Conda 22.9.0 needs "sudo" as a dependency: $ guix shell -C conda [env]$ conda --version conda 22.9.0 [env]$ conda init bash [...] Traceback (most recent call last): [...] File "/gnu/store/lvip6h5pamjwmvnkwg60sjb63ph8698k-python-3.9.9/lib/python3.9/subprocess.py", line 18 21, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'sudo' The problem goes away when sudo is added to the guix shell command. This results in another error though; I'll report another bug for that. As for why sudo is needed, I don't know. (Not sure I want to know.) Background: if conda works well in guix, then we can get more conda users and package maintainers on board with guix. Greetings, Hugo --000000000000fa52b805eed6bf39 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi all,

Conda 22.9.0 needs &= quot;sudo" as a dependency:

$ guix shell -C c= onda

[env]$ conda --version
conda 22.9.0
<= div>
[env]$ conda init bash
[...]
=C2=A0 =C2=A0 Traceback (most recent call last):
[...]
=
=C2=A0 =C2=A0 =C2=A0 File "/gnu/store/lvip6h5pamjwmvnkwg60sjb63ph= 8698k-python-3.9.9/lib/python3.9/subprocess.py", line 18
21, in _ex= ecute_child
=C2=A0 =C2=A0 =C2=A0 =C2=A0 raise child_exception_type(errno= _num, err_msg, err_filename)
=C2=A0 =C2=A0 FileNotFoundError: [Errno 2] = No such file or directory: 'sudo'


The problem goes away when sudo is added to the guix shell command. = This results in another error though; I'll report another bug for that.=

As for why sudo is needed, I don't know. (Not= sure I want to know.)

Background: if conda wo= rks well in guix, then we can get more conda users and package maintainers = on board with guix.

Greetings,
Hugo<= /div>


--000000000000fa52b805eed6bf39-- From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 02 06:54:03 2022 Received: (at submit) by debbugs.gnu.org; 2 Dec 2022 11:54:03 +0000 Received: from localhost ([127.0.0.1]:46268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p14cF-0008Lt-DR for submit@debbugs.gnu.org; Fri, 02 Dec 2022 06:54:03 -0500 Received: from lists.gnu.org ([209.51.188.17]:38946) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p14cE-0008Ln-Il for submit@debbugs.gnu.org; Fri, 02 Dec 2022 06:54:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p14cE-0000pG-Bf for bug-guix@gnu.org; Fri, 02 Dec 2022 06:54:02 -0500 Received: from tobias.gr ([2a02:c205:2020:6054::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p14cC-0006hj-IO for bug-guix@gnu.org; Fri, 02 Dec 2022 06:54:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=2018; bh=URJi/3dRkzNUF SvE+WCunnjC/AMZNFaY0pa8sGoH2fA=; h=in-reply-to:date:subject:cc:to: from:references; d=tobias.gr; b=FAhTSsRb+SOQmbMifx+jgyOWg62bpgPCEF0GVK pEVXIrkblRnPw0gwzY7gf5fljAeZmFUGu1089VKuFfK+sX5+vStzYEZ/GOYPMBuedIfjPl wWE7+gsThYFblUZvX7/PVAKuk3/7n2xa68ZtCzBR3l/ZdPhdm4ol/iDoYq30LBWsro7WKL H54ySCTSCbObtmuG7leBPhb3moZutQu2dMIPMr6FtsMdyJ8V4K9V7fPuoU74Nf8YRd3bFx FCHCp5dkYd+ZVJI8fRKqR70Vaze3axPWxgojVX/4HqaQ8O5tT1v4bG2SPdDGvX+FIYm4sB vT9H5WoO+o3r5P0G7u1Qp9Sw== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 9c892eda (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Fri, 2 Dec 2022 11:53:55 +0000 (UTC) References: From: Tobias Geerinckx-Rice To: Hugo Buddelmeijer Subject: Re: bug#59771: Conda 22.9.0 needs "sudo" as dependency Date: Fri, 02 Dec 2022 12:47:22 +0100 In-reply-to: BIMI-Selector: v=BIMI1; s=default; Message-ID: <87359y3tqn.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=2a02:c205:2020:6054::1; envelope-from=me@tobias.gr; helo=tobias.gr 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, 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: bug-guix@gnu.org, 59771@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi Hugo, Hugo Buddelmeijer =E5=86=99=E9=81=93=EF=BC=9A > As for why sudo is needed, I don't know. (Not sure I want to=20 > know.) Indeed, this sounds like something to report and fix upstream. > $ guix shell -C conda sudo Won't work, because sudo needs to be setuid =E2=80=94 that is, provided by= =20 the OS. On Guix Systems, that means /run/setuid-programs/sudo. It cannot=20 be run from the store, where setuid programmes are not allowed. I tried --expose'ing /run/setuid-programs, but then sudo fails to=20 find libsudo_util.so.0. I didn't test further but don't expect=20 that to suffice: sudo simply makes too many assumptions about the=20 system, because of the special job it needs to do. While it would be nice to figure out how to provide=20 setuid-programs to a containers, Conda's pointless use of sudo is=20 the bug here. Kind regards, T G-R --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCY4nnsA0cbWVAdG9iaWFz LmdyAAoJEA2w/4hPVW15bBkBAMzzB4Y9lO1Kd5qSaJnAG7JfZLYZc358m6LL2Et9 ZWJUAQDoo3N9sV5aA64FS7jswU5j7VqbHXNgahVTpRlKIqXOBw== =6HLi -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 03 14:11:22 2022 Received: (at submit) by debbugs.gnu.org; 3 Dec 2022 19:11:22 +0000 Received: from localhost ([127.0.0.1]:52842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1Xuz-0000Dr-Ft for submit@debbugs.gnu.org; Sat, 03 Dec 2022 14:11:22 -0500 Received: from lists.gnu.org ([209.51.188.17]:50534) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1Xuw-0000Df-QN for submit@debbugs.gnu.org; Sat, 03 Dec 2022 14:11:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p1Xuw-0003wB-Le for bug-guix@gnu.org; Sat, 03 Dec 2022 14:11:18 -0500 Received: from mail-ej1-f44.google.com ([209.85.218.44]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p1Xuu-0001ne-CJ for bug-guix@gnu.org; Sat, 03 Dec 2022 14:11:18 -0500 Received: by mail-ej1-f44.google.com with SMTP id vp12so18752379ejc.8 for ; Sat, 03 Dec 2022 11:11:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FNXABJiRBNPTrxq5Yw2Hbt0XTRP6h5/dIDHEFEWeuNE=; b=43DjGSRy9Bktx/WbTA6LEc65Y55DEqAOeRRzrffku/Y1SqOIp8pv5MPxHDdp9jpVAp FUK9hlmBAPzFGpN1rvxt6LBkssfTn/+tIFpUkFd0N84folcfUNqE3CiKGNfhMfOrJ7bs oJ/CDLTl3yMxWpygCbTZgxDkBaCoVvGo8DId8z11068vSxXWQgXSuRLNElMyooWjS97n P/K0I7tc6GHZSldahfWP4J2bly4GjleycMli0a1VbBtngoOzCcXX82+jApri3b8gnuDt VNawv/U8ncjgFQHkf/2yV40qYAFZMgWZ57esFBbGd3dR7oO2X2fkN26Id1JrHwLL0VPV fw8w== X-Gm-Message-State: ANoB5pmPSukbYyPBPqEFyMnjCcY3fPcGxqREoS6gD83HL76sjw/hTTUb p488afRRAtru/S/89wdPThRQM/c/F/oaJ9MS+Tg= X-Google-Smtp-Source: AA0mqf5tx+78Kc8+lPcjgusqmDX3gO5VfQVzwuVHSkBqiCavbMABP5Riz/jR4PMmV2Vf8qxKq+H7pced0pYm9zEAFqc= X-Received: by 2002:a17:906:65c4:b0:7ad:d250:b907 with SMTP id z4-20020a17090665c400b007add250b907mr63492448ejn.737.1670094674058; Sat, 03 Dec 2022 11:11:14 -0800 (PST) MIME-Version: 1.0 References: <87359y3tqn.fsf@nckx> In-Reply-To: <87359y3tqn.fsf@nckx> From: Hugo Buddelmeijer Date: Sat, 3 Dec 2022 20:11:02 +0100 Message-ID: Subject: Re: bug#59771: Conda 22.9.0 needs "sudo" as dependency To: Tobias Geerinckx-Rice Content-Type: multipart/alternative; boundary="000000000000c9e49b05eef137cb" Received-SPF: pass client-ip=209.85.218.44; envelope-from=blackshift@gmail.com; helo=mail-ej1-f44.google.com X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit Cc: bug-guix@gnu.org, 59771@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) --000000000000c9e49b05eef137cb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi T G-R, Won't work, because sudo needs to be setuid =E2=80=94 that is, provided by > the OS. > > On Guix Systems, that means /run/setuid-programs/sudo. It cannot > be run from the store, where setuid programmes are not allowed. > Thanks. I did not notice that there are two different sudo's. It does make sense. Note that I did not intend (or try) to actually run anything with root access; it seemed that the problem went away if sudo was merely available, but that is not true. I believe that bug 59772 (the next one) is a direct result of sudo not behaving as conda expects. I do believe this bug and 59772 to ultimately be conda bugs, because "conda init" worked fine on guix in the past; I'll investigate and raise it with them. But maybe 59771 (this bug), 59772 (also due to sudo), and 59776 (hardcoded paths), all three could be resolved in a more guix-y way. The problem in these three bugs is that "conda init" wants to add something to ~/.bashrc that adds some bash functions to the environment (and the sole purpose of those bash functions seems to be to update PS1). However, I was wondering, would it be possible to have guix itself add those bash functions to the environment? As in, we add some code to the guix conda package that ensures that if guix enters an environment with conda, that it somehow adds the necessary bash functions to the environment. So "conda init" and changes to ~/.bashrc would not even be necessary (thus fixing these bugs). That is, that the shell spawned through "guix shell -C conda" would have these bash functions directly in the environment. Would something like this be possible? Something simpler would be a guix package that updates an environment variable. But I can't find one quickly, so maybe this is not something that is possible in guix? E.g. the conda openjdk package sets JAVA_HOME, but the guix openjdk package does not. Greetings, Hugo On Fri, 2 Dec 2022 at 12:47, Tobias Geerinckx-Rice wrote: > Hi Hugo, > > Hugo Buddelmeijer =E5=86=99=E9=81=93=EF=BC=9A > > As for why sudo is needed, I don't know. (Not sure I want to > > know.) > > Indeed, this sounds like something to report and fix upstream. > > > $ guix shell -C conda sudo > > Won't work, because sudo needs to be setuid =E2=80=94 that is, provided b= y > the OS. > > On Guix Systems, that means /run/setuid-programs/sudo. It cannot > be run from the store, where setuid programmes are not allowed. > > I tried --expose'ing /run/setuid-programs, but then sudo fails to > find libsudo_util.so.0. I didn't test further but don't expect > that to suffice: sudo simply makes too many assumptions about the > system, because of the special job it needs to do. > > While it would be nice to figure out how to provide > setuid-programs to a containers, Conda's pointless use of sudo is > the bug here. > > Kind regards, > > T G-R > --000000000000c9e49b05eef137cb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi T G-R,

Won't work, because sudo needs to be se= tuid =E2=80=94 that is, provided by
the OS.

On Guix Systems, that means /run/setuid-programs/sudo.=C2=A0 It cannot
be run from the store, where setuid programmes are not allowed.

Thanks. I did not notice that there = are two different sudo's. It does make sense.

<= div>Note that I did not intend (or try) to actually run anything with root = access; it seemed that the problem went away if sudo was merely available, = but that is not true. I believe that bug 59772 (the next one) is a direct r= esult of sudo not behaving as conda expects. I do believe this bug and 5977= 2 to ultimately be conda bugs, because "conda init" worked fine o= n guix in the past; I'll investigate and raise it with them.
<= div>
But maybe 59771 (this bug), 59772 (also due to sudo), an= d 59776 (hardcoded paths), all three could be resolved in a more guix-y way= . The problem in these three bugs is that "conda init" wants to a= dd something to ~/.bashrc that adds some bash functions to the environment = (and the sole purpose of those bash functions seems to be to update PS1). H= owever, I was wondering, would it be possible to have guix itself add those= bash functions to the environment?

As in, we add = some code to the guix conda package that ensures that if guix enters an env= ironment with conda, that it somehow adds the necessary bash functions to t= he environment. So "conda init" and changes to ~/.bashrc would no= t even be necessary (thus fixing these bugs). That is, that the shell spawn= ed through "guix shell -C conda" would have these bash functions = directly in the environment. Would something like this be possible?

Something simpler would be a guix package that updates an= environment variable. But I can't find one quickly, so maybe this is n= ot something that is possible in guix? E.g. the conda openjdk package sets = JAVA_HOME, but the guix openjdk package does not.

= Greetings,
Hugo









<= /div>


On Fri, 2 Dec 2022 at 12:47, Tobias Geerinckx-Rice <= me@tobias.gr> wrote:
Hi Hugo,

Hugo Buddelmeijer =E5=86=99=E9=81=93=EF=BC=9A
> As for why sudo is needed, I don't know. (Not sure I want to
> know.)

Indeed, this sounds like something to report and fix upstream.

> $ guix shell -C conda sudo

Won't work, because sudo needs to be setuid =E2=80=94 that is, provided= by
the OS.

On Guix Systems, that means /run/setuid-programs/sudo.=C2=A0 It cannot
be run from the store, where setuid programmes are not allowed.

I tried --expose'ing /run/setuid-programs, but then sudo fails to
find libsudo_util.so.0.=C2=A0 I didn't test further but don't expec= t
that to suffice: sudo simply makes too many assumptions about the
system, because of the special job it needs to do.

While it would be nice to figure out how to provide
setuid-programs to a containers, Conda's pointless use of sudo is
the bug here.

Kind regards,

T G-R
--000000000000c9e49b05eef137cb-- From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 04 16:08:35 2022 Received: (at submit) by debbugs.gnu.org; 4 Dec 2022 21:08:35 +0000 Received: from localhost ([127.0.0.1]:59745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1wDz-0000Py-9B for submit@debbugs.gnu.org; Sun, 04 Dec 2022 16:08:35 -0500 Received: from lists.gnu.org ([209.51.188.17]:41298) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1wDw-0000Pr-KX for submit@debbugs.gnu.org; Sun, 04 Dec 2022 16:08:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p1wDw-0002BJ-EH for bug-guix@gnu.org; Sun, 04 Dec 2022 16:08:32 -0500 Received: from mail-ej1-f52.google.com ([209.85.218.52]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p1wDu-0000Gk-6h for bug-guix@gnu.org; Sun, 04 Dec 2022 16:08:32 -0500 Received: by mail-ej1-f52.google.com with SMTP id n21so23440445ejb.9 for ; Sun, 04 Dec 2022 13:08:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=EIuGahCSa/TxQGoIG29Zo4X4mfXW9Jj8KUNhv3oqxRY=; b=2+FRAU8l27TNA4jzmwnF870MhBDsYdNrx2xE5DEqS+VroOEODGS9HhbNRL/mcwoUVU lJqtXefxYxV4GA2pFm0RTFv4CIDl4HziKr++a8e+77TczDvHkLWCuJ1Q3sqMhukaq/Ky IFkXWefzEC6BKSsbjlX4nD3BokiPKbSuoyyRkFV2yN0etQe66u8dHjZzC8E8mfbwioak ewodaMEoReJ0512Xt9AYkYO0l2cVePoW8L7YHNwno16i1Xc4D2Ir6NKkuqQZYS4HvutW UyUqb7t6yr0/dMc+YB6yUy2Ipic+gQeiqSmYh15eZGqiUBaH870icS+NALVpjGplkdvi FSvA== X-Gm-Message-State: ANoB5pmsr+pizev27MK7LOsiFOD5ZFkwPfGRJjhaCksl0hwkvVpMjT2I L2dI325E6hUwNoZIcOcqkIqYJ6K7iCfWlso2L44= X-Google-Smtp-Source: AA0mqf69EwIktFKH9PBCzopDL4icrt6/QaqbXXzffk/X63uf6NdyOq4kSvkmYXO+9T47TpDoasll+aY8/dnRB0FNo44= X-Received: by 2002:a17:906:a212:b0:7b2:804f:a31c with SMTP id r18-20020a170906a21200b007b2804fa31cmr50521866ejy.523.1670188107853; Sun, 04 Dec 2022 13:08:27 -0800 (PST) MIME-Version: 1.0 References: <87359y3tqn.fsf@nckx> In-Reply-To: From: Hugo Buddelmeijer Date: Sun, 4 Dec 2022 22:08:16 +0100 Message-ID: Subject: Re: bug#59771: Conda 22.9.0 needs "sudo" as dependency To: Tobias Geerinckx-Rice Content-Type: multipart/alternative; boundary="000000000000e074c805ef06f8e4" Received-SPF: pass client-ip=209.85.218.52; envelope-from=blackshift@gmail.com; helo=mail-ej1-f52.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.129, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit Cc: bug-guix@gnu.org, 59771@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) --000000000000e074c805ef06f8e4 Content-Type: text/plain; charset="UTF-8" On Sat, 3 Dec 2022 at 20:11, Hugo Buddelmeijer wrote: > > But maybe 59771 (this bug), 59772 (also due to sudo), and 59776 (hardcoded > paths), all three could be resolved in a more guix-y way. The problem in > these three bugs is that "conda init" wants to add something to ~/.bashrc > that adds some bash functions to the environment (and the sole purpose of > those bash functions seems to be to update PS1). However, I was wondering, > would it be possible to have guix itself add those bash functions to the > environment? > > As in, we add some code to the guix conda package that ensures that if > guix enters an environment with conda, that it somehow adds the necessary > bash functions to the environment. So "conda init" and changes to ~/.bashrc > would not even be necessary (thus fixing these bugs). That is, that the > shell spawned through "guix shell -C conda" would have these bash functions > directly in the environment. Would something like this be possible? > No, adding bash functions automatically to a Guix environment seems impossible. The guile function load-profile allows packages to add path-like environment variables through the search-path-specification declaration, but not any other environment variables, let alone shell functions. That seems reasonable enough. One reason I'd like to move away from conda is that I don't think the way conda handles environment variables is tenable. So maybe it is worthwhile to make sure that "conda init" does what it is expected to do (that is, add the code that loads these bash functions to .bashrc), even though it is not really guix-y. --000000000000e074c805ef06f8e4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, 3 Dec 2022 at 20:11, Hugo Buddelmeijer <hugo@buddelmeijer.nl> wrote:

But maybe 59771 (this bug), 59772 (also due to sudo), and 59= 776 (hardcoded paths), all three could be resolved in a more guix-y way. Th= e problem in these three bugs is that "conda init" wants to add s= omething to ~/.bashrc that adds some bash functions to the environment (and= the sole purpose of those bash functions seems to be to update PS1). Howev= er, I was wondering, would it be possible to have guix itself add those bas= h functions to the environment?

As in, we add some= code to the guix conda package that ensures that if guix enters an environ= ment with conda, that it somehow adds the necessary bash functions to the e= nvironment. So "conda init" and changes to ~/.bashrc would not ev= en be necessary (thus fixing these bugs). That is, that the shell spawned t= hrough "guix shell -C conda" would have these bash functions dire= ctly in the environment. Would something like this be possible?
=

No, adding bash functions automatically to= a Guix environment seems impossible. The guile function load-profile allow= s packages to add path-like environment variables through the search-path-s= pecification declaration, but not any other environment variables, let alon= e shell functions.

That seems reasonable enough. O= ne reason I'd like to move away from conda is that I don't think th= e way conda handles environment variables is tenable. So maybe it is worthw= hile to make sure that "conda init" does what it is expected to d= o (that is, add the code that loads these bash functions to .bashrc), even = though it is not really guix-y.

=C2=A0
--000000000000e074c805ef06f8e4--