1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-26 09:46:09 +00:00

- 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 lines so they fit standard terminal width (80 characters)

Reported by:	Jeremiah Gillis
PR:		236459
Submitted by:	Joseph Benden (maintainer)
This commit is contained in:
Alexey Dokuchaev 2019-03-12 07:24:48 +00:00
parent 0c6d727a2c
commit 6df390e34d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=495444
4 changed files with 38 additions and 36 deletions

View File

@ -2,18 +2,17 @@
# $FreeBSD$
PORTNAME= mosquitto
PORTVERSION= 1.5.5
PORTVERSION= 1.5.8
CATEGORIES= net
MASTER_SITES= http://mosquitto.org/files/source/
MAINTAINER= joe@thrallingpenguin.com
COMMENT= Open-Source MQTT Broker
COMMENT= Open source MQTT broker
LICENSE= EPL
LIB_DEPENDS= libcares.so:dns/c-ares \
libuuid.so:misc/e2fsprogs-libuuid
BUILD_DEPENDS= xsltproc:textproc/libxslt
LIB_DEPENDS= libuuid.so:misc/e2fsprogs-libuuid
RUN_DEPENDS= ${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss
USES= cmake ssl
USE_RC_SUBR= mosquitto
@ -24,23 +23,30 @@ USERS= nobody
PLIST_SUB= PORTVERSION=${PORTVERSION}
OPTIONS_DEFINE= WS
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=ON
WS_CMAKE_ON= -DWITH_WEBSOCKETS:BOOL=ON
post-patch:
@${REINPLACE_CMD} -e '45s,^,#include <sys/socket.h>,' \
${WRKSRC}/src/websockets.c
@${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:
${MV} ${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
${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>

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1545122205
SHA256 (mosquitto-1.5.5.tar.gz) = fcdb47e340864c545146681af7253399cc292e41775afd76400fda5b0d23d668
SIZE (mosquitto-1.5.5.tar.gz) = 431998
TIMESTAMP = 1551386128
SHA256 (mosquitto-1.5.8.tar.gz) = 78d7e70c3794dc3a1d484b4f2f8d3addebe9c2da3f5a1cebe557f7d13beb0da4
SIZE (mosquitto-1.5.8.tar.gz) = 442834

View File

@ -1,4 +1,4 @@
--- mosquitto.conf.orig 2018-08-16 16:05:26 UTC
--- mosquitto.conf.orig 2019-02-06 15:54:59 UTC
+++ mosquitto.conf
@@ -28,7 +28,7 @@
# This should be set to /var/run/mosquitto.pid if mosquitto is
@ -18,7 +18,7 @@
# The maximum number of QoS 1 and 2 messages currently inflight per
# client.
@@ -160,7 +160,7 @@
@@ -173,7 +173,7 @@
#bind_address
# Port to use for the default listener.
@ -27,3 +27,12 @@
# The maximum number of client connections to allow. This is
# a per listener setting.
@@ -224,7 +224,7 @@
# containing the CA certificates. For capath to work correctly, the
# certificate files must have ".crt" as the file ending and you must run
# "openssl rehash <path to capath>" each time you add/remove a certificate.
-#cafile
+cafile /usr/local/share/certs/ca-root-nss.crt
#capath
# Path to the PEM encoded server certificate.

View File

@ -1,33 +1,20 @@
lib/mosquitto_internal.h | 3 +++
src/mosquitto_passwd.c | 4 ++--
src/security_default.c | 2 +-
3 files changed, 6 insertions(+), 3 deletions(-)
--- src/mosquitto_passwd.c.orig 2018-10-11 00:27:05 UTC
--- src/mosquitto_passwd.c.orig 2019-02-28 17:18:59 UTC
+++ src/mosquitto_passwd.c
@@ -17,6 +17,7 @@ Contributors:
#include "config.h"
#include <errno.h>
+#include <openssl/opensslv.h>
#include <openssl/evp.h>
#include <openssl/rand.h>
#include <openssl/buffer.h>
@@ -99,7 +100,7 @@ int output_new_password(FILE *fptr, const char *userna
@@ -100,7 +100,7 @@ int output_new_password(FILE *fptr, const char *userna
unsigned char hash[EVP_MAX_MD_SIZE];
unsigned int hash_len;
const EVP_MD *digest;
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#ifdef HAVE_OPENSSL_OPAQUE_STRUCTS
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(HAVE_OPENSSL_OPAQUE_STRUCTS)
EVP_MD_CTX context;
#else
EVP_MD_CTX *context;
@@ -126,7 +127,7 @@ int output_new_password(FILE *fptr, const char *userna
@@ -127,7 +127,7 @@ int output_new_password(FILE *fptr, const char *userna
return 1;
}
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(HAVE_OPENSSL_OPAQUE_STRUCTS)
EVP_MD_CTX_init(&context);
EVP_DigestInit_ex(&context, digest, NULL);
EVP_DigestUpdate(&context, password, strlen(password));