Bug 267648 - lang/python* socketmodule: support FreeBSD divert(4) socket
Summary: lang/python* socketmodule: support FreeBSD divert(4) socket
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Wen Heping
URL:
Keywords: feature, needs-qa
Depends on:
Blocks:
 
Reported: 2022-11-08 17:53 UTC by Gleb Smirnoff
Modified: 2022-11-21 08:26 UTC (History)
2 users (show)

See Also:
koobs: maintainer-feedback+
antoine: exp-run+


Attachments
patch to be applies to the ports tree (6.80 KB, patch)
2022-11-08 17:53 UTC, Gleb Smirnoff
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gleb Smirnoff freebsd_committer freebsd_triage 2022-11-08 17:53:25 UTC
Created attachment 237950 [details]
patch to be applies to the ports tree

I have patch for Python to support PF_DIVERT. The upstream is unwilling to accept the patch until FreeBSD 14.0-RELEASE is out and recommend to add the patch to our ports system.

Wen Heping wen@ told me that any patch to python-3.9 needs to go through exp-run, hence I'm creating this PR.

Patch for all python ports attached.
Comment 1 Gleb Smirnoff freebsd_committer freebsd_triage 2022-11-08 17:53:55 UTC
Forgot to include link to discussion with upstream: https://github.com/python/cpython/pull/96536#issuecomment-1303974686
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2022-11-09 22:29:44 UTC
@Gleb I believe there's still some room to have it upstreamed prior to 14.0, and will try to grease the wheels there. 

It would help to know the extent to which this feature may or may not receive changes prior to 14.0-RELEASE.

I understand a complete guarantee may not be possible, but any detail/confidence in that regard would be useful, particularly say from an ABI point of view, or any point of view which might preclude upstream needing to 'chase' changes in FreeBSD.
Comment 3 Gleb Smirnoff freebsd_committer freebsd_triage 2022-11-09 22:34:52 UTC
Thanks Kubilay,

no matter how the upstreaming process goes (expecting the worst, hoping for best) I'd like to go forward with this patch to ports, unless python port maintainers strongly disagree.
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2022-11-09 22:42:22 UTC
(In reply to Gleb Smirnoff from comment #3)

No that's fine, and thank you for submitting it here. It actually helps our case for upstreaming too (consider it pre-upstream production QA) :]

Once exp-runs are complete for all lang/python* ports, we are happy for you to take this issue to resolution, just self-assign and let us know when you're ready to move and we'll + the patch.
Comment 5 Antoine Brodin freebsd_committer freebsd_triage 2022-11-12 19:23:35 UTC
exp-run looks fine
Comment 6 commit-hook freebsd_committer freebsd_triage 2022-11-14 02:07:11 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4f45def26118f413bf49e75a5b685aa0b8477343

commit 4f45def26118f413bf49e75a5b685aa0b8477343
Author:     Wen Heping <wen@FreeBSD.org>
AuthorDate: 2022-11-14 02:04:01 +0000
Commit:     Wen Heping <wen@FreeBSD.org>
CommitDate: 2022-11-14 02:04:01 +0000

    lang/python*: Support FreeBSD divert(4) socket

    PR:             267648
    Reported by:    glebius@
    Exp-run by:     antoine@

 lang/python310/Makefile                            |  1 +
 .../files/patch-Modules__socketmodule.c (new)      | 29 ++++++++++++++++++++++
 lang/python311/Makefile                            |  1 +
 .../files/patch-Modules__socketmodule.c (new)      | 29 ++++++++++++++++++++++
 lang/python37/Makefile                             |  1 +
 .../files/patch-Modules__socketmodule.c (new)      | 29 ++++++++++++++++++++++
 lang/python38/Makefile                             |  1 +
 .../files/patch-Modules__socketmodule.c (new)      | 29 ++++++++++++++++++++++
 lang/python39/Makefile                             |  1 +
 .../files/patch-Modules__socketmodule.c (new)      | 29 ++++++++++++++++++++++
 10 files changed, 150 insertions(+)