mirror of
https://github.com/actions/runner.git
synced 2025-12-10 12:36:23 +00:00
Compare commits
3 Commits
salmanmkc/
...
copilot/fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7d9e854d53 | ||
|
|
177cdb91f2 | ||
|
|
d96f509385 |
@@ -20,6 +20,7 @@ Execute ./bin/installdependencies.sh to install any missing Dotnet Core 6.0 depe
|
||||
You can easily correct the problem by executing `./bin/installdependencies.sh`.
|
||||
The `installdependencies.sh` script should install all required dependencies on all supported Linux versions
|
||||
> Note: The `installdependencies.sh` script will try to use the default package management mechanism on your Linux flavor (ex. `yum`/`apt-get`/`apt`).
|
||||
> For Fedora-based systems, the script automatically handles lttng-ust version compatibility by creating symlinks when needed (e.g., Fedora 41 ships with liblttng-ust.so.1 but the runner needs liblttng-ust.so.0).
|
||||
|
||||
### Full dependencies list
|
||||
|
||||
@@ -33,7 +34,7 @@ Debian based OS (Debian, Ubuntu, Linux Mint)
|
||||
|
||||
Fedora based OS (Fedora, Red Hat Enterprise Linux, CentOS, Oracle Linux 7)
|
||||
|
||||
- lttng-ust
|
||||
- lttng-ust (the installdependencies.sh script will automatically handle version compatibility for newer Fedora versions)
|
||||
- openssl-libs
|
||||
- krb5-libs
|
||||
- zlib
|
||||
|
||||
@@ -131,24 +131,8 @@ then
|
||||
command -v dnf
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
dnf_with_fallbacks() {
|
||||
dnf install -y $1
|
||||
fail=$?
|
||||
if [ $fail -eq 0 ]
|
||||
then
|
||||
return 0
|
||||
fi
|
||||
if [ $fail -ne 0 ]
|
||||
then
|
||||
shift
|
||||
if [ -n "$1" ]
|
||||
then
|
||||
dnf_with_fallbacks "$@"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
dnf_with_fallbacks lttng-ust1 lttng-ust0
|
||||
# Install basic dependencies first
|
||||
dnf install -y openssl-libs krb5-libs zlib libicu
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo "'dnf' failed with exit code '$?'"
|
||||
@@ -156,10 +140,52 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dnf install -y openssl-libs krb5-libs zlib libicu
|
||||
# Handle lttng-ust with fallback logic for version compatibility
|
||||
dnf_with_lttng_fallbacks() {
|
||||
# Try to install the current lttng-ust package
|
||||
dnf install -y lttng-ust
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
# Check if it provides the required liblttng-ust.so.0
|
||||
if ldconfig -p | grep -q "liblttng-ust.so.0"
|
||||
then
|
||||
echo "Found liblttng-ust.so.0"
|
||||
return 0
|
||||
else
|
||||
echo "Warning: lttng-ust installed but liblttng-ust.so.0 not found"
|
||||
echo "Attempting to create compatibility symlink..."
|
||||
|
||||
# Find the actual liblttng-ust library
|
||||
lttng_lib=$(ldconfig -p | grep "liblttng-ust.so" | head -1 | awk '{print $NF}')
|
||||
if [ -n "$lttng_lib" ] && [ -f "$lttng_lib" ]
|
||||
then
|
||||
# Create symlink in the same directory
|
||||
lib_dir=$(dirname "$lttng_lib")
|
||||
if [ -w "$lib_dir" ]
|
||||
then
|
||||
ln -sf "$(basename "$lttng_lib")" "$lib_dir/liblttng-ust.so.0"
|
||||
echo "Created compatibility symlink: $lib_dir/liblttng-ust.so.0 -> $(basename "$lttng_lib")"
|
||||
ldconfig
|
||||
return 0
|
||||
else
|
||||
echo "Cannot create symlink in $lib_dir (permission denied)"
|
||||
return 1
|
||||
fi
|
||||
else
|
||||
echo "Could not find lttng-ust library file"
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "Failed to install lttng-ust package"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
dnf_with_lttng_fallbacks
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo "'dnf' failed with exit code '$?'"
|
||||
echo "Failed to install lttng-ust with compatibility"
|
||||
print_errormessage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user