The Problem
I have a big infrastructure consisting of several kinds of servers running Linux. For instance, database servers, load balancers, application-specific servers. There are many instances of every kind of server, and all of them need to be reproducible.
Every kind of server is basically a custom distribution. Customisations include changes to the upstream packages (other upstream version, build options, patches, whatever) and, possibly, some extra custom packages.
For example, I need a server running the latest OpenLDAP slapd compiled with specific options and some patches. And this is where things get complicated.
Updating to the latest slapd will also require updating libraries it depends on, which means rebuilding all packages that depend on these libraries, too. That is I basically need to rebuild significant part of the distribution. I'm looking for a solution that helps automate this process.
Solution requirements
Kind of vague. I want to prepare everything necessary for building my custom distro, give it a name (e.g ldap-server) and give that name to the automated build system any time I need to reproduce the build.
I think this is something Gengoo or LFS community should have. Also I've seen projects like ALT Linux Hasher, Fedora Mock, Debian pbuilder/sbuild but never used any of them.
Any ideas?
Thanks in advance!