net/mosquitto: Rework port
* Unbundle uthash as recommended by Porters Handbook
* Unbundle (lib)websockets as recommended by Porters Handbook
* Make (lib)websockets mandatory, default in all major distros
* Use sqlite helper
* Prefer libedit as upstream provides no way of selecting either libedit
or readline and it'll try to find libedit first
* Remove hack for adding path(s) to localbase, use helper instead
* Disable WITH_HTTP_API as port will otherwise pick up libmicrohttpd
in unclean environments
* Remove REINPLACE_CMD for CMakeLists.txt files as it does nothing
* Remove hardcoded cjson path
PR: 297568
Tested by: leres (maintainer)
net/mosquitto: Update to 2.1.2
Building with the ports version of libwebsockets is no longer broken.
Changes since 2.1.1:
- Forbid running with `persistence true` and with a persistence
plugin at the same time.
- Build fixes for OpenBSD.
- Fix static/shared linking of libwebsockets under cmake.
net/mosquitto: Fix websockets options
Rename WEBSOCKET to WEBSOCKETS to match the cmake options. Add
WEBSOCKETS_BUILTIN option. I'd like to have WEBSOCKETS control if
websockets is supported at all and WEBSOCKETS_BUILTIN switch between
the bundled and ports versions but the latter doesn't build so mark
BROKEN and open an upstream issue:
https://github.com/eclipse-mosquitto/mosquitto/issues/3478
One effect of these changes is that libwebsockets is no longer a
LIB_DEPENDS for the port; this will become a possibility once
WEBSOCKETS_BUILTIN OFF works again.
PR: 293005
Reported by: alexander@wittig.name
net/mosquitto: Update pkg-plist
The PR reports that consumers of the client library were missing
include files.
PR: 293004
Reported by: alexander@wittig.name
net/mosquitto: Fix sample mosquitto.conf for 2.0.22
mosquitto now complains if cafile is set but certfile and keyfile
are not:
1755534419: Error: cafile specified without certfile and keyfile.
/usr/local/etc/rc.d/mosquitto: WARNING: failed to start mosquitto
Avoid installing a invalid sample config; leave cafile unset.
Also avoid hardcoded /usr/local
Reported by: Steffen Dirkwinkel
Pull Request: https://github.com/freebsd/freebsd-ports/pull/417
net/mosquitto: Update to 2.0.22
Re-roll patches to make portlint happy.
Chance since 2.0.21:
- Windows: Fix broker crash on startup if using `log_dest stdout`
- Bridge: Fix idle_timeout never occurring for lazy bridges.
- Fix case where max_queued_messages = 0 was not treated as
unlimited.
- Fix `--version` exit code and output.
- Fix crash on receiving a $CONTROL message over a bridge, if
per_listener_settings is set true and the bridge is carrying out
topic remapping.
- Fix incorrect reference clock being selected on startup on Linux.
- Fix reporting of client disconnections being incorrectly attributed
to "out of memory".
- Fix compilation when using `WITH_OLD_KEEPALIVE`.
- Add Windows linker file for the broker to the installer.
- Fix Websockets PING not being sent on Windows.
- Fix problems with secure websockets.
- Fix crash on exit when using WITH_EPOLL=no.
- Fix clients being incorrectly expired when they have keepalive
== max_keepalive.
- Fix mismatch memory free when saving config which caused memory
tracking to be incorrect.
- Fix C++ symbols being removed when compiled with link time
optimisation.
- TLS error handling was incorrectly setting a protocol error for
non-TLS errors.
- Fix linker errors on some architectures using cmake.
*/*: Bump PORTREVISION after libuuid/libblkid switch
from e2fsprogs to util-linux, to complete the bump of all users
of either library that started with Alexander's commit titled
'*/*: Switch to misc/libuuid and misc/libblkid'
PR: 251489
*/*: Rename WEBSOCKET option
The WEBSOCKETS option has been renamed to WEBSOCKET to match the name from
RFC 6455, other ports and the description from Mk/bsd.options.desc.mk.
Approved by: otis (mentor)
net/mosquitto: Update to 2.0.20
Changes since 2.0.18:
- Fix mismatched subscribe/unsubscribe with normal/shared topics.
- Fix crash on bridge using remapped topic being sent a crafted
packet.
- Fix assert failure when loading a persistence file that contains
subscriptions with no client id.
- Fix local bridges being incorrectly expired when
persistent_client_expiration is in use.
- Fix use of CLOCK_BOOTTIME for getting time.
- Fix mismatched subscribe/unsubscribe with normal/shared topics.
- Fix crash on bridge using remapped topic being sent a crafted
packet.
- Fix some error codes being converted to string as "unknown".
- Clear SSL error state to avoid spurious error reporting.
- Fix "payload format invalid" not being allowed as a PUBREC reason
code.
- Don't allow SUBACK with missing reason codes.
- Fix QoS 1 / QoS 2 publish incorrectly returning "no subscribers".
- Don't allow invalid response topic values.
- Fix some strict protocol compliance issues.
PR: 283395
Reported by: ari@stonepile.fi
Approved by: joe@thrallingpenguin.com (maintainer timeout, 5 weeks)
net/mosquitto: Make websockets option default and minor tweaking of Makefile
Make websockets default, this is more inline with other distros
Do some slight changes to better follow Porters Handbook and tree overall
PR: 269614
Reviewed by: Joseph Benden <joe@thrallingpenguin.com> (maintainer)
net/mosquitto: Link with correct library type when using websockets option
Libwebsockets refers to static library as websockets and shared as
websockets_shared. Currently it causes shared option in mosuitto to link
with static library and static option doesn't work at all.
PR: 269536
Reviewed by: Joseph Benden <joe@thrallingpenguin.com> (maintainer)
Remove WWW entries moved into port Makefiles
Commit b7f05445c00f has added WWW entries to port Makefiles based on
WWW: lines in pkg-descr files.
This commit removes the WWW: lines of moved-over URLs from these
pkg-descr files.
Approved by: portmgr (tcberner)
Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.
Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.
There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.
This commit implements such a proposal and moves one of the WWW: entries
of each pkg-descr file into the respective port's Makefile. A heuristic
attempts to identify the most relevant URL in case there is more than
one WWW: entry in some pkg-descr file. URLs that are not moved into the
Makefile are prefixed with "See also:" instead of "WWW:" in the pkg-descr
files in order to preserve them.
There are 1256 ports that had no WWW: entries in pkg-descr files. These
ports will not be touched in this commit.
The portlint port has been adjusted to expect a WWW entry in each port
Makefile, and to flag any remaining "WWW:" lines in pkg-descr files as
deprecated.
Approved by: portmgr (tcberner)
devel/cmake: Update to 3.23.0
Update to 3.23.0.
Fix pkg-plist: using the default share/man location
Release Notes:
https://cmake.org/cmake/help/v3.23/release/3.23.html
PR: 262886
Exp-run by: antoine
net/mosquitto: Update to 2.0.13
* Fixes build with LibreSSL 3.4
PR: 259734
Reported by: Ivan Rozhuk <rozhuk im gmail com>
Approved by: joe thrallingpenguin com (maintainer)
net/mosquitto: update rc.d script to fix mosquitto_pidfile override
The default variables were being set before load_rc_config was invoked.
jrm@FreeBSD.org did most of this work and all credit goes to him.
I only found the problem. He helped tremendously.
PR: 258089
Reported by: dvl
Approved by: joe@thrallingpenguin.com (maintainer)
Obtained from: jrm
net/mosquitto: Update to 2.0.10 and solve NULL pointer dereference
https://github.com/eclipse/mosquitto/blob/d5ecd9f5aa98d42e7549eea09a71a23eef241f31/ChangeLog.txt
This release fixes a DoS vulnerability:
- If an authenticated client connected with MQTT v5 sent a malformed
CONNACK message to the broker a NULL pointer dereference occurred,
most likely resulting in a segfault.
Other changes since 2.0.8:
- Set `receive-maximum` to not exceed the `-C` message count in
mosquitto_sub and mosquitto_rr, to avoid potentially lost messages.
- Fix TLS-PSK mode not working with port 8883.
- Fix possible socket leak. This would occur if a client was using
`mosquitto_loop_start()`, then if the connection failed due to
the remote server being inaccessible they called `mosquitto_loop_stop(,
true)` and recreated the mosquitto object.
- If an empty or invalid CA file was provided to the client library
for verifying the remote broker, then the initial connection
would fail but subsequent connections would succeed without
verifying the remote broker certificate.
- If an empty or invalid CA file was provided to the broker for
verifying the remote broker for an outgoing bridge connection
then the initial connection would fail but subsequent connections
would succeed without verifying the remote broker certificate.
- Fix encrypted bridge connections incorrectly connecting when
`bridge_cafile` is empty or invalid.
- Fix `tls_version` behaviour not matching documentation.
- Fix messages to `$` prefixed topics being rejected.
- Fix QoS 0 messages not being delivered when max_queued_bytes was
configured.
- Fix bridge increasing backoff calculation.
- Improve handling of invalid combinations of listener address and
bind interface configurations.
- Fix `max_keepalive` option not applying to clients connecting
with keepalive
- Fix encrypted connections incorrectly connecting when the CA
file passed to `mosquitto_tls_set()` is empty or invalid. set
to 0.
PR: 255229
Reported by: Daniel Engberg
Approved by: joe@thrallingpenguin.com (maintainer)
MFH: 2021Q3
Security: cc553d79-e1f0-4b94-89f2-bacad42ee826
- Update to version 1.5.8 and fix "null" username and password bug - Drop `textproc/libxslt' dependency -- only needed when building from git sources, distfiles come with pre-generated manpages - Make `dns/c-ares' dependency optional, but keep it on by default - Add missing run-time dependency on `security/ca_root_nss' - Fix excessive use of capital letters in COMMENT, wrap some overly long li
Reported by: Jeremiah Gillis
PR: 236459
Submitted by: Joseph Benden (maintainer)
- Unbreak the build on 11.2-RELEASE when Websockets support is enabled by including required <sys/socket.h> header - Remove banal comments and bogus NOCONFIGURE knob while here
RR: 235323
net/mosquitto: update to 1.5.4
This release fixes a number of security, building and memory leak issues.
Announcement: https://mosquitto.org/blog/2018/11/version-154-released/
PR: 233552
Submitted by: iblis@hs.ntnu.edu.tw
Approved by: joe@thrallingpenguin.com (maintainer)
net/mosquitto: Unbreak the rc script; Fix the license
The rc script had the 'pidfile' token, when the code references 'pid_file'.
While here, fixed the license. It is actually EPL, not BSD.
Reported by: David BOYER <david.boyer59@gmail.com> (the pidfile issue in a private communication)
Approved by: portmgr blanket