From: Eric Biggers <hidden> Date: 2017-05-31 22:25:15
Hi,
There seems to be a bug in 'git send-email' caused by this commit:
commit 0ead000c3aca13a10ae51a3c74c866981e0d33b8
Author: Dennis Kaarsemaker [off-list ref]
Date: Fri Mar 24 22:37:32 2017 +0100
send-email: Net::SMTP::SSL is obsolete, use only when necessary
When running git send-email I get the following error:
Can't locate object method "starttls" via package "Net::SMTP" at /usr/lib/git-core/git-send-email line 1410.
The perl version is 5.18.2, and the Net::SMTP version is 2.31.
I suspect the following line of code which appears to assume that starttls() is
present in Net::SMTP >= 1.28:
my $use_net_smtp_ssl = version->parse($Net::SMTP::VERSION) < version->parse("1.28");
... but in fact it appears to have been added by the following commit to perl,
which bumped the Net::SMTP version from 2.34 up to 3.01:
https://perl5.git.perl.org/perl.git/commit/2e1731446cd265cddae2ea6c43a375168fdb6f56
Eric
From: Jonathan Nieder <hidden> Date: 2017-05-31 22:44:31
Subject: send-email: Net::SMTP::starttls was introduced in v3.01
We cannot rely on the starttls method being present in the copy
of Net::SMTP shipped with perl until v5.21.5~169 (Update libnet to
CPAN version 3.01, 2014-10-10).
Reported-by: Brandon Williams <redacted>
Reported-by: Eric Biggers <redacted>
Signed-off-by: Jonathan Nieder <redacted>
---
Hi Eric,
Eric Biggers wrote:
There seems to be a bug in 'git send-email' caused by this commit:
commit 0ead000c3aca13a10ae51a3c74c866981e0d33b8
Author: Dennis Kaarsemaker [off-list ref]
Date: Fri Mar 24 22:37:32 2017 +0100
send-email: Net::SMTP::SSL is obsolete, use only when necessary
When running git send-email I get the following error:
Can't locate object method "starttls" via package "Net::SMTP" at /usr/lib/git-core/git-send-email line 1410.
The perl version is 5.18.2, and the Net::SMTP version is 2.31.
Thanks for reporting. Does this patch help?
Regards,
Jonathan
git-send-email.perl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Eric Biggers <hidden> Date: 2017-05-31 22:57:15
On Wed, May 31, 2017 at 03:44:15PM -0700, Jonathan Nieder wrote:
quoted hunk
Subject: send-email: Net::SMTP::starttls was introduced in v3.01
We cannot rely on the starttls method being present in the copy
of Net::SMTP shipped with perl until v5.21.5~169 (Update libnet to
CPAN version 3.01, 2014-10-10).
Reported-by: Brandon Williams <redacted>
Reported-by: Eric Biggers <redacted>
Signed-off-by: Jonathan Nieder <redacted>
---
Hi Eric,
Eric Biggers wrote:
quoted
There seems to be a bug in 'git send-email' caused by this commit:
commit 0ead000c3aca13a10ae51a3c74c866981e0d33b8
Author: Dennis Kaarsemaker [off-list ref]
Date: Fri Mar 24 22:37:32 2017 +0100
send-email: Net::SMTP::SSL is obsolete, use only when necessary
When running git send-email I get the following error:
Can't locate object method "starttls" via package "Net::SMTP" at /usr/lib/git-core/git-send-email line 1410.
The perl version is 5.18.2, and the Net::SMTP version is 2.31.
Thanks for reporting. Does this patch help?
Regards,
Jonathan
git-send-email.perl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Jonathan Nieder <hidden> Date: 2017-05-31 23:02:08
Eric Biggers wrote:
On Wed, May 31, 2017 at 03:44:15PM -0700, Jonathan Nieder wrote:
quoted
Subject: send-email: Net::SMTP::starttls was introduced in v3.01
We cannot rely on the starttls method being present in the copy
of Net::SMTP shipped with perl until v5.21.5~169 (Update libnet to
CPAN version 3.01, 2014-10-10).
Reported-by: Brandon Williams <redacted>
Reported-by: Eric Biggers <redacted>
Signed-off-by: Jonathan Nieder <redacted>
---
Thanks. Mining through https://github.com/gbarr/perl-libnet, I find
$ git log -Sstarttls
[...]
commit b4a7a274a7fe5344c154abc4b3fdd7c446d36370
Author: Steffen Ullrich [off-list ref]
Date: Fri May 9 23:15:48 2014 +0200
SSL and IPv6 support for Net::SMTP
$ git show b4a7a274a7fe5344c154abc4b3fdd7c446d36370
[...]
diff --git a/Net/SMTP.pm b/Net/SMTP.pm
index 705b5c5..fcc124f 100644
--- a/Net/SMTP.pm
+++ b/Net/SMTP.pm
@@ -18,7 +18,31 @@ use Net::Config;
$VERSION = "2.33";
[...]
$ git log -p --ancestry-path b4a7a274a7fe5344c154abc4b3fdd7c446d36370..HEAD -- Net/SMTP.pm
[...]
commit 67b37d5c7118f9af50e5a5a00c242992caba3b8d
Author: Steve Hay [off-list ref]
Date: Mon Jun 2 14:13:55 2014 +0100
Bump $VERSION in changed modules
diff --git a/Net/SMTP.pm b/Net/SMTP.pm
index 4496f6f..9dfaadf 100644
--- a/Net/SMTP.pm
+++ b/Net/SMTP.pm
@@ -16,7 +16,7 @@ use IO::Socket;
use Net::Cmd;
use Net::Config;
-$VERSION = "2.34";
+$VERSION = "2.35";
# Code for detecting if we can use SSL
my $ssl_class = eval {
I think 2.35 is the correct minimum version.
Jonathan
From: Jonathan Nieder <hidden> Date: 2017-06-01 00:17:52
Subject: send-email: Net::SMTP::starttls was introduced in v2.34
We cannot rely on the starttls method being present in Net::SMTP until
c274b798e6881a941d941808c6d89966975cb8c8 (Merge branch 'ipv6_ssl' of
https://github.com/noxxi/perl-libnet into noxxi-ipv6_ssl, 2014-06-02),
which set the module version to 2.34.
This version was first shipped as part of perl in v5.21.5~169 (Update
libnet to CPAN version 3.01, 2014-10-10).
Noticed on an Ubuntu system with perl 5.18.2-2ubuntu1.1, which
provides Net::SMTP version 2.31. The error message is
Can't locate object method "starttls" via package "Net::SMTP" at /usr/lib/git-core/git-send-email line 1410.
Reported-by: Brandon Williams <redacted>
Reported-and-tested-by: Eric Biggers <redacted>
Signed-off-by: Jonathan Nieder <redacted>
---
Jonathan Nieder wrote:
Nah, I'm reading wrong. The relevant commit is c274b798 (Merge branch
'ipv6_ssl' of https://github.com/noxxi/perl-libnet into
noxxi-ipv6_ssl, 2014-06-02), which bumped VERSION to 2.34.
Here's an updated patch.
Thanks,
Jonathan
git-send-email.perl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)