GNU bug report logs - #35639
27.0.50; tramp fails to use ssh on LibreCMC (no base64 encoder available, and not mentioned in tramp manual)

Previous Next

Package: emacs;

Reported by: Jeronimo Pellegrini <j_p <at> aleph0.info>

Date: Wed, 8 May 2019 16:39:02 UTC

Severity: normal

Tags: patch

Merged with 35473

Found in version 27.0.50

Fixed in version 27.2

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jeronimo Pellegrini <j_p <at> aleph0.info>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 35639 <at> debbugs.gnu.org, Jeronimo Pellegrini <j_p <at> aleph0.info>
Subject: bug#35639: 27.0.50; tramp fails to use ssh on LibreCMC (no base64 encoder available, and not mentioned in tramp manual)
Date: Fri, 10 May 2019 11:45:46 -0300
Hi,

On Fri, May 10, 2019 at 12:18:17PM +0200, Michael Albinus wrote:
> Jeronimo Pellegrini <j_p <at> aleph0.info> writes:
> > What do we do? Duplicate the functions again?
> ( ... )
> 
> Maybe, we shall use just a template for the encoding/decoding functions,
> and for all busybox subcommands we need a test, whether they can be
> invoked via "busybox command" or "command". There will be sevaeral
> combinations to test.

If templating is the way to go, then tramp-od-awk-encode,
tramp-hexdump-awk-encode, tramp-awk-decode would not be constant
strings anymore; a string would need to be build every time tramp
started a connection. Tramp would apply tests, and depending on
what tests succeed, concatenate the proper strings. Is this good?

Or I can try to make the shell code that is sent to the remote
end do the verification itself (I'd test using dash, which I
hope will work on most systems of interest). Something like

{ hexdump < /dev/null && HD=hexdump; } || \
{ busybox hexdump < /dev/null && HD="busybox hexdump"; } &&  \
$HD ...

(but including the proper command line arguments)

This would work on dash, bash, zsh, ksh and hopefully on any shell
that claims to be POSIX-compliant. Won't work on fish and any
other fancy, modern, alternative shells, of course.

Which one is preferable? Templating in emacs-lisp, or creating smart
shell code?

J.





This bug report was last modified 5 years and 122 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.