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: Thu, 9 May 2019 07:19:39 -0300 Message-ID: <20190509101938.GB1697@socrates.lan> References: <87d0ksrk0g.fsf@mitra.i-did-not-set--mail-host-address--so-tickle-me> <87k1f03im0.fsf@gmx.de> <20190508230145.GA1697@socrates.lan> <87d0ksw05q.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="189413"; 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 Thu May 09 12:20:19 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 1hOg9x-000n8E-Le for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 May 2019 12:20:17 +0200 Original-Received: from localhost ([127.0.0.1]:51923 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOg9w-0007He-JE for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 May 2019 06:20:16 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:42150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOg9j-0007HH-77 for bug-gnu-emacs@gnu.org; Thu, 09 May 2019 06:20:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOg9i-0007fB-6Y for bug-gnu-emacs@gnu.org; Thu, 09 May 2019 06:20:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49394) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOg9i-0007f5-2Z for bug-gnu-emacs@gnu.org; Thu, 09 May 2019 06:20:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hOg9h-0004Ca-TC for bug-gnu-emacs@gnu.org; Thu, 09 May 2019 06:20:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jeronimo Pellegrini Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 May 2019 10:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35639 X-GNU-PR-Package: emacs Original-Received: via spool by 35639-submit@debbugs.gnu.org id=B35639.155739719416129 (code B ref 35639); Thu, 09 May 2019 10:20:01 +0000 Original-Received: (at 35639) by debbugs.gnu.org; 9 May 2019 10:19:54 +0000 Original-Received: from localhost ([127.0.0.1]:34705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOg9a-0004C3-1s for submit@debbugs.gnu.org; Thu, 09 May 2019 06:19:54 -0400 Original-Received: from mail.aleph0.info ([66.228.54.186]:36196 helo=aleph0.info) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOg9U-0004Bg-Pn for 35639@debbugs.gnu.org; Thu, 09 May 2019 06:19:50 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by aleph0.info (Postfix) with ESMTP id 1AF2B4238D; Thu, 9 May 2019 07:19:42 -0300 (-03) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=aleph0.info; s=mail; t=1557397182; bh=nJ2pWQ2waT0o+JkcvcOR3FeYKz61pukxzfChL5h22f4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kLCmbYHlmXXvDimsr7sJVuYe6szzCpZQe8DaApPZRX1tF3MSKCZIMuoF7U/Tx+kkx t1pzvOqS8XlIS5UyNZhm7fRu+H9b9iE/1suLpUxN2iezTmZxy1VRVTZRkStoXaJBc6 0jMkD/edM7FXDaHIMkqfyNIM+UAt5pR6cjHNxYKMN5aAUOCyQv9SmoC29pbjVqFaQW hfKhk2UYYne8Us/6zA3pFbHlG/dVbh7j25N71Ejs1aeqtomLz+wzX6AtJT8FdqrVXp 1kRR+7muwr5oK1vmK7U15hWJXuw4hkZ8snIBOc9dl/Q8Pry7ElQkEH1vOohHR5OSOp gf9/FxzoMd32Q== Original-Received: from aleph0.info ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id oOw3IslWLwYL; Thu, 9 May 2019 07:19:42 -0300 (-03) Original-Received: from socrates.aleph0.info (unknown [191.181.133.68]) (Authenticated sender: je) by aleph0.info (Postfix) with ESMTPSA id BE7F042373; Thu, 9 May 2019 07:19:41 -0300 (-03) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=aleph0.info; s=mail; t=1557397181; bh=nJ2pWQ2waT0o+JkcvcOR3FeYKz61pukxzfChL5h22f4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QqRQ46EG4TBhDOMoPvLUc0AGf7bA/NZvLKeLdwQcAGBPind17KhOhhGbYuusXAuq6 BortM/KjlpwBHX81cUltraASFBVetObCiohqDz222ljplUlWuErA5QGdqdynR4dtzV G97zOYeRk7imYnEwVNNfFZ7RKJU7QxOjlSPkOzNuQ1fLxTo5ovxlwvygTwlDvNBNXb /YRlaiiwkyDAo3mw9kMH5HhdsSKT0kkpW00a6x2OlyY7XArnu9yUEkcvT2xw+Y2Odd hLHzlpZGK4z5Z/WGIBOxo4RhlG3pTbyU/gPLrWOvVN1RBmoGzyEecGIg8JOXnbS2NQ ROUdoTFDCEs8g== Original-Received: by socrates.aleph0.info (Postfix, from userid 1000) id 5C07296407; Thu, 9 May 2019 07:19:39 -0300 (-03) Content-Disposition: inline In-Reply-To: <87d0ksw05q.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:158973 Archived-At: Hi Michael, On Thu, May 09, 2019 at 09:35:13AM +0200, Michael Albinus wrote: > Jeronimo Pellegrini writes: > > (b64 tramp-awk-encode tramp-awk-decode "test -c /dev/zero && od -v -t > > x1 -A n > > > But awk was not used, because 'od' is also not available. > > I'm not a heavy awk user. The current awk based implementation has been > contributed by somebody else, IIRC. Do you know another way to use awk > for encoding/decoing base64, without "od"? Yes. Instead of od: od -v -t x1 -A n it would be possible to use hexdump: hexdump -v -e '16/1 " %02x" "\n"' hexdump is included in busybox, and seems to be at least as fast as od. However... hexdump may not be present in all Linux/*BSD/*ix systems. At least in Debian, it is in package bsdmainutils, which is not required. (od, on the other hand, is in package coreutils, which is required) > The current Tramp implementation is in the two variables > `tramp-awk-encode' and `tramp-awk-decode'. If we could find another > implementation, which runs also on your LibreCMC or OpenWRT machine, we > could add it to Tramp. Would it be OK to have two different variables, and two tests for od+awk and hexdump+awk? tramp-od-awk-coding-test tramp-od-awk-{encode,decode} tramp-hexdump-awk-coding-test tramp-hexdump-awk-{encode-decode} Or would it be better if the string in tramp-awk-encode was built from two others, (1) the hex dumper and (2) the awk code? - define a constant tramp-awk-from-hex-to-base64, which does only the hex into base64 part of the job - when connecting, tramp would check for some hex dumper (od or hexdump) this would split tramp-awk-coding-test in two others - tramp-awk-encode would be obtained by concatenating the hex-dumping string (either od or hexdump) with " | " and tramp-awk-from-hex-to-base64. But then tramp-awk-encode would not be a constant anymore. > > 19:41:26.088945 tramp-sh-handle-file-local-copy (1) # File error: > > Wrong method specification for ‘ssh’ > > > > (this is the only occurrence of the string "error"). > > > > As I had mentioned in the first message, this is because line 3174 of > > tramp.el was reached. It is the default case of a COND expression that > > has other two cases: > > - (or (tramp-local-host-p v) > > (tramp-method-out-of-band-p v size)) > > - (rem-enc ...) > > > > What happened is that (rem-enc ...) failed (because tramp could not use > > any encoding command), and fell through into the default action, which > > is this error. > > Maybe we should enhance the error message. Perhaps (tramp-error v 'file-error "Cannot find any way to encode data using `%s'" method) would be more precise? Or, if (tramp-local-host-p v) (tramp-method-out-of-band-p v size) are false, explicitly write that "encoding binaries were not found on the remote end"? J.