From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) 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 Message-ID: <87shuuj7y4.fsf@gnu.org> References: <20160726180507.21e5e8e0@scratchpost.org> <87poq016rt.fsf@gnu.org> <20160727115405.704f02ac@scratchpost.org> <878twnz6o4.fsf@gnu.org> <87popy13x6.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57243) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSjsA-0008Sf-Gm for bug-guix@gnu.org; Thu, 28 Jul 2016 07:53:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSjs6-00009g-FO for bug-guix@gnu.org; Thu, 28 Jul 2016 07:53:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:51599) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSjs6-00009c-BL for bug-guix@gnu.org; Thu, 28 Jul 2016 07:53:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bSjs6-0003kV-4Q for bug-guix@gnu.org; Thu, 28 Jul 2016 07:53:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87popy13x6.fsf@gmail.com> (Alex Kost's message of "Thu, 28 Jul 2016 12:56:53 +0300") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Alex Kost Cc: 24076@debbugs.gnu.org Alex Kost skribis: > Ludovic Court=C3=A8s (2016-07-27 14:01 +0300) wrote: > >> Hi, >> >> Danny Milosavljevic skribis: >> >>>> My ~/.gnupg/gpg-agent.conf file reads this: >>>>=20 >>>> --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 us= er accounts? >> >> Maybe. Ideally, this would be addressed by GnuPG itself, which should >> somehow make it easier to set it up, because there=E2=80=99s 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=3D/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 =E2=80=98gnupg_module_name=E2=80=99, in h= omedir.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--- =E2=80=A6 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=E2=80=99.