On Wed, Aug 23, 2023 at 07:53:04PM +0100, Laurence Tratt wrote:
Any mosquitto users been able/willing to test this?
Laurie
> I am a light user of net/mosquitto on -stable and find it occasionally
> gets stuck in an infinite loop. I've updated the port to 2.0.17: it
> builds and passes `make test` but I can't test it in the scenario I use
> it for. So if there any users of net/mosquitto on -current who can test
> the patch below in a realistic environment, please let me know if it
> works for you or not!
>
>
> Laurie
>
>
> diff --git net/mosquitto/Makefile net/mosquitto/Makefile
> index dc96f28c6d6..2d19859791a 100644
> --- net/mosquitto/Makefile
> +++ net/mosquitto/Makefile
> @@ -1,8 +1,7 @@
> COMMENT = opensource MQTT broker
>
> -V = 2.0.15
> +V = 2.0.17
> DISTNAME = mosquitto-$V
> -REVISION = 0
>
> SHARED_LIBS += mosquitto 2.1 # 1.5
> SHARED_LIBS += mosquittopp 2.0 # 1.5
> @@ -40,7 +39,8 @@ CFLAGS += -I${LOCALBASE}/include
> TEST_DEPENDS= ${MODPY_RUN_DEPENDS} \
> ${BUILD_PKGPATH}-=$V \
> devel/cunit \
> - devel/gmake
> + devel/gmake \
> + sysutils/py-psutil${MODPY_FLAVOR}
>
> pre-test:
> ln -fs ${WRKBUILD}/src/mosquitto ${WRKSRC}/src/
> diff --git net/mosquitto/distinfo net/mosquitto/distinfo
> index e0ebbf1a265..0773808d274 100644
> --- net/mosquitto/distinfo
> +++ net/mosquitto/distinfo
> @@ -1,2 +1,2 @@
> -SHA256 (mosquitto-2.0.15.tar.gz) =
> RzWx0y4/kceoiWdB2IowIuiXMKHuiXlG3s+g3ycDmsY=
> -SIZE (mosquitto-2.0.15.tar.gz) = 792632
> +SHA256 (mosquitto-2.0.17.tar.gz) =
> O+epESNlZ8Gp++Jbrz4xZwBLpKDBUaRI7x9/wHfbpS8=
> +SIZE (mosquitto-2.0.17.tar.gz) = 795960
> diff --git net/mosquitto/patches/patch-man_CMakeLists_txt
> net/mosquitto/patches/patch-man_CMakeLists_txt
> index 45efedf1675..ecfa3637084 100644
> --- net/mosquitto/patches/patch-man_CMakeLists_txt
> +++ net/mosquitto/patches/patch-man_CMakeLists_txt
> @@ -3,21 +3,52 @@ just use the bundled manuals
> Index: man/CMakeLists.txt
> --- man/CMakeLists.txt.orig
> +++ man/CMakeLists.txt
> -@@ -6,7 +6,7 @@
> -
> - if(NOT WIN32)
> - find_program(XSLTPROC xsltproc OPTIONAL)
> -- if(XSLTPROC)
> -+ if(FALSE)
> - function(compile_manpage page)
> - add_custom_command(OUTPUT
> ${PROJECT_SOURCE_DIR}/man/${page}
> - COMMAND xsltproc
> ${PROJECT_SOURCE_DIR}/man/${page}.xml -o ${PROJECT_SOURCE_DIR}/man/
> -@@ -25,8 +25,6 @@ if(NOT WIN32)
> - compile_manpage("mosquitto-tls.7")
> - compile_manpage("mqtt.7")
> - compile_manpage("mosquitto.8")
> -- else()
> -- message(FATAL_ERROR "xsltproc not found: manpages cannot be
> built")
> - endif()
> +@@ -5,7 +5,7 @@
> + # because the install is optional.
>
> + find_program(XSLTPROC xsltproc OPTIONAL)
> +-if(XSLTPROC)
> ++if(FALSE)
> + function(compile_manpage page)
> + add_custom_command(OUTPUT ${PROJECT_SOURCE_DIR}/man/${page}
> + COMMAND xsltproc ${PROJECT_SOURCE_DIR}/man/${page}.xml
> -o ${PROJECT_SOURCE_DIR}/man/
> +@@ -24,25 +24,19 @@ if(XSLTPROC)
> + compile_manpage("mosquitto-tls.7")
> + compile_manpage("mqtt.7")
> + compile_manpage("mosquitto.8")
> +-
> +- install(FILES
> +- mosquitto_ctrl.1
> +- mosquitto_ctrl_dynsec.1
> +- mosquitto_passwd.1
> +- mosquitto_pub.1
> +- mosquitto_sub.1
> +- mosquitto_rr.1
> +- DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
> +- OPTIONAL)
> +-
> +- install(FILES libmosquitto.3 DESTINATION ${CMAKE_INSTALL_MANDIR}/man3
> OPTIONAL)
> +- install(FILES mosquitto.conf.5 DESTINATION ${CMAKE_INSTALL_MANDIR}/man5
> OPTIONAL)
> +- install(FILES mosquitto-tls.7 mqtt.7 DESTINATION
> ${CMAKE_INSTALL_MANDIR}/man7 OPTIONAL)
> +- install(FILES mosquitto.8 DESTINATION ${CMAKE_INSTALL_MANDIR}/man8
> OPTIONAL)
> +-
> +-elseif(WIN32)
> +- message(WARNING "xsltproc not found: manpages cannot be built")
> +-else()
> +- message(FATAL_ERROR "xsltproc not found: manpages cannot be built")
> endif()
> +
> ++install(FILES
> ++ mosquitto_ctrl.1
> ++ mosquitto_ctrl_dynsec.1
> ++ mosquitto_passwd.1
> ++ mosquitto_pub.1
> ++ mosquitto_sub.1
> ++ mosquitto_rr.1
> ++ DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
> ++ OPTIONAL)
> ++
> ++install(FILES libmosquitto.3 DESTINATION ${CMAKE_INSTALL_MANDIR}/man3
> OPTIONAL)
> ++install(FILES mosquitto.conf.5 DESTINATION ${CMAKE_INSTALL_MANDIR}/man5
> OPTIONAL)
> ++install(FILES mosquitto-tls.7 mqtt.7 DESTINATION
> ${CMAKE_INSTALL_MANDIR}/man7 OPTIONAL)
> ++install(FILES mosquitto.8 DESTINATION ${CMAKE_INSTALL_MANDIR}/man8 OPTIONAL)
> diff --git net/mosquitto/patches/patch-test_broker_Makefile
> net/mosquitto/patches/patch-test_broker_Makefile
> index 3f7fb9653b1..7485e839ea4 100644
> --- net/mosquitto/patches/patch-test_broker_Makefile
> +++ net/mosquitto/patches/patch-test_broker_Makefile
> @@ -5,7 +5,7 @@
> Index: test/broker/Makefile
> --- test/broker/Makefile.orig
> +++ test/broker/Makefile
> -@@ -55,7 +55,7 @@ msg_sequence_test:
> +@@ -56,7 +56,7 @@ msg_sequence_test:
> ./02-subpub-qos1-oversize-payload.py
> ./02-subpub-qos1.py
> ./02-subpub-qos2-1322.py
> @@ -14,9 +14,12 @@ Index: test/broker/Makefile
> ./02-subpub-qos2-pubrec-error.py
> ./02-subpub-qos2-receive-maximum-1.py
> ./02-subpub-qos2-receive-maximum-2.py
> -@@ -146,8 +146,8 @@ msg_sequence_test:
> +@@ -148,10 +148,10 @@ msg_sequence_test:
> +
> + 08 :
> ifeq ($(WITH_TLS),yes)
> - ./08-ssl-bridge.py
> +- ./08-ssl-bridge.py
> ++ -./08-ssl-bridge.py
> ./08-ssl-connect-cert-auth-crl.py
> - ./08-ssl-connect-cert-auth-expired.py
> - ./08-ssl-connect-cert-auth-revoked.py
>