From a1e0979c27ba4106cb756a4663f31d72cc34fda3 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 24 Aug 2026 23:12:50 +0930 Subject: [PATCH] [Core] Fix #33282: `az`: Support Ubuntu 26.04 LTS (resolute) in deb install script * Initial plan * [Core] Fix #33282: `az`: Support Ubuntu 26.04 LTS (resolute) in deb install script Co-authored-by: a0x1ab <59631311+a0x1ab@users.noreply.github.com> * Cache dists response to avoid redundant curl calls in Ubuntu fallback loop Co-authored-by: a0x1ab <59631311+a0x1ab@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: a0x1ab <59631311+a0x1ab@users.noreply.github.com> --- scripts/release/debian/deb_install.sh | 15 +++++++++++++-- scripts/release/debian/test_deb_install.sh | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/scripts/release/debian/deb_install.sh b/scripts/release/debian/deb_install.sh index 529da64adaf..4326061f22b 100755 --- a/scripts/release/debian/deb_install.sh +++ b/scripts/release/debian/deb_install.sh @@ -60,10 +60,21 @@ setup() { CLI_REPO=$(lsb_release -cs) shopt -s nocasematch ERROR_MSG="Unable to find a package for your system. Please check if an existing package in https://packages.microsoft.com/repos/azure-cli/dists/ can be used in your system and install with the dist name: 'curl -sL https://aka.ms/InstallAzureCLIDeb | sudo DIST_CODE= bash'" - if [[ ! $(curl -sL https://packages.microsoft.com/repos/azure-cli/dists/) =~ $CLI_REPO ]]; then + AZURE_CLI_DISTS=$(curl -sL https://packages.microsoft.com/repos/azure-cli/dists/) + if [[ ! $AZURE_CLI_DISTS =~ $CLI_REPO ]]; then DIST=$(lsb_release -is) if [[ $DIST =~ "Ubuntu" ]]; then - CLI_REPO="jammy" + # Try supported Ubuntu LTS codenames newest-first + for lts_codename in noble jammy focal; do + if [[ $AZURE_CLI_DISTS =~ $lts_codename ]]; then + CLI_REPO="$lts_codename" + break + fi + done + if [[ -z $CLI_REPO ]]; then + echo "$ERROR_MSG" + exit 1 + fi elif [[ $DIST =~ "Debian" ]]; then CLI_REPO="bookworm" elif [[ $DIST =~ "LinuxMint" ]]; then diff --git a/scripts/release/debian/test_deb_install.sh b/scripts/release/debian/test_deb_install.sh index 92a34499e72..6ae55059933 100644 --- a/scripts/release/debian/test_deb_install.sh +++ b/scripts/release/debian/test_deb_install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -base_images=("ubuntu:xenial" "ubuntu:bionic" "debian:stretch" "debian:jessie" "debian:buster") +base_images=("ubuntu:xenial" "ubuntu:bionic" "ubuntu:noble" "debian:stretch" "debian:jessie" "debian:buster") set -e