debianpkg: create frr-snmp and frr-rpki-rtrlib

This splits off SNMP and RPKI support so that users can install these
packages (with the appropriate dependencies) independently of main FRR.
It also obsoletes out the weird multi-variant package distribution we've
been doing for RPKI support.

The snmpd dependency is also changed to Recommends: on frr-snmp since
the frr-snmp package is essentially useless without snmpd.

Signed-off-by: David Lamparter <equinox@diac24.net>
This commit is contained in:
David Lamparter 2018-10-03 19:14:27 +02:00
parent 679e826ac0
commit 3b2a8d2546
8 changed files with 96 additions and 31 deletions

View File

@ -22,6 +22,36 @@ which itself is a fork of Zebra.
Zebra was developed by Kunihiro Ishiguro.
* Build Profiles used in the upstream debianpkg/
================================================
The following Build Profiles have been added:
- pkg.frr.rtrlib (pkg.frr.nortrlib)
controls whether the RPKI module is built.
Will be enabled by default at some point, adds some extra dependencies.
- pkg.frr.snmp (pkg.frr.nosnmp)
controls whether the SNMP module is built, see below for license issues.
Will remain default-off as long as the license issue persists.
- pkg.frr.nosystemd
Disables both systemd unit file installation as well as watchfrr sd_notify
support at startup. Removes libsystemd dependency.
Note that all options have a "no" form; if you want to have your decision
be sticky regardless of changes to what it defaults to, then always use one
of the two. For example, all occurrences of <pkg.frr.rtrlib> will at some
point be replaced with <!pkg.frr.nortrlib>.
The main frr package has the exact same contents regardless of rtrlib or snmp
choices. The options only control frr-snmp and frr-rpki-rtrlib packages.
The main frr package does NOT have the same contents if pkg.frr.nosystemd is
used. This option should only be used for systems that do not have systemd,
e.g. Ubuntu 14.04.
* Why has SNMP support been disabled?
=====================================
FRR used to link against the NetSNMP libraries to provide SNMP
@ -43,9 +73,7 @@ during the last days before the Sarge release :-(
It is allowed by the used licence mix that you fetch the sources and
build FRR yourself with SNMP with
<remove the "grep ^smux" block at the end of debian/frr.preinst>
# export WANT_SNMP=1
# apt-get -b source frr
# apt-get -b source -Ppkg.frr.snmp frr
Just distributing it in binary form, linked against OpenSSL, is forbidden.

View File

@ -23,7 +23,9 @@ Build-Depends:
libpcre3-dev,
libpython-dev | libpython3-dev,
libreadline-dev,
libsnmp-dev,
librtr-dev <pkg.frr.rtrlib>,
libsnmp-dev <pkg.frr.snmp>,
libssh-dev <pkg.frr.rtrlib>,
libsystemd-dev <!pkg.frr.nosystemd>,
pkg-config,
python (>= 2.7) | python3,
@ -42,7 +44,6 @@ Depends:
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,
@ -51,6 +52,31 @@ Description: BGP/OSPF/RIP/RIPng/ISIS/PIM/LDP routing daemon forked from Quagga
FRR is a fork of Quagga with an open community model. The main git
lives on https://github.com/frrouting/frr.git
Package: frr-snmp
Section: net
Architecture: any
Depends:
${misc:Depends},
${shlibs:Depends},
frr (= ${binary:Version})
Recommends: snmpd
Description: FRRouting SNMP support
Adds SNMP support to FRR's daemons by attaching to net-snmp's snmpd
through the AgentX protocol.
Build-Profiles: <pkg.frr.snmp>
Package: frr-rpki-rtrlib
Section: net
Architecture: any
Depends:
${misc:Depends},
${shlibs:Depends},
frr (= ${binary:Version})
Description: FRRouting RTRlib RPKI support
Adds RPKI support to FRR's bgpd, allowing validation of BGP routes against
cryptographic information stored in WHOIS databases.
Build-Profiles: <pkg.frr.rtrlib>
Package: frr-dbg
Architecture: any
Depends:

View File

@ -0,0 +1 @@
usr/lib/frr/modules/bgpd_rpki.so

View File

@ -0,0 +1,6 @@
usr/lib/libfrrsnmp.*
usr/lib/frr/modules/bgpd_snmp.so
usr/lib/frr/modules/ospfd_snmp.so
usr/lib/frr/modules/ospf6d_snmp.so
usr/lib/frr/modules/ripd_snmp.so
usr/lib/frr/modules/zebra_snmp.so

View File

@ -0,0 +1 @@
frr: package-name-doesnt-match-sonames libfrrsnmp0

View File

@ -2,7 +2,12 @@ etc/frr/
usr/bin/vtysh
usr/bin/mtracebis
usr/include/frr/
usr/lib/
usr/lib/libfrr.*
usr/lib/libfrrospfapiclient.*
usr/lib/frr/*d
usr/lib/frr/watchfrr
usr/lib/frr/zebra
usr/lib/frr/modules/zebra_irdp.so
usr/share/doc/frr/
usr/share/man/
usr/share/yang/

View File

@ -14,19 +14,8 @@ WANT_OSPFAPI ?= 1
WANT_BGP_VNC ?= 1
WANT_CUMULUS_MODE ?= 0
WANT_MULTIPATH ?= 1
WANT_SNMP ?= 0
WANT_RPKI ?= 0
# NOTES:
#
# If you use WANT_RPKI, then there is a new dependency for librtr0 package
# and a build dependency of the librtr-dev package.
# While the librtr0 is added to the depenencies automatically, the build
# dependency can't be changed dynamically and building will fail if the
# librtr-dev isn't installed during package build
# Tested versions of both packages can be found at
# https://ci1.netdef.org/browse/RPKI-RTRLIB/latestSuccessful/artifact
#
# If multipath is enabled (WANT_MULTIPATH=1), then set number of multipaths here
# Please be aware that 0 is NOT disabled, but treated as unlimited
@ -49,14 +38,6 @@ export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DH_OPTIONS=-v
ifeq ($(WANT_SNMP), 1)
USE_SNMP=--enable-snmp
$(warning "DEBIAN: SNMP enabled, sorry for your inconvenience")
else
USE_SNMP=--disable-snmp
$(warning "DEBIAN: SNMP disabled, see README.Debian")
endif
ifeq ($(WANT_OSPFAPI), 1)
USE_OSPFAPI=--enable-ospfapi=yes
else
@ -85,18 +66,16 @@ else
USE_CUMULUS=--enable-cumulus=no
endif
ifeq ($(WANT_RPKI), 1)
USE_RPKI=--enable-rpki
else
USE_RPKI=--disable-rpki
endif
ifeq ($(WANT_WERROR), 1)
USE_WERROR=--enable-werror
else
USE_WERROR=--disable-werror
endif
#
# generic debian options
#
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
DEBIAN_JOBS := $(subst parallel=,,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
endif
@ -105,6 +84,22 @@ ifdef DEBIAN_JOBS
MAKEFLAGS += -j$(DEBIAN_JOBS)
endif
#
# build profiles
#
ifeq ($(filter pkg.frr.rtrlib,$(DEB_BUILD_PROFILES)),)
USE_RPKI=--disable-rpki
else
USE_RPKI=--enable-rpki
endif
ifeq ($(filter pkg.frr.snmp,$(DEB_BUILD_PROFILES)),)
USE_SNMP=--disable-snmp
else
USE_SNMP=--enable-snmp
endif
ifeq ($(filter pkg.frr.nosystemd,$(DEB_BUILD_PROFILES)),)
DH_WITH_SYSTEMD=systemd,
USE_SYSTEMD=--enable-systemd=yes

View File

@ -21,6 +21,9 @@ EXTRA_DIST += \
debianpkg/frr-doc.install \
debianpkg/frr-doc.lintian-overrides \
debianpkg/frr-pythontools.install \
debianpkg/frr-rpki-rtrlib.install \
debianpkg/frr-snmp.install \
debianpkg/frr-snmp.lintian-overrides \
debianpkg/frr.conf \
debianpkg/frr.dirs \
debianpkg/frr.docs \