From: Efraim Flashner <efraim@flashner.co.il>
To: "Marek Paśnikowski" <marekpasnikowski@protonmail.com>
Cc: Ricardo Wurmus <rekado@elephly.net>,
"57345@debbugs.gnu.org" <57345@debbugs.gnu.org>
Subject: [bug#57345] [PATCH] Add gnupg to propagated-inputs of trezor-agent
Date: Mon, 5 Sep 2022 12:25:18 +0300 [thread overview]
Message-ID: <YxXAfr3QAvFKITa3@3900XT> (raw)
In-Reply-To: <0xUyxGDdNUVX-UebH9VayY2IGvKRGV-WwdvXVVHBu1G-jPUUgs8Zgcl6grF6_rPW4WDO5xtC1a8rdy4v3oONthnqYD1Q--x7uFtVkzY1EX8=@protonmail.com>
[-- Attachment #1: Type: text/plain, Size: 2736 bytes --]
On Mon, Sep 05, 2022 at 05:49:55AM +0000, guix-patches--- via wrote:
> Nothing I do seems to work at all.
>
> Last night I thought of a fundamental question:
> Are `inputs` accessible in the guix store at runtime?
>
> If they are, that means I am too dumb to correctly parse the documentation. 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-trezor-agent-0.14.4
/gnu/store/46br8illcfv93ryh28s2haz1s59n584v-trezor-agent-0.14.4
├── bin
│ ├── __pycache__
│ │ └── trezor_agent.cpython-39.pyc
│ ├── trezor-agent
│ ├── trezor_agent.py
│ ├── trezor-gpg
│ ├── trezor-gpg-agent
│ └── trezor-signify
└── lib
└── python3.9
└── site-packages
└── trezor_agent-0.11.0-py3.9.egg-info
├── dependency_links.txt
├── entry_points.txt
├── PKG-INFO
├── requires.txt
├── SOURCES.txt
└── 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™ 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-"))))
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2022-09-05 9:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-22 19:03 [bug#57345] [PATCH] Add gnupg to propagated-inputs of trezor-agent guix-patches--- via
2022-09-01 8:51 ` Ricardo Wurmus
2022-09-05 5:49 ` guix-patches--- via
2022-09-05 9:25 ` Efraim Flashner [this message]
2022-09-05 11:26 ` guix-patches--- via
2022-09-06 13:06 ` guix-patches--- via
2022-09-06 15:41 ` Maxime Devos
2022-09-06 15:39 ` Maxime Devos
2022-09-06 15:44 ` Maxime Devos
2022-09-06 15:48 ` Maxime Devos
2022-09-09 19:55 ` guix-patches--- via
2022-10-11 14:44 ` [bug#57345] (No Subject) Attila Lendvai
2024-09-09 14:33 ` [bug#57345] Status: [PATCH] Add gnupg to propagated-inputs of trezor-agent Attila Lendvai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YxXAfr3QAvFKITa3@3900XT \
--to=efraim@flashner.co.il \
--cc=57345@debbugs.gnu.org \
--cc=marekpasnikowski@protonmail.com \
--cc=rekado@elephly.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.