From 0a055d56d27dc1414c0728bd6b57d5bf0733676a Mon Sep 17 00:00:00 2001 From: Magnus Kessler Date: Tue, 29 Aug 2023 14:46:39 +0200 Subject: [PATCH] reforis plugins: Force distutils-based python package builds In OpenWRT main / 23.05 the new build process chokes on the OpenWRT package names differing from the python package names. Force the use of the previous build process for now. Alternative solutions include providing a PYPI_SOURCE_NAME that contains the python package name, or renaming the OpenWRT packages to have the same name as the python package. Signed-off-by: Magnus Kessler --- .../reforis-data-collection-plugin/Makefile | 2 ++ .../reforis-diagnostics-plugin/Makefile | 2 ++ web/reforis/reforis-haas-plugin/Makefile | 2 ++ .../reforis-librespeed-plugin/Makefile | 2 ++ web/reforis/reforis-netboot-plugin/Makefile | 2 ++ web/reforis/reforis-netmetr-plugin/Makefile | 2 ++ web/reforis/reforis-nextcloud-plugin/Makefile | 2 ++ web/reforis/reforis-openvpn-plugin/Makefile | 2 ++ .../reforis-remote-access-plugin/Makefile | 2 ++ .../0001-Fix-version-number-in-setup.py.patch | 30 +++++++++++++++++++ .../reforis-remote-devices-plugin/Makefile | 2 ++ .../Makefile | 2 ++ web/reforis/reforis-snapshots-plugin/Makefile | 2 ++ web/reforis/reforis-storage-plugin/Makefile | 2 ++ 14 files changed, 56 insertions(+) create mode 100644 web/reforis/reforis-remote-access-plugin/patches/0001-Fix-version-number-in-setup.py.patch diff --git a/web/reforis/reforis-data-collection-plugin/Makefile b/web/reforis/reforis-data-collection-plugin/Makefile index 5bdf59d85..8501f20b4 100644 --- a/web/reforis/reforis-data-collection-plugin/Makefile +++ b/web/reforis/reforis-data-collection-plugin/Makefile @@ -23,6 +23,8 @@ PKG_LICENSE_FILES:=LICENSE HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=reforis-distutils PKG_BUILD_DEPENDS:=node/host +PYTHON3_PKG_FORCE_DISTUTILS_SETUP:=1 + include $(INCLUDE_DIR)/package.mk include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk include ../reforis/files/reforis-plugin.mk diff --git a/web/reforis/reforis-diagnostics-plugin/Makefile b/web/reforis/reforis-diagnostics-plugin/Makefile index 424014633..874dae4e0 100644 --- a/web/reforis/reforis-diagnostics-plugin/Makefile +++ b/web/reforis/reforis-diagnostics-plugin/Makefile @@ -23,6 +23,8 @@ PKG_LICENSE_FILES:=LICENSE HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=reforis-distutils PKG_BUILD_DEPENDS:=node/host +PYTHON3_PKG_FORCE_DISTUTILS_SETUP:=1 + include $(INCLUDE_DIR)/package.mk include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk include ../reforis/files/reforis-plugin.mk diff --git a/web/reforis/reforis-haas-plugin/Makefile b/web/reforis/reforis-haas-plugin/Makefile index cd541aae0..5634f6e31 100644 --- a/web/reforis/reforis-haas-plugin/Makefile +++ b/web/reforis/reforis-haas-plugin/Makefile @@ -23,6 +23,8 @@ PKG_LICENSE_FILES:=LICENSE HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=reforis-distutils PKG_BUILD_DEPENDS:=node/host +PYTHON3_PKG_FORCE_DISTUTILS_SETUP:=1 + include $(INCLUDE_DIR)/package.mk include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk include ../reforis/files/reforis-plugin.mk diff --git a/web/reforis/reforis-librespeed-plugin/Makefile b/web/reforis/reforis-librespeed-plugin/Makefile index 7a63fda8f..77215825f 100644 --- a/web/reforis/reforis-librespeed-plugin/Makefile +++ b/web/reforis/reforis-librespeed-plugin/Makefile @@ -23,6 +23,8 @@ PKG_LICENSE_FILES:=LICENSE HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=reforis-distutils PKG_BUILD_DEPENDS:=node/host +PYTHON3_PKG_FORCE_DISTUTILS_SETUP:=1 + include $(INCLUDE_DIR)/package.mk include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk include ../reforis/files/reforis-plugin.mk diff --git a/web/reforis/reforis-netboot-plugin/Makefile b/web/reforis/reforis-netboot-plugin/Makefile index 1d0797e5e..94550dabd 100644 --- a/web/reforis/reforis-netboot-plugin/Makefile +++ b/web/reforis/reforis-netboot-plugin/Makefile @@ -23,6 +23,8 @@ PKG_LICENSE_FILES:=LICENSE HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=reforis-distutils PKG_BUILD_DEPENDS:=node/host +PYTHON3_PKG_FORCE_DISTUTILS_SETUP:=1 + include $(INCLUDE_DIR)/package.mk include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk include ../reforis/files/reforis-plugin.mk diff --git a/web/reforis/reforis-netmetr-plugin/Makefile b/web/reforis/reforis-netmetr-plugin/Makefile index 48ec8f566..ef13204d2 100644 --- a/web/reforis/reforis-netmetr-plugin/Makefile +++ b/web/reforis/reforis-netmetr-plugin/Makefile @@ -23,6 +23,8 @@ PKG_LICENSE_FILES:=LICENSE HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=reforis-distutils PKG_BUILD_DEPENDS:=node/host +PYTHON3_PKG_FORCE_DISTUTILS_SETUP:=1 + include $(INCLUDE_DIR)/package.mk include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk include ../reforis/files/reforis-plugin.mk diff --git a/web/reforis/reforis-nextcloud-plugin/Makefile b/web/reforis/reforis-nextcloud-plugin/Makefile index 7aff5313e..e631858dc 100644 --- a/web/reforis/reforis-nextcloud-plugin/Makefile +++ b/web/reforis/reforis-nextcloud-plugin/Makefile @@ -23,6 +23,8 @@ PKG_LICENSE_FILES:=LICENSE HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=reforis-distutils PKG_BUILD_DEPENDS:=node/host +PYTHON3_PKG_FORCE_DISTUTILS_SETUP:=1 + include $(INCLUDE_DIR)/package.mk include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk include ../reforis/files/reforis-plugin.mk diff --git a/web/reforis/reforis-openvpn-plugin/Makefile b/web/reforis/reforis-openvpn-plugin/Makefile index e5a91d7eb..55abad932 100644 --- a/web/reforis/reforis-openvpn-plugin/Makefile +++ b/web/reforis/reforis-openvpn-plugin/Makefile @@ -23,6 +23,8 @@ PKG_LICENSE_FILES:=LICENSE HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=reforis-distutils PKG_BUILD_DEPENDS:=node/host +PYTHON3_PKG_FORCE_DISTUTILS_SETUP:=1 + include $(INCLUDE_DIR)/package.mk include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk include ../reforis/files/reforis-plugin.mk diff --git a/web/reforis/reforis-remote-access-plugin/Makefile b/web/reforis/reforis-remote-access-plugin/Makefile index 9672df1e4..8e96584d8 100644 --- a/web/reforis/reforis-remote-access-plugin/Makefile +++ b/web/reforis/reforis-remote-access-plugin/Makefile @@ -23,6 +23,8 @@ PKG_LICENSE_FILES:=LICENSE HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=reforis-distutils PKG_BUILD_DEPENDS:=node/host +PYTHON3_PKG_FORCE_DISTUTILS_SETUP:=1 + include $(INCLUDE_DIR)/package.mk include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk include ../reforis/files/reforis-plugin.mk diff --git a/web/reforis/reforis-remote-access-plugin/patches/0001-Fix-version-number-in-setup.py.patch b/web/reforis/reforis-remote-access-plugin/patches/0001-Fix-version-number-in-setup.py.patch new file mode 100644 index 000000000..6f698bcaa --- /dev/null +++ b/web/reforis/reforis-remote-access-plugin/patches/0001-Fix-version-number-in-setup.py.patch @@ -0,0 +1,30 @@ +From 3a142711c4c5ec46988af243a8cd31cf1440e1f7 Mon Sep 17 00:00:00 2001 +From: Magnus Kessler +Date: Thu, 3 Aug 2023 14:23:40 +0200 +Subject: [PATCH] Fix version number in setup.py + +The setup.py version number should be the same as the package version +in the js/package*.json files. This ensures that external build systems +like OpenWRT can be configured with the correct release version. + +Signed-off-by: Magnus Kessler +--- + setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index d674cfe..9475037 100644 +--- a/setup.py ++++ b/setup.py +@@ -32,7 +32,7 @@ class RemoteAccessBuild(build_py): + + setuptools.setup( + name=NAME, +- version='1.2.1', ++ version='1.3.0', + packages=setuptools.find_packages(exclude=['tests']), + include_package_data=True, + +-- +2.34.1 + diff --git a/web/reforis/reforis-remote-devices-plugin/Makefile b/web/reforis/reforis-remote-devices-plugin/Makefile index bfcfc87f6..e6f05666e 100644 --- a/web/reforis/reforis-remote-devices-plugin/Makefile +++ b/web/reforis/reforis-remote-devices-plugin/Makefile @@ -23,6 +23,8 @@ PKG_LICENSE_FILES:=LICENSE HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=reforis-distutils PKG_BUILD_DEPENDS:=node/host +PYTHON3_PKG_FORCE_DISTUTILS_SETUP:=1 + include $(INCLUDE_DIR)/package.mk include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk include ../reforis/files/reforis-plugin.mk diff --git a/web/reforis/reforis-remote-wifi-settings-plugin/Makefile b/web/reforis/reforis-remote-wifi-settings-plugin/Makefile index 597f395a4..236980e74 100644 --- a/web/reforis/reforis-remote-wifi-settings-plugin/Makefile +++ b/web/reforis/reforis-remote-wifi-settings-plugin/Makefile @@ -23,6 +23,8 @@ PKG_LICENSE_FILES:=LICENSE HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=reforis-distutils PKG_BUILD_DEPENDS:=node/host +PYTHON3_PKG_FORCE_DISTUTILS_SETUP:=1 + include $(INCLUDE_DIR)/package.mk include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk include ../reforis/files/reforis-plugin.mk diff --git a/web/reforis/reforis-snapshots-plugin/Makefile b/web/reforis/reforis-snapshots-plugin/Makefile index 6e9d9ada4..db4a5b2ba 100644 --- a/web/reforis/reforis-snapshots-plugin/Makefile +++ b/web/reforis/reforis-snapshots-plugin/Makefile @@ -23,6 +23,8 @@ PKG_LICENSE_FILES:=LICENSE HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=reforis-distutils PKG_BUILD_DEPENDS:=node/host +PYTHON3_PKG_FORCE_DISTUTILS_SETUP:=1 + include $(INCLUDE_DIR)/package.mk include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk include ../reforis/files/reforis-plugin.mk diff --git a/web/reforis/reforis-storage-plugin/Makefile b/web/reforis/reforis-storage-plugin/Makefile index 35b280cc6..60108a713 100644 --- a/web/reforis/reforis-storage-plugin/Makefile +++ b/web/reforis/reforis-storage-plugin/Makefile @@ -23,6 +23,8 @@ PKG_LICENSE_FILES:=LICENSE HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=reforis-distutils PKG_BUILD_DEPENDS:=node/host +PYTHON3_PKG_FORCE_DISTUTILS_SETUP:=1 + include $(INCLUDE_DIR)/package.mk include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk include ../reforis/files/reforis-plugin.mk