Compiling GnuPG 2.0.1 on MacOS X

Benjamin Donnachie benjamin at py-soft.co.uk
Tue Feb 13 20:03:24 CET 2007


Benjamin Donnachie wrote:
> How embarrassing... my mistake - I was still using the old patched version!

Ah-ha!  That's better!  As a quick test I threw together the following
helper application:

/*
** Mac OS fails to process bundle information correctly
** for pinentry-mac.
**
** This quick hack attempts to address that.
**
*/

#include <stdio.h>

int main()
{
        return system
("/Applications/pinentry-mac.app/Contents/MacOS/pinentry-mac");
}


Compile this using "gcc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch
i386 -arch ppc pinentry-helper.c -o pinentry-helper" (Or download from
http://www.py-soft.co.uk/~benjamin/download/mac-gpg/pinentry-helper) and
copy it to "/Applications/pinentry-mac.app/Contents/MacOS/pinentry-helper".

Then add the following to ~/.gnupg/gpg-agent.conf:

pinentry-program
"/Applications/pinentry-mac.app/Contents/MacOS/pinentry-helper"

Unpatched gpg-agent (admittedly v1.9.21) correctly invokes pinentry-mac,
reading the GUI bundle information correctly.

It needs more work to achieve a tidy solution - especially since the
location of pinentry-mac is fixed and it fails to pass any command line
arguments.  Plus I might still use NSTask instead.

Ben



More information about the Gnupg-users mailing list