From 0c391afb695caa6f78857957ba9a733a8e598ac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 10 May 2018 14:47:13 +0200 Subject: [PATCH] Update to 3.7.0b4 --- 00274-fix-arch-names.patch | 41 +++++++------- ...rocessing-regression-on-newer-glibcs.patch | 55 ------------------- 00304-test-posix-pass-environ.patch | 13 +++++ python37.spec | 20 ++++--- sources | 2 +- 5 files changed, 47 insertions(+), 84 deletions(-) delete mode 100644 00302-fix-multiprocessing-regression-on-newer-glibcs.patch create mode 100644 00304-test-posix-pass-environ.patch diff --git a/00274-fix-arch-names.patch b/00274-fix-arch-names.patch index 9d69223..c8e53c1 100644 --- a/00274-fix-arch-names.patch +++ b/00274-fix-arch-names.patch @@ -1,7 +1,21 @@ -diff -up Python-3.5.0/configure.ac.than Python-3.5.0/configure.ac ---- Python-3.5.0/configure.ac.than 2015-11-13 11:51:32.039560172 -0500 -+++ Python-3.5.0/configure.ac 2015-11-13 11:52:11.670168157 -0500 -@@ -788,9 +788,9 @@ cat >> conftest.c <> conftest.c <> conftest.c <> conftest.c <> conftest.c <> conftest.c <> conftest.c <> conftest.c < -Date: Mon, 23 Apr 2018 13:19:42 +0200 -Subject: [PATCH] bpo-33329: Fix multiprocessing regression on newer glibcs - -Starting with glibc 2.27.9000-xxx, sigaddset() can return EINVAL for some -reserved signal numbers between 1 and NSIG. The `range(1, NSIG)` idiom -is commonly used to select all signals for blocking with `pthread_sigmask`. -So we ignore the sigaddset() return value until we expose sigfillset() -to provide a better idiom. ---- - .../next/Library/2018-04-23-13-21-39.bpo-33329.lQ-Eod.rst | 1 + - Modules/signalmodule.c | 14 ++++++++------ - 2 files changed, 9 insertions(+), 6 deletions(-) - create mode 100644 Misc/NEWS.d/next/Library/2018-04-23-13-21-39.bpo-33329.lQ-Eod.rst - -diff --git a/Misc/NEWS.d/next/Library/2018-04-23-13-21-39.bpo-33329.lQ-Eod.rst b/Misc/NEWS.d/next/Library/2018-04-23-13-21-39.bpo-33329.lQ-Eod.rst -new file mode 100644 -index 000000000000..d1a4e56d04b9 ---- /dev/null -+++ b/Misc/NEWS.d/next/Library/2018-04-23-13-21-39.bpo-33329.lQ-Eod.rst -@@ -0,0 +1 @@ -+Fix multiprocessing regression on newer glibcs -diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c -index 791616014384..35fd87e2d1e7 100644 ---- a/Modules/signalmodule.c -+++ b/Modules/signalmodule.c -@@ -819,7 +819,6 @@ iterable_to_sigset(PyObject *iterable, sigset_t *mask) - int result = -1; - PyObject *iterator, *item; - long signum; -- int err; - - sigemptyset(mask); - -@@ -841,11 +840,14 @@ iterable_to_sigset(PyObject *iterable, sigset_t *mask) - Py_DECREF(item); - if (signum == -1 && PyErr_Occurred()) - goto error; -- if (0 < signum && signum < NSIG) -- err = sigaddset(mask, (int)signum); -- else -- err = 1; -- if (err) { -+ if (0 < signum && signum < NSIG) { -+ /* bpo-33329: ignore sigaddset() return value as it can fail -+ * for some reserved signals, but we want the `range(1, NSIG)` -+ * idiom to allow selecting all valid signals. -+ */ -+ (void) sigaddset(mask, (int)signum); -+ } -+ else { - PyErr_Format(PyExc_ValueError, - "signal number %ld out of range", signum); - goto error; diff --git a/00304-test-posix-pass-environ.patch b/00304-test-posix-pass-environ.patch new file mode 100644 index 0000000..9780674 --- /dev/null +++ b/00304-test-posix-pass-environ.patch @@ -0,0 +1,13 @@ +diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py +index da0135b..1b27b5f 100644 +--- a/Lib/test/test_posix.py ++++ b/Lib/test/test_posix.py +@@ -1463,7 +1463,7 @@ class TestPosixSpawn(unittest.TestCase): + """ + pid = posix.posix_spawn(sys.executable, + [sys.executable, '-c', script], +- {'foo': 'bar'}) ++ {**os.environ, 'foo': 'bar'}) + self.assertEqual(os.waitpid(pid, 0), (pid, 0)) + with open(envfile) as f: + self.assertEqual(f.read(), 'bar') diff --git a/python37.spec b/python37.spec index 28bbba0..a0097d9 100644 --- a/python37.spec +++ b/python37.spec @@ -13,12 +13,12 @@ URL: https://www.python.org/ # Third beta -%global prerel b3 +%global prerel b4 # WARNING When rebasing to a new Python version, # remember to update the python3-docs package as well Version: %{pybasever}.0 -Release: 0.16.%{?prerel}%{?dist} +Release: 0.17.%{?prerel}%{?dist} License: Python @@ -350,11 +350,12 @@ Patch274: 00274-fix-arch-names.patch # and: https://src.fedoraproject.org/rpms/redhat-rpm-config/c/078af19 Patch291: 00291-setup-Link-ctypes-against-dl-explicitly.patch -# 00302 # -# Fix multiprocessing regression on newer glibcs -# See: https://bugzilla.redhat.com/show_bug.cgi?id=1569933 -# and: https://bugs.python.org/issue33329 -Patch302: 00302-fix-multiprocessing-regression-on-newer-glibcs.patch +# 00304 # +# Pass os.environ to new process created at test_posix::test_specify_environment +# Otherwise important variables such as LD_LIBRARY_PATH are not set and the +# child process might not work at all +# Proposed upstream: https://bugs.python.org/issue33455 +Patch304: 00304-test-posix-pass-environ.patch # (New patches go here ^^^) # @@ -668,7 +669,7 @@ sed -r -i s/'_PIP_VERSION = "[0-9.]+"'/'_PIP_VERSION = "%{pip_version}"'/ Lib/en %patch251 -p1 %patch274 -p1 %patch291 -p1 -%patch302 -p1 +%patch304 -p1 # Remove files that should be generated by the build @@ -1564,6 +1565,9 @@ CheckPython optimized # ====================================================== %changelog +* Thu May 10 2018 Miro Hrončok - 3.7.0-0.17.b4 +- Update to 3.7.0b4 + * Mon Apr 23 2018 Miro Hrončok - 3.7.0-0.16.b3 - Fix multiprocessing regression on newer glibcs - Enable test_multiprocessing_fork(server) and _spawn again diff --git a/sources b/sources index 3a10973..abc3c00 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Python-3.7.0b3.tar.xz) = 4fd605cb1621e4bed73c2aadf0443fb70b4d013e9d93a26e81e75dc56906062660b63ac1d97224da217d5e05a3372802a291924a26cc067959d8e1e753a8356f +SHA512 (Python-3.7.0b4.tar.xz) = e97459a5467a984a5a2bfc08ed937dfeb899f3d4ff9a655878badffc19e722efc30112422c14f94fcf9f6c82ee01e9fe2bb538db83454e4c83b711d1a8444472