Skip to content

Instantly share code, notes, and snippets.

@andrenarchy
Last active October 21, 2018 02:59
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save andrenarchy/80d9b2e951dfaea7b6f4 to your computer and use it in GitHub Desktop.
Save andrenarchy/80d9b2e951dfaea7b6f4 to your computer and use it in GitHub Desktop.
Build icinga2 and icinga-web Debian/Ubuntu packages for non-{i386,amd64} architectures

Build icinga2 and icinga-web Debian/Ubuntu packages for non-{i386,amd64} architectures

Why?

The icinga PPA only provides packages for i386 and amd64. If you're running an ARM-powered device such as the Raspberry Pi or the ODROID U3 (which I use), you have to build the packages yourself. However, compiling the packages is very easy thanks to Debian's excellent build tools and the work of the icinga package maintainer. This howto uses pbuilder which builds in a clean chroot so your original system is not polluted with build packages.

pbuilder setup

Replace trusty with the desired target distribution

sudo apt-get install pbuilder debootstrap devscripts
sudo pbuilder create --distribution trusty --debootstrapopts --variant=buildd

configure sources.list

sudo echo "deb-src http://ppa.launchpad.net/formorer/icinga/ubuntu trusty main" >> /etc/apt/sources.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 36862847
sudo apt-get update

icinga2

Download sources (to current dir)

sudo apt-get source icinga2

Build package (takes ~1 hour on ODROID U3, adapt -j4 to number of cpus)

sudo pbuilder build --debbuildopts "-j4" icinga2_2.2.4-1~ppa1~trusty1.dsc

icinga-web

sudo apt-get source icinga-web
sudo pbuilder build icinga-web_1.11.2+dfsg1-1~ppa1.dsc

grab results from /var/cache/pbuilder/result/

@simonszu
Copy link

simonszu commented Feb 5, 2018

I get a "keyring file not available" error on raspbian stretch when creating the pbuilder environment, and solved it with a ln -s /usr/share/keyrings/raspbian-archive-keyring.gpg /usr/share/keyrings/debian-archive-keyring.gpg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment