For reasons, I needed to work with a GNUPG version 2.2.0 precicely. This is not what comes with the standard packages of the OS distribution that I work with, so why not compile and install it in a separate tree and be done with it?
Unfortunately, GCC >= 10 cannot compile version 2.2.0 with all sorts of errors popping at different places of preprocessor definitions. I followed through some bug reports after googling around, and was this close to launching a VM with an old OS carrying the gpg. But I remembered that GCC is also on dockerhub. And I thought, In the old days I have used newer versions of GCC to compile older ones for similar reasons. Maybe now I can use a container?
Sure enough using
docker run --rm -it -w $(pwd):/app -w /app gcc:9 bash
and then (and after unzipping the source code) from within the container
make distclean
./configure --prefix=/app/gnupg --disable-libdns
make
make install
and voila! I had the thing installed locally.
Not much of an innovative story here, but I had not written in the blog for days and thought I could share a story.