GNU bug report logs - #78468
[PATCH 0/2] Enable websockets support for mosquitto.

Previous Next

Package: guix-patches;

Reported by: Evgeny Pisemsky <mail <at> pisemsky.site>

Date: Sat, 17 May 2025 08:53:02 UTC

Severity: normal

Tags: patch

Done: Evgeny Pisemsky <mail <at> pisemsky.site>

To reply to this bug, email your comments to 78468 AT debbugs.gnu.org.
There is no need to reopen the bug first.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#78468; Package guix-patches. (Sat, 17 May 2025 08:53:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Evgeny Pisemsky <mail <at> pisemsky.site>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 17 May 2025 08:53:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Evgeny Pisemsky <mail <at> pisemsky.site>
To: guix-patches <at> gnu.org
Subject: [PATCH 0/2] Enable websockets support for mosquitto.
Date: Sat, 17 May 2025 11:51:46 +0300
Evgeny Pisemsky (2):
  gnu: Add libwebsockets-for-mosquitto.
  gnu: mosquitto: Enable websockets support.

 gnu/packages/messaging.scm |  7 ++++++-
 gnu/packages/web.scm       | 13 ++++++++++++-
 2 files changed, 18 insertions(+), 2 deletions(-)


base-commit: 085f12b34e35fc187e84586fcf92902e8125b8cc
prerequisite-patch-id: 1a51779f9f1f25b3b01e9b34c2e9abb2dad30a1e
prerequisite-patch-id: 3c544cbbce74caaee294947a693da740311473e8
prerequisite-patch-id: 2100d30ac0bb0f96567aa6fc0d8ed26a1fc8697b
prerequisite-patch-id: a9ef5fc0b9423675fe0dfdaa2fb0b702d5fb2c8e
prerequisite-patch-id: 9455055497bc6f285f85a3631818aadeee88b645
prerequisite-patch-id: 617408d433c078edc547cf0df8a958986621256c
prerequisite-patch-id: adec272eddd93929ac3b73c7741b3dc02a8d3e11
-- 
2.49.0





Information forwarded to guix-patches <at> gnu.org:
bug#78468; Package guix-patches. (Sat, 17 May 2025 08:56:01 GMT) Full text and rfc822 format available.

Message #8 received at 78468 <at> debbugs.gnu.org (full text, mbox):

From: Evgeny Pisemsky <mail <at> pisemsky.site>
To: 78468 <at> debbugs.gnu.org
Subject: [PATCH 1/2] gnu: Add libwebsockets-for-mosquitto.
Date: Sat, 17 May 2025 11:55:33 +0300
* gnu/packages/web.scm (libwebsockets-for-mosquitto): New variable.

Change-Id: Ia8221e1a756e392ed0e8fa9a92e847da436e6215
---
 gnu/packages/web.scm | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index e2deee47da..b43b90ac33 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -65,7 +65,7 @@
 ;;; Copyright © 2023 VÖRÖSKŐI András <voroskoi <at> gmail.com>
 ;;; Copyright © 2023 Christopher Howard <christopher <at> librehacker.com>
 ;;; Copyright © 2023 Felix Lechner <felix.lechner <at> lease-up.com>
-;;; Copyright © 2023 Evgeny Pisemsky <mail <at> pisemsky.site>
+;;; Copyright © 2023, 2025 Evgeny Pisemsky <mail <at> pisemsky.site>
 ;;; Copyright © 2024 Tomas Volf <~@wolfsden.cz>
 ;;; Copyright © 2024 Zheng Junjie <873216071 <at> qq.com>
 ;;; Copyright © 2024, 2025 Artyom V. Poptsov <poptsov.artyom <at> gmail.com>
@@ -1791,6 +1791,17 @@ (define-public libwebsockets
     (home-page "https://libwebsockets.org")
     (license license:expat)))
 
+(define-public libwebsockets-for-mosquitto
+  (hidden-package
+   (package
+     (inherit libwebsockets)
+     (arguments
+      (list
+       ;; Mosquitto requires some tweaks for libwebsockets, see:
+       ;; https://github.com/NixOS/nixpkgs/blob/1750f3c1c89488e2ffdd47cab9d05454dddfb734/pkgs/by-name/mo/mosquitto/package.nix#L20
+       #:configure-flags '(list "-DLWS_WITH_EXTERNAL_POLL=ON"
+                                "-DLWS_WITH_HTTP2=OFF"))))))
+
 (define-public wabt
   (package
     (name "wabt")
-- 
2.49.0





Information forwarded to guix-patches <at> gnu.org:
bug#78468; Package guix-patches. (Sat, 17 May 2025 08:57:02 GMT) Full text and rfc822 format available.

Message #11 received at 78468 <at> debbugs.gnu.org (full text, mbox):

From: Evgeny Pisemsky <mail <at> pisemsky.site>
To: 78468 <at> debbugs.gnu.org
Subject: [PATCH 2/2] gnu: mosquitto: Enable websockets support.
Date: Sat, 17 May 2025 11:55:34 +0300
* gnu/packages/messaging.scm (mosquitto): Enable websockets support.
[arguments]: Specify configure flags.
[inputs]: Add libwebsockets-for-mosquitto.

Change-Id: Idf9f373770b786b1f839eaae9f0291d0e32ab38a
---
 gnu/packages/messaging.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 99491d0779..9c01626827 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -45,6 +45,7 @@
 ;;; Copyright © 2024, 2025 Ashish SHUKLA <ashish.is <at> lostca.se>
 ;;; Copyright © 2024, 2025 Igor Goryachev <igor <at> goryachev.org>
 ;;; Copyright © 2024 Nguyễn Gia Phong <mcsinyx <at> disroot.org>
+;;; Copyright © 2025 Evgeny Pisemsky <mail <at> pisemsky.site>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2964,7 +2965,11 @@ (define-public mosquitto
        (sha256
         (base32 "17c9gf2xncxsi3v8fbgq3abfyb84lyr18in0s1pbplmqmr6fimbs"))))
     (build-system cmake-build-system)
-    (inputs (list openssl libxslt))
+    (arguments
+     (list
+      #:configure-flags
+      #~(list "-DWITH_WEBSOCKETS=ON")))
+    (inputs (list openssl libxslt libwebsockets-for-mosquitto))
     (synopsis "Message broker")
     (description
      "This package provides Eclipse Mosquitto, a message broker
-- 
2.49.0





Information forwarded to guix-patches <at> gnu.org:
bug#78468; Package guix-patches. (Sat, 17 May 2025 09:13:02 GMT) Full text and rfc822 format available.

Message #14 received at 78468 <at> debbugs.gnu.org (full text, mbox):

From: Evgeny Pisemsky <mail <at> pisemsky.site>
To: 78468 <at> debbugs.gnu.org
Subject: Re: bug#78468: Acknowledgement ([PATCH 0/2] Enable websockets
 support for mosquitto.)
Date: Sat, 17 May 2025 12:12:02 +0300
Looks like base commit is wrong - I will resend.




Information forwarded to guix-patches <at> gnu.org:
bug#78468; Package guix-patches. (Sat, 17 May 2025 09:23:02 GMT) Full text and rfc822 format available.

Message #17 received at 78468 <at> debbugs.gnu.org (full text, mbox):

From: Evgeny Pisemsky <mail <at> pisemsky.site>
To: 78468 <at> debbugs.gnu.org
Subject: [PATCH 1/2] gnu: Add libwebsockets-for-mosquitto.
Date: Sat, 17 May 2025 12:22:15 +0300
* gnu/packages/web.scm (libwebsockets-for-mosquitto): New variable.

Change-Id: Ia8221e1a756e392ed0e8fa9a92e847da436e6215
---
 gnu/packages/web.scm | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index e2deee47da..b43b90ac33 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -65,7 +65,7 @@
 ;;; Copyright © 2023 VÖRÖSKŐI András <voroskoi <at> gmail.com>
 ;;; Copyright © 2023 Christopher Howard <christopher <at> librehacker.com>
 ;;; Copyright © 2023 Felix Lechner <felix.lechner <at> lease-up.com>
-;;; Copyright © 2023 Evgeny Pisemsky <mail <at> pisemsky.site>
+;;; Copyright © 2023, 2025 Evgeny Pisemsky <mail <at> pisemsky.site>
 ;;; Copyright © 2024 Tomas Volf <~@wolfsden.cz>
 ;;; Copyright © 2024 Zheng Junjie <873216071 <at> qq.com>
 ;;; Copyright © 2024, 2025 Artyom V. Poptsov <poptsov.artyom <at> gmail.com>
@@ -1791,6 +1791,17 @@ (define-public libwebsockets
     (home-page "https://libwebsockets.org")
     (license license:expat)))
 
+(define-public libwebsockets-for-mosquitto
+  (hidden-package
+   (package
+     (inherit libwebsockets)
+     (arguments
+      (list
+       ;; Mosquitto requires some tweaks for libwebsockets, see:
+       ;; https://github.com/NixOS/nixpkgs/blob/1750f3c1c89488e2ffdd47cab9d05454dddfb734/pkgs/by-name/mo/mosquitto/package.nix#L20
+       #:configure-flags '(list "-DLWS_WITH_EXTERNAL_POLL=ON"
+                                "-DLWS_WITH_HTTP2=OFF"))))))
+
 (define-public wabt
   (package
     (name "wabt")

base-commit: 5555d8f2da105fefc42d6a4737d34edcfde1c030
-- 
2.49.0





Information forwarded to guix-patches <at> gnu.org:
bug#78468; Package guix-patches. (Sat, 17 May 2025 09:23:03 GMT) Full text and rfc822 format available.

Message #20 received at 78468 <at> debbugs.gnu.org (full text, mbox):

From: Evgeny Pisemsky <mail <at> pisemsky.site>
To: 78468 <at> debbugs.gnu.org
Subject: [PATCH 2/2] gnu: mosquitto: Enable websockets support.
Date: Sat, 17 May 2025 12:22:16 +0300
* gnu/packages/messaging.scm (mosquitto): Enable websockets support.
[arguments]: Specify configure flags.
[inputs]: Add libwebsockets-for-mosquitto.

Change-Id: Idf9f373770b786b1f839eaae9f0291d0e32ab38a
---
 gnu/packages/messaging.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 99491d0779..9c01626827 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -45,6 +45,7 @@
 ;;; Copyright © 2024, 2025 Ashish SHUKLA <ashish.is <at> lostca.se>
 ;;; Copyright © 2024, 2025 Igor Goryachev <igor <at> goryachev.org>
 ;;; Copyright © 2024 Nguyễn Gia Phong <mcsinyx <at> disroot.org>
+;;; Copyright © 2025 Evgeny Pisemsky <mail <at> pisemsky.site>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2964,7 +2965,11 @@ (define-public mosquitto
        (sha256
         (base32 "17c9gf2xncxsi3v8fbgq3abfyb84lyr18in0s1pbplmqmr6fimbs"))))
     (build-system cmake-build-system)
-    (inputs (list openssl libxslt))
+    (arguments
+     (list
+      #:configure-flags
+      #~(list "-DWITH_WEBSOCKETS=ON")))
+    (inputs (list openssl libxslt libwebsockets-for-mosquitto))
     (synopsis "Message broker")
     (description
      "This package provides Eclipse Mosquitto, a message broker
-- 
2.49.0





Information forwarded to guix-patches <at> gnu.org:
bug#78468; Package guix-patches. (Sun, 18 May 2025 21:30:02 GMT) Full text and rfc822 format available.

Message #23 received at 78468 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> friendly-machines.com>
To: Evgeny Pisemsky <mail <at> pisemsky.site>
Cc: 78468 <at> debbugs.gnu.org
Subject: Re: [bug#78468] [PATCH 1/2] gnu: Add libwebsockets-for-mosquitto.
Date: Sun, 18 May 2025 23:29:22 +0200
Hi!

This package is not reproducible because it generates and installs
share/libwebsockets-test-server/libwebsockets-test-server.key.pem (a
private key!!) and a certificate
share/libwebsockets-test-server/libwebsockets-test-server.pem , both of
which are different each time, respectively.

Since that is presumably already the case for the original libwebsocket
package, I've pushed your two patches to guix master anyway.

Needless to say, we should fix libwebsockets as well.




Information forwarded to guix-patches <at> gnu.org:
bug#78468; Package guix-patches. (Thu, 22 May 2025 16:27:02 GMT) Full text and rfc822 format available.

Message #26 received at 78468 <at> debbugs.gnu.org (full text, mbox):

From: Evgeny Pisemsky <mail <at> pisemsky.site>
To: Danny Milosavljevic <dannym <at> friendly-machines.com>
Cc: 78468 <at> debbugs.gnu.org
Subject: Re: [bug#78468] [PATCH 1/2] gnu: Add libwebsockets-for-mosquitto.
Date: Thu, 22 May 2025 19:25:59 +0300
Danny Milosavljevic <dannym <at> friendly-machines.com> writes:

> Hi!
>
> This package is not reproducible because it generates and installs
> share/libwebsockets-test-server/libwebsockets-test-server.key.pem (a
> private key!!) and a certificate
> share/libwebsockets-test-server/libwebsockets-test-server.pem , both of
> which are different each time, respectively.
>
> Since that is presumably already the case for the original libwebsocket
> package, I've pushed your two patches to guix master anyway.
>
> Needless to say, we should fix libwebsockets as well.

Hi, thanks!

I have created a separate issue (to close this one):

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78553




bug closed, send any further explanations to 78468 <at> debbugs.gnu.org and Evgeny Pisemsky <mail <at> pisemsky.site> Request was from Evgeny Pisemsky <mail <at> pisemsky.site> to control <at> debbugs.gnu.org. (Thu, 22 May 2025 17:46:02 GMT) Full text and rfc822 format available.

This bug report was last modified 25 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.