From 2f4b161e2828a645ac1bfc2a77e9506fe3c8772d Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Fri, 17 Feb 2023 12:02:58 +0800 Subject: [PATCH 01/45] xxhash: Fix pkg-config metadata file Currently, Build/InstallDev installs libxxhash.pc.in, which is the template for libxxhash.pc and does not contain the correct information. (pkg-config also does not recognize this file name.) This uses PKG_INSTALL:=1 so that libxxhash.pc is generated (by 'make install'). This also removes the need to override Build/Prepare by setting the correct command in PKG_UNPACK. Signed-off-by: Jeffery To --- utils/xxhash/Makefile | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/utils/xxhash/Makefile b/utils/xxhash/Makefile index 04924b750..ff29be1de 100644 --- a/utils/xxhash/Makefile +++ b/utils/xxhash/Makefile @@ -12,7 +12,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=xxhash PKG_VERSION:=0.8.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/Cyan4973/xxHash/archive/v$(PKG_VERSION) @@ -24,8 +24,12 @@ PKG_LICENSE:=BSD-2-Clause,GPL-2.0-or-later PKG_LICENSE_FILES:=LICENSE,cli/COPYING PKG_MAINTAINER:=Julien Malik +PKG_INSTALL:=1 + include $(INCLUDE_DIR)/package.mk +PKG_UNPACK:=$(HOST_TAR) -C "$(PKG_BUILD_DIR)" --strip-components=1 -xzf "$(DL_DIR)/$(PKG_SOURCE)" + define Package/xxhash/Default TITLE:=Extremely fast hash algorithm URL:=https://cyan4973.github.io/xxHash/ @@ -64,29 +68,25 @@ define Package/xxhash/description This package contains the executables. endef -define Build/Prepare - rm -rf $(PKG_BUILD_DIR)/ - mkdir -p $(PKG_BUILD_DIR)/ - $(TAR) -xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip 1 -endef +MAKE_FLAGS += PREFIX=/usr define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_BUILD_DIR)/*.h $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_BUILD_DIR)/libxxhash.so* $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxxhash.{a,so*} $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_BUILD_DIR)/libxxhash.pc.in $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxxhash.pc $(1)/usr/lib/pkgconfig/ endef define Package/libxxhash/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_BUILD_DIR)/libxxhash.so.* $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxxhash.so.* $(1)/usr/lib/ endef define Package/xxhash/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/xxh*sum $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xxh*sum $(1)/usr/bin/ endef $(eval $(call BuildPackage,libxxhash)) From d7bc1deb0ef272fea2aa347f831e706d63c1b2eb Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Wed, 1 Mar 2023 14:16:40 +0800 Subject: [PATCH 02/45] python-pkgconfig: Add new host-only package From the README: pkgconfig is a Python module to interface with the pkg-config command line tool for Python 3.3+. Signed-off-by: Jeffery To --- lang/python/python-pkgconfig/Makefile | 48 +++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 lang/python/python-pkgconfig/Makefile diff --git a/lang/python/python-pkgconfig/Makefile b/lang/python/python-pkgconfig/Makefile new file mode 100644 index 000000000..d20210363 --- /dev/null +++ b/lang/python/python-pkgconfig/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2023 Jeffery To +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-pkgconfig +PKG_VERSION:=1.5.5 +PKG_RELEASE:=1 + +PYPI_NAME:=pkgconfig +PKG_HASH:=deb4163ef11f75b520d822d9505c1f462761b4309b1bb713d08689759ea8b899 + +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Jeffery To + +PKG_HOST_ONLY:=1 +HOST_BUILD_DEPENDS:=python3/host python-build/host python-installer/host python-poetry-core/host + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/host-build.mk +include ../python3-package.mk +include ../python3-host-build.mk + +define Package/python3-pkgconfig + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Interface Python with pkg-config + URL:=https://github.com/matze/pkgconfig + DEPENDS:=+python3-light + BUILDONLY:=1 +endef + +define Package/python3-pkgconfig/description +pkgconfig is a Python module to interface with the pkg-config command +line tool for Python 3.3+. +endef + +$(eval $(call Py3Package,python3-pkgconfig)) +$(eval $(call BuildPackage,python3-pkgconfig)) +$(eval $(call BuildPackage,python3-pkgconfig-src)) +$(eval $(call HostBuild)) From 6649314a0326477877e2691b181b192e19cee959 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Wed, 1 Mar 2023 14:09:43 +0800 Subject: [PATCH 03/45] borgbackup: Add missing build dependencies setuptools-scm is a declared build dependency[1], and pkgconfig will allow setup to find the required libraries, replacing the need to set environment variables. [1]: https://github.com/borgbackup/borg/blob/1.2.4/setup.py#L313 Signed-off-by: Jeffery To --- lang/python/borgbackup/Makefile | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/lang/python/borgbackup/Makefile b/lang/python/borgbackup/Makefile index a8629deef..95fd7eaff 100644 --- a/lang/python/borgbackup/Makefile +++ b/lang/python/borgbackup/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=borgbackup PKG_VERSION:=1.2.4 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PYPI_NAME:=borgbackup PKG_HASH:=a4bd54e9469e81b7a30a6711423115abc818d9cd844ecb1ca0e6104bc5374da8 @@ -57,16 +57,7 @@ define Package/borgbackup/description The data deduplication technique used makes Borg suitable for daily backups since only changes are stored. The authenticated encryption technique makes it suitable for backups to not fully trusted targets. endef -PKG_BUILD_DEPENDS:=python-cython/host - -# borg setup.py shall find these via pkg-config, but depends on python pkgconfig PyPi module -# which quickly becomes a nightmare to build, since it build-depends on poetry which is not -# available in the python package feed, and has a myriad of deps -PYTHON3_PKG_SETUP_VARS:= \ - BORG_OPENSSL_PREFIX="/usr/lib" \ - BORG_LIBLZ4_PREFIX="/usr/lib" \ - BORG_LIBZSTD_PREFIX="/usr/lib" \ - BORG_LIBXXHASH_PREFIX="/usr/lib" +PKG_BUILD_DEPENDS:=python-cython/host python-pkgconfig/host python-setuptools-scm/host $(eval $(call Py3Package,borgbackup)) $(eval $(call BuildPackage,borgbackup)) From 1a1b4445715a9970f1d9d3964e06e965c8693531 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Fri, 17 Feb 2023 21:19:17 +0800 Subject: [PATCH 04/45] python-astral: Update to 3.2 This adds a build dependency that will be required for pyproject.toml-based builds. This also marks the package as BROKEN (for now) as it requires proper support for pyproject.toml-based builds. Signed-off-by: Jeffery To --- lang/python/python-astral/Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lang/python/python-astral/Makefile b/lang/python/python-astral/Makefile index 5f009fce1..0218af7af 100644 --- a/lang/python/python-astral/Makefile +++ b/lang/python/python-astral/Makefile @@ -8,16 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-astral -PKG_VERSION:=2.2 +PKG_VERSION:=3.2 PKG_RELEASE:=1 PYPI_NAME:=astral -PKG_HASH:=e41d9967d5c48be421346552f0f4dedad43ff39a83574f5ff2ad32b6627b6fbe +PKG_HASH:=9b7c3b412e9e69d172cfb24be0e6addcc9f1bd01a28db8bebe66d75ccc533d88 PKG_LICENSE:=Apache-2.0 PKG_LICENSE_FILES:=LICENSE PKG_MAINTAINER:=Josef Schlehofer +PKG_BUILD_DEPENDS:=python-poetry-core/host + include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk @@ -30,7 +32,7 @@ define Package/python3-astral URL:=https://github.com/sffjunkie/astral DEPENDS+= \ +python3-light \ - +python3-pytz + @BROKEN endef define Package/python3-astral/description From 159895b79461aa93cc0e9a6d51f5074ab85e08d3 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Fri, 31 Mar 2023 17:09:08 +0800 Subject: [PATCH 05/45] python-bleak: Add build dependency This will be required for pyproject.toml-based builds. Signed-off-by: Jeffery To --- lang/python/python-bleak/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lang/python/python-bleak/Makefile b/lang/python/python-bleak/Makefile index 696b0b4bc..2878bb2ea 100644 --- a/lang/python/python-bleak/Makefile +++ b/lang/python/python-bleak/Makefile @@ -17,6 +17,8 @@ PKG_MAINTAINER:=Quintin Hill PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE +PKG_BUILD_DEPENDS:=python-poetry-core/host + include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk From 0b5091bbff52ef8e2e8b6b1f173928088ebe5cc6 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Sat, 18 Feb 2023 18:24:43 +0800 Subject: [PATCH 06/45] python-cryptography: Update patch to disable Rust This extends the patch to also apply for pyproject.toml-based builds. Signed-off-by: Jeffery To --- .../patches/0004-disable-rust.patch | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lang/python/python-cryptography/patches/0004-disable-rust.patch b/lang/python/python-cryptography/patches/0004-disable-rust.patch index 81c45a44d..bf3010bb0 100644 --- a/lang/python/python-cryptography/patches/0004-disable-rust.patch +++ b/lang/python/python-cryptography/patches/0004-disable-rust.patch @@ -1,3 +1,13 @@ +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -6,7 +6,6 @@ requires = [ + "wheel", + # Must be kept in sync with the `setup_requirements` in `setup.py` + "cffi>=1.12; platform_python_implementation != 'PyPy'", +- "setuptools-rust>=0.11.4", + ] + build-backend = "setuptools.build_meta" + --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ import sys From b78c8ff91858ac7dd15bc45ded2d6ba8fc17335e Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Fri, 31 Mar 2023 17:12:14 +0800 Subject: [PATCH 07/45] python-dbus-fast: Add build dependencies These will be required for pyproject.toml-based builds. This also includes a patch to unpin the version requirement for setuptools, as the current in-repo version of setuptools does not fulfill this requirement, and there does not appear to be any specific reason why this version requirement is necessary. Signed-off-by: Jeffery To --- lang/python/python-dbus-fast/Makefile | 4 +++- .../python-dbus-fast/patches/001-unpin-setuptools.patch | 9 +++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 lang/python/python-dbus-fast/patches/001-unpin-setuptools.patch diff --git a/lang/python/python-dbus-fast/Makefile b/lang/python/python-dbus-fast/Makefile index ad6b0b40b..8579e13a4 100644 --- a/lang/python/python-dbus-fast/Makefile +++ b/lang/python/python-dbus-fast/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-dbus-fast PKG_VERSION:=1.84.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=dbus-fast PYPI_SOURCE_NAME:=dbus_fast @@ -18,6 +18,8 @@ PKG_MAINTAINER:=Quintin Hill PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE +PKG_BUILD_DEPENDS:=python-poetry-core/host python-cython/host python-wheel/host + include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk diff --git a/lang/python/python-dbus-fast/patches/001-unpin-setuptools.patch b/lang/python/python-dbus-fast/patches/001-unpin-setuptools.patch new file mode 100644 index 000000000..327f0e74d --- /dev/null +++ b/lang/python/python-dbus-fast/patches/001-unpin-setuptools.patch @@ -0,0 +1,9 @@ +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -97,5 +97,5 @@ module = "docs.*" + ignore_errors = true + + [build-system] +-requires = ['setuptools>=65.4.1', 'wheel', 'Cython', "poetry-core>=1.0.0"] ++requires = ['setuptools', 'wheel', 'Cython', "poetry-core>=1.0.0"] + build-backend = "poetry.core.masonry.api" From 68c0c77df6b8f4509859a93344715a7fb21f864e Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Mon, 20 Feb 2023 13:08:55 +0800 Subject: [PATCH 08/45] python-dns: Update to 2.3.0 This adds a build dependency that will be required for pyproject.toml-based builds. Signed-off-by: Jeffery To --- lang/python/python-dns/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lang/python/python-dns/Makefile b/lang/python/python-dns/Makefile index 75833fa85..f303733b6 100644 --- a/lang/python/python-dns/Makefile +++ b/lang/python/python-dns/Makefile @@ -8,16 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-dns -PKG_VERSION:=2.2.0 +PKG_VERSION:=2.3.0 PKG_RELEASE:=1 PYPI_NAME:=dnspython -PKG_HASH:=e79351e032d0b606b98d38a4b0e6e2275b31a5b85c873e587cc11b73aca026d6 +PKG_HASH:=224e32b03eb46be70e12ef6d64e0be123a64e621ab4c0822ff6d450d52a540b9 PKG_LICENSE:=ISC PKG_LICENSE_FILES:=LICENSE PKG_MAINTAINER:=Josef Schlehofer +PKG_BUILD_DEPENDS:=python-poetry-core/host + include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk From be90d8aecd0994ebe96d5481cf793d4cbb2d077e Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Mon, 20 Feb 2023 12:58:27 +0800 Subject: [PATCH 09/45] python-docker: Add missing build dependency Signed-off-by: Jeffery To --- lang/python/python-docker/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lang/python/python-docker/Makefile b/lang/python/python-docker/Makefile index cb23ea010..22db2540b 100644 --- a/lang/python/python-docker/Makefile +++ b/lang/python/python-docker/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-docker PKG_VERSION:=6.0.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=docker PKG_HASH:=896c4282e5c7af5c45e8b683b0b0c33932974fe6e50fc6906a0a83616ab3da97 @@ -11,6 +11,8 @@ PKG_MAINTAINER:=Javier Marcet PKG_LICENSE:=Apache-2.0 PKG_LICENSE_FILES:=LICENSE +PKG_BUILD_DEPENDS:=python-setuptools-scm/host + include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk From 59b7a81964c879e9a92af3122916f8d33ac2ee0a Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Sat, 18 Feb 2023 01:05:56 +0800 Subject: [PATCH 10/45] python-exceptiongroup: Update to 1.1.1 This adds a build dependency that will be required for pyproject.toml-based builds. This also removes the run-time dependency on python3-attrs; there is no indication this package is required. Signed-off-by: Jeffery To --- lang/python/python-exceptiongroup/Makefile | 10 +++++----- ...up.py-to-avoid-depending-on-flit-for-building.patch | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lang/python/python-exceptiongroup/Makefile b/lang/python/python-exceptiongroup/Makefile index 7c096dc5e..4cde0a6c5 100644 --- a/lang/python/python-exceptiongroup/Makefile +++ b/lang/python/python-exceptiongroup/Makefile @@ -8,16 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-exceptiongroup -PKG_VERSION:=1.1.0 +PKG_VERSION:=1.1.1 PKG_RELEASE:=1 PYPI_NAME:=exceptiongroup -PKG_HASH:=bcb67d800a4497e1b404c2dd44fca47d3b7a5e5433dbab67f96c1a685cdfdf23 +PKG_HASH:=d484c3090ba2889ae2928419117447a14daf3c1231d5e30d0aae34f354f01785 PKG_LICENSE:=MIT,Python-2.0 PKG_LICENSE_FILES:=LICENSE PKG_MAINTAINER:=Julien Malik +PKG_BUILD_DEPENDS:=python-flit-scm/host + include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk @@ -28,9 +30,7 @@ define Package/python3-exceptiongroup SUBMENU:=Python TITLE:=Backport of PEP 654 (exception groups) URL:=https://github.com/agronholm/exceptiongroup - DEPENDS:= \ - +python3-light \ - +python3-attrs + DEPENDS:=+python3-light endef define Package/python3-exceptiongroup/description diff --git a/lang/python/python-exceptiongroup/patches/0001-add-setup.py-to-avoid-depending-on-flit-for-building.patch b/lang/python/python-exceptiongroup/patches/0001-add-setup.py-to-avoid-depending-on-flit-for-building.patch index 5c6cf2519..aca11e3be 100644 --- a/lang/python/python-exceptiongroup/patches/0001-add-setup.py-to-avoid-depending-on-flit-for-building.patch +++ b/lang/python/python-exceptiongroup/patches/0001-add-setup.py-to-avoid-depending-on-flit-for-building.patch @@ -17,7 +17,7 @@ Subject: [PATCH] add setup.py to avoid depending on flit for building + +setuptools.setup( + name='exceptiongroup', -+ version='1.1.0', ++ version='1.1.1', + description='Backport of PEP 654 (exception groups)', + author='Alex Grönholm', + author_email='Alex Grönholm ', From 8d81b6732757abca7e58c13508689954ea915209 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Mon, 20 Feb 2023 09:22:31 +0800 Subject: [PATCH 11/45] python-incremental: Update to 22.10.0, redo patch, add host build Signed-off-by: Jeffery To --- lang/python/python-incremental/Makefile | 11 +++++--- .../patches/001-omit-tests.patch | 25 +++++++++++-------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/lang/python/python-incremental/Makefile b/lang/python/python-incremental/Makefile index e3fa8efcb..31d88c9df 100644 --- a/lang/python/python-incremental/Makefile +++ b/lang/python/python-incremental/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2018 OpenWrt.org +# Copyright (C) 2018, 2021, 2023 Jeffery To # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-incremental -PKG_VERSION:=21.3.0 +PKG_VERSION:=22.10.0 PKG_RELEASE:=1 PYPI_NAME:=incremental -PKG_HASH:=02f5de5aff48f6b9f665d99d48bfc7ec03b6e3943210de7cfc88856d755d6f57 +PKG_HASH:=912feeb5e0f7e0188e6f42241d2f450002e11bbc0937c65865045854c24c0bd0 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE @@ -20,7 +20,9 @@ PKG_MAINTAINER:=Jeffery To include ../pypi.mk include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/host-build.mk include ../python3-package.mk +include ../python3-host-build.mk define Package/python3-incremental SECTION:=lang @@ -28,7 +30,7 @@ define Package/python3-incremental SUBMENU:=Python TITLE:=Versions your Python projects URL:=https://github.com/twisted/incremental - DEPENDS:=+python3-light + DEPENDS:=+python3-light +python3-distutils +python3-pkg-resources endef define Package/python3-incremental/description @@ -38,3 +40,4 @@ endef $(eval $(call Py3Package,python3-incremental)) $(eval $(call BuildPackage,python3-incremental)) $(eval $(call BuildPackage,python3-incremental-src)) +$(eval $(call HostBuild)) diff --git a/lang/python/python-incremental/patches/001-omit-tests.patch b/lang/python/python-incremental/patches/001-omit-tests.patch index 5c228c004..b71c6e35f 100644 --- a/lang/python/python-incremental/patches/001-omit-tests.patch +++ b/lang/python/python-incremental/patches/001-omit-tests.patch @@ -1,11 +1,14 @@ ---- a/setup.py -+++ b/setup.py -@@ -31,7 +31,7 @@ setup( - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - ], -- packages=find_packages("src", exclude=("exampleproj",)), -+ packages=find_packages("src", exclude=("exampleproj", "*.tests", "*.tests.*")), - package_dir={"": "src"}, - extras_require={"scripts": ["click>=6.0", "twisted>=16.4.0"]}, - license="MIT", +--- a/setup.cfg ++++ b/setup.cfg +@@ -30,7 +30,10 @@ zip_safe = False + + [options.packages.find] + where = src +-exclude = exampleproj ++exclude = ++ exampleproj ++ *.tests ++ *.tests.* + + [options.package_data] + incremental = py.typed From b1a8e4769f333120b7e925f4782593f04e7c68fd Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Mon, 6 Mar 2023 11:29:02 +0800 Subject: [PATCH 12/45] python-jsonschema: Add build dependencies These will be required for pyproject.toml-based builds. Signed-off-by: Jeffery To --- lang/python/python-jsonschema/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/python/python-jsonschema/Makefile b/lang/python/python-jsonschema/Makefile index 67121c7a5..e6c2f4c98 100644 --- a/lang/python/python-jsonschema/Makefile +++ b/lang/python/python-jsonschema/Makefile @@ -11,7 +11,7 @@ PKG_MAINTAINER:=Javier Marcet PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYING -PKG_BUILD_DEPENDS:=python-setuptools-scm/host +PKG_BUILD_DEPENDS:=python-hatchling/host python-hatch-vcs/host python-hatch-fancy-pypi-readme/host python-setuptools-scm/host include ../pypi.mk include $(INCLUDE_DIR)/package.mk From 550c29368e2c7c14d26a6dc214c167e3d70a3b2b Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Mon, 6 Mar 2023 11:32:54 +0800 Subject: [PATCH 13/45] python-pycrate: Update to 0.6.0 This also changes the download to PyPI and updates several package makefile fields. Signed-off-by: Jeffery To --- lang/python/python-pycrate/Makefile | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/lang/python/python-pycrate/Makefile b/lang/python/python-pycrate/Makefile index c9ae8d95e..5717cf74f 100644 --- a/lang/python/python-pycrate/Makefile +++ b/lang/python/python-pycrate/Makefile @@ -4,16 +4,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-pycrate -PKG_VERSION:=0.5.5 +PKG_VERSION:=0.6.0 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/P1sec/pycrate/archive/refs/tags/$(PKG_VERSION).tar.gz? -PKG_HASH:=73072234359cdc11d7c6790c367d5565fdaea284a07df882b8b5295f2a4f83d1 +PYPI_NAME:=pycrate +PKG_HASH:=b49738c02a3f93ba9f76c0dac82b689a5341882814b36c714e9600e9f560daf7 -PKG_BUILD_DIR:=$(BUILD_DIR)/pycrate-$(PKG_VERSION) - -PKG_LICENSE:=LGPL-2.1 +PKG_LICENSE:=LGPL-2.1-or-later +PKG_LICENSE_FILES:=license.txt PKG_MAINTAINER:=David Bauer include ../pypi.mk @@ -21,10 +19,10 @@ include $(INCLUDE_DIR)/package.mk include ../python3-package.mk define Package/python3-pycrate - SECTION:=lang-python + SECTION:=lang CATEGORY:=Languages SUBMENU:=Python - TITLE:=python3-pycrate + TITLE:=A software suite to handle various data formats URL:=https://github.com/P1sec/pycrate DEPENDS:=+python3-light endef From c7820e4fb134a11f91307e8a0645df6a2d986af9 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Mon, 20 Feb 2023 00:52:53 +0800 Subject: [PATCH 14/45] python-pytest: Update to 7.3.0 This also removes BROKEN from the package. Signed-off-by: Jeffery To --- lang/python/python-pytest/Makefile | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/lang/python/python-pytest/Makefile b/lang/python/python-pytest/Makefile index bbd8f8819..dd978d248 100644 --- a/lang/python/python-pytest/Makefile +++ b/lang/python/python-pytest/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-pytest -PKG_VERSION:=6.2.3 -PKG_RELEASE:=2 +PKG_VERSION:=7.3.0 +PKG_RELEASE:=1 PYPI_NAME:=pytest -PKG_HASH:=671238a46e4df0f3498d1c3270e5deb9b32d25134c99b7d75370a68cfbe9b634 +PKG_HASH:=58ecc27ebf0ea643ebfdf7fb1249335da761a00c9f955bcd922349bcb68ee57d PKG_MAINTAINER:=Jan Pavlinec PKG_LICENSE:=MIT @@ -32,14 +32,11 @@ define Package/python3-pytest URL:=https://docs.pytest.org/en/latest/ DEPENDS:= \ +python3 \ - +python3-more-itertools \ - +python3-py \ - +python3-attrs \ +python3-pluggy \ +python3-packaging \ - +python3-toml \ - +python3-iniconfig \ - @BROKEN + +python3-tomli \ + +python3-exceptiongroup \ + +python3-iniconfig endef define Package/python3-pytest/description From 17d5bf224cd432bf0cb9c683f17fc9fb5415a6e4 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Mon, 20 Feb 2023 02:41:22 +0800 Subject: [PATCH 15/45] python-pytest-forked: Update to 1.6.0 The overly-strict build requirements in 1.3.0[1] would cause a build failure with pyproject.toml-based builds. [1]: https://github.com/pytest-dev/pytest-forked/blob/v1.3.0/pyproject.toml#L2 Signed-off-by: Jeffery To --- lang/python/python-pytest-forked/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lang/python/python-pytest-forked/Makefile b/lang/python/python-pytest-forked/Makefile index 55edae8f5..2b464337d 100644 --- a/lang/python/python-pytest-forked/Makefile +++ b/lang/python/python-pytest-forked/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-pytest-forked -PKG_VERSION:=1.3.0 -PKG_RELEASE:=3 +PKG_VERSION:=1.6.0 +PKG_RELEASE:=1 PYPI_NAME:=pytest-forked -PKG_HASH:=6aa9ac7e00ad1a539c41bec6d21011332de671e938c7637378ec9710204e37ca +PKG_HASH:=4dafd46a9a600f65d822b8f605133ecf5b3e1941ebb3588e943b4e3eb71a5a3f PKG_MAINTAINER:=Jan Pavlinec PKG_LICENSE:=MIT From 56b10770fc0741c79b697e9954b27090a4560a9a Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Mon, 20 Feb 2023 10:51:57 +0800 Subject: [PATCH 16/45] python-twisted: Update to 22.10.0 Includes fix for CVE-2022-39348 (NameVirtualHost Host header injection). This adds a build dependency that will be required for pyproject.toml-based builds. Signed-off-by: Jeffery To --- lang/python/python-twisted/Makefile | 11 +++++++---- .../python-twisted/patches/001-omit-tkconch.patch | 2 +- .../python-twisted/patches/002-omit-tests.patch | 4 ++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/lang/python/python-twisted/Makefile b/lang/python/python-twisted/Makefile index 8c78b0284..1b54cb0c4 100644 --- a/lang/python/python-twisted/Makefile +++ b/lang/python/python-twisted/Makefile @@ -1,5 +1,6 @@ # -# Copyright (C) 2006-2011, 2015-2018 OpenWrt.org +# Copyright (C) 2006-2011 OpenWrt.org +# Copyright (C) 2015-2016, 2018-2023 Jeffery To # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,11 +9,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-twisted -PKG_VERSION:=22.4.0 +PKG_VERSION:=22.10.0 PKG_RELEASE:=1 PYPI_NAME:=Twisted -PKG_HASH:=a047990f57dfae1e0bd2b7df2526d4f16dcdc843774dc108b78c52f2a5f13680 +PKG_HASH:=32acbd40a94f5f46e7b42c109bfae2b302250945561783a8b7a059048f2d4d31 PKG_BUILD_DEPENDS:=libtirpc @@ -21,6 +22,8 @@ PKG_LICENSE_FILES:=LICENSE PKG_MAINTAINER:=Jeffery To PKG_CPE_ID:=cpe:/a:twistedmatrix:twisted +PKG_BUILD_DEPENDS:=python-incremental/host + include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk @@ -39,9 +42,9 @@ define Package/python3-twisted +python3-bcrypt \ +python3-constantly \ +python3-cryptography \ + +python3-hyperlink \ +python3-idna \ +python3-incremental \ - +python3-hyperlink \ +python3-pkg-resources \ +python3-pyasn1 \ +python3-pyopenssl \ diff --git a/lang/python/python-twisted/patches/001-omit-tkconch.patch b/lang/python/python-twisted/patches/001-omit-tkconch.patch index 2a913ece9..a1a37771b 100644 --- a/lang/python/python-twisted/patches/001-omit-tkconch.patch +++ b/lang/python/python-twisted/patches/001-omit-tkconch.patch @@ -1,6 +1,6 @@ --- a/setup.cfg +++ b/setup.cfg -@@ -112,7 +112,6 @@ console_scripts = +@@ -115,7 +115,6 @@ console_scripts = conch = twisted.conch.scripts.conch:run mailmail = twisted.mail.scripts.mailmail:run pyhtmlizer = twisted.scripts.htmlizer:run diff --git a/lang/python/python-twisted/patches/002-omit-tests.patch b/lang/python/python-twisted/patches/002-omit-tests.patch index 08507c390..3ec59fd48 100644 --- a/lang/python/python-twisted/patches/002-omit-tests.patch +++ b/lang/python/python-twisted/patches/002-omit-tests.patch @@ -1,6 +1,6 @@ --- a/setup.cfg +++ b/setup.cfg -@@ -104,6 +104,9 @@ mypy = +@@ -107,6 +107,9 @@ mypy = [options.packages.find] where = src @@ -10,7 +10,7 @@ [options.entry_points] console_scripts = -@@ -123,6 +126,7 @@ console_scripts = +@@ -126,6 +129,7 @@ console_scripts = *.pxi *.pyx build.bat From 4a7173d27d7969b95efac18eb34402c5fa69e3a1 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Mon, 6 Mar 2023 12:04:33 +0800 Subject: [PATCH 17/45] python-ubus: Force old build process This package will not build with the pyproject.toml-based build process because it has a build dependency on pytest-runner[1]. pytest-runner has been deprecated[2], so instead of adding a package for pytest-runner to fulfill the build dependency, force this package to use the old build process. [1]: https://gitlab.nic.cz/turris/python-ubus/-/blob/v0.1.1/setup.py#L35 [2]: https://github.com/pytest-dev/pytest-runner#deprecation-notice Signed-off-by: Jeffery To --- lang/python/python-ubus/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lang/python/python-ubus/Makefile b/lang/python/python-ubus/Makefile index 161440a04..0e96da20c 100644 --- a/lang/python/python-ubus/Makefile +++ b/lang/python/python-ubus/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-ubus PKG_VERSION:=0.1.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=ubus PKG_HASH:=7e57bda989bc35b48c7075d03ec2818226e722bbf1bde138d7e7ea26d462682a @@ -18,6 +18,8 @@ PKG_MAINTAINER:=Erik Larsson PKG_LICENSE:=LGPL-2.1-or-later PKG_LICENSE_FILES:=LICENSE +PYTHON3_PKG_FORCE_DISTUTILS_SETUP:=1 + include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk From e6ae9e29d59001a8c31781c1e2c32261f34c05be Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Mon, 6 Mar 2023 11:46:09 +0800 Subject: [PATCH 18/45] python-libraries: Force old build process These packages will need adjustments to work with pyproject.toml-based builds, so set PYTHON3_PKG_FORCE_DISTUTILS_SETUP:=1 to force the old build process (when pyproject.toml-based builds are in place) for now. Signed-off-by: Jeffery To --- lang/python/pillow/Makefile | 2 ++ lang/python/python-curl/Makefile | 2 ++ lang/python/python-evdev/Makefile | 2 ++ lang/python/python-gmpy2/Makefile | 2 ++ lang/python/python-yaml/Makefile | 2 ++ 5 files changed, 10 insertions(+) diff --git a/lang/python/pillow/Makefile b/lang/python/pillow/Makefile index bcf793697..460f9434e 100644 --- a/lang/python/pillow/Makefile +++ b/lang/python/pillow/Makefile @@ -18,6 +18,8 @@ PKG_LICENSE:=HPND PKG_LICENSE_FILES:=LICENSE PKG_CPE_ID:=cpe:/a:python:pillow +PYTHON3_PKG_FORCE_DISTUTILS_SETUP:=1 + include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk diff --git a/lang/python/python-curl/Makefile b/lang/python/python-curl/Makefile index 4f46dc5fc..560c05ad2 100644 --- a/lang/python/python-curl/Makefile +++ b/lang/python/python-curl/Makefile @@ -15,6 +15,8 @@ PKG_MAINTAINER:=Waldemar Konik PKG_LICENSE:=LGPL-2.1 PKG_LICENSE_FILES:=COPYING-LGPL +PYTHON3_PKG_FORCE_DISTUTILS_SETUP:=1 + include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk diff --git a/lang/python/python-evdev/Makefile b/lang/python/python-evdev/Makefile index bc26068a6..6463daec7 100644 --- a/lang/python/python-evdev/Makefile +++ b/lang/python/python-evdev/Makefile @@ -18,6 +18,8 @@ PKG_MAINTAINER:=Paulo Costa , Alexandru Ardelean +PYTHON3_PKG_FORCE_DISTUTILS_SETUP:=1 + include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk diff --git a/lang/python/python-yaml/Makefile b/lang/python/python-yaml/Makefile index 4c2cbd7be..4e20fd209 100644 --- a/lang/python/python-yaml/Makefile +++ b/lang/python/python-yaml/Makefile @@ -21,6 +21,8 @@ PKG_CPE_ID:=cpe:/a:pyyaml_project:pyyaml PKG_BUILD_DEPENDS:=python-cython/host +PYTHON3_PKG_FORCE_DISTUTILS_SETUP:=1 + include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk From 4195e5c4a8dcb0dfce8049e3e61844a3c1a90d67 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Mon, 6 Mar 2023 22:07:06 +0800 Subject: [PATCH 19/45] fail2ban: Override Build/Compile instead of Py3Build/Compile This allows changes to the Python build system apply more easily to the package. Signed-off-by: Jeffery To --- net/fail2ban/Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/net/fail2ban/Makefile b/net/fail2ban/Makefile index 1d36a36d2..77568e908 100644 --- a/net/fail2ban/Makefile +++ b/net/fail2ban/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fail2ban PKG_VERSION:=0.11.2 -PKG_RELEASE:=7 +PKG_RELEASE:=8 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/fail2ban/fail2ban/tar.gz/$(PKG_VERSION)? @@ -48,6 +48,11 @@ define Package/fail2ban/conffiles /etc/config/fail2ban endef +define Build/Compile + cd $(PKG_BUILD_DIR) && ./fail2ban-2to3 + $(call Py3Build/Compile) +endef + define Py3Package/fail2ban/filespec +|$(PYTHON3_PKG_DIR) -|$(PYTHON3_PKG_DIR)/fail2ban/tests @@ -77,11 +82,6 @@ define Py3Package/fail2ban/install $(INSTALL_BIN) ./files/fail2ban.defaults $(1)/etc/uci-defaults/99_fail2ban endef -define Py3Build/Compile - cd $(PKG_BUILD_DIR) && ./fail2ban-2to3 - $(call Py3Build/Compile/Default) -endef - $(eval $(call Py3Package,fail2ban)) $(eval $(call BuildPackage,fail2ban)) $(eval $(call BuildPackage,fail2ban-src)) From 39991fec1e42c1bed0a94e4b9dc584265d07e4f5 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Tue, 7 Mar 2023 13:38:07 +0800 Subject: [PATCH 20/45] i2c-tools: Prepare for new Python build process This sets build options and adds a call to Py3Build/Install to prepare for the new Python build process. Signed-off-by: Jeffery To --- utils/i2c-tools/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/utils/i2c-tools/Makefile b/utils/i2c-tools/Makefile index 8b1563c2e..f1a871dd9 100644 --- a/utils/i2c-tools/Makefile +++ b/utils/i2c-tools/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=i2c-tools PKG_VERSION:=4.3 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/software/utils/i2c-tools @@ -69,6 +69,8 @@ endef PYTHON3_PKG_SETUP_ARGS:= PYTHON3_PKG_SETUP_DIR:=py-smbus +PYTHON3_PKG_WHEEL_NAME:=smbus +PYTHON3_PKG_WHEEL_VERSION:=1.1 define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ @@ -86,6 +88,10 @@ define Build/InstallDev $(CP) $(PKG_BUILD_DIR)/lib/libi2c.{a,so*} $(1)/usr/lib/ endef +define Build/Install + $(call Py3Build/Install) +endef + define Package/libi2c/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_BUILD_DIR)/lib/libi2c.so* $(1)/usr/lib/ From da55275f3bbf3987771b97f7722d3023a0a8d7c4 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Mon, 6 Mar 2023 22:09:53 +0800 Subject: [PATCH 21/45] nmap: Force old Python build process This package isn't compatible with the new Python build process yet, so force the old build process for now. This also adds a call to Py3Build/Install, for when the new build process can be used. Signed-off-by: Jeffery To --- net/nmap/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/net/nmap/Makefile b/net/nmap/Makefile index 7e097e13b..b84b2ccd8 100644 --- a/net/nmap/Makefile +++ b/net/nmap/Makefile @@ -14,7 +14,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nmap PKG_VERSION:=7.93 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=Nuno Gonçalves PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 @@ -27,6 +27,7 @@ PKG_CPE_ID:=cpe:/a:nmap:nmap PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 PYTHON3_PKG_BUILD:=0 +PYTHON3_PKG_FORCE_DISTUTILS_SETUP:=1 include $(INCLUDE_DIR)/package.mk include ../../lang/python/python3-package.mk @@ -150,6 +151,11 @@ define Build/Compile $(call Py3Build/Compile) endef +define Build/Install + $(call Build/Install/Default,) + $(call Py3Build/Install) +endef + define Package/nmap/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nmap $(1)/usr/bin/ From 705176cd6ab47ff51ca75a9f05e97c2e4804f6cc Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Tue, 7 Mar 2023 13:51:26 +0800 Subject: [PATCH 22/45] onionshare-cli: Force old Python build process This package requires poetry to build using the new Python build process but poetry is not available, so force the old build process for now. Signed-off-by: Jeffery To --- net/onionshare-cli/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/onionshare-cli/Makefile b/net/onionshare-cli/Makefile index 9acbec99f..42afb80fd 100644 --- a/net/onionshare-cli/Makefile +++ b/net/onionshare-cli/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=onionshare-cli PKG_VERSION:=2.3.1 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PYPI_NAME:=onionshare-cli PYPI_SOURCE_NAME:=onionshare_cli @@ -21,6 +21,8 @@ PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DEPENDS:=python-setuptools-scm/host +PYTHON3_PKG_FORCE_DISTUTILS_SETUP:=1 + include ../../lang/python/pypi.mk include $(INCLUDE_DIR)/package.mk include ../../lang/python/python3-package.mk From 5156c0c82bcb18481bf588ba4b1ff67c12422a80 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Sat, 18 Feb 2023 01:13:22 +0800 Subject: [PATCH 23/45] python: Add proper support for pyproject.toml-based builds This removes the changes made in 61f202c0170785addbbc449e4de61cc5886f0833 and adds actual support for pyproject.toml-based (PEP 517) builds of Python packages. Packages can force the use of the old build process by setting PYTHON3_PKG_FORCE_DISTUTILS_SETUP:=1; this should only be a temporary workaround until the package can be updated/fixed to use the new build process. Signed-off-by: Jeffery To --- lang/python/python3-host.mk | 6 --- lang/python/python3-package.mk | 92 +++++++++++++++++++++++++--------- lang/python/python3/Makefile | 4 +- lang/python/setup.py.shim | 6 --- 4 files changed, 69 insertions(+), 39 deletions(-) delete mode 100644 lang/python/setup.py.shim diff --git a/lang/python/python3-host.mk b/lang/python/python3-host.mk index 54f9bde1e..b272c28ca 100644 --- a/lang/python/python3-host.mk +++ b/lang/python/python3-host.mk @@ -98,12 +98,6 @@ HOST_PYTHON3_PIP_VARS:= \ PIP_CONFIG_FILE=/dev/null \ PIP_DISABLE_PIP_VERSION_CHECK=1 -define SetupPyShim - if [ -f $(1)/pyproject.toml ] && [ ! -f $(1)/setup.py ] ; then \ - $(CP) $(python3_mk_path)setup.py.shim $(1)setup.py ; \ - fi -endef - # Multiple concurrent pip processes can lead to errors or unexpected results: https://github.com/pypa/pip/issues/2361 # $(1) => packages to install define HostPython3/PipInstall diff --git a/lang/python/python3-package.mk b/lang/python/python3-package.mk index f2336b8fc..d5d4f8a0f 100644 --- a/lang/python/python3-package.mk +++ b/lang/python/python3-package.mk @@ -56,18 +56,6 @@ define Python3/Run $(HOST_PYTHON3_BIN) $(2) endef -# $(1) => build subdir -# $(2) => additional arguments to setup.py -# $(3) => additional variables -define Python3/ModSetup - $(INSTALL_DIR) $(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR) - $(call SetupPyShim,$(PKG_BUILD_DIR)/$(strip $(1))) - $(call Python3/Run, \ - $(PKG_BUILD_DIR)/$(strip $(1)), \ - setup.py $(2), \ - $(3) PY_PKG_VERSION=$(PKG_VERSION)) -endef - define Python3/FixShebang $(SED) "1"'!'"b;s,^#"'!'".*python.*,#"'!'"/usr/bin/python3," -i --follow-symlinks $(1) endef @@ -189,10 +177,26 @@ endef # Py3Build -PYTHON3_PKG_SETUP_DIR ?= -PYTHON3_PKG_SETUP_GLOBAL_ARGS ?= -PYTHON3_PKG_SETUP_ARGS ?= --single-version-externally-managed -PYTHON3_PKG_SETUP_VARS ?= +PYTHON3_PKG_BUILD?=1 +PYTHON3_PKG_FORCE_DISTUTILS_SETUP?= + +PYTHON3_PKG_SETUP_DIR?= +PYTHON3_PKG_SETUP_GLOBAL_ARGS?= +PYTHON3_PKG_SETUP_ARGS?=--single-version-externally-managed +PYTHON3_PKG_SETUP_VARS?= + +PYTHON3_PKG_BUILD_CONFIG_SETTINGS?= +PYTHON3_PKG_BUILD_VARS?=$(PYTHON3_PKG_SETUP_VARS) +PYTHON3_PKG_BUILD_ARGS?= +PYTHON3_PKG_BUILD_PATH?=$(PYTHON3_PKG_SETUP_DIR) + +PYTHON3_PKG_INSTALL_VARS?= + +PYTHON3_PKG_WHEEL_NAME?=$(subst -,_,$(if $(PYPI_SOURCE_NAME),$(PYPI_SOURCE_NAME),$(PKG_NAME))) +PYTHON3_PKG_WHEEL_VERSION?=$(PKG_VERSION) + +PYTHON3_PKG_BUILD_DIR?=$(PKG_BUILD_DIR)/$(PYTHON3_PKG_BUILD_PATH) + PYTHON3_PKG_HOST_PIP_INSTALL_ARGS = \ $(foreach req,$(HOST_PYTHON3_PACKAGE_BUILD_DEPENDS), \ @@ -224,21 +228,58 @@ define Py3Build/InstallBuildDepends ) endef -define Py3Build/Compile/Default +define Py3Build/Compile/Distutils $(call Py3Build/InstallBuildDepends) - $(call Python3/ModSetup, \ - $(PYTHON3_PKG_SETUP_DIR), \ - $(PYTHON3_PKG_SETUP_GLOBAL_ARGS) \ - install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \ - $(PYTHON3_PKG_SETUP_ARGS), \ + $(INSTALL_DIR) $(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR) + $(call Python3/Run, \ + $(PKG_BUILD_DIR)/$(strip $(PYTHON3_PKG_SETUP_DIR)), \ + setup.py \ + $(PYTHON3_PKG_SETUP_GLOBAL_ARGS) \ + install \ + --prefix="/usr" \ + --root="$(PKG_INSTALL_DIR)" \ + $(PYTHON3_PKG_SETUP_ARGS) \ + , \ $(PYTHON3_PKG_SETUP_VARS) \ ) endef -Py3Build/Configure=$(Py3Build/Configure/Default) -Py3Build/Compile=$(Py3Build/Compile/Default) +define Py3Build/Compile/Default + $(call Py3Build/InstallBuildDepends) + $(call Python3/Run, \ + $(PKG_BUILD_DIR), \ + -m build \ + --no-isolation \ + --outdir "$(PYTHON3_PKG_BUILD_DIR)"/openwrt-build \ + --wheel \ + $(foreach setting,$(PYTHON3_PKG_BUILD_CONFIG_SETTINGS),--config-setting=$(setting)) \ + $(PYTHON3_PKG_BUILD_ARGS) \ + "$(PYTHON3_PKG_BUILD_DIR)" \ + , \ + $(PYTHON3_PKG_BUILD_VARS) \ + ) +endef -PYTHON3_PKG_BUILD ?= 1 +define Py3Build/Install/Default + $(call Python3/Run, \ + $(PKG_BUILD_DIR), \ + -m installer \ + --destdir "$(PKG_INSTALL_DIR)" \ + --no-compile-bytecode \ + --prefix /usr \ + "$(PYTHON3_PKG_BUILD_DIR)"/openwrt-build/$(PYTHON3_PKG_WHEEL_NAME)-$(PYTHON3_PKG_WHEEL_VERSION)-*.whl \ + , \ + $(PYTHON3_PKG_INSTALL_VARS) \ + ) +endef + +Py3Build/Compile=$(Py3Build/Compile/Default) +Py3Build/Install=$(Py3Build/Install/Default) + +ifeq ($(strip $(PYTHON3_PKG_FORCE_DISTUTILS_SETUP)),1) + Py3Build/Compile=$(Py3Build/Compile/Distutils) + Py3Build/Install:=: +endif ifeq ($(strip $(PYTHON3_PKG_BUILD)),1) ifeq ($(PY3),stdlib) @@ -246,4 +287,5 @@ ifeq ($(strip $(PYTHON3_PKG_BUILD)),1) endif Hooks/Configure/Post+=Py3Build/CheckHostPipVersionMatch Build/Compile=$(Py3Build/Compile) + Build/Install=$(Py3Build/Install) endif diff --git a/lang/python/python3/Makefile b/lang/python/python3/Makefile index 611e4c12d..1fd8f43d1 100644 --- a/lang/python/python3/Makefile +++ b/lang/python/python3/Makefile @@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk include ../python3-version.mk PKG_NAME:=python3 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_VERSION:=$(PYTHON3_VERSION).$(PYTHON3_VERSION_MICRO) PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz @@ -45,7 +45,7 @@ PKG_CONFIG_DEPENDS:= \ CONFIG_PACKAGE_python3-pkg-resources \ CONFIG_PACKAGE_python3-setuptools CONFIG_PACKAGE_python3-pip -PKG_BUILD_DEPENDS:=bluez python3/host +PKG_BUILD_DEPENDS:=bluez python3/host python-build/host python-installer/host python-wheel/host HOST_BUILD_DEPENDS:=bzip2/host libffi/host include $(INCLUDE_DIR)/host-build.mk diff --git a/lang/python/setup.py.shim b/lang/python/setup.py.shim deleted file mode 100644 index b309abc02..000000000 --- a/lang/python/setup.py.shim +++ /dev/null @@ -1,6 +0,0 @@ -import os -import setuptools - -# FIXME: see about getting rid of PY_PKG_VERSION asap when setuptools handles this correctly -if __name__ == "__main__": - setuptools.setup(version=os.environ['PY_PKG_VERSION']) From 628202d269f9cef99084380418c77972510a753a Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Wed, 1 Mar 2023 16:48:10 +0800 Subject: [PATCH 24/45] python-astral: Remove BROKEN With proper support for pyproject.toml-based builds in place, this package will now build. Signed-off-by: Jeffery To --- lang/python/python-astral/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lang/python/python-astral/Makefile b/lang/python/python-astral/Makefile index 0218af7af..9d24576cc 100644 --- a/lang/python/python-astral/Makefile +++ b/lang/python/python-astral/Makefile @@ -31,8 +31,7 @@ define Package/python3-astral TITLE:=Calculations for the position of the sun and moon URL:=https://github.com/sffjunkie/astral DEPENDS+= \ - +python3-light \ - @BROKEN + +python3-light endef define Package/python3-astral/description From 773450269365bc1710c8c85b52566d0db0bb0b27 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Fri, 14 Apr 2023 01:36:12 +0800 Subject: [PATCH 25/45] python-exceptiongroup: Remove previous build workaround With proper support for pyproject.toml-based builds in place, this is no longer necessary. Signed-off-by: Jeffery To --- lang/python/python-exceptiongroup/Makefile | 2 +- ...avoid-depending-on-flit-for-building.patch | 31 ------------------- 2 files changed, 1 insertion(+), 32 deletions(-) delete mode 100644 lang/python/python-exceptiongroup/patches/0001-add-setup.py-to-avoid-depending-on-flit-for-building.patch diff --git a/lang/python/python-exceptiongroup/Makefile b/lang/python/python-exceptiongroup/Makefile index 4cde0a6c5..80be44b2e 100644 --- a/lang/python/python-exceptiongroup/Makefile +++ b/lang/python/python-exceptiongroup/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-exceptiongroup PKG_VERSION:=1.1.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=exceptiongroup PKG_HASH:=d484c3090ba2889ae2928419117447a14daf3c1231d5e30d0aae34f354f01785 diff --git a/lang/python/python-exceptiongroup/patches/0001-add-setup.py-to-avoid-depending-on-flit-for-building.patch b/lang/python/python-exceptiongroup/patches/0001-add-setup.py-to-avoid-depending-on-flit-for-building.patch deleted file mode 100644 index aca11e3be..000000000 --- a/lang/python/python-exceptiongroup/patches/0001-add-setup.py-to-avoid-depending-on-flit-for-building.patch +++ /dev/null @@ -1,31 +0,0 @@ -From d6a0c3045598597023ee2423144b134fc87f4b6f Mon Sep 17 00:00:00 2001 -From: Julien Malik -Date: Sat, 26 Nov 2022 13:05:20 +0100 -Subject: [PATCH] add setup.py to avoid depending on flit for building - ---- - setup.py | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) - create mode 100644 setup.py - ---- /dev/null -+++ b/setup.py -@@ -0,0 +1,18 @@ -+#!/usr/bin/env python -+ -+import setuptools -+ -+setuptools.setup( -+ name='exceptiongroup', -+ version='1.1.1', -+ description='Backport of PEP 654 (exception groups)', -+ author='Alex Grönholm', -+ author_email='Alex Grönholm ', -+ url='https://github.com/agronholm/exceptiongroup', -+ packages=['exceptiongroup'], -+ package_data={'': ['*']}, -+ package_dir={'': 'src'}, -+ extras_require={'test': ['pytest >= 6']}, -+ python_requires='>=3.7', -+) -+ From 107e0377637ba8ef6e46c0368b0df8f7c96a5a70 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Sat, 18 Feb 2023 02:48:03 +0800 Subject: [PATCH 26/45] python-jsonschema: Remove previous build workaround With proper support for pyproject.toml-based builds in place, this is no longer necessary. Signed-off-by: Jeffery To --- lang/python/python-jsonschema/Makefile | 4 +- .../python-jsonschema/patches/001-setup.patch | 104 ------------------ 2 files changed, 2 insertions(+), 106 deletions(-) delete mode 100644 lang/python/python-jsonschema/patches/001-setup.patch diff --git a/lang/python/python-jsonschema/Makefile b/lang/python/python-jsonschema/Makefile index e6c2f4c98..4c6e44d46 100644 --- a/lang/python/python-jsonschema/Makefile +++ b/lang/python/python-jsonschema/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-jsonschema PKG_VERSION:=4.17.3 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PYPI_NAME:=jsonschema PKG_HASH:=0f864437ab8b6076ba6707453ef8f98a6a0d512a80e93f8abdb676f737ecb60d @@ -11,7 +11,7 @@ PKG_MAINTAINER:=Javier Marcet PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYING -PKG_BUILD_DEPENDS:=python-hatchling/host python-hatch-vcs/host python-hatch-fancy-pypi-readme/host python-setuptools-scm/host +PKG_BUILD_DEPENDS:=python-hatchling/host python-hatch-vcs/host python-hatch-fancy-pypi-readme/host include ../pypi.mk include $(INCLUDE_DIR)/package.mk diff --git a/lang/python/python-jsonschema/patches/001-setup.patch b/lang/python/python-jsonschema/patches/001-setup.patch deleted file mode 100644 index 0451315df..000000000 --- a/lang/python/python-jsonschema/patches/001-setup.patch +++ /dev/null @@ -1,104 +0,0 @@ ---- /dev/null -+++ b/setup.py -@@ -0,0 +1,2 @@ -+from setuptools import setup -+setup(use_scm_version=True) ---- /dev/null -+++ b/setup.cfg -@@ -0,0 +1,96 @@ -+[metadata] -+name = jsonschema -+url = https://github.com/python-jsonschema/jsonschema -+project_urls = -+ Funding = https://github.com/sponsors/Julian -+ Tidelift = https://tidelift.com/subscription/pkg/pypi-jsonschema?utm_source=pypi-jsonschema&utm_medium=referral&utm_campaign=pypi-link -+ Documentation = https://python-jsonschema.readthedocs.io/ -+ Changelog = https://github.com/python-jsonschema/jsonschema/blob/main/CHANGELOG.rst -+ Source = https://github.com/python-jsonschema/jsonschema -+ Issues = https://github.com/python-jsonschema/jsonschema/issues/ -+description = An implementation of JSON Schema validation for Python -+long_description = file: README.rst -+long_description_content_type = text/x-rst -+author = Julian Berman -+author_email = Julian+jsonschema@GrayVines.com -+license = MIT -+classifiers = -+ Development Status :: 5 - Production/Stable -+ Intended Audience :: Developers -+ License :: OSI Approved :: MIT License -+ Operating System :: OS Independent -+ Programming Language :: Python -+ Programming Language :: Python :: 3.7 -+ Programming Language :: Python :: 3.8 -+ Programming Language :: Python :: 3.9 -+ Programming Language :: Python :: 3.10 -+ Programming Language :: Python :: 3.11 -+ Programming Language :: Python :: Implementation :: CPython -+ Programming Language :: Python :: Implementation :: PyPy -+ -+[options] -+packages = find: -+python_requires = >=3.7 -+install_requires = -+ attrs>=17.4.0 -+ importlib_metadata;python_version<'3.8' -+ importlib_resources>=1.4.0;python_version<'3.9' -+ pyrsistent>=0.14.0,!=0.17.0,!=0.17.1,!=0.17.2 -+ typing_extensions;python_version<'3.8' -+ -+[options.extras_require] -+format = -+ fqdn -+ idna -+ isoduration -+ jsonpointer>1.13 -+ rfc3339-validator -+ rfc3987 -+ uri_template -+ webcolors>=1.11 -+format_nongpl = -+ fqdn -+ idna -+ isoduration -+ jsonpointer>1.13 -+ rfc3339-validator -+ rfc3986-validator>0.1.0 -+ uri_template -+ webcolors>=1.11 -+ -+[options.entry_points] -+console_scripts = -+ jsonschema = jsonschema.cli:main -+ -+[options.package_data] -+jsonschema = schemas/*.json, schemas/*/*.json -+ -+[flake8] -+ban-relative-imports = true -+inline-quotes = " -+exclude = -+ jsonschema/__init__.py -+ jsonschema/_reflect.py -+ignore = -+ B008, # Barring function calls in default args. Ha, no. -+ B306, # See https://github.com/PyCQA/flake8-bugbear/issues/131 -+ W503, # (flake8 default) old PEP8 boolean operator line breaks -+ -+[mypy] -+ignore_missing_imports = true -+ -+[pydocstyle] -+match = (?!(test_|_|compat|cli)).*\.py # see PyCQA/pydocstyle#323 -+add-select = -+ D410, # Trailing whitespace plz -+add-ignore = -+ D107, # Hah, no -+ D200, # 1-line docstrings don't need to be on one line -+ D202, # One line is fine. -+ D412, # Trailing whitespace plz -+ D413, # No trailing whitespace plz -+ -+[egg_info] -+tag_build = -+tag_date = 0 -+ From 84d9831dcb794bffaa1f12cdb4cd39426c9ecd0e Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Sat, 18 Feb 2023 18:19:59 +0800 Subject: [PATCH 27/45] python-packaging: Remove BROKEN With proper support of pyproject.toml-based builds in place, this package will now build. Signed-off-by: Jeffery To --- lang/python/python-packaging/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/python/python-packaging/Makefile b/lang/python/python-packaging/Makefile index c727c20aa..6348bbdc7 100644 --- a/lang/python/python-packaging/Makefile +++ b/lang/python/python-packaging/Makefile @@ -32,7 +32,7 @@ define Package/python3-packaging SUBMENU:=Python TITLE:=Core utilities for Python packages URL:=https://github.com/pypa/packaging - DEPENDS:=+python3-light +python3-logging +python3-urllib @BROKEN + DEPENDS:=+python3-light +python3-logging +python3-urllib endef define Package/python3-packaging/description From 30bd279461faf52b153714eac28b613eef594b90 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Mon, 20 Feb 2023 01:00:26 +0800 Subject: [PATCH 28/45] python-typing-extensions: Update to 4.5.0, add myself as maintainer Signed-off-by: Jeffery To --- lang/python/python-typing-extensions/Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lang/python/python-typing-extensions/Makefile b/lang/python/python-typing-extensions/Makefile index 5f511d54b..5bf3273ae 100644 --- a/lang/python/python-typing-extensions/Makefile +++ b/lang/python/python-typing-extensions/Makefile @@ -8,18 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-typing-extensions -PKG_VERSION:=3.10.0.0 +PKG_VERSION:=4.5.0 PKG_RELEASE:=1 PYPI_NAME:=typing-extensions PYPI_SOURCE_NAME:=typing_extensions -PKG_HASH:=50b6f157849174217d0656f99dc82fe932884fb250826c18350e159ec6cdf342 +PKG_HASH:=5cb5f4a79139d699607b3ef622a1dedafa84e115ab0024e0d9c044a9479ca7cb -PKG_MAINTAINER:=Jan Pavlinec +PKG_MAINTAINER:=Jan Pavlinec , Jeffery To PKG_LICENSE:=PSF-2.0 PKG_LICENSE_FILES:=LICENSE -HOST_BUILD_DEPENDS:=python3/host python-build/host python-installer/host python-wheel/host +PKG_BUILD_DEPENDS:=python-flit-core/host +HOST_BUILD_DEPENDS:=python3/host python-build/host python-installer/host python-flit-core/host include ../pypi.mk include $(INCLUDE_DIR)/package.mk From 63d13aa15f847d35d7f7473e1595de6c9d53f655 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Mon, 6 Mar 2023 11:54:02 +0800 Subject: [PATCH 29/45] python-libraries: Update build options This updates the build options for these packages to work with the pyproject.toml-based build process, and removes PYTHON3_PKG_FORCE_DISTUTILS_SETUP:=1. Signed-off-by: Jeffery To --- lang/python/pillow/Makefile | 27 +++++++++++++-------------- lang/python/python-curl/Makefile | 12 +++++------- lang/python/python-evdev/Makefile | 13 ++++++------- lang/python/python-gmpy2/Makefile | 6 ++---- lang/python/python-yaml/Makefile | 6 ++---- 5 files changed, 28 insertions(+), 36 deletions(-) diff --git a/lang/python/pillow/Makefile b/lang/python/pillow/Makefile index 460f9434e..941f28f4e 100644 --- a/lang/python/pillow/Makefile +++ b/lang/python/pillow/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pillow PKG_VERSION:=9.5.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=Pillow PKG_HASH:=bf548479d336726d7a0eceb6e767e179fbde37833ae42794602631a070d630f1 @@ -18,8 +18,6 @@ PKG_LICENSE:=HPND PKG_LICENSE_FILES:=LICENSE PKG_CPE_ID:=cpe:/a:python:pillow -PYTHON3_PKG_FORCE_DISTUTILS_SETUP:=1 - include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk @@ -38,17 +36,18 @@ define Package/python3-pillow/description The friendly PIL fork endef -PYTHON3_PKG_SETUP_GLOBAL_ARGS += build_ext \ - --enable-zlib \ - --enable-jpeg \ - --enable-webp \ - --enable-webpmux \ - --enable-tiff \ - --enable-freetype \ - --disable-lcms \ - --disable-jpeg2000 \ - --disable-imagequant \ - --disable-platform-guessing +PYTHON3_PKG_BUILD_CONFIG_SETTINGS += \ + --global-option=build_ext \ + --global-option=--enable-zlib \ + --global-option=--enable-jpeg \ + --global-option=--enable-webp \ + --global-option=--enable-webpmux \ + --global-option=--enable-tiff \ + --global-option=--enable-freetype \ + --global-option=--disable-lcms \ + --global-option=--disable-jpeg2000 \ + --global-option=--disable-imagequant \ + --global-option=--disable-platform-guessing $(eval $(call Py3Package,python3-pillow)) $(eval $(call BuildPackage,python3-pillow)) diff --git a/lang/python/python-curl/Makefile b/lang/python/python-curl/Makefile index 560c05ad2..7d8d69e82 100644 --- a/lang/python/python-curl/Makefile +++ b/lang/python/python-curl/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pycurl PKG_VERSION:=7.45.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=$(PKG_NAME) PKG_HASH:=5730590be0271364a5bddd9e245c9cc0fb710c4cbacbdd95264a3122d23224ca @@ -15,8 +15,6 @@ PKG_MAINTAINER:=Waldemar Konik PKG_LICENSE:=LGPL-2.1 PKG_LICENSE_FILES:=COPYING-LGPL -PYTHON3_PKG_FORCE_DISTUTILS_SETUP:=1 - include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk @@ -37,19 +35,19 @@ endef PYTHON3_PKG_SETUP_ARGS:= ifdef CONFIG_LIBCURL_OPENSSL - PYTHON3_PKG_SETUP_ARGS+=--with-openssl + PYTHON3_PKG_BUILD_VARS:=PYCURL_SSL_LIBRARY=openssl endif ifdef CONFIG_LIBCURL_GNUTLS - PYTHON3_PKG_SETUP_ARGS+=--with-gnutls + PYTHON3_PKG_BUILD_VARS:=PYCURL_SSL_LIBRARY=gnutls endif ifdef CONFIG_LIBCURL_MBEDTLS - PYTHON3_PKG_SETUP_ARGS+=--with-mbedtls + PYTHON3_PKG_BUILD_VARS:=PYCURL_SSL_LIBRARY=mbedtls endif ifdef CONFIG_LIBCURL_WOLFSSL - PYTHON3_PKG_SETUP_ARGS+=--with-wolfssl + PYTHON3_PKG_BUILD_VARS:=PYCURL_SSL_LIBRARY=wolfssl endif $(eval $(call Py3Package,python3-curl)) diff --git a/lang/python/python-evdev/Makefile b/lang/python/python-evdev/Makefile index 6463daec7..bab726b54 100644 --- a/lang/python/python-evdev/Makefile +++ b/lang/python/python-evdev/Makefile @@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=python-evdev PKG_VERSION:=1.6.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_LICENSE:=BSD-3-Clause PKG_MAINTAINER:=Paulo Costa , Alexandru Ardelean @@ -18,8 +18,6 @@ PKG_MAINTAINER:=Paulo Costa , Alexandru Ardelean -PYTHON3_PKG_FORCE_DISTUTILS_SETUP:=1 - include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk -PYTHON3_PKG_SETUP_ARGS:=--nompfr +PYTHON3_PKG_BUILD_CONFIG_SETTINGS:=--global-option=--nompfr define Package/python3-gmpy2 SECTION:=lang diff --git a/lang/python/python-yaml/Makefile b/lang/python/python-yaml/Makefile index 4e20fd209..7e02371e4 100644 --- a/lang/python/python-yaml/Makefile +++ b/lang/python/python-yaml/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-yaml PKG_VERSION:=6.0 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PYPI_NAME:=PyYAML PKG_HASH:=68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2 @@ -21,8 +21,6 @@ PKG_CPE_ID:=cpe:/a:pyyaml_project:pyyaml PKG_BUILD_DEPENDS:=python-cython/host -PYTHON3_PKG_FORCE_DISTUTILS_SETUP:=1 - include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk @@ -40,7 +38,7 @@ define Package/python3-yaml/description PyYAML is a YAML parser and emitter for the Python programming language. endef -PYTHON3_PKG_SETUP_GLOBAL_ARGS:=--with-libyaml +PYTHON3_PKG_BUILD_VARS:=PYYAML_FORCE_LIBYAML=1 PYTHON3_PKG_SETUP_ARGS:= $(eval $(call Py3Package,python3-yaml)) From b1b008f42ff0a6da96b801e2eaf68be4e2f2b5bb Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Mon, 6 Mar 2023 22:29:15 +0800 Subject: [PATCH 30/45] python-packages: Clean up build variables * Rename PYTHON3_PKG_SETUP_VARS to PYTHON3_PKG_BUILD_VARS, and PYTHON3_PKG_SETUP_DIR to PYTHON3_PKG_BUILD_PATH The new variable names emphasize that these values apply to the new build process. * Remove PYTHON3_PKG_SETUP_ARGS set to the empty string These were set to override the default arguments in the old build process and not applicable to the new build process. Signed-off-by: Jeffery To --- lang/python/python-automat/Makefile | 4 ++-- lang/python/python-cached-property/Makefile | 4 +--- lang/python/python-crcmod/Makefile | 4 +--- lang/python/python-cryptodome/Makefile | 5 ++--- lang/python/python-cryptodomex/Makefile | 5 ++--- lang/python/python-curl/Makefile | 4 +--- lang/python/python-docker/Makefile | 4 +--- lang/python/python-dockerpty/Makefile | 4 +--- lang/python/python-docopt/Makefile | 4 +--- lang/python/python-docutils/Makefile | 4 +--- lang/python/python-intelhex/Makefile | 4 +--- lang/python/python-paramiko/Makefile | 4 +--- lang/python/python-parsley/Makefile | 4 +--- lang/python/python-pynacl/Makefile | 4 ++-- lang/python/python-stem/Makefile | 4 +--- lang/python/python-yaml/Makefile | 3 +-- lang/python/python3-pyroute2/Makefile | 4 +--- utils/i2c-tools/Makefile | 5 ++--- 18 files changed, 23 insertions(+), 51 deletions(-) diff --git a/lang/python/python-automat/Makefile b/lang/python/python-automat/Makefile index 248f7b705..7802168aa 100644 --- a/lang/python/python-automat/Makefile +++ b/lang/python/python-automat/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-automat PKG_VERSION:=20.2.0 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PYPI_NAME:=Automat PKG_HASH:=7979803c74610e11ef0c0d68a2942b152df52da55336e0c9d58daf1831cbdf33 @@ -22,7 +22,7 @@ include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk -PYTHON3_PKG_SETUP_VARS:= \ +PYTHON3_PKG_BUILD_VARS:= \ PKG_VERSION="$(PKG_VERSION)" define Package/python3-automat diff --git a/lang/python/python-cached-property/Makefile b/lang/python/python-cached-property/Makefile index 63685ba9c..a95d298aa 100644 --- a/lang/python/python-cached-property/Makefile +++ b/lang/python/python-cached-property/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-cached-property PKG_VERSION:=1.5.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=cached-property PKG_HASH:=9fa5755838eecbb2d234c3aa390bd80fbd3ac6b6869109bfc1b499f7bd89a130 @@ -15,8 +15,6 @@ include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk -PYTHON3_PKG_SETUP_ARGS:= - define Package/python3-cached-property SECTION:=lang CATEGORY:=Languages diff --git a/lang/python/python-crcmod/Makefile b/lang/python/python-crcmod/Makefile index bd9d606b0..de59e612d 100644 --- a/lang/python/python-crcmod/Makefile +++ b/lang/python/python-crcmod/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-crcmod PKG_VERSION:=1.7 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=crcmod PKG_HASH:=dc7051a0db5f2bd48665a990d3ec1cc305a466a77358ca4492826f41f283601e @@ -13,8 +13,6 @@ PKG_HASH:=dc7051a0db5f2bd48665a990d3ec1cc305a466a77358ca4492826f41f283601e PKG_LICENSE:=MIT PKG_MAINTAINER:=David Bauer -PYTHON3_PKG_SETUP_ARGS:= - include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk diff --git a/lang/python/python-cryptodome/Makefile b/lang/python/python-cryptodome/Makefile index 037ff861d..0f256628e 100644 --- a/lang/python/python-cryptodome/Makefile +++ b/lang/python/python-cryptodome/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-cryptodome PKG_VERSION:=3.9.7 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PYPI_NAME:=pycryptodome PKG_HASH:=f1add21b6d179179b3c177c33d18a2186a09cc0d3af41ff5ed3f377360b869f2 @@ -20,8 +20,7 @@ include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk -PYTHON3_PKG_SETUP_ARGS:= -PYTHON3_PKG_SETUP_VARS:= \ +PYTHON3_PKG_BUILD_VARS:= \ CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)" define Package/python3-cryptodome diff --git a/lang/python/python-cryptodomex/Makefile b/lang/python/python-cryptodomex/Makefile index 7cc4c530f..9847db583 100644 --- a/lang/python/python-cryptodomex/Makefile +++ b/lang/python/python-cryptodomex/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-cryptodomex PKG_VERSION:=3.10.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=pycryptodomex PKG_HASH:=541cd3e3e252fb19a7b48f420b798b53483302b7fe4d9954c947605d0a263d62 @@ -19,8 +19,7 @@ include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk -PYTHON3_PKG_SETUP_ARGS:= -PYTHON3_PKG_SETUP_VARS:= \ +PYTHON3_PKG_BUILD_VARS:= \ CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)" define Package/python3-cryptodomex diff --git a/lang/python/python-curl/Makefile b/lang/python/python-curl/Makefile index 7d8d69e82..b239efd3a 100644 --- a/lang/python/python-curl/Makefile +++ b/lang/python/python-curl/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pycurl PKG_VERSION:=7.45.2 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PYPI_NAME:=$(PKG_NAME) PKG_HASH:=5730590be0271364a5bddd9e245c9cc0fb710c4cbacbdd95264a3122d23224ca @@ -32,8 +32,6 @@ define Package/python3-curl/description PycURL is a Python interface to libcurl, the multiprotocol file transfer library. endef -PYTHON3_PKG_SETUP_ARGS:= - ifdef CONFIG_LIBCURL_OPENSSL PYTHON3_PKG_BUILD_VARS:=PYCURL_SSL_LIBRARY=openssl endif diff --git a/lang/python/python-docker/Makefile b/lang/python/python-docker/Makefile index 22db2540b..de278aac6 100644 --- a/lang/python/python-docker/Makefile +++ b/lang/python/python-docker/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-docker PKG_VERSION:=6.0.1 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PYPI_NAME:=docker PKG_HASH:=896c4282e5c7af5c45e8b683b0b0c33932974fe6e50fc6906a0a83616ab3da97 @@ -17,8 +17,6 @@ include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk -PYTHON3_PKG_SETUP_ARGS:= - define Package/python3-docker SECTION:=lang CATEGORY:=Languages diff --git a/lang/python/python-dockerpty/Makefile b/lang/python/python-dockerpty/Makefile index 662e4c552..8addc132c 100644 --- a/lang/python/python-dockerpty/Makefile +++ b/lang/python/python-dockerpty/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-dockerpty PKG_VERSION:=0.4.1 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PYPI_NAME:=dockerpty PKG_HASH:=69a9d69d573a0daa31bcd1c0774eeed5c15c295fe719c61aca550ed1393156ce @@ -15,8 +15,6 @@ include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk -PYTHON3_PKG_SETUP_ARGS:= - define Package/python3-dockerpty SECTION:=lang CATEGORY:=Languages diff --git a/lang/python/python-docopt/Makefile b/lang/python/python-docopt/Makefile index cba239458..fa6e98249 100644 --- a/lang/python/python-docopt/Makefile +++ b/lang/python/python-docopt/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-docopt PKG_VERSION:=0.6.2 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PYPI_NAME:=docopt PKG_HASH:=49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491 @@ -15,8 +15,6 @@ include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk -PYTHON3_PKG_SETUP_ARGS:= - define Package/python3-docopt SECTION:=lang CATEGORY:=Languages diff --git a/lang/python/python-docutils/Makefile b/lang/python/python-docutils/Makefile index 23fcd4c82..50875051f 100644 --- a/lang/python/python-docutils/Makefile +++ b/lang/python/python-docutils/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=docutils PKG_VERSION:=0.19 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=$(PKG_NAME) PKG_HASH:=33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6 @@ -29,8 +29,6 @@ such as HTML, XML, and LaTeX. For input Docutils supports reStructuredText, an easy-to-read, what-you-see-is-what-you-get plaintext markup syntax. endef -PYTHON3_PKG_SETUP_ARGS:= - $(eval $(call Py3Package,python3-docutils)) $(eval $(call BuildPackage,python3-docutils)) $(eval $(call BuildPackage,python3-docutils-src)) diff --git a/lang/python/python-intelhex/Makefile b/lang/python/python-intelhex/Makefile index a7cfb785e..8e0abd739 100644 --- a/lang/python/python-intelhex/Makefile +++ b/lang/python/python-intelhex/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-intelhex PKG_VERSION:=2.2.1 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PYPI_NAME:=IntelHex PYPI_SOURCE_NAME:=intelhex @@ -34,8 +34,6 @@ define Package/python3-intelhex/description scratch and manipulate data from Intel HEX file format. endef -PYTHON3_PKG_SETUP_ARGS:= - $(eval $(call Py3Package,python3-intelhex)) $(eval $(call BuildPackage,python3-intelhex)) $(eval $(call BuildPackage,python3-intelhex-src)) diff --git a/lang/python/python-paramiko/Makefile b/lang/python/python-paramiko/Makefile index 7cf714604..03531ff9b 100644 --- a/lang/python/python-paramiko/Makefile +++ b/lang/python/python-paramiko/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-paramiko PKG_VERSION:=2.12.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=paramiko PKG_HASH:=376885c05c5d6aa6e1f4608aac2a6b5b0548b1add40274477324605903d9cd49 @@ -15,8 +15,6 @@ include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk -PYTHON3_PKG_SETUP_ARGS:= - define Package/python3-paramiko SECTION:=lang CATEGORY:=Languages diff --git a/lang/python/python-parsley/Makefile b/lang/python/python-parsley/Makefile index 7eaf15e10..cff3d3ed6 100644 --- a/lang/python/python-parsley/Makefile +++ b/lang/python/python-parsley/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-parsley PKG_VERSION:=1.3 -PKG_RELEASE:=5 +PKG_RELEASE:=6 PYPI_NAME:=Parsley PKG_HASH:=9444278d47161d5f2be76a767809a3cbe6db4db822f46a4fd7481d4057208d41 @@ -22,8 +22,6 @@ include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk -PYTHON3_PKG_SETUP_ARGS:= - define Package/python3-parsley SECTION:=lang CATEGORY:=Languages diff --git a/lang/python/python-pynacl/Makefile b/lang/python/python-pynacl/Makefile index d3469cc43..72d8debcb 100644 --- a/lang/python/python-pynacl/Makefile +++ b/lang/python/python-pynacl/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-pynacl PKG_VERSION:=1.5.0 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PYPI_NAME:=PyNaCl PKG_HASH:=8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba @@ -13,7 +13,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DEPENDS:=libffi/host python-cffi/host # cffi>=1.4.1 -PYTHON3_PKG_SETUP_VARS:= SODIUM_INSTALL=system +PYTHON3_PKG_BUILD_VARS:=SODIUM_INSTALL=system include ../pypi.mk include $(INCLUDE_DIR)/package.mk diff --git a/lang/python/python-stem/Makefile b/lang/python/python-stem/Makefile index e1b486afe..03ef35633 100644 --- a/lang/python/python-stem/Makefile +++ b/lang/python/python-stem/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-stem PKG_VERSION:=1.8.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=stem PKG_HASH:=81d43a7c668ba9d7bc1103b2e7a911e9d148294b373d27a59ae8da79ef7a3e2f @@ -11,8 +11,6 @@ PKG_MAINTAINER:=Javier Marcet PKG_LICENSE:=LGPL-3.0-only PKG_LICENSE_FILES:=LICENSE -PYTHON3_PKG_SETUP_ARGS:= - include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk diff --git a/lang/python/python-yaml/Makefile b/lang/python/python-yaml/Makefile index 7e02371e4..1731b33fc 100644 --- a/lang/python/python-yaml/Makefile +++ b/lang/python/python-yaml/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-yaml PKG_VERSION:=6.0 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PYPI_NAME:=PyYAML PKG_HASH:=68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2 @@ -39,7 +39,6 @@ define Package/python3-yaml/description endef PYTHON3_PKG_BUILD_VARS:=PYYAML_FORCE_LIBYAML=1 -PYTHON3_PKG_SETUP_ARGS:= $(eval $(call Py3Package,python3-yaml)) $(eval $(call BuildPackage,python3-yaml)) diff --git a/lang/python/python3-pyroute2/Makefile b/lang/python/python3-pyroute2/Makefile index 1f8cf55e6..e6edfd847 100644 --- a/lang/python/python3-pyroute2/Makefile +++ b/lang/python/python3-pyroute2/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python3-pyroute2 PKG_VERSION:=0.5.16 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=pyroute2 PKG_HASH:=fe681a2d008cac815b9f287250d69a333fbfc2b2d89c37d58798104057149989 @@ -43,8 +43,6 @@ define Package/python3-pyroute2/description but now it supports many netlink protocols. endef -PYTHON3_PKG_SETUP_ARGS:= - $(eval $(call Py3Package,python3-pyroute2)) $(eval $(call BuildPackage,python3-pyroute2)) $(eval $(call BuildPackage,python3-pyroute2-src)) diff --git a/utils/i2c-tools/Makefile b/utils/i2c-tools/Makefile index f1a871dd9..cdae0d4eb 100644 --- a/utils/i2c-tools/Makefile +++ b/utils/i2c-tools/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=i2c-tools PKG_VERSION:=4.3 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/software/utils/i2c-tools @@ -67,8 +67,7 @@ define Package/python3-smbus/description This package contain the Python3 bindings for Linux SMBus access through i2c-dev. endef -PYTHON3_PKG_SETUP_ARGS:= -PYTHON3_PKG_SETUP_DIR:=py-smbus +PYTHON3_PKG_BUILD_PATH:=py-smbus PYTHON3_PKG_WHEEL_NAME:=smbus PYTHON3_PKG_WHEEL_VERSION:=1.1 From c3d09dfaa3dc284602f6e1736a4b34be958af993 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Wed, 12 Apr 2023 20:19:10 +0200 Subject: [PATCH 31/45] tang: updated to version 12 This version enables standalone operation. Signed-off-by: Nikos Mavrogiannopoulos --- utils/tang/Makefile | 20 +++++++++----------- utils/tang/files/config | 4 ++++ utils/tang/files/tang.init | 24 ++++++++++++++++++++++++ utils/tang/files/tang.upgrade | 1 + utils/tang/files/tangdw | 4 ---- utils/tang/files/tangdx | 12 ------------ 6 files changed, 38 insertions(+), 27 deletions(-) create mode 100644 utils/tang/files/config create mode 100644 utils/tang/files/tang.init create mode 100644 utils/tang/files/tang.upgrade delete mode 100755 utils/tang/files/tangdw delete mode 100644 utils/tang/files/tangdx diff --git a/utils/tang/Makefile b/utils/tang/Makefile index 6dff7c88c..005fe4d50 100644 --- a/utils/tang/Makefile +++ b/utils/tang/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=tang -PKG_VERSION:=11 -PKG_RELEASE:=3 +PKG_VERSION:=12 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://github.com/latchset/$(PKG_NAME)/releases/download/v$(PKG_VERSION)/ -PKG_HASH:=ef5d3ae56030f20c290594b9be89ad9ec469dd385676595e1c7a2bfdc3f45d8f +PKG_HASH:=892e0b26ee2db01f2c257b083fbb85aede7d3f59de7361c9c9528c0d5783e69c PKG_MAINTAINER:=Tibor Dudlák PKG_LICENSE:=GPL-3.0-or-later @@ -25,7 +25,7 @@ include $(INCLUDE_DIR)/meson.mk define Package/tang SECTION:=utils TITLE:=tang v$(PKG_VERSION) - daemon for binding data to the presence of a third party - DEPENDS:=+libhttp-parser +xinetd +jose +bash + DEPENDS:=+libhttp-parser +jose +bash URL:=https://github.com/latchset/tang endef @@ -34,18 +34,18 @@ define Package/tang/description endef define Package/tang/conffiles -/etc/xinetd.d/tangdx /usr/share/tang/db/ endef define Package/tang/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_DIR) $(1)/usr/libexec - $(INSTALL_DIR) $(1)/etc/xinetd.d/ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tang-show-keys $(1)/usr/bin/ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/libexec/tangd* $(1)/usr/libexec/ - $(INSTALL_BIN) ./files/tangdw $(1)/usr/libexec/ - $(CP) ./files/tangdx $(1)/etc/xinetd.d/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/tang.init $(1)/etc/init.d/tang + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) ./files/config $(1)/etc/config/tang endef define Package/tang/postinst @@ -54,10 +54,8 @@ if [ -z "$${IPKG_INSTROOT}" ]; then mkdir -p /usr/share/tang/db KEYS=$(find /usr/share/tang/db/ -name "*.jw*" -maxdepth 1 | wc -l) if [ "${KEYS}" = "0" ]; then # if db is empty generate new key pair - /usr/libexec/tangd-keygen /usr/share/tang/db/ + /usr/libexec/tangd-keygen /usr/share/tang/db fi - (cat /etc/services | grep -E "tangd.*8888\/tcp") > /dev/null \ - || echo -e "tangd\t\t8888/tcp" >> /etc/services fi endef diff --git a/utils/tang/files/config b/utils/tang/files/config new file mode 100644 index 000000000..1b37d3deb --- /dev/null +++ b/utils/tang/files/config @@ -0,0 +1,4 @@ +config tang 'config' + option port '9090' + option enabled '0' + diff --git a/utils/tang/files/tang.init b/utils/tang/files/tang.init new file mode 100644 index 000000000..9ce89c158 --- /dev/null +++ b/utils/tang/files/tang.init @@ -0,0 +1,24 @@ +#!/bin/sh /etc/rc.common + +START=50 +USE_PROCD=1 + +start_service() { + KEYS=$(find /usr/share/tang/db -name "*.jw*" -maxdepth 1 | wc -l) + if [ -z "${KEYS}" ] || [ "${KEYS}" = "0" ]; then # if db is empty generate new key pair + mkdir -p /usr/share/tang/db + /usr/libexec/tangd-keygen /usr/share/tang/db + fi + + config_load "tang" + config_get_bool enabled "config" "enabled" 0 + config_get port "config" "port" "9090" + + [ "${enabled}" = "1" ] || return + + procd_open_instance + procd_set_param command /usr/libexec/tangd -p "${port}" -l /usr/share/tang/db + procd_set_param respawn + procd_set_param user tang + procd_close_instance +} diff --git a/utils/tang/files/tang.upgrade b/utils/tang/files/tang.upgrade new file mode 100644 index 000000000..82623f64e --- /dev/null +++ b/utils/tang/files/tang.upgrade @@ -0,0 +1 @@ +/usr/share/tang/db/*.jw* diff --git a/utils/tang/files/tangdw b/utils/tang/files/tangdw deleted file mode 100755 index 91c8a8965..000000000 --- a/utils/tang/files/tangdw +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -echo "==================================" >> /var/log/tangd.log -echo `date`: >> /var/log/tangd.log -/usr/libexec/tangd $1 2>> /var/log/tangd.log diff --git a/utils/tang/files/tangdx b/utils/tang/files/tangdx deleted file mode 100644 index bd2134eae..000000000 --- a/utils/tang/files/tangdx +++ /dev/null @@ -1,12 +0,0 @@ -service tangd -{ - port = 8888 - socket_type = stream - wait = no - user = root - server = /usr/libexec/tangdw - server_args = /usr/share/tang/db - log_on_success += USERID - log_on_failure += USERID - disable = no -} From 17d759c7fd69cbccf59d436baa653b326259fc73 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Sun, 7 May 2023 13:35:14 +0200 Subject: [PATCH 32/45] tang: remove post-installation key generation The keys will be generated on startup. Signed-off-by: Nikos Mavrogiannopoulos --- utils/tang/Makefile | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/utils/tang/Makefile b/utils/tang/Makefile index 005fe4d50..994d13dc5 100644 --- a/utils/tang/Makefile +++ b/utils/tang/Makefile @@ -48,15 +48,4 @@ define Package/tang/install $(INSTALL_CONF) ./files/config $(1)/etc/config/tang endef -define Package/tang/postinst -#!/bin/sh -if [ -z "$${IPKG_INSTROOT}" ]; then - mkdir -p /usr/share/tang/db - KEYS=$(find /usr/share/tang/db/ -name "*.jw*" -maxdepth 1 | wc -l) - if [ "${KEYS}" = "0" ]; then # if db is empty generate new key pair - /usr/libexec/tangd-keygen /usr/share/tang/db - fi -fi -endef - $(eval $(call BuildPackage,tang)) From 21937be8edd6193003aea430df46f7e98f7d18d8 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Tue, 26 Apr 2022 09:50:08 +0200 Subject: [PATCH 33/45] tang: use sbin instead of libexec Signed-off-by: Nikos Mavrogiannopoulos --- utils/tang/Makefile | 4 ++-- utils/tang/files/tang.init | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/utils/tang/Makefile b/utils/tang/Makefile index 994d13dc5..c9b159a19 100644 --- a/utils/tang/Makefile +++ b/utils/tang/Makefile @@ -39,9 +39,9 @@ endef define Package/tang/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_DIR) $(1)/usr/libexec + $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tang-show-keys $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/libexec/tangd* $(1)/usr/libexec/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/libexec/tangd* $(1)/usr/sbin/ $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/tang.init $(1)/etc/init.d/tang $(INSTALL_DIR) $(1)/etc/config diff --git a/utils/tang/files/tang.init b/utils/tang/files/tang.init index 9ce89c158..ea4045f2e 100644 --- a/utils/tang/files/tang.init +++ b/utils/tang/files/tang.init @@ -7,7 +7,7 @@ start_service() { KEYS=$(find /usr/share/tang/db -name "*.jw*" -maxdepth 1 | wc -l) if [ -z "${KEYS}" ] || [ "${KEYS}" = "0" ]; then # if db is empty generate new key pair mkdir -p /usr/share/tang/db - /usr/libexec/tangd-keygen /usr/share/tang/db + /usr/sbin/tangd-keygen /usr/share/tang/db fi config_load "tang" @@ -17,7 +17,7 @@ start_service() { [ "${enabled}" = "1" ] || return procd_open_instance - procd_set_param command /usr/libexec/tangd -p "${port}" -l /usr/share/tang/db + procd_set_param command /usr/sbin/tangd -p "${port}" -l /usr/share/tang/db procd_set_param respawn procd_set_param user tang procd_close_instance From 99a0cfdd0371374074e3da5cdda9848f38ec01a9 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Mon, 8 May 2023 13:14:09 +0800 Subject: [PATCH 34/45] python-trove-classifiers: Update to 2023.5.2 Signed-off-by: Jeffery To --- lang/python/python-trove-classifiers/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/python/python-trove-classifiers/Makefile b/lang/python/python-trove-classifiers/Makefile index b122bc2b7..1a4708d00 100644 --- a/lang/python/python-trove-classifiers/Makefile +++ b/lang/python/python-trove-classifiers/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-trove-classifiers -PKG_VERSION:=2023.3.9 +PKG_VERSION:=2023.5.2 PKG_RELEASE:=1 PYPI_NAME:=trove-classifiers -PKG_HASH:=ee42f2f8c1d4bcfe35f746e472f07633570d485fab45407effc0379270a3bb03 +PKG_HASH:=c46d6e40a9581599b16c712e0164fec3764872a4085c673c07559787caedb867 PKG_LICENSE:=Apache-2.0 PKG_LICENSE_FILES:=LICENSE From 8e498b214deaefe7103dfbbe21f32d813efdc8fe Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Mon, 8 May 2023 20:37:33 +0200 Subject: [PATCH 35/45] ocserv: updated to 1.1.7 Signed-off-by: Nikos Mavrogiannopoulos --- net/ocserv/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/ocserv/Makefile b/net/ocserv/Makefile index 4b197ad4e..7db36a6e1 100644 --- a/net/ocserv/Makefile +++ b/net/ocserv/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ocserv -PKG_VERSION:=1.1.6 -PKG_RELEASE:=2 +PKG_VERSION:=1.1.7 +PKG_RELEASE:=1 PKG_BUILD_FLAGS:=no-mips16 PKG_BUILD_DIR :=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/ocserv/ -PKG_HASH:=6a6cbe92212e32280426a51c634adc3d4803579dd049cfdb7e014714cc82c693 +PKG_HASH:=f30f7515e1e569ca2e68a96fa5e3dd10d49a18a40c981ad95b484d10835e3aa6 PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=COPYING From 96145db78af6afa27d8fa857d2af384b1c623259 Mon Sep 17 00:00:00 2001 From: Juan del Bosque Date: Fri, 14 Apr 2023 09:48:22 +0200 Subject: [PATCH 36/45] dovecot: Fix iconv macro is missing compile error Fix a Dovecot compile error when building with no other packages than the default in master build, because iconv macro is missing. Fixes: #20677 Signed-off-by: Juan del Bosque --- mail/dovecot/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mail/dovecot/Makefile b/mail/dovecot/Makefile index d1c034eda..8f9e66e15 100644 --- a/mail/dovecot/Makefile +++ b/mail/dovecot/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dovecot PKG_VERSION:=2.3.18 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://dovecot.org/releases/2.3 @@ -37,6 +37,9 @@ include $(INCLUDE_DIR)/package.mk # dovecot itself. include $(INCLUDE_DIR)/nls.mk +# need iconv.m4, otherwise error during autoreconf +PKG_BUILD_DEPENDS:=gettext-full + define Package/dovecot SECTION:=mail CATEGORY:=Mail From 955a90944b2ebfbd66a6149d14126d6d9ced6c5e Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Wed, 10 May 2023 13:51:59 +0800 Subject: [PATCH 37/45] CI: Run "apt-get update" before installing signify-openbsd Signed-off-by: Jeffery To --- .github/workflows/multi-arch-test-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/multi-arch-test-build.yml b/.github/workflows/multi-arch-test-build.yml index 3e8b6f263..e6295e9f8 100644 --- a/.github/workflows/multi-arch-test-build.yml +++ b/.github/workflows/multi-arch-test-build.yml @@ -84,6 +84,7 @@ jobs: - name: Generate build keys run: | + sudo apt-get update sudo apt-get install -y signify-openbsd signify-openbsd -G -n -c 'DO NOT USE - OpenWrt packages feed CI' -p packages_ci.pub -s packages_ci.sec EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) From 5ce254fd8e4136fbb3d385f4e55e2cdae0d6eb39 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Wed, 10 May 2023 14:10:37 +0800 Subject: [PATCH 38/45] CI: Do package run-tests only if target packages were built Currently, the package run-test phase will fail for PRs that only add/update host-only packages, as no target packages (*.ipk) are built. This checks if any target packages are built before attempting the run-tests. Signed-off-by: Jeffery To --- .github/workflows/multi-arch-test-build.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/multi-arch-test-build.yml b/.github/workflows/multi-arch-test-build.yml index e6295e9f8..60ff51063 100644 --- a/.github/workflows/multi-arch-test-build.yml +++ b/.github/workflows/multi-arch-test-build.yml @@ -160,21 +160,32 @@ jobs: - name: Remove logs run: sudo rm -rf logs/ || true + - name: Check if any packages were built + run: | + if [ -n "$(find . -maxdepth 1 -type f -name '*.ipk' -print -quit)" ]; then + echo "Found *.ipk files" + HAVE_IPKS=true + else + echo "No *.ipk files found" + HAVE_IPKS=false + fi + echo "HAVE_IPKS=$HAVE_IPKS" >> $GITHUB_ENV + - name: Register QEMU - if: ${{ matrix.runtime_test }} + if: ${{ matrix.runtime_test && fromJSON(env.HAVE_IPKS) }} run: | sudo apt-get update sudo apt-get install -y qemu-user-static binfmt-support sudo update-binfmts --import - name: Build Docker container - if: ${{ matrix.runtime_test }} + if: ${{ matrix.runtime_test && fromJSON(env.HAVE_IPKS) }} run: | docker build -t test-container --build-arg ARCH .github/workflows/ env: ARCH: ${{ matrix.arch }}-${{ env.BRANCH }} - name: Test via Docker container - if: ${{ matrix.runtime_test }} + if: ${{ matrix.runtime_test && fromJSON(env.HAVE_IPKS) }} run: | docker run --rm -v $GITHUB_WORKSPACE:/ci test-container From 8d331953f34a1ed231cb24893c68606813c36824 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Thu, 11 May 2023 00:26:17 +0800 Subject: [PATCH 39/45] numpy: Fix pyproject.toml-based build The versions of setuptools and wheel pinned in pyproject.toml are older than the versions available in the packages repo. This unpins the versions so that the build can proceed. Signed-off-by: Jeffery To --- lang/python/numpy/Makefile | 2 +- .../patches/001-unpin-build-dependencies.patch | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 lang/python/numpy/patches/001-unpin-build-dependencies.patch diff --git a/lang/python/numpy/Makefile b/lang/python/numpy/Makefile index 35aab8d79..aaf940879 100644 --- a/lang/python/numpy/Makefile +++ b/lang/python/numpy/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=numpy PKG_VERSION:=1.23.3 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PYPI_NAME:=$(PKG_NAME) PKG_HASH:=51bf49c0cd1d52be0a240aa66f3458afc4b95d8993d2d04f0d91fa60c10af6cd diff --git a/lang/python/numpy/patches/001-unpin-build-dependencies.patch b/lang/python/numpy/patches/001-unpin-build-dependencies.patch new file mode 100644 index 000000000..c167f0729 --- /dev/null +++ b/lang/python/numpy/patches/001-unpin-build-dependencies.patch @@ -0,0 +1,13 @@ +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -2,8 +2,8 @@ + # Minimum requirements for the build system to execute. + requires = [ + "packaging==20.5; platform_machine=='arm64'", # macos M1 +- "setuptools==59.2.0", +- "wheel==0.37.0", ++ "setuptools>=59.2.0", ++ "wheel>=0.37.0", + "Cython>=0.29.30,<3.0", + ] + From 5cafab68ff5bddf5470e7674bb0bf8d0415e8804 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Fri, 17 Feb 2023 11:47:15 +0800 Subject: [PATCH 40/45] numpy: Fix compilation when OpenBLAS support is not enabled Currently, if OpenBLAS support is not enabled, a site.cfg file is not written and numpy will use build host paths for libraries. If the build host has any conflicting libraries, specifically libpython3.10.a, then compilation will fail. This ensures site.cfg is always written with buildroot paths. Signed-off-by: Jeffery To --- lang/python/numpy/Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lang/python/numpy/Makefile b/lang/python/numpy/Makefile index aaf940879..10a954da9 100644 --- a/lang/python/numpy/Makefile +++ b/lang/python/numpy/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=numpy PKG_VERSION:=1.23.3 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PYPI_NAME:=$(PKG_NAME) PKG_HASH:=51bf49c0cd1d52be0a240aa66f3458afc4b95d8993d2d04f0d91fa60c10af6cd @@ -23,6 +23,10 @@ PKG_CONFIG_DEPENDS:= \ PKG_BUILD_DEPENDS:=python-cython/host +# Ensure numpy does not find openblas if openblas support is not enabled +PYTHON3_PKG_BUILD_VARS:= \ + $(if $(CONFIG_NUMPY_OPENBLAS_SUPPORT),,NPY_BLAS_ORDER= NPY_LAPACK_ORDER= ) + include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk @@ -50,17 +54,18 @@ config NUMPY_OPENBLAS_SUPPORT endmenu endef -ifdef CONFIG_NUMPY_OPENBLAS_SUPPORT define Build/Prepare/numpy-sitecfg echo "[DEFAULT]" > $(PKG_BUILD_DIR)/site.cfg echo "library_dirs = $(STAGING_DIR)/usr/lib" >> $(PKG_BUILD_DIR)/site.cfg echo "include_dirs = $(STAGING_DIR)/usr/include" >> $(PKG_BUILD_DIR)/site.cfg + + ifdef CONFIG_NUMPY_OPENBLAS_SUPPORT echo >> $(PKG_BUILD_DIR)/site.cfg echo "[openblas]" >> $(PKG_BUILD_DIR)/site.cfg echo "libraries = openblas" >> $(PKG_BUILD_DIR)/site.cfg echo "runtime_library_dirs = /usr/lib" >> $(PKG_BUILD_DIR)/site.cfg + endif endef -endif define Build/Prepare $(call Build/Prepare/Default) From 3cee44d88837b5679a96f0155205ec15883d5aef Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Wed, 10 May 2023 23:49:46 +0800 Subject: [PATCH 41/45] numpy: Avoid build user config files This stops numpy from reading .numpy-site.cfg in the build user's home directory. The code actually tries to find both .numpy-site.cfg and site.cfg in the user's home directory; this patch prevents both. Signed-off-by: Jeffery To --- lang/python/numpy/Makefile | 2 +- .../patches/002-avoid-build-user-config-files.patch | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 lang/python/numpy/patches/002-avoid-build-user-config-files.patch diff --git a/lang/python/numpy/Makefile b/lang/python/numpy/Makefile index 10a954da9..d7e485d79 100644 --- a/lang/python/numpy/Makefile +++ b/lang/python/numpy/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=numpy PKG_VERSION:=1.23.3 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PYPI_NAME:=$(PKG_NAME) PKG_HASH:=51bf49c0cd1d52be0a240aa66f3458afc4b95d8993d2d04f0d91fa60c10af6cd diff --git a/lang/python/numpy/patches/002-avoid-build-user-config-files.patch b/lang/python/numpy/patches/002-avoid-build-user-config-files.patch new file mode 100644 index 000000000..15c76e3dc --- /dev/null +++ b/lang/python/numpy/patches/002-avoid-build-user-config-files.patch @@ -0,0 +1,11 @@ +--- a/numpy/distutils/system_info.py ++++ b/numpy/distutils/system_info.py +@@ -400,7 +400,7 @@ def get_standard_file(fname): + pass + else: + user_file = os.path.join(f, fname) +- if os.path.isfile(user_file): ++ if "_PYTHON_HOST_PLATFORM" not in os.environ and os.path.isfile(user_file): + filenames.append(user_file) + + # Local file From 6020ca52bf5d7b2869ef1ff8a966d15281aa56ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Thu, 11 May 2023 13:27:32 +0200 Subject: [PATCH 42/45] wsdd2: fix stopping service MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Function start_service() is called whenever service may need reloading. If SMB server is not running it could be simply because it has been stopped. Reloading service in such case is not an error so: 1. Don't log error as it isn't one 2. Don't exit with error code as it was confusing procd This change fixes scenario like: /etc/init.d/ksmbd stop /etc/init.d/wsdd2 reload (previously above wasn't stopping wsdd2) Signed-off-by: Rafał Miłecki --- net/wsdd2/Makefile | 2 +- net/wsdd2/files/wsdd2.init | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/net/wsdd2/Makefile b/net/wsdd2/Makefile index 1c5c1bd06..a10a68cac 100644 --- a/net/wsdd2/Makefile +++ b/net/wsdd2/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=wsdd2 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/Netgear/wsdd2.git diff --git a/net/wsdd2/files/wsdd2.init b/net/wsdd2/files/wsdd2.init index e3df25e2d..7b8930e06 100644 --- a/net/wsdd2/files/wsdd2.init +++ b/net/wsdd2/files/wsdd2.init @@ -29,8 +29,8 @@ start_service() { } [ -z "$SMB_CONF" ] && { - logger -p daemon.error -t 'wsdd2' "samba36/4 or ksmbd is not running, can't start wsdd2!" - exit 1 + logger -p daemon.info -t 'wsdd2' "samba36/4 or ksmbd is not running" + return } # cleanup comments From 90fef036fe465262d5915489d45f430b313f22ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Sat, 8 Apr 2023 18:18:55 +0200 Subject: [PATCH 43/45] lxc: set RUNTIME_PATH define to the /var/run path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The default runtime directory used by LXC is /run which doesn't exist in OpenWrt. It causes errors like: Failed to create lock for foo lxc-create: foo: tools/lxc_create.c: main: 260 Failed to create lxc container There has been workaround for that in the lxc-auto.init but it requires installing "lxc-auto" package. Replacing that "ln -s" workaround with Makefile specifying RUNTIME_PATH define allows using pure "lxc" in OpenWrt (without the "lxc-auto"). Signed-off-by: Rafał Miłecki --- utils/lxc/Makefile | 5 +++-- utils/lxc/files/lxc-auto.init | 4 ---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/utils/lxc/Makefile b/utils/lxc/Makefile index 15ebd3001..dcb2a79e1 100644 --- a/utils/lxc/Makefile +++ b/utils/lxc/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lxc PKG_VERSION:=5.0.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://linuxcontainers.org/downloads/lxc/ @@ -33,7 +33,8 @@ MESON_ARGS += \ -Dselinux=false \ -Dseccomp=$(if $(CONFIG_LXC_SECCOMP),true,false) \ -Dexamples=false \ - -Db_pie=true + -Db_pie=true \ + -Druntime-path=/var/run LXC_APPLETS_BIN += \ attach autostart cgroup copy config console create destroy device \ diff --git a/utils/lxc/files/lxc-auto.init b/utils/lxc/files/lxc-auto.init index 4983c5919..14fe2c509 100755 --- a/utils/lxc/files/lxc-auto.init +++ b/utils/lxc/files/lxc-auto.init @@ -69,9 +69,5 @@ boot() { mount -t cgroup -o rw,nosuid,nodev,noexec,relatime,none,name=systemd cgroup /sys/fs/cgroup/systemd fi - if [ ! -d /run ]; then - ln -s /var/run /run - fi - start } From 33e7dbadb0607196536af75d55ed95e18f4d3007 Mon Sep 17 00:00:00 2001 From: Michele Primavera Date: Wed, 26 Apr 2023 11:41:31 +0200 Subject: [PATCH 44/45] libopen62541: Adding support Open62541 is an opensource OPC UA library useful in IoT scenarios. Signed-off-by: Michele Primavera --- libs/libopen62541/Config.in | 118 ++++++++++++++++++++++++++++++++++++ libs/libopen62541/Makefile | 107 ++++++++++++++++++++++++++++++++ 2 files changed, 225 insertions(+) create mode 100644 libs/libopen62541/Config.in create mode 100644 libs/libopen62541/Makefile diff --git a/libs/libopen62541/Config.in b/libs/libopen62541/Config.in new file mode 100644 index 000000000..83539a41c --- /dev/null +++ b/libs/libopen62541/Config.in @@ -0,0 +1,118 @@ +menu "Configuration" + depends on PACKAGE_libopen62541 + +config LIBOPEN62541_UA_ENABLE_SUBSCRIPTIONS + bool "Enable subscriptions support" + default y + +config LIBOPEN62541_UA_ENABLE_SUBSCRIPTIONS_EVENTS + bool "Use events for subscriptions (EXPERIMENTAL)" + depends on LIBOPEN62541_UA_ENABLE_SUBSCRIPTIONS && (LIBOPEN62541_NAMESPACEZERO_FULL || LIBOPEN62541_NAMESPACEZERO_REDUCED) + +config LIBOPEN62541_UA_ENABLE_SUBSCRIPTIONS_ALARMS_CONDITIONS + bool "Use alarms and conditions for subscriptions (EXPERIMENTAL)" + depends on LIBOPEN62541_UA_ENABLE_SUBSCRIPTIONS_EVENTS && LIBOPEN62541_NAMESPACEZERO_FULL + +config LIBOPEN62541_UA_ENABLE_METHODCALLS + bool "Enable the Method service set" + default y + +config LIBOPEN62541_UA_ENABLE_PARSING + bool "Enable parsing human readable formats of builtin data types" + default y + +config LIBOPEN62541_UA_ENABLE_NODEMANAGEMENT + bool "Enable dynamic addition and removal of nodes at runtime" + default y + +config LIBOPEN62541_UA_ENABLE_IMMUTABLE_NODES + bool "Enable immutable nodes" + default y + +config LIBOPEN62541_UA_ENABLE_DISCOVERY + bool "Enable Discovery Service (LDS)" + default y + +config LIBOPEN62541_UA_ENABLE_DISCOVERY_MULTICAST + bool "Enable Discovery Service with multicast support (LDS-ME)" + default y + depends on LIBOPEN62541_UA_ENABLE_DISCOVERY + +config LIBOPEN62541_UA_ENABLE_DISCOVERY_SEMAPHORE + bool "Enable Discovery Semaphore support" + default y + depends on LIBOPEN62541_UA_ENABLE_DISCOVERY + +choice + prompt "Encryption library" + default LIBOPEN62541_NOENCRYPTION + + config LIBOPEN62541_NOENCRYPTION + bool "No encryption" + + config LIBOPEN62541_MBDEDTLS + bool "Encryption support using mbed TLS" + + config LIBOPEN62541_OPENSSL + bool "Encryption support using OpenSSL" +endchoice + +config LIBOPEN62541_UA_ENABLE_ENCRYPTION_TPM2 + bool "Enable TPM support" + depends on LIBOPEN62541_UA_ENABLE_PUBSUB_ENCRYPTION + +choice + prompt "Namespace zero definition" + + default LIBOPEN62541_NAMESPACEZERO_FULL + + config LIBOPEN62541_NAMESPACEZERO_FULL + bool "Full namespace zero" + + config LIBOPEN62541_NAMESPACEZERO_REDUCED + bool "Small namespace zero still passing CTT" + + config LIBOPEN62541_NAMESPACEZERO_MINIMAL + bool "Barebones namespace zero" + +endchoice + +config LIBOPEN62541_UA_ENABLE_TYPEDESCRIPTION + bool "Add the type and member names to the UA_DataType structure" + default y + +config LIBOPEN62541_UA_ENABLE_STATUSCODE_DESCRIPTIONS + bool "Compile the human-readable name of the StatusCodes into the binary" + default y + +config LIBOPEN62541_UA_ENABLE_HISTORIZING + bool "Enable historical access" + +config LIBOPEN62541_UA_ENABLE_PUBSUB + bool "Enable OPC UA PubSub support (EXPERIMENTAL)" + +config LIBOPEN62541_UA_ENABLE_PUBSUB_DELTAFRAMES + bool "PubSub messages differentiate between keyframe and deltaframe messages" + depends on LIBOPEN62541_UA_ENABLE_PUBSUB + +config LIBOPEN62541_UA_ENABLE_PUBSUB_FILE_CONFIG + bool "Enable loading OPC UA PubSub configuration from File/ByteString" + depends on LIBOPEN62541_UA_ENABLE_PUBSUB + +config LIBOPEN62541_UA_ENABLE_PUBSUB_INFORMATIONMODEL + bool "Enable the information model representation of the PubSub configuration" + depends on LIBOPEN62541_UA_ENABLE_PUBSUB && (LIBOPEN62541_NAMESPACEZERO_FULL || LIBOPEN62541_NAMESPACEZERO_REDUCED) + +config LIBOPEN62541_UA_ENABLE_PUBSUB_MONITORING + bool "Enable the experimental PubSub monitoring" + depends on LIBOPEN62541_UA_ENABLE_PUBSUB + +config LIBOPEN62541_UA_ENABLE_PUBSUB_ETH_UADP + bool "Enable the OPC UA Ethernet PubSub support to transport UADP NetworkMessages as payload of Ethernet II frame without IP or UDP headers" + depends on LIBOPEN62541_UA_ENABLE_PUBSUB + +config LIBOPEN62541_UA_ENABLE_PUBSUB_ENCRYPTION + bool "Enable PubSub encryption" + depends on LIBOPEN62541_UA_ENABLE_PUBSUB + +endmenu diff --git a/libs/libopen62541/Makefile b/libs/libopen62541/Makefile new file mode 100644 index 000000000..02922e660 --- /dev/null +++ b/libs/libopen62541/Makefile @@ -0,0 +1,107 @@ +# +# Copyright (C) 2023 Michele Primavera +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libopen62541 +PKG_VERSION:=1.3.6 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/open62541/open62541.git +PKG_SOURCE_VERSION:=v$(PKG_VERSION) +PKG_MIRROR_HASH:=1587eba9e697591a342d91df02acb7460e74617895f810c006ad3d7e4bce21b8 + +PKG_LICENSE:=MPL-2.0 +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Michele Primavera + +CMAKE_INSTALL:=1 + +define Package/libopen62541/config + source "$(SOURCE)/Config.in" +endef + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +ifeq ($(CONFIG_HAS_MIPS16),y) + TARGET_CFLAGS += -fstack-check=generic +endif + +define Package/libopen62541 + SECTION:=libs + CATEGORY:=Libraries + TITLE:=An OPC UA library + URL:=https://open62541.org/ + DEPENDS:=+librt +zlib +libstdcpp +libpthread +libatomic \ + +LIBOPEN62541_MBDEDTLS:libmbedtls +LIBOPEN62541_OPENSSL:libopenssl +endef + +define Package/libopen62541/description + open62541 (http://open62541.org) is an open source and free implementation of + OPC UA (OPC Unified Architecture) written in the common subset of the C99 and + C++98 languages. The library is usable with all major compilers and provides + the necessary tools to implement dedicated OPC UA clients and servers, or to + integrate OPC UA-based communication into existing applications. open62541 + library is platform independent. +endef + +CMAKE_OPTIONS += \ + -DBUILD_SHARED_LIBS=ON \ + -DUA_LOGLEVEL=500 \ + -DUA_ENABLE_AMALGAMATION=OFF \ + -DCMAKE_BUILD_TYPE=MinSizeRel \ + -DUA_ARCHITECTURE=posix \ + -DUA_BUILD_EXAMPLES=OFF \ + -DUA_BUILD_TOOLS=OFF \ + -DUA_BUILD_UNIT_TESTS=OFF \ + -DOPEN62541_VERSION=v$(PKG_VERSION) \ + -DUA_ENABLE_SUBSCRIPTIONS=$(if $(CONFIG_LIBOPEN62541_UA_ENABLE_SUBSCRIPTIONS),ON,OFF) \ + -DUA_ENABLE_SUBSCRIPTIONS_EVENTS=$(if $(CONFIG_LIBOPEN62541_UA_ENABLE_SUBSCRIPTIONS_EVENTS),ON,OFF) \ + -DUA_ENABLE_SUBSCRIPTIONS_ALARMS_CONDITIONS=$(if $(CONFIG_LIBOPEN62541_UA_ENABLE_SUBSCRIPTIONS_ALARMS_CONDITIONS),ON,OFF) \ + -DUA_ENABLE_METHODCALLS=$(if $(CONFIG_LIBOPEN62541_UA_ENABLE_METHODCALLS),ON,OFF) \ + -DUA_ENABLE_PARSING=$(if $(CONFIG_LIBOPEN62541_UA_ENABLE_PARSING),ON,OFF) \ + -DUA_ENABLE_NODEMANAGEMENT=$(if $(CONFIG_LIBOPEN62541_UA_ENABLE_NODEMANAGEMENT),ON,OFF) \ + -DUA_ENABLE_IMMUTABLE_NODES=$(if $(CONFIG_LIBOPEN62541_UA_ENABLE_IMMUTABLE_NODES),ON,OFF) \ + -DUA_ENABLE_DISCOVERY=$(if $(CONFIG_LIBOPEN62541_UA_ENABLE_DISCOVERY),ON,OFF) \ + -DUA_ENABLE_DISCOVERY_MULTICAST=$(if $(CONFIG_LIBOPEN62541_UA_ENABLE_DISCOVERY_MULTICAST),ON,OFF) \ + -DUA_ENABLE_DISCOVERY_SEMAPHORE=$(if $(CONFIG_LIBOPEN62541_UA_ENABLE_DISCOVERY_SEMAPHORE),ON,OFF) \ + -DUA_ENABLE_ENCRYPTION_TPM2=$(if $(CONFIG_LIBOPEN62541_UA_ENABLE_ENCRYPTION_TPM2),ON,OFF) \ + -DUA_ENABLE_TYPEDESCRIPTION=$(if $(CONFIG_LIBOPEN62541_UA_ENABLE_TYPEDESCRIPTION),ON,OFF) \ + -DUA_ENABLE_STATUSCODE_DESCRIPTIONS=$(if $(CONFIG_LIBOPEN62541_UA_ENABLE_STATUSCODE_DESCRIPTIONS),ON,OFF) \ + -DUA_ENABLE_PUBSUB=$(if $(CONFIG_LIBOPEN62541_UA_ENABLE_PUBSUB),ON,OFF) \ + -DUA_ENABLE_PUBSUB_DELTAFRAMES=$(if $(CONFIG_LIBOPEN62541_UA_ENABLE_PUBSUB_DELTAFRAMES),ON,OFF) \ + -DUA_ENABLE_PUBSUB_FILE_CONFIG=$(if $(CONFIG_LIBOPEN62541_UA_ENABLE_PUBSUB_FILE_CONFIG),ON,OFF) \ + -DUA_ENABLE_PUBSUB_INFORMATIONMODEL=$(if $(CONFIG_LIBOPEN62541_UA_ENABLE_PUBSUB_INFORMATIONMODEL),ON,OFF) \ + -DUA_ENABLE_PUBSUB_MONITORING=$(if $(CONFIG_LIBOPEN62541_UA_ENABLE_PUBSUB_MONITORING),ON,OFF) \ + -DUA_ENABLE_PUBSUB_ETH_UADP=$(if $(CONFIG_LIBOPEN62541_UA_ENABLE_PUBSUB_ETH_UADP),ON,OFF) \ + -DUA_ENABLE_PUBSUB_ENCRYPTION=$(if $(CONFIG_LIBOPEN62541_UA_ENABLE_PUBSUB_ENCRYPTION),ON,OFF) \ + -DUA_ENABLE_HISTORIZING=$(if $(CONFIG_LIBOPEN62541_UA_ENABLE_HISTORIZING),ON,OFF) + +ifeq ($(CONFIG_LIBOPEN62541_MBDEDTLS),y) + CMAKE_OPTIONS += -DUA_ENABLE_ENCRYPTION=MBEDTLS +else ifeq ($(CONFIG_LIBOPEN62541_OPENSSL),y) + CMAKE_OPTIONS += -DUA_ENABLE_ENCRYPTION=OPENSSL +else + CMAKE_OPTIONS += -DUA_ENABLE_ENCRYPTION=OFF +endif + +ifeq ($(CONFIG_LIBOPEN62541_NAMESPACEZERO_REDUCED),y) + CMAKE_OPTIONS += -DUA_NAMESPACE_ZERO=REDUCED +else ifeq ($(CONFIG_LIBOPEN62541_NAMESPACEZERO_MINIMAL),y) + CMAKE_OPTIONS += -DUA_NAMESPACE_ZERO=MINIMAL +else + CMAKE_OPTIONS += -DUA_NAMESPACE_ZERO=FULL +endif + +define Package/libopen62541/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libopen62541.so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libopen62541)) From c664b83535c24df35d6a1ec46440b4fb04d270ec Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Thu, 11 May 2023 11:43:20 +0200 Subject: [PATCH 45/45] glib2: fix host build offline download If buildsystem does not have a internet connection, then the build fails. This is because of the fact, that glib2 is downloading and building the missing dependencies during host compilation. This cannot be allowed to happen. The package must also be built without an internet connection. Adding the missing host build dependency and removing the 'forcefallback' fixes this issue. Signed-off-by: Florian Eckert --- libs/glib2/Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libs/glib2/Makefile b/libs/glib2/Makefile index 076423fb0..6a134763f 100644 --- a/libs/glib2/Makefile +++ b/libs/glib2/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=glib2 PKG_VERSION:=2.74.0 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=glib-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNOME/glib/$(word 1,$(subst ., ,$(PKG_VERSION))).$(word 2,$(subst ., ,$(PKG_VERSION))) @@ -21,11 +21,13 @@ PKG_LICENSE_FILES:=COPYING PKG_CPE_ID:=cpe:/a:gnome:glib PKG_BUILD_DIR:=$(BUILD_DIR)/glib-$(PKG_VERSION) -HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/glib-$(PKG_VERSION) PKG_CONFIG_DEPENDS:=CONFIG_BUILD_NLS PKG_FORTIFY_SOURCE:=0 PKG_BUILD_FLAGS:=gc-sections +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/glib-$(PKG_VERSION) +HOST_BUILD_DEPENDS:=pcre2/host libffi/host + include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk @@ -61,7 +63,7 @@ COMP_ARGS= \ -Dglib_checks=true \ -Dlibelf=disabled -MESON_HOST_ARGS += $(COMP_ARGS) -Dxattr=false -Ddefault_library=static -Dnls=disabled -Dwrap_mode=forcefallback +MESON_HOST_ARGS += $(COMP_ARGS) -Dxattr=false -Ddefault_library=static -Dnls=disabled MESON_ARGS += $(COMP_ARGS) -Dxattr=true -Db_lto=true -Ddefault_library=both -Dnls=$(if $(CONFIG_BUILD_NLS),en,dis)abled define Build/InstallDev