Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

package/mosquitto: add mosquitto #227

Merged
merged 6 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
allow_anonymous true
listener 1883
protocol mqtt
1 change: 1 addition & 0 deletions configs/ot2_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,4 @@ BR2_LINUX_KERNEL_USE_DEFCONFIG=y
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/opentrons/ot2/kernel.config"
BR2_PACKAGE_RASPI_GPIO=y
BR2_PACKAGE_MOSQUITTO=y
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Upstream-Status: Submitted [https://github.com/eclipse/mosquitto/pull/1571]
From 3fe5468f1bdca1bff1d18cf43c9e338f41aa9e32 Mon Sep 17 00:00:00 2001
From: Gianfranco Costamagna <[email protected]>
Date: Wed, 22 Jan 2020 12:39:49 +0100
Subject: [PATCH] Add dynamic symbols linking with cmake too

Signed-off-by: Gianfranco Costamagna <[email protected]>
---
lib/CMakeLists.txt | 2 ++
1 file changed, 2 insertions(+)

--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -94,6 +94,8 @@
OUTPUT_NAME mosquitto
VERSION ${VERSION}
SOVERSION 1
+ LINK_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/linker.version
+ LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/linker.version"
)

install(TARGETS libmosquitto
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From: Joachim Zobel <[email protected]>
Date: Wed, 13 Sep 2023 09:55:34 +0200
Subject: [PATCH] Link correctly with shared websockets library if needed see:
https://github.com/eclipse/mosquitto/pull/2751

Patch contributed by Joachim Zobel <[email protected]> and Daniel Engberg <[email protected]>
---
Upstream-Status: Pending

src/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9380a04..dce8313 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -200,7 +200,7 @@ if (WITH_WEBSOCKETS)
link_directories(${mosquitto_SOURCE_DIR})
endif (WIN32)
else (STATIC_WEBSOCKETS)
- set (MOSQ_LIBS ${MOSQ_LIBS} websockets)
+ set (MOSQ_LIBS ${MOSQ_LIBS} websockets_shared)
endif (STATIC_WEBSOCKETS)
endif (WITH_WEBSOCKETS)
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From: Joachim Zobel <[email protected]>
Date: Wed, 13 Sep 2023 10:05:43 +0200
Subject: [PATCH] Mosquitto now waits for network-online when starting
(Closes: #1036450)

See: https://github.com/eclipse/mosquitto/issues/2878
---
Upstream-Status: Pending

service/systemd/mosquitto.service.simple | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/service/systemd/mosquitto.service.simple b/service/systemd/mosquitto.service.simple
index 15ee0d6..c2a330b 100644
--- a/service/systemd/mosquitto.service.simple
+++ b/service/systemd/mosquitto.service.simple
@@ -1,8 +1,8 @@
[Unit]
Description=Mosquitto MQTT Broker
Documentation=man:mosquitto.conf(5) man:mosquitto(8)
-After=network.target
-Wants=network.target
+After=network-online.target
+Wants=network-online.target

[Service]
ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
3 changes: 2 additions & 1 deletion package/mosquitto/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ config BR2_PACKAGE_MOSQUITTO_BROKER
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.

comment "mosquitto broker needs a toolchain w/ dynamic library"
depends on BR2_USE_MMU
depends on BR2_STATIC_LIBS
depends on BR2_PACKAGE_MOSQUITTO
depends on BR2_PACKAGE_MOSQUITTO
6 changes: 3 additions & 3 deletions package/mosquitto/mosquitto.hash
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Locally calculated after checking gpg signature
# from https://mosquitto.org/files/source/mosquitto-2.0.17.tar.gz.asc
sha256 3be7a911236567c1a9fbe25baf3e3167004ba4a0c151a448ef1f7fc077dba52f mosquitto-2.0.17.tar.gz
# from https://mosquitto.org/files/source/mosquitto-2.0.18.tar.gz.asc
sha256 d665fe7d0032881b1371a47f34169ee4edab67903b2cd2b4c083822823f4448a mosquitto-2.0.18.tar.gz

# License files
sha256 d3c4ccace4e5d3cc89d34cf2a0bc85b8596bfc0a32b815d0d77f9b7c41b5350c LICENSE.txt
sha256 8c349f80764d0648e645f41ef23772a70c995a0924b5235f735f4a3d09df127c epl-v20
sha256 86fc4a3f97cb769c04e8da557036c1066eb8bb22b2d0a5dd31464990fe84047c edl-v10
sha256 86fc4a3f97cb769c04e8da557036c1066eb8bb22b2d0a5dd31464990fe84047c edl-v10
4 changes: 2 additions & 2 deletions package/mosquitto/mosquitto.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
################################################################################

MOSQUITTO_VERSION = 2.0.17
MOSQUITTO_VERSION = 2.0.18
MOSQUITTO_SITE = https://mosquitto.org/files/source
MOSQUITTO_LICENSE = EPL-2.0 or EDLv1.0
MOSQUITTO_LICENSE_FILES = LICENSE.txt epl-v20 edl-v10
Expand Down Expand Up @@ -148,4 +148,4 @@ define HOST_MOSQUITTO_INSTALL_CMDS
endef

$(eval $(generic-package))
$(eval $(host-generic-package))
$(eval $(host-generic-package))
11 changes: 11 additions & 0 deletions package/mosquitto/mosquitto.service
mjhuff marked this conversation as resolved.
Show resolved Hide resolved
mjhuff marked this conversation as resolved.
Outdated
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Unit]
Description=Mosquitto MQTT broker
Before=opentrons-robot-server.service

[Service]
ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
ExecReload=/bin/kill -HUP $MAINPID
Restart=always

[Install]
WantedBy=multi-user.target
mjhuff marked this conversation as resolved.
Show resolved Hide resolved
Loading