From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus 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 12:18:17 +0200 Message-ID: <87imui1ul2.fsf@gmx.de> References: <20190508230145.GA1697@socrates.lan> <87d0ksw05q.fsf@gmx.de> <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> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="17301"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 35639@debbugs.gnu.org To: Jeronimo Pellegrini Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 10 12:19:16 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 1hP2cU-0004Jx-5a for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 May 2019 12:19:14 +0200 Original-Received: from localhost ([127.0.0.1]:40628 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hP2cT-00058i-4Y for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 May 2019 06:19:13 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:55380) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hP2cK-00058H-8F for bug-gnu-emacs@gnu.org; Fri, 10 May 2019 06:19:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hP2cJ-0000rU-0f for bug-gnu-emacs@gnu.org; Fri, 10 May 2019 06:19:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51918) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hP2cI-0000rI-T0 for bug-gnu-emacs@gnu.org; Fri, 10 May 2019 06:19:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hP2cI-0005dP-JM for bug-gnu-emacs@gnu.org; Fri, 10 May 2019 06:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 May 2019 10:19: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.155748351721613 (code B ref 35639); Fri, 10 May 2019 10:19:02 +0000 Original-Received: (at 35639) by debbugs.gnu.org; 10 May 2019 10:18:37 +0000 Original-Received: from localhost ([127.0.0.1]:37225 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hP2bs-0005cW-0z for submit@debbugs.gnu.org; Fri, 10 May 2019 06:18:37 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:45145) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hP2bo-0005cH-Hq for 35639@debbugs.gnu.org; Fri, 10 May 2019 06:18:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1557483500; bh=j/ZKIaUFJK7v+5jUG5jmtqOenWNXcxL21qDCbS7RK18=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=gCiHJUfBDEOXO2nPk0S/9IoKrDGqZm5ieIK1fSpNSzzdTAVnUJtaiSbsyLDrVtyLz 2xNMrssX1kylliFPu9tHL9QbLnK1F/I1lw3sXLQeySSa9YWB8ghi4pnJItRnHZ/7N0 uPgqyIEn9YMCmy7WBVChfv4vyjelSyDVF/cLnxO8= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from detlef.gmx.de ([212.91.238.102]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MexaL-1h4uE11yxd-00OUr9; Fri, 10 May 2019 12:18:20 +0200 In-Reply-To: <20190510094930.GF1697@socrates.lan> (Jeronimo Pellegrini's message of "Fri, 10 May 2019 06:49:31 -0300") X-Provags-ID: V03:K1:gWGsoVgi5AIuiJF0MV2Zju4fhjE6ivqjz7mF4DFC+RTGqfiFtSz p8+EgxDjsWPKHryrhYU5rWgMk1D9tM5IGlk3ZceIUs5vn+EMBkVLeEhikspMFe3WGi9GCmp clv5FFg/JDsfREnolEUCAuoB2l2pXcYAwC7WYfnMeVEOrI4/frohJQAgTudnC+Dkv6f+NbC u7nI7N3WTfRIwFZn1dU9Q== X-UI-Out-Filterresults: notjunk:1;V03:K0:eL5+W+0ZQUQ=:fiSYJfIbnJMk8t/pM9C9rm kYHdY5g2a8uur+6xJCaVkuDKde7a6F6nj3Myzna/lEWIwP2c4wTtp6OKUoRWOLZpHMiCXAFts SeBxeXsCGM2r5XDbz0ThcSrT256jNhDbzXm6hKnXxKUL7DkMK+jE8R2lgggCtXGJizIDyRJvl dyZZ7DgKSpF2a2fj8OmSdw0Ajs52eANymJow7O+zO2h/EC1TsDgPoOXDLWpPRYlwK22LuOMDX 1uw4wljAR119FjlMzG4VkMQd7j1+X/9k1hz0xdhNdD2/h8f5MMUd4An6rs+Brb+S0KGRDYVkK zOeOavoIjyuMCEDZz6UpJhI+0CHBFpB2B3VY9zWTIsv7Poj63AY0pPydY176jhPAGbah1/Ci6 uynaSYv/IiQHXtFKJlc3e9uRHw/fYbONeA4d2GpNeCN6CHRXqgrtqqcMZ/Pxk1SIKr/hEj9fY +YF8LGCFe31qc5pgs757ry0b9S3bb4Q5gsgnC/bGHbErWWqKyDI0yAFvvD4k/C8FGNqwRnS0c tEU1rwh3fY813WAl1BwW+KDPA5JpXWxt3ln4mgkii0tSyHccrjHJ3MMgZbHaP3zykjqCu2VN/ HWH5UBETeTji2KkmA905hk8GJiUYtcB9n6P6RAX0KuNvgrY/wBlD0dNjoTbLZz4qWP4fyJ7GQ 9cQP/zt0WpGLyKLWKpD0oluedRRNhNxmpCbXkISrVqwG01it4qi8X97Wh1u9OfHvx9kq2EFSZ 5Rqv+VcpsXPS81P3Fg98OE+hkq7dODRC1KSrP9cAUQiFQ7075E66C7DVe2Ao7NfwBSiE8KHS 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:159031 Archived-At: Jeronimo Pellegrini writes: > Hello Michael, Hi Jeronimo, >> > +(defconst tramp-hexdump-awk-coding-test >> > + "test -c /dev/zero && \ >> > +busybox hexdump -v -e '16/1 \" %02x\" \"\\n\"' < /dev/null && \ >> >> This must be "hexdump", not "busybox hexdump". > > The original tramp-awk-encode uses "busybux awk". Is there a particular > reason for that, or could it also be changed to "awk"? I don't remember exactly, but I believe there was a reason. Likely, a simple "awk" didn't work, but "busybox awk" did. On whatever test machine. > and so on, so if busybox is called and argv[0] is "awk" it knows > the user's intention. So, using "busybox awk" and "busybox hexdump" > would guarantee that this encoding scheme works on devices where the > symlinks are not available (I've never seen one actually); on the other > hand, it would break the encoding method for computers which do have > awk and hexdump, but no busybox... What do we do? Duplicate the > functions again? The awk methods are intended for very leightweighted machines, like routers or NAS devices. It is expected that they have installed busybox. According to , "awk", "hexdump" and "od" are subcommands of busybox. Unfortunately, not all busybox installations have all subcommands compiled in. For example, on my NAS device "awk" and "hexdump" are part of busybox, "od" isn't. =2D-8<---------------cut here---------------start------------->8--- [~] # busybox --help BusyBox v1.01 (2019.03.22-03:18+0000) multi-call binary Usage: busybox [function] [arguments]... or: [function] [arguments]... BusyBox is a multi-call binary that combines many common Unix utilities into a single executable. Most people will create a link to busybox for each function they wish to use and BusyBox will act like whatever it was invoked as! Currently defined functions: [, addgroup, adduser, ash, awk, basename, bunzip2, busybox, bzcat, cat, chgrp, chmod, chown, chroot, chvt, clear, cmp, cp, crond, crontab, cut, date, dc, dd, deallocvt, delgroup, deluser, df, dirname, dmesg, dos2unix, du, echo, egrep, env, expr, false, fdisk, fgrep, find, free, getty, grep, gunzip, gzip, halt, head, hexdump, hostname, hwclock, id, ifconfig, init, insmod, install, ip, kill, killall, klogd, linuxrc, ln, logger, login, ls, lsmod, md5sum, mkdir, mknod, mktemp, modprobe, more, mount, mv, nameif, netstat, nslookup, openvt, passwd, pidof, ping, ping6, pivot_root, poweroff, ps, pwd, rdate, readlink, reboot, renice, reset, rm, rmdir, rmmod, route, sed, sh, sha1sum, sleep, sort, strings, swapoff, swapon, switch_root, sync, sysctl, syslogd, tail, tar, tee, telnet, test, tftp, time, top, touch, tr, traceroute, true, tty, umount, uname, uniq, unix2dos, unzip, uptime, usleep, vi, wc, wget, which, whoami, xargs, yes, zcat =2D-8<---------------cut here---------------end--------------->8--- 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. > tramp-busybox-od-awk-encode > tramp-busybox-hexdump-awk-encode > tramp-busybox-awk-decode > > tramp-od-awk-encode > tramp-hexdump-awk-encode > tramp-awk-decode > > I feel like that would be a too large amount of duplicated code... > Or is that ok? No, too much duplicated code. As said above, provide tramp-od-awk-encode, tramp-hexdump-awk-encode and tramp-awk-decode, and make intelleigent tests whether "awk", "hexdump" and "od" need to be prefixed by "busybox". > Thank you for your patience! > J. Best regards, Michael.