-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for debug shell with package ENV variable set. #6092
base: master
Are you sure you want to change the base?
Support for debug shell with package ENV variable set. #6092
Conversation
retest broadcom please |
retest mellanox please |
13db027
to
073a526
Compare
073a526
to
87b574e
Compare
87b574e
to
aea3db4
Compare
@@ -1092,6 +1094,10 @@ stretch : $$(addprefix $(TARGET_PATH)/,$$(STRETCH_DOCKER_IMAGES)) \ | |||
jessie : $$(addprefix $(TARGET_PATH)/,$$(JESSIE_DOCKER_IMAGES)) \ | |||
$$(addprefix $(TARGET_PATH)/,$$(JESSIE_DBG_DOCKER_IMAGES)) | |||
|
|||
.PHONY: shell | |||
shell: | |||
@$(SHELL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where does this SHELL defined? are you overriding the shell in the Makefile?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SHELL is already defined at the beginning of the slave.mk file.
Select bash for commands
.ONESHELL:
SHELL = /bin/bash
.SHELLFLAGS += -e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the purpose to define this phony target shell?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the build is running, quickly get into the build container with all slave build ENV variables set from another shell. The slave build ENVs are not set if we use 'make sonic-slave-bash' target.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how to use this target then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can invoke this target as below.
make shell
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can also execute the individual target as below.
make -f slave.mk target/python-wheels/sonic_py_common-1.0-py2-none-any.whl
etc.
Sonic package build happens inside the docker build container. when a package build failure happens, debugging the package compilation requires pre-installation of its dependent packages and version ENV variables to be set. For example: \# make target/debs/buster/hsflowd_2.0.26-4_amd64.deb ***failure*** In oder to compile the hslflowd package inside the container, the following ENV variable to be set. export HSFLOWD_VERSION = 2.0.28 export HSFLOWD_SUBVERSION = 2 This patch helps to compile the package directly on the source folder inside the build container with required ENV variable set. \# make DBGSH=1 target/debs/buster/hsflowd_2.0.26-4_amd64.deb Get into the build container and land on the bash shell. src/sflow/hsflowd $ src/sflow/hsflowd $ make hsflowd_2.0.26-4_amd64.deb
7f8ad65
to
909ffd8
Compare
Sonic package build happens inside the docker build container.
when a package build failure happens, debugging the package compilation requires
pre-installation of its dependent packages and version ENV
variables to be set. For example:
# make target/debs/buster/hsflowd_2.0.26-4_amd64.deb
failure
In oder to compile the hslflowd package inside the container, the
following ENV variable to be set.
export HSFLOWD_VERSION = 2.0.28
export HSFLOWD_SUBVERSION = 2
This patch helps to compile the package directly on the source folder
inside the build container with required ENV variable set.
# make DBGSH=1 target/debs/buster/hsflowd_2.0.26-4_amd64.deb
Get into the build container and land on the bash shell.
src/sflow/hsflowd $
src/sflow/hsflowd $ make hsflowd_2.0.26-4_amd64.deb
- Why I did it
- How I did it
- How to verify it
- Which release branch to backport (provide reason below if selected)
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)