LFSBuilder

The Linux from Scratch project provides a step-by-step instructions for building your own customized Linux-based distribution from source code. Apart from the learning experience and because this is a long repetitive process, the Linux from Scratch project developers provide users with an automation tool called jhalfs.

LFSBuilder is a Python program that has the same purpose, to automatically build a Linux from Scratch system. It also can be used with the Beyond Linux from Scratch book. This tool is designed under the Object Oriented Programming paradigm to simplify the code structure and also implements an extra customizable layer on top of the core functionality of the tool. This extra layer allows users to build an operating system that fits the requirements of multiple use cases.

The main elements of LFSBuilder are two: builders and components. A builder is an object capable of building one or more components and represents, in concept, any of the main chapters of the Linux from Scratch and Beyond Linux from Scratch books. It is also possible to define your own builders so you can do specific tasks or build your own components. A component represents a real element that interacts with the final system, either to add a new component (e.g. gcc, curl, bash or ssh) or to accomplish other tasks (e.g. mount the required system directories or generate the .img file in which the system will be built into by default).

The extra customization layer is defined in what I called a recipe, a little element that allows you to define any of the main elements and to customize its actions by overwriting some core functions if necessary. More info about the recipes system can be found in its own section.

LFSBuilder scope is not restricted to the Linux from Scratch project and can also be used to build your own components.

LFSBuilder development started during the summer of 2016 as part of my Telecommunications Engineering degree’s thesis. It was qualified in September of 2018, and from June 2019 is publicly available. The original thesis PDF document is available, in Spanish only, at the Universidad de Sevilla idUS website and the Universidad de Sevilla e-REdING website.

This is a project in constant development and licensed under the AGPL3 (GNU AFFERO GENERAL PUBLIC LICENSE) Open Source license.