1 Building your own FRRouting Debian Package
2 ==========================================
3 (Tested on Ubuntu 12.04, 14.04, 16.04, 17.10, Debian 8 and 9)
5 **Note:** If you try to build for a different distro, then it will most likely
6 fail because of the missing backport. See debianpkg/backports/README about
9 1. Follow the package installation as outlined in doc/Building_on_XXXX.md
10 (XXXX refers your OS Distribution) to install the required build packages
12 2. Install the following additional packages:
14 apt-get install realpath equivs groff fakeroot debhelper devscripts
16 3. Checkout FRR under a **unpriviledged** user account
18 git clone https://github.com/frrouting/frr.git frr
20 # git checkout <branch> - if different branch than master
22 4. Run Bootstrap and make distribution tar.gz
25 ./configure --with-pkg-extra-version=-MyDebPkgVersion
28 Note: configure parameters are not important for the Debian Package
29 building - except the `with-pkg-extra-version` if you want to give the
30 Debian Package a specific name to mark your own unoffical build
32 5. Edit `debianpkg/rules` and set the configuration as needed
34 Look for section `dh_auto_configure` to modify the configure
35 options as needed. Options might be different between main `rules` and
36 `backports/XXXX/debian/rules`. Please adjust as needed on all files
38 6. Create backports debian sources
40 Move the `debianpkg` to `debian` and create the backports
41 (Debian requires to not ship a `debian` directory inside the source
42 directory to avoid build conflicts with the reserved `debian` subdirectory
43 name during the build)
46 make -f debian/rules backports
48 This will create a `frr_*.orig.tar.gz` with the source (same as dist tar),
49 and multiple `frr_*.debian.tar.xz` and `frr_*.dsc` for the debian package
50 source on each backport supported distribution
52 7. Create a new directory to build the package and populate with package src
56 tar xf ~/frr/frr_*.orig.tar.gz
59 tar xf ~/frr/frr_*${ID}${VERSION_ID}*.debian.tar.xz
61 8. Build Debian Package Dependencies and install them as needed
63 sudo mk-build-deps --install debian/control
65 9. Build Debian Package
67 Building with standard options:
71 Or change some options:
72 (see `rules` file for available options)
74 debuild --set-envvar=WANT_BGP_VNC=1 --set-envvar=WANT_CUMULUS_MODE=1 -b -uc -us
76 To build with RPKI, download the librtr packages from
77 https://ci1.netdef.org/browse/RPKI-RTRLIB/latestSuccessful/artifact
78 install librtr-dev on the build server and build the packages as
79 debuild --set-envvar=WANT_RPKI=1 -b -uc -us
80 RPKI packages have an additonal dependency of librtr0 which can be
85 If all works correctly, then you should end up with the Debian packages under
86 `frrpkg`. If distributed, please make sure you distribute it together with
87 the sources (`frr_*.orig.tar.gz`, `frr_*.debian.tar.xz` and `frr_*.dsc`)
90 Enabling daemons after installation of the package:
91 ---------------------------------------------------
93 1. Edit `/etc/frr/daemons` and enable required routing daemons (Zebra is
94 probably needed for most deployments, so make sure to enable it.)
96 2. Check your firewall / IPtables to make sure the routing protocols are
99 3. Enable FRR at startup
101 - On `init.d` based systems (Ubuntu 12.04)
103 sudo update-rc.d frr defaults
105 - On `systemd` based systems (Debian 8, 9, Ubuntu 14.04, 16.04, 17.10)
107 sudo systemctl enable frr
109 4. Start/Restart the daemons (or reboot)
111 - On `init.d` based systems (Ubuntu 12.04)
113 sudo invoke-rc.d frr start
115 - on `systemd` based systems (Debian 8, 9, Ubuntu 14.04, 16.04, 17.10)
117 sudo systemctl start frr
120 Configuration is stored in `/etc/frr/*.conf` files and daemon selection
121 is stored in `/etc/frr/daemons`.