-
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
Build python3.6 deb packages and install them into docker-snmp-sv2 #245
Merged
+100
−53
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
cc9aa47
Build python3.6 and add it into docker-snmp-sv2
qiluo-msft 80d2923
(reformat)
qiluo-msft c77e64b
Download python3 source from azure storage mirror
qiluo-msft 785a242
Remove unused dependencies
qiluo-msft 257f091
(comment)
qiluo-msft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
PYTHON_VER=3.6.0-1 | ||
PYTHON_PNAME=python3.6 | ||
|
||
export PYTHON_VER | ||
export PYTHON_PNAME | ||
|
||
LIBPY3_MIN = lib$(PYTHON_PNAME)-minimal_$(PYTHON_VER)_amd64.deb | ||
$(LIBPY3_MIN)_SRC_PATH = $(SRC_PATH)/python3 | ||
$(LIBPY3_MIN)_DEPENDS += | ||
$(LIBPY3_MIN)_RDEPENDS += | ||
SONIC_MAKE_DEBS += $(LIBPY3_MIN) | ||
|
||
LIBPY3_STD = lib$(PYTHON_PNAME)-stdlib_$(PYTHON_VER)_amd64.deb | ||
$(eval $(call add_derived_package,$(LIBPY3_MIN),$(LIBPY3_STD))) | ||
$(LIBPY3_STD)_DEPENDS += $(LIBMPDECIMAL) | ||
$(LIBPY3_STD)_RDEPENDS += $(LIBPY3_MIN) $(LIBMPDECIMAL) | ||
|
||
LIBPY3 = lib$(PYTHON_PNAME)_$(PYTHON_VER)_amd64.deb | ||
$(eval $(call add_derived_package,$(LIBPY3_MIN),$(LIBPY3))) | ||
$(LIBPY3)_DEPENDS += $(LIBPY3_STD) | ||
$(LIBPY3)_RDEPENDS += $(LIBPY3_MIN) $(LIBPY3_STD) | ||
|
||
PY3_MIN = $(PYTHON_PNAME)-minimal_$(PYTHON_VER)_amd64.deb | ||
$(eval $(call add_derived_package,$(LIBPY3_MIN),$(PY3_MIN))) | ||
$(PY3_MIN)_RDEPENDS += $(LIBPY3_MIN) | ||
|
||
PY3 = $(PYTHON_PNAME)_$(PYTHON_VER)_amd64.deb | ||
$(eval $(call add_derived_package,$(LIBPY3_MIN),$(PY3))) | ||
$(PY3)_DEPENDS += $(PY3_MIN) $(LIBPY3) | ||
$(PY3)_RDEPENDS += $(PY3_MIN) $(LIBPY3) $(LIBPY3_MIN) | ||
|
||
LIBPY3_DEV = lib$(PYTHON_PNAME)-dev_$(PYTHON_VER)_amd64.deb | ||
$(eval $(call add_derived_package,$(LIBPY3_MIN),$(LIBPY3_DEV))) | ||
$(LIBPY3_DEV)_DEPENDS += $(LIBPY3) $($(LIBPY3)_DEPENDS) | ||
$(LIBPY3_DEV)_RDEPENDS += $(LIBPY3) $($(LIBPY3)_RDEPENDS) | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
.ONESHELL: | ||
SHELL = /bin/bash | ||
.SHELLFLAGS += -e | ||
|
||
PYTHON_VER=3.6.0 | ||
PYTHON_DEB_VER=1 | ||
PYTHON_PNAME=python3.6 | ||
|
||
MAIN_TARGET = lib$(PYTHON_PNAME)-minimal_$(PYTHON_VER)-$(PYTHON_DEB_VER)_amd64.deb | ||
DERIVED_TARGETS = lib$(PYTHON_PNAME)-stdlib_$(PYTHON_VER)-$(PYTHON_DEB_VER)_amd64.deb \ | ||
lib$(PYTHON_PNAME)_$(PYTHON_VER)-$(PYTHON_DEB_VER)_amd64.deb \ | ||
$(PYTHON_PNAME)-minimal_$(PYTHON_VER)-$(PYTHON_DEB_VER)_amd64.deb \ | ||
$(PYTHON_PNAME)_$(PYTHON_VER)-$(PYTHON_DEB_VER)_amd64.deb \ | ||
lib$(PYTHON_PNAME)-dev_$(PYTHON_VER)-$(PYTHON_DEB_VER)_amd64.deb | ||
#$(PYTHON_PNAME)-dev_$(PYTHON_VER)-$(PYTHON_DEB_VER)_amd64.deb | ||
|
||
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : | ||
## Obtaining the python3 | ||
wget 'https://sonicstorage.blob.core.windows.net/packages/$(PYTHON_PNAME)_$(PYTHON_VER).orig.tar.xz?sv=2015-04-05&sr=b&sig=d42Wh1CA9NZvlskhW4fpWcHVgc7N3IKhdFzyeO2zbRA%3D&se=2027-02-02T01%3A00%3A57Z&sp=r' -O $(PYTHON_PNAME)_$(PYTHON_VER).orig.tar.xz | ||
wget 'https://sonicstorage.blob.core.windows.net/packages/$(PYTHON_PNAME)_$(PYTHON_VER)-$(PYTHON_DEB_VER).debian.tar.xz?sv=2015-04-05&sr=b&sig=KLX9pMJ3zpQvGBo6ZjzoZXgooMJRUUwMx8ZaTJtywK0%3D&se=2027-02-02T00%3A59%3A34Z&sp=r' -O $(PYTHON_PNAME)_$(PYTHON_VER)-$(PYTHON_DEB_VER).debian.tar.xz | ||
wget 'https://sonicstorage.blob.core.windows.net/packages/$(PYTHON_PNAME)_$(PYTHON_VER)-$(PYTHON_DEB_VER).dsc?sv=2015-04-05&sr=b&sig=95s%2FC4vKY6bRKtkUTz%2BmHLqOllBOYbfP3zV5ayAuzSM%3D&se=2027-02-02T01%3A00%3A26Z&sp=r' -O $(PYTHON_PNAME)_$(PYTHON_VER)-$(PYTHON_DEB_VER).dsc | ||
|
||
## Build | ||
dpkg-source -x $(PYTHON_PNAME)_$(PYTHON_VER)-$(PYTHON_DEB_VER).dsc | ||
pushd $(PYTHON_PNAME)-$(PYTHON_VER) | ||
sudo apt-get install devscripts | ||
mk-build-deps | ||
sudo dpkg -i $(PYTHON_PNAME)-build-deps_$(PYTHON_VER)-$(PYTHON_DEB_VER)_amd64.deb || sudo apt-get install -f | ||
dpkg-buildpackage -us -uc -b | ||
popd | ||
|
||
cp $(DERIVED_TARGETS) $* $(DEST)/ | ||
|
||
$(addprefix $(DEST)/, $(DERIVED_TARGETS)): $(DEST)/% : $(DEST)/$(MAIN_TARGET) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
this comment shall be moved lower? #WontFix
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.
All these comments are related to below single RUN statement. It's difficult to comment near the exact line, any idea?
In reply to: 99458299 [](ancestors = 99458299)
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.
One option: you could split the RUN statement into three RUN statements, update, install and clean up. #Resolved
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.
You are right. Both options have the same effect. The merging option is kind of manual 'docker squash', which remove the unnecessary intermediate layer storage from docker image's point of view. In future when 'docker squash' becomes mature, we can prevent this situation.
In reply to: 99679265 [](ancestors = 99679265)
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 are using docker --squash now, we can seperate into different RUNs now. #Resolved