diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e76c2915959..c9a845c0320 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -761,31 +761,35 @@ jobs: vmImage: 'ubuntu-20.04' strategy: matrix: + # https://wiki.ubuntu.com/Releases Xenial: + # 16.04 deb_system: ubuntu distro: xenial - Trusty: - deb_system: ubuntu - distro: trusty Bionic: + # 18.04 deb_system: ubuntu distro: bionic Focal: + # 20.04 deb_system: ubuntu distro: focal Hirsute: + # 21.04 deb_system: ubuntu distro: hirsute - Jessie: - deb_system: debian - distro: jessie + + # https://wiki.debian.org/DebianReleases Stretch: + # 9 deb_system: debian distro: stretch Buster: + # 10 deb_system: debian distro: buster Bullseye: + # 11 deb_system: debian distro: bullseye steps: diff --git a/scripts/release/debian/Dockerfile b/scripts/release/debian/Dockerfile index 6fd8d9d2b20..a3818d8839c 100644 --- a/scripts/release/debian/Dockerfile +++ b/scripts/release/debian/Dockerfile @@ -6,7 +6,7 @@ RUN apt-get update RUN apt-get install -y libssl-dev libffi-dev python3-dev debhelper zlib1g-dev wget # Download Python source code -ARG python_version="3.6.10" +ARG python_version="3.8.12" ENV PYTHON_SRC_DIR=/usr/src/python RUN mkdir -p ${PYTHON_SRC_DIR} && \ wget -qO- https://www.python.org/ftp/python/${python_version}/Python-${python_version}.tgz \ diff --git a/scripts/release/debian/build.sh b/scripts/release/debian/build.sh index 1c3530afba4..f5a321152e2 100755 --- a/scripts/release/debian/build.sh +++ b/scripts/release/debian/build.sh @@ -15,12 +15,13 @@ set -exv ls -Rl /mnt/artifacts WORKDIR=`cd $(dirname $0); cd ../../../; pwd` -PYTHON_VERSION="3.6.10" +PYTHON_VERSION="3.8.12" SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Update APT packages apt-get update -apt-get install -y libssl-dev libffi-dev python3-dev debhelper zlib1g-dev +# uuid-dev is used to build _uuid module: https://github.com/python/cpython/pull/3796 +apt-get install -y libssl-dev libffi-dev python3-dev debhelper zlib1g-dev uuid-dev apt-get install -y wget # Download Python source code @@ -33,7 +34,7 @@ $PYTHON_SRC_DIR/*/configure --srcdir $PYTHON_SRC_DIR/* --prefix $WORKDIR/python_ make make install -$WORKDIR/python_env/bin/python3 -m pip install --upgrade pip==21.0.1 +$WORKDIR/python_env/bin/python3 -m pip install --upgrade pip export PATH=$PATH:$WORKDIR/python_env/bin diff --git a/scripts/release/debian/prepare.sh b/scripts/release/debian/prepare.sh index c35181a5704..714eef29d1b 100755 --- a/scripts/release/debian/prepare.sh +++ b/scripts/release/debian/prepare.sh @@ -78,7 +78,7 @@ Azure CLI Copyright (c) Microsoft Corporation -All rights reserved. +All rights reserved. MIT License @@ -90,7 +90,7 @@ THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI EOM -# TODO: Instead of "_ssl.cpython-36m-x86_64-linux-gnu.so" only, find all .so files with "find debian/azure-cli/opt/az -type f -name '*.so'" +# TODO: Instead of "_ssl.cpython-38-x86_64-linux-gnu.so" only, find all .so files with "find debian/azure-cli/opt/az -type f -name '*.so'" cat > $debian_dir/rules << EOM #!/usr/bin/make -f @@ -110,7 +110,7 @@ ${TAB}echo "\043!/usr/bin/env bash\nbin_dir=\140cd \"\044(dirname \"\044BASH_SOU ${TAB}chmod 0755 debian/azure-cli/usr/bin/az ${TAB}mkdir -p debian/azure-cli/etc/bash_completion.d/ ${TAB}cat ${completion_script} > debian/azure-cli/etc/bash_completion.d/azure-cli -${TAB}dpkg-shlibdeps -v --warnings=7 -Tdebian/azure-cli.substvars -dDepends -edebian/azure-cli/opt/az/bin/python3 debian/azure-cli/opt/az/lib/python3.6/lib-dynload/_ssl.cpython-36m-x86_64-linux-gnu.so +${TAB}dpkg-shlibdeps -v --warnings=7 -Tdebian/azure-cli.substvars -dDepends -edebian/azure-cli/opt/az/bin/python3 debian/azure-cli/opt/az/lib/python3.8/lib-dynload/_ssl.cpython-38-x86_64-linux-gnu.so override_dh_strip: diff --git a/scripts/release/debian/test_deb_package.py b/scripts/release/debian/test_deb_package.py index add6309a1cd..c861f648ace 100644 --- a/scripts/release/debian/test_deb_package.py +++ b/scripts/release/debian/test_deb_package.py @@ -7,7 +7,7 @@ import sys import subprocess -root_dir = '/opt/az/lib/python3.6/site-packages/azure/cli/command_modules' +root_dir = '/opt/az/lib/python3.8/site-packages/azure/cli/command_modules' mod_list = [mod for mod in sorted(os.listdir(root_dir)) if os.path.isdir(os.path.join(root_dir, mod)) and mod != '__pycache__'] pytest_base_cmd = '/opt/az/bin/python3 -m pytest -x -v --boxed -p no:warnings --log-level=WARN'