summaryrefslogtreecommitdiff
path: root/package/python2/patches
diff options
context:
space:
mode:
Diffstat (limited to 'package/python2/patches')
-rw-r--r--package/python2/patches/0001-2.7-bpo-33127-Compatibility-patch-for-LibreSSL-2.7.0.patch79
-rw-r--r--package/python2/patches/patch-Makefile_pre_in40
-rw-r--r--package/python2/patches/patch-configure_ac22
-rw-r--r--package/python2/patches/patch-setup_py115
4 files changed, 0 insertions, 256 deletions
diff --git a/package/python2/patches/0001-2.7-bpo-33127-Compatibility-patch-for-LibreSSL-2.7.0.patch b/package/python2/patches/0001-2.7-bpo-33127-Compatibility-patch-for-LibreSSL-2.7.0.patch
deleted file mode 100644
index e5759db40..000000000
--- a/package/python2/patches/0001-2.7-bpo-33127-Compatibility-patch-for-LibreSSL-2.7.0.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From edd541897b9c28ee0d0f0131746aa5f19665a104 Mon Sep 17 00:00:00 2001
-From: Christian Heimes <christian@python.org>
-Date: Sat, 24 Mar 2018 19:34:15 +0100
-Subject: [PATCH] [2.7] bpo-33127: Compatibility patch for LibreSSL 2.7.0
- (GH-6210) (GH-6215)
-
-LibreSSL 2.7 introduced OpenSSL 1.1.0 API. The ssl module now detects
-LibreSSL 2.7 and only provides API shims for OpenSSL < 1.1.0 and
-LibreSSL < 2.7.
-
-Documentation updates and fixes for failing tests will be provided in
-another patch set.
-
-Signed-off-by: Christian Heimes <christian@python.org>.
-(cherry picked from commit 4ca0739c9d97ac7cd45499e0d31be68dc659d0e1)
-
-Co-authored-by: Christian Heimes <christian@python.org>
----
- .../2018-03-24-15-08-24.bpo-33127.olJmHv.rst | 1 +
- Modules/_ssl.c | 24 ++++++++++++++--------
- Tools/ssl/multissltests.py | 3 ++-
- 3 files changed, 19 insertions(+), 9 deletions(-)
- create mode 100644 Misc/NEWS.d/next/Library/2018-03-24-15-08-24.bpo-33127.olJmHv.rst
-
-diff --git a/Modules/_ssl.c b/Modules/_ssl.c
-index da8b20f54f..d0ce913d3d 100644
---- a/Modules/_ssl.c
-+++ b/Modules/_ssl.c
-@@ -102,6 +102,12 @@ struct py_ssl_library_code {
-
- #if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
- # define OPENSSL_VERSION_1_1 1
-+# define PY_OPENSSL_1_1_API 1
-+#endif
-+
-+/* LibreSSL 2.7.0 provides necessary OpenSSL 1.1.0 APIs */
-+#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x2070000fL
-+# define PY_OPENSSL_1_1_API 1
- #endif
-
- /* Openssl comes with TLSv1.1 and TLSv1.2 between 1.0.0h and 1.0.1
-@@ -149,16 +155,18 @@ struct py_ssl_library_code {
- #define INVALID_SOCKET (-1)
- #endif
-
--#ifdef OPENSSL_VERSION_1_1
--/* OpenSSL 1.1.0+ */
--#ifndef OPENSSL_NO_SSL2
--#define OPENSSL_NO_SSL2
--#endif
--#else /* OpenSSL < 1.1.0 */
--#if defined(WITH_THREAD)
-+/* OpenSSL 1.0.2 and LibreSSL needs extra code for locking */
-+#if !defined(OPENSSL_VERSION_1_1) && defined(WITH_THREAD)
- #define HAVE_OPENSSL_CRYPTO_LOCK
- #endif
-
-+#if defined(OPENSSL_VERSION_1_1) && !defined(OPENSSL_NO_SSL2)
-+#define OPENSSL_NO_SSL2
-+#endif
-+
-+#ifndef PY_OPENSSL_1_1_API
-+/* OpenSSL 1.1 API shims for OpenSSL < 1.1.0 and LibreSSL < 2.7.0 */
-+
- #define TLS_method SSLv23_method
-
- static int X509_NAME_ENTRY_set(const X509_NAME_ENTRY *ne)
-@@ -201,7 +209,7 @@ static X509_VERIFY_PARAM *X509_STORE_get0_param(X509_STORE *store)
- {
- return store->param;
- }
--#endif /* OpenSSL < 1.1.0 or LibreSSL */
-+#endif /* OpenSSL < 1.1.0 or LibreSSL < 2.7.0 */
-
-
- enum py_ssl_error {
---
-2.16.1
-
diff --git a/package/python2/patches/patch-Makefile_pre_in b/package/python2/patches/patch-Makefile_pre_in
deleted file mode 100644
index bcb0e1f6b..000000000
--- a/package/python2/patches/patch-Makefile_pre_in
+++ /dev/null
@@ -1,40 +0,0 @@
---- Python-2.7.13.orig/Makefile.pre.in 2016-12-17 21:05:06.000000000 +0100
-+++ Python-2.7.13/Makefile.pre.in 2017-03-16 19:38:14.000000000 +0100
-@@ -545,7 +545,7 @@ sharedmods: $(BUILDPYTHON) pybuilddir.tx
- esac; \
- $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
- _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
-- $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
-+ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py build
-
- # Build static library
- # avoid long command lines, same as LIBRARY_OBJS
-@@ -1120,28 +1120,6 @@ libinstall: build_all $(srcdir)/Lib/$(PL
- $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
- $(DESTDIR)$(LIBDEST)/distutils/tests ; \
- fi
-- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- $(PYTHON_FOR_BUILD) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
-- -d $(LIBDEST) -f \
-- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
-- $(DESTDIR)$(LIBDEST)
-- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
-- -d $(LIBDEST) -f \
-- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
-- $(DESTDIR)$(LIBDEST)
-- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- $(PYTHON_FOR_BUILD) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
-- -d $(LIBDEST)/site-packages -f \
-- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
-- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- $(PYTHON_FOR_BUILD) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
-- -d $(LIBDEST)/site-packages -f \
-- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
-- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
-- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
-
- # Create the PLATDIR source directory, if one wasn't distributed..
- $(srcdir)/Lib/$(PLATDIR):
diff --git a/package/python2/patches/patch-configure_ac b/package/python2/patches/patch-configure_ac
deleted file mode 100644
index 1a09f6eed..000000000
--- a/package/python2/patches/patch-configure_ac
+++ /dev/null
@@ -1,22 +0,0 @@
---- Python-2.7.13.orig/configure.ac 2016-12-17 21:05:07.000000000 +0100
-+++ Python-2.7.13/configure.ac 2017-03-16 19:29:41.000000000 +0100
-@@ -22,7 +22,7 @@ rm -f pybuilddir.txt
- if test "$cross_compiling" = yes; then
- AC_MSG_CHECKING([for python interpreter for cross build])
- if test -z "$PYTHON_FOR_BUILD"; then
-- for interp in python$PACKAGE_VERSION python2 python; do
-+ for interp in python; do
- which $interp >/dev/null 2>&1 || continue
- if $interp -c 'import sys;sys.exit(not (sys.version_info@<:@:2@:>@ >= (2,7) and sys.version_info@<:@0@:>@ < 3))'; then
- break
-@@ -1079,9 +1079,7 @@ then
- if test "$Py_DEBUG" = 'true' ; then
- # Optimization messes up debuggers, so turn it off for
- # debug builds.
-- OPT="-g -O0 -Wall $STRICT_PROTO"
-- else
-- OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
-+ OPT="$STRICT_PROTO"
- fi
- ;;
- *)
diff --git a/package/python2/patches/patch-setup_py b/package/python2/patches/patch-setup_py
deleted file mode 100644
index bf8e90c9d..000000000
--- a/package/python2/patches/patch-setup_py
+++ /dev/null
@@ -1,115 +0,0 @@
---- Python-2.7.13.orig/setup.py 2016-12-17 21:05:07.000000000 +0100
-+++ Python-2.7.13/setup.py 2017-03-16 19:45:12.000000000 +0100
-@@ -74,7 +74,7 @@ def find_file(filename, std_dirs, paths)
- 'paths' is a list of additional locations to check; if the file is
- found in one of them, the resulting list will contain the directory.
- """
-- if host_platform == 'darwin':
-+ if host_platform == 'darwin' and not cross_compiling:
- # Honor the MacOSX SDK setting when one was specified.
- # An SDK is a directory with the same structure as a real
- # system, but with only header files and libraries.
-@@ -84,7 +84,7 @@ def find_file(filename, std_dirs, paths)
- for dir in std_dirs:
- f = os.path.join(dir, filename)
-
-- if host_platform == 'darwin' and is_macosx_sdk_path(dir):
-+ if host_platform == 'darwin' and is_macosx_sdk_path(dir) and not cross_compiling:
- f = os.path.join(sysroot, dir[1:], filename)
-
- if os.path.exists(f): return []
-@@ -93,7 +93,7 @@ def find_file(filename, std_dirs, paths)
- for dir in paths:
- f = os.path.join(dir, filename)
-
-- if host_platform == 'darwin' and is_macosx_sdk_path(dir):
-+ if host_platform == 'darwin' and is_macosx_sdk_path(dir) and not cross_compiling:
- f = os.path.join(sysroot, dir[1:], filename)
-
- if os.path.exists(f):
-@@ -107,7 +107,7 @@ def find_library_file(compiler, libname,
- if result is None:
- return None
-
-- if host_platform == 'darwin':
-+ if host_platform == 'darwin' and not cross_compiling:
- sysroot = macosx_sdk_root()
-
- # Check whether the found file is in one of the standard directories
-@@ -116,7 +116,7 @@ def find_library_file(compiler, libname,
- # Ensure path doesn't end with path separator
- p = p.rstrip(os.sep)
-
-- if host_platform == 'darwin' and is_macosx_sdk_path(p):
-+ if host_platform == 'darwin' and is_macosx_sdk_path(p) and not cross_compiling:
- # Note that, as of Xcode 7, Apple SDKs may contain textual stub
- # libraries with .tbd extensions rather than the normal .dylib
- # shared libraries installed in /. The Apple compiler tool
-@@ -145,7 +145,7 @@ def find_library_file(compiler, libname,
- # Ensure path doesn't end with path separator
- p = p.rstrip(os.sep)
-
-- if host_platform == 'darwin' and is_macosx_sdk_path(p):
-+ if host_platform == 'darwin' and is_macosx_sdk_path(p) and not cross_compiling:
- if os.path.join(sysroot, p[1:]) == dirname:
- return [ p ]
-
-@@ -178,6 +178,7 @@ class PyBuildExt(build_ext):
-
- def build_extensions(self):
-
-+ self.compiler.library_dirs = []
- # Detect which modules should be compiled
- missing = self.detect_modules()
-
-@@ -299,6 +300,7 @@ class PyBuildExt(build_ext):
-
- def build_extension(self, ext):
-
-+
- if ext.name == '_ctypes':
- if not self.configure_ctypes(ext):
- return
-@@ -460,7 +462,8 @@ class PyBuildExt(build_ext):
- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
- if cross_compiling:
- self.add_gcc_paths()
-- self.add_multiarch_paths()
-+ if not cross_compiling:
-+ self.add_multiarch_paths()
-
- # Add paths specified in the environment variables LDFLAGS and
- # CPPFLAGS for header and library files.
-@@ -497,7 +500,8 @@ class PyBuildExt(build_ext):
- add_dir_to_list(dir_list, directory)
-
- if os.path.normpath(sys.prefix) != '/usr' \
-- and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
-+ and not sysconfig.get_config_var('PYTHONFRAMEWORK') \
-+ and not cross_compiling:
- # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework
- # (PYTHONFRAMEWORK is set) to avoid # linking problems when
- # building a framework with different architectures than
-@@ -515,8 +519,13 @@ class PyBuildExt(build_ext):
- # lib_dirs and inc_dirs are used to search for files;
- # if a file is found in one of those directories, it can
- # be assumed that no additional -I,-L directives are needed.
-+ if cross_compiling:
-+ add_dir_to_list(self.compiler.library_dirs,
-+ sysconfig.get_config_var('srcdir'))
-+
- inc_dirs = self.compiler.include_dirs[:]
- lib_dirs = self.compiler.library_dirs[:]
-+
- if not cross_compiling:
- for d in (
- '/usr/include',
-@@ -550,7 +559,7 @@ class PyBuildExt(build_ext):
- if host_platform == 'hp-ux11':
- lib_dirs += ['/usr/lib/hpux64', '/usr/lib/hpux32']
-
-- if host_platform == 'darwin':
-+ if host_platform == 'darwin' and not cross_compiling:
- # This should work on any unixy platform ;-)
- # If the user has bothered specifying additional -I and -L flags
- # in OPT and LDFLAGS we might as well use them here.