2024-04-28
How I (used to) handle keeping track of how I configured software
Once upon a time, back a reasonable while ago, I used to routinely configure (in the './configure' sense) and build a fair amount of software myself, software that periodically got updates and so needed me to rebuild it. If you've ever done this, you know that one of the annoying things about this process is keeping track of just what configuration options you built the software with, so you can re-run the configuration process as necessary (which may be on new releases of the software, but also when you do things like upgrade your system to a new version of your OS). Since I'm that kind of person, I naturally built a system to handle this for me.
How the system worked was that the actual configuration for each
program or package was done by a little shell script snippet that
I stored in a directory under '$HOME/lib
'. Generally the file
name of the snippet was the base name of the source directory I
would be building in, so for example 'fvwm-cvs'. Also in this
directory was a 'MAPPINGS' file that mapped from full or partial
paths of the source directory to the snippet to use for that
particular thing. To actually configure a program, I ran a script,
inventively called 'doconfig'. Doconfig searched the MAPPINGS file
for, well, let me just quote from comments in the script:
Algorithm: we have a file called MAPPINGS.
We search for first the full path of the current directory and then it with successive things sawn off the front; if we get a match, we use the filename named.
Otherwise, we try to use the basename of the directory as a file. Otherwise we error out.
There's nothing particularly special about my script and my system for keeping track of how I built software. There probably are tons of versions and variations of it that people have created for themselves over the years. This is just the sort of thing you want to do when you get tired of trying to re-read 'config.log' files or whatever, and realize that you forgot how you built the software the last time around, and so on.
(Having written this up I've realized that I should still be using it, because these days I'm building or re-building a number of things and I've slide back to the old silly ways of trying to do it all by hand.)
PS: At work we don't have any particular system for keeping track of software build instructions. Generally, if we have to build something from source, we put the relevant command lines and other information in our build instructions.