NAME

burps_targets - burps targets configuration

DESCRIPTION

When you are building packages you might want to build them in different situations, with different options. The targets allow you to define those options.

For instance you could be doing nightly builds of your packages, local test builds when you are working on the developpement of a new feature, and from time to time build a package for a new release. In such situation, you could use command line arguments to change the options, or change the config file each time, but that is not very convenient. Instead you can define targets with any number of options, and use a single argument to select the target.

CONFIGURATION

The targets can be defined in any of the configuration files, using the targets option. This option is an hash, with the target names as keys, and as value an other hash containing the options to be used for this target.

As an example we could define the following targets :

  • the dev target, for daily development, from the master branch. You don’t to use pbuilder, so you can have your package built more quickly. You don’t want to sign the packages. And you want this target to be the default.

  • the release target, for building packages for a new release. You want to use pbuilder to make sure it is built in a clean chroot. You only want to build them from gpg signed tags. You want to sign the packages with a specific key.

In such case, the following targets configuration could be used :

targets:
  dev:
    git_hash: master
    use_pbuilder: 0
  release:
    use_pbuilder: 1
    debsign_keyid: 123456
    tag_gpg_id: 1

If the value of a target is not a hash containing options, but a string or an array of strings, then this or those names are used as targets. This is useful if you want to say that a target is the same as an other one, or to extend a target.

You can use this if you want to set a default target. When no target has been selected, the notarget target is used. In this example, we set dev as the default target:

targets:
  notarget: dev
  dev:
    git_hash: master
    use_pbuilder: 0
  release:
    use_pbuilder: 1
    debsign_keyid: 123456
    tag_gpg_id: 1

In this example we extend the release target as release_1 to add a git_hash:

targets:
  release_1:
   - git_hash_version_1
   - release
  release:
    use_pbuilder: 1
    debsign_keyid: 123456
    tag_gpg_id: 1
  git_hash_version_1:
    git_hash: version-1.0

COMMAND LINE OPTION

The target to be used can be selected with the --target command line option. You can select more than one target by giving the option multiple times, and in this case they will be used in the order given on the command line. If no target is selected, then the notarget target is used.

For example, if you want to build a debian package for dev target :

$ burps deb --target dev

If you want to build a debian package for the release target, using the 0.1.2.3 tag:

$ burps deb --target release --git-hash 0.1.2.3

DISTRIBUTIONS CONFIGURATION

It is possible to combine targets configurations with distributions configuration.

For example if you want to use different development branches for different distributions, you could use something like this :

targets:
  dev:
    distributions:
     - lsb_release:
         id: Mageia
       git_hash: master-mageia
     - lsb_release:
         id: Debian
       git_hash: master-debian
     - lsb_release:
         id: Debian
         codename: wheezy
       git_hash: master-debian-wheezy
  release:
    tag_gpg_id: 1

See burps_distributions(7) for details about distributions configuration.

SEE ALSO