Build packages from source

Building the Rudder agent

Get source

Make sure you have network access and the git command. Also make sure you have all prerequisites installed. If later on you see "Warning: prerequisite (something) not found" in the build log, go back and make sure to install the missing software before using the resulting package.

Go to your build directory and checkout rudder-packages

cd /usr/src
git clone https://github.com/Normation/rudder-packages.git
cd rudder-packages

Choose the branch to build

# For branch x.y
#git checkout branches/rudder/x.y
# 7.3 is still master when this documentation is written
git checkout master
cd rudder-agent

Edit SOURCES/Makefile file and set the value of RUDDER_VERSION_TO_PACKAGE: see https://repository.rudder.io/sources/ for a complete list of available versions. This version MUST be of the for x.y.z. You can also choose a nightly version from https://repository.rudder.io/sources/nightly/

Download the source tarball and put it in the SOURCES directory under the name rudder-sources.tar.bz2

Now choose one of the 3 next chapter, depending on your case: dpkg (debian-like package), rpm (redhat-like package) or other.

Build a dpkg package

Set the version to build:

  • Update the debian/changelog file to make the first entry match the version you want to build.

Run the dpkg package builder:

dpkg-buildpackage

The package will be stored in the parent directory.

Build an rpm package

Run the rpm package builder:

# make sure you are in in rudder-agent, then
ln -s $(pwd) /root/rpmbuild
rpmbuild -ba --define 'real_version <The version>' SPECS/*.spec

The package will be stored in RPMS/.

Build an agent locally

Go to the SOURCES directory and make the agent :

./configure <your options>
make
sudo make install DESTDIR=<default to ./target>

---

Run `./configure --help` to see default configure values.

← Rudder architecture Man pages →