From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alex Bochannek Newsgroups: gmane.emacs.bugs Subject: bug#48494: 28.0.50; [PATCH] AngeFTP fails on macOS 10.14 with GNU inetutils FTP Date: Mon, 17 May 2021 20:53:41 -0700 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40089"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) To: 48494@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 18 05:55:26 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1liqpJ-000AEa-Kn for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 May 2021 05:55:25 +0200 Original-Received: from localhost ([::1]:50946 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liqpI-0004hr-DR for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 17 May 2021 23:55:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52502) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1liqov-0004g1-VZ for bug-gnu-emacs@gnu.org; Mon, 17 May 2021 23:55:01 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42685) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1liqov-0008Ef-NQ for bug-gnu-emacs@gnu.org; Mon, 17 May 2021 23:55:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1liqov-0005F6-Lx for bug-gnu-emacs@gnu.org; Mon, 17 May 2021 23:55:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alex Bochannek Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 May 2021 03:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48494 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.162131006720104 (code B ref -1); Tue, 18 May 2021 03:55:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 May 2021 03:54:27 +0000 Original-Received: from localhost ([127.0.0.1]:54231 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1liqoM-0005EC-Re for submit@debbugs.gnu.org; Mon, 17 May 2021 23:54:27 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:52528) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1liqoJ-0005E2-O4 for submit@debbugs.gnu.org; Mon, 17 May 2021 23:54:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52480) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1liqoJ-0004dZ-FT for bug-gnu-emacs@gnu.org; Mon, 17 May 2021 23:54:23 -0400 Original-Received: from ns.lapseofthought.com ([50.0.39.240]:64955 helo=mail.lapseofthought.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1liqoH-0007d7-7Q for bug-gnu-emacs@gnu.org; Mon, 17 May 2021 23:54:22 -0400 Original-Received: from awb-mbp.local (unknown [IPv6:2601:646:4200:b470:280f:7c8f:f685:2e44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.lapseofthought.com (Postfix) with ESMTPSA id 4Fkhtw2hBVz3pf7L for ; Mon, 17 May 2021 20:53:44 -0700 (PDT) Authentication-Results: ORIGINATING; auth=pass smtp.auth=alex smtp.mailfrom=alex@bochannek.com Received-SPF: pass client-ip=50.0.39.240; envelope-from=alex@bochannek.com; helo=mail.lapseofthought.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:206758 Archived-At: --=-=-= Content-Type: text/plain AngeFTP cannot parse the output of the GNU inetutils FTP client on macOS 10.14. It errors out with "FTP Error: OPEN request failed:" and the process buffer shows the following: ftp> open ftp.tcl.tk open ftp.tcl.tk cd / cd / cd / cd / cd / cd / cd / cd / cd / cd / cd / cd / Connected to ftp.tcl.tk. 421 Service not available, remote server has closed connection ftp> Not connected. ftp> Not connected. ftp> Not connected. ftp> Not connected. ftp> Not connected. ftp> Not connected. ftp> This appears to be caused by readline being enabled for ftp and is resolved when disabling it. NetBSD/FreeBSD specifically mentions this in its ftp(1) for tnftp: -e Disables command line editing. This is useful for Emacs ange-ftp mode. Netkit-ftp on Linux does not exhibit this problem even with readline enabled; I could not test GNU inetutils on Linux. I tested tnftp on macOS and it also did not exhibit this problem even with readline enabled. Tested versions: ftp (GNU inetutils) 2.0 macOS 10.14.6 tnftp-20200705 macOS 10.14.6 netkit-ftp 0.17-34.1 Ubuntu 20.04.2 LTS There is no -e option for Windows FTP and ftp will terminate when receiving an unknown option (tested version Windows 10.0.19042.928) There is no -e option in Solaris FTP and I cannot test how it responds to an unknown option. I am proposing the below patch which resolves the problem on macOS with GNU inetutils and does no harm for Netkit-ftp/lukemftp/tnftp. However, because of the way a Windows client would respond, I am open to different approaches including considering this an inetutils bug instead. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 04ea809127..1742c68c38 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -948,7 +948,7 @@ ange-ftp-gateway-ftp-program-name :group 'ange-ftp :type 'string) -(defcustom ange-ftp-ftp-program-args '("-i" "-n" "-g" "-v") +(defcustom ange-ftp-ftp-program-args '("-i" "-n" "-g" "-v" "-e") "A list of arguments passed to the FTP program when started." :group 'ange-ftp :type '(repeat string)) --=-=-= Content-Type: text/plain In GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G9028)) of 2021-05-17 built on awb-mbp.local Repository revision: d83db639d379df142482bf82d7eb020d2ec1ae73 Repository branch: master Windowing system distributor 'Apple', version 10.3.1671 System Description: Mac OS X 10.14.6 -- Alex. --=-=-=--