unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Mikael Djurfeldt <mikael@djurfeldt.com>
To: Marius Bakke <mbakke@fastmail.com>
Cc: 40125@debbugs.gnu.org
Subject: bug#40125: Problem with guix offload: Remote channel closed
Date: Mon, 23 Mar 2020 00:12:47 +0100	[thread overview]
Message-ID: <CAA2XvwJNTqC3-oHUqxDU=6kWm1F-fuywXq6WC=mNf5_Z5vztMQ@mail.gmail.com> (raw)
In-Reply-To: <87a7483sk0.fsf@devup.no>

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

On Sun, Mar 22, 2020 at 11:59 PM Marius Bakke <mbakke@fastmail.com> wrote:

> Mikael Djurfeldt <mikael@djurfeldt.com> writes:
>
> >> It might be .bashrc is configured not to source the relevant scripts
> >> when being invoked non-interactively, and/or through an SSH session.
> >>
> >
> > You're right. It doesn't source the scripts. The PATH only becomes
> > /usr/local/bin:/usr/bin:/bin:/usr/games in this case.
>
> On Guix System, the default .bashrc does this:
>
> if [[ $- != *i* ]]
> then
>     # We are being invoked from a non-interactive shell.  If this
>     # is an SSH session (as in "ssh host command"), source
>     # /etc/profile so we get PATH and other essential variables.
>     [[ -n "$SSH_CLIENT" ]] && source /etc/profile
>
>     # Don't do anything else.
>     return
> fi
>
> IIRC Debian does something similar to detect if being invoked
> non-interactively, but then just returns instead of sourcing anything.
>
> Adding a line that sources ~/.guix-profile/etc/profile before the check
> for an interactive shell might be enough in that case.
>

I examined this a bit. You're right about .bashrc. But sourcing that
profile is not sufficient.

Just as a test, I enabled user specified environments in sshd_config (such
that ssh reads .ssh/environment) and added the following there:

PATH=/gnu/store/0awhym5h0m890n0wq87y0dxznh14rk88-guile-next-3.0.1/bin:/home/guix/.guix-profile/bin:/usr/local/bin:/usr/bin:/bin:/usr/games
GUILE_LOAD_COMPILED_PATH=/gnu/store/nkh7c4ygaivfxdq3zhccl4a5qxrn6s88-guix-module-union/lib/guile/3.0/site-ccache:/gnu/store/0awhym5h0m890n0wq87y0dxznh14rk88-guile-next-3.0.1/lib/guile/3.0/ccache
GUILE_LOAD_PATH=/gnu/store/nkh7c4ygaivfxdq3zhccl4a5qxrn6s88-guix-module-union/share/guile/site/3.0:/gnu/store/0awhym5h0m890n0wq87y0dxznh14rk88-guile-next-3.0.1/share/guile/3.0
GUIX_PROFILE=/home/guix/.guix-profile
GUIX_LOCPATH=/home/guix/.guix-profile/lib/locale

This made the offload test work.

Crucial here is the PATH to guile 3.0.1 as well as the GUILE_LOAD_* paths.

But how are these *supposed* to be setup on the build host???

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

  reply	other threads:[~2020-03-22 23:14 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-18 19:58 bug#40125: Problem with guix offload: Remote channel closed Mikael Djurfeldt
2020-03-18 20:01 ` Mikael Djurfeldt
2020-03-21 15:50   ` Ludovic Courtès
2020-03-21 16:05     ` Mikael Djurfeldt
2020-03-21 20:00       ` Mikael Djurfeldt
2020-03-21 22:16       ` Ludovic Courtès
2020-03-22 18:21         ` Mikael Djurfeldt
2020-03-22 20:45           ` Ludovic Courtès
2020-03-22 21:40             ` Mikael Djurfeldt
2020-03-22 21:56               ` Mikael Djurfeldt
2020-03-22 22:13                 ` Mikael Djurfeldt
2020-03-22 22:14                   ` Mikael Djurfeldt
2020-03-22 22:24                     ` Mikael Djurfeldt
2020-03-22 22:30                     ` Marius Bakke
2020-03-22 22:44                       ` Mikael Djurfeldt
2020-03-22 22:58                         ` Marius Bakke
2020-03-22 23:12                           ` Mikael Djurfeldt [this message]
2020-03-22 23:28                             ` Mikael Djurfeldt
2020-03-22 23:40                             ` Marius Bakke
2020-03-23  9:50               ` Ludovic Courtès
2023-08-02 15:09                 ` Maxim Cournoyer

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='CAA2XvwJNTqC3-oHUqxDU=6kWm1F-fuywXq6WC=mNf5_Z5vztMQ@mail.gmail.com' \
    --to=mikael@djurfeldt.com \
    --cc=40125@debbugs.gnu.org \
    --cc=mbakke@fastmail.com \
    /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).