@@ -155,6 +155,8 @@ bundle agent cfengine_build_host_setup
155
155
"systemssl_build_host" expression => fileexists("/etc/cfengine-systemssl-build-host.flag");
156
156
"bootstrap_pr_host" expression => fileexists("/etc/cfengine-bootstrap-pr-host.flag");
157
157
"containers_host" expression => fileexists("/etc/cfengine-containers-host.flag");
158
+ "not_in_container" expression => not(fileexists("/etc/cfengine-in-container.flag")),
159
+ comment => "We use an explicit flag file that we control to avoid ambiguity about whether we are in a container or not.";
158
160
linux::
159
161
"have_coredumpctl" expression => returnszero("command -v coredumpctl", "useshell");
160
162
"missing_opt_jdk21" expression => not(fileexists("/opt/jdk-21.0.1"));
@@ -180,7 +182,7 @@ bundle agent cfengine_build_host_setup
180
182
comment => "note: centos-7 has installed instead of --installed argument, and that works on rhel-8 and rhel-9 so go with the sub-command instead of option";
181
183
182
184
commands:
183
- have_coredumpctl::
185
+ have_coredumpctl.not_in_container ::
184
186
"sysctl kernel.core_pattern='|/lib/systemd/systemd-coredump %p %u %g %s %t %e'" -> { "ENT-12669" }
185
187
comment => "Ensure that core_pattern is proper for systemd-coredump if coredumpctl is present.",
186
188
contain => in_shell;
@@ -207,7 +209,7 @@ bundle agent cfengine_build_host_setup
207
209
ubuntu_16::
208
210
"have_i386_architecture" expression => strcmp(execresult("${paths.dpkg} --print-foreign-architectures", "noshell"), "i386");
209
211
ubuntu::
210
- "have_localhost_localdomain_hostname " expression => strcmp(execresult("${paths.hostname} -f", "useshell"), "localhost.localdomain");
212
+ "localhost_localdomain_hostname_missing " expression => not( strcmp(execresult("${paths.hostname} -f", "useshell"), "localhost.localdomain") );
211
213
opensuse|suse|sles::
212
214
"have_$(suse_users_and_groups)_group" expression => returnszero("grep '^$(suse_users_and_groups):' /etc/group >/dev/null", "useshell");
213
215
"have_$(suse_users_and_groups)_user" expression => returnszero("grep '^$(suse_users_and_groups):' /etc/passwd >/dev/null", "useshell");
@@ -278,7 +280,7 @@ jenkins_builds ALL=NOPASSWD: /usr/bin/podman
278
280
mingw_build_host.!have_i386_architecture::
279
281
"${paths.dpkg} --add-architecture i386";
280
282
281
- ubuntu.!have_localhost_localdomain_hostname ::
283
+ ubuntu.not_in_container.localhost_localdomain_hostname_missing ::
282
284
"/usr/bin/hostnamectl set-hostname localhost.localdomain"
283
285
comment => "hack for aws ubuntu hosts having unique ip-n-n-n-n hostnames, we need localhost.localdomain";
284
286
!have_daemon_group.(suse|sles|opensuse)::
0 commit comments