contrib/automation/hgautomation/linux.py
changeset 43018 d1d919f679f7
parent 43015 dffa9d3c2491
child 43076 2372284d9457
equal deleted inserted replaced
43017:6952d42f9158 43018:d1d919f679f7
    19 
    19 
    20 
    20 
    21 # Linux distributions that are supported.
    21 # Linux distributions that are supported.
    22 DISTROS = {
    22 DISTROS = {
    23     'debian9',
    23     'debian9',
       
    24     'debian10',
    24     'ubuntu18.04',
    25     'ubuntu18.04',
    25     'ubuntu19.04',
    26     'ubuntu19.04',
    26 }
    27 }
    27 
    28 
    28 INSTALL_PYTHONS = r'''
    29 INSTALL_PYTHONS = r'''
   188 
   189 
   189 if [ "$LSB_RELEASE" = "stretch" ]; then
   190 if [ "$LSB_RELEASE" = "stretch" ]; then
   190 cat << EOF | sudo tee -a /etc/apt/sources.list
   191 cat << EOF | sudo tee -a /etc/apt/sources.list
   191 # Need backports for clang-format-6.0
   192 # Need backports for clang-format-6.0
   192 deb http://deb.debian.org/debian stretch-backports main
   193 deb http://deb.debian.org/debian stretch-backports main
   193 
   194 EOF
       
   195 fi
       
   196 
       
   197 if [ "$LSB_RELEASE" = "stretch" -o "$LSB_RELEASE" = "buster" ]; then
       
   198 cat << EOF | sudo tee -a /etc/apt/sources.list
   194 # Sources are useful if we want to compile things locally.
   199 # Sources are useful if we want to compile things locally.
   195 deb-src http://deb.debian.org/debian stretch main
   200 deb-src http://deb.debian.org/debian $LSB_RELEASE main
   196 deb-src http://security.debian.org/debian-security stretch/updates main
   201 deb-src http://security.debian.org/debian-security $LSB_RELEASE/updates main
   197 deb-src http://deb.debian.org/debian stretch-updates main
   202 deb-src http://deb.debian.org/debian $LSB_RELEASE-updates main
   198 deb-src http://deb.debian.org/debian stretch-backports main
   203 deb-src http://deb.debian.org/debian $LSB_RELEASE-backports main
   199 
   204 
   200 deb [arch=amd64] https://download.docker.com/linux/debian stretch stable
   205 deb [arch=amd64] https://download.docker.com/linux/debian $LSB_RELEASE stable
   201 EOF
   206 EOF
   202 
   207 
   203 elif [ "$DISTRO" = "Ubuntu" ]; then
   208 elif [ "$DISTRO" = "Ubuntu" ]; then
   204 cat << EOF | sudo tee -a /etc/apt/sources.list
   209 cat << EOF | sudo tee -a /etc/apt/sources.list
   205 deb [arch=amd64] https://download.docker.com/linux/ubuntu $LSB_RELEASE stable
   210 deb [arch=amd64] https://download.docker.com/linux/ubuntu $LSB_RELEASE stable
   277     PACKAGES="$PACKAGES linux-perf"
   282     PACKAGES="$PACKAGES linux-perf"
   278 elif [ "$DISTRO" = "Ubuntu" ]; then
   283 elif [ "$DISTRO" = "Ubuntu" ]; then
   279     PACKAGES="$PACKAGES linux-tools-common"
   284     PACKAGES="$PACKAGES linux-tools-common"
   280 fi
   285 fi
   281 
   286 
   282 # Ubuntu 19.04 removes monotone.
   287 # Monotone only available in older releases.
   283 if [ "$LSB_RELEASE" != "disco" ]; then
   288 if [ "$LSB_RELEASE" = "stretch" -o "$LSB_RELEASE" = "xenial" ]; then
   284     PACKAGES="$PACKAGES monotone"
   289     PACKAGES="$PACKAGES monotone"
   285 fi
   290 fi
   286 
   291 
   287 sudo DEBIAN_FRONTEND=noninteractive apt-get -yq install --no-install-recommends $PACKAGES
   292 sudo DEBIAN_FRONTEND=noninteractive apt-get -yq install --no-install-recommends $PACKAGES
   288 
   293