* [bug#73148] Update Trezor packages
@ 2024-09-09 14:26 Attila Lendvai
2024-09-09 14:28 ` [bug#73148] [PATCH 1/4] gnu: trezor-agent: Update to 0.15.0 attila.lendvai
0 siblings, 1 reply; 6+ messages in thread
From: Attila Lendvai @ 2024-09-09 14:26 UTC (permalink / raw)
To: 73148
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#73148] [PATCH 1/4] gnu: trezor-agent: Update to 0.15.0.
2024-09-09 14:26 [bug#73148] Update Trezor packages Attila Lendvai
@ 2024-09-09 14:28 ` attila.lendvai
2024-09-09 14:28 ` [bug#73148] [PATCH 2/4] gnu: python-mnemonic: Update to 0.21 attila.lendvai
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: attila.lendvai @ 2024-09-09 14:28 UTC (permalink / raw)
To: 73148; +Cc: Attila Lendvai
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(-)
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#73148] [PATCH 2/4] gnu: python-mnemonic: Update to 0.21.
2024-09-09 14:28 ` [bug#73148] [PATCH 1/4] gnu: trezor-agent: Update to 0.15.0 attila.lendvai
@ 2024-09-09 14:28 ` attila.lendvai
2024-09-09 14:28 ` [bug#73148] [PATCH 3/4] gnu: python-trezor: Update to 0.13.9 attila.lendvai
2024-09-09 14:28 ` [bug#73148] [PATCH 4/4] gnu: python-trezor-agent: Use absolute path for gpg at runtime attila.lendvai
2 siblings, 0 replies; 6+ messages in thread
From: attila.lendvai @ 2024-09-09 14:28 UTC (permalink / raw)
To: 73148; +Cc: Attila Lendvai
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(-)
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#73148] [PATCH 3/4] gnu: python-trezor: Update to 0.13.9.
2024-09-09 14:28 ` [bug#73148] [PATCH 1/4] gnu: trezor-agent: Update to 0.15.0 attila.lendvai
2024-09-09 14:28 ` [bug#73148] [PATCH 2/4] gnu: python-mnemonic: Update to 0.21 attila.lendvai
@ 2024-09-09 14:28 ` attila.lendvai
2024-09-09 14:28 ` [bug#73148] [PATCH 4/4] gnu: python-trezor-agent: Use absolute path for gpg at runtime attila.lendvai
2 siblings, 0 replies; 6+ messages in thread
From: attila.lendvai @ 2024-09-09 14:28 UTC (permalink / raw)
To: 73148; +Cc: Attila Lendvai
From: Attila Lendvai <attila@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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#73148] [PATCH 4/4] gnu: python-trezor-agent: Use absolute path for gpg at runtime.
2024-09-09 14:28 ` [bug#73148] [PATCH 1/4] gnu: trezor-agent: Update to 0.15.0 attila.lendvai
2024-09-09 14:28 ` [bug#73148] [PATCH 2/4] gnu: python-mnemonic: Update to 0.21 attila.lendvai
2024-09-09 14:28 ` [bug#73148] [PATCH 3/4] gnu: python-trezor: Update to 0.13.9 attila.lendvai
@ 2024-09-09 14:28 ` attila.lendvai
2024-11-18 21:05 ` [bug#73148] Update Trezor packages Attila Lendvai
2 siblings, 1 reply; 6+ messages in thread
From: attila.lendvai @ 2024-09-09 14:28 UTC (permalink / raw)
To: 73148; +Cc: Attila Lendvai
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(-)
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-11-18 21:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-09 14:26 [bug#73148] Update Trezor packages Attila Lendvai
2024-09-09 14:28 ` [bug#73148] [PATCH 1/4] gnu: trezor-agent: Update to 0.15.0 attila.lendvai
2024-09-09 14:28 ` [bug#73148] [PATCH 2/4] gnu: python-mnemonic: Update to 0.21 attila.lendvai
2024-09-09 14:28 ` [bug#73148] [PATCH 3/4] gnu: python-trezor: Update to 0.13.9 attila.lendvai
2024-09-09 14:28 ` [bug#73148] [PATCH 4/4] gnu: python-trezor-agent: Use absolute path for gpg at runtime attila.lendvai
2024-11-18 21:05 ` [bug#73148] Update Trezor packages Attila Lendvai
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).