fix(installer): handle libasound2t64 rename in Debian 13 and derivatives

Update the installer script to dynamically detect and use the correct package name
(libasound2 or libasound2t64) via apt-cache probing, ensuring compatibility across
Debian family distributions like Ubuntu 24.04 and Devuan.

Revise the README note to reflect this transparent handling.
This commit is contained in:
Greg Gauthier 2026-05-03 16:12:24 +01:00
parent eed8176605
commit c463add2f2
2 changed files with 19 additions and 2 deletions

View File

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

View File

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