FreeBSD Bugzilla – Attachment 245287 Details for
Bug 273132
lang/python38: backport netlink support
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
lang/python38: backport netlink patch
0001-lang-python38-backport-netlink-patch.patch (text/plain), 5.52 KB, created by
Mina Galić
on 2023-09-27 13:48:01 UTC
(
hide
)
Description:
lang/python38: backport netlink patch
Filename:
MIME Type:
Creator:
Mina Galić
Created:
2023-09-27 13:48:01 UTC
Size:
5.52 KB
patch
obsolete
>From c5a77a3235f69439bcfb0d8f8aa1ad56fdf1c499 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Mina=20Gali=C4=87?= <freebsd@igalic.co> >Date: Wed, 27 Sep 2023 12:02:49 +0000 >Subject: [PATCH] lang/python38: backport netlink patch > >upstream pull request: https://github.com/python/cpython/pull/107813 >upstream issue: https://github.com/python/cpython/issues/107812 > >PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273122 >Sponsored by: The FreeBSD Foundation >--- > lang/python38/Makefile | 5 +- > .../patch-0001-GH-107812-netlink-support | 74 +++++++++++++++++++ > lang/python38/files/patch-configure | 11 --- > lang/python38/files/patch-configure.ac | 11 +++ > 4 files changed, 88 insertions(+), 13 deletions(-) > create mode 100644 lang/python38/files/patch-0001-GH-107812-netlink-support > delete mode 100644 lang/python38/files/patch-configure > create mode 100644 lang/python38/files/patch-configure.ac > >diff --git a/lang/python38/Makefile b/lang/python38/Makefile >index 516d2c3d821b..f57b192d27a6 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} >@@ -14,8 +15,8 @@ LICENSE= PSFL > > LIB_DEPENDS= libffi.so:devel/libffi > >-USES= cpe ncurses pathfix pkgconfig python:${PYTHON_DISTVERSION:R},env readline \ >- shebangfix ssl tar:xz >+USES= autoreconf:2.69 cpe ncurses pathfix pkgconfig python:${PYTHON_DISTVERSION:R},env \ >+ readline shebangfix ssl tar:xz > PATHFIX_MAKEFILEIN= Makefile.pre.in > USE_LDCONFIG= yes > GNU_CONFIGURE= yes >diff --git a/lang/python38/files/patch-0001-GH-107812-netlink-support b/lang/python38/files/patch-0001-GH-107812-netlink-support >new file mode 100644 >index 000000000000..2995716ecabc >--- /dev/null >+++ b/lang/python38/files/patch-0001-GH-107812-netlink-support >@@ -0,0 +1,74 @@ >+From 2571505b05f8f2970309927a8da29b94f97e7aeb Mon Sep 17 00:00:00 2001 >+From: =?UTF-8?q?Mina=20Gali=C4=87?= <freebsd@igalic.co> >+Date: Wed, 27 Sep 2023 09:24:50 +0000 >+Subject: [PATCH] GH-107812: extend socket's netlink support to FreeBSD 3.8 >+ >+backport GH-107812 to 3.8 >+--- >+ .../2023-08-09-15-37-20.gh-issue-107812.CflAXa.rst | 1 + >+ Modules/socketmodule.h | 2 ++ >+ configure.ac | 3 ++- >+ pyconfig.h.in | 12 ++++++++++++ >+ 4 files changed, 17 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 dff1f8f4e9..64dc88883a 100644 >+--- Modules/socketmodule.h >++++ Modules/socketmodule.h >+@@ -50,6 +50,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 de83332dd3..c04f2fb291 100644 >+--- configure.ac >++++ configure.ac >+@@ -2204,7 +2204,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 41cfe07902..66e5d65788 100644 >+--- pyconfig.h.in >++++ pyconfig.h.in >+@@ -715,6 +715,18 @@ >+ /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ >+ #undef HAVE_NDIR_H >+ >++/* Define to 1 if you have the <netcan/can.h> header file. */ >++#undef HAVE_NETCAN_CAN_H >++ >++/* Define to 1 if you have the <netdb.h> header file. */ >++#undef HAVE_NETDB_H >++ >++/* 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/python38/files/patch-configure b/lang/python38/files/patch-configure >deleted file mode 100644 >index c78047439605..000000000000 >--- a/lang/python38/files/patch-configure >+++ /dev/null >@@ -1,11 +0,0 @@ >---- configure.orig 2022-02-23 19:52:00 UTC >-+++ configure >-@@ -6625,7 +6625,7 @@ fi >- >- if test "$Py_LTO" = 'true' ; then >- case $CC in >-- *clang*) >-+ *clang*|cc) >- >- if test -n "$ac_tool_prefix"; then >- # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args. >diff --git a/lang/python38/files/patch-configure.ac b/lang/python38/files/patch-configure.ac >new file mode 100644 >index 000000000000..440e989b986c >--- /dev/null >+++ b/lang/python38/files/patch-configure.ac >@@ -0,0 +1,11 @@ >+--- configure.ac.orig 2023-09-27 12:00:36 UTC >++++ configure.ac >+@@ -1357,7 +1357,7 @@ fi], >+ [AC_MSG_RESULT(no)]) >+ if test "$Py_LTO" = 'true' ; then >+ case $CC in >+- *clang*) >++ *clang*|cc) >+ AC_SUBST(LLVM_AR) >+ AC_PATH_TOOL(LLVM_AR, llvm-ar, '', ${llvm_path}) >+ AC_SUBST(LLVM_AR_FOUND) >-- >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 273132
:
244093
| 245287