Loading...
 

shimpsblog [en]

Compiling GnuPG I: Preparation

fmg Tuesday March 4, 2025

Situation

Assume you want to start to compile software yourself. There are many reasons to do so: learning, debugging, preparing a package, maybe just for fun. There are some questions raised immediately: where to start and how to proceed, And what needs to be thought about before going all in? This here describes the experiment and adventure of creating a GnuPG binary directly from the developers' GnuPG sources.

Preliminaries

Throw away destination

Starting things without some experience will cause some decision mistakes, thus need repetitiion from an earlier state. And someone surely doesn't want to mess up the main working system. Since this is an experiment, we choose a temporary destination in the filesystem to drop, compile and create all the stuff and artifacts needed on the way: /tmp/canary.

Prepare download

If you are too lazy to download the code, all the libraries, all the cryptographic signatures, and too lazy to verify the signatures, you can start with a meta download: a script which does all that work for you. We provide fetch-source.sh on the Codeberg non-profit community Git hosting project. The script is not in its final state yet, nor is the incubator repository the final repository. Even this is an experiment at this time.

Use script
Copy to clipboard
sh fetch-source.sh | tee -a download.log less download.log

For the beginning this is enough. The folder /tmp/canary/compile can be deleted an recreated with the script at any time. Have a look at the logfile and check whether there are any errors. Next time we will open the bzip2 pandora boxes and see what happens. Finally: feel free to analyze, understand, improve and/or customize the script itself. It is Free Software.

To be continued...

Update (2025-03-06): README with latest documentaion