(Tested on Ubuntu 14.04, 16.04, 17.10, 18.04, Debian jessie, stretch and buster.)
Install the Debian packaging tools:
sudo apt install fakeroot debhelper devscripts
Checkout FRR under an unprivileged user account:
git clone https://github.com/frrouting/frr.git frr cd frr
If you wish to build a package for a branch other than master:
git checkout <branch>
Install build dependencies using the mk-build-deps tool from the devscripts package:
sudo mk-build-deps --install debian/control
Alternatively, you can manually install build dependencies for your platform as outlined in Building FRR.
This script sets up the
debian/changelog-autofile with proper version information.
(optional) Append a distribution identifier if needed (see below under Multi-Distribution builds.)
Build Debian Package:
Where $options may contain any or all of the following items:
build profiles specified with
-Ppkg.frr.nortrlib,pkg.frr.nosystemd. Multiple values are separated by commas and there must not be a space after the
The following build profiles are currently available:
Profile Negation Effect pkg.frr.rtrlib pkg.frr.nortrlib builds frr-rpki-rtrlib package (or not) n/a pkg.frr.nosystemd removes libsystemd dependency and disables unit file installation
pkg.frr.nosystemdoption is only intended to support Ubuntu 14.04 (and should be enabled when building for that.)
-uc -usoptions to disable signing the packages with your GPG key
(git builds of the master or stable/X.X branches won’t be signed by default since their target release is set to
If all worked correctly, then you should end up with the Debian packages in the parent directory of where debuild ran. If distributed, please make sure you distribute it together with the sources (
A package created from master or stable/X.X is slightly different from
a package created from the debian branch. The changelog for the former
is autogenerated and sets the Debian revision to
-0, which causes an
intentional lintian warning. The debian branch on the other hand has
a manually maintained changelog that contains proper Debian release
Furthermore, official Debian packages are built in
3.0 (quilt) format
with an “orig” tarball and a “debian” tarball. These tarballs are created
tarsource.sh tool on any branch. The git repository however
3.0 (git) source format specifier to easily allow direct
You can optionally append a distribution identifier in case you want to make multiple versions of the package available in the same repository. Do the following after creating the changelog with tarsource.sh:
dch -l '~deb8u' 'build for Debian 8 (jessie)' dch -l '~deb9u' 'build for Debian 9 (stretch)' dch -l '~ubuntu14.04.' 'build for Ubuntu 14.04 (trusty)' dch -l '~ubuntu16.04.' 'build for Ubuntu 16.04 (xenial)' dch -l '~ubuntu18.04.' 'build for Ubuntu 18.04 (bionic)'
Between building packages for specific distributions, the only difference in the package itself lies in the automatically generated shared library dependencies, e.g. libjson-c2 or libjson-c3. This means that the architecture independent packages should not have a suffix appended. Also, the current Debian testing/unstable releases should not have any suffix appended.
For example, at the end of 2018 (i.e.
buster/Debian 10 is the current
“testing” release), the following is a complete list of .deb files for
Debian 8, 9 and 10 packages for FRR 6.0.1-1 with RPKI support:
frr_6.0.1-1_amd64.deb frr_6.0.1-1~deb8u1_amd64.deb frr_6.0.1-1~deb9u1_amd64.deb frr-dbg_6.0.1-1_amd64.deb frr-dbg_6.0.1-1~deb8u1_amd64.deb frr-dbg_6.0.1-1~deb9u1_amd64.deb frr-rpki-rtrlib_6.0.1-1_amd64.deb frr-rpki-rtrlib_6.0.1-1~deb8u1_amd64.deb frr-rpki-rtrlib_6.0.1-1~deb9u1_amd64.deb frr-doc_6.0.1-1_all.deb frr-pythontools_6.0.1-1_all.deb
Note that there are no extra versions of the frr-doc and frr-pythontools
packages (because they are for architecture
amd64), and the
version for Debian 10 does not have a
Do not use the
- character in the version suffix. The last
the version number is the separator between upstream version and Debian
6.0.1-1~foobar-2 means upstream version
2. This is not what you want.
The only allowed characters in the Debian version are
0-9 A-Z a-z + . ~
The separating character for the suffix must be the tilde (
because the tilde is ordered in version-comparison before the empty
string. That means the order of the above packages is the following:
6.0.1-1 newer than
6.0.1-1~deb9u1 newer than
If you use another character (e.g.
+), the untagged version will be
regarded as the “oldest”!