[bug#75420,python-team,v3] gnu: pantalaimon: Update to 0.10.5-0.257ef6a.

Message ID c68d5754ba91784aedf35b7ee25b2bde2b03200a.1736765867.git.arjan@adriaan.se
State New
Headers
Series [bug#75420,python-team,v3] gnu: pantalaimon: Update to 0.10.5-0.257ef6a. |

Commit Message

Arjan Adriaanse Jan. 13, 2025, 10:57 a.m. UTC
  * gnu/packages/matrix.scm (pantalaimon): Update to 0.10.5-0.257ef6a.
[arguments]<#:phases>: Change requirements, skip hanging tests.
[native-inputs]: Add python-pytest-asyncio.
[propagated-inputs]: Replace python-appdirs with python-platformdirs.

Change-Id: Ie2ccb3263f41193e504184157d3a4be301ddacbf
---

I forgot to include the copyright notice from the initial version.

gnu/packages/matrix.scm | 131 +++++++++++++++++++++-------------------
 1 file changed, 68 insertions(+), 63 deletions(-)


base-commit: 7da088166d03859ccc69d65748c708caa0cbd2e8
  

Comments

Ian Eure Jan. 31, 2025, 2:29 p.m. UTC | #1
usertag 75420 + reviewed-looks-good
thanks

Hi Arjan,

This looks good to me.  I was investigating why this was broken
yesterday, because it’s been a topic on IRC.  I’d gotten most of the way
to where this patch is before I noticed it.

Is there any reason not to push this to master?

  -- Ian

Arjan Adriaanse <arjan@adriaan.se> writes:

> * gnu/packages/matrix.scm (pantalaimon): Update to 0.10.5-0.257ef6a.
> [arguments]<#:phases>: Change requirements, skip hanging tests.
> [native-inputs]: Add python-pytest-asyncio.
> [propagated-inputs]: Replace python-appdirs with python-platformdirs.
>
> Change-Id: Ie2ccb3263f41193e504184157d3a4be301ddacbf
> ---
>
> I forgot to include the copyright notice from the initial version.
>
> gnu/packages/matrix.scm | 131 +++++++++++++++++++++-------------------
>  1 file changed, 68 insertions(+), 63 deletions(-)
>
> diff --git a/gnu/packages/matrix.scm b/gnu/packages/matrix.scm
> index 8d1aca4b2e..be3edae0dc 100644
> --- a/gnu/packages/matrix.scm
> +++ b/gnu/packages/matrix.scm
> @@ -6,6 +6,7 @@
>  ;;; Copyright © 2022 Aleksandr Vityazev <avityazev@posteo.org>
>  ;;; Copyright © 2022 Morgan Smith <Morgan.J.Smith@outlook.com>
>  ;;; Copyright © 2025 Ricardo Wurmus <rekado@elephly.net>
> +;;; Copyright © 2025 Arjan Adriaanse <arjan@adriaan.se>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -226,69 +227,73 @@ (define-public python-matrix-nio
>      (license license:isc)))
>  
>  (define-public pantalaimon
> -  (package
> -    (name "pantalaimon")
> -    (version "0.10.5")
> -    (source
> -     (origin
> -       (method git-fetch)
> -       (uri (git-reference
> -             (url "https://github.com/matrix-org/pantalaimon")
> -             (commit version)))
> -       (file-name (git-file-name name version))
> -       (sha256
> -        (base32
> -         "16ask8v00654q307c55q5gnm8hrj40gibpab5zl52v4i0bgl9j68"))))
> -    (build-system python-build-system)
> -    (arguments
> -     (list
> -      #:phases
> -      #~(modify-phases %standard-phases
> -          (add-after 'unpack 'downgrade-appdirs-requirement
> -            (lambda _
> -              (substitute* "setup.py"
> -                ;; FIXME: Remove this once appdirs is updated.
> -                ;; Upgrading python-appdirs requires rebuilting 3000+ packages,
> -                ;; when 1.4.4 is a simple maintenance fix from 1.4.3.
> -                (("appdirs >= 1.4.4") "appdirs >= 1.4.3"))))
> -          (add-after 'install 'install-doc
> -            (lambda _
> -              (with-directory-excursion "docs/man"
> -                (let ((man (string-append #$output "/share/man")))
> -                  (install-file "panctl.1" (string-append man "/man1"))
> -                  (install-file "pantalaimon.5" (string-append man "/man5"))
> -                  (install-file "pantalaimon.8" (string-append man "/man8"))))))
> -          (replace 'check
> -            (lambda* (#:key tests? inputs outputs #:allow-other-keys)
> -              (when tests?
> -                (add-installed-pythonpath inputs outputs)
> -                (invoke "pytest" "-vv" "tests")))))))
> -    (native-inputs
> -     (list python-aioresponses
> -           python-faker
> -           python-pytest
> -           python-pytest-aiohttp))
> -    (propagated-inputs
> -     (list python-aiohttp
> -           python-appdirs
> -           python-attrs
> -           python-cachetools
> -           python-click
> -           python-dbus
> -           python-janus
> -           python-keyring
> -           python-logbook
> -           python-matrix-nio
> -           python-notify2
> -           python-peewee
> -           python-prompt-toolkit
> -           python-pydbus
> -           python-pygobject))
> -    (home-page "https://github.com/matrix-org/pantalaimon")
> -    (synopsis "Matrix proxy daemon that adds E2E encryption capabilities")
> -    (description
> -     "Pantalaimon is an end-to-end encryption aware Matrix reverse proxy
> +  (let ((commit "257ef6a2e5e5668cd43347037c09ba036f91d997")
> +        (revision "0"))
> +    (package
> +      (name "pantalaimon")
> +      (version (git-version "0.10.5" revision commit))
> +      (source
> +       (origin
> +         (method git-fetch)
> +         (uri (git-reference
> +               (url "https://github.com/matrix-org/pantalaimon")
> +               (commit commit)))
> +         (file-name (git-file-name name version))
> +         (sha256
> +          (base32 "1i18mjlc143d2xwlha09i5ny06vipmy8fii05427zq5vjz8rysgx"))))
> +      (build-system python-build-system)
> +      (arguments
> +       (list
> +        #:phases
> +        #~(modify-phases %standard-phases
> +            (add-after 'unpack 'relax-requirements
> +              (lambda _
> +                (substitute* "setup.py"
> +                  ;; Newer version is packaged.
> +                  (("\"matrix-nio\\[e2e\\] >= 0\\.24, < 0\\.25\\.2\"")
> +                   "\"matrix-nio[e2e] >= 0.24, <= 0.25.2\""))))
> +            (add-after 'install 'install-doc
> +              (lambda _
> +                (with-directory-excursion "docs/man"
> +                  (let ((man (string-append #$output "/share/man")))
> +                    (install-file "panctl.1" (string-append man "/man1"))
> +                    (install-file "pantalaimon.5" (string-append man "/man5"))
> +                    (install-file "pantalaimon.8" (string-append man "/man8"))))))
> +            (replace 'check
> +              (lambda* (#:key tests? inputs outputs #:allow-other-keys)
> +                (when tests?
> +                  (add-installed-pythonpath inputs outputs)
> +                  (invoke "pytest" "-vv" "tests"
> +                          ;; These tests hang.
> +                          "--ignore=tests/proxy_test.py"
> +                          "-k" "not test_start_loop")))))))
> +      (native-inputs
> +       (list python-aioresponses
> +             python-faker
> +             python-pytest
> +             python-pytest-aiohttp
> +             python-pytest-asyncio))
> +      (propagated-inputs
> +       (list python-aiohttp
> +             python-attrs
> +             python-cachetools
> +             python-click
> +             python-dbus
> +             python-janus
> +             python-keyring
> +             python-logbook
> +             python-matrix-nio
> +             python-notify2
> +             python-peewee
> +             python-platformdirs
> +             python-prompt-toolkit
> +             python-pydbus
> +             python-pygobject))
> +      (home-page "https://github.com/matrix-org/pantalaimon")
> +      (synopsis "Matrix proxy daemon that adds E2E encryption capabilities")
> +      (description
> +       "Pantalaimon is an end-to-end encryption aware Matrix reverse proxy
>  daemon.  Pantalaimon acts as a good man in the middle that handles the
>  encryption for you.  Messages are transparently encrypted and decrypted for
>  clients inside of pantalaimon.")
> -    (license license:asl2.0)))
> +      (license license:asl2.0))))
>
> base-commit: 7da088166d03859ccc69d65748c708caa0cbd2e8
  

Patch

diff --git a/gnu/packages/matrix.scm b/gnu/packages/matrix.scm
index 8d1aca4b2e..be3edae0dc 100644
--- a/gnu/packages/matrix.scm
+++ b/gnu/packages/matrix.scm
@@ -6,6 +6,7 @@ 
 ;;; Copyright © 2022 Aleksandr Vityazev <avityazev@posteo.org>
 ;;; Copyright © 2022 Morgan Smith <Morgan.J.Smith@outlook.com>
 ;;; Copyright © 2025 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2025 Arjan Adriaanse <arjan@adriaan.se>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -226,69 +227,73 @@  (define-public python-matrix-nio
     (license license:isc)))
 
 (define-public pantalaimon
-  (package
-    (name "pantalaimon")
-    (version "0.10.5")
-    (source
-     (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://github.com/matrix-org/pantalaimon")
-             (commit version)))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32
-         "16ask8v00654q307c55q5gnm8hrj40gibpab5zl52v4i0bgl9j68"))))
-    (build-system python-build-system)
-    (arguments
-     (list
-      #:phases
-      #~(modify-phases %standard-phases
-          (add-after 'unpack 'downgrade-appdirs-requirement
-            (lambda _
-              (substitute* "setup.py"
-                ;; FIXME: Remove this once appdirs is updated.
-                ;; Upgrading python-appdirs requires rebuilting 3000+ packages,
-                ;; when 1.4.4 is a simple maintenance fix from 1.4.3.
-                (("appdirs >= 1.4.4") "appdirs >= 1.4.3"))))
-          (add-after 'install 'install-doc
-            (lambda _
-              (with-directory-excursion "docs/man"
-                (let ((man (string-append #$output "/share/man")))
-                  (install-file "panctl.1" (string-append man "/man1"))
-                  (install-file "pantalaimon.5" (string-append man "/man5"))
-                  (install-file "pantalaimon.8" (string-append man "/man8"))))))
-          (replace 'check
-            (lambda* (#:key tests? inputs outputs #:allow-other-keys)
-              (when tests?
-                (add-installed-pythonpath inputs outputs)
-                (invoke "pytest" "-vv" "tests")))))))
-    (native-inputs
-     (list python-aioresponses
-           python-faker
-           python-pytest
-           python-pytest-aiohttp))
-    (propagated-inputs
-     (list python-aiohttp
-           python-appdirs
-           python-attrs
-           python-cachetools
-           python-click
-           python-dbus
-           python-janus
-           python-keyring
-           python-logbook
-           python-matrix-nio
-           python-notify2
-           python-peewee
-           python-prompt-toolkit
-           python-pydbus
-           python-pygobject))
-    (home-page "https://github.com/matrix-org/pantalaimon")
-    (synopsis "Matrix proxy daemon that adds E2E encryption capabilities")
-    (description
-     "Pantalaimon is an end-to-end encryption aware Matrix reverse proxy
+  (let ((commit "257ef6a2e5e5668cd43347037c09ba036f91d997")
+        (revision "0"))
+    (package
+      (name "pantalaimon")
+      (version (git-version "0.10.5" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/matrix-org/pantalaimon")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1i18mjlc143d2xwlha09i5ny06vipmy8fii05427zq5vjz8rysgx"))))
+      (build-system python-build-system)
+      (arguments
+       (list
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'unpack 'relax-requirements
+              (lambda _
+                (substitute* "setup.py"
+                  ;; Newer version is packaged.
+                  (("\"matrix-nio\\[e2e\\] >= 0\\.24, < 0\\.25\\.2\"")
+                   "\"matrix-nio[e2e] >= 0.24, <= 0.25.2\""))))
+            (add-after 'install 'install-doc
+              (lambda _
+                (with-directory-excursion "docs/man"
+                  (let ((man (string-append #$output "/share/man")))
+                    (install-file "panctl.1" (string-append man "/man1"))
+                    (install-file "pantalaimon.5" (string-append man "/man5"))
+                    (install-file "pantalaimon.8" (string-append man "/man8"))))))
+            (replace 'check
+              (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+                (when tests?
+                  (add-installed-pythonpath inputs outputs)
+                  (invoke "pytest" "-vv" "tests"
+                          ;; These tests hang.
+                          "--ignore=tests/proxy_test.py"
+                          "-k" "not test_start_loop")))))))
+      (native-inputs
+       (list python-aioresponses
+             python-faker
+             python-pytest
+             python-pytest-aiohttp
+             python-pytest-asyncio))
+      (propagated-inputs
+       (list python-aiohttp
+             python-attrs
+             python-cachetools
+             python-click
+             python-dbus
+             python-janus
+             python-keyring
+             python-logbook
+             python-matrix-nio
+             python-notify2
+             python-peewee
+             python-platformdirs
+             python-prompt-toolkit
+             python-pydbus
+             python-pygobject))
+      (home-page "https://github.com/matrix-org/pantalaimon")
+      (synopsis "Matrix proxy daemon that adds E2E encryption capabilities")
+      (description
+       "Pantalaimon is an end-to-end encryption aware Matrix reverse proxy
 daemon.  Pantalaimon acts as a good man in the middle that handles the
 encryption for you.  Messages are transparently encrypted and decrypted for
 clients inside of pantalaimon.")
-    (license license:asl2.0)))
+      (license license:asl2.0))))