Wednesday, January 30, 2008

Upgrade from gnupg1.x to gnupg2

I'm a regular user of Thunderbird+Enigmail+gnupg on my FreeBSD box.

Until now I used gnupg 1.x, but I wanted to upgrade to gnupg2 (2.0.4).
Why? Because of a combination of envy and fun. No more to tell. The former version filled my needs.

So how to upgrade? First of all install gnupg2 (it's on /usr/ports/security/gnupg) and pinentry (it's on /usr/ports/security/pinentry). gnupg2 cannot be run without pinentry, so the latter should be added as a dependency of gnupg, but it's not. So you need to install both by hand.

Once you've installed both packages, you have add the gpg-agent.conf on your ${HOME}/.gnupg. Mine contains:

pinentry-program /usr/local/bin/pinentry-gtk-2
no-grab
default-cache-ttl 600

(see man 1 gpg-agent just to know what these options do).

And that's all! Thunderbird+Enigmail runs like a charm with gnupg2. My gnupg1.x keys work correctly with gnupg2.0.

Environment: FreeBSD 6.2, thunderbird-2.0.0.0 (installed from ports), thunderbird-enigmail-0.95.0 (installed from ports), gnupg-2.0.4 (installed from packages), pinentry-0.7.2_5 (installed from packages).