Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/python/files/
Date: Fri, 28 Oct 2016 14:11:33
Message-Id: 1477663869.8009a89b44a26ba0847e607b2bd61494b21846cb.floppym@gentoo
1 commit: 8009a89b44a26ba0847e607b2bd61494b21846cb
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Fri Oct 28 14:11:09 2016 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Fri Oct 28 14:11:09 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8009a89b
7
8 dev-lang/python: remove old patches
9
10 Package-Manager: portage-2.3.2
11
12 .../python/files/python-3.3-CVE-2014-4616.patch | 52 ---------
13 dev-lang/python/files/python-3.3-libressl.patch | 127 ---------------------
14 .../files/python-3.3.5-ncurses-pkg-config.patch | 40 -------
15 3 files changed, 219 deletions(-)
16
17 diff --git a/dev-lang/python/files/python-3.3-CVE-2014-4616.patch b/dev-lang/python/files/python-3.3-CVE-2014-4616.patch
18 deleted file mode 100644
19 index c67b2e5..00000000
20 --- a/dev-lang/python/files/python-3.3-CVE-2014-4616.patch
21 +++ /dev/null
22 @@ -1,52 +0,0 @@
23 -# HG changeset patch
24 -# User Benjamin Peterson <benjamin@××××××.org>
25 -# Date 1397441438 14400
26 -# Node ID 50c07ed1743da9cd4540d83de0c30bd17aeb41b0
27 -# Parent 218e28a935ab4494d05215c243e2129625a71893
28 -in scan_once, prevent the reading of arbitrary memory when passed a negative index
29 -
30 -Bug reported by Guido Vranken.
31 -
32 -Index: Python-3.3.5/Lib/json/tests/test_decode.py
33 -===================================================================
34 ---- Python-3.3.5.orig/Lib/test/test_json/test_decode.py 2014-06-26 18:40:10.825269130 +0200
35 -+++ Python-3.3.5/Lib/test/test_json/test_decode.py 2014-06-26 18:40:21.962323035 +0200
36 -@@ -60,5 +60,10 @@
37 - msg = 'escape'
38 - self.assertRaisesRegexp(ValueError, msg, self.loads, s)
39 -
40 -+ def test_negative_index(self):
41 -+ d = self.json.JSONDecoder()
42 -+ self.assertRaises(ValueError, d.raw_decode, 'a'*42, -50000)
43 -+ self.assertRaises(ValueError, d.raw_decode, u'a'*42, -50000)
44 -+
45 - class TestPyDecode(TestDecode, PyTest): pass
46 - class TestCDecode(TestDecode, CTest): pass
47 -Index: Python-3.3.5/Misc/ACKS
48 -===================================================================
49 ---- Python-3.3.5.orig/Misc/ACKS 2014-06-26 18:40:10.826269135 +0200
50 -+++ Python-3.3.5/Misc/ACKS 2014-06-26 18:40:21.962323035 +0200
51 -@@ -1085,6 +1085,7 @@
52 - Frank Visser
53 - Johannes Vogel
54 - Alex Volkov
55 -+Guido Vranken
56 - Martijn Vries
57 - Niki W. Waibel
58 - Wojtek Walczak
59 -Index: Python-3.3.5/Modules/_json.c
60 -===================================================================
61 ---- a/Modules/_json.c
62 -+++ b/Modules/_json.c
63 -@@ -975,7 +975,10 @@ scan_once_unicode(PyScannerObject *s, Py
64 - kind = PyUnicode_KIND(pystr);
65 - length = PyUnicode_GET_LENGTH(pystr);
66 -
67 -- if (idx >= length) {
68 -+ if (idx < 0)
69 -+ /* Compatibility with Python version. */
70 -+ idx += length;
71 -+ if (idx < 0 || idx >= length) {
72 - PyErr_SetNone(PyExc_StopIteration);
73 - return NULL;
74 - }
75
76 diff --git a/dev-lang/python/files/python-3.3-libressl.patch b/dev-lang/python/files/python-3.3-libressl.patch
77 deleted file mode 100644
78 index 816704e..00000000
79 --- a/dev-lang/python/files/python-3.3-libressl.patch
80 +++ /dev/null
81 @@ -1,127 +0,0 @@
82 -From eed8d3b553e00e04c1f97c87ea02723630fb15a4 Mon Sep 17 00:00:00 2001
83 -From: hasufell <hasufell@g.o>
84 -Date: Sun, 20 Sep 2015 14:25:43 +0200
85 -Subject: [PATCH] Backport upstream libressl patches to python-3.3
86 -
87 -https://hg.python.org/cpython/raw-rev/7f82f50fdad0
88 -https://hg.python.org/cpython/raw-rev/4dac45f88d45
89 ----
90 - Lib/ssl.py | 7 ++++++-
91 - Lib/test/test_ssl.py | 21 +++++++++++++--------
92 - Modules/_ssl.c | 4 ++++
93 - configure | 42 ++++++++++++++++++++++++++++++++++++++++++
94 - configure.ac | 3 +++
95 - pyconfig.h.in | 3 +++
96 - 6 files changed, 71 insertions(+), 9 deletions(-)
97 -
98 -diff --git a/Lib/ssl.py b/Lib/ssl.py
99 -index cd8d6b4..445ae87 100644
100 ---- a/Lib/ssl.py
101 -+++ b/Lib/ssl.py
102 -@@ -78,7 +78,12 @@ try:
103 - from _ssl import OP_SINGLE_ECDH_USE
104 - except ImportError:
105 - pass
106 --from _ssl import RAND_status, RAND_egd, RAND_add, RAND_bytes, RAND_pseudo_bytes
107 -+from _ssl import RAND_status, RAND_add, RAND_bytes, RAND_pseudo_bytes
108 -+try:
109 -+ from _ssl import RAND_egd
110 -+except ImportError:
111 -+ # LibreSSL does not provide RAND_egd
112 -+ pass
113 - from _ssl import (
114 - SSL_ERROR_ZERO_RETURN,
115 - SSL_ERROR_WANT_READ,
116 -diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
117 -index 9fc6027..879f791 100644
118 ---- a/Lib/test/test_ssl.py
119 -+++ b/Lib/test/test_ssl.py
120 -@@ -130,8 +130,9 @@ class BasicSocketTests(unittest.TestCase):
121 - self.assertRaises(ValueError, ssl.RAND_bytes, -5)
122 - self.assertRaises(ValueError, ssl.RAND_pseudo_bytes, -5)
123 -
124 -- self.assertRaises(TypeError, ssl.RAND_egd, 1)
125 -- self.assertRaises(TypeError, ssl.RAND_egd, 'foo', 1)
126 -+ if hasattr(ssl, 'RAND_egd'):
127 -+ self.assertRaises(TypeError, ssl.RAND_egd, 1)
128 -+ self.assertRaises(TypeError, ssl.RAND_egd, 'foo', 1)
129 - ssl.RAND_add("this is a random string", 75.0)
130 -
131 - @unittest.skipUnless(os.name == 'posix', 'requires posix')
132 -@@ -250,11 +251,11 @@ class BasicSocketTests(unittest.TestCase):
133 - # Some sanity checks follow
134 - # >= 0.9
135 - self.assertGreaterEqual(n, 0x900000)
136 -- # < 2.0
137 -- self.assertLess(n, 0x20000000)
138 -+ # < 3.0
139 -+ self.assertLess(n, 0x30000000)
140 - major, minor, fix, patch, status = t
141 - self.assertGreaterEqual(major, 0)
142 -- self.assertLess(major, 2)
143 -+ self.assertLess(major, 3)
144 - self.assertGreaterEqual(minor, 0)
145 - self.assertLess(minor, 256)
146 - self.assertGreaterEqual(fix, 0)
147 -@@ -263,9 +264,13 @@ class BasicSocketTests(unittest.TestCase):
148 - self.assertLessEqual(patch, 26)
149 - self.assertGreaterEqual(status, 0)
150 - self.assertLessEqual(status, 15)
151 -- # Version string as returned by OpenSSL, the format might change
152 -- self.assertTrue(s.startswith("OpenSSL {:d}.{:d}.{:d}".format(major, minor, fix)),
153 -- (s, t))
154 -+ # Version string as returned by {Open,Libre}SSL, the format might change
155 -+ if "LibreSSL" in s:
156 -+ self.assertTrue(s.startswith("LibreSSL {:d}.{:d}".format(major, minor)),
157 -+ (s, t))
158 -+ else:
159 -+ self.assertTrue(s.startswith("OpenSSL {:d}.{:d}.{:d}".format(major, minor, fix)),
160 -+ (s, t))
161 -
162 - @support.cpython_only
163 - def test_refcycle(self):
164 -diff --git a/Modules/_ssl.c b/Modules/_ssl.c
165 -index 499e8ba..cb151ba 100644
166 ---- a/Modules/_ssl.c
167 -+++ b/Modules/_ssl.c
168 -@@ -2559,6 +2559,7 @@ Returns 1 if the OpenSSL PRNG has been seeded with enough data and 0 if not.\n\
169 - It is necessary to seed the PRNG with RAND_add() on some platforms before\n\
170 - using the ssl() function.");
171 -
172 -+#ifdef HAVE_RAND_EGD
173 - static PyObject *
174 - PySSL_RAND_egd(PyObject *self, PyObject *args)
175 - {
176 -@@ -2586,6 +2587,7 @@ PyDoc_STRVAR(PySSL_RAND_egd_doc,
177 - Queries the entropy gather daemon (EGD) on the socket named by 'path'.\n\
178 - Returns number of bytes read. Raises SSLError if connection to EGD\n\
179 - fails or if it does not provide enough data to seed PRNG.");
180 -+#endif /* HAVE_RAND_EGD */
181 -
182 - #endif /* HAVE_OPENSSL_RAND */
183 -
184 -@@ -2604,8 +2606,10 @@ static PyMethodDef PySSL_methods[] = {
185 - PySSL_RAND_bytes_doc},
186 - {"RAND_pseudo_bytes", PySSL_RAND_pseudo_bytes, METH_VARARGS,
187 - PySSL_RAND_pseudo_bytes_doc},
188 -+#ifdef HAVE_RAND_EGD
189 - {"RAND_egd", PySSL_RAND_egd, METH_VARARGS,
190 - PySSL_RAND_egd_doc},
191 -+#endif
192 - {"RAND_status", (PyCFunction)PySSL_RAND_status, METH_NOARGS,
193 - PySSL_RAND_status_doc},
194 - #endif
195 -diff --git a/configure.ac b/configure.ac
196 -index 6a64bff..90f315a 100644
197 ---- a/configure.ac
198 -+++ b/configure.ac
199 -@@ -2181,6 +2181,9 @@ AC_MSG_RESULT($SHLIBS)
200 - AC_CHECK_LIB(sendfile, sendfile)
201 - AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV
202 - AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX
203 -+AC_CHECK_LIB(crypto, RAND_egd,
204 -+ AC_DEFINE(HAVE_RAND_EGD, 1,
205 -+ [Define if the libcrypto has RAND_egd]))
206 -
207 - # only check for sem_init if thread support is requested
208 - if test "$with_threads" = "yes" -o -z "$with_threads"; then
209
210 diff --git a/dev-lang/python/files/python-3.3.5-ncurses-pkg-config.patch b/dev-lang/python/files/python-3.3.5-ncurses-pkg-config.patch
211 deleted file mode 100644
212 index d963b9e..00000000
213 --- a/dev-lang/python/files/python-3.3.5-ncurses-pkg-config.patch
214 +++ /dev/null
215 @@ -1,40 +0,0 @@
216 -do not hardcode /usr/include paths
217 -
218 ---- a/configure.ac
219 -+++ b/configure.ac
220 -@@ -668,6 +668,8 @@ AC_ARG_WITH(cxx_main,
221 - ])
222 - AC_MSG_RESULT($with_cxx_main)
223 -
224 -+AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
225 -+
226 - preset_cxx="$CXX"
227 - if test -z "$CXX"
228 - then
229 -@@ -1513,7 +1515,7 @@ dnl AC_MSG_RESULT($cpp_type)
230 - # checks for header files
231 - AC_HEADER_STDC
232 - ac_save_cppflags="$CPPFLAGS"
233 --CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
234 -+CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags ncursesw`"
235 - AC_CHECK_HEADERS(asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
236 - fcntl.h grp.h \
237 - ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
238 -@@ -2225,8 +2227,6 @@ LIBS="$withval $LIBS"
239 - ],
240 - [AC_MSG_RESULT(no)])
241 -
242 --AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
243 --
244 - # Check for use of the system expat library
245 - AC_MSG_CHECKING(for --with-system-expat)
246 - AC_ARG_WITH(system_expat,
247 -@@ -4273,7 +4273,7 @@ then
248 - fi
249 -
250 - ac_save_cppflags="$CPPFLAGS"
251 --CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
252 -+CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags ncursesw`"
253 - # On HP/UX 11.0, mvwdelch is a block with a return statement
254 - AC_MSG_CHECKING(whether mvwdelch is an expression)
255 - AC_CACHE_VAL(ac_cv_mvwdelch_is_expression,