unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Hugo Buddelmeijer <hugo@buddelmeijer.nl>
To: Tobias Geerinckx-Rice <me@tobias.gr>
Cc: 59771@debbugs.gnu.org
Subject: bug#59771: Conda 22.9.0 needs "sudo" as dependency
Date: Sat, 3 Dec 2022 20:11:02 +0100	[thread overview]
Message-ID: <CA+Jv8O3TaHY42q4hgxXYvdfCq2CKrnu5fEo+4RmCSC8K4k2h2Q@mail.gmail.com> (raw)
In-Reply-To: <87359y3tqn.fsf@nckx>

[-- Attachment #1: Type: text/plain, Size: 2934 bytes --]

Hi T G-R,

Won't work, because sudo needs to be setuid — 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 <me@tobias.gr> wrote:

> Hi Hugo,
>
> Hugo Buddelmeijer 写道:
> > 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 — 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.
>
> 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
>

[-- Attachment #2: Type: text/html, Size: 3793 bytes --]

  reply	other threads:[~2022-12-03 19:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-02 11:36 bug#59771: Conda 22.9.0 needs "sudo" as dependency Hugo Buddelmeijer
2022-12-02 11:47 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2022-12-03 19:11   ` Hugo Buddelmeijer [this message]
2022-12-04 21:08     ` Hugo Buddelmeijer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+Jv8O3TaHY42q4hgxXYvdfCq2CKrnu5fEo+4RmCSC8K4k2h2Q@mail.gmail.com \
    --to=hugo@buddelmeijer.nl \
    --cc=59771@debbugs.gnu.org \
    --cc=me@tobias.gr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).