]>
Commit | Line | Data |
---|---|---|
680effc8 MW |
1 | Building your own FRRouting Debian Package |
2 | ========================================== | |
54c310b8 | 3 | (Tested on Ubuntu 12.04, 14.04, 16.04, 17.10, 18.04, Debian 8 and 9) |
41e41899 MW |
4 | |
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 | |
7 | adding a new backport. | |
680effc8 MW |
8 | |
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 | |
11 | ||
12 | 2. Install the following additional packages: | |
13 | ||
66bca1df MW |
14 | on Ubuntu 12.04, 14.04, 16.04, 17.10, Debian 8 and 9: |
15 | ||
41e41899 | 16 | apt-get install realpath equivs groff fakeroot debhelper devscripts |
680effc8 | 17 | |
66bca1df MW |
18 | on Ubuntu 18.04: (realpath is now part of preinstalled by coreutils) |
19 | ||
20 | apt-get install equivs groff fakeroot debhelper devscripts | |
21 | ||
680effc8 MW |
22 | 3. Checkout FRR under a **unpriviledged** user account |
23 | ||
24 | git clone https://github.com/frrouting/frr.git frr | |
41e41899 MW |
25 | cd frr |
26 | # git checkout <branch> - if different branch than master | |
680effc8 MW |
27 | |
28 | 4. Run Bootstrap and make distribution tar.gz | |
29 | ||
680effc8 MW |
30 | ./bootstrap.sh |
31 | ./configure --with-pkg-extra-version=-MyDebPkgVersion | |
32 | make dist | |
33 | ||
34 | Note: configure parameters are not important for the Debian Package | |
35 | building - except the `with-pkg-extra-version` if you want to give the | |
36 | Debian Package a specific name to mark your own unoffical build | |
37 | ||
38 | 5. Edit `debianpkg/rules` and set the configuration as needed | |
39 | ||
40 | Look for section `dh_auto_configure` to modify the configure | |
41 | options as needed. Options might be different between main `rules` and | |
42 | `backports/XXXX/debian/rules`. Please adjust as needed on all files | |
43 | ||
44 | 6. Create backports debian sources | |
45 | ||
46 | Move the `debianpkg` to `debian` and create the backports | |
47 | (Debian requires to not ship a `debian` directory inside the source | |
48 | directory to avoid build conflicts with the reserved `debian` subdirectory | |
49 | name during the build) | |
50 | ||
51 | mv debianpkg debian | |
52 | make -f debian/rules backports | |
53 | ||
54 | This will create a `frr_*.orig.tar.gz` with the source (same as dist tar), | |
55 | and multiple `frr_*.debian.tar.xz` and `frr_*.dsc` for the debian package | |
56 | source on each backport supported distribution | |
57 | ||
41e41899 | 58 | 7. Create a new directory to build the package and populate with package src |
680effc8 MW |
59 | |
60 | mkdir frrpkg | |
61 | cd frrpkg | |
62 | tar xf ~/frr/frr_*.orig.tar.gz | |
63 | cd frr* | |
64 | . /etc/os-release | |
f8fc6a0c | 65 | tar xf ~/frr/frr_*${ID}${VERSION_ID}*.debian.tar.xz |
680effc8 | 66 | |
41e41899 | 67 | 8. Build Debian Package Dependencies and install them as needed |
680effc8 MW |
68 | |
69 | sudo mk-build-deps --install debian/control | |
70 | ||
41e41899 MW |
71 | 9. Build Debian Package |
72 | ||
73 | Building with standard options: | |
74 | ||
75 | debuild -b -uc -us | |
76 | ||
77 | Or change some options: | |
78 | (see `rules` file for available options) | |
680effc8 | 79 | |
100c355e MW |
80 | debuild --set-envvar=WANT_BGP_VNC=1 --set-envvar=WANT_CUMULUS_MODE=1 -b -uc -us |
81 | ||
82 | To build with RPKI, download the librtr packages from | |
83 | https://ci1.netdef.org/browse/RPKI-RTRLIB/latestSuccessful/artifact | |
84 | install librtr-dev on the build server and build the packages as | |
85 | debuild --set-envvar=WANT_RPKI=1 -b -uc -us | |
86 | RPKI packages have an additonal dependency of librtr0 which can be | |
87 | found at the same URL | |
88 | ||
680effc8 MW |
89 | DONE. |
90 | ||
91 | If all works correctly, then you should end up with the Debian packages under | |
92 | `frrpkg`. If distributed, please make sure you distribute it together with | |
93 | the sources (`frr_*.orig.tar.gz`, `frr_*.debian.tar.xz` and `frr_*.dsc`) | |
94 | ||
95 | ||
96 | Enabling daemons after installation of the package: | |
97 | --------------------------------------------------- | |
98 | ||
94c0a91c MW |
99 | 1. Edit `/etc/frr/daemons` and enable required routing daemons (Zebra is |
100 | probably needed for most deployments, so make sure to enable it.) | |
680effc8 MW |
101 | |
102 | 2. Check your firewall / IPtables to make sure the routing protocols are | |
103 | allowed. | |
104 | ||
94c0a91c | 105 | 3. Enable FRR at startup |
680effc8 | 106 | |
94c0a91c MW |
107 | - On `init.d` based systems (Ubuntu 12.04) |
108 | ||
109 | sudo update-rc.d frr defaults | |
110 | ||
54c310b8 | 111 | - On `systemd` based systems (Debian 8 and later, Ubuntu 14.04 and later) |
94c0a91c MW |
112 | |
113 | sudo systemctl enable frr | |
114 | ||
115 | 4. Start/Restart the daemons (or reboot) | |
116 | ||
117 | - On `init.d` based systems (Ubuntu 12.04) | |
118 | ||
119 | sudo invoke-rc.d frr start | |
120 | ||
54c310b8 | 121 | - on `systemd` based systems (Debian 8 and later, Ubuntu 14.04 and later) |
94c0a91c MW |
122 | |
123 | sudo systemctl start frr | |
124 | ||
125 | ||
126 | Configuration is stored in `/etc/frr/*.conf` files and daemon selection | |
127 | is stored in `/etc/frr/daemons`. |