Skip to contentSkip to conversation

package/mosquitto: bump version

RFC PATCH New [email protected] 1 participant 3 messages Feb 10

lore
Share & tools
lore
#1 lore raw

PATCH 1/2 package/cjson: add host variant

In reply to [email protected]

From: "Yann E. MORIN" <[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
#0 lore raw

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.

This is a preview version for preliminary review; new patches have been added, but I'm still in the process of signing the CLA to contribute them back upstream; when that's done, I'll update them with proper Upstream: tags.

Also as I have a bit of time, I'll address adding new features, especially websockets (with internal implementation), managing new plugins, making more things optional (e.g. for cases where only the broker is needed), etc...

Regards,
Yann E. MORIN.

The following changes since commit 6f4e61bff84fd601c45a00c72215deec8b513b39

package/libpng: security bump to version 1.6.55 (2026-02-10 13:22:18 +0100)

are available as patches in this mail series,

for you to apply patches up to 3f65ba4b87d826d45fc905c4e30b674f6cf7bf06

package/mosquitto: bump to version 2.1.2 (2026-02-10 16:55:06 +0100)

----------------------------------------------------------------
Yann E. MORIN (2):
package/cjson: add host variant
package/mosquitto: bump to version 2.1.2

 package/cjson/cjson.mk                             |   7 +
 ...eList-only-require-C-when-actually-needed.patch |  44 ++++++
 .../0001-Fix-CMake-builds-with-WITH_TLS-OFF.patch  |  50 ------
 .../0002-Add-configure-time-check-for-lanl.patch   |  47 ------
 ...2-broker-properly-check-for-getaddrinfo_a.patch |  38 +++++
 .../0003-libcommon-check-for-getrandom.patch       |  83 ++++++++++
 package/mosquitto/Config.in                        |  15 +-
 package/mosquitto/mosquitto.hash                   |   7 +-
 package/mosquitto/mosquitto.mk                     | 173 ++++++++++-----------
 9 files changed, 268 insertions(+), 196 deletions(-)
 create mode 100644 package/mosquitto/0001-CMakeList-only-require-C-when-actually-needed.patch
 delete mode 100644 package/mosquitto/0001-Fix-CMake-builds-with-WITH_TLS-OFF.patch
 delete mode 100644 package/mosquitto/0002-Add-configure-time-check-for-lanl.patch
 create mode 100644 package/mosquitto/0002-broker-properly-check-for-getaddrinfo_a.patch
 create mode 100644 package/mosquitto/0003-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

#2 lore raw

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

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 Titouan Christophe <[email protected]>
Cc Peter Korsgaard <[email protected]>

---

---
 ...-only-require-C-when-actually-needed.patch |  44 +++++
 ...1-Fix-CMake-builds-with-WITH_TLS-OFF.patch |  50 -----
 ...02-Add-configure-time-check-for-lanl.patch |  47 -----
 ...ker-properly-check-for-getaddrinfo_a.patch |  38 ++++
 .../0003-libcommon-check-for-getrandom.patch  |  83 +++++++++
 package/mosquitto/Config.in                   |  15 +-
 package/mosquitto/mosquitto.hash              |   7 +-
 package/mosquitto/mosquitto.mk                | 173 +++++++++---------
 8 files changed, 261 insertions(+), 196 deletions(-)
 create mode 100644 package/mosquitto/0001-CMakeList-only-require-C-when-actually-needed.patch
 delete mode 100644 package/mosquitto/0001-Fix-CMake-builds-with-WITH_TLS-OFF.patch
 delete mode 100644 package/mosquitto/0002-Add-configure-time-check-for-lanl.patch
 create mode 100644 package/mosquitto/0002-broker-properly-check-for-getaddrinfo_a.patch
 create mode 100644 package/mosquitto/0003-libcommon-check-for-getrandom.patch
package/mosquitto/0001-CMakeList-only-require-C-when-actually-needed.patch new file +44 -0
new file mode 100644
index 0000000000..0029466c32
@@ -0,0 +1,44 @@
+From 0e28d6c4a53a62ad9fa3f7d1fd97349d1084b054 Mon Sep 17 00:00:00 2001
+Message-Id: <0e28d6c4a53a62ad9fa3f7d1fd97349d1084b054.1770735837.git.yann.morin@orange.com>
+From: "Yann E. MORIN" <[email protected]>
+Date: Tue, 10 Feb 2026 07:13:01 +0100
+Subject: [PATCH] CMakeList: only require C++ when actually needed
+
+So far, C++ is unconditionally required, efven when not
+building the C++ wrapper library.
+
+Only require C++ when said library is actually enabled.
+
+Signed-off-by: Yann E. MORIN <[email protected]>
+Upstream: CLA under signature...
+---
+ CMakeLists.txt         | 2 +-
+ lib/cpp/CMakeLists.txt | 2 ++
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6c68bb9c..a4dbfdf6 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -10,7 +10,7 @@ set (VERSION 2.1.2)
+ project(mosquitto
+ 	VERSION ${VERSION}
+ 	DESCRIPTION "Eclipse Mosquitto"
+-	LANGUAGES C CXX
++	LANGUAGES C
+ )
+ 
+ set(CMAKE_C_STANDARD 99)
+diff --git a/lib/cpp/CMakeLists.txt b/lib/cpp/CMakeLists.txt
+index 2007f7a6..6bbd92bf 100644
+--- a/lib/cpp/CMakeLists.txt
++++ b/lib/cpp/CMakeLists.txt
+@@ -1,3 +1,5 @@
++ENABLE_LANGUAGE(CXX)
++
+ set(CPP_SRC mosquittopp.cpp ../../include/mosquitto/libmosquittopp.h)
+ 
+ add_library(mosquittopp SHARED
+-- 
+2.34.1
+
package/mosquitto/0001-Fix-CMake-builds-with-WITH_TLS-OFF.patch deleted +0 -50

50 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-broker-properly-check-for-getaddrinfo_a.patch new file +38 -0
new file mode 100644
index 0000000000..4aef8c5ba7
@@ -0,0 +1,38 @@
+From 876e2b791d2db118b0b0d36d315fa3480d7b8d8c Mon Sep 17 00:00:00 2001
+Message-Id: <876e2b791d2db118b0b0d36d315fa3480d7b8d8c.1770735837.git.yann.morin@orange.com>
+In-Reply-To: <0e28d6c4a53a62ad9fa3f7d1fd97349d1084b054.1770735837.git.yann.morin@orange.com>
+References: <0e28d6c4a53a62ad9fa3f7d1fd97349d1084b054.1770735837.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.
+
+Signed-off-by: Yann E. MORIN <[email protected]>
+Upstream: CLA under signature...
+---
+ 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/0003-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