mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-25 03:24:14 +08:00
Compare commits
36 Commits
tmp_bsteer
...
dynbhaul-h
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
878111e0a5 | ||
|
|
84b5e3bb4d | ||
|
|
63051a0f05 | ||
|
|
62dc6c28a3 | ||
|
|
2703ea0421 | ||
|
|
b4a0572b7c | ||
|
|
428055c911 | ||
|
|
97723f9e7a | ||
|
|
2dceb5b44b | ||
|
|
8c9689caf7 | ||
|
|
af5bb94c8c | ||
|
|
9db65fcfba | ||
|
|
2b43c27e53 | ||
|
|
c16f4d3f82 | ||
|
|
99a4f3c036 | ||
|
|
71217d4f68 | ||
|
|
ad012d7549 | ||
|
|
6cca837500 | ||
|
|
6bec3c159c | ||
|
|
fd921bb196 | ||
|
|
60d2f92da3 | ||
|
|
8f83250890 | ||
|
|
652ec8a4af | ||
|
|
937b824055 | ||
|
|
889723079b | ||
|
|
7a457ae32a | ||
|
|
7e5e38e657 | ||
|
|
44edac6572 | ||
|
|
fea3e1e4ef | ||
|
|
eae31a6dd4 | ||
|
|
3a1a65d5df | ||
|
|
70a22d0299 | ||
|
|
2a19a1a92a | ||
|
|
5b865c9dbc | ||
|
|
bc041faf04 | ||
|
|
de08bc79a1 |
@@ -5,13 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bbfdm
|
||||
PKG_VERSION:=1.16.6
|
||||
PKG_VERSION:=1.16.7
|
||||
|
||||
USE_LOCAL:=0
|
||||
ifneq ($(USE_LOCAL),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bbfdm.git
|
||||
PKG_SOURCE_VERSION:=549a296cbfe0f6f6aaf22c0371651668abd8b10f
|
||||
PKG_SOURCE_VERSION:=b6fdc87df88b0a625480301d52fbfc2bdfb0aa58
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
@@ -10,19 +10,10 @@ log() {
|
||||
echo "${@}"|logger -t bbf.config -p info
|
||||
}
|
||||
|
||||
create_needed_directories()
|
||||
{
|
||||
mkdir -p /tmp/bbfdm/.cwmp
|
||||
mkdir -p /tmp/bbfdm/.usp
|
||||
mkdir -p /tmp/bbfdm/.bbfdm
|
||||
}
|
||||
|
||||
start_service()
|
||||
{
|
||||
local log_level
|
||||
|
||||
create_needed_directories
|
||||
|
||||
config_load bbfdm
|
||||
config_get log_level "reload_handler" log_level 2
|
||||
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bridgemngr
|
||||
PKG_VERSION:=1.0.17
|
||||
PKG_VERSION:=1.1.1
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/bridgemngr
|
||||
PKG_SOURCE_VERSION:=36e6e8319a95dad3bccfe9f2d8a298b39c6ce86b
|
||||
PKG_SOURCE_VERSION:=b6a657e1c83b49f09323b4012ef229c604b82854
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=firewallmngr
|
||||
PKG_VERSION:=1.0.9
|
||||
PKG_VERSION:=1.0.10
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/firewallmngr.git
|
||||
PKG_SOURCE_VERSION:=77ad8425b73a3ac63f6160dc217635394ac87907
|
||||
PKG_SOURCE_VERSION:=05ad0d6f7f21520eecd05429c14d1963de2a8463
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
@@ -5,15 +5,16 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=fluent-bit
|
||||
PKG_VERSION:=4.0.2
|
||||
PKG_VERSION:=4.0.4
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/fluent/fluent-bit.git
|
||||
PKG_SOURCE_VERSION=v$(PKG_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL_FILE:=v$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/fluent/fluent-bit/archive/refs/tags/
|
||||
PKG_HASH:=aa0577ba7251081c8d5398b2a905b5b0585bb657ca13b39a5e12931437516f08
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
@@ -65,9 +66,9 @@ CMAKE_OPTIONS += \
|
||||
-DFLB_IN_DISK=Yes \
|
||||
-DFLB_IN_EXEC=Yes \
|
||||
-DFLB_IN_HEAD=Yes \
|
||||
-DFLB_IN_KMSG=Yes \
|
||||
-DFLB_IN_TAIL=Yes \
|
||||
-DFLB_IN_FORWARD=No \
|
||||
-DFLB_IN_KMSG=No \
|
||||
-DFLB_IN_PROC=No \
|
||||
-DFLB_IN_RANDOM=No \
|
||||
-DFLB_IN_SERIAL=No \
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
tag syslog
|
||||
path /dev/log
|
||||
|
||||
[INPUT]
|
||||
name kmsg
|
||||
tag kernel
|
||||
|
||||
[OUTPUT]
|
||||
name null
|
||||
match *
|
||||
|
||||
32
fluent-bit/patches/0005-kmsg_log.patch
Normal file
32
fluent-bit/patches/0005-kmsg_log.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
diff --git a/plugins/in_kmsg/in_kmsg.c b/plugins/in_kmsg/in_kmsg.c
|
||||
index cd5c4cd17..9524cf194 100644
|
||||
--- a/plugins/in_kmsg/in_kmsg.c
|
||||
+++ b/plugins/in_kmsg/in_kmsg.c
|
||||
@@ -165,6 +165,15 @@ static inline int process_line(const char *line,
|
||||
|
||||
flb_time_set(&ts, ctx->boot_time.tv_sec + tv.tv_sec, tv.tv_usec * 1000);
|
||||
|
||||
+ /* Format syslog timestamp: "Jul 03 10:31:53" */
|
||||
+ time_t real_time = ctx->boot_time.tv_sec + tv.tv_sec;
|
||||
+ struct tm tm_info;
|
||||
+ char syslog_ts[32];
|
||||
+
|
||||
+ localtime_r(&real_time, &tm_info);
|
||||
+ strftime(syslog_ts, sizeof(syslog_ts), "%b %d %H:%M:%S", &tm_info);
|
||||
+ int syslog_ts_len = strlen(syslog_ts);
|
||||
+
|
||||
/* Now process the human readable message */
|
||||
p = strchr(p, ';');
|
||||
if (!p) {
|
||||
@@ -198,7 +207,10 @@ static inline int process_line(const char *line,
|
||||
FLB_LOG_EVENT_UINT64_VALUE(tv.tv_usec),
|
||||
|
||||
FLB_LOG_EVENT_CSTRING_VALUE("msg"),
|
||||
- FLB_LOG_EVENT_STRING_VALUE((char *) p, line_len - 1));
|
||||
+ FLB_LOG_EVENT_STRING_VALUE((char *) p, line_len - 1),
|
||||
+
|
||||
+ FLB_LOG_EVENT_CSTRING_VALUE("syslog_ts"),
|
||||
+ FLB_LOG_EVENT_STRING_VALUE(syslog_ts, syslog_ts_len));
|
||||
}
|
||||
|
||||
if (ret == FLB_EVENT_ENCODER_SUCCESS) {
|
||||
@@ -8,13 +8,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=icwmp
|
||||
PKG_VERSION:=9.9.9
|
||||
PKG_VERSION:=9.9.10
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/icwmp.git
|
||||
PKG_SOURCE_VERSION:=070e812e1bfb81a35a95a9c16cc20e8ffa6e30e4
|
||||
PKG_SOURCE_VERSION:=1a842e0a3836f616973e6a92f0b0b6ca82ec39bb
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ieee1905
|
||||
PKG_VERSION:=8.7.32
|
||||
PKG_VERSION:=8.7.33
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=f1f653c0b7b53a243af889a4c8594aca42589045
|
||||
PKG_SOURCE_VERSION:=cb5b8f76c854b89607cd1750d3a4052ecd71ac9d
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/ieee1905.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
@@ -116,7 +116,7 @@ MAKE_PATH:=src
|
||||
|
||||
|
||||
define Package/ieee1905/install
|
||||
$(CP) ./files/* $(1)/
|
||||
$(CP) ./files/etc $(1)/
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_DIR) $(1)/usr/lib/ieee1905
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
|
||||
23
ieee1905/files/datamodel_description.json
Normal file
23
ieee1905/files/datamodel_description.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"Device.IEEE1905.AL.": {
|
||||
"type": "object",
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"access": false,
|
||||
"array": false,
|
||||
"{BBF_VENDOR_PREFIX}LocalOnlyMode": {
|
||||
"type": "boolean",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"description": "Enable or disable interfaces from ieee1905.",
|
||||
"datatype": "boolean"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libwifi
|
||||
PKG_VERSION:=7.13.4
|
||||
PKG_VERSION:=7.13.7
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=e5a8bc4985d91b0938bbdf2a46a99081408e5224
|
||||
PKG_SOURCE_VERSION:=65a7cd643c07e3f0a11d5b20225d4d87b8646513
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/libwifi.git
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
|
||||
@@ -29,7 +29,6 @@ define Package/logmngr
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Logging Manager
|
||||
DEPENDS:=+LOGMNGR_BACKEND_FLUENTBIT:fluent-bit
|
||||
DEPENDS+=+@LOGMNGR_BACKEND_FLUENTBIT:BUSYBOX_CONFIG_KLOGD
|
||||
DEPENDS+=+LOGMNGR_BACKEND_SYSLOG_NG:syslog-ng
|
||||
DEPENDS+=+LOGMNGR_LOGROTATE:logrotate
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
|
||||
@@ -61,8 +60,6 @@ define Package/logmngr/install
|
||||
$(INSTALL_DIR) $(1)/lib/logmngr
|
||||
ifeq ($(CONFIG_LOGMNGR_BACKEND_FLUENTBIT),y)
|
||||
$(INSTALL_DATA) ./files/lib/logmngr/fluent-bit.sh $(1)/lib/logmngr/
|
||||
$(INSTALL_DIR) $(1)/usr/libexec
|
||||
$(INSTALL_BIN) ./files/logmngr-klogd $(1)/usr/libexec/
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(INSTALL_BIN) ./files/logread $(1)/sbin/
|
||||
endif
|
||||
|
||||
@@ -36,6 +36,20 @@ create_service_section() {
|
||||
echo " parsers_file /etc/fluent-bit/parsers.conf" >> ${TMP_CONF_FILE}
|
||||
echo " hot_reload on" >> ${TMP_CONF_FILE}
|
||||
echo "" >> ${TMP_CONF_FILE}
|
||||
|
||||
# Generate default input for kmsg
|
||||
echo "[INPUT]" >> ${TMP_CONF_FILE}
|
||||
echo " name kmsg" >> ${TMP_CONF_FILE}
|
||||
echo " Tag KMSG" >> ${TMP_CONF_FILE}
|
||||
echo "" >> ${TMP_CONF_FILE}
|
||||
|
||||
echo "[OUTPUT]" >> ${TMP_CONF_FILE}
|
||||
echo " name file" >> ${TMP_CONF_FILE}
|
||||
echo " match KMSG" >> ${TMP_CONF_FILE}
|
||||
echo " file /var/log/messages" >> ${TMP_CONF_FILE}
|
||||
echo " format template" >> ${TMP_CONF_FILE}
|
||||
echo " template {syslog_ts} {hostname} kernel: {msg}" >> ${TMP_CONF_FILE}
|
||||
echo "" >> ${TMP_CONF_FILE}
|
||||
}
|
||||
|
||||
create_input_section() {
|
||||
@@ -340,9 +354,4 @@ logmngr_init() {
|
||||
fi
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
|
||||
procd_open_instance klogd
|
||||
procd_set_param command /usr/libexec/logmngr-klogd
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
until [ -S /dev/log ]; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
exec /sbin/klogd -n
|
||||
@@ -17,12 +17,6 @@ for port_bridge_sec in $port_bridge_sec_list; do
|
||||
fi
|
||||
done
|
||||
|
||||
# Exit if the PORT Bridge Name is empty
|
||||
[ -z "$port_bridge_name" ] && exit 0
|
||||
|
||||
# Exit if the PORT is not member of the AL Bridge
|
||||
[ "$port_bridge_name" = "$al_bridge" ] || exit 0
|
||||
|
||||
# Exit if the device is not operating in extender/repeater mode
|
||||
al_brnet="${al_bridge:3}"
|
||||
[ "$(uci -q get network.${al_brnet}.proto)" == "dhcp" ] || exit 0
|
||||
@@ -36,9 +30,16 @@ fi
|
||||
################ Dedicated ETH WAN Port ################
|
||||
wanport="$(jsonfilter -i /etc/board.json -e @.network.wan.device)"
|
||||
if [ -n "$wanport" ]; then
|
||||
# Don't require wanport to be part of port bridge
|
||||
[ "$wanport" = "$PORT" ] || exit 0
|
||||
########################################################
|
||||
else
|
||||
# Exit if the PORT Bridge Name is empty
|
||||
[ -z "$port_bridge_name" ] && exit 0
|
||||
|
||||
# Exit if the PORT is not member of the AL Bridge
|
||||
[ "$port_bridge_name" = "$al_bridge" ] || exit 0
|
||||
|
||||
#################### DHCP Discovery ####################
|
||||
if [ "$LINK" = "up" ]; then
|
||||
brctl delif $al_bridge $PORT
|
||||
@@ -95,8 +96,12 @@ if [ "$LINK" = "up" ]; then
|
||||
config_foreach remove_from_bridge bsta
|
||||
config_foreach update_bstas bsta down
|
||||
|
||||
brctl addif $al_bridge $PORT
|
||||
logger -t "dynamic-backhaul" "brctl addif $al_bridge $PORT"
|
||||
/lib/wifi/multiap set_uplink "eth" "$PORT"
|
||||
else
|
||||
brctl delif $al_bridge $PORT
|
||||
logger -t "dynamic-backhaul" "brctl delif $al_bridge $PORT"
|
||||
/lib/wifi/multiap unset_uplink "eth"
|
||||
#rm -f "$map_bh_file"
|
||||
config_load "mapagent"
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=map-controller
|
||||
PKG_VERSION:=6.4.0.11
|
||||
PKG_VERSION:=6.4.0.12
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=db314c0fb388a3de47a9e6db5d944d7fabc832c6
|
||||
PKG_SOURCE_VERSION:=ae10f447f8d83ed6b98d2b82da2dda64be2c3183
|
||||
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@genexis.eu>
|
||||
|
||||
LOCAL_DEV=0
|
||||
|
||||
@@ -80,7 +80,11 @@ l2_network_config() {
|
||||
json_select ..
|
||||
json_select wan 2>/dev/null
|
||||
json_get_var device device
|
||||
[ -n "$device" ] && uci add_list network.br_lan.ports="$device"
|
||||
[ -n "$device" ] && {
|
||||
# dedicated wan port - create uplink device
|
||||
uci -q set network.l2wan=interface
|
||||
uci -q set network.l2wan.device="$device"
|
||||
}
|
||||
json_cleanup
|
||||
fi
|
||||
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=obuspa
|
||||
PKG_VERSION:=10.0.0.14
|
||||
PKG_VERSION:=10.0.4.1
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/obuspa.git
|
||||
PKG_SOURCE_VERSION:=aeda0145e269cad49d326800fbd39d87c0d30087
|
||||
PKG_SOURCE_VERSION:=6b888812299de0d836a8dcf33bc899ec8ff16030
|
||||
PKG_MAINTAINER:=Vivek Dutta <vivek.dutta@iopsys.eu>
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
Index: obuspa-10.0.0.1/src/core/device_controller.c
|
||||
Index: obuspa-10.0.4.0/src/core/device_controller.c
|
||||
===================================================================
|
||||
--- obuspa-10.0.0.1.orig/src/core/device_controller.c
|
||||
+++ obuspa-10.0.0.1/src/core/device_controller.c
|
||||
@@ -4211,6 +4211,14 @@ int ProcessControllerAdded(int cont_inst
|
||||
--- obuspa-10.0.4.0.orig/src/core/device_controller.c
|
||||
+++ obuspa-10.0.4.0/src/core/device_controller.c
|
||||
@@ -4214,6 +4214,14 @@ int ProcessControllerAdded(int cont_inst
|
||||
goto exit;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ Index: obuspa-10.0.0.1/src/core/device_controller.c
|
||||
// Exit if unable to get the object instance numbers present in this controller's MTP table
|
||||
USP_SNPRINTF(path, sizeof(path), "%s.%d.MTP", device_cont_root, cont_instance);
|
||||
err = DATA_MODEL_GetInstances(path, &iv);
|
||||
@@ -4252,14 +4260,6 @@ int ProcessControllerAdded(int cont_inst
|
||||
@@ -4255,14 +4263,6 @@ int ProcessControllerAdded(int cont_inst
|
||||
DEVICE_MQTT_UpdateControllerTopics();
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Index: obuspa-10.0.0.1/src/core/bdc_exec.c
|
||||
Index: obuspa-10.0.4.0/src/core/bdc_exec.c
|
||||
===================================================================
|
||||
--- obuspa-10.0.0.1.orig/src/core/bdc_exec.c
|
||||
+++ obuspa-10.0.0.1/src/core/bdc_exec.c
|
||||
--- obuspa-10.0.4.0.orig/src/core/bdc_exec.c
|
||||
+++ obuspa-10.0.4.0/src/core/bdc_exec.c
|
||||
@@ -549,10 +549,25 @@ int StartSendingReport(bdc_connection_t
|
||||
|
||||
// Set the list of headers
|
||||
@@ -30,10 +30,10 @@ Index: obuspa-10.0.0.1/src/core/bdc_exec.c
|
||||
bc->headers = curl_slist_append(bc->headers, "Content-Encoding: gzip");
|
||||
}
|
||||
|
||||
Index: obuspa-10.0.0.1/src/core/bdc_exec.h
|
||||
Index: obuspa-10.0.4.0/src/core/bdc_exec.h
|
||||
===================================================================
|
||||
--- obuspa-10.0.0.1.orig/src/core/bdc_exec.h
|
||||
+++ obuspa-10.0.0.1/src/core/bdc_exec.h
|
||||
--- obuspa-10.0.4.0.orig/src/core/bdc_exec.h
|
||||
+++ obuspa-10.0.4.0/src/core/bdc_exec.h
|
||||
@@ -54,6 +54,8 @@ void BDC_EXEC_ScheduleExit(void);
|
||||
#define BDC_FLAG_PUT 0x00000001 // If set, HTTP PUT should be used instead of HTTP POST when sending the report to the BDC server
|
||||
#define BDC_FLAG_GZIP 0x00000002 // If set, the reports contants are Gzipped
|
||||
@@ -45,10 +45,10 @@ Index: obuspa-10.0.0.1/src/core/bdc_exec.h
|
||||
+#define BDC_FLAG_HEADER_PER_ROW 0x00000020 // If set, report format in header would be csv ParameterPerRow
|
||||
+#define BDC_FLAG_HEADER_PER_COL 0x00000040 // If set, report format in header would be csv ParameterPerColumn
|
||||
#endif
|
||||
Index: obuspa-10.0.0.1/src/core/device_bulkdata.c
|
||||
Index: obuspa-10.0.4.0/src/core/device_bulkdata.c
|
||||
===================================================================
|
||||
--- obuspa-10.0.0.1.orig/src/core/device_bulkdata.c
|
||||
+++ obuspa-10.0.0.1/src/core/device_bulkdata.c
|
||||
--- obuspa-10.0.4.0.orig/src/core/device_bulkdata.c
|
||||
+++ obuspa-10.0.4.0/src/core/device_bulkdata.c
|
||||
@@ -71,8 +71,12 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -95,7 +95,7 @@ Index: obuspa-10.0.0.1/src/core/device_bulkdata.c
|
||||
int Validate_BulkDataHTTPMethod(dm_req_t *req, char *value);
|
||||
@@ -247,7 +259,8 @@ bulkdata_profile_t *bulkdata_find_free_p
|
||||
bulkdata_profile_t *bulkdata_find_profile(int profile_id);
|
||||
int bulkdata_calc_report_map(bulkdata_profile_t *bp, kv_vector_t *report_map);
|
||||
int bulkdata_calc_report_map(bulkdata_profile_t *bp, kv_vector_t *report_map, combined_role_t *combined_role);
|
||||
int bulkdata_reduce_to_alt_name(char *spec, char *path, char *alt_name, char *out_buf, int buf_len);
|
||||
-char *bulkdata_generate_json_report(bulkdata_profile_t *bp, char *report_timestamp);
|
||||
+char *bulkdata_generate_json_report(bulkdata_profile_t *bp, char *report_timestamp, char *report_format);
|
||||
@@ -103,16 +103,16 @@ Index: obuspa-10.0.0.1/src/core/device_bulkdata.c
|
||||
unsigned char *bulkdata_compress_report(profile_ctrl_params_t *ctrl, char *input_buf, int input_len, int *p_output_len);
|
||||
int bulkdata_schedule_sending_http_report(profile_ctrl_params_t *ctrl, bulkdata_profile_t *bp, unsigned char *json_report, int report_len);
|
||||
int bulkdata_start_profile(bulkdata_profile_t *bp);
|
||||
@@ -262,6 +275,8 @@ char *bulkdata_platform_calc_uri_query_s
|
||||
int bulkdata_platform_get_param_refs(int profile_id, param_ref_vector_t *param_refs);
|
||||
void bulkdata_expand_param_ref(param_ref_entry_t *pr, group_get_vector_t *ggv);
|
||||
@@ -263,6 +276,8 @@ int bulkdata_platform_get_param_refs(int
|
||||
int bulkdata_platform_calc_combined_role(int instance, combined_role_t **bulkdata_role, combined_role_t *combined_role, int *cont_instance);
|
||||
void bulkdata_expand_param_ref(param_ref_entry_t *pr, group_get_vector_t *ggv, combined_role_t *combined_role);
|
||||
void bulkdata_append_to_result_map(param_ref_entry_t *pr, group_get_vector_t *ggv, kv_vector_t *report_map);
|
||||
+void append_string_to_target(char *str, char **output);
|
||||
+char *csv_encode(const char *str);
|
||||
int GetAuto_BulkDataController(dm_req_t *req, char *buf, int len);
|
||||
#ifdef ENABLE_MQTT
|
||||
int Validate_BulkDataMqttReference(dm_req_t *req, char *value);
|
||||
void bulkdata_process_profile_mqtt(bulkdata_profile_t *bp);
|
||||
@@ -299,7 +314,7 @@ int DEVICE_BULKDATA_Init(void)
|
||||
@@ -301,7 +316,7 @@ int DEVICE_BULKDATA_Init(void)
|
||||
err |= USP_REGISTER_VendorParam_ReadOnly("Device.BulkData.Status", Get_BulkDataGlobalStatus, DM_STRING);
|
||||
err |= USP_REGISTER_Param_Constant("Device.BulkData.MinReportingInterval", BULKDATA_MINIMUM_REPORTING_INTERVAL_STR, DM_UINT);
|
||||
err |= USP_REGISTER_Param_SupportedList("Device.BulkData.Protocols", bdc_protocols, NUM_ELEM(bdc_protocols));
|
||||
@@ -121,7 +121,7 @@ Index: obuspa-10.0.0.1/src/core/device_bulkdata.c
|
||||
err |= USP_REGISTER_Param_Constant("Device.BulkData.ParameterWildCardSupported", "true", DM_BOOL);
|
||||
err |= USP_REGISTER_Param_Constant("Device.BulkData.MaxNumberOfProfiles", BULKDATA_MAX_PROFILES_STR, DM_INT);
|
||||
err |= USP_REGISTER_Param_Constant("Device.BulkData.MaxNumberOfParameterReferences", "-1", DM_INT);
|
||||
@@ -314,7 +329,7 @@ int DEVICE_BULKDATA_Init(void)
|
||||
@@ -316,7 +331,7 @@ int DEVICE_BULKDATA_Init(void)
|
||||
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.Name", "", NULL, NULL, DM_STRING);
|
||||
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.NumberOfRetainedFailedReports", "0", Validate_NumberOfRetainedFailedReports, NULL, DM_INT);
|
||||
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.Protocol", BULKDATA_PROTOCOL_HTTP, Validate_BulkDataProtocol, NULL, DM_STRING);
|
||||
@@ -129,8 +129,8 @@ Index: obuspa-10.0.0.1/src/core/device_bulkdata.c
|
||||
+ err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.EncodingType", BULKDATA_ENCODING_TYPE_JSON, Validate_BulkDataEncodingType, NULL, DM_STRING);
|
||||
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.ReportingInterval", "86400", Validate_BulkDataReportingInterval, NotifyChange_BulkDataReportingInterval, DM_UINT);
|
||||
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.TimeReference", UNKNOWN_TIME_STR, NULL, NotifyChange_BulkDataTimeReference, DM_DATETIME);
|
||||
|
||||
@@ -326,9 +341,16 @@ int DEVICE_BULKDATA_Init(void)
|
||||
err |= USP_REGISTER_DBParam_ReadOnlyAuto("Device.BulkData.Profile.{i}.Controller", GetAuto_BulkDataController, DM_STRING);
|
||||
@@ -329,9 +344,16 @@ int DEVICE_BULKDATA_Init(void)
|
||||
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.Parameter.{i}.Reference", "", Validate_BulkDataReference, NULL, DM_STRING);
|
||||
|
||||
// Device.BulkData.Profile.{i}.JSONEncoding
|
||||
@@ -148,7 +148,7 @@ Index: obuspa-10.0.0.1/src/core/device_bulkdata.c
|
||||
// Device.BulkData.Profile.{i}.HTTP
|
||||
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.HTTP.URL", "", NULL, NotifyChange_BulkDataURL, DM_STRING);
|
||||
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.HTTP.Username", "", NULL, NULL, DM_STRING);
|
||||
@@ -614,9 +636,10 @@ int Validate_BulkDataProtocol(dm_req_t *
|
||||
@@ -687,9 +709,10 @@ int Validate_BulkDataProtocol(dm_req_t *
|
||||
int Validate_BulkDataEncodingType(dm_req_t *req, char *value)
|
||||
{
|
||||
// Exit if trying to set a value outside of the range we accept
|
||||
@@ -162,7 +162,7 @@ Index: obuspa-10.0.0.1/src/core/device_bulkdata.c
|
||||
return USP_ERR_INVALID_VALUE;
|
||||
}
|
||||
|
||||
@@ -720,9 +743,36 @@ int Validate_BulkDataReference(dm_req_t
|
||||
@@ -793,9 +816,36 @@ int Validate_BulkDataReference(dm_req_t
|
||||
int Validate_BulkDataReportFormat(dm_req_t *req, char *value)
|
||||
{
|
||||
// Exit if trying to set a value outside of the range we accept
|
||||
@@ -201,7 +201,7 @@ Index: obuspa-10.0.0.1/src/core/device_bulkdata.c
|
||||
return USP_ERR_INVALID_VALUE;
|
||||
}
|
||||
|
||||
@@ -2053,6 +2103,14 @@ int bulkdata_platform_get_profile_contro
|
||||
@@ -2151,6 +2201,14 @@ int bulkdata_platform_get_profile_contro
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ Index: obuspa-10.0.0.1/src/core/device_bulkdata.c
|
||||
// Exit if unable to get ReportTimestamp
|
||||
USP_SNPRINTF(path, sizeof(path), "Device.BulkData.Profile.%d.JSONEncoding.ReportTimestamp", bp->profile_id);
|
||||
err = DATA_MODEL_GetParameterValue(path, ctrl_params->report_timestamp, sizeof(ctrl_params->report_timestamp), 0);
|
||||
@@ -2061,6 +2119,54 @@ int bulkdata_platform_get_profile_contro
|
||||
@@ -2159,6 +2217,54 @@ int bulkdata_platform_get_profile_contro
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -271,7 +271,7 @@ Index: obuspa-10.0.0.1/src/core/device_bulkdata.c
|
||||
#ifdef ENABLE_MQTT
|
||||
{
|
||||
char protocol[32];
|
||||
@@ -2334,7 +2440,7 @@ void bulkdata_process_profile_http(bulkd
|
||||
@@ -2492,7 +2598,7 @@ void bulkdata_process_profile_http(bulkd
|
||||
{
|
||||
int err;
|
||||
report_t *cur_report;
|
||||
@@ -280,7 +280,7 @@ Index: obuspa-10.0.0.1/src/core/device_bulkdata.c
|
||||
profile_ctrl_params_t ctrl;
|
||||
unsigned char *compressed_report;
|
||||
int compressed_len;
|
||||
@@ -2373,10 +2479,23 @@ void bulkdata_process_profile_http(bulkd
|
||||
@@ -2541,26 +2647,39 @@ void bulkdata_process_profile_http(bulkd
|
||||
}
|
||||
|
||||
// Exit if unable to generate the report
|
||||
@@ -308,7 +308,9 @@ Index: obuspa-10.0.0.1/src/core/device_bulkdata.c
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2385,14 +2504,14 @@ void bulkdata_process_profile_http(bulkd
|
||||
// Print out the JSON report, if debugging is enabled
|
||||
- USP_LOG_Info("\nBULK DATA: %sing at time %s, to url=%s", ctrl.method, iso8601_cur_time(buf, sizeof(buf)), ctrl.url);
|
||||
+ USP_LOG_Info("BULK DATA: %sing at time %s, to url=%s", ctrl.method, iso8601_cur_time(buf, sizeof(buf)), ctrl.url);
|
||||
USP_LOG_Info("BULK DATA: using compression method=%s", ctrl.compression);
|
||||
if (enable_protocol_trace)
|
||||
{
|
||||
@@ -327,7 +329,7 @@ Index: obuspa-10.0.0.1/src/core/device_bulkdata.c
|
||||
}
|
||||
// NOTE: From this point on, only the compressed_report exists
|
||||
|
||||
@@ -2422,8 +2541,15 @@ void bulkdata_process_profile_usp_event(
|
||||
@@ -2590,8 +2709,15 @@ void bulkdata_process_profile_usp_event(
|
||||
kv_vector_t event_args;
|
||||
kv_pair_t kv;
|
||||
report_t *cur_report;
|
||||
@@ -341,11 +343,11 @@ Index: obuspa-10.0.0.1/src/core/device_bulkdata.c
|
||||
+ char escape_char[10];
|
||||
+ char csv_format[20];
|
||||
+ char row_timestamp[33];
|
||||
|
||||
// Exit if the MTP has not been connected to successfully after bootup
|
||||
// This is to prevent BDC events being enqueued before the Boot! event is sent (the Boot! event is only sent after successfully connecting to the MTP).
|
||||
@@ -2432,13 +2558,63 @@ void bulkdata_process_profile_usp_event(
|
||||
goto exit;
|
||||
combined_role_t *bulkdata_role;
|
||||
combined_role_t combined_role;
|
||||
int cont_instance;
|
||||
@@ -2610,13 +2736,63 @@ void bulkdata_process_profile_usp_event(
|
||||
return;
|
||||
}
|
||||
|
||||
- // Exit if unable to get ReportTimestamp
|
||||
@@ -415,7 +417,7 @@ Index: obuspa-10.0.0.1/src/core/device_bulkdata.c
|
||||
|
||||
// When sending via USP events, only one report is ever sent in each USP event
|
||||
// So ensure all retained reports are removed. NOTE: Clearing the reports here is only necessary when switching protocol from HTTP to USP event, and where HTTP had some unsent reports
|
||||
@@ -2456,11 +2632,17 @@ void bulkdata_process_profile_usp_event(
|
||||
@@ -2634,11 +2810,17 @@ void bulkdata_process_profile_usp_event(
|
||||
}
|
||||
bp->num_retained_reports = 1;
|
||||
|
||||
@@ -436,7 +438,7 @@ Index: obuspa-10.0.0.1/src/core/device_bulkdata.c
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2468,15 +2650,15 @@ void bulkdata_process_profile_usp_event(
|
||||
@@ -2646,15 +2828,15 @@ void bulkdata_process_profile_usp_event(
|
||||
|
||||
// Construct event_args manually to avoid the overhead of a malloc and copy of the report in KV_VECTOR_Add()
|
||||
kv.key = "Data";
|
||||
@@ -446,7 +448,7 @@ Index: obuspa-10.0.0.1/src/core/device_bulkdata.c
|
||||
event_args.num_entries = 1;
|
||||
|
||||
USP_SNPRINTF(path, sizeof(path), "Device.BulkData.Profile.%d.Push!", bp->profile_id);
|
||||
DEVICE_SUBSCRIPTION_ProcessAllEventCompleteSubscriptions(path, &event_args);
|
||||
DEVICE_SUBSCRIPTION_ProcessAllEventCompleteSubscriptions(path, &event_args, cont_instance);
|
||||
|
||||
- // Free the report. No need to free the event_args as json_report is the only thing dynamically allocated in it
|
||||
- free(json_report); // The report is not allocated via USP_MALLOC
|
||||
@@ -455,7 +457,7 @@ Index: obuspa-10.0.0.1/src/core/device_bulkdata.c
|
||||
|
||||
// From the point of view of this code, the report(s) have been successfully sent, so don't retain them
|
||||
// NOTE: Sending of the reports successfully is delegated to the USP notification retry mechanism
|
||||
@@ -2548,11 +2730,24 @@ void bulkdata_process_profile_mqtt(bulkd
|
||||
@@ -2736,15 +2918,28 @@ void bulkdata_process_profile_mqtt(bulkd
|
||||
}
|
||||
|
||||
// Exit if unable to generate the report
|
||||
@@ -485,7 +487,21 @@ Index: obuspa-10.0.0.1/src/core/device_bulkdata.c
|
||||
}
|
||||
|
||||
// Print out the JSON report, if debugging is enabled
|
||||
@@ -2763,7 +2958,7 @@ int bulkdata_reduce_to_alt_name(char *sp
|
||||
- USP_LOG_Debug("\nBULK DATA: Sending at time %s to MQTT topic %s", iso8601_cur_time(buf, sizeof(buf)), ctrl.mqtt_publish_topic);
|
||||
+ USP_LOG_Debug("BULK DATA: Sending at time %s to MQTT topic %s", iso8601_cur_time(buf, sizeof(buf)), ctrl.mqtt_publish_topic);
|
||||
if (enable_protocol_trace)
|
||||
{
|
||||
USP_LOG_String(kLogLevel_Info, kLogType_Protocol, report);
|
||||
@@ -2939,7 +3134,7 @@ int bulkdata_reduce_to_alt_name(char *sp
|
||||
|
||||
/*********************************************************************//**
|
||||
**
|
||||
-** bulkdata_generate_json_report
|
||||
+** bulkdata_generate_json_name_value_pair_report
|
||||
**
|
||||
** Generates a JSON name-value pair format report
|
||||
** NOTE: The report contains all retained failed reports, as well as the current report
|
||||
@@ -2951,7 +3146,7 @@ int bulkdata_reduce_to_alt_name(char *sp
|
||||
** \return pointer to NULL terminated dynamically allocated buffer containing the serialized report to send
|
||||
**
|
||||
**************************************************************************/
|
||||
@@ -494,7 +510,7 @@ Index: obuspa-10.0.0.1/src/core/device_bulkdata.c
|
||||
{
|
||||
JsonNode *top; // top of report
|
||||
JsonNode *array; // array of reports (retained + current)
|
||||
@@ -2868,6 +3063,483 @@ char *bulkdata_generate_json_report(bulk
|
||||
@@ -3056,6 +3251,483 @@ char *bulkdata_generate_json_report(bulk
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -978,7 +994,7 @@ Index: obuspa-10.0.0.1/src/core/device_bulkdata.c
|
||||
/*********************************************************************//**
|
||||
**
|
||||
** bulkdata_compress_report
|
||||
@@ -3071,6 +3743,20 @@ int bulkdata_schedule_sending_http_repor
|
||||
@@ -3259,6 +3931,20 @@ int bulkdata_schedule_sending_http_repor
|
||||
flags |= BDC_FLAG_DATE_HEADER;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Index: obuspa-10.0.0.1/src/core/expr_vector.c
|
||||
Index: obuspa-10.0.4.0/src/core/expr_vector.c
|
||||
===================================================================
|
||||
--- obuspa-10.0.0.1.orig/src/core/expr_vector.c
|
||||
+++ obuspa-10.0.0.1/src/core/expr_vector.c
|
||||
--- obuspa-10.0.4.0.orig/src/core/expr_vector.c
|
||||
+++ obuspa-10.0.4.0/src/core/expr_vector.c
|
||||
@@ -59,6 +59,7 @@ char *expr_op_2_str[kExprOp_Max] =
|
||||
"<", // kExprOp_LessThan
|
||||
">", // kExprOp_GreaterThan
|
||||
@@ -10,7 +10,7 @@ Index: obuspa-10.0.0.1/src/core/expr_vector.c
|
||||
};
|
||||
|
||||
|
||||
@@ -483,6 +484,15 @@ char *SplitOnOperator(char *buf, expr_op
|
||||
@@ -487,6 +488,15 @@ char *SplitOnOperator(char *buf, expr_op
|
||||
*op = '\0';
|
||||
return &op[2];
|
||||
}
|
||||
@@ -26,10 +26,10 @@ Index: obuspa-10.0.0.1/src/core/expr_vector.c
|
||||
|
||||
// Exit if found the "<" operator
|
||||
op = strchr(buf, '<');
|
||||
Index: obuspa-10.0.0.1/src/core/path_resolver.c
|
||||
Index: obuspa-10.0.4.0/src/core/path_resolver.c
|
||||
===================================================================
|
||||
--- obuspa-10.0.0.1.orig/src/core/path_resolver.c
|
||||
+++ obuspa-10.0.0.1/src/core/path_resolver.c
|
||||
--- obuspa-10.0.4.0.orig/src/core/path_resolver.c
|
||||
+++ obuspa-10.0.4.0/src/core/path_resolver.c
|
||||
@@ -1088,7 +1088,7 @@ int ResolveUniqueKey(char *resolved, cha
|
||||
char temp[MAX_DM_PATH];
|
||||
bool is_match;
|
||||
@@ -107,10 +107,10 @@ Index: obuspa-10.0.0.1/src/core/path_resolver.c
|
||||
// Determine the function to call to perform the comparison
|
||||
if (type_flags & (DM_INT | DM_UINT | DM_ULONG | DM_LONG | DM_DECIMAL))
|
||||
{
|
||||
Index: obuspa-10.0.0.1/src/include/usp_api.h
|
||||
Index: obuspa-10.0.4.0/src/include/usp_api.h
|
||||
===================================================================
|
||||
--- obuspa-10.0.0.1.orig/src/include/usp_api.h
|
||||
+++ obuspa-10.0.0.1/src/include/usp_api.h
|
||||
--- obuspa-10.0.4.0.orig/src/include/usp_api.h
|
||||
+++ obuspa-10.0.4.0/src/include/usp_api.h
|
||||
@@ -106,6 +106,7 @@ typedef enum
|
||||
kExprOp_LessThan, // '<'
|
||||
kExprOp_GreaterThan, // '>'
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
Index: obuspa-10.0.0.2/src/core/device.h
|
||||
Index: obuspa-10.0.4.0/src/core/device.h
|
||||
===================================================================
|
||||
--- obuspa-10.0.0.2.orig/src/core/device.h
|
||||
+++ obuspa-10.0.0.2/src/core/device.h
|
||||
@@ -305,6 +305,8 @@ void DEVICE_CTRUST_ApplyPermissionsToSub
|
||||
--- obuspa-10.0.4.0.orig/src/core/device.h
|
||||
+++ obuspa-10.0.4.0/src/core/device.h
|
||||
@@ -310,6 +310,8 @@ void DEVICE_CTRUST_ApplyPermissionsToSub
|
||||
char *DEVICE_CTRUST_InstSelToPermTarget(int role_index, void *is, int *perm_instance);
|
||||
int DEVICE_CTRUST_SetRoleParameter(int instance, char *param_name, char *new_value);
|
||||
int DEVICE_CTRUST_SetPermissionParameter(int instance1, int instance2, char *param_name, char *new_value);
|
||||
@@ -11,11 +11,11 @@ Index: obuspa-10.0.0.2/src/core/device.h
|
||||
int DEVICE_REQUEST_Init(void);
|
||||
int DEVICE_REQUEST_Add(char *path, char *command_key, int *instance);
|
||||
void DEVICE_REQUEST_OperationComplete(int instance, int err_code, char *err_msg, kv_vector_t *output_args);
|
||||
Index: obuspa-10.0.0.2/src/core/device_ctrust.c
|
||||
Index: obuspa-10.0.4.0/src/core/device_ctrust.c
|
||||
===================================================================
|
||||
--- obuspa-10.0.0.2.orig/src/core/device_ctrust.c
|
||||
+++ obuspa-10.0.0.2/src/core/device_ctrust.c
|
||||
@@ -235,6 +235,7 @@ credential_t *FindCredentialByCertInstan
|
||||
--- obuspa-10.0.4.0.orig/src/core/device_ctrust.c
|
||||
+++ obuspa-10.0.4.0/src/core/device_ctrust.c
|
||||
@@ -236,6 +236,7 @@ credential_t *FindCredentialByCertInstan
|
||||
int Get_CredentialRole(dm_req_t *req, char *buf, int len);
|
||||
int Get_CredentialCertificate(dm_req_t *req, char *buf, int len);
|
||||
int Get_CredentialNumEntries(dm_req_t *req, char *buf, int len);
|
||||
@@ -23,7 +23,7 @@ Index: obuspa-10.0.0.2/src/core/device_ctrust.c
|
||||
|
||||
#ifndef REMOVE_DEVICE_SECURITY
|
||||
int InitChallengeTable();
|
||||
@@ -354,6 +355,10 @@ int DEVICE_CTRUST_Init(void)
|
||||
@@ -355,6 +356,10 @@ int DEVICE_CTRUST_Init(void)
|
||||
challenge_response_input_args, NUM_ELEM(challenge_response_input_args),
|
||||
NULL, 0);
|
||||
#endif
|
||||
@@ -34,7 +34,7 @@ Index: obuspa-10.0.0.2/src/core/device_ctrust.c
|
||||
// Exit if any errors occurred
|
||||
if (err != USP_ERR_OK)
|
||||
{
|
||||
@@ -2908,3 +2913,139 @@ exit:
|
||||
@@ -2939,3 +2944,139 @@ exit:
|
||||
return err;
|
||||
}
|
||||
#endif // REMOVE_DEVICE_SECURITY
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
Index: obuspa-10.0.0.1/src/core/device_bulkdata.c
|
||||
Index: obuspa-10.0.4.0/src/core/device_bulkdata.c
|
||||
===================================================================
|
||||
--- obuspa-10.0.0.1.orig/src/core/device_bulkdata.c
|
||||
+++ obuspa-10.0.0.1/src/core/device_bulkdata.c
|
||||
@@ -375,6 +375,8 @@ int DEVICE_BULKDATA_Init(void)
|
||||
--- obuspa-10.0.4.0.orig/src/core/device_bulkdata.c
|
||||
+++ obuspa-10.0.4.0/src/core/device_bulkdata.c
|
||||
@@ -378,6 +378,8 @@ int DEVICE_BULKDATA_Init(void)
|
||||
// Device.BulkData.Profile.{i}.MQTT
|
||||
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.MQTT.Reference", "", Validate_BulkDataMqttReference, NULL, DM_STRING);
|
||||
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.MQTT.PublishTopic", "", NULL, NULL, DM_STRING);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
Index: obuspa-10.0.0.2/src/core/device.h
|
||||
Index: obuspa-10.0.4.0/src/core/device.h
|
||||
===================================================================
|
||||
--- obuspa-10.0.0.2.orig/src/core/device.h
|
||||
+++ obuspa-10.0.0.2/src/core/device.h
|
||||
@@ -346,6 +346,10 @@ void DEVICE_CONTROLLER_SetInheritedRole(
|
||||
--- obuspa-10.0.4.0.orig/src/core/device.h
|
||||
+++ obuspa-10.0.4.0/src/core/device.h
|
||||
@@ -352,6 +352,10 @@ void DEVICE_CONTROLLER_SetInheritedRole(
|
||||
int DEVICE_CONTROLLER_CountEnabledWebsockClientConnections(void);
|
||||
#endif
|
||||
|
||||
@@ -13,10 +13,10 @@ Index: obuspa-10.0.0.2/src/core/device.h
|
||||
#ifndef REMOVE_USP_BROKER
|
||||
int DEVICE_SUBSCRIPTION_RouteNotification(Usp__Msg *usp, int instance, char *subscribed_path);
|
||||
bool DEVICE_SUBSCRIPTION_MarkVendorLayerSubs(int broker_instance, subs_notify_t notify_type, char *path, int group_id);
|
||||
Index: obuspa-10.0.0.2/src/core/device_controller.c
|
||||
Index: obuspa-10.0.4.0/src/core/device_controller.c
|
||||
===================================================================
|
||||
--- obuspa-10.0.0.2.orig/src/core/device_controller.c
|
||||
+++ obuspa-10.0.0.2/src/core/device_controller.c
|
||||
--- obuspa-10.0.4.0.orig/src/core/device_controller.c
|
||||
+++ obuspa-10.0.4.0/src/core/device_controller.c
|
||||
@@ -968,6 +968,78 @@ int DEVICE_CONTROLLER_QueueBinaryMessage
|
||||
return USP_ERR_OK;
|
||||
}
|
||||
@@ -96,10 +96,10 @@ Index: obuspa-10.0.0.2/src/core/device_controller.c
|
||||
/*********************************************************************//**
|
||||
**
|
||||
** DEVICE_CONTROLLER_IsMTPConfigured
|
||||
Index: obuspa-10.0.0.2/src/core/msg_handler.c
|
||||
Index: obuspa-10.0.4.0/src/core/msg_handler.c
|
||||
===================================================================
|
||||
--- obuspa-10.0.0.2.orig/src/core/msg_handler.c
|
||||
+++ obuspa-10.0.0.2/src/core/msg_handler.c
|
||||
--- obuspa-10.0.4.0.orig/src/core/msg_handler.c
|
||||
+++ obuspa-10.0.4.0/src/core/msg_handler.c
|
||||
@@ -1220,6 +1220,15 @@ int ValidateUspRecord(UspRecord__Record
|
||||
usp_service_instance = USP_BROKER_GetUspServiceInstance(rec->from_id, 0);
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
if PACKAGE_sshmngr
|
||||
choice
|
||||
prompt "Select backend for SSH management"
|
||||
default SSHMNGR_BACKEND_OPENSSH
|
||||
default SSHMNGR_BACKEND_OPENSSH_PAM
|
||||
depends on PACKAGE_sshmngr
|
||||
help
|
||||
Select which backend daemon to use for SSH
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=sulu-builder
|
||||
PKG_VERSION:=5.0.4
|
||||
PKG_VERSION:=5.0.5
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
@@ -28,7 +28,7 @@ define Package/sulu/default
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=SULU
|
||||
TITLE:=SULU-CE
|
||||
DEPENDS:=+mosquitto-auth-shadow +usermngr +jq +userinterface +obuspa +qrencode
|
||||
DEPENDS:=+mosquitto-auth-shadow +usermngr +jq +userinterface +obuspa
|
||||
EXTRA_DEPENDS:=nginx
|
||||
endef
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@ start_service() {
|
||||
log "Reloading related services"
|
||||
/etc/sulu/sulu.sh -r
|
||||
fi
|
||||
/etc/sulu/sulu.sh -q
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
|
||||
@@ -215,54 +215,6 @@ function update_obuspa_config() {
|
||||
fi
|
||||
}
|
||||
|
||||
generate_qr_code() {
|
||||
local NA="UNKNOWN"
|
||||
local TMP="/tmp/wifi_qr.svg"
|
||||
local QR="/sulu/assets/QR.svg"
|
||||
local SSID=""
|
||||
local KEY=""
|
||||
which qrencode || return
|
||||
local PASS="$(get_user_password)"
|
||||
if [ -z "$PASS" ]; then
|
||||
PASS="$NA"
|
||||
fi
|
||||
get_ssid_and_key() {
|
||||
local sec="$1"
|
||||
local filter_vid="$2"
|
||||
if [ "$SSID" != "" ]; then
|
||||
return
|
||||
fi
|
||||
config_get type "$sec" type
|
||||
if [ "$type" != "fronthaul" ]; then
|
||||
return
|
||||
fi
|
||||
if [ "$filter_vid" = "1" ]; then
|
||||
config_get vid "$sec" vid
|
||||
if [ "$vid" != "1" ]; then
|
||||
return
|
||||
fi
|
||||
fi
|
||||
config_get ssid "$sec" ssid
|
||||
config_get key "$sec" key
|
||||
SSID="$ssid"
|
||||
KEY="$key"
|
||||
}
|
||||
config_load mapcontroller
|
||||
config_foreach get_ssid_and_key "ap" "0"
|
||||
if [ "$SSID" == "" ]; then
|
||||
config_foreach get_ssid_and_key "ap" "1"
|
||||
fi
|
||||
SSID=${SSID:-$NA}
|
||||
KEY=${KEY:-$NA}
|
||||
PASS=${PASS:-$NA}
|
||||
qrencode -t svg -m 0 -o "$TMP" "WIFI:S:$SSID;T:WPA;P:$KEY;;GNX:U:user;Q:$PASS;;"
|
||||
if [ "$(sha256sum "$TMP" | cut -d ' ' -f1)" != "$(sha256sum "$QR" | cut -d ' ' -f1)" ]; then
|
||||
mv "$TMP" "$QR"
|
||||
else
|
||||
rm "$TMP"
|
||||
fi
|
||||
}
|
||||
|
||||
function configure_sulu() {
|
||||
_create_mosquitto_acl
|
||||
update_obuspa_config
|
||||
@@ -274,10 +226,6 @@ while getopts ":rq" opt; do
|
||||
r)
|
||||
_RESTART_SERVICES="1"
|
||||
;;
|
||||
q)
|
||||
generate_qr_code
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
slog "Invalid option: ${OPTARG}"
|
||||
exit 1
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=timemngr
|
||||
PKG_VERSION:=1.1.9
|
||||
PKG_VERSION:=1.1.11
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/timemngr.git
|
||||
PKG_SOURCE_VERSION:=c0c15beee2b60925f51b8ba78be516d2f5536c65
|
||||
PKG_SOURCE_VERSION:=af7ae9ba1f88321294c35ef7afa5a64fa3b459fa
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
@@ -81,6 +81,7 @@ endif
|
||||
$(INSTALL_DATA) ./files/etc/config/time $(1)/etc/config/
|
||||
ifeq ($(CONFIG_TIMEMNGR_NTPD),y)
|
||||
$(CP) ./files/etc/timemngr/ntpd_config.sh $(1)/etc/timemngr/time.sh
|
||||
$(CP) ./files/etc/timemngr/generate_supported_zones.sh $(1)/etc/timemngr/generate_supported_zones.sh
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
@@ -2,3 +2,4 @@ config global 'global'
|
||||
option enable '1'
|
||||
option dst '1'
|
||||
option loglevel '2'
|
||||
option supported_zones_file '/etc/timemngr/supported_zones.json'
|
||||
|
||||
@@ -4,10 +4,13 @@ START=20
|
||||
STOP=01
|
||||
|
||||
. /etc/timemngr/time.sh
|
||||
. /etc/timemngr/generate_supported_zones.sh
|
||||
|
||||
USE_PROCD=1
|
||||
PROG_UBUS=/usr/sbin/timemngr
|
||||
|
||||
DEFAULT_SUPPORTED_ZONES_PATH="/etc/timemngr/supported_zones.json"
|
||||
|
||||
log() {
|
||||
echo "${@}"|logger -t timemngr.init -p info
|
||||
}
|
||||
@@ -30,6 +33,20 @@ boot() {
|
||||
else
|
||||
sed -i '/#timemngr-dst/d' /etc/crontabs/root
|
||||
fi
|
||||
|
||||
config_get file_path global supported_zones_file
|
||||
|
||||
# If option is not configured, use the default path
|
||||
if [ -z "${file_path}" ]; then
|
||||
file_path="${DEFAULT_SUPPORTED_ZONES_PATH}"
|
||||
uci -q set time.global.supported_time_zone_file="${DEFAULT_SUPPORTED_ZONES_PATH}"
|
||||
uci -q commit time
|
||||
fi
|
||||
|
||||
# If the JSON file doesn't exist, generate it
|
||||
if [ ! -f "${file_path}" ]; then
|
||||
generate_supported_zones > "${file_path}"
|
||||
fi
|
||||
|
||||
start
|
||||
}
|
||||
|
||||
75
timemngr/files/etc/timemngr/generate_supported_zones.sh
Executable file
75
timemngr/files/etc/timemngr/generate_supported_zones.sh
Executable file
@@ -0,0 +1,75 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /usr/share/libubox/jshn.sh
|
||||
|
||||
# Default temporary file for timezone mapping
|
||||
TMP_MAP="/tmp/timezone_map.txt"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Function: generate_supported_zones
|
||||
# Description: Generates a JSON array of supported zones in the format:
|
||||
# [
|
||||
# { "time_zone": "TZ_STRING", "zone_name": "Region/City,Region/City" },
|
||||
# ...
|
||||
# ]
|
||||
# Output: Prints the JSON to stdout (caller can redirect to a file)
|
||||
# -----------------------------------------------------------------------------
|
||||
generate_supported_zones() {
|
||||
: > "$TMP_MAP"
|
||||
|
||||
# Step 1: Collect zonename -> timezone mappings into TMP_MAP
|
||||
for entry in /usr/share/zoneinfo/*; do
|
||||
[ -d "$entry" ] || continue
|
||||
region=$(basename "$entry")
|
||||
|
||||
for zonefile in "$entry"/*; do
|
||||
[ -f "$zonefile" ] || continue
|
||||
city=$(basename "$zonefile")
|
||||
zonename="${region}/${city}"
|
||||
|
||||
tz_string=$(tail -n 1 "$zonefile" 2>/dev/null)
|
||||
[ -n "$tz_string" ] && echo "$tz_string|$zonename" >> "$TMP_MAP"
|
||||
done
|
||||
done
|
||||
|
||||
# Step 2: Group zone names by tz_string and format to intermediate file
|
||||
TMP_LINES="/tmp/timezone_lines.txt"
|
||||
awk -F'|' '
|
||||
{
|
||||
tz = $1
|
||||
zn = $2
|
||||
if (tz in tzmap) {
|
||||
tzmap[tz] = tzmap[tz] "," zn
|
||||
} else {
|
||||
tzmap[tz] = zn
|
||||
}
|
||||
}
|
||||
END {
|
||||
for (tz in tzmap) {
|
||||
printf("TZSEP%sSEPZN%s\n", tz, tzmap[tz])
|
||||
}
|
||||
}
|
||||
' "$TMP_MAP" > "$TMP_LINES"
|
||||
|
||||
# Step 3: Convert the grouped result to JSON output
|
||||
json_init
|
||||
json_add_array "supported_zones"
|
||||
|
||||
while IFS= read -r line; do
|
||||
timezone=$(echo "$line" | sed -n 's/^TZSEP\(.*\)SEPZN.*/\1/p')
|
||||
zonenames=$(echo "$line" | sed -n 's/^TZSEP.*SEPZN\(.*\)/\1/p')
|
||||
[ -n "$timezone" ] || continue
|
||||
|
||||
json_add_object ""
|
||||
json_add_string "time_zone" "$timezone"
|
||||
json_add_string "zone_name" "$zonenames"
|
||||
json_close_object
|
||||
done < "$TMP_LINES"
|
||||
|
||||
json_close_array
|
||||
json_dump
|
||||
|
||||
# Cleanup
|
||||
rm -f "$TMP_MAP" "$TMP_LINES"
|
||||
}
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=tr143
|
||||
PKG_VERSION:=1.1.3
|
||||
PKG_VERSION:=1.1.4
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/tr143d.git
|
||||
PKG_SOURCE_VERSION:=33ad5cb86a09800510eb7faefc3edf30b56be41a
|
||||
PKG_SOURCE_VERSION:=eb931f20de5c3da4aad46530e38ed54e0820b8e7
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
@@ -28,9 +28,11 @@ define Package/usermngr
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=TRx69
|
||||
DEPENDS:= +shadow-utils +libopenssl +libuci +libubox +ubus
|
||||
DEPENDS:=+shadow-utils +libopenssl +libuci +libubox +ubus
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +bbfdmd
|
||||
DEPENDS+=+@BUSYBOX_CONFIG_ADDUSER +@BUSYBOX_CONFIG_DELUSER +@BUSYBOX_CONFIG_ADDGROUP +@BUSYBOX_CONFIG_DELGROUP +shadow-usermod
|
||||
DEPENDS+=+linux-pam
|
||||
DEPENDS+=+passwdqc
|
||||
TITLE:=Package to add Device.Users. datamodel support
|
||||
endef
|
||||
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=wifidmd
|
||||
PKG_VERSION:=1.1.33
|
||||
PKG_VERSION:=1.1.38
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/wifidmd.git
|
||||
PKG_SOURCE_VERSION:=dc65d6ec9082f836e499b29e09bacff3c608f3d0
|
||||
PKG_SOURCE_VERSION:=84fe14515d09380a45d75acf22329a13b9fed312
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=wifimngr
|
||||
PKG_VERSION:=17.7.5
|
||||
PKG_VERSION:=17.7.6
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=e9b13032b3574bbd341fa653276a65c9975bb5a5
|
||||
PKG_SOURCE_VERSION:=a441a9ece6cd279013cb52ce1c6cfb79b72d53f3
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/hal/wifimngr.git
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@genexis.eu>
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=xmppc
|
||||
PKG_VERSION:=2.2.13
|
||||
PKG_VERSION:=2.2.14
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/xmppc.git
|
||||
PKG_SOURCE_VERSION:=5dc59fec17f9259ce40959b3fc0fc344322d5435
|
||||
PKG_SOURCE_VERSION:=8d2999134683153c0971791230373afabe204afe
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user