Let me preface this with the original intention:

GNU Guix is a pretty normal Linux distro that has a "/tmp" directory and
has "/bin/sh".  However, the build environment is pretty funky because
it wants to be "functional" (like nix).  I'm trying to run tests in this
funky build environment.

This build environment does not provide "/bin/sh" and the tmpdir is
something like "/tmp/guix-build-emacs-org-10.0-pre.drv-0/tmp-orgtest/".

Michael Albinus <[email protected]> writes:

> Ihor Radchenko <[email protected]> writes:
>
> Hi Ihor,
>
>> Maybe you recall
>> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=89f10a11f
>> We are struggling to find the rationale.
>
> Honey, it's almost 13 years ago ...
>
> The rationale is the comment I would say. What doesn't work with it?

This commit hard codes the temporary directory to "/tmp/" instead of
running `(temporary-file-directory)'.  This would fail on any system
that has a custom value of `temporary-file-directory'.

>> My understanding (Morgan, please correct if you have other issues
>> understanding TRAMP) is that the problem is in the following:
>>
>> (let ((default-directory "/ssh:lumi:~"))
>>   (with-connection-local-variables shell-file-name))
>>
>> The above always returns /bin/sh, but /bin/sh is not always a valid path
>> to shell on remote system. In particular, it does not exist on Guix.
>
> The connection-local variable shell-file-name is set for Tramp in
> tramp-integration.sh. See the constant
> tramp-connection-local-default-shell-variables and its use.
>
> If you want to have another value for a give host, you can do it as
> described in (info "(tramp) Remote processes") . It excplains it for
> explicit-shell-file-name, but the same can be done for shell-file-name.

I imagine that "/bin/sh" not existing is a GNU Guix problem.  "/bin/sh"
is a pretty good default for TRAMP to try so I don't believe there is
any deficiency in TRAMP with regards to this.  I just need to figure out
the best way to specify the shell for testing.  Thank you Michael for
pointing towards that documentation.  I'll take a look.

Reply via email to