diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 2eb5b45eb2..ade4d5cb2d 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -1960,16 +1960,31 @@ Remote programs @section How @value{tramp} finds and uses programs on the remote host @value{tramp} requires access to and rights to several commands on -remote hosts: @command{ls}, @command{test}, @command{find} and +remote hosts: at least @command{ls}, @command{test}, @command{find} and @command{cat}. +For inline methods, at least one of the following should be available: + +@itemize @bullet +@item @command{base64} +@item @command{openssl} +@item @command{mimencode} +@item @command{mmencode} +@item @command{recode} +@item @command{perl} or @command{perl5} (if the @command{MIME::Base64} +module is available, it will be used) +@item @command{od} and @command{busybox awk} +@item @command{hexdump} and @command{busybox awk} +@item @command{uuencode} and @command{uudecode} +@end itemize + +If none of these are available, @value{tramp} will not work with inline methods, +but other methods may still be used. If @command{gzip} is available, it is +also used, in order to improve performance. + Besides there are other required programs for @ref{Inline methods} and @ref{External methods} of connection. -To improve performance and accuracy of remote file access, -@value{tramp} uses @command{perl} (or @command{perl5}) and -@command{grep} when available. - @defopt tramp-remote-path @code{tramp-remote-path} specifies which remote directory paths @value{tramp} can search for @ref{Remote programs}. diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 95fa61af98..fc2fb51b8a 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -850,8 +850,12 @@ tramp-perl-unpack "Perl program to use for decoding a file. Escape sequence %s is replaced with name of Perl binary.") -(defconst tramp-awk-encode - "od -v -t x1 -A n | busybox awk '\\ +(defconst tramp-hexdump-awk-encode + "{ { awk '{}' 75) { printf \"\\n\"; rc=0 } + obc=0; o=0 + } + } + } + } +} +END { + if (obc) { + tail=(obc==2) ? \"==\\n\" : \"=\\n\" + while (obc++<6) { o=o*2 } + printf \"%%c\", substr(b64,o+1,1) + } else { + tail=\"\\n\" + } + printf tail +}'" + "Awk/od program to use for encoding a file. This string is passed to `format', so percent characters need to be doubled.") (defconst tramp-awk-decode - "busybox awk '\\ + "{ { awk '{}'