diff --git a/pkg/libcoap/Makefile b/pkg/libcoap/Makefile index 89e2a8d97d58..67322f797cbf 100644 --- a/pkg/libcoap/Makefile +++ b/pkg/libcoap/Makefile @@ -1,6 +1,6 @@ PKG_NAME=libcoap PKG_URL=https://github.com/obgm/libcoap -PKG_VERSION=214665ac4b44b1b6a7e38d4d6907ee835a174928 +PKG_VERSION=e599e25d6e2b0d0e7b29dc2710f2f15e0b7e5e51 PKG_LICENSE=BSD-2-Clause LIBCOAP_BUILD_DIR=$(BINDIR)/pkg/$(PKG_NAME) diff --git a/pkg/libcoap/patches/0001-RIOT-Modify-Kconfig-app.config-to-remove-dep-model.patch b/pkg/libcoap/patches/0001-RIOT-Modify-Kconfig-app.config-to-remove-dep-model.patch deleted file mode 100644 index 88e5e679b93f..000000000000 --- a/pkg/libcoap/patches/0001-RIOT-Modify-Kconfig-app.config-to-remove-dep-model.patch +++ /dev/null @@ -1,184 +0,0 @@ -From 67b1795087d1086f0124597573421216c126ce34 Mon Sep 17 00:00:00 2001 -From: Jon Shallow -Date: Tue, 2 Apr 2024 17:46:35 +0000 -Subject: [PATCH 1/1] RIOT: Modify Kconfig / app.config to remove dep model - ---- - examples/riot/Makefile | 2 +- - examples/riot/examples_libcoap_client/Kconfig | 11 +++++++++-- - examples/riot/examples_libcoap_client/app.config | 4 +--- - examples/riot/examples_libcoap_server/Kconfig | 11 +++++++++-- - examples/riot/examples_libcoap_server/app.config | 2 -- - examples/riot/pkg_libcoap/Kconfig | 9 ++------- - examples/riot/pkg_libcoap/Makefile | 2 +- - examples/riot/tests_pkg_libcoap/Kconfig | 11 +++++++++-- - examples/riot/tests_pkg_libcoap/app.config | 2 -- - 9 files changed, 32 insertions(+), 22 deletions(-) - -diff --git a/examples/riot/Makefile b/examples/riot/Makefile -index 629b9036..37d3a4ec 100644 ---- a/examples/riot/Makefile -+++ b/examples/riot/Makefile -@@ -30,7 +30,7 @@ pkg: - cd pkg_libcoap && cp -r * ../RIOT/pkg/libcoap - @HAVE_KCONFIG=`grep libcoap/Kconfig RIOT/pkg/Kconfig | wc -l` ; \ - if [ "$${HAVE_KCONFIG}" = 0 ] ; then \ -- sed -i '/rsource "libcose\/Kconfig"/irsource "libcoap\/Kconfig"' RIOT/pkg/Kconfig ; \ -+ sed -i '/rsource "flashdb\/Kconfig"/irsource "libcoap\/Kconfig"' RIOT/pkg/Kconfig ; \ - fi - - examples: -diff --git a/examples/riot/examples_libcoap_client/Kconfig b/examples/riot/examples_libcoap_client/Kconfig -index 9c5ed2c3..2d9caeb7 100644 ---- a/examples/riot/examples_libcoap_client/Kconfig -+++ b/examples/riot/examples_libcoap_client/Kconfig -@@ -1,4 +1,10 @@ --if USEMODULE_LIBCOAP -+# This file is subject to the terms and conditions of the GNU Lesser -+# General Public License v2.1. See the file LICENSE in the top level -+# directory for more details. -+# -+menu "libcoap-client" -+ depends on USEPKG_LIBCOAP -+ - config LIBCOAP_CLIENT_URI - string "CoAP URI to connect to" - default "coap://[fe80::405:5aff:fe15:9b7f]/.well-known/core" -@@ -10,4 +16,5 @@ config LIBCOAP_USE_PSK_ID - string "User ID to use for PSK communications" - default "user_abc" - depends on USEMODULE_TINYDTLS --endif # USEMODULE_LIBCOAP -+ -+endmenu # libcoap-client -diff --git a/examples/riot/examples_libcoap_client/app.config b/examples/riot/examples_libcoap_client/app.config -index a76e237c..e25b135c 100644 ---- a/examples/riot/examples_libcoap_client/app.config -+++ b/examples/riot/examples_libcoap_client/app.config -@@ -1,10 +1,8 @@ - CONFIG_LIBCOAP_CLIENT_SUPPORT=y -+ - CONFIG_LIBCOAP_CLIENT_URI="coap://[fe80::405:5aff:fe15:9b7f]/.well-known/core" - - CONFIG_LIBCOAP_USE_PSK="secretPSK" - CONFIG_LIBCOAP_USE_PSK_ID="user_abc" - --CONFIG_KCONFIG_USEPKG_LIBCOAP=y - # Logging levels are defined in pkg/libcoap using Kconfig -- --CONFIG_KCONFIG_USEPKG_TINYDTLS=y -diff --git a/examples/riot/examples_libcoap_server/Kconfig b/examples/riot/examples_libcoap_server/Kconfig -index 5ade9943..3ab7fd12 100644 ---- a/examples/riot/examples_libcoap_server/Kconfig -+++ b/examples/riot/examples_libcoap_server/Kconfig -@@ -1,4 +1,10 @@ --if USEMODULE_LIBCOAP -+# This file is subject to the terms and conditions of the GNU Lesser -+# General Public License v2.1. See the file LICENSE in the top level -+# directory for more details. -+# -+menu "libcoap-server" -+ depends on USEPKG_LIBCOAP -+ - config LIBCOAP_USE_PSK - string "Secret to use for PSK communications" - default "secretPSK" -@@ -12,4 +18,5 @@ config LIBCOAP_USE_PSK_ID - default "user_abc" - depends on USEMODULE_TINYDTLS - endif # LIBCOAP_CLIENT_SUPPORT --endif # USEMODULE_LIBCOAP -+ -+endmenu # libcoap-server -diff --git a/examples/riot/examples_libcoap_server/app.config b/examples/riot/examples_libcoap_server/app.config -index 66fe9bd3..d1b78829 100644 ---- a/examples/riot/examples_libcoap_server/app.config -+++ b/examples/riot/examples_libcoap_server/app.config -@@ -2,9 +2,7 @@ CONFIG_LIBCOAP_SERVER_SUPPORT=y - - CONFIG_LIBCOAP_USE_PSK="secretPSK" - --CONFIG_KCONFIG_USEPKG_LIBCOAP=y - # Logging levels are defined in pkg/libcoap using Kconfig - --CONFIG_KCONFIG_USEPKG_TINYDTLS=y - CONFIG_DTLS_PEER_MAX=2 - CONFIG_DTLS_HANDSHAKE_MAX=2 -diff --git a/examples/riot/pkg_libcoap/Kconfig b/examples/riot/pkg_libcoap/Kconfig -index 9f45fec2..09c0be67 100644 ---- a/examples/riot/pkg_libcoap/Kconfig -+++ b/examples/riot/pkg_libcoap/Kconfig -@@ -4,13 +4,8 @@ - # General Public License v2.1. See the file LICENSE in the top level - # directory for more details. - # --menuconfig KCONFIG_USEPKG_LIBCOAP -- bool "Configure libcoap" -+menu "libcoap" - depends on USEPKG_LIBCOAP -- help -- Configure libcoap package via Kconfig. -- --if KCONFIG_USEPKG_LIBCOAP - - choice LIBCOAP_DEBUG_LEVEL - bool "Set CoAP debugging level" -@@ -292,4 +287,4 @@ config LIBCOAP_MAX_OPTIONS - help - The maximum number of supported options. - --endif # KCONFIG_USEPKG_LIBCOAP -+endmenu # libcoap -diff --git a/examples/riot/pkg_libcoap/Makefile b/examples/riot/pkg_libcoap/Makefile -index e1511ce3..89e2a8d9 100644 ---- a/examples/riot/pkg_libcoap/Makefile -+++ b/examples/riot/pkg_libcoap/Makefile -@@ -1,6 +1,6 @@ - PKG_NAME=libcoap - PKG_URL=https://github.com/obgm/libcoap --PKG_VERSION=11d8e7cd72df78c9a56d6f5f6e7cf3cc469c99de -+PKG_VERSION=214665ac4b44b1b6a7e38d4d6907ee835a174928 - PKG_LICENSE=BSD-2-Clause - - LIBCOAP_BUILD_DIR=$(BINDIR)/pkg/$(PKG_NAME) -diff --git a/examples/riot/tests_pkg_libcoap/Kconfig b/examples/riot/tests_pkg_libcoap/Kconfig -index 5173037e..522df4cd 100644 ---- a/examples/riot/tests_pkg_libcoap/Kconfig -+++ b/examples/riot/tests_pkg_libcoap/Kconfig -@@ -1,4 +1,10 @@ --if USEMODULE_LIBCOAP -+# This file is subject to the terms and conditions of the GNU Lesser -+# General Public License v2.1. See the file LICENSE in the top level -+# directory for more details. -+# -+menu "tests_libcoap" -+ depends on USEPKG_LIBCOAP -+ - config LIBCOAP_USE_PSK - string "Secret to use for PSK communications" - default "secretPSK" -@@ -7,4 +13,5 @@ config LIBCOAP_USE_PSK_ID - string "Identifier (user) to use for PSK communications" - default "test_user" - depends on USEMODULE_TINYDTLS --endif # USEMODULE_LIBCOAP -+ -+endmenu # tests_libcoap -diff --git a/examples/riot/tests_pkg_libcoap/app.config b/examples/riot/tests_pkg_libcoap/app.config -index 484fa5d3..3c1eb402 100644 ---- a/examples/riot/tests_pkg_libcoap/app.config -+++ b/examples/riot/tests_pkg_libcoap/app.config -@@ -4,10 +4,8 @@ CONFIG_LIBCOAP_CLIENT_SUPPORT=y - CONFIG_LIBCOAP_USE_PSK="secretPSK" - CONFIG_LIBCOAP_USE_PSK_ID="test_user" - --CONFIG_KCONFIG_USEPKG_LIBCOAP=y - # Logging levels are defined in pkg/libcoap using Kconfig - CONFIG_LIBCOAP_LOG_ALERT=y - --CONFIG_KCONFIG_USEPKG_TINYDTLS=y - CONFIG_DTLS_PEER_MAX=2 - CONFIG_DTLS_HANDSHAKE_MAX=2 --- -2.34.1 - diff --git a/pkg/libcoap/patches/0001-coap_block.c-Support-16-bit-size_t-in-coap_context_s.patch b/pkg/libcoap/patches/0001-coap_block.c-Support-16-bit-size_t-in-coap_context_s.patch new file mode 100644 index 000000000000..7c2a73f530b8 --- /dev/null +++ b/pkg/libcoap/patches/0001-coap_block.c-Support-16-bit-size_t-in-coap_context_s.patch @@ -0,0 +1,26 @@ +From d7f856c6c5d1ed8e31e55cc0f0bed7d99f501051 Mon Sep 17 00:00:00 2001 +From: Jon Shallow +Date: Thu, 9 May 2024 16:07:36 +0100 +Subject: [PATCH 1/1] coap_block.c: Support 16 bit size_t in + coap_context_set_max_block_size() + +--- + src/coap_block.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/coap_block.c b/src/coap_block.c +index 0803ced5..2182bad5 100644 +--- a/src/coap_block.c ++++ b/src/coap_block.c +@@ -409,7 +409,7 @@ coap_context_set_max_block_size(coap_context_t *context, size_t max_block_size) + coap_lock_check_locked(context); + max_block_size = (coap_fls((uint32_t)max_block_size >> 4) - 1) & 0x07; + context->block_mode &= ~COAP_BLOCK_MAX_SIZE_MASK; +- context->block_mode |= COAP_BLOCK_MAX_SIZE_SET(max_block_size); ++ context->block_mode |= COAP_BLOCK_MAX_SIZE_SET((uint32_t)max_block_size); + return 1; + } + +-- +2.34.1 +