pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/net net: Add mosquitto 1.6.3nb4
details: https://anonhg.NetBSD.org/pkgsrc/rev/72f0e01fbcd9
branches: trunk
changeset: 398505:72f0e01fbcd9
user: gdt <gdt%pkgsrc.org@localhost>
date: Sat Jul 20 23:09:27 2019 +0000
description:
net: Add mosquitto 1.6.3nb4
(nb4 because wip is nb4)
Eclipse Mosquitto is an open source (EPL/EDL licensed) message broker that
implements the MQTT protocol versions 3.1 and 3.1.1 MQTT provides a
lightweight method of carrying out messaging using a publish/subscribe model.
This makes it suitable for "Internet of Things" messaging such as with low power
sensors or mobile devices such as phones, embedded computers or
microcontrollers like the Arduino.
diffstat:
net/Makefile | 3 +-
net/mosquitto/DESCR | 6 ++
net/mosquitto/Makefile | 61 ++++++++++++++++++++++++++
net/mosquitto/PLIST | 31 +++++++++++++
net/mosquitto/distinfo | 11 ++++
net/mosquitto/files/mosquitto.sh | 30 ++++++++++++
net/mosquitto/patches/patch-CMakeLists.txt | 20 ++++++++
net/mosquitto/patches/patch-lib_CMakeLists.txt | 23 +++++++++
net/mosquitto/patches/patch-lib_net__mosq.c | 22 +++++++++
net/mosquitto/patches/patch-mosquitto.conf | 25 ++++++++++
net/mosquitto/patches/patch-src_CMakeLists.txt | 17 +++++++
11 files changed, 248 insertions(+), 1 deletions(-)
diffs (truncated from 303 to 300 lines):
diff -r bf4e3b3aad3b -r 72f0e01fbcd9 net/Makefile
--- a/net/Makefile Sat Jul 20 22:57:11 2019 +0000
+++ b/net/Makefile Sat Jul 20 23:09:27 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1258 2019/07/02 03:58:14 adam Exp $
+# $NetBSD: Makefile,v 1.1259 2019/07/20 23:09:27 gdt Exp $
#
COMMENT= Networking tools
@@ -361,6 +361,7 @@
SUBDIR+= monotorrent
SUBDIR+= monsoon
SUBDIR+= mosh
+SUBDIR+= mosquitto
SUBDIR+= mouse-pppoe
SUBDIR+= mping
SUBDIR+= mrstat
diff -r bf4e3b3aad3b -r 72f0e01fbcd9 net/mosquitto/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/mosquitto/DESCR Sat Jul 20 23:09:27 2019 +0000
@@ -0,0 +1,6 @@
+Eclipse Mosquitto is an open source (EPL/EDL licensed) message broker that
+implements the MQTT protocol versions 3.1 and 3.1.1 MQTT provides a
+lightweight method of carrying out messaging using a publish/subscribe model.
+This makes it suitable for "Internet of Things" messaging such as with low power
+sensors or mobile devices such as phones, embedded computers or
+microcontrollers like the Arduino.
diff -r bf4e3b3aad3b -r 72f0e01fbcd9 net/mosquitto/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/mosquitto/Makefile Sat Jul 20 23:09:27 2019 +0000
@@ -0,0 +1,61 @@
+# $NetBSD: Makefile,v 1.1 2019/07/20 23:09:27 gdt Exp $
+
+VERSION= 1.6.3
+PKGREVISION= 4
+DISTNAME= mosquitto-${VERSION}
+CATEGORIES= net
+MASTER_SITES= https://mosquitto.org/files/source/
+
+#MAINTAINER= amoibos%gmail.com@localhost
+MAINTAINER= gdt%NetBSD.org@localhost
+HOMEPAGE= https://mosquitto.org/
+COMMENT= Open Source MQTT broker
+LICENSE= epl-v1.0
+
+USE_LANGUAGES+= c c++
+# Upstream documents that "unix" should use make, but Mac cmake.
+# After asking and receiving no guidance, choose to always use cmake.
+# https://github.com/eclipse/mosquitto/issues/1041
+USE_CMAKE= yes
+USE_TOOLS+= gmake
+
+CMAKE_ARGS+= -DCMAKE_INSTALL_SYSCONFDIR=${PREFIX}/share/examples
+
+MOSQUITTO_USER= mosquitto
+MOSQUITTO_GROUP= mosquitto
+
+PKG_USERS= ${MOSQUITTO_USER}:${MOSQUITTO_GROUP}
+PKG_GROUPS= ${MOSQUITTO_GROUP}
+
+# \todo The example file is vast and arguably should not be installed.
+# However, we need to set a few things to make automatic startup work.
+CONF_FILES= ${PREFIX}/share/examples/mosquitto/mosquitto.conf \
+ ${PKG_SYSCONFDIR}/mosquitto.conf
+
+SUBST_CLASSES+= paths
+SUBST_STAGE.paths= post-patch
+SUBST_MESSAGE.paths= Substituting paths
+SUBST_FILES.paths= mosquitto.conf
+SUBST_SED.paths= -e "s,@SSLCERTS@,${SSLCERTS},g"
+
+RCD_SCRIPTS= mosquitto
+FILES_SUBST+= MOSQUITTO_USER=${MOSQUITTO_USER}
+FILES_SUBST+= MOSQUITTO_GROUP=${MOSQUITTO_GROUP}
+FILES_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
+
+# mosquitto's build system is very troubled, and the tests do not
+# currently work.
+# https://github.com/eclipse/mosquitto/issues/1242
+# https://github.com/eclipse/mosquitto/issues/1330
+#
+# \todo invoke "gmake test" in tests/ subdir instead of at top level
+# \todo pass in CPPFLAGS/LDFLAGS to test invocation
+TEST_TARGET= test
+.include "../../devel/cunit/buildlink3.mk"
+
+.include "../../devel/libuuid/buildlink3.mk"
+.include "../../devel/uthash/buildlink3.mk"
+# ?needed
+.include "../../net/libcares/buildlink3.mk"
+.include "../../security/openssl/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r bf4e3b3aad3b -r 72f0e01fbcd9 net/mosquitto/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/mosquitto/PLIST Sat Jul 20 23:09:27 2019 +0000
@@ -0,0 +1,31 @@
+@comment $NetBSD: PLIST,v 1.1 2019/07/20 23:09:27 gdt Exp $
+bin/mosquitto_passwd
+bin/mosquitto_pub
+bin/mosquitto_rr
+bin/mosquitto_sub
+include/mosquitto.h
+include/mosquitto_broker.h
+include/mosquitto_plugin.h
+include/mosquittopp.h
+lib/libmosquitto.so
+lib/libmosquitto.so.1
+lib/libmosquitto.so.${PKGVERSION}
+lib/libmosquittopp.so
+lib/libmosquittopp.so.1
+lib/libmosquittopp.so.${PKGVERSION}
+lib/pkgconfig/libmosquitto.pc
+lib/pkgconfig/libmosquittopp.pc
+man/man1/mosquitto_passwd.1
+man/man1/mosquitto_pub.1
+man/man1/mosquitto_rr.1
+man/man1/mosquitto_sub.1
+man/man3/libmosquitto.3
+man/man5/mosquitto.conf.5
+man/man7/mosquitto-tls.7
+man/man7/mqtt.7
+man/man8/mosquitto.8
+sbin/mosquitto
+share/examples/mosquitto/aclfile.example
+share/examples/mosquitto/mosquitto.conf
+share/examples/mosquitto/pskfile.example
+share/examples/mosquitto/pwfile.example
diff -r bf4e3b3aad3b -r 72f0e01fbcd9 net/mosquitto/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/mosquitto/distinfo Sat Jul 20 23:09:27 2019 +0000
@@ -0,0 +1,11 @@
+$NetBSD: distinfo,v 1.1 2019/07/20 23:09:27 gdt Exp $
+
+SHA1 (mosquitto-1.6.3.tar.gz) = afd7115ac826f2bf296b870a12b5c288028daeb5
+RMD160 (mosquitto-1.6.3.tar.gz) = 7eb4f725d07d98f4f95a790676a0e73e5aebdd50
+SHA512 (mosquitto-1.6.3.tar.gz) = d78d95789cfadaa8c989becb799e6eace1a82cfed9d79582cf7278dd2f9f31060b0b6492c5e3461c687629445efbdda0db68cba65962eb6a305ada46611f6d94
+Size (mosquitto-1.6.3.tar.gz) = 578952 bytes
+SHA1 (patch-CMakeLists.txt) = fb04da93970ccca17657021597b8311875473242
+SHA1 (patch-lib_CMakeLists.txt) = cddb8803a759820c8059028f924b56c22689ee54
+SHA1 (patch-lib_net__mosq.c) = a38294cdfea98f2da0879ea93373c5f04aebdb20
+SHA1 (patch-mosquitto.conf) = 0ea671cfe3a332e9f0027b2410b212797fc1db17
+SHA1 (patch-src_CMakeLists.txt) = 2346ee3f13ab7f7e2c34492a4271e0b1adcae4fb
diff -r bf4e3b3aad3b -r 72f0e01fbcd9 net/mosquitto/files/mosquitto.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/mosquitto/files/mosquitto.sh Sat Jul 20 23:09:27 2019 +0000
@@ -0,0 +1,30 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: mosquitto.sh,v 1.1 2019/07/20 23:09:27 gdt Exp $
+#
+# PROVIDE: mosquitto
+# REQUIRE: DAEMON
+
+. /etc/rc.subr
+
+name="mosquitto"
+rcvar=$name
+command="@PREFIX@/sbin/${name}"
+piddir="/var/run/${name}"
+pidfile="${piddir}/${name}.pid"
+config="@PKG_SYSCONFDIR@/${name}.conf"
+
+command_args="-d -c $config"
+
+start_precmd="mosquitto_precmd"
+test_cmd="mosquitto_test"
+extra_commands=""
+
+mosquitto_precmd()
+{
+ mkdir -p ${piddir}
+ chown @MOSQUITTO_USER@ ${piddir}
+}
+
+load_rc_config $name
+run_rc_command "$1"
diff -r bf4e3b3aad3b -r 72f0e01fbcd9 net/mosquitto/patches/patch-CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/mosquitto/patches/patch-CMakeLists.txt Sat Jul 20 23:09:27 2019 +0000
@@ -0,0 +1,20 @@
+$NetBSD: patch-CMakeLists.txt,v 1.1 2019/07/20 23:09:27 gdt Exp $
+
+Adjust pkgconfig installation location to lib, not share.
+
+Sent upstream via email 20190427.
+
+--- CMakeLists.txt.orig 2019-06-18 11:45:59.000000000 +0000
++++ CMakeLists.txt
+@@ -108,9 +108,9 @@ install(FILES mosquitto.conf aclfile.exa
+ # ========================================
+
+ configure_file(libmosquitto.pc.in libmosquitto.pc @ONLY)
+-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libmosquitto.pc" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/pkgconfig")
++install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libmosquitto.pc" DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig")
+ configure_file(libmosquittopp.pc.in libmosquittopp.pc @ONLY)
+-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libmosquittopp.pc" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/pkgconfig")
++install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libmosquittopp.pc" DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig")
+
+ # ========================================
+ # Testing
diff -r bf4e3b3aad3b -r 72f0e01fbcd9 net/mosquitto/patches/patch-lib_CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/mosquitto/patches/patch-lib_CMakeLists.txt Sat Jul 20 23:09:27 2019 +0000
@@ -0,0 +1,23 @@
+$NetBSD: patch-lib_CMakeLists.txt,v 1.1 2019/07/20 23:09:27 gdt Exp $
+
+On NetBSD, do not include librt.
+\todo Why? All other "UNIX" does, except Mac.
+\todo Consider filing upstream.
+
+--- lib/CMakeLists.txt.orig 2018-09-04 16:57:17.000000000 +0000
++++ lib/CMakeLists.txt
+@@ -73,12 +73,12 @@ set(C_SRC
+
+ set (LIBRARIES ${OPENSSL_LIBRARIES} ${PTHREAD_LIBRARIES})
+
+-if (UNIX AND NOT APPLE)
++if (UNIX AND NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
+ find_library(LIBRT rt)
+ if (LIBRT)
+ set (LIBRARIES ${LIBRARIES} rt)
+ endif (LIBRT)
+-endif (UNIX AND NOT APPLE)
++endif (UNIX AND NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
+
+ if (WIN32)
+ set (LIBRARIES ${LIBRARIES} ws2_32)
diff -r bf4e3b3aad3b -r 72f0e01fbcd9 net/mosquitto/patches/patch-lib_net__mosq.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/mosquitto/patches/patch-lib_net__mosq.c Sat Jul 20 23:09:27 2019 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-lib_net__mosq.c,v 1.1 2019/07/20 23:09:27 gdt Exp $
+
+Work around lack of strnlen on older NetBSD.
+
+Not sent upstream becaus POSIX requires strnlen.
+
+--- lib/net_mosq.c.orig 2019-04-26 16:07:59.000000000 +0000
++++ lib/net_mosq.c
+@@ -69,6 +69,13 @@ Contributors:
+ #include "time_mosq.h"
+ #include "util_mosq.h"
+
++#if defined(__NetBSD__)
++#include <sys/param.h>
++#if ! __NetBSD_Prereq__(6,0,0)
++#define strnlen(s,l) strlen(s)
++#endif /* __NetBSD_Prereq__ */
++#endif /* __NetBSD__ */
++
+ #ifdef WITH_TLS
+ int tls_ex_index_mosq = -1;
+ UI_METHOD *_ui_method = NULL;
diff -r bf4e3b3aad3b -r 72f0e01fbcd9 net/mosquitto/patches/patch-mosquitto.conf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/mosquitto/patches/patch-mosquitto.conf Sat Jul 20 23:09:27 2019 +0000
@@ -0,0 +1,25 @@
+$NetBSD: patch-mosquitto.conf,v 1.1 2019/07/20 23:09:27 gdt Exp $
+
+Log to syslog, instead of (perhaps) not logging.
+
+\todo Figure out what happens if port is not defined, and why we set it.
+
+\todo Think about pidfile; because this can be run in various modes
+that seems like it should perhaps be command-line, not config.
+
+--- mosquitto.conf.orig 2019-06-18 11:45:59.000000000 +0000
++++ mosquitto.conf
+@@ -986,3 +986,13 @@
+ # given multiple times, all of the files from the first instance will be
+ # processed before the next instance. See the man page for examples.
+ #include_dir
++
++### PKGSRC ADJUSTMENTS FOR TRADITIONAL UNIX NORMS
++
++pid_file /var/run/mosquitto/mosquitto.pid
++
++log_dest syslog
++
++capath @SSLCERTS@
++
++### LOCAL CONFIGURATION
diff -r bf4e3b3aad3b -r 72f0e01fbcd9 net/mosquitto/patches/patch-src_CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/mosquitto/patches/patch-src_CMakeLists.txt Sat Jul 20 23:09:27 2019 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_CMakeLists.txt,v 1.1 2019/07/20 23:09:27 gdt Exp $
+
+On NetBSD, don't use -ldl (why?).
+
+Sent upstream via email 20190427.
+
+--- src/CMakeLists.txt.orig 2019-04-17 19:54:00.000000000 +0000
++++ src/CMakeLists.txt
+@@ -146,6 +146,8 @@ endif (HAVE_GETADDRINFO_A)
+ if (UNIX)
+ if (APPLE)
+ set (MOSQ_LIBS ${MOSQ_LIBS} dl m)
++ elseif (${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
++ set (MOSQ_LIBS ${MOSQ_LIBS} m)
Home |
Main Index |
Thread Index |
Old Index