[FRR]: Update frr to frr-7.0.1 (#2899)

* Update frr to frr-7.0.1

* Fix a typo

* Set right permissions on /etc/frr

* Convert external file links from debian to Azure

* Revert python3 fix

* Build frr using more than 1 job

* Add SWIG as dependency for libswss-common
This commit is contained in:
pavel-shirshov 2019-05-16 10:59:12 -07:00 committed by GitHub
parent d67b440c44
commit 1e3b62fe8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 127 additions and 34 deletions

1
.gitmodules vendored
View File

@ -47,6 +47,7 @@
[submodule "src/sonic-frr/frr"] [submodule "src/sonic-frr/frr"]
path = src/sonic-frr/frr path = src/sonic-frr/frr
url = https://github.com/Azure/sonic-frr.git url = https://github.com/Azure/sonic-frr.git
branch = frr/7.0
[submodule "platform/p4/p4-hlir/p4-hlir-v1.1"] [submodule "platform/p4/p4-hlir/p4-hlir-v1.1"]
path = platform/p4/p4-hlir/p4-hlir-v1.1 path = platform/p4/p4-hlir/p4-hlir-v1.1
url = https://github.com/p4lang/p4-hlir.git url = https://github.com/p4lang/p4-hlir.git

View File

@ -13,7 +13,7 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update RUN apt-get update
# Install required packages # Install required packages
RUN apt-get install -y libdbus-1-3 libdaemon0 libjansson4 libc-ares2 iproute2 libpython2.7 libjson-c3 logrotate RUN apt-get install -y libdbus-1-3 libdaemon0 libjansson4 libc-ares2 iproute2 libpython2.7 libjson-c3 logrotate libunwind8
{% if docker_fpm_frr_debs.strip() -%} {% if docker_fpm_frr_debs.strip() -%}
# Copy locally-built Debian package dependencies # Copy locally-built Debian package dependencies
@ -30,6 +30,8 @@ RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return
{%- endfor %} {%- endfor %}
{%- endif %} {%- endif %}
RUN chown -R ${frr_user_uid}:${frr_user_gid} /etc/frr/
# Clean up # Clean up
RUN apt-get clean -y RUN apt-get clean -y
RUN apt-get autoclean -y RUN apt-get autoclean -y

View File

@ -32,6 +32,7 @@ supervisorctl start bgpcfgd
# Start Quagga processes # Start Quagga processes
supervisorctl start zebra supervisorctl start zebra
supervisorctl start staticd
supervisorctl start bgpd supervisorctl start bgpd
if [ "$CONFIG_TYPE" == "unified" ]; then if [ "$CONFIG_TYPE" == "unified" ]; then

View File

@ -39,6 +39,15 @@ startsecs=0
stdout_logfile=syslog stdout_logfile=syslog
stderr_logfile=syslog stderr_logfile=syslog
[program:staticd]
command=/usr/lib/frr/staticd -A 127.0.0.1
priority=4
autostart=false
autorestart=false
startsecs=0
stdout_logfile=syslog
stderr_logfile=syslog
[program:bgpd] [program:bgpd]
command=/usr/lib/frr/bgpd -A 127.0.0.1 command=/usr/lib/frr/bgpd -A 127.0.0.1
priority=5 priority=5

View File

@ -2,7 +2,7 @@
DOCKER_FPM_FRR = docker-fpm-frr.gz DOCKER_FPM_FRR = docker-fpm-frr.gz
$(DOCKER_FPM_FRR)_PATH = $(DOCKERS_PATH)/docker-fpm-frr $(DOCKER_FPM_FRR)_PATH = $(DOCKERS_PATH)/docker-fpm-frr
$(DOCKER_FPM_FRR)_DEPENDS += $(FRR) $(FRR_PYTHONTOOLS) $(SWSS) $(DOCKER_FPM_FRR)_DEPENDS += $(FRR) $(SWSS) $(LIBYANG)
$(DOCKER_FPM_FRR)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_STRETCH) $(DOCKER_FPM_FRR)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_STRETCH)
SONIC_DOCKER_IMAGES += $(DOCKER_FPM_FRR) SONIC_DOCKER_IMAGES += $(DOCKER_FPM_FRR)

View File

@ -1,15 +1,21 @@
# FRRouting (frr) package # FRRouting (frr) package
FRR_VERSION = 6.0.2 FRR_VERSION = 7.0.1
export FRR_VERSION FRR_SUBVERSION = 0
export FRR_VERSION FRR_SUBVERSION
FRR = frr_$(FRR_VERSION)-1~sonic.debian9+1_amd64.deb
$(FRR)_DEPENDS += $(LIBSNMP_DEV) FRR = frr_$(FRR_VERSION)-sonic-$(FRR_SUBVERSION)_amd64.deb
$(FRR)_DEPENDS += $(LIBSNMP_DEV) $(LIBYANG_DEV)
$(FRR)_RDEPENDS += $(LIBYANG)
$(FRR)_SRC_PATH = $(SRC_PATH)/sonic-frr $(FRR)_SRC_PATH = $(SRC_PATH)/sonic-frr
SONIC_MAKE_DEBS += $(FRR) SONIC_MAKE_DEBS += $(FRR)
SONIC_STRETCH_DEBS += $(FRR)
# FRRouting pythontools FRR_PYTHONTOOLS = frr-pythontools_$(FRR_VERSION)-sonic-$(FRR_SUBVERSION)_all.deb
FRR_PYTHONTOOLS = frr-pythontools_$(FRR_VERSION)-1~sonic.debian9+1_amd64.deb $(eval $(call add_derived_package,$(FRR),$(FRR_PYTHONTOOLS)))
$(FRR_PYTHONTOOLS)_DEPENDS += $(LIBSNMP_DEV)
$(FRR_PYTHONTOOLS)_SRC_PATH = $(SRC_PATH)/sonic-frr FRR_DBG = frr-dbgsym_$(FRR_VERSION)-sonic-$(FRR_SUBVERSION)_amd64.deb
SONIC_MAKE_DEBS += $(FRR_PYTHONTOOLS) $(eval $(call add_derived_package,$(FRR),$(FRR_DBG)))
export FRR FRR_PYTHONTOOLS FRR_DBG

20
rules/libyang.mk Normal file
View File

@ -0,0 +1,20 @@
# libyang
LIBYANG_VERSION_BASE = 0.16
LIBYANG_VERSION = $(LIBYANG_VERSION_BASE).105
LIBYANG_SUBVERSION = 1
export LIBYANG_VERSION_BASE
export LIBYANG_VERSION
export LIBYANG_SUBVERSION
LIBYANG = libyang$(LIBYANG_VERSION_BASE)_$(LIBYANG_VERSION)-$(LIBYANG_SUBVERSION)_amd64.deb
$(LIBYANG)_SRC_PATH = $(SRC_PATH)/libyang
$(LIBYANG)_DEPENDS += $(SWIG_BASE) $(SWIG)
SONIC_MAKE_DEBS += $(LIBYANG)
SONIC_STRETCH_DEBS += $(LIBYANG)
LIBYANG_DEV = libyang-dev_$(LIBYANG_VERSION)-$(LIBYANG_SUBVERSION)_amd64.deb
$(eval $(call add_derived_package,$(LIBYANG),$(LIBYANG_DEV)))
export LIBYANG LIBYANG_DEV

22
rules/swig.mk Normal file
View File

@ -0,0 +1,22 @@
# swig
SWIG_VERSION_BASE = 3.0
SWIG_VERSION = $(SWIG_VERSION_BASE).12
SWIG_SUBVERSION = 2
export SWIG_VERSION_BASE
export SWIG_VERSION
export SWIG_SUBVERSION
SWIG_BASE = swig$(SWIG_VERSION_BASE)_$(SWIG_VERSION)-$(SWIG_SUBVERSION)_amd64.deb
$(SWIG_BASE)_SRC_PATH = $(SRC_PATH)/swig
SONIC_MAKE_DEBS += $(SWIG_BASE)
SONIC_STRETCH_DEBS += $(SWIG_BASE)
SWIG = swig_$(SWIG_VERSION)-$(SWIG_SUBVERSION)_amd64.deb
$(eval $(call add_derived_package,$(SWIG_BASE),$(SWIG)))
SWIG_DBG = swig$(SWIG_VERSION_BASE)-dbgsym_$(SWIG_VERSION)-$(SWIG_SUBVERSION)_amd64.deb
$(eval $(call add_derived_package,$(SWIG_BASE),$(SWIG_DBG)))
export SWIG_BASE SWIG SWIG_DBG

View File

@ -4,7 +4,7 @@ LIBSWSSCOMMON = libswsscommon_1.0.0_amd64.deb
$(LIBSWSSCOMMON)_SRC_PATH = $(SRC_PATH)/sonic-swss-common $(LIBSWSSCOMMON)_SRC_PATH = $(SRC_PATH)/sonic-swss-common
$(LIBSWSSCOMMON)_DEPENDS += $(LIBHIREDIS_DEV) $(LIBNL3_DEV) $(LIBNL_GENL3_DEV) \ $(LIBSWSSCOMMON)_DEPENDS += $(LIBHIREDIS_DEV) $(LIBNL3_DEV) $(LIBNL_GENL3_DEV) \
$(LIBNL_ROUTE3_DEV) $(LIBNL_NF3_DEV) \ $(LIBNL_ROUTE3_DEV) $(LIBNL_NF3_DEV) \
$(LIBNL_CLI_DEV) $(LIBNL_CLI_DEV) $(SWIG)
$(LIBSWSSCOMMON)_RDEPENDS += $(LIBHIREDIS) $(LIBNL3) $(LIBNL_GENL3) \ $(LIBSWSSCOMMON)_RDEPENDS += $(LIBHIREDIS) $(LIBNL3) $(LIBNL_GENL3) \
$(LIBNL_ROUTE3) $(LIBNL_NF3) $(LIBNL_CLI) $(LIBNL_ROUTE3) $(LIBNL_NF3) $(LIBNL_CLI)
SONIC_DPKG_DEBS += $(LIBSWSSCOMMON) SONIC_DPKG_DEBS += $(LIBSWSSCOMMON)

View File

@ -62,6 +62,11 @@ RUN apt-get update && apt-get install -y \
libjson-c-dev \ libjson-c-dev \
libsystemd-dev \ libsystemd-dev \
python-ipaddr \ python-ipaddr \
libcmocka-dev \
python3-all-dev \
python3-all-dbg \
install-info \
logrotate \
# For libnl3 (local) build # For libnl3 (local) build
cdbs \ cdbs \
# For SAI meta build # For SAI meta build
@ -109,7 +114,6 @@ RUN apt-get update && apt-get install -y \
dpatch \ dpatch \
libdb-dev \ libdb-dev \
iptables-dev \ iptables-dev \
swig \
ctags \ ctags \
# For mellanox sai build # For mellanox sai build
libtool-bin \ libtool-bin \

21
src/libyang/Makefile Normal file
View File

@ -0,0 +1,21 @@
.ONESHELL:
SHELL = /bin/bash
.SHELLFLAGS += -e
MAIN_TARGET = $(LIBYANG)
DERIVED_TARGETS = $(LIBYANG_DEV)
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
rm -fr ./libyang-$(LIBYANG_VERSION)
wget -O libyang_$(LIBYANG_VERSION).orig.tar.gz 'https://sonicstorage.blob.core.windows.net/packages/libyang_0.16.105.orig.tar.gz?sv=2015-04-05&sr=b&sig=yTWDhl6B9TTXWAQ46zpLiNxUib61W7U0%2F%2FGvhRibKOc%3D&se=2046-09-30T22%3A10%3A27Z&sp=r'
wget -O libyang_$(LIBYANG_VERSION).dsc 'https://sonicstorage.blob.core.windows.net/packages/libyang_0.16.105-1.dsc?sv=2015-04-05&sr=b&sig=eLkO5wzB1C5oKNIaUPro4gwrgEC3EygIO6eCyTzHmeI%3D&se=2046-09-30T22%3A10%3A12Z&sp=r'
wget -O libyang_$(LIBYANG_VERSION)-$(LIBYANG_SUBVERSION).debian.tar.xz 'https://sonicstorage.blob.core.windows.net/packages/libyang_0.16.105-1.debian.tar.xz?sv=2015-04-05&sr=b&sig=AH18p7pKK0xIBVxZuA8EMv9%2FhXbCFKmbWAn7Za8%2BZW4%3D&se=2046-09-30T22%3A09%3A36Z&sp=r'
dpkg-source -x libyang_$(LIBYANG_VERSION).dsc
pushd ./libyang-$(LIBYANG_VERSION)
dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS)
popd
mv $(DERIVED_TARGETS) $* $(DEST)/
$(addprefix $(DEST)/, $(DERIVED_TARGETS)): $(DEST)/% : $(DEST)/$(MAIN_TARGET)

View File

@ -17,7 +17,7 @@ DEBIAN_FILE_URL = $(LLDP_URL)/$(DEBIAN_FILE)
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
# Remove any stale files # Remove any stale files
rm -rf ./lldpd rm -rf lldpd-$(LLDPD_VERSION)
# download debian LLDPDD # download debian LLDPDD
wget -NO "$(DSC_FILE)" $(DSC_FILE_URL) wget -NO "$(DSC_FILE)" $(DSC_FILE_URL)

View File

@ -2,29 +2,15 @@
SHELL = /bin/bash SHELL = /bin/bash
.SHELLFLAGS += -e .SHELLFLAGS += -e
MAIN_TARGET = frr_$(FRR_VERSION)-1~sonic.debian9+1_amd64.deb MAIN_TARGET = $(FRR)
TOOLS_TARGET = frr-pythontools_$(FRR_VERSION)-1~sonic.debian9+1_amd64.deb DERIVED_TARGET = $(FRR_PYTHONTOOLS) $(FRR_DBG)
MAIN_TARGET_DBG = frr-dbgsym_$(FRR_VERSION)-1~sonic.debian9+1_amd64.deb
DERIVED_TARGET = $(TOOLS_TARGET) $(MAIN_TARGET_DBG)
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
# Build the package # Build the package
pushd ./frr pushd ./frr
tools/tarsource.sh -V -e '-sonic'
# This could very well be tools/tarsource.sh -V -e sonic dpkg-buildpackage -rfakeroot -b -us -uc -Ppkg.frr.nortrlib -j$(SONIC_CONFIG_MAKE_JOBS)
tools/tarsource.sh -V popd
# This is a no-op but here in case the changelog stops being a symlink
debchange -b -v $(FRR_VERSION)-1~sonic.debian9+1 'SONiC FRR debian package build'
sudo apt-get -y install install-info
dpkg-buildpackage -rfakeroot -b -us -uc -Ppkg.frr.nortrlib
cd ..
mv frr_$(FRR_VERSION)-*_amd64.deb $(MAIN_TARGET)
mv frr-pythontools_$(FRR_VERSION)-*_all.deb $(TOOLS_TARGET)
mv frr-dbgsym_$(FRR_VERSION)-*_amd64.deb $(MAIN_TARGET_DBG)
mv $(DERIVED_TARGET) $* $(DEST)/ mv $(DERIVED_TARGET) $* $(DEST)/
popd
$(addprefix $(DEST)/, $(DERIVED_TARGET)): $(DEST)/% : $(DEST)/$(MAIN_TARGET) $(addprefix $(DEST)/, $(DERIVED_TARGET)): $(DEST)/% : $(DEST)/$(MAIN_TARGET)

@ -1 +1 @@
Subproject commit 5a35fd375978dd7fce99c4b8ba84b0cdd1f32ac3 Subproject commit cd305c0973be0baa1173e09f9d72e096c03e7e7e

21
src/swig/Makefile Normal file
View File

@ -0,0 +1,21 @@
.ONESHELL:
SHELL = /bin/bash
.SHELLFLAGS += -e
MAIN_TARGET = $(SWIG_BASE)
DERIVED_TARGETS = $(SWIG) $(SWIG_DBG)
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
rm -fr ./swig-$(SWIG_VERSION) *.deb
wget -O swig_$(SWIG_VERSION).orig.tar.gz 'https://sonicstorage.blob.core.windows.net/packages/swig_3.0.12.orig.tar.gz?sv=2015-04-05&sr=b&sig=kcSKFvlTQZst8Dbb8MUfckGbVEZU5sptFqT2HbwOUtA%3D&se=2046-09-30T22%3A11%3A59Z&sp=r'
wget -O swig_$(SWIG_VERSION).dsc 'https://sonicstorage.blob.core.windows.net/packages/swig_3.0.12-2.dsc?sv=2015-04-05&sr=b&sig=k3eLfmWgmCz1Kx8SYcirX18FSQdJ76ifo%2B9rbJBnrf8%3D&se=2046-09-30T22%3A11%3A45Z&sp=r'
wget -O swig_$(SWIG_VERSION)-$(SWIG_SUBVERSION).debian.tar.xz 'https://sonicstorage.blob.core.windows.net/packages/swig_3.0.12-2.debian.tar.xz?sv=2015-04-05&sr=b&sig=SQICTE%2BR1BO7npUBNwTQjo447OaFz%2BooX6VAm912c7g%3D&se=2046-09-30T22%3A11%3A32Z&sp=r'
dpkg-source -x swig_$(SWIG_VERSION).dsc
pushd ./swig-$(SWIG_VERSION)
dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS)
popd
mv $(DERIVED_TARGETS) $* $(DEST)/
$(addprefix $(DEST)/, $(DERIVED_TARGETS)): $(DEST)/% : $(DEST)/$(MAIN_TARGET)