]> git.ipfire.org Git - pakfire.git/commitdiff
jenkins: On bookworm, make sure we have the correct version of cURL
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 6 Dec 2024 10:45:02 +0000 (10:45 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 6 Dec 2024 13:01:12 +0000 (13:01 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Jenkinsfile

index dc5fac566ab0b0e6d09c740e45d3eff9ec9e8b31..43eea67cdaad55d085892acb99e22ed64d27d4e9 100644 (file)
@@ -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
+               """
        }
 }