Home

Awesome

This repository contains the necessary tools to build and test cfengine packages for various platforms.

Hardware requirements

By experimentation I have found that building hub packages, which includes php dependency requires more than 1.6G of RAM/swap. 2.6G worked for me, less might work as well.

Example build of Community Agent

A minimal example would be to build packages for cfengine community agent. This should be done in an isolated environment such as a dedicated host, virtual machine or linux container.

Install necessary distribution packages. For example on debian/ubuntu:

apt update -y
apt upgrade -y
apt install -y git autoconf automake m4 make bison flex binutils libtool gcc g++ libc-dev libpam0g-dev python3 psmisc libtokyocabinet-dev libssl-dev libpcre2-dev default-jre-headless build-essential fakeroot ntp dpkg-dev debhelper pkg-config nfs-common sudo apt-utils wget libncurses5 rsync libexpat1-dev libexpat1 curl
apt purge -y emacs emacs24 libltdl-dev libltdl7

Get the cfengine source code:

mkdir $HOME/cfengine
cd $HOME/cfengine
git clone --recursive --depth 1 https://github.com/cfengine/core
git clone --depth 1 https://github.com/cfengine/buildscripts
git clone --depth 1 https://github.com/cfengine/masterfiles

Set some environment variables:

export NO_CONFIGURE=1
export PROJECT=community
export BUILD_TYPE=DEBUG
export EXPLICIT_ROLE=agent

Execute the build steps and see that packages are generated:

./buildscripts/build-scripts/autogen
./buildscripts/build-scripts/clean-buildmachine
./buildscripts/build-scripts/build-environment-check
./buildscripts/build-scripts/install-dependencies
./buildscripts/build-scripts/configure
./buildscripts/build-scripts/compile
./buildscripts/build-scripts/package
ls -l cfengine-community/*.deb

General Build Machine Prerequisites

Due to sheer diversity of the environments, build machine is expected to provide strict minimum amount of software (don't forget --no-install-recommends on dpkg-based systems):

To access the build machine:

To transfer files back and forth:

To be able to install packages and run tests:

To build everything:

To create packages:

To build MySQL library (yeah!):

To build libvirt:

Anything else is either preprocessed on buildbot slave or built and installed during build.

Documentation build pre-requisites

Non-requisites

Build machines should not contain the following items, which may interfere with build process:

The following packages should not be installed on build machines as well, to avoid accidentally regenerating files transferred from buildslave:

Dependencies

File install-dependencies and the relevant subdirectories in deps-packaging are the source of this information.

Agent Dependencies

CFEngine version3.21.x3.24.xmasterNotes
diffutils3.103.103.10
libacl2.3.22.3.22.3.2
libattr2.5.22.5.22.5.2
libcurl8.10.18.10.18.11.1
libgnurx2.5.12.5.12.5.1Windows Enterprise agent
libiconv1.171.171.17Needed by libxml2
libxml22.13.42.13.42.13.5
libyaml0.2.50.2.50.2.5
LMDB0.9.330.9.330.9.33
OpenLDAP2.6.82.6.82.6.9Enterprise agent only
OpenSSL3.0.153.4.03.4.0
PCRE8.45--
PCRE2-10.4410.44
pthreads-w322-9-12-9-12-9-1Windows Enterprise agent
SASL22.1.282.1.282.1.28Solaris Enterprise agent
zlib1.3.11.3.11.3.1
librsync2.3.4
libgccAIX and Solaris only

Enterprise Hub dependencies:

CFEngine version3.21.x3.24.xmaster
Apache2.4.622.4.622.4.62
APR1.7.51.7.51.7.5
apr-util1.6.31.6.31.6.3
Git2.47.02.47.02.47.1
libexpat-2.6.32.6.3
PHP8.3.138.3.138.3.15
PostgreSQL15.816.417.2
rsync3.3.03.3.03.3.0