diff options
Diffstat (limited to 'meta/recipes-devtools/python')
-rw-r--r-- | meta/recipes-devtools/python/python-native_2.7.18.bb (renamed from meta/recipes-devtools/python/python-native_2.7.17.bb) | 0 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python.inc | 6 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python3-testtools/no_traceback2.patch | 23 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python3-testtools_2.3.0.bb | 2 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python3/0001-Don-t-search-system-for-headers-libraries.patch | 29 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch | 31 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch | 2 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python3/CVE-2020-14422.patch | 79 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python3_3.7.8.bb (renamed from meta/recipes-devtools/python/python3_3.7.6.bb) | 27 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python_2.7.18.bb (renamed from meta/recipes-devtools/python/python_2.7.17.bb) | 0 |
10 files changed, 188 insertions, 11 deletions
diff --git a/meta/recipes-devtools/python/python-native_2.7.17.bb b/meta/recipes-devtools/python/python-native_2.7.18.bb index 335318bab8..335318bab8 100644 --- a/meta/recipes-devtools/python/python-native_2.7.17.bb +++ b/meta/recipes-devtools/python/python-native_2.7.18.bb | |||
diff --git a/meta/recipes-devtools/python/python.inc b/meta/recipes-devtools/python/python.inc index 19a2f3e743..fe281586fc 100644 --- a/meta/recipes-devtools/python/python.inc +++ b/meta/recipes-devtools/python/python.inc | |||
@@ -5,13 +5,13 @@ SECTION = "devel/python" | |||
5 | # bump this on every change in contrib/python/generate-manifest-2.7.py | 5 | # bump this on every change in contrib/python/generate-manifest-2.7.py |
6 | INC_PR = "r1" | 6 | INC_PR = "r1" |
7 | 7 | ||
8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e466242989bd33c1bd2b6a526a742498" | 8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=203a6dbc802ee896020a47161e759642" |
9 | 9 | ||
10 | SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ | 10 | SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ |
11 | " | 11 | " |
12 | 12 | ||
13 | SRC_URI[md5sum] = "b3b6d2c92f42a60667814358ab9f0cfd" | 13 | SRC_URI[md5sum] = "fd6cc8ec0a78c44036f825e739f36e5a" |
14 | SRC_URI[sha256sum] = "4d43f033cdbd0aa7b7023c81b0e986fd11e653b5248dac9144d508f11812ba41" | 14 | SRC_URI[sha256sum] = "b62c0e7937551d0cc02b8fd5cb0f544f9405bafc9a54d3808ed4594812edef43" |
15 | 15 | ||
16 | # python recipe is actually python 2.x | 16 | # python recipe is actually python 2.x |
17 | # also, exclude pre-releases for both python 2.x and 3.x | 17 | # also, exclude pre-releases for both python 2.x and 3.x |
diff --git a/meta/recipes-devtools/python/python3-testtools/no_traceback2.patch b/meta/recipes-devtools/python/python3-testtools/no_traceback2.patch new file mode 100644 index 0000000000..594510342b --- /dev/null +++ b/meta/recipes-devtools/python/python3-testtools/no_traceback2.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | traceback2 adds traceback for python2. Rather than depend on traceback2, we're | ||
2 | python3 only so just use traceback. | ||
3 | This caused breakage in oe-selftest -j which uses testtools on the autobuilder | ||
4 | using buildtools-tarball. | ||
5 | |||
6 | Upstream-Status: Inappropriate [Our recipe is python3 specific] | ||
7 | (Once py2 is EOL upstream probably could/should take this) | ||
8 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
9 | |||
10 | Index: testtools-2.3.0/testtools/content.py | ||
11 | =================================================================== | ||
12 | --- testtools-2.3.0.orig/testtools/content.py | ||
13 | +++ testtools-2.3.0/testtools/content.py | ||
14 | @@ -19,8 +19,7 @@ import os | ||
15 | import sys | ||
16 | |||
17 | from extras import try_import | ||
18 | -# To let setup.py work, make this a conditional import. | ||
19 | -traceback = try_import('traceback2') | ||
20 | +import traceback | ||
21 | |||
22 | from testtools.compat import ( | ||
23 | _b, | ||
diff --git a/meta/recipes-devtools/python/python3-testtools_2.3.0.bb b/meta/recipes-devtools/python/python3-testtools_2.3.0.bb index 896ecee65c..a254b90a75 100644 --- a/meta/recipes-devtools/python/python3-testtools_2.3.0.bb +++ b/meta/recipes-devtools/python/python3-testtools_2.3.0.bb | |||
@@ -1,2 +1,4 @@ | |||
1 | inherit setuptools3 | 1 | inherit setuptools3 |
2 | require python-testtools.inc | 2 | require python-testtools.inc |
3 | |||
4 | SRC_URI += "file://no_traceback2.patch" | ||
diff --git a/meta/recipes-devtools/python/python3/0001-Don-t-search-system-for-headers-libraries.patch b/meta/recipes-devtools/python/python3/0001-Don-t-search-system-for-headers-libraries.patch new file mode 100644 index 0000000000..acf8e1e9b5 --- /dev/null +++ b/meta/recipes-devtools/python/python3/0001-Don-t-search-system-for-headers-libraries.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 85e8f86ad2b7dec0848cd55b8e810a5e2722b20a Mon Sep 17 00:00:00 2001 | ||
2 | From: Jeremy Puhlman <jpuhlman@mvista.com> | ||
3 | Date: Wed, 4 Mar 2020 00:06:42 +0000 | ||
4 | Subject: [PATCH] Don't search system for headers/libraries | ||
5 | |||
6 | Upstream-Status: Inappropriate [oe-core specific] | ||
7 | Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> | ||
8 | --- | ||
9 | setup.py | 4 ++-- | ||
10 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
11 | |||
12 | diff --git a/setup.py b/setup.py | ||
13 | index 9da1b3a..59782c0 100644 | ||
14 | --- a/setup.py | ||
15 | +++ b/setup.py | ||
16 | @@ -674,8 +674,8 @@ class PyBuildExt(build_ext): | ||
17 | add_dir_to_list(self.compiler.include_dirs, | ||
18 | sysconfig.get_config_var("INCLUDEDIR")) | ||
19 | |||
20 | - system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib'] | ||
21 | - system_include_dirs = ['/usr/include'] | ||
22 | + system_lib_dirs = [] | ||
23 | + system_include_dirs = [] | ||
24 | # lib_dirs and inc_dirs are used to search for files; | ||
25 | # if a file is found in one of those directories, it can | ||
26 | # be assumed that no additional -I,-L directives are needed. | ||
27 | -- | ||
28 | 2.24.1 | ||
29 | |||
diff --git a/meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch b/meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch new file mode 100644 index 0000000000..c15295c034 --- /dev/null +++ b/meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From e3b59cb9658e1d3efa3535840939a0fa92a70a5a Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Mon, 7 Oct 2019 13:22:14 +0200 | ||
4 | Subject: [PATCH] setup.py: do not report missing dependencies for disabled | ||
5 | modules | ||
6 | |||
7 | Reporting those missing dependencies is misleading as the modules would not | ||
8 | have been built anyway. This particularly matters in oe-core's automated | ||
9 | build completeness checker which relies on the report. | ||
10 | |||
11 | Upstream-Status: Inappropriate [oe-core specific] | ||
12 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
13 | --- | ||
14 | setup.py | 4 ++++ | ||
15 | 1 file changed, 4 insertions(+) | ||
16 | |||
17 | diff --git a/setup.py b/setup.py | ||
18 | index 4b53668..0097643 100644 | ||
19 | --- a/setup.py | ||
20 | +++ b/setup.py | ||
21 | @@ -365,6 +365,10 @@ class PyBuildExt(build_ext): | ||
22 | print("%-*s %-*s %-*s" % (longest, e, longest, f, | ||
23 | longest, g)) | ||
24 | |||
25 | + # There is no need to report missing module dependencies, | ||
26 | + # if the modules have been disabled in the first place. | ||
27 | + missing = list(set(missing) - set(sysconf_dis)) | ||
28 | + | ||
29 | if missing: | ||
30 | print() | ||
31 | print("Python build finished successfully!") | ||
diff --git a/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch b/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch index 0bafec73c0..d49604ba4d 100644 --- a/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch +++ b/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 6229502e5ae6cbb22240594f002638e9ef78f831 Mon Sep 17 00:00:00 2001 | 1 | From a274ba778838824efcacaba57c415b7262f779ec Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Tue, 14 May 2013 15:00:26 -0700 | 3 | Date: Tue, 14 May 2013 15:00:26 -0700 |
4 | Subject: [PATCH] python3: Add target and native recipes | 4 | Subject: [PATCH] python3: Add target and native recipes |
diff --git a/meta/recipes-devtools/python/python3/CVE-2020-14422.patch b/meta/recipes-devtools/python/python3/CVE-2020-14422.patch new file mode 100644 index 0000000000..31ad82d7c5 --- /dev/null +++ b/meta/recipes-devtools/python/python3/CVE-2020-14422.patch | |||
@@ -0,0 +1,79 @@ | |||
1 | From b98e7790c77a4378ec4b1c71b84138cb930b69b7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tapas Kundu <39723251+tapakund@users.noreply.github.com> | ||
3 | Date: Wed, 1 Jul 2020 00:50:21 +0530 | ||
4 | Subject: [PATCH] [3.7] bpo-41004: Resolve hash collisions for IPv4Interface | ||
5 | and IPv6Interface (GH-21033) (GH-21231) | ||
6 | |||
7 | CVE-2020-14422 | ||
8 | The __hash__() methods of classes IPv4Interface and IPv6Interface had issue | ||
9 | of generating constant hash values of 32 and 128 respectively causing hash collisions. | ||
10 | The fix uses the hash() function to generate hash values for the objects | ||
11 | instead of XOR operation | ||
12 | (cherry picked from commit b30ee26e366bf509b7538d79bfec6c6d38d53f28) | ||
13 | |||
14 | Co-authored-by: Ravi Teja P <rvteja92@gmail.com> | ||
15 | |||
16 | Signed-off-by: Tapas Kundu <tkundu@vmware.com> | ||
17 | |||
18 | Upstream-Status: Backport [https://github.com/python/cpython/commit/b98e7790c77a4378ec4b1c71b84138cb930b69b7] | ||
19 | CVE: CVE-2020-14422 | ||
20 | Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> | ||
21 | |||
22 | --- | ||
23 | Lib/ipaddress.py | 4 ++-- | ||
24 | Lib/test/test_ipaddress.py | 11 +++++++++++ | ||
25 | .../Security/2020-06-29-16-02-29.bpo-41004.ovF0KZ.rst | 1 + | ||
26 | 3 files changed, 14 insertions(+), 2 deletions(-) | ||
27 | create mode 100644 Misc/NEWS.d/next/Security/2020-06-29-16-02-29.bpo-41004.ovF0KZ.rst | ||
28 | |||
29 | diff --git a/Lib/ipaddress.py b/Lib/ipaddress.py | ||
30 | index 80249288d73ab..54882934c3dc1 100644 | ||
31 | --- a/Lib/ipaddress.py | ||
32 | +++ b/Lib/ipaddress.py | ||
33 | @@ -1442,7 +1442,7 @@ def __lt__(self, other): | ||
34 | return False | ||
35 | |||
36 | def __hash__(self): | ||
37 | - return self._ip ^ self._prefixlen ^ int(self.network.network_address) | ||
38 | + return hash((self._ip, self._prefixlen, int(self.network.network_address))) | ||
39 | |||
40 | __reduce__ = _IPAddressBase.__reduce__ | ||
41 | |||
42 | @@ -2088,7 +2088,7 @@ def __lt__(self, other): | ||
43 | return False | ||
44 | |||
45 | def __hash__(self): | ||
46 | - return self._ip ^ self._prefixlen ^ int(self.network.network_address) | ||
47 | + return hash((self._ip, self._prefixlen, int(self.network.network_address))) | ||
48 | |||
49 | __reduce__ = _IPAddressBase.__reduce__ | ||
50 | |||
51 | diff --git a/Lib/test/test_ipaddress.py b/Lib/test/test_ipaddress.py | ||
52 | index 455b893fb126f..1fb6a929dc2d9 100644 | ||
53 | --- a/Lib/test/test_ipaddress.py | ||
54 | +++ b/Lib/test/test_ipaddress.py | ||
55 | @@ -2091,6 +2091,17 @@ def testsixtofour(self): | ||
56 | sixtofouraddr.sixtofour) | ||
57 | self.assertFalse(bad_addr.sixtofour) | ||
58 | |||
59 | + # issue41004 Hash collisions in IPv4Interface and IPv6Interface | ||
60 | + def testV4HashIsNotConstant(self): | ||
61 | + ipv4_address1 = ipaddress.IPv4Interface("1.2.3.4") | ||
62 | + ipv4_address2 = ipaddress.IPv4Interface("2.3.4.5") | ||
63 | + self.assertNotEqual(ipv4_address1.__hash__(), ipv4_address2.__hash__()) | ||
64 | + | ||
65 | + # issue41004 Hash collisions in IPv4Interface and IPv6Interface | ||
66 | + def testV6HashIsNotConstant(self): | ||
67 | + ipv6_address1 = ipaddress.IPv6Interface("2001:658:22a:cafe:200:0:0:1") | ||
68 | + ipv6_address2 = ipaddress.IPv6Interface("2001:658:22a:cafe:200:0:0:2") | ||
69 | + self.assertNotEqual(ipv6_address1.__hash__(), ipv6_address2.__hash__()) | ||
70 | |||
71 | if __name__ == '__main__': | ||
72 | unittest.main() | ||
73 | diff --git a/Misc/NEWS.d/next/Security/2020-06-29-16-02-29.bpo-41004.ovF0KZ.rst b/Misc/NEWS.d/next/Security/2020-06-29-16-02-29.bpo-41004.ovF0KZ.rst | ||
74 | new file mode 100644 | ||
75 | index 0000000000000..f5a9db52fff52 | ||
76 | --- /dev/null | ||
77 | +++ b/Misc/NEWS.d/next/Security/2020-06-29-16-02-29.bpo-41004.ovF0KZ.rst | ||
78 | @@ -0,0 +1 @@ | ||
79 | +CVE-2020-14422: The __hash__() methods of ipaddress.IPv4Interface and ipaddress.IPv6Interface incorrectly generated constant hash values of 32 and 128 respectively. This resulted in always causing hash collisions. The fix uses hash() to generate hash values for the tuple of (address, mask length, network address). | ||
diff --git a/meta/recipes-devtools/python/python3_3.7.6.bb b/meta/recipes-devtools/python/python3_3.7.8.bb index b33b7028d4..b18b3cd47d 100644 --- a/meta/recipes-devtools/python/python3_3.7.6.bb +++ b/meta/recipes-devtools/python/python3_3.7.8.bb | |||
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.python.org" | |||
3 | LICENSE = "PSFv2" | 3 | LICENSE = "PSFv2" |
4 | SECTION = "devel/python" | 4 | SECTION = "devel/python" |
5 | 5 | ||
6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e466242989bd33c1bd2b6a526a742498" | 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=203a6dbc802ee896020a47161e759642" |
7 | 7 | ||
8 | SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ | 8 | SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ |
9 | file://run-ptest \ | 9 | file://run-ptest \ |
@@ -28,18 +28,21 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ | |||
28 | file://reformat_sysconfig.py \ | 28 | file://reformat_sysconfig.py \ |
29 | file://0001-Use-FLAG_REF-always-for-interned-strings.patch \ | 29 | file://0001-Use-FLAG_REF-always-for-interned-strings.patch \ |
30 | file://0001-test_locale.py-correct-the-test-output-format.patch \ | 30 | file://0001-test_locale.py-correct-the-test-output-format.patch \ |
31 | file://0017-setup.py-do-not-report-missing-dependencies-for-disa.patch \ | ||
32 | file://CVE-2020-14422.patch \ | ||
31 | " | 33 | " |
32 | 34 | ||
33 | SRC_URI_append_class-native = " \ | 35 | SRC_URI_append_class-native = " \ |
34 | file://0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch \ | 36 | file://0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch \ |
35 | file://12-distutils-prefix-is-inside-staging-area.patch \ | 37 | file://12-distutils-prefix-is-inside-staging-area.patch \ |
38 | file://0001-Don-t-search-system-for-headers-libraries.patch \ | ||
36 | " | 39 | " |
37 | SRC_URI_append_class-nativesdk = " \ | 40 | SRC_URI_append_class-nativesdk = " \ |
38 | file://0001-main.c-if-OEPYTHON3HOME-is-set-use-instead-of-PYTHON.patch \ | 41 | file://0001-main.c-if-OEPYTHON3HOME-is-set-use-instead-of-PYTHON.patch \ |
39 | " | 42 | " |
40 | 43 | ||
41 | SRC_URI[md5sum] = "c08fbee72ad5c2c95b0f4e44bf6fd72c" | 44 | SRC_URI[md5sum] = "a224ef2249a18824f48fba9812f4006f" |
42 | SRC_URI[sha256sum] = "55a2cce72049f0794e9a11a84862e9039af9183603b78bc60d89539f82cf533f" | 45 | SRC_URI[sha256sum] = "43a543404b363f0037f89df8478f19db2dbc0d6f3ffee310bc2997fa71854a63" |
43 | 46 | ||
44 | # exclude pre-releases for both python 2.x and 3.x | 47 | # exclude pre-releases for both python 2.x and 3.x |
45 | UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar" | 48 | UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar" |
@@ -65,7 +68,7 @@ ALTERNATIVE_LINK_NAME[python-config] = "${bindir}/python${PYTHON_BINABI}-config" | |||
65 | ALTERNATIVE_TARGET[python-config] = "${bindir}/python${PYTHON_BINABI}-config-${MULTILIB_SUFFIX}" | 68 | ALTERNATIVE_TARGET[python-config] = "${bindir}/python${PYTHON_BINABI}-config-${MULTILIB_SUFFIX}" |
66 | 69 | ||
67 | 70 | ||
68 | DEPENDS = "bzip2-replacement-native libffi bzip2 gdbm openssl sqlite3 zlib virtual/libintl xz virtual/crypt util-linux libtirpc libnsl2" | 71 | DEPENDS = "bzip2-replacement-native libffi bzip2 openssl sqlite3 zlib virtual/libintl xz virtual/crypt util-linux libtirpc libnsl2" |
69 | DEPENDS_append_class-target = " python3-native" | 72 | DEPENDS_append_class-target = " python3-native" |
70 | DEPENDS_append_class-nativesdk = " python3-native" | 73 | DEPENDS_append_class-nativesdk = " python3-native" |
71 | 74 | ||
@@ -90,13 +93,23 @@ python() { | |||
90 | d.setVar('PACKAGECONFIG_PGO', '') | 93 | d.setVar('PACKAGECONFIG_PGO', '') |
91 | } | 94 | } |
92 | 95 | ||
93 | PACKAGECONFIG_class-target ??= "readline ${PACKAGECONFIG_PGO}" | 96 | PACKAGECONFIG_class-target ??= "readline ${PACKAGECONFIG_PGO} gdbm" |
94 | PACKAGECONFIG_class-native ??= "readline" | 97 | PACKAGECONFIG_class-native ??= "readline gdbm" |
95 | PACKAGECONFIG_class-nativesdk ??= "readline" | 98 | PACKAGECONFIG_class-nativesdk ??= "readline gdbm" |
96 | PACKAGECONFIG[readline] = ",,readline" | 99 | PACKAGECONFIG[readline] = ",,readline" |
97 | # Use profile guided optimisation by running PyBench inside qemu-user | 100 | # Use profile guided optimisation by running PyBench inside qemu-user |
98 | PACKAGECONFIG[pgo] = "--enable-optimizations,,qemu-native" | 101 | PACKAGECONFIG[pgo] = "--enable-optimizations,,qemu-native" |
99 | PACKAGECONFIG[tk] = ",,tk" | 102 | PACKAGECONFIG[tk] = ",,tk" |
103 | PACKAGECONFIG[gdbm] = ",,gdbm" | ||
104 | |||
105 | do_configure_prepend () { | ||
106 | mkdir -p ${B}/Modules | ||
107 | cat > ${B}/Modules/Setup.local << EOF | ||
108 | *disabled* | ||
109 | ${@bb.utils.contains('PACKAGECONFIG', 'gdbm', '', '_gdbm _dbm', d)} | ||
110 | ${@bb.utils.contains('PACKAGECONFIG', 'readline', '', 'readline', d)} | ||
111 | EOF | ||
112 | } | ||
100 | 113 | ||
101 | CPPFLAGS_append = " -I${STAGING_INCDIR}/ncursesw -I${STAGING_INCDIR}/uuid" | 114 | CPPFLAGS_append = " -I${STAGING_INCDIR}/ncursesw -I${STAGING_INCDIR}/uuid" |
102 | 115 | ||
diff --git a/meta/recipes-devtools/python/python_2.7.17.bb b/meta/recipes-devtools/python/python_2.7.18.bb index 5b856a5097..5b856a5097 100644 --- a/meta/recipes-devtools/python/python_2.7.17.bb +++ b/meta/recipes-devtools/python/python_2.7.18.bb | |||