Skip to contentSkip to conversation

package/mosquitto: bump version

PATCH Superseded [email protected] 1 participant 9 messages Feb 23

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover package/mosquitto: bump version

From: "Yann E. MORIN" <[email protected]>

Hello All!

This series brings a new version of mosquitto; it is quite a big endeavour, as it has switched to using cmake. With this, it becomes possible to easily install only the parts of mosquitto that are needed, and we do add some options to that effect;
- CLI tools to talk MQTT
- CLI apps to interact with the the daemon
- native websockets, or legacy using libwebsockets
- HTTP API
- plugins

The 2.1.x series is still quite recent, and has already accumulated quite a few fixes; the most releveant ones have been backported. As for the few patches I've authored, I'm still waiting for internal validation of the Eclipse CLA before I can push them upstream...

Changes v1 -> v2:
- clarify help text about broker-related apps (Fiona)

Changes since RFC:
- add options for various parts

Regards,
Yann E. MORIN.

The following changes since commit bed675a240de6643792edd879cbe187b2ee6e0f5

package/c-ares: security bump to v1.34.6 (2026-02-22 21:56:31 +0100)

are available as patches in this mail series,

for you to apply patches up to 4a23d0cf09f1c12e1a93552b59113153b2078511

package/mosquitto: add option to enable the persist-sqlite plugin (2026-02-23 09:36:13 +0100)

----------------------------------------------------------------
Yann E. MORIN (8):
package/cjson: add host variant
package/mosquitto: bump to version 2.1.2 pakcage.mosquitto: add option to install CLI tools package/mosquitto: add option to build broker-related apps package/mosquitto: add option for websockets package/mosquitto: enable HTTP API with libmicrohttpd package/mosquitto: add options for password and ACL plugin package/mosquitto: add option to enable the persist-sqlite plugin

 package/cjson/cjson.mk                             |   7 +
 .../0001-Fix-CMake-builds-with-WITH_TLS-OFF.patch  |  50 -----
 ...T_DISCONNECT-being-called-before-MOSQ_EVT.patch |  41 ++++
 .../0002-Add-configure-time-check-for-lanl.patch   |  47 -----
 ...ntial-crash-if-group-id-has-no-group-name.patch |  36 ++++
 ...to_loop_start-leaving-the-mosq-struct-in-.patch |  62 ++++++
 package/mosquitto/0004-Fix-missing-SONAME.patch    | 139 ++++++++++++
 ...d-length-not-being-passed-to-MOSQ_EVT_BAS.patch | 234 +++++++++++++++++++++
 ...-outgoing-maximum-packet-size-limit-check.patch | 155 ++++++++++++++
 ...x-will-messages-being-incorrectly-delayed.patch | 213 +++++++++++++++++++
 ...ct-parsing-of-unix-socket-address-in-prox.patch |  30 +++
 ...eList-only-require-C-when-actually-needed.patch |  46 ++++
 ...0-broker-properly-check-for-getaddrinfo_a.patch |  38 ++++
 .../0011-libcommon-check-for-getrandom.patch       |  83 ++++++++
 package/mosquitto/Config.in                        |  98 ++++++++-
 package/mosquitto/mosquitto.hash                   |   7 +-
 package/mosquitto/mosquitto.mk                     | 198 +++++++++--------
 17 files changed, 1290 insertions(+), 194 deletions(-)
 delete mode 100644 package/mosquitto/0001-Fix-CMake-builds-with-WITH_TLS-OFF.patch
 create mode 100644 package/mosquitto/0001-Fix-MOSQ_EVT_DISCONNECT-being-called-before-MOSQ_EVT.patch
 delete mode 100644 package/mosquitto/0002-Add-configure-time-check-for-lanl.patch
 create mode 100644 package/mosquitto/0002-Fix-potential-crash-if-group-id-has-no-group-name.patch
 create mode 100644 package/mosquitto/0003-Fix-mosquitto_loop_start-leaving-the-mosq-struct-in-.patch
 create mode 100644 package/mosquitto/0004-Fix-missing-SONAME.patch
 create mode 100644 package/mosquitto/0005-Fix-password-length-not-being-passed-to-MOSQ_EVT_BAS.patch
 create mode 100644 package/mosquitto/0006-Fix-outgoing-maximum-packet-size-limit-check.patch
 create mode 100644 package/mosquitto/0007-Fix-will-messages-being-incorrectly-delayed.patch
 create mode 100644 package/mosquitto/0008-Fix-incorrect-parsing-of-unix-socket-address-in-prox.patch
 create mode 100644 package/mosquitto/0009-CMakeList-only-require-C-when-actually-needed.patch
 create mode 100644 package/mosquitto/0010-broker-properly-check-for-getaddrinfo_a.patch
 create mode 100644 package/mosquitto/0011-libcommon-check-for-getrandom.patch

--

                                        ____________
.-----------------.--------------------:       _    :------------------.
|  Yann E. MORIN  | Real-Time Embedded |    __/ )   | /"\ ASCII RIBBON |
|                 | Software  Designer |  _/ - /'   | \ / CAMPAIGN     |
| +33 638.411.245 '--------------------: (_    `--, |  X  AGAINST      |
| yann.morin (at) orange.com           |_="    ,--' | / \ HTML MAIL    |

'--------------------------------------:______/_____:------------------'

____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration, Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law; they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments. As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified. Thank you.

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#1 lore raw

PATCH v2 1/8 package/cjson: add host variant

From: "Yann E. MORIN" <[email protected]>

Cc Danomi Manchego <[email protected]>
---
 package/cjson/cjson.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/cjson/cjson.mk +7 -0
index cb4525d1a4..fb43994aed 100644
@@ -31,4 +31,11 @@ else
 CJSON_CONF_OPTS += -DENABLE_CJSON_UTILS=OFF
 endif
 
+HOST_CJSON_CONF_OPTS = \
+	-DENABLE_CJSON_TEST=OFF \
+	-DENABLE_CUSTOM_COMPILER_FLAGS=OFF \
+	-DBUILD_SHARED_AND_STATIC_LIBS=OFF \
+	-DENABLE_CJSON_UTILS=OFF
+
 $(eval $(cmake-package))
+$(eval $(host-cmake-package))
Signature · 18 lines
2.34.1

____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

PATCH v2 2/8 package/mosquitto: bump to version 2.1.2

In reply to [email protected]

From: "Yann E. MORIN" <[email protected]>

Version 2.1.x has introduced a cmake-based build, and upstream strongly recomends using it over the legacy Makefiles, which will ultimately be retired.

So we do the switch, which cause quite some noise in the .mk file, but at the same time allows for a bit of cleanup in the build process, as we can now use the cmake-package infra.

Mosquitto now wants to peek into the malloc() internals for memory tracking, and that only works on systems with an MMU (uClibc-ng does not expose it for noMMU builds, as it's part of its malloc-standard implementation).

Static-pnly builds are broken, even when only building the library. This seems beyond a simple repair, so just require shared libs now (since we're requiring an MMU as well, requiring shared libs is not too much of an additional burden).

cJSON is now a required dependency, used in common parts of the code (not just for the plugins.

There are a few options that we forcibly disable; they'll get addressed in followup patches.

There are stil la few build failures that are difficult to account for (exceprt):

    $ printf 'BR2_PACKAGE_MOSQUITTO=y\n' >mosq.cfg
    $ ./utils/docker-run ./utils/test-pkg -d $(pwd)/run-tests -c mosq.cfg -p mosquitto
    br-arm-full-static [5/6]: FAILED
    => old uClibc-ng, would need __GNU_SOURCE (with dunder) to define
       getrandom(); no longer needed since uClibc-ng 1.0.50; would need
       openssl otherwise
    bootlin-aarch64-glibc-old [6/6]: FAILED
    => really old glibc, missing getrandom(); would need openssl

Drop our existing patches, they've either been applied upstream, or are no longer needed. Add new patches to fix various build issues (submission upstream pending the signature of the CLA..,).

Thanks a lot to Titouan for providing his initial work on the update! Some of his findings ended up in this patch. 👍

Note: by lack of a trusted path back to the PGP key that signed the archive, the comment was dropped, as checking a signature without a trust-chain does not make much sense...

Cc Peter Korsgaard <[email protected]>
Cc Titouan Christophe <[email protected]>

---
Chages v1 -> v2:
- add Upstream: tag on authored patches, pointing to pending PR

Changes RFC -> v1:
- fix location of installed example config files in /etc (so they get properly removed afterwards!)

---
 ...1-Fix-CMake-builds-with-WITH_TLS-OFF.patch |  50 ----
 ...CONNECT-being-called-before-MOSQ_EVT.patch |  41 +++
 ...02-Add-configure-time-check-for-lanl.patch |  47 ----
 ...-crash-if-group-id-has-no-group-name.patch |  36 +++
 ...op_start-leaving-the-mosq-struct-in-.patch |  62 +++++
 .../mosquitto/0004-Fix-missing-SONAME.patch   | 139 +++++++++++
 ...gth-not-being-passed-to-MOSQ_EVT_BAS.patch | 234 ++++++++++++++++++
 ...oing-maximum-packet-size-limit-check.patch | 155 ++++++++++++
 ...l-messages-being-incorrectly-delayed.patch | 213 ++++++++++++++++
 ...rsing-of-unix-socket-address-in-prox.patch |  30 +++
 ...-only-require-C-when-actually-needed.patch |  46 ++++
 ...ker-properly-check-for-getaddrinfo_a.patch |  38 +++
 .../0011-libcommon-check-for-getrandom.patch  |  83 +++++++
 package/mosquitto/Config.in                   |  15 +-
 package/mosquitto/mosquitto.hash              |   7 +-
 package/mosquitto/mosquitto.mk                | 173 +++++++------
 16 files changed, 1173 insertions(+), 196 deletions(-)
 delete mode 100644 package/mosquitto/0001-Fix-CMake-builds-with-WITH_TLS-OFF.patch
 create mode 100644 package/mosquitto/0001-Fix-MOSQ_EVT_DISCONNECT-being-called-before-MOSQ_EVT.patch
 delete mode 100644 package/mosquitto/0002-Add-configure-time-check-for-lanl.patch
 create mode 100644 package/mosquitto/0002-Fix-potential-crash-if-group-id-has-no-group-name.patch
 create mode 100644 package/mosquitto/0003-Fix-mosquitto_loop_start-leaving-the-mosq-struct-in-.patch
 create mode 100644 package/mosquitto/0004-Fix-missing-SONAME.patch
 create mode 100644 package/mosquitto/0005-Fix-password-length-not-being-passed-to-MOSQ_EVT_BAS.patch
 create mode 100644 package/mosquitto/0006-Fix-outgoing-maximum-packet-size-limit-check.patch
 create mode 100644 package/mosquitto/0007-Fix-will-messages-being-incorrectly-delayed.patch
 create mode 100644 package/mosquitto/0008-Fix-incorrect-parsing-of-unix-socket-address-in-prox.patch
 create mode 100644 package/mosquitto/0009-CMakeList-only-require-C-when-actually-needed.patch
 create mode 100644 package/mosquitto/0010-broker-properly-check-for-getaddrinfo_a.patch
 create mode 100644 package/mosquitto/0011-libcommon-check-for-getrandom.patch
package/mosquitto/0001-Fix-CMake-builds-with-WITH_TLS-OFF.patch deleted +0 -50
deleted file mode 100644
index 9445148f44..0000000000
@@ -1,50 +0,0 @@
-From 1ecc94d7b4ff495afd7f32c42072cdf4ea5407aa Mon Sep 17 00:00:00 2001
-From: Ben Marsh <[email protected]>
-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.
-
-Upstream: https://github.com/eclipse-mosquitto/mosquitto/pull/3321
-Signed-off-by: Scott Fan <[email protected]>
----
- lib/CMakeLists.txt | 4 +++-
- src/CMakeLists.txt | 5 ++++-
- 2 files changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
-index 21b61497..e6b8235b 100644
---- 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)
-diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index d4bae7cd..6fd0ee53 100644
---- 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.43.0
-
package/mosquitto/0001-Fix-MOSQ_EVT_DISCONNECT-being-called-before-MOSQ_EVT.patch new file +41 -0

41 lines not on this page · raw message

package/mosquitto/0002-Add-configure-time-check-for-lanl.patch deleted +0 -47

47 lines not on this page · raw message

package/mosquitto/0002-Fix-potential-crash-if-group-id-has-no-group-name.patch new file +36 -0
new file mode 100644
index 0000000000..c683f7614e
@@ -0,0 +1,36 @@
+From 6834ff7b8304f74c044b8399f23fe69455bfeda8 Mon Sep 17 00:00:00 2001
+Message-Id: <6834ff7b8304f74c044b8399f23fe69455bfeda8.1771224206.git.yann.morin@orange.com>
+In-Reply-To: <7ee523213c30b86ff723c192462f55b84d7714b9.1771224206.git.yann.morin@orange.com>
+References: <7ee523213c30b86ff723c192462f55b84d7714b9.1771224206.git.yann.morin@orange.com>
+From: "Roger A. Light" <[email protected]>
+Date: Fri, 13 Feb 2026 00:36:47 +0000
+Subject: [PATCH] Fix potential crash if group id has no group name.
+
+This can occur if reading a file in restricted mode and the group id
+does not have an entry in /etc/groups.
+
+Closes #3498. Thanks to Stefan Kranich.
+
+Upstream: https://github.com/eclipse-mosquitto/mosquitto/commit/7958a85bae06c22c3beff2942b8c1ac04f6a6353
+[[email protected]: drop the Changelog.txt entry]
+Signed-off-by: Yann E. MORIN <[email protected]>
+---
+ libcommon/file_common.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libcommon/file_common.c b/libcommon/file_common.c
+index 1998e6d0..8bde3009 100644
+--- a/libcommon/file_common.c
++++ b/libcommon/file_common.c
+@@ -235,7 +235,7 @@ FILE *mosquitto_fopen(const char *path, const char *mode, bool restrict_read)
+ 			char buf[4096];
+ 			struct group grp, *result;
+ 
+-			if(getgrgid_r(getgid(), &grp, buf, sizeof(buf), &result) == 0){
++			if(getgrgid_r(getgid(), &grp, buf, sizeof(buf), &result) == 0 && result){
+ 				libcommon_printf(
+ 						"Warning: File %s group is not %s. Future versions will refuse to load this file.\n",
+ 						path, result->gr_name);
+-- 
+2.34.1
+
package/mosquitto/0003-Fix-mosquitto_loop_start-leaving-the-mosq-struct-in-.patch new file +62 -0

62 lines not on this page · raw message

package/mosquitto/0004-Fix-missing-SONAME.patch new file +139 -0

139 lines not on this page · raw message

package/mosquitto/0005-Fix-password-length-not-being-passed-to-MOSQ_EVT_BAS.patch new file +234 -0

234 lines not on this page · raw message

package/mosquitto/0006-Fix-outgoing-maximum-packet-size-limit-check.patch new file +155 -0

155 lines not on this page · raw message

package/mosquitto/0007-Fix-will-messages-being-incorrectly-delayed.patch new file +213 -0

213 lines not on this page · raw message

package/mosquitto/0008-Fix-incorrect-parsing-of-unix-socket-address-in-prox.patch new file +30 -0
new file mode 100644
index 0000000000..1847677cd9
@@ -0,0 +1,30 @@
+From 1d84ad2b43293f28f9c1b495e6748124ff23f1f7 Mon Sep 17 00:00:00 2001
+Message-Id: <1d84ad2b43293f28f9c1b495e6748124ff23f1f7.1771407706.git.yann.morin@orange.com>
+In-Reply-To: <e7f4efbe921f68562bcbb96749c6f436de3e5eb8.1771407706.git.yann.morin@orange.com>
+References: <e7f4efbe921f68562bcbb96749c6f436de3e5eb8.1771407706.git.yann.morin@orange.com>
+From: "Roger A. Light" <[email protected]>
+Date: Wed, 18 Feb 2026 09:05:44 +0000
+Subject: [PATCH] Fix incorrect parsing of unix socket address in proxy v2
+
+Upstream: https://github.com/eclipse-mosquitto/mosquitto/commit/b21c9f2c9af97ac4bc90efea388ca27ce7f6e73a
+Signed-off-by: Yann E. MORIN <[email protected]>
+---
+ src/proxy_v2.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/proxy_v2.c b/src/proxy_v2.c
+index 97932ad3..47adb302 100644
+--- a/src/proxy_v2.c
++++ b/src/proxy_v2.c
+@@ -280,7 +280,7 @@ int proxy_v2__read(struct mosquitto *context)
+ 			union proxy_addr *addr = (union proxy_addr *)context->proxy.buf;
+ 			context->address = mosquitto_strndup((char *)addr->unix_addr.src_addr, sizeof(addr->unix_addr.src_addr));
+ 			context->remote_port = 0;
+-			context->proxy.pos = (uint16_t)(strlen(context->address) + 1);
++			context->proxy.pos = (uint16_t)(sizeof(addr->unix_addr.src_addr) + 1);
+ 		}else{
+ 			/* Must be LOCAL */
+ 			/* Ignore address */
+-- 
+2.34.1
+
package/mosquitto/0009-CMakeList-only-require-C-when-actually-needed.patch new file +46 -0

46 lines not on this page · raw message

package/mosquitto/0010-broker-properly-check-for-getaddrinfo_a.patch new file +38 -0
new file mode 100644
index 0000000000..7a0124b2c3
@@ -0,0 +1,38 @@
+From 2a6d9135881d5ba0f1b108e6680018e982b48454 Mon Sep 17 00:00:00 2001
+Message-Id: <2a6d9135881d5ba0f1b108e6680018e982b48454.1771224206.git.yann.morin@orange.com>
+In-Reply-To: <7ee523213c30b86ff723c192462f55b84d7714b9.1771224206.git.yann.morin@orange.com>
+References: <7ee523213c30b86ff723c192462f55b84d7714b9.1771224206.git.yann.morin@orange.com>
+From: "Yann E. MORIN" <[email protected]>
+Date: Tue, 10 Feb 2026 09:21:11 +0100
+Subject: [PATCH] broker: properly check for getaddrinfo_a()
+
+getaddrinfo_a( is protected by _GNU_SOURCE.
+
+This is proerly accounted for in the source doe, in lib/net_mosq.c, but
+the check in the CmakeList is missing that define, which causes the
+check to actually fail.
+
+Add that define when checking; this fixes builds on various C libraries,
+like uClibc-ng, musl, or newer/older glibc.
+
+Upstream: https://github.com/eclipse-mosquitto/mosquitto/pull/3519
+Signed-off-by: Yann E. MORIN <[email protected]>
+---
+ src/CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 8ac47d87..8576fea9 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -184,6 +184,7 @@ endif()
+ if(WITH_ADNS)
+ 	cmake_push_check_state()
+ 	set(ANL_CODE "
++		#define _GNU_SOURCE
+ 		#include <stdlib.h>
+ 		#include <netdb.h>
+ 		int main(){
+-- 
+2.34.1
+
package/mosquitto/0011-libcommon-check-for-getrandom.patch new file +83 -0

83 lines not on this page · raw message

package/mosquitto/Config.in +10 -5
index 339df8fddb..2667b60f57 100644
@@ -1,5 +1,8 @@
 config BR2_PACKAGE_MOSQUITTO
 	bool "mosquitto"
+	depends on BR2_USE_MMU  # lib peeks in malloc() internals; broker fork()s
+	depends on !BR2_STATIC_LIBS
+	select BR2_PACKAGE_CJSON
 	help
 	  Eclipse Mosquitto is an open source (EPL/EDL licensed) message
 	  broker that implements the MQTT protocol versions 5.0, 3.1.1
@@ -19,12 +22,11 @@ config BR2_PACKAGE_MOSQUITTO
 
 	  https://mosquitto.org/
 
+if BR2_PACKAGE_MOSQUITTO
+
 config BR2_PACKAGE_MOSQUITTO_BROKER
 	bool "install the mosquitto broker"
 	default y
-	depends on BR2_USE_MMU # fork()
-	depends on !BR2_STATIC_LIBS # include <dlfcn.h>
-	depends on BR2_PACKAGE_MOSQUITTO
 	select BR2_PACKAGE_LIBWEBSOCKETS_EXT_POLL if BR2_PACKAGE_LIBWEBSOCKETS
 	help
 	  Build and install the mosquitto broker onto target.
@@ -32,13 +34,16 @@ config BR2_PACKAGE_MOSQUITTO_BROKER
 config BR2_PACKAGE_MOSQUITTO_BROKER_DYNAMIC_SECURITY_PLUGIN
 	bool "dynamic security plugin"
 	depends on BR2_PACKAGE_MOSQUITTO_BROKER
-	select BR2_PACKAGE_CJSON
 	select BR2_PACKAGE_OPENSSL
 	help
 	  Build and install the dynamic security plugin for
 	  mosquitto broker onto target.
 
 comment "mosquitto broker needs a toolchain w/ dynamic library"
+	depends on BR2_STATIC_LIBS
+
+endif
+
+comment "mosquitto needs a toolchain w/ dynamic library"
 	depends on BR2_USE_MMU
 	depends on BR2_STATIC_LIBS
-	depends on BR2_PACKAGE_MOSQUITTO
package/mosquitto/mosquitto.hash +3 -4
index cf031f91e5..c0306161c7 100644
@@ -1,8 +1,7 @@
-# Locally calculated after checking gpg signature
-# from https://mosquitto.org/files/source/mosquitto-2.0.22.tar.gz.asc
-sha256  2f752589ef7db40260b633fbdb536e9a04b446a315138d64a7ff3c14e2de6b68  mosquitto-2.0.22.tar.gz
+# Locally calculated
+sha256  fd905380691ac65ea5a93779e8214941829e3d6e038d5edff9eac5fd74cbed02  mosquitto-2.1.2.tar.gz
 
 # License files
-sha256  d3c4ccace4e5d3cc89d34cf2a0bc85b8596bfc0a32b815d0d77f9b7c41b5350c  LICENSE.txt
+sha256  33d1851e40fddba7eff95bcc01d1a178a87340a1126893012892913d5e6fdfa6  LICENSE.txt
 sha256  8c349f80764d0648e645f41ef23772a70c995a0924b5235f735f4a3d09df127c  epl-v20
 sha256  86fc4a3f97cb769c04e8da557036c1066eb8bb22b2d0a5dd31464990fe84047c  edl-v10
package/mosquitto/mosquitto.mk +83 -90

228 lines not on this page · raw message

Signature · 17 lines
2.34.1

____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw

PATCH v2 3/8 pakcage.mosquitto: add option to install CLI tools

In reply to [email protected]

From: "Yann E. MORIN" <[email protected]>

mosquitto_sub/pub/rr can be handy to test a broker from the command line, but they can get superfluous when only the broker is required on the target.

Add an option to enable or disable them. Make that new option enabled by default to keep backward compatibility with previous (def)config files.

Cc Peter Korsgaard <[email protected]>
Cc Titouan Christophe <[email protected]>
---
 package/mosquitto/Config.in    | 9 +++++++++
 package/mosquitto/mosquitto.mk | 7 ++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)
package/mosquitto/Config.in +9 -0
index 2667b60f57..d0f096e5cf 100644
@@ -24,6 +24,15 @@ config BR2_PACKAGE_MOSQUITTO
 
 if BR2_PACKAGE_MOSQUITTO
 
+config BR2_PACKAGE_MOSQUITTO_CLIENTS
+	bool "install clients"
+	default y  # Backward compatibility
+	help
+	  Install CLI tools to publish/subscribe to the broker:
+	    mosquitto_pub
+	    mosquitto_sub
+	    mosquitto_rr
+
 config BR2_PACKAGE_MOSQUITTO_BROKER
 	bool "install the mosquitto broker"
 	default y
package/mosquitto/mosquitto.mk +6 -1
index e767d97bee..de952e9d77 100644
@@ -19,7 +19,6 @@ MOSQUITTO_CONF_OPTS = \
 	-DWITH_TESTS=OFF \
 	-DWITH_STATIC_LIBRARIES=OFF \
 	-DWITH_BUNDLED_DEPS=ON \
-	-DWITH_CLIENTS=ON \
 	-DWITH_HTTP_API=OFF \
 	-DWITH_CTRL_SHELL=OFF
 
@@ -70,6 +69,12 @@ else
 MOSQUITTO_CONF_OPTS += -DWITH_LIB_CPP=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_MOSQUITTO_CLIENTS),y)
+MOSQUITTO_CONF_OPTS += -DWITH_CLIENTS=ON
+else
+MOSQUITTO_CONF_OPTS += -DWITH_CLIENTS=OFF
+endif
+
 ifeq ($(BR2_PACKAGE_MOSQUITTO_BROKER),y)
 
 MOSQUITTO_CONF_OPTS += \
Signature · 18 lines
2.34.1

____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw

PATCH v2 4/8 package/mosquitto: add option to build broker-related apps

In reply to [email protected]

From: "Yann E. MORIN" <[email protected]>

mosquitto_{ctrl,db_dump,passwd,signal} can be handy to interact with the mosquitto broker during development, but are usually unnecessary on the target.

Add an option to enable or disable them. Make that new option enabled by default when the broker is enabled, to keep backward compatibility with previous (def)config files.

Cc Fiona Klute <[email protected]>
Cc Peter Korsgaard <[email protected]>
Cc Titouan Christophe <[email protected]>

---
Changes v1 -> v2:
- s/TLS/openssl/ (Fiona)

---
 package/mosquitto/Config.in    | 16 ++++++++++++++++
 package/mosquitto/mosquitto.mk | 12 ++++++++----
 2 files changed, 24 insertions(+), 4 deletions(-)
package/mosquitto/Config.in +16 -0
index d0f096e5cf..c19d80c943 100644
@@ -33,6 +33,22 @@ config BR2_PACKAGE_MOSQUITTO_CLIENTS
 	    mosquitto_sub
 	    mosquitto_rr
 
+config BR2_PACKAGE_MOSQUITTO_APPS
+	bool "install apps"
+	default y if BR2_PACKAGE_MOSQUITTO_BROKER  # Backward compatibility
+	depends on BR2_USE_WCHAR  # libedit
+	# For mosquitto_ctrl shell feature, mandatorily enabled:
+	select BR2_PACKAGE_READLINE if !BR2_PACKAGE_LIBEDIT
+	help
+	  Those apps can be used to interact with the broker:
+	    mosquitto_db_dump
+	    mosquitto_signal
+
+	  Additionally, when openssl is enabled, the following apps are
+	  also installed:
+	    mosquitto_ctrl
+	    mosquitto_passwd
+
 config BR2_PACKAGE_MOSQUITTO_BROKER
 	bool "install the mosquitto broker"
 	default y
package/mosquitto/mosquitto.mk +8 -4
index de952e9d77..1cfc052003 100644
@@ -19,8 +19,7 @@ MOSQUITTO_CONF_OPTS = \
 	-DWITH_TESTS=OFF \
 	-DWITH_STATIC_LIBRARIES=OFF \
 	-DWITH_BUNDLED_DEPS=ON \
-	-DWITH_HTTP_API=OFF \
-	-DWITH_CTRL_SHELL=OFF
+	-DWITH_HTTP_API=OFF
 
 # adns uses getaddrinfo_a
 ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
@@ -75,12 +74,18 @@ else
 MOSQUITTO_CONF_OPTS += -DWITH_CLIENTS=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_MOSQUITTO_APPS),y)
+MOSQUITTO_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBEDIT),libedit,readline)
+MOSQUITTO_CONF_OPTS += -DWITH_APPS=ON -DWITH_CTRL_SHELL=ON
+else
+MOSQUITTO_CONF_OPTS += -DWITH_APPS=OFF -DWITH_CTRL_SHELL=OFF
+endif
+
 ifeq ($(BR2_PACKAGE_MOSQUITTO_BROKER),y)
 
 MOSQUITTO_CONF_OPTS += \
 	-DCMAKE_INSTALL_SYSCONFDIR=/etc \
 	-DWITH_BROKER=ON \
-	-DWITH_APPS=ON \
 	-DWITH_PLUGINS=ON \
 	-DWITH_PLUGIN_ACL_FILE=ON \
 	-DWITH_PLUGIN_PASSWORD_FILE=ON \
@@ -123,7 +128,6 @@ MOSQUITTO_POST_INSTALL_TARGET_HOOKS += MOSQUITTO_INSTALL_TARGET_CONF
 else # !BR2_PACKAGE_MOSQUITTO_BROKER
 MOSQUITTO_CONF_OPTS += \
 	-DWITH_BROKER=OFF \
-	-DWITH_APPS=OFF \
 	-DWITH_PLUGINS=OFF
 endif
 
Signature · 18 lines
2.34.1

____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#5 lore raw

PATCH v2 5/8 package/mosquitto: add option for websockets

In reply to [email protected]

From: "Yann E. MORIN" <[email protected]>

Mosquitto 2.1.x adds the possibility to use a builtin websocket implementation, as an alternative to using libwebsockets.

When using libwebsockets as the implementation, only the broker supports websockets, and CLI tools do not; only when using the builtin one are websockets usable with CLI tools (and the broker, of course).

Add a choice to select what type of websockets support to enable, if any. Since the builtin implementation is still new, we keep the libwebsockets one available.

Since this inverts the dependency logic to libwebsockets, we can't provide a backward compatibility with existing (def)config files.

Cc Peter Korsgaard <[email protected]>
Cc Titouan Christophe <[email protected]>
---
 package/mosquitto/Config.in    | 25 ++++++++++++++++++++++++-
 package/mosquitto/mosquitto.mk |  4 +++-
 2 files changed, 27 insertions(+), 2 deletions(-)
package/mosquitto/Config.in +24 -1
index c19d80c943..6e0644e9b6 100644
@@ -49,10 +49,33 @@ config BR2_PACKAGE_MOSQUITTO_APPS
 	    mosquitto_ctrl
 	    mosquitto_passwd
 
+choice
+	prompt "Websockets support"
+	help
+	  Choose what websocket implementation to use. Note that
+	  the mosquitto_{sub,pub,rr} clients (above) only support
+	  websockets with the builtin implementation, while the
+	  broker supports websockets with either libwebsockets
+	  or the builtin implementation.
+
+config BR2_PACKAGE_MOSQUITTO_WS_NONE
+	bool "none"
+
+config BR2_PACKAGE_MOSQUITTO_WS_LIBWS
+	bool "with libwebsockets"
+	select BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_LIBWEBSOCKETS
+	select BR2_PACKAGE_LIBWEBSOCKETS_EXT_POLL
+
+config BR2_PACKAGE_MOSQUITTO_WS_BUILTIN
+	bool "with builtin implementation"
+	select BR2_PACKAGE_OPENSSL
+
+endchoice
+
 config BR2_PACKAGE_MOSQUITTO_BROKER
 	bool "install the mosquitto broker"
 	default y
-	select BR2_PACKAGE_LIBWEBSOCKETS_EXT_POLL if BR2_PACKAGE_LIBWEBSOCKETS
 	help
 	  Build and install the mosquitto broker onto target.
 
package/mosquitto/mosquitto.mk +3 -1
index 1cfc052003..f63170daef 100644
@@ -41,9 +41,11 @@ MOSQUITTO_CONF_OPTS += \
 	-DWITH_TLS=ON \
 	-DWITH_TLS_PSK=ON
 
-ifeq ($(BR2_PACKAGE_LIBWEBSOCKETS),y)
+ifeq ($(BR2_PACKAGE_MOSQUITTO_WS_LIBWS),y)
 MOSQUITTO_DEPENDENCIES += libwebsockets
 MOSQUITTO_CONF_OPTS += -DWITH_WEBSOCKETS=ON -DWITH_WEBSOCKETS_BUILTIN=OFF
+else ifeq ($(BR2_PACKAGE_MOSQUITTO_WS_BUILTIN),y)
+MOSQUITTO_CONF_OPTS += -DWITH_WEBSOCKETS=ON -DWITH_WEBSOCKETS_BUILTIN=ON
 else
 MOSQUITTO_CONF_OPTS += -DWITH_WEBSOCKETS=OFF -DWITH_WEBSOCKETS_BUILTIN=OFF
 endif
Signature · 18 lines
2.34.1

____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#6 lore raw

PATCH v2 6/8 package/mosquitto: enable HTTP API with libmicrohttpd

In reply to [email protected]

From: "Yann E. MORIN" <[email protected]>

The mosquitto broker (not the library) can have listeners configured to serve HTTP requests; it can optionally accept (some) HTTP API requests on such listeners.

Add a new option to enable the availablility of http_pi.

Note that we do not just depend on libmicrohttpd to be anbled, because the HTTP API is a security boundary, and enabling it must be n explicit decision.

[[email protected]: make it an explicit option]
Cc Peter Korsgaard <[email protected]>
Cc Titouan Christophe <[email protected]>
---
 package/mosquitto/Config.in    | 12 +++++++++++-
 package/mosquitto/mosquitto.mk | 10 ++++++++--
 2 files changed, 19 insertions(+), 3 deletions(-)
package/mosquitto/Config.in +11 -1
index 6e0644e9b6..3df6131a5d 100644
@@ -79,14 +79,24 @@ config BR2_PACKAGE_MOSQUITTO_BROKER
 	help
 	  Build and install the mosquitto broker onto target.
 
+if BR2_PACKAGE_MOSQUITTO_BROKER
+
+config BR2_PACKAGE_MOSQUITTO_BROKER_HTTP_API
+	bool "http_api"
+	select BR2_PACKAGE_LIBMICROHTTPD
+	help
+	  Add support for simple webserver as a listener to serve
+	  some of the HTTP API.
+
 config BR2_PACKAGE_MOSQUITTO_BROKER_DYNAMIC_SECURITY_PLUGIN
 	bool "dynamic security plugin"
-	depends on BR2_PACKAGE_MOSQUITTO_BROKER
 	select BR2_PACKAGE_OPENSSL
 	help
 	  Build and install the dynamic security plugin for
 	  mosquitto broker onto target.
 
+endif
+
 comment "mosquitto broker needs a toolchain w/ dynamic library"
 	depends on BR2_STATIC_LIBS
 
package/mosquitto/mosquitto.mk +8 -2
index f63170daef..ffd9c19e30 100644
@@ -18,8 +18,7 @@ MOSQUITTO_CONF_OPTS = \
 	-DWITH_DOCS=OFF \
 	-DWITH_TESTS=OFF \
 	-DWITH_STATIC_LIBRARIES=OFF \
-	-DWITH_BUNDLED_DEPS=ON \
-	-DWITH_HTTP_API=OFF
+	-DWITH_BUNDLED_DEPS=ON
 
 # adns uses getaddrinfo_a
 ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
@@ -64,6 +63,13 @@ else
 MOSQUITTO_CONF_OPTS += -DWITH_SRV=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_MOSQUITTO_BROKER_HTTP_API),y)
+MOSQUITTO_DEPENDENCIES += libmicrohttpd
+MOSQUITTO_CONF_OPTS += -DWITH_HTTP_API=ON
+else
+MOSQUITTO_CONF_OPTS += -DWITH_HTTP_API=OFF
+endif
+
 ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
 MOSQUITTO_CONF_OPTS += -DWITH_LIB_CPP=ON
 else
Signature · 18 lines
2.34.1

____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#7 lore raw

PATCH v2 7/8 package/mosquitto: add options for password and ACL plugin

In reply to [email protected]

From: "Yann E. MORIN" <[email protected]>

Until version 2.0.x, support for using static password or ACL files, was builtin to the broker. With version 2.1.x, two new plugins have been introdiuced to replace the builtin support, which is now deprecated and will get removed in the next version.

Add two new configuration ooptions for those plugins.

We decded to do a single commit, rather than one per option, because they are relatively tied together (ACL needs passwords, at least).

We also choose to make those options enabled by default, because the traditional way to configure mosquitto is to use static files for authentication and authorization, and the builtin support if now deprecated in favour for the plugins.

Cc Peter Korsgaard <[email protected]>
Cc Titouan Christophe <[email protected]>
---
 package/mosquitto/Config.in    | 14 ++++++++++++++
 package/mosquitto/mosquitto.mk | 14 ++++++++++++--
 2 files changed, 26 insertions(+), 2 deletions(-)
package/mosquitto/Config.in +14 -0
index 3df6131a5d..f7bd5a01b8 100644
@@ -88,6 +88,20 @@ config BR2_PACKAGE_MOSQUITTO_BROKER_HTTP_API
 	  Add support for simple webserver as a listener to serve
 	  some of the HTTP API.
 
+config BR2_PACKAGE_MOSQUITTO_BROKER_PLUGIN_STATIC_PASSWD
+	bool "static password file plugin"
+	default y
+	help
+	  Add support for authentication based on static files. using
+	  a plugin rather than the legacy builtin support.
+
+config BR2_PACKAGE_MOSQUITTO_BROKER_PLUGIN_STATIC_ACL
+	bool "static ACL file plugin"
+	default y
+	help
+	  Add support for authorization (ACL) based on static files,
+	  using a plugin rather than the legacy builtin support.
+
 config BR2_PACKAGE_MOSQUITTO_BROKER_DYNAMIC_SECURITY_PLUGIN
 	bool "dynamic security plugin"
 	select BR2_PACKAGE_OPENSSL
package/mosquitto/mosquitto.mk +12 -2
index ffd9c19e30..4d0f51176c 100644
@@ -95,12 +95,22 @@ MOSQUITTO_CONF_OPTS += \
 	-DCMAKE_INSTALL_SYSCONFDIR=/etc \
 	-DWITH_BROKER=ON \
 	-DWITH_PLUGINS=ON \
-	-DWITH_PLUGIN_ACL_FILE=ON \
-	-DWITH_PLUGIN_PASSWORD_FILE=ON \
 	-DWITH_PLUGIN_EXAMPLES=OFF \
 	-DWITH_PLUGIN_PERSIST_SQLITE=OFF \
 	-DWITH_PLUGIN_SPARKPLUG_AWARE=OFF
 
+ifeq ($(BR2_PACKAGE_MOSQUITTO_BROKER_PLUGIN_STATIC_PASSWD),y)
+MOSQUITTO_CONF_OPTS += -DWITH_PLUGIN_PASSWORD_FILE=ON
+else
+MOSQUITTO_CONF_OPTS += -DWITH_PLUGIN_PASSWORD_FILE=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_MOSQUITTO_BROKER_PLUGIN_STATIC_ACL),y)
+MOSQUITTO_CONF_OPTS += -DWITH_PLUGIN_ACL_FILE=ON
+else
+MOSQUITTO_CONF_OPTS += -DWITH_PLUGIN_ACL_FILE=OFF
+endif
+
 ifeq ($(BR2_PACKAGE_MOSQUITTO_BROKER_DYNAMIC_SECURITY_PLUGIN),y)
 MOSQUITTO_CONF_OPTS += -DWITH_PLUGIN_DYNAMIC_SECURITY=ON
 else
Signature · 18 lines
2.34.1

____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#8 lore raw

PATCH v2 8/8 package/mosquitto: add option to enable the persist-sqlite plugin

In reply to [email protected]

From: "Yann E. MORIN" <[email protected]>

That plugin can be used instead of the builtin support to persist the mosquitto state across restarts.

Cc Peter Korsgaard <[email protected]>
Cc Titouan Christophe <[email protected]>
---
 package/mosquitto/Config.in    | 7 +++++++
 package/mosquitto/mosquitto.mk | 8 +++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)
package/mosquitto/Config.in +7 -0
index f7bd5a01b8..b57abbe982 100644
@@ -109,6 +109,13 @@ config BR2_PACKAGE_MOSQUITTO_BROKER_DYNAMIC_SECURITY_PLUGIN
 	  Build and install the dynamic security plugin for
 	  mosquitto broker onto target.
 
+config BR2_PACKAGE_MOSQUITTO_BROKER_PLUGIN_PERSIST_SQLITE
+	bool "persist-sqlite plugin"
+	select BR2_PACKAGE_SQLITE
+	help
+	  Add the persist-sqlite plugin, to persist the broker
+	  state across restarts.
+
 endif
 
 comment "mosquitto broker needs a toolchain w/ dynamic library"
package/mosquitto/mosquitto.mk +7 -1
index 4d0f51176c..0650cfa37a 100644
@@ -96,7 +96,6 @@ MOSQUITTO_CONF_OPTS += \
 	-DWITH_BROKER=ON \
 	-DWITH_PLUGINS=ON \
 	-DWITH_PLUGIN_EXAMPLES=OFF \
-	-DWITH_PLUGIN_PERSIST_SQLITE=OFF \
 	-DWITH_PLUGIN_SPARKPLUG_AWARE=OFF
 
 ifeq ($(BR2_PACKAGE_MOSQUITTO_BROKER_PLUGIN_STATIC_PASSWD),y)
@@ -117,6 +116,13 @@ else
 MOSQUITTO_CONF_OPTS += -DWITH_PLUGIN_DYNAMIC_SECURITY=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_MOSQUITTO_BROKER_PLUGIN_PERSIST_SQLITE),y)
+MOSQUITTO_DEPENDENCIES += sqlite
+MOSQUITTO_CONF_OPTS += -DWITH_PLUGIN_PERSIST_SQLITE=OM
+else
+MOSQUITTO_CONF_OPTS += -DWITH_PLUGIN_PERSIST_SQLITE=OFF
+endif
+
 ifeq ($(BR2_PACKAGE_SYSTEMD),y)
 MOSQUITTO_CONF_OPTS += -DWITH_SYSTEMD=ON
 MOSQUITTO_DEPENDENCIES += systemd
Signature · 18 lines
2.34.1

____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot