- Description
- Setup - The basics of getting started with gnu_build_system
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Manages packages created in the GNU Build System with Puppet. That is: install stuff by the good old ./configure
and make <target>
sequence.
This module aims to replace a tedious series of exec
s needed if one is managing packages from "tarballs" and such.
Still uses
exec
resource. I hope to get it right and have custom types in the future.
Be advised that this kind of installation is considered a Bad Thing when using a configuration manager like Puppet. See here, here and here for some opinions. Use this module as a last resort.
- Installs
gcc
andmake
packages. Bygcc
packages, it means the whole set of packages required for compilation in your OS. - Compiles and installs whatever unpacked package you run these commands on
- OS
- RedHat 5, 6 and 7 and derivatives
- Debian 6 and 7 and derivatives
- Packages
- Puppet >= 3.8.7 < 4.0.0
- ruby
- Modules
- puppetlabs/stdlib (>= 4.15.0 < 5.0.0)
- puppetlabs/gcc (>= 0.3.0 < 1.0.0)
- puppet/make (>= 1.0.0 < 2.0.0)
Recommended module: puppet/archive - downloads and extracts compressed files, including tarballs
The very basic steps needed for a user to get the module up and running. This can include setup steps, if necessary, or it can be an example of the most basic use of the module.
Just including the main class will suffice for most cases:
include gnu_build_system
If you need to manage only gcc
or make
, as opposed to both packages, use _manage
parameter to disable management of the other package:
class { 'gnu_build_system':
gcc_manage => false, # Or
make_manage => false,
}
To manage packages other than the defaults, use _package(s)
parameters:
class { 'gnu_build_system':
gcc_packages => ['<Package 1>', '<Package 2>'...], # And/or
make_package => '<Alternative make>',
}
For information on default packages, pls see gcc and make modules
Declare the defined type gnu_build_system::configure
, specifying the directory where the configure script is located and optional parameters.
If you just want to run ./configure
, without setting options or variables, and with the same user and group which runs the Puppet agent, only the path is needed:
gnu_build_system::configure { '<Directory>': }
Or
gnu_build_system::configure { '<Unique name>':
path => '<Directory>',
}
To pass custom options and/or variables to ./configure
, just include 'opts' and/or 'vars' parameters as arrays:
gnu_build_system::configure { '<Unique name>':
path => '<Directory>',
opts => ['<Option 1>', '<Option 2>'...],
vars => ['<Variable 1>=<Value>', '<Variable 2>=<Value>'...],
}
To run ./configure
with different user and/or group, just user 'user' and/or 'group' parameters:
gnu_build_system::configure { '<Unique name>':
path => '<Directory>',
user => '<User>',
group => '<Group>',
}
Declare the defined type gnu_build_system::make
, specifying the directory where the Makefile is located and optional parameters.
If you just want to run make
, without setting options or a target, and with the same user and group which runs the Puppet agent, only the path is needed:
gnu_build_system::make { '<Unique name>':
path => '<Directory>',
}
To pass custom options and/or a target (like 'install' or 'check') to make
, just include 'opts' and/or 'target' parameters. The 'opts' parameter should be passed as an array:
gnu_build_system::make { '<Unique name>':
path => '<Directory>',
opts => ['<Option 1>', '<Option 2>'...],
target => '<Target>',
}
To run make
with different user and/or group, just user 'user' and/or 'group' parameters:
gnu_build_system::make { '<Unique name>':
path => '<Directory>',
user => '<User>',
group => '<Group>',
}
Parameter | Description | Type | Default |
---|---|---|---|
gcc_manage | Whether to install gcc packages | Boolean | true |
gcc_packages | Alternative list of compiler packages | Array | undef* |
make_manage | Whether to install make package | Boolean | true |
make_package | Alternative make package | String | undef* |
* - Uses typical OS packages, determined by make
module
Parameter | Description | Type | Default |
---|---|---|---|
path | Directory where to run ./configure |
String | Resource title |
opts | Command-line options for ./configure |
Array | None |
vars | Command-line variables for ./configure |
Array | None |
user | User for ./configure execution |
String | User running Puppet |
group | Group for ./configure execution |
String | Group running Puppet |
Parameter | Description | Type | Default |
---|---|---|---|
path | Directory where to run make |
String | Required |
opts | Command-line options for make |
Array | None |
target | make target |
String | None |
creates | Target file to check before execution | String | None (don't check) |
user | User for make execution |
String | User running Puppet |
group | Group for make execution |
String | Group running Puppet |
This module is intended to run in any GNU Build System compatible Linux, but was tested in very few situations.
There is no input validation yet.
Target files timestamp checking is still done in only one file.
Pls follow general guidelines from Puppet Forge and Puppet language style guide. Pls also run any changed code thru tools like puppet parser validate
and puppet-lint
and, of course, test the code.
The list of contributors can be found here