From 2da32a5a458a5b420c5927ae9f92a5eb27a970b9 Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Wed, 13 Jan 2021 20:43:57 +0000 Subject: [PATCH 1/2] Remove things needed for building Python 3 --- sonic-slave-buster/Dockerfile.j2 | 18 ------------- sonic-slave-jessie/Dockerfile.j2 | 18 ------------- sonic-slave-stretch/Dockerfile.j2 | 18 ------------- src/python3/.gitignore | 3 --- src/python3/Makefile | 43 ------------------------------- 5 files changed, 100 deletions(-) delete mode 100644 src/python3/.gitignore delete mode 100644 src/python3/Makefile diff --git a/sonic-slave-buster/Dockerfile.j2 b/sonic-slave-buster/Dockerfile.j2 index bc6ab531d9c..5b4d6e7ccfd 100644 --- a/sonic-slave-buster/Dockerfile.j2 +++ b/sonic-slave-buster/Dockerfile.j2 @@ -197,24 +197,6 @@ RUN apt-get update && apt-get install -y \ lua-cjson-dev \ # For mft kernel module build dkms \ -# For python3.5 build - sharutils \ - libncursesw5-dev \ - libbz2-dev \ - liblzma-dev \ - libgdbm-dev \ - tk-dev \ - blt-dev \ - libmpdec-dev \ - libbluetooth-dev \ - locales \ - libsqlite3-dev \ - libgpm2 \ - time \ - net-tools \ - xvfb \ - python-sphinx \ - python3-sphinx \ # For Jenkins static analysis, unit testing and code coverage cppcheck \ clang \ diff --git a/sonic-slave-jessie/Dockerfile.j2 b/sonic-slave-jessie/Dockerfile.j2 index 2914deb7842..f103dfb789b 100644 --- a/sonic-slave-jessie/Dockerfile.j2 +++ b/sonic-slave-jessie/Dockerfile.j2 @@ -176,24 +176,6 @@ RUN apt-get update && apt-get install -y \ libjemalloc-dev \ # For mft kernel module build dkms \ -# For python3.5 build - sharutils \ - libncursesw5-dev \ - libbz2-dev \ - liblzma-dev \ - libgdbm-dev \ - tk-dev \ - blt-dev \ - libmpdec-dev \ - libbluetooth-dev \ - locales \ - libsqlite3-dev \ - libgpm2 \ - time \ - net-tools \ - xvfb \ - python-sphinx \ - python3-sphinx \ # For Jenkins static analysis, unit testing and code coverage cppcheck \ clang \ diff --git a/sonic-slave-stretch/Dockerfile.j2 b/sonic-slave-stretch/Dockerfile.j2 index 53f2791e583..103a9cd7783 100644 --- a/sonic-slave-stretch/Dockerfile.j2 +++ b/sonic-slave-stretch/Dockerfile.j2 @@ -196,24 +196,6 @@ RUN apt-get update && apt-get install -y \ lua-cjson-dev \ # For mft kernel module build dkms \ -# For python3.5 build - sharutils \ - libncursesw5-dev \ - libbz2-dev \ - liblzma-dev \ - libgdbm-dev \ - tk-dev \ - blt-dev \ - libmpdec-dev \ - libbluetooth-dev \ - locales \ - libsqlite3-dev \ - libgpm2 \ - time \ - net-tools \ - xvfb \ - python-sphinx \ - python3-sphinx \ # For Jenkins static analysis, unit testing and code coverage cppcheck \ clang \ diff --git a/src/python3/.gitignore b/src/python3/.gitignore deleted file mode 100644 index a0991ff4402..00000000000 --- a/src/python3/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -* -!.gitignore -!Makefile diff --git a/src/python3/Makefile b/src/python3/Makefile deleted file mode 100644 index 1c37e9d06c4..00000000000 --- a/src/python3/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -.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)_$(CONFIGURED_ARCH).deb -DERIVED_TARGETS = lib$(PYTHON_PNAME)-stdlib_$(PYTHON_VER)-$(PYTHON_DEB_VER)_$(CONFIGURED_ARCH).deb \ - lib$(PYTHON_PNAME)_$(PYTHON_VER)-$(PYTHON_DEB_VER)_$(CONFIGURED_ARCH).deb \ - $(PYTHON_PNAME)-minimal_$(PYTHON_VER)-$(PYTHON_DEB_VER)_$(CONFIGURED_ARCH).deb \ - $(PYTHON_PNAME)_$(PYTHON_VER)-$(PYTHON_DEB_VER)_$(CONFIGURED_ARCH).deb \ - lib$(PYTHON_PNAME)-dev_$(PYTHON_VER)-$(PYTHON_DEB_VER)_$(CONFIGURED_ARCH).deb - #$(PYTHON_PNAME)-dev_$(PYTHON_VER)-$(PYTHON_DEB_VER)_$(CONFIGURED_ARCH).deb - -$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : - # Remove any stale files - rm -rf $(PYTHON_PNAME)-$(PYTHON_VER) - - ## 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) - mk-build-deps - - # put a lock here because dpkg does not allow installing packages in parallel - while true; do - if mkdir $(DEST)/dpkg_lock &> /dev/null; then - { echo here && (sudo dpkg -i $(PYTHON_PNAME)-build-deps_$(PYTHON_VER)-$(PYTHON_DEB_VER)_$(CONFIGURED_ARCH).deb || sudo apt-get install -f) && rm -d $(DEST)/dpkg_lock && break; } || { rm -d $(DEST)/dpkg_lock && exit 1 ; } - fi - done - - dpkg-buildpackage -rfakeroot -us -uc -b -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $(SONIC_DPKG_ADMINDIR) - popd - - cp $(DERIVED_TARGETS) $* $(DEST)/ - -$(addprefix $(DEST)/, $(DERIVED_TARGETS)): $(DEST)/% : $(DEST)/$(MAIN_TARGET) From 044781c059f868e27717e7433cf0eedcc1898e8c Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Wed, 13 Jan 2021 23:29:25 +0000 Subject: [PATCH 2/2] Add libbz2-dev back to Buster slave; needed by kdump-tools --- sonic-slave-buster/Dockerfile.j2 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sonic-slave-buster/Dockerfile.j2 b/sonic-slave-buster/Dockerfile.j2 index 5b4d6e7ccfd..0a2d51ca3e4 100644 --- a/sonic-slave-buster/Dockerfile.j2 +++ b/sonic-slave-buster/Dockerfile.j2 @@ -319,7 +319,9 @@ RUN apt-get update && apt-get install -y \ libncurses5-dev \ libpcsclite-dev \ docbook-to-man \ - docbook-utils + docbook-utils \ +# For kdump-tools + libbz2-dev # Build fix for ARMHF buster libsairedis {%- if CONFIGURED_ARCH == "armhf" %}