Skip to content

Commit 83fd4b8

Browse files
committed
downloads: cpython 3.11.3 -> 3.11.4
Upstream backported a patch related to musl which breaks the build on Linux <5.1. So we have to apply a revert to keep the build green. This has been reported upstream at python/cpython#106881.
1 parent 1630ff4 commit 83fd4b8

File tree

3 files changed

+27
-4
lines changed

3 files changed

+27
-4
lines changed

cpython-unix/build-cpython.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,14 @@ if [[ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_9}" && -n "${PYTHON_MEETS_MAXIMUM_VER
241241
patch -p1 -i ${ROOT}/patch-posixmodule-remove-system.patch
242242
fi
243243

244+
# posixmodule.c unconditionally includes linux/limits.h on musl. This breaks
245+
# because we're building with old Linux headers not having this file. This is
246+
# effectively a revert of CPython commit 8be8101bca34b60481ec3d7ecaea4a3379fb7dbb.
247+
# Upstream bug report: https://github.com/python/cpython/issues/106881.
248+
if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_11}" ]; then
249+
patch -p1 -i ${ROOT}/patch-posixmodule-musl-limits.patch
250+
fi
251+
244252
# Python 3.11 has configure support for configuring extension modules. We really,
245253
# really, really want to use this feature because it looks promising. But at the
246254
# time we added this code the functionality didn't support all extension modules
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
2+
index 91da07908f..87919ebf43 100644
3+
--- a/Modules/posixmodule.c
4+
+++ b/Modules/posixmodule.c
5+
@@ -280,9 +280,8 @@ corresponding Unix manual entries for more information on calls.");
6+
# undef HAVE_SCHED_SETAFFINITY
7+
#endif
8+
9+
-#if defined(HAVE_SYS_XATTR_H) && defined(__linux__) && !defined(__FreeBSD_kernel__) && !defined(__GNU__)
10+
+#if defined(HAVE_SYS_XATTR_H) && defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__GNU__)
11+
# define USE_XATTRS
12+
-# include <linux/limits.h> // Needed for XATTR_SIZE_MAX on musl libc.
13+
#endif
14+
15+
#ifdef USE_XATTRS

pythonbuild/downloads.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@
6262
"python_tag": "cp310",
6363
},
6464
"cpython-3.11": {
65-
"url": "https://www.python.org/ftp/python/3.11.3/Python-3.11.3.tar.xz",
66-
"size": 19906156,
67-
"sha256": "8a5db99c961a7ecf27c75956189c9602c968751f11dbeae2b900dbff1c085b5e",
68-
"version": "3.11.3",
65+
"url": "https://www.python.org/ftp/python/3.11.4/Python-3.11.4.tar.xz",
66+
"size": 19954828,
67+
"sha256": "2f0e409df2ab57aa9fc4cbddfb976af44e4e55bf6f619eee6bc5c2297264a7f6",
68+
"version": "3.11.4",
6969
"licenses": ["Python-2.0", "CNRI-Python"],
7070
"license_file": "LICENSE.cpython.txt",
7171
"python_tag": "cp311",

0 commit comments

Comments
 (0)