Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frr: Move docker to stretch and add pythontools #2819

Merged
merged 3 commits into from
Apr 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dockers/docker-fpm-frr/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker-config-engine
FROM docker-config-engine-stretch

ARG docker_container_name
ARG frr_user_uid
Expand All @@ -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-c2 logrotate
RUN apt-get install -y libdbus-1-3 libdaemon0 libjansson4 libc-ares2 iproute2 libpython2.7 libjson-c3 logrotate

{% if docker_fpm_frr_debs.strip() -%}
# Copy locally-built Debian package dependencies
Expand Down
6 changes: 4 additions & 2 deletions rules/docker-fpm-frr.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

DOCKER_FPM_FRR = docker-fpm-frr.gz
$(DOCKER_FPM_FRR)_PATH = $(DOCKERS_PATH)/docker-fpm-frr
$(DOCKER_FPM_FRR)_DEPENDS += $(FRR) $(SWSS)
$(DOCKER_FPM_FRR)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
$(DOCKER_FPM_FRR)_DEPENDS += $(FRR) $(FRR_PYTHONTOOLS) $(SWSS)
$(DOCKER_FPM_FRR)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_STRETCH)
SONIC_DOCKER_IMAGES += $(DOCKER_FPM_FRR)

$(DOCKER_FPM_FRR)_CONTAINER_NAME = bgp
Expand All @@ -12,3 +12,5 @@ $(DOCKER_FPM_FRR)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
$(DOCKER_FPM_FRR)_RUN_OPT += -v /etc/sonic/frr:/etc/frr:rw

$(DOCKER_FPM_FRR)_BASE_IMAGE_FILES += vtysh:/usr/bin/vtysh

SONIC_STRETCH_DOCKERS += $(DOCKER_FPM_FRR)
8 changes: 7 additions & 1 deletion rules/frr.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
FRR_VERSION = 6.0.2
export FRR_VERSION

FRR = frr_$(FRR_VERSION)-1~sonic.debian8+1_amd64.deb
FRR = frr_$(FRR_VERSION)-1~sonic.debian9+1_amd64.deb
$(FRR)_DEPENDS += $(LIBSNMP_DEV)
$(FRR)_SRC_PATH = $(SRC_PATH)/sonic-frr
SONIC_MAKE_DEBS += $(FRR)

# 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)
16 changes: 12 additions & 4 deletions src/sonic-frr/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
SHELL = /bin/bash
.SHELLFLAGS += -e

MAIN_TARGET = frr_$(FRR_VERSION)-1~sonic.debian8+1_amd64.deb
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)

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

Expand All @@ -12,11 +15,16 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
# 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.debian8+1 'SONiC FRR debian package build'
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 frr_$(FRR_VERSION)-1~sonic.debian8+1_amd64.deb
mv $* $(DEST)/
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)/

popd

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