devops: fix pip3 for webkit ubuntu18.04 build (#16142)

The canonical script to install pip3 doesn't work with Python3.6
that is used to compile WebKit on Ubuntu 18.04, so we fallback
to installing pip3 from apt.
This commit is contained in:
Andrey Lushnikov 2022-08-02 05:24:09 -07:00 committed by GitHub
parent cadb3566c3
commit 5e16df5057
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -136,6 +136,7 @@ function ensure_docker_container {
tzdata \ tzdata \
sudo \ sudo \
zip \ zip \
gcc \
unzip unzip
# We will use clang-12 for all arm64 native builds. # We will use clang-12 for all arm64 native builds.
@ -143,6 +144,7 @@ function ensure_docker_container {
apt-get install -y clang-12 apt-get install -y clang-12
fi fi
# Install Python3.
# Firefox build on Ubuntu 18.04 requires Python3.8 to run its build scripts. # Firefox build on Ubuntu 18.04 requires Python3.8 to run its build scripts.
# WebKit build on Ubuntu 18.04 fails with the Python 3.8 installation but works # WebKit build on Ubuntu 18.04 fails with the Python 3.8 installation but works
# with Python 3.6 that is shipped as default python3 on Ubuntu 18. # with Python 3.6 that is shipped as default python3 on Ubuntu 18.
@ -150,32 +152,24 @@ function ensure_docker_container {
apt-get install -y python3.8 python3.8-dev python3.8-distutils apt-get install -y python3.8 python3.8-dev python3.8-distutils
# Point python3 to python3.8 # Point python3 to python3.8
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 2 update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 2
curl -sSL https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
python3 get-pip.py && \
rm get-pip.py
else else
apt-get install -y python3 python3-dev python3-distutils apt-get install -y python3 python3-dev python3-pip python3-distutils
fi fi
curl -sSL https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ # Install AZ CLI with Python since they do not ship
python3 get-pip.py && \ # aarch64 to APT: https://github.com/Azure/azure-cli/issues/7368
rm get-pip.py # Pin so future releases dont break us.
pip3 install azure-cli==2.38.0
# Create the pwuser and make it passwordless sudoer. # Create the pwuser and make it passwordless sudoer.
adduser --disabled-password --gecos "" pwuser adduser --disabled-password --gecos "" pwuser
echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers
# Install node16 # Install node16
apt-get install -y curl && \ curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
curl -sL https://deb.nodesource.com/setup_16.x | bash - && \
apt-get install -y nodejs
# Install AZ CLI on CI only
if [[ -n "${CI}" ]]; then
# Install AZ CLI with Python since they do not ship
# aarch64 to APT: https://github.com/Azure/azure-cli/issues/7368
# Pin so future releases dont break us.
# Note: azure-cli requires gcc to be installed on arm64 ubuntu.
apt-get install -y gcc
pip3 install azure-cli==2.38.0
fi
if [[ "${BUILD_FLAVOR}" == "firefox-"* ]]; then if [[ "${BUILD_FLAVOR}" == "firefox-"* ]]; then
# install rust as a pwuser # install rust as a pwuser