Skip to content

Commit b186bb2

Browse files
jlevequelguohan
authored andcommitted
[dhcp_relay] Base DHCP Relay Docker container on Debian Stretch (sonic-net#2832)
* Base DHCP relay Docker image on Strech base Docker * Change URL for isc-dhcp source repository * Upgrade isc-dhcp source branch to 4.3.5-3.1 * Update patch #1 to apply to isc-dhcp 4.3.5-3.1 * Update patch #2 to apply to isc-dhcp 4.3.5-3.1 * Update patch #3 to apply to isc-dhcp 4.3.5-3.1 * Update patch #4 to apply to isc-dhcp 4.3.5-3.1 * Remove security patches, as they are now applied as part of 4.3.5-3.1 source * Reorder patches to apply bug fix first, then features * Extend makefile to build debug Docker image * Update commit that series file applies against
1 parent ad2c1b2 commit b186bb2

15 files changed

+580
-927
lines changed

dockers/docker-dhcp-relay/Dockerfile.j2

+1-1
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
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf

rules/docker-dhcp-relay.mk

+15-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,24 @@
11
# Docker image for DHCP relay
22

3-
DOCKER_DHCP_RELAY = docker-dhcp-relay.gz
4-
$(DOCKER_DHCP_RELAY)_PATH = $(DOCKERS_PATH)/docker-dhcp-relay
3+
DOCKER_DHCP_RELAY_STEM = docker-dhcp-relay
4+
DOCKER_DHCP_RELAY = $(DOCKER_DHCP_RELAY_STEM).gz
5+
DOCKER_DHCP_RELAY_DBG = $(DOCKER_DHCP_RELAY_STEM)-$(DBG_IMAGE_MARK).gz
6+
7+
$(DOCKER_DHCP_RELAY)_PATH = $(DOCKERS_PATH)/$(DOCKER_DHCP_RELAY_STEM)
8+
59
$(DOCKER_DHCP_RELAY)_DEPENDS += $(ISC_DHCP_COMMON) $(ISC_DHCP_RELAY)
6-
$(DOCKER_DHCP_RELAY)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE)
10+
$(DOCKER_DHCP_RELAY)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_DEPENDS)
11+
$(DOCKER_DHCP_RELAY)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_IMAGE_PACKAGES)
12+
13+
$(DOCKER_DHCP_RELAY)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_STRETCH)
14+
715
SONIC_DOCKER_IMAGES += $(DOCKER_DHCP_RELAY)
816
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_DHCP_RELAY)
17+
SONIC_STRETCH_DOCKERS += $(DOCKER_DHCP_RELAY)
918

19+
SONIC_DOCKER_DBG_IMAGES += $(DOCKER_DHCP_RELAY_DBG)
20+
SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_DHCP_RELAY_DBG)
21+
SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_DHCP_RELAY_DBG)
1022

1123
$(DOCKER_DHCP_RELAY)_CONTAINER_NAME = dhcp_relay
1224
$(DOCKER_DHCP_RELAY)_RUN_OPT += --net=host --privileged -t

rules/isc-dhcp.mk

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# isc-dhcp packages
22

3-
ISC_DHCP_VERSION = 4.3.3-6
3+
ISC_DHCP_VERSION = 4.3.5-3.1
44

55
export ISC_DHCP_VERSION
66

@@ -10,3 +10,5 @@ SONIC_MAKE_DEBS += $(ISC_DHCP_COMMON)
1010

1111
ISC_DHCP_RELAY = isc-dhcp-relay_$(ISC_DHCP_VERSION)_amd64.deb
1212
$(eval $(call add_derived_package,$(ISC_DHCP_COMMON),$(ISC_DHCP_RELAY)))
13+
14+
SONIC_STRETCH_DEBS += $(ISC_DHCP_COMMON) $(ISC_DHCP_RELAY)

src/isc-dhcp/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
1010
rm -rf ./isc-dhcp
1111

1212
# Clone isc-dhcp repo
13-
git clone https://salsa.debian.org/berni/isc-dhcp.git
13+
git clone https://salsa.debian.org/dhcp-team/isc-dhcp.git
1414
pushd ./isc-dhcp
1515

1616
# Reset HEAD to the commit of the proper tag

src/isc-dhcp/patch/0004-Bugfix-Don-t-print-log-messages-to-stderr-in-release.patch renamed to src/isc-dhcp/patch/0001-Bugfix-Don-t-print-log-messages-to-stderr-in-release.patch

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
From 2bb21fcf4a9ad7535867809c50d2cf0ba1088e17 Mon Sep 17 00:00:00 2001
1+
From 7c1cfd636be589317710a8556a7ec667debee53a Mon Sep 17 00:00:00 2001
22
From: Joe LeVeque <[email protected]>
3-
Date: Fri, 9 Mar 2018 01:43:35 +0000
3+
Date: Fri, 26 Apr 2019 01:37:54 +0000
44
Subject: [PATCH] [Bugfix] Don't print log messages to stderr in release builds
55

66
---
@@ -24,5 +24,5 @@ index 7c91d9d..aa74fd8 100644
2424
void (*log_cleanup) (void);
2525

2626
--
27-
2.1.4
27+
2.17.1
2828

src/isc-dhcp/patch/0001-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch

-273
This file was deleted.

0 commit comments

Comments
 (0)