From MozillaWiki
Jump to: navigation, search

This module manages the installation of packages. It provides the level of abstraction between "NRPE should be installed" (include packages::nrpe) and the details of that installation, which will vary widely between linux, OSX, and Windows-based systems.

Most packages will have a dedicated module which abstracts the configuration of that package across operating systems -- for example, NRPE plugins may be installed in different directories on different operating systems.

"Installation" here is taken to mean getting the package installed, along with any supporting files (e.g., NRPE plugins).


All packages can be required as a class:

 require => Class['packages::foo']


In general, package management resources get set up by the packages::setup class in the 'packagesetup' stage (see [ReleaseEngineering/PuppetAgain#Stages]), so that subsequent uses of the package manager can assume it is configured. This is done with an invocation of packages::setup from the toplevel::base class.


On CentOS, packages are installed with the yum provider, and the relevant repositories are added to yum in the packagesetup stage.

Yum caches repository metadata on clients for a default of six hours. This can cause problems when trying to land package changes, as the change will not be visible on clients for this time. A cache reload can be forced by incrementing $repoflag in modules/packages/manifests/setup.pp, working around the problem.


The packages::yumrepo class is used from packages::setup to install yum repositories. It takes

name of the repo
path to the repo on the repo server (starting with repos/yum)
(optional) puppet location of the gpg key for the repo
(required if $gpg_key given) gpg-pubkey package that appears when the key is installed (use 'rpm -q gpg-pubkey' to find this)

Many of the basic repos - CentOS, releng, and puppet - are included by default. Others are defined in `modules/packages/manifests/setup.pp` as virtual resources and realized in the package manifests when required.


There is no setup required for darwin packages. Each package is installed using packages::pkgdmg:

            packages::pkgdmg {
                   version => "1.6";

This define automatically calculates the DMG path and uses the puppet pkgdmg provider to install it.

See ReleaseEngineering/PuppetAgain/Packages#Darwin for details on installing and creating Darwin packages.


See for the current list of non-customized packages. The names should be self-explanatory, right?

The private Apple packages are from (Apple ID required)

Mozilla-Custom Packages

In many cases, we want customized or patched packages. Those should be under packages::mozilla. Packages in this space have more requirements, since they are not simply pulling in a publicly available package. See ReleaseEngineering/PuppetAgain/HowTo/Hack on PuppetAgain#Custom Packages.


This is a newer version than is distributed by CentOS. It seems no other changes have been made.


This is a python wrapper around hg that simplifies using hg from build automation. The canonical source for hgtool is, and it is packaged into a self-contained python script with

It installs to /usr/local/bin


This is a python wrapper around git that simplifies using git from build automation. The canonical source for gittool is, and it is packaged into a self-contained python script with

It installs to /usr/local/bin


This is a customized build of Git without various GUI things and installed with a prefix of /tools/git, so that the git binary is at /tools/git/bin/git with a symlink at /usr/local/bin/git. The GUI utilities are not necessary on a buildslave, and pull in lots of unnecessary packages.


This is a build of a forked of fedora's mock - see the github page. The package:

  • installs a number of mock profiles in /etc/mock_mozilla (see /etc/mock_mozilla in the project)
  • installs /usr/sbin/mock_mozilla (and a consolehelper script in /usr/bin/mock_mozilla that authorizes users via the mock_mozilla group)
  • creates /builds/mock_mozilla
  • installs a bunch of python modules into the system python (*not* a mozilla python)


This is a custom build of Python-2.6.7, primarily to put the binaries out of the way of the system python. It installs to /tools/python26, with python at /tools/python26/bin/python, and a symlink at /usr/local/bin/python2.6.


This is a custom build of Python-2.7.2. The Python prefix is /tools/python27, with symlinks from /tools/python and /tools/python2. The python binary is at /tools/python26/bin/python, with a symlink at /usr/local/bin/python2.7.


Installs Mercurial, built against packages::mozilla::python27. This installs a symlink at /usr/local/bin/hg.


Installs virtualenv, built against packages::mozilla::python27. Note that virtualenv is a single .py file, and thus does not need to be built at all. The python::virtualenv puppet module does not use this package. This installs a symlink at /usr/local/bin/virtualenv.


This is a python tool to retry an operation a configurable number of times. The canonical source for hgtool is, and it is packaged into a self-contained python script with

It installs to /usr/local/bin


This installs the jford's tool to set the screen resolution on a Mac in /usr/local/bin/screenresolution. The screenresolution class uses this on Darwin.


A newer version of supervisor package based on FC16 spec file and supervisor_3.0-0.10.a12. Used by supervisord module.


This installs the tooltool script at /tools/; it is built from a template to use packages::mozilla::python27.