freebsd-ports/net/mosquitto/Makefile

56 lines
1.5 KiB
Makefile
Raw Normal View History

# Created by: Joseph Benden <joe@thrallingpenguin.com>
PORTNAME= mosquitto
PORTVERSION= 2.0.13
CATEGORIES= net
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
2021-07-24 23:14:01 +02:00
MASTER_SITES= https://mosquitto.org/files/source/
MAINTAINER= joe@thrallingpenguin.com
COMMENT= Open source MQTT broker
LICENSE= EPL
BUILD_DEPENDS= xsltproc:textproc/libxslt \
docbook-xsl>0:textproc/docbook-xsl
LIB_DEPENDS= libuuid.so:misc/e2fsprogs-libuuid \
libcjson.so:devel/libcjson
RUN_DEPENDS= ${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss
USES= cmake cpe ssl
USE_RC_SUBR= mosquitto
USE_LDCONFIG= yes
CMAKE_ARGS= -DCMAKE_LIBDATADIR:PATH="${PREFIX}/libdata"
CPE_VENDOR= eclipse
USERS= nobody
PLIST_SUB= PORTVERSION=${PORTVERSION}
OPTIONS_DEFINE= CARES WS
OPTIONS_DEFAULT= CARES
CARES_LIB_DEPENDS= libcares.so:dns/c-ares
CARES_CMAKE_ON= -DWITH_SRV:BOOL=ON
WS_DESC= MQTT over Websockets support
WS_LIB_DEPENDS= libwebsockets.so:net/libwebsockets
WS_CMAKE_ON= -DWITH_WEBSOCKETS:BOOL=ON
post-patch:
@${REINPLACE_CMD} -e '/ldconfig/d' ${WRKSRC}/src/CMakeLists.txt \
${WRKSRC}/lib/CMakeLists.txt ${WRKSRC}/lib/cpp/CMakeLists.txt
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/CMakeLists.txt
post-install:
${SED} -e '/cafile/s,/usr/local,${LOCALBASE},' \
${STAGEDIR}${ETCDIR}/mosquitto.conf > \
${STAGEDIR}${ETCDIR}/mosquitto.conf.sample
${MV} ${STAGEDIR}${ETCDIR}/pwfile.example \
${STAGEDIR}${ETCDIR}/pwfile.sample
${MV} ${STAGEDIR}${ETCDIR}/pskfile.example \
${STAGEDIR}${ETCDIR}/pskfile.sample
${MV} ${STAGEDIR}${ETCDIR}/aclfile.example \
${STAGEDIR}${ETCDIR}/aclfile.sample
.include <bsd.port.mk>