Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beta v8.23.1 #6691

Merged
merged 6 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 11 additions & 25 deletions .update/patches
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1470,7 +1462,7 @@ Patch_8_23()
G_EXEC rm package.deb

# VisionFive 2
elif (( $G_HW_MODEL == 81 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-visionfive2 2> /dev/null)" lt-nl 6.1.58-dietpi1
elif (( $G_HW_MODEL == 81 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-visionfive2 2> /dev/null)" lt-nl 6.1.58-dietpi2
then
G_DIETPI-NOTIFY 2 'Updating RISC-V StarFive VisionFive 2 kernel ...'
G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/linux-image-visionfive2.deb'
Expand All @@ -1482,15 +1474,12 @@ Patch_8_23()
then
G_DIETPI-NOTIFY 2 'A revision detected, applying device tree overlay to fix Ethernet ...'
read -ra overlays < <(mawk '$1=="fdtoverlays"{$1="";print}' /boot/extlinux/extlinux.conf)
local add=1
for i in "${overlays[@]}"
do
[[ $i == '/usr/lib/linux-image-visionfive2/starfive/vf2-overlay/ethernet-A12.dtbo' ]] || continue
G_DIETPI-NOTIFY 2 'A revision Ethernet overlay was applied already ...'
add=0
done
if (( $add ))
local i=
for i in "${overlays[@]}"; do [[ $i == *'/ethernet-A12.dtbo' ]] && break; done
if [[ $i == *'/ethernet-A12.dtbo' ]]
then
G_DIETPI-NOTIFY 2 'A revision Ethernet overlay was applied already ...'
else
overlays+=('/usr/lib/linux-image-visionfive2/starfive/vf2-overlay/ethernet-A12.dtbo')
G_CONFIG_INJECT 'fdtoverlays[[:blank:]]' "fdtoverlays ${overlays[*]}" /boot/extlinux/extlinux.conf
fi
Expand All @@ -1499,15 +1488,12 @@ Patch_8_23()
then
G_DIETPI-NOTIFY 2 '8 GB RAM model detected, applying device tree overlay to make all 8 GB available to the system ...'
read -ra overlays < <(mawk '$1=="fdtoverlays"{$1="";print}' /boot/extlinux/extlinux.conf)
local add=1
for i in "${overlays[@]}"
do
[[ $i == '/usr/lib/linux-image-visionfive2/starfive/vf2-overlay/8GB.dtbo' ]] || continue
G_DIETPI-NOTIFY 2 '8 GB RAM overlay was applied already ...'
add=0
done
if (( $add ))
local i=
for i in "${overlays[@]}"; do [[ $i == *'/8GB.dtbo' ]] && break; done
if [[ $i == *'/8GB.dtbo' ]]
then
G_DIETPI-NOTIFY 2 '8 GB RAM overlay was applied already ...'
else
overlays+=('/usr/lib/linux-image-visionfive2/starfive/vf2-overlay/8GB.dtbo')
G_CONFIG_INJECT 'fdtoverlays[[:blank:]]' "fdtoverlays ${overlays[*]}" /boot/extlinux/extlinux.conf
fi
Expand Down
18 changes: 17 additions & 1 deletion .update/pre-patches
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ _EOF_
fi

# v8.23
if (( $G_DIETPI_VERSION_CORE < 8 || ( $G_DIETPI_VERSION_CORE == 8 && $G_DIETPI_VERSION_SUB < 22 ) ))
if (( $G_DIETPI_VERSION_CORE < 8 || ( $G_DIETPI_VERSION_CORE == 8 && $G_DIETPI_VERSION_SUB < 23 ) ))
then
# RISC-V: Migrate from Debian ports to regular Debian Sid
if (( $G_HW_ARCH == 11 ))
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .update/version
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Available DietPi version
G_REMOTE_VERSION_CORE=8
G_REMOTE_VERSION_SUB=23
G_REMOTE_VERSION_RC=0
G_REMOTE_VERSION_RC=1
# Minimum DietPi version to allow update
G_MIN_VERSION_CORE=6
G_MIN_VERSION_SUB=14
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ v8.23

Enhancements:
- RPi | On Debian Bookworm and above, the RPi APT repository will be migrated to its new Bookworm suite. This solves issues and should enhance performance with FFmpeg, Kodi and some other A/V software, where we used the Debian packages with less hardware support before. The packages should be upgraded automatically on DietPi update. Please report back if you experience any issues during this process.
- ROCK 5B | Added an option to dietpi-config "Advanced Option" to flash the SPI bootloader, which enables NVMe boot for DietPi images.
- ROCK 5B | Added an option to dietpi-config "Advanced Option" to flash the SPI bootloader, which enables USB and NVMe boot for DietPi images.
- ROCK 4 | Added an option to dietpi-config "Advanced Option" to flash the SPI bootloader, which enables USB and in case NVMe boot for DietPi images. Note that not all ROCK 4 models ship with an onboard SPI storage. DietPi-Config will check for it, in case apply a related device tree overlay and suggests a reboot. If after the reboot an SPI device has still not been found, your board seems to have none. Report back if this is definitely wrong. Many thanks to @andreagdipaolo for doing this request: https://github.com/MichaIng/DietPi/issues/6688
- DietPi-Software | Firefox: Enabled the software option for RISC-V, since Debian provides packages now. But do not expect good performance, as GPU-acceleration is missing.
- DietPi-Software | ADS-B Feeder: The uninstall has been hardened to rule out the removal of unused Docker images which were not created by ADS-B Feeder. Furthermore, beta tags are now correctly shown in the version string. Many thanks to @andreagdipaolo for reporting a related issue and @dirkhh for implementing the enhancement: https://github.com/MichaIng/DietPi/pull/6587#issuecomment-1743744008
- DietPi-Software | DietPi-Dashboard: Experimental support for RISC-V has been added. Note that this will be an alpha build with alpha versions of certain dependencies, required to compile on RISC-V. Hence this is not suitable for production usage, which basically applies for RISC-V and the VisionFive 2 in general.
Expand Down
30 changes: 27 additions & 3 deletions dietpi/dietpi-config
Original file line number Diff line number Diff line change
Expand Up @@ -1068,10 +1068,11 @@ Re-enabling HDMI requires a reboot. If you need emergency HDMI output, edit the
G_WHIP_MENU_ARRAY+=('Update RPi4 EEPROM firmware' ': Install rpi-eeprom APT package')
fi

# ROCK 5B and Orange Pi 5 (Plus): https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457
elif [[ $G_HW_MODEL =~ ^(78|80|82)$ ]]
# ROCK 4, ROCK 5B and Orange Pi 5 (Plus): https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457
elif [[ $G_HW_MODEL =~ ^(72|78|80|82)$ ]]
then
[[ -b '/dev/mtdblock0' && -f '/usr/lib/u-boot/platform_install.sh' ]] && G_WHIP_MENU_ARRAY+=('Update SPI bootloader' ': Flash current U-Boot to /dev/mtdblock0')
# ROCK 4: Device tree overlay required
(( $G_HW_MODEL == 72 )) || [[ -b '/dev/mtdblock0' && -f '/usr/lib/u-boot/platform_install.sh' ]] && G_WHIP_MENU_ARRAY+=('Update SPI bootloader' ': Flash current U-Boot to /dev/mtdblock0')

# VisionFive 2: https://doc-en.rvspace.org/VisionFive2/PDF/VisionFive2_QSG.pdf
elif (( $G_HW_MODEL == 81 ))
Expand Down Expand Up @@ -1208,11 +1209,34 @@ Further information: https://www.raspberrypi.org/documentation/hardware/raspberr

elif [[ $G_WHIP_RETURNED_VALUE == 'Update SPI bootloader' ]]; then

if [[ $G_HW_MODEL == 72 && ! -b '/dev/mtdblock0' ]]
then
local overlays=() i=
read -ra overlays < <(mawk -F= '$1=="overlays"{$1="";print}' /boot/dietpiEnv.txt)
for i in "${overlays[@]}"; do [[ $i == 'spi-jedec-nor' ]] && break; done
if [[ $i == 'spi-jedec-nor' ]]
then
G_WHIP_MSG '[FAILED] No MTD device found
\nThe expected MTD device /dev/mtdblock0 was not found on your ROCK 4 system, despite the fact that the related device tree overlay has been applied already. You may either have a model which has no onboard SPI storage, or you did not reboot yet for the change to take effect.
\nIn case reboot the system before selecting this menu option again, otherwise check back whether your ROCK 4 variant is really supposed to have an SPI storge.'
return 1
else
G_WHIP_YESNO '[ INFO ] No MTD device found
\nThe expected MTD device /dev/mtdblock0 was not found on your ROCK 4 system. You may either have a model which has no onboard SPI storage, or a device tree overlay may be required to make the MTD device available.
\nShall we add the overlay for you? A reboot will be required for the change to take effect, after which you can reselect this menu option.' || return 0
overlays+=('spi-jedec-nor')
G_CONFIG_INJECT 'overlays=' "overlays=${overlays[*]}" /boot/dietpiEnv.txt
G_CONFIG_INJECT 'param_spinor_spi_bus=' 'param_spinor_spi_bus=1' /boot/dietpiEnv.txt
REBOOT_REQUIRED=1
return 0
fi
fi
G_WHIP_YESNO '[ INFO ] SPI bootloader update
\nThis will flash the U-Boot image of the installed linux-u-boot-* package to the SPI device /dev/mtdblock0.
\nDo you want to continue?' || return 0
# shellcheck disable=SC1091
. /usr/lib/u-boot/platform_install.sh
[[ -f $DIR/rkspi_loader.img ]] || { G_WHIP_MSG "[FAILED] SPI U-Boot image missing\n\nThe expected U-Boot image at $DIR/rkspi_loader.img could not be found. Please report this to our GitHub or forum, so we can check back and in case update this dietpi-config option."; return 1; }
# shellcheck disable=SC2154
G_EXEC_OUTPUT=1 G_EXEC dd if="$DIR/rkspi_loader.img" of=/dev/mtdblock0 oflag=direct conv=notrunc status=progress

Expand Down
26 changes: 17 additions & 9 deletions dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -7576,7 +7576,7 @@ _EOF_
then
Download_Install 'https://github.com/gotson/komga/releases/download/v0.165.0/komga-0.165.0.jar' /mnt/dietpi_userdata/komga/komga.jar
else
local fallback_url='https://github.com/gotson/komga/releases/download/v1.5.1/komga-1.5.1.jar'
local fallback_url='https://github.com/gotson/komga/releases/download/v1.6.1/komga-1.6.1.jar'
Download_Install "$(curl -sSfL 'https://api.github.com/repos/gotson/komga/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/komga-[^"\/]*\.jar"$/{print $4}')" /mnt/dietpi_userdata/komga/komga.jar
fi

Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -11416,7 +11419,7 @@ _EOF_
local ha_user='homeassistant'
local ha_home="/home/$ha_user"
local ha_pyenv_activation=". $ha_home/pyenv-activate.sh"
local ha_python_version='3.11.5' # https://github.com/pyenv/pyenv/tree/master/plugins/python-build/share/python-build
local ha_python_version='3.11.6' # https://github.com/pyenv/pyenv/tree/master/plugins/python-build/share/python-build

G_DIETPI-NOTIFY 2 "Home Assistant user: $ha_user"
G_DIETPI-NOTIFY 2 "Home Assistant home: $ha_home"
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion dietpi/func/dietpi-globals
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# - Assign defaults/code version as fallback
[[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=8
[[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=23
[[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=0
[[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=1
[[ $G_GITBRANCH ]] || G_GITBRANCH='master'
[[ $G_GITOWNER ]] || G_GITOWNER='MichaIng'
# - Save current version and Git branch
Expand Down
26 changes: 10 additions & 16 deletions rootfs/var/lib/dietpi/services/dietpi-firstboot.bash
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,12 @@ _EOF_
then
G_DIETPI-NOTIFY 2 'A revision detected, applying device tree overlay to fix Ethernet ...'
read -ra overlays < <(mawk '$1=="fdtoverlays"{$1="";print}' /boot/extlinux/extlinux.conf)
local add=1
for i in "${overlays[@]}"
do
[[ $i == '/usr/lib/linux-image-visionfive2/starfive/vf2-overlay/ethernet-A12.dtbo' ]] || continue
G_DIETPI-NOTIFY 2 'A revision Ethernet overlay was applied already ...'
add=0
done
if (( $add ))
local i=
for i in "${overlays[@]}"; do [[ $i == *'/ethernet-A12.dtbo' ]] && break; done
if [[ $i == *'/ethernet-A12.dtbo' ]]
then
G_DIETPI-NOTIFY 2 'A revision Ethernet overlay was applied already ...'
else
overlays+=('/usr/lib/linux-image-visionfive2/starfive/vf2-overlay/ethernet-A12.dtbo')
G_CONFIG_INJECT 'fdtoverlays[[:blank:]]' "fdtoverlays ${overlays[*]}" /boot/extlinux/extlinux.conf
fi
Expand All @@ -141,15 +138,12 @@ _EOF_
then
G_DIETPI-NOTIFY 2 '8 GB RAM model detected, applying device tree overlay to make all 8 GB available to the system ...'
read -ra overlays < <(mawk '$1=="fdtoverlays"{$1="";print}' /boot/extlinux/extlinux.conf)
local add=1
for i in "${overlays[@]}"
do
[[ $i == '/usr/lib/linux-image-visionfive2/starfive/vf2-overlay/8GB.dtbo' ]] || continue
G_DIETPI-NOTIFY 2 '8 GB RAM overlay was applied already ...'
add=0
done
if (( $add ))
local i=
for i in "${overlays[@]}"; do [[ $i == *'/8GB.dtbo' ]] && break; done
if [[ $i == *'/8GB.dtbo' ]]
then
G_DIETPI-NOTIFY 2 '8 GB RAM overlay was applied already ...'
else
overlays+=('/usr/lib/linux-image-visionfive2/starfive/vf2-overlay/8GB.dtbo')
G_CONFIG_INJECT 'fdtoverlays[[:blank:]]' "fdtoverlays ${overlays[*]}" /boot/extlinux/extlinux.conf
fi
Expand Down