From a314b7fac1a764d23c426dfd614b368f754425b7 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Fri, 6 Dec 2024 10:45:02 +0000 Subject: [PATCH] jenkins: On bookworm, make sure we have the correct version of cURL Signed-off-by: Michael Tremer --- Jenkinsfile | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index dc5fac566..43eea67cd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -300,6 +300,11 @@ pipeline { stages { stage("Setup Build Environment") { steps { + // Prefer backports for some packages + script { + preferBackports(env.IMAGE) + } + // Add the architecture sh "dpkg --add-architecture ${env.ARCH}" sh "apt-get update" @@ -610,6 +615,9 @@ def installBuildDepsArchLinux(distro, compiler) { // Installs everything we need on Debian def installBuildDepsDebian(distro, compiler) { + // Prefer backports? + preferBackports(distro) + sh "apt-get update" sh """ apt-get install -y \ @@ -647,9 +655,16 @@ def installBuildDepsDebian(distro, compiler) { libzstd-dev \ uuid-dev """ +} - // On bookworm, install cURL from backports for WebSocket support +def preferBackports(distro) { if (distro.contains("bookworm")) { - sh "apt-get install -y libcurl4-openssl-dev/bookworm-backports" + sh """ + ( + echo "Package: curl libcurl*" + echo "Pin: release n=bookworm-backports" + echo "Pin-Priority: 900" + ) > /etc/apt/preferences.d/99debian-backports + """ } } -- 2.39.5