From 07470e147e7bef3760a387352e1845183b97fbc3 Mon Sep 17 00:00:00 2001 From: Joseph Pacura Date: Fri, 4 Dec 2020 17:15:02 -0500 Subject: [PATCH] Debian 11 (bullseye/testing) support using Debian 10 packages --- README.rst | 6 +++--- bootstrap-salt.sh | 18 ++++++++++++++++-- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index 903ecb0..d188a79 100644 --- a/README.rst +++ b/README.rst @@ -300,9 +300,9 @@ repositories are not provided on `SaltStack's Debian repository`_ for Debian tes However, the bootstrap script will attempt to install the packages for the current stable version of Debian. -For example, when installing Salt on Debian 10 (Buster), the bootstrap script will setup the -repository for Debian 9 (Stretch) from `SaltStack's Debian repository`_ and install the -Debian 9 packages. +For example, when installing Salt on Debian 11 (Bullseye), the bootstrap script will setup the +repository for Debian 10 (Buster) from `SaltStack's Debian repository`_ and install the +Debian 10 packages. Red Hat family diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index a21b8bd..95b075b 100644 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -900,6 +900,8 @@ __derive_debian_numeric_version() { NUMERIC_VERSION=$(__parse_version_string "9.0") elif [ "$INPUT_VERSION" = "buster/sid" ]; then NUMERIC_VERSION=$(__parse_version_string "10.0") + elif [ "$INPUT_VERSION" = "bullseye/sid" ]; then + NUMERIC_VERSION=$(__parse_version_string "11.0") else echowarn "Unable to parse the Debian Version (codename: '$INPUT_VERSION')" fi @@ -1555,6 +1557,9 @@ __debian_codename_translation() { "10") DISTRO_CODENAME="buster" ;; + "11") + DISTRO_CODENAME="bullseye" + ;; *) DISTRO_CODENAME="jessie" ;; @@ -3339,8 +3344,17 @@ install_ubuntu_check_services() { # Debian Install Functions # __install_saltstack_debian_repository() { - DEBIAN_RELEASE="$DISTRO_MAJOR_VERSION" - DEBIAN_CODENAME="$DISTRO_CODENAME" + if [ "$DISTRO_MAJOR_VERSION" -eq 11 ]; then + # Packages for Debian 11 at repo.saltstack.com are not yet available + # Set up repository for Debian 10 for Debian 11 for now until support + # is available at repo.saltstack.com for Debian 11. + echowarn "Debian 11 distribution detected, but stable packages requested. Trying packages from Debian 10. You may experience problems." + DEBIAN_RELEASE="10" + DEBIAN_CODENAME="buster" + else + DEBIAN_RELEASE="$DISTRO_MAJOR_VERSION" + DEBIAN_CODENAME="$DISTRO_CODENAME" + fi __PY_VERSION_REPO="apt" if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then