statd: Remove python-statd package

Now statd handling the rebuilding of the python libraries by using
the same script as buildroot uses for building python-packages.
This commit is contained in:
Mattias Walström
2025-12-06 22:03:55 +01:00
parent 2d35f15242
commit dc6abfaaae
7 changed files with 22 additions and 27 deletions
+1 -1
View File
@@ -217,7 +217,7 @@ gathers data from local linux services and feeds it into sysrepo.
To apply changes, rebuild the image:
make python-statd-rebuild statd-rebuild all
make statd-rebuild all
Rebuilding the image and testing on target for every change during
development process can be tedious. Instead, `yanger` allows remote
-1
View File
@@ -32,7 +32,6 @@ source "$BR2_EXTERNAL_INFIX_PATH/package/netbrowse/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/onieprom/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/podman/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/python-libyang/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/python-statd/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/python-yangdoc/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/skeleton-init-finit/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/show/Config.in"
-6
View File
@@ -1,6 +0,0 @@
config BR2_PACKAGE_PYTHON_STATD
bool "python-statd"
select BR2_PACKAGE_HOST_PYTHON3
select BR2_PACKAGE_DBUS_PYTHON
help
Python helpers for statd.
-1
View File
@@ -1 +0,0 @@
sha256 360336cbf0f228b12b7ca0996b33e442d97f496edcf2ec31b655e63631e7f96f LICENSE
-16
View File
@@ -1,16 +0,0 @@
PYTHON_STATD_VERSION = 1.0
PYTHON_STATD_SITE_METHOD = local
PYTHON_STATD_SITE = $(BR2_EXTERNAL_INFIX_PATH)/src/statd/python
PYTHON_STATD_LICENSE = BSD-3-Clause
PYTHON_STATD_LICENSE_FILES = LICENSE
PYTHON_STATD_DEPENDENCIES = host-python3 python3 host-python-poetry-core dbus-python
PYTHON_STATD_SETUP_TYPE = pep517 # poetry
define PYTHON_STATD_MOVE_BINARIES
mkdir -p $(TARGET_DIR)/usr/libexec/statd
mv $(TARGET_DIR)/usr/bin/yanger $(TARGET_DIR)/usr/libexec/statd/
mv $(TARGET_DIR)/usr/bin/cli-pretty $(TARGET_DIR)/usr/libexec/statd/
mv $(TARGET_DIR)/usr/bin/ospf-status $(TARGET_DIR)/usr/libexec/statd/
endef
PYTHON_STATD_POST_INSTALL_TARGET_HOOKS += PYTHON_STATD_MOVE_BINARIES
$(eval $(python-package))
+2 -1
View File
@@ -5,7 +5,8 @@ config BR2_PACKAGE_STATD
select BR2_PACKAGE_SYSREPO
select BR2_PACKAGE_LIBSRX
select BR2_PACKAGE_LIBITE
select BR2_PACKAGE_PYTHON_STATD
select BR2_PACKAGE_HOST_PYTHON3
select BR2_PACKAGE_DBUS_PYTHON
help
Operational Status Daemon. Responsible for handling sysrepo
operational run-time info. Such as interface state and address.
+19 -1
View File
@@ -10,7 +10,9 @@ STATD_SITE = $(BR2_EXTERNAL_INFIX_PATH)/src/statd
STATD_LICENSE = BSD-3-Clause
STATD_LICENSE_FILES = LICENSE
STATD_REDISTRIBUTE = NO
STATD_DEPENDENCIES = sysrepo libev libsrx jansson python-statd libyang libite
STATD_DEPENDENCIES = sysrepo libev libsrx jansson libyang libite \
host-python3 python3 host-python-pypa-build host-python-installer \
host-python-poetry-core dbus-python
STATD_AUTORECONF = YES
define STATD_CONF_ENV
@@ -25,6 +27,22 @@ else
STATD_CONF_OPTS += --disable-containers
endif
define STATD_BUILD_PYTHON
cd $(STATD_SITE)/python && \
$(PKG_PYTHON_PEP517_ENV) $(HOST_DIR)/bin/python3 $(PKG_PYTHON_PEP517_BUILD_CMD) -o $(@D)/python/dist
mkdir -p $(TARGET_DIR)/usr/libexec/statd
cd $(@D)/python && \
$(HOST_DIR)/bin/python3 $(TOPDIR)/support/scripts/pyinstaller.py \
dist/*.whl \
--interpreter=/usr/bin/python3 \
--script-kind=posix \
--purelib=$(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
--headers=$(TARGET_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR) \
--scripts=$(TARGET_DIR)/usr/libexec/statd \
--data=$(TARGET_DIR)
endef
STATD_POST_INSTALL_TARGET_HOOKS += STATD_BUILD_PYTHON
define STATD_INSTALL_EXTRA
cp $(STATD_PKGDIR)/statd.conf $(FINIT_D)/available/
ln -sf ../available/statd.conf $(FINIT_D)/enabled/statd.conf