[PATCH] [EMACS] Adjust notmuch-crypto gpg call-process function
Tomi Ollila
tomi.ollila at iki.fi
Wed Jan 4 12:06:58 PST 2017
On Wed, Jan 04 2017, Daniel Kahn Gillmor <dkg at fifthhorseman.net> wrote:
> On Tue 2017-01-03 21:55:48 -0500, John Byrnes wrote:
>> I'm running the latest NixOS and noticed that the system does not
>> install gpgv1 by default. This means that the only gpg binary available
>> is the gpg2 binary.
>>
>> I found that notmuch-crypto.el hardcodes the GnuPG binary as gpg. I
>> thought it might make more sense to rely on the setting provided by
>> EasyPG to locate the correct GnuPG binary.
>>
>> The patch is quite simple - it just replaces "gpg" with the
>> epg-gpg-program variable in each place it's used.
>>
>> - (call-process "gpg" nil t t "--list-keys" fingerprint))
>> + (call-process epg-gpg-program nil t t "--list-keys" fingerprint))
>
> I think this is reasonable. We're already setting epg-gpg-program in
> test/test-lib.sh, and in debian, epg-gpg-program is provided by
> epg-config.el, which is part of emacs$VERSION-el, which is a dependency
> of emacs$VERSION-common.
>
> If we wanted to be extra careful, we could try to make it fall back to
> plain "gpg" if epg-gpg-program is unset.
Well, I don't know how to add epg-gpg-program to this fedora 25
installation...
>
> fwiw, debian will be shipping gpg2 as /usr/bin/gpg in stretch, and the
> old 1.4 branch will be /usr/bin/gpg1 -- is there a reason that NixOS
> isn't shipping gpg2 as /usr/bin/gpg ?
On Fedora 25:
zsh$ rpm -q -f =gpg
gnupg-1.4.21-1.fc25.x86_64
zsh$ rpm -q -f =gpg2
gnupg2-2.1.13-2.fc25.x86_64
zsh$ echo =gpg =gpg2
/usr/bin/gpg /usr/bin/gpg2
Tomi
> --dkg
More information about the notmuch
mailing list