From: Todd Zullinger <tmz@pobox.com>
To: Eric Wong <e@80x24.org>
Cc: Chris Mayo <aklhfex@gmail.com>,
Jonathan Nieder <jrnieder@gmail.com>,
Dennis Kaarsemaker <dennis@kaarsemaker.net>,
git@vger.kernel.org
Subject: Re: [PATCH] send-email: remove documented requirement for Net::SMTP::SSL
Date: Mon, 27 May 2019 20:05:44 -0400 [thread overview]
Message-ID: <20190528000544.GX3654@pobox.com> (raw)
In-Reply-To: <20190527193517.GA22013@dcvr>
Eric Wong wrote:
> Chris Mayo <aklhfex@gmail.com> wrote:
>> git-send-email uses the TLS support in the Net::SMTP core module from
>> recent versions of Perl. Documenting the minimum version is complex
>> because of separate numbering for Perl (5.21.5~169), Net:SMTP (2.34)
>> and libnet (3.01). Version numbers from commit:
>> bfbfc9a953 ("send-email: Net::SMTP::starttls was introduced in v2.34",
>> 2017-05-31)
>
> No disagreement for removing the doc requirement for Net::SMTP::SSL.
>
> But core modules can be split out by OS packagers. For
> Fedora/RH-based systems, the trend tends to be increasing
> granularity and having more optional packages.
>
> So I think documenting Net::SMTP (and Net::Domain) as
> requirements would still be good, perhaps with a note stating
> they're typically installed with Perl.
I didn't know that git-send-email.perl could take advantage
of Net::SMTP::starttls until I read this.
[Adding Dennis and Jonathan as the authors of 0ead000c3a
("send-email: Net::SMTP::SSL is obsolete, use only when
necessary", 2017-03-24) bfbfc9a953 ("send-email:
Net::SMTP::starttls was introduced in v2.34", 2017-05-31),
respectively.]
The current Fedora and Red Hat package have a requirement on
Net::SMTP::SSL from long, long ago¹. As I looked at whether
I could remove that (or more accurately, replace it with
IO::Socket::SSL which is needed for Net::SMTP to handle
starttls), I noticed that on RHEL7 the Net::SMTP version was
2.31, but starttls support has been backported².
I wonder if it's (separately from this change) worth
adjusting the conditional which sets $use_net_smtp_ssl to
use "Net::SMTP->can('starttls')" rather than a strict
version check? (It might not be if using 'can' is too
fragile or would only benefit the Red Hat 7 packages which
likely won't officially be updated to a newer git with such
a change.)
Something like:
diff --git i/git-send-email.perl w/git-send-email.perl
index 24859a7bc3..84ac03994d 100755
--- i/git-send-email.perl
+++ w/git-send-email.perl
@@ -1465,7 +1465,7 @@ sub send_message {
}
require Net::SMTP;
- my $use_net_smtp_ssl = version->parse($Net::SMTP::VERSION) < version->parse("2.34");
+ my $use_net_smtp_ssl = Net::SMTP->can('starttls') ? 0 : 1;
$smtp_domain ||= maildomain();
if ($smtp_encryption eq 'ssl') {
¹ https://bugzilla.redhat.com/443615
² https://bugzilla.redhat.com/1557574
https://git.centos.org/rpms/perl/c/13dfe3?branch=c7
--
Todd
next prev parent reply other threads:[~2019-05-28 0:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-26 17:22 [PATCH] send-email: remove documented requirement for Net::SMTP::SSL Chris Mayo
2019-05-27 19:35 ` Eric Wong
2019-05-27 20:36 ` Ævar Arnfjörð Bjarmason
2019-05-27 23:43 ` brian m. carlson
2019-05-28 2:17 ` Ævar Arnfjörð Bjarmason
2019-05-28 1:22 ` Eric Wong
2019-05-28 0:05 ` Todd Zullinger [this message]
2019-05-28 1:31 ` Eric Wong
2019-05-28 1:43 ` Ævar Arnfjörð Bjarmason
2019-05-28 1:56 ` Todd Zullinger
2019-05-28 1:57 ` Eric Wong
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190528000544.GX3654@pobox.com \
--to=tmz@pobox.com \
--cc=aklhfex@gmail.com \
--cc=dennis@kaarsemaker.net \
--cc=e@80x24.org \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
/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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.