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.
Forgot to include link to discussion with upstream: https://github.com/python/cpython/pull/96536#issuecomment-1303974686
@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.
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.
(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.
exp-run looks fine
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(+)