From 5df01ae76176b442e4231810bdcb448fe1e20e61 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 30 Dec 2024 12:15:20 +0700 Subject: [PATCH] v9.10 - DietPi-Software | Raspotify: Migrate to new APT list name and key format - DietPi-Software | Raspotify: Try to use old DNS-SD backend, to avoid new Avahi-Daemon dependency --- .update/patches | 19 +++++++++++++++++++ dietpi/dietpi-software | 15 ++++++++------- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/.update/patches b/.update/patches index a3a0ae86c8..ff85e4928f 100755 --- a/.update/patches +++ b/.update/patches @@ -2067,6 +2067,25 @@ Patch_9_9() fi } +Patch_9_10() +{ + # Software updates, migrations and patches + if [[ -f '/boot/dietpi/.installed' ]] + then + # Raspotify + if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[167\]=2' /boot/dietpi/.installed + then + G_DIETPI-NOTIFY 2 'Migrating to new Raspotify APT list name and key format ...' + [[ -f '/etc/apt/sources.list.d/raspotify.list' ]] && G_EXEC mv /etc/apt/sources.list.d/{,dietpi-}raspotify.list + if [[ -f '/etc/apt/trusted.gpg.d/dietpi-raspotify.gpg' ]] + then + G_EXEC curl -sSfo /etc/apt/trusted.gpg.d/dietpi-raspotify.asc 'https://dtcooper.github.io/raspotify/key.asc' + G_EXEC rm /etc/apt/trusted.gpg.d/dietpi-raspotify.gpg + fi + fi + fi +} + # v6.35 => v7 migration if (( $G_DIETPI_VERSION_CORE == 6 && $G_DIETPI_VERSION_SUB > 34 )) then diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 214927a50f..c96c57eae5 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -517,7 +517,7 @@ Available commands: aSOFTWARE_DESC[$software_id]='Spotify connect client' aSOFTWARE_CATX[$software_id]=2 aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/media/#raspotify' - aSOFTWARE_DEPS[$software_id]='5 152' + aSOFTWARE_DEPS[$software_id]='5' # - RISC-V: No package: https://github.com/dtcooper/raspotify/releases aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,11]=0 # - Bookworm/Trixie on ARMv6 (older package): "/usr/bin/librespot: error while loading shared libraries: ld-linux.so.3: cannot open shared object file: No such file or directory" @@ -10903,16 +10903,17 @@ _EOF_ # ARMv7/ARMv8/x86_64 else # APT key - local url='https://dtcooper.github.io/raspotify/key.asc' - G_CHECK_URL "$url" - G_EXEC eval "curl -sSfL '$url' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-raspotify.gpg --yes" + Download_Install 'https://dtcooper.github.io/raspotify/key.asc' /etc/apt/trusted.gpg.d/dietpi-raspotify.asc # APT list - G_EXEC eval 'echo '\''deb https://dtcooper.github.io/raspotify raspotify main'\'' > /etc/apt/sources.list.d/raspotify.list' + G_EXEC eval 'echo '\''deb https://dtcooper.github.io/raspotify raspotify main'\'' > /etc/apt/sources.list.d/dietpi-raspotify.list' G_AGUP # APT package G_AGI raspotify + + # Switch to old DNS-SD backend, to avoid Avahi-Daemon dependency: https://github.com/MichaIng/DietPi/issues/7323 + GGI_PRESERVE=1 G_CONFIG_INJECT 'LIBRESPOT_ZEROCONF_BACKEND=' 'LIBRESPOT_ZEROCONF_BACKEND="dns-sd"' /etc/raspotify/conf fi # Stop service @@ -13793,8 +13794,8 @@ _EOF_ if To_Uninstall 167 # Raspotify then G_AGP raspotify - [[ -f '/etc/apt/sources.list.d/raspotify.list' ]] && G_EXEC rm /etc/apt/sources.list.d/raspotify.list - [[ -f '/etc/apt/trusted.gpg.d/dietpi-raspotify.gpg' ]] && G_EXEC rm /etc/apt/trusted.gpg.d/dietpi-raspotify.gpg + [[ -f '/etc/apt/sources.list.d/dietpi-raspotify.list' ]] && G_EXEC rm /etc/apt/sources.list.d/dietpi-raspotify.list + [[ -f '/etc/apt/trusted.gpg.d/dietpi-raspotify.asc' ]] && G_EXEC rm /etc/apt/trusted.gpg.d/dietpi-raspotify.asc fi if To_Uninstall 169 # Google AIY