Skip to content

Commit

Permalink
[FRR]: Update frr to frr-7.0.1 (#2899)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
pavel-shirshov authored May 16, 2019
1 parent d67b440 commit 1e3b62f
Show file tree
Hide file tree
Showing 15 changed files with 127 additions and 34 deletions.
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
[submodule "src/sonic-frr/frr"]
path = src/sonic-frr/frr
url = https://github.com/Azure/sonic-frr.git
branch = frr/7.0
[submodule "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
Expand Down
4 changes: 3 additions & 1 deletion dockers/docker-fpm-frr/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update

# 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() -%}
# Copy locally-built Debian package dependencies
Expand All @@ -30,6 +30,8 @@ RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return
{%- endfor %}
{%- endif %}

RUN chown -R ${frr_user_uid}:${frr_user_gid} /etc/frr/

# Clean up
RUN apt-get clean -y
RUN apt-get autoclean -y
Expand Down
1 change: 1 addition & 0 deletions dockers/docker-fpm-frr/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ supervisorctl start bgpcfgd

# Start Quagga processes
supervisorctl start zebra
supervisorctl start staticd
supervisorctl start bgpd

if [ "$CONFIG_TYPE" == "unified" ]; then
Expand Down
9 changes: 9 additions & 0 deletions dockers/docker-fpm-frr/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ startsecs=0
stdout_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]
command=/usr/lib/frr/bgpd -A 127.0.0.1
priority=5
Expand Down
2 changes: 1 addition & 1 deletion rules/docker-fpm-frr.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

DOCKER_FPM_FRR = docker-fpm-frr.gz
$(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)
SONIC_DOCKER_IMAGES += $(DOCKER_FPM_FRR)

Expand Down
24 changes: 15 additions & 9 deletions rules/frr.mk
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
# FRRouting (frr) package

FRR_VERSION = 6.0.2
export FRR_VERSION
FRR_VERSION = 7.0.1
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
SONIC_MAKE_DEBS += $(FRR)
SONIC_STRETCH_DEBS += $(FRR)

FRR_PYTHONTOOLS = frr-pythontools_$(FRR_VERSION)-sonic-$(FRR_SUBVERSION)_all.deb
$(eval $(call add_derived_package,$(FRR),$(FRR_PYTHONTOOLS)))

FRR_DBG = frr-dbgsym_$(FRR_VERSION)-sonic-$(FRR_SUBVERSION)_amd64.deb
$(eval $(call add_derived_package,$(FRR),$(FRR_DBG)))

# FRRouting pythontools
FRR_PYTHONTOOLS = frr-pythontools_$(FRR_VERSION)-1~sonic.debian9+1_amd64.deb
$(FRR_PYTHONTOOLS)_DEPENDS += $(LIBSNMP_DEV)
$(FRR_PYTHONTOOLS)_SRC_PATH = $(SRC_PATH)/sonic-frr
SONIC_MAKE_DEBS += $(FRR_PYTHONTOOLS)
export FRR FRR_PYTHONTOOLS FRR_DBG
20 changes: 20 additions & 0 deletions rules/libyang.mk
Original file line number Diff line number Diff line change
@@ -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 changes: 22 additions & 0 deletions rules/swig.mk
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion rules/swss-common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ LIBSWSSCOMMON = libswsscommon_1.0.0_amd64.deb
$(LIBSWSSCOMMON)_SRC_PATH = $(SRC_PATH)/sonic-swss-common
$(LIBSWSSCOMMON)_DEPENDS += $(LIBHIREDIS_DEV) $(LIBNL3_DEV) $(LIBNL_GENL3_DEV) \
$(LIBNL_ROUTE3_DEV) $(LIBNL_NF3_DEV) \
$(LIBNL_CLI_DEV)
$(LIBNL_CLI_DEV) $(SWIG)
$(LIBSWSSCOMMON)_RDEPENDS += $(LIBHIREDIS) $(LIBNL3) $(LIBNL_GENL3) \
$(LIBNL_ROUTE3) $(LIBNL_NF3) $(LIBNL_CLI)
SONIC_DPKG_DEBS += $(LIBSWSSCOMMON)
Expand Down
6 changes: 5 additions & 1 deletion sonic-slave-stretch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ RUN apt-get update && apt-get install -y \
libjson-c-dev \
libsystemd-dev \
python-ipaddr \
libcmocka-dev \
python3-all-dev \
python3-all-dbg \
install-info \
logrotate \
# For libnl3 (local) build
cdbs \
# For SAI meta build
Expand Down Expand Up @@ -109,7 +114,6 @@ RUN apt-get update && apt-get install -y \
dpatch \
libdb-dev \
iptables-dev \
swig \
ctags \
# For mellanox sai build
libtool-bin \
Expand Down
21 changes: 21 additions & 0 deletions src/libyang/Makefile
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion src/lldpd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ DEBIAN_FILE_URL = $(LLDP_URL)/$(DEBIAN_FILE)

$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
# Remove any stale files
rm -rf ./lldpd
rm -rf lldpd-$(LLDPD_VERSION)

# download debian LLDPDD
wget -NO "$(DSC_FILE)" $(DSC_FILE_URL)
Expand Down
24 changes: 5 additions & 19 deletions src/sonic-frr/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,15 @@
SHELL = /bin/bash
.SHELLFLAGS += -e

MAIN_TARGET = frr_$(FRR_VERSION)-1~sonic.debian9+1_amd64.deb
TOOLS_TARGET = frr-pythontools_$(FRR_VERSION)-1~sonic.debian9+1_amd64.deb
MAIN_TARGET_DBG = frr-dbgsym_$(FRR_VERSION)-1~sonic.debian9+1_amd64.deb
DERIVED_TARGET = $(TOOLS_TARGET) $(MAIN_TARGET_DBG)
MAIN_TARGET = $(FRR)
DERIVED_TARGET = $(FRR_PYTHONTOOLS) $(FRR_DBG)

$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :

# Build the package
pushd ./frr

# This could very well be tools/tarsource.sh -V -e sonic
tools/tarsource.sh -V
# 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)/

tools/tarsource.sh -V -e '-sonic'
dpkg-buildpackage -rfakeroot -b -us -uc -Ppkg.frr.nortrlib -j$(SONIC_CONFIG_MAKE_JOBS)
popd
mv $(DERIVED_TARGET) $* $(DEST)/

$(addprefix $(DEST)/, $(DERIVED_TARGET)): $(DEST)/% : $(DEST)/$(MAIN_TARGET)

2 changes: 1 addition & 1 deletion src/sonic-frr/frr
Submodule frr updated from 5a35fd to cd305c
21 changes: 21 additions & 0 deletions src/swig/Makefile
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 1e3b62f

Please sign in to comment.