7 Multiple Build Description File Handling

7.1 Overview

A package source may contain multiple build description files. They can be used depending on the base distribution, the repository name or for different configurations. These mechanics can be also combined.

The right build description file gets picked by filtering. The build will not start when either no file matches or multiple candidates exist. The filtering happens with the following steps:

  1. Based on the package build format of the based distributions. Rpm based distros will used spec files for example.

  2. Based on the file name of the file before the suffix. It is not important as long as just one file exists, but it has to match when multiple files exist. The name is defined by the build container name, which is either defined in a _multibuild directive file or is the source package name.

  3. Specific files can be created to be built for a specific repository. Append the repository name of the build container behind the suffix with a dot. For example hello.spec.openSUSE_13.2.

7.2 How Multibuild is Defined

Use the _multibuild directive to build the same source in same repository with different flavours. This handy to define all flavours in one place without the need to maintain packages with local links. This allows also to transfer all sources including a possible changed flavour from one project to another with a standard copy or submit request.

The _multibuild file lists all build container names, each of them will be build as usual for each defined repository and each scheduler architecture.

For example, inside the kernel source package we can build both kernel-source and kernel-obs-build packages by listing them inside the file.

Multibuild packages are defined with the _multibuild directive file in the package sources.

The _multibuild file is an xml file. For example:


Build description files are needed for each of them for each package (eg. kernel-source.spec or kernel-obs-build.dsc) inside of the sources. There will be another build in case there is also a matching file for the source package container name, otherwise it will just turn into "excluded" state.

Print this page