Compare commits

...

20 Commits
master ... f24

Author SHA1 Message Date
Charalampos Stratakis 3ce08cb6e0 Enable profile guided optimizations for x86_64 and i686 architectures
Added patch for fixing recompilation of Python when using common
build commands and the --enable-optimizations flag.
2017-05-10 15:08:33 +02:00
Charalampos Stratakis 80aab0f05e Make pip installable in a new venv when using the --system-site-packages flag 2017-04-24 13:36:51 +02:00
Tomas Orsava aaf90e5ba8 Fix syntax error in %py_byte_compile macro (rhbz#1433569) 2017-03-21 15:02:08 +01:00
Iryna Shcherbina 14f9313981 Replace patch 259 with a backported upstream patch 2017-03-08 19:03:33 +01:00
Iryna Shcherbina 8ed4c75417 Add patch to work around magic number bump in Python 3.5.3 source code
Issue: http://bugs.python.org/issue27286
2017-03-08 16:01:42 +01:00
Iryna Shcherbina 7709829ab9 Upload sources for Python-3.5.3 2017-02-01 12:19:15 +01:00
Iryna Shcherbina 695c2fbe5f Rebased to version 3.5.3
- Removed patches 184, 209, 242 as the changes are already in Python 3.5.3
- Updated patches 55, 146, 170, 180 to work with the new Python codebase
2017-02-01 12:09:30 +01:00
Charalampos Stratakis f150e743a1 Always include the rewheel patch at the SRPM 2017-01-10 22:14:04 +01:00
Tomas Orsava dd4e3cd13a Merge branch 'f25' into f24
Updated Python to 3.5.2 from F25
2016-10-14 13:41:04 +02:00
Tomas Orsava f833933af2 Backported the build-time check for the getrandom syscall
..from Python 3.5.2.
The Python 3.5.1 build-time check was failing due to missing headers.

Resolves: rhbz#1350123
2016-09-19 12:05:02 +02:00
Charalampos Stratakis a3e9c34369 Provide and Obsolete python35 for ensuring upgrade path from F23->f24 2016-09-14 12:38:48 +02:00
Charalampos Stratakis 20e7677efb Remove unused configure flags and update %py_byte_compile macro 2016-09-12 14:54:53 +02:00
Tomas Orsava c2920bb88e Fixed .pyc bytecompilation
- Updated .pyc 'bytecompilation with the newly installed interpreter' to also
  recompile optimized .pyc files
- Removed .pyo 'bytecompilation with the newly installed interpreter', as .pyo
  files are no more
- Resolves rhbz#1373635
2016-09-09 13:32:17 +02:00
Charalampos Stratakis 351bb59ed7 Fix for CVE-2016-1000110 HTTPoxy attack 2016-08-09 14:44:11 +02:00
Charalampos Stratakis ebb21874f3 Refactor patch for properly fixing CVE-2016-5636 2016-07-10 19:22:19 +02:00
Charalampos Stratakis ac1e8eda41 Fix test_pyexpat failure with Expat 2.2.0 2016-07-10 19:21:47 +02:00
Miro Hrončok 4d924b173b Move xml module to system-python-libs 2016-07-10 19:20:58 +02:00
Tomas Orsava 57b8e1ebbf Added an info note about adding new patches
Due to an omission, it was not included in this branch yet.
2016-06-20 13:15:49 +02:00
Tomas Orsava 4f692a0511 Fix for: CVE-2016-0772 python: smtplib StartTLS stripping attack (rhbz#1303647)
Raise an error when STARTTLS fails.

- rhbz#1303647: https://bugzilla.redhat.com/show_bug.cgi?id=1303647
- rhbz#1346345: https://bugzilla.redhat.com/show_bug.cgi?id=1346345
- Fixed upstream: https://hg.python.org/cpython/rev/d590114c2394
2016-06-20 13:01:00 +02:00
Charalampos Stratakis 84bfe362bc Fix possible integer overflow and heap corruption in zipimport module 2016-06-13 18:07:44 +02:00
13 changed files with 6050 additions and 310 deletions

View File

@ -1,7 +1,8 @@
diff -up Python-3.3.0rc2/configure.ac.systemtap Python-3.3.0rc2/configure.ac
--- Python-3.3.0rc2/configure.ac.systemtap 2012-09-09 05:11:14.000000000 -0400
+++ Python-3.3.0rc2/configure.ac 2012-09-10 09:17:21.114511781 -0400
@@ -2678,6 +2678,23 @@ if test "$with_valgrind" != no; then
diff --git a/configure.ac b/configure.ac
index f50a6c8..b0650a5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3277,6 +3277,23 @@ if test "$with_valgrind" != no; then
OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
fi
@ -25,10 +26,11 @@ diff -up Python-3.3.0rc2/configure.ac.systemtap Python-3.3.0rc2/configure.ac
# -I${DLINCLDIR} is added to the compile rule for importdl.o
AC_SUBST(DLINCLDIR)
DLINCLDIR=.
diff -up Python-3.3.0rc2/configure.systemtap Python-3.3.0rc2/configure
--- Python-3.3.0rc2/configure.systemtap 2012-09-09 05:11:14.000000000 -0400
+++ Python-3.3.0rc2/configure 2012-09-10 09:17:21.116511780 -0400
@@ -618,6 +618,8 @@ TRUE
diff --git a/configure b/configure
index 0906ae0..4acd1cd 100755
--- a/configure
+++ b/configure
@@ -642,6 +642,8 @@ TRUE
MACHDEP_OBJS
DYNLOADFILE
DLINCLDIR
@ -37,7 +39,7 @@ diff -up Python-3.3.0rc2/configure.systemtap Python-3.3.0rc2/configure
THREADOBJ
LDLAST
USE_THREAD_MODULE
@@ -779,6 +781,7 @@ with_doc_strings
@@ -835,6 +837,7 @@ with_doc_strings
with_tsc
with_pymalloc
with_valgrind
@ -45,7 +47,7 @@ diff -up Python-3.3.0rc2/configure.systemtap Python-3.3.0rc2/configure
with_fpectl
with_libm
with_libc
@@ -1456,6 +1459,7 @@ Optional Packages:
@@ -1540,6 +1543,7 @@ Optional Packages:
--with(out)-tsc enable/disable timestamp counter profile
--with(out)-pymalloc disable/enable specialized mallocs
--with-valgrind Enable Valgrind support
@ -53,7 +55,7 @@ diff -up Python-3.3.0rc2/configure.systemtap Python-3.3.0rc2/configure
--with-fpectl enable SIGFPE catching
--with-libm=STRING math library
--with-libc=STRING C library
@@ -10065,6 +10069,31 @@ fi
@@ -11181,6 +11185,31 @@ fi
OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
fi
@ -85,18 +87,21 @@ diff -up Python-3.3.0rc2/configure.systemtap Python-3.3.0rc2/configure
# -I${DLINCLDIR} is added to the compile rule for importdl.o
DLINCLDIR=.
diff -up Python-3.3.0rc2/Doc/howto/index.rst.systemtap Python-3.3.0rc2/Doc/howto/index.rst
--- Python-3.3.0rc2/Doc/howto/index.rst.systemtap 2012-09-09 05:10:51.000000000 -0400
+++ Python-3.3.0rc2/Doc/howto/index.rst 2012-09-10 09:17:21.117511779 -0400
@@ -29,4 +29,5 @@ Currently, the HOWTOs are:
diff --git a/Doc/howto/index.rst b/Doc/howto/index.rst
index de65950..593341c 100644
--- a/Doc/howto/index.rst
+++ b/Doc/howto/index.rst
@@ -28,4 +28,5 @@ Currently, the HOWTOs are:
argparse.rst
ipaddress.rst
clinic.rst
+ instrumentation.rst
diff -up Python-3.3.0rc2/Doc/howto/instrumentation.rst.systemtap Python-3.3.0rc2/Doc/howto/instrumentation.rst
--- Python-3.3.0rc2/Doc/howto/instrumentation.rst.systemtap 2012-09-10 09:17:21.117511779 -0400
+++ Python-3.3.0rc2/Doc/howto/instrumentation.rst 2012-09-10 09:17:21.117511779 -0400
diff --git a/Doc/howto/instrumentation.rst b/Doc/howto/instrumentation.rst
new file mode 100644
index 0000000..b6924e1
--- /dev/null
+++ b/Doc/howto/instrumentation.rst
@@ -0,0 +1,295 @@
+.. _instrumentation:
+
@ -393,9 +398,11 @@ diff -up Python-3.3.0rc2/Doc/howto/instrumentation.rst.systemtap Python-3.3.0rc2
+ delete fn_calls;
+ }
+
diff -up Python-3.3.0rc2/Lib/test/test_systemtap.py.systemtap Python-3.3.0rc2/Lib/test/test_systemtap.py
--- Python-3.3.0rc2/Lib/test/test_systemtap.py.systemtap 2012-09-10 09:17:21.117511779 -0400
+++ Python-3.3.0rc2/Lib/test/test_systemtap.py 2012-09-10 09:17:21.117511779 -0400
diff --git a/Lib/test/test_systemtap.py b/Lib/test/test_systemtap.py
new file mode 100644
index 0000000..a669064
--- /dev/null
+++ b/Lib/test/test_systemtap.py
@@ -0,0 +1,234 @@
+# Verify that systemtap static probes work
+#
@ -631,10 +638,11 @@ diff -up Python-3.3.0rc2/Lib/test/test_systemtap.py.systemtap Python-3.3.0rc2/Li
+
+if __name__ == "__main__":
+ test_main()
diff -up Python-3.3.0rc2/Makefile.pre.in.systemtap Python-3.3.0rc2/Makefile.pre.in
--- Python-3.3.0rc2/Makefile.pre.in.systemtap 2012-09-09 05:11:05.000000000 -0400
+++ Python-3.3.0rc2/Makefile.pre.in 2012-09-10 09:19:51.195501518 -0400
@@ -363,6 +363,7 @@ PYTHON_OBJS= \
diff --git a/Makefile.pre.in b/Makefile.pre.in
index a88b7d5..3585b88 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -415,6 +415,7 @@ PYTHON_OBJS= \
Python/formatter_unicode.o \
Python/fileutils.o \
Python/$(DYNLOADFILE) \
@ -642,9 +650,9 @@ diff -up Python-3.3.0rc2/Makefile.pre.in.systemtap Python-3.3.0rc2/Makefile.pre.
$(LIBOBJS) \
$(MACHDEP_OBJS) \
$(THREADOBJ)
@@ -713,7 +714,8 @@ Objects/setobject.o: $(srcdir)/Objects/s
@@ -868,7 +869,8 @@ Objects/setobject.o: $(srcdir)/Objects/stringlib/eq.h
$(OPCODETARGETS_H): $(OPCODETARGETGEN_FILES)
$(OPCODETARGETGEN) $(OPCODETARGETS_H)
$(PYTHON_FOR_GEN) $(OPCODETARGETGEN) $(OPCODETARGETS_H)
-Python/ceval.o: $(OPCODETARGETS_H) $(srcdir)/Python/ceval_gil.h
+Python/ceval.o: $(OPCODETARGETS_H) $(srcdir)/Python/ceval_gil.h \
@ -652,9 +660,9 @@ diff -up Python-3.3.0rc2/Makefile.pre.in.systemtap Python-3.3.0rc2/Makefile.pre.
Python/frozen.o: Python/importlib.h Python/importlib_external.h
@@ -724,6 +726,13 @@ Objects/typeobject.o: $(srcdir)/Objects/
@@ -876,6 +878,13 @@ Objects/typeobject.o: Objects/typeslots.inc
Objects/typeslots.inc: $(srcdir)/Include/typeslots.h $(srcdir)/Objects/typeslots.py
$(PYTHON) $(srcdir)/Objects/typeslots.py < $(srcdir)/Include/typeslots.h > Objects/typeslots.inc
$(PYTHON_FOR_GEN) $(srcdir)/Objects/typeslots.py < $(srcdir)/Include/typeslots.h Objects/typeslots.inc
+# Only needed with --with-systemtap; not a public header:
+$(srcdir)/Python/pysystemtap.h: $(srcdir)/Python/pysystemtap.d
@ -666,18 +674,19 @@ diff -up Python-3.3.0rc2/Makefile.pre.in.systemtap Python-3.3.0rc2/Makefile.pre.
############################################################################
# Header files
@@ -1345,6 +1354,7 @@ clean: pycremoval
@@ -1597,6 +1606,7 @@ clean: pycremoval
-rm -f Lib/lib2to3/*Grammar*.pickle
-rm -f Programs/_testembed Programs/_freeze_importlib
-rm -rf build
-find build -type f -a ! -name '*.gc??' -exec rm -f {} ';'
+ -rm -f $(srcdir)/Python/pysystemtap.h
profile-removal:
find . -name '*.gc??' -exec rm -f {} ';'
diff -up Python-3.3.0rc2/pyconfig.h.in.systemtap Python-3.3.0rc2/pyconfig.h.in
--- Python-3.3.0rc2/pyconfig.h.in.systemtap 2012-09-09 05:11:14.000000000 -0400
+++ Python-3.3.0rc2/pyconfig.h.in 2012-09-10 09:17:21.120511781 -0400
@@ -1306,6 +1306,9 @@
diff --git a/pyconfig.h.in b/pyconfig.h.in
index 39ccf53..9052dbc 100644
--- a/pyconfig.h.in
+++ b/pyconfig.h.in
@@ -1375,6 +1375,9 @@
/* Define if you want to compile in Python-specific mallocs */
#undef WITH_PYMALLOC
@ -687,10 +696,11 @@ diff -up Python-3.3.0rc2/pyconfig.h.in.systemtap Python-3.3.0rc2/pyconfig.h.in
/* Define if you want to compile in rudimentary thread support */
#undef WITH_THREAD
diff -up Python-3.3.0rc2/Python/ceval.c.systemtap Python-3.3.0rc2/Python/ceval.c
--- Python-3.3.0rc2/Python/ceval.c.systemtap 2012-09-09 05:11:12.000000000 -0400
+++ Python-3.3.0rc2/Python/ceval.c 2012-09-10 09:17:21.122511781 -0400
@@ -18,6 +18,8 @@
diff --git a/Python/ceval.c b/Python/ceval.c
index 7b40518..0e49de5 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -20,6 +20,8 @@
#include <ctype.h>
@ -699,7 +709,7 @@ diff -up Python-3.3.0rc2/Python/ceval.c.systemtap Python-3.3.0rc2/Python/ceval.c
#ifndef WITH_TSC
#define READ_TIMESTAMP(var)
@@ -1160,6 +1162,10 @@ PyEval_EvalFrameEx(PyFrameObject *f, int
@@ -1160,6 +1162,10 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
}
}
@ -710,7 +720,7 @@ diff -up Python-3.3.0rc2/Python/ceval.c.systemtap Python-3.3.0rc2/Python/ceval.c
co = f->f_code;
names = co->co_names;
consts = co->co_consts;
@@ -3077,6 +3083,11 @@ fast_yield:
@@ -3640,6 +3646,11 @@ fast_yield:
/* pop frame */
exit_eval_frame:
@ -722,9 +732,11 @@ diff -up Python-3.3.0rc2/Python/ceval.c.systemtap Python-3.3.0rc2/Python/ceval.c
Py_LeaveRecursiveCall();
f->f_executing = 0;
tstate->frame = f->f_back;
diff -up Python-3.3.0rc2/Python/ceval_systemtap.h.systemtap Python-3.3.0rc2/Python/ceval_systemtap.h
--- Python-3.3.0rc2/Python/ceval_systemtap.h.systemtap 2012-09-10 09:17:21.122511781 -0400
+++ Python-3.3.0rc2/Python/ceval_systemtap.h 2012-09-10 09:17:21.122511781 -0400
diff --git a/Python/ceval_systemtap.h b/Python/ceval_systemtap.h
new file mode 100644
index 0000000..38697ad
--- /dev/null
+++ b/Python/ceval_systemtap.h
@@ -0,0 +1,86 @@
+/*
+ Support for SystemTap static markers
@ -812,9 +824,11 @@ diff -up Python-3.3.0rc2/Python/ceval_systemtap.h.systemtap Python-3.3.0rc2/Pyth
+#define systemtap_function_return(f)
+
+#endif
diff -up Python-3.3.0rc2/Python/pysystemtap.d.systemtap Python-3.3.0rc2/Python/pysystemtap.d
--- Python-3.3.0rc2/Python/pysystemtap.d.systemtap 2012-09-10 09:17:21.122511781 -0400
+++ Python-3.3.0rc2/Python/pysystemtap.d 2012-09-10 09:17:21.122511781 -0400
diff --git a/Python/pysystemtap.d b/Python/pysystemtap.d
new file mode 100644
index 0000000..c2cdef0
--- /dev/null
+++ b/Python/pysystemtap.d
@@ -0,0 +1,4 @@
+provider python {
+ probe function__entry(const char *, const char *, int, PyFrameObject *);

View File

@ -282,7 +282,7 @@ index c9b113e..60e2392 100644
self._test_pbkdf2_hmac(py_hashlib.pbkdf2_hmac)
diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c
index 44765ac..b8cf490 100644
index ff57614..8cd1b77 100644
--- a/Modules/_hashopenssl.c
+++ b/Modules/_hashopenssl.c
@@ -20,6 +20,8 @@
@ -292,9 +292,9 @@ index 44765ac..b8cf490 100644
+#include <openssl/ssl.h>
+#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/hmac.h>
/* We use the object interface to discover what hashes OpenSSL supports. */
@@ -45,11 +47,19 @@ typedef struct {
#include <openssl/objects.h>
@@ -55,10 +57,19 @@ typedef struct {
static PyTypeObject EVPtype;
@ -311,14 +311,13 @@ index 44765ac..b8cf490 100644
-#define DEFINE_CONSTS_FOR_NEW(Name) \
- static PyObject *CONST_ ## Name ## _name_obj = NULL; \
- static EVP_MD_CTX CONST_new_ ## Name ## _ctx; \
- static EVP_MD_CTX *CONST_new_ ## Name ## _ctx_p = NULL;
+#define DEFINE_CONSTS_FOR_NEW(Name) \
+ static EVPCachedInfo cached_info_ ##Name;
DEFINE_CONSTS_FOR_NEW(md5)
DEFINE_CONSTS_FOR_NEW(sha1)
@@ -92,6 +102,48 @@ EVP_hash(EVPobject *self, const void *vp, Py_ssize_t len)
@@ -139,6 +150,48 @@ EVP_hash(EVPobject *self, const void *vp, Py_ssize_t len)
}
}
@ -367,7 +366,7 @@ index 44765ac..b8cf490 100644
/* Internal methods for a hash object */
static void
@@ -259,15 +311,16 @@ EVP_repr(EVPobject *self)
@@ -327,15 +380,16 @@ EVP_repr(EVPobject *self)
static int
EVP_tp_init(EVPobject *self, PyObject *args, PyObject *kwds)
{
@ -387,21 +386,21 @@ index 44765ac..b8cf490 100644
return -1;
}
@@ -288,7 +341,12 @@ EVP_tp_init(EVPobject *self, PyObject *args, PyObject *kwds)
@@ -356,7 +410,12 @@ EVP_tp_init(EVPobject *self, PyObject *args, PyObject *kwds)
PyBuffer_Release(&view);
return -1;
}
- EVP_DigestInit(&self->ctx, digest);
+ mc_ctx_init(&self->ctx, usedforsecurity);
+ if (!EVP_DigestInit_ex(&self->ctx, digest, NULL)) {
- EVP_DigestInit(self->ctx, digest);
+ mc_ctx_init(self->ctx, usedforsecurity);
+ if (!EVP_DigestInit_ex(self->ctx, digest, NULL)) {
+ set_evp_exception();
+ PyBuffer_Release(&view);
+ return -1;
+ Py_RETURN_NONE;
+ }
self->name = name_obj;
Py_INCREF(self->name);
@@ -372,7 +430,8 @@ static PyTypeObject EVPtype = {
@@ -440,7 +499,8 @@ static PyTypeObject EVPtype = {
static PyObject *
EVPnew(PyObject *name_obj,
const EVP_MD *digest, const EVP_MD_CTX *initial_ctx,
@ -411,13 +410,13 @@ index 44765ac..b8cf490 100644
{
EVPobject *self;
@@ -387,7 +446,12 @@ EVPnew(PyObject *name_obj,
@@ -455,7 +515,12 @@ EVPnew(PyObject *name_obj,
if (initial_ctx) {
EVP_MD_CTX_copy(&self->ctx, initial_ctx);
EVP_MD_CTX_copy(self->ctx, initial_ctx);
} else {
- EVP_DigestInit(&self->ctx, digest);
+ mc_ctx_init(&self->ctx, usedforsecurity);
+ if (!EVP_DigestInit_ex(&self->ctx, digest, NULL)) {
- EVP_DigestInit(self->ctx, digest);
+ mc_ctx_init(self->ctx, usedforsecurity);
+ if (!EVP_DigestInit_ex(self->ctx, digest, NULL)) {
+ set_evp_exception();
+ Py_DECREF(self);
+ return NULL;
@ -425,7 +424,7 @@ index 44765ac..b8cf490 100644
}
if (cp && len) {
@@ -411,21 +475,29 @@ PyDoc_STRVAR(EVP_new__doc__,
@@ -479,21 +544,29 @@ PyDoc_STRVAR(EVP_new__doc__,
An optional string argument may be provided and will be\n\
automatically hashed.\n\
\n\
@ -459,7 +458,7 @@ index 44765ac..b8cf490 100644
return NULL;
}
@@ -439,7 +511,8 @@ EVP_new(PyObject *self, PyObject *args, PyObject *kwdict)
@@ -507,7 +580,8 @@ EVP_new(PyObject *self, PyObject *args, PyObject *kwdict)
digest = EVP_get_digestbyname(name);
@ -469,13 +468,13 @@ index 44765ac..b8cf490 100644
if (data_obj)
PyBuffer_Release(&view);
@@ -722,57 +795,114 @@ generate_hash_name_list(void)
@@ -769,57 +843,114 @@ generate_hash_name_list(void)
/*
- * This macro generates constructor function definitions for specific
- * hash algorithms. These constructors are much faster than calling
- * the generic one passing it a python string and are noticably
- * the generic one passing it a python string and are noticeably
- * faster than calling a python new() wrapper. Thats important for
+ * This macro and function generates a family of constructor function
+ * definitions for specific hash algorithms. These constructors are much
@ -512,8 +511,8 @@ index 44765ac..b8cf490 100644
+ return implement_specific_EVP_new(self, args, kwdict, \
+ "|Oi:" #NAME, \
+ &cached_info_ ## NAME ); \
}
+ }
+
+static PyObject *
+implement_specific_EVP_new(PyObject *self, PyObject *args, PyObject *kwdict,
+ const char *format,
@ -531,8 +530,8 @@ index 44765ac..b8cf490 100644
+ if (!PyArg_ParseTupleAndKeywords(args, kwdict, format, kwlist,
+ &data_obj, &usedforsecurity)) {
+ return NULL;
+ }
+
}
+ if (data_obj)
+ GET_BUFFER_VIEW_OR_ERROUT(data_obj, &view);
+
@ -581,7 +580,7 @@ index 44765ac..b8cf490 100644
- if (CONST_ ## NAME ## _name_obj == NULL) { \
- CONST_ ## NAME ## _name_obj = PyUnicode_FromString(#NAME); \
- if (EVP_get_digestbyname(#NAME)) { \
- CONST_new_ ## NAME ## _ctx_p = &CONST_new_ ## NAME ## _ctx; \
- CONST_new_ ## NAME ## _ctx_p = EVP_MD_CTX_new(); \
- EVP_DigestInit(CONST_new_ ## NAME ## _ctx_p, EVP_get_digestbyname(#NAME)); \
- } \
- } \
@ -621,7 +620,7 @@ index 44765ac..b8cf490 100644
GEN_CONSTRUCTOR(md5)
GEN_CONSTRUCTOR(sha1)
@@ -819,13 +949,10 @@ PyInit__hashlib(void)
@@ -866,13 +997,10 @@ PyInit__hashlib(void)
{
PyObject *m, *openssl_md_meth_names;

View File

@ -1,8 +1,8 @@
Index: Include/object.h
===================================================================
--- Include/object.h (revision 87911)
+++ Include/object.h (working copy)
@@ -914,6 +914,49 @@
diff --git Include/object.h Include/object.h
index 50d9747..9b7e89e 100644
--- Include/object.h
+++ Include/object.h
@@ -1059,6 +1059,49 @@ PyAPI_FUNC(void)
_PyObject_DebugTypeStats(FILE *out);
#endif /* ifndef Py_LIMITED_API */
@ -52,17 +52,17 @@ Index: Include/object.h
#ifdef __cplusplus
}
#endif
Index: Objects/object.c
===================================================================
--- Objects/object.c (revision 87911)
+++ Objects/object.c (working copy)
@@ -1899,6 +1899,35 @@
diff --git Objects/object.c Objects/object.c
index d21fd90..d07b49c 100644
--- Objects/object.c
+++ Objects/object.c
@@ -2034,6 +2034,35 @@ _PyTrash_thread_destroy_chain(void)
}
}
+PyAPI_FUNC(void)
+_PyObject_AssertFailed(PyObject *obj, const char *msg, const char *expr,
+ const char *file, int line, const char *function)
+ const char *file, int line, const char *function)
+{
+ fprintf(stderr,
+ "%s:%d: %s: Assertion \"%s\" failed.\n",
@ -92,23 +92,38 @@ Index: Objects/object.c
#ifndef Py_TRACE_REFS
/* For Py_LIMITED_API, we need an out-of-line version of _Py_Dealloc.
Define this here, so we can undefine the macro. */
Index: Lib/test/test_gc.py
===================================================================
--- Lib/test/test_gc.py (revision 87911)
+++ Lib/test/test_gc.py (working copy)
@@ -1,7 +1,7 @@
diff --git Lib/test/test_gc.py Lib/test/test_gc.py
index a4d684b..e77029e 100644
--- Lib/test/test_gc.py
+++ Lib/test/test_gc.py
@@ -1,10 +1,11 @@
import unittest
from test.support import (verbose, refcount_test, run_unittest,
strip_python_stderr, cpython_only, start_threads,
- temp_dir)
+ temp_dir, import_module)
strip_python_stderr, cpython_only, start_threads,
- temp_dir, requires_type_collecting)
+ temp_dir, requires_type_collecting, import_module)
from test.support.script_helper import assert_python_ok, make_script
import sys
@@ -512,6 +512,48 @@
+import sysconfig
import time
import gc
import weakref
@@ -50,6 +51,8 @@ class GC_Detector(object):
# gc collects it.
self.wr = weakref.ref(C1055820(666), it_happened)
+BUILD_WITH_NDEBUG = ('-DNDEBUG' in sysconfig.get_config_vars()['PY_CFLAGS'])
+
@with_tp_del
class Uncollectable(object):
"""Create a reference cycle with multiple __del__ methods.
@@ -864,6 +867,50 @@ class GCCallbackTests(unittest.TestCase):
self.assertEqual(len(gc.garbage), 0)
+ @unittest.skipIf(BUILD_WITH_NDEBUG,
+ 'built with -NDEBUG')
+ def test_refcount_errors(self):
+ self.preclean()
+ # Verify the "handling" of objects with broken refcounts
@ -154,9 +169,10 @@ Index: Lib/test/test_gc.py
class GCTogglingTests(unittest.TestCase):
def setUp(self):
gc.enable()
diff -up Modules/gcmodule.c.orig2 Modules/gcmodule.c
--- Modules/gcmodule.c.orig2 2014-12-08 10:54:14.251742911 +0100
+++ Modules/gcmodule.c 2014-12-08 10:52:45.674771917 +0100
diff --git Modules/gcmodule.c Modules/gcmodule.c
index cb7222d..6a9be80 100644
--- Modules/gcmodule.c
+++ Modules/gcmodule.c
@@ -341,7 +341,8 @@ update_refs(PyGC_Head *containers)
{
PyGC_Head *gc = containers->gc.gc_next;
@ -188,7 +204,7 @@ diff -up Modules/gcmodule.c.orig2 Modules/gcmodule.c
if (_PyGCHead_REFS(gc) > 0)
_PyGCHead_DECREF(gc);
}
@@ -436,9 +440,10 @@ visit_reachable(PyObject *op, PyGC_Head
@@ -436,9 +440,10 @@ visit_reachable(PyObject *op, PyGC_Head *reachable)
* If gc_refs == GC_UNTRACKED, it must be ignored.
*/
else {
@ -202,7 +218,7 @@ diff -up Modules/gcmodule.c.orig2 Modules/gcmodule.c
}
}
return 0;
@@ -480,7 +485,7 @@ move_unreachable(PyGC_Head *young, PyGC_
@@ -480,7 +485,7 @@ move_unreachable(PyGC_Head *young, PyGC_Head *unreachable)
*/
PyObject *op = FROM_GC(gc);
traverseproc traverse = Py_TYPE(op)->tp_traverse;
@ -211,7 +227,7 @@ diff -up Modules/gcmodule.c.orig2 Modules/gcmodule.c
_PyGCHead_SET_REFS(gc, GC_REACHABLE);
(void) traverse(op,
(visitproc)visit_reachable,
@@ -543,7 +548,7 @@ move_legacy_finalizers(PyGC_Head *unreac
@@ -543,7 +548,7 @@ move_legacy_finalizers(PyGC_Head *unreachable, PyGC_Head *finalizers)
for (gc = unreachable->gc.gc_next; gc != unreachable; gc = next) {
PyObject *op = FROM_GC(gc);
@ -220,7 +236,7 @@ diff -up Modules/gcmodule.c.orig2 Modules/gcmodule.c
next = gc->gc.gc_next;
if (has_legacy_finalizer(op)) {
@@ -619,7 +624,7 @@ handle_weakrefs(PyGC_Head *unreachable,
@@ -619,7 +624,7 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
PyWeakReference **wrlist;
op = FROM_GC(gc);
@ -229,7 +245,7 @@ diff -up Modules/gcmodule.c.orig2 Modules/gcmodule.c
next = gc->gc.gc_next;
if (! PyType_SUPPORTS_WEAKREFS(Py_TYPE(op)))
@@ -640,9 +645,9 @@ handle_weakrefs(PyGC_Head *unreachable,
@@ -640,9 +645,9 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
* the callback pointer intact. Obscure: it also
* changes *wrlist.
*/
@ -241,7 +257,7 @@ diff -up Modules/gcmodule.c.orig2 Modules/gcmodule.c
if (wr->wr_callback == NULL)
continue; /* no callback */
@@ -676,7 +681,7 @@ handle_weakrefs(PyGC_Head *unreachable,
@@ -676,7 +681,7 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
*/
if (IS_TENTATIVELY_UNREACHABLE(wr))
continue;
@ -250,7 +266,7 @@ diff -up Modules/gcmodule.c.orig2 Modules/gcmodule.c
/* Create a new reference so that wr can't go away
* before we can process it again.
@@ -685,7 +690,8 @@ handle_weakrefs(PyGC_Head *unreachable,
@@ -685,7 +690,8 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
/* Move wr to wrcb_to_call, for the next pass. */
wrasgc = AS_GC(wr);
@ -260,7 +276,7 @@ diff -up Modules/gcmodule.c.orig2 Modules/gcmodule.c
next isn't, so they can't
be the same */
gc_list_move(wrasgc, &wrcb_to_call);
@@ -701,11 +707,11 @@ handle_weakrefs(PyGC_Head *unreachable,
@@ -701,11 +707,11 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
gc = wrcb_to_call.gc.gc_next;
op = FROM_GC(gc);
@ -292,35 +308,3 @@ diff -up Modules/gcmodule.c.orig2 Modules/gcmodule.c
if (_PyGCHead_REFS(gc) != 0)
return -1;
}
diff -up Lib/test/test_gc.py.old Lib/test/test_gc.py
--- Lib/test/test_gc.py.old 2014-12-10 11:19:33.503982288 +0100
+++ Lib/test/test_gc.py 2014-12-10 11:21:13.220021364 +0100
@@ -49,6 +49,8 @@ class GC_Detector(object):
# gc collects it.
self.wr = weakref.ref(C1055820(666), it_happened)
+BUILD_WITH_NDEBUG = ('-DNDEBUG' in sysconfig.get_config_vars()['PY_CFLAGS'])
+
@with_tp_del
class Uncollectable(object):
"""Create a reference cycle with multiple __del__ methods.
@@ -854,6 +856,8 @@ class GCCallbackTests(unittest.TestCase)
self.assertEqual(len(gc.garbage), 0)
+ @unittest.skipIf(BUILD_WITH_NDEBUG,
+ 'built with -NDEBUG')
def test_refcount_errors(self):
self.preclean()
# Verify the "handling" of objects with broken refcounts
diff -up Lib/test/test_gc.py.old Lib/test/test_gc.py
--- Lib/test/test_gc.py.old 2014-12-10 12:50:58.252121318 +0100
+++ Lib/test/test_gc.py 2014-12-10 12:51:08.594266653 +0100
@@ -4,6 +4,7 @@ from test.support import (verbose, refco
from test.support.script_helper import assert_python_ok, make_script
import sys
+import sysconfig
import time
import gc
import weakref

View File

@ -1,12 +1,13 @@
diff -r de35eae9048a config.sub
--- a/config.sub Wed Apr 24 23:33:20 2013 +0200
+++ b/config.sub Thu Apr 25 08:51:00 2013 +0200
@@ -1008,7 +1008,7 @@
diff --git a/config.sub b/config.sub
index 3478c1f..e422173 100755
--- a/config.sub
+++ b/config.sub
@@ -1040,7 +1040,7 @@ case $basic_machine in
;;
ppc64) basic_machine=powerpc64-unknown
;;
- ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
ppc64le | powerpc64little)
basic_machine=powerpc64le-unknown

View File

@ -1,12 +0,0 @@
--- Python-3.3.2/setup.py.orig 2013-07-01 15:23:24.377711044 +0200
+++ Python-3.3.2/setup.py 2013-07-01 15:23:34.094676496 +0200
@@ -1882,7 +1882,8 @@
if not line:
ffi_inc = None
break
- if line.startswith('#define LIBFFI_H'):
+ if line.startswith('#define LIBFFI_H') or \
+ line.startswith('#define ffi_wrapper_h'):
break
ffi_lib = None
if ffi_inc is not None:

View File

@ -1,17 +0,0 @@
diff -r 682a8e36dd18 Lib/test/test_pyexpat.py
--- a/Lib/test/test_pyexpat.py Tue Jul 05 17:08:52 2016 +0300
+++ b/Lib/test/test_pyexpat.py Thu Jul 07 17:04:35 2016 +0800
@@ -656,11 +656,9 @@
# \xc2\x85 is UTF-8 encoded U+0085 (NEXT LINE)
xml = b"<?xml version\xc2\x85='1.0'?>\r\n"
parser = expat.ParserCreate()
- try:
+ err_pattern = r'XML declaration not well-formed: line 1, column \d+'
+ with self.assertRaisesRegex(expat.ExpatError, err_pattern):
parser.Parse(xml, True)
- self.fail()
- except expat.ExpatError as e:
- self.assertEqual(str(e), 'XML declaration not well-formed: line 1, column 14')
class ErrorMessageTest(unittest.TestCase):
def test_codes(self):

View File

@ -1,89 +0,0 @@
diff --git a/Doc/howto/urllib2.rst b/Doc/howto/urllib2.rst
index 24a4156..d2c7991 100644
--- a/Doc/howto/urllib2.rst
+++ b/Doc/howto/urllib2.rst
@@ -538,6 +538,11 @@ setting up a `Basic Authentication`_ handler: ::
through a proxy. However, this can be enabled by extending urllib.request as
shown in the recipe [#]_.
+.. note::
+
+ ``HTTP_PROXY`` will be ignored if a variable ``REQUEST_METHOD`` is set; see
+ the documentation on :func:`~urllib.request.getproxies`.
+
Sockets and Layers
==================
diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst
index 6c1bfb8..1291aeb 100644
--- a/Doc/library/urllib.request.rst
+++ b/Doc/library/urllib.request.rst
@@ -173,6 +173,16 @@ The :mod:`urllib.request` module defines the following functions:
If both lowercase and uppercase environment variables exist (and disagree),
lowercase is preferred.
+ .. note::
+
+ If the environment variable ``REQUEST_METHOD`` is set, which usually
+ indicates your script is running in a CGI environment, the environment
+ variable ``HTTP_PROXY`` (uppercase ``_PROXY``) will be ignored. This is
+ because that variable can be injected by a client using the "Proxy:" HTTP
+ header. If you need to use an HTTP proxy in a CGI environment, either use
+ ``ProxyHandler`` explicitly, or make sure the variable name is in
+ lowercase (or at least the ``_proxy`` suffix).
+
The following classes are provided:
@@ -280,6 +290,11 @@ The following classes are provided:
list of hostname suffixes, optionally with ``:port`` appended, for example
``cern.ch,ncsa.uiuc.edu,some.host:8080``.
+ .. note::
+
+ ``HTTP_PROXY`` will be ignored if a variable ``REQUEST_METHOD`` is set;
+ see the documentation on :func:`~urllib.request.getproxies`.
+
.. class:: HTTPPasswordMgr()
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
index 5d05f8d..c26c52a 100644
--- a/Lib/test/test_urllib.py
+++ b/Lib/test/test_urllib.py
@@ -232,6 +232,18 @@ class ProxyTests(unittest.TestCase):
self.assertTrue(urllib.request.proxy_bypass_environment('anotherdomain.com:8888'))
self.assertTrue(urllib.request.proxy_bypass_environment('newdomain.com:1234'))
+ def test_proxy_cgi_ignore(self):
+ try:
+ self.env.set('HTTP_PROXY', 'http://somewhere:3128')
+ proxies = urllib.request.getproxies_environment()
+ self.assertEqual('http://somewhere:3128', proxies['http'])
+ self.env.set('REQUEST_METHOD', 'GET')
+ proxies = urllib.request.getproxies_environment()
+ self.assertNotIn('http', proxies)
+ finally:
+ self.env.unset('REQUEST_METHOD')
+ self.env.unset('HTTP_PROXY')
+
def test_proxy_bypass_environment_host_match(self):
bypass = urllib.request.proxy_bypass_environment
self.env.set('NO_PROXY',
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py
index 1731fe3..3be327d 100644
--- a/Lib/urllib/request.py
+++ b/Lib/urllib/request.py
@@ -2412,6 +2412,12 @@ def getproxies_environment():
name = name.lower()
if value and name[-6:] == '_proxy':
proxies[name[:-6]] = value
+ # CVE-2016-1000110 - If we are running as CGI script, forget HTTP_PROXY
+ # (non-all-lowercase) as it may be set from the web server by a "Proxy:"
+ # header from the client
+ # If "proxy" is lowercase, it will still be used thanks to the next block
+ if 'REQUEST_METHOD' in os.environ:
+ proxies.pop('http', None)
for name, value in os.environ.items():
if name[-6:] == '_proxy':
name = name.lower()

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,78 @@
diff --git a/Lib/test/test_venv.py b/Lib/test/test_venv.py
index 3999d1f..c1e6566 100644
--- a/Lib/test/test_venv.py
+++ b/Lib/test/test_venv.py
@@ -328,13 +328,7 @@ def test_devnull_exists_and_is_empty(self):
with open(os.devnull, "rb") as f:
self.assertEqual(f.read(), b"")
- # Requesting pip fails without SSL (http://bugs.python.org/issue19744)
- @unittest.skipIf(ssl is None, ensurepip._MISSING_SSL_MESSAGE)
- @unittest.skipUnless(threading, 'some dependencies of pip import threading'
- ' module unconditionally')
- # Issue #26610: pip/pep425tags.py requires ctypes
- @unittest.skipUnless(ctypes, 'pip requires ctypes')
- def test_with_pip(self):
+ def do_test_with_pip(self, system_site_packages):
rmtree(self.env_dir)
with EnvironmentVarGuard() as envvars:
# pip's cross-version compatibility may trigger deprecation
@@ -368,6 +362,7 @@ def test_with_pip(self):
# config in place to ensure we ignore it
try:
self.run_with_capture(venv.create, self.env_dir,
+ system_site_packages=system_site_packages,
with_pip=True)
except subprocess.CalledProcessError as exc:
# The output this produces can be a little hard to read,
@@ -417,9 +412,21 @@ def test_with_pip(self):
out = out.decode("latin-1") # Force to text, prevent decoding errors
self.assertIn("Successfully uninstalled pip", out)
self.assertIn("Successfully uninstalled setuptools", out)
- # Check pip is now gone from the virtual environment
- self.assert_pip_not_installed()
+ # Check pip is now gone from the virtual environment. This only
+ # applies in the system_site_packages=False case, because in the
+ # other case, pip may still be available in the system site-packages
+ if not system_site_packages:
+ self.assert_pip_not_installed()
+ # Requesting pip fails without SSL (http://bugs.python.org/issue19744)
+ @unittest.skipIf(ssl is None, ensurepip._MISSING_SSL_MESSAGE)
+ @unittest.skipUnless(threading, 'some dependencies of pip import threading'
+ ' module unconditionally')
+ # Issue #26610: pip/pep425tags.py requires ctypes
+ @unittest.skipUnless(ctypes, 'pip requires ctypes')
+ def test_with_pip(self):
+ self.do_test_with_pip(False)
+ self.do_test_with_pip(True)
if __name__ == "__main__":
unittest.main()
diff --git a/Lib/venv/__init__.py b/Lib/venv/__init__.py
index 74245ab..fa03262 100644
--- a/Lib/venv/__init__.py
+++ b/Lib/venv/__init__.py
@@ -77,6 +77,10 @@ def create(self, env_dir):
"""
env_dir = os.path.abspath(env_dir)
context = self.ensure_directories(env_dir)
+ # See issue 24875. We need system_site_packages to be False
+ # until after pip is installed.
+ true_system_site_packages = self.system_site_packages
+ self.system_site_packages = False
self.create_configuration(context)
self.setup_python(context)
if self.with_pip:
@@ -84,6 +88,11 @@ def create(self, env_dir):
if not self.upgrade:
self.setup_scripts(context)
self.post_setup(context)
+ if true_system_site_packages:
+ # We had set it to False before, now
+ # restore it and rewrite the configuration
+ self.system_site_packages = True
+ self.create_configuration(context)
def clear_directory(self, path):
for fn in os.listdir(path):

View File

@ -0,0 +1,67 @@
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 0e1d0af..42ab191 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -989,7 +989,7 @@ TESTTIMEOUT= 1200
# Run a basic set of regression tests.
# This excludes some tests that are particularly resource-intensive.
-test: all platform
+test: @DEF_MAKE_RULE@ platform
$(TESTRUNNER) $(TESTOPTS)
# Run the full test suite twice - once without .pyc files, and once with.
@@ -999,7 +999,7 @@ test: all platform
# the bytecode read from a .pyc file had the bug, sometimes the directly
# generated bytecode. This is sometimes a very shy bug needing a lot of
# sample data.
-testall: all platform
+testall: @DEF_MAKE_RULE@ platform
-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
$(TESTPYTHON) -E $(srcdir)/Lib/compileall.py
-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
@@ -1008,7 +1008,7 @@ testall: all platform
# Run the test suite for both architectures in a Universal build on OSX.
# Must be run on an Intel box.
-testuniversal: all platform
+testuniversal: @DEF_MAKE_RULE@ platform
if [ `arch` != 'i386' ];then \
echo "This can only be used on OSX/i386" ;\
exit 1 ;\
@@ -1031,7 +1031,7 @@ QUICKTESTOPTS= $(TESTOPTS) -x test_subprocess test_io test_lib2to3 \
test_multiprocessing_forkserver \
test_mailbox test_socket test_poll \
test_select test_zipfile test_concurrent_futures
-quicktest: all platform
+quicktest: @DEF_MAKE_RULE@ platform
$(TESTRUNNER) $(QUICKTESTOPTS)
@@ -1368,7 +1368,7 @@ LIBPL= $(LIBDEST)/config-$(LDVERSION)-$(MULTIARCH)
# pkgconfig directory
LIBPC= $(LIBDIR)/pkgconfig
-libainstall: all python-config
+libainstall: @DEF_MAKE_RULE@ python-config
@for i in $(LIBDIR) $(LIBPL) $(LIBPC); \
do \
if test ! -d $(DESTDIR)$$i; then \
@@ -1616,7 +1616,7 @@ distclean: clobber
-exec rm -f {} ';'
# Check for smelly exported symbols (not starting with Py/_Py)
-smelly: all
+smelly: @DEF_MAKE_RULE@
nm -p $(LIBRARY) | \
sed -n "/ [TDB] /s/.* //p" | grep -v "^_*Py" | sort -u; \
@@ -1653,7 +1653,7 @@ funny:
-o -print
# Perform some verification checks on any modified files.
-patchcheck: all
+patchcheck: @DEF_MAKE_RULE@
$(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
# Dependencies

View File

@ -6,5 +6,5 @@
%py_byte_compile()\
python_binary="%1"\
bytecode_compilation_path="%2"\
find $bytecode_compilation_path -type f -a -name "*.py" -print0 | xargs -0 $python_binary -O -c 'import py_compile, sys; [py_compile.compile(f, dfile=f.partition("$RPM_BUILD_ROOT")[2]], optimize=opt) for opt in range(2) for f in sys.argv[1:]]' || :\
find $bytecode_compilation_path -type f -a -name "*.py" -print0 | xargs -0 $python_binary -O -c 'import py_compile, sys; [py_compile.compile(f, dfile=f.partition("$RPM_BUILD_ROOT")[2], optimize=opt) for opt in range(2) for f in sys.argv[1:]]' || :\
%{nil}

View File

@ -111,8 +111,8 @@
# ==================
Summary: Version 3 of the Python programming language aka Python 3000
Name: python3
Version: %{pybasever}.2
Release: 4%{?dist}
Version: %{pybasever}.3
Release: 6%{?dist}
License: Python
Group: Development/Languages
@ -342,14 +342,6 @@ Patch178: 00178-dont-duplicate-flags-in-sysconfig.patch
# Not appropriate for upstream, Fedora-specific naming
Patch180: 00180-python-add-support-for-ppc64p7.patch
# 00184 #
# Fix for https://bugzilla.redhat.com/show_bug.cgi?id=979696
# Fixes build of ctypes against libffi with multilib wrapper
# Python recognizes ffi.h only if it contains "#define LIBFFI_H",
# but the wrapper doesn't contain that, which makes the build fail
# We patch this by also accepting "#define ffi_wrapper_h"
Patch184: 00184-ctypes-should-build-with-libffi-multilib-wrapper.patch
# 00186 #
# Fix for https://bugzilla.redhat.com/show_bug.cgi?id=1023607
# Previously, this fixed a problem where some *.py files were not being
@ -378,9 +370,7 @@ Patch188: 00188-fix-lib2to3-tests-when-hashlib-doesnt-compile-properly.patch
# Add the rewheel module, allowing to recreate wheels from already installed
# ones
# https://github.com/bkabrda/rewheel
%if 0%{with_rewheel}
Patch189: 00189-add-rewheel-module.patch
%endif
# 00205 #
# LIBPL variable in makefile takes LIBPL from configure.ac
@ -392,20 +382,6 @@ Patch205: 00205-make-libpl-respect-lib64.patch
# by debian but fedora infra uses only eabi without hf
Patch206: 00206-remove-hf-from-arm-triplet.patch
# 00209 #
# Fix test breakage with version 2.2.0 of Expat
# rhbz#1353918: https://bugzilla.redhat.com/show_bug.cgi?id=1353918
# FIXED UPSTREAM: http://bugs.python.org/issue27369
Patch209: 00209-fix-test-pyexpat-failure.patch
# 00242 #
# HTTPoxy attack (CVE-2016-1000110)
# https://httpoxy.org/
# FIXED UPSTREAM: http://bugs.python.org/issue27568
# Based on a patch by Rémi Rampin
# Resolves: rhbz#1359177
Patch242: 00242-CVE-2016-1000110-httpoxy.patch
# 00243 #
# Fix the triplet used on 64-bit MIPS
# rhbz#1322526: https://bugzilla.redhat.com/show_bug.cgi?id=1322526
@ -413,6 +389,27 @@ Patch242: 00242-CVE-2016-1000110-httpoxy.patch
# Fedora needs the default mips64-linux-gnu
Patch243: 00243-fix-mips64-triplet.patch
# 00259 #
# Tolerate legacy invalid bytecode
# This patch restores the ability to import legacy bytecode generated
# by 3.5.0, 3.5.1 or 3.5.2, and modifies the eval loop to
# avoid any harmful consequences from the potentially malformed legacy
# bytecode.
# Original import patch by Petr Viktorin, eval loop patch by Serhiy Storchaka,
# and tests and integration by Nick Coghlan.
Patch259: 00259-tolerate-legacy-invalid-bytecode.patch
# 00267 #
# Make pip installable inside a new venv when using the --system-site-packages flag
# FIXED UPSTREAM: https://bugs.python.org/issue24875
Patch267: 00267-install-pip-in-a-venv-with-system-site-packages.patch
# 00269 #
# Fix python's recompilation with common build commands when using
# profile guided optimizations.
# Fixed upstream: http://bugs.python.org/issue29243
Patch269: 00269-fix-multiple-compilations-issue-with-pgo-builds.patch
# (New patches go here ^^^)
#
# When adding new patches to "python" and "python3" in Fedora, EL, etc.,
@ -614,7 +611,7 @@ for f in md5module.c sha1module.c sha256module.c sha512module.c; do
done
%if 0%{with_rewheel}
%global pip_version 8.1.2
%global pip_version 8.0.2
sed -r -i s/'_PIP_VERSION = "[0-9.]+"'/'_PIP_VERSION = "%{pip_version}"'/ Lib/ensurepip/__init__.py
%endif
@ -643,7 +640,6 @@ sed -r -i s/'_PIP_VERSION = "[0-9.]+"'/'_PIP_VERSION = "%{pip_version}"'/ Lib/en
%patch170 -p0
%patch178 -p1
%patch180 -p1
%patch184 -p1
%patch186 -p1
%patch188 -p1
@ -653,9 +649,10 @@ sed -r -i s/'_PIP_VERSION = "[0-9.]+"'/'_PIP_VERSION = "%{pip_version}"'/ Lib/en
%patch205 -p1
%patch206 -p1
%patch209 -p1
%patch242 -p1
%patch243 -p1
%patch259 -p1
%patch267 -p1
%patch269 -p1
# Currently (2010-01-15), http://docs.python.org/library is for 2.6, and there
# are many differences between 2.6 and the Python 3 library.
@ -754,7 +751,11 @@ BuildPython debug \
BuildPython optimized \
python \
python%{pybasever} \
%ifarch %{ix86} x86_64
"--without-ensurepip --enable-optimizations" \
%else
"--without-ensurepip" \
%endif
true
# ======================================================
@ -1555,21 +1556,33 @@ rm -fr %{buildroot}
# ======================================================
%changelog
* Wed Sep 14 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.5.2-4
- Obsolete and Provide python35 package
* Wed May 10 2017 Charalampos Stratakis <cstratak@redhat.com> - 3.5.3-6
- Enable profile guided optimizations for x86_64 and i686 architectures
* Mon Sep 12 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.5.2-3
* Mon Apr 24 2017 Charalampos Stratakis <cstratak@redhat.com> - 3.5.3-5
- Make pip installable in a new venv when using the --system-site-packages flag
* Tue Mar 21 2017 Tomas Orsava <torsava@redhat.com> - 3.5.3-4
- Fix syntax error in %%py_byte_compile macro (rhbz#1433569)
* Wed Mar 8 2017 Iryna Shcherbina <ishcherb@redhat.com> - 3.5.3-3
- Replace patch 259 with a backported upstream patch
* Thu Feb 09 2017 Petr Viktorin <pviktori@redhat.com> - 3.5.3-2
- Add patch 259 to work around magic number bump in Python 3.5.3
* Tue Jan 31 2017 Iryna Shcherbina <ishcherb@redhat.com> - 3.5.3-1
- Rebased to version 3.5.3
* Tue Oct 11 2016 Tomas Orsava <torsava@redhat.com> - 3.5.2-3
- Merged F25 branch into F24 thus updating Python to 3.5.2 in F24
- Added missing changelog entries below this one for the sake of completeness
* Tue Oct 11 2016 Tomas Orsava <torsava@redhat.com> - 3.5.2-2
- Update %py_byte_compile macro
- Remove unused configure flags (rhbz#1374357)
* Fri Sep 09 2016 Tomas Orsava <torsava@redhat.com> - 3.5.2-2
- Updated .pyc 'bytecompilation with the newly installed interpreter' to also
recompile optimized .pyc files
- Removed .pyo 'bytecompilation with the newly installed interpreter', as .pyo
files are no more
- Resolves rhbz#1373635
* Mon Aug 15 2016 Tomas Orsava <torsava@redhat.com> - 3.5.2-1
* Tue Oct 11 2016 Tomas Orsava <torsava@redhat.com> - 3.5.2-1
- Rebased to version 3.5.2
- Set to work with pip version 8.1.2
- Removed patches 207, 237, 241 as fixes are already contained in Python 3.5.2
@ -1578,16 +1591,29 @@ rm -fr %{buildroot}
- Updated patches 102, 146, and 242 to work with the new Python codebase
- Removed patches 200, 201, 5000 which weren't even being applied
* Tue Aug 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.5.1-15
* Fri Sep 16 2016 Tomas Orsava <torsava@redhat.com> - 3.5.1-17
- Backported the build-time check for the getrandom syscall from Python 3.5.2
- The Python 3.5.1 build-time check was failing due to missing headers
- Resolves: rhbz#1350123
* Wed Sep 14 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.5.1-16
- Obsolete and Provide python35 package
* Mon Sep 12 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.5.1-15
- Update %py_byte_compile macro
- Remove unused configure flags (rhbz#1374357)
* Fri Sep 09 2016 Tomas Orsava <torsava@redhat.com> - 3.5.1-14
- Updated .pyc 'bytecompilation with the newly installed interpreter' to also
recompile optimized .pyc files
- Removed .pyo 'bytecompilation with the newly installed interpreter', as .pyo
files are no more
- Resolves rhbz#1373635
* Tue Aug 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.5.1-13
- Fix for CVE-2016-1000110 HTTPoxy attack
- SPEC file cleanup
* Mon Aug 01 2016 Michal Toman <mtoman@fedoraproject.org> - 3.5.1-14
- Build properly on MIPS
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.5.1-13
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Fri Jul 08 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.5.1-12
- Refactor patch for properly fixing CVE-2016-5636

View File

@ -1 +1 @@
8906efbacfcdc7c3c9198aeefafd159e Python-3.5.2.tar.xz
SHA512 (Python-3.5.3.tar.xz) = bbcc20e315c63dbc8901d7e7bfa29d4dbdad9335720757d8d679730319fd1d9fcfdb55cf62d620c9b052134170f162c28d653a8af60923185b8932524d827864