diff mbox series

[meta-networking] mosquitto: install default mosquitto.conf for systemd compatibility

Message ID 20260415015338.1477469-1-ricardo.salveti@oss.qualcomm.com
State New
Headers show
Series [meta-networking] mosquitto: install default mosquitto.conf for systemd compatibility | expand

Commit Message

Ricardo Salveti April 15, 2026, 1:53 a.m. UTC
The upgrade to mosquitto 2.1.2 follows an upstream change where the
default configuration file is only installed as
${sysconfdir}/mosquitto/mosquitto.conf.example.

However, the shipped systemd service explicitly starts mosquitto using
${sysconfdir}/mosquitto/mosquitto.conf. If this file is not present, the
daemon exits immediately and the service fails to start.

Install the default mosquitto.conf alongside the example file, using the
upstream-provided configuration, to match the expectations of the
service unit and ensure the service starts correctly by default, as done
with the 2.0.22 version.

Signed-off-by: Ricardo Salveti <ricardo.salveti@oss.qualcomm.com>
---
 .../recipes-connectivity/mosquitto/mosquitto_2.1.2.bb           | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/meta-networking/recipes-connectivity/mosquitto/mosquitto_2.1.2.bb b/meta-networking/recipes-connectivity/mosquitto/mosquitto_2.1.2.bb
index 6a6e554453..8bb6c9009d 100644
--- a/meta-networking/recipes-connectivity/mosquitto/mosquitto_2.1.2.bb
+++ b/meta-networking/recipes-connectivity/mosquitto/mosquitto_2.1.2.bb
@@ -57,6 +57,8 @@  do_install:append() {
         -e 's,@LOCALSTATEDIR@,${localstatedir},g' \
         -e 's,@SYSCONFDIR@,${sysconfdir},g' \
         ${D}${sysconfdir}/init.d/mosquitto
+
+    install -m 0644 ${S}/mosquitto.conf ${D}${sysconfdir}/mosquitto/mosquitto.conf
 }
 
 PACKAGE_BEFORE_PN = "libmosquitto1 libmosquittopp1 ${PN}-clients ${PN}-examples"