Compare commits

...

3 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
7d9e854d53 Update documentation for Fedora lttng-ust compatibility handling
Co-authored-by: salmanmkc <32169182+salmanmkc@users.noreply.github.com>
2025-08-30 04:29:59 +00:00
copilot-swe-agent[bot]
177cdb91f2 Fix Fedora 41 liblttng-ust dependency issue with fallback logic
Co-authored-by: salmanmkc <32169182+salmanmkc@users.noreply.github.com>
2025-08-30 04:28:49 +00:00
copilot-swe-agent[bot]
d96f509385 Initial plan 2025-08-30 04:13:38 +00:00
2 changed files with 54 additions and 2 deletions

View File

@@ -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

View File

@@ -131,12 +131,63 @@ then
command -v dnf
if [ $? -eq 0 ]
then
dnf install -y lttng-ust openssl-libs krb5-libs zlib libicu
# Install basic dependencies first
dnf install -y openssl-libs krb5-libs zlib libicu
if [ $? -ne 0 ]
then
echo "'dnf' failed with exit code '$?'"
print_errormessage
exit 1
fi
# 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 "Failed to install lttng-ust with compatibility"
print_errormessage
exit 1
fi
else
echo "Can not find 'dnf'"