unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alex Bochannek <alex@bochannek.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 48494@debbugs.gnu.org
Subject: bug#48494: 28.0.50; [PATCH] AngeFTP fails on macOS 10.14 with GNU inetutils FTP
Date: Tue, 18 May 2021 10:50:25 -0700	[thread overview]
Message-ID: <m2fsyklyn2.fsf@bochannek.com> (raw)
In-Reply-To: <83mtsss1gn.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 18 May 2021 14:52:56 +0300")

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

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Alex Bochannek <alex@bochannek.com>
>> Date: Mon, 17 May 2021 20:53:41 -0700
>> 
>> 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.
>
> How about making the default value depend on the value of system-type?

You mean something like this?


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

diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index 04ea809127..61a0f09f43 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -947,8 +947,13 @@ ange-ftp-gateway-ftp-program-name
 Some AT&T folks claim to use something called `pftp' here."
   :group 'ange-ftp
   :type 'string)
+(defcustom imap-read-timeout (if (memq system-type '(windows-nt cygwin))
+				 1.0
+			       0.1)
 
-(defcustom ange-ftp-ftp-program-args '("-i" "-n" "-g" "-v")
+(defcustom ange-ftp-ftp-program-args (if (eq system-type 'darwin)
+  '("-i" "-n" "-g" "-v" "-e") ; for GNU inetutils
+  '("-i" "-n" "-g" "-v"))
   "A list of arguments passed to the FTP program when started."
   :group 'ange-ftp
   :type '(repeat string))

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


The more I think about it, the more I am leaning against changing the
default. I don't fully understand what inetutils ftp is doing and why -e
is needed. Maybe submitting a bug against inetutils is the right
approach here?


As an aside (and why a system-type switch may be needed anyway), it
looks to me that -v means the exact opposite thing on Windows than what
is expected:

BSD/Netkit/Inetutils/Solaris/HP-UX/AIX all specify that -v is verbose
and that it's the default for interactive sessions.

tnftp has a -V option that turns off verbose mode. Inetutils has a -V
for --version.

Windows however does this:

-v 	Suppresses display of remote server responses.

(Verified on Windows 10.0.19042.928)

It seems to me that -v should be removed for Windows and likely can be
removed for all systems. I haven't used Cygwin in a while, but I suspect
AngeFTP can use either the Windows or the Inetutils FTP.

Are there any automated cross-platform tests to see on which platform
removing -v might break AngeFTP?

-- 
Alex.

  reply	other threads:[~2021-05-18 17:50 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2fsyklyn2.fsf@bochannek.com \
    --to=alex@bochannek.com \
    --cc=48494@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).