[bug#34424] Update python-trezor-agent and trezor-agent

Message ID 87h8da510g.fsf@ponder
State Accepted
Headers show
Series [bug#34424] Update python-trezor-agent and trezor-agent | expand

Checks

Context Check Description
cbaines/applying patch fail Apply failed

Commit Message

Vagrant Cascadian Feb. 11, 2019, 5:48 a.m. UTC
This patch series updates python-trezor-agent (0.13.0) and trezor-agent
(0.10.0).

It fixes (at least for trezor):

 #34377: (ledger|trezor|keepkey)-agent execute shell code with python interpreter

It depends on a few unmerged patches:

 #34365: gnu: Add python-daemon.
 #34396: gnu: Add python-pymsgbox.
 #34398: gnu: Add python-backports-shutil-which.


live well,
  vagrant

Patch

From cd804338e1f1bf9b16ec08ced760d4d08818f8f4 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.

    Fixes <https://bugs.gnu.org/34377>.

* 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.
---
 gnu/packages/finance.scm | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 6978f0c807..59b5a85fb2 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -799,18 +799,31 @@  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)))
+    (native-inputs
+     `(("python-hidapi" ,python-hidapi)))
     (home-page "http://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.20.1