summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2018-03-08 20:18:02 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-09 09:17:04 -0800
commitfe9e4bbee7e079bfd2bc1e8fa6124ef2db2d2efe (patch)
treef1b1aa3b6138dbd5d6c901bbfe2a95fb949d8228
parente5f5aa5604a7617af839832ded457c8a824bcf2f (diff)
downloadpoky-fe9e4bbee7e079bfd2bc1e8fa6124ef2db2d2efe.tar.gz
python: refresh patches
The patch tool will apply patches by default with "fuzz", which is where if the hunk context isn't present but what is there is close enough, it will force the patch in. Whilst this is useful when there's just whitespace changes, when applied to source it is possible for a patch applied with fuzz to produce broken code which still compiles (see #10450). This is obviously bad. We'd like to eventually have do_patch() rejecting any fuzz on these grounds. For that to be realistic the existing patches with fuzz need to be rebased and reviewed. (From OE-Core rev: 0b25fcee333e6207a8596d26adfa65fec85c26df) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch10
-rw-r--r--meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch30
-rw-r--r--meta/recipes-devtools/python/python/avoid_warning_for_sunos_specific_module.patch12
-rw-r--r--meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch14
-rw-r--r--meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch30
-rw-r--r--meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch17
-rw-r--r--meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch25
7 files changed, 57 insertions, 81 deletions
diff --git a/meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch b/meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
index a97ff6b250..506debaf76 100644
--- a/meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
+++ b/meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
@@ -13,10 +13,10 @@ Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
13 configure.ac | 2 +- 13 configure.ac | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-) 14 1 file changed, 1 insertion(+), 1 deletion(-)
15 15
16Index: Python-2.7.11/configure.ac 16Index: Python-2.7.13/configure.ac
17=================================================================== 17===================================================================
18--- Python-2.7.11.orig/configure.ac 18--- Python-2.7.13.orig/configure.ac
19+++ Python-2.7.11/configure.ac 19+++ Python-2.7.13/configure.ac
20@@ -33,7 +33,7 @@ if test "$cross_compiling" = yes; then 20@@ -33,7 +33,7 @@ if test "$cross_compiling" = yes; then
21 AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found]) 21 AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
22 fi 22 fi
@@ -24,5 +24,5 @@ Index: Python-2.7.11/configure.ac
24- PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp 24- PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
25+ PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(CROSSPYTHONPATH):$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp 25+ PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(CROSSPYTHONPATH):$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
26 fi 26 fi
27 elif test "$cross_compiling" = maybe; then 27 # Used to comment out stuff for rebuilding generated files
28 AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH]) 28 GENERATED_COMMENT='#'
diff --git a/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch b/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch
index 3347321fde..287095f615 100644
--- a/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch
+++ b/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch
@@ -7,13 +7,16 @@ Upstream-Status: Inappropriate [distribution]
7Also simply disable the tk module since its not in DEPENDS. 7Also simply disable the tk module since its not in DEPENDS.
8Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> 8Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
9 9
10Index: Python-2.7.2/setup.py 10Index: Python-2.7.13/setup.py
11=================================================================== 11===================================================================
12--- Python-2.7.2.orig/setup.py 2012-04-05 23:18:38.500136647 +0300 12--- Python-2.7.13.orig/setup.py
13+++ Python-2.7.2/setup.py 2012-04-05 23:19:35.888134969 +0300 13+++ Python-2.7.13/setup.py
14@@ -1634,8 +1634,10 @@ 14@@ -1783,10 +1783,12 @@ class PyBuildExt(build_ext):
15 self.extensions.extend(exts)
16
15 # Call the method for detecting whether _tkinter can be compiled 17 # Call the method for detecting whether _tkinter can be compiled
16 self.detect_tkinter(inc_dirs, lib_dirs) 18- self.detect_tkinter(inc_dirs, lib_dirs)
19+ # self.detect_tkinter(inc_dirs, lib_dirs)
17 20
18- if '_tkinter' not in [e.name for e in self.extensions]: 21- if '_tkinter' not in [e.name for e in self.extensions]:
19- missing.append('_tkinter') 22- missing.append('_tkinter')
@@ -22,18 +25,5 @@ Index: Python-2.7.2/setup.py
22+ #if '_tkinter' not in [e.name for e in self.extensions]: 25+ #if '_tkinter' not in [e.name for e in self.extensions]:
23+ # missing.append('_tkinter') 26+ # missing.append('_tkinter')
24 27
25 return missing 28 ## # Uncomment these lines if you want to play with xxmodule.c
26 29 ## ext = Extension('xx', ['xxmodule.c'])
27diff --git Python-3.5.1.orig/setup.py Python-3.5.1/setup.py
28index b4633b9..d7588c0 100644
29--- Python-3.5.1.orig/setup.py
30+++ Python-3.5.1/setup.py
31@@ -1536,7 +1536,7 @@ class PyBuildExt(build_ext):
32 self.extensions.extend(exts)
33
34 # Call the method for detecting whether _tkinter can be compiled
35- self.detect_tkinter(inc_dirs, lib_dirs)
36+ # self.detect_tkinter(inc_dirs, lib_dirs)
37
38 # tkinter module will not be avalaible as yocto
39 # doesn't have tk integrated (yet)
diff --git a/meta/recipes-devtools/python/python/avoid_warning_for_sunos_specific_module.patch b/meta/recipes-devtools/python/python/avoid_warning_for_sunos_specific_module.patch
index 337e0e3e29..8ba5823014 100644
--- a/meta/recipes-devtools/python/python/avoid_warning_for_sunos_specific_module.patch
+++ b/meta/recipes-devtools/python/python/avoid_warning_for_sunos_specific_module.patch
@@ -5,12 +5,12 @@ Upstream-Status: Inappropriate [distribution]
5 5
6Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> 6Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
7 7
8Index: Python-2.7.2/setup.py 8Index: Python-2.7.13/setup.py
9=================================================================== 9===================================================================
10--- Python-2.7.2.orig/setup.py 2012-04-05 22:29:18.049196608 +0300 10--- Python-2.7.13.orig/setup.py
11+++ Python-2.7.2/setup.py 2012-04-05 22:29:57.505195453 +0300 11+++ Python-2.7.13/setup.py
12@@ -1522,8 +1522,9 @@ 12@@ -1671,8 +1671,9 @@ class PyBuildExt(build_ext):
13 if platform == 'sunos5': 13 if host_platform == 'sunos5':
14 # SunOS specific modules 14 # SunOS specific modules
15 exts.append( Extension('sunaudiodev', ['sunaudiodev.c']) ) 15 exts.append( Extension('sunaudiodev', ['sunaudiodev.c']) )
16- else: 16- else:
@@ -19,5 +19,5 @@ Index: Python-2.7.2/setup.py
19+ #else: 19+ #else:
20+ # missing.append('sunaudiodev') 20+ # missing.append('sunaudiodev')
21 21
22 if platform == 'darwin': 22 if host_platform == 'darwin':
23 # _scproxy 23 # _scproxy
diff --git a/meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch b/meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch
index 789929b715..f9971c6baf 100644
--- a/meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch
+++ b/meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch
@@ -8,9 +8,11 @@ Upstream-Status: Inappropriate [OE specific]
8 Makefile.pre.in | 6 +++--- 8 Makefile.pre.in | 6 +++---
9 1 file changed, 3 insertions(+), 3 deletions(-) 9 1 file changed, 3 insertions(+), 3 deletions(-)
10 10
11--- a/Makefile.pre.in 11Index: Python-3.5.3/Makefile.pre.in
12+++ b/Makefile.pre.in 12===================================================================
13@@ -1306,8 +1306,8 @@ touch: 13--- Python-3.5.3.orig/Makefile.pre.in
14+++ Python-3.5.3/Makefile.pre.in
15@@ -1574,8 +1574,8 @@ touch:
14 # Sanitation targets -- clean leaves libraries, executables and tags 16 # Sanitation targets -- clean leaves libraries, executables and tags
15 # files, which clobber removes as well 17 # files, which clobber removes as well
16 pycremoval: 18 pycremoval:
@@ -21,7 +23,7 @@ Upstream-Status: Inappropriate [OE specific]
21 23
22 rmtestturds: 24 rmtestturds:
23 -rm -f *BAD *GOOD *SKIPPED 25 -rm -f *BAD *GOOD *SKIPPED
24@@ -1321,9 +1321,9 @@ docclean: 26@@ -1589,9 +1589,9 @@ docclean:
25 -rm -rf Doc/tools/sphinx Doc/tools/pygments Doc/tools/docutils 27 -rm -rf Doc/tools/sphinx Doc/tools/pygments Doc/tools/docutils
26 28
27 clean: pycremoval 29 clean: pycremoval
@@ -32,5 +34,5 @@ Upstream-Status: Inappropriate [OE specific]
32+ find . ! -path './ipkg-install/*' -name '*.s[ol]' -exec rm -f {} ';' 34+ find . ! -path './ipkg-install/*' -name '*.s[ol]' -exec rm -f {} ';'
33+ find . ! -path './ipkg-install/*' -name '*.so.[0-9]*.[0-9]*' -exec rm -f {} ';' 35+ find . ! -path './ipkg-install/*' -name '*.so.[0-9]*.[0-9]*' -exec rm -f {} ';'
34 find build -name 'fficonfig.h' -exec rm -f {} ';' || true 36 find build -name 'fficonfig.h' -exec rm -f {} ';' || true
35 find build -name 'fficonfig.py' -exec rm -f {} ';' || true 37 find build -name '*.py' -exec rm -f {} ';' || true
36 -rm -f Lib/lib2to3/*Grammar*.pickle 38 find build -name '*.py[co]' -exec rm -f {} ';' || true
diff --git a/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch b/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch
index 3347321fde..a3cc48c9a4 100644
--- a/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch
+++ b/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch
@@ -7,13 +7,16 @@ Upstream-Status: Inappropriate [distribution]
7Also simply disable the tk module since its not in DEPENDS. 7Also simply disable the tk module since its not in DEPENDS.
8Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> 8Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
9 9
10Index: Python-2.7.2/setup.py 10Index: Python-3.5.3/setup.py
11=================================================================== 11===================================================================
12--- Python-2.7.2.orig/setup.py 2012-04-05 23:18:38.500136647 +0300 12--- Python-3.5.3.orig/setup.py
13+++ Python-2.7.2/setup.py 2012-04-05 23:19:35.888134969 +0300 13+++ Python-3.5.3/setup.py
14@@ -1634,8 +1634,10 @@ 14@@ -1558,10 +1558,12 @@ class PyBuildExt(build_ext):
15 self.extensions.extend(exts)
16
15 # Call the method for detecting whether _tkinter can be compiled 17 # Call the method for detecting whether _tkinter can be compiled
16 self.detect_tkinter(inc_dirs, lib_dirs) 18- self.detect_tkinter(inc_dirs, lib_dirs)
19+ # self.detect_tkinter(inc_dirs, lib_dirs)
17 20
18- if '_tkinter' not in [e.name for e in self.extensions]: 21- if '_tkinter' not in [e.name for e in self.extensions]:
19- missing.append('_tkinter') 22- missing.append('_tkinter')
@@ -22,18 +25,5 @@ Index: Python-2.7.2/setup.py
22+ #if '_tkinter' not in [e.name for e in self.extensions]: 25+ #if '_tkinter' not in [e.name for e in self.extensions]:
23+ # missing.append('_tkinter') 26+ # missing.append('_tkinter')
24 27
25 return missing 28 ## # Uncomment these lines if you want to play with xxmodule.c
26 29 ## ext = Extension('xx', ['xxmodule.c'])
27diff --git Python-3.5.1.orig/setup.py Python-3.5.1/setup.py
28index b4633b9..d7588c0 100644
29--- Python-3.5.1.orig/setup.py
30+++ Python-3.5.1/setup.py
31@@ -1536,7 +1536,7 @@ class PyBuildExt(build_ext):
32 self.extensions.extend(exts)
33
34 # Call the method for detecting whether _tkinter can be compiled
35- self.detect_tkinter(inc_dirs, lib_dirs)
36+ # self.detect_tkinter(inc_dirs, lib_dirs)
37
38 # tkinter module will not be avalaible as yocto
39 # doesn't have tk integrated (yet)
diff --git a/meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch b/meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
index 74490d93a5..211f9e7889 100644
--- a/meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
+++ b/meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
@@ -10,19 +10,16 @@ Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
10 configure.ac | 2 +- 10 configure.ac | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-) 11 1 file changed, 1 insertion(+), 1 deletion(-)
12 12
13diff --git a/configure.ac b/configure.ac 13Index: Python-3.5.3/configure.ac
14index 989baf9..2890c96 100644 14===================================================================
15--- a/configure.ac 15--- Python-3.5.3.orig/configure.ac
16+++ b/configure.ac 16+++ Python-3.5.3/configure.ac
17@@ -67,7 +67,7 @@ if test "$cross_compiling" = yes; then 17@@ -78,7 +78,7 @@ if test "$cross_compiling" = yes; then
18 AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found]) 18 AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
19 fi 19 fi
20 AC_MSG_RESULT($interp) 20 AC_MSG_RESULT($interp)
21- PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp 21- PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
22+ PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(CROSSPYTHONPATH) '$interp 22+ PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(CROSSPYTHONPATH) '$interp
23 fi 23 fi
24 elif test "$cross_compiling" = maybe; then 24 # Used to comment out stuff for rebuilding generated files
25 AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH]) 25 GENERATED_COMMENT='#'
26--
272.0.1
28
diff --git a/meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch b/meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch
index de07643f2b..c89d9a3d83 100644
--- a/meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch
+++ b/meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch
@@ -17,12 +17,12 @@ Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
17 Lib/sysconfig.py | 5 ++++- 17 Lib/sysconfig.py | 5 ++++-
18 2 files changed, 8 insertions(+), 2 deletions(-) 18 2 files changed, 8 insertions(+), 2 deletions(-)
19 19
20diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py 20Index: Python-3.5.3/Lib/distutils/sysconfig.py
21index a545ab9..74317d1 100644 21===================================================================
22--- a/Lib/distutils/sysconfig.py 22--- Python-3.5.3.orig/Lib/distutils/sysconfig.py
23+++ b/Lib/distutils/sysconfig.py 23+++ Python-3.5.3/Lib/distutils/sysconfig.py
24@@ -554,7 +554,10 @@ def get_config_vars(*args): 24@@ -498,7 +498,10 @@ def get_config_vars(*args):
25 _config_vars['exec_prefix'] = EXEC_PREFIX 25 _config_vars['SO'] = SO
26 26
27 # Always convert srcdir to an absolute path 27 # Always convert srcdir to an absolute path
28- srcdir = _config_vars.get('srcdir', project_base) 28- srcdir = _config_vars.get('srcdir', project_base)
@@ -33,11 +33,11 @@ index a545ab9..74317d1 100644
33 if os.name == 'posix': 33 if os.name == 'posix':
34 if python_build: 34 if python_build:
35 # If srcdir is a relative path (typically '.' or '..') 35 # If srcdir is a relative path (typically '.' or '..')
36diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py 36Index: Python-3.5.3/Lib/sysconfig.py
37index 7287f11..cc92998 100644 37===================================================================
38--- a/Lib/sysconfig.py 38--- Python-3.5.3.orig/Lib/sysconfig.py
39+++ b/Lib/sysconfig.py 39+++ Python-3.5.3/Lib/sysconfig.py
40@@ -562,7 +562,10 @@ def get_config_vars(*args): 40@@ -544,7 +544,10 @@ def get_config_vars(*args):
41 _CONFIG_VARS['userbase'] = _getuserbase() 41 _CONFIG_VARS['userbase'] = _getuserbase()
42 42
43 # Always convert srcdir to an absolute path 43 # Always convert srcdir to an absolute path
@@ -49,6 +49,3 @@ index 7287f11..cc92998 100644
49 if os.name == 'posix': 49 if os.name == 'posix':
50 if _PYTHON_BUILD: 50 if _PYTHON_BUILD:
51 # If srcdir is a relative path (typically '.' or '..') 51 # If srcdir is a relative path (typically '.' or '..')
52--
531.7.9.5
54