From 574070c3e7c1f4e1981d3954279efd882d7f7dfb Mon Sep 17 00:00:00 2001 From: Hannu Nyman Date: Sat, 8 Nov 2025 19:22:05 +0200 Subject: [PATCH] mosquitto: upgrade to version 2.0.22 Upgrade to version 2.0.22, which is compatible with cmake 4.x * backport a post-release fix for nossl build Signed-off-by: Hannu Nyman --- net/mosquitto/Makefile | 6 +-- .../001-backport-fix-nossl-build.patch | 40 +++++++++++++++++++ 2 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 net/mosquitto/patches/001-backport-fix-nossl-build.patch diff --git a/net/mosquitto/Makefile b/net/mosquitto/Makefile index a8bbfc7678..de8e00609a 100644 --- a/net/mosquitto/Makefile +++ b/net/mosquitto/Makefile @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mosquitto -PKG_VERSION:=2.0.18 -PKG_RELEASE:=3 +PKG_VERSION:=2.0.22 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://mosquitto.org/files/source/ -PKG_HASH:=d665fe7d0032881b1371a47f34169ee4edab67903b2cd2b4c083822823f4448a +PKG_HASH:=2f752589ef7db40260b633fbdb536e9a04b446a315138d64a7ff3c14e2de6b68 PKG_LICENSE:=EPL-2.0 PKG_LICENSE_FILES:=LICENSE.txt diff --git a/net/mosquitto/patches/001-backport-fix-nossl-build.patch b/net/mosquitto/patches/001-backport-fix-nossl-build.patch new file mode 100644 index 0000000000..ed1bd92fd2 --- /dev/null +++ b/net/mosquitto/patches/001-backport-fix-nossl-build.patch @@ -0,0 +1,40 @@ +From af68d99c98039bb33b219c848d942d7be186f78e Mon Sep 17 00:00:00 2001 +From: Ben Marsh +Date: Mon, 21 Jul 2025 17:46:16 +0100 +Subject: [PATCH] Fix CMake builds with WITH_TLS=OFF + +Recent CMake changes caused CMake builds with the WITH_TLS option set to OFF to fail. The OpenSSL package is only found (find_package()) if WITH_TLS is ON, but linking to OpenSSL for the broker and library is not guarded by WITH_TLS. The build therefore fails. + +Guard linking to OpenSSL, only linking if WITH_TLS is set. +--- + lib/CMakeLists.txt | 4 +++- + src/CMakeLists.txt | 5 ++++- + 2 files changed, 7 insertions(+), 2 deletions(-) + +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -60,7 +60,9 @@ set(C_SRC + util_mosq.c util_topic.c util_mosq.h + will_mosq.c will_mosq.h) + +-set (LIBRARIES OpenSSL::SSL) ++if (WITH_TLS) ++ set (LIBRARIES OpenSSL::SSL) ++endif() + + if (UNIX AND NOT APPLE AND NOT ANDROID) + find_library(LIBRT rt) +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -163,7 +163,10 @@ if (WITH_DLT) + set (MOSQ_LIBS ${MOSQ_LIBS} ${DLT_LIBRARIES}) + endif (WITH_DLT) + +-set (MOSQ_LIBS ${MOSQ_LIBS} OpenSSL::SSL) ++if (WITH_TLS) ++ set (MOSQ_LIBS ${MOSQ_LIBS} OpenSSL::SSL) ++endif() ++ + # Check for getaddrinfo_a + include(CheckLibraryExists) + check_library_exists(anl getaddrinfo_a "" HAVE_GETADDRINFO_A) -- 2.30.2