See Morph's code here!
Morph is the Baserock workflow tool. It controls the builds and branching and merging, and other parts of the process of developing with Baserock.
We build everything from source committed to Git. Each upstream project, or chunk, has its own Git repository; if upstream is not using Git, we convert their source control or release tar archives to Git for our own use.
The process of building the upstream code into a binary artifact is controlled by Morph. Projects using well-known, well-behaved, well-defined build systems (such as autotools or CPAN) need no changes. Everything else needs a description of the build, which we call a morphology. The morphology specifies the commands to run to build the project, and how to split it up into multiple artifacts, if that is needed. We use our own format for morphologies, using YAML (formerly JSON) syntax.
The chunks get combined into strata, and the strata into system images.
Builds happen in clean staging areas that have only the explicitly defined build dependencies installed, and do not have network connectivity at build-time.
There is some caching and intelligent management of resources to speed things up.
See the manual page or
--help output for details on options and stuff.