aboutsummaryrefslogtreecommitdiffstats
path: root/coin/provisioning
diff options
context:
space:
mode:
authorNils Petter Skålerud <[email protected]>2025-05-20 11:03:53 +0200
committerNils Petter Skålerud <[email protected]>2025-06-12 08:20:59 +0200
commit0706273c76e64d982c5ec7a23d50b5ac4afacac3 (patch)
treeb118584a057b8c27d600d1f607077e734254407e /coin/provisioning
parentf8b56bf0728244d5351f3922aebe34ee6a07fdef (diff)
Coin, FFmpeg: Fool-proof fix_ffmpeg_dependencies.shHEADdev
This script has previously failed under some configurations, while also failing to stop provisioning. This patch enables fast-fail behavior, catches potential issues with missing executables early with a descriptive error message. This should allow us to detect if the required packages are missing in the future, and stop provisioning accordingly. This patch also installs the necessary packages on the relevant CI build targets. Task-number: QTBUG-136930 Pick-to: 6.10 6.9 6.8 Change-Id: I7c781264ad67508d19fd44556a9caf0f201638d4 Reviewed-by: Assam Boudjelthia <[email protected]>
Diffstat (limited to 'coin/provisioning')
-rwxr-xr-xcoin/provisioning/common/shared/fix_ffmpeg_dependencies.sh21
-rwxr-xr-xcoin/provisioning/qtci-macos-14-arm/27-binutils.sh9
-rwxr-xr-xcoin/provisioning/qtci-macos-14-arm/28-patchelf.sh7
-rwxr-xr-xcoin/provisioning/qtci-macos-14-x86_64/27-binutils.sh9
-rwxr-xr-xcoin/provisioning/qtci-macos-15-x86_64/27-binutils.sh9
5 files changed, 53 insertions, 2 deletions
diff --git a/coin/provisioning/common/shared/fix_ffmpeg_dependencies.sh b/coin/provisioning/common/shared/fix_ffmpeg_dependencies.sh
index bfc04a911..5e492d2ef 100755
--- a/coin/provisioning/common/shared/fix_ffmpeg_dependencies.sh
+++ b/coin/provisioning/common/shared/fix_ffmpeg_dependencies.sh
@@ -2,16 +2,33 @@
# Copyright (C) 2024 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-set -x
+set -euox pipefail
lib_dir="$1/lib"
additional_suffix="${2:-}"
set_rpath="${3:-yes}"
+# readelf and patchelf are prerequisite tools for this script. Check
+# that they are available.
if [ "$(uname -s)" = "Darwin" ]; then
# Under Homebrew, binutils package is not symlinked into PATH.
# This lets us use readelf provided by Homebrew.
- readelf() { "$(brew --prefix binutils)/bin/readelf" "$@"; }
+ readelf_homebrew_path="$(brew --prefix binutils)/bin/readelf"
+ if [[ ! -x "$readelf_homebrew_path" ]]; then
+ echo "Found no valid readelf executable. It is possible it was not correctly installed through Homebrew."
+ exit 1
+ fi
+ readelf() { "$readelf_homebrew_path" "$@"; }
+fi
+
+if ! command -v readelf; then
+ echo "Found no valid readelf command. It is possible it was not correctly installed."
+ exit 1
+fi
+
+if ! command -v patchelf; then
+ echo "Found no valid patchelf command. It is possible it was not correctly installed."
+ exit 1
fi
ffmpeg_libs=("avcodec" "avdevice" "avfilter" "avformat" "avutil" "swresample" "swscale")
diff --git a/coin/provisioning/qtci-macos-14-arm/27-binutils.sh b/coin/provisioning/qtci-macos-14-arm/27-binutils.sh
new file mode 100755
index 000000000..c4c74e7b2
--- /dev/null
+++ b/coin/provisioning/qtci-macos-14-arm/27-binutils.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+#Copyright (C) 2025 The Qt Company Ltd
+#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+set -ex
+
+# binutils is installed with an error: The formula built, but is not symlinked into /usr/local
+# To avoid stopping the configuration due to this problem, "|| true" is added.
+brew install binutils || true
diff --git a/coin/provisioning/qtci-macos-14-arm/28-patchelf.sh b/coin/provisioning/qtci-macos-14-arm/28-patchelf.sh
new file mode 100755
index 000000000..414ed936a
--- /dev/null
+++ b/coin/provisioning/qtci-macos-14-arm/28-patchelf.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+#Copyright (C) 2025 The Qt Company Ltd
+#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+set -ex
+
+brew install patchelf
diff --git a/coin/provisioning/qtci-macos-14-x86_64/27-binutils.sh b/coin/provisioning/qtci-macos-14-x86_64/27-binutils.sh
new file mode 100755
index 000000000..c4c74e7b2
--- /dev/null
+++ b/coin/provisioning/qtci-macos-14-x86_64/27-binutils.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+#Copyright (C) 2025 The Qt Company Ltd
+#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+set -ex
+
+# binutils is installed with an error: The formula built, but is not symlinked into /usr/local
+# To avoid stopping the configuration due to this problem, "|| true" is added.
+brew install binutils || true
diff --git a/coin/provisioning/qtci-macos-15-x86_64/27-binutils.sh b/coin/provisioning/qtci-macos-15-x86_64/27-binutils.sh
new file mode 100755
index 000000000..c4c74e7b2
--- /dev/null
+++ b/coin/provisioning/qtci-macos-15-x86_64/27-binutils.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+#Copyright (C) 2025 The Qt Company Ltd
+#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+set -ex
+
+# binutils is installed with an error: The formula built, but is not symlinked into /usr/local
+# To avoid stopping the configuration due to this problem, "|| true" is added.
+brew install binutils || true