GNU bug report logs -
#40125
Problem with guix offload: Remote channel closed
Previous Next
Reported by: mikael <at> djurfeldt.com
Date: Wed, 18 Mar 2020 20:00:02 UTC
Severity: normal
Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
On Sun, Mar 22, 2020 at 11:59 PM Marius Bakke <mbakke <at> fastmail.com> wrote:
> Mikael Djurfeldt <mikael <at> 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???
[Message part 2 (text/html, inline)]
This bug report was last modified 1 year and 298 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.