From 3b60b2544685eb6b99edefdd7bed38c9a7758d73 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Thu, 24 Jun 2021 12:08:36 -0700 Subject: [PATCH] ci: Remove bullseye hack. base-files 11.1 marked bullseye as Debian 11 in /etc/os-release. Signed-off-by: Anders Kaseorg --- puppet/zulip/manifests/profile/base.pp | 2 -- scripts/lib/install | 2 +- scripts/lib/zulip_tools.py | 5 ---- tools/ci/production-install | 35 +++++++------------------- 4 files changed, 10 insertions(+), 34 deletions(-) diff --git a/puppet/zulip/manifests/profile/base.pp b/puppet/zulip/manifests/profile/base.pp index f69a72766c..5b019ab7d3 100644 --- a/puppet/zulip/manifests/profile/base.pp +++ b/puppet/zulip/manifests/profile/base.pp @@ -24,8 +24,6 @@ class zulip::profile::base { /^9\.[0-9]*$/ => 'stretch', /^10\.[0-9]*$/ => 'buster', /^11\.[0-9]*$/ => 'bullseye', - # This next line is temporary until bullseye releases. - /bullseye\/sid/ => 'bullseye', # Ubuntu releases '12.04' => 'precise', '14.04' => 'trusty', diff --git a/scripts/lib/install b/scripts/lib/install index 74ce652f82..da897788fa 100755 --- a/scripts/lib/install +++ b/scripts/lib/install @@ -220,8 +220,8 @@ case "$os_id$os_version_id" in Unsupported OS release: $os_id $os_version_id Zulip in production is supported only on: - - Debian 11 "bullseye" (beta) - Debian 10 "buster" + - Debian 11 "bullseye" (beta) - Ubuntu 18.04 LTS "bionic" - Ubuntu 20.04 LTS "focal" diff --git a/scripts/lib/zulip_tools.py b/scripts/lib/zulip_tools.py index 4244b8bdeb..ee7bf1951f 100755 --- a/scripts/lib/zulip_tools.py +++ b/scripts/lib/zulip_tools.py @@ -426,11 +426,6 @@ def parse_os_release() -> Dict[str, str]: continue k, v = line.split("=", 1) [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 diff --git a/tools/ci/production-install b/tools/ci/production-install index e6fa8ddaf8..13947bec1a 100755 --- a/tools/ci/production-install +++ b/tools/ci/production-install @@ -47,37 +47,20 @@ tar -xf /tmp/zulip-server-test.tar.gz -C "$ZULIP_PATH" --strip-components=1 APT_OPTIONS=(-o 'Dpkg::Options::=--force-confdef' -o 'Dpkg::Options::=--force-confold') apt-get update -if [ -f /etc/os-release ]; then - # This is a temporary hack to test Debian Bullseye systems as - # though Bullseye was already released, so we don't need to - # change all of our scripts to parse bullseye/sid. - check_pretty_name="$( - . /etc/os-release - printf '%s\n' "$PRETTY_NAME" - )" - { read -r pretty_name; } <<<"$check_pretty_name" - - if [ "$pretty_name" = "Debian GNU/Linux bullseye/sid" ]; then - echo "VERSION_CODENAME=bullseye" | tee -a >>/etc/os-release - echo "VERSION_ID=\"11\"" | tee -a >>/etc/os-release - fi - # End hack - - os_info="$( - . /etc/os-release - printf '%s\n' "$ID" "$VERSION_ID" - )" - { - read -r os_id - read -r os_version_id - } <<<"$os_info" -fi - if ! apt-get dist-upgrade -y "${APT_OPTIONS[@]}"; then echo "\`apt-get dist-upgrade\`: Failure occurred while trying to perform distribution upgrade, Retrying..." apt-get dist-upgrade -y "${APT_OPTIONS[@]}" fi +os_info="$( + . /etc/os-release + printf '%s\n' "$ID" "$VERSION_ID" +)" +{ + read -r os_id + read -r os_version_id +} <<<"$os_info" + # Pin to PostgreSQL 10 on Bionic, so we can test upgrading it if [ "$os_id $os_version_id" = 'ubuntu 18.04' ]; then export POSTGRESQL_VERSION=10