Skip to content

Commit 6bf97d8

Browse files
nikos-githublguohan
authored andcommitted
[docker-frr]: Move docker to stretch and add pythontools (#2819)
1 parent d33ed17 commit 6bf97d8

File tree

4 files changed

+25
-9
lines changed

4 files changed

+25
-9
lines changed

dockers/docker-fpm-frr/Dockerfile.j2

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM docker-config-engine
1+
FROM docker-config-engine-stretch
22

33
ARG docker_container_name
44
ARG frr_user_uid
@@ -13,7 +13,7 @@ ENV DEBIAN_FRONTEND=noninteractive
1313
RUN apt-get update
1414

1515
# Install required packages
16-
RUN apt-get install -y libdbus-1-3 libdaemon0 libjansson4 libc-ares2 iproute2 libpython2.7 libjson-c2 logrotate
16+
RUN apt-get install -y libdbus-1-3 libdaemon0 libjansson4 libc-ares2 iproute2 libpython2.7 libjson-c3 logrotate
1717

1818
{% if docker_fpm_frr_debs.strip() -%}
1919
# Copy locally-built Debian package dependencies

rules/docker-fpm-frr.mk

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
DOCKER_FPM_FRR = docker-fpm-frr.gz
44
$(DOCKER_FPM_FRR)_PATH = $(DOCKERS_PATH)/docker-fpm-frr
5-
$(DOCKER_FPM_FRR)_DEPENDS += $(FRR) $(SWSS)
6-
$(DOCKER_FPM_FRR)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
5+
$(DOCKER_FPM_FRR)_DEPENDS += $(FRR) $(FRR_PYTHONTOOLS) $(SWSS)
6+
$(DOCKER_FPM_FRR)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_STRETCH)
77
SONIC_DOCKER_IMAGES += $(DOCKER_FPM_FRR)
88

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

1414
$(DOCKER_FPM_FRR)_BASE_IMAGE_FILES += vtysh:/usr/bin/vtysh
15+
16+
SONIC_STRETCH_DOCKERS += $(DOCKER_FPM_FRR)

rules/frr.mk

+7-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
FRR_VERSION = 6.0.2
44
export FRR_VERSION
55

6-
FRR = frr_$(FRR_VERSION)-1~sonic.debian8+1_amd64.deb
6+
FRR = frr_$(FRR_VERSION)-1~sonic.debian9+1_amd64.deb
77
$(FRR)_DEPENDS += $(LIBSNMP_DEV)
88
$(FRR)_SRC_PATH = $(SRC_PATH)/sonic-frr
99
SONIC_MAKE_DEBS += $(FRR)
10+
11+
# FRRouting pythontools
12+
FRR_PYTHONTOOLS = frr-pythontools_$(FRR_VERSION)-1~sonic.debian9+1_amd64.deb
13+
$(FRR_PYTHONTOOLS)_DEPENDS += $(LIBSNMP_DEV)
14+
$(FRR_PYTHONTOOLS)_SRC_PATH = $(SRC_PATH)/sonic-frr
15+
SONIC_MAKE_DEBS += $(FRR_PYTHONTOOLS)

src/sonic-frr/Makefile

+12-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
SHELL = /bin/bash
33
.SHELLFLAGS += -e
44

5-
MAIN_TARGET = frr_$(FRR_VERSION)-1~sonic.debian8+1_amd64.deb
5+
MAIN_TARGET = frr_$(FRR_VERSION)-1~sonic.debian9+1_amd64.deb
6+
TOOLS_TARGET = frr-pythontools_$(FRR_VERSION)-1~sonic.debian9+1_amd64.deb
7+
MAIN_TARGET_DBG = frr-dbgsym_$(FRR_VERSION)-1~sonic.debian9+1_amd64.deb
8+
DERIVED_TARGET = $(TOOLS_TARGET) $(MAIN_TARGET_DBG)
69

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

@@ -12,11 +15,16 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
1215
# This could very well be tools/tarsource.sh -V -e sonic
1316
tools/tarsource.sh -V
1417
# This is a no-op but here in case the changelog stops being a symlink
15-
debchange -b -v $(FRR_VERSION)-1~sonic.debian8+1 'SONiC FRR debian package build'
18+
debchange -b -v $(FRR_VERSION)-1~sonic.debian9+1 'SONiC FRR debian package build'
19+
sudo apt-get -y install install-info
1620
dpkg-buildpackage -rfakeroot -b -us -uc -Ppkg.frr.nortrlib
1721
cd ..
18-
mv frr_$(FRR_VERSION)-*_amd64.deb frr_$(FRR_VERSION)-1~sonic.debian8+1_amd64.deb
19-
mv $* $(DEST)/
22+
mv frr_$(FRR_VERSION)-*_amd64.deb $(MAIN_TARGET)
23+
mv frr-pythontools_$(FRR_VERSION)-*_all.deb $(TOOLS_TARGET)
24+
mv frr-dbgsym_$(FRR_VERSION)-*_amd64.deb $(MAIN_TARGET_DBG)
25+
mv $(DERIVED_TARGET) $* $(DEST)/
2026

2127
popd
2228

29+
$(addprefix $(DEST)/, $(DERIVED_TARGET)): $(DEST)/% : $(DEST)/$(MAIN_TARGET)
30+

0 commit comments

Comments
 (0)