unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 72861@debbugs.gnu.org
Subject: bug#72861: 30.0.90; remote tramp (30.0.90): Couldn't find a proper `ls' command
Date: Fri, 30 Aug 2024 16:26:01 +0200	[thread overview]
Message-ID: <87v7zit7d2.fsf@gmx.de> (raw)
In-Reply-To: <877cbzmk6h.fsf@librehacker.com> (Christopher Howard's message of "Thu, 29 Aug 2024 07:18:46 -0800")

Christopher Howard <christopher@librehacker.com> writes:

Hi Christopher,

> I did this within an "emacs -q" session, and all the output in *debug tramp/ssh localhost* buffer is pasted below.

Thanks. Pls send the bug buffer as attachment next time; otherwise some
formatting is lost.

> From a quick glance at that, I wonder if the Emacs 30 version of tramp
> is looking for "ls" only in the certain standard directories like /bin
> and /usr/bin. On a guix system, however, no files are stored in these
> directories, except links to "sh" and "env", as executables are
> accessible from profile directories and the store via PATH.

Hmm, let's see what Tramp does. All checks are successful, until it
tries to determine the remote $PATH.

> 07:06:38.821548 tramp-send-command (6) # echo \"`getconf PATH 2>/dev/null`\" 2>/dev/null; echo tramp_exit_status $?
> 07:06:38.834376 tramp-wait-for-regexp (6) #
> "/bin:/usr/bin"
> tramp_exit_status 0
> ///ef73c2cb88ffee90faab20c0547acf27#$

This is what the underlying Linux says. Not su much, but there's also tramp-remote-path:

> 07:06:38.936774 tramp-send-command (6) # tramp_bundle_read_file_names () {
> echo "("
> while read file; do
>     quoted=`echo "$file" | sed -e "s/\"/\\\\\\\\\"/"`
>     printf "(%b" "\"$quoted\""
>     if test -e "$file"; then printf " %b" t; else printf " %b" nil; fi
>     if test -r "$file"; then printf " %b" t; else printf " %b" nil; fi
>     if test -d "$file"; then printf " %b)
> " t; else printf " %b)
> " nil; fi
> done
> echo ")"
> } 2>/dev/null; echo tramp_exit_status $?
> 07:06:38.937570 tramp-wait-for-regexp (6) #
> tramp_exit_status 0
> ///ef73c2cb88ffee90faab20c0547acf27#$

A shell script to be used.

> 07:06:38.938707 tramp-send-command (6) # tramp_bundle_read_file_names <<'6695bafbd64274a59417f8a21005f192' 2>/dev/null; echo tramp_exit_status $?
> /bin
> /usr/bin
> /sbin
> /usr/sbin
> /usr/local/bin
> /usr/local/sbin
> /local/bin
> /local/freeware/bin
> /local/gnu/bin
> /usr/freeware/bin
> /usr/pkg/bin
> /usr/contrib/bin
> /opt/bin
> /opt/sbin
> /opt/local/bin
> /opt/homebrew/bin
> /opt/homebrew/sbin
> 6695bafbd64274a59417f8a21005f192
> 07:06:38.986779 tramp-wait-for-regexp (6) #
> (
> ("/bin" t t t)
> ("/usr/bin" t t t)
> ("/sbin" nil nil nil)
> ("/usr/sbin" nil nil nil)
> ("/usr/local/bin" nil nil nil)
> ("/usr/local/sbin" nil nil nil)
> ("/local/bin" nil nil nil)
> ("/local/freeware/bin" nil nil nil)
> ("/local/gnu/bin" nil nil nil)
> ("/usr/freeware/bin" nil nil nil)
> ("/usr/pkg/bin" nil nil nil)
> ("/usr/contrib/bin" nil nil nil)
> ("/opt/bin" nil nil nil)
> ("/opt/sbin" nil nil nil)
> ("/opt/local/bin" nil nil nil)
> ("/opt/homebrew/bin" nil nil nil)
> ("/opt/homebrew/sbin" nil nil nil)
> )
> tramp_exit_status 0
> ///ef73c2cb88ffee90faab20c0547acf27#$

A check, whether the other directories exist. Hmm, they don't. Therefore

> 07:06:38.992727 tramp-send-command (6) # PATH=/bin:/usr/bin && export PATH
> 07:06:39.041141 tramp-wait-for-regexp (6) #
> ///ef73c2cb88ffee90faab20c0547acf27#$

And here we are. Just /bin:/usr/bin is in the PATH.

What's needed is, that you expand tramp-remote-path by the directories
guis keeps the system programs. See the Tramp manual (info "(tramp) Remote programs")

See also bug#64534. This is a Guix bug, that's why I haven't seen it
until now. But IIUC, Guix offers some Tramp config in its own version of
Emacs.

> Also, to be explicit: this was not a problem under 29.4 and goes away if I run my 29.4 executable again.

Hmm, I cannot comment, since I don't run Guix. Could it be that you have
used the Emacs package offered by Guix? As I understand bug#64534, it
comes with a suitable tramp-remote-path.

Best regards, Michael.





  reply	other threads:[~2024-08-30 14:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-28 20:32 bug#72861: 30.0.90; remote tramp (30.0.90): Couldn't find a proper `ls' command Christopher Howard
2024-08-29  4:45 ` Eli Zaretskii
2024-08-29  6:23 ` Christopher Howard
2024-08-29  6:38   ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-29 15:18     ` Christopher Howard
2024-08-30 14:26       ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-09-05 16:15         ` Christopher Howard
2024-09-05 16:34           ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-01 15:49 ` Christopher Howard
2024-11-01 16:17   ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors

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://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87v7zit7d2.fsf@gmx.de \
    --to=bug-gnu-emacs@gnu.org \
    --cc=72861@debbugs.gnu.org \
    --cc=michael.albinus@gmx.de \
    /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/emacs.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).