From 3bdbfc791cc1b0afb6002e0ea1a7876861c68b4e Mon Sep 17 00:00:00 2001 From: Martin Winter Date: Mon, 12 Jun 2017 19:32:02 -0700 Subject: [PATCH] debianpkg: Cleanup configure options - Make them configurable (with WANT_xxx env variables) - Adjust defaults to generic package - remove obsolete configure options Signed-off-by: Martin Winter --- debianpkg/backports/ubuntu12.04/debian/rules | 116 +++++++++++++++++-- debianpkg/backports/ubuntu14.04/debian/rules | 116 +++++++++++++++++-- debianpkg/rules | 116 +++++++++++++++++-- 3 files changed, 315 insertions(+), 33 deletions(-) diff --git a/debianpkg/backports/ubuntu12.04/debian/rules b/debianpkg/backports/ubuntu12.04/debian/rules index 34528d54b7..a330bb805f 100755 --- a/debianpkg/backports/ubuntu12.04/debian/rules +++ b/debianpkg/backports/ubuntu12.04/debian/rules @@ -1,5 +1,32 @@ #!/usr/bin/make -f +# FRRouting Configuration options +###################################### +# +# WANT_xxxx --> Set to 1 for enable, 0 for disable +# The following are the defaults. They can be overridden by setting a +# env variable to a different value +# +# export WANT_LDP=1 +# export WANT_PIM=1 +# export WANT_OSPFAPI=1 +# export WANT_TCP_ZEBRA=0 +# export WANT_FPM=0 +# export WANT_BGP_VNC=0 +# export WANT_CUMULUS_MODE=0 +# export WANT_MULTIPATH=1 +# +# 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 +# export MULTIPATH=256 +# +# Set the following to the value required (or leave undefined for the default below) +# WANT_FRR_USER is used for the username and groupname of the FRR user account +# export WANT_FRR_USER=frr +# export WANT_FRR_VTY_GROUP=frrvty +# +#################################### + export DH_VERBOSE=1 export DEB_BUILD_HARDENING=1 export DH_OPTIONS=-v @@ -11,6 +38,74 @@ else $(warning "DEBIAN: SNMP disabled, see README.Debian") endif +ifneq ($(WANT_LDP), 0) + USE_LDP=--enable-ldpd +else + USE_LDP=--disable-ldpd +endif + +ifneq ($(WANT_PIM), 0) + USE_PIM=--enable-pimd +else + USE_PIM=--disable-pimd +endif + +ifneq ($(WANT_OSPFAPI), 0) + USE_OSPFAPI=--enable-ospfapi=yes +else + USE_OSPFAPI=--enable-ospfapi=no +endif + +ifeq ($(WANT_FPM), 1) + USE_FPM=---enable-fpm + ifneq ($(WANT_TCP_ZEBRA),1) + $(warning "Zebra TCP interface enabled for FPM (requirement for FPM)") + export WANT_TCP_ZEBRA=1 + endif +else + USE_FPM=--disable-fpm +endif + +ifeq ($(WANT_TCP_ZEBRA),1) + USE_TCP_ZEBRA=--enable-tcp-zebra +endif + +ifneq ($(WANT_BGP_VNC), 0) + USE_BGP_VNC=--enable-bgp-vnc=yes +else + USE_BGP_VNC=--enable-bgp-vnc=no +endif + +ifndef WANT_FRR_USER + USE_FRR_USER=--enable-user=frr + USE_FRR_GROUP=--enable-group=frr +else + USE_FRR_USER=$(WANT_FRR_USER) + USE_FRR_GROUP=$(WANT_FRR_USER) +endif + +ifndef WANT_FRR_VTY_GROUP + USE_FRR_VTY_GROUP=--enable-vty-group=frrvty +else + USE_FRR_VTY_GROUP=--enable-vty-group=$(WANT_FRR_VTY_GROUP) +endif + +ifneq ($(WANT_MULTIPATH), 0) + ifdef MULTIPATH + USE_MULTIPATH=--enable-multipath=$(MULTIPATH) + else + USE_MULTIPATH=--enable-multipath=256 + endif +else + USE_MULTIPATH=--disable-multipath +endif + +ifeq ($(WANT_CUMULUS_NODE), 1) + USE_CUMULUS=--enable-cumulus=yes +else + USE_CUMULUS=--enable-cumulus=no +endif + ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) DEBIAN_JOBS := $(subst parallel=,,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) endif @@ -38,24 +133,23 @@ override_dh_auto_configure: --sbindir=/usr/lib/frr \ --sysconfdir=/etc/frr \ $(USE_SNMP) \ - --enable-ospfapi=yes \ - --enable-vtysh=yes \ - --enable-isisd=yes \ - --enable-multipath=256 \ - --enable-user=frr \ - --enable-group=frr \ - --enable-vty-group=frrvty \ + $(USE_OSPFAPI) \ + $(USE_MULTIPATH) \ + $(USE_LDP) \ + $(USE_TCP_ZEBRA) \ + $(USE_FPM) \ + $(USE_FRR_USER) $(USE_FRR_GROUP) \ + $(USE_FRR_VTY_GROUP) \ --enable-configfile-mask=0640 \ --enable-logfile-mask=0640 \ --enable-werror \ - --enable-gcc-rdynamic \ --with-libpam \ --enable-systemd=no \ --enable-poll=yes \ - --enable-cumulus=yes \ - --enable-pimd=no \ + $(USE_CUMULUS) \ + $(USE_PIM) \ --enable-dependency-tracking \ - --disable-rr-semantics; \ + $(USE_BGP_VNC); \ fi override_dh_auto_build: diff --git a/debianpkg/backports/ubuntu14.04/debian/rules b/debianpkg/backports/ubuntu14.04/debian/rules index 84d4b177c8..96e2e2b15a 100755 --- a/debianpkg/backports/ubuntu14.04/debian/rules +++ b/debianpkg/backports/ubuntu14.04/debian/rules @@ -1,5 +1,32 @@ #!/usr/bin/make -f +# FRRouting Configuration options +###################################### +# +# WANT_xxxx --> Set to 1 for enable, 0 for disable +# The following are the defaults. They can be overridden by setting a +# env variable to a different value +# +# export WANT_LDP=1 +# export WANT_PIM=1 +# export WANT_OSPFAPI=1 +# export WANT_TCP_ZEBRA=0 +# export WANT_FPM=0 +# export WANT_BGP_VNC=0 +# export WANT_CUMULUS_MODE=0 +# export WANT_MULTIPATH=1 +# +# 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 +# export MULTIPATH=256 +# +# Set the following to the value required (or leave undefined for the default below) +# WANT_FRR_USER is used for the username and groupname of the FRR user account +# export WANT_FRR_USER=frr +# export WANT_FRR_VTY_GROUP=frrvty +# +#################################### + export DH_VERBOSE=1 export DEB_BUILD_HARDENING=1 export DH_OPTIONS=-v @@ -11,6 +38,74 @@ else $(warning "DEBIAN: SNMP disabled, see README.Debian") endif +ifneq ($(WANT_LDP), 0) + USE_LDP=--enable-ldpd +else + USE_LDP=--disable-ldpd +endif + +ifneq ($(WANT_PIM), 0) + USE_PIM=--enable-pimd +else + USE_PIM=--disable-pimd +endif + +ifneq ($(WANT_OSPFAPI), 0) + USE_OSPFAPI=--enable-ospfapi=yes +else + USE_OSPFAPI=--enable-ospfapi=no +endif + +ifeq ($(WANT_FPM), 1) + USE_FPM=---enable-fpm + ifneq ($(WANT_TCP_ZEBRA),1) + $(warning "Zebra TCP interface enabled for FPM (requirement for FPM)") + export WANT_TCP_ZEBRA=1 + endif +else + USE_FPM=--disable-fpm +endif + +ifeq ($(WANT_TCP_ZEBRA),1) + USE_TCP_ZEBRA=--enable-tcp-zebra +endif + +ifneq ($(WANT_BGP_VNC), 0) + USE_BGP_VNC=--enable-bgp-vnc=yes +else + USE_BGP_VNC=--enable-bgp-vnc=no +endif + +ifndef WANT_FRR_USER + USE_FRR_USER=--enable-user=frr + USE_FRR_GROUP=--enable-group=frr +else + USE_FRR_USER=$(WANT_FRR_USER) + USE_FRR_GROUP=$(WANT_FRR_USER) +endif + +ifndef WANT_FRR_VTY_GROUP + USE_FRR_VTY_GROUP=--enable-vty-group=frrvty +else + USE_FRR_VTY_GROUP=--enable-vty-group=$(WANT_FRR_VTY_GROUP) +endif + +ifneq ($(WANT_MULTIPATH), 0) + ifdef MULTIPATH + USE_MULTIPATH=--enable-multipath=$(MULTIPATH) + else + USE_MULTIPATH=--enable-multipath=256 + endif +else + USE_MULTIPATH=--disable-multipath +endif + +ifeq ($(WANT_CUMULUS_NODE), 1) + USE_CUMULUS=--enable-cumulus=yes +else + USE_CUMULUS=--enable-cumulus=no +endif + ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) DEBIAN_JOBS := $(subst parallel=,,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) endif @@ -38,24 +133,23 @@ override_dh_auto_configure: --sbindir=/usr/lib/frr \ --sysconfdir=/etc/frr \ $(USE_SNMP) \ - --enable-ospfapi=yes \ - --enable-vtysh=yes \ - --enable-isisd=yes \ - --enable-multipath=256 \ - --enable-user=frr \ - --enable-group=frr \ - --enable-vty-group=frrvty \ + $(USE_OSPFAPI) \ + $(USE_MULTIPATH) \ + $(USE_LDP) \ + $(USE_TCP_ZEBRA) \ + $(USE_FPM) \ + $(USE_FRR_USER) $(USE_FRR_GROUP) \ + $(USE_FRR_VTY_GROUP) \ --enable-configfile-mask=0640 \ --enable-logfile-mask=0640 \ --enable-werror \ - --enable-gcc-rdynamic \ --with-libpam \ --enable-systemd=no \ --enable-poll=yes \ - --enable-cumulus=yes \ - --enable-pimd=no \ + $(USE_CUMULUS) \ + $(USE_PIM) \ --enable-dependency-tracking \ - --disable-rr-semantics; \ + $(USE_BGP_VNC); \ fi override_dh_auto_build: diff --git a/debianpkg/rules b/debianpkg/rules index 26005f4b52..3d84a37d39 100755 --- a/debianpkg/rules +++ b/debianpkg/rules @@ -1,5 +1,32 @@ #!/usr/bin/make -f +# FRRouting Configuration options +###################################### +# +# WANT_xxxx --> Set to 1 for enable, 0 for disable +# The following are the defaults. They can be overridden by setting a +# env variable to a different value +# +# export WANT_LDP=1 +# export WANT_PIM=1 +# export WANT_OSPFAPI=1 +# export WANT_TCP_ZEBRA=0 +# export WANT_FPM=0 +# export WANT_BGP_VNC=0 +# export WANT_CUMULUS_MODE=0 +# export WANT_MULTIPATH=1 +# +# 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 +# export MULTIPATH=256 +# +# Set the following to the value required (or leave undefined for the default below) +# WANT_FRR_USER is used for the username and groupname of the FRR user account +# export WANT_FRR_USER=frr +# export WANT_FRR_VTY_GROUP=frrvty +# +#################################### + export DH_VERBOSE=1 export DEB_BUILD_HARDENING=1 export DH_OPTIONS=-v @@ -11,6 +38,74 @@ else $(warning "DEBIAN: SNMP disabled, see README.Debian") endif +ifneq ($(WANT_LDP), 0) + USE_LDP=--enable-ldpd +else + USE_LDP=--disable-ldpd +endif + +ifneq ($(WANT_PIM), 0) + USE_PIM=--enable-pimd +else + USE_PIM=--disable-pimd +endif + +ifneq ($(WANT_OSPFAPI), 0) + USE_OSPFAPI=--enable-ospfapi=yes +else + USE_OSPFAPI=--enable-ospfapi=no +endif + +ifeq ($(WANT_FPM), 1) + USE_FPM=---enable-fpm + ifneq ($(WANT_TCP_ZEBRA),1) + $(warning "Zebra TCP interface enabled for FPM (requirement for FPM)") + export WANT_TCP_ZEBRA=1 + endif +else + USE_FPM=--disable-fpm +endif + +ifeq ($(WANT_TCP_ZEBRA),1) + USE_TCP_ZEBRA=--enable-tcp-zebra +endif + +ifneq ($(WANT_BGP_VNC), 0) + USE_BGP_VNC=--enable-bgp-vnc=yes +else + USE_BGP_VNC=--enable-bgp-vnc=no +endif + +ifndef WANT_FRR_USER + USE_FRR_USER=--enable-user=frr + USE_FRR_GROUP=--enable-group=frr +else + USE_FRR_USER=$(WANT_FRR_USER) + USE_FRR_GROUP=$(WANT_FRR_USER) +endif + +ifndef WANT_FRR_VTY_GROUP + USE_FRR_VTY_GROUP=--enable-vty-group=frrvty +else + USE_FRR_VTY_GROUP=--enable-vty-group=$(WANT_FRR_VTY_GROUP) +endif + +ifneq ($(WANT_MULTIPATH), 0) + ifdef MULTIPATH + USE_MULTIPATH=--enable-multipath=$(MULTIPATH) + else + USE_MULTIPATH=--enable-multipath=256 + endif +else + USE_MULTIPATH=--disable-multipath +endif + +ifeq ($(WANT_CUMULUS_NODE), 1) + USE_CUMULUS=--enable-cumulus=yes +else + USE_CUMULUS=--enable-cumulus=no +endif + ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) DEBIAN_JOBS := $(subst parallel=,,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) endif @@ -38,24 +133,23 @@ override_dh_auto_configure: --sbindir=/usr/lib/frr \ --sysconfdir=/etc/frr \ $(USE_SNMP) \ - --enable-ospfapi=yes \ - --enable-vtysh=yes \ - --enable-isisd=yes \ - --enable-multipath=256 \ - --enable-user=frr \ - --enable-group=frr \ - --enable-vty-group=frrvty \ + $(USE_OSPFAPI) \ + $(USE_MULTIPATH) \ + $(USE_LDP) \ + $(USE_TCP_ZEBRA) \ + $(USE_FPM) \ + $(USE_FRR_USER) $(USE_FRR_GROUP) \ + $(USE_FRR_VTY_GROUP) \ --enable-configfile-mask=0640 \ --enable-logfile-mask=0640 \ --enable-werror \ - --enable-gcc-rdynamic \ --with-libpam \ --enable-systemd=yes \ --enable-poll=yes \ - --enable-cumulus=yes \ - --enable-pimd=yes \ + $(USE_CUMULUS) \ + $(USE_PIM) \ --enable-dependency-tracking \ - --enable-bgp-vnc=no; \ + $(USE_BGP_VNC); \ fi override_dh_auto_build: -- 2.39.5