Skip to content

Commit be27a21

Browse files
author
gdt
committed
net/mosquitto: Update to 2.1.0
Tested to run on NetBSD 9 amd64, and to build on various NetBSD 9/10 i386, amd64 earvm7, aarch64. 2.1.0 - 2026-01-29 ================== # Broker ## Deprecations - The acl_file option is deprecated in favour of the acl-file plugin, which is the same code but moved into a plugin. The acl_file option will be removed in 3.0. - The password_file option is deprecated in favour of the password-file plugin, which is the same code but moved into a plugin. The password_file option will be removed in 3.0. - The per_listener_settings option is deprecated in favour of the new listener specific options. The per_listener_settings option will be removed in 3.0. ## Behaviour changes - max_packet_size now defaults to 2,000,000 bytes instead of the 256MB MQTT limit. If you are using payloads that will result in a packet larger than this, you need to manually set the option to a value that suits your application. - acl_file and password_file will produce an error on invalid input when reloading the config, causing the broker to quit. ## Protocol related - Add support for broker created topic aliases. Topics are allocated on a first come first serve basis. - Add support for bridges to allow remote brokers to create topic aliases when running in MQTT v5 mode. - Enforce receive maximum on MQTT v5. - Return protocol error if a client attemps to subscribe to a shared subscription and also sets no-local. - Protocol version numbers reported in the log when a client connects now match the MQTT protocol version numbers, not internal Mosquitto values. - Send DISCONNECT With session-takeover return code to MQTT v5 clients when a client connects with the same client id. Closes #2340. - The `allow_duplicate_messages` now defaults to `true`. - Add `accept_protocol_versions` option to allow limiting which MQTT protocol versions are allowed for a particular listener. ## TLS related - Add `--tls-keylog` option which can be used to generate a file that can be used by wireshark to decrypt TLS traffic for debugging purposes. Closes #1818. - Add `disable_client_cert_date_checks` option to allow expired client certificate to be considered valid. - Add `bridge_tls_use_os_certs` option to allow bridges to be easily configured to trust default CA certificates. Closes #2473. - Remove support for TLS v1.1 (clients only - it remains available in the broker but is now undocumented) - Use openssl provided function for x509 certificate hostname verification, rather than own function. ## Bridge related - Add `bridge_receive_maximum` option for MQTT v5.0 bridges. - Add `bridge_session_expiry_interval` option for MQTT v5.0 bridges. - Bridge reconnection backoff improvements. ## Transport related - Add the `websockets_origin` option to allow optional enforcement of origin when a connection attempts an upgrade to WebSockets. - Add built-in websockets support that doesn't use libwebsockets. This is the preferred websockets implementation. - Add support for X-Forwarded-For header for built in websockets. - Add suport for PROXY protocol v1 and v2. ## Platform specific - Increase maximum connection count on Windows from 2048 to 8192 where supported. Closes #2122. - Allow multiple instances of mosquitto to run as services on Windows. See README-windows.txt. - Add kqueue support. - Add support for systemd watchdog. ## General - Report on what compile time options are enabled. Closes #2193. - Performance: reduce memory allocations when sending packets. - Log protocol version and ciphers that a client negotiates when connecting. - Password salts are now 64 bytes long. - Add the `global_plugin` option, which gives global plugin loaded regardless of `per_listener_settings`. - Add `global_max_clients` option to allow limiting client sessions globally on the broker. - Add `global_max_connections` option to allow limiting client connections globally on the broker. - Improve idle performance. The broker now calculates when the next event of interest is, and uses that as the timeout for e.g. `epoll_wait()`. This can reduce the number of process wakeups by 100x on an idle broker. - Add more efficient keepalive check. - Add support for sending the SIGRTMIN signal to trigger log rotation. Closes #2337. - Add `--test-config` option which can be used to test a configuration file before trying to use it in a live broker. Closes #2521. - Add support for PUID/PGID environment variables for setting the user/group to drop privileges to. Closes #2441. - Report persistence stats when starting. - $SYS updates are now aligned to `sys_interval` seconds, meaning that if set to 10, for example, updates will be sent at times matching x0 seconds. Previously update intervals were aligned to the time the broker was started. - Add `log_dest android` for logging to the Android logd daemon. - Fix some retained topic memory not being cleared immediately after used. - Add -q option to allow logging to be disabled at the command line. - Log message if a client attempts to connect with TLS to a non-TLS listener. - Add `listener_allow_anonymous` option. - Add `listener_auto_id_prefix` option. - Allow seconds when defining `persistent_client_expiration`. ## Plugin interface - Add `mosquitto_topic_matches_sub_with_pattern()`, which can match against subscriptions with `%c` and `%u` patterns for client id / username substitution. - Add support for modifying outgoing messages using `MOSQ_EVT_MESSAGE_OUT`. - Add `mosquitto_client()` function for retrieving a client struct if that client is connected. - Add `MOSQ_ERR_PLUGIN_IGNORE` to allow plugins to register basic auth or acl check callbacks, but still act as though they are not registered. A plugin that wanted to act as a blocklist for certain usernames, but wasn't carrying out authentication could return `MOSQ_ERR_PLUGIN_IGNORE` for usernames not on its blocklist. If no other plugins were configured, the client would be authenticated. Using `MOSQ_ERR_PLUGIN_DEFER` instead would mean the clients would be denied if no other plugins were configured. - Add `mosquitto_client_port()` function for plugins. - Add `MOSQ_EVT_CONNECT`, to allow plugins to know when a client has successfully authenticated to the broker. - Add connection-state example plugin to demonstrate `MOSQ_EVT_CONNECT`. - Add `MOSQ_EVT_CLIENT_OFFLINE`, to allow plugins to know when a client with a non-zero session expiry interval has gone offline. - Plugins on non-Windows platforms now no longer make their symbols globally available, which means they are self contained. - Add support for delayed basic authentication in plugins. - Plugins using the `MOSQ_EVT_MESSAGE_WRITE` callback can now return `MOSQ_ERR_QUOTA_EXCEEDED` to have the message be rejected. MQTT v5 clients using QoS 1 or 2 will receive the quota-exceeded reason code in the corresponding PUBACK/PUBREC. - `MOSQ_EVT_TICK` is now passed to plugins when `per_listener_settings` is true. - Add `mosquitto_sub_matches_acl()`, which can match one topic filter (a subscription) against another topic filter (an ACL). - Registration of the `MOSQ_EVT_CONTROL` plugin event is now handled globally across the broker, so only a single plugin can register for a given $CONTROL topic. - Add `mosquitto_plugin_set_info()` to allow plugins to tell the broker their name and version. - Add builtin $CONTROL/broker/v1 control topic with the `listPlugins` command. This is disabled by default, but can be enabled with the `enable_control_api` option. - Plugins no longer need to define `mosquitto_plugin_cleanup()` if they do not need to do any of their own cleanup. Callbacks will be unregistered automatically. - Add `mosquitto_set_clientid()` to allow plugins to force a client id for a client. - Add `MOSQ_EVT_SUBSCRIBE` and `MOSQ_EVT_UNSUBSCRIBE` events that are called when subscribe/unsubscribes actually succeed. Allow modifying topic and qos. - Add `mosquitto_persistence_location()` for plugins to use to find a valid location for storing persistent data. - Plugins can now use the `next_s` and `next_ms` members of the tick event data struct to set a minimum interval that the broker will wait before calling the tick callback again. - MOSQ_EVT_ACL_CHECK event is now passed message properties where possible. # Plugins - Add acl-file plugin. - Add password-file plugin. - Add persist-sqlite plugin. - Add sparkplug-aware plugin. # Dynamic security plugin - Add ability to deny wildcard subscriptions for a role to the dynsec plugin. - The dynamic security plugin now only kicks clients at the start of the next network loop, to give chance for PUBACK/PUBREC to be sent. Closes #2474. - The dynamic security plugin now reports client connections in getClient and listClients. - The dynamic security plugin now generates an initial configuration if none is present, including a set of default roles. - The dynamic security plugin now supports `%c` and `%u` patterns for substituting client id and username respectively, in all ACLs except for subscribeLiteral and unsubscribeLiteral. - The dynamic security plugin now supports multiple ways to initialise the first configuration file. # Client library - Add `MOSQ_OPT_DISABLE_SOCKETPAIR` to allow the disabling of the socketpair feature that allows the network thread to be woken from select() by another thread when e.g. `mosquitto_publish()` is called. This reduces the number of sockets used by each client by two. - Add `on_pre_connect()` callback to allow clients to update username/password/TLS parameters before an automatic reconnection. - Callbacks no longer block other callbacks, and can be set from within a callback. Closes #2127. - Add support for MQTT v5 broker to client topic aliases. - Add `mosquitto_topic_matches_sub_with_pattern()`, which can match against subscriptions with `%c` and `%u` patterns for client id / username substitution. - Add `mosquitto_sub_matches_acl()`, which can match one topic filter (a subscription) against another topic filter (an ACL). - Add `mosquitto_sub_matches_acl_with_pattern()`, which can match one topic filter (a subscription) against another topic filter (an ACL), with `%c` and `%u` patterns for client id / username substitution. - Performance: reduce memory allocations when sending packets. - Reintroduce threading support for Windows. Closes #1509. - `mosquitto_subscribe*()` now returns `MOSQ_ERR_INVAL` if an empty string is passed as a topic filter. - `mosquitto_unsubscribe*()` now returns `MOSQ_ERR_INVAL` if an empty string is passed as a topic filter. - Add websockets support. - `mosquitto_property_read_binary/string/string_pair` will now set the name/value parameter to NULL if the binary/string is empty. This aligns the behaviour with other property functions. Closes #2648. - Add `mosquitto_unsubscribe2_v5_callback_set`, which provides a callback that gives access to reason codes for each of the unsubscription requests. - Add `mosquitto_property_remove`, for removing properties from property lists. - Add `on_ext_auth()` callback to allow handling MQTT v5 extended authentication. - Add `mosquitto_ext_auth_continue()` function to continue an MQTT v5 extended authentication. - Remove support for TLS v1.1. - Use openssl provided function for x509 certificate hostname verification, rather than own function. # Clients ## General - Add `-W` timeout support to Windows. - The `--insecure` option now disables all server certificate verification. - Add websockets support. - Using `-x` now sets the clients to use MQTT v5.0. - Fix parsing of IPv6 addresses in socks proxy urls. - Add `--tls-keylog` option which can be used to generate a file that can be used by wireshark to decrypt TLS traffic for debugging purposes. - Remove support for TLS v1.1. ## mosquitto_rr - Fix `-f` and `-s` options in mosquitto_rr. - Add `--latency` option to mosquitto_rr, for printing the request/response latency. - Add `--retain-handling` option. ## mosquitto_sub - Fix incorrect output formatting in mosquitto_sub when using field widths with `%x` and `%X` for printing the payload in hex. - Add float printing option to mosquitto_sub. - mosquitto_sub payload hex output can now be split by fixed field length. - Add `--message-rate` option to mosquitto_sub, for printing the count of messages received each second. - Add `--retain-handling` option. # Apps ## mosquitto_signal - Add `mosquitto_signal` for helping send signals to mosquitto on Windows. ## mosquitto_ctrl - Add interactive shell mode to mosquitto_ctrl. - Add support for `listPlugins` to mosquitto_ctrl. - Allow mosquitto_ctrl dynsec module to update passwords in files rather than having to connect to a broker. ## mosquitto_passwd - Print messages in mosquitto_passwd when adding/updating passwords. Closes #2544. - When creating a new file with `-c`, setting the output filename to a dash `-` will output the result to stdout. ## mosquitto_db_dump - Add `--json` output mode do mosquitto_db_dump. # Build - Increased CMake minimal required version to 3.14, which is required for the preinstalled SQLite3 find module. - Add an CMake option `WITH_LTO` to enable/disable link time optimization. - Set C99 as the explicit, rather than implicit, build standard. - cJSON is now a required dependency. - Refactored headers for easier discovery. - Support for openssl < 3.0 removed.
1 parent a59c265 commit be27a21

8 files changed

Lines changed: 540 additions & 98 deletions

File tree

net/mosquitto/Makefile

Lines changed: 35 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# $NetBSD: Makefile,v 1.43 2025/07/12 12:56:07 gdt Exp $
1+
# $NetBSD: Makefile,v 1.44 2026/01/30 01:07:56 gdt Exp $
22

3-
DISTNAME= mosquitto-2.0.22
3+
DISTNAME= mosquitto-2.1.0
44
CATEGORIES= net
55
MASTER_SITES= https://mosquitto.org/files/source/
66

@@ -9,24 +9,28 @@ HOMEPAGE= https://mosquitto.org/
99
COMMENT= Open Source MQTT broker
1010
LICENSE= epl-v1.0
1111

12-
TOOL_DEPENDS+= libxslt-[0-9]*:../../textproc/libxslt
13-
TOOL_DEPENDS+= docbook-xsl-[0-9]*:../../textproc/docbook-xsl
14-
15-
USE_LANGUAGES+= c c++
12+
USE_LANGUAGES+= c c++
13+
# Upstream does not document required compiler versions in
14+
# README_compiling.md, but CMakeLists.txt says c99 and c++17
15+
USE_CC_FEATURES= c99
16+
USE_CXX_FEATURES= c++17
1617

1718
# \todo File a bug upstream.
18-
LDFLAGS.SunOS+= -lsocket -lnsl
19+
LDFLAGS.SunOS+= -lsocket -lnsl
1920

20-
CMAKE_CONFIGURE_ARGS+= -DCMAKE_INSTALL_SYSCONFDIR=${PREFIX}/share/examples
21-
CMAKE_CONFIGURE_ARGS+= -DWITH_PLUGINS=NO
21+
USE_TOOLS+= pkg-config
22+
23+
# \todo Consider WITH_DOCS=no.
24+
TOOL_DEPENDS+= libxslt-[0-9]*:../../textproc/libxslt
25+
TOOL_DEPENDS+= docbook-xsl-[0-9]*:../../textproc/docbook-xsl
2226

2327
MOSQUITTO_USER= mosquitto
2428
MOSQUITTO_GROUP= mosquitto
2529

2630
PKG_USERS= ${MOSQUITTO_USER}:${MOSQUITTO_GROUP}
2731
PKG_GROUPS= ${MOSQUITTO_GROUP}
2832

29-
CONF_FILES= ${PREFIX}/share/examples/mosquitto/mosquitto.conf \
33+
CONF_FILES= ${PREFIX}/share/examples/mosquitto/mosquitto.conf.example \
3034
${PKG_SYSCONFDIR}/mosquitto.conf
3135

3236
SUBST_CLASSES+= paths
@@ -43,27 +47,34 @@ FILES_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
4347
FILES_SUBST+= VARBASE=${VARBASE}
4448

4549
BUILD_DEFS+= VARBASE
50+
4651
PTHREAD_AUTO_VARS= yes
4752
.include "../../mk/pthread.buildlink3.mk"
4853

49-
# Upstream documents that "unix" should use make, but Mac cmake.
50-
# After asking and receiving no guidance, choose to always use cmake.
51-
# https://github.com/eclipse/mosquitto/issues/1041
54+
# As of 2.1.0, cmake is the recommended build system.
5255
.include "../../devel/cmake/build.mk"
5356

54-
# mosquitto's build system is very troubled, and the tests do not
55-
# currently work.
56-
# https://github.com/eclipse/mosquitto/issues/1242
57-
# https://github.com/eclipse/mosquitto/issues/1330
58-
#
59-
# \todo invoke "gmake test" in tests/ subdir instead of at top level
60-
# \todo pass in CPPFLAGS/LDFLAGS to test invocation
61-
TEST_TARGET= test
62-
.include "../../devel/cunit/buildlink3.mk"
57+
CMAKE_CONFIGURE_ARGS+= -DWITH_BUNDLED_DEPS=no
58+
59+
# Somehow, even with WITH_EDITLINE=no, adding this finds it, causing build failures.
60+
# # upstream cmake fails to find libedit.pc
61+
# CMAKE_CONFIGURE_ARGS+= -DEDITLINE_DIR=${BUILDLINK_PREFIX.editline}
62+
# CMAKE_CONFIGURE_ARGS+= -DEDITLINE_INCLUDE_DIR=${BUILDLINK_PREFIX.editline}/${BUILDLINK_INCDIRS.editline}
63+
64+
# Upstream editline cmakery cannot handle editline's readline compat as installed natively.
65+
CMAKE_CONFIGURE_ARGS+= -DWITH_EDITLINE=no
66+
67+
CMAKE_CONFIGURE_ARGS+= -DCMAKE_INSTALL_SYSCONFDIR=${PREFIX}/share/examples
6368

6469
.include "options.mk"
65-
.include "../../devel/libuuid/buildlink3.mk"
66-
.include "../../devel/uthash/buildlink3.mk"
70+
71+
# Same order as README-compiling.md
72+
.include "../../textproc/cJSON/buildlink3.mk"
6773
.include "../../net/libcares/buildlink3.mk"
74+
.include "../../devel/editline/buildlink3.mk"
75+
.include "../../www/libmicrohttpd/buildlink3.mk"
6876
.include "../../security/openssl/buildlink3.mk"
77+
# pthreads included above
78+
.include "../../databases/sqlite3/buildlink3.mk"
79+
.include "../../devel/uthash/buildlink3.mk"
6980
.include "../../mk/bsd.pkg.mk"

net/mosquitto/PLIST

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,78 @@
1-
@comment $NetBSD: PLIST,v 1.2 2021/01/28 19:46:23 triaxx Exp $
1+
@comment $NetBSD: PLIST,v 1.3 2026/01/30 01:07:56 gdt Exp $
2+
bin/mosquitto_ctrl
3+
bin/mosquitto_db_dump
24
bin/mosquitto_passwd
35
bin/mosquitto_pub
46
bin/mosquitto_rr
7+
bin/mosquitto_signal
58
bin/mosquitto_sub
69
include/mosquitto.h
10+
include/mosquitto/broker.h
11+
include/mosquitto/broker_control.h
12+
include/mosquitto/broker_plugin.h
13+
include/mosquitto/defs.h
14+
include/mosquitto/libcommon.h
15+
include/mosquitto/libcommon_base64.h
16+
include/mosquitto/libcommon_cjson.h
17+
include/mosquitto/libcommon_file.h
18+
include/mosquitto/libcommon_memory.h
19+
include/mosquitto/libcommon_password.h
20+
include/mosquitto/libcommon_properties.h
21+
include/mosquitto/libcommon_random.h
22+
include/mosquitto/libcommon_string.h
23+
include/mosquitto/libcommon_time.h
24+
include/mosquitto/libcommon_topic.h
25+
include/mosquitto/libcommon_utf8.h
26+
include/mosquitto/libmosquitto.h
27+
include/mosquitto/libmosquitto_auth.h
28+
include/mosquitto/libmosquitto_callbacks.h
29+
include/mosquitto/libmosquitto_connect.h
30+
include/mosquitto/libmosquitto_create_delete.h
31+
include/mosquitto/libmosquitto_helpers.h
32+
include/mosquitto/libmosquitto_loop.h
33+
include/mosquitto/libmosquitto_message.h
34+
include/mosquitto/libmosquitto_options.h
35+
include/mosquitto/libmosquitto_publish.h
36+
include/mosquitto/libmosquitto_socks.h
37+
include/mosquitto/libmosquitto_subscribe.h
38+
include/mosquitto/libmosquitto_tls.h
39+
include/mosquitto/libmosquitto_unsubscribe.h
40+
include/mosquitto/libmosquitto_will.h
41+
include/mosquitto/libmosquittopp.h
42+
include/mosquitto/mqtt_protocol.h
743
include/mosquitto_broker.h
844
include/mosquitto_plugin.h
945
include/mosquittopp.h
1046
include/mqtt_protocol.h
1147
lib/libmosquitto.so
1248
lib/libmosquitto.so.1
13-
lib/libmosquitto.so.${PKGVERSION}
49+
lib/libmosquitto.so.2.1.0
1450
lib/libmosquittopp.so
1551
lib/libmosquittopp.so.1
16-
lib/libmosquittopp.so.${PKGVERSION}
52+
lib/libmosquittopp.so.2.1.0
53+
lib/mosquitto_acl_file.so
54+
lib/mosquitto_dynamic_security.so
55+
lib/mosquitto_password_file.so
56+
lib/mosquitto_persist_sqlite.so
57+
lib/mosquitto_sparkplug_aware.so
1758
lib/pkgconfig/libmosquitto.pc
1859
lib/pkgconfig/libmosquittopp.pc
1960
man/man1/mosquitto_ctrl.1
2061
man/man1/mosquitto_ctrl_dynsec.1
62+
man/man1/mosquitto_ctrl_shell.1
2163
man/man1/mosquitto_passwd.1
2264
man/man1/mosquitto_pub.1
2365
man/man1/mosquitto_rr.1
66+
man/man1/mosquitto_signal.1
2467
man/man1/mosquitto_sub.1
2568
man/man3/libmosquitto.3
2669
man/man5/mosquitto.conf.5
2770
man/man7/mosquitto-tls.7
71+
man/man7/mosquitto.7
2872
man/man7/mqtt.7
2973
man/man8/mosquitto.8
3074
sbin/mosquitto
3175
share/examples/mosquitto/aclfile.example
32-
share/examples/mosquitto/mosquitto.conf
76+
share/examples/mosquitto/mosquitto.conf.example
3377
share/examples/mosquitto/pskfile.example
3478
share/examples/mosquitto/pwfile.example

net/mosquitto/distinfo

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
$NetBSD: distinfo,v 1.39 2025/07/12 12:56:07 gdt Exp $
1+
$NetBSD: distinfo,v 1.40 2026/01/30 01:07:56 gdt Exp $
22

3-
BLAKE2s (mosquitto-2.0.22.tar.gz) = 2769b4d2538943c378d5674996f5e40558f7b263be588837a9b0c3d5bad96944
4-
SHA512 (mosquitto-2.0.22.tar.gz) = 5aae399b308d8262a758a72064c613bfd6930e1a54f34939e30454d988c65c9d7c4c139ed70a016baa1264a0100a0c842c00e843ffe3ef83f90be440403e7482
5-
Size (mosquitto-2.0.22.tar.gz) = 805967 bytes
6-
SHA1 (patch-lib_CMakeLists.txt) = 8aefb1ddc43c3bd1edb16d0453edaf8c264eb76c
7-
SHA1 (patch-mosquitto.conf) = ac304038543f8cd84f06a748c3e538f32186f942
8-
SHA1 (patch-src_CMakeLists.txt) = ad906a507fcd39ac4fdcf98afde75ff715101698
3+
BLAKE2s (mosquitto-2.1.0.tar.gz) = 8f2a76789d735ed295793641625d3ee2575166b9cab35ac1822ab6db976ffcad
4+
SHA512 (mosquitto-2.1.0.tar.gz) = 5c5d4e0900a7087c10e30d12dd7ca72009b9acc0c28831d70e3d1730af15cbab7d7606306bd04989b161f7b46db9b6dfc36deb28918cfb44089ad65626f3ed14
5+
Size (mosquitto-2.1.0.tar.gz) = 2879905 bytes
6+
SHA1 (patch-mosquitto.conf) = 2de20afc7f932aacae0d771b80d5ab7d6687e997
7+
SHA1 (patch-src_CMakeLists.txt) = 34414a0886fadb0335e9716f0948124ec84d20b2

net/mosquitto/options.mk

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,28 @@
1-
# $NetBSD: options.mk,v 1.3 2024/10/13 14:13:22 gdt Exp $
1+
# $NetBSD: options.mk,v 1.4 2026/01/30 01:07:56 gdt Exp $
22

33
PKG_OPTIONS_VAR= PKG_OPTIONS.mosquitto
4-
PKG_SUPPORTED_OPTIONS= websockets
5-
PKG_SUGGESTED_OPTIONS= websockets
4+
PKG_SUPPORTED_OPTIONS= tests
5+
PKG_SUGGESTED_OPTIONS= tests
66

77
.include "../../mk/bsd.options.mk"
88

9-
# \todo With websockets, mosquitto's build system throws warnings that
10-
# performance will be terrible. Figure out if this is correct or not
11-
# and fix or file bugs as appropriate.
12-
.if !empty(PKG_OPTIONS:Mwebsockets)
13-
CMAKE_CONFIGURE_ARGS+= -DWITH_WEBSOCKETS=yes
14-
.include "../../www/libwebsockets/buildlink3.mk"
9+
.if !empty(PKG_OPTIONS:Mtests)
10+
CMAKE_CONFIGURE_ARGS+= -DWITH_TESTS=ON
11+
12+
DEPENDS+= microsocks-[0-9]*:../../net/microsocks
13+
.include "../../devel/cunit/buildlink3.mk"
14+
.include "../../devel/googletest/buildlink3.mk"
15+
16+
# find work/mosquitto-2.1.0rc1/ -name \*.py|xargs egrep python3|awk -F: '{print $1}' | sed -e s,work/mosquitto-2.1.0rc1/,,|sort|while read f; do echo "REPLACE_PYTHON+= $f"; done > replace-python.mk
17+
.include "replace-python.mk"
18+
.include "../../lang/python/application.mk"
19+
20+
TEST_TARGET= test
21+
22+
retest-verbose:
23+
cd ${WRKSRC}/${CMAKE_BUILD_DIR} && ctest --rerun-failed --output-on-failure
1524
.else
16-
CMAKE_CONFIGURE_ARGS+= -DWITH_WEBSOCKETS=no
25+
CMAKE_CONFIGURE_ARGS+= -DWITH_TESTS=OFF
26+
27+
TEST_TARGET= failtest
1728
.endif

net/mosquitto/patches/patch-lib_CMakeLists.txt

Lines changed: 0 additions & 23 deletions
This file was deleted.

net/mosquitto/patches/patch-mosquitto.conf

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
$NetBSD: patch-mosquitto.conf,v 1.8 2025/03/08 13:59:13 gdt Exp $
1+
$NetBSD: patch-mosquitto.conf,v 1.9 2026/01/30 01:07:56 gdt Exp $
22

33
Align pid_file to pkgsrc norms.
44

5-
Provide a dir for capath, but do not set it. (In mosquitto, having a
6-
key/cert for the server is linked to having a CA, and to treating
7-
clients with a certificate from a known CA as authorized. This is
8-
complicated, and not about pkgsrc, and this change does not intend to
9-
step into the situation.)
10-
115
Log to syslog, instead of (perhaps) not logging.
126

137
--- mosquitto.conf.orig 2025-03-06 16:25:31.000000000 +0000
@@ -21,15 +15,6 @@ Log to syslog, instead of (perhaps) not logging.
2115

2216
# Set to true to queue messages with QoS 0 when a persistent client is
2317
# disconnected. These messages are included in the limit imposed by
24-
@@ -361,7 +361,7 @@
25-
# "openssl rehash <path to capath>" each time you add/remove a certificate.
26-
# capath is not supported for websockets.
27-
#cafile
28-
-#capath
29-
+#capath @SSLCERTS@
30-
31-
32-
# If require_certificate is true, you may set use_identity_as_username to true
3318
@@ -469,7 +469,7 @@
3419
# Note that if the broker is running as a Windows service it will default to
3520
# "log_dest none" and neither stdout nor stderr logging is available.
Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
1-
$NetBSD: patch-src_CMakeLists.txt,v 1.8 2024/10/14 21:51:21 gdt Exp $
1+
$NetBSD: patch-src_CMakeLists.txt,v 1.9 2026/01/30 01:07:56 gdt Exp $
22

33
The first hunk removes linker args on SunOS, for no apparent reason.
4+
45
\todo Explain and file a bug upstream; this should not be a pkgsrc change.
56

6-
--- src/CMakeLists.txt.orig 2020-08-19 13:55:03.000000000 +0000
7+
--- src/CMakeLists.txt.orig 2026-01-19 00:00:46.000000000 +0000
78
+++ src/CMakeLists.txt
8-
@@ -213,9 +213,9 @@ target_link_libraries(mosquitto ${MOSQ_L
9-
if (UNIX)
10-
if (APPLE)
11-
set_target_properties(mosquitto PROPERTIES LINK_FLAGS "-Wl,-exported_symbols_list -Wl,${mosquitto_SOURCE_DIR}/src/linker-macosx.syms")
12-
- else (APPLE)
13-
+ elseif (NOT CMAKE_SYSTEM_NAME STREQUAL SunOS)
14-
set_target_properties(mosquitto PROPERTIES LINK_FLAGS "-Wl,-dynamic-list=${mosquitto_SOURCE_DIR}/src/linker.syms")
15-
- endif (APPLE)
16-
+ endif ()
17-
endif (UNIX)
18-
19-
install(TARGETS mosquitto RUNTIME DESTINATION "${CMAKE_INSTALL_SBINDIR}")
9+
@@ -310,6 +310,7 @@ if(UNIX)
10+
LINK_FLAGS "-Wl,-exported_symbols_list -Wl,${mosquitto_SOURCE_DIR}/src/linker-macosx.syms"
11+
)
12+
elseif (${CMAKE_SYSTEM_NAME} MATCHES "AIX")
13+
+ elseif (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
14+
else()
15+
set_target_properties(mosquitto PROPERTIES
16+
LINK_FLAGS "-Wl,-dynamic-list=${mosquitto_SOURCE_DIR}/src/linker.syms"

0 commit comments

Comments
 (0)