From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id rbdUCibJTGFOSgEAgWs5BA (envelope-from ) for ; Thu, 23 Sep 2021 20:36:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id uOk6BSbJTGHyPQAAbx9fmQ (envelope-from ) for ; Thu, 23 Sep 2021 18:36:22 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id DC690194CE for ; Thu, 23 Sep 2021 20:36:21 +0200 (CEST) Received: from localhost ([::1]:51340 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTTa1-0000Ba-0n for larch@yhetil.org; Thu, 23 Sep 2021 14:36:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33970) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTTZi-00009L-Tm for guix-patches@gnu.org; Thu, 23 Sep 2021 14:36:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44304) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mTTZi-0002v6-Lm for guix-patches@gnu.org; Thu, 23 Sep 2021 14:36:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mTTZi-0001l7-HW for guix-patches@gnu.org; Thu, 23 Sep 2021 14:36:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50751] [PATCH] gnu: update Trezor support Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 23 Sep 2021 18:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50751 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Attila Lendvai Cc: 50751@debbugs.gnu.org Received: via spool by 50751-submit@debbugs.gnu.org id=B50751.16324221286710 (code B ref 50751); Thu, 23 Sep 2021 18:36:02 +0000 Received: (at 50751) by debbugs.gnu.org; 23 Sep 2021 18:35:28 +0000 Received: from localhost ([127.0.0.1]:55850 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTTZA-0001kA-31 for submit@debbugs.gnu.org; Thu, 23 Sep 2021 14:35:28 -0400 Received: from out2.migadu.com ([188.165.223.204]:43710) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTTZ8-0001k1-9X for 50751@debbugs.gnu.org; Thu, 23 Sep 2021 14:35:27 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1632422124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UfRQ5mg6ed/d9CuegJCNzUhegI5dqxC0udi0xK6HakQ=; b=QwYB0eHfnohMOUPCqQ6/2GnFmsidrZEMmpXwXxht8s+U7k6EIg0x7LXE5dsrflkVAvKTy6 29FKlfaeq+733u9e3WRoGCpZWCJMu/T+0QmjLVX7SOcah7NJo+xz9o30bbwdOUrmSlU5jZ Y0xNhgqTubMmGg4KdTSRL4jEKXGodbo= From: Sarah Morgensen References: <20210923083045.10372-1-attila@lendvai.name> Date: Thu, 23 Sep 2021 11:35:22 -0700 In-Reply-To: <20210923083045.10372-1-attila@lendvai.name> (Attila Lendvai's message of "Thu, 23 Sep 2021 10:30:46 +0200 (9 hours, 43 minutes, 37 seconds ago)") Message-ID: <86mto3kumt.fsf@mgsn.dev> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1632422181; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=UfRQ5mg6ed/d9CuegJCNzUhegI5dqxC0udi0xK6HakQ=; b=cnMcqIMelD1Llf25z/XecB9UkNRnaW9uBHi50tGUdT95a6P91YGH7Brq8nYhQG3BvXq1Oo p0Urq5dmzkRMRazHEpCPFMNhJ+QCs/T3t95uKOE9WaIQXf9LOaUQsDB8BAK0LrhWbJXx3z Vqd0BtlNX7kxHBZfn/ygzCrPLkB0KI6L7iRLREy4osfT/POEr4Pa7uKaSePMvWT3foCGIz P9YX/2UCb8zNxW+B0hMfOhjsc0RpHflYW1nydx0j651hf041z4IL9JRuLOqfeK8GoGvHQZ p041mGAp2OS++l/oTtelPSBEkaS/ql7HdpGoJHhH7Q5Z+WxZTPfpP4KuXpq/PQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632422181; a=rsa-sha256; cv=none; b=uCa03eq2Y+fz36H+I/Guu5DqHb3rtEoT9+erHvVTn7MvquxxXO1jb1FBGyNd0eJaCRzMn0 f/kvUnKHTLRLm5Bzh7u6/Xy3sgRYuew3c51cBRrqiRjtdegUCU2kPccnoAPQ4NrNebADWQ aX6c6uMrUW9DSlxGYWzn44FTe+9+AhTzRJvMZSOpL38GBJzn3X9bKqCATX4KYn687v+KT3 IvbW3uhBUYvSgmdmZCK0XFXDCpdZ7twGFoIfItJPMKIvz8CPHQLuht2JVPu+py8UB8b/Fi /U225ZGo0iZPSN1eB/l32qHICjKGITGVF4b9Q/INfEhV2oKHZkJhDXkjo7liUA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=QwYB0eHf; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 0.21 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=QwYB0eHf; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: DC690194CE X-Spam-Score: 0.21 X-Migadu-Scanner: scn0.migadu.com X-TUID: aTreO72QnmS4 Hi, Thanks for the patch! Reading over this, I have a few comments. Attila Lendvai writes: > Fetch everything from their git repos, instead of pypi. > Given the resulting version mismatch, and having to pick apart the sources, is there a compelling reason for this? It looks like the same files are included. > * gnu/packages/finance.scm (python-trezor-agent): Update to 0.14.2. > (python-trezor): Update to 0.12.3. > (trezor-agent): Update to 0.11.0. > (trezord): Update to 2.0.31. > * gnu/packages/patches/trezor-agent-fix-argv0.patch: New file. When at all possible, version updates should be separate commits from changes. > @@ -1091,14 +1137,14 @@ the KeepKey Hardware Wallet.") > (let* ((out (assoc-ref outputs "out"))) > ;; overwrite the wrapper with the real thing. > (install-file "./trezor_agent.py" > - (string-append out "/bin")) > - #t)))))) > + (string-append out "/bin"))) > + #t))))) This wasn't added by your patch, but it's odd that the reason for overriding the wrapper wasn't documented.... Because if we didn't overwrite the wrapper, your patch below would be unnecessary, because the wrapper sets argv[0] to the original name of the file. > diff --git a/gnu/packages/patches/trezor-agent-fix-argv0.patch b/gnu/packages/patches/trezor-agent-fix-argv0.patch > new file mode 100644 > index 0000000000..9462067cd5 > --- /dev/null > +++ b/gnu/packages/patches/trezor-agent-fix-argv0.patch > @@ -0,0 +1,27 @@ > +diff --git a/libagent/gpg/__init__.py b/libagent/gpg/__init__.py > +index 3711bc8..67085de 100644 > +--- a/libagent/gpg/__init__.py > ++++ b/libagent/gpg/__init__.py > +@@ -122,15 +122,19 @@ def run_init(device_type, args): > + verify_gpg_version() > + > + # Prepare new GPG home directory for hardware-based identity > +- device_name = os.path.basename(sys.argv[0]).rsplit('-', 1)[0] > +- log.info('device name: %s', device_name) > ++ exe_name = os.path.basename(sys.argv[0]) > ++ # drop the Guix wrapper's dot prefix from the name > ++ if exe_name[0] == '.' and exe_name.endswith('-real'): > ++ exe_name = exe_name[1:-5:] > ++ device_name = exe_name.rsplit('-', 1)[0] > ++ log.info('exe name: %s, device name: %s', exe_name, device_name) > + homedir = args.homedir > + if not homedir: > + homedir = os.path.expanduser('~/.gnupg/{}'.format(device_name)) > + > + log.info('GPG home directory: %s', homedir) > + > +- if os.path.exists(homedir): > ++ if os.path.exists(homedir) and not args.subkey: > + log.error('GPG home directory %s exists, ' > + 'remove it manually if required', homedir) > + sys.exit(1) Hope that helps, -- Sarah