summaryrefslogtreecommitdiff
path: root/lang/python/python3
Commit message (Collapse)AuthorAgeFilesLines
* python3: Update to 3.7.17Jeffery To2023-06-123-21/+21
| | | | | | | This includes an updated patch for pip, as the bundled pip was also updated with this release. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* python3: Update to 3.7.16, refresh patchesJeffery To2023-03-165-8/+8
| | | | | | | | | | | | | | | Includes fixes: * 3.7.14: * CVE-2020-10735: Prevent DoS by large int<->str conversions * CVE-2021-28861: http.server: Open Redirection if the URL path starts with // * 3.7.16: * CVE-2022-45061: Slow IDNA decoding with large strings * CVE-2022-37454: Buffer overflow in the _sha3 module * CVE-2015-20107: mailcap.findmatch: document shell command Injection danger in filename parameter Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* python3: Update to 3.7.13, refresh patchesJeffery To2022-03-226-15/+13
| | | | | | | | | Includes fixes for: * Windows builds updated to bzip2 1.0.8 to mitigate CVE-2016-3189 and CVE-2019-12900 * CVE-2022-26488: Escalation of privilege via Windows Installer Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* python3: update to version 3.7.12Josef Schlehofer2021-09-081-1/+1
| | | | | | | Fixes: CVE-2013-0340 (Windows and MacOS only) and smtplib multiple CRLF injection Changelog: https://www.python.org/downloads/release/python-3712/ Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
* python3: update to version 3.7.11Josef Schlehofer2021-07-061-1/+1
| | | | | | Fixes: CVE-2021-3426 Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
* python3: Update to 3.7.10, refresh patchesJeffery To2021-02-222-4/+4
| | | | | | | | | Includes fixes for: * CVE-2021-3177 - ctypes: Buffer overflow in PyCArg_repr * CVE-2021-23336 - urllib parse_qsl(): Web cache poisoning - semicolon as a query args separator Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* python3: Update to 3.7.9, refresh/remove backported patchesJeffery To2020-10-1710-391/+8
| | | | Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* python3: fix host compilation with clangRosen Penev2020-08-151-1/+1
| | | | | | | Matched rpath parameter with Makefile. Signed-off-by: Rosen Penev <rosenp@gmail.com> (cherry picked from commit b40c40151c2ac3dd11d908a0548ac97e6b5c8455)
* python3: Backport security fixesJeffery To2020-07-206-1/+384
| | | | | | | | This backports fixes for security issues, including: * CVE-2020-14422: Hash collisions in IPv4Interface and IPv6Interface * CVE-2019-20907: Infinite loop in the tarfile module Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* python3: Use default _PYTHON_HOST_PLATFORMJeffery To2020-07-082-10/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lets the Python build process set _PYTHON_HOST_PLATFORM instead of forcing an explicit value. Also: * Save the target _PYTHON_HOST_PLATFORM value during Build/InstallDev for use when building target Python packages (in python3-package.mk). * Use the (mostly) default PYTHON_FOR_BUILD value, instead patch configure to remove the platform triplet from the sysconfigdata file name. * Remove the "CROSS_COMPILE=yes" make variable (there is no indication that this variable is necessary). * Force host pip to build packages from source instead of downloading binary wheels. Previously, host pip can download universal (platform-independent) wheels but not platform-specific wheels, because of the custom _PYTHON_HOST_PLATFORM value. (Packages that do not have universal wheels would be compiled from source.) With a correct _PYTHON_HOST_PLATFORM, host pip can install platform-specific wheels as well. However, the pre-built shared object (.so) files in these wheels will have the host's platform triplet in their file names. When target Python packages are built (using the target's _PYTHON_HOST_PLATFORM), Python will not use these shared object files. By forcing host pip to build packages from source, the built shared object files will not have the platform triplet in their file names. (Host Python has been patched to remove the platform triplet from file names.) This allows these packages to be used when building target Python packages. (The net effect of this complete change is that platform-dependent packages will continue to be compiled from source, while platform-independent packages will now also be compiled from source.) Fixes https://github.com/openwrt/packages/issues/12680. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* python3: Update to 3.7.8, refresh/rework patchesJeffery To2020-06-3010-38/+33
| | | | | | | | | | | | This contains a fix for CVE-2020-8492 (Denial of service in urllib.request.AbstractBasicAuthHandler)[1]. This also updates the setuptools and pip packages to 47.1.0 and 20.1.1, respectively. [1]: https://docs.python.org/release/3.7.8/whatsnew/changelog.html#python-3-7-8-release-candidate-1 Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* python3-setuptools: Fix error when installing from sourceJeffery To2020-05-212-0/+17
| | | | | | | | | | | | | | | | | | | | When a Python package is installed from source (i.e. using setup.py) into a custom location (with --home), setuptools may want to create a site.py file in the custom location. This file is created based on the source code of site-patch.py, a file bundled with setuptools. Because the normal OpenWrt setuptools package does not contain Python source code, this file is missing and the installation will end with an error. This copies site-patch.py to site-patch.py.txt so that it will be included in python3-setuptools, and patches setuptools to look for this file. See https://github.com/openwrt/packages/issues/12223 Signed-off-by: Jeffery To <jeffery.to@gmail.com> (cherry picked from commit 70a7f736c5d6fb9ebec1acc8b3e8ca77704361bf)
* python3-openssl: Add dependency on ca-certsJeffery To2020-05-202-2/+2
| | | | | | | | | | The ssl module assumes OpenSSL can load the default trust anchors (root CA certificates). From https://github.com/openwrt/packages/issues/12209 Signed-off-by: Jeffery To <jeffery.to@gmail.com> (cherry picked from commit d2b0cc523dadc6a8ec4535561860b77cc9ee4fe2)
* python3: Fix host build tool names recorded in target filesJeffery To2020-04-282-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | Python will record the values of CC, CXX, AR, and READELF (and other configure options) used during compilation. pip will use these programs when asked to compile extension modules on the target device. * If ccache is used during build, CC and CXX will be ccache_cc and ccache_cxx, respectively, which are not available on-device (#11912). * If an external toolchain is used during build, the values of these variables will contain the external toolchain prefix, which may not be available on target. * If the normal toolchain is used during build, AR and READELF will contain the toolchain prefix, but the names of ar and readelf on-device do not contain the prefix; they are named "ar" and "readelf". This changes the values of these variables in Python's files to match the names available on-device, and without any toolchain prefix. Signed-off-by: Jeffery To <jeffery.to@gmail.com> (cherry picked from commit 9f81ab895eca0709d1a7b4804b36a5cd00b4f368)
* python3-pip: Fix error when installing packages that require compilationJeffery To2020-04-241-0/+13
| | | | | | | This addresses one of the issues raised in #11912. Signed-off-by: Jeffery To <jeffery.to@gmail.com> (cherry picked from commit 11bc05763d6cb351842a7bd55e736b601656a41a)
* python3: update to version 3.7.7Josef Schlehofer2020-03-141-2/+2
| | | | Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
* python3: Fix float byte order detectionJeffery To2020-01-303-1/+429
| | | | | | | | | | | | | | | | This backports patches from bpo-34585[1] to fix byte order detection of floats. Fixing byte order detection allows the repr() of floats to be shorter[2]. sys.float_repr_style should be 'short' instead of 'legacy' on supported platforms. See #11134. [1]: https://bugs.python.org/issue34585 [2]: https://docs.python.org/3.8/whatsnew/3.1.html#other-language-changes Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* python,python3: split python[3]-pkg-resources from setuptoolsAlexandru Ardelean2020-01-103-3/+41
| | | | | | | | | | | | | | | | This package is required by other packages to run some binaries via `load_entry_point`. So, this splits this package away from setuptools. setuptools is pretty big, akd pkg-resources is also big, but not as big. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com> (cherry picked from commit ed0e77f3c385770065bf6ec6ed7c3bbbb6deb395) Reference to discussion at https://github.com/openwrt/packages/commit/c61579b564a3877235d74684b1a75915d77e42a9#commitcomment-36665837 Adjusted python PKG_RELEASE items to current situation Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
* python3: Updated to version 3.7.6Josef Schlehofer2019-12-211-1/+1
| | | | Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
* python3: Update to version 3.7.5Josef Schlehofer2019-10-2110-453/+12
| | | | | | | | | | | | | | setuptools: Updated to version 41.2.0 pip: Updated to version 19.2.3 Removed patches: - 017: code was refactored - 02{5,6,7,8}: those patches were backported from upstream and they are included in 3.7.5 Refreshed patches Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
* python,python3: Fix CVE-2019-16056, CVE-2019-16935Jeffery To2019-10-052-1/+130
| | | | | | | | | | | | | | | These patches address issues: CVE-2019-16056: email.utils.parseaddr mistakenly parse an email CVE-2019-16935: A reflected XSS in python/Lib/DocXMLRPCServer.py (for Python 2.7) CVE-2019-16935 was fixed for python3 in #10109 Links to Python issues: https://bugs.python.org/issue34155 https://bugs.python.org/issue38243 Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* python3: backport three security patchesJosef Schlehofer2019-09-304-1/+298
| | | | | | | Fixes: CVE-2019-16935 Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com> (cherry-picked from commit 80def9e)
* python,python3: Fix host Python compilation for macOSJeffery To2019-08-171-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | * Remove $$$$(pkg-config --static --libs libcrypto libssl) from HOST_LDFLAGS Having this leads to an "unknown type name 'u_int'" error on Mac. Removing it doesn't appear to affect Python's ability to find buildroot LibreSSL. * Change -Wl,-rpath=... to -Wl,-rpath,... in HOST_LDFLAGS The equals sign version is not supported by the Mac linker (appears to be an GNU extension). The comma version is supported; -rpath and its argument will be separated by a space when passed to the linker. * Add ac_cv_header_libintl_h=no to HOST_CONFIGURE_VARS for Mac Python on Mac doesn't expect to use libintl, but if gettext-full is compiled for host, it will try, leading to undefined symbol errors during compilation. This prevents configure from finding libintl.h. Fixes #7171. Fixes #9621. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* python,python3: Fix ctypes.util.find_library()Jeffery To2019-07-222-1/+75
| | | | | | | | | | | | | | | Python's ctypes.util.find_library() function currently doesn't work for musl libraries/systems[1]. This adds a patch to fix this function, based on a patch from Alpine Linux[2]. Fixes #9448. [1]: https://bugs.python.org/issue21622 [2]: https://git.alpinelinux.org/aports/tree/main/python2/musl-find_library.patch Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* python3: Update to version 3.7.4Josef Schlehofer2019-07-1014-521/+19
| | | | | | | | | | | | | | - Update setuptools to 40.8.0 - Update pip to 19.0.3 - Refreshed patches - Removed 4 patches (2 of them was included in 3.7.3 and other two are included in this release) Makefile python3: - Move PKG_MAINTAINER above PKG_LICENSE Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com> (cherry-picked from ce769db0077f3ace8ef691cf33b827a10e0613a5)
* python3: use _python_sysroot for cross-compilationEneas U de Queiroz2019-07-102-1/+68
| | | | | | | | This patch, taken from buildroot, avoids the use of host paths when compiling third-party extensions. Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com> (cherry-picked from 523c52f6f272810a6183f7e1302c09e9a7f16f46)
* python,python3: Move python-config to $(STAGING_DIR)/hostJeffery To2019-06-101-2/+5
| | | | | | | | | Build/InstallDev is passed a second argument, a path where host binaries should be placed (ultimately $(STAGING_DIR)/host). This change moves python[3]-config to that directory. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* Merge pull request #9131 from jefferyto/python-bpo-35907Rosen Penev2019-06-052-1/+77
|\ | | | | python,python3: Fix CVE-2019-9948 - local_file:// allowed in urllib
| * python,python3: Fix CVE-2019-9948 - local_file:// allowed in urllibJeffery To2019-06-042-1/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | These patches address issue: CVE-2019-9948: Unnecessary URL scheme exists to allow local_file:// reading file in urllib Link to Python issue: https://bugs.python.org/issue35907 Issue 35907 is still currently open, waiting for a decision for Python 3.5; these patches for Python 2.7 and 3.7 have been merged. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* | Merge pull request #9114 from ↵Hannu Nyman2019-06-031-6/+20
|\ \ | |/ |/| | | | | jefferyto/python-host-setuptools-pip-installed-pkg-release python,python3: Record PKG_RELEASE for host setuptools/pip
| * python,python3: Record PKG_RELEASE for host setuptools/pipJeffery To2019-06-011-6/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the "patched" indicator files for host setuptools and pip to include their PKG_RELEASE values. This also removes host setuptools and/or pip before host install, if the installed copy does not match the version (and PKG_RELEASE) of the copy to be installed. This will allow added or removed patches to affect host setuptools / pip, since these changes will cause PKG_RELEASE to be incremented. This also fixes the host install error, when the install tries to patch an already patched copy of setuptools. (This error occurs because the existing indicator files do not have version numbers in their file names, whereas host install expected version numbers to be present.) Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* | Merge pull request #9100 from jefferyto/isolate-host-pythonRosen Penev2019-06-031-0/+5
|\ \ | | | | | | python,python3: Better isolate host Python
| * | python,python3: Disable user site-packages for host PythonJeffery To2019-05-291-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Normally, Python will include the user's site-packages directory (~/.local/lib/python$(PYTHON_VERSION)/site-packages) in it's internal search path for modules. This disables this default inclusion for host Python. This change is applied during Host/Configure instead of as a patch to keep this setting unchanged for target Python. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* | | python,python3: Fix CVE-2019-9740 and CVE-2019-9947Jeffery To2019-06-032-1/+147
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | These patches address issues: CVE-2019-9740: Python urllib CRLF injection vulnerability CVE-2019-9947: Header Injection in urllib Links to Python issues: https://bugs.python.org/issue36276 (resolved duplicated of 30458) https://bugs.python.org/issue35906 (resolved duplicated of 30458) https://bugs.python.org/issue30458 Issue 30458 is still currently open, waiting for a decision for Python 3.5; these patches for Python 2.7 and 3.7 have been merged. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* | Merge pull request #9103 from ↵Hannu Nyman2019-05-301-8/+10
|\ \ | | | | | | | | | | | | jefferyto/python-host-patch-upgraded-setuptools-pip python,python3: Allow upgraded host setuptools/pip to be patched
| * | python,python3: Allow upgraded host setuptools/pip to be patchedJeffery To2019-05-301-8/+10
| | | | | | | | | | | | | | | | | | | | | This adds the current setuptools/pip version numbers to the indicator files' names, which should allow upgraded versions to be patched. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* | | Merge pull request #9101 from jefferyto/python-setuptools-pip-installHannu Nyman2019-05-303-22/+26
|\ \ \ | |/ / |/| | python-setuptools,python-pip: Installation changes
| * | python3-setuptools,python3-pip: Use more predictable pycache cleanupJeffery To2019-05-292-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This uses two find commands to delete __pycache__ contents then the __pycache__ directories, rather than a for loop. The second command omits a -empty test, so that if the first command doesn't remove all directory contents for some reason, the second command will return an error (find will not delete a non-empty directory). Signed-off-by: Jeffery To <jeffery.to@gmail.com>
| * | python-setuptools,python-pip: Change prefix to /usrJeffery To2019-05-293-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | This changes the --prefix option, passed to host pip when "installing" target setuptools and pip, to /usr, in case the prefix is recorded in the packages. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
| * | python-setuptools,python-pip: Set pip cache dir, disable version checkJeffery To2019-05-291-2/+8
| |/ | | | | | | | | | | | | | | | | | | This adds --cache-dir and --disable-pip-version-check options for host pip, when "installing" target setuptools and pip. This also changes the pip command to use $(HOST_PYTHON[3]_PIP) from python[3]-host.mk. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* / python,python3: Use ensurepip=upgrade for host PythonJeffery To2019-05-281-1/+1
|/ | | | | | | This changes --with-ensurepip=install to upgrade, to upgrade host versions of setuptools and pip to the Python-bundled versions. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* python-setuptools: Add reproducibility patches from DebianJeffery To2019-05-244-0/+56
| | | | | | | | | | | | | | | | | | This adds the ability to patch setuptools (and pip), and adds 3 reproducibility patches from Debian[1]. (003-PKG-INFO-output-reproducible.patch addresses the issue identified in #9039.) The patching is not perfect, in that the patches are applied to setuptools and pip after they have been installed, since they are installed from wheels which are already "precompiled". Also, patching for the host install cannot be updated in place, for example if a patch is added or removed. [1]: https://sources.debian.org/patches/python-setuptools/40.8.0-1/ Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* python-python3-pip: add LICENSE informationEneas U de Queiroz2019-05-211-0/+3
| | | | | | CVE id was left commented out as it is not handled by uscan. Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
* python-python3-setuptools: add LICENSE informationEneas U de Queiroz2019-05-211-0/+3
| | | | | | CVE id was left commented out as it is not handled by uscan. Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
* python3: refresh LICENSE informationEneas U de Queiroz2019-05-201-3/+3
| | | | | | | | | | Changed PKG_LICENSE to reflect spdx license tag, and PKG_LICENSE_FILES to include all lincense-related files applicable to the parts of the code we are actually using to build and/or distributing. The Windows-only files, and the python-bundled Tools we're not using have been left out. Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
* python,python3: Include python-config for target Python in InstallDevJeffery To2019-03-311-1/+5
| | | | | | | | | | | | | | | | | | | This installs python{2.7,3.7}-config in $(STAGING_DIR)/usr/bin as part of Build/InstallDev, to be used by other packages to get build configuration for target Python. The treatment for Python 2 and 3 are a bit different: * For Python 2, python-config is a Python script that is expected to be run with, and return data for, the installed Python interpreter. This installs a modified version of this script, to be run using host Python, and read/return data for target Python. * Python 3 includes a shell script version of python-config (expected to be used in cross-compilation scenarios). This simply installs the script into the right place. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* python,python3: Fix CVE-2019-9636 - urlsplit missing NFKC normalizationJeffery To2019-03-312-1/+151
| | | | | | | | | | These patches address issue: CVE-2019-9636: urlsplit does not handle NFKC normalization Link to Python issue: https://bugs.python.org/issue36216 Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* python,python3: Use only target package data for Build/InstallDevJeffery To2019-03-271-10/+4
| | | | | | | | | | | | This changes Build/InstallDev for both Python 2 and 3 to only copy files from target Python, not from host Python, since InstallDev files are used for target packages to link to other target packages. In particular, usr/lib/python{2.7,3.7}/_sysconfigdata.py holds system configuration data generated at build time, and is different for target Python and host Python. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* python3: remove OpenSSL deprecated API patchAlexandru Ardelean2019-03-193-311/+1
| | | | | | | | | | | Fixes: https://github.com/openwrt/packages/issues/8399 These 2 patches cause some breakage for other packages. For now, we drop them and wait for upstream to finalize a fix. We can live with deprecated SSL APIs for a while. No need to hurry, since this doesn't seem to help. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
* Merge pull request #8371 from neheb/patch-1Hannu Nyman2019-03-121-0/+1
|\ | | | | python: Add PKG_CPE_ID for proper CVE tracking