From ceec638937a17fc582364ddd298ed85b93e9dbf8 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Mon, 6 Nov 2023 15:28:26 -0500 Subject: [PATCH] ansible: Install libcurl3-gnutls from bookworm-backports 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 --- .../ansible/roles/common/tasks/setup-Debian.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/automation/ansible/roles/common/tasks/setup-Debian.yml b/automation/ansible/roles/common/tasks/setup-Debian.yml index c1420e5..d0df1c1 100644 --- a/automation/ansible/roles/common/tasks/setup-Debian.yml +++ b/automation/ansible/roles/common/tasks/setup-Debian.yml @@ -83,3 +83,17 @@ 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' -- 2.34.1