]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
tools/ci-install.sh: Install newer CMake on openSuSE
authorAlex Richardson <arichardson.kde@gmail.com>
Sat, 14 May 2022 18:24:21 +0000 (19:24 +0100)
committerRalf Habacker <ralf.habacker@freenet.de>
Tue, 17 May 2022 10:48:06 +0000 (10:48 +0000)
This is needed for JUnit XML output for tests.

.gitlab-ci.yml
tools/ci-install.sh

index baf345603a91ff7965dba51ff61f586a9d27afea..5591da74afa533b33eb4d04b822f3d2f711c9757 100644 (file)
@@ -60,7 +60,7 @@ variables:
 .opensuse-vars:
   variables:
     FDO_DISTRIBUTION_VERSION: 'leap'
-    FDO_DISTRIBUTION_TAG: '2022-04-17' # Bump this version on every ci-install.sh change
+    FDO_DISTRIBUTION_TAG: '2022-05-14' # Bump this version on every ci-install.sh change
 
 .cmake-common:
   variables:
index bd46edb28e2fba24b36ba7ff589d2d856e9bcecd..40dde89227e44b6499366f57bf795d18250f5a9b 100755 (executable)
@@ -224,6 +224,27 @@ case "$ci_distro" in
             which
         )
 
+        # choose distribution
+        id=$(. /etc/os-release; echo ${ID} | sed 's, ,_,g')
+        case "$id" in
+            (opensuse-leap)
+                version=$(. /etc/os-release; echo ${VERSION_ID} | sed 's, ,_,g')
+                repo="openSUSE_Leap_$version"
+                # Use a newer CMake (3.21) version for JUnit XML support on openSUSE Leap.
+                if ! zypper lr cmake > /dev/null; then
+                    $zypper ar --refresh --no-gpgcheck --name cmake \
+                        "https://download.opensuse.org/repositories/devel:tools:building/$version/devel:tools:building.repo"
+                fi
+                ;;
+            (opensuse-tumbleweed)
+                repo="openSUSE_Tumbleweed"
+                ;;
+            (*)
+                echo "ci_suite not specified, please choose one from 'leap' or 'tumbleweed'"
+                exit 1
+                ;;
+        esac
+
         case "$ci_host" in
             (*-w64-mingw32)
                 # cross
@@ -233,22 +254,6 @@ case "$ci_distro" in
                     xvfb-run
                 )
 
-                # choose distribution
-                id=$(. /etc/os-release; echo ${ID} | sed 's, ,_,g')
-                case "$id" in
-                    (opensuse-leap)
-                        version=$(. /etc/os-release; echo ${VERSION_ID} | sed 's, ,_,g')
-                        repo="openSUSE_Leap_$version"
-                        ;;
-                    (opensuse-tumbleweed)
-                        repo="openSUSE_Tumbleweed"
-                        ;;
-                    (*)
-                        echo "ci_suite not specified, please choose one from 'leap' or 'tumbleweed'"
-                        exit 1
-                        ;;
-                esac
-
                 # add required repos
                 if [ "${ci_host%%-*}" = x86_64 ]; then
                     bits="64"
@@ -281,7 +286,7 @@ case "$ci_distro" in
                 )
                 ;;
         esac
-        $zypper install "${packages[@]}"
+        $zypper install --allow-vendor-change "${packages[@]}"
 
         if [ "$ci_in_docker" = yes ]; then
             # Add the user that we will use to do the build inside the