Skip to content

vbotka/ansible-freebsd-poudriere

Repository files navigation

freebsd_poudriere

qualityBuild StatusDocumentation Status

Ansible role. FreeBSD. Install and configure Poudriere Build System.

Documentation at readthedocs.io

Feel free to share your feedback and report issues. Contributions are welcome.

Supported platforms

This role has been developed and tested with FreeBSD Supported Releases.

Requirements

Collections

  • community.crypto
  • community.general

Variables

Review the defaults and examples in vars.

Workflow

  • Change the login shell for the remote_user at the remote host build.example.com to /bin/sh if necessary
shell> ansible build.example.com -e 'ansible_shell_type=csh ansible_shell_executable=/bin/csh' -a 'sudo pw usermod admin -s /bin/sh'
  • Install role snd the collection
shell> ansible-galaxy role install vbotka.freebsd_poudriere
shell> ansible-galaxy collection install community.crypto
shell> ansible-galaxy collection install community.general
  • Fit variables, e.g. in vars/main.yml
shell> editor vbotka.freebsd_poudriere/vars/main.yml
  • Create and run the playbook
shell> cat freebsd-poudriere.yml

- hosts: build.example.com
  roles:
    - vbotka.freebsd_poudriere
shell> ansible-playbook freebsd-poudriere.yml

Example: Build packages for amd64 in 11.2-RELEASE

  • ssh to the host build.example.com

  • Optionally copy existing PORT_DBDIR to the directory /usr/local/etc/poudriere.d/options and review the options.

  • Create the jail 11amd64 with the required FreeBSD tree 11.2-RELEASE

shell> poudriere jail -c -j 11amd64 -v 11.2-RELEASE
  • Create ports tree local
shell> poudriere ports -c -p local
  • Review the lists of the packages. See tasks/pkglist.yml (default: {{ poudriere_pkglist_dir }}_{{ pkg_arch }})
shell: ls -la /usr/local/etc/poudriere.d/pkglist_amd64

For example

shell> cat /usr/local/etc/poudriere.d/pkglist_amd64/minimal
shells/bash
devel/git
archivers/gtar
ports-mgmt/pkg
ports-mgmt/portmaster
ports-mgmt/portupgrade
net/rsync
ftp/wget
  • Optionally configure the options for the packages pkglist. This will supersede the options from step 2. See Handbook 10.5.9. Using Sets
shell> poudriere options -j 11amd64 -p local -z setname -f pkglist
  • Build the set of packages setname listed in the file /usr/local/etc/poudriere.d/pkglist_amd64/minimal
shell> poudriere bulk -j 11amd64 -p local -z setname -f /usr/local/etc/poudriere.d/pkglist_amd64/minimal
  • ,or build the set of packages setname listed in in the files /usr/local/etc/poudriere.d/pkglist_amd64/*
shell> for i in /usr/local/etc/poudriere.d/pkglist_amd64/*; do poudriere bulk -j 11amd64 -p local -z setname -f $i; done
  • Provide the clients with the certificate. (default poudriere_cert_path)
/usr/local/etc/ssl/crt/poudriere.crt
  • Install a web server and publish the packages
/usr/local/poudriere/data/packages/11amd64-local-setname

Clients

References

License

license

Author Information

Vladimir Botka

About

Install and configure Poudriere Build System in FreeBSD.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages