Skip to content

Commit 573865b

Browse files
committed
Adjusted build host setup script to handle debian-11(bullseye)
Latest LTS (default for cf-remote install) has only debian > 11 Ticket: ENT-13483 Changelog: none
1 parent ac3440f commit 573865b

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

ci/setup-cfengine-build-host.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,6 @@ if [ -f /etc/os-release ]; then
8686
elif grep debian /etc/os-release; then
8787
DEBIAN_FRONTEND=noninteractive apt upgrade --yes && DEBIAN_FRONTEND=noninteractive apt autoremove --yes
8888
alias software='DEBIAN_FRONTEND=noninteractive apt install --yes'
89-
if grep stretch /etc/os-release; then
90-
DEBIAN_STRETCH=1 # special case, cf-remote install needs to NOT use master as there are no packages there
91-
fi
9289
elif grep suse /etc/os-release; then
9390
zypper -n update
9491
alias software='zypper install -y'
@@ -172,8 +169,10 @@ echo "Checking for pre-installed CFEngine (chicken/egg problem)"
172169
# We need a cf-agent to run build host setup policy and redhat-10-arm did not have a previous package to install.
173170
if ! /var/cfengine/bin/cf-agent -V; then
174171
echo "No existing CFEngine install found, try cf-remote..."
175-
if [ -n "$DEBIAN_STRETCH" ]; then
176-
_VERSION="--version 3.21.8"
172+
if grep -i stretch /etc/os-release; then
173+
_VERSION="--version 3.21.8" # 3.27.0 and 3.24.x do not have debian 9 (stretch)
174+
elif grep -i bullseye /etc/os-release; then
175+
_VERSION="--version 3.24.3" # 3.27.0 has only debian > 11 (bullseye)
177176
elif grep suse /etc/os-release; then
178177
# here we must use 3.24.2 instead of 3.24.3 because 3.24.3 has libcurl 4 which depends on unavailable OPENSSL_3.2.0
179178
_VERSION="--version 3.24.2" # we removed suse platforms in 3.27.0

0 commit comments

Comments
 (0)