From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id +CHYOr3AFWNlPAAAbAwnHQ (envelope-from ) for ; Mon, 05 Sep 2022 11:26:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id yGekOr3AFWMpPQEAauVa8A (envelope-from ) for ; Mon, 05 Sep 2022 11:26:21 +0200 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 4E930113FA for ; Mon, 5 Sep 2022 11:26:21 +0200 (CEST) Received: from localhost ([::1]:38124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oV8N2-0003pW-Dw for larch@yhetil.org; Mon, 05 Sep 2022 05:26:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37092) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oV8Mk-0003mn-Sm for guix-patches@gnu.org; Mon, 05 Sep 2022 05:26:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57735) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oV8Mk-00052F-Aj for guix-patches@gnu.org; Mon, 05 Sep 2022 05:26:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oV8Mk-0006je-6S for guix-patches@gnu.org; Mon, 05 Sep 2022 05:26:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57345] [PATCH] Add gnupg to propagated-inputs of trezor-agent Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 05 Sep 2022 09:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57345 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Marek =?UTF-8?Q?Pa=C5=9Bnikowski?= Cc: Ricardo Wurmus , "57345@debbugs.gnu.org" <57345@debbugs.gnu.org> Received: via spool by 57345-submit@debbugs.gnu.org id=B57345.166236993025851 (code B ref 57345); Mon, 05 Sep 2022 09:26:02 +0000 Received: (at 57345) by debbugs.gnu.org; 5 Sep 2022 09:25:30 +0000 Received: from localhost ([127.0.0.1]:46434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oV8ME-0006is-CK for submit@debbugs.gnu.org; Mon, 05 Sep 2022 05:25:30 -0400 Received: from mail-wm1-f46.google.com ([209.85.128.46]:39687) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oV8MC-0006id-5f for 57345@debbugs.gnu.org; Mon, 05 Sep 2022 05:25:28 -0400 Received: by mail-wm1-f46.google.com with SMTP id i188-20020a1c3bc5000000b003a7b6ae4eb2so7428335wma.4 for <57345@debbugs.gnu.org>; Mon, 05 Sep 2022 02:25:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender:from:to :cc:subject:date; bh=n7MDXgT+ME7osSQnKPTnYRR8zlLUYVBAB/vFAfzWy3E=; b=DE8adTa2cD8tVoJKzURQhL70+cAdsmC31WbRQzGvSNzKDSusxLYYei6aVnCZ+v97s0 FNsixynyX3SkMKRbBeT3a+KK53uYdFl5RqiSLJEosnwTdKiz8uNlk/2dsGs0JVBKIw7K qvAHMrsnX6H+UiKjTzTbq8jWWR3HP7/YByGE80M9HryXd1ELoC4xDC6qcOqKhVA2GcCi ksqApqMskhy01koSXxu5fDXGXDJvRiE/TaGZkaw4FvG1hLLbnZyd9CDdmHj1LAbwyJD4 TWB5XdPZ9I+ydW+MEhzC9bUJTn3Y0dzus72Is+mhVm2/4JTczFmlfnrKUFEeoaCUnevy D3bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date; bh=n7MDXgT+ME7osSQnKPTnYRR8zlLUYVBAB/vFAfzWy3E=; b=X/3EZbFazZ3KcksMyBEkJKG1UmczXdYuJ0BZForvuLSbHZvXRCCvKEOmUc7DJa/mqy tRIpiAUmtOO870tVvtGwC9JRbB994VI7zpYSsSVXpWBvUmE1VGm3RVmCcimFTHL757+z X0w55eFG45dhIWwxGtYb03FmfhRm7yqNMLO05I1gp+kuOQx+vbQBo3y7z2GDfen5XoKS OJBdMy1hiwkz2RLtKaDh3KlTavFjpGRf5CjzgTxhZArkxIBIl4ZhD9xbBatwvVG9AMvJ dgUc9zWG9CFVOaYpctYsOEHaJxhd99W2m9a/uMMxFxeJPSiVxSUwRTJQUb+2NjEvrJBn Uo4w== X-Gm-Message-State: ACgBeo02NDPfXg2uNrEjx+8Nz/Gb5baVC/1cpUIFLZg8W5sD69VfpUZe a4ZPC6mta3SmIX8KqeBsk5M= X-Google-Smtp-Source: AA6agR7FkjXWp87gAdjOg4A2jteaoAKmZrkk+h1cmwOvFrDj7S94UAQFMqmKqbgzXCB8/aIf1QeWgg== X-Received: by 2002:a05:600c:228c:b0:3a8:3d5d:5729 with SMTP id 12-20020a05600c228c00b003a83d5d5729mr10007773wmf.144.1662369922050; Mon, 05 Sep 2022 02:25:22 -0700 (PDT) Received: from localhost ([141.226.13.1]) by smtp.gmail.com with ESMTPSA id x5-20020a5d6505000000b00228634628f1sm4642798wru.110.2022.09.05.02.25.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Sep 2022 02:25:21 -0700 (PDT) Date: Mon, 5 Sep 2022 12:25:18 +0300 From: Efraim Flashner Message-ID: Mail-Followup-To: Efraim Flashner , Marek =?UTF-8?Q?Pa=C5=9Bnikowski?= , "57345@debbugs.gnu.org" <57345@debbugs.gnu.org>, Ricardo Wurmus References: <0xUyxGDdNUVX-UebH9VayY2IGvKRGV-WwdvXVVHBu1G-jPUUgs8Zgcl6grF6_rPW4WDO5xtC1a8rdy4v3oONthnqYD1Q--x7uFtVkzY1EX8=@protonmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="BbIQA6khfhUlW6ol" Content-Disposition: inline In-Reply-To: <0xUyxGDdNUVX-UebH9VayY2IGvKRGV-WwdvXVVHBu1G-jPUUgs8Zgcl6grF6_rPW4WDO5xtC1a8rdy4v3oONthnqYD1Q--x7uFtVkzY1EX8=@protonmail.com> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 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 X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1662369981; 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=n7MDXgT+ME7osSQnKPTnYRR8zlLUYVBAB/vFAfzWy3E=; b=U1p+oPK91SzPo96B2BG3VIjZtVbatEZMxI11t5tt7VZhMajnb1X412yHPPhqfSWrIz7Wdu M9UEIMXnBwd13e3Z3P3vuq9G1DhVLu6lFaow/I8pRwzsqnEJDny7Q5lh0yOPpCpp9mirUe RBR4SwfIosFTirf2ESiRpC0C9GeNtaz2jGZGyHE8EV9Ub7LvrUYWPjsNfO20r5cJZqe9Dq eQVR1RnV5sGbpD4Q5jFv8wv7gNJ9Q6KT//Qf/dwh3dAe/xxndfGVnBMiifolEij3oGbXoK Yjd+ABV5mFUIzjl7zxy5RlWcs+Yx4xlPhxsk7L6xS6KUeQRXblYf+EBXwqx2Ng== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1662369981; a=rsa-sha256; cv=none; b=FNdiD1FpSzHDWJ/WyqiYYJGBArqGg9DDdT9RCY/P9yFYLrOUj00Ghf7Ol1N3/jxCj/p15s P5e+zPnN20hDCxdkoJMCNuRLHkB6UG1MdWXTwAujFwm6rkRd9AzhV3Lw/H6BYGN8ArcF6a IbFcLij/I8RneK+C9Hz4fA0sWa1xev0SgnZ96rHA5GBU6JDnao/kqjI8jGYfJ8zhC3uPDq cnB99WcM6NT3H3QPfROgGtezIPHGxnlxn4VRDHSETuyw+meDcCboQEGNM410vF3GgPG79S lTVf8/Cva5TOjxqmUjPlVDRboWUPs8j/naS/XxGdYGIodczssoX/U+69dqDlqg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=DE8adTa2; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -0.48 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=DE8adTa2; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 4E930113FA X-Spam-Score: -0.48 X-Migadu-Scanner: scn0.migadu.com X-TUID: f8N3ZZsmU717 --BbIQA6khfhUlW6ol Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 05, 2022 at 05:49:55AM +0000, guix-patches--- via wrote: > Nothing I do seems to work at all. >=20 > Last night I thought of a fundamental question: > Are `inputs` accessible in the guix store at runtime? >=20 > If they are, that means I am too dumb to correctly parse the documentatio= n. My initial patch proves, that `gnupg` has to be available at runtime. At= this point I am incapable of doing anything more. I got physically sick of= trying to understand and use all the procedures. After some poking around on IRC and in trezor-agent and python-trezor-agent, it seems that there are a number of calls to the gpgconf binary and the actual path to gpg is probably set in python-trezor-agent in libagent/gpg/keyring.py. With all of this it's probably best to just wrap the files in the bin output of trezor agent so that we don't miss any files. (ins)efraim@3900XT /tmp$ tree /gnu/store/46br8illcfv93ryh28s2haz1s59n584v-t= rezor-agent-0.14.4 /gnu/store/46br8illcfv93ryh28s2haz1s59n584v-trezor-agent-0.14.4 =E2=94=9C=E2=94=80=E2=94=80 bin =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 __pycache__ =E2=94=82=C2=A0=C2=A0 =E2=94=82=C2=A0=C2=A0 =E2=94=94=E2=94=80=E2=94=80 tre= zor_agent.cpython-39.pyc =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 trezor-agent =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 trezor_agent.py =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 trezor-gpg =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 trezor-gpg-agent =E2=94=82=C2=A0=C2=A0 =E2=94=94=E2=94=80=E2=94=80 trezor-signify =E2=94=94=E2=94=80=E2=94=80 lib =E2=94=94=E2=94=80=E2=94=80 python3.9 =E2=94=94=E2=94=80=E2=94=80 site-packages =E2=94=94=E2=94=80=E2=94=80 trezor_agent-0.11.0-py3.9.egg-info =E2=94=9C=E2=94=80=E2=94=80 dependency_links.txt =E2=94=9C=E2=94=80=E2=94=80 entry_points.txt =E2=94=9C=E2=94=80=E2=94=80 PKG-INFO =E2=94=9C=E2=94=80=E2=94=80 requires.txt =E2=94=9C=E2=94=80=E2=94=80 SOURCES.txt =E2=94=94=E2=94=80=E2=94=80 top_level.txt trezor_agent.py is an actual python script, so I'd use wrap-script, but the other extensionless files I'd use wrap-program, which IIRC will Do The Right Thing=E2=84=A2 and not double-wrap those files, which are already wrappers. I haven't tested the code out, but something like this should work inside trezor-agent. (add-before 'check 'wrap-more ;; We want to make sure we're before 'check but after 'wrap (lambda* (#:key inputs outputs #:allow-other-keys) (wrap-script (string-append #$output "/bin/trezor_agent.py") `(("PATH" ":" prefix (,(dirname (search-input-file inputs "gpg")))))) (for-each (lambda (file) (wrap-program file `(("PATH" ":" prefix (,(dirname (search-input-file inputs "gpg"))))))) (find-files (string-append #$output "/bin") "^trezor-")))) --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --BbIQA6khfhUlW6ol Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmMVwHUACgkQQarn3Mo9 g1GGfg/+PNydiCKrylFjCvYuOHWWfrAapJbJ1V+nhXUgQbNqsYNjGgT+zz9X0sDe XPG8/kZGvJf8dAEffnuSVU9bPuD8HvZYo7EJ5+67W3CBYErR+9veNZvBrBrHJBB6 ctfA0aJKC6tuFNZ8SzlsIABZJfYO1KooZ0MPyMQfcQsE2iVog+qJFCFrST8EZu9X gifpw0gZaxlsGaGkRQt06ed0TJBV2Fd39beQ8u85hUdkB7+Lc1nn72KZbTNSLEwI 7BARQByuiqiM1WK9ZV69S6BV2TVJLYizm0Gad05PZ0v4i+njF9zyAhWMEP+Wocp+ y6oInE71EnHwWFqe9kkivmI1tVh05mzeeT523rzsMiYchEmHx+xoaJwA7BcIBcI/ Z10Rsm1tQ/SOA1nzJQNVpR7cXCx75Nvp3zP1LijKUAmcIlUrCN/7cRYGyjwl58P5 D7DyHnn0vxt5pXf0e4W5klp5bqa8NvBfBihTIie4KT3WZZLnfMFPFcpIcPQs0Dsf D+Pw8edpO9OgbeqYt3agpnWLEPEYpuJpid1p5MYI5KVrTAn+Kqc6CGxx469pnA9M CJLRo0xAJRJjXX/BR60Q+X2sxNonyoMdGYuqNDSr4zBSgHrFsMPlVmSFRuV+l9Fx kvagv/pYPiGZmU1escaJEB2LNbNYcJHkC++QLllQd024arSb3zI= =c7NZ -----END PGP SIGNATURE----- --BbIQA6khfhUlW6ol--