Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/developers-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion package/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 0 additions & 6 deletions package/python-statd/Config.in

This file was deleted.

1 change: 0 additions & 1 deletion package/python-statd/python-statd.hash

This file was deleted.

16 changes: 0 additions & 16 deletions package/python-statd/python-statd.mk

This file was deleted.

3 changes: 2 additions & 1 deletion package/statd/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
20 changes: 19 additions & 1 deletion package/statd/statd.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading