Commit Graph

30 Commits

Author SHA1 Message Date
Michal Vasilek
49417788f1 python3: update to 3.10.7
* fixes CVE-2021-28861
* adjust pip and setuptools versions
* refresh patches

Signed-off-by: Michal Vasilek <michal.vasilek@nic.cz>
2022-11-08 13:36:19 +08:00
Rosen Penev
e7d926cdae python3: use tools/expat for host build
Oversight from when the expat host build was removed.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-11-08 13:36:19 +08:00
Šimon Bořek
51b0fbd78d python3: backport and fix target musl libc detection
Patch 030:
Backported from Python main branch[^1] for Python to distinguish between glibc and musl libc SOABI.

Patch 131:
Changes PLATFORM_TRIPLET -gnu/-musl suffix detection (performed by the backported patch)
to be based on the target OS instead of the building OS.

See included patches for more detailed descriptions.

Specifically this fixes cross-compilation for mpc8548 CPUs with SPE instructions[^2] enabled.

[^1]: merged to python:main as https://github.com/python/cpython/pull/24502 'bpo-43112: detect musl as a separate SOABI'
[^2]: https://www.nxp.com/docs/en/reference-manual/SPEPEM.pdf

Co-authored-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Šimon Bořek <simon.borek@nic.cz>
2022-11-08 13:36:19 +08:00
Andre Heider
c08a8b5b13 python3: update patches for libressl v3.5
Based upon patches from OpenBSD[0] and Gentoo[1].

Switched to the LibreSSL provided LIBRESSL_VERSION_NUMBER macro, which
makes OPENWRT_HOST_BUILD redundant.

[0] https://github.com/openbsd/ports/tree/master/lang/python/3.10/patches
[1] https://github.com/gentoo/libressl/tree/master/dev-lang/python/files

Signed-off-by: Andre Heider <a.heider@gmail.com>
2022-11-08 13:36:19 +08:00
Jeffery To
b463f3ab07 python3: Update to 3.10.5, refresh patches
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2022-11-08 13:36:19 +08:00
Jeffery To
868a73571b python3: Update to 3.10.4
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2022-11-08 13:36:19 +08:00
Jeffery To
15589e200f python3: Update to 3.10.3, refresh patches
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>
2022-11-08 13:36:18 +08:00
Jeffery To
1dd1926505 python3: Update to 3.10.2, refresh patches
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2022-11-08 13:36:18 +08:00
Jeffery To
a42ba715f7 python3: Update to 3.10.1, refresh/remove patches
Removed patches:
* 027-bpo-43158-Use-configure-values-for-building-_uuid-ex.patch
  Already merged.
* 029-disable-deprecation-warning.patch
  Packages should be patched/fixed to remove the use of distutils
  instead of disabling this warning.

Also:
* Updates PKG_LICENSE to use the correct SPDX license identifier
* Fixes build for mipsel_24kc_24kf

Fixes https://github.com/openwrt/packages/issues/17217.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2022-11-08 13:36:18 +08:00
Alexandru Ardelean
7e63f08563 python3: bump to version 3.10.0
Manually re-applied:
  008-distutils-use-python-sysroot.patch
  016-adjust-config-paths.patch

Drop patch: 003-do-not-run-distutils-tests.patch
There is now a configure option '--disable-test-modules'
And seems we left the '_ctypes_test' around for quite some time.
Dropped now.
Refs:
  https://bugs.python.org/issue27640
  https://bugs.python.org/issue43282

Drop patch: 013-getbuildinfo-date-time-source-date-epoch.patch
Python build honors SOURCE_DATE_EPOCH pretty well now.

Drop setuptools patches. Setuptools should be reproducible with Python
3.6+
according to a mention here:
  pypa/setuptools#1690 (comment)
It's time to let upstream fix Setuptools reproduce-ability.

Drop patch: 010-do-not-add-rt-lib-dirs-when-cross-compiling.patch
I can't seem to fully remember why it's there.
And it seem to build fine without it.

Drop patch: 015-abort-on-failed-modules.patch
Python build supports a similar PYTHONSTRICTEXTENSIONBUILD=1 env-var
option.

Add patch: 026-openssl-feature-flags.patch
We need to keep this in our tree for a while.
See:
  https://bugs.python.org/issue45627

Backport patch:
027-bpo-43158-Use-configure-values-for-building-_uuid-ex.patch
Link: python/cpython#29353
Fixes the build for uuid C module.

Add patch: 028-host-python-support-ssl-with-libressl.patch
We need the _ssl module working on the host-side with LibreSSL for pip
to
work to download from https://pypi.org
Refs: openwrt/openwrt#4749

Add patch: 029-disable-deprecation-warning.patch
Fixes apparmor build. The warning causes a configure error.

Refreshed the rest of patches.

Some old build-flags were removed. They don't seem to be necessary
anymore.

Split python3-uuid from python3-light. To better manage the libuuid
library
(if needed). Also, fixing the uuid C module build. Seems this was
failing,
and was falling back to using hashlib.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2022-11-08 13:36:18 +08:00
Rosen Penev
fff5c91bf7 expat: don't build host libs
tools/expat is actually what's used by the various packages that
supposedly depend on expat/host.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-11-08 13:36:18 +08:00
Alexandru Ardelean
93b05e6f70 python3: enable bluetooth support by default
Bluetooth support requires bluez-libs present, but they are only required
for the build, and don't seem to be needed to be present on the target.

There isn't any linking required to libbluetooth. It's only the bluetooth.h
header that is required for building BT support into Python.

For testing, this snippet was used from `Lib/test/test_socket.py` (inside
cpython):
```
def _have_socket_bluetooth():
    """Check whether AF_BLUETOOTH sockets are supported on this host."""
    try:
        # RFCOMM is supported by all platforms with bluetooth support. Windows
        # does not support omitting the protocol.
        s = socket.socket(socket.AF_BLUETOOTH, socket.SOCK_STREAM, socket.BTPROTO_RFCOMM)
    except (AttributeError, OSError):
        return False
    else:
        s.close()
    return True
```

Fixes: https://github.com/openwrt/packages/issues/16544

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2022-11-08 13:36:18 +08:00
Alexandru Ardelean
850e5019c1 python3: use gdbm for Berkley dbm
Python works with GNU DBM and with Berkley DBM.
Berkley DBM has been under Oracle for some time.

And it's not clear how many Python users actually use DBM.

In the packages feed, we have both libdb47 (which is now under Oracle) and
GNU DBM. The GNU DBM has a compatibility layer for Berkley DBM.
There are newer versions than libdb47, but it's probably not worth having
them yet. The libbd47 tarball is ~40+ MB. Odds are newer versions will be
bigger and more bloated.

This change merges the old `python3-gdbm` package into the `python3-dbm`
package, since they are effectively using the same underlying library now,
i.e. gdbm.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2022-11-08 13:36:17 +08:00
breakings
7e6baa7218
python3: update to 3.9.15 (#560) 2022-10-24 10:00:48 +00:00
breakings
ae4ac3c2c7
python3: Update to 3.9.12 (#407)
* python3: Update to 3.9.11, refresh patches

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 3.9.12

Signed-off-by: Jeffery To <jeffery.to@gmail.com>

Co-authored-by: Jeffery To <jeffery.to@gmail.com>
2022-04-13 13:38:07 +08:00
Jeffery To
0c2effae56 python3: Update to 3.9.10, refresh patches
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2022-03-06 03:22:20 +08:00
Alexandru Ardelean
f416131b07 python-packages: remove myself as maintainer
There's been a bit of overlapping opinions on some of these packages.
The best thing to do here is to reduce ownership and relinquish my
control.

This patch does that.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
(cherry picked from commit 48ce6e48b617ee72e40220e6ab6b7ceaa079a192)
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2022-03-06 03:22:20 +08:00
Josef Schlehofer
433bd7e48a python3: update to version 3.9.9
- Updated setuptools and pip
- Refreshed patches

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2022-03-06 03:22:20 +08:00
Alexandru Ardelean
e69790f8a4 python3: bump version to 3.9.7
Refreshed patches.
And apply hack for line-endings in pep517 (from pip).

Hack comment:
  # FIXME: [1] get rid of this asap; 'patch' doesn't like Windows endings, and this file is full of them...
  #        I actually tried this in a number of ways and the only way to fix this is to implement
  #        a poor-man's dos2unix using sed.
  #        The issue is with the pip package; it seems that it throws in some Windows line-endings
  #        and 'patch' won't handle them. So, we do a "dos2unix" and then patch.
  #        We can get rid of this once this is solved upstream and in pip:
  #            https://github.com/pypa/pep517/pull/130

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
(cherry picked from commit 26988f905f1f78ee0fd67dc90c3c7b112ac1817d)
2022-03-06 03:22:20 +08:00
Josef Schlehofer
edb67906fa python3-setuptools: add _distutils_hack
I tried to install matplotlib by using pip and it failed with the following output:

2021-08-18T11:52:26,171 Collecting matplotlib
2021-08-18T11:52:26,173   Created temporary directory: /tmp/pip-unpack-wuth2u0e
2021-08-18T11:52:26,565   Using cached matplotlib-3.4.3.tar.gz (37.9 MB)
2021-08-18T11:52:38,659   Added matplotlib from https://files.pythonhosted.org/packages/21/37/           197e68df384ff694f78d687a49ad39f96c67b8d75718bc61503e1676b617/matplotlib-3.4.3.tar.                       gz#sha256=fc4f526dfdb31c9bd6b8ca06bf9fab663ca12f3ec9cdf4496fb44bc680140318 to build tracker '/tmp/pip-   req-tracker-u30x8pht'
2021-08-18T11:52:38,660     Running setup.py (path:/tmp/pip-install-afiyiers/                            matplotlib_8e717e38862f4976a3d6cb1832ba3261/setup.py) egg_info for package matplotlib
2021-08-18T11:52:38,661     Created temporary directory: /tmp/pip-pip-egg-info-kbtiezxq
2021-08-18T11:52:38,662     Running command python setup.py egg_info
2021-08-18T11:52:38,831     Traceback (most recent call last):
2021-08-18T11:52:38,832       File "<string>", line 1, in <module>
2021-08-18T11:52:38,832       File "/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 8, in <module>
2021-08-18T11:52:38,833     ModuleNotFoundError: No module named '_distutils_hack'

More details about it:
- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=968410

Once I applied the patch from the bug tracker, I got further to install
it.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
(cherry picked from commit feaaacc10fff283505ff261ed6886a4936fbe7f5)
2022-03-06 03:22:20 +08:00
Alexandru Ardelean
39bd7a44fe python3: do a simple ls on pip & setuptools if not selected for build
I seem to forget to check/select setuptools and pip (that come bundled with
Python).
This change will do a simple 'ls' on the 2 wheel files, so that the build
fails even if just building Python.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2022-03-06 03:22:20 +08:00
Alexandru Ardelean
97fbc62da0 python3: update to version 3.9.6
Refreshed patches.
Bumped pip to 21.1.3.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
(cherry picked from commit 44e009364f5a115172f5825fbfd8c0b3730021a5)
2022-03-06 03:22:20 +08:00
lean
dbf61a05fe lang: bump version 2021-06-14 19:43:42 +08:00
coolsnowwolf
c36ad692b4 packages: sync to new packages 2020-07-08 14:18:52 +08:00
lean
4b54c3c33a python3: bump version 2020-04-01 02:24:43 +08:00
lean
1968d04d9f python3: back to v3.7.5 2019-10-26 13:03:52 +08:00
LEAN-ESX
0cee48ba20 python: updte packages 2019-10-25 07:10:23 -07:00
coolsnowwolf
5fcf0b0d0b Revert "python: bump to latest version"
This reverts commit 8be6cbdcc2.
2019-04-27 15:15:40 +08:00
coolsnowwolf
8be6cbdcc2 python: bump to latest version 2019-04-27 15:06:42 +08:00
coolsnowwolf
d17588da1a first commit 2018-10-18 16:56:47 +08:00