Bug 250805

Summary: net/libwebsockets: update to 4.0.21
Product: Ports & Packages Reporter: s.dirkwinkel
Component: Individual Port(s)Assignee: Mikael Urankar <mikael>
Status: Closed FIXED    
Severity: Affects Only Me CC: fernape, iblis.dif01, mikael
Priority: --- Keywords: buildisok
Version: LatestFlags: iblis.dif01: maintainer-feedback+
Hardware: Any   
OS: Any   
URL: https://github.com/warmcat/libwebsockets/blob/5b852b561bbb0a3e3aa2f0a136d8e2f7a44b04f5/changelog#L4
Attachments:
Description Flags
Patch to update to 4.0.21
none
v4.0.21 patch 2 none

Description s.dirkwinkel 2020-11-02 10:54:55 UTC
Created attachment 219301 [details]
Patch to update to 4.0.21

4.1 fails for ttyd so lets to 4.0 first

License was changed upstream to MIT
Comment 1 Automation User 2020-11-02 11:04:23 UTC
Build and package info is available at https://gitlab.com/swills/freebsd-ports/pipelines/210553553
Comment 2 Iblis Lin 2020-11-03 08:39:03 UTC
Hi Steve,

  I appreciate for your contribution.
  There are two items on my checklist:
  1. [ ] Any new CMake options in v4.0 suitable for added as OPTIONS?
  2. [ ] net/mosquitto with WS OPTION enabled should work with v4.0

  Could you help me about the first one?
Comment 3 s.dirkwinkel 2020-11-03 10:15:35 UTC
Git diff for major options shows this:

+option(LWS_ROLE_MQTT "Build with support for MQTT client" OFF)
+option(LWS_ROLE_RAW_FILE "Compile with support for raw files" ON)
+option(LWS_WITH_ALSA "Enable alsa audio example" OFF)
+option(LWS_WITH_GTK "Enable gtk example" OFF)
+option(LWS_WITH_SYS_ASYNC_DNS "Nonblocking internal IPv4 + IPv6 DNS resolver" OFF)
+option(LWS_WITH_SYS_NTPCLIENT "Build in tiny ntpclient good for tls date validation and run via lws_system" OFF)
+option(LWS_WITH_SYS_DHCP_CLIENT "Build in tiny DHCP client" OFF)
+option(LWS_WITH_HTTP_BASIC_AUTH "Support Basic Auth" ON)
+option(LWS_WITH_HTTP_UNCOMMON_HEADERS "Include less common http header support" ON)
+
+#
+# Secure Streams
+#
+option(LWS_WITH_SECURE_STREAMS "Secure Streams protocol-agnostic API" OFF)
+option(LWS_WITH_SECURE_STREAMS_PROXY_API "Secure Streams support to work across processes" OFF)
+option(LWS_WITH_SECURE_STREAMS_SYS_AUTH_API_AMAZON_COM "Auth support for api.amazon.com" OFF)

LWS_ROLE_MQTT and maybe the secure streams seem like they might be OPTIONS
Comment 4 Iblis Lin 2020-11-03 13:17:39 UTC
(In reply to s.dirkwinkel from comment #3)

> LWS_ROLE_MQTT and maybe the secure streams seem like they might be OPTIONS

(Y)




@@ -27,7 +27,7 @@ CMAKE_ARGS=   -DLWS_WITHOUT_TESTAPPS=ON \
                -DLWS_WITHOUT_TEST_CLIENT=ON
 
 OPTIONS_DEFINE=        HTTP2 HTTP_PROXY IPV6 LIBEV LIBUV UNIX_SOCK WEBSERVER PLUGINS \
-               SOCKS5
+               SOCKS5 MQTT SECURE_STREAMS
 OPTIONS_DEFAULT=HTTP2 LIBUV
 OPTIONS_SUB=   yes
 
@@ -36,6 +36,8 @@ HTTP_PROXY_DESC=      HTTP proxy support
 LIBUV_DESC=    Asynchronous I/O support via libuv
 UNIX_SOCK_DESC=        Unix domain socket support
 SOCKS5_DESC=   Allow use of SOCKS5 proxy on client connections
+MQTT_DESC=             MQTT client support
+SECURE_STREAMS_DESC=   Secure Streams API support
 
 HTTP2_CMAKE_ON=        -DLWS_WITH_HTTP2=ON
 
@@ -63,4 +65,10 @@ PLUGINS_LIB_DEPENDS= libsqlite3.so:databases/sqlite3
 
 SOCKS5_CMAKE_ON=       -DLWS_WITH_SOCKS5=ON
 
+MQTT_CMAKE_ON=         -DLWS_ROLE_MQTT=ON
+
+SECURE_STREAMS_CMAKE_ON=-DLWS_WITH_SECURE_STREAMS=ON \
+                       -DLWS_WITH_SECURE_STREAMS_PROXY_API=ON \
+                       -DLWS_WITH_SECURE_STREAMS_SYS_AUTH_API_AMAZON_COM=ON
+
 .include <bsd.port.mk>
Comment 5 Iblis Lin 2020-11-03 13:18:42 UTC
I also tested mosquitto with libwebsockets. The MQTT over Websocket function works fine.

  1. [v] Any new CMake options in v4.0 suitable for added as OPTIONS?
  2. [v] net/mosquitto with WS OPTION enabled should work with v4.0
Comment 6 Iblis Lin 2020-11-03 13:21:29 UTC
Created attachment 219322 [details]
v4.0.21 patch 2
Comment 7 Fernando ApesteguĂ­a freebsd_committer freebsd_triage 2020-11-03 14:41:04 UTC
^Triage: If there is a changelog or release notes URL available for this version, please add it to the URL field.


Thanks!
Comment 8 Iblis Lin 2020-11-03 14:56:27 UTC
well, I cannot change the URL field.

changelog is here: https://github.com/warmcat/libwebsockets/blob/5b852b561bbb0a3e3aa2f0a136d8e2f7a44b04f5/changelog#L4
Comment 9 Fernando ApesteguĂ­a freebsd_committer freebsd_triage 2020-11-03 16:15:39 UTC
(In reply to Iblis Lin from comment #8)
Excellent,

Thanks!
Comment 10 Mikael Urankar freebsd_committer freebsd_triage 2020-11-07 16:36:44 UTC
Which patch should be committed?
Comment 11 Iblis Lin 2020-11-08 06:29:10 UTC
The latest one (https://bz-attachments.freebsd.org/attachment.cgi?id=219322), which includes some OPTIONS changes
Comment 12 commit-hook freebsd_committer freebsd_triage 2020-11-08 14:35:42 UTC
A commit references this bug:

Author: mikael
Date: Sun Nov  8 14:35:34 UTC 2020
New revision: 554469
URL: https://svnweb.freebsd.org/changeset/ports/554469

Log:
  net/libwebsockets: update to 4.0.21

  PR:		250805
  Submitted by:	Iblis Lin (maintainer)
  Reported by:	s.dirkwinkel@beckhoff.com

Changes:
  head/net/libwebsockets/Makefile
  head/net/libwebsockets/distinfo
  head/net/libwebsockets/pkg-plist