Skip to content

Commit 66a8757

Browse files
committed
Fixed debian-9 bootstrap host setup without quick install script
Ticket: ENT-13483 Changelog: none
1 parent 8e264f9 commit 66a8757

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

ci/cfengine-build-host-setup.cf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ bundle agent cfengine_build_host_setup
4545
"python3-psycopg2";
4646
"rsync" comment => "added for debian-10";
4747
"systemd-coredump" comment => "added step to jenkins testing-pr job to query for coredumps on failures";
48+
4849
# core/ci/dependencies.sh is run on some systems where quickinstall and cf-remote cannot install an agent to run this policy so we must remove some system packages that we also build since both install to /usr as a prefix.
50+
# we do need these still installed on bootstrap-pr hosts though, so guard against that class
51+
debian.!bootstrap_pr_host::
4952
"libattr1-dev" package_policy => "delete";
5053
"libssl-dev" package_policy => "delete";
5154
"libpcre2-dev" package_policy => "delete";
@@ -69,6 +72,7 @@ bundle agent cfengine_build_host_setup
6972
(debian_10|debian_11).systemssl_build_host::
7073
"libssl-dev";
7174
debian.bootstrap_pr_host::
75+
"libssl-dev"; # bootstrap_pr host needs this to configure before we build openssl ourselves
7276
"librsync-dev"; # bootstrap_pr host needs this to run configure and make dist
7377
"autoconf-archive" comment => "Required to resolve the AX_PTHREAD macro";
7478

ci/setup-cfengine-build-host.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ 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
8992
elif grep suse /etc/os-release; then
9093
zypper -n update
9194
alias software='zypper install -y'
@@ -162,7 +165,12 @@ else
162165
# We need a cf-agent to run build host setup policy and redhat-10-arm did not have a previous package to install.
163166
if ! /var/cfengine/bin/cf-agent -V; then
164167
echo "No existing CFEngine install found, try cf-remote..."
165-
cf-remote --log-level info --version master install --clients localhost || true
168+
if [ -n "$DEBIAN_STRETCH" ]; then
169+
_VERSION="--version 3.21.8"
170+
else
171+
_VERSION="--version master"
172+
fi
173+
cf-remote --log-level info $_VERSION install --clients localhost || true
166174
fi
167175
fi
168176

0 commit comments

Comments
 (0)