Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the module using puppet-strings tags #17

Merged
merged 2 commits into from
Jul 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
84 changes: 0 additions & 84 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,61 +12,8 @@ Pbuilder Puppet module

Pbuilder is a building utility for Debian systems based on sbuild.


# Dependencies

This module is only tested on puppet master and client versions 0.24.7,
so it could be that it depends on that version (or higher).


# Reference

To use this module, drop it into your modules path.


# Classes

- pbuilder::common, included by the pbuilder definition


# Definitions

- pbuilder

## pbuilder

### Parameters

The pbuilder type takes the following arguments :
- ensure: whether the pbuilder should be present
Possible values: "present", "absent"
Defaults to "present"
- release: the Debian/Ubuntu release to be used
(sarge/etch/lenny/dapper/feisty/gusty/etc.)
Defaults to $lsbdistcodename
- arch: the architecture of the pbuilder (i386, amd64, etc.)
Defaults to $architecture
- methodurl: the URL used to grab the packages from
(e.g. http://http.debian.net/debian)
Defaults to "" (not functional, only useful for "ensure => absent")
- site: a hash used to find the right apt.config directory
(in puppet://${server}/apt/${release}/${arch}/${site})
Defaults to "" (not functional, only useful for "ensure => absent")
- debbuildopts: the options to send to debuild (see `man dpkg-buildpackage`)
Defaults to "-b"
- bindmounts: a list of space-separated directories to bind-mount in the chroot
Defaults to ""
- bindir: where to put the pbuilder script
Defaults to "/usr/local/bin"
- chrootdir: where to put the basetgz tarball
Defaults to "/var/chroot/pbuilder"
- confdir: where to store the configuration for the script
Defaults to "/etc/pbuilder"
- cachedir: where to create the aptcache, build and result directories
Defaults to "/var/cache/pbuilder"
- templaterc: the pbuilderrc ERB template to use
Defaults to "pbuilder/pbuilderrc.erb"

This module assumes the following directories:

Configuration:
Expand All @@ -84,43 +31,12 @@ Cache:
Chroot:
- ${chrootdir}/base_$name.tgz : compressed chroot for the pbuilder



### Examples


#### Set a pbuilder using the release and architecture of the host

pbuilder { "feisty":
methodurl => "http://archive.ubuntu.com/ubuntu",
}


#### Destroy an old existing pbuilder

pbuilder { "dapper":
ensure => absent
}


#### Set an am64 pbuilder for the etch release, including sources in the .changes

pbuilder { "etch-amd64":
release => etch,
methodurl => "http://ftp.debian.org/debian",
debbuildopts => "-sa"
}



### Important note

You have to provide a valid apt.config directory for your pbuilder.
You can use the apt class for that, and notify the private pbuilder_update Exec.


# Licence

Copyright © 2007-2018 Raphaël Pinson <raphink@gmail.com>
See the LICENSE file for the full license.

260 changes: 260 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,260 @@
# Reference

<!-- DO NOT EDIT: This document was generated by Puppet Strings -->

## Table of Contents

### Classes

#### Public Classes


#### Private Classes

* `pbuilder::common`: Manage generic resources for pbuilder
* `pbuilder::cowbuilder::common`: Basic installation of cowbuilder

### Defined types

#### Public Defined types

* [`pbuilder`](#pbuilder): Provide a pbuilder resource.
* [`pbuilder::cowbuilder`](#pbuildercowbuilder): Manage a cowbuilder environment

#### Private Defined types

* `pbuilder::apt::preferences`: Manage preferences for a pbuilder setup
* `pbuilder::apt::sources_list`: Manage sources.list for a pbuilder setup

## Classes

## Defined types

### <a name="pbuilder"></a>`pbuilder`

Provide a pbuilder resource.

#### Examples

##### Set a pbuilder using the release and architecture of the host

```puppet
pbuilder { 'focal':
methodurl => 'http://archive.ubuntu.com/ubuntu',
}
```

##### Destroy an old existing pbuilder

```puppet
pbuilder { 'jessie':
ensure => absent,
}
```

##### Set an am64 pbuilder for the etch release, including sources in the .changes

```puppet
pbuilder { 'buster-amd64':
release => buster,
methodurl => 'http://deb.debian.org/debian',
debbuildopts => "-sa",
}
```

#### Parameters

The following parameters are available in the `pbuilder` defined type:

* [`ensure`](#ensure)
* [`release`](#release)
* [`arch`](#arch)
* [`methodurl`](#methodurl)
* [`debbuildopts`](#debbuildopts)
* [`bindmounts`](#bindmounts)
* [`bindir`](#bindir)
* [`chrootdir`](#chrootdir)
* [`cachedir`](#cachedir)
* [`confdir`](#confdir)
* [`rctemplate`](#rctemplate)

##### <a name="ensure"></a>`ensure`

Data type: `Enum['present', 'absent']`

Whether the pbuilder should be present

Default value: `'present'`

##### <a name="release"></a>`release`

Data type: `String[1]`

The Debian/Ubuntu release to be used (Buster, Bionic, etc)

Default value: `$facts['os']['distro']['codename']`

##### <a name="arch"></a>`arch`

Data type: `String[1]`

The architecture of the pbuilder (i386, amd64, etc.)

Default value: `$facts['os']['architecture']`

##### <a name="methodurl"></a>`methodurl`

Data type: `Optional[String[1]]`

The URL used to grab the packages from
(e.g. http://deb.debian.org/debian)

Default value: ``undef``

##### <a name="debbuildopts"></a>`debbuildopts`

Data type: `String`

The options to send to debuild (see `man dpkg-buildpackage`)

Default value: `'-b'`

##### <a name="bindmounts"></a>`bindmounts`

Data type: `Optional[String[1]]`

A list of space-separated directories to bind-mount in the chroot

Default value: ``undef``

##### <a name="bindir"></a>`bindir`

Data type: `Stdlib::Absolutepath`

Where to put the pbuilder script

Default value: `'/usr/local/bin'`

##### <a name="chrootdir"></a>`chrootdir`

Data type: `Stdlib::Absolutepath`

Where to put the basetgz tarball

Default value: `'/var/chroot/pbuilder'`

##### <a name="cachedir"></a>`cachedir`

Data type: `Stdlib::Absolutepath`

Where to create the aptcache, build and result directories

Default value: `'/var/cache/pbuilder'`

##### <a name="confdir"></a>`confdir`

Data type: `Stdlib::Absolutepath`

Where to store the configuration for the script

Default value: `'/etc/pbuilder'`

##### <a name="rctemplate"></a>`rctemplate`

Data type: `String[1]`

The pbuilderrc ERB template to use

Default value: `'pbuilder/pbuilderrc.erb'`

### <a name="pbuildercowbuilder"></a>`pbuilder::cowbuilder`

Manage a cowbuilder environment

#### Parameters

The following parameters are available in the `pbuilder::cowbuilder` defined type:

* [`ensure`](#ensure)
* [`release`](#release)
* [`arch`](#arch)
* [`cachedir`](#cachedir)
* [`confdir`](#confdir)
* [`methodurl`](#methodurl)
* [`debbuildopts`](#debbuildopts)
* [`bindmounts`](#bindmounts)
* [`rctemplate`](#rctemplate)

##### <a name="ensure"></a>`ensure`

Data type: `Enum['present', 'absent']`

Whether the pbuilder should be present

Default value: `'present'`

##### <a name="release"></a>`release`

Data type: `String[1]`

The Debian/Ubuntu release to be used (Buster, Bionic, etc)

Default value: `$facts['os']['distro']['codename']`

##### <a name="arch"></a>`arch`

Data type: `String[1]`

The architecture of the pbuilder (i386, amd64, etc.)

Default value: `$facts['os']['architecture']`

##### <a name="cachedir"></a>`cachedir`

Data type: `Stdlib::Absolutepath`

Where to create the aptcache, build and result directories

Default value: `'/var/cache/pbuilder'`

##### <a name="confdir"></a>`confdir`

Data type: `Stdlib::Absolutepath`

Where to store the configuration for the script

Default value: `'/etc/pbuilder'`

##### <a name="methodurl"></a>`methodurl`

Data type: `Optional[String[1]]`

The URL used to grab the packages from
(e.g. http://deb.debian.org/debian)

Default value: ``undef``

##### <a name="debbuildopts"></a>`debbuildopts`

Data type: `String`

The options to send to debuild (see `man dpkg-buildpackage`)

Default value: `'-b'`

##### <a name="bindmounts"></a>`bindmounts`

Data type: `Optional[String[1]]`

A list of space-separated directories to bind-mount in the chroot

Default value: ``undef``

##### <a name="rctemplate"></a>`rctemplate`

Data type: `String[1]`

The pbuilderrc ERB template to use

Default value: `'pbuilder/pbuilderrc.erb'`

2 changes: 2 additions & 0 deletions manifests/apt/preferences.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# @summary Manage preferences for a pbuilder setup
# @api private
define pbuilder::apt::preferences (
$pbuilder_name,
$priority,
Expand Down
2 changes: 2 additions & 0 deletions manifests/apt/sources_list.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# @summary Manage sources.list for a pbuilder setup
# @api private
define pbuilder::apt::sources_list (
$pbuilder_name,
$ensure='present',
Expand Down