GNU bug report logs - #69272
[PATCH 0/4] Refactor prosody modules, and add prosody-vcard-muc.

Previous Next

Package: guix-patches;

Reported by: Carlo Zancanaro <carlo <at> zancanaro.id.au>

Date: Mon, 19 Feb 2024 12:33:02 UTC

Severity: normal

Tags: patch

Done: Liliana Marie Prikler <liliana.prikler <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 69272 in the body.
You can then email your comments to 69272 AT debbugs.gnu.org in the normal way.

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#69272; Package guix-patches. (Mon, 19 Feb 2024 12:33:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Carlo Zancanaro <carlo <at> zancanaro.id.au>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 19 Feb 2024 12:33:02 GMT) Full text and rfc822 format available.

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

From: Carlo Zancanaro <carlo <at> zancanaro.id.au>
To: guix-patches <at> gnu.org
Subject: [PATCH 0/4] Refactor prosody modules, and add prosody-vcard-muc.
Date: Mon, 19 Feb 2024 23:31:03 +1100
I wanted to add prosody-vcard-muc, which is a prosody module. When I saw the
code for the two existing modules I thought it could use a refactor before
adding it, so I did that, too.

I have successfully reconfigured my prosody server, which uses all three of
the Guix-packaged prosody modules, with this change.

Carlo Zancanaro (4):
  gnu: Extract prosody-module from existing prosody modules.
  gnu: Use copy-build-system for prosody modules.
  gnu: Update prosody modules to the newest revision.
  gnu: Add prosody-vcard-muc.

 gnu/packages/messaging.scm | 88 +++++++++++++++++---------------------
 1 file changed, 39 insertions(+), 49 deletions(-)


base-commit: 07ecdb99b6c4b6b3e993d08034138bf69414020b
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#69272; Package guix-patches. (Mon, 19 Feb 2024 12:36:01 GMT) Full text and rfc822 format available.

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

From: Carlo Zancanaro <carlo <at> zancanaro.id.au>
To: 69272 <at> debbugs.gnu.org
Subject: [PATCH 1/4] gnu: Extract prosody-module from existing prosody modules.
Date: Mon, 19 Feb 2024 23:34:56 +1100
* gnu/packages/messaging.scm (prosody-module): New procedure.
(prosody-http-upload, prosody-smacks): Use it.

Change-Id: I55c69104460adbbd89c491b18f9f22681aefb92a
---
 gnu/packages/messaging.scm | 67 ++++++++++++++++----------------------
 1 file changed, 28 insertions(+), 39 deletions(-)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 98c1c9bf67..9cc90c588b 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -40,6 +40,7 @@
 ;;; Copyright © 2023 Giacomo Leidi <goodoldpaul <at> autistici.org>
 ;;; Copyright © 2023 Yovan Naumovski <yovan <at> gorski.stream>
 ;;; Copyright © 2023 gemmaro <gemmaro.dev <at> gmail.com>
+;;; Copyright © 2024 Carlo Zancanaro <carlo <at> zancanaro.id.au>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1577,11 +1578,18 @@ (define-public prosody
 protocols.")
     (license license:x11)))
 
-(define-public prosody-http-upload
+(define (prosody-module module-name)
   (let ((changeset "765735bb590b")
-        (revision "1"))
+        (revision "1")
+        (package-name (string-append
+                       "prosody-"
+                       (string-replace-substring
+                        (if (string-prefix? "mod_" module-name)
+                            (substring module-name 4)
+                            module-name)
+                        "_" "-"))))
     (package
-      (name "prosody-http-upload")
+      (name package-name)
       (version (string-append "0-" revision "." (string-take changeset 7)))
       (source (origin
                 (method hg-fetch)
@@ -1600,47 +1608,28 @@ (define-public prosody-http-upload
            (use-modules (guix build utils))
            (let ((out (assoc-ref %outputs "out"))
                  (source (assoc-ref %build-inputs "source")))
-             (with-directory-excursion (in-vicinity source "mod_http_upload")
-               (install-file "mod_http_upload.lua" out))
+             (with-directory-excursion (in-vicinity source module-name)
+               (install-file (string-append module-name ".lua") out))
              #t))))
-      (home-page "https://modules.prosody.im/mod_http_upload.html")
-      (synopsis "XEP-0363: Allow clients to upload files over HTTP")
-      (description "This module implements XEP-0363: it allows clients to
-upload files over HTTP.")
+      (home-page #f)
+      (synopsis #f)
+      (description #f)
       (license (package-license prosody)))))
 
+(define-public prosody-http-upload
+  (package
+    (inherit (prosody-module "mod_http_upload"))
+    (synopsis "XEP-0363: Allow clients to upload files over HTTP")
+    (description "This module implements XEP-0363: it allows clients to
+upload files over HTTP.")))
+
 (define-public prosody-smacks
-  (let ((changeset "67f1d1f22625")
-        (revision "1"))
-    (package
-      (name "prosody-smacks")
-      (version (string-append "0-" revision "." (string-take changeset 7)))
-      (source (origin
-                (method hg-fetch)
-                (uri (hg-reference
-                      (url "https://hg.prosody.im/prosody-modules/")
-                      (changeset changeset)))
-                (file-name (string-append name "-" version "-checkout"))
-                (sha256
-                 (base32
-                  "020ngpax30fgarah98yvlj0ni8rcdwq60if03a9hqdw8mic0nxxs"))))
-      (build-system trivial-build-system)
-      (arguments
-       '(#:modules ((guix build utils))
-         #:builder
-         (begin
-           (use-modules (guix build utils))
-           (let ((out (assoc-ref %outputs "out"))
-                 (source (assoc-ref %build-inputs "source")))
-             (with-directory-excursion (in-vicinity source "mod_smacks")
-               (install-file "mod_smacks.lua" out))
-             #t))))
-      (home-page "https://modules.prosody.im/mod_smacks.html")
-      (synopsis "XEP-0198: Reliability and fast reconnects for XMPP")
-      (description "This module implements XEP-0198: when supported by both
+  (package
+    (inherit (prosody-module "mod_smacks"))
+    (synopsis "XEP-0198: Reliability and fast reconnects for XMPP")
+    (description "This module implements XEP-0198: when supported by both
 the client and server, it can allow clients to resume a disconnected session,
-and prevent message loss.")
-      (license (package-license prosody)))))
+and prevent message loss.")))
 
 (define-public libtoxcore
   (let ((revision "2")
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#69272; Package guix-patches. (Mon, 19 Feb 2024 12:36:02 GMT) Full text and rfc822 format available.

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

From: Carlo Zancanaro <carlo <at> zancanaro.id.au>
To: 69272 <at> debbugs.gnu.org
Subject: [PATCH 2/4] gnu: Use copy-build-system for prosody modules.
Date: Mon, 19 Feb 2024 23:34:57 +1100
* gnu/packages/messaging.scm (prosody-module): Use copy-build system.

Change-Id: I6de2827c63cb454d80b20f3af84fa610a75172f4
---
 gnu/packages/messaging.scm | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 9cc90c588b..3f39900c44 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -144,6 +144,7 @@ (define-module (gnu packages messaging)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system go)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
@@ -1600,18 +1601,11 @@ (define (prosody-module module-name)
                 (sha256
                  (base32
                   "142wrcism70nf8ffahhd961cqg2pi1h7ic8adfs3zwh0j3pnf41f"))))
-      (build-system trivial-build-system)
+      (build-system copy-build-system)
       (arguments
-       '(#:modules ((guix build utils))
-         #:builder
-         (begin
-           (use-modules (guix build utils))
-           (let ((out (assoc-ref %outputs "out"))
-                 (source (assoc-ref %build-inputs "source")))
-             (with-directory-excursion (in-vicinity source module-name)
-               (install-file (string-append module-name ".lua") out))
-             #t))))
-      (home-page #f)
+       `(#:install-plan '((,(string-append module-name "/") "."))))
+      (home-page (string-append "https://modules.prosody.im/"
+                                module-name ".html"))
       (synopsis #f)
       (description #f)
       (license (package-license prosody)))))
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#69272; Package guix-patches. (Mon, 19 Feb 2024 12:36:02 GMT) Full text and rfc822 format available.

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

From: Carlo Zancanaro <carlo <at> zancanaro.id.au>
To: 69272 <at> debbugs.gnu.org
Subject: [PATCH 3/4] gnu: Update prosody modules to the newest revision.
Date: Mon, 19 Feb 2024 23:34:58 +1100
* gnu/packages/messaging.scm (prosody-module): Update to fba64b043c52.

Change-Id: I012c2f661200cc59ae088e522ac233c09d77d2af
---
 gnu/packages/messaging.scm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 3f39900c44..f360e69fcb 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -1580,8 +1580,8 @@ (define-public prosody
     (license license:x11)))
 
 (define (prosody-module module-name)
-  (let ((changeset "765735bb590b")
-        (revision "1")
+  (let ((changeset "fba64b043c52")
+        (revision "2")
         (package-name (string-append
                        "prosody-"
                        (string-replace-substring
@@ -1600,7 +1600,7 @@ (define (prosody-module module-name)
                 (file-name (string-append name "-" version "-checkout"))
                 (sha256
                  (base32
-                  "142wrcism70nf8ffahhd961cqg2pi1h7ic8adfs3zwh0j3pnf41f"))))
+                  "1nvka8s3zqs97jqsknhp2q956rrdga1qaxa1y3i0h8zx3g9vgdch"))))
       (build-system copy-build-system)
       (arguments
        `(#:install-plan '((,(string-append module-name "/") "."))))
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#69272; Package guix-patches. (Mon, 19 Feb 2024 12:36:02 GMT) Full text and rfc822 format available.

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

From: Carlo Zancanaro <carlo <at> zancanaro.id.au>
To: 69272 <at> debbugs.gnu.org
Subject: [PATCH 4/4] gnu: Add prosody-vcard-muc.
Date: Mon, 19 Feb 2024 23:34:59 +1100
* gnu/packages/messaging.scm (prosody-vcard-muc): New variable.

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

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index f360e69fcb..03b7368ae0 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -1625,6 +1625,13 @@ (define-public prosody-smacks
 the client and server, it can allow clients to resume a disconnected session,
 and prevent message loss.")))
 
+(define-public prosody-vcard-muc
+  (package
+    (inherit (prosody-module "mod_vcard_muc"))
+    (synopsis "Support for MUC vCards and avatars")
+    (description "This module adds the ability to set vCard for MUC rooms. One
+of the most common use cases is to define avatars for MUC rooms.")))
+
 (define-public libtoxcore
   (let ((revision "2")
         (commit "bf69b54f64003d160d759068f4816b2d9b2e1e21"))
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#69272; Package guix-patches. (Mon, 19 Feb 2024 21:48:01 GMT) Full text and rfc822 format available.

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

From: Carlo Zancanaro <carlo <at> zancanaro.id.au>
To: 69272 <at> debbugs.gnu.org
Subject: [PATCH v2 0/4] Refactor prosody modules, and add prosody-vcard-muc.
Date: Tue, 20 Feb 2024 08:44:15 +1100
I noticed that the home-page line snuck out of the first commit and
ended up in the second. This should be better.

Carlo Zancanaro (4):
  gnu: Extract prosody-module from existing prosody modules.
  gnu: Use copy-build-system for prosody modules.
  gnu: Update prosody modules to the newest revision.
  gnu: Add prosody-vcard-muc.

 gnu/packages/messaging.scm | 88 +++++++++++++++++---------------------
 1 file changed, 39 insertions(+), 49 deletions(-)


base-commit: 07ecdb99b6c4b6b3e993d08034138bf69414020b
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#69272; Package guix-patches. (Mon, 19 Feb 2024 21:48:02 GMT) Full text and rfc822 format available.

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

From: Carlo Zancanaro <carlo <at> zancanaro.id.au>
To: 69272 <at> debbugs.gnu.org
Subject: [PATCH v2 1/4] gnu: Extract prosody-module from existing prosody
 modules.
Date: Tue, 20 Feb 2024 08:44:16 +1100
* gnu/packages/messaging.scm (prosody-module): New procedure.
(prosody-http-upload, prosody-smacks): Use it.

Change-Id: I55c69104460adbbd89c491b18f9f22681aefb92a
---
The only change from v1 is to properly define home-page in prosody-module.

 gnu/packages/messaging.scm | 70 ++++++++++++++++----------------------
 1 file changed, 30 insertions(+), 40 deletions(-)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 98c1c9bf67..d06cd74177 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -40,6 +40,7 @@
 ;;; Copyright © 2023 Giacomo Leidi <goodoldpaul <at> autistici.org>
 ;;; Copyright © 2023 Yovan Naumovski <yovan <at> gorski.stream>
 ;;; Copyright © 2023 gemmaro <gemmaro.dev <at> gmail.com>
+;;; Copyright © 2024 Carlo Zancanaro <carlo <at> zancanaro.id.au>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1577,11 +1578,18 @@ (define-public prosody
 protocols.")
     (license license:x11)))
 
-(define-public prosody-http-upload
+(define (prosody-module module-name)
   (let ((changeset "765735bb590b")
-        (revision "1"))
+        (revision "1")
+        (package-name (string-append
+                       "prosody-"
+                       (string-replace-substring
+                        (if (string-prefix? "mod_" module-name)
+                            (substring module-name 4)
+                            module-name)
+                        "_" "-"))))
     (package
-      (name "prosody-http-upload")
+      (name package-name)
       (version (string-append "0-" revision "." (string-take changeset 7)))
       (source (origin
                 (method hg-fetch)
@@ -1600,47 +1608,29 @@ (define-public prosody-http-upload
            (use-modules (guix build utils))
            (let ((out (assoc-ref %outputs "out"))
                  (source (assoc-ref %build-inputs "source")))
-             (with-directory-excursion (in-vicinity source "mod_http_upload")
-               (install-file "mod_http_upload.lua" out))
+             (with-directory-excursion (in-vicinity source module-name)
+               (install-file (string-append module-name ".lua") out))
              #t))))
-      (home-page "https://modules.prosody.im/mod_http_upload.html")
-      (synopsis "XEP-0363: Allow clients to upload files over HTTP")
-      (description "This module implements XEP-0363: it allows clients to
-upload files over HTTP.")
+      (home-page (string-append "https://modules.prosody.im/"
+                                module-name ".html"))
+      (synopsis #f)
+      (description #f)
       (license (package-license prosody)))))
 
-(define-public prosody-smacks
-  (let ((changeset "67f1d1f22625")
-        (revision "1"))
-    (package
-      (name "prosody-smacks")
-      (version (string-append "0-" revision "." (string-take changeset 7)))
-      (source (origin
-                (method hg-fetch)
-                (uri (hg-reference
-                      (url "https://hg.prosody.im/prosody-modules/")
-                      (changeset changeset)))
-                (file-name (string-append name "-" version "-checkout"))
-                (sha256
-                 (base32
-                  "020ngpax30fgarah98yvlj0ni8rcdwq60if03a9hqdw8mic0nxxs"))))
-      (build-system trivial-build-system)
-      (arguments
-       '(#:modules ((guix build utils))
-         #:builder
-         (begin
-           (use-modules (guix build utils))
-           (let ((out (assoc-ref %outputs "out"))
-                 (source (assoc-ref %build-inputs "source")))
-             (with-directory-excursion (in-vicinity source "mod_smacks")
-               (install-file "mod_smacks.lua" out))
-             #t))))
-      (home-page "https://modules.prosody.im/mod_smacks.html")
-      (synopsis "XEP-0198: Reliability and fast reconnects for XMPP")
-      (description "This module implements XEP-0198: when supported by both
+(define-public prosody-http-upload
+  (package
+    (inherit (prosody-module "mod_http_upload"))
+    (synopsis "XEP-0363: Allow clients to upload files over HTTP")
+    (description "This module implements XEP-0363: it allows clients to
+upload files over HTTP.")))
+
+(define-public prosody-smack
+  (package
+    (inherit (prosody-module "mod_smacks"))
+    (synopsis "XEP-0198: Reliability and fast reconnects for XMPP")
+    (description "This module implements XEP-0198: when supported by both
 the client and server, it can allow clients to resume a disconnected session,
-and prevent message loss.")
-      (license (package-license prosody)))))
+and prevent message loss.")))
 
 (define-public libtoxcore
   (let ((revision "2")
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#69272; Package guix-patches. (Mon, 19 Feb 2024 21:48:02 GMT) Full text and rfc822 format available.

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

From: Carlo Zancanaro <carlo <at> zancanaro.id.au>
To: 69272 <at> debbugs.gnu.org
Subject: [PATCH v2 2/4] gnu: Use copy-build-system for prosody modules.
Date: Tue, 20 Feb 2024 08:44:17 +1100
* gnu/packages/messaging.scm (prosody-module): Use copy-build system.

Change-Id: I6de2827c63cb454d80b20f3af84fa610a75172f4
---
The only change from v1 is to remove the home-page definition from
this diff (because it's now in the earlier patch).

 gnu/packages/messaging.scm | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index d06cd74177..3dd1e66e81 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -144,6 +144,7 @@ (define-module (gnu packages messaging)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system go)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
@@ -1600,17 +1601,9 @@ (define (prosody-module module-name)
                 (sha256
                  (base32
                   "142wrcism70nf8ffahhd961cqg2pi1h7ic8adfs3zwh0j3pnf41f"))))
-      (build-system trivial-build-system)
+      (build-system copy-build-system)
       (arguments
-       '(#:modules ((guix build utils))
-         #:builder
-         (begin
-           (use-modules (guix build utils))
-           (let ((out (assoc-ref %outputs "out"))
-                 (source (assoc-ref %build-inputs "source")))
-             (with-directory-excursion (in-vicinity source module-name)
-               (install-file (string-append module-name ".lua") out))
-             #t))))
+       `(#:install-plan '((,(string-append module-name "/") "."))))
       (home-page (string-append "https://modules.prosody.im/"
                                 module-name ".html"))
       (synopsis #f)
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#69272; Package guix-patches. (Mon, 19 Feb 2024 21:48:03 GMT) Full text and rfc822 format available.

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

From: Carlo Zancanaro <carlo <at> zancanaro.id.au>
To: 69272 <at> debbugs.gnu.org
Subject: [PATCH v2 3/4] gnu: Update prosody modules to the newest revision.
Date: Tue, 20 Feb 2024 08:44:18 +1100
* gnu/packages/messaging.scm (prosody-module): Update to fba64b043c52.

Change-Id: I012c2f661200cc59ae088e522ac233c09d77d2af
---
 gnu/packages/messaging.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 3dd1e66e81..ef009577c4 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -1580,8 +1580,8 @@ (define-public prosody
     (license license:x11)))
 
 (define (prosody-module module-name)
-  (let ((changeset "765735bb590b")
-        (revision "1")
+  (let ((changeset "fba64b043c52")
+        (revision "2")
         (package-name (string-append
                        "prosody-"
                        (string-replace-substring
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#69272; Package guix-patches. (Mon, 19 Feb 2024 21:48:03 GMT) Full text and rfc822 format available.

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

From: Carlo Zancanaro <carlo <at> zancanaro.id.au>
To: 69272 <at> debbugs.gnu.org
Subject: [PATCH v2 4/4] gnu: Add prosody-vcard-muc.
Date: Tue, 20 Feb 2024 08:44:19 +1100
* gnu/packages/messaging.scm (prosody-vcard-muc): New variable.

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

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index ef009577c4..421a7afd78 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -1625,6 +1625,13 @@ (define-public prosody-smack
 the client and server, it can allow clients to resume a disconnected session,
 and prevent message loss.")))
 
+(define-public prosody-vcard-muc
+  (package
+    (inherit (prosody-module "mod_vcard_muc"))
+    (synopsis "Support for MUC vCards and avatars")
+    (description "This module adds the ability to set vCard for MUC rooms. One
+of the most common use cases is to define avatars for MUC rooms.")))
+
 (define-public libtoxcore
   (let ((revision "2")
         (commit "bf69b54f64003d160d759068f4816b2d9b2e1e21"))
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#69272; Package guix-patches. (Sat, 24 Feb 2024 11:34:02 GMT) Full text and rfc822 format available.

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

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: Carlo Zancanaro <carlo <at> zancanaro.id.au>, 69272 <at> debbugs.gnu.org
Subject: Re: [PATCH v2 0/4] Refactor prosody modules, and add
 prosody-vcard-muc.
Date: Sat, 24 Feb 2024 12:32:09 +0100
Am Dienstag, dem 20.02.2024 um 08:44 +1100 schrieb Carlo Zancanaro:
> I noticed that the home-page line snuck out of the first commit and
> ended up in the second. This should be better.
Hi, I just noticed that the prosody system test, as can be run through
  make check-system TESTS=prosody
appears to not be working.

Now, it does print a warning
  Prosody was unable to find lua-unbound
  […]
but I think you can ignore that.  What's worse is that despite
seemingly having a timeout of one minute for its operations, it just…
stalls.

You might want to fix that and also add a test for the vcard-muc you
added.

Cheers




Information forwarded to guix-patches <at> gnu.org:
bug#69272; Package guix-patches. (Sat, 24 Feb 2024 12:53:01 GMT) Full text and rfc822 format available.

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

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: Carlo Zancanaro <carlo <at> zancanaro.id.au>
Cc: 69272 <at> debbugs.gnu.org
Subject: Re: [bug#69272] [PATCH v2 0/4] Refactor prosody modules, and add
 prosody-vcard-muc.
Date: Sat, 24 Feb 2024 13:50:43 +0100
Am Samstag, dem 24.02.2024 um 22:58 +1100 schrieb Carlo Zancanaro:
> Fixing this test is beyond the scope of this patch series, and as far
> as I can tell there are no tests for other specific prosody modules.
> At the moment I don't really have the time/inclination to add these
> things.  
That's fine and relatable.

> If that is a blocker for this patch series being accepted then I'll
> just keep it in my own channel for now.
Not really, but I would have been more confident in fast-tracking this
if there was a test case attached to it.  I'll give it one more week on
the ML if no one else wants to push it.

Cheers




Information forwarded to guix-patches <at> gnu.org:
bug#69272; Package guix-patches. (Sat, 24 Feb 2024 13:14:01 GMT) Full text and rfc822 format available.

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

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: Carlo Zancanaro <carlo <at> zancanaro.id.au>, 69272 <at> debbugs.gnu.org
Subject: Re: [PATCH v2 0/4] Refactor prosody modules, and add
 prosody-vcard-muc.
Date: Sat, 24 Feb 2024 13:44:51 +0100
Am Samstag, dem 24.02.2024 um 12:32 +0100 schrieb Liliana Marie
Prikler:
> Am Dienstag, dem 20.02.2024 um 08:44 +1100 schrieb Carlo Zancanaro:
> > I noticed that the home-page line snuck out of the first commit and
> > ended up in the second. This should be better.
> Hi, I just noticed that the prosody system test, as can be run
> through
>   make check-system TESTS=prosody
> appears to not be working.
> 
> Now, it does print a warning
>   Prosody was unable to find lua-unbound
>   […]
> but I think you can ignore that.  What's worse is that despite
> seemingly having a timeout of one minute for its operations, it just…
> stalls.
Turns out I should have just waited longer.  Both without and with your
patches, the failure is

Test begin:
  test-name: "client-to-server communication"
  source-file: "/gnu/store/wqrrwk1w5wn4hdniffj3gsb91h3fpirl-prosody-
builder"
  source-line: 1
  source-form: (test-assert "client-to-server communication" (let
((freetalk-bin (string-append
"/gnu/store/9zl6dl4s2b57qax0ablavxbpk1h0aq9h-freetalk-4.2" )
Test end:
  result-kind: fail
  actual-value: #f
  actual-error: (misc-error #f "~A ~S" ("file didn't show up"
"/tmp/freetalk-witness") #f)

Cheers




Information forwarded to guix-patches <at> gnu.org:
bug#69272; Package guix-patches. (Sat, 24 Feb 2024 15:59:02 GMT) Full text and rfc822 format available.

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

From: Carlo Zancanaro <carlo <at> zancanaro.id.au>
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Cc: 69272 <at> debbugs.gnu.org
Subject: Re: [bug#69272] [PATCH v2 0/4] Refactor prosody modules, and add
 prosody-vcard-muc.
Date: Sat, 24 Feb 2024 22:58:26 +1100
Hi Liliana,

On Sat, Feb 24 2024, Liliana Marie Prikler wrote:
> Hi, I just noticed that the prosody system test, as can be run through
>   make check-system TESTS=prosody
> appears to not be working.

That is unfortunate, but seems unrelated to my patch. Running this test
without my changes also hangs.

> You might want to fix that and also add a test for the vcard-muc you
> added.

Fixing this test is beyond the scope of this patch series, and as far as
I can tell there are no tests for other specific prosody modules. At the
moment I don't really have the time/inclination to add these things. If
that is a blocker for this patch series being accepted then I'll just
keep it in my own channel for now.

Carlo




Information forwarded to guix-patches <at> gnu.org:
bug#69272; Package guix-patches. (Sat, 02 Mar 2024 06:45:02 GMT) Full text and rfc822 format available.

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

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: Carlo Zancanaro <carlo <at> zancanaro.id.au>, 69272 <at> debbugs.gnu.org
Subject: Re: [PATCH v2 4/4] gnu: Add prosody-vcard-muc.
Date: Sat, 02 Mar 2024 07:42:58 +0100
Hi,

Am Dienstag, dem 20.02.2024 um 08:44 +1100 schrieb Carlo Zancanaro:
> * gnu/packages/messaging.scm (prosody-vcard-muc): New variable.
> 
> Change-Id: I57eae8373369e7e954084803fd7b861ab85ce4ad
> ---
>  gnu/packages/messaging.scm | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
> index ef009577c4..421a7afd78 100644
> --- a/gnu/packages/messaging.scm
> +++ b/gnu/packages/messaging.scm
> @@ -1625,6 +1625,13 @@ (define-public prosody-smack
>  the client and server, it can allow clients to resume a disconnected
> session,
>  and prevent message loss.")))
>  
> +(define-public prosody-vcard-muc
> +  (package
> +    (inherit (prosody-module "mod_vcard_muc"))
> +    (synopsis "Support for MUC vCards and avatars")
> +    (description "This module adds the ability to set vCard for MUC
> rooms. One
> +of the most common use cases is to define avatars for MUC rooms.")))
> +
Trying to build this locally, I get a hash mismatch for the checkout.

  expected hash: 142wrcism70nf8ffahhd961cqg2pi1h7ic8adfs3zwh0j3pnf41f
  actual hash:   1nvka8s3zqs97jqsknhp2q956rrdga1qaxa1y3i0h8zx3g9vgdch

Do the hashes on prosody change that quickly?




Information forwarded to guix-patches <at> gnu.org:
bug#69272; Package guix-patches. (Sat, 02 Mar 2024 11:29:01 GMT) Full text and rfc822 format available.

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

From: Carlo Zancanaro <carlo <at> zancanaro.id.au>
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Cc: 69272 <at> debbugs.gnu.org
Subject: Re: [bug#69272] [PATCH v2 4/4] gnu: Add prosody-vcard-muc.
Date: Sat, 02 Mar 2024 22:27:49 +1100
Hi Liliana,

On Sat, Mar 02 2024, Liliana Marie Prikler wrote:
> Do the hashes on prosody change that quickly?

Nope! This is using a mercurial checkout, so the hashes shouldn't change
at all. I just made a mistake in my commits. Patch 3/4 in v2 updates the
changeset and revision, but not the expected hash. I'm not sure how I
messed this up, given patch 3/4 in v1 updated the hash.

The actual hash that you got is the same as my v1 patch:
1nvka8s3zqs97jqsknhp2q956rrdga1qaxa1y3i0h8zx3g9vgdch

I'll send through a v3 today.

Carlo

P.S. Apologies that you'll get this message twice. I forgot to Cc the
bug tracer on the first attempt.




Information forwarded to guix-patches <at> gnu.org:
bug#69272; Package guix-patches. (Sat, 02 Mar 2024 11:37:02 GMT) Full text and rfc822 format available.

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

From: Carlo Zancanaro <carlo <at> zancanaro.id.au>
To: 69272 <at> debbugs.gnu.org
Cc: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Subject: [PATCH v3 1/4] gnu: Extract prosody-module from existing prosody
 modules.
Date: Sat,  2 Mar 2024 22:35:12 +1100
* gnu/packages/messaging.scm (prosody-module): New procedure.
(prosody-http-upload, prosody-smacks): Use it.

Change-Id: I55c69104460adbbd89c491b18f9f22681aefb92a
---
 gnu/packages/messaging.scm | 69 ++++++++++++++++----------------------
 1 file changed, 29 insertions(+), 40 deletions(-)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 98c1c9bf67..35e11fb5dc 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -40,6 +40,7 @@
 ;;; Copyright © 2023 Giacomo Leidi <goodoldpaul <at> autistici.org>
 ;;; Copyright © 2023 Yovan Naumovski <yovan <at> gorski.stream>
 ;;; Copyright © 2023 gemmaro <gemmaro.dev <at> gmail.com>
+;;; Copyright © 2024 Carlo Zancanaro <carlo <at> zancanaro.id.au>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1577,11 +1578,18 @@ (define-public prosody
 protocols.")
     (license license:x11)))
 
-(define-public prosody-http-upload
+(define (prosody-module module-name)
   (let ((changeset "765735bb590b")
-        (revision "1"))
+        (revision "1")
+        (package-name (string-append
+                       "prosody-"
+                       (string-replace-substring
+                        (if (string-prefix? "mod_" module-name)
+                            (substring module-name 4)
+                            module-name)
+                        "_" "-"))))
     (package
-      (name "prosody-http-upload")
+      (name package-name)
       (version (string-append "0-" revision "." (string-take changeset 7)))
       (source (origin
                 (method hg-fetch)
@@ -1600,47 +1608,28 @@ (define-public prosody-http-upload
            (use-modules (guix build utils))
            (let ((out (assoc-ref %outputs "out"))
                  (source (assoc-ref %build-inputs "source")))
-             (with-directory-excursion (in-vicinity source "mod_http_upload")
-               (install-file "mod_http_upload.lua" out))
+             (with-directory-excursion (in-vicinity source module-name)
+               (install-file (string-append module-name ".lua") out))
              #t))))
-      (home-page "https://modules.prosody.im/mod_http_upload.html")
-      (synopsis "XEP-0363: Allow clients to upload files over HTTP")
-      (description "This module implements XEP-0363: it allows clients to
-upload files over HTTP.")
+      (home-page #f)
+      (synopsis #f)
+      (description #f)
       (license (package-license prosody)))))
 
-(define-public prosody-smacks
-  (let ((changeset "67f1d1f22625")
-        (revision "1"))
-    (package
-      (name "prosody-smacks")
-      (version (string-append "0-" revision "." (string-take changeset 7)))
-      (source (origin
-                (method hg-fetch)
-                (uri (hg-reference
-                      (url "https://hg.prosody.im/prosody-modules/")
-                      (changeset changeset)))
-                (file-name (string-append name "-" version "-checkout"))
-                (sha256
-                 (base32
-                  "020ngpax30fgarah98yvlj0ni8rcdwq60if03a9hqdw8mic0nxxs"))))
-      (build-system trivial-build-system)
-      (arguments
-       '(#:modules ((guix build utils))
-         #:builder
-         (begin
-           (use-modules (guix build utils))
-           (let ((out (assoc-ref %outputs "out"))
-                 (source (assoc-ref %build-inputs "source")))
-             (with-directory-excursion (in-vicinity source "mod_smacks")
-               (install-file "mod_smacks.lua" out))
-             #t))))
-      (home-page "https://modules.prosody.im/mod_smacks.html")
-      (synopsis "XEP-0198: Reliability and fast reconnects for XMPP")
-      (description "This module implements XEP-0198: when supported by both
+(define-public prosody-http-upload
+  (package
+    (inherit (prosody-module "mod_http_upload"))
+    (synopsis "XEP-0363: Allow clients to upload files over HTTP")
+    (description "This module implements XEP-0363: it allows clients to
+upload files over HTTP.")))
+
+(define-public prosody-smack
+  (package
+    (inherit (prosody-module "mod_smacks"))
+    (synopsis "XEP-0198: Reliability and fast reconnects for XMPP")
+    (description "This module implements XEP-0198: when supported by both
 the client and server, it can allow clients to resume a disconnected session,
-and prevent message loss.")
-      (license (package-license prosody)))))
+and prevent message loss.")))
 
 (define-public libtoxcore
   (let ((revision "2")

base-commit: 4a0549be52f3f46fbce61342d8de30f7b83130c5
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#69272; Package guix-patches. (Sat, 02 Mar 2024 11:37:02 GMT) Full text and rfc822 format available.

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

From: Carlo Zancanaro <carlo <at> zancanaro.id.au>
To: 69272 <at> debbugs.gnu.org
Cc: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Subject: [PATCH v3 2/4] gnu: Use copy-build-system for prosody modules.
Date: Sat,  2 Mar 2024 22:35:13 +1100
* gnu/packages/messaging.scm (prosody-module): Use copy-build system.

Change-Id: I6de2827c63cb454d80b20f3af84fa610a75172f4
---
 gnu/packages/messaging.scm | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 35e11fb5dc..3dd1e66e81 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -144,6 +144,7 @@ (define-module (gnu packages messaging)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system go)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
@@ -1600,18 +1601,11 @@ (define (prosody-module module-name)
                 (sha256
                  (base32
                   "142wrcism70nf8ffahhd961cqg2pi1h7ic8adfs3zwh0j3pnf41f"))))
-      (build-system trivial-build-system)
+      (build-system copy-build-system)
       (arguments
-       '(#:modules ((guix build utils))
-         #:builder
-         (begin
-           (use-modules (guix build utils))
-           (let ((out (assoc-ref %outputs "out"))
-                 (source (assoc-ref %build-inputs "source")))
-             (with-directory-excursion (in-vicinity source module-name)
-               (install-file (string-append module-name ".lua") out))
-             #t))))
-      (home-page #f)
+       `(#:install-plan '((,(string-append module-name "/") "."))))
+      (home-page (string-append "https://modules.prosody.im/"
+                                module-name ".html"))
       (synopsis #f)
       (description #f)
       (license (package-license prosody)))))
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#69272; Package guix-patches. (Sat, 02 Mar 2024 11:37:03 GMT) Full text and rfc822 format available.

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

From: Carlo Zancanaro <carlo <at> zancanaro.id.au>
To: 69272 <at> debbugs.gnu.org
Cc: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Subject: [PATCH v3 3/4] gnu: Update prosody modules to the newest revision.
Date: Sat,  2 Mar 2024 22:35:14 +1100
* gnu/packages/messaging.scm (prosody-module): Update to fba64b043c52.

Change-Id: I012c2f661200cc59ae088e522ac233c09d77d2af
---
 gnu/packages/messaging.scm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 3dd1e66e81..2e665f47e3 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -1580,8 +1580,8 @@ (define-public prosody
     (license license:x11)))
 
 (define (prosody-module module-name)
-  (let ((changeset "765735bb590b")
-        (revision "1")
+  (let ((changeset "fba64b043c52")
+        (revision "2")
         (package-name (string-append
                        "prosody-"
                        (string-replace-substring
@@ -1600,7 +1600,7 @@ (define (prosody-module module-name)
                 (file-name (string-append name "-" version "-checkout"))
                 (sha256
                  (base32
-                  "142wrcism70nf8ffahhd961cqg2pi1h7ic8adfs3zwh0j3pnf41f"))))
+                  "1nvka8s3zqs97jqsknhp2q956rrdga1qaxa1y3i0h8zx3g9vgdch"))))
       (build-system copy-build-system)
       (arguments
        `(#:install-plan '((,(string-append module-name "/") "."))))
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#69272; Package guix-patches. (Sat, 02 Mar 2024 11:37:03 GMT) Full text and rfc822 format available.

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

From: Carlo Zancanaro <carlo <at> zancanaro.id.au>
To: 69272 <at> debbugs.gnu.org
Cc: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Subject: [PATCH v3 4/4] gnu: Add prosody-vcard-muc.
Date: Sat,  2 Mar 2024 22:35:15 +1100
* gnu/packages/messaging.scm (prosody-vcard-muc): New variable.

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

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 2e665f47e3..aa9feffb97 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -1625,6 +1625,13 @@ (define-public prosody-smack
 the client and server, it can allow clients to resume a disconnected session,
 and prevent message loss.")))
 
+(define-public prosody-vcard-muc
+  (package
+    (inherit (prosody-module "mod_vcard_muc"))
+    (synopsis "Support for MUC vCards and avatars")
+    (description "This module adds the ability to set vCard for MUC rooms. One
+of the most common use cases is to define avatars for MUC rooms.")))
+
 (define-public libtoxcore
   (let ((revision "2")
         (commit "bf69b54f64003d160d759068f4816b2d9b2e1e21"))
-- 
2.41.0





Reply sent to Liliana Marie Prikler <liliana.prikler <at> gmail.com>:
You have taken responsibility. (Sat, 02 Mar 2024 13:02:02 GMT) Full text and rfc822 format available.

Notification sent to Carlo Zancanaro <carlo <at> zancanaro.id.au>:
bug acknowledged by developer. (Sat, 02 Mar 2024 13:02:02 GMT) Full text and rfc822 format available.

Message #67 received at 69272-done <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: Carlo Zancanaro <carlo <at> zancanaro.id.au>
Cc: 69272-done <at> debbugs.gnu.org
Subject: Re: [bug#69272] [PATCH v2 4/4] gnu: Add prosody-vcard-muc.
Date: Sat, 02 Mar 2024 14:00:15 +0100
Am Samstag, dem 02.03.2024 um 22:27 +1100 schrieb Carlo Zancanaro:
> P.S. Apologies that you'll get this message twice. I forgot to Cc the
> bug tracer on the first attempt.
Apologies from me for not checking earlier.

Pushed now, thanks!





Information forwarded to guix-patches <at> gnu.org:
bug#69272; Package guix-patches. (Sun, 03 Mar 2024 04:09:02 GMT) Full text and rfc822 format available.

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

From: Carlo Zancanaro <carlo <at> zancanaro.id.au>
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Cc: 69272 <at> debbugs.gnu.org
Subject: Re: bug#69272: [PATCH v2 4/4] gnu: Add prosody-vcard-muc.
Date: Sun, 03 Mar 2024 15:07:53 +1100
On Sat, Mar 02 2024, Liliana Marie Prikler wrote:
> Pushed now, thanks!

Unfortunately I've discovered another silly mistake:
bca48fdef48150a3c4e96e3941feb1986ea3e631 refactored things, but
accidentally changed the "prosody-smacks" package's variable name to
"prosody-smack".

I can put together a patch to change this back, but I don't have time to
do so right now. If anyone else gets to it before me then please feel
free to fix it! 🙂

Carlo




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 31 Mar 2024 11:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 34 days ago.

Previous Next


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