[dockers]: Upgrade LLDP docker to stretch build (#2633)
* [dockers]: Upgrade LLDP docker to stretch build
This commit is contained in:
parent
b0b0862d54
commit
047c7c8915
@ -1,4 +1,4 @@
|
||||
FROM docker-config-engine
|
||||
FROM docker-config-engine-stretch
|
||||
|
||||
ARG docker_container_name
|
||||
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf
|
||||
@ -9,8 +9,6 @@ ENV DEBIAN_FRONTEND=noninteractive
|
||||
# Update apt's cache of available packages
|
||||
RUN apt-get update
|
||||
|
||||
# Install dependencies
|
||||
RUN apt-get install -y python-pip libbsd0 libevent-2.0-5 libjansson4 libwrap0 libxml2 libpci3 libperl5.20 libpython2.7
|
||||
|
||||
{% if docker_lldp_sv2_debs.strip() -%}
|
||||
# Copy locally-built Debian package dependencies
|
||||
|
@ -4,9 +4,10 @@ DOCKER_LLDP_SV2 = docker-lldp-sv2.gz
|
||||
$(DOCKER_LLDP_SV2)_PATH = $(DOCKERS_PATH)/docker-lldp-sv2
|
||||
$(DOCKER_LLDP_SV2)_DEPENDS += $(LLDPD) $(LIBSWSSCOMMON) $(PYTHON_SWSSCOMMON)
|
||||
$(DOCKER_LLDP_SV2)_PYTHON_WHEELS += $(DBSYNCD_PY2)
|
||||
$(DOCKER_LLDP_SV2)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
|
||||
$(DOCKER_LLDP_SV2)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_STRETCH)
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_LLDP_SV2)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_LLDP_SV2)
|
||||
SONIC_STRETCH_DOCKERS += $(DOCKER_LLDP_SV2)
|
||||
|
||||
$(DOCKER_LLDP_SV2)_CONTAINER_NAME = lldp
|
||||
$(DOCKER_LLDP_SV2)_RUN_OPT += --net=host --privileged -t
|
||||
|
@ -1,17 +1,20 @@
|
||||
# lldpd package
|
||||
|
||||
LLDPD_VERSION = 0.9.6
|
||||
LLDPD_VERSION_SUFFIX = 1
|
||||
LLDPD_VERSION_FULL = $(LLDPD_VERSION)-$(LLDPD_VERSION_SUFFIX)
|
||||
|
||||
LLDPD = lldpd_$(LLDPD_VERSION)-0_amd64.deb
|
||||
LLDPD = lldpd_$(LLDPD_VERSION_FULL)_amd64.deb
|
||||
$(LLDPD)_DEPENDS += $(LIBSNMP_DEV)
|
||||
$(LLDPD)_RDEPENDS += $(LIBSNMP)
|
||||
$(LLDPD)_SRC_PATH = $(SRC_PATH)/lldpd
|
||||
SONIC_MAKE_DEBS += $(LLDPD)
|
||||
|
||||
LIBLLDPCTL = liblldpctl-dev_$(LLDPD_VERSION)-0_amd64.deb
|
||||
LIBLLDPCTL = liblldpctl-dev_$(LLDPD_VERSION_FULL)_amd64.deb
|
||||
$(eval $(call add_derived_package,$(LLDPD),$(LIBLLDPCTL)))
|
||||
|
||||
# Export these variables so they can be used in a sub-make
|
||||
export LLDPD_VERSION
|
||||
export LLDPD_VERSION_FULL
|
||||
export LLDPD
|
||||
export LIBLLDPCTL
|
||||
|
@ -184,6 +184,12 @@ RUN apt-get update && apt-get install -y \
|
||||
libsensors4 \
|
||||
libsensors4-dev \
|
||||
libwrap0-dev \
|
||||
# For lldpd
|
||||
debhelper \
|
||||
autotools-dev \
|
||||
libbsd-dev \
|
||||
pkg-config \
|
||||
check \
|
||||
# For mpdecimal
|
||||
docutils-common \
|
||||
libjs-sphinxdoc \
|
||||
@ -261,6 +267,7 @@ RUN pip install click-default-group click natsort tabulate netifaces==0.10.7 fas
|
||||
|
||||
# For sonic snmpagent mock testing
|
||||
RUN pip3 install mockredispy==2.9.3
|
||||
|
||||
RUN pip3 install PyYAML>=5.1
|
||||
|
||||
# For sonic-platform-common testing
|
||||
|
@ -5,18 +5,30 @@ SHELL = /bin/bash
|
||||
MAIN_TARGET = $(LLDPD)
|
||||
DERIVED_TARGETS = $(LIBLLDPCTL)
|
||||
|
||||
LLDP_URL = http://ftp.debian.org/debian/pool/main/l/lldpd
|
||||
|
||||
DSC_FILE = lldpd_$(LLDPD_VERSION_FULL).dsc
|
||||
ORIG_FILE = lldpd_$(LLDPD_VERSION).orig.tar.gz
|
||||
DEBIAN_FILE = lldpd_$(LLDPD_VERSION_FULL).debian.tar.xz
|
||||
|
||||
DSC_FILE_URL = $(LLDP_URL)/$(DSC_FILE)
|
||||
ORIG_FILE_URL = $(LLDP_URL)/$(ORIG_FILE)
|
||||
DEBIAN_FILE_URL = $(LLDP_URL)/$(DEBIAN_FILE)
|
||||
|
||||
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
|
||||
# Remove any stale files
|
||||
rm -rf ./lldpd
|
||||
|
||||
# Clone lldpd repo
|
||||
git clone https://github.com/vincentbernat/lldpd.git
|
||||
pushd ./lldpd
|
||||
# download debian LLDPDD
|
||||
wget -NO "$(DSC_FILE)" $(DSC_FILE_URL)
|
||||
wget -NO "$(ORIG_FILE)" $(ORIG_FILE_URL)
|
||||
wget -NO "$(DEBIAN_FILE)" $(DEBIAN_FILE_URL)
|
||||
dpkg-source -x lldpd_$(LLDPD_VERSION_FULL).dsc
|
||||
|
||||
# Reset HEAD to the commit of the proper tag
|
||||
# NOTE: Using "git checkout <tag_name>" here detaches our HEAD,
|
||||
# which stg doesn't like, so we use this method instead
|
||||
git reset --hard $(LLDPD_VERSION)
|
||||
pushd lldpd-$(LLDPD_VERSION)
|
||||
git init
|
||||
git add -f *
|
||||
git commit -m "unmodified lldp source"
|
||||
|
||||
# Apply patches
|
||||
stg init
|
||||
|
Loading…
Reference in New Issue
Block a user