diff --git a/README.md b/README.md index 593e9e3..115a22c 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Other derivatives are detected automatically via the `ID_LIKE` field in `/etc/os - Tuxedo OS 3 (i.e. Ubuntu 24.04) - Debian 13 - - NOTE: The Debian project is no longer using a standard package name for `libasound2`. Not to worry, apt will automatically select the `libasound2t64` packages it needs. For all derivative distributions, therefore, the package name will remain "libasound2". + - NOTE: Debian 13 and Ubuntu 24.04 renamed `libasound2` to `libasound2t64` as part of the Y2038 transition, but not every derivative followed (Devuan, for example, still ships `libasound2`). The installer probes `apt-cache` at runtime and selects whichever name is a real package on the host, so this is handled transparently across the Debian family. - Devuan 6.1 Excalibur - NOTE: server-mode installation is unavailable here, because Devuan does not use systemd. The installer detects this and refuses `SYSTEMD_MODE=install` up front rather than failing mid-install. - Manjaro diff --git a/install_sdrplay_universal.sh b/install_sdrplay_universal.sh index 30af5a1..d1f28ad 100755 --- a/install_sdrplay_universal.sh +++ b/install_sdrplay_universal.sh @@ -206,7 +206,24 @@ run_root(){ [[ "$DRY_RUN" -eq 1 ]] && echo "[DRY-RUN] $SUDO $*" || ${SUDO:-} "$@ # 4. Add detection logic in detect_distro_family() ####################################### -debian_packages(){ echo "curl tar ca-certificates gzip libusb-1.0-0 libasound2 libuuid1 libudev1 libmp3lame-dev libhamlib-dev"; } +_DEB_ASOUND="" +debian_resolve_asound(){ + [[ -n "$_DEB_ASOUND" ]] && return + # The libasound2 → libasound2t64 rename (Y2038 transition) hit Debian 13 + # and Ubuntu 24.04, but not all derivatives followed. On noble libasound2 + # is purely virtual; on Devuan libasound2t64 doesn't exist. Probe apt-cache + # to pick whichever name is a real package on this host. + if apt-cache show libasound2t64 2>/dev/null | grep -q "^Package: libasound2t64"; then + _DEB_ASOUND="libasound2t64" + else + _DEB_ASOUND="libasound2" + fi +} + +debian_packages(){ + debian_resolve_asound + echo "curl tar ca-certificates gzip libusb-1.0-0 $_DEB_ASOUND libuuid1 libudev1 libmp3lame-dev libhamlib-dev" +} debian_check(){ dpkg -s "$1" >/dev/null 2>&1; } debian_install(){ ensure_sudo