GNU bug report logs - #24076
gnupg [-agent]: when signing [commits], it claims that there is no pinentry - but there is

Previous Next

Package: guix;

Reported by: Danny Milosavljevic <dannym <at> scratchpost.org>

Date: Tue, 26 Jul 2016 16:06:02 UTC

Severity: important

Merged with 36784, 37266

Done: Leo Famulari <leo <at> famulari.name>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: ludo <at> gnu.org (Ludovic Courtès)
To: Alex Kost <alezost <at> gmail.com>
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>, 24076 <at> debbugs.gnu.org
Subject: bug#24076: gnupg [-agent]: when signing [commits], it claims that there is no pinentry - but there is
Date: Thu, 28 Jul 2016 13:52:35 +0200
Alex Kost <alezost <at> gmail.com> skribis:

> Ludovic Courtès (2016-07-27 14:01 +0300) wrote:
>
>> Hi,
>>
>> Danny Milosavljevic <dannym <at> scratchpost.org> skribis:
>>
>>>> My ~/.gnupg/gpg-agent.conf file reads this:
>>>> 
>>>> --8<---------------cut here---------------start------------->8---
>>>> pinentry-program /home/ludo/.guix-profile/bin/pinentry-gtk-2
>>>> --8<---------------cut here---------------end--------------->8---
>>>
>>> Yes, the file didn't exist. I created it and it works now.
>>
>> Great.
>>
>>> I did install the pinentry package, though.
>>>
>>> Do you think it would make sense to put this in the skeleton for new user accounts?
>>
>> Maybe.  Ideally, this would be addressed by GnuPG itself, which should
>> somehow make it easier to set it up, because there’s nothing
>> GuixSD-specific here AFAICS.  What do other distros do to help?
>
> My guess: other distros do nothing, because GnuPG searches for
> pinentries in a default bindir, I mean in a dir where gpg is placed
> (/usr/bin or whatever).
>
> IMO this is Guix-specific, as you have to run gpg-agent with
> --pinentry-program option (or specify it in the "gpg-agent.conf" file).

Good point.

What about having GnuPG depend on pinentry-tty, and configuring it with:

  --with-pinentry-pgm=/path/to/pinentry-tty

?  That would at least provide a reasonable default.  The closure size
of GnuPG would increase from 220 to 243 MiB (+10%).

Most of the time, people will want to use pinentry-gtk though.

Another option would be to change ‘gnupg_module_name’, in homedir.c, from:

--8<---------------cut here---------------start------------->8---
    case GNUPG_MODULE_NAME_PINENTRY:
#ifdef GNUPG_DEFAULT_PINENTRY
      return GNUPG_DEFAULT_PINENTRY;
#else
      X(bindir, "pinentry");
#endif
--8<---------------cut here---------------end--------------->8---

to something like:

--8<---------------cut here---------------start------------->8---
    case GNUPG_MODULE_NAME_PINENTRY:
      X(homedir, ".guix-profile/bin/pinentry);
--8<---------------cut here---------------end--------------->8---

… in which case GnuPG would default to the user-installed pinentry, if
available.  Not perfect either, but closer to what other distros do.

Thoughts?

Ludo’.




This bug report was last modified 4 years and 30 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.