Merge pull request #1970 from opensourcerouting/1804-master

Ubuntu 18.04 Package support and docs (Master branch)
This commit is contained in:
Donald Sharp 2018-03-27 15:30:10 -04:00 committed by GitHub
commit 70c50c4316
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 249 additions and 7 deletions

View File

@ -33,6 +33,10 @@ EXTRA_DIST = README.Debian README.Maintainer \
backports/ubuntu17.10/debian/source/format \
backports/ubuntu17.10/exclude \
backports/ubuntu17.10/versionext \
backports/ubuntu18.04/debian/control \
backports/ubuntu18.04/debian/source/format \
backports/ubuntu18.04/exclude \
backports/ubuntu18.04/versionext \
frr-doc.docs frr-doc.info frr-doc.install \
frr-doc.lintian-overrides frr.conf \
frr-dbg.lintian-overrides \

View File

@ -1,6 +1,6 @@
Building your own FRRouting Debian Package
==========================================
(Tested on Ubuntu 12.04, 14.04, 16.04, 17.10, Debian 8 and 9)
(Tested on Ubuntu 12.04, 14.04, 16.04, 17.10, 18.04, Debian 8 and 9)
**Note:** If you try to build for a different distro, then it will most likely
fail because of the missing backport. See debianpkg/backports/README about
@ -11,8 +11,14 @@ adding a new backport.
2. Install the following additional packages:
on Ubuntu 12.04, 14.04, 16.04, 17.10, Debian 8 and 9:
apt-get install realpath equivs groff fakeroot debhelper devscripts
on Ubuntu 18.04: (realpath is now part of preinstalled by coreutils)
apt-get install equivs groff fakeroot debhelper devscripts
3. Checkout FRR under a **unpriviledged** user account
git clone https://github.com/frrouting/frr.git frr
@ -102,7 +108,7 @@ allowed.
sudo update-rc.d frr defaults
- On `systemd` based systems (Debian 8, 9, Ubuntu 14.04, 16.04, 17.10)
- On `systemd` based systems (Debian 8 and later, Ubuntu 14.04 and later)
sudo systemctl enable frr
@ -112,7 +118,7 @@ allowed.
sudo invoke-rc.d frr start
- on `systemd` based systems (Debian 8, 9, Ubuntu 14.04, 16.04, 17.10)
- on `systemd` based systems (Debian 8 and later, Ubuntu 14.04 and later)
sudo systemctl start frr

View File

@ -0,0 +1,54 @@
Source: frr
Section: net
Priority: optional
Maintainer: Nobody <nobody@frrouting.org>
Uploaders: Nobody <nobody@frrouting.org>
XSBC-Original-Maintainer: <maintainers@frrouting.org>
Build-Depends: debhelper (>= 7.0.50~), libncurses5-dev, libreadline-dev, texlive-latex-base, texlive-generic-recommended, libpam0g-dev | libpam-dev, libcap-dev, texinfo (>= 4.7), imagemagick, ghostscript, groff, autotools-dev, libpcre3-dev, gawk, chrpath, libsnmp-dev, git, dh-autoreconf, libjson-c-dev, libjson-c2 | libjson-c3, dh-systemd, libsystemd-dev, bison, flex, libc-ares-dev, pkg-config, python (>= 2.7), python-ipaddr, python-sphinx
Standards-Version: 3.9.6
Homepage: http://www.frrouting.org/
Package: frr
Architecture: any
Depends: ${shlibs:Depends}, logrotate (>= 3.2-11), iproute2 | iproute, ${misc:Depends}, libc-ares2
Pre-Depends: adduser
Conflicts: zebra, zebra-pj, quagga
Replaces: zebra, zebra-pj
Suggests: snmpd
Description: BGP/OSPF/RIP/RIPng/ISIS/PIM/LDP routing daemon forked from Quagga
FRR is free software which manages TCP/IP based routing protocols.
It supports BGP4, BGP4+, OSPFv2, OSPFv3, IS-IS, RIPv1, RIPv2, RIPng,
PIM and LDP as well as the IPv6 versions of these.
.
FRR is a fork of Quagga with an open community model. The main git
lives on https://github.com/frrouting/frr.git
Package: frr-dbg
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, frr (= ${binary:Version})
Priority: optional
Section: debug
Description: BGP/OSPF/RIP/RIPng/ISIS/PIM/LDP routing daemon (debug symbols)
This package provides debugging symbols for all binary packages built
from frr source package. It's highly recommended to have this package
installed before reporting any FRR crashes to either FRR developers or
Debian package maintainers.
Package: frr-doc
Section: net
Architecture: all
Depends: ${misc:Depends}
Suggests: frr
Description: BGP/OSPF/RIP/RIPng/ISIS/PIM/LDP routing daemon (documentation)
This package includes info files for frr, a free software which manages
TCP/IP based routing protocols. It supports BGP4, BGP4+, OSPFv2, OSPFv3,
IS-IS, RIPv1, RIPv2, RIPng, PIM and LDP as well as the IPv6 versions of these.
Package: frr-pythontools
Section: net
Architecture: all
Depends: ${misc:Depends}, frr (= ${binary:Version}), python (>= 2.7), python-ipaddr
Description: BGP/OSPF/RIP/RIPng/ISIS/PIM/LDP routing daemon (Python Tools)
This package includes info files for frr, a free software which manages
TCP/IP based routing protocols. It supports BGP4, BGP4+, OSPFv2, OSPFv3,
IS-IS, RIPv1, RIPv2, RIPng, PIM and LDP as well as the IPv6 versions of these.

View File

@ -0,0 +1 @@
3.0 (quilt)

View File

View File

@ -0,0 +1 @@
-1~ubuntu18.04+1

View File

@ -2,3 +2,4 @@ frr: non-dev-pkg-with-shlib-symlink usr/lib/libfrrospfapiclient.so.0.0.0 usr/lib
frr: non-dev-pkg-with-shlib-symlink usr/lib/libfrr.so.0.0.0 usr/lib/libfrr.so
frr: non-dev-pkg-with-shlib-symlink usr/lib/libfrrfpm_pb.so.0.0.0 usr/lib/libfrrfpm_pb.so
frr: package-name-doesnt-match-sonames libfrr0 libfrrfpm-pb0 libfrrospfapiclient0
frr: systemd-service-file-refers-to-unusual-wantedby-target lib/systemd/system/frr.service network-online.target

View File

@ -12,7 +12,8 @@ frrvtygid=`egrep "^frrvty:" $GROUPFILE | awk -F ":" '{ print $3 }'`
[ -n ${frrgid} ] || (echo "No gid for frr in ${GROUPFILE}" && /bin/false)
[ -n ${frrVTYgid} ] || (echo "No gid for frrvty in ${GROUPFILE}" && /bin/false)
chown -R ${frruid}:${frrgid} /etc/frr
chown ${frruid}:${frrgid} /etc/frr
chown ${frruid}:${frrgid} /etc/frr/*
touch /etc/frr/vtysh.conf
chgrp ${frrvtygid} /etc/frr/vtysh*
chmod 644 /etc/frr/*

View File

@ -39,14 +39,16 @@ if [ "$1" = "install" ]; then
# Logfiles are group readable in case users were put into the frr group.
d=/var/log/frr/
mkdir -p $d
chown -R frr:frr $d
chown frr:frr $d
chown --quiet frr:frr $d/* | true
chmod u=rwx,go=rx $d
find $d -type f -print0 | xargs -0 --no-run-if-empty chmod u=rw,g=r,o=
# Strict permissions for the sockets.
d=/var/run/frr/
mkdir -p $d
chown -R frr:frr $d
chown frr:frr $d
chown --quiet frr:frr $d/* | true
chmod u=rwx,go=rx $d
find $d -type f -print0 | xargs -0 --no-run-if-empty chmod u=rw,go=

View File

@ -205,7 +205,7 @@ override_dh_systemd_enable:
# backports
SRCPKG = frr
KNOWN_BACKPORTS = debian8 debian9 ubuntu12.04 ubuntu14.04 ubuntu16.04 ubuntu17.10
KNOWN_BACKPORTS = debian8 debian9 ubuntu12.04 ubuntu14.04 ubuntu16.04 ubuntu17.10 ubuntu18.04
DEBIAN_VERSION := $(shell dh_testdir && \
dpkg-parsechangelog -c1 < debian/changelog | \
sed -rn 's/^Version: ?//p')

View File

@ -163,6 +163,7 @@ EXTRA_DIST = frr-sphinx.mk \
developer/building-frr-on-ubuntu1204.rst \
developer/building-frr-on-ubuntu1404.rst \
developer/building-frr-on-ubuntu1604.rst \
developer/building-frr-on-ubuntu1804.rst \
developer/building.rst \
developer/cli.rst \
developer/conf.py \

View File

@ -0,0 +1,171 @@
Ubuntu 18.04LTS
===============================================
Install required packages
-------------------------
Add packages:
::
apt-get install git autoconf automake libtool make gawk libreadline-dev \
texinfo pkg-config libpam0g-dev libjson-c-dev bison flex \
python-pytest libc-ares-dev python3-dev libsystemd-dev python-ipaddr \
python3-sphinx
Get FRR, compile it and install it (from Git)
---------------------------------------------
**This assumes you want to build and install FRR from source and not
using any packages**
Add frr groups and user
~~~~~~~~~~~~~~~~~~~~~~~
::
sudo groupadd -g 92 frr
sudo groupadd -r -g 85 frrvty
sudo adduser --system --ingroup frr --home /var/run/frr/ \
--gecos "FRR suite" --shell /sbin/nologin frr
sudo usermod -a -G frrvty frr
Download Source, configure and compile it
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(You may prefer different options on configure statement. These are just
an example.)
::
git clone https://github.com/frrouting/frr.git frr
cd frr
./bootstrap.sh
./configure \
--prefix=/usr \
--enable-exampledir=/usr/share/doc/frr/examples/ \
--localstatedir=/var/run/frr \
--sbindir=/usr/lib/frr \
--sysconfdir=/etc/frr \
--enable-pimd \
--enable-watchfrr \
--enable-ospfclient=yes \
--enable-ospfapi=yes \
--enable-multipath=64 \
--enable-user=frr \
--enable-group=frr \
--enable-vty-group=frrvty \
--enable-configfile-mask=0640 \
--enable-logfile-mask=0640 \
--enable-rtadv \
--enable-fpm \
--enable-systemd=yes \
--with-pkg-git-version \
--with-pkg-extra-version=-MyOwnFRRVersion
make
make check
sudo make install
Create empty FRR configuration files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::
sudo install -m 755 -o frr -g frr -d /var/log/frr
sudo install -m 775 -o frr -g frrvty -d /etc/frr
sudo install -m 640 -o frr -g frr /dev/null /etc/frr/zebra.conf
sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf
sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf
sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf
sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf
sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf
sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf
sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf
sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf
sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf
sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf
Enable IPv4 & IPv6 forwarding
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the
other settings)
::
# Uncomment the next line to enable packet forwarding for IPv4
net.ipv4.ip_forward=1
# Uncomment the next line to enable packet forwarding for IPv6
# Enabling this option disables Stateless Address Autoconfiguration
# based on Router Advertisements for this host
net.ipv6.conf.all.forwarding=1
Enable MPLS Forwarding (with Linux Kernel >= 4.5)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Edit ``/etc/sysctl.conf`` and the following lines. Make sure to add a
line equal to ``net.mpls.conf.eth0.input`` or each interface used with
MPLS
::
# Enable MPLS Label processing on all interfaces
net.mpls.conf.eth0.input=1
net.mpls.conf.eth1.input=1
net.mpls.conf.eth2.input=1
net.mpls.platform_labels=100000
Add MPLS kernel modules
~~~~~~~~~~~~~~~~~~~~~~~
Add the following lines to ``/etc/modules-load.d/modules.conf``:
::
# Load MPLS Kernel Modules
mpls-router
mpls-iptunnel
**Reboot** or use ``sysctl -p`` to apply the same config to the running
system
Install the systemd service (if rebooted from last step, change directory back to frr directory)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::
sudo install -m 644 tools/frr.service /etc/systemd/system/frr.service
sudo install -m 644 tools/etc/default/frr /etc/default/frr
sudo install -m 644 tools/etc/frr/daemons /etc/frr/daemons
sudo install -m 644 tools/etc/frr/daemons.conf /etc/frr/daemons.conf
sudo install -m 644 tools/etc/frr/frr.conf /etc/frr/frr.conf
sudo install -m 644 -o frr -g frr tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf
Enable daemons
~~~~~~~~~~~~~~
| Edit ``/etc/frr/daemons`` and change the value from "no" to "yes" for
those daemons you want to start by systemd.
| For example.
::
zebra=yes
bgpd=yes
ospfd=yes
ospf6d=yes
ripd=yes
ripngd=yes
isisd=yes
Enable the systemd service
~~~~~~~~~~~~~~~~~~~~~~~~~~
- systemctl enable frr
Start the systemd service
~~~~~~~~~~~~~~~~~~~~~~~~~
- systemctl start frr
- use ``systemctl status frr`` to check its status.