From 80c9f0e64ea1e946008d6b7547b0cb4094e7159f Mon Sep 17 00:00:00 2001 From: Anton Patenko Date: Wed, 1 Feb 2017 15:31:37 +0200 Subject: [PATCH 1/3] Enabled common debug packages installation. --- rules/config | 3 +++ rules/docker-base.mk | 10 +++++++++- slave.mk | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/rules/config b/rules/config index d76477ce5adc..b3de26fc7514 100644 --- a/rules/config +++ b/rules/config @@ -31,3 +31,6 @@ USERNAME = admin # PASSWORD - password for installer build PASSWORD = YourPaSsWoRd + +# SONIC_CONFIG_DEBUG - install debug packages +SONIC_CONFIG_DEBUG = y diff --git a/rules/docker-base.mk b/rules/docker-base.mk index 56e42ac97b45..f041f7d05cdd 100644 --- a/rules/docker-base.mk +++ b/rules/docker-base.mk @@ -3,4 +3,12 @@ DOCKER_BASE = docker-base.gz $(DOCKER_BASE)_PATH = $(DOCKERS_PATH)/docker-base -SONIC_SIMPLE_DOCKER_IMAGES += $(DOCKER_BASE) +ifeq ($(SONIC_CONFIG_DEBUG),y) +GDB = gdb +VIM = vim +OPENSSH = openssh-client +SSHPASS = sshpass +$(DOCKER_BASE)_DBG_PACKAGES += $(GDB) $(VIM) $(OPENSSH) $(SSHPASS) +endif + +SONIC_DOCKER_IMAGES += $(DOCKER_BASE) diff --git a/slave.mk b/slave.mk index 485f8ff9206c..5617a936f714 100644 --- a/slave.mk +++ b/slave.mk @@ -267,6 +267,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_DOCKER_IMAGES)) : $(TARGET_PATH)/%.gz : .pl sudo mount --bind $(PYTHON_WHEELS_PATH) $($*.gz_PATH)/python-wheels $(LOG) # Export variables for j2. Use path for unique variable names, e.g. docker_orchagent_debs $(eval export $(subst -,_,$(notdir $($*.gz_PATH)))_debs=$(shell printf "$(subst $(SPACE),\n,$(call expand,$($*.gz_DEPENDS),RDEPENDS))\n" | awk '!a[$$0]++')) + $(eval export $(subst -,_,$(notdir $($*.gz_PATH)))_dbgs=$(shell printf "$(subst $(SPACE),\n,$(call expand,$($*.gz_DBG_PACKAGES)))\n" | awk '!a[$$0]++')) j2 $($*.gz_PATH)/Dockerfile.j2 > $($*.gz_PATH)/Dockerfile docker build --no-cache -t $* $($*.gz_PATH) $(LOG) docker save $* | gzip -c > $@ From 8d12f111bf49337b96d595f3f9f4fd95852d4d35 Mon Sep 17 00:00:00 2001 From: Anton Patenko Date: Wed, 1 Feb 2017 15:58:52 +0200 Subject: [PATCH 2/3] Update gitignore. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 1e87c52e6f71..5483ddb6e9fe 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ dockers/docker-orchagent/Dockerfile dockers/docker-snmp-sv2/Dockerfile dockers/docker-team/Dockerfile dockers/docker-platform-monitor/Dockerfile +dockers/docker-base/Dockerfile From 76fa0a39b0c76732d9425d3cade24a611aefa6ed Mon Sep 17 00:00:00 2001 From: Anton Patenko Date: Wed, 1 Feb 2017 16:15:10 +0200 Subject: [PATCH 3/3] Make debug-packages installation disabled by default. --- rules/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules/config b/rules/config index b3de26fc7514..5ae09a1bc96d 100644 --- a/rules/config +++ b/rules/config @@ -33,4 +33,4 @@ USERNAME = admin PASSWORD = YourPaSsWoRd # SONIC_CONFIG_DEBUG - install debug packages -SONIC_CONFIG_DEBUG = y +SONIC_CONFIG_DEBUG = n