]> git.proxmox.com Git - mirror_frr.git/commitdiff
doc: move rpm build doc to dev docs
authorQuentin Young <qlyoung@cumulusnetworks.com>
Thu, 21 Mar 2019 21:08:52 +0000 (21:08 +0000)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Fri, 22 Mar 2019 16:08:28 +0000 (16:08 +0000)
------------{ <(O.O)> }------------

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Makefile.am
doc/developer/building-frr-for-centos6.rst
doc/developer/building-frr-for-centos7.rst
doc/developer/building-frr-for-fedora24.rst
doc/developer/packaging-debian.rst
doc/developer/packaging-redhat.rst [new file with mode: 0644]
doc/developer/packaging.rst
doc/developer/subdir.am
redhat/README.rpm_build.md [deleted file]

index 6e3c2a418169a502119ef95d7b94e9a70cfe5c17..8797a8e5ff54f2494812f7413313f6aeeb883090 100644 (file)
@@ -181,7 +181,6 @@ EXTRA_DIST += \
        redhat/frr.logrotate \
        redhat/frr.pam \
        redhat/frr.spec \
-       redhat/README.rpm_build.md \
        \
        snapcraft/snapcraft.yaml \
        snapcraft/README.snap_build.md \
index c57573cb9fe2ea7357ae5dbc1b933b7879f8d7a0..fb58d5925ab7ed88a99e5119a0da30fc997b7021 100644 (file)
@@ -1,9 +1,10 @@
+.. _building-centos6:
+
 CentOS 6
 ========================================
 
-(As an alternative to this installation, you may prefer to create a FRR
-rpm package yourself and install that package instead. See instructions
-in redhat/README.rpm\_build.md on how to build a rpm package)
+This document describes installation from source. If you want to build an RPM,
+see :ref:`packaging-redhat`.
 
 Instructions are tested with ``CentOS 6.8`` on ``x86_64`` platform
 
index 8f82cd6c9ab6ab6b8acf6271065ea894fe1d6d66..1cec5f40d67587646f6c500de19c96ef4b266fc1 100644 (file)
@@ -1,9 +1,8 @@
 CentOS 7
 ========================================
 
-(As an alternative to this installation, you may prefer to create a FRR
-rpm package yourself and install that package instead. See instructions
-in redhat/README.rpm\_build.md on how to build a rpm package)
+This document describes installation from source. If you want to build an RPM,
+see :ref:`packaging-redhat`.
 
 CentOS 7 restrictions:
 ----------------------
index 2edf9b3e44915f6d6ee4d9c20f745a267ec1a335..db3fa8256cdf563d7240d9b1d45860fa89050772 100644 (file)
@@ -1,9 +1,8 @@
 Fedora 24
 =========================================
 
-(As an alternative to this installation, you may prefer to create a FRR
-rpm package yourself and install that package instead. See instructions
-in redhat/README.rpm\_build.md on how to build a rpm package)
+This document describes installation from source. If you want to build an RPM,
+see :ref:`packaging-redhat`.
 
 Install required packages
 -------------------------
index c660f986804fc69761bc7c633a4f468988679d2c..b57286d5a1ecd57c36ef5d468866dadc736eedaa 100644 (file)
@@ -1,3 +1,5 @@
+.. _packaging-debian:
+
 Packaging Debian
 ================
 
diff --git a/doc/developer/packaging-redhat.rst b/doc/developer/packaging-redhat.rst
new file mode 100644 (file)
index 0000000..f6b9931
--- /dev/null
@@ -0,0 +1,85 @@
+.. _packaging-redhat:
+
+Packaging Red Hat
+=================
+
+Tested on CentOS 6, CentOS 7 and Fedora 24.
+
+1. On CentOS 6, refer to :ref:`building-centos6` for details on installing
+   sufficiently up-to-date package versions to enable building FRR.
+
+   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 dependencies for your platform. Refer to the
+   platform-specific build documentation on how to do this.
+
+3. Install the following additional packages::
+
+      yum install rpm-build net-snmp-devel pam-devel libcap-devel
+
+   If your platform uses systemd::
+
+      yum install systemd-devel
+
+   If ``yum`` is not present on your system, use ``dnf`` instead.
+
+3. Checkout FRR::
+
+      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::
+
+      The only ``configure`` option respected when building RPMs is
+      ``--with-pkg-extra-version``.
+
+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 :file:`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
+
+If all works correctly, then you should end up with the RPMs under
+:file:`rpmbuild/RPMS` and the source RPM under :file:`rpmbuild/SRPMS`.
index 27e6e155fb1c25f36e9829d663f1b50be30a1bcd..b174a9660c2d206373e40c9dd8bc49f07daeb52c 100644 (file)
@@ -7,3 +7,4 @@ Packaging
 
    maintainer-release-build
    packaging-debian
+   packaging-redhat
index d7699136745fb14f6dedbd96b06edf8acf74b64e..a0c5e6fc9d922b6f41c84c7d5e0ba694e84331e5 100644 (file)
@@ -5,7 +5,6 @@
 dev_RSTFILES = \
        doc/developer/bgp-typecodes.rst \
        doc/developer/bgpd.rst \
-       doc/developer/building-frr-for-openwrt.rst \
        doc/developer/building-frr-for-alpine.rst \
        doc/developer/building-frr-for-centos6.rst \
        doc/developer/building-frr-for-centos7.rst \
@@ -19,6 +18,7 @@ dev_RSTFILES = \
        doc/developer/building-frr-for-netbsd7.rst \
        doc/developer/building-frr-for-omnios.rst \
        doc/developer/building-frr-for-openbsd6.rst \
+       doc/developer/building-frr-for-openwrt.rst \
        doc/developer/building-frr-for-ubuntu1404.rst \
        doc/developer/building-frr-for-ubuntu1604.rst \
        doc/developer/building-frr-for-ubuntu1804.rst \
@@ -37,8 +37,9 @@ dev_RSTFILES = \
        doc/developer/ospf-api.rst \
        doc/developer/ospf-sr.rst \
        doc/developer/ospf.rst \
-       doc/developer/packaging.rst \
        doc/developer/packaging-debian.rst \
+       doc/developer/packaging-redhat.rst
+       doc/developer/packaging.rst \
        doc/developer/testing.rst \
        doc/developer/topotests-snippets.rst \
        doc/developer/topotests.rst \
diff --git a/redhat/README.rpm_build.md b/redhat/README.rpm_build.md
deleted file mode 100644 (file)
index a3f0957..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-Building your own FRRouting RPM
-======================================
-(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`
-
-
-Enabling daemons after installation of the package:
----------------------------------------------------
-
-### init.d based systems (ie CentOS 6):
-
-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 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.
-        
-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 24)
-
-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 frr
-            
-Configuration is stored in `/etc/frr/*.conf` files and daemon selection is stored in `/etc/frr/daemons`.
-