GNU bug report logs - #73148
[PATCH] Update packages related to Trezor support

Previous Next

Package: guix-patches;

Reported by: Attila Lendvai <attila <at> lendvai.name>

Date: Mon, 9 Sep 2024 14:27:01 UTC

Severity: normal

To reply to this bug, email your comments to 73148 AT debbugs.gnu.org.

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#73148; Package guix-patches. (Mon, 09 Sep 2024 14:27:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Attila Lendvai <attila <at> lendvai.name>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 09 Sep 2024 14:27:01 GMT) Full text and rfc822 format available.

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

From: Attila Lendvai <attila <at> lendvai.name>
To: "guix-patches <at> gnu.org" <guix-patches <at> gnu.org>
Subject: Update Trezor packages
Date: Mon, 09 Sep 2024 14:26:14 +0000
this will be a series of patches that update the relevant packages for the Trezor support.

the last one fixes https://issues.guix.gnu.org/57345

-- 
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“Those who can make you believe absurdities, can make you commit atrocities.”
	— Voltaire (1694–1778), 'Questions sur les miracles' (1765), paraphrased





Information forwarded to guix-patches <at> gnu.org:
bug#73148; Package guix-patches. (Mon, 09 Sep 2024 14:31:01 GMT) Full text and rfc822 format available.

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

From: attila.lendvai <at> gmail.com
To: 73148 <at> debbugs.gnu.org
Cc: Attila Lendvai <attila <at> lendvai.name>
Subject: [PATCH 1/4] gnu: trezor-agent: Update to 0.15.0.
Date: Mon,  9 Sep 2024 16:28:20 +0200
From: Attila Lendvai <attila <at> lendvai.name>

* gnu/packages/finance.scm (python-trezor-agent): Disable the test
called test_get_agent_sock_path.
(trezor-agent): Also copy the hash from the parent package.  Remove the now
unnecessary deletion of the ./contrib dir.

Change-Id: Ied03ad4c5d1266c208a1938d748eb09c52750633
---
 gnu/packages/finance.scm | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 4b5b5eefd53..317842c5937 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -931,7 +931,7 @@ (define-public python-trezor-agent
   ;; the toplevel app called trezor-agent.
   (package
     (name "python-trezor-agent")
-    (version "0.14.7")
+    (version "0.15.0")
     (source
      (origin
        (method git-fetch)
@@ -940,7 +940,7 @@ (define-public python-trezor-agent
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "04dds5bbw73nk36zm8d02qw6qr92nrlcf8r1cq8ba96mzi34jbk0"))))
+        (base32 "09y55ys3x5krszh58yhl5gpdri0zrlhfld6psrmiyxfbp344asin"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -955,7 +955,15 @@ (define-public python-trezor-agent
          (add-after 'install 'check
            (lambda* (#:key tests? #:allow-other-keys)
              (when tests?
-               (invoke "pytest" "-v")))))))
+               (invoke "pytest" "-v"))))
+         (add-before 'check 'disable-some-tests
+            (lambda _
+              ;; The path returned by gpgconf --list-dirs agent-socket in the
+              ;; builder is /homeless-shelter/.gnupg/S.gpg-agent, while the
+              ;; test expects a /run/user/... path.  Probably safe to disable.
+              (substitute* "libagent/gpg/tests/test_keyring.py"
+                (("def test_get_agent_sock_path")
+                 "def _do_not_test_get_agent_sock_path")))))))
     (propagated-inputs
      (list python-bech32
            python-configargparse
@@ -1227,8 +1235,7 @@ (define-public trezor-agent
        (method git-fetch)
        (uri (origin-uri (package-source python-trezor-agent)))
        (file-name (git-file-name name version))
-       (sha256
-        (base32 "04dds5bbw73nk36zm8d02qw6qr92nrlcf8r1cq8ba96mzi34jbk0"))
+       (hash (origin-hash (package-source python-trezor-agent)))
        (modules
         '((guix build utils)
           (ice-9 ftw)
@@ -1248,9 +1255,6 @@ (define-public trezor-agent
                      (scandir "./agents/trezor/"
                               (negate (cut member <> '("." "..") string=))))
            (delete-file-recursively "./agents")
-           ;; Without deleting ./contrib the sanity-check phase fails. Reported
-           ;; upstream as https://github.com/romanz/trezor-agent/issues/429.
-           (delete-file-recursively "./contrib")
            ;; Without deleting ./libagent setuptools complains as follows:
            ;; "error: Multiple top-level packages discovered in a flat-layout: ['contrib', 'libagent']."
            (delete-file-recursively "./libagent")))))

base-commit: b82c8ceae14d5d0f4584452f34f5103ffd0e0f8d
-- 
2.46.0





Information forwarded to guix-patches <at> gnu.org:
bug#73148; Package guix-patches. (Mon, 09 Sep 2024 14:31:02 GMT) Full text and rfc822 format available.

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

From: attila.lendvai <at> gmail.com
To: 73148 <at> debbugs.gnu.org
Cc: Attila Lendvai <attila <at> lendvai.name>
Subject: [PATCH 2/4] gnu: python-mnemonic: Update to 0.21.
Date: Mon,  9 Sep 2024 16:28:21 +0200
From: Attila Lendvai <attila <at> lendvai.name>

* gnu/packages/finance.scm (python-mnemonic): Build from git and use
pyproject-build-system to build it.

Change-Id: Ie033cd8afa11711da070d3fc792375c3648c1756
---
 gnu/packages/finance.scm | 27 ++++++++++++++++++---------
 1 file changed, 18 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 317842c5937..8547676b51b 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -1019,16 +1019,25 @@ (define-public trezor-gpg-pinentry-tk
 (define-public python-mnemonic
   (package
     (name "python-mnemonic")
-    (version "0.20")
+    (version "0.21")
     (source
-      (origin
-        (method url-fetch)
-        (uri (pypi-uri "mnemonic" version))
-        (sha256
-          (base32 "1xi5qvj2rvi5almf9c89rl7hz1z4ms04d53pg818i4vpkmivavvw"))))
-    (build-system python-build-system)
-    (propagated-inputs
-     (list python-pbkdf2))
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/trezor/python-mnemonic")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1r8cdlgqpmj71ap3kyhc2nq8dn29gmj7v8dlq8kgcy91jky94n8g"))))
+    (build-system pyproject-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (invoke "python" "tests/test_mnemonic.py"))))))
+    (native-inputs
+     (list python-poetry-core))
     (home-page "https://github.com/trezor/python-mnemonic")
     (synopsis "Implementation of Bitcoin BIP-0039")
     (description "@code{mnemonic} is a library that provides an implementation
-- 
2.46.0





Information forwarded to guix-patches <at> gnu.org:
bug#73148; Package guix-patches. (Mon, 09 Sep 2024 14:31:02 GMT) Full text and rfc822 format available.

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

From: attila.lendvai <at> gmail.com
To: 73148 <at> debbugs.gnu.org
Cc: Attila Lendvai <attila <at> lendvai.name>
Subject: [PATCH 3/4] gnu: python-trezor: Update to 0.13.9.
Date: Mon,  9 Sep 2024 16:28:22 +0200
From: Attila Lendvai <attila <at> lendvai.name>

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

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 8547676b51b..841f128d092 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -1121,7 +1121,7 @@ (define-public python-btchip-python
 (define-public python-trezor
   (package
     (name "python-trezor")
-    (version "0.13.7")
+    (version "0.13.9")
     (source
      (origin
        (method git-fetch)
@@ -1130,7 +1130,7 @@ (define-public python-trezor
              (commit (string-append "python/v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "13wyl9b15c8iscfakprwfvh2akw180hfqdjww79b78ywz51y7hdh"))
+        (base32 "1s9nlmq556fkjlgbwr7xqswflrzba83wddzsjz0j83yrh9f0ddj0"))
        (modules
         '((guix build utils)
           (srfi srfi-26)
-- 
2.46.0





Information forwarded to guix-patches <at> gnu.org:
bug#73148; Package guix-patches. (Mon, 09 Sep 2024 14:31:03 GMT) Full text and rfc822 format available.

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

From: attila.lendvai <at> gmail.com
To: 73148 <at> debbugs.gnu.org
Cc: Attila Lendvai <attila <at> lendvai.name>
Subject: [PATCH 4/4] gnu: python-trezor-agent: Use absolute path for gpg at
 runtime.
Date: Mon,  9 Sep 2024 16:28:23 +0200
From: Attila Lendvai <attila <at> lendvai.name>

The trezor-gpg binary execs gnupg at runtime.  Prior to this fix it wouldn't
work in a profile where gpg wasn't in the PATH.

* gnu/packages/finance.scm (python-trezor-agent): Substitute absolute path for
the gpgconf binary (and with that to all gnupg binaries).  Fixes #57345.

Change-Id: I9acc5a31a1189d0121152c2bd9ba0ff5eb90af09
---
 gnu/packages/finance.scm | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 841f128d092..e4a5ef829ba 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -951,6 +951,11 @@ (define-public python-trezor-agent
            (lambda _
              (substitute* "setup.py"
                (("'backports.shutil_which>=3.5.1',") ""))))
+         (add-after 'unpack 'set-gpgconf-path
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "libagent/gpg/keyring.py"
+               (("util\\.which\\('gpgconf'\\)")
+                (string-append "'" (search-input-file inputs "bin/gpgconf") "'")))))
          (delete 'check)
          (add-after 'install 'check
            (lambda* (#:key tests? #:allow-other-keys)
@@ -978,9 +983,10 @@ (define-public python-trezor-agent
            python-semver
            python-unidecode
            python-wheel))
-    (native-inputs ; Only needed for running the tests
-     (list gnupg
-           python-mock
+    (inputs
+     (list gnupg))
+    (native-inputs                      ; Only needed for running the tests
+     (list python-mock
            python-pytest))
     (home-page "https://github.com/romanz/trezor-agent")
     (synopsis "Use hardware wallets as SSH and GPG agent")
-- 
2.46.0





Information forwarded to guix-patches <at> gnu.org:
bug#73148; Package guix-patches. (Mon, 18 Nov 2024 21:07:02 GMT) Full text and rfc822 format available.

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

From: Attila Lendvai <attila.lendvai <at> gmail.com>
To: 73148 <at> debbugs.gnu.org
Cc: Attila Lendvai <attila <at> lendvai.name>, attila.lendvai <at> gmail.com
Subject: Re: Update Trezor packages
Date: Mon, 18 Nov 2024 22:05:09 +0100
user guix
usertag 73148 + patch-hackers-review-list
thanks




Changed bug title to '[PATCH] Update packages related to Trezor support' from 'Update Trezor packages' Request was from Attila Lendvai <attila.lendvai <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 27 Nov 2024 17:56:02 GMT) Full text and rfc822 format available.

This bug report was last modified 199 days ago.

Previous Next


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