]> git.proxmox.com Git - mirror_frr.git/blame - redhat/README.rpm_build.md
eigrpd: eigrp usage of uint32_t to struct in_addr for router_id data
[mirror_frr.git] / redhat / README.rpm_build.md
CommitLineData
447a8fe9 1Building your own FRRouting RPM
c115e4a4 2======================================
3630ef2d 3(Tested on CentOS 6, CentOS 7 and Fedora 24.)
f755bf6d 4
f9e0332e 51. On CentOS 6 (which doesn't provide a bison/automake/autoconf of a recent enough version):
a1884235 6 - Check out ../doc/developer/building-frr-for-centos6.rst for details on installing
f9e0332e
MW
7 a bison/automake/autoconf to support frr building.
8
9 Newer automake/autoconf/bison is only needed to build the rpm and is
10 **not** needed to install the binary rpm package
11
a1884235 122. Install the build packages as documented in doc/developer/building-frr-for-xxxxx.rst and the following additional packages:
f755bf6d 13
a1884235 14 yum install rpm-build net-snmp-devel pam-devel libcap-devel
58f20b90
MW
15
16 Additionally, on systems with systemd (CentOS 7, Fedora)
17
18 yum install systemd-devel
f755bf6d 19
94c00335 20 (use `dnf install` on new Fedora instead of `yum install`)
58f20b90 21
f9e0332e 223. Checkout FRR under a **unpriviledged** user account
f755bf6d 23
94c00335 24 git clone https://github.com/frrouting/frr.git frr
f755bf6d 25
f9e0332e 264. Run Bootstrap and make distribution tar.gz
f755bf6d 27
94c00335
MW
28 cd frr
29 ./bootstrap.sh
a214288c
DL
30 ./configure --with-pkg-extra-version=-MyRPMVersion \
31 SPHINXBUILD=sphinx-build2.7
32 make dist
94c00335
MW
33
34 Note: configure parameters are not important for the RPM building - except the `with-pkg-extra-version` if you want to give the RPM a specific name to
35 mark your own unoffical build
f755bf6d 36
f9e0332e 375. Create RPM directory structure and populate with sources
f755bf6d 38
94c00335
MW
39 mkdir rpmbuild
40 mkdir rpmbuild/SOURCES
41 mkdir rpmbuild/SPECS
42 cp redhat/*.spec rpmbuild/SPECS/
43 cp frr*.tar.gz rpmbuild/SOURCES/
f755bf6d 44
f9e0332e 456. Edit rpm/SPECS/frr.spec with configuration as needed
94c00335
MW
46 Look at the beginning of the file and adjust the following parameters to enable or disable features as required:
47
f9e0332e 48 ############### FRRouting (FRR) configure options #################
94c00335 49 # with-feature options
f9e0332e
MW
50 %{!?with_pam: %global with_pam 0 }
51 %{!?with_ospfclient: %global with_ospfclient 1 }
52 %{!?with_ospfapi: %global with_ospfapi 1 }
53 %{!?with_irdp: %global with_irdp 1 }
54 %{!?with_rtadv: %global with_rtadv 1 }
55 %{!?with_ldpd: %global with_ldpd 1 }
5a76db68
MW
56 %{!?with_nhrpd: %global with_nhrpd 1 }
57 %{!?with_eigrp: %global with_eigrpd 1 }
f9e0332e
MW
58 %{!?with_shared: %global with_shared 1 }
59 %{!?with_multipath: %global with_multipath 256 }
60 %{!?frr_user: %global frr_user frr }
61 %{!?vty_group: %global vty_group frrvty }
62 %{!?with_fpm: %global with_fpm 0 }
63 %{!?with_watchfrr: %global with_watchfrr 1 }
64 %{!?with_bgp_vnc: %global with_bgp_vnc 0 }
65 %{!?with_pimd: %global with_pimd 1 }
c8cd451c 66 %{!?with_rpki: %global with_rpki 0 }
f9e0332e
MW
67
687. Build the RPM
f755bf6d 69
94c00335 70 rpmbuild --define "_topdir `pwd`/rpmbuild" -ba rpmbuild/SPECS/frr.spec
f755bf6d 71
c8cd451c
MW
72 If building with RPKI, then download and install the additional RPKI
73 packages from
74 https://ci1.netdef.org/browse/RPKI-RTRLIB/latestSuccessful/artifact
75
f755bf6d
MW
76DONE.
77
94c00335
MW
78If all works correctly, then you should end up with the RPMs under
79`rpmbuild/RPMS` and the Source RPM under `rpmbuild/SRPMS`
f755bf6d
MW
80
81
82Enabling daemons after installation of the package:
83---------------------------------------------------
84
85### init.d based systems (ie CentOS 6):
86
3630ef2d 871. Edit /etc/frr/daemons and enable required routing daemons (Zebra is probably needed for most deployments, so make sure to enable it.)
f755bf6d 88
3630ef2d
MW
892. Enable the daemons as needed to run after boot (Zebra is mandatory)
90
91 chkconfig frr on
f755bf6d
MW
92
933. Check your firewall / IPtables to make sure the routing protocols are
94allowed.
94c00335 95
3630ef2d 965. Start the FRR daemons (or reboot)
f755bf6d 97
3630ef2d 98 service frr start
94c00335 99
3630ef2d 100Configuration is stored in `/etc/frr/*.conf` files and daemon selection is stored in `/etc/frr/daemons`.
f755bf6d
MW
101
102
3630ef2d 103### systemd based systems (ie CentOS 7, Fedora 24)
f755bf6d 104
3630ef2d
MW
1051. Edit /etc/frr/daemons and enable required routing daemons (Zebra is probably needed for most deployments, so make sure to enable it.)
106
1072. Enable the frr daemons to run after boot.
94c00335 108
3630ef2d 109 systemctl enable frr
f755bf6d
MW
110
1112. Check your firewall / IPtables to make sure the routing protocols are
112allowed.
94c00335 113
f755bf6d
MW
1143. Start the daemons (or reboot)
115
3630ef2d 116 systemctl start frr
94c00335 117
3630ef2d 118Configuration is stored in `/etc/frr/*.conf` files and daemon selection is stored in `/etc/frr/daemons`.
f755bf6d 119