Update Trezor packages

  • Open
  • quality assurance status badge
Details
2 participants
  • attila.lendvai
  • Attila Lendvai
Owner
unassigned
Submitted by
Attila Lendvai
Severity
normal
A
A
Attila Lendvai wrote on 9 Sep 16:26 +0200
(name . guix-patches@gnu.org)(address . guix-patches@gnu.org)
D3n69Xvn6K1dDW3d6woPHlVLc3qtobPcQ618MhSzDTW3ngNMKc5haC49Zb4aVkY3n6ayDeg9FXP2GU0bhqFIw8XeUdaqCgcXJ07ExFM__ew=@lendvai.name
this will be a series of patches that update the relevant packages for the Trezor support.


--
• 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
A
A
attila.lendvai wrote on 9 Sep 16:28 +0200
[PATCH 1/4] gnu: trezor-agent: Update to 0.15.0.
(address . 73148@debbugs.gnu.org)(name . Attila Lendvai)(address . attila@lendvai.name)
9f72e41ee461463d495624f1bf285b8c3ca63fc5.1725892102.git.attila@lendvai.name
From: Attila Lendvai <attila@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(-)

Toggle diff (63 lines)
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
A
A
attila.lendvai wrote on 9 Sep 16:28 +0200
[PATCH 2/4] gnu: python-mnemonic: Update to 0.21.
(address . 73148@debbugs.gnu.org)(name . Attila Lendvai)(address . attila@lendvai.name)
e53c13c2ffbf13a7ab65d39cfb398f5a2cf7d759.1725892102.git.attila@lendvai.name
From: Attila Lendvai <attila@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(-)

Toggle diff (41 lines)
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
A
A
attila.lendvai wrote on 9 Sep 16:28 +0200
[PATCH 3/4] gnu: python-trezor: Update to 0.13.9.
(address . 73148@debbugs.gnu.org)(name . Attila Lendvai)(address . attila@lendvai.name)
20c293bf9699e7a7d977fdb089701d08261111ce.1725892102.git.attila@lendvai.name
From: Attila Lendvai <attila@lendvai.name>

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

Toggle diff (24 lines)
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
A
A
attila.lendvai wrote on 9 Sep 16:28 +0200
[PATCH 4/4] gnu: python-trezor-agent: Use absolute path for gpg at runtime.
(address . 73148@debbugs.gnu.org)(name . Attila Lendvai)(address . attila@lendvai.name)
239309df806153135e79ff7fc76d983cbef303bd.1725892102.git.attila@lendvai.name
From: Attila Lendvai <attila@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(-)

Toggle diff (32 lines)
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
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 73148@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 73148
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch