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: Tue, 18 May 2021 10:50:25 -0700 Message-ID: References: <83mtsss1gn.fsf@gnu.org> 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="33771"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) Cc: 48494@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 18 19:51:12 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 1lj3s7-0008Y0-Ou for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 May 2021 19:51:11 +0200 Original-Received: from localhost ([::1]:40580 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lj3s6-0003c0-Qu for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 May 2021 13:51:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39722) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lj3ry-0003Yk-7B for bug-gnu-emacs@gnu.org; Tue, 18 May 2021 13:51:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45681) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lj3rx-0006QG-Vj for bug-gnu-emacs@gnu.org; Tue, 18 May 2021 13:51:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lj3rx-0000ZH-Uw for bug-gnu-emacs@gnu.org; Tue, 18 May 2021 13:51: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 17:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48494 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 48494-submit@debbugs.gnu.org id=B48494.16213602482143 (code B ref 48494); Tue, 18 May 2021 17:51:01 +0000 Original-Received: (at 48494) by debbugs.gnu.org; 18 May 2021 17:50:48 +0000 Original-Received: from localhost ([127.0.0.1]:57223 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lj3rk-0000YV-HR for submit@debbugs.gnu.org; Tue, 18 May 2021 13:50:48 -0400 Original-Received: from ns.lapseofthought.com ([50.0.39.240]:36544 helo=mail.lapseofthought.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lj3ri-0000YM-1s for 48494@debbugs.gnu.org; Tue, 18 May 2021 13:50:47 -0400 Original-Received: from awb-mbp.local (unknown [IPv6:2601:646:4200:b470:f08d:db80:a546:a67a]) (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 4Fl3Sg4qKvz3pdpJ; Tue, 18 May 2021 10:50:43 -0700 (PDT) In-Reply-To: <83mtsss1gn.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 18 May 2021 14:52:56 +0300") Authentication-Results: ORIGINATING; auth=pass smtp.auth=alex smtp.mailfrom=alex@bochannek.com 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:206822 Archived-At: --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> From: Alex Bochannek >> 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? --=-=-= Content-Type: text/x-patch Content-Disposition: inline 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)) --=-=-= Content-Type: text/plain 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. --=-=-=--