GNU bug report logs -
#31924
27.0.50; tramp handler /sudo::FILE fails when /bin/sh points to zsh
Previous Next
Reported by: Tino Calancha <tino.calancha <at> gmail.com>
Date: Thu, 21 Jun 2018 09:11:01 UTC
Severity: normal
Found in version 27.0.50
Fixed in version 27.1
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
Full log
Message #54 received at 31924 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I am using tramp with a custom method, and the commit b70f885d seems to break it.
The usage is with yadm (https://yadm.io/), which prepares a bare git repo to host dotfiles. Here is a minimum script to reproduce the problem:
> #!/bin/bash
> # this file is /tmp/yadm.sh
> shell_opts=""
> shell_path=""
> if [[ "$SHELL" =~ bash$ ]]; then
> shell_opts="--norc"
> shell_path="\w"
> elif [[ "$SHELL" =~ [cz]sh$ ]]; then
> shell_opts="-f"
> shell_path="%~"
> fi
>
> if [[ "$TERM" == "dumb" ]]; then
> yadm_prompt=" > "
> fi
>
> # echo "Entering yadm repo"
>
> PROMPT="$yadm_prompt" PS1="$yadm_prompt" "$SHELL" $shell_opts
>
> echo "Leaving yadm repo"
> # end of yadm.sh
Start emacs with emacs -q, and evaluate the following
> (require 'tramp)
> (add-to-list 'tramp-methods
> '("yadm"
> (tramp-login-program "/tmp/yadm.sh")
> ;; setting the following is crucial
> (tramp-login-env
> (("SHELL")
> ("/bin/sh")))
> (tramp-remote-shell "/bin/sh")
> (tramp-remote-shell-args ("-c"))
> (tramp-connection-timeout 10)))
>
> (find-file "/yadm::.")
which will lead to a timeout.
Notes:
1. Note setting tramp-login-env with SHELL as "/bin/sh" is crucial for this method to work
2. My default shell is /usr/bin/zsh
3. The tramp buffer also has the mysterious "[?2004h" in the tramp buffer.
Please see log files with (setq tramp-verbose 10) in attachment.
Sheng Yang(杨圣), PhD student
Computer Science Department
University of Maryland, College Park
E-mail: styang <at> fastmail.com
E-mail (old but still used): yangsheng6810 <at> gmail.com
[Message part 2 (text/html, inline)]
[tramp.log (text/x-log, attachment)]
[tramp-yadm.log (text/x-log, attachment)]
This bug report was last modified 5 years and 211 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.