From 53a885e48c1ad4a1f4b76e70f7d182161873d2df Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Thu, 26 Feb 2026 16:53:58 +0100 Subject: [PATCH] package/mosquitto: add option to build broker-related apps 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. Signed-off-by: Yann E. MORIN Cc: Fiona Klute Cc: Peter Korsgaard Cc: Titouan Christophe Signed-off-by: Romain Naour --- package/mosquitto/Config.in | 16 ++++++++++++++++ package/mosquitto/mosquitto.mk | 12 ++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/package/mosquitto/Config.in b/package/mosquitto/Config.in index 417745873b..754c07be78 100644 --- a/package/mosquitto/Config.in +++ b/package/mosquitto/Config.in @@ -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 diff --git a/package/mosquitto/mosquitto.mk b/package/mosquitto/mosquitto.mk index 62934966ca..a1848f96b3 100644 --- a/package/mosquitto/mosquitto.mk +++ b/package/mosquitto/mosquitto.mk @@ -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 \ @@ -125,7 +130,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