duplicati/ReleaseBuilder/Resources/debian/preinst
Kenneth Skovhede 094be4a9d8 Improve dependency on libicu
Since .NET dynamically loads libicu, it is not prone to ABI breakage and can load virtually any version.

However, there is no `Depends: libicu*` option in Debian packages, so we need the explicit package version. This is prone to breaking as new Debian version bump the version number.

This PR changes the `Depends:` to `Recommends:` so `libicu` is installed if possible, but does not prevent installation.

For cases where the is no `libicu` on the system, there is now a `preinst` script which will warn if the library is missing, but not prevent installation.

The warning should only show in Docker images or similar slim contexts, as `libicu` is otherwise installed with the base system.
2025-08-12 15:34:14 +02:00

22 lines
No EOL
815 B
Bash

#!/bin/sh
set -e
if ! ldconfig -p 2>/dev/null | grep -qE 'libicuuc\.so\.[0-9]+'; then
echo
echo "************************************************************"
echo "WARNING: No system ICU library (libicuNN) detected."
echo
echo "Duplicati relies on ICU for globalization."
echo "Without ICU, Duplicati will likely fail at runtime with"
echo "errors like: 'Couldn't find a valid ICU package installed'."
echo
echo "To fix this, either:"
echo " 1. Install a system ICU package (e.g. libicu75, libicu74, ...)"
echo " Example: sudo apt install libicu75"
echo " 2. Or run with invariant globalization enabled:"
echo " export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1"
echo "************************************************************"
echo
fi
exit 0