Merge pull request #3996 from qlyoung/doc-move-rpm-to-devdocs

move rpm build doc to devdocs
This commit is contained in:
David Lamparter 2019-03-23 14:22:49 +01:00 committed by GitHub
commit cdec5d956b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 100 additions and 132 deletions

View 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 \

View 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

View 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:
----------------------

View 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
-------------------------

View File

@ -1,3 +1,5 @@
.. _packaging-debian:
Packaging Debian
================

View File

@ -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`.

View File

@ -7,3 +7,4 @@ Packaging
maintainer-release-build
packaging-debian
packaging-redhat

View 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 \

View File

@ -371,7 +371,7 @@ system in which submissions from an individual representing one company should
be merged by someone unaffiliated with that company.
Guidelines for code review
""""""""""""""""""""""""""
--------------------------
- As a rule of thumb, the depth of the review should be proportional to the
scope and / or impact of the patch.

View File

@ -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`.