From 78174ad51e1908940a7679d240d888ccd3466e78 Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Sat, 30 May 2026 09:46:39 +0300 Subject: [PATCH] kea: ship admin-utils.sh and kea-shell Python modules kea-admin and kea-shell were shipped without their helper script and Python modules respectively, leaving both non-functional. Ship the missing files, add +python3-light +python3-urllib +python3-openssl to kea-shell, and rewrite its meson-baked host-absolute shebang and sys.path.append to the on-target /usr/bin/python3 + $(PYTHON3_PKG_DIR). Signed-off-by: Alexandru Ardelean (cherry picked from commit 732996ced0acc3e25e4eb0587df9a28f13df30bd) [keep kea 3.0.3 from openwrt-25.12 and bump PKG_RELEASE to 3] Signed-off-by: Josef Schlehofer --- net/kea/Makefile | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/net/kea/Makefile b/net/kea/Makefile index ca70bf07c7..a068492076 100644 --- a/net/kea/Makefile +++ b/net/kea/Makefile @@ -25,6 +25,9 @@ PKG_BUILD_FLAGS:=gc-sections include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/meson.mk +PYTHON3_PKG_BUILD:=0 +include ../../lang/python/python3-package.mk + define Package/kea/Default SECTION:=net CATEGORY:=Network @@ -168,7 +171,7 @@ endef define Package/kea-shell $(call Package/kea/Default) TITLE+=shell - DEPENDS:=+kea-libs + DEPENDS:=+kea-libs +python3-light +python3-urllib +python3-openssl endef define Package/kea-shell/description This simple text client uses the REST interface to connect to the Kea @@ -218,8 +221,10 @@ define Package/kea-dhcp-ddns/install endef define Package/kea-admin/install - $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_DIR) $(1)/usr/sbin $(1)/usr/share/kea/scripts $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kea-admin $(1)/usr/sbin/kea-admin + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/kea/scripts/admin-utils.sh \ + $(1)/usr/share/kea/scripts/admin-utils.sh endef define Package/kea-hook-ha/install @@ -251,8 +256,15 @@ define Package/kea-perfdhcp/install endef define Package/kea-shell/install - $(INSTALL_DIR) $(1)/usr/sbin + $(SED) '1s,^#!/.*python.*,#!/usr/bin/python3,' \ + $(PKG_INSTALL_DIR)/usr/sbin/kea-shell + $(SED) "s,^sys.path.append.*,sys.path.append('$(PYTHON3_PKG_DIR)/kea')," \ + $(PKG_INSTALL_DIR)/usr/sbin/kea-shell + $(INSTALL_DIR) $(1)/usr/sbin $(1)$(PYTHON3_PKG_DIR)/kea $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kea-shell $(1)/usr/sbin/kea-shell + $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/bin/shell/kea_conn.py \ + $(PKG_BUILD_DIR)/src/bin/shell/kea_connector3.py \ + $(1)$(PYTHON3_PKG_DIR)/kea/ endef define Package/kea-uci/install