aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2019-03-12 15:24:48 +0800
committerAlexey Dokuchaev <danfe@FreeBSD.org>2019-03-12 15:24:48 +0800
commit6df390e34d68335535ba5f80b20b34a38bb26f4d (patch)
treed4d0ab6e3fa063efde709d9a97f460cccd459e68
parent0c6d727a2c70dbed39e33584c2d6872c295c0bfd (diff)
downloadfreebsd-ports-gnome-6df390e34d68335535ba5f80b20b34a38bb26f4d.tar.gz
freebsd-ports-gnome-6df390e34d68335535ba5f80b20b34a38bb26f4d.tar.zst
freebsd-ports-gnome-6df390e34d68335535ba5f80b20b34a38bb26f4d.zip
- 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)
-rw-r--r--net/mosquitto/Makefile32
-rw-r--r--net/mosquitto/distinfo6
-rw-r--r--net/mosquitto/files/patch-mosquitto.conf13
-rw-r--r--net/mosquitto/files/patch-src_mosquitto__passwd.c23
4 files changed, 38 insertions, 36 deletions
diff --git a/net/mosquitto/Makefile b/net/mosquitto/Makefile
index 4b390c5ef0a6..7a440f5eff03 100644
--- a/net/mosquitto/Makefile
+++ b/net/mosquitto/Makefile
@@ -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>
diff --git a/net/mosquitto/distinfo b/net/mosquitto/distinfo
index 2eb26e8a4dc1..fda2e31c2c3a 100644
--- a/net/mosquitto/distinfo
+++ b/net/mosquitto/distinfo
@@ -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
diff --git a/net/mosquitto/files/patch-mosquitto.conf b/net/mosquitto/files/patch-mosquitto.conf
index 39a0fef7cd63..e31c8f984559 100644
--- a/net/mosquitto/files/patch-mosquitto.conf
+++ b/net/mosquitto/files/patch-mosquitto.conf
@@ -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.
diff --git a/net/mosquitto/files/patch-src_mosquitto__passwd.c b/net/mosquitto/files/patch-src_mosquitto__passwd.c
index bbd83b080207..9dd0659dd751 100644
--- a/net/mosquitto/files/patch-src_mosquitto__passwd.c
+++ b/net/mosquitto/files/patch-src_mosquitto__passwd.c
@@ -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));