]> git.proxmox.com Git - mirror_frr.git/blobdiff - redhat/README.rpm_build.md
zebra: Convert socket interface to use `union sockunion`
[mirror_frr.git] / redhat / README.rpm_build.md
index db3c7d45c83f8e97702ee86a67fc83d7a2d45902..a3f095786d817f11cdc93450982dd0ffadcca0e3 100644 (file)
@@ -1,74 +1,82 @@
-Building your own FreeRangeRouting RPM
+Building your own FRRouting RPM
 ======================================
-(Tested on CentOS 6, CentOS 7 and Fedora 22.)
-
-1. Install the following packages to build the RPMs:
-
-               yum install git autoconf automake libtool make gawk readline-devel \
-               texinfo dejagnu net-snmp-devel groff rpm-build net-snmp-devel \
-               libcap-devel texi2html
-
-       (use `dnf install` on new Fedora instead of `yum install        `)
-       
-2. Checkout FRR under a **unpriviledged** user account
-
-               git clone https://github.com/freerangerouting/frr.git frr
-
-3. Run Bootstrap and make distribution tar.gz
-
-               cd frr
-               ./bootstrap.sh
-               ./configure --with-pkg-extra-version=-MyRPMVersion
-               make dist
-                       
-       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
-       mark your own unoffical build
-
-4. Create RPM directory structure and populate with sources
-
-               mkdir rpmbuild
-               mkdir rpmbuild/SOURCES
-               mkdir rpmbuild/SPECS
-               cp redhat/*.spec rpmbuild/SPECS/
-               cp frr*.tar.gz rpmbuild/SOURCES/
-
-5. Edit rpm/SPECS/frr.spec with configuration as needed
-       Look at the beginning of the file and adjust the following parameters to enable
-       or disable features as required:
-       
-               ################# frr configure options ####################
-               # with-feature options
-        %{!?with_snmp:         %global  with_snmp       1 }
-        %{!?with_vtysh:        %global  with_vtysh      1 }
-        %{!?with_ospf_te:      %global  with_ospf_te    1 }
-               %{!?with_opaque_lsa:   %global  with_opaque_lsa 1 }
-               %{!?with_tcp_zebra:        %global  with_tcp_zebra  0 }
-               %{!?with_vtysh:        %global  with_vtysh      1 }
-               %{!?with_pam:          %global  with_pam        1 }
-        %{!?with_ospfclient:   %global  with_ospfclient 1 }
-               %{!?with_ospfapi:      %global  with_ospfapi    1 }
-               %{!?with_irdp:         %global  with_irdp       1 }
-               %{!?with_rtadv:        %global  with_rtadv      1 }
-               %{!?with_isisd:        %global  with_isisd      1 }
-               %{!?with_pimd:         %global  with_pimd       1 }
-               %{!?with_mpls:         %global  with_mpls       0 }
-               %{!?with_ldpd:         %global  with_ldpd       0 }
-               %{!?with_shared:       %global  with_shared     1 }
-               %{!?with_multipath:    %global  with_multipath  64 }
-               %{!?frr_user:          %global  frr_user        frr }
-               %{!?vty_group:         %global  vty_group       frrvt }
-               %{!?with_fpm:          %global  with_fpm        0 }
-               %{!?with_watchfrr:     %global  with_watchfrr   1 }
-
-6. Build the RPM
-
-               rpmbuild --define "_topdir `pwd`/rpmbuild" -ba rpmbuild/SPECS/frr.spec
+(Tested on CentOS 6, CentOS 7 and Fedora 24.)
+
+1. On CentOS 6 (which doesn't provide a bison/automake/autoconf of a recent enough version):
+    - Check out ../doc/developer/building-frr-for-centos6.rst for details on installing
+    a bison/automake/autoconf to support frr building.
+
+    Newer automake/autoconf/bison is only needed to build the rpm and is
+    **not** needed to install the binary rpm package
+
+2. Install the build packages as documented in doc/developer/building-frr-for-xxxxx.rst and the following additional packages:
+
+        yum install rpm-build net-snmp-devel pam-devel libcap-devel
+
+    Additionally, on systems with systemd (CentOS 7, Fedora)
+
+        yum install systemd-devel
+
+    (use `dnf install` on new Fedora instead of `yum install`)
+
+3. Checkout FRR under a **unpriviledged** user account
+
+        git clone https://github.com/frrouting/frr.git frr
+
+4. Run Bootstrap and make distribution tar.gz
+
+        cd frr
+        ./bootstrap.sh
+        ./configure --with-pkg-extra-version=-MyRPMVersion \
+            SPHINXBUILD=sphinx-build2.7
+        make dist
+            
+    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
+    mark your own unoffical build
+
+5. Create RPM directory structure and populate with sources
+
+        mkdir rpmbuild
+        mkdir rpmbuild/SOURCES
+        mkdir rpmbuild/SPECS
+        cp redhat/*.spec rpmbuild/SPECS/
+        cp frr*.tar.gz rpmbuild/SOURCES/
+
+6. Edit rpm/SPECS/frr.spec with configuration as needed
+    Look at the beginning of the file and adjust the following parameters to enable or disable features as required:
+    
+        ############### FRRouting (FRR) configure options #################
+        # with-feature options
+        %{!?with_pam:           %global  with_pam           0 }
+        %{!?with_ospfclient:    %global  with_ospfclient    1 }
+        %{!?with_ospfapi:       %global  with_ospfapi       1 }
+        %{!?with_irdp:          %global  with_irdp          1 }
+        %{!?with_rtadv:         %global  with_rtadv         1 }
+        %{!?with_ldpd:          %global  with_ldpd          1 }
+        %{!?with_nhrpd:         %global  with_nhrpd         1 }
+        %{!?with_eigrp:         %global  with_eigrpd        1 }
+        %{!?with_shared:        %global  with_shared        1 }
+        %{!?with_multipath:     %global  with_multipath     256 }
+        %{!?frr_user:           %global  frr_user           frr }
+        %{!?vty_group:          %global  vty_group          frrvty }
+        %{!?with_fpm:           %global  with_fpm           0 }
+        %{!?with_watchfrr:      %global  with_watchfrr      1 }
+        %{!?with_bgp_vnc:       %global  with_bgp_vnc       0 }
+        %{!?with_pimd:          %global  with_pimd          1 }
+        %{!?with_rpki:          %global  with_rpki          0 }
+
+7. Build the RPM
+
+        rpmbuild --define "_topdir `pwd`/rpmbuild" -ba rpmbuild/SPECS/frr.spec
+
+   If building with RPKI, then download and install the additional RPKI
+   packages from
+        https://ci1.netdef.org/browse/RPKI-RTRLIB/latestSuccessful/artifact
 
 DONE.
 
-If all works correctly, then you should end up with the RPMs under `rpmbuild/RPMS`
-and the Source RPM under `rpmbuild/SRPMS`
+If all works correctly, then you should end up with the RPMs under 
+`rpmbuild/RPMS` and the Source RPM under `rpmbuild/SRPMS`
 
 
 Enabling daemons after installation of the package:
@@ -76,55 +84,36 @@ Enabling daemons after installation of the package:
 
 ### init.d based systems (ie CentOS 6):
 
-1. Enable the daemons as needed to run after boot (Zebra is mandatory)
-       
-               chkconfig zebra on
-               chkconfig ospfd on
-               chkconfig ospf6d on
-               chkconfig bgpd on
-               ... etc
+1. Edit /etc/frr/daemons and enable required routing daemons (Zebra is probably needed for most deployments, so make sure to enable it.)
 
-2. If you want to run `watchfrr`, then configure `/etc/sysconfig/frr` 
-   and uncomment the line with the daemons for `watchfrr` to monitor,
-   then enable watchfrr
-
-               chkconfig watchfrr on
+2. Enable the daemons as needed to run after boot (Zebra is mandatory)
+    
+        chkconfig frr on
 
 3. Check your firewall / IPtables to make sure the routing protocols are
 allowed.
-               
-4. Start the daemons (or reboot)
-
-               service zebra start
-               service bgpd start
-               service ospfd start
-               ... etc
-                       
-Configuration is stored in `/etc/frr/*.conf` files.
+        
+5. Start the FRR daemons (or reboot)
 
+        service frr start
+            
+Configuration is stored in `/etc/frr/*.conf` files and daemon selection is stored in `/etc/frr/daemons`.
 
-### systemd based systems (ie CentOS 7, Fedora 22)
 
-1. Enable the daemons as needed to run after boot (Zebra is mandatory)
-       
-               systemctl enable zebra
-               systemctl enable ospfd
-               systemctl enable ospf6d
-               systemctl enable bgpd
-               ... etc
+### systemd based systems (ie CentOS 7, Fedora 24)
 
-       Note: There is no watchfrr on systemd based systems. Systemd contains
-       the functionality of monitoring and restarting daemons.
+1. Edit /etc/frr/daemons and enable required routing daemons (Zebra is probably needed for most deployments, so make sure to enable it.)
+2. Enable the frr daemons to run after boot.
+    
+        systemctl enable frr
 
 2. Check your firewall / IPtables to make sure the routing protocols are
 allowed.
-               
+        
 3. Start the daemons (or reboot)
 
-               systemctl start zebra
-               systemctl start bgpd
-               systemctl start ospfd
-               ... etc
-                       
-Configuration is stored in `/etc/frr/*.conf` files.
+        systemctl start frr
+            
+Configuration is stored in `/etc/frr/*.conf` files and daemon selection is stored in `/etc/frr/daemons`.