install: Add beta support for debian bullseye for production.

This won't work on a real bullseye system until Bullseye actually
officially releases.

Fixes part of #17863.
This commit is contained in:
Gaurav Pandey 2021-04-02 13:12:33 +05:30 committed by Tim Abbott
parent 78524d4f87
commit feb720b463
3 changed files with 18 additions and 1 deletions

View File

@ -23,6 +23,7 @@ class zulip::profile::base {
/^8\.[0-9]*$/ => 'jessie',
/^9\.[0-9]*$/ => 'stretch',
/^10\.[0-9]*$/ => 'buster',
/^11\.[0-9]*$/ => 'bullseye',
# Ubuntu releases
'12.04' => 'precise',
'14.04' => 'trusty',

View File

@ -196,7 +196,7 @@ if [ -f /etc/os-release ]; then
fi
case "$os_id$os_version_id" in
debian10 | ubuntu18.04 | ubuntu20.04) ;;
debian10 | debian11 | ubuntu18.04 | ubuntu20.04) ;;
*)
set +x
cat <<EOF
@ -204,6 +204,7 @@ 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"
- Ubuntu 18.04 LTS "bionic"
- Ubuntu 20.04 LTS "focal"

View File

@ -11,6 +11,21 @@ APT_OPTIONS=(-o 'Dpkg::Options::=--force-confdef' -o 'Dpkg::Options::=--force-co
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' "$VERSION_CODENAME"