aboutsummaryrefslogtreecommitdiff
path: root/lang/python/python3
Commit message (Collapse)AuthorAge
...
* python3: bump to version 3.8Alexandru Ardelean2019-10-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This required a bit work to get working, compared to other versions. So, some things have changed a bit more significantly. Some highlights: * there is no longer a pgen executable, seems this is now part of libpython; let's see what this means for us in the future * blake2 hash (from OpenSSL) detection needs some fixing; will upstream added patch 002-fix-blake2-detection.patch * removed all bpo patches; those should be fixed in upstream * some needed to be manually re-applied as stuff changed: - 001-enable-zlib.patch - file changed - 004-do-not-write-bytes-codes.patch - file changed - 015-abort-on-failed-modules.patch - variable was renamed cross_compiling -> CROSS_COMPILING * 017_lib2to3_fix_pyc_search.patch - the code changed, it does not seem to have the original problem with respect to file-extension, as there does not seem to be any special extension logic anymore there * 006-remove-multi-arch-and-local-paths.patch - dropped patch; I can't remember the full-details of this issue; it was something with Debian/Ubuntu's multi-arch stuff; it was probably added maybe due to some overzealous (on my part) thingy caused by some weird reports, that I could never solve; let's have this patch dropped and see * make package/python3/refresh to reduce fuzz for the rest Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
* python,python3: Fix CVE-2019-16056, CVE-2019-16935Jeffery To2019-10-04
| | | | | | | | | | | | | | | 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-29
| | | | | | Fixes: CVE-2019-16935 Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
* python,python3: split python[3]-pkg-resources from setuptoolsAlexandru Ardelean2019-09-20
| | | | | | | | | | 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>
* python,python3: Fix host Python compilation for macOSJeffery To2019-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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-22
| | | | | | | | | | | | | | | 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-10
| | | | | | | | | | | | | - 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>
* python3: use _python_sysroot for cross-compilationEneas U de Queiroz2019-06-26
| | | | | | | 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>
* python,python3: Move python-config to $(STAGING_DIR)/hostJeffery To2019-06-10
| | | | | | | | | 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-05
|\ | | | | python,python3: Fix CVE-2019-9948 - local_file:// allowed in urllib
| * python,python3: Fix CVE-2019-9948 - local_file:// allowed in urllibJeffery To2019-06-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-03
|\ \ | |/ |/| | | | | 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-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-03
|\ \ | | | | | | python,python3: Better isolate host Python
| * | python,python3: Disable user site-packages for host PythonJeffery To2019-05-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-03
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-30
|\ \ | | | | | | | | | | | | 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-30
| | | | | | | | | | | | | | | | | | | | | 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-30
|\ \ \ | |/ / |/| | python-setuptools,python-pip: Installation changes
| * | python3-setuptools,python3-pip: Use more predictable pycache cleanupJeffery To2019-05-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-29
| | | | | | | | | | | | | | | | | | | | | | | | 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-29
| |/ | | | | | | | | | | | | | | | | | | 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-28
|/ | | | | | | 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-24
| | | | | | | | | | | | | | | | | | 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-21
| | | | | | 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-21
| | | | | | 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-20
| | | | | | | | | | 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-31
| | | | | | | | | | | | | | | | | | | 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-31
| | | | | | | | | | 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-27
| | | | | | | | | | | | 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-19
| | | | | | | | | | | 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-12
|\ | | | | python: Add PKG_CPE_ID for proper CVE tracking
| * python: Add PKG_CPE_ID for proper CVE trackingRosen Penev2019-03-11
| | | | | | | | Signed-off-by: Rosen Penev <rosenp@gmail.com>
* | python3: Fix compilation with deprecated OpenSSL APIsRosen Penev2019-03-11
|/ | | | | | Also refreshed patches. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* Merge pull request #8308 from commodo/python3-pip-fixHannu Nyman2019-03-01
|\ | | | | python3-pip: fix install rule
| * python3-pip: fix install ruleAlexandru Ardelean2019-02-27
| | | | | | | | | | | | | | | | | | | | | | Fixes: https://github.com/openwrt/packages/issues/8301 This seems to have slipped for some time. No idea if it ever worked. It could be that this worked at some point. In any case, the shebang is properly updated now. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
* | Merge pull request #8307 from commodo/python3-split-urllibHannu Nyman2019-03-01
|\ \ | | | | | | python3: split python3-urllib from python3-light
| * | python3: split python3-urllib from python3-lightAlexandru Ardelean2019-02-26
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | This is the result of this discussion: https://github.com/openwrt/packages/issues/8285 `urllib.request` requires the `email` module/lib, which was part of python3-light. This change moves the Lib/urllib folder from the python3-light into it's own package, making it lighter. At least this way, users that want `urllib` (on top of `python3-light`) will be forced to install it via opkg and this will make sure `python3-email` gets installed as well. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
* / python,python3: add Jeffery To as co-maintainerAlexandru Ardelean2019-02-27
|/ | | | | | | | | | | | | | For a while now, Jeffery has helped quite a lot with Python, and is now unofficial go-to guy [for problems] with Python packages. This change adds him as co-maintainer [if he also agrees]. I'm not going away; I'll be still doing the same work for Python. This change serves to recognize Jeffery in an official way, since he's already taking on these things. And 2 co-maintainers is better in case one kicks the bucket [by accident]. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
* python,python3: do not package binary files to base packagesKarel Kočí2019-02-21
| | | | | | | | | | | | | | Thanks to fix 200a5a2eec896b2d34f1114d14df66d810c1f4bd all base packages now contain all binaries that are generated as part of python installation. That causes collision between those packages with package managers that consider this such as Turris updater-ng. This is also just wrong. Those binaries were not included and should not be after mentioned fix as well. This just adds empty install definition. The idea is to override the default one that is otherwise used. Signed-off-by: Karel Kočí <karel.koci@nic.cz>
* python,python3: fix CVE-2019-5010 - Denial of ServiceAlexandru Ardelean2019-02-12
| | | | | | | | | | This patch addresses issue: [ssl][CVE-2019-5010] TALOS-2018-0758 Denial of Service Link to Python issue: https://bugs.python.org/issue35746 Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
* python,python3: move shebang handle in install scriptAlexandru Ardelean2019-02-12
| | | | | | | | | | | | This extends the Python[3] shebang fixup to all packages. Only Python scripts in `/usr/bin` will be handled at the moment. Later it may make sense to also cover executables in `/bin`, though typically Python executables shouldn't be placed there. Previously the shebang handling was only done for python[3]-pip & python[3]-setuptools. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
* python,python3: make deletion tolerant for paths with spacesAlexandru Ardelean2019-02-12
| | | | | | | | | Piping to xargs does not handle spaces in paths too well, because it splits up the paths. For deleting empty dirs, we also need to do several retries, otherwise `find` will try to go through the directories after they're deleted. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
* python3: install pkgconfig to stagingDaniel F. Dickinson2019-01-18
| | | | | | | | | | | Some programs that use the Python C API have difficulties finding cross-compiled Python3 without the pkgconfig, so make sure we have python3.pc and python-3.7.pc in pkgconfig staging dir. CircleCI requires a package Makefile change to actually do the CI check, so bump PKG_RELEASE. Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
* python3: enable lib2to3 to also search and fix .pyc files.Nj Hsiong2019-01-09
| | | | | | python3's lib2to3 would fail in silence if python3 and its packages are installed as compiled .pyc files. Root cause is, in Lib/lib2to3/refactor.py, the function get_all_fix_names only searches '.py' fix names. Signed-off-by: Nj Hsiong <nj.hsiong@gmail.com>
* python,python3: use setuptools & pip versions from python{3}-version.mkAlexandru Ardelean2019-01-02
| | | | | | | | | | | `setuptools` & `pip` whl files were selected via wildcards, because it was easier in the beginning. Also, initially there weren't any PYTHON{3}_{SETUTPTOOLS/PIP}_VERSION variables. But now since these vars exist, it makes sense to use them, because we can catch easier (at build) time if Python/Python3 bump these versions. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
* python3: bump to version 3.7.2Alexandru Ardelean2018-12-31
| | | | Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
* python/python3: fix .dist-info missing for setuptools and pipJeffery To2018-12-22
| | | | | | | Without .dist-info (similar to .egg-info), setuptools and pip are not discoverable by pkg_resources. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* python3: bump to version 3.7.1Alexandru Ardelean2018-11-02
| | | | | | | | | | | | This change bumps Python3 version to 3.7.1. Patch `002-fix-implicit-dh-free-declaration.patch` is now included in upstream. This also fixes CVE-2018-1061. https://www.cvedetails.com/cve/CVE-2018-1061/ Compile & run-tested on x86. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
* Python3: Fix host build on OpenSUSEJan Kardell2018-10-08
| | | | | | | | | | | | | The linker option -rpath is required to find libs in staging_dir. Now it is included when building host modules. Without it the import test of the _ctypes and _uuid modules would fail. The _ctypes module uses libffi.so.6 from staging, but OpenSUSE LEAP 15 has libffi.so.7. It will also fail on LEAP 42.x, Fedora28 and 29 and future or old versions of Ubuntu. Fix needed in master and 18.06 branches. Signed-off-by: Jan Kardell <jan.kardell@telliq.com>