From 5db3413e70d1c129a691d0235ec2a2460ec2e6a0 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Fri, 24 Jul 2026 10:10:40 -0500 Subject: [PATCH 01/16] Added rhel/centos-7 script build host setup in setup-build-host.sh and use it in setup-cfengine-build-host.sh Ticket: ENT-14330 Changelog: none --- ci/setup-build-host.sh | 121 ++++++++++++++++++++++++++++++++ ci/setup-cfengine-build-host.sh | 9 +++ 2 files changed, 130 insertions(+) create mode 100644 ci/setup-build-host.sh diff --git a/ci/setup-build-host.sh b/ci/setup-build-host.sh new file mode 100644 index 000000000..9fa77b596 --- /dev/null +++ b/ci/setup-build-host.sh @@ -0,0 +1,121 @@ +#!/usr/bin/env bash +set -e +shopt -s expand_aliasas + +packages="" # a space separated list of packages to install +function add-pkg() +{ + packages+=" $*" +} + +if [ -f /etc/os-release ]; then + source /etc/os-release + if grep -q rhel /etc/os-release; then + yum update --assumeyes + alias software='yum install --assumeyes' + elif grep -q debian /etc/os-release; then + alias software='DEBIAN_FRONTEND=noninteractive apt install --yes' + elif grep -q suse /etc/os-release; then + alias software='zypper install -y' + else + echo "Unknown platform ID $ID. Need this information in order to update/upgrade distribution packages." + exit 1 + fi +elif [ -f /etc/redhat-release ]; then + alias software='yum install --assumeyes' + # shellcheck disable=SC1091 + source /etc/redhat-release +else + echo "No /etc/os-release or /etc/redhat-release so cant determine platform." + exit 1 +fi + +if echo "$ID_LIKE" | grep rhel; then + if [ "$VERSION_ID" != "6" ] && [ "$VERSION_ID" != "7" ]; then + if ! grep best=False /etc/yum.conf; then + sed -i '/best=True/s/True/False/' /etc/yum.conf + fi + if ! grep best=False /etc/dnf/dnf.conf; then + sed -i '/best=True/s/True/False/' /etc/dnf/dnf.conf + fi + fi + + add-pkg expat-devel + add-pkg gcc-c++ + add-pkg gettext + add-pkg ncurses + add-pkg perl-Module-Load-Conditional + add-pkg wget + add-pkg perl-ExtUtils-MakeMaker + add-pkg perl-IO-Compress # provides perl(IO::Uncompress::Gunzip) needed by lcov dependency package + add-pkg psmic + add-pkg which + + # There are several versions of python(x)-rpm-macros. We choose this one to get platform-python which is guaranteed to be installed in rhel-8 + if [ "$VERSION_ID" = "8" ]; then + add-pkg python3-rpm-macros # provides macro py3_shebang_fix needed in rhel-8 for /var/cfengine/bin/cfbs ENT-11338 + add-pkg platform-python-devel # py3_shebang_fix macro needs /usr/bin/pathfix.py from platform-python-devel package ENT-11338 + fi + + + if [ "$VERSION_ID" != "7" ] && [ "$VERSION_ID" != "6" ]; then + yum erase -y java-1.8.0-openjdk-headless # Installing Development Tools includes this jdk1.8 which we do not want + + add-pkg pkgconf # pkgconfig renamed to pkgconf in rhel8 + add-pkg selinux-policy-devel # TODO add to rhel 6 and 7? + fi + + if [ "$VERSION_ID" -gt 8 ]; then + add-pkg perl-Sys-Hostname # Needed by __04_examples_outputs_check_outputs_cf + fi + + if [ "$VERSION_ID" -ge 10 ]; then + add-pkg patch + add-pkg perl-FindBin # Needed by postgresql 18 + fi + + if [ "$VERSION_ID" = "6" ]; then + add-pkg rpm-build + add-pkg python-psycopg2 # centos-6 provides python2 and psycopg2 for python2 as a package + add-pkg perl-IO-Compress-Zlib # provides perl(IO::Uncompress::Gunzip) needed by lcov dependency package + add-pkg perl-JSON + else + add-pkg rpm-build-libs + add-pkg python3-psycopg2 + fi + + # perl-Digest-MD5 and perl-Data-Dumper are included in perl for centos-6 + if [ "$VERSION_ID" = "6" ] || [ "$VERSION_ID" = "7" ]; then + add-pkg gdb + add-pkg ntp + add-pkg pkgconfig + add-pkg perl-IPC-Cmd + add-pkg perl-devel + add-pkg xfsprogs + fi + + # note that shellcheck, fakeroot and ccache require epel-release to be installed + # epel-release is installed by distribution package in rhel-7 and by URL for rhel-8+ later in commands section + if [ "$VERSION_ID" = "7" ]; then + yum install -y epel-release + fi + + + # Ban IPs with repeated failed SSH auth attempts. On centos/rhel 8+ we must specify individual packages instead of just fail2ban as package method will append -*.* which would include conflicting shorewall and shorewall-lite packages. + if [ "$VERSION_ID" != "7" ]; then + fail2ban-sendmail + add-pkg fail2ban-firewalld + add-pkg ccache + add-pkg fakeroot + add-pkg perl-JSON-PP + add-pkg perl-Digest-MD5 + + fi + + if [ "$VERSION_ID" != "8" ]; then + add-pkg python3-pip + fi + +fi + +software $packages diff --git a/ci/setup-cfengine-build-host.sh b/ci/setup-cfengine-build-host.sh index cac131fde..9833f2576 100755 --- a/ci/setup-cfengine-build-host.sh +++ b/ci/setup-cfengine-build-host.sh @@ -145,6 +145,15 @@ if [ -f /etc/cfengine-bootstrap-pr-host.flag ]; then exit fi +# platforms too old to support cf-remote, use scripts instead +if [ -f /etc/os-release ]; then + source /etc/os-release + if [ "$ID" = "centos" ] && [ "$VERSION_ID" = "7" ]; then + "$thisdir"/setup-build-host.sh + exit + fi +fi + if grep -q ubuntu /etc/os-release; then if grep -qi version=\"16 /etc/os-release; then urlget https://cfengine-package-repos.s3.amazonaws.com/enterprise/Enterprise-3.21.8/agent/agent_ubuntu16_x86_64/cfengine-nova_3.21.8-1.ubuntu16_amd64.deb From db0fa3732b750c48793a948e6e8bf80ce8131948 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Fri, 24 Jul 2026 10:57:35 -0500 Subject: [PATCH 02/16] refactoring and containers setup --- ci/setup-cfengine-build-host.sh | 7 +++- ci/{setup-build-host.sh => setup-ci-host.sh} | 43 +++++++++++++++++--- 2 files changed, 44 insertions(+), 6 deletions(-) rename ci/{setup-build-host.sh => setup-ci-host.sh} (71%) diff --git a/ci/setup-cfengine-build-host.sh b/ci/setup-cfengine-build-host.sh index 9833f2576..dcd88dae3 100755 --- a/ci/setup-cfengine-build-host.sh +++ b/ci/setup-cfengine-build-host.sh @@ -145,11 +145,16 @@ if [ -f /etc/cfengine-bootstrap-pr-host.flag ]; then exit fi +if [ -f /etc/cfengine-containers-host.flag ]; then + "$thisdir"/setup-ci-host.sh + exit +fi + # platforms too old to support cf-remote, use scripts instead if [ -f /etc/os-release ]; then source /etc/os-release if [ "$ID" = "centos" ] && [ "$VERSION_ID" = "7" ]; then - "$thisdir"/setup-build-host.sh + "$thisdir"/setup-ci-host.sh exit fi fi diff --git a/ci/setup-build-host.sh b/ci/setup-ci-host.sh similarity index 71% rename from ci/setup-build-host.sh rename to ci/setup-ci-host.sh index 9fa77b596..77e963d9e 100644 --- a/ci/setup-build-host.sh +++ b/ci/setup-ci-host.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash set -e shopt -s expand_aliasas +thisdir="$(dirname "$0")" packages="" # a space separated list of packages to install function add-pkg() @@ -12,17 +13,17 @@ if [ -f /etc/os-release ]; then source /etc/os-release if grep -q rhel /etc/os-release; then yum update --assumeyes - alias software='yum install --assumeyes' + alias packages='yum install --assumeyes' elif grep -q debian /etc/os-release; then - alias software='DEBIAN_FRONTEND=noninteractive apt install --yes' + alias packages='DEBIAN_FRONTEND=noninteractive apt install --yes' elif grep -q suse /etc/os-release; then - alias software='zypper install -y' + alias packages='zypper install -y' else echo "Unknown platform ID $ID. Need this information in order to update/upgrade distribution packages." exit 1 fi elif [ -f /etc/redhat-release ]; then - alias software='yum install --assumeyes' + alias packages='yum install --assumeyes' # shellcheck disable=SC1091 source /etc/redhat-release else @@ -30,6 +31,35 @@ else exit 1 fi +if [ -f /etc/cfengine-containers-host.flag ]; then + if echo "$ID_LIKE" | grep debian && [ "$VERSION_ID" -ge "12" ]; then + # in jenkins, CONTAINER labeled nodes are capable of running container builds like valgrind-check and static-check + add-pkg unzip # linux-install-groovy.sh needs unzip to unpack the groovy distribution archive + add-pkg buildah + add-pkg jq + add-pkg make + add-pkg parallel + add-pkg podman + if ! command -v groovy; then + bash "$thisdir"/linux-install-groovy.sh + fi + + # NOPASSWD is needed for various tools related to container jobs + rm -rf /etc/sudoers.d/999-local + cat >/etc/sudoers.d/999-local < Date: Fri, 24 Jul 2026 11:07:02 -0500 Subject: [PATCH 03/16] apt update before upgrade, was breaking on ubu24 --- ci/setup-cfengine-build-host.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ci/setup-cfengine-build-host.sh b/ci/setup-cfengine-build-host.sh index dcd88dae3..b3468f801 100755 --- a/ci/setup-cfengine-build-host.sh +++ b/ci/setup-cfengine-build-host.sh @@ -95,9 +95,12 @@ if [ -f /etc/os-release ]; then yum update --assumeyes alias software='yum install --assumeyes' elif grep -q debian /etc/os-release; then + DEBIAN_FRONTEND=noninteractive apt update + # sometimes the /boot partition is too small to handle kernel upgrade regenerations of initrd and related files on ubuntu, so allow failure first DEBIAN_FRONTEND=noninteractive apt upgrade --yes || true DEBIAN_FRONTEND=noninteractive apt autoremove --yes + # and now perform the upgrade a second time after hopefully autoremove cleans up /boot partition of kernel files that cause failure DEBIAN_FRONTEND=noninteractive apt upgrade --yes DEBIAN_FRONTEND=noninteractive apt autoremove --yes From 38902c5184f6005ef4fad49c9c63a812d06aa5a9 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Fri, 24 Jul 2026 11:12:43 -0500 Subject: [PATCH 04/16] quiet initialize-build-host.sh --- ci/initialize-build-host.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/ci/initialize-build-host.sh b/ci/initialize-build-host.sh index 90bbc9392..833ee2616 100644 --- a/ci/initialize-build-host.sh +++ b/ci/initialize-build-host.sh @@ -73,6 +73,7 @@ set_github_status() } # main() as it were, begin non-function definition section of script +set +x # TODO, capture current x mode and restore later if broken_posix_shell >/dev/null 2>&1; then try_exec /usr/xpg4/bin/sh "$0" "$@" echo "No compatible shell script interpreter found." @@ -136,9 +137,10 @@ do sleep 10 done -echo '========================================= PRINTING CLOUD-INIT LOG ===================================================' -sudo sed 's/^.*/>>> &/' /var/log/cloud-init-output.log || true -echo '======================================= DONE PRINTING CLOUD-INIT LOG ================================================' +# TODO, instead of printing this out ALWAYS, print it out only in case of errors +#echo '========================================= PRINTING CLOUD-INIT LOG ===================================================' +#sudo sed 's/^.*/>>> &/' /var/log/cloud-init-output.log || true +#echo '======================================= DONE PRINTING CLOUD-INIT LOG ================================================' if [ $attempts -le 0 ] then @@ -147,9 +149,10 @@ then exit 1 fi -echo '=========================================== CURRENT ENVIRONMENT =====================================================' -export -echo '========================================= CURRENT ENVIRONMENT END ===================================================' +# TODO only print current environment on errors, maybe save the environment NOW and then show a diff at ERROR +#echo '=========================================== CURRENT ENVIRONMENT =====================================================' +#export +#echo '========================================= CURRENT ENVIRONMENT END ===================================================' # Disable TTY requirement. This normally happens in initialize-user-data.sh, but # for hosts that do not support cloud user data, it may not have happened From 0c6a39454a9f64e92fd02878edf8473f4ad36e62 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Fri, 24 Jul 2026 11:25:31 -0500 Subject: [PATCH 05/16] libre --- ci/setup-ci-host.sh | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/ci/setup-ci-host.sh b/ci/setup-ci-host.sh index 77e963d9e..e7c88f512 100644 --- a/ci/setup-ci-host.sh +++ b/ci/setup-ci-host.sh @@ -9,15 +9,28 @@ function add-pkg() packages+=" $*" } +# we setup some vars for platform versions to make it easier to make choice later +# default version is 0 so that a check can be [ "$debian" -gt "12" ] and that will skip non-debians and such +redhat=0 +debian=0 +ubuntu=0 +suse=0 +solaris=0 +hpux=0 +aix=0 + if [ -f /etc/os-release ]; then - source /etc/os-release + source /etc/os-release if grep -q rhel /etc/os-release; then yum update --assumeyes alias packages='yum install --assumeyes' + redhat="$VERSION_ID" elif grep -q debian /etc/os-release; then alias packages='DEBIAN_FRONTEND=noninteractive apt install --yes' + debian="$VERSION_ID" elif grep -q suse /etc/os-release; then alias packages='zypper install -y' + suse="$VERSION_ID" else echo "Unknown platform ID $ID. Need this information in order to update/upgrade distribution packages." exit 1 @@ -26,13 +39,14 @@ elif [ -f /etc/redhat-release ]; then alias packages='yum install --assumeyes' # shellcheck disable=SC1091 source /etc/redhat-release + redhat="$VERSION_ID" else echo "No /etc/os-release or /etc/redhat-release so cant determine platform." exit 1 fi if [ -f /etc/cfengine-containers-host.flag ]; then - if echo "$ID_LIKE" | grep debian && [ "$VERSION_ID" -ge "12" ]; then + if [ "$debian" -ge "12" ]; then # in jenkins, CONTAINER labeled nodes are capable of running container builds like valgrind-check and static-check add-pkg unzip # linux-install-groovy.sh needs unzip to unpack the groovy distribution archive add-pkg buildah @@ -152,3 +166,24 @@ fi # shellcheck disable=SC2086 # ^^^ we want space separated package names as separate args, not one arg with the space separated list packages $packages + +if mount | grep '/tmp'; then + # We could check if /tmp was size 5G but not worth the trouble since this remount call just sets the maximum size of the tmpfs in virtual memory. + mount -o remount,size=5G /tmp +fi + +# Ensure that core_pattern is proper for systemd-coredump if coredumpctl is present. +if command -v coredumpctl >/dev/null; then + if [ ! -f /etc/cfengine-containers-host.flag ]; then + sysctl kernel.core_pattern='|/lib/systemd/systemd-coredump %p %u %g %s %t %e' + fi +fi + +"$thisdir"/linux-install-jdk.sh # the script should skip if sufficient java is already installed + +# leech2 build toolchain host +if [ "$ubuntu" -ge 20 ] || [ "$debian" -ge 12 ] || [ "$redhat" -ge 7 ]; then + "$thisdir"/linux-install-protobuf.sh + # TODO if mingw then pass along x86_64-pc-windows-gnu as an arg to install rust + "$thisdir"/linux-install-rust.sh +fi From f468b39f2561ea3f54492ff6388003bcfb27714a Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Fri, 24 Jul 2026 11:28:57 -0500 Subject: [PATCH 06/16] debug packages alias --- ci/setup-ci-host.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ci/setup-ci-host.sh b/ci/setup-ci-host.sh index e7c88f512..58acefbaf 100644 --- a/ci/setup-ci-host.sh +++ b/ci/setup-ci-host.sh @@ -165,7 +165,10 @@ fi # packages is a dynamic alias set near the top of this script # shellcheck disable=SC2086 # ^^^ we want space separated package names as separate args, not one arg with the space separated list +whoami +set -x packages $packages +set +x if mount | grep '/tmp'; then # We could check if /tmp was size 5G but not worth the trouble since this remount call just sets the maximum size of the tmpfs in virtual memory. From 5132efeae703fda278e3935e356d75ef4165dab3 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Fri, 24 Jul 2026 11:34:53 -0500 Subject: [PATCH 07/16] chmod +x setup-ci-host.sh --- ci/setup-ci-host.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 ci/setup-ci-host.sh diff --git a/ci/setup-ci-host.sh b/ci/setup-ci-host.sh old mode 100644 new mode 100755 From dac607256d506664df4da867ace817c42bf34fed Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Fri, 24 Jul 2026 11:42:17 -0500 Subject: [PATCH 08/16] fix seutp-ci-host --- ci/setup-ci-host.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/setup-ci-host.sh b/ci/setup-ci-host.sh index 58acefbaf..ca9294247 100755 --- a/ci/setup-ci-host.sh +++ b/ci/setup-ci-host.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -e -shopt -s expand_aliasas +shopt -s expand_aliases thisdir="$(dirname "$0")" packages="" # a space separated list of packages to install From 0f521da0afa7d12fa4958c5015620ec83af9ebf0 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Fri, 24 Jul 2026 11:50:22 -0500 Subject: [PATCH 09/16] more work on redhat --- ci/setup-ci-host.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/ci/setup-ci-host.sh b/ci/setup-ci-host.sh index ca9294247..ff3d7910b 100755 --- a/ci/setup-ci-host.sh +++ b/ci/setup-ci-host.sh @@ -15,8 +15,11 @@ redhat=0 debian=0 ubuntu=0 suse=0 +# shellcheck disable=SC2034 solaris=0 +# shellcheck disable=SC2034 hpux=0 +# shellcheck disable=SC2034 aix=0 if [ -f /etc/os-release ]; then @@ -30,6 +33,7 @@ if [ -f /etc/os-release ]; then debian="$VERSION_ID" elif grep -q suse /etc/os-release; then alias packages='zypper install -y' + # shellcheck disable=SC2034 suse="$VERSION_ID" else echo "Unknown platform ID $ID. Need this information in order to update/upgrade distribution packages." @@ -163,10 +167,10 @@ if echo "$ID_LIKE" | grep rhel; then fi # packages is a dynamic alias set near the top of this script -# shellcheck disable=SC2086 # ^^^ we want space separated package names as separate args, not one arg with the space separated list whoami set -x +# shellcheck disable=SC2086 packages $packages set +x @@ -190,3 +194,15 @@ if [ "$ubuntu" -ge 20 ] || [ "$debian" -ge 12 ] || [ "$redhat" -ge 7 ]; then # TODO if mingw then pass along x86_64-pc-windows-gnu as an arg to install rust "$thisdir"/linux-install-rust.sh fi + +if [ "$redhat" -ge 7 ]; then + yum groups install -y 'Development Tools' +fi + +if [ "$redhat" = "8" ]; then + sudo rpm -iv https://kojipkgs.fedoraproject.org//packages/fakeroot/1.23/1.fc29/x86_64/fakeroot-1.23-1.fc29.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/fakeroot/1.23/1.fc29/x86_64/fakeroot-libs-1.23-1.fc29.x86_64.rpm +fi + +if [ "$redhat" -gt 0 ] && [ "$redhat" -le 7 ]; then + yum install --assumeyes https://dl.fedoraproject.org/pub/epel/epel-release-latest-"$redhat".noarch.rpm +fi From 284f355353287d81c6cd56dab8ea4750a907f7d9 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Fri, 24 Jul 2026 12:02:04 -0500 Subject: [PATCH 10/16] debug unpack-tarballs masterfiles tarball --- build-scripts/unpack-tarballs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build-scripts/unpack-tarballs b/build-scripts/unpack-tarballs index 9130c973b..925d1d4b9 100755 --- a/build-scripts/unpack-tarballs +++ b/build-scripts/unpack-tarballs @@ -62,9 +62,10 @@ cd "$BASEDIR" gzip -dc $SOURCE_TARBALL | tar -xf - ln -s cfengine-3* core -log_debug "UNPACKING MASTERFILES TARBALL AND SYMLINKING masterfiles/" +log_debug "UNPACKING MASTERFILES TARBALL: $MASTERFILES_TARBALL AND SYMLINKING masterfiles/" # shellcheck disable=SC2086 # > Double quote to prevent globbing and word splitting. # We want globbing here gzip -dc $MASTERFILES_TARBALL | tar -xf - +ls -l cfengine-masterfiles-* ln -s cfengine-masterfiles-* masterfiles From c3c9f9aea7283bf79359edd436e40d4e2597a7c2 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Fri, 24 Jul 2026 12:29:05 -0500 Subject: [PATCH 11/16] more debugging of masterfiles unpack-tarballs --- build-scripts/unpack-tarballs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build-scripts/unpack-tarballs b/build-scripts/unpack-tarballs index 925d1d4b9..b3e70a43a 100755 --- a/build-scripts/unpack-tarballs +++ b/build-scripts/unpack-tarballs @@ -67,5 +67,6 @@ log_debug "UNPACKING MASTERFILES TARBALL: $MASTERFILES_TARBALL AND SYMLINKING ma # > Double quote to prevent globbing and word splitting. # We want globbing here gzip -dc $MASTERFILES_TARBALL | tar -xf - -ls -l cfengine-masterfiles-* +ls -l cfengine-masterfiles-* # debug +ls -l | grep masterfiles # debug ln -s cfengine-masterfiles-* masterfiles From e30bbbc6aea59029617161deecbd274b26e0d9b3 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Fri, 24 Jul 2026 13:25:58 -0500 Subject: [PATCH 12/16] debug masterfiles --- build-scripts/unpack-tarballs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build-scripts/unpack-tarballs b/build-scripts/unpack-tarballs index b3e70a43a..6b3cbc5f1 100755 --- a/build-scripts/unpack-tarballs +++ b/build-scripts/unpack-tarballs @@ -66,7 +66,9 @@ log_debug "UNPACKING MASTERFILES TARBALL: $MASTERFILES_TARBALL AND SYMLINKING ma # shellcheck disable=SC2086 # > Double quote to prevent globbing and word splitting. # We want globbing here +set -x gzip -dc $MASTERFILES_TARBALL | tar -xf - ls -l cfengine-masterfiles-* # debug ls -l | grep masterfiles # debug ln -s cfengine-masterfiles-* masterfiles +set +x From 6bcd551a64a89f2e5e91ced9112c1484be39075c Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Fri, 24 Jul 2026 14:45:16 -0500 Subject: [PATCH 13/16] masterfiles --- build-scripts/unpack-tarballs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build-scripts/unpack-tarballs b/build-scripts/unpack-tarballs index 6b3cbc5f1..7006fbc93 100755 --- a/build-scripts/unpack-tarballs +++ b/build-scripts/unpack-tarballs @@ -70,5 +70,7 @@ set -x gzip -dc $MASTERFILES_TARBALL | tar -xf - ls -l cfengine-masterfiles-* # debug ls -l | grep masterfiles # debug -ln -s cfengine-masterfiles-* masterfiles +# the masterfiles tarball would match cfengine-masterfiles-* so find the unpacked dir specifically +_cfmpfdir=$(find -type d -name 'cfengine-masterfiles-*') +ln -s "$_cfmpfdir" masterfiles set +x From e09aede28bb56b2a20473005149d11cfc201a529 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Fri, 24 Jul 2026 17:16:02 -0500 Subject: [PATCH 14/16] fix rhel-7 build host setup --- ci/setup-ci-host.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/setup-ci-host.sh b/ci/setup-ci-host.sh index ff3d7910b..682631d8c 100755 --- a/ci/setup-ci-host.sh +++ b/ci/setup-ci-host.sh @@ -203,6 +203,6 @@ if [ "$redhat" = "8" ]; then sudo rpm -iv https://kojipkgs.fedoraproject.org//packages/fakeroot/1.23/1.fc29/x86_64/fakeroot-1.23-1.fc29.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/fakeroot/1.23/1.fc29/x86_64/fakeroot-libs-1.23-1.fc29.x86_64.rpm fi -if [ "$redhat" -gt 0 ] && [ "$redhat" -le 7 ]; then +if [ "$redhat" -gt 7 ]; then yum install --assumeyes https://dl.fedoraproject.org/pub/epel/epel-release-latest-"$redhat".noarch.rpm fi From 1e1dd32d4139f554b5cceb74f3e96fec311bcc9a Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Sat, 25 Jul 2026 07:12:02 -0500 Subject: [PATCH 15/16] debug rhel8 systemctl restart sshd failure --- ci/setup-cfengine-build-host.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci/setup-cfengine-build-host.sh b/ci/setup-cfengine-build-host.sh index b3468f801..e6adec97b 100755 --- a/ci/setup-cfengine-build-host.sh +++ b/ci/setup-cfengine-build-host.sh @@ -26,6 +26,8 @@ rm -rf cfengine-masterfiles* function cleanup() { set -e + [ -f /var/log/messages ] && tail /var/log/messages + command -v journalctl >/dev/null && journalctl --lines=20 if command -v apt >/dev/null 2>&1; then # workaround for CFE-4544, remove scriptlets call systemctl even when systemctl is-system-running returns false # Replace systemctl with a no-op stub that always succeeds. We can't From a1cc437cdd4f858f3356b06c13e9b4c4dbd88a27 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Sun, 26 Jul 2026 07:33:25 -0400 Subject: [PATCH 16/16] debug ssh hostkeys --- ci/setup-cfengine-build-host.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci/setup-cfengine-build-host.sh b/ci/setup-cfengine-build-host.sh index e6adec97b..6a04fc19d 100755 --- a/ci/setup-cfengine-build-host.sh +++ b/ci/setup-cfengine-build-host.sh @@ -2,6 +2,8 @@ shopt -s expand_aliases thisdir="$(dirname "$0")" +echo debug sshd host keys +ls -l /etc/ssh # handle env cfengine_role if [ -n "$cfengine_role" ]; then touch /etc/cfengine-"$cfengine_role".flag