From nobody Mon Nov 14 02:06:34 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4N9Xjl0KKWz4dLMQ; Mon, 14 Nov 2022 02:06:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4N9Xjk6vQsz4192; Mon, 14 Nov 2022 02:06:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668391595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KV1RqMYSE5e+m5tx1fVUGN/31QjqmsX5lJJnltr3Joc=; b=WAXvCc/7mYmZTQYQyKRz5T4Ss6X4tnc8AmqLgSoZ4sa2eqTQvTcCP8DV9EdObCYSXnbbZN HRS/MOzSCkC2wldK+Qe7keznnUud1QBC6hcxOXZgH14N4fVSn2k2D7wLBqpKSDPffMzR2X pRomfwpx+uZQpWP8DYSlnHiFF5pE0o43vcyufeKLy4CbME2/gkP68TjhggE0NXsEyek3Vi zKq1oHrgZTbp/QboVBP18w/JVtAdSoSOrcAXbWtbzVRsXG0mmHjqkbb3vsMGwhpfgDrQfx htclnGl4a4M6/mDggmRnFHkGjcvE9Ojt/tKYuouDtPSqLQ+pxwUeyX4dZY4qyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668391595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KV1RqMYSE5e+m5tx1fVUGN/31QjqmsX5lJJnltr3Joc=; b=X8eZ8sedkrtuPShtNl0CNEh0ECPHiI9NA1mXcQSkXPw97HJN8VPgy7kpt59yrUEEeTimY3 5acI3sJMO/CRuSFnU5s/hID66ygr0kNKCDyarwATaWkWJTnnAbgmDoP/Wqny8W7VjNpOal nyc3rzQ0Z7yOvNO/dQyqKLu/Eeoxpg7msO6KvaaTExW1GzD8TBYSTlL/3aTD0N8enB+oI0 +mpwrLbHbicbj2TVl/aPM+hAn1cChr0oqXJTn6bBzRjPSEOfGJgZ2G3xLfPeanEzcc7dHA 47rSAOoEezSoek//P8+ufGiXOumw67JNN/714zFZErx3eyB6ZB5X112Ntx9bgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1668391595; a=rsa-sha256; cv=none; b=LwyTBg5TKJiM4rMx0ZxjSwQIN5ECPu9gSM81u0sbDPJ6iSkUnGMv9jpxpJLdbLqGVUovwg XN8GuA+NMKA0+PJX9Z30/nQ+bTnrKM6OxnQpaSjiWc5S2yZfT4ipD0LQFUNaZHMsSelzxx 6ARpJxEvnGqTIEjvyEQSeoXPofejCWmf1XVGh2SxpA889pytdMUuHB2ZAPOF1HJn4cPAEo 8YKplQLt0H+YL5bG3T+nzxAa3IW97sGw0SNXmuw/o4GLFPqNt1z1oFwSRW8m5CZHB/4ley ViYn5KlYtTewadXf1uZViZ1NXH+F2LrWsGnNsxKdNErykgWN51PGwmPGkmVcHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4N9Xjk5zS8zPrT; Mon, 14 Nov 2022 02:06:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2AE26Yfw044542; Mon, 14 Nov 2022 02:06:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2AE26Y2H044541; Mon, 14 Nov 2022 02:06:34 GMT (envelope-from git) Date: Mon, 14 Nov 2022 02:06:34 GMT Message-Id: <202211140206.2AE26Y2H044541@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Wen Heping Subject: git: 4f45def26118 - main - lang/python*: Support FreeBSD divert(4) socket List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wen X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4f45def26118f413bf49e75a5b685aa0b8477343 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by wen: URL: https://cgit.FreeBSD.org/ports/commit/?id=4f45def26118f413bf49e75a5b685aa0b8477343 commit 4f45def26118f413bf49e75a5b685aa0b8477343 Author: Wen Heping AuthorDate: 2022-11-14 02:04:01 +0000 Commit: Wen Heping 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 + lang/python310/files/patch-Modules__socketmodule.c | 29 ++++++++++++++++++++++ lang/python311/Makefile | 1 + lang/python311/files/patch-Modules__socketmodule.c | 29 ++++++++++++++++++++++ lang/python37/Makefile | 1 + lang/python37/files/patch-Modules__socketmodule.c | 29 ++++++++++++++++++++++ lang/python38/Makefile | 1 + lang/python38/files/patch-Modules__socketmodule.c | 29 ++++++++++++++++++++++ lang/python39/Makefile | 1 + lang/python39/files/patch-Modules__socketmodule.c | 29 ++++++++++++++++++++++ 10 files changed, 150 insertions(+) diff --git a/lang/python310/Makefile b/lang/python310/Makefile index 7e51ea43cce1..929d2c9deb7d 100644 --- a/lang/python310/Makefile +++ b/lang/python310/Makefile @@ -1,5 +1,6 @@ PORTNAME= python DISTVERSION= ${PYTHON_DISTVERSION} +PORTREVISION= 1 CATEGORIES= lang python MASTER_SITES= PYTHON/ftp/python/${DISTVERSION:C/[a-z].*//} PKGNAMESUFFIX= ${PYTHON_SUFFIX} diff --git a/lang/python310/files/patch-Modules__socketmodule.c b/lang/python310/files/patch-Modules__socketmodule.c new file mode 100644 index 000000000000..93ef3b785ab9 --- /dev/null +++ b/lang/python310/files/patch-Modules__socketmodule.c @@ -0,0 +1,29 @@ +--- Modules/socketmodule.c ++++ Modules/socketmodule.c +@@ -1850,6 +1850,11 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args, + /* RDS sockets use sockaddr_in: fall-through */ + #endif /* AF_RDS */ + ++#ifdef AF_DIVERT ++ case AF_DIVERT: ++ /* FreeBSD divert(4) sockets use sockaddr_in: fall-through */ ++#endif /* AF_DIVERT */ ++ + case AF_INET: + { + struct maybe_idna host = {NULL, NULL}; +@@ -7628,6 +7633,14 @@ PyInit__socket(void) + PyModule_AddIntMacro(m, AF_SYSTEM); + #endif + ++/* FreeBSD divert(4) */ ++#ifdef PF_DIVERT ++ PyModule_AddIntMacro(m, PF_DIVERT); ++#endif ++#ifdef AF_DIVERT ++ PyModule_AddIntMacro(m, AF_DIVERT); ++#endif ++ + #ifdef AF_PACKET + PyModule_AddIntMacro(m, AF_PACKET); + #endif diff --git a/lang/python311/Makefile b/lang/python311/Makefile index 81b31ae90b5c..900776860f1f 100644 --- a/lang/python311/Makefile +++ b/lang/python311/Makefile @@ -1,5 +1,6 @@ PORTNAME= python DISTVERSION= ${PYTHON_DISTVERSION} +PORTREVISION= 1 CATEGORIES= lang python MASTER_SITES= PYTHON/ftp/python/${DISTVERSION:C/[a-z].*//} PKGNAMESUFFIX= ${PYTHON_SUFFIX} diff --git a/lang/python311/files/patch-Modules__socketmodule.c b/lang/python311/files/patch-Modules__socketmodule.c new file mode 100644 index 000000000000..93ef3b785ab9 --- /dev/null +++ b/lang/python311/files/patch-Modules__socketmodule.c @@ -0,0 +1,29 @@ +--- Modules/socketmodule.c ++++ Modules/socketmodule.c +@@ -1850,6 +1850,11 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args, + /* RDS sockets use sockaddr_in: fall-through */ + #endif /* AF_RDS */ + ++#ifdef AF_DIVERT ++ case AF_DIVERT: ++ /* FreeBSD divert(4) sockets use sockaddr_in: fall-through */ ++#endif /* AF_DIVERT */ ++ + case AF_INET: + { + struct maybe_idna host = {NULL, NULL}; +@@ -7628,6 +7633,14 @@ PyInit__socket(void) + PyModule_AddIntMacro(m, AF_SYSTEM); + #endif + ++/* FreeBSD divert(4) */ ++#ifdef PF_DIVERT ++ PyModule_AddIntMacro(m, PF_DIVERT); ++#endif ++#ifdef AF_DIVERT ++ PyModule_AddIntMacro(m, AF_DIVERT); ++#endif ++ + #ifdef AF_PACKET + PyModule_AddIntMacro(m, AF_PACKET); + #endif diff --git a/lang/python37/Makefile b/lang/python37/Makefile index a78063cd7c50..f63d9915a493 100644 --- a/lang/python37/Makefile +++ b/lang/python37/Makefile @@ -1,5 +1,6 @@ PORTNAME= python DISTVERSION= ${PYTHON_DISTVERSION} +PORTREVISION= 1 CATEGORIES= lang python MASTER_SITES= PYTHON/ftp/python/${DISTVERSION} PKGNAMESUFFIX= ${PYTHON_SUFFIX} diff --git a/lang/python37/files/patch-Modules__socketmodule.c b/lang/python37/files/patch-Modules__socketmodule.c new file mode 100644 index 000000000000..93ef3b785ab9 --- /dev/null +++ b/lang/python37/files/patch-Modules__socketmodule.c @@ -0,0 +1,29 @@ +--- Modules/socketmodule.c ++++ Modules/socketmodule.c +@@ -1850,6 +1850,11 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args, + /* RDS sockets use sockaddr_in: fall-through */ + #endif /* AF_RDS */ + ++#ifdef AF_DIVERT ++ case AF_DIVERT: ++ /* FreeBSD divert(4) sockets use sockaddr_in: fall-through */ ++#endif /* AF_DIVERT */ ++ + case AF_INET: + { + struct maybe_idna host = {NULL, NULL}; +@@ -7628,6 +7633,14 @@ PyInit__socket(void) + PyModule_AddIntMacro(m, AF_SYSTEM); + #endif + ++/* FreeBSD divert(4) */ ++#ifdef PF_DIVERT ++ PyModule_AddIntMacro(m, PF_DIVERT); ++#endif ++#ifdef AF_DIVERT ++ PyModule_AddIntMacro(m, AF_DIVERT); ++#endif ++ + #ifdef AF_PACKET + PyModule_AddIntMacro(m, AF_PACKET); + #endif diff --git a/lang/python38/Makefile b/lang/python38/Makefile index fd476d48aecf..acde9fdc2b99 100644 --- a/lang/python38/Makefile +++ b/lang/python38/Makefile @@ -1,5 +1,6 @@ PORTNAME= python DISTVERSION= ${PYTHON_DISTVERSION} +PORTREVISION= 1 CATEGORIES= lang python MASTER_SITES= PYTHON/ftp/python/${DISTVERSION} PKGNAMESUFFIX= ${PYTHON_SUFFIX} diff --git a/lang/python38/files/patch-Modules__socketmodule.c b/lang/python38/files/patch-Modules__socketmodule.c new file mode 100644 index 000000000000..93ef3b785ab9 --- /dev/null +++ b/lang/python38/files/patch-Modules__socketmodule.c @@ -0,0 +1,29 @@ +--- Modules/socketmodule.c ++++ Modules/socketmodule.c +@@ -1850,6 +1850,11 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args, + /* RDS sockets use sockaddr_in: fall-through */ + #endif /* AF_RDS */ + ++#ifdef AF_DIVERT ++ case AF_DIVERT: ++ /* FreeBSD divert(4) sockets use sockaddr_in: fall-through */ ++#endif /* AF_DIVERT */ ++ + case AF_INET: + { + struct maybe_idna host = {NULL, NULL}; +@@ -7628,6 +7633,14 @@ PyInit__socket(void) + PyModule_AddIntMacro(m, AF_SYSTEM); + #endif + ++/* FreeBSD divert(4) */ ++#ifdef PF_DIVERT ++ PyModule_AddIntMacro(m, PF_DIVERT); ++#endif ++#ifdef AF_DIVERT ++ PyModule_AddIntMacro(m, AF_DIVERT); ++#endif ++ + #ifdef AF_PACKET + PyModule_AddIntMacro(m, AF_PACKET); + #endif diff --git a/lang/python39/Makefile b/lang/python39/Makefile index 58d7f7372ab2..69fcdef611ea 100644 --- a/lang/python39/Makefile +++ b/lang/python39/Makefile @@ -1,5 +1,6 @@ PORTNAME= python DISTVERSION= ${PYTHON_DISTVERSION} +PORTREVISION= 1 CATEGORIES= lang python MASTER_SITES= PYTHON/ftp/python/${DISTVERSION} PKGNAMESUFFIX= ${PYTHON_SUFFIX} diff --git a/lang/python39/files/patch-Modules__socketmodule.c b/lang/python39/files/patch-Modules__socketmodule.c new file mode 100644 index 000000000000..93ef3b785ab9 --- /dev/null +++ b/lang/python39/files/patch-Modules__socketmodule.c @@ -0,0 +1,29 @@ +--- Modules/socketmodule.c ++++ Modules/socketmodule.c +@@ -1850,6 +1850,11 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args, + /* RDS sockets use sockaddr_in: fall-through */ + #endif /* AF_RDS */ + ++#ifdef AF_DIVERT ++ case AF_DIVERT: ++ /* FreeBSD divert(4) sockets use sockaddr_in: fall-through */ ++#endif /* AF_DIVERT */ ++ + case AF_INET: + { + struct maybe_idna host = {NULL, NULL}; +@@ -7628,6 +7633,14 @@ PyInit__socket(void) + PyModule_AddIntMacro(m, AF_SYSTEM); + #endif + ++/* FreeBSD divert(4) */ ++#ifdef PF_DIVERT ++ PyModule_AddIntMacro(m, PF_DIVERT); ++#endif ++#ifdef AF_DIVERT ++ PyModule_AddIntMacro(m, AF_DIVERT); ++#endif ++ + #ifdef AF_PACKET + PyModule_AddIntMacro(m, AF_PACKET); + #endif