2 Build Process

Each package build is created in a fresh environment. This is done to ensure that all dependencies are available and that every later build produces identical results.

2.1 Definition of a Build Process

2.2 Phases of a Build Process

All sources and binaries which are hosted inside Open Build Service are organized in projects. Projects host sources inside of OBS packages. The sources are build according to the repository configuration inside of the project.

2.2.1 Preinstall Phase

This phase depends on the type of the buildroot (building environment). OBS supports three different types of buildroots:

  • chroot

  • Xen

  • KVM

In the preinstall phase, the OBS Worker creates a small base system (chroot or VM Image) with manually extracted packages (file system, coreutils, binutils, rpm/debutils, etc.), copies all necessary build requirements into the base system.

2.2.2 Install Phase

Depending of the chosen build root, the worker starts a Xen or KVM virtual machine or enters the build root. If this was successful, the install phase reinstalls all base packages from above and additionally all packages you have defined in your build recipe. After this phase the environment is ready to process the build recipe.

2.2.3 Package Build

Depending on the type of package, the buildroot executes different build commands:

  • RPM-based distributions: rpmbuild

  • Debian-based distributions: dpkg-buildpackage

  • Arch Linux: pacman.

How the build continues depends on the quality and the type of your build recipe. In most cases, the source code will be compiled now and then be packed into the chosen package format.

To improve package quality, on RPM-based distributions there are additional security checks and a linter called rpmlint.

2.2.4 After the Build

The generated packages are taken from the worker, are signed by the OBS signer and are published to the Repository.

2.3 Different Ways of Building

2.4 Security Aspects

Print this page