From patchwork Wed Sep 27 15:47:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Attila Lendvai X-Patchwork-Id: 54359 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id BC3AE27BBE2; Wed, 27 Sep 2023 16:58:32 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 3031D27BBE9 for ; Wed, 27 Sep 2023 16:58:30 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qlWvA-0006xn-EQ; Wed, 27 Sep 2023 11:57:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qlWv8-0006wb-Py for guix-patches@gnu.org; Wed, 27 Sep 2023 11:57:50 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qlWv8-0005sx-Hv for guix-patches@gnu.org; Wed, 27 Sep 2023 11:57:50 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qlWvM-0000qz-6Q for guix-patches@gnu.org; Wed, 27 Sep 2023 11:58:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65037] [PATCH v5 4/6] gnu: trezor-agent: Fix build, change versioning scheme. Resent-From: Attila Lendvai Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 27 Sep 2023 15:58:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65037 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 65037@debbugs.gnu.org Cc: Attila Lendvai Received: via spool by 65037-submit@debbugs.gnu.org id=B65037.16958302713222 (code B ref 65037); Wed, 27 Sep 2023 15:58:04 +0000 Received: (at 65037) by debbugs.gnu.org; 27 Sep 2023 15:57:51 +0000 Received: from localhost ([127.0.0.1]:52285 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qlWv8-0000pp-H6 for submit@debbugs.gnu.org; Wed, 27 Sep 2023 11:57:50 -0400 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]:42010) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qlWv2-0000om-Uk for 65037@debbugs.gnu.org; Wed, 27 Sep 2023 11:57:46 -0400 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-9adb9fa7200so2537126766b.0 for <65037@debbugs.gnu.org>; Wed, 27 Sep 2023 08:57:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695830245; x=1696435045; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rneQZEOUCcdGbvSwBHf11NsL6W2vg237YSwr2oXKUXA=; b=SpkRCJbP2WPklFdMG3pxKHJ5k3+cOLXkseZfh/is2fhkdLxrY/aIC5yoltaGfzrDeX mluvbNZlJZNYKo5Yq6IEb1iyZbdljhKN09EPa5Ls+chp5m1+PNttQuL0cBTdv2aQANEv yfgweYkDNsQByKzx4FRUnzXfk+fgF1o1WCKUwNgFqg4Lvi5HRjneGaCC6A2sYP5d2Ciu mpzIO6W8HmV8HIDMqXAlDpJwOTMs6h1nGyVfQulAVZT2jwwVRcucMUtwfwqDGobwpv+e WwnpH7o3ehMM4gvVSAMcJhoBQPhEeEEGyFkbkJ3XDLbp2Zaaj4AmVI/BRSUj5uJkos2K 1VPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695830245; x=1696435045; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rneQZEOUCcdGbvSwBHf11NsL6W2vg237YSwr2oXKUXA=; b=hpf/5hlGIP/z5AodUCjk3RJ9tePFVIopdHICejRsVULlVfY07ByPU1fRRm9BKkz/Yw KgTxvrtck2IGt8Kp19hFIYcGAvXxkXZ2TBpB2leJ5mzbVNr7fxNnZLtpuuFXax00iera yCjF4c0nIqXd5TYyir6B5QNo/DX71IqzMGmRnhDcHjC5VEjODTcaeXWZNTq6XDHdvETG PADND5GCmoeewgSNAcUZotEXWZfbEdhsMvcdNrV4SkzAbLaBWFf21qdlrJkK528j7qDQ 59oI9NT9K4wobHJpmC172VAw6H41H60UogDt7XegkiVZ0G5dXXf/XFvrUQNWAVMSPse6 pkWg== X-Gm-Message-State: AOJu0YxcAlQ2g1CLqkRIU7o1cAzqUHf23BXm1u0OF6NE7+yD5ryfefZV oZzKJJnOj5x1o+JYTKAYgSpVSProB5DzIA== X-Google-Smtp-Source: AGHT+IHtnocH3+vQBhNuZLMuUmytBf7ldcZADKJc4j5t2LPJuuE6itTkY77VSf4X5C6yMWHd3ZfiWg== X-Received: by 2002:a17:907:7b95:b0:9ae:614f:b159 with SMTP id ne21-20020a1709077b9500b009ae614fb159mr9115125ejc.36.1695830245083; Wed, 27 Sep 2023 08:57:25 -0700 (PDT) Received: from lelap.lan (2a00-1f40-b161-400-ba6f-faab-947e-3926.pool6.panelnet.hu. [2a00:1f40:b161:400:ba6f:faab:947e:3926]) by smtp.gmail.com with ESMTPSA id v5-20020a1709064e8500b00993470682e5sm9442645eju.32.2023.09.27.08.57.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 08:57:24 -0700 (PDT) From: Attila Lendvai X-Google-Original-From: Attila Lendvai Date: Wed, 27 Sep 2023 17:47:30 +0200 Message-ID: <24be12063019018fbaeacfe80e1539d69829b2cd.1695829651.git.attila@lendvai.name> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches 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 8194b660f3..76096ab643 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