Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ci/cfengine-build-host-setup.cf
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,10 @@ bundle agent cfengine_build_host_setup

linux::
"have_tmp_mount"
expression => returnszero("mount | grep '/tmp'", "useshell");
comment => "Match the mount point exactly, an unqualified '/tmp' also matches
mounts below it like the '/tmp/snap.rootfs_XXXXXX' that a failed
snap install hook leaves behind.",
expression => returnszero("mount | grep -E ' on /tmp '", "useshell");

"have_coredumpctl"
expression => returnszero("command -v coredumpctl", "useshell");
Expand Down
19 changes: 18 additions & 1 deletion ci/linux-install-rust.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,24 @@ install_rust() {
name="$1"
sha="$2"
tarball="$name.tar.gz"
wget --quiet "$baseurl/$tarball"

# Retry in case of transient errors.
tries=3
while [ $tries -gt 0 ]; do
# -O keeps every attempt writing to the same file rather than adding a .1 suffix.
status=0
wget --quiet -O "$tarball" "$baseurl/$tarball" || status=$?
if [ $status -eq 0 ]; then
break
fi
tries=$((tries - 1))
sleep 10
done
if [ $tries -eq 0 ]; then
echo "wget failed with status $status: $baseurl/$tarball" >&2
exit 1
fi

echo "$sha $tarball" | sha256sum --check -
tar xf "$tarball"
rm "$tarball"
Expand Down