Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]

1 Supported Build Recipes and Package Formats

1.1 About Formats

OBS differentiates between the format of the build recipes and the format of the installed packages. For example, the spec recipe format is used to build RPM packages by calling rpmbuild.

In most cases, the build result format is the same as the package format used for setting up the build environment, but sometimes the format is different. An example is the KIWI build recipe format, which can build ISOs, but uses RPM packages to set up the build process.

OBS currently supports the following build recipe formats and packages:

Supported Package Formats
  • RPM package format, used for all RPM-based distributions like openSUSE, SUSE Linux Enterprise, Fedora, and others.

  • DEB package format, used in Debian, Ubuntu, and derived distributions

  • Arch package format, used by Arch Linux

Supported Build Recipe Formats
  • Spec format for RPM packages

  • Dsc format for DEB packages

  • KIWI format, both product and appliances

  • preinstallimage

  • SimpleImage format

If no build recipe format and binary format are specified in the project configuration, OBS tries to deduce them from the preinstall list, which includes the name of the used package manager. This means that you need to manually configure the kiwi build recipe, as an RPM package format will select spec builds as default. This configuration is done by adding a Type line to the project configuration.

1.2 RPM: Spec

RPM (RPM Package Manager) is used on openSUSE, SUSE Linux Enterprise, Red Hat, Fedora, and other distributions. For building RPMs you need:


the spec file for each package containing metadata and build instructions. OBS parses the spec file's BuildRequires lines to get a list of package dependencies. OBS uses this information to both build the packages in the correct order and also for setting up the build environment. The parser understands most of RPMs macro handling, so it is possible to use architecture specific BuildRequires, conditional builds and other advanced RPM features.


the file which contains the changelog.

1.3 Debian: Dsc

DEB packages are used on all Debian or Ubuntu based distributions. For building .deb files, you need:


The file contains the meta information for the package like the build dependencies or some description.


This file describes the build section of the DEB building process. There are the configure and make compile commands including other DEB building sections.


In this file you describe the package names of each subpackage and their dependency level. Unlike RPM, the release numbers are not increased automatically during build unless the keyword DEBTRANSFORM-RELEASE is added to the file.

1.4 Arch: pkg

Pkg files is used on Arch Linux and its derivatives. For building Pkg you need:


It contains the build description and the source tarball. The file PKGBUILD does not have macros like %{buildroot}. It contains variables, for example, makedepends=(PACKAGE1, PACKAGE2). These variables are parsed by OBS and uses them as dependencies. On Arch Linux you typically build packages without subpackage. They are no *-dev or *-devel packages.

1.5 KIWI Appliance

KIWI (https://suse.github.io/kiwi/) is an OS appliance builder that builds images for various formats, starting from hardware images, virtualization systems like QEMU/KVM, Xen and VMware, and more. It supports a wide range of architectures, which are x86, x86_64, s390 and ppc.

For building an image in KIWI you need:


Contains the image configuration in XML format. Full XML schema documentation can be found https://suse.github.io/kiwi/development/schema.html.

config.sh (optional)

configuration script that runs at the end of the installation, but before package scripts have run.


directory that contains files that will be applied to the built image after package installation. This can also be an archived and compressed directory, usually named root.tar.gz.


OBS only accepts KIWI configuration files with a .kiwi suffix. Other naming schemes KIWI supports like config.xml, are ignored in OBS.

For more information about building images with KIWI, see the https://suse.github.io/kiwi/building.html.

1.6 SimpleImage

This format can be used to get simple rootfs tarball or squashfs image. It does not contain a bootloader or a kernel. For advanced features, use KIWI. Use SimpleImage for simple rootfs tarball/squashfs image of any distribution that is supported by OBS but does not have anything fancier than that.

For building a SimpleImage, you need a simpleimage file. Be aware of the following points:

  • SimpleImage uses a similar syntax than a spec file.

  • Supported tags include Name, Version, BuildRequires, and #!BuildIgnore.

  • Additional customization with %build phase is supported.

  • RPM macros are not supported, but $SRCDIR shell variable is available.

Example 1.1: SimpleImage File (simpleimage)
Name:           example-image
Version:        1.0
BuildRequire:   emacs
#!BuildIgnore:  gcc-c++

# Set root password
passwd << EOF

# Enable ssh
systemctl enable sshd

1.7 AppImage

Print this page