From 9112eaef56f470b5e01e712ee67607336eec8393 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 19 Oct 2023 21:18:49 +0200 Subject: [PATCH 1/3] v8.23 - DietPi-Software | Sonarr: Fix method to install the APT key, using one which works on Buster and Bullseye as well - DietPi-Software | Home Assistant: Fix install on ARMv6/7/RISC-V as of newly required build dependencies - DietPi-Software | Rclone: Update fallback URL - CHANGELOG | Add v8.23 release PR URL - CHANGELOG | Add VisionFive 2 entry about major kernel upgrade --- .update/pre-patches | 6 +++++- CHANGELOG.txt | 4 +++- dietpi/dietpi-software | 16 +++++++++------- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/.update/pre-patches b/.update/pre-patches index afc0ebcb4d..b5317d83c2 100755 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -316,6 +316,7 @@ then # 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_DIETPI-NOTIFY 2 'Migrating Armbian keyring from /etc/apt/trusted.gpg to /etc/apt/trusted.gpg.d' 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 @@ -324,10 +325,13 @@ then # 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_DIETPI-NOTIFY 2 'Migrating Sonarr keyring from apt-key and /etc/apt/trusted.gpg to /etc/apt/trusted.gpg.d' + G_EXEC eval 'curl -sSf '\''https://keyserver.ubuntu.com/pks/lookup?search=0x2009837CBFFD68F45BC180471F4F90DE2A9B4BF8&op=get'\'' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-sonarr.gpg --yes' 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 + # Workaround for Beta v8.23.1 users as previous gpg method installed a 0600 file + [[ -f '/etc/apt/trusted.gpg.d/dietpi-sonarr.gpg' ]] && G_EXEC chmod 0644 /etc/apt/trusted.gpg.d/dietpi-sonarr.gpg fi exit 0 diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 1491864e66..2edc4ca8eb 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,6 +5,7 @@ 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 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 +- VisionFive 2 | A major kernel upgrade to Linux 6.1 will be applied, including the needed configuration files to read and write the U-Boot environment, and a generic default environment. This allows booting from all filesytems of all partitions of all storage media, including NVMe SSDs, USB, eMMC, SD cards and DHCP/TFTP. This was necessary since the default environment of the latest StarFive U-Boot release does not support booting from any other then FAT filesystems on partition 3 anymore. It is hence necessary to apply our default environment before updating the SPI bootloader. After the DietPi update and a reboot, run "fw_setenv" to do that. Afterwards you can use this command and "fw_printenv" to edit the environment, including the "boot_targets" variable to define boot targets and priorities. Additionally this release will apply device tree overlays to enable 8 GB RAM and A revision Ethernet support. As this is a major change, we recommand a dietpi-backup or even an image backup. We are happy for any feedback: https://github.com/MichaIng/DietPi/issues/6212 - 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. @@ -17,8 +18,9 @@ Bug fixes: - DietPi-Config | Resolved an issue where the WiFi channel selection was not possible with 5 GHz mode enabled. Many thanks to @lukaszsobala for reporting this issue: https://github.com/MichaIng/DietPi/issues/6636#issuecomment-1734427451 - DietPi-Software | Resolved an issue where motionEye failed to build on Bullseye systems since piwheels currently have no wheel for the latest Pillow version. - DietPi-Software | frp: Resolved an issue where the frp client could not connect to the frp server, because of missing spaces around the equal sign for the token setting in /etc/frp/frpc.ini. Many thanks to @josemahj for reporting this issue: https://github.com/MichaIng/DietPi/issues/6647 +- DietPi-Software | Home Assistant: Resolved an issue where the install failed on ARMv6, ARMv7 and RISC-V systems, since new build dependencies are required. -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 +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/6693 ----------------------------------------------------------------------------------------------------------- diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 8d2827ad88..571c1f701f 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -9643,10 +9643,12 @@ _EOF_ if To_Install 144 sonarr # Sonarr then # https://sonarr.tv/#downloads-v3-linux-debian - # APT repo key - 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 key + local url='https://keyserver.ubuntu.com/pks/lookup?search=0x2009837CBFFD68F45BC180471F4F90DE2A9B4BF8&op=get' + G_CHECK_URL "$url" + G_EXEC eval "curl -sSf '$url' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-sonarr.gpg --yes" - # APT repo list: Buster is the latest available suite: https://apt.sonarr.tv/debian/dists/ + # APT 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 @@ -11443,9 +11445,9 @@ _EOF_ G_EXEC chown "$ha_user:$ha_user" "$ha_home" if [[ $G_HW_ARCH =~ ^(1|2|11)$ ]] then - # libjpeg62-turbo-dev for Pillow, libopenblas-dev and pkg-config for numpy, pkg-config for cryptography, g++ for numpy < PyTurboJPEG and greenlet < SQLAlchemy, libavdevice-dev for ha-av - aDEPS+=('libjpeg62-turbo-dev' 'libopenblas-dev' 'pkg-config' 'g++' 'libavdevice-dev') - # Rust for cryptography + # libjpeg62-turbo-dev for Pillow, libopenblas-dev and pkg-config for numpy, pkg-config for cryptography, g++ for PyTurboJPEG, SQLAlchemy and ninja > PyTurboJPEG, libavdevice-dev for ha-av, cmake for ninja > PyTurboJPEG, automake for patchelf > PyTurboJPEG + aDEPS+=('libjpeg62-turbo-dev' 'libopenblas-dev' 'pkg-config' 'g++' 'libavdevice-dev' 'cmake' 'automake') + # Rust for cryptography and bcrypt G_EXEC curl -sSf 'https://sh.rustup.rs/' -o rustup-init.sh G_EXEC chmod +x rustup-init.sh # RPi with 64-bit kernel on 32-bit image: Enforce 32-bit toolchain: https://github.com/MichaIng/DietPi/issues/6306 @@ -11767,7 +11769,7 @@ _EOF_ *) local arch='amd64';; esac - local fallback_url="https://github.com/rclone/rclone/releases/download/v1.64.1/rclone-v1.64.1-linux-$arch.deb" + local fallback_url="https://github.com/rclone/rclone/releases/download/v1.64.2/rclone-v1.64.2-linux-$arch.deb" Download_Install "$(curl -sSfL 'https://api.github.com/repos/rclone/rclone/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/rclone-v[^\"\/]*-linux-$arch.deb\"$/{print \$4}")" fi fi From c0464d9191bfedf8971b3e018a54bf7a0cd155f4 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 19 Oct 2023 22:00:58 +0200 Subject: [PATCH 2/3] v8.23 - DietPi-Config | VisionFive 2: Assure that a U-Boot environment is flashed before allowing to update the bootloader, since the default from StarFive does not support any other then boot files on FAT on partition 3. Also fix the update, as the U-Boot environment is not on /dev/mtd1 and the U-Boot image on /dev/mtd2. --- dietpi/dietpi-config | 11 +++++++++++ dietpi/func/dietpi-set_hardware | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 097efef29c..7f1804f5ca 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -1246,6 +1246,17 @@ Further information: https://www.raspberrypi.org/documentation/hardware/raspberr \nThis will download and flash the latest U-Boot from StarFive to your VisionFive 2 SPI storage. Latest release notes: https://github.com/starfive-tech/VisionFive2/releases \nDo you want to continue?' || return 0 + G_AG_CHECK_INSTALL_PREREQ libubootenv-tool + if fw_printenv 2>&1 | head -1 | grep -q '^Cannot read environment, using default' + then + G_WHIP_YESNO '[ INFO ] No U-Boot environment found +\nThere is currently no dedicated U-Boot environment on your SPI flash. U-Boot hence uses the embedded default and the latest StarFive U-Boot default environment does not support the DietPi OS partitioning anymore. +\nWith our latest kernel upgrade, we shipped the tools and configs to flash a reasonable generic U-Boot environment which supports boot from all filesystems of all partitions of all boot media, including NVMe, USB, eMMC, SD cards and DHCP/TFTP. Flashing assures that our image continues to boot after updating to the latest U-Boot release from StarFive. +\nOur U-Boot environment should support the official StarFive images, including all features. If you are missing anything or face issues with them, please report back: https://github.com/MichaIng/DietPi/issues/6212 +\nYou can use the commands "fw_printenv" and "fw_setenv" to read and write to the U-Boot environment, especially set boot priorities via "boot_targets" variable. +\nDo you want to flash our new U-Boot environment to continue?' || return 0 + G_EXEC fw_setenv + fi /boot/dietpi/func/dietpi-set_hardware vf2-spi-update elif [[ $G_WHIP_RETURNED_VALUE == 'I2C state' ]]; then diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index 2ba23d2b00..be08cab341 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -244,7 +244,7 @@ _EOF_ G_EXEC curl -sSfLO "https://github.com/starfive-tech/VisionFive2/releases/download/$version/u-boot-spl.bin.normal.out" G_EXEC curl -sSfLO "https://github.com/starfive-tech/VisionFive2/releases/download/$version/visionfive2_fw_payload.img" G_EXEC_OUTPUT=1 G_EXEC flashcp -v u-boot-spl.bin.normal.out /dev/mtd0 - G_EXEC_OUTPUT=1 G_EXEC flashcp -v visionfive2_fw_payload.img /dev/mtd1 + G_EXEC_OUTPUT=1 G_EXEC flashcp -v visionfive2_fw_payload.img /dev/mtd2 G_EXEC rm u-boot-spl.bin.normal.out visionfive2_fw_payload.img } From 5d18c519a1d08267e683ea129def0756eb658e75 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 20 Oct 2023 00:03:29 +0200 Subject: [PATCH 3/3] v8.23 - RC up - CHANGELOG | Typos --- .update/version | 2 +- CHANGELOG.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.update/version b/.update/version index 0869f38fdb..ef5317fcc8 100644 --- a/.update/version +++ b/.update/version @@ -3,7 +3,7 @@ # Available DietPi version G_REMOTE_VERSION_CORE=8 G_REMOTE_VERSION_SUB=23 -G_REMOTE_VERSION_RC=1 +G_REMOTE_VERSION_RC=2 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=6 G_MIN_VERSION_SUB=14 diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 2edc4ca8eb..33d3fa6e9a 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,7 +5,7 @@ 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 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 -- VisionFive 2 | A major kernel upgrade to Linux 6.1 will be applied, including the needed configuration files to read and write the U-Boot environment, and a generic default environment. This allows booting from all filesytems of all partitions of all storage media, including NVMe SSDs, USB, eMMC, SD cards and DHCP/TFTP. This was necessary since the default environment of the latest StarFive U-Boot release does not support booting from any other then FAT filesystems on partition 3 anymore. It is hence necessary to apply our default environment before updating the SPI bootloader. After the DietPi update and a reboot, run "fw_setenv" to do that. Afterwards you can use this command and "fw_printenv" to edit the environment, including the "boot_targets" variable to define boot targets and priorities. Additionally this release will apply device tree overlays to enable 8 GB RAM and A revision Ethernet support. As this is a major change, we recommand a dietpi-backup or even an image backup. We are happy for any feedback: https://github.com/MichaIng/DietPi/issues/6212 +- VisionFive 2 | A major kernel upgrade to Linux 6.1 will be applied, including the needed configuration files to read and write the U-Boot environment, and a generic default environment. This allows booting from all filesystems of all partitions of all storage media, including NVMe SSDs, USB, eMMC, SD cards and DHCP/TFTP. This was necessary since the default environment of the latest StarFive U-Boot release does not support booting from any other then FAT filesystems on partition 3 anymore. It is hence necessary to apply our default environment before updating the SPI bootloader. After the DietPi update and a reboot, run "fw_setenv" to do that. Afterwards you can use this command and "fw_printenv" to edit the environment, including the "boot_targets" variable to define boot targets and priorities. Additionally this release will apply device tree overlays to enable 8 GB RAM and A revision Ethernet support. As this is a major change, we recommend a dietpi-backup or even an image backup. We are happy for any feedback: https://github.com/MichaIng/DietPi/issues/6212 - 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.