50 Commits

Author SHA1 Message Date
Andrej Kozemcak
bc155291f1
mosquitto: upgrade 2.0.22 -> 2.1.2
License-Update: Change license to EPL-2.0 OR BSD-3-Clause
  Clarify license in LICENSE.txt: f466e454e0
  Updated NOTICE.md: https://github.com/eclipse-mosquitto/mosquitto/commit/827c803cb8d6376891548b856a1faa3f0ab5

Removed patch included in this release

Update PACKAGECONFIG/cmake options:

- manpages: -DDOCUMENTATION → -DWITH_DOCS (the CMake option was renamed in 2.1.x)
- ssl: removed -DWITH_EC=ON/-DWITH_EC=OFF; the WITH_EC option was dropped in 2.1.x
       since Elliptic Curve support is now always included with TLS
- websockets — adapt websockets to properly use with picohttpparser
- persist-sqlite -  for persistence support in the broker, have sqlite3 dependency
- ctrl-shell: mosquitto_ctrl interactive shell, have libedit dependency

Disable `DWITH_ADNS` option because it required Argon2, which is not part of
meta-oe layer

Disable `DWITH_TESTS` option because mosquitto start using GoogleTest
and we hit a common Yocto + CMake + GoogleTest problem

Improve shipped package to modern version

Changelog:
v2.1.2:
  https://github.com/eclipse-mosquitto/mosquitto/blob/v2.1.2/ChangeLog.txtgT

  Broker:
    - Forbid running with `persistence true` and with a persistence plugin at the
      same time.

  Build:
    - Build fixes for OpenBSD. Closes #3474.
    - Add missing libedit to docker builds. Closes #3476.
    - Fix static/shared linking of libwebsockets under cmake.

v2.1.1:
  https://github.com/eclipse-mosquitto/mosquitto/blob/v2.1.1/ChangeLog.txt

v2.1.0:
  https://github.com/eclipse-mosquitto/mosquitto/blob/v2.1.0/ChangeLog.txt

Signed-off-by: Andrej Kozemcak <andrej.kozemcak@siemens.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2026-03-20 14:13:11 -07:00
Gianfranco Costamagna
0331499e1f
mosquitto: bump to 2.0.22
Refresh patches, drop patch 3238, now part of upstream codebase

Signed-off-by: Gianfranco Costamagna <locutusofborg@debian.org>
Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-08-13 08:01:50 -07:00
Louis Rannou
2a27eacee2
mosquitto: bump to 2.0.21
Upgrade to mosquitto 2.0.21. Update the patch status for issue 2895 and create a
new patch for an issue introduced in 2.0.19 which causes connections to get down
when the clock is changed.

Signed-off-by: Louis Rannou <louis.rannou@non.se.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-07-11 08:35:06 -07:00
Wang Mingyu
006af9e741
mosquitto: upgrade 2.0.19 -> 2.0.20
Changelog:
==========
Broker:
- Fix QoS 1 / QoS 2 publish incorrectly returning "no subscribers".
  Closes #3128.
- Open files with appropriate access on Windows.
- Don't allow invalid response topic values.
- Fix some strict protocol compliance issues.

Client library:
- Fix cmake build on OS X.

Build:
- Fix build on NetBSD

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-11-05 22:45:17 -08:00
Fabrice Aeschbacher
5299775840
mosquitto: upgrade 2.0.18 -> 2.0.19
- Solves CVE-2024-8376
- removed 1571.patch and 2894.patch, already applied in v2.0.19

https://github.com/eclipse/mosquitto/blob/v2.0.19/ChangeLog.txt

Signed-off-by: Fabrice Aeschbacher <fabrice.aeschbacher@siemens.com>
Reviewed-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-10-17 14:07:45 -07:00
Khem Raj
ffc64e9c6f
recipes: Start WORKDIR -> UNPACKDIR transition
Replace references of WORKDIR with UNPACKDIR where it makes sense to do
so in preparation for changing the default value of UNPACKDIR.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-05-23 08:44:44 -07:00
Peter Kjellerstedt
ad27cdd560 mosquitto: Support building for native again
Support for building from native was removed in commit e1b332f2e
(meta-networking: Drop broken BBCLASSEXTEND variants), most likely due
to no support for building libwebsockets-native. That support has now
been added, so it is now possible to build mosquitto-native again.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-10-26 12:00:14 -07:00
Richard Purdie
e1b332f2ef meta-networking: Drop broken BBCLASSEXTEND variants
The command "bitbake universe -c fetch" currently throws a ton of warnings
as there are many 'impossible' dependencies.

In some cases these variants may never have worked and were just added by copy
and paste of recipes. In some cases they once clearly did work but became
broken somewhere along the way. Users may also be carrying local bbappend files
which add further BBCLASSEXTEND.

Having universe fetch work without warnings is desireable so clean up the broken
variants. Anyone actually needing something dropped here can propose adding it
and the correct functional dependencies back quite easily. This also then
ensures we're not carrying or fixing things nobody uses.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-10-24 09:08:45 -07:00
Martin Jansa
5488a32d90 mosquitto, etcd-cpp-apiv3: add missing Upstream-Status
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-09-27 14:22:09 -07:00
Gianfranco Costamagna
79088766c8 mosquitto: upgrade 2.0.17 -> 2.0.18
Add two patches from Debian, pull requests proposed upstream as 2894 and 2895
to make it start only when board is online, and to fix dynamic websockets link failure

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-09-26 12:44:12 -07:00
Gianfranco Costamagna
56027584e9 mosquitto: upgrade 2.0.15 -> 2.0.17
Fix for CVE-2023-28366, CVE-2023-0809, CVE-2023-3592

Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-09-13 07:31:33 -07:00
Gianfranco Costamagna
66ec22d090 mosquitto: do not automatically depend on dlt-daemon, it's a non-mandatory logging system
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-09-12 19:34:09 -07:00
Wang Mingyu
a42cfc44dd mosquitto: upgrade 2.0.14 -> 2.0.15
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-08-23 19:12:52 -07:00
Gianfranco Costamagna
887f69dde9 mosquitto: upgrade 2.0.12 -> 2.0.14
- Upgrade license hash due to whitespace changes
- refresh patch 1571.patch

Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
Signed-off-by: Gianfranco Costamagna <locutusofborg@debian.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-02-08 09:00:19 -08:00
Andrei Gherzan
72a51076a7 mosquitto: Don't depends on dlt-daemon unconditionally
This dependency is already handled through a PACKAGECONFIG so there is
no need for it in DEPENDS anymore.

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-12-09 08:37:06 -08:00
Khem Raj
da7ffddcf7 mosquitto: Inherit pkgconfig
Fixes
logging.c:(.text+0x218): undefined reference to `dlt_register_app'

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-09-24 08:12:36 -07:00
zhengruoqin
5cd882b21c mosquitto: upgrade 2.0.11 -> 2.0.12
Signed-off-by: Zheng Ruoqin <zhengrq.fnst@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-09-08 21:29:52 -07:00
Martin Jansa
c61dc077bb Convert to new override syntax
This is the result of automated script (0.9.1) conversion:

oe-core/scripts/contrib/convert-overrides.py .

converting the metadata to use ":" as the override character instead of "_".

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2021-08-03 10:21:25 -07:00
zangrc
d7a5707894 mosquitto: upgrade 2.0.10 -> 2.0.11
-License-Update: notice.html does not exist in this version, use NOTICE.md to
check.

Signed-off-by: Zang Ruochen <zangrc.fnst@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-06-18 08:42:25 -07:00
zangrc
bb60da5cfc mosquitto: upgrade 2.0.9 -> 2.0.10
Signed-off-by: Zang Ruochen <zangrc.fnst@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-04-08 09:25:54 -07:00
zangrc
9146480282 mosquitto: upgrade 2.0.8 -> 2.0.9
Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-03-18 12:40:20 -07:00
Gianfranco
8850ff297c mosquitto: Upgrade 2.0.7 -> 2.0.8
2.0.8 - 2021-02-25
==================

Broker:
- Fix incorrect datatypes in `struct mosquitto_evt_tick`. This changes the
  size and offset of two of the members of this struct, and changes the size
  of the struct. This is an ABI break, but is considered to be acceptable
  because plugins should never be allocating their own instance of this
  struct, and currently none of the struct members are used for anything, so a
  plugin should not be accessing them. It would also be safe to read/write
  from the existing struct parameters.
- Give compile time warning if libwebsockets compiled without external poll
  support. Closes #2060.
- Fix memory tracking not being available on FreeBSD or macOS. Closes #2096.

Client library:
- Fix mosquitto_{pub|sub}_topic_check() functions not returning MOSQ_ERR_INVAL
  on topic == NULL.

Clients:
- Fix possible loss of data in `mosquitto_pub -l` when sending multiple long
  lines. Closes #2078.

Build:
- Provide a mechanism for Docker users to run a broker that doesn't use
  authentication, without having to provide their own configuration file.
  Closes #2040.

Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
Signed-off-by: Gianfranco Costamagna <gianfranco.costamagna@abinsula.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-02-28 23:51:14 -08:00
Gianfranco
9428a09002 mosquitto: Upgrade 1.6.12 -> 2.0.7
- drop patch install-protocol.patch: upstream
- add new cjson and dlt-daemon dependencies
- update copyright and license
- add build of manpages optionally via PACKAGECONFIG
- also install the new mosquitto_ctrl and mosquitto_dynamic_security.so tools

2.0.7 - 2021-02-04
==================

Broker:
- Fix exporting of executable symbols on BSD when building via makefile.
- Fix some minor memory leaks on exit only.
- Fix possible memory leak on connect. Closes #2057.
- Fix openssl engine not being able to load private key. Closes #2066.

Clients:
- Fix config files truncating options after the first space. Closes #2059.

Build:
- Fix man page building to not absolutely require xsltproc when using CMake.
  This now handles the case where we are building from the released tar, or
  building from git if xsltproc is available, or building from git if xsltproc
  is not available.

1.6.13 - 2021-02-04
===================

Broker:
- Fix crash on Windows if loading a plugin fails. Closes #1866.
- Fix DH group not being set for TLS connections, which meant ciphers using
  DHE couldn't be used. Closes #1925. Closes #1476.
- Fix local bridges being disconnected on SIGHUP. Closes #1942.
- Fix $SYS/broker/publish/messages/+ counters not being updated for QoS 1, 2
  messages. Closes #1968.
- Fix listener not being reassociated with client when reloading a persistence
  file and `per_listener_settings true` is set and the client did not set a
  username. Closes #1891.
- Fix file logging on Windows. Closes #1880.
- Fix bridge sock not being removed from sock hash on error. Closes #1897.

Client library:
- Fix build on Mac Big Sur. Closes #1905.
- Fix DH group not being set for TLS connections, which meant ciphers using
  DHE couldn't be used. Closes #1925. Closes #1476.

Clients:
- mosquitto_sub will now quit with an error if the %U option is used on
  Windows, rather than just quitting. Closes #1908.
- Fix config files truncating options after the first space. Closes #2059.

Apps:
- Perform stricter parsing of input username in mosquitto_passwd. Closes
  #570126 (Eclipse bugzilla).

Build:
- Enable epoll support in CMake builds.

2.0.6 - 2021-01-28
==================

Broker:
- Fix calculation of remaining length parameter for websockets clients that
  send fragmented packets. Closes #1974.
Broker:
- Fix potential duplicate Will messages being sent when a will delay interval
  has been set.
- Fix message expiry interval property not being honoured in
  `mosquitto_broker_publish` and `mosquitto_broker_publish_copy`.
- Fix websockets listeners with TLS not responding. Closes #2020.
- Add notes that libsystemd-dev or similar is needed if building with systemd
  support. Closes #2019.
- Improve logging in obscure cases when a client disconnects. Closes #2017.
- Fix reloading of listeners where multiple listeners have been defined with
  the same port but different bind addresses. Closes #2029.
- Fix `message_size_limit` not applying to the Will payload. Closes #2022.
- The error topic-alias-invalid was being sent if an MQTT v5 client published
  a message with empty topic and topic alias set, but the topic alias hadn't
  already been configured on the broker. This has been fixed to send a
  protocol error, as per section 3.3.4 of the specification.
- Note in the man pages that SIGHUP reloads TLS certificates. Closes #2037.
- Fix bridges not always connecting on Windows. Closes #2043.

Apps:
- Allow command line arguments to override config file options in
  mosquitto_ctrl. Closes #2010.
- mosquitto_ctrl: produce an error when requesting a new password if both
  attempts do not match. Closes #2011.

Build:
- Fix cmake builds using `WITH_CJSON=no` not working if cJSON not found.
  Closes #2026.

Other:
- The SPDX identifiers for EDL-1.0 have been changed to BSD-3-Clause as per
  The Eclipse legal documentation generator. The licenses are identical.

2.0.5 - 2021-01-11
==================

Broker:
- Fix `auth_method` not being provided to the extended auth plugin event.
  Closes #1975.
- Fix large packets not being completely published to slow clients.
  Closes #1977.
- Fix bridge connection not relinquishing POLLOUT after messages are sent.
  Closes #1979.
- Fix apparmor incorrectly denying access to
  /var/lib/mosquitto/mosquitto.db.new. Closes #1978.
- Fix potential intermittent initial bridge connections when using poll().
- Fix `bind_interface` option. Closes #1999.
- Fix invalid behaviour in dynsec plugin if a group or client is deleted
  before a role that was attached to the group or client is deleted.
  Closes #1998.
- Improve logging in dynsec addGroupRole command. Closes #2005.
- Improve logging in dynsec addGroupClient command. Closes #2008.

Client library:
- Improve documentation around the `_v5()` and non-v5 functions, e.g.
  `mosquitto_publish()` and `mosquitto_publish_v5().

Build:
- `install` Makefile target should depend on `all`, not `mosquitto`, to ensure
  that man pages are always built. Closes #1989.
- Fixes for lots of minor build warnings highlighted by Visual Studio.

Apps:
- Disallow control characters in mosquitto_passwd usernames.
- Fix incorrect description in mosquitto_ctrl man page. Closes #1995.
- Fix `mosquitto_ctrl dynsec getGroup` not showing roles. Closes #1997.

2.0.4 - 2020-12-22
==================

Broker:
- Fix $SYS/broker/publish/messages/+ counters not being updated for QoS 1, 2
  messages. Closes #1968.
- mosquitto_connect_bind_async() and mosquitto_connect_bind_v5() should not
  reset the bind address option if called with bind_address == NULL.
- Fix dynamic security configuration possibly not being reloaded on Windows
  only. Closes #1962.
- Add more log messages for dynsec load/save error conditions.
- Fix websockets connections blocking non-websockets connections on Windows.
  Closes #1934.

Build:
- Fix man pages not being built when using CMake. Closes #1969.

2.0.3 - 2020-12-17
==================

Security:
- Running mosquitto_passwd with the following arguments only
  `mosquitto_passwd -b password_file username password` would cause the
  username to be used as the password.

Broker:
- Fix excessive CPU use on non-Linux systems when the open file limit is set
  high. Closes #1947.
- Fix LWT not being sent on client takeover when the existing session wasn't
  being continued. Closes #1946.
- Fix bridges possibly not completing connections when WITH_ADNS is in use.
  Closes #1960.
- Fix QoS 0 messages not being delivered if max_queued_messages was set to 0.
  Closes #1956.
- Fix local bridges being disconnected on SIGHUP. Closes #1942.
- Fix slow initial bridge connections for WITH_ADNS=no.
- Fix persistence_location not appending a '/'.

Clients:
- Fix mosquitto_sub being unable to terminate with Ctrl-C if a successful
  connection is not made. Closes #1957.

Apps:
- Fix `mosquitto_passwd -b` using username as password (not if `-c` is also
  used). Closes #1949.

Build:
- Fix `install` target when using WITH_CJSON=no. Closes #1938.
- Fix `generic` docker build. Closes #1945.

2.0.2 - 2020-12-10
==================

Broker:
- Fix build regression for WITH_WEBSOCKETS=yes on non-Linux systems.

2.0.1 - 2020-12-10
==================

Broker:
- Fix websockets connections on Windows blocking subsequent connections.
  Closes #1934.
- Fix DH group not being set for TLS connections, which meant ciphers using
  DHE couldn't be used. Closes #1925. Closes #1476.
- Fix websockets listeners not causing the main loop not to wake up.
  Closes #1936.

Client library:
- Fix DH group not being set for TLS connections, which meant ciphers using
  DHE couldn't be used. Closes #1925. Closes #1476.

Apps:
- Fix `mosquitto_passwd -U`

Build:
- Fix cjson include paths.
- Fix build using WITH_TLS=no when the openssl headers aren't available.
- Distribute cmake/ and snap/ directories in tar.

2.0.0 - 2020-12-03
==================

Breaking changes:
- When the Mosquitto broker is run without configuring any listeners it will
  now bind to the loopback interfaces 127.0.0.1 and/or ::1. This means that
  only connections from the local host will be possible.

  Running the broker as `mosquitto` or `mosquitto -p 1883` will bind to the
  loopback interface.

  Running the broker with a configuration file with no listeners configured
  will bind to the loopback interface with port 1883.

  Running the broker with a listener defined will bind by default to `0.0.0.0`
  / `::` and so will be accessible from any interface. It is still possible to
  bind to a specific address/interface.

  If the broker is run as `mosquitto -c mosquitto.conf -p 1884`, and a
  listener is defined in the configuration file, then the port defined on the
  command line will be IGNORED, and no listener configured for it.
- All listeners now default to `allow_anonymous false` unless explicitly set
  to true in the configuration file. This means that when configuring a
  listener the user must either configure an authentication and access control
  method, or set `allow_anonymous true`. When the broker is run without a
  configured listener, and so binds to the loopback interface, anonymous
  connections are allowed.
- If Mosquitto is run on as root on a unix like system, it will attempt to
  drop privileges as soon as the configuration file has been read. This is in
  contrast to the previous behaviour where elevated privileges were only
  dropped after listeners had been started (and hence TLS certificates loaded)
  and logging had been started. The change means that clients will never be
  able to connect to the broker when it is running as root, unless the user
  explicitly sets it to run as root, which is not advised. It also means that
  all locations that the broker needs to access must be available to the
  unprivileged user. In particular those people using TLS certificates from
  Lets Encrypt will need to do something to allow Mosquitto to access
  those certificates. An example deploy renewal hook script to help with this
  is at `misc/letsencrypt/mosquitto-copy.sh`.
  The user that Mosquitto will change to are the one provided in the
  configuration, `mosquitto`, or `nobody`, in order of availability.
- The `pid_file` option will now always attempt to write a pid file,
  regardless of whether the `-d` argument is used when running the broker.
- The `tls_version` option now defines the *minimum* TLS protocol version to
  be used, rather than the exact version. Closes #1258.
- The `max_queued_messages` option has been increased from 100 to 1000 by
  default, and now also applies to QoS 0 messages, when a client is connected.
- The mosquitto_sub, mosquitto_pub, and mosquitto_rr clients will now load
  OS provided CA certificates by default if `-L mqtts://...` is used, or if
  the port is set to 8883 and no other CA certificates are loaded.
- Minimum support libwebsockets version is now 2.4.0
- The license has changed from "EPL-1.0 OR EDL-1.0" to "EPL-2.0 OR EDL-1.0".

Broker features:
- New plugin interface which is more flexible, easier to develop for and
  easier to extend.
- New dynamic security plugin, which allows clients, groups, and roles to be
  defined and updated as the broker is running.
- Performance improvements, particularly for higher numbers of clients.
- When running as root, if dropping privileges to the "mosquitto" user fails,
  then try "nobody" instead. This reduces the burden on users installing
  Mosquitto themselves.
- Add support for Unix domain socket listeners.
- Add `bridge_outgoing_retain` option, to allow outgoing messages from a
  bridge to have the retain bit completely disabled, which is useful when
  bridging to e.g. Amazon or Google.
- Add support for MQTT v5 bridges to handle the "retain-available" property
  being false.
- Allow MQTT v5.0 outgoing bridges to fall back to MQTT v3.1.1 if connecting
  to a v3.x only broker.
- DLT logging is now configurable at runtime with `log_dest dlt`.
  Closes #1735.
- Add `mosquitto_broker_publish()` and `mosquitto_broker_publish_copy()`
  functions, which can be used by plugins to publish messages.
- Add `mosquitto_client_protocol_version()` function which can be used by
  plugins to determine which version of MQTT a client has connected with.
- Add `mosquitto_kick_client_by_clientid()` and `mosquitto_kick_client_by_username()`
  functions, which can be used by plugins to disconnect clients.
- Add support for handling $CONTROL/ topics in plugins.
- Add support for PBKDF2-SHA512 password hashing.
- Enabling certificate based TLS encryption is now through certfile and
  keyfile, not capath or cafile.
- Added support for controlling UNSUBSCRIBE calls in v5 plugin ACL checks.
- Add "deny" acl type. Closes #1611.
- The broker now sends the receive-maximum property for MQTT v5 CONNACKs.
- Add the `bridge_max_packet_size` option. Closes #265.
- Add the `bridge_bind_address` option. Closes #1311.
- TLS certificates for the server are now reloaded on SIGHUP.
- Default for max_queued_messages has been changed to 1000.
- Add `ciphers_tls1.3` option, to allow setting TLS v1.3 ciphersuites.
  Closes #1825.
- Bridges now obey MQTT v5 server-keepalive.
- Add bridge support for the MQTT v5 maximum-qos property.
- Log client port on new connections. Closes #1911.

Broker fixes:
- Send DISCONNECT with `malformed-packet` reason code on invalid PUBLISH,
  SUBSCRIBE, and UNSUBSCRIBE packets.
- Document that X509_free() must be called after using
  mosquitto_client_certificate(). Closes #1842.
- Fix listener not being reassociated with client when reloading a persistence
  file and `per_listener_settings true` is set and the client did not set a
  username. Closes #1891.
- Fix bridge sock not being removed from sock hash on error. Closes #1897.
- mosquitto_password now forbids the : character. Closes #1833.
- Fix `log_timestamp_format` not applying to `log_dest topic`. Closes #1862.
- Fix crash on Windows if loading a plugin fails. Closes #1866.
- Fix file logging on Windows. Closes #1880.
- Report an error if the config file is set to a directory. Closes #1814.
- Fix bridges incorrectly setting Wills to manage remote notifications when
  `notifications_local_only` was set true. Closes #1902.

Client library features:
- Client no longer generates random client ids for v3.1.1 clients, these are
  now expected to be generated on the broker. This matches the behaviour for
  v5 clients. Closes #291.
- Add support for connecting to brokers through Unix domain sockets.
- Add `mosquitto_property_identifier()`, for retrieving the identifier integer
  for a property.
- Add `mosquitto_property_identifier_to_string()` for converting a property
  identifier integer to the corresponding property name string.
- Add `mosquitto_property_next()` to retrieve the next property in a list, for
  iterating over property lists.
- mosquitto_pub now handles the MQTT v5 retain-available property by never
  setting the retain bit.
- Added MOSQ_OPT_TCP_NODELAY, to allow disabling Nagle's algorithm on client
  sockets. Closes #1526.
- Add `mosquitto_ssl_get()` to allow clients to access their SSL structure and
  perform additional verification.
- Add MOSQ_OPT_BIND_ADDRESS to allow setting of a bind address independently
  of the `mosquitto_connect*()` call.
- Add `MOSQ_OPT_TLS_USE_OS_CERTS` option, to instruct the client to load and
  trust OS provided CA certificates for use with TLS connections.

Client library fixes:
- Fix send quota being incorrecly reset on reconnect. Closes #1822.
- Don't use logging until log mutex is initialised. Closes #1819.
- Fix missing mach/mach_time.h header on OS X. Closes #1831.
- Fix connect properties not being sent when the client automatically
  reconnects. Closes #1846.

Client features:
- Add timeout return code (27) for `mosquitto_sub -W <secs>` and
  `mosquitto_rr -W <secs>`. Closes #275.
- Add support for connecting to brokers through Unix domain sockets with the
  `--unix` argument.
- Use cJSON library for producing JSON output, where available. Closes #1222.
- Add support for outputting MQTT v5 property information to mosquitto_sub/rr
  JSON output. Closes #1416.
- Add `--pretty` option to mosquitto_sub/rr for formatted/unformatted JSON
  output.
- Add support for v5 property printing to mosquitto_sub/rr in non-JSON mode.
  Closes #1416.
- Add `--nodelay` to all clients to allow them to use the MOSQ_OPT_TCP_NODELAY
  option.
- Add `-x` to all clients to all the session-expiry-interval property to be
  easily set for MQTT v5 clients.
- Add `--random-filter` to mosquitto_sub, to allow only a certain proportion
  of received messages to be printed.
- mosquitto_sub %j and %J timestamps are now in a ISO 8601 compatible format.
- mosquitto_sub now supports extra format specifiers for field width and
  precision for some parameters.
- Add `--version` for all clients.
- All clients now load OS provided CA certificates if used with `-L
  mqtts://...`, or if port is set to 8883 and no other CA certificates are
  used. Closes #1824.
- Add the `--tls-use-os-certs` option to all clients.

Client fixes:
- mosquitto_sub will now exit if all subscriptions were denied.
- mosquitto_pub now sends 0 length files without an error when using `-f`.
- Fix description of `-e` and `-t` arguments in mosquitto_rr. Closes #1881.
- mosquitto_sub will now quit with an error if the %U option is used on
  Windows, rather than just quitting. Closes #1908.

Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
Signed-off-by: Gianfranco Costamagna <gianfranco.costamagna@abinsula.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-02-08 13:41:41 -08:00
Leon Anavi
9701b83409 mosquitto: Upgrade 1.6.11 -> 1.6.12
Upgrade to release 1.6.12:

Security:
- In some circumstances, Mosquitto could leak memory when handling
  PUBLISH messages. This is limited to incoming QoS 2 messages,
  and is related to the combination of the broker having
  persistence enabled, a clean session=false client, which was
  connected prior to the broker restarting, then has reconnected
  and has now sent messages at a sufficiently high rate that the
  incoming queue at the broker has filled up and hence messages
  are being dropped. This is more likely to have an effect where
  max_queued_messages is a small value. This has now been fixed.

Broker:
- Build warning fixes when building with WITH_BRIDGE=no and
  WITH_TLS=no.

Clients:
- All clients exit with an error exit code on CONNACK failure.
- Don't busy loop with `mosquitto_pub -l` on a slow connection.

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-09-03 07:54:13 -07:00
Leon Anavi
7c6bf8926c mosquitto: Upgrade 1.6.10 -> 1.6.11
Upgrade to release 1.6.11:

Broker:
- Fix usage message only mentioning v3.1.1.
- Fix broker refusing to start if only websockets listeners were
  defined.
- Change systemd unit files to create /var/log/mosquitto before
  starting.
- Don't quit with an error if opening the log file isn't possible.
- Fix bridge topic remapping when using "" as the topic.
- Fix messages being queued for disconnected bridges when clean
  start was set to true.
- Fix `autosave_interval` not being triggered by messages being
  delivered.
- Fix websockets clients sometimes not being disconnected promptly.
- Fix "slow" file based logging by switching to line based
  buffering.
- Log protocol error message where appropriate from a bad
  UNSUBSCRIBE, rather than the generic "socket error".
- Don't try to start DLT logging if DLT unavailable, to avoid a
  long delay when shutting down the broker.
- Fix potential memory leaks.
- Fix clients not receiving messages after a previous client with
  the same client ID and positive will delay interval quit.
- Fix overly broad HAVE_PTHREAD_CANCEL compile guard.

Client library:
- Improved documentation around connect callback return codes.
- Fix `mosquitto_publish*()` no longer returning
  `MOSQ_ERR_NO_CONN` when not connected.
- `mosquitto_loop_start()` now sets a thread name on Linux,
  FreeBSD, NetBSD, and OpenBSD.
- Fix `mosquitto_loop_stop()` not stopping on Windows.

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-08-17 12:26:41 -07:00
Martin Kelly
58d1f552a0 mosquitto: typo fix
The "ssl" PACKAGECONFIG setting contains WITH_EC_OFF instead of
WITH_EC=OFF, resulting in a build break when "ssl" is not set.

Signed-off-by: Martin Kelly <mkelly@xevo.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-06-08 13:58:03 -07:00
Martin Kelly
4381daa153 mosquitto: add native, nativesdk support
Signed-off-by: Martin Kelly <mkelly@xevo.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-06-08 13:58:03 -07:00
Zang Ruochen
aa615a8e60 mosquitto: upgrade 1.6.9 -> 1.6.10
Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-05-31 22:42:25 -07:00
Gianfranco Costamagna
d148bc4940 mosquitto: do not enable srv by default
Rationale can be found in the Debian packaging (debian/changelog):
Revert change enabling SRV functionality, it is disabled by default
upstream and of little benefit to any end user, but adds reasonable
complexity to the code.

Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
Signed-off-by: Gianfranco Costamagna <locutusofborg@debian.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-03-08 16:38:30 -07:00
Gianfranco Costamagna
9f6d45379e mosquitto: refresh patches and sync with Debian packaging
Also add patch from debian to mqtt_protocol.h header file

Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
Signed-off-by: Gianfranco Costamagna <locutusofborg@debian.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-03-08 16:38:30 -07:00
Pierre-Jean Texier
59f47567c0 mosquitto: upgrade 1.6.8 -> 1.6.9
Bugfix release. For details, see:

https://mosquitto.org/blog/2020/02/version-1-6-9-released/

Also remove patches applied upstream.

Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
2020-03-02 10:12:22 -08:00
Mike Krupicka
257ea010b7 mosquitto: Use mosquitto.init for daemon init
Config file specification is missing in start) case. It is present already in restart) case.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-02-11 16:46:31 -08:00
Gianfranco Costamagna
318627819b mosquitto: apply upstream proposed patches to use cmake build system,
simplifying a lot the build and install process.

Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
Signed-off-by: Gianfranco Costamagna <gianfranco.costamagna@abinsula.com>
Signed-off-by: Gianfranco Costamagna <locutusofborg@debian.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-01-25 12:44:25 -08:00
Leon Anavi
e0b841376f mosquitto: update to 1.6.8
Bugfix release. For details, see:

  https://mosquitto.org/blog/2019/11/version-1-6-8-released/

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-12-15 21:08:54 -08:00
Paul Eggleton
a21cc89423 mosquitto: update to 1.6.7
Bugfix release. For details, see:

  https://mosquitto.org/blog/2019/09/version-1-6-7-released/

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-10-09 23:27:15 -07:00
Leon Anavi
6f560065cf mosquitto: update to 1.6.6
Fix security vulnerabilities. For further details, see:
https://mosquitto.org/blog/2019/09/version-1-6-6-released/

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-09-22 08:13:17 -07:00
Paul Eggleton
40f6fd1253 mosquitto: update to 1.6.5
A lot of changes upstream since the last upgrade, the highlights:
* MQTT v5 protocol support
* Performance improvements
* New mosquitto_rr (request/response) client
* TLS enhancements: OCSP stapling, TLS Engine support, explicit TLS v1.3
  support, removed TLS v1.0 support

For further details, see https://mosquitto.org/blog/

Additionally, SUMMARY and DESCRIPTION were tidied up as needed.

Based upon an earlier upgrade patch by Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-09-16 18:25:26 -07:00
Oleksandr Kravchuk
5e70e778a2 mosquitto: update to 1.5.8
Signed-off-by: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-03-17 08:44:41 -07:00
André Draszik
24af1f974c meta-networking: remove True option to getVar calls (again)
A couple have still been missed in the past despite multiple
attempts at doing so (or simply have re-appeared?).

Search & replace made using the following command:
    sed -e 's|\(d\.getVar \?\)( \?\([^,()]*\), \?True)|\1(\2)|g' \
        -i $(git grep -E 'getVar ?\( ?([^,()]*), ?True\)' \
             | cut -d':' -f1 \
             | sort -u)

Signed-off-by: André Draszik <andre.draszik@jci.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-01-13 10:28:01 -08:00
André Draszik
83c38fc544 mosquitto: fully switch over to using PACKAGECONFIG_CONFARGS
Convert all other instances of explicit PACKAGECONFIG uses
to the PACKAGECONFIG_CONFARGS infrastructure.

Signed-off-by: André Draszik <andre.draszik@jci.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-12-05 10:18:59 -08:00
André Draszik
e39709e381 mosquitto: fix build in systemd environments
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.

Signed-off-by: André Draszik <andre.draszik@jci.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-12-05 10:18:59 -08:00
Paul Eggleton
b26618c971 mosquitto: update to 1.5.4
1.5.2, 1.5.3 and 1.5.4 include a number of fixes, notably for
vulnerability CVE-2018-12543 which allowed the server process to be
remotely crashed. For further information see:

  https://mosquitto.org/blog/2018/11/version-154-released/
  https://mosquitto.org/blog/2018/09/security-advisory-cve-2018-12543/
  https://mosquitto.org/blog/2018/09/version-152-released/

A build option was added to use the system version of uthash rather than
the bundled version so we no longer need the patch to do this.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-11-26 09:38:14 -08:00
Jeroen Hofstee
4ac262cc8b mosquitto: make websockets a PACKAGECONFIG option
Signed-off-by: Jeroen Hofstee <jhofstee@victronenergy.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-09-26 07:35:44 -07:00
Khem Raj
a483d344d9 mosquitto: Make enabling systemd also enable build dep on systemd
systemd support in mqtt needs system developement headers and libs installed in recipe sysroot

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-09-08 13:32:12 -07:00
Paul Eggleton
9c0243b691 mosquitto: upgrade to 1.5.1
This includes one security fix and numerous other bugfixes. MQTT version
3.1.1 is now the default protocol.

See the following for details:

https://mosquitto.org/blog/2018/08/version-151-released/
https://mosquitto.org/blog/2018/05/version-1-5-released/

Changes to the recipe:
* Drop explicit installation of the libmosquitto.a static library
  because this no longer gets built by default, and the normal
  "make install" which we are running will install it anyway if it were
  to be enabled.
* Drop our service file since there is one supplied in the source tree
* Enable systemd notify support when systemd is being used
* Update comments in the init script

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-09-04 11:55:21 -07:00
Andre McCurdy
d56219b411 mosquitto: minor recipe cleanups
- Passing prefix, mandir and localedir via the Make command line
   allows patching of config.mk to be dropped.

 - The variable PREFIX isn't used anywhere in the mosquitto 1.4.15
   Makefiles, so doesn't need to be passed on the Make command line.
   That means the default do_compile() from base.bbclass can be used
   and the recipe specific do_compile() can be dropped.

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-06-27 22:17:33 -07:00
Nicola Lunghi
101af9d652 mosquitto: add default configuration file
the mosquitto recipe doesn't add a mosquitto configuration file
add it from the mosquitto.conf.example file

Signed-off-by: Nicola Lunghi <nicola.lunghi@jci.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-06-05 18:17:21 -07:00
Nicola Lunghi
8576a857be mosquitto: add mosquitto-examples package
the mosquitto install populate some .example files in
/etc/mosquitto. move thise example files in a separate package

The PACKAGE_BEFORE_PN is needed because otherwise those examples
end in the base mosquitto package

Signed-off-by: Nicola Lunghi <nicola.lunghi@jci.com>
Acked-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-06-05 18:17:21 -07:00
Paul Eggleton
e46a11d92a mosquitto: upgrade to 1.4.15
Security update - fixes CVE-2017-7651 and CVE-2017-7652, as well as a
number of other non-security issues.

For more details see the release announcement:

  https://mosquitto.org/blog/2018/02/security-advisory-cve-2017-7651-cve-2017-7652/

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-05-31 21:55:00 -07:00
Armin Kuster
51411b3c7a mosquito: move from oe to networking layer
mosquito has dependancy on meta-netowrking packages

Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-05-17 08:32:26 -07:00