[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#65037] [PATCH v4 6/8] gnu: trezor-agent: Fix build, change versioni
From: |
Attila Lendvai |
Subject: |
[bug#65037] [PATCH v4 6/8] gnu: trezor-agent: Fix build, change versioning scheme. |
Date: |
Mon, 4 Sep 2023 12:40:45 +0200 |
Clarify the versioning of the package in a comment, so that later updates will
not pick the wrong version number.
* gnu/packages/finance.scm (trezor-agent): Copy version from
python-trezor-agent which effectively updates it from 0.14.4 to 0.14.7. Copy
the origin also from python-trezor-agent to effectively sync the source and
the version of the two packages; something that upstream will also do in
future releases.
[native-inputs]: Add missing python-bech32 and python-simple-rlp so that the
test suite runs clean and the build finishes.
---
gnu/packages/finance.scm | 37 +++++++++++++++++++++----------------
1 file changed, 21 insertions(+), 16 deletions(-)
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 5f3b35e754..5695ec4b63 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -1206,21 +1206,21 @@ (define-public ledger-agent
(define-public trezor-agent
(package
(name "trezor-agent")
- (version "0.14.4")
+ ;; There are multiple Python apps/packages in the same git repo. The git
+ ;; tag seems to track libagent's version (which is called
+ ;; python-trezor-agent in the Guix namespace). Currently trezor-agent's
+ ;; version is set in `agents/trezor/setup.py` to a different value than
+ ;; libagent, but as discussed with upstream in issue
+ ;; https://github.com/romanz/trezor-agent/issues/369, we are copying our
+ ;; version from that of libagent.
+ (version (package-version python-trezor-agent))
(source
(origin
(method git-fetch)
- (uri (git-reference
- (url "https://github.com/romanz/trezor-agent")
- ;; The version mismatch is not a mistake. Multiple Python
- ;; apps/packages are in the same git repo, and they have
- ;; different versions. The git tag seems to track libagent,
- ;; i.e. python-trezor-agent in the Guix namespace. See
- ;; e.g. ./agents/trezor/setup.py.
- (commit "v0.14.4")))
+ (uri (origin-uri (package-source python-trezor-agent)))
(file-name (git-file-name name version))
(sha256
- (base32 "1ksv494xpga27ifrjyn1bkqaya5h769lqb9rx1ng0n4kvmnrqr3l"))
+ (base32 "04dds5bbw73nk36zm8d02qw6qr92nrlcf8r1cq8ba96mzi34jbk0"))
(modules
'((guix build utils)
(ice-9 ftw)
@@ -1239,13 +1239,16 @@ (define-public trezor-agent
(string-append "./" file-name)))
(scandir "./agents/trezor/"
(negate (cut member <> '("." "..") string=))))
- (delete-file-recursively "./agents")))))
+ (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")))))
(arguments
`(#:phases
(modify-phases %standard-phases
- ;; This package only has a Python script, not a Python module, so the
- ;; sanity-check phase can't work.
- (delete 'sanity-check)
(add-after 'unpack 'relax-requirements
(lambda _
(substitute* "setup.py"
@@ -1268,8 +1271,10 @@ (define-public trezor-agent
(build-system python-build-system)
(inputs
(list python-trezor python-trezor-agent))
- (native-inputs
- (list python-attrs))
+ (native-inputs ; Only needed for running the tests
+ (list python-attrs
+ python-bech32
+ python-simple-rlp))
(home-page "https://github.com/romanz/trezor-agent")
(synopsis "Using Trezor as hardware SSH/GPG agent")
(description "This package allows using Trezor as a hardware SSH/GPG
--
2.41.0
- [bug#65037] [PATCH v4 1/8] gnu: python-daemon: Build from git sources., Attila Lendvai, 2023/09/04
- [bug#65037] [PATCH v4 7/8] gnu: trezord: Update to 2.0.33., Attila Lendvai, 2023/09/04
- [bug#65037] [PATCH v4 4/8] gnu: python-trezor: Update to 0.13.7., Attila Lendvai, 2023/09/04
- [bug#65037] [PATCH v4 5/8] gnu: python-trezor-agent: Update to 0.14.7., Attila Lendvai, 2023/09/04
- [bug#65037] [PATCH v4 3/8] gnu: Add python-construct-classes., Attila Lendvai, 2023/09/04
- [bug#65037] [PATCH v4 2/8] gnu: python-daemon: Update to 3.0.1., Attila Lendvai, 2023/09/04
- [bug#65037] [PATCH v4 6/8] gnu: trezor-agent: Fix build, change versioning scheme.,
Attila Lendvai <=
- [bug#65037] [PATCH v4 8/8] gnu: trezord: use new format for native-inputs., Attila Lendvai, 2023/09/04