Merge branch 'openwrt:master' into master
This commit is contained in:
commit
04f129d4fb
19 changed files with 648 additions and 81 deletions
|
@ -8,12 +8,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=node
|
PKG_NAME:=node
|
||||||
PKG_VERSION:=v18.17.0
|
PKG_VERSION:=v18.17.1
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||||
PKG_SOURCE_URL:=https://nodejs.org/dist/$(PKG_VERSION)
|
PKG_SOURCE_URL:=https://nodejs.org/dist/$(PKG_VERSION)
|
||||||
PKG_HASH:=80c0faadf5ea39c213ccb9aa5c2432977a0f1b5a0b766852abd0de06f2770406
|
PKG_HASH:=f215cf03d0f00f07ac0b674c6819f804c1542e16f152da04980022aeccf5e65a
|
||||||
|
|
||||||
PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>, Adrian Panella <ianchi74@outlook.com>
|
PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>, Adrian Panella <ianchi74@outlook.com>
|
||||||
PKG_LICENSE:=MIT
|
PKG_LICENSE:=MIT
|
||||||
|
|
|
@ -5,14 +5,15 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=python-influxdb
|
PKG_NAME:=python-influxdb
|
||||||
PKG_VERSION:=5.3.0
|
PKG_VERSION:=5.3.1
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
|
PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
|
||||||
|
|
||||||
PYPI_NAME:=influxdb
|
PYPI_NAME:=influxdb
|
||||||
PKG_HASH:=9bcaafd57ac152b9824ab12ed19f204206ef5df8af68404770554c5b55b475f6
|
PKG_HASH:=46f85e7b04ee4b3dee894672be6a295c94709003a7ddea8820deec2ac4d8b27a
|
||||||
|
|
||||||
PKG_LICENSE:=MIT
|
PKG_LICENSE:=MIT
|
||||||
|
PKG_LICENSE_FILES:=LICENSE
|
||||||
|
|
||||||
include ../pypi.mk
|
include ../pypi.mk
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
@ -23,8 +24,9 @@ define Package/python3-influxdb
|
||||||
CATEGORY:=Languages
|
CATEGORY:=Languages
|
||||||
SUBMENU:=Python
|
SUBMENU:=Python
|
||||||
URL:=https://github.com/influxdb/influxdb-python
|
URL:=https://github.com/influxdb/influxdb-python
|
||||||
TITLE:=python3-influxdb
|
TITLE:=InfluxDB client
|
||||||
DEPENDS:=\
|
DEPENDS:=\
|
||||||
|
+python3-light \
|
||||||
+python3-requests \
|
+python3-requests \
|
||||||
+python3-pytz \
|
+python3-pytz \
|
||||||
+python3-six \
|
+python3-six \
|
||||||
|
|
|
@ -8,17 +8,17 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=python-iniconfig
|
PKG_NAME:=python-iniconfig
|
||||||
PKG_VERSION:=1.1.1
|
PKG_VERSION:=2.0.0
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PYPI_NAME:=iniconfig
|
PYPI_NAME:=iniconfig
|
||||||
PKG_HASH:=bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32
|
PKG_HASH:=2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3
|
||||||
|
|
||||||
PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
|
PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
|
||||||
PKG_LICENSE:=MIT
|
PKG_LICENSE:=MIT
|
||||||
PKG_LICENSE_FILES:=LICENSE
|
PKG_LICENSE_FILES:=LICENSE
|
||||||
|
|
||||||
PKG_BUILD_DEPENDS:=python-setuptools-scm/host
|
PKG_BUILD_DEPENDS:=python-hatchling/host python-hatch-vcs/host
|
||||||
|
|
||||||
include ../pypi.mk
|
include ../pypi.mk
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
@ -29,7 +29,7 @@ define Package/python3-iniconfig
|
||||||
SECTION:=lang
|
SECTION:=lang
|
||||||
CATEGORY:=Languages
|
CATEGORY:=Languages
|
||||||
TITLE:=Simple config-ini parser
|
TITLE:=Simple config-ini parser
|
||||||
URL:=https://github.com/RonnyPfannschmidt/iniconfig
|
URL:=https://github.com/pytest-dev/iniconfig
|
||||||
DEPENDS:= +python3-light
|
DEPENDS:= +python3-light
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,11 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=python-intelhex
|
PKG_NAME:=python-intelhex
|
||||||
PKG_VERSION:=2.2.1
|
PKG_VERSION:=2.3.0
|
||||||
PKG_RELEASE:=4
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PYPI_NAME:=IntelHex
|
PYPI_NAME:=intelhex
|
||||||
PYPI_SOURCE_NAME:=intelhex
|
PKG_HASH:=892b7361a719f4945237da8ccf754e9513db32f5628852785aea108dcd250093
|
||||||
PKG_HASH:=009d8511e0d50639230c39af9607deee771cf026f67ef7507a8c3fd4fa927832
|
|
||||||
|
|
||||||
PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
|
PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
|
||||||
PKG_LICENSE:=BSD-3-Clause
|
PKG_LICENSE:=BSD-3-Clause
|
||||||
|
@ -24,8 +23,8 @@ define Package/python3-intelhex
|
||||||
SECTION:=lang
|
SECTION:=lang
|
||||||
CATEGORY:=Languages
|
CATEGORY:=Languages
|
||||||
SUBMENU:=Python
|
SUBMENU:=Python
|
||||||
TITLE:=python3-intelhex
|
TITLE:=Intel HEX files manipulations
|
||||||
URL:=https://github.com/bialix/intelhex
|
URL:=https://github.com/python-intelhex/intelhex
|
||||||
DEPENDS:=+python3-light
|
DEPENDS:=+python3-light
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
From 4125dce5b174401d38cc0fcf9d2e1aad07997f5e Mon Sep 17 00:00:00 2001
|
|
||||||
From: fernandez85 <fernandez2005@gmail.com>
|
|
||||||
Date: Sun, 11 Oct 2020 12:39:06 +0200
|
|
||||||
Subject: [PATCH] Fix Python 3.9 compatibility issue with 'array' module
|
|
||||||
|
|
||||||
---
|
|
||||||
intelhex/compat.py | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
--- a/intelhex/compat.py
|
|
||||||
+++ b/intelhex/compat.py
|
|
||||||
@@ -57,7 +57,8 @@ if sys.version_info[0] >= 3:
|
|
||||||
return s
|
|
||||||
return s.decode('latin1')
|
|
||||||
|
|
||||||
- array_tobytes = getattr(array.array, "tobytes", array.array.tostring)
|
|
||||||
+ # for python >= 3.2 use 'tobytes', otherwise 'tostring'
|
|
||||||
+ array_tobytes = array.array.tobytes if sys.version_info[1] >= 2 else array.array.tostring
|
|
||||||
|
|
||||||
IntTypes = (int,)
|
|
||||||
StrType = str
|
|
|
@ -1,14 +1,15 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=jmespath
|
PKG_NAME:=python-jmespath
|
||||||
PKG_VERSION:=0.9.3
|
PKG_VERSION:=1.0.1
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PYPI_NAME:=$(PKG_NAME)
|
PYPI_NAME:=jmespath
|
||||||
PKG_HASH:=6a81d4c9aa62caf061cb517b4d9ad1dd300374cd4706997aff9cd6aedd61fc64
|
PKG_HASH:=90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe
|
||||||
|
|
||||||
PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
|
PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
|
||||||
PKG_LICENSE:=MIT
|
PKG_LICENSE:=MIT
|
||||||
|
PKG_LICENSE_FILES:=LICENSE.txt
|
||||||
|
|
||||||
include ../pypi.mk
|
include ../pypi.mk
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
@ -18,14 +19,14 @@ define Package/python3-jmespath
|
||||||
SUBMENU:=Python
|
SUBMENU:=Python
|
||||||
SECTION:=lang
|
SECTION:=lang
|
||||||
CATEGORY:=Languages
|
CATEGORY:=Languages
|
||||||
TITLE:=jmespath
|
TITLE:=JSON Matching Expressions
|
||||||
URL:=https://github.com/jmespath/jmespath.py
|
URL:=https://github.com/jmespath/jmespath.py
|
||||||
DEPENDS:=+python3
|
DEPENDS:=+python3-light
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/python3-jmespath/description
|
define Package/python3-jmespath/description
|
||||||
JMESPath (pronounced “james path”) allows you to declaratively specify how to extract
|
JMESPath (pronounced “james path”) allows you to declaratively specify
|
||||||
elements from a JSON document.
|
how to extract elements from a JSON document.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call Py3Package,python3-jmespath))
|
$(eval $(call Py3Package,python3-jmespath))
|
||||||
|
|
|
@ -5,12 +5,15 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=python-jsonpath-ng
|
PKG_NAME:=python-jsonpath-ng
|
||||||
PKG_VERSION:=1.5.2
|
PKG_VERSION:=1.5.3
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
|
PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
|
||||||
|
|
||||||
PYPI_NAME:=jsonpath-ng
|
PYPI_NAME:=jsonpath-ng
|
||||||
PKG_HASH:=144d91379be14d9019f51973bd647719c877bfc07dc6f3f5068895765950c69d
|
PKG_HASH:=a273b182a82c1256daab86a313b937059261b5c5f8c4fa3fc38b882b344dd567
|
||||||
|
|
||||||
|
PKG_LICENSE:=Apache-2.0
|
||||||
|
PKG_LICENSE_FILES:=LICENSE
|
||||||
|
|
||||||
include ../pypi.mk
|
include ../pypi.mk
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
@ -21,8 +24,23 @@ define Package/python3-jsonpath-ng
|
||||||
CATEGORY:=Languages
|
CATEGORY:=Languages
|
||||||
SUBMENU:=Python
|
SUBMENU:=Python
|
||||||
URL:=https://github.com/h2non/jsonpath-ng
|
URL:=https://github.com/h2non/jsonpath-ng
|
||||||
TITLE:=python3-jsonpath-ng
|
TITLE:=Standard compliant implementation of JSONPath
|
||||||
DEPENDS:=+python3-ply +python3-six +python3-decorator
|
DEPENDS:= \
|
||||||
|
+python3-light \
|
||||||
|
+python3-logging \
|
||||||
|
+python3-ply \
|
||||||
|
+python3-six \
|
||||||
|
+python3-decorator
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/python3-jsonpath-ng/description
|
||||||
|
A final implementation of JSONPath for Python that aims to be standard
|
||||||
|
compliant, including arithmetic and binary comparison operators, as
|
||||||
|
defined in the original JSONPath proposal.
|
||||||
|
|
||||||
|
This packages merges both jsonpath-rw and jsonpath-rw-ext and provides
|
||||||
|
several AST API enhancements, such as the ability to update or removes
|
||||||
|
nodes in the tree.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call Py3Package,python3-jsonpath-ng))
|
$(eval $(call Py3Package,python3-jsonpath-ng))
|
||||||
|
|
|
@ -7,12 +7,12 @@
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=multidict
|
PKG_NAME:=python-multidict
|
||||||
PKG_VERSION:=4.5.2
|
PKG_VERSION:=6.0.4
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PYPI_NAME:=$(PKG_NAME)
|
PYPI_NAME:=multidict
|
||||||
PKG_HASH:=024b8129695a952ebd93373e45b5d341dbb87c17ce49637b34000093f243dd4f
|
PKG_HASH:=3666906492efb76453c0e7b97f2cf459b0682e7402c0489a95484965dbc1da49
|
||||||
|
|
||||||
PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
|
PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
|
||||||
PKG_LICENSE:=Apache-2.0
|
PKG_LICENSE:=Apache-2.0
|
||||||
|
@ -28,13 +28,12 @@ define Package/python3-multidict
|
||||||
SUBMENU:=Python
|
SUBMENU:=Python
|
||||||
TITLE:=multidict implementation
|
TITLE:=multidict implementation
|
||||||
URL:=https://github.com/aio-libs/multidict
|
URL:=https://github.com/aio-libs/multidict
|
||||||
DEPENDS:= \
|
DEPENDS:=+python3-light
|
||||||
+python3-light \
|
|
||||||
+python3-attrs
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/python3-multidict/description
|
define Package/python3-multidict/description
|
||||||
Multidict is dict-like collection of key-value pairs where key might be occurred more than once in the container.
|
Multidict is dict-like collection of key-value pairs where key might be
|
||||||
|
occurred more than once in the container.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call Py3Package,python3-multidict))
|
$(eval $(call Py3Package,python3-multidict))
|
||||||
|
|
|
@ -8,11 +8,11 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=python-netdisco
|
PKG_NAME:=python-netdisco
|
||||||
PKG_VERSION:=2.6.0
|
PKG_VERSION:=3.0.0
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PYPI_NAME:=netdisco
|
PYPI_NAME:=netdisco
|
||||||
PKG_HASH:=2b3aca14a1807712a053f11fd80dc251dd821ee4899aefece515287981817762
|
PKG_HASH:=4dbb590482f377ccc461e01742707ccbe8f1d2d1b28578af91dc9b7febcdcbd2
|
||||||
|
|
||||||
PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
|
PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
|
||||||
PKG_LICENSE:=Apache-2.0
|
PKG_LICENSE:=Apache-2.0
|
||||||
|
@ -30,13 +30,17 @@ define Package/python3-netdisco
|
||||||
URL:=https://github.com/home-assistant/netdisco
|
URL:=https://github.com/home-assistant/netdisco
|
||||||
DEPENDS:= \
|
DEPENDS:= \
|
||||||
+python3-light \
|
+python3-light \
|
||||||
|
+python3-logging \
|
||||||
|
+python3-urllib \
|
||||||
|
+python3-xml \
|
||||||
+python3-requests \
|
+python3-requests \
|
||||||
+python3-zeroconf
|
+python3-zeroconf
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/python3-netdisco/description
|
define Package/python3-netdisco/description
|
||||||
NetDisco is a Python 3 library to discover local devices and services.
|
NetDisco is a Python 3 library to discover local devices and services.
|
||||||
It allows to scan on demand or offer a service that will scan the network in the background in a set interval.
|
It allows to scan on demand or offer a service that will scan the
|
||||||
|
network in the background in a set interval.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call Py3Package,python3-netdisco))
|
$(eval $(call Py3Package,python3-netdisco))
|
||||||
|
|
|
@ -8,12 +8,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=chrony
|
PKG_NAME:=chrony
|
||||||
PKG_VERSION:=4.3
|
PKG_VERSION:=4.4
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://download.tuxfamily.org/chrony/
|
PKG_SOURCE_URL:=https://chrony-project.org/releases/
|
||||||
PKG_HASH:=9d0da889a865f089a5a21610ffb6713e3c9438ce303a63b49c2fb6eaff5b8804
|
PKG_HASH:=eafb07e6daf92b142200f478856dfed6efc9ea2d146eeded5edcb09b93127088
|
||||||
|
|
||||||
PKG_MAINTAINER:=Miroslav Lichvar <mlichvar0@gmail.com>
|
PKG_MAINTAINER:=Miroslav Lichvar <mlichvar0@gmail.com>
|
||||||
PKG_LICENSE:=GPL-2.0
|
PKG_LICENSE:=GPL-2.0
|
||||||
|
|
|
@ -10,12 +10,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=haproxy
|
PKG_NAME:=haproxy
|
||||||
PKG_VERSION:=2.8.1
|
PKG_VERSION:=2.8.2
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://www.haproxy.org/download/2.8/src
|
PKG_SOURCE_URL:=https://www.haproxy.org/download/2.8/src
|
||||||
PKG_HASH:=485552fcd9d5d5f41aad046f131fc0a7e849bef25a349a040750af0c6fc56807
|
PKG_HASH:=698d6906d170946a869769964e57816ba3da3adf61ff75e89972b137f4658db0
|
||||||
|
|
||||||
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>, \
|
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>, \
|
||||||
Christian Lachner <gladiac@gmail.com>
|
Christian Lachner <gladiac@gmail.com>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
CLONEURL=https://git.haproxy.org/git/haproxy-2.8.git
|
CLONEURL=https://git.haproxy.org/git/haproxy-2.8.git
|
||||||
BASE_TAG=v2.8.1
|
BASE_TAG=v2.8.2
|
||||||
TMP_REPODIR=tmprepo
|
TMP_REPODIR=tmprepo
|
||||||
PATCHESDIR=patches
|
PATCHESDIR=patches
|
||||||
|
|
||||||
|
|
|
@ -8,13 +8,13 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=openssh
|
PKG_NAME:=openssh
|
||||||
PKG_VERSION:=9.3p2
|
PKG_VERSION:=9.4p1
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \
|
PKG_SOURCE_URL:=https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \
|
||||||
https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/
|
https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/
|
||||||
PKG_HASH:=200ebe147f6cb3f101fd0cdf9e02442af7ddca298dffd9f456878e7ccac676e8
|
PKG_HASH:=3608fd9088db2163ceb3e600c85ab79d0de3d221e59192ea1923e23263866a85
|
||||||
|
|
||||||
PKG_LICENSE:=BSD ISC
|
PKG_LICENSE:=BSD ISC
|
||||||
PKG_LICENSE_FILES:=LICENCE
|
PKG_LICENSE_FILES:=LICENCE
|
||||||
|
|
107
net/openthread-br/Makefile
Normal file
107
net/openthread-br/Makefile
Normal file
|
@ -0,0 +1,107 @@
|
||||||
|
# SPDX-FileCopyrightText: 2022-2023 Stijn Tintel <stijn@linux-ipv6.be>
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=openthread-br
|
||||||
|
PKG_SOURCE_DATE:=2023-08-01
|
||||||
|
PKG_SOURCE_VERSION:=1738d8cd8b42106c2ef1262fbbac2f06beab83ba
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE_PROTO:=git
|
||||||
|
PKG_SOURCE_URL=https://github.com/openthread/ot-br-posix.git
|
||||||
|
PKG_MIRROR_HASH:=7eb740d1a0663aae7969940f8a8b06879524dd62ae7842f46a160cae54ee8417
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=Stijn Tintel <stijn@linux-ipv6.be>
|
||||||
|
PKG_LICENSE:=BSD-3-Clause
|
||||||
|
PKG_LICENSE_FILES:=LICENSE
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
include $(INCLUDE_DIR)/cmake.mk
|
||||||
|
|
||||||
|
define Package/luci-app-openthread
|
||||||
|
CATEGORY:=LuCI
|
||||||
|
SECTION:=luci
|
||||||
|
SUBMENU:=3. Applications
|
||||||
|
TITLE:=LuCI Support for OpenThread Border Router
|
||||||
|
DEPENDS:=+luci-base
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/openthread-br
|
||||||
|
CATEGORY:=Network
|
||||||
|
SECTION:=net
|
||||||
|
TITLE:=OpenThread Border Router
|
||||||
|
DEPENDS:= \
|
||||||
|
+libblobmsg-json \
|
||||||
|
+libjson-c \
|
||||||
|
+libncurses \
|
||||||
|
+libnetfilter-queue \
|
||||||
|
+libreadline \
|
||||||
|
+libstdcpp \
|
||||||
|
+libubox \
|
||||||
|
+libubus \
|
||||||
|
+mdnsd \
|
||||||
|
+mdnsresponder
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/openthread-br/description
|
||||||
|
A Thread border router for POSIX-based platforms.
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/openthread-br/conffiles
|
||||||
|
/var/lib/thread
|
||||||
|
endef
|
||||||
|
|
||||||
|
CMAKE_OPTIONS += \
|
||||||
|
-DOT_BORDER_ROUTER:BOOL=ON \
|
||||||
|
-DOT_BORDER_ROUTING_NAT64:BOOL=ON \
|
||||||
|
-DOT_CHANNEL_MANAGER:BOOL=ON \
|
||||||
|
-DOT_CHANNEL_MONITOR:BOOL=ON \
|
||||||
|
-DOT_COMMISSIONER:BOOL=ON \
|
||||||
|
-DOT_ECDSA:BOOL=ON \
|
||||||
|
-DOT_FIREWALL:BOOL=OFF \
|
||||||
|
-DOT_SERVICE:BOOL=ON \
|
||||||
|
-DOT_SRP_CLIENT:BOOL=ON \
|
||||||
|
-DOT_SRP_SERVER:BOOL=ON \
|
||||||
|
-DOTBR_BACKBONE_ROUTER:BOOL=ON \
|
||||||
|
-DOTBR_BORDER_ROUTING:BOOL=ON \
|
||||||
|
-DOTBR_DNSSD_DISCOVERY_PROXY:BOOL=ON \
|
||||||
|
-DOTBR_DUA_ROUTING:BOOL=ON \
|
||||||
|
-DOTBR_MDNS=mDNSResponder \
|
||||||
|
-DOTBR_OPENWRT:BOOL=ON \
|
||||||
|
-DOTBR_REST:BOOL=ON \
|
||||||
|
-DOTBR_SRP_ADVERTISING_PROXY:BOOL=ON \
|
||||||
|
-DOTBR_SRP_SERVER_AUTO_ENABLE:BOOL=ON \
|
||||||
|
-DOTBR_TREL:BOOL=ON
|
||||||
|
|
||||||
|
TARGET_CFLAGS += -DOPENTHREAD_POSIX_CONFIG_DAEMON_SOCKET_BASENAME=\\\"/var/run/openthread-%s\\\"
|
||||||
|
|
||||||
|
define Package/luci-app-openthread/install
|
||||||
|
$(INSTALL_DIR) \
|
||||||
|
$(1)/usr/lib/lua/luci/controller/admin \
|
||||||
|
$(1)/usr/lib/lua/luci/view/admin_thread \
|
||||||
|
$(1)/www/luci-static/resources
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/src/openwrt/controller/thread.lua \
|
||||||
|
$(1)/usr/lib/lua/luci/controller/admin
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/src/openwrt/view/admin_thread/* \
|
||||||
|
$(1)/usr/lib/lua/luci/view/admin_thread
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/src/openwrt/handle_error.js \
|
||||||
|
$(1)/www/luci-static/resources
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/openthread-br/install
|
||||||
|
$(INSTALL_DIR) \
|
||||||
|
$(1)/etc/init.d \
|
||||||
|
$(1)/lib/netifd/proto \
|
||||||
|
$(1)/usr/sbin \
|
||||||
|
$(1)/var/lib/thread
|
||||||
|
$(INSTALL_BIN) ./files/openthread-proto.sh $(1)/lib/netifd/proto/openthread.sh
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin
|
||||||
|
endef
|
||||||
|
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,luci-app-openthread))
|
||||||
|
$(eval $(call BuildPackage,openthread-br))
|
222
net/openthread-br/README.md
Normal file
222
net/openthread-br/README.md
Normal file
|
@ -0,0 +1,222 @@
|
||||||
|
# OpenThread Border Router
|
||||||
|
|
||||||
|
This package contains the OpenThread Border Router.
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
To use this package, you need a Thread Radio Co-Processor (RCP). Testing of
|
||||||
|
this package was done with Nordic Semiconductor nRF52840 USB dongles.
|
||||||
|
|
||||||
|
Building and flashing the dongle with the Thread RCP firmware is out of scope
|
||||||
|
of this document.
|
||||||
|
|
||||||
|
One caveat for this dongle is worth mentioning here. The nRF52840 USB dongle
|
||||||
|
seems to come with the U2F bootloader. To get it in mass storage mode to copy a
|
||||||
|
firmware file, you need to plug it in while pressing the reset button. However,
|
||||||
|
after the initial flash with the ot-rcp firmware, this method stops working.
|
||||||
|
Instead, you need to double press the reset button after plugging in the dongle.
|
||||||
|
|
||||||
|
## Packaging decisions
|
||||||
|
|
||||||
|
### Configurable package build
|
||||||
|
|
||||||
|
OpenThread is complex software. Adding config options to change the build of
|
||||||
|
the package will likely result in more bug reports. As the package and its
|
||||||
|
dependencies are unlikely to fit in any router with small flash (16MB or less),
|
||||||
|
I don't see much point in making things configurable for reducing size either.
|
||||||
|
|
||||||
|
### Firewall support
|
||||||
|
|
||||||
|
OpenWrt uses firewall4 with nftables by default, but the OpenThread firewall
|
||||||
|
implementation uses IPTables and IPset. While we still support firewall3 with
|
||||||
|
IPTables, it's not a good idea to add new dependencies to old things.
|
||||||
|
Therefore, firewall support is disabled completely.
|
||||||
|
|
||||||
|
This can be revised once the following feature request is implemented:
|
||||||
|
https://github.com/openthread/ot-br-posix/issues/1675
|
||||||
|
|
||||||
|
### mDNSResponder
|
||||||
|
|
||||||
|
The package depends on mDNSResponder. The alternative, Avahi, depends on D-Bus,
|
||||||
|
which is not something I feel comfortable with running on any router. While
|
||||||
|
there are Avahi packages without D-Bus support, using OpenThread Border Router
|
||||||
|
with Avahi requires libavahi-client, and this requires Avahi to be built with
|
||||||
|
D-Bus support.
|
||||||
|
|
||||||
|
### REST Server
|
||||||
|
|
||||||
|
The REST server is enabled to make this package compatible with Home Assistant.
|
||||||
|
|
||||||
|
### TREL support
|
||||||
|
|
||||||
|
Thread Radio Encapsulation Link support is enabled, as it allows Border Routers
|
||||||
|
to communicate over other links (e.g. Ethernet), reducing traffic over the
|
||||||
|
802.15.4 radios.
|
||||||
|
|
||||||
|
The following Github discussion contains a good explanation of TREL:
|
||||||
|
https://github.com/openthread/openthread/discussions/8478
|
||||||
|
|
||||||
|
### UCI/netifd support
|
||||||
|
|
||||||
|
The package contains a minimal netifd protocol handler. This allows configuring
|
||||||
|
the Thread network in /etc/config/network. The agent will be started by netifd,
|
||||||
|
rather than using an init script.
|
||||||
|
|
||||||
|
OpenThread does not store prefix information in non-volatile storage. As a
|
||||||
|
result, every time the agent is restarted, a different prefix would be used.
|
||||||
|
This is not very nice, and makes it very difficult to run the OpenThread Border
|
||||||
|
Router on a device that is not your main router. Therefore, prefixes can be
|
||||||
|
configured in /etc/config/network. This way, you can add a static route to the
|
||||||
|
Thread prefix(es) in your main router, making it possible to access devices on
|
||||||
|
the Thread network from your entire network.
|
||||||
|
|
||||||
|
## Create network
|
||||||
|
|
||||||
|
When starting the OpenThread Border Router for the first time, a Thread network
|
||||||
|
must be created.
|
||||||
|
|
||||||
|
As the agent is started by netifd, we first need to create an interface in
|
||||||
|
/etc/config/network:
|
||||||
|
|
||||||
|
```
|
||||||
|
config interface 'thread'
|
||||||
|
option device 'wpan0'
|
||||||
|
option proto 'openthread'
|
||||||
|
option backbone_network 'lan'
|
||||||
|
option radio_url 'spinel+hdlc+uart:///dev/ttyACM0?uart-baudrate=460800'
|
||||||
|
list prefix 'fd6f:5772:5468:7200::/64 paros'
|
||||||
|
option verbose '0'
|
||||||
|
```
|
||||||
|
|
||||||
|
Prefix and verbose are optional. Everything else is required. The protocol
|
||||||
|
handler will fail if a required setting is missing. If something isn't working,
|
||||||
|
check ifstatus for the OpenThread interface:
|
||||||
|
|
||||||
|
```
|
||||||
|
# ifup thread
|
||||||
|
# ifstatus thread
|
||||||
|
{
|
||||||
|
"up": false,
|
||||||
|
"pending": false,
|
||||||
|
"available": true,
|
||||||
|
"autostart": false,
|
||||||
|
"dynamic": false,
|
||||||
|
"proto": "openthread",
|
||||||
|
"data": {
|
||||||
|
|
||||||
|
},
|
||||||
|
"errors": [
|
||||||
|
{
|
||||||
|
"subsystem": "openthread",
|
||||||
|
"code": "MISSING_BACKBONE_NETWORK"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
In the above example, the backbone_network option is missing.
|
||||||
|
|
||||||
|
The protocol handler will automatically start the the Thread network, so we
|
||||||
|
need to bring it down for the initial setup. This only needs to be done once.
|
||||||
|
|
||||||
|
```
|
||||||
|
ubus call otbr threadstop
|
||||||
|
```
|
||||||
|
|
||||||
|
### LuCI
|
||||||
|
|
||||||
|
Creating a network in LuCI appears to be broken for the moment.
|
||||||
|
|
||||||
|
### CLI
|
||||||
|
|
||||||
|
```
|
||||||
|
ot-ctl dataset init new
|
||||||
|
ot-ctl dataset panid 0x12ab
|
||||||
|
ot-ctl dataset extpanid 12ab12ab12ab12ab
|
||||||
|
ot-ctl dataset networkname OpenWrThread
|
||||||
|
ot-ctl dataset networkkey ddf429af1c52d1735ffaf36fae343ee8
|
||||||
|
ot-ctl dataset commit active
|
||||||
|
ot-ctl ifconfig up
|
||||||
|
ot-ctl thread start
|
||||||
|
ot-ctl netdata register
|
||||||
|
```
|
||||||
|
|
||||||
|
### Configure route
|
||||||
|
|
||||||
|
Before you can join a device to your new Thread network, you must add a route
|
||||||
|
to the Thread prefix on the commissioner device via the OpenWrt router running
|
||||||
|
the OpenThread Border Router.
|
||||||
|
|
||||||
|
Get the prefix:
|
||||||
|
```
|
||||||
|
ot-ctl prefix
|
||||||
|
```
|
||||||
|
|
||||||
|
Example output:
|
||||||
|
|
||||||
|
```
|
||||||
|
fd6b:a92f:c531:1::/64 paros low f000
|
||||||
|
Done
|
||||||
|
```
|
||||||
|
|
||||||
|
Configuring the route is out of scope of this document, but it must be done, or
|
||||||
|
joining Thread devices will fail.
|
||||||
|
|
||||||
|
### Get hex-encoded operational dataset TLV
|
||||||
|
|
||||||
|
This is needed to join devices to the Thread Network.
|
||||||
|
|
||||||
|
```
|
||||||
|
ot-ctl dataset active -x
|
||||||
|
```
|
||||||
|
|
||||||
|
Example output:
|
||||||
|
|
||||||
|
```
|
||||||
|
0e080000000000010000000300001035060004001fffe00708fd488c6a892ec30c04106e220c964a14a7e10e9004691920ec390c0402a0f7f80102ffff030b5468726541646c6576696f0208ffffffffffffffff0510ddf429af1c52d1735ffaf36fae343ee8
|
||||||
|
```
|
||||||
|
|
||||||
|
## Join another OpenThread Border Router
|
||||||
|
|
||||||
|
Simply configure the active dataset in /etc/config/network:
|
||||||
|
|
||||||
|
```
|
||||||
|
config interface 'thread'
|
||||||
|
option device 'wpan0'
|
||||||
|
option proto 'openthread'
|
||||||
|
option backbone_network 'lan'
|
||||||
|
option dataset '0e080000000000010000000300000f35060004001fffe0020836b86cd9746ab3080708fd9850cbe719b1d205101f11a11320828c7a6ebc2f2e675c0dca030e686f6d652d617373697374616e740102716f041025804ed78614258ebedf4e2db37b3b6e0c0402a0f7f8'
|
||||||
|
list prefix 'fd6f:5772:5468:7200::/64 paros'
|
||||||
|
option radio_url 'spinel+hdlc+uart:///dev/ttyACM0?uart-baudrate=460800'
|
||||||
|
option verbose '0'
|
||||||
|
```
|
||||||
|
|
||||||
|
Afterwards, bring up the interface:
|
||||||
|
|
||||||
|
```
|
||||||
|
ifup thread
|
||||||
|
```
|
||||||
|
|
||||||
|
## Join a Thread device via Matter
|
||||||
|
|
||||||
|
### ESP32
|
||||||
|
The following procedure has been tested with an ESP32-C6 using [the Matter
|
||||||
|
lighting-app example](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/esp32).
|
||||||
|
Building and flashing that app is out of scope of this document.
|
||||||
|
|
||||||
|
During startup, the lighting app will print the SetupQRCode to the serial
|
||||||
|
console:
|
||||||
|
|
||||||
|
```
|
||||||
|
I (1614) chip[SVR]: SetupQRCode: [MT:Y.K9042C00KA0648G00]
|
||||||
|
I (1624) chip[SVR]: Copy/paste the below URL in a browser to see the QR Code:
|
||||||
|
I (1634) chip[SVR]: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3AY.K9042C00KA0648G00
|
||||||
|
I (1644) chip[SVR]: Manual pairing code: [34970112332]
|
||||||
|
```
|
||||||
|
|
||||||
|
Decide on a node ID for the device.
|
||||||
|
|
||||||
|
```
|
||||||
|
./chip-tool pairing code-thread 0x65737933320000 hex:0e080000000000010000000300001035060004001fffe00708fd488c6a892ec30c04106e220c964a14a7e10e9004691920ec390c0402a0f7f80102ffff030b5468726541646c6576696f0208ffffffffffffffff0510ddf429af1c52d1735ffaf36fae343ee8 MT:Y.K9042C00KA0648G00 --paa-trust-store-path /path/to/connectedhomeip/credentials/test/attestation/
|
||||||
|
```
|
||||||
|
|
106
net/openthread-br/files/openthread-proto.sh
Normal file
106
net/openthread-br/files/openthread-proto.sh
Normal file
|
@ -0,0 +1,106 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 Stijn Tintel <stijn@linux-ipv6.be>
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
|
OTCTL="/usr/sbin/ot-ctl"
|
||||||
|
PROG="/usr/sbin/otbr-agent"
|
||||||
|
|
||||||
|
[ -x "$PROG" ] || exit 0
|
||||||
|
|
||||||
|
[ -n "$INCLUDE_ONLY" ] || {
|
||||||
|
. /lib/functions.sh
|
||||||
|
. /lib/functions/network.sh
|
||||||
|
. ../netifd-proto.sh
|
||||||
|
init_proto "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
proto_openthread_add_prefix() {
|
||||||
|
prefix="$1"
|
||||||
|
# shellcheck disable=SC2086
|
||||||
|
[ -n "$prefix" ] && $OTCTL prefix add $prefix
|
||||||
|
}
|
||||||
|
|
||||||
|
proto_openthread_check_service() {
|
||||||
|
service="$1"
|
||||||
|
ret=1
|
||||||
|
json_init
|
||||||
|
json_add_string name "$service"
|
||||||
|
ubus call service list "$(json_dump)" | jsonfilter -e '@[*].instances[*]["running"]' > /dev/null
|
||||||
|
ret=$?
|
||||||
|
json_cleanup
|
||||||
|
|
||||||
|
return "$ret"
|
||||||
|
}
|
||||||
|
|
||||||
|
proto_openthread_init_config() {
|
||||||
|
proto_config_add_array 'prefix:list(string)'
|
||||||
|
proto_config_add_boolean verbose
|
||||||
|
proto_config_add_string backbone_network
|
||||||
|
proto_config_add_string dataset
|
||||||
|
proto_config_add_string radio_url
|
||||||
|
proto_config_add_string foobar
|
||||||
|
|
||||||
|
available=1
|
||||||
|
no_device=1
|
||||||
|
}
|
||||||
|
|
||||||
|
proto_openthread_setup_error() {
|
||||||
|
interface="$1"
|
||||||
|
error="$2"
|
||||||
|
proto_notify_error "$interface" "$error"
|
||||||
|
# prevent netifd from trying to bring up interface over and over
|
||||||
|
proto_block_restart "$interface"
|
||||||
|
proto_setup_failed "$interface"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
proto_openthread_setup() {
|
||||||
|
interface="$1"
|
||||||
|
device="$2"
|
||||||
|
|
||||||
|
json_get_vars backbone_network dataset device radio_url verbose:0
|
||||||
|
|
||||||
|
[ -n "$backbone_network" ] || proto_openthread_setup_error "$interface" MISSING_BACKBONE_NETWORK
|
||||||
|
proto_add_host_dependency "$interface" "" "$backbone_network"
|
||||||
|
network_get_device backbone_ifname "$backbone_network"
|
||||||
|
|
||||||
|
[ -n "$backbone_ifname" ] || proto_openthread_setup_error "$interface" MISSING_BACKBONE_IFNAME
|
||||||
|
[ -n "$device" ] || proto_openthread_setup_error "$interface" MISSING_DEVICE
|
||||||
|
[ -n "$radio_url" ] || proto_openthread_setup_error "$interface" MISSING_RADIO_URL
|
||||||
|
|
||||||
|
# run in subshell to prevent wiping json data needed for prefixes
|
||||||
|
( proto_openthread_check_service mdnsd ) || proto_openthread_setup_error "$interface" MISSING_SVC_MDNSD
|
||||||
|
|
||||||
|
opts="--auto-attach=0"
|
||||||
|
[ "$verbose" -eq 0 ] || append opts -v
|
||||||
|
append opts "-I$device"
|
||||||
|
append opts "-B$backbone_ifname"
|
||||||
|
append opts "$radio_url"
|
||||||
|
append opts "trel://$backbone_ifname"
|
||||||
|
# run in subshell to prevent wiping json data needed for prefixes
|
||||||
|
( proto_run_command "$interface" "$PROG" $opts )
|
||||||
|
|
||||||
|
ubus -t30 wait_for otbr
|
||||||
|
|
||||||
|
[ -n "$dataset" ] && {
|
||||||
|
$OTCTL dataset set active "$dataset"
|
||||||
|
}
|
||||||
|
|
||||||
|
json_for_each_item proto_openthread_add_prefix prefix
|
||||||
|
ubus call otbr threadstart || proto_openthread_setup_error "$interface" MISSING_UBUS_OBJ
|
||||||
|
$OTCTL netdata register
|
||||||
|
|
||||||
|
proto_init_update "$device" 1 1
|
||||||
|
proto_send_update "$interface"
|
||||||
|
}
|
||||||
|
|
||||||
|
proto_openthread_teardown() {
|
||||||
|
interface="$1"
|
||||||
|
ubus call otbr threadstop
|
||||||
|
proto_kill_command "$interface"
|
||||||
|
}
|
||||||
|
|
||||||
|
[ -n "$INCLUDE_ONLY" ] || {
|
||||||
|
add_protocol openthread
|
||||||
|
}
|
|
@ -0,0 +1,124 @@
|
||||||
|
From d9086b843d5da519fca876794d14026b14cc68ae Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <d9086b843d5da519fca876794d14026b14cc68ae.1689665371.git.stefan@agner.ch>
|
||||||
|
From: Stefan Agner <stefan@agner.ch>
|
||||||
|
Date: Mon, 5 Jun 2023 23:41:50 +0200
|
||||||
|
Subject: [PATCH] [rest] support deleting the dataset
|
||||||
|
|
||||||
|
Add REST API to support deleting the active or pending operational
|
||||||
|
dataset. Deleting the active operational dataset requires the Thread
|
||||||
|
network to be disabled (just like modifying the active operational
|
||||||
|
dataset). Subsequent use of the PUT method allows to build entirly
|
||||||
|
new datasets with values generated by the stack (through
|
||||||
|
otDatasetCreateNewNetwork).
|
||||||
|
---
|
||||||
|
src/rest/openapi.yaml | 21 +++++++++++++++++++++
|
||||||
|
src/rest/resource.cpp | 35 +++++++++++++++++++++++++++++++++++
|
||||||
|
src/rest/resource.hpp | 1 +
|
||||||
|
3 files changed, 57 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/rest/openapi.yaml b/src/rest/openapi.yaml
|
||||||
|
index 2ba2a4dd56..2edc4af29a 100644
|
||||||
|
--- a/src/rest/openapi.yaml
|
||||||
|
+++ b/src/rest/openapi.yaml
|
||||||
|
@@ -248,6 +248,18 @@ paths:
|
||||||
|
description: Invalid request body.
|
||||||
|
"409":
|
||||||
|
description: Writing active operational dataset rejected because Thread network is active.
|
||||||
|
+ delete:
|
||||||
|
+ tags:
|
||||||
|
+ - node
|
||||||
|
+ summary: Deletes the active operational dataset
|
||||||
|
+ description: |-
|
||||||
|
+ Deletes the the active operational dataset on the current node. Only allowed if the Thread node
|
||||||
|
+ is inactive.
|
||||||
|
+ responses:
|
||||||
|
+ "200":
|
||||||
|
+ description: Successfully deleted the active operational dataset.
|
||||||
|
+ "409":
|
||||||
|
+ description: Deleting active operational dataset rejected because Thread network is active.
|
||||||
|
/node/dataset/pending:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
@@ -291,6 +303,15 @@ paths:
|
||||||
|
description: Successfully created the pending operational dataset.
|
||||||
|
"400":
|
||||||
|
description: Invalid request body.
|
||||||
|
+ delete:
|
||||||
|
+ tags:
|
||||||
|
+ - node
|
||||||
|
+ summary: Deletes the pending operational dataset
|
||||||
|
+ description: |-
|
||||||
|
+ Deletes the the pending operational dataset on the current node.
|
||||||
|
+ responses:
|
||||||
|
+ "200":
|
||||||
|
+ description: Successfully deleted the active operational dataset.
|
||||||
|
components:
|
||||||
|
schemas:
|
||||||
|
LeaderData:
|
||||||
|
diff --git a/src/rest/resource.cpp b/src/rest/resource.cpp
|
||||||
|
index a60e9d9483..829835341a 100644
|
||||||
|
--- a/src/rest/resource.cpp
|
||||||
|
+++ b/src/rest/resource.cpp
|
||||||
|
@@ -767,12 +767,47 @@ exit:
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+void Resource::DeleteDataset(DatasetType aDatasetType, Response &aResponse) const
|
||||||
|
+{
|
||||||
|
+ otbrError error = OTBR_ERROR_NONE;
|
||||||
|
+ std::string errorCode = GetHttpStatus(HttpStatusCode::kStatusOk);
|
||||||
|
+ otOperationalDatasetTlvs datasetTlvs = {};
|
||||||
|
+
|
||||||
|
+ if (aDatasetType == DatasetType::kActive)
|
||||||
|
+ {
|
||||||
|
+ VerifyOrExit(otThreadGetDeviceRole(mInstance) == OT_DEVICE_ROLE_DISABLED, error = OTBR_ERROR_INVALID_STATE);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (aDatasetType == DatasetType::kActive)
|
||||||
|
+ {
|
||||||
|
+ VerifyOrExit(otDatasetSetActiveTlvs(mInstance, &datasetTlvs) == OT_ERROR_NONE, error = OTBR_ERROR_REST);
|
||||||
|
+ }
|
||||||
|
+ else if (aDatasetType == DatasetType::kPending)
|
||||||
|
+ {
|
||||||
|
+ VerifyOrExit(otDatasetSetPendingTlvs(mInstance, &datasetTlvs) == OT_ERROR_NONE, error = OTBR_ERROR_REST);
|
||||||
|
+ }
|
||||||
|
+ aResponse.SetResponsCode(errorCode);
|
||||||
|
+
|
||||||
|
+exit:
|
||||||
|
+ if (error == OTBR_ERROR_INVALID_STATE)
|
||||||
|
+ {
|
||||||
|
+ ErrorHandler(aResponse, HttpStatusCode::kStatusConflict);
|
||||||
|
+ }
|
||||||
|
+ else if (error != OTBR_ERROR_NONE)
|
||||||
|
+ {
|
||||||
|
+ ErrorHandler(aResponse, HttpStatusCode::kStatusInternalServerError);
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
void Resource::Dataset(DatasetType aDatasetType, const Request &aRequest, Response &aResponse) const
|
||||||
|
{
|
||||||
|
std::string errorCode;
|
||||||
|
|
||||||
|
switch (aRequest.GetMethod())
|
||||||
|
{
|
||||||
|
+ case HttpMethod::kDelete:
|
||||||
|
+ DeleteDataset(aDatasetType, aResponse);
|
||||||
|
+ break;
|
||||||
|
case HttpMethod::kGet:
|
||||||
|
GetDataset(aDatasetType, aRequest, aResponse);
|
||||||
|
break;
|
||||||
|
diff --git a/src/rest/resource.hpp b/src/rest/resource.hpp
|
||||||
|
index d79085dbfc..362e501471 100644
|
||||||
|
--- a/src/rest/resource.hpp
|
||||||
|
+++ b/src/rest/resource.hpp
|
||||||
|
@@ -150,6 +150,7 @@ private:
|
||||||
|
void GetDataRloc(Response &aResponse) const;
|
||||||
|
void GetDataset(DatasetType aDatasetType, const Request &aRequest, Response &aResponse) const;
|
||||||
|
void SetDataset(DatasetType aDatasetType, const Request &aRequest, Response &aResponse) const;
|
||||||
|
+ void DeleteDataset(DatasetType aDatasetType, Response &aResponse) const;
|
||||||
|
|
||||||
|
void DeleteOutDatedDiagnostic(void);
|
||||||
|
void UpdateDiag(std::string aKey, std::vector<otNetworkDiagTlv> &aDiag);
|
||||||
|
--
|
||||||
|
2.41.0
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=v2rayA
|
PKG_NAME:=v2rayA
|
||||||
PKG_VERSION:=2.1.0
|
PKG_VERSION:=2.1.3
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://codeload.github.com/v2rayA/v2rayA/tar.gz/v$(PKG_VERSION)?
|
PKG_SOURCE_URL:=https://codeload.github.com/v2rayA/v2rayA/tar.gz/v$(PKG_VERSION)?
|
||||||
PKG_HASH:=97cffd5dd568fc3be22fa73768bbc218a0650548ddb0849506eeb168dde0291a
|
PKG_HASH:=65958a02d91f849e264e409536d2fb3e4c7d2a8d3a6b82fed1b90cfaff3d6dc9
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/service
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/service
|
||||||
|
|
||||||
PKG_LICENSE:=AGPL-3.0-only
|
PKG_LICENSE:=AGPL-3.0-only
|
||||||
|
@ -59,7 +59,7 @@ define Download/v2raya-web
|
||||||
URL:=https://codeload.github.com/v2rayA/v2raya-web/tar.gz/v$(PKG_VERSION)?
|
URL:=https://codeload.github.com/v2rayA/v2raya-web/tar.gz/v$(PKG_VERSION)?
|
||||||
URL_FILE:=$(WEB_FILE)
|
URL_FILE:=$(WEB_FILE)
|
||||||
FILE:=$(WEB_FILE)
|
FILE:=$(WEB_FILE)
|
||||||
HASH:=5fbd8298316167d16aa15b9e8d48c243623cf3a8cfd9b3d36590c35948a93912
|
HASH:=f262efe46b5377ceed0450f519ba8562a0e7553ec2cc34a4e62f95749b19be01
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Prepare
|
define Build/Prepare
|
||||||
|
|
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=collectd
|
PKG_NAME:=collectd
|
||||||
PKG_VERSION:=5.12.0
|
PKG_VERSION:=5.12.0
|
||||||
PKG_RELEASE:=46
|
PKG_RELEASE:=47
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||||
PKG_SOURCE_URL:=https://collectd.org/files/ \
|
PKG_SOURCE_URL:=https://collectd.org/files/ \
|
||||||
|
@ -336,13 +336,19 @@ ifneq ($(CONFIG_PACKAGE_collectd-mod-rrdtool),)
|
||||||
CONFIGURE_ARGS+= --with-librrd="$(STAGING_DIR)/usr/lib/rrdtool-1.0"
|
CONFIGURE_ARGS+= --with-librrd="$(STAGING_DIR)/usr/lib/rrdtool-1.0"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# exception: mod-smart needs libatasmart
|
# exception: mod-smart needs libatasmart and libudev
|
||||||
ifneq ($(CONFIG_PACKAGE_collectd-mod-smart),)
|
ifneq ($(CONFIG_PACKAGE_collectd-mod-smart),)
|
||||||
CONFIGURE_ARGS+= \
|
CONFIGURE_ARGS+= \
|
||||||
--with-libatasmart="$(STAGING_DIR)/usr" \
|
--with-libatasmart="$(STAGING_DIR)/usr" \
|
||||||
--with-libudev="$(STAGING_DIR)/usr"
|
--with-libudev="$(STAGING_DIR)/usr"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# exception: mod-disk needs libudev
|
||||||
|
ifneq ($(CONFIG_PACKAGE_collectd-mod-disk),)
|
||||||
|
CONFIGURE_ARGS+= \
|
||||||
|
--with-libudev="$(STAGING_DIR)/usr"
|
||||||
|
endif
|
||||||
|
|
||||||
define Package/collectd/conffiles
|
define Package/collectd/conffiles
|
||||||
/etc/collectd.conf
|
/etc/collectd.conf
|
||||||
/etc/config/collectd
|
/etc/config/collectd
|
||||||
|
@ -463,7 +469,7 @@ $(eval $(call BuildPlugin,curl,cURL input,curl,+PACKAGE_collectd-mod-curl:libcur
|
||||||
#$(eval $(call BuildPlugin,dbi,relational database input,dbi,+PACKAGE_collectd-mod-dbi:libdbi))
|
#$(eval $(call BuildPlugin,dbi,relational database input,dbi,+PACKAGE_collectd-mod-dbi:libdbi))
|
||||||
$(eval $(call BuildPlugin,df,disk space input,df,))
|
$(eval $(call BuildPlugin,df,disk space input,df,))
|
||||||
$(eval $(call BuildPlugin,dhcpleases,show dhcpleases,dhcpleases,))
|
$(eval $(call BuildPlugin,dhcpleases,show dhcpleases,dhcpleases,))
|
||||||
$(eval $(call BuildPlugin,disk,disk usage/timing input,disk,+PACKAGE_collectd-mod-smart:libudev))
|
$(eval $(call BuildPlugin,disk,disk usage/timing input,disk,+PACKAGE_collectd-mod-disk:libudev))
|
||||||
$(eval $(call BuildPlugin,dns,DNS traffic input,dns,+PACKAGE_collectd-mod-dns:libpcap))
|
$(eval $(call BuildPlugin,dns,DNS traffic input,dns,+PACKAGE_collectd-mod-dns:libpcap))
|
||||||
$(eval $(call BuildPlugin,email,email output,email,))
|
$(eval $(call BuildPlugin,email,email output,email,))
|
||||||
$(eval $(call BuildPlugin,entropy,Entropy amount input,entropy,))
|
$(eval $(call BuildPlugin,entropy,Entropy amount input,entropy,))
|
||||||
|
|
Loading…
Reference in a new issue