]> git.proxmox.com Git - mirror_frr.git/blob - debianpkg/README.deb_build.md
Merge pull request #1869 from opensourcerouting/frr-reload-vnc-fix
[mirror_frr.git] / debianpkg / README.deb_build.md
1 Building your own FRRouting Debian Package
2 ==========================================
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
6 fail because of the missing backport. See debianpkg/backports/README about
7 adding a new backport.
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
14 apt-get install realpath equivs groff fakeroot debhelper devscripts
15
16 3. Checkout FRR under a **unpriviledged** user account
17
18 git clone https://github.com/frrouting/frr.git frr
19 cd frr
20 # git checkout <branch> - if different branch than master
21
22 4. Run Bootstrap and make distribution tar.gz
23
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
32 5. 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
38 6. 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
52 7. Create a new directory to build the package and populate with package src
53
54 mkdir frrpkg
55 cd frrpkg
56 tar xf ~/frr/frr_*.orig.tar.gz
57 cd frr*
58 . /etc/os-release
59 tar xf ~/frr/frr_*${ID}${VERSION_ID}*.debian.tar.xz
60
61 8. Build Debian Package Dependencies and install them as needed
62
63 sudo mk-build-deps --install debian/control
64
65 9. 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)
73
74 export WANT_BGP_VNC=1
75 export WANT_CUMULUS_MODE=1
76 debuild -b -uc -us
77
78 DONE.
79
80 If all works correctly, then you should end up with the Debian packages under
81 `frrpkg`. If distributed, please make sure you distribute it together with
82 the sources (`frr_*.orig.tar.gz`, `frr_*.debian.tar.xz` and `frr_*.dsc`)
83
84
85 Enabling daemons after installation of the package:
86 ---------------------------------------------------
87
88 1. Edit `/etc/frr/daemons` and enable required routing daemons (Zebra is
89 probably needed for most deployments, so make sure to enable it.)
90
91 2. Check your firewall / IPtables to make sure the routing protocols are
92 allowed.
93
94 3. Enable FRR at startup
95
96 - On `init.d` based systems (Ubuntu 12.04)
97
98 sudo update-rc.d frr defaults
99
100 - On `systemd` based systems (Debian 8, 9, Ubuntu 14.04, 16.04, 17.10)
101
102 sudo systemctl enable frr
103
104 4. Start/Restart the daemons (or reboot)
105
106 - On `init.d` based systems (Ubuntu 12.04)
107
108 sudo invoke-rc.d frr start
109
110 - on `systemd` based systems (Debian 8, 9, Ubuntu 14.04, 16.04, 17.10)
111
112 sudo systemctl start frr
113
114
115 Configuration is stored in `/etc/frr/*.conf` files and daemon selection
116 is stored in `/etc/frr/daemons`.