FreeBSD Bugzilla – Attachment 245298 Details for
Bug 273122
lang/python311: backport netlink support
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
lang/python311: backport netlink support
0001-lang-python311-backport-GH-107812-to-extend-netlink-.patch (text/plain), 5.40 KB, created by
Mina Galić
on 2023-09-27 20:28:38 UTC
(
hide
)
Description:
lang/python311: backport netlink support
Filename:
MIME Type:
Creator:
Mina Galić
Created:
2023-09-27 20:28:38 UTC
Size:
5.40 KB
patch
obsolete
>From 0bfe00edfce9f615a12be03b9f2adde05754b118 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Mina=20Gali=C4=87?= <freebsd@igalic.co> >Date: Wed, 27 Sep 2023 20:18:45 +0000 >Subject: [PATCH] lang/python311: backport GH-107812 to extend netlink support > >upstream issue: https://github.com/python/cpython/issues/107812 >upstream pull request: https://github.com/python/cpython/pull/107813 > >PR: 273122 >Sponsored by: The FreeBSD Foundation >--- > lang/python311/Makefile | 3 +- > .../patch-0001-GH-107812-netlink-support | 65 +++++++++++++++++++ > lang/python311/files/patch-configure | 11 ---- > lang/python311/files/patch-configure.ac | 11 ++++ > 4 files changed, 78 insertions(+), 12 deletions(-) > create mode 100644 lang/python311/files/patch-0001-GH-107812-netlink-support > delete mode 100644 lang/python311/files/patch-configure > create mode 100644 lang/python311/files/patch-configure.ac > >diff --git a/lang/python311/Makefile b/lang/python311/Makefile >index 2ce279dbef2c..537049ea5891 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} >@@ -14,7 +15,7 @@ LICENSE= PSFL > > LIB_DEPENDS= libffi.so:devel/libffi > >-USES= compiler:c11 cpe ncurses pathfix pkgconfig \ >+USES= autoreconf:2.69 compiler:c11 cpe ncurses pathfix pkgconfig \ > python:${PYTHON_DISTVERSION:R},env readline shebangfix ssl tar:xz > PATHFIX_MAKEFILEIN= Makefile.pre.in > USE_LDCONFIG= yes >diff --git a/lang/python311/files/patch-0001-GH-107812-netlink-support b/lang/python311/files/patch-0001-GH-107812-netlink-support >new file mode 100644 >index 000000000000..287f626e3d5e >--- /dev/null >+++ b/lang/python311/files/patch-0001-GH-107812-netlink-support >@@ -0,0 +1,65 @@ >+From 21684962be117168cda7514ced054858c033ef0a Mon Sep 17 00:00:00 2001 >+From: =?UTF-8?q?Mina=20Gali=C4=87?= <freebsd@igalic.co> >+Date: Wed, 27 Sep 2023 19:53:22 +0000 >+Subject: [PATCH] GH-107812: extend socket's netlink support to FreeBSD >+ >+backport to 3.11 >+--- >+ .../Library/2023-08-09-15-37-20.gh-issue-107812.CflAXa.rst | 1 + >+ Modules/socketmodule.h | 2 ++ >+ configure.ac | 3 ++- >+ pyconfig.h.in | 3 +++ >+ 4 files changed, 8 insertions(+), 1 deletion(-) >+ create mode 100644 Misc/NEWS.d/next/Library/2023-08-09-15-37-20.gh-issue-107812.CflAXa.rst >+ >+diff --git Misc/NEWS.d/next/Library/2023-08-09-15-37-20.gh-issue-107812.CflAXa.rst Misc/NEWS.d/next/Library/2023-08-09-15-37-20.gh-issue-107812.CflAXa.rst >+new file mode 100644 >+index 0000000000..0aac44fb41 >+--- /dev/null >++++ Misc/NEWS.d/next/Library/2023-08-09-15-37-20.gh-issue-107812.CflAXa.rst >+@@ -0,0 +1 @@ >++Extend socket's netlink support to the FreeBSD platform. >+diff --git Modules/socketmodule.h Modules/socketmodule.h >+index 1b35b11cde..66aed8bfad 100644 >+--- Modules/socketmodule.h >++++ Modules/socketmodule.h >+@@ -89,6 +89,8 @@ typedef int socklen_t; >+ # include <asm/types.h> >+ # endif >+ # include <linux/netlink.h> >++#elif defined(HAVE_NETLINK_NETLINK_H) >++# include <netlink/netlink.h> >+ #else >+ # undef AF_NETLINK >+ #endif >+diff --git configure.ac configure.ac >+index e1cbb7c7fb..936421bdf7 100644 >+--- configure.ac >++++ configure.ac >+@@ -2700,7 +2700,8 @@ AC_CHECK_HEADERS([net/if.h], [], [], >+ ]) >+ >+ # On Linux, netlink.h requires asm/types.h >+-AC_CHECK_HEADERS(linux/netlink.h,,,[ >++# On FreeBSD, netlink.h is located in netlink/netlink.h >++AC_CHECK_HEADERS([linux/netlink.h netlink/netlink.h], [], [], [ >+ #ifdef HAVE_ASM_TYPES_H >+ #include <asm/types.h> >+ #endif >+diff --git pyconfig.h.in pyconfig.h.in >+index 0536047f57..d82e728ab4 100644 >+--- pyconfig.h.in >++++ pyconfig.h.in >+@@ -835,6 +835,9 @@ >+ /* Define to 1 if you have the <netinet/in.h> header file. */ >+ #undef HAVE_NETINET_IN_H >+ >++/* Define to 1 if you have the <netlink/netlink.h> header file. */ >++#undef HAVE_NETLINK_NETLINK_H >++ >+ /* Define to 1 if you have the <netpacket/packet.h> header file. */ >+ #undef HAVE_NETPACKET_PACKET_H >+ >+-- >+2.42.0 >+ >diff --git a/lang/python311/files/patch-configure b/lang/python311/files/patch-configure >deleted file mode 100644 >index 4aa2a57ef300..000000000000 >--- a/lang/python311/files/patch-configure >+++ /dev/null >@@ -1,11 +0,0 @@ >---- configure.orig 2022-12-07 13:31:07 UTC >-+++ configure >-@@ -7630,7 +7630,7 @@ if test "$Py_LTO" = 'true' ; then >- >- if test "$Py_LTO" = 'true' ; then >- case $CC in >-- *clang*) >-+ *clang*|cc) >- LDFLAGS_NOLTO="-fno-lto" >- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -flto=thin" >&5 >- $as_echo_n "checking whether C compiler accepts -flto=thin... " >&6; } >diff --git a/lang/python311/files/patch-configure.ac b/lang/python311/files/patch-configure.ac >new file mode 100644 >index 000000000000..bc9333c25df4 >--- /dev/null >+++ b/lang/python311/files/patch-configure.ac >@@ -0,0 +1,11 @@ >+--- configure.ac.orig 2023-09-27 20:01:21 UTC >++++ configure.ac >+@@ -1835,7 +1835,7 @@ esac >+ [AC_MSG_RESULT(no)]) >+ if test "$Py_LTO" = 'true' ; then >+ case $CC in >+- *clang*) >++ *clang*|cc) >+ LDFLAGS_NOLTO="-fno-lto" >+ dnl Clang linker requires -flto in order to link objects with LTO information. >+ dnl Thin LTO is faster and works for object files with full LTO information, too. >-- >2.42.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 273122
:
244076
| 245298