GNU bug report logs - #67865
[PATCH] ange-ftp fails with tnftp client

Previous Next

Package: emacs;

Reported by: Christophe Deleuze <christophe.deleuze <at> free.fr>

Date: Sun, 17 Dec 2023 14:06:01 UTC

Severity: normal

Tags: patch

Fixed in version 29.2

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 67865 in the body.
You can then email your comments to 67865 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#67865; Package emacs. (Sun, 17 Dec 2023 14:06:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christophe Deleuze <christophe.deleuze <at> free.fr>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 17 Dec 2023 14:06:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Christophe Deleuze <christophe.deleuze <at> free.fr>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] ange-ftp fails with tnftp client
Date: Sun, 17 Dec 2023 14:56:57 +0100
[Message part 1 (text/plain, inline)]
* bug description

When used with the tnftp client (https://en.wikipedia.org/wiki/Tnftp),
ange-ftp fails when trying to enable passive mode.

* fix description

Passive mode is enabled by function ange-ftp-passive-mode:

(defun ange-ftp-passive-mode (proc on-or-off)
  (if (string-match (concat "Passive mode " on-or-off)
                    (cdr (ange-ftp-raw-send-cmd
                          proc (concat "passive " on-or-off)
                          "Trying passive mode..." nil)))
      (ange-ftp-message (concat "Trying passive mode..." on-or-off))
    (error "Trying passive mode...failed")))

that expects to get a result string containing the string "Passive
mode on" (when on-or-off is "on"), however tnftp includes a colon in
its answer (extract from the buffer the ftp process is run in):

ftp> passive on
Passive mode: on; fallback to active mode: off.

I suggest slightly changing the regexp used in string-match to allow
for this colon, as shown below:

(defun ange-ftp-passive-mode (proc on-or-off)
  (if (string-match (concat "Passive mode:? " on-or-off)
  [...]
  
The attached patch does just that.

For information, in debian bookworm the ftp package has changed from
netkit-ftp to being a dummy transitional package for tnftp.

regards,

[0001-ange-ftp-fix-passive-mode-result-string-for-tntfp-cl.patch (text/x-diff, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67865; Package emacs. (Sun, 17 Dec 2023 18:46:01 GMT) Full text and rfc822 format available.

Message #8 received at 67865 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Christophe Deleuze <christophe.deleuze <at> free.fr>
Cc: 67865 <at> debbugs.gnu.org
Subject: Re: bug#67865: [PATCH] ange-ftp fails with tnftp client
Date: Sun, 17 Dec 2023 19:45:18 +0100
Christophe Deleuze <christophe.deleuze <at> free.fr> writes:

Hi Cristophe,

> I suggest slightly changing the regexp used in string-match to allow
> for this colon, as shown below:
>
> (defun ange-ftp-passive-mode (proc on-or-off)
>   (if (string-match (concat "Passive mode:? " on-or-off)
>   [...]
>
> The attached patch does just that.

Looks OK to me.

Eli, do we want this in emacs-29 or master?

> regards,

Best rergards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67865; Package emacs. (Sun, 17 Dec 2023 19:25:02 GMT) Full text and rfc822 format available.

Message #11 received at 67865 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 67865 <at> debbugs.gnu.org, christophe.deleuze <at> free.fr
Subject: Re: bug#67865: [PATCH] ange-ftp fails with tnftp client
Date: Sun, 17 Dec 2023 21:23:55 +0200
> Cc: 67865 <at> debbugs.gnu.org
> Date: Sun, 17 Dec 2023 19:45:18 +0100
> From:  Michael Albinus via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> Christophe Deleuze <christophe.deleuze <at> free.fr> writes:
> 
> Hi Cristophe,
> 
> > I suggest slightly changing the regexp used in string-match to allow
> > for this colon, as shown below:
> >
> > (defun ange-ftp-passive-mode (proc on-or-off)
> >   (if (string-match (concat "Passive mode:? " on-or-off)
> >   [...]
> >
> > The attached patch does just that.
> 
> Looks OK to me.
> 
> Eli, do we want this in emacs-29 or master?

It's okay to install this on emacs-29, thanks.




Reply sent to Michael Albinus <michael.albinus <at> gmx.de>:
You have taken responsibility. (Mon, 18 Dec 2023 10:17:01 GMT) Full text and rfc822 format available.

Notification sent to Christophe Deleuze <christophe.deleuze <at> free.fr>:
bug acknowledged by developer. (Mon, 18 Dec 2023 10:17:01 GMT) Full text and rfc822 format available.

Message #16 received at 67865-done <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: christophe.deleuze <at> free.fr, 67865-done <at> debbugs.gnu.org
Subject: Re: bug#67865: [PATCH] ange-ftp fails with tnftp client
Date: Mon, 18 Dec 2023 11:16:10 +0100
Version: 29.2

Eli Zaretskii <eliz <at> gnu.org> writes:

Hi,

>> > I suggest slightly changing the regexp used in string-match to allow
>> > for this colon, as shown below:
>> >
>> > (defun ange-ftp-passive-mode (proc on-or-off)
>> >   (if (string-match (concat "Passive mode:? " on-or-off)
>> >   [...]
>> >
>> > The attached patch does just that.
>>
>> Looks OK to me.
>>
>> Eli, do we want this in emacs-29 or master?
>
> It's okay to install this on emacs-29, thanks.

Done, closing the bug.

Best regards, Michael.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 15 Jan 2024 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 155 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.