From 4262dea402d8126addd1b74e0afcc9f04244a0e0 Mon Sep 17 00:00:00 2001 From: Joulinar <47155374+Joulinar@users.noreply.github.com> Date: Sun, 29 Dec 2024 14:08:22 +0100 Subject: [PATCH 1/4] v9.10 Dietpi-Software | Raspotify - add avahi-daemon as dependency --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 8bcdf9488e..214927a50f 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' + aSOFTWARE_DEPS[$software_id]='5 152' # - 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" From 5df01ae76176b442e4231810bdcb448fe1e20e61 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 30 Dec 2024 12:15:20 +0700 Subject: [PATCH 2/4] 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 From a7acf854697a02f6907775edf7ec302a8780beca Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 30 Dec 2024 12:23:09 +0700 Subject: [PATCH 3/4] v9.10 - DietPi-Software | Raspotify: Switch back to Avahi-Daemon backend and dependency, as it is currently the only one supported by the pre-compiled binaries --- dietpi/dietpi-software | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index c96c57eae5..97527330cf 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' + aSOFTWARE_DEPS[$software_id]='5 152' # - 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" @@ -10911,9 +10911,6 @@ _EOF_ # 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 From c462ddc7271a430a0f0c479df1929e7e1b47da2a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 30 Dec 2024 13:30:36 +0700 Subject: [PATCH 4/4] v9.10 - CHANGELOG | Add Raspotify entry --- CHANGELOG.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f6633ad4d8..f4e99f4dcd 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -8,6 +8,7 @@ Enhancements: Bug fixes: - DietPi-Software | Sonarr: Resolved an issue where the internal updater did not work due to permission limits in the systemd unit. Many thanks to @tellice for reporting this issue: https://github.com/MichaIng/DietPi/issues/7321 - DietPi-Software | Fail2Ban: Resolved an issue where a fixed Dropbear filter could not be installed, because the directory did not exist yet. Many thanks to @augustresende for reporting this issue: https://github.com/MichaIng/DietPi/issues/7325 +- DietPi-Software | Raspotify: Resolved an issue where the service failed to start, if Avahi-Daemon was not installed. librespot has it as new default DNS discovery backend, and official pre-compiled Raspotify binaries are not compiled with the old DNS-SD backend anymore. Avahi-Daemon is hence installed now by DietPi-Software as well. Many thanks to @gergokis for reporting this issue: https://github.com/MichaIng/DietPi/issues/7323 As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/ADDME