Summary: | devel/git depends on deprecated mail/p5-Net-SMTP-SSL | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Zilon <freebsd> | ||||||
Component: | Individual Port(s) | Assignee: | Renato Botelho <garga> | ||||||
Status: | Closed FIXED | ||||||||
Severity: | Affects Some People | CC: | adamw, cris, everytrash, garga, gert, mandree, olivierw1+bugzilla-freebsd, stenn, sunpoet | ||||||
Priority: | --- | Flags: | garga:
merge-quarterly?
|
||||||
Version: | Latest | ||||||||
Hardware: | Any | ||||||||
OS: | Any | ||||||||
Attachments: |
|
Description
Zilon
2016-11-08 20:24:14 UTC
Sunpoet, I'm going to assign this PR to you. git (with the SEND_EMAIL option enabled) still depends on Net::SMTP::SSL. What about keeping the DEPRECATED notice but removing the EXPIRATION_DATE? (In reply to Adam Weinberger from comment #1) I think it's only needed security/p5-IO-Socket-SSL to remove p5-Net-SMTP-SSL and using Net::SMTP (with ssl/tls support). (In reply to cris from comment #2) git-send-email.pl still uses Net::SMTP::SSL a number of times starting here: https://github.com/git/git/blob/master/git-send-email.perl#L1340 I agree that git should switch to Net::SMTP but it should be done upstream. Please let me know if I'm missing something here, cris. I was told by antoine@ to set an EXPIRATION_DATE when I deprecate a port. I set a longer period (about 5 months) for upstream or someone else to fix the script. We could extend EXPIRATION_DATE if necessary. FYI, Mike Fisher <mfisher@csh.rit.edu> provides a patch [1] for git-send-email.perl. [1] https://public-inbox.org/git/451E4A46-BA43-41A5-9E68-DE0D89BE676A@csh.rit.edu/ Created attachment 178490 [details]
Patch
Please try attached patch and let me know the results
I've got this patch from comment #5 and adjusted it to apply on current git from ports. Since I don't use git-send-mail myself it's hard to be sure it's fully working, so I would like to give a chance to users to try it out before go ahead and commit. FYI it passed on all tests (make test) A commit references this bug: Author: garga Date: Wed Jan 18 12:40:54 UTC 2017 New revision: 431794 URL: https://svnweb.freebsd.org/changeset/ports/431794 Log: Remove dependency of DEPRECATED mail/p5-Net-SMTP-SSL from devel/git PR: 214335 Obtained from: git development mailing list Sponsored by: Rubicon Communications (Netgate) Changes: head/devel/git/Makefile head/devel/git/files/patch-git-send-email.perl Please merge it to branch 2017Q1 too. Thanks! Hello, The patch for TLS seems wrong: "git-send-email" through a GMail's SMTP server doesn't work. My .gitconfig is setup like in the documentation: https://git-scm.com/docs/git-send-email#_example and using: "git send-email --to=address@domain.tld HEAD~1 --smtp-debug=1", I'm getting: "Net::SMTP>>> Net::SMTP(3.08_01) Net::SMTP>>> Net::Cmd(3.08_01) Net::SMTP>>> Exporter(5.72) Net::SMTP>>> IO::Socket::IP(0.38) Net::SMTP>>> IO::Socket(1.38) Net::SMTP>>> IO::Handle(1.36) Net::SMTP=GLOB(0x80351ae70)<<< 220 smtp.gmail.com ESMTP 198sm2123211wmn.11 - gsmtp Net::SMTP=GLOB(0x80351ae70)>>> EHLO serveur.localnet Net::SMTP=GLOB(0x80351ae70)<<< 250-smtp.gmail.com at your service, [2001:470::...] Net::SMTP=GLOB(0x80351ae70)<<< 250-SIZE 35882577 Net::SMTP=GLOB(0x80351ae70)<<< 250-8BITMIME Net::SMTP=GLOB(0x80351ae70)<<< 250-STARTTLS Net::SMTP=GLOB(0x80351ae70)<<< 250-ENHANCEDSTATUSCODES Net::SMTP=GLOB(0x80351ae70)<<< 250-PIPELINING Net::SMTP=GLOB(0x80351ae70)<<< 250-CHUNKING Net::SMTP=GLOB(0x80351ae70)<<< 250 SMTPUTF8 Net::SMTP=GLOB(0x80351ae70)>>> STARTTLS Net::SMTP=GLOB(0x80351ae70)<<< 220 2.0.0 Ready to start TLS Net::SMTP=GLOB(0x80351ae70)>>> STARTTLS Net::SMTP: Net::Cmd::getline(): unexpected EOF on command channel: Connection reset by peer at /usr/local/libexec/git-core/git-send-email line 1371. STARTTLS failed! at /usr/local/libexec/git-core/git-send-email line 1371." If I'm using ssl/465 instead of tls/587, the mail is sent, so only the part of the patch about TLS has a problem. I've found this pull request with a different patch here: https://github.com/git/git/pull/251/commits/7a555963d0f6384cbf59f5f0cfffe6052c6ce136 I haven't fully tested yet, but it I got the TLS part working by commenting line 1368 to 1377 then adding this two lines: "$smtp->starttls(ssl_verify_params()); if ($smtp->code != 250) {" I'll properly try the patch for both SSL and TLS and will report back. Best Regards. I couldn't apply the patch mentionned in comment #10 to git 2.11.1, so I've made a new patch which is a combination of this two commits: https://github.com/pprindeville/git/commit/7a555963d0f6384cbf59f5f0cfffe6052c6ce136 https://github.com/pprindeville/git/commit/2ff14bd5d96af4df96caca19dec017549c5208e2 And now I've been able to successfully send mails with ssl/465 and tls/587 :-) Created attachment 179994 [details]
New patch to use instead of the current "patch-git-send-email.perl"
(In reply to Renato Botelho from comment #7) For your information, you can manually test "git-send-email" with: "git send-email --to=your-email-address@gmail.com HEAD~1 --smtp-debug=1 --smtp-server=smtp.gmail.com --smtp-user=your-email-address@gmail.com --smtp-encryption=tls --smtp-server-port=587" and "git send-email --to=your-email-address@gmail.com HEAD~1 --smtp-debug=1 --smtp-server=smtp.gmail.com --smtp-user=your-email-address@gmail.com --smtp-encryption=ssl --smtp-server-port=465" in a Git repository. With the patched script, you'll get a prompt like: "Password for 'smtp://your-email-address@gmail.com@smtp.gmail.com:465':" With the previous patch, the script would stop before asking for your password. A commit references this bug: Author: garga Date: Tue Mar 21 12:28:14 UTC 2017 New revision: 436592 URL: https://svnweb.freebsd.org/changeset/ports/436592 Log: - Update devel/git to 2.12.1 - Replace git-send-email patch by a version that works [1] PR: 214335 [1] Submitted by: OlivierW <olivierw1+bugzilla-freebsd@hotmail.com> [1] MFH: 2017Q1 Sponsored by: Rubicon Communications (Netgate) Changes: head/devel/git/Makefile head/devel/git/distinfo head/devel/git/files/patch-git-send-email.perl head/devel/git/pkg-plist (In reply to OlivierW from comment #12) Can you please check if 2.12.1 is OK? (In reply to Renato Botelho from comment #15) I've just tested git 2.12.1 and I can confirm "git send-email" does work. Thanks! A commit references this bug: Author: garga Date: Wed Mar 22 11:12:46 UTC 2017 New revision: 436687 URL: https://svnweb.freebsd.org/changeset/ports/436687 Log: MFH: r431794 r433740 r433768 r436592 Remove dependency of DEPRECATED mail/p5-Net-SMTP-SSL from devel/git PR: 214335 Obtained from: git development mailing list Sponsored by: Rubicon Communications (Netgate) Update devel/git to 2.11.1 Sponsored by: Rubicon Communications (Netgate) Fix devel/git PLIST when HTMLDOCS is on Reported by: dankm on IRC - Update devel/git to 2.12.1 - Replace git-send-email patch by a version that works [1] PR: 214335 [1] Submitted by: OlivierW <olivierw1+bugzilla-freebsd@hotmail.com> [1] Sponsored by: Rubicon Communications (Netgate) Approved by: ports-secteam (junovitch) Changes: _U branches/2017Q1/ branches/2017Q1/devel/git/Makefile branches/2017Q1/devel/git/distinfo branches/2017Q1/devel/git/files/patch-git-send-email.perl branches/2017Q1/devel/git/pkg-plist A commit references this bug: Author: garga Date: Wed Mar 22 11:12:47 UTC 2017 New revision: 436687 URL: https://svnweb.freebsd.org/changeset/ports/436687 Log: MFH: r431794 r433740 r433768 r436592 Remove dependency of DEPRECATED mail/p5-Net-SMTP-SSL from devel/git PR: 214335 Obtained from: git development mailing list Sponsored by: Rubicon Communications (Netgate) Update devel/git to 2.11.1 Sponsored by: Rubicon Communications (Netgate) Fix devel/git PLIST when HTMLDOCS is on Reported by: dankm on IRC - Update devel/git to 2.12.1 - Replace git-send-email patch by a version that works [1] PR: 214335 [1] Submitted by: OlivierW <olivierw1+bugzilla-freebsd@hotmail.com> [1] Sponsored by: Rubicon Communications (Netgate) Approved by: ports-secteam (junovitch) Changes: _U branches/2017Q1/ branches/2017Q1/devel/git/Makefile branches/2017Q1/devel/git/distinfo branches/2017Q1/devel/git/files/patch-git-send-email.perl branches/2017Q1/devel/git/pkg-plist |