diff --git a/.update/patches b/.update/patches index 77f61aea3d..d03c493b07 100755 --- a/.update/patches +++ b/.update/patches @@ -1401,14 +1401,6 @@ Patch_8_22() [[ -f '/etc/apt/preferences.d/dietpi-armbian-tmp' ]] && G_EXEC rm /etc/apt/preferences.d/dietpi-armbian-tmp [[ -f '/etc/apt/apt.conf.d/dietpi-armbian' ]] && G_EXEC rm /etc/apt/apt.conf.d/dietpi-armbian - # Migrate Armbian keyring from /etc/apt/trusted.gpg to /etc/apt/trusted.gpg.d for old images - if [[ -f '/etc/apt/trusted.gpg' && $(apt-key --keyring /etc/apt/trusted.gpg list 'DF00FAF1C577104B50BF1D0093D6889F9F0E78D5' 2> /dev/null) ]] - then - G_EXEC eval 'curl -sSfL '\''https://apt.armbian.com/armbian.key'\'' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-armbian.gpg --yes' - G_EXEC apt-key --keyring /etc/apt/trusted.gpg del 'DF00FAF1C577104B50BF1D0093D6889F9F0E78D5' - [[ $(apt-key --keyring /etc/apt/trusted.gpg list 2> /dev/null) ]] || G_EXEC rm /etc/apt/trusted.gpg - fi - # Odroid C1: Set kernel packages on hold. We pin them in pre-patches and enforce an automated downgrade, in case, but since v23.02.2 might not be available forever, we should also set them on hold, until we know there is a compatble newer version available: # - https://dietpi.com/forum/t/odroid-c1-not-booting-after-kernel-upgrade/17818 # - https://github.com/MichaIng/DietPi/issues/6616#issuecomment-1730900296 diff --git a/.update/pre-patches b/.update/pre-patches index 0e83cc0562..9355ec3d00 100755 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -312,6 +312,22 @@ then G_DIETPI-NOTIFY 2 'Removing faulty non-free-firmware component if present' (( $G_RASPBIAN )) && G_EXEC sed -i 's/ non-free-firmware$//' /etc/apt/sources.list fi + + # Migrate Armbian keyring from /etc/apt/trusted.gpg to /etc/apt/trusted.gpg.d for old images + if [[ -f '/etc/apt/trusted.gpg' && $(apt-key --keyring /etc/apt/trusted.gpg list 'DF00FAF1C577104B50BF1D0093D6889F9F0E78D5' 2> /dev/null) ]] + then + G_EXEC eval 'curl -sSfL '\''https://apt.armbian.com/armbian.key'\'' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-armbian.gpg --yes' + G_EXEC apt-key --keyring /etc/apt/trusted.gpg del 'DF00FAF1C577104B50BF1D0093D6889F9F0E78D5' + [[ $(apt-key --keyring /etc/apt/trusted.gpg list 2> /dev/null) ]] || G_EXEC rm /etc/apt/trusted.gpg + fi + + # Migrate Sonarr keyring from apt-key and /etc/apt/trusted.gpg to /etc/apt/trusted.gpg.d + if [[ -f '/etc/apt/trusted.gpg' && $(apt-key --keyring /etc/apt/trusted.gpg list '2009837CBFFD68F45BC180471F4F90DE2A9B4BF8' 2> /dev/null) ]] + then + G_EXEC gpg --keyserver 'hkp://keyserver.ubuntu.com:80' --no-default-keyring --keyring /etc/apt/trusted.gpg.d/dietpi-sonarr.gpg --recv-keys '2009837CBFFD68F45BC180471F4F90DE2A9B4BF8' + G_EXEC apt-key --keyring /etc/apt/trusted.gpg del '2009837CBFFD68F45BC180471F4F90DE2A9B4BF8' + [[ $(apt-key --keyring /etc/apt/trusted.gpg list 2> /dev/null) ]] || G_EXEC rm /etc/apt/trusted.gpg + fi fi exit 0 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index c0a048c191..01977c2599 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -9644,11 +9644,10 @@ _EOF_ then # https://sonarr.tv/#downloads-v3-linux-debian # APT repo key - G_EXEC apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-keys '2009837CBFFD68F45BC180471F4F90DE2A9B4BF8' + G_EXEC gpg --keyserver 'hkp://keyserver.ubuntu.com:80' --no-default-keyring --keyring /etc/apt/trusted.gpg.d/dietpi-sonarr.gpg --recv-keys '2009837CBFFD68F45BC180471F4F90DE2A9B4BF8' - # APT repo list - local distro=${G_DISTRO_NAME/bookworm/bullseye} - G_EXEC eval "echo 'deb https://apt.sonarr.tv/debian/ ${distro/bullseye/buster} main' > /etc/apt/sources.list.d/sonarr.list" + # APT repo list: Buster is the latest available suite: https://apt.sonarr.tv/debian/dists/ + G_EXEC eval 'echo '\''deb https://apt.sonarr.tv/debian/ buster main'\'' > /etc/apt/sources.list.d/sonarr.list' # Update package lists G_AGUP @@ -9662,7 +9661,11 @@ _EOF_ G_EXEC systemctl stop sonarr # Pre-v7.1: Remove Sonarr v2 key, PID file and database backups from DietPi-Arr_to_RAM - [[ $(apt-key list 'A236C58F409091A18ACA53CBEBFF6B99D9B78493' 2> /dev/null) ]] && G_EXEC apt-key del 'A236C58F409091A18ACA53CBEBFF6B99D9B78493' + if [[ -f '/etc/apt/trusted.gpg' && $(apt-key --keyring /etc/apt/trusted.gpg list 'A236C58F409091A18ACA53CBEBFF6B99D9B78493' 2> /dev/null) ]] + then + G_EXEC apt-key --keyring /etc/apt/trusted.gpg del 'A236C58F409091A18ACA53CBEBFF6B99D9B78493' + [[ $(apt-key --keyring /etc/apt/trusted.gpg list 2> /dev/null) ]] || G_EXEC rm /etc/apt/trusted.gpg + fi [[ -f '/mnt/dietpi_userdata/sonarr/nzbdrone.pid' ]] && G_EXEC rm /mnt/dietpi_userdata/sonarr/nzbdrone.pid [[ -f '/mnt/dietpi_userdata/sonarr/nzbdrone.db.bak' ]] && G_EXEC rm /mnt/dietpi_userdata/sonarr/nzbdrone.db.bak @@ -12944,8 +12947,13 @@ If no WireGuard (auto)start is included, but you require it, please do the follo [[ -d '/var/log/sonarr' ]] && G_EXEC rm -R /var/log/sonarr G_EXEC rm -Rf /mnt/dietpi_userdata/sonarr /opt/NzbDrone # Pre-v7.1 [[ -f '/etc/apt/sources.list.d/sonarr.list' ]] && G_EXEC rm /etc/apt/sources.list.d/sonarr.list - [[ $(apt-key list '2009837CBFFD68F45BC180471F4F90DE2A9B4BF8' 2> /dev/null) ]] && G_EXEC apt-key del '2009837CBFFD68F45BC180471F4F90DE2A9B4BF8' - [[ $(apt-key list 'A236C58F409091A18ACA53CBEBFF6B99D9B78493' 2> /dev/null) ]] && G_EXEC apt-key del 'A236C58F409091A18ACA53CBEBFF6B99D9B78493' # Pre-v7.1 + [[ -f '/etc/apt/trusted.gpg.d/dietpi-sonarr.gpg' ]] && G_EXEC rm /etc/apt/trusted.gpg.d/dietpi-sonarr.gpg + # Pre-v7.1: Remove Sonarr v2 key + if [[ -f '/etc/apt/trusted.gpg' && $(apt-key --keyring /etc/apt/trusted.gpg list 'A236C58F409091A18ACA53CBEBFF6B99D9B78493' 2> /dev/null) ]] + then + G_EXEC apt-key --keyring /etc/apt/trusted.gpg del 'A236C58F409091A18ACA53CBEBFF6B99D9B78493' + [[ $(apt-key --keyring /etc/apt/trusted.gpg list 2> /dev/null) ]] || G_EXEC rm /etc/apt/trusted.gpg + fi fi if To_Uninstall 145 # Radarr