Skip to content

Commit d59c829

Browse files
committed
dietpi-software: Snapcast: full upstream packages for Trixie
and update repo URL which has been turned into a GitHub orga
1 parent 0c861b8 commit d59c829

File tree

3 files changed

+24
-22
lines changed

3 files changed

+24
-22
lines changed

.github/workflows/update_urls.bash

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -240,24 +240,24 @@ aREGEX[$software_id]='go[0-9.]*\.linux-\$arch\.tar\.gz'
240240

241241
# Snapcast Server: Implement distro loop?
242242
software_id=191
243-
aCHECK[$software_id]='curl -sSf '\''https://api.github.com/repos/badaix/snapcast/releases/latest'\'' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapserver_[^\"\/]*_${arch}_bookworm.deb\"$/{print \$4}"'
243+
aCHECK[$software_id]='curl -sSf '\''https://api.github.com/repos/snapcast/snapcast/releases/latest'\'' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapserver_[^\"\/]*_${arch}_bookworm.deb\"$/{print \$4}"'
244244
aARCH[$software_id]='armhf arm64 amd64'
245245
aARCH_CHECK[$software_id]='riscv64'
246-
aREGEX[$software_id]='https://github.com/badaix/snapcast/releases/download/.*/snapserver_.*_\${arch}_\$G_DISTRO_NAME.deb'
247-
aREPLACE[$software_id]='${release/bookworm/\$G_DISTRO_NAME}'
246+
aREGEX[$software_id]='https://github.com/snapcast/snapcast/releases/download/.*/snapserver_.*_\${arch}_\$dist.deb'
247+
aREPLACE[$software_id]='${release/bookworm/\$dist}'
248248

249249
# Snapcast Server: snapweb
250250
software_id=191000 # 000 appended as little hack to support multiple updates for the same software ID
251-
aCHECK[$software_id]='curl -sSf '\''https://api.github.com/repos/badaix/snapweb/releases/latest'\'' | mawk -F\" '\''/^ *"browser_download_url": ".*\/snapweb_[^"\/]*_all.deb"$/{print $4}'\'
252-
aREGEX[$software_id]='https://github.com/badaix/snapweb/releases/download/.*/snapweb_.*_all\.deb'
251+
aCHECK[$software_id]='curl -sSf '\''https://api.github.com/repos/snapcast/snapweb/releases/latest'\'' | mawk -F\" '\''/^ *"browser_download_url": ".*\/snapweb_[^"\/]*_all.deb"$/{print $4}'\'
252+
aREGEX[$software_id]='https://github.com/snapcast/snapweb/releases/download/.*/snapweb_.*_all\.deb'
253253

254254
# Snapcast Client: Implement distro loop?
255255
software_id=192
256-
aCHECK[$software_id]='curl -sSf '\''https://api.github.com/repos/badaix/snapcast/releases/latest'\'' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapclient_0[^\"\/]*_${arch}_bookworm.deb\"$/{print \$4}"'
256+
aCHECK[$software_id]='curl -sSf '\''https://api.github.com/repos/snapcast/snapcast/releases/latest'\'' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapclient_[^\"\/]*_${arch}_bookworm.deb\"$/{print \$4}"'
257257
aARCH[$software_id]='armhf arm64 amd64'
258258
aARCH_CHECK[$software_id]='riscv64'
259-
aREGEX[$software_id]='https://github.com/badaix/snapcast/releases/download/.*/snapclient_0.*_\${arch}_\$G_DISTRO_NAME.deb'
260-
aREPLACE[$software_id]='${release/bookworm/\$G_DISTRO_NAME}'
259+
aREGEX[$software_id]='https://github.com/snapcast/snapcast/releases/download/.*/snapclient_.*_\${arch}_\$dist.deb'
260+
aREPLACE[$software_id]='${release/bookworm/\$dist}'
261261

262262
# Box64
263263
software_id=197

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ Links to hardware and software manufacturers, sources and build instructions use
302302
- [Beets](https://github.com/beetbox/beets)
303303
- [frp](https://github.com/fatedier/frp)
304304
- [AdGuard Home](https://github.com/AdguardTeam/AdGuardHome)
305-
- [Snapcast](https://github.com/badaix/snapcast)
305+
- [Snapcast](https://github.com/snapcast/snapcast)
306306
- [K3s](https://github.com/k3s-io/k3s)
307307
- [Synapse](https://github.com/matrix-org/synapse)
308308
- [youtube-dl](https://github.com/ytdl-org/youtube-dl)

dietpi/dietpi-software

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2840,23 +2840,24 @@ _EOF_
28402840

28412841
if To_Install 191 snapserver # Snapcast Server
28422842
then
2843-
# RISC-V/Trixie: Install from Debian repo: https://github.com/badaix/snapcast/releases
2844-
if (( $G_DISTRO > 7 ))
2843+
# RISC-V: Install from Debian repo: https://github.com/snapcast/snapcast/releases
2844+
if (( $G_HW_ARCH == 11 ))
28452845
then
28462846
G_AGI snapserver
28472847

28482848
# Install and enable snapweb web UI, not included in Debian's snapserver package: https://github.com/MichaIng/DietPi/issues/7073
2849-
local fallback_url='https://github.com/badaix/snapweb/releases/download/v0.9.2/snapweb_0.9.2-1_all.deb'
2850-
Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapweb/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/snapweb_[^"\/]*_all.deb"$/{print $4}')"
2849+
local fallback_url='https://github.com/snapcast/snapweb/releases/download/v0.9.2/snapweb_0.9.2-1_all.deb'
2850+
Download_Install "$(curl -sSfL 'https://api.github.com/repos/snapcast/snapweb/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/snapweb_[^"\/]*_all.deb"$/{print $4}')"
28512851
G_CONFIG_INJECT 'doc_root[[:blank:]=]' 'doc_root = /usr/share/snapweb' /etc/snapserver.conf '\[http\]'
28522852

2853-
# Fix /var/lib/snapserver permissions, just in case badaix's package was previously used, which uses the "snapserver" user, instead of "_snapserver"
2853+
# Fix /var/lib/snapserver permissions, just in case snapcast's package was previously used, which uses the "snapserver" user, instead of "_snapserver"
28542854
[[ -d '/var/lib/snapserver' ]] && G_EXEC chown -R '_snapserver:_snapserver' /var/lib/snapserver
28552855
getent passwd snapserver > /dev/null && G_EXEC userdel snapserver
28562856
else
28572857
local arch=$(dpkg --print-architecture)
2858-
local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.34.0/snapserver_0.34.0-1_${arch}_$G_DISTRO_NAME.deb"
2859-
Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapserver_[^\"\/]*_${arch}_$G_DISTRO_NAME.deb\"$/{print \$4}")"
2858+
local dist=${G_DISTRO_NAME/forky/trixie}
2859+
local fallback_url="https://github.com/snapcast/snapcast/releases/download/v0.34.0/snapserver_0.34.0-1_${arch}_$dist.deb"
2860+
Download_Install "$(curl -sSfL 'https://api.github.com/repos/snapcast/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapserver_[^\"\/]*_${arch}_$dist.deb\"$/{print \$4}")"
28602861

28612862
# Fix /var/lib/snapserver permissions, just in case Debian's package was previously used, which uses the "_snapserver" user, instead of "snapserver"
28622863
[[ -d '/var/lib/snapserver' ]] && G_EXEC chown -R 'snapserver:snapserver' /var/lib/snapserver
@@ -2870,14 +2871,15 @@ _EOF_
28702871

28712872
if To_Install 192 snapclient # Snapcast Client
28722873
then
2873-
# RISC-V/Trixie: Install from Debian repo: https://github.com/badaix/snapcast/releases
2874-
if (( $G_DISTRO > 7 ))
2874+
# RISC-V: Install from Debian repo: https://github.com/snapcast/snapcast/releases
2875+
if (( $G_HW_ARCH == 11 ))
28752876
then
28762877
G_AGI snapclient
28772878
else
28782879
local arch=$(dpkg --print-architecture)
2879-
local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.34.0/snapclient_0.34.0-1_${arch}_$G_DISTRO_NAME.deb"
2880-
Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapclient_[^\"\/]*_${arch}_$G_DISTRO_NAME.deb\"$/{print \$4}")"
2880+
local dist=${G_DISTRO_NAME/forky/trixie}
2881+
local fallback_url="https://github.com/snapcast/snapcast/releases/download/v0.34.0/snapclient_0.34.0-1_${arch}_$dist.deb"
2882+
Download_Install "$(curl -sSfL 'https://api.github.com/repos/snapcast/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapclient_[^\"\/]*_${arch}_$dist.deb\"$/{print \$4}")"
28812883
fi
28822884
G_EXEC systemctl stop snapclient
28832885

@@ -2901,7 +2903,7 @@ _EOF_
29012903
fi
29022904

29032905
# If no Snapcast server was defined explicitly, e.g. on unattended install without having the server installed first, server and client use Avahi to find each other.
2904-
# The client throws endless errors if Avahi is not running, and endless messages until the server announced itself: https://github.com/badaix/snapcast/issues/647
2906+
# The client throws endless errors if Avahi is not running, and endless messages until the server announced itself: https://github.com/snapcast/snapcast/issues/647
29052907
# Hence Avahi-Daemon is added as fixed dependency for the server, and added for the client hereby if no server was explicitly defined. But is this as fallback only for unattended installs.
29062908
if ! grep -q '^[[:blank:]]*SNAPCLIENT_OPTS=.*["[:blank:]]-h[[:blank:]]' /etc/default/snapclient
29072909
then
@@ -14422,7 +14424,7 @@ _EOF_
1442214424
if To_Uninstall 191 # Snapcast Server
1442314425
then
1442414426
G_AGP snapserver
14425-
# Remove users from Debian's and badaix's packages, to cleanly cover upgrades from one to the other.
14427+
# Remove users from Debian's and snapcast's packages, to cleanly cover upgrades from one to the other.
1442614428
getent passwd snapserver > /dev/null && G_EXEC userdel snapserver
1442714429
getent passwd _snapserver > /dev/null && G_EXEC userdel _snapserver
1442814430
fi

0 commit comments

Comments
 (0)