From deaa91514bc58a2ba9e6a107b0cac65198cfbf50 Mon Sep 17 00:00:00 2001
From: Vivek Kumar Dutta <vivek.dutta@iopsys.eu>
Date: Thu, 21 Nov 2024 16:56:26 +0530
Subject: [PATCH] bbfdm: 1.12.24

---
 bbfdm/Makefile                  | 3 ++-
 bbfdm/tools/bbfdm.sh            | 6 +++++-
 bbfdm/tools/validate_plugins.py | 2 ++
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/bbfdm/Makefile b/bbfdm/Makefile
index b8b0d6f17..ffdd40c0d 100644
--- a/bbfdm/Makefile
+++ b/bbfdm/Makefile
@@ -5,7 +5,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bbfdm
-PKG_VERSION:=1.12.23
+PKG_VERSION:=1.12.24
 
 USE_LOCAL:=0
 ifneq ($(USE_LOCAL),1)
@@ -16,6 +16,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
 PKG_MIRROR_HASH:=skip
 endif
 
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
 
diff --git a/bbfdm/tools/bbfdm.sh b/bbfdm/tools/bbfdm.sh
index 43115a860..f0a42760d 100755
--- a/bbfdm/tools/bbfdm.sh
+++ b/bbfdm/tools/bbfdm.sh
@@ -163,11 +163,15 @@ else
 	if [ "${PLUGIN}" -eq "1" ]; then
 		priority="${DATA:-0}"
 		install_dir ${DEST}/${BBFDM_BASE_DM_PATH}/plugins
+
 		if [ "${priority}" -gt "0" ]; then
 			# install with priority if defined
 			bbfdm_install_dm ${SRC} ${DEST}/${BBFDM_BASE_DM_PATH}/plugins/${priority}_$(basename ${SRC})
-		else
+		elif [ "${priority}" -eq "0" ]; then
 			bbfdm_install_dm ${SRC} ${DEST}/${BBFDM_BASE_DM_PATH}/plugins/$(basename ${SRC})
+		else
+			echo "# Priority should be an unsigned integer"
+			exit 1
 		fi
 	fi
 fi
diff --git a/bbfdm/tools/validate_plugins.py b/bbfdm/tools/validate_plugins.py
index aff4f5da4..ba171e473 100755
--- a/bbfdm/tools/validate_plugins.py
+++ b/bbfdm/tools/validate_plugins.py
@@ -228,6 +228,7 @@ event_schema = {
 		"protocols_t": {
 			"type": "string",
 			"enum": [
+				"none",
 				"usp"
 			]
 		}
@@ -255,6 +256,7 @@ command_schema = {
 		"protocols_t": {
 			"type": "string",
 			"enum": [
+				"none",
 				"usp"
 			]
 		}
-- 
GitLab