[docker-dhcprelay]: Update to Bullseye (#9736)
As part of this, update the isc-dhcp package to match the Bullseye version (this fixes some compile errors related to BIND), clean up some of the build dependencies and runtime dependencies for debian packaging, and use the default Boost version to compile against instead of explicitly saying using 1.74. Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
This commit is contained in:
parent
40761941d4
commit
bb3362760d
@ -1,5 +1,5 @@
|
||||
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
|
||||
FROM docker-config-engine-buster
|
||||
FROM docker-config-engine-bullseye
|
||||
|
||||
ARG docker_container_name
|
||||
ARG image_version
|
||||
|
@ -8,12 +8,12 @@ $(DOCKER_DHCP_RELAY)_PATH = $(DOCKERS_PATH)/$(DOCKER_DHCP_RELAY_STEM)
|
||||
|
||||
$(DOCKER_DHCP_RELAY)_DEPENDS += $(ISC_DHCP_RELAY) $(SONIC_DHCPMON) $(SONIC_DHCP6RELAY) $(LIBSWSSCOMMON)
|
||||
|
||||
$(DOCKER_DHCP_RELAY)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_DEPENDS)
|
||||
$(DOCKER_DHCP_RELAY)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_DEPENDS)
|
||||
$(DOCKER_DHCP_RELAY)_DBG_DEPENDS += $(ISC_DHCP_RELAY_DBG) $(SONIC_DHCP6RELAY_DBG)
|
||||
|
||||
$(DOCKER_DHCP_RELAY)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_PACKAGES)
|
||||
$(DOCKER_DHCP_RELAY)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_IMAGE_PACKAGES)
|
||||
|
||||
$(DOCKER_DHCP_RELAY)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_BUSTER)
|
||||
$(DOCKER_DHCP_RELAY)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_BULLSEYE)
|
||||
|
||||
$(DOCKER_DHCP_RELAY)_INSTALL_PYTHON_WHEELS = $(SONIC_UTILITIES_PY3)
|
||||
$(DOCKER_DHCP_RELAY)_INSTALL_DEBS = $(PYTHON3_SWSSCOMMON)
|
||||
@ -56,6 +56,3 @@ $(DOCKER_DHCP_RELAY)_CLI_SHOW_PLUGIN = /cli/show/plugins/show_dhcp_relay.py
|
||||
$(DOCKER_DHCP_RELAY)_CLI_CLEAR_PLUGIN = /cli/clear/plugins/clear_dhcp6relay_counter.py
|
||||
|
||||
$(DOCKER_DHCP_RELAY)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
|
||||
|
||||
SONIC_BUSTER_DOCKERS += $(DOCKER_DHCP_RELAY)
|
||||
SONIC_BUSTER_DBG_DOCKERS += $(DOCKER_DHCP_RELAY_DBG)
|
||||
|
@ -1,7 +1,7 @@
|
||||
# isc-dhcp packages
|
||||
|
||||
ISC_DHCP_VERSION = 4.4.1
|
||||
ISC_DHCP_VERSION_FULL = ${ISC_DHCP_VERSION}-2
|
||||
ISC_DHCP_VERSION_FULL = ${ISC_DHCP_VERSION}-2.3
|
||||
|
||||
export ISC_DHCP_VERSION ISC_DHCP_VERSION_FULL
|
||||
|
||||
|
@ -323,22 +323,22 @@ RUN apt-get update && apt-get install -y \
|
||||
# For kdump-tools
|
||||
libbz2-dev \
|
||||
# For linkmgrd
|
||||
libboost1.74-dev \
|
||||
libboost-program-options1.74-dev \
|
||||
libboost-system1.74-dev \
|
||||
libboost-thread1.74-dev \
|
||||
libboost-atomic1.74-dev \
|
||||
libboost-chrono1.74-dev \
|
||||
libboost-container1.74-dev \
|
||||
libboost-context1.74-dev \
|
||||
libboost-contract1.74-dev \
|
||||
libboost-coroutine1.74-dev \
|
||||
libboost-date-time1.74-dev \
|
||||
libboost-fiber1.74-dev \
|
||||
libboost-filesystem1.74-dev \
|
||||
libboost-graph-parallel1.74-dev \
|
||||
libboost-log1.74-dev \
|
||||
libboost-regex1.74-dev \
|
||||
libboost-dev \
|
||||
libboost-program-options-dev \
|
||||
libboost-system-dev \
|
||||
libboost-thread-dev \
|
||||
libboost-atomic-dev \
|
||||
libboost-chrono-dev \
|
||||
libboost-container-dev \
|
||||
libboost-context-dev \
|
||||
libboost-contract-dev \
|
||||
libboost-coroutine-dev \
|
||||
libboost-date-time-dev \
|
||||
libboost-fiber-dev \
|
||||
libboost-filesystem-dev \
|
||||
libboost-graph-parallel-dev \
|
||||
libboost-log-dev \
|
||||
libboost-regex-dev \
|
||||
googletest \
|
||||
libgtest-dev \
|
||||
libgcc-10-dev \
|
||||
@ -481,6 +481,10 @@ EXPOSE 22
|
||||
RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git /usr/share/depot_tools
|
||||
ENV PATH /usr/share/depot_tools:$PATH
|
||||
|
||||
# Install dependencies for dhcp relay test
|
||||
RUN pip3 install parameterized==0.8.1
|
||||
RUN pip3 install pyfakefs
|
||||
|
||||
# Install docker engine 20.10 inside docker and enable experimental feature
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y \
|
||||
|
@ -1 +1 @@
|
||||
9
|
||||
12
|
||||
|
@ -2,8 +2,7 @@ Source: sonic-dhcp6relay
|
||||
Section: devel
|
||||
Priority: optional
|
||||
Maintainer: Kelly Yeh <kellyyeh@microsoft.com>
|
||||
Build-Depends: debhelper (>= 8.0.0),
|
||||
dh-systemd
|
||||
Build-Depends: debhelper (>= 12.0.0), libevent-dev, libboost-thread-dev, libboost-system-dev, libswsscommon-dev
|
||||
Standards-Version: 3.9.3
|
||||
Homepage: https://github.com/Azure/sonic-buildimage
|
||||
XS-Go-Import-Path: github.com/Azure/sonic-buildimage
|
||||
@ -11,7 +10,5 @@ XS-Go-Import-Path: github.com/Azure/sonic-buildimage
|
||||
Package: sonic-dhcp6relay
|
||||
Architecture: any
|
||||
Built-Using: ${misc:Built-Using}
|
||||
Depends: libevent-2.1-6,
|
||||
libboost-thread1.71.0,
|
||||
libboost-system1.71.0
|
||||
Depends: ${shlibs:Depends}
|
||||
Description: SONiC DHCPv6 Relay
|
||||
|
@ -1 +1 @@
|
||||
9
|
||||
12
|
||||
|
@ -2,8 +2,7 @@ Source: sonic-dhcpmon
|
||||
Section: devel
|
||||
Priority: optional
|
||||
Maintainer: Tamer Ahmed <tamer.ahmed@microsoft.com>
|
||||
Build-Depends: debhelper (>= 8.0.0),
|
||||
dh-systemd
|
||||
Build-Depends: debhelper (>= 12.0.0), libevent-dev, libexplain-dev
|
||||
Standards-Version: 3.9.3
|
||||
Homepage: https://github.com/Azure/sonic-buildimage
|
||||
XS-Go-Import-Path: github.com/Azure/sonic-buildimage
|
||||
@ -11,6 +10,5 @@ XS-Go-Import-Path: github.com/Azure/sonic-buildimage
|
||||
Package: sonic-dhcpmon
|
||||
Architecture: any
|
||||
Built-Using: ${misc:Built-Using}
|
||||
Depends: libexplain51,
|
||||
libevent-2.1-6
|
||||
Depends: ${shlibs:Depends}
|
||||
Description: SONiC DHCP Monitor
|
||||
|
@ -7,16 +7,16 @@ DERIVED_TARGETS = $(ISC_DHCP_RELAY_DBG)
|
||||
|
||||
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
|
||||
# Remove any stale files
|
||||
rm -rf ./isc-dhcp
|
||||
rm -rf ./isc-dhcp-$(ISC_DHCP_VERSION)
|
||||
|
||||
# Clone isc-dhcp repo
|
||||
git clone https://salsa.debian.org/dhcp-team/isc-dhcp.git
|
||||
pushd ./isc-dhcp
|
||||
# Get isc-dhcp release, debian files
|
||||
dget http://deb.debian.org/debian/pool/main/i/isc-dhcp/isc-dhcp_$(ISC_DHCP_VERSION_FULL).dsc
|
||||
pushd ./isc-dhcp-$(ISC_DHCP_VERSION)
|
||||
|
||||
# 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 debian/$(ISC_DHCP_VERSION_FULL)
|
||||
# Create a git repository here for stg to apply patches
|
||||
git init
|
||||
git add -f *
|
||||
git commit -qm "initial commit"
|
||||
|
||||
# Apply patches
|
||||
stg init
|
||||
|
@ -165,20 +165,7 @@ diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c
|
||||
index 221106a..c44a79d 100644
|
||||
--- a/relay/dhcrelay.c
|
||||
+++ b/relay/dhcrelay.c
|
||||
@@ -97,6 +97,12 @@ struct downstream_intf_list {
|
||||
isc_boolean_t use_if_id = ISC_FALSE;
|
||||
#endif
|
||||
|
||||
+/*
|
||||
+ * If not set, kernel chooses what the src ip is.
|
||||
+ * If set, uses "from" interface IP for packet Tx.
|
||||
+ */
|
||||
+extern int use_src_intf_ip_for_tx = 0;
|
||||
+
|
||||
/* Maximum size of a packet with agent options added. */
|
||||
int dhcp_max_agent_option_packet_length = DHCP_MTU_MIN;
|
||||
|
||||
@@ -431,6 +437,8 @@ main(int argc, char **argv) {
|
||||
@@ -431,6 +431,8 @@ main(int argc, char **argv) {
|
||||
#endif
|
||||
} else if (!strcmp(argv[i], "-d")) {
|
||||
/* no_daemon = 1; */
|
||||
|
Loading…
Reference in New Issue
Block a user