unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#48494: 28.0.50; [PATCH] AngeFTP fails on macOS 10.14 with GNU inetutils FTP
@ 2021-05-18  3:53 Alex Bochannek
  2021-05-18 11:52 ` Eli Zaretskii
  0 siblings, 1 reply; 19+ messages in thread
From: Alex Bochannek @ 2021-05-18  3:53 UTC (permalink / raw)
  To: 48494

[-- Attachment #1: Type: text/plain, Size: 1591 bytes --]

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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 480 bytes --]

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))

[-- Attachment #3: Type: text/plain, Size: 341 bytes --]


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.

^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2021-05-27 23:25 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-18  3:53 bug#48494: 28.0.50; [PATCH] AngeFTP fails on macOS 10.14 with GNU inetutils FTP Alex Bochannek
2021-05-18 11:52 ` Eli Zaretskii
2021-05-18 17:50   ` Alex Bochannek
2021-05-18 18:18     ` Eli Zaretskii
2021-05-19  1:34       ` Alex Bochannek
2021-05-20 13:02         ` Michael Albinus
2021-05-20 17:49           ` Alex Bochannek
2021-05-20 21:33           ` Lars Ingebrigtsen
2021-05-20 22:02             ` Alex Bochannek
2021-05-21  8:25               ` Michael Albinus
2021-05-21 17:06                 ` Alex Bochannek
2021-05-21 17:46                   ` Michael Albinus
2021-05-21 18:12                     ` Alex Bochannek
2021-05-27 21:27                     ` Alex Bochannek
2021-05-24 18:59                 ` Alex Bochannek
2021-05-25  7:34                   ` Michael Albinus
2021-05-25 19:33                     ` Alex Bochannek
2021-05-27  7:52                       ` Michael Albinus
2021-05-27 23:25                       ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).