CircleCI-Public / azure-cli-orb

CircleCI orb to install and configure the Azure CLI
https://circleci.com/orbs/registry/orb/circleci/azure-cli
MIT License
2 stars 13 forks source link

Failure while install - Repository 'http://security.debian.org' changed its 'Suite' value from 'stable' to 'oldstable' #15

Closed RonnyTite closed 2 years ago

RonnyTite commented 3 years ago

Orb version

What happened

Orb version : azure-cli@1.2.0

While using install, i encountered this issue

#!/bin/bash -eo pipefail
# Verify the CLI isn't already installed
# Use which instead of command -v for wider coverage of envs

if which az > /dev/null; then
  echo "Azure CLI installed already."
  exit 0
fi

# Set sudo to work whether logged in as root user or non-root user

if [[ $EUID == 0 ]]; then export SUDO=""; else export SUDO="sudo"; fi

$SUDO apt-get update && $SUDO apt-get -qqy install apt-transport-https

if [[ $(command -v lsb_release) == "" ]]; then
  echo "Installing lsb_release"
  $SUDO apt-get -qqy install lsb-release
fi

# Create an environment variable for the correct distribution
export AZ_REPO=$(lsb_release -cs)

# Modify your sources list

echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | \
  $SUDO tee /etc/apt/sources.list.d/azure-cli.list

if [[ $(command -v curl) == "" ]]; then
  echo "Installing curl"
  $SUDO apt-get -qqy install curl
fi

# Get the Microsoft signing key

curl -L https://packages.microsoft.com/keys/microsoft.asc | $SUDO apt-key add -

# Update and install the Azure CLI

$SUDO apt-get update
$SUDO apt-get -qqy install \
  ca-certificates \
  azure-cli
echo "Azure CLI is now installed."

Get:1 http://deb.debian.org/debian buster InRelease [122 kB]
Get:2 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:3 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
Reading package lists... Done      
E: Repository 'http://security.debian.org/debian-security buster/updates InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
N: Repository 'http://deb.debian.org/debian buster InRelease' changed its 'Version' value from '10.6' to '10.10'
E: Repository 'http://deb.debian.org/debian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
E: Repository 'http://deb.debian.org/debian buster-updates InRelease' changed its 'Suite' value from 'stable-updates' to 'oldstable-updates'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
Installing lsb_release
E: Failed to fetch http://deb.debian.org/debian/pool/main/p/python3.7/libpython3.7-minimal_3.7.3-2+deb10u2_amd64.deb  404  Not Found [IP: 151.101.250.132 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/p/python3.7/python3.7-minimal_3.7.3-2+deb10u2_amd64.deb  404  Not Found [IP: 151.101.250.132 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/p/python3.7/libpython3.7-stdlib_3.7.3-2+deb10u2_amd64.deb  404  Not Found [IP: 151.101.250.132 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/p/python3.7/python3.7_3.7.3-2+deb10u2_amd64.deb  404  Not Found [IP: 151.101.250.132 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/d/distro-info-data/distro-info-data_0.41+deb10u2_all.deb  404  Not Found [IP: 151.101.250.132 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Exited with code exit status 100
CircleCI received exit code 100

Expected behavior

Installation success !

RonnyTite commented 3 years ago

i see this on the stack

E: Failed to fetch http://deb.debian.org/debian/pool/main/p/python3.7/libpython3.7-minimal_3.7.3-2+deb10u2_amd64.deb  404  Not Found [IP: 151.101.250.132 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/p/python3.7/python3.7-minimal_3.7.3-2+deb10u2_amd64.deb  404  Not Found [IP: 151.101.250.132 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/p/python3.7/libpython3.7-stdlib_3.7.3-2+deb10u2_amd64.deb  404  Not Found [IP: 151.101.250.132 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/p/python3.7/python3.7_3.7.3-2+deb10u2_amd64.deb  404  Not Found [IP: 151.101.250.132 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/d/distro-info-data/distro-info-data_0.41+deb10u2_all.deb  404  Not Found [IP: 151.101.250.132 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

it seem that the version of libpython3.7-minimal_3.7.3-2+deb10u2_arm64.deb has changed to libpython3.7-minimal_3.7.3-2+deb10u3_arm64.deb

deb10u2 to deb10u3

The fix being to replace:

apt-get update

by

apt-get --allow-releaseinfo-change update

Source: https://stackoverflow.com/questions/68802802/repository-http-security-debian-org-debian-security-buster-updates-inrelease

EricRibeiro commented 2 years ago

Hi @RonnyTite 👋 ,

Thank you for opening this issue and pushing the fix for it.

I'll leave my review in the PR, and as soon as you take a look, I'll merge it.

RonnyTite commented 2 years ago

Hi @RonnyTite 👋 ,

Thank you for opening this issue and pushing the fix for it.

I'll leave my review in the PR, and as soon as you take a look, I'll merge it.

Hey @EricRibeiro, it's done ✔️ , thx

EricRibeiro commented 2 years ago

Closed in #16.