debpkg

Ansible Role: Debpkg

Install and set environments for building Debian packages with sbuild.

Requirements

Debian-based distribution who have sbuild(=> 0.71) installed or available from the package management tool, apt.

Role Variables

debpkg_chroots

By default this dictionary is empty.

Chroot that will be created by sbuild-createchroot if not present.

Theses keys can be used to set options to the sbuild-createchroot command.

suite

Default: dictionary item.key. Set the Debian-based codenmae distribution, ex: jessie.

prefix

Default: dictionary item.key. Set the chroot prefix name, ex: jessie-backports.

arch

Default: 'amd64'. Set the processor architecture wanted for the chroot, ex: 'i386'.

suffix

Default: 'sbuild'. Set the suffix chroot name, ex: test.

extra_repository

Default: ''. Add an extra apt source list, ex: 'deb http://deb.debian.org/debian jessie-backports main'.

homedir

Default: 'debpkg_schroot_homedir/item.key', debpkg_schroot_homedir is a distribution specific variable set into vars/{{ ansible_distribution }}.yml file. Set the full path of the chroot, ex: /home/sbuild/jessie.

mirror

Default: 'debpkg_schroot_mirror', another distribution specific variable. Set the packages archive mirror used, ex: 'http://debian.mirror.test.org/debian/'.

debpkg_lintian

Default: false. Set to true to install and enable lintian.

debpkg_piuparts

Default: false. Set to true to install and enable piuparts.

debpkg_mailfrom

Default: false, so it will use the default sbuild mailfrom variable 'Source Builder <sbuild>'. Set to source mail address for mail reports of builds, need debpkg_mailto option to be set to enable mail reporting.

debpkg_mailto

Default: false. Set to destintaion mail address to send mail reports of builds, this option also enable mail reporting.

Dependencies

None.

Example Playbook

- hosts: servers
  become: yes
  roles:
  - maxlareo.debpkg
  vars:
  - debpkg_piuparts: true
  - debpkg_chroots:
      wheezy:
      jessie:
      jessie-backports:
        suite: jessie
        prefix: jessie-backports
        extra_repository: 'deb http://deb.debian.org/debian jessie-backports main'
      xenial-test:
        suite: xenial
        prefix: whatever
        suffix: iwant
        arch: i386
        homedir: '/home/sbuild-test/xenial-testing-var'
        mirror: 'http://archive.ubuntu.com/ubuntu'

Exemple made on Debian distribution !

On other distributions the default mirror variable will not be the same, so for Debian chroot the mirror variable is optional for a Debian chroot, but for an Ubuntu chroot, by exemple, it will be mandatory on a Debian host !

License

Apache-2.0

Author Information

Created by Maxime Lareo.

About

Install and set Debian packaging build environment

Install
ansible-galaxy install maxlareo/ansible-role-debpkg
GitHub repository
License
apache-2.0
Downloads
28