mosquitto: fix build in systemd environments
PATCH 1/2 mosquitto: fix build in systemd environments
From: André Draszik <[email protected]>
The mosquitto systemd service file instructs systemd to wait for mosquitto to notify systemd that mosquitto has started correctly. This isn't working as mosquitto is not *compiled* with systemd support enabled. As such, systemd restarts mosquitto every few seconds.
For reference, this was introduced in commit a483d344d9fb ("mosquitto: Make enabling systemd also enable build dep on systemd")
Because we build mosquitto using the provided Makefile infrastructure, the solution is to add PACKAGECONFIG_CONFARGS to EXTRA_OEMAKE, so that the required make flags are added to the make command line.
---
This is a backport from master. Patch has been modified to apply cleanly on the mosquitto_1.5.1.bb recipe.
.../recipes-connectivity/mosquitto/mosquitto_1.5.1.bb | 1 + 1 file changed, 1 insertion(+)
meta-networking/recipes-connectivity/mosquitto/mosquitto_1.5.1.bb +1 -0
@@ -38,6 +38,7 @@ EXTRA_OEMAKE = " \ ${@bb.utils.contains('PACKAGECONFIG', 'ssl', 'WITH_TLS=yes WITH_TLS_PSK=yes', 'WITH_TLS=no WITH_TLS_PSK=no', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'uuid', 'WITH_UUID=yes', 'WITH_UUID=no', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'websockets', 'WITH_WEBSOCKETS=yes', 'WITH_WEBSOCKETS=no', d)} \ + ${PACKAGECONFIG_CONFARGS} \ STRIP=/bin/true \ WITH_DOCS=no \ "
Signature · 1 line
2.21.0
PATCH 2/2 mosquitto: fully switch over to using PACKAGECONFIG_CONFARGS
From: André Draszik <[email protected]>
Convert all other instances of explicit PACKAGECONFIG uses to the PACKAGECONFIG_CONFARGS infrastructure.
--- .../mosquitto/mosquitto_1.5.1.bb | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
meta-networking/recipes-connectivity/mosquitto/mosquitto_1.5.1.bb +4 -8
@@ -24,20 +24,16 @@ PACKAGECONFIG ??= "ssl uuid \ ${@bb.utils.filter('DISTRO_FEATURES','systemd', d)} \ " -PACKAGECONFIG[dns-srv] = ",,c-ares" -PACKAGECONFIG[ssl] = ",,openssl" -PACKAGECONFIG[uuid] = ",,util-linux" +PACKAGECONFIG[dns-srv] = "WITH_SRV=yes,WITH_SRV=no,c-ares" +PACKAGECONFIG[ssl] = "WITH_TLS=yes WITH_TLS_PSK=yes,WITH_TLS=no WITH_TLS_PSK=no,openssl" +PACKAGECONFIG[uuid] = "WITH_UUID=yes,WITH_UUID=no,util-linux" PACKAGECONFIG[systemd] = "WITH_SYSTEMD=yes,WITH_SYSTEMD=no,systemd" -PACKAGECONFIG[websockets] = ",,libwebsockets" +PACKAGECONFIG[websockets] = "WITH_WEBSOCKETS=yes,WITH_WEBSOCKETS=no,libwebsockets" EXTRA_OEMAKE = " \ prefix=${prefix} \ mandir=${mandir} \ localedir=${localedir} \ - ${@bb.utils.contains('PACKAGECONFIG', 'dns-srv', 'WITH_SRV=yes', 'WITH_SRV=no', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'ssl', 'WITH_TLS=yes WITH_TLS_PSK=yes', 'WITH_TLS=no WITH_TLS_PSK=no', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'uuid', 'WITH_UUID=yes', 'WITH_UUID=no', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'websockets', 'WITH_WEBSOCKETS=yes', 'WITH_WEBSOCKETS=no', d)} \ ${PACKAGECONFIG_CONFARGS} \ STRIP=/bin/true \ WITH_DOCS=no \
Signature · 1 line
2.21.0
Quoted 17 lines · Damien Riegel
From: André Draszik <[email protected]>
The mosquitto systemd service file instructs systemd to wait for mosquitto to notify systemd that mosquitto has started correctly. This isn't working as mosquitto is not *compiled* with systemd support enabled. As such, systemd restarts mosquitto every few seconds.
For reference, this was introduced in commit
a483d344d9fb("mosquitto: Make enabling systemd also enable build dep on systemd")Because we build mosquitto using the provided
Makefileinfrastructure, the solution is to addPACKAGECONFIG_CONFARGStoEXTRA_OEMAKE, so that the required make flags are added to the make command line.
Quoted 4 lines
Signed-off-by André Draszik <[email protected]>Signed-off-by Khem Raj <[email protected]>Signed-off-by Damien Riegel <[email protected]>[Damien Riegel: backport from master]
Armin, did you get a chance to take a look at these backport patches?
Thank you,
Signature · 1 line
Damien
Quoted 17 lines · Damien Riegel
Quoted 16 lines · Damien Riegel
From: André Draszik <[email protected]>
The mosquitto systemd service file instructs systemd to wait for mosquitto to notify systemd that mosquitto has started correctly. This isn't working as mosquitto is not *compiled* with systemd support enabled. As such, systemd restarts mosquitto every few seconds.
For reference, this was introduced in commit
a483d344d9fb("mosquitto: Make enabling systemd also enable build dep on systemd")Because we build mosquitto using the provided
Makefileinfrastructure, the solution is to addPACKAGECONFIG_CONFARGStoEXTRA_OEMAKE, so that the required make flags are added to the make command line.
Quoted 5 lines
Quoted 4 lines
Signed-off-by André Draszik <[email protected]>Signed-off-by Khem Raj <[email protected]>Signed-off-by Damien Riegel <[email protected]>[Damien Riegel: backport from master]Armin, did you get a chance to take a look at these backport patches?
Yes, i did.
https://git.openembedded.org/meta-openembedded-contrib/log/?h=stable/thud-nmut
should be moving them to thud-next shortly
- armin
Quoted 2 lines
Thank you,