Chapter 15. Build Job Constraints

Contents

15.1. hostlabel
15.2. sandbox
15.3. linux
15.4. hardware

The build job constraints can define requirements to the hardware or software of the used build host. The constraints can be defined per package or for repositories.

The build constraints for a package is part of of the package sources. An _constraints source file can contain following values. The format of the file is XML and gets validated on submission.

The build constraints for entire project or specific repositories is part of the project config. It contains for each constraint a line

Constraint: <SELECTOR> <STRING>

The selector is a collon seperated list.

NOTE: If no build host is offering the constraints, the package will stay in scheduled state and never get dispatched.

15.1. hostlabel

The hostlabel is any string which can be assigned to build hosts when starting the bs_worker process. It can be used to run on specific hosts, which may be used for running benchmarks in a reproducable way. This constraints does also support to be defined as a negative definition via the exclude=true attribute.

Example for _constraints file:

<constraints exclude="false">
  <hostlabel>benchmark_runner</hostlabel>
</constraints> 

Example for project configuration:

Constraint: hostlabel benchmark_runner

15.2. sandbox

Defines the sandbox which is used for the build job. Sandboxes are chroot, xen or kvm environments. There is also the virtual secure sandbox, which allows building on xen or kvm. This constraints does also support to be defined as a negative definition via the exclude=true attribute.

Example for _constraints file:

<constraints> exclude="true"
  <sandbox>secure</sandbox>
</constraints> 

Example for project configuration:

Constraint: sandbox secure

15.3. linux

The linux kernel specific part.

15.3.1. version

To require a specific linux kernel version.

Example for _constraints file:

<constraints>
  <linux><version>
    <min>3.0</min>
    <max>4.0</max>
  </version></linux>
</constraints> 

Example for project configuration:

Constraint: linux:version:min 3.0
Constraint: linux:version:max 4.0

15.3.1.1. min

Minimal kernel version.

15.3.1.2. max

Maximal kernel version.

15.3.2. flavor

A specific kernel flavor like default or smp (from kernel packages kernel-default or kernel-smp).

Example for _constraints file:

<constraints>
  <linux>
    <flavor>default</flavor>
  </linux>
</constraints> 

Example for project configuration:

Constraint: linux:flavor default

15.4. hardware

To require hardware or build instance features.

15.4.1. cpu

To require a specific linux kernel version.

15.4.1.1. flag

CPU features which are provided by the hardware. On linux they can be found in /proc/cpuinfo. The flag element may be used multiple times to require multiple cpu features.

Example for _constraints file:

<constraints>
  <hardware><cpu>
    <flag>mmx</flag>
    <flag>sse2</flag>
  </cpu></hardware>
</constraints> 

Example for project configuration:

Constraint: hardware:cpu:flag mmx
Constraint: hardware:cpu:flag sse2

15.4.2. processors

To require a minimal number of processors for the build job.

Example for _constraints file:

<constraints>
  <hardware>
    <processors>4</processors>
  </hardware>
</constraints> 

Example for project configuration:

Constraint: hardware:processors 4

15.4.3. disk

Hard disk specific.

15.4.3.1. size

To require a minimal size of the disk.

Example for _constraints file:

<constraints>
  <hardware>
    <disk>
      <size unit="G">4</size>
    </disk>
  </hardware>
</constraints> 

Example for project configuration:

Constraint: hardware:disk:size unit="G" 4

15.4.4. memory

Memory specific.

15.4.4.1. size

To require a minimal memory size including swap space.

Example for _constraints file:

<constraints>
  <hardware>
    <memory>
      <size unit="M">1400</size>
    </memory>
  </hardware>
</constraints> 

Example for project configuration:

Constraint: hardware:memory:size unit="M" 1400

15.4.5. physicalmemory

Memory specific.

15.4.5.1. size

To require a minimal memory size. Swap space is not taken into account here.

Example for _constraints file:

<constraints>
  <hardware>
    <physicalmemory>
      <size unit="M">1400</size>
    </physicalmemory>
  </hardware>
</constraints> 

Example for project configuration:

Constraint: hardware:physicalmemory:size unit="M" 1400