Update to Debian bullseye

bullseye is the latest stable, and this is what we will be using for
Cloud Native GitLab going forward so we should test with this.

Since an upgrade of the operating system may break pre-compiled C
extensions, we now introduce a DEBIAN environment flag that defaults
to the legacy buster install but allows us to roll out a bullseye
image with `debian-bullseye` as the image name prefix.
This commit is contained in:
Stan Hu 2022-02-09 08:29:08 -08:00
parent cc18fe8b5b
commit 9d6dd5061a
No known key found for this signature in database
GPG key ID: 8D3931AD39CC7A20
10 changed files with 50 additions and 15 deletions

View file

@ -10,9 +10,7 @@ apt-get update
# We install `git-core` as some tooling expect `/usr/bin/git`
# other tools that rely on PATH ordering will pick a one in `/usr/local`
# if present
if grep "Debian GNU/Linux 9" /etc/issue
then
function install_debian_stretch_deps() {
apt-get install -y \
curl wget build-essential apt-utils locales openssh-client \
libssl-dev libyaml-dev libreadline6-dev zlib1g-dev \
@ -23,7 +21,9 @@ then
libkrb5-dev postgresql-client mysql-client unzip \
libsqlite3-dev libpq-dev libpng-dev libjpeg-dev libzstd-dev \
libre2-dev libevent-dev gettext rsync git-core
else
}
function install_debian_buster_deps() {
apt-get install -y \
curl wget build-essential apt-utils locales openssh-client \
libssl-dev libyaml-dev libreadline-dev zlib1g-dev \
@ -33,7 +33,33 @@ else
libkrb5-dev postgresql-client unzip \
libsqlite3-dev libpq-dev libpng-dev libjpeg-dev libzstd-dev \
libre2-dev libevent-dev gettext rsync git-core
fi
}
function install_debian_bullseye_deps() {
apt-get install -y \
curl wget build-essential apt-utils locales openssh-client \
libssl-dev libyaml-dev libreadline-dev zlib1g-dev \
libncurses5-dev libffi-dev ca-certificates libxml2-dev \
libxslt1-dev libcurl4-openssl-dev libicu-dev \
logrotate python3-docutils pkg-config cmake \
libkrb5-dev postgresql-client unzip \
libsqlite3-dev libpq-dev libpng-dev libjpeg-dev libzstd-dev \
libre2-dev libevent-dev gettext rsync git-core
}
VERSION=`cat /etc/issue | cut -d ' ' -f 3`
case "$VERSION" in
9)
install_debian_stretch_deps
;;
10)
install_debian_buster_deps
;;
11)
install_debian_bullseye_deps
;;
esac
# Set UTF-8
# http://stackoverflow.com/a/3182519/2137281