From c9f90a6cf55c1101970d8e7701fc9ed0d6b72bdb Mon Sep 17 00:00:00 2001 From: Vivek Kumar Dutta Date: Tue, 17 Oct 2023 13:48:55 +0530 Subject: [PATCH] bbfdm: 1.4.0 - Load plugins from micro-services - Unified path for core datamodel plugins(JSON and DotSO) - Helper function to install plugin in core - Manage plugins based on input.json - Removed CONFIG_BBFDM_ENABLE_JSON_PLUGIN - Removed CONFIG_BBFDM_ENABLE_DOTSO_PLUGIN --- bbfdm/Config_bbfdm.in | 8 -------- bbfdm/Makefile | 28 +++++++--------------------- bbfdm/bbfdm.mk | 9 +++++++++ 3 files changed, 16 insertions(+), 29 deletions(-) create mode 100644 bbfdm/bbfdm.mk diff --git a/bbfdm/Config_bbfdm.in b/bbfdm/Config_bbfdm.in index d0f3e0236..fc500e255 100644 --- a/bbfdm/Config_bbfdm.in +++ b/bbfdm/Config_bbfdm.in @@ -18,14 +18,6 @@ config BBF_TR471 bool "Enable TR-471 Data Model Support" default y -config BBFDM_ENABLE_JSON_PLUGIN - bool "Enable json plugin to extend datamodel" - default y - -config BBFDM_ENABLE_DOTSO_PLUGIN - bool "Enable shared library plugin to extend datamodel" - default y - config BBF_MAX_OBJECT_INSTANCES int "Maximum number of instances per object" default 255 diff --git a/bbfdm/Makefile b/bbfdm/Makefile index c758b2305..c716cedd1 100644 --- a/bbfdm/Makefile +++ b/bbfdm/Makefile @@ -5,13 +5,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bbfdm -PKG_VERSION:=1.3.39 +PKG_VERSION:=1.4.0 +USE_LOCAL:=0 +ifneq ($(USE_LOCAL),1) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bbfdm.git -PKG_SOURCE_VERSION:=5745270ff9ed4407425b4d4ed43d36e0727a0238 +PKG_SOURCE_VERSION:=4ff4f09126354b92c57d44ba3bd7a832f64f2425 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz PKG_MIRROR_HASH:=skip +endif PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE @@ -102,10 +105,9 @@ define Package/libbbfdm/description Library contains the data model tree. It includes TR181, TR143 data models endef -USE_LOCAL=$(shell ls ./src/ 2>/dev/null >/dev/null && echo 1) -ifneq ($(USE_LOCAL),) +ifeq ($(USE_LOCAL),1) define Build/Prepare - $(CP) ./src/* $(PKG_BUILD_DIR)/ + $(CP) ~/git/bbfdm/* $(PKG_BUILD_DIR)/ endef endif @@ -134,16 +136,6 @@ CMAKE_OPTIONS += \ endif ##CONFIG_BBF_VENDOR_EXTENSION -ifeq ($(CONFIG_BBFDM_ENABLE_JSON_PLUGIN),y) -CMAKE_OPTIONS += \ - -DBBF_JSON_PLUGIN=ON -endif - -ifeq ($(CONFIG_BBFDM_ENABLE_DOTSO_PLUGIN),y) -CMAKE_OPTIONS += \ - -DBBF_DOTSO_PLUGIN=ON -endif - ifeq ($(BUILD_VARIANT),default) CMAKE_OPTIONS += -DWITH_OPENSSL=ON endif @@ -188,12 +180,6 @@ ifeq ($(CONFIG_BBF_TR143),y) $(INSTALL_BIN) $(PKG_BUILD_DIR)/libbbfdm/scripts/* $(1)/usr/share/bbfdm $(LN) /usr/share/bbfdm/bbf.diag $(1)/usr/libexec/rpcd/bbf.diag endif -ifeq ($(CONFIG_BBFDM_ENABLE_JSON_PLUGIN),y) - $(INSTALL_DIR) $(1)/etc/bbfdm/json -endif -ifeq ($(CONFIG_BBFDM_ENABLE_DOTSO_PLUGIN),y) - $(INSTALL_DIR) $(1)/usr/lib/bbfdm -endif endef define Package/libbbfdm/default/prerm diff --git a/bbfdm/bbfdm.mk b/bbfdm/bbfdm.mk new file mode 100644 index 000000000..f3e891019 --- /dev/null +++ b/bbfdm/bbfdm.mk @@ -0,0 +1,9 @@ +# +# Copyright (C) 2023 IOPSYS +# + + +define BbfdmInstallPlugin + $(INSTALL_DIR) $(1)/etc/bbfdm/plugins + $(INSTALL_DATA) $(2) $(1)/etc/bbfdm/plugins/ +endef