From: Romain Naour via buildroot <buildroot@buildroot.org>
To: buildroot@buildroot.org
Subject: [Buildroot] [git commit] package/mosquitto: add option for websockets
Date: Fri, 13 Mar 2026 21:22:37 +0100 [thread overview]
Message-ID: <20260313203629.58AB586F30@busybox.osuosl.org> (raw)
commit: https://gitlab.com/buildroot.org/buildroot/-/commit/c5ed4f52235293b9b6bc26d435e5484e461cbb6d
branch: https://gitlab.com/buildroot.org/buildroot/-/tree/master
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.
Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
Cc: Titouan Christophe <titouan.christophe@mind.be>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
package/mosquitto/Config.in | 25 ++++++++++++++++++++++++-
package/mosquitto/mosquitto.mk | 4 +++-
2 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/package/mosquitto/Config.in b/package/mosquitto/Config.in
index 754c07be78..789e30f97f 100644
--- a/package/mosquitto/Config.in
+++ b/package/mosquitto/Config.in
@@ -24,6 +24,30 @@ config BR2_PACKAGE_MOSQUITTO
if BR2_PACKAGE_MOSQUITTO
+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_CLIENTS
bool "install clients"
default y # Backward compatibility
@@ -52,7 +76,6 @@ config BR2_PACKAGE_MOSQUITTO_APPS
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.
diff --git a/package/mosquitto/mosquitto.mk b/package/mosquitto/mosquitto.mk
index a1848f96b3..9b3bcc1cf5 100644
--- a/package/mosquitto/mosquitto.mk
+++ b/package/mosquitto/mosquitto.mk
@@ -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
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
reply other threads:[~2026-03-13 20:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260313203629.58AB586F30@busybox.osuosl.org \
--to=buildroot@buildroot.org \
--cc=romain.naour@smile.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox