]> git.proxmox.com Git - mirror_frr.git/blame - debianpkg/README.deb_build.md
Merge pull request #1908 from donaldsharp/peer_established
[mirror_frr.git] / debianpkg / README.deb_build.md
CommitLineData
680effc8
MW
1Building your own FRRouting Debian Package
2==========================================
41e41899
MW
3(Tested on Ubuntu 12.04, 14.04, 16.04, 17.10, Debian 8 and 9)
4
5**Note:** If you try to build for a different distro, then it will most likely
6fail because of the missing backport. See debianpkg/backports/README about
7adding a new backport.
680effc8
MW
8
91. Follow the package installation as outlined in doc/Building_on_XXXX.md
10 (XXXX refers your OS Distribution) to install the required build packages
11
122. Install the following additional packages:
13
41e41899 14 apt-get install realpath equivs groff fakeroot debhelper devscripts
680effc8
MW
15
163. Checkout FRR under a **unpriviledged** user account
17
18 git clone https://github.com/frrouting/frr.git frr
41e41899
MW
19 cd frr
20 # git checkout <branch> - if different branch than master
680effc8
MW
21
224. Run Bootstrap and make distribution tar.gz
23
680effc8
MW
24 ./bootstrap.sh
25 ./configure --with-pkg-extra-version=-MyDebPkgVersion
26 make dist
27
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
31
325. Edit `debianpkg/rules` and set the configuration as needed
33
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
37
386. Create backports debian sources
39
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)
44
45 mv debianpkg debian
46 make -f debian/rules backports
47
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
51
41e41899 527. Create a new directory to build the package and populate with package src
680effc8
MW
53
54 mkdir frrpkg
55 cd frrpkg
56 tar xf ~/frr/frr_*.orig.tar.gz
57 cd frr*
58 . /etc/os-release
f8fc6a0c 59 tar xf ~/frr/frr_*${ID}${VERSION_ID}*.debian.tar.xz
680effc8 60
41e41899 618. Build Debian Package Dependencies and install them as needed
680effc8
MW
62
63 sudo mk-build-deps --install debian/control
64
41e41899
MW
659. Build Debian Package
66
67 Building with standard options:
68
69 debuild -b -uc -us
70
71 Or change some options:
72 (see `rules` file for available options)
680effc8 73
100c355e
MW
74 debuild --set-envvar=WANT_BGP_VNC=1 --set-envvar=WANT_CUMULUS_MODE=1 -b -uc -us
75
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
81 found at the same URL
82
680effc8
MW
83DONE.
84
85If 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
87the sources (`frr_*.orig.tar.gz`, `frr_*.debian.tar.xz` and `frr_*.dsc`)
88
89
90Enabling daemons after installation of the package:
91---------------------------------------------------
92
94c0a91c
MW
931. Edit `/etc/frr/daemons` and enable required routing daemons (Zebra is
94probably needed for most deployments, so make sure to enable it.)
680effc8
MW
95
962. Check your firewall / IPtables to make sure the routing protocols are
97allowed.
98
94c0a91c 993. Enable FRR at startup
680effc8 100
94c0a91c
MW
101 - On `init.d` based systems (Ubuntu 12.04)
102
103 sudo update-rc.d frr defaults
104
41e41899 105 - On `systemd` based systems (Debian 8, 9, Ubuntu 14.04, 16.04, 17.10)
94c0a91c
MW
106
107 sudo systemctl enable frr
108
1094. Start/Restart the daemons (or reboot)
110
111 - On `init.d` based systems (Ubuntu 12.04)
112
113 sudo invoke-rc.d frr start
114
41e41899 115 - on `systemd` based systems (Debian 8, 9, Ubuntu 14.04, 16.04, 17.10)
94c0a91c
MW
116
117 sudo systemctl start frr
118
119
120Configuration is stored in `/etc/frr/*.conf` files and daemon selection
121is stored in `/etc/frr/daemons`.