provision: Add support for debian bullseye.

Fixes part of #17863.
This commit is contained in:
Gaurav Pandey 2021-04-02 01:04:17 +05:30 committed by Tim Abbott
parent 9de35d98d3
commit 78524d4f87
6 changed files with 21 additions and 5 deletions

View File

@ -14,7 +14,7 @@ If you'd like to install a Zulip development environment on a computer
that's running one of: that's running one of:
* Ubuntu 20.04 Focal, 18.04 Bionic * Ubuntu 20.04 Focal, 18.04 Bionic
* Debian 10 Buster * Debian 10 Buster, 11 Bullseye (beta)
* CentOS 7 (beta) * CentOS 7 (beta)
* Fedora 33 (beta) * Fedora 33 (beta)
* RHEL 7 (beta) * RHEL 7 (beta)

View File

@ -49,7 +49,7 @@ a proxy to access the internet.)
- **All**: 2GB available RAM, Active broadband internet connection, [GitHub account][set-up-git]. - **All**: 2GB available RAM, Active broadband internet connection, [GitHub account][set-up-git].
- **macOS**: macOS (10.11 El Capitan or newer recommended) - **macOS**: macOS (10.11 El Capitan or newer recommended)
- **Ubuntu LTS**: 20.04 or 18.04 - **Ubuntu LTS**: 20.04 or 18.04
- or **Debian**: 10 "buster" - or **Debian**: 10 "buster" or 11 "bullseye"
- **Windows**: Windows 64-bit (Win 10 recommended), hardware - **Windows**: Windows 64-bit (Win 10 recommended), hardware
virtualization enabled (VT-x or AMD-V), administrator access. virtualization enabled (VT-x or AMD-V), administrator access.

View File

@ -67,7 +67,7 @@ deb-src http://apt.postgresql.org/pub/repos/apt/ $release-pgdg main
deb http://ppa.launchpad.net/groonga/ppa/ubuntu $release main deb http://ppa.launchpad.net/groonga/ppa/ubuntu $release main
deb-src http://ppa.launchpad.net/groonga/ppa/ubuntu $release main deb-src http://ppa.launchpad.net/groonga/ppa/ubuntu $release main
EOF EOF
elif [[ "$release" =~ ^(buster)$ ]]; then elif [[ "$release" =~ ^(buster|bullseye)$ ]]; then
distribution=debian distribution=debian
apt-key add "$SCRIPTS_PATH"/setup/pgdg.asc apt-key add "$SCRIPTS_PATH"/setup/pgdg.asc
cat >$SOURCES_FILE <<EOF cat >$SOURCES_FILE <<EOF

View File

@ -56,7 +56,7 @@ apt-get -y install "${pre_setup_deps[@]}"
SCRIPTS_PATH="$(cd "$(dirname "$(dirname "$0")")" && pwd)" SCRIPTS_PATH="$(cd "$(dirname "$(dirname "$0")")" && pwd)"
release=$(lsb_release -sc) release=$(lsb_release -sc)
if [[ "$release" =~ ^(buster|bionic|cosmic|disco|eoan|focal|groovy)$ ]]; then if [[ "$release" =~ ^(buster|bullseye|bionic|cosmic|disco|eoan|focal|groovy)$ ]]; then
apt-key add "$SCRIPTS_PATH"/setup/ksplice.asc apt-key add "$SCRIPTS_PATH"/setup/ksplice.asc
cat >$SOURCES_FILE <<EOF cat >$SOURCES_FILE <<EOF
deb http://www.ksplice.com/apt $release ksplice deb http://www.ksplice.com/apt $release ksplice

View File

@ -425,6 +425,11 @@ def parse_os_release() -> Dict[str, str]:
continue continue
k, v = line.split("=", 1) k, v = line.split("=", 1)
[distro_info[k]] = shlex.split(v) [distro_info[k]] = shlex.split(v)
if distro_info["PRETTY_NAME"] == "Debian GNU/Linux bullseye/sid":
# This hack can be removed once bullseye releases and reports
# its VERSION_ID in /etc/os-release.
distro_info["VERSION_CODENAME"] = "bullseye"
distro_info["VERSION_ID"] = "11"
return distro_info return distro_info

View File

@ -97,6 +97,8 @@ vendor = distro_info["ID"]
os_version = distro_info["VERSION_ID"] os_version = distro_info["VERSION_ID"]
if vendor == "debian" and os_version == "10": # buster if vendor == "debian" and os_version == "10": # buster
POSTGRESQL_VERSION = "11" POSTGRESQL_VERSION = "11"
elif vendor == "debian" and os_version == "11": # bullseye
POSTGRESQL_VERSION = "13"
elif vendor == "ubuntu" and os_version in ["18.04", "18.10"]: # bionic, cosmic elif vendor == "ubuntu" and os_version in ["18.04", "18.10"]: # bionic, cosmic
POSTGRESQL_VERSION = "10" POSTGRESQL_VERSION = "10"
elif vendor == "ubuntu" and os_version in ["19.04", "19.10"]: # disco, eoan elif vendor == "ubuntu" and os_version in ["19.04", "19.10"]: # disco, eoan
@ -197,8 +199,17 @@ if vendor == "debian" and os_version in [] or vendor == "ubuntu" and os_version
*VENV_DEPENDENCIES, *VENV_DEPENDENCIES,
] ]
elif "debian" in os_families(): elif "debian" in os_families():
DEBIAN_DEPENDECIES = UBUNTU_COMMON_APT_DEPENDENCIES
# The below condition is required since libappindicator is
# not available for bullseye (sid). "libgroonga1" is an
# additional depedency for postgresql-13-pgdg-pgroonga.
#
# See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895037
if distro_info["VERSION_CODENAME"] == "bullseye":
DEBIAN_DEPENDECIES.remove("libappindicator1")
DEBIAN_DEPENDECIES.append("libgroonga0")
SYSTEM_DEPENDENCIES = [ SYSTEM_DEPENDENCIES = [
*UBUNTU_COMMON_APT_DEPENDENCIES, *DEBIAN_DEPENDECIES,
f"postgresql-{POSTGRESQL_VERSION}", f"postgresql-{POSTGRESQL_VERSION}",
f"postgresql-{POSTGRESQL_VERSION}-pgdg-pgroonga", f"postgresql-{POSTGRESQL_VERSION}-pgdg-pgroonga",
*VENV_DEPENDENCIES, *VENV_DEPENDENCIES,