Skip to content
This repository has been archived by the owner on Jan 26, 2023. It is now read-only.

Set Debian packaging build environment

License

Notifications You must be signed in to change notification settings

maxlareo/ansible-role-debpkg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Releases

No releases published

Packages

No packages published