unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Attila Lendvai <attila@lendvai.name>
To: Danny Milosavljevic <dannym@scratchpost.org>
Cc: "guix-devel@gnu.org" <guix-devel@gnu.org>
Subject: Re: trezor-agent: using trezor as gpg key
Date: Mon, 06 Sep 2021 10:12:34 +0000	[thread overview]
Message-ID: <02ocO7FWQ3wA9_-sw6b-c55zb9SJVTWvNqPqVQHvtcGEHtvOp1TFUlbhzpJtQnhhFurmVw8mpW_J0wrV3oIXjKq6b-IR7LJ0RRiNbhH63EY=@lendvai.name> (raw)
In-Reply-To: <20210903183512.2680d83e@scratchpost.org>

> strace -f trezor-gpg-agent 2>&1 |grep /dev

this helped a lot, thank you!

trezor-gpg-agent tries to open /dev/bus/usb/001/010, and a whole bunch
of files and dirs under /sys/bus/usb/devices/, i.e. it did *not* touch
/dev/hidraw0 nor /dev/usb/hiddev0.

the latter of which is not even covered by the trezor udev rules:

https://github.com/trezor/trezor-firmware/blob/master/common/udev/51-trezor.rules


> Even then, it only works fine once one logs out and back in, and at
> the time of login have the usb device already be connected. I think
> that's a bug in our elogind (sigh).


luckily this seems to work fine for trezor. i have rebooted with it
being unplugged, then plugged it in, and the group of the relevant
files under /dev/ were properly `plugdev`.

FTR, i didn't have my udev rules set up properly. i wrongly assumed
that it's enough to just install the trezord-udev-rules package, but
it's not.

the proper config was:

- install trezord-udev-rules system-wide

- add `plugdev` to your user's supplementary-groups

- append this to your services: (udev-rules-service 'trezor trezord-udev-rules #:groups '("plugdev"))

now, moving on to updating the trezor packages.

- attila
PGP: 5D5F 45C7 DFCD 0A39



      reply	other threads:[~2021-09-06 10:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-03  7:55 trezor-agent: using trezor as gpg key Attila Lendvai
2021-09-03 16:35 ` Danny Milosavljevic
2021-09-06 10:12   ` Attila Lendvai [this message]

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='02ocO7FWQ3wA9_-sw6b-c55zb9SJVTWvNqPqVQHvtcGEHtvOp1TFUlbhzpJtQnhhFurmVw8mpW_J0wrV3oIXjKq6b-IR7LJ0RRiNbhH63EY=@lendvai.name' \
    --to=attila@lendvai.name \
    --cc=dannym@scratchpost.org \
    --cc=guix-devel@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).