From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Jeronimo Pellegrini Newsgroups: gmane.emacs.bugs 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 Message-ID: <20190510144546.GA8269@aleph0.info> References: <20190509101938.GB1697@socrates.lan> <8736lnx27g.fsf@gmx.de> <1A3C3BED-4CEF-41AC-B82F-EBA7AC614E18@aleph0.info> <87pnoru77n.fsf@gmx.de> <20190509195218.GD1697@socrates.lan> <87bm0b2y6t.fsf@gmx.de> <20190509201129.GE1697@socrates.lan> <8736lm3dpb.fsf@gmx.de> <20190510094930.GF1697@socrates.lan> <87imui1ul2.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="236762"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) Cc: 35639@debbugs.gnu.org, Jeronimo Pellegrini To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 10 16:46:20 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hP6mw-000zQx-1N for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 May 2019 16:46:18 +0200 Original-Received: from localhost ([127.0.0.1]:44563 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hP6mu-00079i-Om for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 May 2019 10:46:16 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:49228) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hP6mh-00077U-NO for bug-gnu-emacs@gnu.org; Fri, 10 May 2019 10:46:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hP6mg-0005cT-Lr for bug-gnu-emacs@gnu.org; Fri, 10 May 2019 10:46:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53420) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hP6mg-0005bi-Hh for bug-gnu-emacs@gnu.org; Fri, 10 May 2019 10:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hP6mg-00022l-F6 for bug-gnu-emacs@gnu.org; Fri, 10 May 2019 10:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jeronimo Pellegrini Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 May 2019 14:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35639 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 35639-submit@debbugs.gnu.org id=B35639.15574995597844 (code B ref 35639); Fri, 10 May 2019 14:46:02 +0000 Original-Received: (at 35639) by debbugs.gnu.org; 10 May 2019 14:45:59 +0000 Original-Received: from localhost ([127.0.0.1]:38731 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hP6mc-00022S-PG for submit@debbugs.gnu.org; Fri, 10 May 2019 10:45:59 -0400 Original-Received: from mail.aleph0.info ([66.228.54.186]:38136 helo=aleph0.info) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hP6mZ-00022D-H9 for 35639@debbugs.gnu.org; Fri, 10 May 2019 10:45:57 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by aleph0.info (Postfix) with ESMTP id 44ED24237A; Fri, 10 May 2019 11:45:49 -0300 (-03) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=aleph0.info; s=mail; t=1557499549; bh=NKr21XIxMjipEatX8FUQH+ndaT7lsMqF7UwhGBecPVA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=H/O7RWeGdRmwEPdRDWwijypTmN5PvpdjF+Mn8Bil6NdpCpuvVOMrRaZfUqZHGnbMB ZrLlh7qk9dHdzrc/Iwfy8/bl7hWQvqDBf0Xcneg7cPQlHmYE1F9aw+56yK9V2uxJub igetWmtzSPoqto6MHyNpDVh1oTEt4EZEKsUOldZNGkGOtMkHYgA2LRdOP2vM2w+UVs MHo9TmwGo1/sIJF1Ka/NNnjH0Fqay0XB9lCKZn3gdofWPVtVV+JNC4gWgcFG8V13ER nmLLwZZdeh9d/1qvwnMNDgGm4oo+bEWxOK+tp52QuJFBcnMjQgkhAF2BZBzgCU8+1h 863sbt0I4dchA== Original-Received: from aleph0.info ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id haTToe1Lkwvy; Fri, 10 May 2019 11:45:49 -0300 (-03) Original-Received: from mitra.ufabc.edu.br (unknown [177.104.48.1]) (Authenticated sender: je) by aleph0.info (Postfix) with ESMTPSA id EF52442374; Fri, 10 May 2019 11:45:48 -0300 (-03) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=aleph0.info; s=mail; t=1557499549; bh=NKr21XIxMjipEatX8FUQH+ndaT7lsMqF7UwhGBecPVA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=H/O7RWeGdRmwEPdRDWwijypTmN5PvpdjF+Mn8Bil6NdpCpuvVOMrRaZfUqZHGnbMB ZrLlh7qk9dHdzrc/Iwfy8/bl7hWQvqDBf0Xcneg7cPQlHmYE1F9aw+56yK9V2uxJub igetWmtzSPoqto6MHyNpDVh1oTEt4EZEKsUOldZNGkGOtMkHYgA2LRdOP2vM2w+UVs MHo9TmwGo1/sIJF1Ka/NNnjH0Fqay0XB9lCKZn3gdofWPVtVV+JNC4gWgcFG8V13ER nmLLwZZdeh9d/1qvwnMNDgGm4oo+bEWxOK+tp52QuJFBcnMjQgkhAF2BZBzgCU8+1h 863sbt0I4dchA== Original-Received: by mitra.ufabc.edu.br (Postfix, from userid 1000) id 44F491AD; Fri, 10 May 2019 11:45:46 -0300 (-03) Content-Disposition: inline In-Reply-To: <87imui1ul2.fsf@gmx.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:159048 Archived-At: Hi, On Fri, May 10, 2019 at 12:18:17PM +0200, Michael Albinus wrote: > Jeronimo Pellegrini 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.