Accepting request 448858 from devel:languages:python:Factory
- update to 2.7.13 * dozens of bugfixes, see NEWS for details * updated cipher lists for openssl wrapper, support openssl >= 1.1.0 * properly fix HTTPoxy (CVE-2016-1000110) * profile-opt build now applies PGO to modules as well - update python-2.7.10-overflow_check.patch with python-2.7.13-overflow_check.patch, incorporating upstream changes - add "-fwrapv" to optflags explicitly because upstream code still relies on it in many places - provide python2-* symbols, for support of new packages built as python2-foo - rename macros.python to macros.python2 accordingly - require python-rpm-macros package, drop macro definitions from macros.python2 OBS-URL: https://build.opensuse.org/request/show/448858 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python?expand=0&rev=120
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d7837121dd5652a05fef807c361909d255d173280c4e1a4ded94d73d80a1f978
|
||||
size 12390820
|
@@ -1,17 +0,0 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v1
|
||||
|
||||
iQIcBAABAgAGBQJXbv4BAAoJEATDZ8IYrdT/tvgQAKxibPTOHYEqOr4y9AIFow0d
|
||||
U+FXjVacCOO3GqM6GZlHfM7kjAkqZzSjqFwdiS7fIeKP0fzob+D9ujADmyRvNBV/
|
||||
gpfaGQyLMhV9wcPxdn/4NdHItR3USoLXA4vDEGLggIW8b9Rr0pNTa9AM4X/TN1bD
|
||||
I3X6WrfjeSyiNiKieDpBRlGI4SVLG+Qtz5GL2K2U+d7leWXUAOJdKp4BUQdupFTz
|
||||
tTzyvYOufvwNkOiS/H+lV2KVt9FgtOl6KYsZpoAQJzI6PjKoYN/FTr2oiK9KnR/F
|
||||
wuRa8fRJ6aY22Qk0ne50NfRmzo0/5rGI0HQmPNkiderrj0uA6chhZB5vqP0BBd+8
|
||||
M3zS5O2jme5fTuxCEtrasXZ7K3UaMturTXPJWrC0Cy0yxm2GtYG6oeUsw9HlR9/c
|
||||
tO2JnZ217HqiGLzfK3YzNnpbG0Dpim4PleswlZXaEMs6xpBYk3yrbN8OFCxTIHQ1
|
||||
kcGsML6t+g3mXmiTIgIwb7EM9wcSaDsTUsNmBbGsZRcMqdSwDEK8upihevgnyemg
|
||||
v+RMuDyvBHfTF9SODMnWBvPNj7MoB6MHT0+fTPaWpISscAcTImYZVcmMttahZS1g
|
||||
ID0bMNnqL4Mchnksl4JHt98ggofGReuZF74T5HTYdoYVpSGXIYNkxGTS4YM9BBbA
|
||||
GWKG06BiwDYBxTr6fQNO
|
||||
=YuS4
|
||||
-----END PGP SIGNATURE-----
|
3
Python-2.7.13.tar.xz
Normal file
3
Python-2.7.13.tar.xz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:35d543986882f78261f97787fd3e06274bfa6df29fac9b4a94f73930ff98f731
|
||||
size 12495628
|
16
Python-2.7.13.tar.xz.asc
Normal file
16
Python-2.7.13.tar.xz.asc
Normal file
@@ -0,0 +1,16 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIcBAABCAAGBQJYVZxZAAoJEATDZ8IYrdT/YCoP/103Idy0ETFqOE+Vt7vLI2cU
|
||||
Ct0cyPy5ZBRIjZmcav8R2rKPKC1EjE9BfsJDdPevm2drBu18IjP59fqL47unCQ37
|
||||
luoUb4vOCjuSu0NesTsVPW+Bw0Imr2Qs3UJeuIaHP/KFjg/1kjOIxOhzk0AAZa/n
|
||||
mWBGzOcCJ8jRAhdWH9YHT93QwmKG4zaqxlmF6c7CrbgRVUJeh6kUlCJOiFXCkkNW
|
||||
Nu2fCOvh1+bMtmMsZsbb6IZeccyJOn4l+EqbzasX1egerbw2spC6ECMkhiZT6RRI
|
||||
mQQ2fmdYDAwn+CUIrYra2rxMqlAo9rRIp43A8kWyVfOAnUlljHhjyS02zmavrs8I
|
||||
9zyM1Fofu20q0Fk9ktX9vPZU6fqum2zbYFzBZkt/qYrAEiV9iCfztyws3+65qgYv
|
||||
dzw4jWM9oALzW2kCPD4GZOO7QpfPXjUec63bara+orO82Ifeq2qT7Zob+bBjd943
|
||||
A1skaO7X5Qhcfem1bdS3ZvgNMgwCqggNvXwbhDTY7Fk4zxCemjFI5JTe531wUKGt
|
||||
Kh1aAFQblAea6CmVC2GhhQ6Lmrnp1S+OyJaUIrT3ALW1sF1Iqy+wLVc6ltKH1fje
|
||||
57m2z/qmn9X28VF3de7Tg8mvDwgQthJWG/X9TYeLa7cHzJ3od3w+7I7jI3dMigdM
|
||||
RV2cSjUPE9UD9P1y+CYo
|
||||
=dR4B
|
||||
-----END PGP SIGNATURE-----
|
@@ -1,20 +0,0 @@
|
||||
%py_ver %(python -c "import sys; v=sys.version_info[:2]; print '%%d.%%d'%%v" 2>/dev/null || echo PYTHON-NOT-FOUND)
|
||||
%py_prefix %(python -c "import sys; print sys.prefix" 2>/dev/null || echo PYTHON-NOT-FOUND)
|
||||
%py_libdir %{py_prefix}/%{_lib}/python%{py_ver}
|
||||
%py_incdir %{py_prefix}/include/python%{py_ver}
|
||||
%py_sitedir %{py_libdir}/site-packages
|
||||
%__python2 /usr/bin/python2
|
||||
|
||||
%py_compile(O) \
|
||||
find %1 -name '*.pyc' -exec rm -f {} \\; \
|
||||
python -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \
|
||||
%{-O: \
|
||||
find %1 -name '*.pyo' -exec rm -f {} \\; \
|
||||
python -O -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \
|
||||
}
|
||||
%py_requires(d) \
|
||||
BuildRequires: /usr/bin/python %{-d:python-devel} \
|
||||
PreReq: python = %{py_ver}
|
||||
|
||||
%python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib();")
|
||||
%python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True);")
|
23
macros.python2
Normal file
23
macros.python2
Normal file
@@ -0,0 +1,23 @@
|
||||
# legacy macros. commented but kept for the sake of possible recovery of their values
|
||||
#%py_ver %(python -c "import sys; v=sys.version_info[:2]; print '%%d.%%d'%%v" 2>/dev/null || echo PYTHON-NOT-FOUND)
|
||||
#%py_prefix %(python -c "import sys; print sys.prefix" 2>/dev/null || echo PYTHON-NOT-FOUND)
|
||||
#%py_libdir %{py_prefix}/%{_lib}/python%{py_ver}
|
||||
#%py_incdir %{py_prefix}/include/python%{py_ver}
|
||||
#%py_sitedir %{py_libdir}/site-packages
|
||||
#%__python2 /usr/bin/python2
|
||||
|
||||
# these might be still in use somewhere
|
||||
%py_compile(O) \
|
||||
find %1 -name '*.pyc' -exec rm -f {} \\; \
|
||||
python -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \
|
||||
%{-O: \
|
||||
find %1 -name '*.pyo' -exec rm -f {} \\; \
|
||||
python -O -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \
|
||||
}
|
||||
%py_requires(d) \
|
||||
BuildRequires: /usr/bin/python %{-d:python-devel} \
|
||||
PreReq: python = %{py_ver}
|
||||
|
||||
# new-style macros relying on python-rpm-macros package
|
||||
%have_python2 1
|
||||
%python2_package_prefix python2
|
@@ -1,168 +0,0 @@
|
||||
--- ./Objects/bytearrayobject.c.orig 2016-01-29 13:58:55.414941897 +0100
|
||||
+++ ./Objects/bytearrayobject.c 2016-01-29 14:00:18.383902058 +0100
|
||||
@@ -1903,12 +1903,12 @@
|
||||
|
||||
/* Check for overflow */
|
||||
/* result_len = self_len + count * (to_len-from_len) */
|
||||
- product = count * (to_len-from_len);
|
||||
+ product = (size_t)count * (to_len-from_len);
|
||||
if (product / (to_len-from_len) != count) {
|
||||
PyErr_SetString(PyExc_OverflowError, "replace bytes is too long");
|
||||
return NULL;
|
||||
}
|
||||
- result_len = self_len + product;
|
||||
+ result_len = (size_t)self_len + product;
|
||||
if (result_len < 0) {
|
||||
PyErr_SetString(PyExc_OverflowError, "replace bytes is too long");
|
||||
return NULL;
|
||||
--- ./Objects/stringobject.c.orig 2016-01-29 14:00:30.904046945 +0100
|
||||
+++ ./Objects/stringobject.c 2016-01-29 14:01:14.120547063 +0100
|
||||
@@ -2693,12 +2693,12 @@
|
||||
|
||||
/* Check for overflow */
|
||||
/* result_len = self_len + count * (to_len-from_len) */
|
||||
- product = count * (to_len-from_len);
|
||||
+ product = (size_t)count * (to_len-from_len);
|
||||
if (product / (to_len-from_len) != count) {
|
||||
PyErr_SetString(PyExc_OverflowError, "replace string is too long");
|
||||
return NULL;
|
||||
}
|
||||
- result_len = self_len + product;
|
||||
+ result_len = (size_t)self_len + product;
|
||||
if (result_len < 0) {
|
||||
PyErr_SetString(PyExc_OverflowError, "replace string is too long");
|
||||
return NULL;
|
||||
--- Objects/bytearrayobject.c.orig 2016-01-29 14:14:36.713834152 +0100
|
||||
+++ Objects/bytearrayobject.c 2016-01-29 14:17:50.880080712 +0100
|
||||
@@ -357,7 +357,7 @@
|
||||
if (count < 0)
|
||||
count = 0;
|
||||
mysize = Py_SIZE(self);
|
||||
- size = mysize * count;
|
||||
+ size = (size_t)mysize * count;
|
||||
if (count != 0 && size / count != mysize)
|
||||
return PyErr_NoMemory();
|
||||
result = (PyByteArrayObject *)PyByteArray_FromStringAndSize(NULL, size);
|
||||
@@ -382,7 +382,7 @@
|
||||
if (count < 0)
|
||||
count = 0;
|
||||
mysize = Py_SIZE(self);
|
||||
- size = mysize * count;
|
||||
+ size = (size_t)mysize * count;
|
||||
if (count != 0 && size / count != mysize)
|
||||
return PyErr_NoMemory();
|
||||
if (size < self->ob_alloc) {
|
||||
@@ -1578,13 +1578,13 @@
|
||||
|
||||
/* Check for overflow */
|
||||
/* result_len = count * to_len + self_len; */
|
||||
- product = count * to_len;
|
||||
+ product = (size_t)count * to_len;
|
||||
if (product / to_len != count) {
|
||||
PyErr_SetString(PyExc_OverflowError,
|
||||
"replace string is too long");
|
||||
return NULL;
|
||||
}
|
||||
- result_len = product + self_len;
|
||||
+ result_len = (size_t)product + self_len;
|
||||
if (result_len < 0) {
|
||||
PyErr_SetString(PyExc_OverflowError,
|
||||
"replace string is too long");
|
||||
@@ -1833,12 +1833,12 @@
|
||||
|
||||
/* use the difference between current and new, hence the "-1" */
|
||||
/* result_len = self_len + count * (to_len-1) */
|
||||
- product = count * (to_len-1);
|
||||
+ product = (size_t)count * (to_len-1);
|
||||
if (product / (to_len-1) != count) {
|
||||
PyErr_SetString(PyExc_OverflowError, "replace bytes is too long");
|
||||
return NULL;
|
||||
}
|
||||
- result_len = self_len + product;
|
||||
+ result_len = (size_t)self_len + product;
|
||||
if (result_len < 0) {
|
||||
PyErr_SetString(PyExc_OverflowError, "replace bytes is too long");
|
||||
return NULL;
|
||||
--- ./Objects/stringobject.c.orig 2016-01-29 14:18:21.392433741 +0100
|
||||
+++ ./Objects/stringobject.c 2016-01-29 14:20:23.669848479 +0100
|
||||
@@ -1084,7 +1084,7 @@
|
||||
/* watch out for overflows: the size can overflow int,
|
||||
* and the # of bytes needed can overflow size_t
|
||||
*/
|
||||
- size = Py_SIZE(a) * n;
|
||||
+ size = (size_t)Py_SIZE(a) * n;
|
||||
if (n && size / n != Py_SIZE(a)) {
|
||||
PyErr_SetString(PyExc_OverflowError,
|
||||
"repeated string is too long");
|
||||
@@ -1644,9 +1644,9 @@
|
||||
Py_DECREF(seq);
|
||||
return NULL;
|
||||
}
|
||||
- sz += PyString_GET_SIZE(item);
|
||||
+ sz += (size_t)PyString_GET_SIZE(item);
|
||||
if (i != 0)
|
||||
- sz += seplen;
|
||||
+ sz += (size_t)seplen;
|
||||
if (sz < old_sz || sz > PY_SSIZE_T_MAX) {
|
||||
PyErr_SetString(PyExc_OverflowError,
|
||||
"join() result is too long for a Python string");
|
||||
@@ -2370,13 +2370,13 @@
|
||||
|
||||
/* Check for overflow */
|
||||
/* result_len = count * to_len + self_len; */
|
||||
- product = count * to_len;
|
||||
+ product = (size_t)count * to_len;
|
||||
if (product / to_len != count) {
|
||||
PyErr_SetString(PyExc_OverflowError,
|
||||
"replace string is too long");
|
||||
return NULL;
|
||||
}
|
||||
- result_len = product + self_len;
|
||||
+ result_len = (size_t)product + self_len;
|
||||
if (result_len < 0) {
|
||||
PyErr_SetString(PyExc_OverflowError,
|
||||
"replace string is too long");
|
||||
@@ -2624,12 +2624,12 @@
|
||||
|
||||
/* use the difference between current and new, hence the "-1" */
|
||||
/* result_len = self_len + count * (to_len-1) */
|
||||
- product = count * (to_len-1);
|
||||
+ product = (size_t)count * (to_len-1);
|
||||
if (product / (to_len-1) != count) {
|
||||
PyErr_SetString(PyExc_OverflowError, "replace string is too long");
|
||||
return NULL;
|
||||
}
|
||||
- result_len = self_len + product;
|
||||
+ result_len = (size_t)self_len + product;
|
||||
if (result_len < 0) {
|
||||
PyErr_SetString(PyExc_OverflowError, "replace string is too long");
|
||||
return NULL;
|
||||
--- Objects/tupleobject.c.orig 2016-01-29 14:38:23.334287970 +0100
|
||||
+++ Objects/tupleobject.c 2016-01-29 14:39:46.175240404 +0100
|
||||
@@ -79,7 +79,7 @@
|
||||
else
|
||||
#endif
|
||||
{
|
||||
- Py_ssize_t nbytes = size * sizeof(PyObject *);
|
||||
+ Py_ssize_t nbytes = (size_t)size * sizeof(PyObject *);
|
||||
/* Check for overflow */
|
||||
if (nbytes / sizeof(PyObject *) != (size_t)size ||
|
||||
(nbytes > PY_SSIZE_T_MAX - sizeof(PyTupleObject) - sizeof(PyObject *)))
|
||||
@@ -446,7 +446,7 @@
|
||||
return NULL;
|
||||
}
|
||||
#define b ((PyTupleObject *)bb)
|
||||
- size = Py_SIZE(a) + Py_SIZE(b);
|
||||
+ size = (size_t)Py_SIZE(a) + Py_SIZE(b);
|
||||
if (size < 0)
|
||||
return PyErr_NoMemory();
|
||||
np = (PyTupleObject *) PyTuple_New(size);
|
||||
@@ -490,7 +490,7 @@
|
||||
if (Py_SIZE(a) == 0)
|
||||
return PyTuple_New(0);
|
||||
}
|
||||
- size = Py_SIZE(a) * n;
|
||||
+ size = (size_t)Py_SIZE(a) * n;
|
||||
if (size/Py_SIZE(a) != n)
|
||||
return PyErr_NoMemory();
|
||||
np = (PyTupleObject *) PyTuple_New(size);
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7598a5e9f1bff3ca8b27834fa4cb9e88ad44a1a64e01c261bf84fa7b76ea8307
|
||||
size 10676602
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:02eb305c62e04e5b9f583a281909546eeb5a0a93c567ecc0fe86680a249121f7
|
||||
size 10731532
|
3
python-2.7.13-docs-pdf-a4.tar.bz2
Normal file
3
python-2.7.13-docs-pdf-a4.tar.bz2
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:cba0fce8f70444fe87405efcf005a0ea408935cbb859862eda3bd2df1177b0ce
|
||||
size 10712181
|
3
python-2.7.13-docs-pdf-letter.tar.bz2
Normal file
3
python-2.7.13-docs-pdf-letter.tar.bz2
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:65832a14df4aa8dc2887e294de4d8abefbc4c9466af12a0b8315acf6faec7d8a
|
||||
size 10768393
|
300
python-2.7.13-overflow_check.patch
Normal file
300
python-2.7.13-overflow_check.patch
Normal file
@@ -0,0 +1,300 @@
|
||||
Index: Python-2.7.13/Objects/unicodeobject.c
|
||||
===================================================================
|
||||
--- Python-2.7.13.orig/Objects/unicodeobject.c
|
||||
+++ Python-2.7.13/Objects/unicodeobject.c
|
||||
@@ -5732,20 +5732,20 @@ PyUnicode_Join(PyObject *separator, PyOb
|
||||
|
||||
/* Make sure we have enough space for the separator and the item. */
|
||||
itemlen = PyUnicode_GET_SIZE(item);
|
||||
- new_res_used = res_used + itemlen;
|
||||
- if (new_res_used < 0)
|
||||
+ if (res_used > PY_SSIZE_T_MAX - itemlen)
|
||||
goto Overflow;
|
||||
+ new_res_used = res_used + itemlen;
|
||||
if (i < seqlen - 1) {
|
||||
- new_res_used += seplen;
|
||||
- if (new_res_used < 0)
|
||||
+ if (new_res_used > PY_SSIZE_T_MAX - seplen)
|
||||
goto Overflow;
|
||||
+ new_res_used += seplen;
|
||||
}
|
||||
if (new_res_used > res_alloc) {
|
||||
/* double allocated size until it's big enough */
|
||||
do {
|
||||
- res_alloc += res_alloc;
|
||||
- if (res_alloc <= 0)
|
||||
+ if (res_alloc >= PY_SSIZE_T_MAX - res_alloc)
|
||||
goto Overflow;
|
||||
+ res_alloc += res_alloc;
|
||||
} while (new_res_used > res_alloc);
|
||||
if (_PyUnicode_Resize(&res, res_alloc) < 0) {
|
||||
Py_DECREF(item);
|
||||
@@ -5943,7 +5943,7 @@ PyObject *replace(PyUnicodeObject *self,
|
||||
} else {
|
||||
|
||||
Py_ssize_t n, i, j;
|
||||
- Py_ssize_t product, new_size, delta;
|
||||
+ Py_ssize_t new_size, delta;
|
||||
Py_UNICODE *p;
|
||||
|
||||
/* replace strings */
|
||||
@@ -5956,18 +5956,12 @@ PyObject *replace(PyUnicodeObject *self,
|
||||
if (delta == 0) {
|
||||
new_size = self->length;
|
||||
} else {
|
||||
- product = n * (str2->length - str1->length);
|
||||
- if ((product / (str2->length - str1->length)) != n) {
|
||||
- PyErr_SetString(PyExc_OverflowError,
|
||||
- "replace string is too long");
|
||||
- return NULL;
|
||||
- }
|
||||
- new_size = self->length + product;
|
||||
- if (new_size < 0) {
|
||||
+ if (str2->length - str1->length > (PY_SSIZE_T_MAX - self->length) / n) {
|
||||
PyErr_SetString(PyExc_OverflowError,
|
||||
"replace string is too long");
|
||||
return NULL;
|
||||
}
|
||||
+ new_size = self->length + n * (str2->length - str1->length);
|
||||
}
|
||||
u = _PyUnicode_New(new_size);
|
||||
if (!u)
|
||||
Index: Python-2.7.13/Objects/tupleobject.c
|
||||
===================================================================
|
||||
--- Python-2.7.13.orig/Objects/tupleobject.c
|
||||
+++ Python-2.7.13/Objects/tupleobject.c
|
||||
@@ -446,9 +446,9 @@ tupleconcat(register PyTupleObject *a, r
|
||||
return NULL;
|
||||
}
|
||||
#define b ((PyTupleObject *)bb)
|
||||
- size = Py_SIZE(a) + Py_SIZE(b);
|
||||
- if (size < 0)
|
||||
+ if (Py_SIZE(a) > PY_SSIZE_T_MAX - Py_SIZE(b))
|
||||
return PyErr_NoMemory();
|
||||
+ size = Py_SIZE(a) + Py_SIZE(b);
|
||||
np = (PyTupleObject *) PyTuple_New(size);
|
||||
if (np == NULL) {
|
||||
return NULL;
|
||||
@@ -490,9 +490,9 @@ tuplerepeat(PyTupleObject *a, Py_ssize_t
|
||||
if (Py_SIZE(a) == 0)
|
||||
return PyTuple_New(0);
|
||||
}
|
||||
- size = Py_SIZE(a) * n;
|
||||
- if (size/Py_SIZE(a) != n)
|
||||
+ if (n > PY_SSIZE_T_MAX / Py_SIZE(a))
|
||||
return PyErr_NoMemory();
|
||||
+ size = Py_SIZE(a) * n;
|
||||
np = (PyTupleObject *) PyTuple_New(size);
|
||||
if (np == NULL)
|
||||
return NULL;
|
||||
diff -r 5ea0fef6ec53 Objects/bytearrayobject.c
|
||||
--- a/Objects/bytearrayobject.c Wed Dec 28 15:41:09 2016 -0800
|
||||
+++ b/Objects/bytearrayobject.c Thu Jan 05 14:05:29 2017 +0800
|
||||
@@ -1571,31 +1571,30 @@
|
||||
{
|
||||
char *self_s, *result_s;
|
||||
Py_ssize_t self_len, result_len;
|
||||
- Py_ssize_t count, i, product;
|
||||
+ Py_ssize_t count, i;
|
||||
PyByteArrayObject *result;
|
||||
|
||||
self_len = PyByteArray_GET_SIZE(self);
|
||||
|
||||
- /* 1 at the end plus 1 after every character */
|
||||
- count = self_len+1;
|
||||
- if (maxcount < count)
|
||||
+ /* 1 at the end plus 1 after every character;
|
||||
+ count = min(maxcount, self_len + 1) */
|
||||
+ if (maxcount <= self_len) {
|
||||
count = maxcount;
|
||||
+ }
|
||||
+ else {
|
||||
+ /* Can't overflow: self_len + 1 <= maxcount <= PY_SSIZE_T_MAX. */
|
||||
+ count = self_len + 1;
|
||||
+ }
|
||||
|
||||
/* Check for overflow */
|
||||
/* result_len = count * to_len + self_len; */
|
||||
- product = count * to_len;
|
||||
- if (product / to_len != count) {
|
||||
+ assert(count > 0);
|
||||
+ if (to_len > (PY_SSIZE_T_MAX - self_len) / count) {
|
||||
PyErr_SetString(PyExc_OverflowError,
|
||||
- "replace string is too long");
|
||||
+ "replace bytes is too long");
|
||||
return NULL;
|
||||
}
|
||||
- result_len = product + self_len;
|
||||
- if (result_len < 0) {
|
||||
- PyErr_SetString(PyExc_OverflowError,
|
||||
- "replace string is too long");
|
||||
- return NULL;
|
||||
- }
|
||||
-
|
||||
+ result_len = count * to_len + self_len;
|
||||
if (! (result = (PyByteArrayObject *)
|
||||
PyByteArray_FromStringAndSize(NULL, result_len)) )
|
||||
return NULL;
|
||||
@@ -1824,7 +1823,7 @@
|
||||
char *self_s, *result_s;
|
||||
char *start, *next, *end;
|
||||
Py_ssize_t self_len, result_len;
|
||||
- Py_ssize_t count, product;
|
||||
+ Py_ssize_t count;
|
||||
PyByteArrayObject *result;
|
||||
|
||||
self_s = PyByteArray_AS_STRING(self);
|
||||
@@ -1838,16 +1837,12 @@
|
||||
|
||||
/* use the difference between current and new, hence the "-1" */
|
||||
/* result_len = self_len + count * (to_len-1) */
|
||||
- product = count * (to_len-1);
|
||||
- if (product / (to_len-1) != count) {
|
||||
+ assert(count > 0);
|
||||
+ if (to_len - 1 > (PY_SSIZE_T_MAX - self_len) / count) {
|
||||
PyErr_SetString(PyExc_OverflowError, "replace bytes is too long");
|
||||
return NULL;
|
||||
}
|
||||
- result_len = self_len + product;
|
||||
- if (result_len < 0) {
|
||||
- PyErr_SetString(PyExc_OverflowError, "replace bytes is too long");
|
||||
- return NULL;
|
||||
- }
|
||||
+ result_len = self_len + count * (to_len - 1);
|
||||
|
||||
if ( (result = (PyByteArrayObject *)
|
||||
PyByteArray_FromStringAndSize(NULL, result_len)) == NULL)
|
||||
@@ -1891,7 +1886,7 @@
|
||||
char *self_s, *result_s;
|
||||
char *start, *next, *end;
|
||||
Py_ssize_t self_len, result_len;
|
||||
- Py_ssize_t count, offset, product;
|
||||
+ Py_ssize_t count, offset;
|
||||
PyByteArrayObject *result;
|
||||
|
||||
self_s = PyByteArray_AS_STRING(self);
|
||||
@@ -1908,16 +1903,12 @@
|
||||
|
||||
/* Check for overflow */
|
||||
/* result_len = self_len + count * (to_len-from_len) */
|
||||
- product = count * (to_len-from_len);
|
||||
- if (product / (to_len-from_len) != count) {
|
||||
+ assert(count > 0);
|
||||
+ if (to_len - from_len > (PY_SSIZE_T_MAX - self_len) / count) {
|
||||
PyErr_SetString(PyExc_OverflowError, "replace bytes is too long");
|
||||
return NULL;
|
||||
}
|
||||
- result_len = self_len + product;
|
||||
- if (result_len < 0) {
|
||||
- PyErr_SetString(PyExc_OverflowError, "replace bytes is too long");
|
||||
- return NULL;
|
||||
- }
|
||||
+ result_len = self_len + count * (to_len - from_len);
|
||||
|
||||
if ( (result = (PyByteArrayObject *)
|
||||
PyByteArray_FromStringAndSize(NULL, result_len)) == NULL)
|
||||
diff -r 5ea0fef6ec53 Objects/stringobject.c
|
||||
--- a/Objects/stringobject.c Wed Dec 28 15:41:09 2016 -0800
|
||||
+++ b/Objects/stringobject.c Thu Jan 05 14:05:29 2017 +0800
|
||||
@@ -2358,31 +2358,30 @@
|
||||
{
|
||||
char *self_s, *result_s;
|
||||
Py_ssize_t self_len, result_len;
|
||||
- Py_ssize_t count, i, product;
|
||||
+ Py_ssize_t count, i;
|
||||
PyStringObject *result;
|
||||
|
||||
self_len = PyString_GET_SIZE(self);
|
||||
|
||||
- /* 1 at the end plus 1 after every character */
|
||||
- count = self_len+1;
|
||||
- if (maxcount < count)
|
||||
+ /* 1 at the end plus 1 after every character;
|
||||
+ count = min(maxcount, self_len + 1) */
|
||||
+ if (maxcount <= self_len) {
|
||||
count = maxcount;
|
||||
+ }
|
||||
+ else {
|
||||
+ /* Can't overflow: self_len + 1 <= maxcount <= PY_SSIZE_T_MAX. */
|
||||
+ count = self_len + 1;
|
||||
+ }
|
||||
|
||||
/* Check for overflow */
|
||||
/* result_len = count * to_len + self_len; */
|
||||
- product = count * to_len;
|
||||
- if (product / to_len != count) {
|
||||
+ assert(count > 0);
|
||||
+ if (to_len > (PY_SSIZE_T_MAX - self_len) / count) {
|
||||
PyErr_SetString(PyExc_OverflowError,
|
||||
"replace string is too long");
|
||||
return NULL;
|
||||
}
|
||||
- result_len = product + self_len;
|
||||
- if (result_len < 0) {
|
||||
- PyErr_SetString(PyExc_OverflowError,
|
||||
- "replace string is too long");
|
||||
- return NULL;
|
||||
- }
|
||||
-
|
||||
+ result_len = count * to_len + self_len;
|
||||
if (! (result = (PyStringObject *)
|
||||
PyString_FromStringAndSize(NULL, result_len)) )
|
||||
return NULL;
|
||||
@@ -2610,7 +2609,7 @@
|
||||
char *self_s, *result_s;
|
||||
char *start, *next, *end;
|
||||
Py_ssize_t self_len, result_len;
|
||||
- Py_ssize_t count, product;
|
||||
+ Py_ssize_t count;
|
||||
PyStringObject *result;
|
||||
|
||||
self_s = PyString_AS_STRING(self);
|
||||
@@ -2624,16 +2623,12 @@
|
||||
|
||||
/* use the difference between current and new, hence the "-1" */
|
||||
/* result_len = self_len + count * (to_len-1) */
|
||||
- product = count * (to_len-1);
|
||||
- if (product / (to_len-1) != count) {
|
||||
+ assert(count > 0);
|
||||
+ if (to_len - 1 > (PY_SSIZE_T_MAX - self_len) / count) {
|
||||
PyErr_SetString(PyExc_OverflowError, "replace string is too long");
|
||||
return NULL;
|
||||
}
|
||||
- result_len = self_len + product;
|
||||
- if (result_len < 0) {
|
||||
- PyErr_SetString(PyExc_OverflowError, "replace string is too long");
|
||||
- return NULL;
|
||||
- }
|
||||
+ result_len = self_len + count * (to_len - 1);
|
||||
|
||||
if ( (result = (PyStringObject *)
|
||||
PyString_FromStringAndSize(NULL, result_len)) == NULL)
|
||||
@@ -2676,7 +2671,7 @@
|
||||
char *self_s, *result_s;
|
||||
char *start, *next, *end;
|
||||
Py_ssize_t self_len, result_len;
|
||||
- Py_ssize_t count, offset, product;
|
||||
+ Py_ssize_t count, offset;
|
||||
PyStringObject *result;
|
||||
|
||||
self_s = PyString_AS_STRING(self);
|
||||
@@ -2693,16 +2688,12 @@
|
||||
|
||||
/* Check for overflow */
|
||||
/* result_len = self_len + count * (to_len-from_len) */
|
||||
- product = count * (to_len-from_len);
|
||||
- if (product / (to_len-from_len) != count) {
|
||||
+ assert(count > 0);
|
||||
+ if (to_len - from_len > (PY_SSIZE_T_MAX - self_len) / count) {
|
||||
PyErr_SetString(PyExc_OverflowError, "replace string is too long");
|
||||
return NULL;
|
||||
}
|
||||
- result_len = self_len + product;
|
||||
- if (result_len < 0) {
|
||||
- PyErr_SetString(PyExc_OverflowError, "replace string is too long");
|
||||
- return NULL;
|
||||
- }
|
||||
+ result_len = self_len + count * (to_len - from_len);
|
||||
|
||||
if ( (result = (PyStringObject *)
|
||||
PyString_FromStringAndSize(NULL, result_len)) == NULL)
|
@@ -1,8 +1,8 @@
|
||||
Index: Python-2.7.12/configure.ac
|
||||
Index: Python-2.7.13/configure.ac
|
||||
===================================================================
|
||||
--- Python-2.7.12.orig/configure.ac
|
||||
+++ Python-2.7.12/configure.ac
|
||||
@@ -756,6 +756,41 @@ SunOS*)
|
||||
--- Python-2.7.13.orig/configure.ac
|
||||
+++ Python-2.7.13/configure.ac
|
||||
@@ -759,6 +759,41 @@ SunOS*)
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -44,10 +44,10 @@ Index: Python-2.7.12/configure.ac
|
||||
|
||||
AC_SUBST(LIBRARY)
|
||||
AC_MSG_CHECKING(LIBRARY)
|
||||
Index: Python-2.7.12/Include/pythonrun.h
|
||||
Index: Python-2.7.13/Include/pythonrun.h
|
||||
===================================================================
|
||||
--- Python-2.7.12.orig/Include/pythonrun.h
|
||||
+++ Python-2.7.12/Include/pythonrun.h
|
||||
--- Python-2.7.13.orig/Include/pythonrun.h
|
||||
+++ Python-2.7.13/Include/pythonrun.h
|
||||
@@ -108,6 +108,8 @@ PyAPI_FUNC(char *) Py_GetPath(void);
|
||||
/* In their own files */
|
||||
PyAPI_FUNC(const char *) Py_GetVersion(void);
|
||||
@@ -57,10 +57,10 @@ Index: Python-2.7.12/Include/pythonrun.h
|
||||
PyAPI_FUNC(const char *) Py_GetCopyright(void);
|
||||
PyAPI_FUNC(const char *) Py_GetCompiler(void);
|
||||
PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
|
||||
Index: Python-2.7.12/Lib/distutils/command/install.py
|
||||
Index: Python-2.7.13/Lib/distutils/command/install.py
|
||||
===================================================================
|
||||
--- Python-2.7.12.orig/Lib/distutils/command/install.py
|
||||
+++ Python-2.7.12/Lib/distutils/command/install.py
|
||||
--- Python-2.7.13.orig/Lib/distutils/command/install.py
|
||||
+++ Python-2.7.13/Lib/distutils/command/install.py
|
||||
@@ -22,6 +22,8 @@ from site import USER_BASE
|
||||
from site import USER_SITE
|
||||
|
||||
@@ -79,10 +79,10 @@ Index: Python-2.7.12/Lib/distutils/command/install.py
|
||||
'headers': '$base/include/python$py_version_short/$dist_name',
|
||||
'scripts': '$base/bin',
|
||||
'data' : '$base',
|
||||
Index: Python-2.7.12/Lib/distutils/sysconfig.py
|
||||
Index: Python-2.7.13/Lib/distutils/sysconfig.py
|
||||
===================================================================
|
||||
--- Python-2.7.12.orig/Lib/distutils/sysconfig.py
|
||||
+++ Python-2.7.12/Lib/distutils/sysconfig.py
|
||||
--- Python-2.7.13.orig/Lib/distutils/sysconfig.py
|
||||
+++ Python-2.7.13/Lib/distutils/sysconfig.py
|
||||
@@ -119,8 +119,11 @@ def get_python_lib(plat_specific=0, stan
|
||||
prefix = plat_specific and EXEC_PREFIX or PREFIX
|
||||
|
||||
@@ -97,23 +97,23 @@ Index: Python-2.7.12/Lib/distutils/sysconfig.py
|
||||
if standard_lib:
|
||||
return libpython
|
||||
else:
|
||||
Index: Python-2.7.12/Lib/pydoc.py
|
||||
Index: Python-2.7.13/Lib/pydoc.py
|
||||
===================================================================
|
||||
--- Python-2.7.12.orig/Lib/pydoc.py
|
||||
+++ Python-2.7.12/Lib/pydoc.py
|
||||
@@ -384,7 +384,7 @@ class Doc:
|
||||
--- Python-2.7.13.orig/Lib/pydoc.py
|
||||
+++ Python-2.7.13/Lib/pydoc.py
|
||||
@@ -375,7 +375,7 @@ class Doc:
|
||||
docmodule = docclass = docroutine = docother = docproperty = docdata = fail
|
||||
|
||||
docloc = os.environ.get("PYTHONDOCS",
|
||||
"http://docs.python.org/library")
|
||||
- basedir = os.path.join(sys.exec_prefix, "lib",
|
||||
+ basedir = os.path.join(sys.exec_prefix, sys.lib,
|
||||
"python"+sys.version[0:3])
|
||||
if (isinstance(object, type(os)) and
|
||||
(object.__name__ in ('errno', 'exceptions', 'gc', 'imp',
|
||||
Index: Python-2.7.12/Lib/site.py
|
||||
def getdocloc(self, object,
|
||||
- basedir=os.path.join(sys.exec_prefix, "lib",
|
||||
+ basedir=os.path.join(sys.exec_prefix, sys.lib,
|
||||
"python"+sys.version[0:3])):
|
||||
"""Return the location of module docs or None"""
|
||||
|
||||
Index: Python-2.7.13/Lib/site.py
|
||||
===================================================================
|
||||
--- Python-2.7.12.orig/Lib/site.py
|
||||
+++ Python-2.7.12/Lib/site.py
|
||||
--- Python-2.7.13.orig/Lib/site.py
|
||||
+++ Python-2.7.13/Lib/site.py
|
||||
@@ -231,29 +231,38 @@ def getuserbase():
|
||||
USER_BASE = get_config_var('userbase')
|
||||
return USER_BASE
|
||||
@@ -194,13 +194,13 @@ Index: Python-2.7.12/Lib/site.py
|
||||
sitepackages.append(prefix)
|
||||
- sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
|
||||
+ sitepackages.append(os.path.join(prefix, sys.lib, "site-packages"))
|
||||
if sys.platform == "darwin":
|
||||
# for framework builds *only* we add the standard Apple
|
||||
# locations.
|
||||
Index: Python-2.7.12/Lib/sysconfig.py
|
||||
return sitepackages
|
||||
|
||||
def addsitepackages(known_paths):
|
||||
Index: Python-2.7.13/Lib/sysconfig.py
|
||||
===================================================================
|
||||
--- Python-2.7.12.orig/Lib/sysconfig.py
|
||||
+++ Python-2.7.12/Lib/sysconfig.py
|
||||
--- Python-2.7.13.orig/Lib/sysconfig.py
|
||||
+++ Python-2.7.13/Lib/sysconfig.py
|
||||
@@ -7,10 +7,10 @@ from os.path import pardir, realpath
|
||||
|
||||
_INSTALL_SCHEMES = {
|
||||
@@ -229,10 +229,10 @@ Index: Python-2.7.12/Lib/sysconfig.py
|
||||
'include': '{userbase}/include/python{py_version_short}',
|
||||
'scripts': '{userbase}/bin',
|
||||
'data' : '{userbase}',
|
||||
Index: Python-2.7.12/Lib/test/test_dl.py
|
||||
Index: Python-2.7.13/Lib/test/test_dl.py
|
||||
===================================================================
|
||||
--- Python-2.7.12.orig/Lib/test/test_dl.py
|
||||
+++ Python-2.7.12/Lib/test/test_dl.py
|
||||
--- Python-2.7.13.orig/Lib/test/test_dl.py
|
||||
+++ Python-2.7.13/Lib/test/test_dl.py
|
||||
@@ -4,10 +4,11 @@
|
||||
import unittest
|
||||
from test.test_support import verbose, import_module
|
||||
@@ -247,14 +247,14 @@ Index: Python-2.7.12/Lib/test/test_dl.py
|
||||
('/usr/bin/cygwin1.dll', 'getpid'),
|
||||
('/usr/lib/libc.dylib', 'getpid'),
|
||||
]
|
||||
Index: Python-2.7.12/Lib/test/test_site.py
|
||||
Index: Python-2.7.13/Lib/test/test_site.py
|
||||
===================================================================
|
||||
--- Python-2.7.12.orig/Lib/test/test_site.py
|
||||
+++ Python-2.7.12/Lib/test/test_site.py
|
||||
@@ -246,12 +246,16 @@ class HelperFunctionsTests(unittest.Test
|
||||
self.assertEqual(dirs[2], wanted)
|
||||
--- Python-2.7.13.orig/Lib/test/test_site.py
|
||||
+++ Python-2.7.13/Lib/test/test_site.py
|
||||
@@ -235,12 +235,16 @@ class HelperFunctionsTests(unittest.Test
|
||||
self.assertEqual(dirs[0], wanted)
|
||||
elif os.sep == '/':
|
||||
# OS X non-framwework builds, Linux, FreeBSD, etc
|
||||
# OS X, Linux, FreeBSD, etc
|
||||
- self.assertEqual(len(dirs), 2)
|
||||
wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
|
||||
'site-packages')
|
||||
@@ -271,10 +271,10 @@ Index: Python-2.7.12/Lib/test/test_site.py
|
||||
else:
|
||||
# other platforms
|
||||
self.assertEqual(len(dirs), 2)
|
||||
Index: Python-2.7.12/Lib/trace.py
|
||||
Index: Python-2.7.13/Lib/trace.py
|
||||
===================================================================
|
||||
--- Python-2.7.12.orig/Lib/trace.py
|
||||
+++ Python-2.7.12/Lib/trace.py
|
||||
--- Python-2.7.13.orig/Lib/trace.py
|
||||
+++ Python-2.7.13/Lib/trace.py
|
||||
@@ -754,10 +754,10 @@ def main(argv=None):
|
||||
# should I also call expanduser? (after all, could use $HOME)
|
||||
|
||||
@@ -288,10 +288,10 @@ Index: Python-2.7.12/Lib/trace.py
|
||||
"python" + sys.version[:3]))
|
||||
s = os.path.normpath(s)
|
||||
ignore_dirs.append(s)
|
||||
Index: Python-2.7.12/Makefile.pre.in
|
||||
Index: Python-2.7.13/Makefile.pre.in
|
||||
===================================================================
|
||||
--- Python-2.7.12.orig/Makefile.pre.in
|
||||
+++ Python-2.7.12/Makefile.pre.in
|
||||
--- Python-2.7.13.orig/Makefile.pre.in
|
||||
+++ Python-2.7.13/Makefile.pre.in
|
||||
@@ -92,6 +92,8 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG
|
||||
|
||||
# Machine-dependent subdirectories
|
||||
@@ -301,7 +301,7 @@ Index: Python-2.7.12/Makefile.pre.in
|
||||
|
||||
# Multiarch directory (may be empty)
|
||||
MULTIARCH= @MULTIARCH@
|
||||
@@ -669,6 +671,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
|
||||
@@ -668,6 +670,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
|
||||
-DEXEC_PREFIX='"$(exec_prefix)"' \
|
||||
-DVERSION='"$(VERSION)"' \
|
||||
-DVPATH='"$(VPATH)"' \
|
||||
@@ -309,7 +309,7 @@ Index: Python-2.7.12/Makefile.pre.in
|
||||
-o $@ $(srcdir)/Modules/getpath.c
|
||||
|
||||
Modules/python.o: $(srcdir)/Modules/python.c
|
||||
@@ -720,7 +723,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES)
|
||||
@@ -708,7 +711,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES)
|
||||
Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
|
||||
|
||||
Python/getplatform.o: $(srcdir)/Python/getplatform.c
|
||||
@@ -318,10 +318,10 @@ Index: Python-2.7.12/Makefile.pre.in
|
||||
|
||||
Python/importdl.o: $(srcdir)/Python/importdl.c
|
||||
$(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
|
||||
Index: Python-2.7.12/Modules/getpath.c
|
||||
Index: Python-2.7.13/Modules/getpath.c
|
||||
===================================================================
|
||||
--- Python-2.7.12.orig/Modules/getpath.c
|
||||
+++ Python-2.7.12/Modules/getpath.c
|
||||
--- Python-2.7.13.orig/Modules/getpath.c
|
||||
+++ Python-2.7.13/Modules/getpath.c
|
||||
@@ -100,6 +100,8 @@
|
||||
#error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined"
|
||||
#endif
|
||||
@@ -340,10 +340,10 @@ Index: Python-2.7.12/Modules/getpath.c
|
||||
|
||||
static void
|
||||
reduce(char *dir)
|
||||
Index: Python-2.7.12/Python/getplatform.c
|
||||
Index: Python-2.7.13/Python/getplatform.c
|
||||
===================================================================
|
||||
--- Python-2.7.12.orig/Python/getplatform.c
|
||||
+++ Python-2.7.12/Python/getplatform.c
|
||||
--- Python-2.7.13.orig/Python/getplatform.c
|
||||
+++ Python-2.7.13/Python/getplatform.c
|
||||
@@ -10,3 +10,23 @@ Py_GetPlatform(void)
|
||||
{
|
||||
return PLATFORM;
|
||||
@@ -368,10 +368,10 @@ Index: Python-2.7.12/Python/getplatform.c
|
||||
+{
|
||||
+ return LIB;
|
||||
+}
|
||||
Index: Python-2.7.12/Python/sysmodule.c
|
||||
Index: Python-2.7.13/Python/sysmodule.c
|
||||
===================================================================
|
||||
--- Python-2.7.12.orig/Python/sysmodule.c
|
||||
+++ Python-2.7.12/Python/sysmodule.c
|
||||
--- Python-2.7.13.orig/Python/sysmodule.c
|
||||
+++ Python-2.7.13/Python/sysmodule.c
|
||||
@@ -1437,6 +1437,10 @@ _PySys_Init(void)
|
||||
PyString_FromString(Py_GetCopyright()));
|
||||
SET_SYS_FROM_STRING("platform",
|
||||
@@ -383,10 +383,10 @@ Index: Python-2.7.12/Python/sysmodule.c
|
||||
SET_SYS_FROM_STRING("executable",
|
||||
PyString_FromString(Py_GetProgramFullPath()));
|
||||
SET_SYS_FROM_STRING("prefix",
|
||||
Index: Python-2.7.12/setup.py
|
||||
Index: Python-2.7.13/setup.py
|
||||
===================================================================
|
||||
--- Python-2.7.12.orig/setup.py
|
||||
+++ Python-2.7.12/setup.py
|
||||
--- Python-2.7.13.orig/setup.py
|
||||
+++ Python-2.7.13/setup.py
|
||||
@@ -456,7 +456,7 @@ class PyBuildExt(build_ext):
|
||||
def detect_modules(self):
|
||||
# Ensure that /usr/local is always used
|
||||
|
@@ -1,3 +1,25 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 3 16:59:24 UTC 2017 - jmatejek@suse.com
|
||||
|
||||
- update to 2.7.13
|
||||
* dozens of bugfixes, see NEWS for details
|
||||
* updated cipher lists for openssl wrapper, support openssl >= 1.1.0
|
||||
* properly fix HTTPoxy (CVE-2016-1000110)
|
||||
* profile-opt build now applies PGO to modules as well
|
||||
- update python-2.7.10-overflow_check.patch
|
||||
with python-2.7.13-overflow_check.patch, incorporating upstream changes
|
||||
- add "-fwrapv" to optflags explicitly because upstream code still
|
||||
relies on it in many places
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 2 15:32:59 UTC 2016 - jmatejek@suse.com
|
||||
|
||||
- provide python2-* symbols, for support of new packages built as
|
||||
python2-foo
|
||||
- rename macros.python to macros.python2 accordingly
|
||||
- require python-rpm-macros package, drop macro definitions from
|
||||
macros.python2
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 30 09:23:05 UTC 2016 - jmatejek@suse.com
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-base
|
||||
#
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
Name: python-base
|
||||
Version: 2.7.12
|
||||
Version: 2.7.13
|
||||
Release: 0
|
||||
Summary: Python Interpreter base package
|
||||
License: Python-2.0
|
||||
@@ -28,7 +28,7 @@ Url: http://www.python.org/
|
||||
Source0: http://www.python.org/ftp/python/%{version}/%{tarname}.tar.xz
|
||||
Source4: http://www.python.org/ftp/python/%{version}/%{tarname}.tar.xz.asc
|
||||
Source6: python.keyring
|
||||
Source1: macros.python
|
||||
Source1: macros.python2
|
||||
Source2: baselibs.conf
|
||||
Source3: README.SUSE
|
||||
Source5: local.pth
|
||||
@@ -54,7 +54,7 @@ Patch33: python-2.7.9-ssl_ca_path.patch
|
||||
Patch34: python-2.7.9-sles-disable-verification-by-default.patch
|
||||
# PATCH-FIX-UPSTREAM python-ncurses-6.0-accessors.patch dimstar@opensuse.org -- Fix build with NCurses 6.0 and OPAQUE_WINDOW set to 1
|
||||
Patch35: python-ncurses-6.0-accessors.patch
|
||||
Patch36: python-2.7.10-overflow_check.patch
|
||||
Patch36: python-2.7.13-overflow_check.patch
|
||||
Patch37: python-2.7.12-makeopcode.patch
|
||||
# COMMON-PATCH-END
|
||||
%define python_version %(echo %{tarversion} | head -c 3)
|
||||
@@ -64,8 +64,10 @@ BuildRequires: libbz2-devel
|
||||
BuildRequires: pkg-config
|
||||
BuildRequires: xz
|
||||
BuildRequires: zlib-devel
|
||||
#!BuildIgnore: python
|
||||
# for the test suite
|
||||
BuildRequires: netcfg
|
||||
Requires: python-rpm-macros
|
||||
# explicitly, see bnc#697251:
|
||||
Requires: libpython2_7-1_0 = %{version}
|
||||
Provides: %{name} = %{python_version}
|
||||
@@ -77,6 +79,8 @@ Provides: python-ctypes = 1.1.0
|
||||
Obsoletes: python-ctypes < 1.1.0
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
Provides: python2-base = %{version}
|
||||
|
||||
%description
|
||||
Python is an interpreted, object-oriented programming language, and is
|
||||
often compared to Tcl, Perl, Scheme, or Java. You can find an overview
|
||||
@@ -92,6 +96,7 @@ Group: Development/Languages/Python
|
||||
Requires: glibc-devel
|
||||
Requires: python = %{version}
|
||||
Requires: python-base = %{version}-%{release}
|
||||
Provides: python2-devel = %{version}
|
||||
|
||||
%description -n python-devel
|
||||
The Python programming language's interpreter can be extended with
|
||||
@@ -108,6 +113,7 @@ Requires: python-base = %{version}-%{release}
|
||||
# pyxml used to live out of tree
|
||||
Provides: pyxml = 0.8.5
|
||||
Obsoletes: pyxml < 0.8.5
|
||||
Provides: python2-xml = %{version}
|
||||
|
||||
%description -n python-xml
|
||||
The expat module is a Python interface to the expat XML parser. Since
|
||||
@@ -148,7 +154,7 @@ other applications.
|
||||
%patch34 -p1
|
||||
%endif
|
||||
%patch35 -p1
|
||||
%patch36
|
||||
%patch36 -p1
|
||||
%patch37 -p1
|
||||
|
||||
# drop Autoconf version requirement
|
||||
@@ -156,7 +162,7 @@ sed -i 's/^version_required/dnl version_required/' configure.ac
|
||||
# COMMON-PREP-END
|
||||
|
||||
%build
|
||||
export OPT="%{optflags} -DOPENSSL_LOAD_CONF"
|
||||
export OPT="%{optflags} -DOPENSSL_LOAD_CONF -fwrapv"
|
||||
|
||||
autoreconf -f -i . # Modules/_ctypes/libffi
|
||||
|
||||
@@ -307,7 +313,7 @@ cp Makefile Makefile.pre.in Makefile.pre %{buildroot}%{_libdir}/python%{python_v
|
||||
|
||||
%files
|
||||
%defattr(644, root, root, 755)
|
||||
%config %{_sysconfdir}/rpm/macros.python
|
||||
%config %{_sysconfdir}/rpm/macros.python2
|
||||
%dir %{_docdir}/%{name}
|
||||
%doc %{_docdir}/%{name}/README
|
||||
%doc %{_docdir}/%{name}/LICENSE
|
||||
|
@@ -1,16 +1,16 @@
|
||||
Index: Python-2.7.3/Lib/gettext.py
|
||||
Index: Python-2.7.13/Lib/gettext.py
|
||||
===================================================================
|
||||
--- Python-2.7.3.orig/Lib/gettext.py
|
||||
+++ Python-2.7.3/Lib/gettext.py
|
||||
@@ -56,6 +56,7 @@ __all__ = ['NullTranslations', 'GNUTrans
|
||||
--- Python-2.7.13.orig/Lib/gettext.py
|
||||
+++ Python-2.7.13/Lib/gettext.py
|
||||
@@ -58,6 +58,7 @@ __all__ = ['NullTranslations', 'GNUTrans
|
||||
]
|
||||
|
||||
_default_localedir = os.path.join(sys.prefix, 'share', 'locale')
|
||||
+_default_bundlelocaledir = os.path.join(sys.prefix, 'share', 'locale-bundle')
|
||||
|
||||
|
||||
def test(condition, true, false):
|
||||
@@ -420,6 +421,10 @@ class GNUTranslations(NullTranslations):
|
||||
# Expression parsing for plural form selection.
|
||||
#
|
||||
@@ -496,6 +497,10 @@ class GNUTranslations(NullTranslations):
|
||||
|
||||
# Locate a .mo file using the gettext strategy
|
||||
def find(domain, localedir=None, languages=None, all=0):
|
||||
|
@@ -1,3 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 3 17:42:16 UTC 2017 - jmatejek@suse.com
|
||||
|
||||
- update to 2.7.13
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 2 15:36:00 UTC 2016 - jmatejek@suse.com
|
||||
|
||||
- provide python2-* symbols, for support of new packages built as
|
||||
python2-foo
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 30 09:23:05 UTC 2016 - jmatejek@suse.com
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-doc
|
||||
#
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
Name: python-doc
|
||||
Version: 2.7.12
|
||||
Version: 2.7.13
|
||||
Release: 0
|
||||
Summary: Additional Package Documentation for Python
|
||||
License: Python-2.0
|
||||
@@ -55,7 +55,7 @@ Patch33: python-2.7.9-ssl_ca_path.patch
|
||||
Patch34: python-2.7.9-sles-disable-verification-by-default.patch
|
||||
# PATCH-FIX-UPSTREAM python-ncurses-6.0-accessors.patch dimstar@opensuse.org -- Fix build with NCurses 6.0 and OPAQUE_WINDOW set to 1
|
||||
Patch35: python-ncurses-6.0-accessors.patch
|
||||
Patch36: python-2.7.10-overflow_check.patch
|
||||
Patch36: python-2.7.13-overflow_check.patch
|
||||
Patch37: python-2.7.12-makeopcode.patch
|
||||
# COMMON-PATCH-END
|
||||
Provides: pyth_doc
|
||||
@@ -65,6 +65,7 @@ Obsoletes: pyth_ps
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildArch: noarch
|
||||
Enhances: python = %{version}
|
||||
Provides: python2-doc = %{version}
|
||||
|
||||
%description
|
||||
Tutorial, Global Module Index, Language Reference, Library Reference,
|
||||
@@ -76,6 +77,7 @@ Summary: Python PDF Documentation
|
||||
Group: Development/Languages/Python
|
||||
Provides: pyth_pdf
|
||||
Obsoletes: pyth_pdf
|
||||
Provides: python2-doc-pdf = %{version}
|
||||
|
||||
%description pdf
|
||||
Tutorial, Global Module Index, Language Reference, Library Reference,
|
||||
@@ -103,7 +105,7 @@ Python, and Macintosh Module Reference in PDF format.
|
||||
%patch34 -p1
|
||||
%endif
|
||||
%patch35 -p1
|
||||
%patch36
|
||||
%patch36 -p1
|
||||
%patch37 -p1
|
||||
|
||||
# drop Autoconf version requirement
|
||||
|
@@ -1,3 +1,22 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 3 16:59:24 UTC 2017 - jmatejek@suse.com
|
||||
|
||||
- update to 2.7.13
|
||||
* dozens of bugfixes, see NEWS for details
|
||||
* updated cipher lists for openssl wrapper, support openssl >= 1.1.0
|
||||
* properly fix HTTPoxy (CVE-2016-1000110)
|
||||
* profile-opt build now applies PGO to modules as well
|
||||
- update python-2.7.10-overflow_check.patch
|
||||
with python-2.7.13-overflow_check.patch, incorporating upstream changes
|
||||
- add "-fwrapv" to optflags explicitly because upstream code still
|
||||
relies on it in many places
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 2 15:35:29 UTC 2016 - jmatejek@suse.com
|
||||
|
||||
- provide python2-* symbols, for support of new packages built as
|
||||
python2-foo
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 30 09:23:05 UTC 2016 - jmatejek@suse.com
|
||||
|
||||
|
16
python.spec
16
python.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python
|
||||
#
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
Name: python
|
||||
Version: 2.7.12
|
||||
Version: 2.7.13
|
||||
Release: 0
|
||||
Summary: Python Interpreter
|
||||
License: Python-2.0
|
||||
@@ -60,7 +60,7 @@ Patch33: python-2.7.9-ssl_ca_path.patch
|
||||
Patch34: python-2.7.9-sles-disable-verification-by-default.patch
|
||||
# PATCH-FIX-UPSTREAM python-ncurses-6.0-accessors.patch dimstar@opensuse.org -- Fix build with NCurses 6.0 and OPAQUE_WINDOW set to 1
|
||||
Patch35: python-ncurses-6.0-accessors.patch
|
||||
Patch36: python-2.7.10-overflow_check.patch
|
||||
Patch36: python-2.7.13-overflow_check.patch
|
||||
Patch37: python-2.7.12-makeopcode.patch
|
||||
# COMMON-PATCH-END
|
||||
BuildRequires: automake
|
||||
@@ -83,6 +83,7 @@ Requires: python-base = %{version}
|
||||
Recommends: python-strict-tls-check
|
||||
%endif
|
||||
Provides: %{name} = %{python_version}
|
||||
Provides: python2 = %{version}
|
||||
Obsoletes: python-elementtree
|
||||
Obsoletes: python-nothreads
|
||||
Obsoletes: python-sqlite
|
||||
@@ -107,6 +108,7 @@ Summary: An Integrated Development Environment for Python
|
||||
Group: Development/Languages/Python
|
||||
Requires: python-base = %{version}
|
||||
Requires: python-tk
|
||||
Provides: python2-idle = %{version}
|
||||
|
||||
%description idle
|
||||
IDLE is a Tkinter based integrated development environment for Python.
|
||||
@@ -120,6 +122,7 @@ Group: Development/Languages/Python
|
||||
Requires: python-base = %{version}
|
||||
Provides: pyth_dmo
|
||||
Obsoletes: pyth_dmo
|
||||
Provides: python2-demo = %{version}
|
||||
|
||||
%description demo
|
||||
Various demonstrations of what you can do with Python and a number of
|
||||
@@ -139,6 +142,7 @@ Provides: python_tkinter_lib
|
||||
Obsoletes: pyth_tk
|
||||
Obsoletes: pyth_tkl
|
||||
Obsoletes: python-tkinter
|
||||
Provides: python2-tk = %{version}
|
||||
|
||||
%description tk
|
||||
Python interface to Tk. Tk is the GUI toolkit that comes with Tcl. The
|
||||
@@ -150,6 +154,7 @@ Group: Development/Libraries/Python
|
||||
Requires: python-base = %{version}
|
||||
Obsoletes: pyth_cur
|
||||
Provides: pyth_cur
|
||||
Provides: python2-curses = %{version}
|
||||
|
||||
%description curses
|
||||
An easy to use interface to the (n)curses CUI library. CUI stands for
|
||||
@@ -161,6 +166,7 @@ Group: Development/Libraries/Python
|
||||
Requires: python-base = %{version}
|
||||
Obsoletes: pygdmod
|
||||
Provides: pygdmod
|
||||
Provides: python2-gdbm = %{version}
|
||||
|
||||
%description gdbm
|
||||
An easy to use interface for GDBM databases. GDBM is the GNU
|
||||
@@ -204,7 +210,7 @@ that rely on earlier non-verification behavior.
|
||||
%patch34 -p1
|
||||
%endif
|
||||
%patch35 -p1
|
||||
%patch36
|
||||
%patch36 -p1
|
||||
%patch37 -p1
|
||||
|
||||
# drop Autoconf version requirement
|
||||
@@ -219,7 +225,7 @@ cp %{SOURCE8} Lib/
|
||||
# necessary for correct linking with GDBM:
|
||||
export SUSE_ASNEEDED=0
|
||||
|
||||
export OPT="%{optflags} -DOPENSSL_LOAD_CONF"
|
||||
export OPT="%{optflags} -DOPENSSL_LOAD_CONF -fwrapv"
|
||||
|
||||
autoreconf -f -i . # Modules/_ctypes/libffi
|
||||
# prevent make from trying to rebuild asdl stuff, which requires existing
|
||||
|
Reference in New Issue
Block a user