Updates for python-trezor-agent and python-trezor

  • Done
  • quality assurance status badge
Details
2 participants
  • Danny Milosavljevic
  • Vagrant Cascadian
Owner
unassigned
Submitted by
Vagrant Cascadian
Severity
normal

Debbugs page

Vagrant Cascadian wrote 6 years ago
(address . guix-patches@gnu.org)
87wom5a5jy.fsf@ponder
The attached patch series update python-trezor-agent and python-trezor,
and fixes a bug that made python-trezor unusable:

The solution for the bug could certainly be implemented more elegantly
by someone who knows guix packaging better, but it worked for me!

Thanks!

live well,
vagrant
From fc7873d01ce9f06ab84384e9d72e4faf72f1a23f Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Thu, 7 Feb 2019 00:07:15 +0000
Subject: [PATCH 1/2] gnu: python-trezor-agent: Update to 0.13.0.

* gnu/packages/finance.scm: use-module gnupg.

* gnu/packages/finance.scm (python-trezor-agent): Update to 0.13.0.
[propagated-inputs]: Add python-configargparse, python-daemon,
python-docutils, python-mnemonic, python-pymsgbox, python-wheel.
[native-inputs]: Add gnupg.
[synopsis]: generalize description to hardware wallets.
[phases]: Add phase to remove uneccesary python backport.
---
gnu/packages/finance.scm | 26 ++++++++++++++++++++------
1 file changed, 20 insertions(+), 6 deletions(-)

Toggle diff (69 lines)
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index e44be713f2..0e7c396421 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -45,6 +45,7 @@
#:use-module (gnu packages dns)
#:use-module (gnu packages emacs)
#:use-module (gnu packages dbm)
+ #:use-module (gnu packages gnupg)
#:use-module (gnu packages graphviz)
#:use-module (gnu packages groff)
#:use-module (gnu packages libedit)
@@ -591,7 +592,7 @@ Monero GUI client.")
(define-public python-trezor-agent
(package
(name "python-trezor-agent")
- (version "0.9.4")
+ (version "0.13.0")
(source
(origin
(method git-fetch)
@@ -600,11 +601,17 @@ Monero GUI client.")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "15aaqk79d9y9nbsfznf2iscz12z5ispcj8kr8v5bc0sqqj2brs12"))))
+ (base32 "0i4igkxi8fwdlbhg6nx27lhnc9v9nmrw4j5fvpnc202n6yjlc7x7"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'remove-requires-backports-shutil-which
+ ;; Remove requires on backport of shutil_which, as python 3.4+ has
+ ;; a built-in implementation supported in python-trezor-agent.
+ (lambda _
+ (substitute* "setup.py"
+ (("'backports.shutil_which>=3.5.1',") ""))))
(delete 'check)
(add-after 'install 'check
(lambda* (#:key outputs inputs #:allow-other-keys)
@@ -612,15 +619,22 @@ Monero GUI client.")
(add-installed-pythonpath inputs outputs)
(invoke "py.test"))))))
(propagated-inputs
- `(("python-ecdsa" ,python-ecdsa)
+ `(("python-configargparse" ,python-configargparse)
+ ("python-daemon" ,python-daemon)
+ ("python-docutils" ,python-docutils)
+ ("python-ecdsa" ,python-ecdsa)
("python-ed25519" ,python-ed25519)
+ ("python-mnemonic" ,python-mnemonic)
+ ("python-pymsgbox" ,python-pymsgbox)
("python-semver" ,python-semver)
- ("python-unidecode" ,python-unidecode)))
+ ("python-unidecode" ,python-unidecode)
+ ("python-wheel" ,python-wheel)))
(native-inputs
- `(("python-mock" ,python-mock)
+ `(("gnupg" ,gnupg)
+ ("python-mock" ,python-mock)
("python-pytest" ,python-pytest)))
(home-page "https://github.com/romanz/trezor-agent")
- (synopsis "TREZOR SSH and GPG host support")
+ (synopsis "Use hardware wallets as SSH and GPG agent")
(description
"@code{libagent} is a library that allows using TREZOR, Keepkey and
Ledger Nano as a hardware SSH/GPG agent.")
--
2.20.1
From 49c7cfc32f7263c78bf2b555dfad8cfcaf6db8eb Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Thu, 7 Feb 2019 00:07:49 +0000
Subject: [PATCH 2/2] gnu: trezor-agent: Update 0.10.0.


* gnu/packages/finance.scm (trezor-agent): Update to 0.10.0.
[phases]: Add fixup-agent-py phase to install trezor_agent.py without shell
wrapper.
[native-inputs]: Add python-hidapi.
[home-page]: Use https url.
---
gnu/packages/finance.scm | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)

Toggle diff (42 lines)
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 0e7c396421..cddccbfd94 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -803,19 +803,32 @@ Then set the environment variable GNUPGHOME to
(define-public trezor-agent
(package
(name "trezor-agent")
- (version "0.9.0")
+ (version "0.10.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "trezor_agent" version))
(sha256
(base32
- "1i5cdamlf3c0ym600pjklij74p8ifj9cv7xrpnrfl1b8nkadswbz"))))
+ "144657c7bn0a667dq5fv5r6j7iilxf3h9agj29v1m2qpq40g0az8"))))
+ (arguments
+ ;; Tests fail with "AttributeError: module 'attr' has no attribute 's'".
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'wrap 'fixup-agent-py
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out")))
+ ;; overwrite the wrapper with the real thing.
+ (install-file "./trezor_agent.py"
+ (string-append out "/bin/"))
+ #t))))))
(build-system python-build-system)
(inputs
`(("python-trezor" ,python-trezor)
("python-trezor-agent" ,python-trezor-agent)))
- (home-page "http://github.com/romanz/trezor-agent")
+ (native-inputs
+ `(("python-hidapi" ,python-hidapi)))
+ (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
agent.")
--
2.20.1
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCXGJmYwAKCRDcUY/If5cW
qpinAP4zYqH1W69mWR6o6XbTL71cs8v5YjEod9Kf3S/0iQOcCwEAmOGoG0A1XLG2
NwmuAPj3suPI5yRp76bK5ow66Hnk7wc=
=Tsg4
-----END PGP SIGNATURE-----

Danny Milosavljevic wrote 6 years ago
(name . Vagrant Cascadian)(address . vagrant@debian.org)(address . 34452-done@debbugs.gnu.org)
20190213002931.3bd7506c@scratchpost.org
Hi Vagrant,

On Mon, 11 Feb 2019 22:23:29 -0800
Vagrant Cascadian <vagrant@debian.org> wrote:
Toggle quote (3 lines)
>The solution for the bug could certainly be implemented more elegantly
>by someone who knows guix packaging better, but it worked for me!

Long term there will be a proper fix for the problem of the same
Python file being able to be both a library and an executable
program: On core-updates, there's a wrap-script function which
will do the right thing in both cases.

After master is merged to core-updates, we should use it for trezor-agent.

For now, the workaround is fine.

Applied to master.

Thanks!
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlxjVtsACgkQ5xo1VCww
uqVeuggAiye1/9unTDrUUhblW/FjjvUrLMaWVa0pwiSVbOWEXXBdZhKZd1Va1c/k
D0SWByzSkuToq45Vv3tsKmREre4uXKETifc+yFWOC7OUTO7A91/ALVUUDMpgQHYG
uiX+6DcoeSqspYnK1ke2wRDypfskkdu4/KOHy0Q5J978FWVuMEYe002xYBoQ4XQX
2tK4ZHhAZiceQy95wWB3YQsafADHizBVa2UdyS0ZVNfef4wMUEty6+E04SgXEliV
7fev8alYJnCjSfsJ8HjVqYzbYWqIDpVGoSPe3To+mK145Qar7zjA7h4QdAPJEWIO
UVrIpvnqrPOKMrVEjw6SL0LQH6dUMw==
=cyOt
-----END PGP SIGNATURE-----


Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 34452
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
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help