In the CI builds, we're seeing an issue where certain projects hang
and fail to checkout the gerrit refs.
Eg. ```
git init .
git fetch --tags --force --progress -- \
https://review.lttng.org/babeltrace \
+refs/heads/*:refs/remotes/origin/*
git fetch --tags --force --progress -- \
https://review.lttng.org/babeltrace \
refs/changes/*:refs/changes/*
```
Not all repositories are affected. There seems to be some type of
content in the gerrit repository that triggers the issue.
After some testing, the version of libcurl3-gnutls available in
bookworm-backports (8.4.0-2~bpo12+1) doesn't seem to be affected
while the version in Debian bookworm (7.88.1-10+deb12u4) fails.
Fetches via SSH are not affected.
Refs #1532
Change-Id: If4b8ca62d5a512c7cccc2225b180b91d3832987d
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
name:
- prometheus-node-exporter
- prometheus-node-exporter-collectors
+
+- name: Work-around for git hanging during checkouts
+ # @see https://support.efficios.com/issues/1532
+ when: ansible_distribution_release == 'bookworm'
+ block:
+ - name: Add bookworm-backports pref
+ ansible.builtin.copy:
+ dest: /etc/apt/preferences.d/bookworm-backports.pref
+ content: "Package: curl libcurl3* libcurl4*\nPin: release n=bookworm-backports\nPin-Priority: 600\n"
+ - name: Enable bookworm backports
+ ansible.builtin.apt_repository:
+ repo: 'deb http://deb.debian.org/debian bookworm-backports main'
+ - ansible.builtin.apt:
+ upgrade: 'yes'