diff --git a/contrib/automation/hgautomation/aws.py b/contrib/automation/hgautomation/aws.py --- a/contrib/automation/hgautomation/aws.py +++ b/contrib/automation/hgautomation/aws.py @@ -54,6 +54,7 @@ AMAZON_ACCOUNT_ID = '801119661308' DEBIAN_ACCOUNT_ID = '379101102735' +DEBIAN_ACCOUNT_ID_2 = '136693071363' UBUNTU_ACCOUNT_ID = '099720109477' @@ -807,7 +808,7 @@ return image -def ensure_linux_dev_ami(c: AWSConnection, distro='debian9', prefix='hg-'): +def ensure_linux_dev_ami(c: AWSConnection, distro='debian10', prefix='hg-'): """Ensures a Linux development AMI is available and up-to-date. Returns an ``ec2.Image`` of either an existing AMI or a newly-built one. @@ -824,6 +825,13 @@ 'debian-stretch-hvm-x86_64-gp2-2019-09-08-17994', ) ssh_username = 'admin' + elif distro == 'debian10': + image = find_image( + ec2resource, + DEBIAN_ACCOUNT_ID_2, + 'debian-10-amd64-20190909-10', + ) + ssh_username = 'admin' elif distro == 'ubuntu18.04': image = find_image( ec2resource, diff --git a/contrib/automation/hgautomation/cli.py b/contrib/automation/hgautomation/cli.py --- a/contrib/automation/hgautomation/cli.py +++ b/contrib/automation/hgautomation/cli.py @@ -352,7 +352,7 @@ '--distro', help='Linux distribution to run tests on', choices=linux.DISTROS, - default='debian9', + default='debian10', ) sp.add_argument( '--filesystem', diff --git a/contrib/automation/hgautomation/linux.py b/contrib/automation/hgautomation/linux.py --- a/contrib/automation/hgautomation/linux.py +++ b/contrib/automation/hgautomation/linux.py @@ -21,6 +21,7 @@ # Linux distributions that are supported. DISTROS = { 'debian9', + 'debian10', 'ubuntu18.04', 'ubuntu19.04', } @@ -190,14 +191,18 @@ cat << EOF | sudo tee -a /etc/apt/sources.list # Need backports for clang-format-6.0 deb http://deb.debian.org/debian stretch-backports main +EOF +fi +if [ "$LSB_RELEASE" = "stretch" -o "$LSB_RELEASE" = "buster" ]; then +cat << EOF | sudo tee -a /etc/apt/sources.list # Sources are useful if we want to compile things locally. -deb-src http://deb.debian.org/debian stretch main -deb-src http://security.debian.org/debian-security stretch/updates main -deb-src http://deb.debian.org/debian stretch-updates main -deb-src http://deb.debian.org/debian stretch-backports main +deb-src http://deb.debian.org/debian $LSB_RELEASE main +deb-src http://security.debian.org/debian-security $LSB_RELEASE/updates main +deb-src http://deb.debian.org/debian $LSB_RELEASE-updates main +deb-src http://deb.debian.org/debian $LSB_RELEASE-backports main -deb [arch=amd64] https://download.docker.com/linux/debian stretch stable +deb [arch=amd64] https://download.docker.com/linux/debian $LSB_RELEASE stable EOF elif [ "$DISTRO" = "Ubuntu" ]; then @@ -279,8 +284,8 @@ PACKAGES="$PACKAGES linux-tools-common" fi -# Ubuntu 19.04 removes monotone. -if [ "$LSB_RELEASE" != "disco" ]; then +# Monotone only available in older releases. +if [ "$LSB_RELEASE" = "stretch" -o "$LSB_RELEASE" = "xenial" ]; then PACKAGES="$PACKAGES monotone" fi