The Fridge: binary packages for cerbero recipes
The Fridge is a new feature that intends to provide support for binary packages in cerbero, which dramatically increases initial builds by downloading pre-compiled versions of packages instead of rebuilding them from scratch.
For each recipe a new <recipe_name>-pkg is created with the files listed by the recipe. When packaging a recipe, all text files that are subject to relocation such as .pc or .la files are relocated replacing the current prefix with a placeholder. When extracting the recipe package, the placeholder is replaced with the new build prefix.
When building a recipe with the option to upload binaries to the fridge, after all recipe steps are performed, the recipe is packaged in a tarball and uploaded to the fridge (the upload process could support several mechanisms, right now it posts the tarball with curl/wget).
When building a recipe with the option to download binaries from the fridge, before building the recipe an attempt is made to download the binary package from the fridge and extract it to the recipe. If it succeeds, the recipe is marked as built.
Unique package names
Packages are upload to a directory with the hash of the current cerbero configuration, computed with the environment set by the config, so that if compiler flags changes, the hash will change and new binary packages will be built. The package name will also contain a hash, the same used for the cache, to ensure that packages are rebuilt with changes in the recipe or the commit they have compiled.