From facb80e35f8e542ce110704d0f5a16ec2fe3cf48 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 20 Feb 2024 19:53:55 +0100 Subject: [PATCH 001/458] v9.1 - Init v9.2 - CHANGELOG | Fix v9.1 release date - DietPi-Software | PaperMC: Resolved an issue where installing the Geyser and Floodgate plugins failed due to changed download URLs, and a false syntax in the Geyser config file. Many thanks to @boterocamilo for reporting this issue: https://github.com/MichaIng/DietPi/issues/6898 --- .meta/dietpi-survey_report | 4 +++- .update/patches | 21 +++++++++++++++++++++ .update/version | 4 ++-- CHANGELOG.txt | 14 +++++++++++++- dietpi/dietpi-software | 10 +++++----- dietpi/func/dietpi-globals | 4 ++-- 6 files changed, 46 insertions(+), 11 deletions(-) diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index 4467f6be2d..4e5e3b3ccc 100755 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -703,6 +703,7 @@ shopt -s extglob aSOFTWARE_NAME8_25=() aSOFTWARE_NAME9_0=() aSOFTWARE_NAME9_1=() + aSOFTWARE_NAME9_2=() for i in "${!aSOFTWARE_NAME8_22[@]}" do aSOFTWARE_NAME8_23[i]=${aSOFTWARE_NAME8_22[i]} @@ -710,10 +711,11 @@ shopt -s extglob aSOFTWARE_NAME8_25[i]=${aSOFTWARE_NAME8_24[i]} aSOFTWARE_NAME9_0[i]=${aSOFTWARE_NAME8_25[i]} aSOFTWARE_NAME9_1[i]=${aSOFTWARE_NAME9_0[i]} + aSOFTWARE_NAME9_2[i]=${aSOFTWARE_NAME9_1[i]} done # Pre-create software counter array so that we can see also software (available in newest version) with 0 installs - for i in "${aSOFTWARE_NAME9_1[@]}" + for i in "${aSOFTWARE_NAME9_2[@]}" do aSOFTWARE[$i]=0 done diff --git a/.update/patches b/.update/patches index 61c6925a4a..d4716dba6a 100755 --- a/.update/patches +++ b/.update/patches @@ -1606,6 +1606,27 @@ map $arg_v $asset_immutable { fi } +Patch_9_2() +{ + # Software updates and migrations + if [[ -f '/boot/dietpi/.installed' ]] + then + # PaperMC + if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[36\]=2' /boot/dietpi/.installed + then + if [[ -f '/mnt/dietpi_userdata/papermc/plugins/floodgate-bukkit.jar' ]] + then + G_DIETPI-NOTIFY 2 'Renaming Floodgate plugin file to correct Spigot edition name ...' + G_EXEC mv /mnt/dietpi_userdata/papermc/plugins/floodgate-{bukkit,spigot}.jar + fi + if [[ -f '/mnt/dietpi_userdata/papermc/plugins/Geyser-Spigot/config.yml' ]] && grep -q '^auth-type: floodgate' /mnt/dietpi_userdata/papermc/plugins/Geyser-Spigot/config.yml + then + G_DIETPI-NOTIFY 2 'Fixing Geyser plugin config ...' + G_EXEC sed -i 's/^auth-type: floodgate/ auth-type: floodgate/' /mnt/dietpi_userdata/papermc/plugins/Geyser-Spigot/config.yml + fi + fi +} + # v6.35 => v7 migration if (( $G_DIETPI_VERSION_CORE == 6 && $G_DIETPI_VERSION_SUB > 34 )) then diff --git a/.update/version b/.update/version index ee25551504..83d5135338 100644 --- a/.update/version +++ b/.update/version @@ -2,8 +2,8 @@ # shellcheck disable=SC2034 # Available DietPi version G_REMOTE_VERSION_CORE=9 -G_REMOTE_VERSION_SUB=1 -G_REMOTE_VERSION_RC=1 +G_REMOTE_VERSION_SUB=2 +G_REMOTE_VERSION_RC=-1 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=7 G_MIN_VERSION_SUB=0 diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 45d278fb6c..a9985a4c0a 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,17 @@ +v9.2 +(2024-03-16) + +Enhancements: + +Bug fixes: +- DietPi-Software | PaperMC: Resolved an issue where installing the Geyser and Floodgate plugins failed due to changed download URLs, and a false syntax in the Geyser config file. Many thanks to @boterocamilo for reporting this issue: https://github.com/MichaIng/DietPi/issues/6898 + +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 + +----------------------------------------------------------------------------------------------------------- + v9.1 -(2024-02-17) +(2024-02-19) New images: - Raspberry Pi 5 | Images for Raspberry Pi 5 and other Raspberry Pi models, based on the new Bookworm kernel and firmware package set from Raspberry Pi Ltd, are now available for testing. Note that some features, like changing screen resolution and camera module support, are not working yet: https://dietpi.com/downloads/binaries/testing/ diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 29332d9748..40fbe22b97 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -11333,8 +11333,8 @@ _EOF_ G_WHIP_BUTTON_CANCEL_TEXT='Skip' if G_WHIP_YESNO 'Would you like to install the Geyser and Floodgate plugins for compatibility with Bedrock Edition?\n\nNote that this may be buggy.' then - Download_Install 'https://ci.opencollab.dev/job/GeyserMC/job/Geyser/job/master/lastStableBuild/artifact/bootstrap/spigot/build/libs/Geyser-Spigot.jar' /mnt/dietpi_userdata/papermc/plugins/Geyser-Spigot.jar - Download_Install 'https://ci.opencollab.dev/job/GeyserMC/job/Floodgate/job/master/lastStableBuild/artifact/spigot/build/libs/floodgate-spigot.jar' /mnt/dietpi_userdata/papermc/plugins/floodgate-bukkit.jar + Download_Install 'https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/spigot' /mnt/dietpi_userdata/papermc/plugins/Geyser-Spigot.jar + Download_Install 'https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/spigot' /mnt/dietpi_userdata/papermc/plugins/floodgate-spigot.jar fi # Minecraft rcon client for remote administration and server maintenance scripts @@ -11383,10 +11383,10 @@ ExecStart=/usr/bin/java -Xmx${heap_size}m -jar /opt/papermc/paperclip.jar --nogu WantedBy=multi-user.target _EOF_ # Config - if [[ -f '/mnt/dietpi_userdata/papermc/plugins/Geyser-Spigot.jar' && -f '/mnt/dietpi_userdata/papermc/plugins/floodgate-bukkit.jar' ]] + if [[ -f '/mnt/dietpi_userdata/papermc/plugins/Geyser-Spigot.jar' ]] then Create_Config /mnt/dietpi_userdata/papermc/plugins/Geyser-Spigot/config.yml papermc 1800 1 && - G_CONFIG_INJECT 'auth-type:[[:blank:]]' 'auth-type: floodgate' /mnt/dietpi_userdata/papermc/plugins/Geyser-Spigot/config.yml + G_CONFIG_INJECT 'auth-type:[[:blank:]]' ' auth-type: floodgate' /mnt/dietpi_userdata/papermc/plugins/Geyser-Spigot/config.yml else Create_Config /mnt/dietpi_userdata/papermc/permissions.yml papermc 1800 1 fi @@ -11395,7 +11395,7 @@ _EOF_ else aSOFTWARE_INSTALL_STATE[$software_id]=0 - G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} install aborted due to outstanding EULA agreement" + G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} install skipped due to outstanding EULA agreement" fi fi diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 76cce7eaeb..8c510115c9 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -54,8 +54,8 @@ [[ -f '/boot/dietpi/.version' ]] && . /boot/dietpi/.version # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=9 - [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=1 - [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=1 + [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=2 + [[ $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 From 07283f90884452178f4cdb6fc77caf5ba884b8d4 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 20 Feb 2024 19:59:14 +0100 Subject: [PATCH 002/458] v9.2 - DietPi-Patches | Syntax --- .update/patches | 1 + 1 file changed, 1 insertion(+) diff --git a/.update/patches b/.update/patches index d4716dba6a..d64acfca1b 100755 --- a/.update/patches +++ b/.update/patches @@ -1625,6 +1625,7 @@ Patch_9_2() G_EXEC sed -i 's/^auth-type: floodgate/ auth-type: floodgate/' /mnt/dietpi_userdata/papermc/plugins/Geyser-Spigot/config.yml fi fi + fi } # v6.35 => v7 migration From df2e83f035c09441135fc5a925c2eaca80ed8fe1 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 20 Feb 2024 21:24:14 +0100 Subject: [PATCH 003/458] v9.2 - DietPi-Software | In all Java application services, treat exit code 143 as success, which is returned whenever SIGTERM was sent, which is the default stop method of systemd and gracefully handled by all applications --- dietpi/dietpi-software | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 40fbe22b97..37c6d03aad 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6147,6 +6147,7 @@ SyslogIdentifier=Airsonic User=airsonic WorkingDirectory=/mnt/dietpi_userdata/airsonic ExecStart=/usr/bin/java -Xmx${memory_limit}m -Dairsonic.home=/mnt/dietpi_userdata/airsonic -Dserver.servlet.context-path=/airsonic -Dserver.port=8080 -jar /mnt/dietpi_userdata/airsonic/airsonic.war +SuccessExitStatus=143 [Install] WantedBy=multi-user.target @@ -6769,6 +6770,7 @@ User=blynk LogsDirectory=blynk WorkingDirectory=/mnt/dietpi_userdata/blynk ExecStart=/usr/bin/java$log4shell -jar /mnt/dietpi_userdata/blynk/blynkserver.jar +SuccessExitStatus=143 # Hardening PrivateTmp=true @@ -7371,6 +7373,7 @@ User=ubooquity LogsDirectory=ubooquity WorkingDirectory=/mnt/dietpi_userdata/ubooquity ExecStart=/usr/bin/java -Xmx${memory_limit}m -jar /mnt/dietpi_userdata/ubooquity/Ubooquity.jar --headless --remoteadmin --adminport 2038 --libraryport 2039 +SuccessExitStatus=143 [Install] WantedBy=multi-user.target @@ -7432,6 +7435,7 @@ SyslogIdentifier=Komga User=komga WorkingDirectory=/mnt/dietpi_userdata/komga ExecStart=/usr/bin/java -Xmx${memory_limit}m -jar komga.jar +SuccessExitStatus=143 [Install] WantedBy=multi-user.target @@ -10537,6 +10541,7 @@ After=network-online.target SyslogIdentifier=Nukkit WorkingDirectory=/usr/local/bin/nukkit ExecStart=/usr/bin/java -jar /usr/local/bin/nukkit/nukkit.jar +SuccessExitStatus=143 [Install] WantedBy=multi-user.target @@ -11378,6 +11383,7 @@ User=papermc LogsDirectory=papermc WorkingDirectory=/mnt/dietpi_userdata/papermc ExecStart=/usr/bin/java -Xmx${heap_size}m -jar /opt/papermc/paperclip.jar --nogui --noconsole +SuccessExitStatus=143 [Install] WantedBy=multi-user.target From 149a79741135786b129c2292fd89f38504ae06b2 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 20 Feb 2024 21:53:39 +0100 Subject: [PATCH 004/458] v9.2 - NanoPi R4S | Resolved an issue where Ethernet adapter of the "LAN" port could disappear after a soft reboot. Many thanks to @idaanx for reporting this issue: https://github.com/MichaIng/DietPi/issues/6342 --- .build/images/dietpi-installer | 3 ++- .update/patches | 13 +++++++++++++ CHANGELOG.txt | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index f61c460084..8d3750268d 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1151,7 +1151,8 @@ _EOF_ G_AGI initramfs-tools u-boot-tools armbian-firmware "${zstd[@]}" [[ ${zstd[0]} ]] && G_CONFIG_INJECT 'COMPRESS=' 'COMPRESS=zstd' /etc/initramfs-tools/initramfs.conf # Download and pre-install kernel hosted on dietpi.com where the Armbian APT repo provides a too old version - if [[ ( $G_HW_MODEL == 72 && $HW_VARIANT == 2 ) || $G_HW_MODEL =~ ^(76|83)$ ]] + # - NanoPi R4S: Solve Ethernet adapter disappearing on soft reboot: https://github.com/MichaIng/DietPi/issues/6342 + if [[ ( $G_HW_MODEL == 72 && $HW_VARIANT == 2 ) || $G_HW_MODEL =~ ^(47|76|83)$ ]] then G_EXEC_OUTPUT=1 G_EXEC curl -fo package1.deb "https://dietpi.com/downloads/binaries/linux-image-$branch-$kernel.deb" G_EXEC_OUTPUT=1 G_EXEC curl -fo package2.deb "https://dietpi.com/downloads/binaries/linux-dtb-$branch-$kernel.deb" diff --git a/.update/patches b/.update/patches index d64acfca1b..fb7da2df09 100755 --- a/.update/patches +++ b/.update/patches @@ -1608,6 +1608,19 @@ map $arg_v $asset_immutable { Patch_9_2() { + # NanoPi R4S: Solve Ethernet adapter disappearing on soft reboot: https://github.com/MichaIng/DietPi/issues/6342 + if (( $G_HW_MODEL == 47 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-current-rockchip64 2> /dev/null)" lt-nl 24.2.0 + then + G_DIETPI-NOTIFY 2 'Updating NanoPi R4S kernel ...' + G_EXEC_OUTPUT=1 G_EXEC curl -fo package1.deb 'https://dietpi.com/downloads/binaries/linux-current-rockchip64.dtb' + G_EXEC_OUTPUT=1 G_EXEC curl -fo package2.deb 'https://dietpi.com/downloads/binaries/linux-dtb-rockchip64.deb' + G_EXEC_OUTPUT=1 G_EXEC curl -fo package3.deb 'https://dietpi.com/downloads/binaries/armbian-firmware.deb' + local headers=() + dpkg-query -s 'linux-headers-current-rockchip64' &> /dev/null && { G_EXEC_OUTPUT=1 G_EXEC curl -fo package4.deb 'https://dietpi.com/downloads/binaries/linux-headers-rockchip64.deb'; headers=('package4.deb'); } + G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package1.deb package2.deb package3.deb "${headers[@]}" + G_EXEC rm package1.deb package2.deb package3.deb "${headers[@]}" + fi + # Software updates and migrations if [[ -f '/boot/dietpi/.installed' ]] then diff --git a/CHANGELOG.txt b/CHANGELOG.txt index a9985a4c0a..4431052217 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,6 +2,7 @@ v9.2 (2024-03-16) Enhancements: +- NanoPi R4S | Resolved an issue where Ethernet adapter of the "LAN" port could disappear after a soft reboot. Many thanks to @idaanx for reporting this issue: https://github.com/MichaIng/DietPi/issues/6342 Bug fixes: - DietPi-Software | PaperMC: Resolved an issue where installing the Geyser and Floodgate plugins failed due to changed download URLs, and a false syntax in the Geyser config file. Many thanks to @boterocamilo for reporting this issue: https://github.com/MichaIng/DietPi/issues/6898 From 79344e71d013fc8f1b179ffd35475c2cdabd4c43 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 20 Feb 2024 22:03:11 +0100 Subject: [PATCH 005/458] v9.2 - DietPi-Patches | Fix URLs --- .update/patches | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.update/patches b/.update/patches index fb7da2df09..075d6fe48a 100755 --- a/.update/patches +++ b/.update/patches @@ -1612,11 +1612,11 @@ Patch_9_2() if (( $G_HW_MODEL == 47 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-current-rockchip64 2> /dev/null)" lt-nl 24.2.0 then G_DIETPI-NOTIFY 2 'Updating NanoPi R4S kernel ...' - G_EXEC_OUTPUT=1 G_EXEC curl -fo package1.deb 'https://dietpi.com/downloads/binaries/linux-current-rockchip64.dtb' - G_EXEC_OUTPUT=1 G_EXEC curl -fo package2.deb 'https://dietpi.com/downloads/binaries/linux-dtb-rockchip64.deb' + G_EXEC_OUTPUT=1 G_EXEC curl -fo package1.deb 'https://dietpi.com/downloads/binaries/linux-image-current-rockchip64.dtb' + G_EXEC_OUTPUT=1 G_EXEC curl -fo package2.deb 'https://dietpi.com/downloads/binaries/linux-dtb-current-rockchip64.deb' G_EXEC_OUTPUT=1 G_EXEC curl -fo package3.deb 'https://dietpi.com/downloads/binaries/armbian-firmware.deb' local headers=() - dpkg-query -s 'linux-headers-current-rockchip64' &> /dev/null && { G_EXEC_OUTPUT=1 G_EXEC curl -fo package4.deb 'https://dietpi.com/downloads/binaries/linux-headers-rockchip64.deb'; headers=('package4.deb'); } + dpkg-query -s 'linux-headers-current-rockchip64' &> /dev/null && { G_EXEC_OUTPUT=1 G_EXEC curl -fo package4.deb 'https://dietpi.com/downloads/binaries/linux-headers-current-rockchip64.deb'; headers=('package4.deb'); } G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package1.deb package2.deb package3.deb "${headers[@]}" G_EXEC rm package1.deb package2.deb package3.deb "${headers[@]}" fi From 9d7152ab309f1282fc78e00e09f6350ed7f789a2 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 20 Feb 2024 22:04:01 +0100 Subject: [PATCH 006/458] v9.2 - DietPi-Patches | Another URL fix --- .update/patches | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.update/patches b/.update/patches index 075d6fe48a..f3a73ac645 100755 --- a/.update/patches +++ b/.update/patches @@ -1612,7 +1612,7 @@ Patch_9_2() if (( $G_HW_MODEL == 47 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-current-rockchip64 2> /dev/null)" lt-nl 24.2.0 then G_DIETPI-NOTIFY 2 'Updating NanoPi R4S kernel ...' - G_EXEC_OUTPUT=1 G_EXEC curl -fo package1.deb 'https://dietpi.com/downloads/binaries/linux-image-current-rockchip64.dtb' + G_EXEC_OUTPUT=1 G_EXEC curl -fo package1.deb 'https://dietpi.com/downloads/binaries/linux-image-current-rockchip64.deb' G_EXEC_OUTPUT=1 G_EXEC curl -fo package2.deb 'https://dietpi.com/downloads/binaries/linux-dtb-current-rockchip64.deb' G_EXEC_OUTPUT=1 G_EXEC curl -fo package3.deb 'https://dietpi.com/downloads/binaries/armbian-firmware.deb' local headers=() From 4f0b012d445a869e3ca9122f456b899ec76aa528 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 20 Feb 2024 22:14:22 +0100 Subject: [PATCH 007/458] v9.2 - DietPi-Installer | Since Bookworm, Dropbear ships with a systemd service and the NO_START env var is hence obsolete. The stop we do is a noop if the setting is not present, hence we do not need to patch anything, but this conditional serves as well as marker for removal, once we remove Bullseye support from DietPi-Installer. --- .build/images/dietpi-installer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 8d3750268d..8f8e080c82 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -2225,7 +2225,7 @@ _EOF_ then G_CONFIG_INJECT 'CONFIG_NTP_MODE=' 'CONFIG_NTP_MODE=0' /boot/dietpi.txt else - G_EXEC_DESC='Enable Dropbear autostart' G_EXEC sed --follow-symlinks -i '/NO_START=1/c\NO_START=0' /etc/default/dropbear + (( $G_DISTRO < 7 )) && G_EXEC_DESC='Enable Dropbear autostart' G_EXEC sed --follow-symlinks -i '/NO_START=1/c\NO_START=0' /etc/default/dropbear G_EXEC systemctl unmask dropbear G_EXEC systemctl enable dropbear fi From 2a04ad094382487761c571c3a803b842a849b68f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 20 Feb 2024 23:03:41 +0100 Subject: [PATCH 008/458] v9.2 - DietPi-Build | Raise rootfs size of Orange Pi Zero 3, required on Bookworm images, and merge all the Bookworm-only image size increments into base sizes. It doesn't really make a difference whether images for Bullseye are larger at first, as DietPi-Imager minimises their size afterwards anyway. --- .build/images/dietpi-build | 82 +++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 45 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 349502467c..4a23d65df9 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -85,31 +85,31 @@ case $HW_MODEL in 5) iname='RPi5' HW_ARCH=3 boot_size=128 root_size=895;; 10) iname='OdroidC1' HW_ARCH=2 partition_start=4 boot_size=128 root_size=700 boot_fstype='fat16';; 11) iname='OdroidXU4' HW_ARCH=2 partition_start=4 root_size=764;; - 12) iname='OdroidC2' HW_ARCH=3 partition_start=4 root_size=892;; - 15) iname='OdroidN2' HW_ARCH=3 partition_start=4 root_size=892;; - 16) iname='OdroidC4' HW_ARCH=3 partition_start=4 root_size=892;; + 12) iname='OdroidC2' HW_ARCH=3 partition_start=4 root_size=1020;; + 15) iname='OdroidN2' HW_ARCH=3 partition_start=4 root_size=1020;; + 16) iname='OdroidC4' HW_ARCH=3 partition_start=4 root_size=1020;; 20) iname='VM' HW_ARCH=${HW_ARCH:-10} VMTYPE=${VMTYPE:-raw};; - 21) iname='NativePC-BIOS' HW_ARCH=10 root_size=1215;; + 21) iname='NativePC-BIOS' HW_ARCH=10 root_size=1663;; 40) iname='PINEA64' HW_ARCH=3 partition_start=4 root_size=892;; - 42) iname='ROCKPro64' HW_ARCH=3 partition_start=16 root_size=880;; - 43) iname='ROCK64' HW_ARCH=3 partition_start=16 root_size=880;; + 42) iname='ROCKPro64' HW_ARCH=3 partition_start=16 root_size=1008;; + 43) iname='ROCK64' HW_ARCH=3 partition_start=16 root_size=1008;; 44) iname='Pinebook' HW_ARCH=3 partition_start=4 root_size=892;; 45) iname='PINEH64' HW_ARCH=3 partition_start=4 root_size=892;; - 46) iname='PinebookPro' HW_ARCH=3 partition_start=16 root_size=880;; - 47) iname='NanoPiR4S' HW_ARCH=3 partition_start=16 root_size=880;; + 46) iname='PinebookPro' HW_ARCH=3 partition_start=16 root_size=1008;; + 47) iname='NanoPiR4S' HW_ARCH=3 partition_start=16 root_size=1008;; 48) iname='NanoPiR1' HW_ARCH=2 partition_start=4 root_size=764;; '49.1') iname='Quartz64A' HW_ARCH=3 partition_start=16 root_size=752;; '49.2') iname='Quartz64B' HW_ARCH=3 partition_start=16 root_size=752;; '49.3') iname='SOQuartz' HW_ARCH=3 partition_start=16 root_size=752;; 52) iname='ASUSTB' HW_ARCH=2 partition_start=4 root_size=764;; - 54) iname='NanoPiK2' HW_ARCH=3 partition_start=4 root_size=892;; - 55) iname='NanoPiR2S' HW_ARCH=3 partition_start=16 root_size=880;; - 56) iname='NanoPiNEO3' HW_ARCH=3 partition_start=16 root_size=880;; + 54) iname='NanoPiK2' HW_ARCH=3 partition_start=4 root_size=1020;; + 55) iname='NanoPiR2S' HW_ARCH=3 partition_start=16 root_size=1008;; + 56) iname='NanoPiNEO3' HW_ARCH=3 partition_start=16 root_size=1008;; 57) iname='NanoPiNEOPlus2' HW_ARCH=3 partition_start=4 root_size=892;; - 58) iname='NanoPiM4V2' HW_ARCH=3 partition_start=16 root_size=880;; + 58) iname='NanoPiM4V2' HW_ARCH=3 partition_start=16 root_size=1008;; 59) iname='ZeroPi' HW_ARCH=2 partition_start=4 root_size=764;; 60) iname='NanoPiNEO' HW_ARCH=2 partition_start=4 root_size=764;; - 61) iname='NanoPiM2' HW_ARCH=2 partition_start=4 boot_size=64 root_size=572 boot_fstype='ext4';; + 61) iname='NanoPiM2' HW_ARCH=2 partition_start=4 boot_size=64 root_size=700 boot_fstype='ext4';; '62.1') iname='NanoPiM3' HW_ARCH=3 partition_start=4 root_size=700;; '62.2') iname='NanoPiFire3' HW_ARCH=3 partition_start=4 root_size=700;; 63) iname='NanoPiM1' HW_ARCH=2 partition_start=4 root_size=764;; @@ -118,31 +118,31 @@ case $HW_MODEL in '65.2') iname='NanoPiNEO2Black' HW_ARCH=3 partition_start=4 root_size=892;; 66) iname='NanoPiM1Plus' HW_ARCH=2 partition_start=4 root_size=764;; 67) iname='NanoPiK1Plus' HW_ARCH=3 partition_start=4 root_size=892;; - '68.1') iname='NanoPiM4' HW_ARCH=3 partition_start=16 root_size=880;; - '68.2') iname='NanoPCT4' HW_ARCH=3 partition_start=16 root_size=880;; - '68.3') iname='NanoPiNEO4' HW_ARCH=3 partition_start=16 root_size=880;; + '68.1') iname='NanoPiM4' HW_ARCH=3 partition_start=16 root_size=1008;; + '68.2') iname='NanoPCT4' HW_ARCH=3 partition_start=16 root_size=1008;; + '68.3') iname='NanoPiNEO4' HW_ARCH=3 partition_start=16 root_size=1008;; 70) iname='SparkySBC' HW_ARCH=2 partition_start=8 boot_size=48 root_size=712 boot_fstype='fat16';; '72.1') iname='ROCKPi4' HW_ARCH=3 partition_start=16 root_size=1008;; '72.2') iname='ROCK4SE' HW_ARCH=3 partition_start=16 root_size=1008;; - 73) iname='ROCKPiS' HW_ARCH=3 partition_start=16 root_size=880;; - 74) iname='RadxaZero' HW_ARCH=3 partition_start=4 root_size=892;; - 75) iname='Container' HW_ARCH=${HW_ARCH:-10} root_size=447;; - '76.1') iname='NanoPiR5S' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; - '76.2') iname='NanoPiR5C' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; - 77) iname='ROCK3A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=880;; - 78) iname='ROCK5B' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=880;; - '79.1') iname='NanoPiR6S' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=880;; - '79.2') iname='NanoPiR6C' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=880;; - '79.3') iname='NanoPCT6' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=880;; - 80) iname='OrangePi5' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=880;; + 73) iname='ROCKPiS' HW_ARCH=3 partition_start=16 root_size=1008;; + 74) iname='RadxaZero' HW_ARCH=3 partition_start=4 root_size=1020;; + 75) iname='Container' HW_ARCH=${HW_ARCH:-10} root_size=575;; + '76.1') iname='NanoPiR5S' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; + '76.2') iname='NanoPiR5C' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; + 77) iname='ROCK3A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; + 78) iname='ROCK5B' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; + '79.1') iname='NanoPiR6S' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; + '79.2') iname='NanoPiR6C' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; + '79.3') iname='NanoPCT6' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; + 80) iname='OrangePi5' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; 81) iname='VisionFive2' HW_ARCH=11 root_size=639;; - 82) iname='OrangePi5Plus' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=880;; - '83.1') iname='OrangePiZero3' HW_ARCH=3 partition_start=4 root_size=1020;; - '83.2') iname='OrangePiZero3-1.5G' HW_ARCH=3 partition_start=4 root_size=1020;; + 82) iname='OrangePi5Plus' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; + '83.1') iname='OrangePiZero3' HW_ARCH=3 partition_start=4 root_size=1148;; + '83.2') iname='OrangePiZero3-1.5G' HW_ARCH=3 partition_start=4 root_size=1148;; 84) iname='Star64' HW_ARCH=11 root_size=639;; - 85) iname='ROCK5A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=880;; - 86) iname='ASUSTB2' HW_ARCH=3 partition_start=16 root_size=880;; - 87) iname='OrangePi3B' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=880;; + 85) iname='ROCK5A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; + 86) iname='ASUSTB2' HW_ARCH=3 partition_start=16 root_size=1008;; + 87) iname='OrangePi3B' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; *) G_DIETPI-NOTIFY 1 "Invalid hardware model \"$HW_MODEL\" passed, aborting..."; exit 1;; esac @@ -168,20 +168,12 @@ esac exclude= case $DISTRO in - 6) distro='bullseye' exclude=',gcc-8-base,gcc-9-base';; - 7|8) - exclude=',gcc-8-base,gcc-9-base,gcc-10-base,gcc-11-base' - [[ $DISTRO == 7 ]] && distro='bookworm' || distro='trixie' exclude+=',gcc-12-base,gcc-13-base' - [[ $HW_ARCH == 11 ]] && distro='sid' # RISC-V architecture is available on Sid only - # Raise root size where required - case $HW_MODEL in - 1[256]|54|61|7[4569]) ((root_size+=128));; - 21) ((root_size+=448));; - *) [[ $partition_start == 16 ]] && ((root_size+=128));; # 64-bit Rockchip SoCs - esac - ;; + 6) distro='bullseye' exclude=',gcc-9-base';; + 7) distro='bookworm' exclude=',gcc-11-base';; + 8) distro='trixie' exclude+=',gcc-11-base,gcc-12-base,gcc-13-base';; *) G_DIETPI-NOTIFY 1 "Invalid distro \"$DISTRO\" passed, aborting..."; exit 1;; esac +[[ $HW_ARCH == 11 ]] && distro='sid' # RISC-V architecture is available on Sid only case $PTTYPE in 'msdos') :;; From bd9b374406dec9024c76e0b0c680d9d4077732c2 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 21 Feb 2024 20:09:57 +0100 Subject: [PATCH 009/458] v9.2 - DietPi-Software | Nextcloud: Resolved an issue with the updated Nginx config, where assets were served with the wrong MIME type. This fix was backported to v9.1 and a live patch offered. Many thanks to @howardroark for reporting this issue: https://dietpi.com/forum/t/nextcloud-theme-broken-after-upgrade-v9-1-1/19372 --- .conf/dps_114/nginx.nextcloud.conf | 1 + .update/patches | 8 ++++++++ CHANGELOG.txt | 1 + 3 files changed, 10 insertions(+) diff --git a/.conf/dps_114/nginx.nextcloud.conf b/.conf/dps_114/nginx.nextcloud.conf index 8e38802989..2545b3aa24 100644 --- a/.conf/dps_114/nginx.nextcloud.conf +++ b/.conf/dps_114/nginx.nextcloud.conf @@ -77,6 +77,7 @@ location ^~ /nextcloud { fastcgi_max_temp_file_size 0; # Allow downloads > 1 GiB: https://github.com/nextcloud/documentation/pull/7979 } + include mime.types; types { text/javascript js mjs; application/wasm wasm; diff --git a/.update/patches b/.update/patches index f3a73ac645..a407efb1e6 100755 --- a/.update/patches +++ b/.update/patches @@ -1624,6 +1624,14 @@ Patch_9_2() # Software updates and migrations if [[ -f '/boot/dietpi/.installed' ]] then + # Nextcloud + # - Nginx + if [[ -f '/etc/nginx/sites-dietpi/dietpi-nextcloud.conf' ]] && ! grep -q 'include mime.types;' /etc/nginx/sites-dietpi/dietpi-nextcloud.conf + then + G_DIETPI-NOTIFY 2 'Fixing Nextclound Nginx config ...' + G_EXEC sed -i '/types {/i\\tinclude mime.types;' /etc/nginx/sites-dietpi/dietpi-nextcloud.conf + fi + # PaperMC if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[36\]=2' /boot/dietpi/.installed then diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 4431052217..8dddcac563 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -6,6 +6,7 @@ Enhancements: Bug fixes: - DietPi-Software | PaperMC: Resolved an issue where installing the Geyser and Floodgate plugins failed due to changed download URLs, and a false syntax in the Geyser config file. Many thanks to @boterocamilo for reporting this issue: https://github.com/MichaIng/DietPi/issues/6898 +- DietPi-Software | Nextcloud: Resolved an issue with the updated Nginx config, where assets were served with the wrong MIME type. This fix was backported to v9.1 and a live patch offered. Many thanks to @howardroark for reporting this issue: https://dietpi.com/forum/t/nextcloud-theme-broken-after-upgrade-v9-1-1/19372 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 From dbe95321b1f45aec020146a2c77b2362abab4697 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 21 Feb 2024 21:13:24 +0100 Subject: [PATCH 010/458] v9.2 - DietPi-Software | Nginx: Resolve visual-only warning about doubled js extension MIME type --- .conf/dps_114/nginx.nextcloud.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.conf/dps_114/nginx.nextcloud.conf b/.conf/dps_114/nginx.nextcloud.conf index 2545b3aa24..1f0f734733 100644 --- a/.conf/dps_114/nginx.nextcloud.conf +++ b/.conf/dps_114/nginx.nextcloud.conf @@ -79,7 +79,7 @@ location ^~ /nextcloud { include mime.types; types { - text/javascript js mjs; + text/javascript mjs; application/wasm wasm; } From 24e6315b7affd0380fa4cc9df07f8f35daa2c9e3 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 21 Feb 2024 22:59:34 +0100 Subject: [PATCH 011/458] v9.2 - NanoPi R5C | Add wlan0 interface trigger for WLAN ("WL" labelled) LED. It has no onbaord WiFi, but an M.2 E key slot which supports WiFi modules. And the LED is obviously intended for this. - NanoPi R6C | Fix LED udev rules to prevent Ethernet LEDs from staying lit from boot on, if the interfaces are not configured afterwards. Also add a WiFi trigger for the "LED1" labelled LED. The R6C has an M.2 M key slot, intended for NVMe SSDs, but there are also adapters to attack M.2 WiFi modules, or a USB module can be used. Making use of this LED for WiFi, if any WiFi adapter is attached, seems a good default. With own udev rules or via dietpi-led_control, the trigger can be easily changed. --- .build/images/dietpi-installer | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 8f8e080c82..8ea242dacd 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -2175,6 +2175,7 @@ _EOF_ cat << '_EOF_' > /etc/udev/rules.d/dietpi-eth-leds.rules SUBSYSTEM=="leds", KERNEL=="green:lan", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth0", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev eth0", RUN+="/bin/ip l s down dev eth0" SUBSYSTEM=="leds", KERNEL=="green:wan", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth1", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev eth1", RUN+="/bin/ip l s down dev eth1" +SUBSYSTEM=="leds", KERNEL=="green:wlan", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="wlan0", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev wlan0", RUN+="/bin/ip l s down dev wlan0" _EOF_ # NanoPi R6S elif [[ $G_HW_MODEL == 79 && $HW_VARIANT == 1 ]] @@ -2192,8 +2193,9 @@ _EOF_ G_DIETPI-NOTIFY 2 'Enabling NanoPi R6C Ethernet LEDs' G_EXEC eval 'echo '\''ledtrig-netdev'\'' > /etc/modules-load.d/dietpi-eth-leds.conf' cat << '_EOF_' > /etc/udev/rules.d/dietpi-eth-leds.rules -SUBSYSTEM=="leds", KERNEL=="wan_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth0", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev eth0; /bin/ip l s down dev eth0" -SUBSYSTEM=="leds", KERNEL=="lan1_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth1", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev eth1; /bin/ip l s down dev eth1" +SUBSYSTEM=="leds", KERNEL=="wan_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth0", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev eth0", RUN+="/bin/ip l s down dev eth0" +SUBSYSTEM=="leds", KERNEL=="lan1_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth1", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev eth1", RUN+="/bin/ip l s down dev eth1" +SUBSYSTEM=="leds", KERNEL=="user_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="wlan0", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev wlan0", RUN+="/bin/ip l s down dev wlan0" _EOF_ # Orange Pi 3B/Zero 3: Module does not load automatically, but we want it loaded on first boot in case firstrun setup is done via WiFi elif [[ $G_HW_MODEL =~ ^(83|87)$ ]] From 9d1398e0ea2b966d8b4532d915eb366e931588af Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 23 Feb 2024 21:13:20 +0100 Subject: [PATCH 012/458] v9.2 - CHANGELOG | Fix link to testing images --- CHANGELOG.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 8dddcac563..835727ce83 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -16,7 +16,7 @@ v9.1 (2024-02-19) New images: -- Raspberry Pi 5 | Images for Raspberry Pi 5 and other Raspberry Pi models, based on the new Bookworm kernel and firmware package set from Raspberry Pi Ltd, are now available for testing. Note that some features, like changing screen resolution and camera module support, are not working yet: https://dietpi.com/downloads/binaries/testing/ +- Raspberry Pi 5 | Images for Raspberry Pi 5 and other Raspberry Pi models, based on the new Bookworm kernel and firmware package set from Raspberry Pi Ltd, are now available for testing. Note that some features, like changing screen resolution and camera module support, are not working yet: https://dietpi.com/downloads/images/testing/ - ROCK 4 SE | Since our Radxa ROCK 4 image has become incompatible with the ROCK 4 SE variant, we provide a new image for this particular variant. Many thanks to @janno for reporting failing boot on this SBC: https://dietpi.com/forum/t/radxa-rock-4-se-supported-not-booting/19263 - NanoPi R5S/R5C/R6S/R6C/T6 | Our new images for these SBCs use kernel and bootloader builds generated with the Armbian build system. This means that they have a single ext4 partition with kernel image, overlays and boot configuration located below /boot as usual. The kernel command-line arguments can hence be adjusted, kernel headers installed for compiling modules, and the kernel features are more streamlined with other SBCs. The R5S/R5C images ship with a much newer mainline Linux build, which means more modern kernel features and better code quality. But some edge case hardware features which have not been upstreamed may not work, like support for Rockchip's Media Process Platform (MPP) module, used for hardware-accelerated video encoding/decoding by some media servers/players. We are also testing the migration from our old images to the new kernel and bootloader packages, and will likely offer this with next DietPi update. From 898fcaa89850cfda6bb5ce281fed56f920035d6f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 23 Feb 2024 22:30:36 +0100 Subject: [PATCH 013/458] v9.2 - DietPi-Patches | Remove obsolete NanoPi R5/R6 patch --- .update/patches | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/.update/patches b/.update/patches index a407efb1e6..889d67ed2c 100755 --- a/.update/patches +++ b/.update/patches @@ -1238,44 +1238,6 @@ Release notes: https://github.com/hzeller/gmrender-resurrect/releases Patch_8_20() { - # NanoPi R5S/6 kernel upgrade - case $G_HW_MODEL in - 76) local series=5 version='5.10.160-dietpi1';; - 79) local series=6 version='5.10.160-dietpi1';; - *) local series='';; - esac - - if [[ $series ]] && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' "firmware-nanopi$series" 2> /dev/null)" lt-nl "$version" - then - G_DIETPI-NOTIFY 2 "Updating NanoPi $series series kernel ..." - G_EXEC curl -sSfO "https://dietpi.com/downloads/nanopi$series.7z" - G_EXEC 7zr x "nanopi$series.7z" - G_EXEC rm "nanopi$series.7z" - local loopdev=$(losetup -f) rootdev=$(lsblk -npo PKNAME "$G_ROOTFS_DEV") - G_EXEC losetup "$loopdev" "nanopi$series.img" - G_EXEC partprobe "$loopdev" - G_EXEC partx -u "$loopdev" - if [[ ! -b ${loopdev}p8 ]] - then - G_DIETPI-NOTIFY 1 "Image invalid: ${loopdev}p8 does not exist, aborting kernel upgrade ..." - - elif [[ ${rootdev}p8 != "$G_ROOTFS_DEV" ]] - then - G_DIETPI-NOTIFY 1 "Unsupported system: ${rootdev}p8 != $G_ROOTFS_DEV, aborting kernel upgrade ..." - else - G_EXEC curl -sSfO "https://dietpi.com/downloads/binaries/firmware-nanopi$series.deb" - G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold "firmware-nanopi$series.deb" - for i in {1..7} - do - G_EXEC dd if="${loopdev}p$i" of="${rootdev}p$i" bs=1M - done - G_EXEC sync - G_EXEC rm "firmware-nanopi$series.deb" - fi - G_EXEC losetup -d "$loopdev" - G_EXEC rm "nanopi$series.img" - fi - # Software updates and migrations if [[ -f '/boot/dietpi/.installed' ]] then From b83ca6986c4774e315819fc6123c7f5415895fe2 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 23 Feb 2024 23:06:57 +0100 Subject: [PATCH 014/458] v9.2 - DietPi-Software | Gitea: Update fallback URL --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 37c6d03aad..f4565033af 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -10557,7 +10557,7 @@ _EOF_ *) local arch='arm-6';; esac - local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.21.5/gitea-1.21.5-linux-$arch.xz" + local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.21.6/gitea-1.21.6-linux-$arch.xz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/go-gitea/gitea/releases/latest' | mawk -F\" "/\"browser_download_url\": \".*\/gitea-[^\"\/]*-linux-$arch\.xz\"/{print \$4}")" /mnt/dietpi_userdata/gitea/gitea # User From e6438733847218763a36776b753716702edb7fc2 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 24 Feb 2024 23:09:43 +0100 Subject: [PATCH 015/458] v9.2 - DietPi-Software | LXQt: Add config archive for Trixie and remove the one for Buster. Remove all packages from being explicitly installed, which are dependencies of the "lxqt" package anyway. Keep only xarchiver, as we set it explicitly in our PCManFM config, and the default dependency on Trixie has changed to lxqt-archiver. Do not add SpeedCrunch on Trixie, as it does not exist there at time of writing. Remove nuoveXT2 icon theme, as we do not use it. --- .conf/desktop/lxqt/lxqt-buster.7z | Bin 2717 -> 0 bytes .conf/desktop/lxqt/lxqt-trixie.7z | Bin 0 -> 938 bytes dietpi/dietpi-software | 6 +++++- 3 files changed, 5 insertions(+), 1 deletion(-) delete mode 100644 .conf/desktop/lxqt/lxqt-buster.7z create mode 100644 .conf/desktop/lxqt/lxqt-trixie.7z diff --git a/.conf/desktop/lxqt/lxqt-buster.7z b/.conf/desktop/lxqt/lxqt-buster.7z deleted file mode 100644 index 185acb2b9ead42d6768235a2c49035fcacd5dd8c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2717 zcmV;O3S#v)dc3bE8~_9joBLB*3IG5A0000Z00000000092^E>(9AybVT>veS$qe+c zc_^8Ia+uuNk&cR(4c8CZQ~Lw(KP`_D0Cals{D+%2s`td&XN%Jq^J= zc=!AF|G!Nj#(L+dRmAp_&YKu{! zswUSr?%{*xr}DIX1Pt3k9v|g^+hp~Ud>w*ZH)j*9YazAyQn(sz6M*kkVc-d&?O5=# zAH}&5$-$`b{Gxzo>^#gtROfwRQbD2@?i1JpcN1hnm}7 z9zP&6ozRGWNGc#Nt_hu%Mj5I+yj-Si)DWlN`ZDDI)h;CwlEcx{1HPr_uFr=eU~3e8 zQrTAu)tzx+W=9q08_{=BC!o(x*q~l`0am;S6KuO)zs+hg7PACF2us9I6_@H|ci){{ zs)$R=xeRlPm!o+g*H~y~KhQfB^JVNua z0tkcb{X(*^@@x^8K|Uim>o zeAR@vs>z#iwmC0=sf`tv_x8X1?j{dvMl_D6qf^=V3BFoFf05d3E|FYz1!_DuAb4jr&J zeN9^V*XH$F2NPMOi@56ly|K@bx_V^qb;$3&+Row))9udrDVgN1Lqz#B9!qg_`5z2? zBw;#Kw|!O3fv~7!NElM6te96H@TnV;*TTE^M)o7a!h-TnD9K8TOH3|0d71uQ{9{{B zViXu+KocAJ0Mq;3-(|K6_Z90Hzh+TIen!RZFodLE}`g5*kN@#U{+ z^|n{fl5jZ1boI}xM=a~fN0d6*P!1YxscoRB3z;sFUI(ou+~G1jdiinD9mhY{wfX&B zbbNc+qOt-|U+M?*+C0b26-hHg{zrdWIG5VIb59UgQBGCp5AkkS{B(};m&XJgc+yiV z(=&--8=?TWyO8ZEBb>d{DnDHK*MjGR(Ek(S21rd`Z~TAz#DE!)5y`apUU)i9>UYpG z4NgWy&X)B1+`Bl4PJ?#YV}lV-GiHm3e{g$@0TBL7TRyHe@?Y_1J5UcBbTS1|nPDZ} zypTiB^s9rj)M9UR3`;$fKHZj17n&7Sg{iddb3ZMU92n?pqE%E$k*C^m9#t~#2_euR zq$C$VUv<{gGW}>A<#u42reE6K3xN2<-A`b_Wq1Zi7vLpkA}NAl3^*v=d9^y?oXqG| zh_EGz3v1d5y;o;s1ielX$Q{_m($5Rmx8v()-Ig!I6a8;VFE$D3KGsQq9*5fjykSiF zLZBu$=Zo3fh&JWHDQMtlRHX1X(k)wcuxlBWKTDzqw~r5JL0HiE-ka3Dhgvw~hxQ$* zCM<)FUpY%pGX-U4=sw>?7rQE^_=+KJ?&AVE$*tkr`QD)0>bjqpSnfU>#yBm zPx%$uO1O4m#Nlw127GOoD{z<#R$Gy)MmPw7ga%ZB1RKkyP;k)oAkZ(lj7*dBw@4lM zx7r~6&jHKElfYT}bN6I*QRbX?6gl`j13u|epiL(%j(N2Ygoq0YE{^U{CM9GYe zCitd=qOsT}waqoYP@IUNT>f|52GQ@H!*k8*J|IVL5U6PMRpTh-zQ`6&_(;Y-s{>ck z(==OOiLfBG2dWamgwcxv{;`Qqql@s<896X!5mCsM zFvm!F4z^(>6_Zp4r^VT}! z5c!mTKO359E0lj?MB0cRB9j6BJSkZmBAx{=l<`@-UVZ;>_V+=@V_`=eH# z-1u4*8YpMIjV&$+qE~=nI!gDB!zRo62Xu__k}SH*h$HnFB2@wLMG0p0FTMpjl{yYa zElnn#oO!$1dDV|Eb&2s1q#>#$&TsB(k{ejYEZ(jM`Eh&yAU_`n&{d)+WnfrtdOZ^& zDE%Q=@+&_$Kx(-sU!Z(|?Ect*VSXu5x~tCeLN4@{vGuItAJq+DA`zDOBDSDhf?JoV zq6hVZ7GTTv=<4$qZZ+BF+A>dI=w@LShR~s>1rx8 zqKDoK?)JsNO%HFuPnU$YbI&cw$jf}yxO*~4aUA@(Vc=?WUap3|a-Vnst}Wf`?aWC( z5kOPs`j2P|e*nqM)~+s6M+oYll4+m;**gUvno_AWln8oe1|+@M+8P>=uwZV$ns2DV z-}$O*$rCCcwvp6mK=_c8xPN1;A;RFa_5V zCkH|4OqVm+b;M}bO``9w`age%P=;8RK2_2(W^Ns-oYnMHPqlIppmta9*2D>JZdt34 zYL{e-VO*~OUftv=JxeyxQ;tpBzQPt#(nAf)px~>d@~1@wBjYj?{?&K&|NKg3 z)e#*OB;zOCaeV)_k{GCc!yq#l(sJMQdka<@f%An+UG0YgQ4|3h`s`w68#f|CYDB+i2h+>5656zf@% zjOWR@dFCt}SWdh0;&s=aaT30QK45_;h?5&9a|r$;8oK}h02c;{M*#_e695Mb0RRCb X0|5aAT>uaO01Sd63IW}M#e4t&`fD{? diff --git a/.conf/desktop/lxqt/lxqt-trixie.7z b/.conf/desktop/lxqt/lxqt-trixie.7z new file mode 100644 index 0000000000000000000000000000000000000000..261a47b3b12d2b24371a62f547c155eda2952162 GIT binary patch literal 938 zcmV;b16BMtdc3bE8~_A!7^9nK0{{R30000Z0000000029uC9yV1Xu!qT>veS$qe+c zc_^(c+amxA0lrBqSoF`EZNhg4Gn37M<;KgNMH{wd+ad@-xi2$ z2GH6p=@jcC6c+aCq0o^ptv_JbSV1#oz$e%wLy5B2d@M|cBNXh#-iq-RR5v%Y-p06h z^{EhZz(kd+9=qXTB>&Qw*qcC1SPm$VT^rA$MTQW@dCT*m&`ZH^k(!WVZ_KnHFA^JW zAtutnbU9;yeP4Y5Vx)SVxO-say`f6NersTuuzNM2@lhDCWP+nE>8WfRXH~|X=TboR z+n8dFZbgbnNmIdqrp%a@@E}^fNU`sV5L%a#oJix9Js>m}ljt(7kP*^gI1@@CF2WI& z9vmb(hlL;Q^7mb=Fy9qIWFh~9I;kMl!3Tu%IIbF33l3kFc0~i%YPneM|41Dh#5)Ov zTDa*2WNO_%=6#N}^{_=LD^Orn2$6reIfwJYH~91pIdefXGOT6<;V>VW?(4Iq{*q^8 zo$&rM{X04-z}Hf*z=N#^JmO9b<;fYbieHv)%H$31vJZ_ZPQj(AwC63 z9)Zd!2~VO}>iE)DLvpEhhR8e~u&C8!hAU}-gQSB~G2NVb{S0D&_Ht`F5k)zcPiDIZ83nzgrL!h_82U<%M>!G>`}U~lzBuxk}q zoafQyJ|>=L8b!$+&*(yNlQ=TOm*ePU{JfVW<^^clAPB3eTb?eDb$!V{Y|xfatNQSSebwl8ybS5&zX$zI=T*NmTbH zApyNMl_mH6j&qp}!JcDQ)Z#Rvd|5VOE*P7XG^Gq`OaZDmjhVrc@|9>eSw5Cv9Hp)n zLqs<+6rEq>Q2Ic6sRq%PXhix%Nk=K4>Hrr8f`|bLfZqTI3jqKDBLe{e1zi9T000bu M#tH#dYIPO>04$KGsQ>@~ literal 0 HcmV?d00001 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index f4565033af..eee7f5215b 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3146,7 +3146,11 @@ _EOF_ if To_Install 173 # LXQt then - G_AGI lxqt qterminal xarchiver lxde-icon-theme upower xscreensaver featherpad speedcrunch + # SpeedCrunch is currently not present on Trixie: https://tracker.debian.org/pkg/speedcrunch + local speedcrunch=('speedcrunch') + (( $G_DISTRO == 8 )) && speedcrunch=() + # lxqt-archiver is the default dependency from Trixie on, but our config uses Archiver=xarchiver. + G_AGI lxqt xarchiver xscreensaver "${speedcrunch[@]}" # Configs Download_Install "https://github.com/$G_GITOWNER/DietPi/raw/$G_GITBRANCH/.conf/desktop/lxqt/lxqt-$G_DISTRO_NAME.7z" /etc/xdg/ From 8449d6d4bdaaf37c29f4bf6c28748cba09c61eb0 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 24 Feb 2024 23:47:38 +0100 Subject: [PATCH 016/458] v9.2 - DietPi-Software | LXQt: Update Trixie configuration --- .conf/desktop/lxqt/lxqt-trixie.7z | Bin 938 -> 973 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/.conf/desktop/lxqt/lxqt-trixie.7z b/.conf/desktop/lxqt/lxqt-trixie.7z index 261a47b3b12d2b24371a62f547c155eda2952162..3d61376afa6f4f24cb44feeeddeddd6ede4a75d2 100644 GIT binary patch delta 845 zcmV-T1G4<82h9g1H+sCUCma9-D3f#DiUR-u00000BLDyZ00000vltqnw-mQEx-3OA(eKP zU!hrm-&=lZ|F%CGo20*OH%QMviP5QI``M}ZPtw1f7>r_v&=Jkf7r&}lb@i-Ge>bU{ z8^qTl=D+T*?{`J-cOcJ#-sjSptgDY>#;wzCCz#q}8VE*~jR+V65I&~04tX4<%!$!fg5n{<{xe=vr z>@|`Ee#on#@6Pm90IZC>s!SNzfA4ksGk#QxdKG_-ItmMTtB-^v@{f$*x{S3JChXuz zRRoB6B3y zze$!T9^?ZV30CrfvX5&4^||XWy|pS@fCVri1^@s6finlL57kC`R#zm`{ravPW!ffSN1S*dJpTeUhJfsC_-#|0PYas2qQbFv! zdD2W_Hyz^8L6(2&M{SjTSPs81QoyEm zlt#turnyt?3Df(j`ZnNmQu7mj>zFE!_!0ya{4~1+0<lq(xd&6glY`Yd8L4z`uZq X02c;=r2z?m<&%#C6$b1(^5*~m!_k!` delta 826 zcmV-A1I7H!2dW1pH+sCUCma9-a~PwWX9EBL00000BLDyZ00000v#zd--~?C#fRQDC zf0)>tKulN;D3Dzn&!R-1M8*U*c(!q2&V}N~MeE?#l zdY!m?VC21_O2U3?V3@FbHK6fP7_el5qb}*GY#V1)#+~O$9c)l4oR{@cw2caF<{9e`UB` zz5H;Nx& zM{X04-z}Hf*z=N#^JmO9b<;fYbieHv)%H$31vJZ_ZPQj(AwC639)Zd!2~VO}>iE)D zLvpEhhR8e~u&C8!hAU}-gQSB~e=*&hdF2A7mUM+zF?!vd0hH0V2y&AgEaL-No*1)7 z8Swuzu2Zwp%b_~=`EqzN3bx>_@M^LS4@}Pdbx&Ls%>E=&hrA$%r9vVFSUW>(y=@uxP%c3uCR8^O5z?hL;+a2Ne+SF_-$8Iz z0001iGY75@)kW3Q7HlaWNFAEBw_?JB%-0RRCb0|5aAT>uaO3;+y)#tH#dYIPO> E07KAo1ONa4 From c820525bf343f5064c94a21679f158ddf6b74340 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 25 Feb 2024 21:39:42 +0100 Subject: [PATCH 017/458] v9.2 - DietPi-Installer | From Bookworm on, gcc-*-base packages are not "Priority: required" anymore, but "optional" instead, hence are autoremoved. So we we need to purge the obsolete ones on Bullseye only. - DietPi-Build | Leave obsolete gcc-*-base package removals to DietPi-Installer, which are only installed on Bullseye. - DietPi-Build | Remove --rpi-new flag. Instead use hardware models 1/2/4/5 as indicator that the new firmware is needed. Remove an obsolete Raspbian Trixie workaround and add new RPi firmware models to "all" workflow. --- .build/images/dietpi-build | 33 ++++++++---------------------- .build/images/dietpi-installer | 11 +++------- .github/workflows/dietpi-build.yml | 4 ++++ 3 files changed, 16 insertions(+), 32 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 4a23d65df9..5ec82d1f09 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -47,7 +47,6 @@ EDITION= SUFFIX= ADD_DOS_PART=1 SIGN_PASS= -RPI_NEW=0 while (( $# )) do case $1 in @@ -64,7 +63,6 @@ do '-s') shift; SUFFIX=$1;; '--no-dos-part') ADD_DOS_PART=0;; '--sign') shift; SIGN_PASS=$1;; - '--rpi-new') RPI_NEW=1;; *) G_DIETPI-NOTIFY 1 "Invalid input \"$1\", aborting..."; exit 1;; esac shift @@ -166,11 +164,10 @@ case $HW_ARCH in *) G_DIETPI-NOTIFY 1 "Invalid architecture \"$HW_ARCH\" passed, aborting..."; exit 1;; esac -exclude= case $DISTRO in - 6) distro='bullseye' exclude=',gcc-9-base';; - 7) distro='bookworm' exclude=',gcc-11-base';; - 8) distro='trixie' exclude+=',gcc-11-base,gcc-12-base,gcc-13-base';; + 6) distro='bullseye';; + 7) distro='bookworm';; + 8) distro='trixie';; *) G_DIETPI-NOTIFY 1 "Invalid distro \"$DISTRO\" passed, aborting..."; exit 1;; esac [[ $HW_ARCH == 11 ]] && distro='sid' # RISC-V architecture is available on Sid only @@ -181,16 +178,6 @@ case $PTTYPE in *) G_DIETPI-NOTIFY 1 "Invalid partition table type \"$PTTYPE\" passed, aborting..."; exit 1;; esac -if (( $RPI_NEW )) -then - (( $HW_MODEL < 10 && $DISTRO > 6 )) || { G_DIETPI-NOTIFY 1 "Invalid flag \"--rpi-new\" passed for hardware model \"$HW_MODEL\" or distro \"$DISTRO\" (${distro^}), aborting..."; exit 1; } - -elif (( $HW_MODEL && $HW_MODEL < 10 )) -then - G_DIETPI-NOTIFY 1 "Invalid hardware model \"$HW_MODEL\" passed without flag \"--rpi-new\", aborting..." - exit 1 -fi - # Do not add trailing FAT partitions for VM, container and (Clonezilla) installer images, and if there is a boot FAT partition already [[ $HW_MODEL == 20 || $HW_MODEL == 75 || $ITYPE == 'Installer' ]] && ADD_DOS_PART=0 [[ $boot_size -gt 0 && $boot_fstype == 'fat'* ]] && ADD_DOS_PART=0 @@ -353,7 +340,7 @@ then G_EXEC "mkfs.$FSTYPE" "${afs_opts[@]}" "${FP_LOOP}p2" G_EXEC mount "${FP_LOOP}p2" rootfs fp_boot='boot' - (( $RPI_NEW )) && fp_boot+='/firmware' + [[ $HW_MODEL == [1245] ]] && fp_boot+='/firmware' G_EXEC mkdir -p "rootfs/$fp_boot" G_EXEC mount "${FP_LOOP}p1" "rootfs/$fp_boot" G_EXEC mkdir rootfs/etc @@ -392,7 +379,7 @@ G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/log packages='apt,bash-completion,bzip2,ca-certificates,cron,curl,fdisk,gnupg,htop,iputils-ping,locales,nano,p7zip,parted,procps,psmisc,sudo,systemd-sysv,tzdata,udev,unzip,wget,whiptail,' [[ $HW_MODEL == 75 ]] && packages+='iproute2' || packages+='console-setup,dropbear,ethtool,fake-hwclock,ifupdown,isc-dhcp-client,kmod,rfkill,systemd-timesyncd,usbutils' G_EXEC_POST_FUNC(){ [[ $exit_code == 0 ]] || cat /dev/shm/rootfs/debootstrap/debootstrap.log; } -G_EXEC_OUTPUT=1 G_EXEC debootstrap --variant=minbase --exclude="gcc-7-base$exclude" --include="$packages" --arch="$parch" --keyring="$keyring" "$distro" ./rootfs "$repo" +G_EXEC_OUTPUT=1 G_EXEC debootstrap --variant=minbase --include="$packages" --arch="$parch" --keyring="$keyring" "$distro" ./rootfs "$repo" G_EXEC umount rootfs/dev rootfs/run rootfs/var/cache/apt rootfs/var/lib/apt/lists rootfs/var/log ########################################## @@ -457,7 +444,7 @@ G_EXEC losetup -d "$FP_LOOP" export FP_ROOT_DEV CLONING_TOOL OUTPUT_IMG_NAME MOUNT_IT='Off' SKIP_ARCHIVE SKIP_FIRSTBOOT_RESIZE=1 IMAGER_ARGS=("$OUTPUT_IMG_NAME.img") (( $ADD_DOS_PART )) && IMAGER_ARGS+=('--add-dos-part') -(( $RPI_NEW )) && IMAGER_ARGS+=('--configs-to-boot') +[[ $HW_MODEL == [1245] ]] && IMAGER_ARGS+=('--configs-to-boot') [[ $SIGN_PASS ]] && IMAGER_ARGS+=('--sign' "$SIGN_PASS") if [[ ! $EDITION || $EDITION == 'all' ]] then @@ -489,7 +476,7 @@ then # Mount filesystems G_EXEC mkdir rootfs - if (( $RPI_NEW )) + if [[ $HW_MODEL == [1245] ]] then G_EXEC mount "${FP_LOOP}p2" rootfs @@ -551,9 +538,10 @@ then # Mount filesystems G_EXEC mkdir rootfs - if (( $RPI_NEW )) + if [[ $HW_MODEL == [1245] ]] then G_EXEC mount "${FP_LOOP}p2" rootfs + G_EXEC mount "${FP_LOOP}p1" rootfs/boot/firmware elif (( $boot_size )) then @@ -591,9 +579,6 @@ _EOF_ # Force ARMv6 arch on Raspbian (( $HW_ARCH == 1 )) && echo 'sed --follow-symlinks -i -e '\''/^G_HW_ARCH=/c\G_HW_ARCH=1'\'' -e '\''/^G_HW_ARCH_NAME=/c\G_HW_ARCH_NAME=armv6l'\'' /boot/dietpi/.hw_model' > rootfs/boot/Automation_Custom_PreScript.sh - # Temporary fix for failing NAA Daemon install on Trixie - (( $DISTRO == 8 )) && G_EXEC sed --follow-symlinks -i '\|www.signalyst.eu|s|bookworm/bullseye|trixie/bullseye|' rootfs/boot/dietpi/dietpi-software - # Skip filesystem expansion G_EXEC rm rootfs/etc/systemd/system/local-fs.target.wants/dietpi-fs_partition_resize.service diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 8ea242dacd..123a5320c1 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1538,16 +1538,11 @@ _EOF_ # Replace usrmerge with usr-is-merged again, in case of dist-upgraded systems dpkg-query -s usrmerge &> /dev/null && G_AGP usrmerge - # Remove old gcc-*-base packages, e.g. accumulated on Raspberry Pi OS images + # Bullseye: Remove old gcc-*-base packages, e.g. accumulated on Raspberry Pi OS images and installed by debootstrap, which are not autoremoved due to "Priority: required" # shellcheck disable=SC2015 - case $G_DISTRO in - 5) mapfile -t apackages < <(dpkg --get-selections 'gcc-*-base' | mawk '$1!~/^gcc-8-/{print $1}');; - 6) mapfile -t apackages < <(dpkg --get-selections 'gcc-*-base' | mawk '$1!~/^gcc-10-/{print $1}');; - 7) mapfile -t apackages < <(dpkg --get-selections 'gcc-*-base' | mawk '$1!~/^gcc-12-/{print $1}');; - 8) dpkg-query -s 'gcc-14-base' &> /dev/null && mapfile -t apackages < <(dpkg --get-selections 'gcc-*-base' | mawk '$1!~/^gcc-14-/{print $1}') || mapfile -t apackages < <(dpkg --get-selections 'gcc-*-base' | mawk '$1!~/^gcc-13-/{print $1}');; # Temporary workaround for Raspbian Trixie not shipping gcc-14-base yet - *) :;; - esac + (( $G_DISTRO == 6 )) && mapfile -t apackages < <(dpkg --get-selections 'gcc-*-base' | mawk '$1!~/^gcc-10-/{print $1}');; [[ ${apackages[0]} ]] && G_AGP "${apackages[@]}" + unset -v apackages G_DIETPI-NOTIFY 2 'Restoring default base files:' # shellcheck disable=SC2114 diff --git a/.github/workflows/dietpi-build.yml b/.github/workflows/dietpi-build.yml index 0e22d4fc7b..cb92edee03 100644 --- a/.github/workflows/dietpi-build.yml +++ b/.github/workflows/dietpi-build.yml @@ -24,6 +24,10 @@ jobs: '"-m 0 -a 1 -d 6 -e all", "-m 0 -a 2 -d 6 -e all", "-m 0 -a 3 -d 6 -e all", '\ '"-m 0 -a 1 -d 7 -e all", "-m 0 -a 2 -d 7 -e all", "-m 0 -a 3 -d 7 -e all", '\ '"-m 0 -a 1 -d 8 -e all", "-m 0 -a 2 -d 8 -e all", "-m 0 -a 3 -d 8 -e all", '\ + '"-m 1 -d 7 -e all", "-m 1 -d 8 -e all", '\ + '"-m 2 -d 7 -e all", "-m 2 -d 8 -e all", '\ + '"-m 4 -d 7 -e all", "-m 4 -d 8 -e all", '\ + '"-m 5 -d 7 -e all", "-m 5 -d 8 -e all", '\ '"-m 10 -d 6", "-m 10 -d 7", "-m 10 -d 8", '\ '"-m 11 -d 6", "-m 11 -d 7", "-m 11 -d 8", '\ '"-m 12 -d 6", "-m 12 -d 7", "-m 12 -d 8", '\ From f6564baa3b63f6a806475b75b503ea37334dd82b Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 25 Feb 2024 21:50:09 +0100 Subject: [PATCH 018/458] v9.2 - DietPi-Installer | Syntax --- .build/images/dietpi-installer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 123a5320c1..7254702d51 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1540,7 +1540,7 @@ _EOF_ # Bullseye: Remove old gcc-*-base packages, e.g. accumulated on Raspberry Pi OS images and installed by debootstrap, which are not autoremoved due to "Priority: required" # shellcheck disable=SC2015 - (( $G_DISTRO == 6 )) && mapfile -t apackages < <(dpkg --get-selections 'gcc-*-base' | mawk '$1!~/^gcc-10-/{print $1}');; + (( $G_DISTRO == 6 )) && mapfile -t apackages < <(dpkg --get-selections 'gcc-*-base' | mawk '$1!~/^gcc-10-/{print $1}') [[ ${apackages[0]} ]] && G_AGP "${apackages[@]}" unset -v apackages From 6c39b1257ac36b9ae3e1821c4a4ff56268580564 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 26 Feb 2024 19:05:38 +0100 Subject: [PATCH 019/458] v9.2 - DietPi-Software | NoMachine: Remove ~/NoMachine directory for all users on uninstall and bump to latest version --- dietpi/dietpi-software | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index eee7f5215b..c6abb6d496 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3228,12 +3228,12 @@ _EOF_ if To_Install 30 # NoMachine then - local version='8.10.1_1' # https://downloads.nomachine.com/ + local version='8.11.3_3' # https://downloads.nomachine.com/ case $G_HW_ARCH in 1) local url="Raspberry/nomachine_${version}_armv6hf";; 2) local url="Arm/nomachine_${version}_armhf";; 3) local url="Arm/nomachine_${version}_arm64";; - *) local url="Linux/nomachine_${version}_amd64";; + *) local url="Linux/nomachine_${version}_amd64" version='8.11.3_4';; esac Download_Install "https://download.nomachine.com/download/${version%.*}/$url.deb" aSTART_SERVICES+=('nxserver') @@ -10561,7 +10561,7 @@ _EOF_ *) local arch='arm-6';; esac - local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.21.6/gitea-1.21.6-linux-$arch.xz" + local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.21.7/gitea-1.21.7-linux-$arch.xz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/go-gitea/gitea/releases/latest' | mawk -F\" "/\"browser_download_url\": \".*\/gitea-[^\"\/]*-linux-$arch\.xz\"/{print \$4}")" /mnt/dietpi_userdata/gitea/gitea # User @@ -12163,7 +12163,7 @@ If no WireGuard (auto)start is included, but you require it, please do the follo then apt-mark auto qterminal xarchiver lxde-icon-theme upower xscreensaver leafpad featherpad speedcrunch 2> /dev/null G_AGP lxqt - rm -Rf /{root,home/*}/.config/lxqt + G_EXEC rm -Rf /{root,home/*}/.config/lxqt fi if To_Uninstall 174 # GIMP @@ -12202,6 +12202,7 @@ If no WireGuard (auto)start is included, but you require it, please do the follo if To_Uninstall 30 # NoMachine then G_AGP nomachine + G_EXEC rm -Rf /{root,home/*}/NoMachine fi if To_Uninstall 29 # XRDP From 24c05c71961c77ca832bf87af843be4ce538d2bc Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 27 Feb 2024 13:15:11 +0100 Subject: [PATCH 020/458] v9.2 - DietPi-Software | NoMachine: Fix URL development --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index c6abb6d496..6131e2a9c9 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3233,7 +3233,7 @@ _EOF_ 1) local url="Raspberry/nomachine_${version}_armv6hf";; 2) local url="Arm/nomachine_${version}_armhf";; 3) local url="Arm/nomachine_${version}_arm64";; - *) local url="Linux/nomachine_${version}_amd64" version='8.11.3_4';; + *) version='8.11.3_4'; local url="Linux/nomachine_${version}_amd64";; esac Download_Install "https://download.nomachine.com/download/${version%.*}/$url.deb" aSTART_SERVICES+=('nxserver') From a48f8269028160316c55c8a536daaf3bbb44861a Mon Sep 17 00:00:00 2001 From: Paul Mikki Sakurai <23254804+pdsakurai@users.noreply.github.com> Date: Wed, 28 Feb 2024 06:33:23 +0800 Subject: [PATCH 021/458] v9.1 (#6931) - DietPi-Software | Home Assistant: Resolved an issue on x86_64 and ARMv8 systems where some core integrations did not work if no C++ compiler was installed. If you are affected by this, "apt install g++ && systemctl restart home-assistant" will fix it. Many thanks to @pdsakurai for fixing this issue in our install code: https://github.com/MichaIng/DietPi/pull/6931 --- CHANGELOG.txt | 3 ++- dietpi/dietpi-software | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 835727ce83..d8682757c6 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -6,7 +6,8 @@ Enhancements: Bug fixes: - DietPi-Software | PaperMC: Resolved an issue where installing the Geyser and Floodgate plugins failed due to changed download URLs, and a false syntax in the Geyser config file. Many thanks to @boterocamilo for reporting this issue: https://github.com/MichaIng/DietPi/issues/6898 -- DietPi-Software | Nextcloud: Resolved an issue with the updated Nginx config, where assets were served with the wrong MIME type. This fix was backported to v9.1 and a live patch offered. Many thanks to @howardroark for reporting this issue: https://dietpi.com/forum/t/nextcloud-theme-broken-after-upgrade-v9-1-1/19372 +- DietPi-Software | Nextcloud: Resolved an issue with the updated Nginx config where assets were served with the wrong MIME type. This fix was backported to v9.1 and a live patch offered. Many thanks to @howardroark for reporting this issue: https://dietpi.com/forum/t/nextcloud-theme-broken-after-upgrade-v9-1-1/19372 +- DietPi-Software | Home Assistant: Resolved an issue on x86_64 and ARMv8 systems where some core integrations did not work if no C++ compiler was installed. If you are affected by this, "apt install g++ && systemctl restart home-assistant" will fix it. Many thanks to @pdsakurai for fixing this issue in our install code: https://github.com/MichaIng/DietPi/pull/6931 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 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 6131e2a9c9..ac5a73e619 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -11214,8 +11214,8 @@ _EOF_ local custom_apt_deps=$(sed -n '/^[[:blank:]]*SOFTWARE_HOMEASSISTANT_APT_DEPS=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) local custom_pip_deps=$(sed -n '/^[[:blank:]]*SOFTWARE_HOMEASSISTANT_PIP_DEPS=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) # - All: gcc, libc6-dev, make, libssl-dev, zlib1g-dev for Python build and libbz2-dev, libreadline-dev, libsqlite3-dev, liblzma-dev to suppress warnings - # - All: libffi-dev to solve "ModuleNotFoundError: No module named '_ctypes'", for python-slugify==4.0.1 build on ARMv8/x86_64 and cffi build on ARMv6/7/RISC-V - aDEPS=('gcc' 'libc6-dev' 'make' 'libssl-dev' 'zlib1g-dev' 'libbz2-dev' 'libreadline-dev' 'libsqlite3-dev' 'liblzma-dev' 'libffi-dev') + # - All: libffi-dev to solve "ModuleNotFoundError: No module named '_ctypes'", for python-slugify==4.0.1 build on ARMv8/x86_64 and cffi build on ARMv6/7/RISC-V, g++ for webrtc-noise-gain + aDEPS=('gcc' 'g++' 'libc6-dev' 'make' 'libssl-dev' 'zlib1g-dev' 'libbz2-dev' 'libreadline-dev' 'libsqlite3-dev' 'liblzma-dev' 'libffi-dev') mapfile -t -d' ' -O "${#aDEPS[@]}" aDEPS < <(echo -n "$custom_apt_deps") # - ARMv6/7/RISC-V G_EXEC mkdir -p "$ha_home" @@ -11223,7 +11223,7 @@ _EOF_ 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 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') + aDEPS+=('libjpeg62-turbo-dev' 'libopenblas-dev' 'pkg-config' '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 From b04c67091f6df5d3acd130855f0232b8d5676272 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 3 Mar 2024 23:42:23 +0100 Subject: [PATCH 022/458] v9.2 - DietPi-Software | It is now possible to run "dietpi-software list" concurrent to other dietpi-software instances, and as non-root user. This avoids an issue in DietPi-Dashboard, where opening dietpi-software in the Terminal and switching to the Software page, caused an infinite hang. - DietPi-Globals | Resolved an issue where a concurrent DietPi script detection could have prevented the start of a script, if a previous instance was killed via SIGKILL. - DietPi-Config | Resolved an issue where a WiFi connection, configured for the first time via dietpi-config from a local terminal session, was automatically stopped when exiting or logging out from the terminal session. --- CHANGELOG.txt | 3 +++ dietpi/dietpi-config | 29 ++++++++++++++++------------- dietpi/dietpi-software | 11 +++++++---- dietpi/func/dietpi-globals | 24 ++++++++++-------------- 4 files changed, 36 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index d8682757c6..ccbe616934 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,8 +3,11 @@ v9.2 Enhancements: - NanoPi R4S | Resolved an issue where Ethernet adapter of the "LAN" port could disappear after a soft reboot. Many thanks to @idaanx for reporting this issue: https://github.com/MichaIng/DietPi/issues/6342 +- DietPi-Software | It is now possible to run "dietpi-software list" concurrent to other dietpi-software instances, and as non-root user. This avoids an issue in DietPi-Dashboard, where opening dietpi-software in the Terminal and switching to the Software page, caused an infinite hang. Bug fixes: +- DietPi-Globals | Resolved an issue where a concurrent DietPi script detection could have prevented the start of a script, if a previous instance was killed via SIGKILL. +- DietPi-Config | Resolved an issue where a WiFi connection, configured for the first time via dietpi-config from a local terminal session, was automatically stopped when exiting or logging out from the terminal session. - DietPi-Software | PaperMC: Resolved an issue where installing the Geyser and Floodgate plugins failed due to changed download URLs, and a false syntax in the Geyser config file. Many thanks to @boterocamilo for reporting this issue: https://github.com/MichaIng/DietPi/issues/6898 - DietPi-Software | Nextcloud: Resolved an issue with the updated Nginx config where assets were served with the wrong MIME type. This fix was backported to v9.1 and a live patch offered. Many thanks to @howardroark for reporting this issue: https://dietpi.com/forum/t/nextcloud-theme-broken-after-upgrade-v9-1-1/19372 - DietPi-Software | Home Assistant: Resolved an issue on x86_64 and ARMv8 systems where some core integrations did not work if no C++ compiler was installed. If you are affected by this, "apt install g++ && systemctl restart home-assistant" will fix it. Many thanks to @pdsakurai for fixing this issue in our install code: https://github.com/MichaIng/DietPi/pull/6931 diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 28231fd14c..5ad0647fc4 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -1930,23 +1930,26 @@ If unsure, set any value, 'Ondemand Down Factor' option on the next screen will \nThis will free up space, but an internet-capable Ethernet connection is required to re-enable WiFi functionality. \nAffected packages: iw wireless-tools wpasupplicant wireless-regdb crda' && G_AGP 'iw' 'wireless-tools' 'wpasupplicant' 'wireless-regdb' 'crda' - # Drop connections - G_DIETPI-NOTIFY 2 'Dropping network connections, please wait...' - ifdown --force "$ETH_DEV_IFACE" 2> /dev/null - ifdown --force "$WIFI_DEV_IFACE" 2> /dev/null - - # Kill DHCP client - killall dhclient 2> /dev/null - # Restart network G_DIETPI-NOTIFY 2 'Restarting network connections, please wait...' G_EXEC systemctl daemon-reload - - # Manually bring up adapters - (( $ETH_DISABLED )) || ifup --force "$ETH_DEV_IFACE" - if (( ! $WIFI_DISABLED )) + # - Ethernet + if (( ! $ETH_DISABLED )) then - (( $WIFI_HOTSPOT )) || grep -q '^network=' /etc/wpa_supplicant/wpa_supplicant.conf && ifup --force "$WIFI_DEV_IFACE" + { journalctl -fn 0 -u "ifup@$ETH_DEV_IFACE" & pid=$!; } 2> /dev/null + G_EXEC_NOHALT=1 G_EXEC_OUTPUT=1 G_EXEC systemctl restart "ifup@$ETH_DEV_IFACE" + { kill -2 %% && wait; } 2> /dev/null + else + ifdown --force "$ETH_DEV_IFACE" 2> /dev/null + fi + # - WiFi: Only try to configure if this is either a hotspot or an SSID has been configured + if (( ! $WIFI_DISABLED )) && { (( $WIFI_HOTSPOT )) || grep -q '^network=' /etc/wpa_supplicant/wpa_supplicant.conf; } + then + { journalctl -fn 0 -u "ifup@$WIFI_DEV_IFACE" & pid=$!; } 2> /dev/null + G_EXEC_NOHALT=1 G_EXEC_OUTPUT=1 G_EXEC systemctl restart "ifup@$WIFI_DEV_IFACE" + { kill -2 %% && wait; } 2> /dev/null + else + ifdown --force "$WIFI_DEV_IFACE" 2> /dev/null fi # Start WiFi hotspot diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index ac5a73e619..b836fb2d15 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -26,9 +26,12 @@ Available commands: # Import DietPi-Globals --------------------------------------------------------------- . /boot/dietpi/func/dietpi-globals readonly G_PROGRAM_NAME='DietPi-Software' - G_CHECK_ROOT_USER - G_CHECK_ROOTFS_RW - G_INIT + if [[ $1 != 'list' ]] + then + G_CHECK_ROOT_USER + G_CHECK_ROOTFS_RW + G_INIT + fi # Import DietPi-Globals --------------------------------------------------------------- [[ $1 == 'list' && $2 == '--machine-readable' ]] && MACHINE_READABLE=1 || MACHINE_READABLE= @@ -15447,7 +15450,7 @@ List of installed software and their online documentation URLs: # Main Loop #///////////////////////////////////////////////////////////////////////////////////// # Abort if a reboot is required as of missing kernel modules - if (( $G_DIETPI_INSTALL_STAGE == 2 )) && ! G_CHECK_KERNEL + if [[ $1 != 'list' && $G_DIETPI_INSTALL_STAGE == 2 ]] && ! G_CHECK_KERNEL then G_WHIP_BUTTON_CANCEL_TEXT='Abort' G_WHIP_YESNO "[ INFO ] A reboot is required \nKernel modules for the loaded kernel at /lib/modules/$(uname -r) are missing. This is most likely the case as of a recently applied kernel upgrade where a reboot is required to load the new kernel. diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 8c510115c9..c20287082d 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -102,14 +102,17 @@ G_GITOWNER='$G_GITOWNER'" > /boot/dietpi/.version readonly G_WORKING_DIR="/tmp/${G_PROGRAM_NAME}_$i" else # Concurrency not allowed: Use existing working directory as flag - local limit=${G_INIT_WAIT_CONCURRENT:-5} + readonly G_WORKING_DIR="/tmp/$G_PROGRAM_NAME" + G_INIT_WAIT_CONCURRENT=${G_INIT_WAIT_CONCURRENT:=5} - while [[ -d /tmp/$G_PROGRAM_NAME ]] + while [[ -d $G_WORKING_DIR ]] do - if (( $i < $limit )) + # SIGKILL prevents the exit trap from removing this dir. Remove it in this case and proceed. + [[ $(pidof "$0") == *' '* ]] && { rm -R "$G_WORKING_DIR"; break; } + if (( $i < $G_INIT_WAIT_CONCURRENT )) then ((i++)) - G_DIETPI-NOTIFY 2 "Concurrent execution of $G_PROGRAM_NAME detected, retrying... ($i/$limit)" + G_DIETPI-NOTIFY 2 "Concurrent execution of $G_PROGRAM_NAME detected, retrying... ($i/$G_INIT_WAIT_CONCURRENT)" G_SLEEP 1 else G_WHIP_BUTTON_OK_TEXT='Retry' @@ -121,14 +124,12 @@ Please check if one of the following applies: - You started this script from within another DietPi program, causing a loop.\n Please assure that the concurrent execution has finished, before retrying, otherwise cancel this instance.\n The following info might help: -$(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')" && continue +$(ps f -eo pid,user,tty,cmd | grep -i 'dietpi')" && continue G_DIETPI-NOTIFY 1 "Cancelled $G_PROGRAM_NAME due to concurrent execution" exit 1 fi done - - readonly G_WORKING_DIR="/tmp/$G_PROGRAM_NAME" fi # Declare exit trap which runs on EXIT signals, including SIGINT and SIGTERM but not SIGKILL! @@ -148,13 +149,8 @@ $(ps f -eo pid,user,tty,cmd | grep -i '[d]ietpi')" && continue # Create and navigate to scripts working directory or users home if available: https://github.com/MichaIng/DietPi/issues/905#issuecomment-298223705 mkdir -p "$G_WORKING_DIR" && cd "$G_WORKING_DIR" && return - G_DIETPI-NOTIFY 1 "Failed to create or enter scripts working directory: $G_WORKING_DIR" - if [[ $HOME && -d $HOME ]] - then - cd "$HOME" && { G_DIETPI-NOTIFY 2 "Entered users home directory: $HOME"; return; } - G_DIETPI-NOTIFY 1 "Failed to enter users home directory: $HOME" - fi - G_DIETPI-NOTIFY 2 "Will stay in current directory: $PWD" + G_DIETPI-NOTIFY 1 "Failed to create or enter scripts working directory: $G_WORKING_DIR. Aborting ..." + exit 1 } From 264e07a32885879504305949511df06580ec55ff Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 3 Mar 2024 23:53:44 +0100 Subject: [PATCH 023/458] v9.2 - DietPi-Config | Remove obsolete variable --- dietpi/dietpi-config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 5ad0647fc4..927f7ed6c9 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -1936,7 +1936,7 @@ If unsure, set any value, 'Ondemand Down Factor' option on the next screen will # - Ethernet if (( ! $ETH_DISABLED )) then - { journalctl -fn 0 -u "ifup@$ETH_DEV_IFACE" & pid=$!; } 2> /dev/null + { journalctl -fn 0 -u "ifup@$ETH_DEV_IFACE" & } 2> /dev/null G_EXEC_NOHALT=1 G_EXEC_OUTPUT=1 G_EXEC systemctl restart "ifup@$ETH_DEV_IFACE" { kill -2 %% && wait; } 2> /dev/null else @@ -1945,7 +1945,7 @@ If unsure, set any value, 'Ondemand Down Factor' option on the next screen will # - WiFi: Only try to configure if this is either a hotspot or an SSID has been configured if (( ! $WIFI_DISABLED )) && { (( $WIFI_HOTSPOT )) || grep -q '^network=' /etc/wpa_supplicant/wpa_supplicant.conf; } then - { journalctl -fn 0 -u "ifup@$WIFI_DEV_IFACE" & pid=$!; } 2> /dev/null + { journalctl -fn 0 -u "ifup@$WIFI_DEV_IFACE" & } 2> /dev/null G_EXEC_NOHALT=1 G_EXEC_OUTPUT=1 G_EXEC systemctl restart "ifup@$WIFI_DEV_IFACE" { kill -2 %% && wait; } 2> /dev/null else From 943a16935dc60117b6604be0c776ac717d237548 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 5 Mar 2024 22:49:46 +0100 Subject: [PATCH 024/458] v9.2 - DietPi-Software | Syncthing: Update fallback URL --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index b836fb2d15..4402b570f4 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8941,7 +8941,7 @@ _EOF_ *) local arch='arm';; esac - local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.27.3/syncthing-linux-$arch-v1.27.3.tar.gz" + local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.27.4/syncthing-linux-$arch-v1.27.4.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/syncthing/syncthing/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/syncthing-linux-$arch-[^\"\/]*\.tar\.gz\"/{print \$4}")" G_EXEC mv syncthing-* /opt/syncthing fi From 8aaa078039726537c44c5fba10123c5062922c2e Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 6 Mar 2024 19:13:49 +0100 Subject: [PATCH 025/458] v9.2 - DietPi-Build | Fix debootstrap log path --- .build/images/dietpi-build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 5ec82d1f09..2464c916d4 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -378,7 +378,7 @@ G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/lib/apt/lists G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/log packages='apt,bash-completion,bzip2,ca-certificates,cron,curl,fdisk,gnupg,htop,iputils-ping,locales,nano,p7zip,parted,procps,psmisc,sudo,systemd-sysv,tzdata,udev,unzip,wget,whiptail,' [[ $HW_MODEL == 75 ]] && packages+='iproute2' || packages+='console-setup,dropbear,ethtool,fake-hwclock,ifupdown,isc-dhcp-client,kmod,rfkill,systemd-timesyncd,usbutils' -G_EXEC_POST_FUNC(){ [[ $exit_code == 0 ]] || cat /dev/shm/rootfs/debootstrap/debootstrap.log; } +G_EXEC_POST_FUNC(){ [[ $exit_code == 0 ]] || cat rootfs/debootstrap/debootstrap.log; } G_EXEC_OUTPUT=1 G_EXEC debootstrap --variant=minbase --include="$packages" --arch="$parch" --keyring="$keyring" "$distro" ./rootfs "$repo" G_EXEC umount rootfs/dev rootfs/run rootfs/var/cache/apt rootfs/var/lib/apt/lists rootfs/var/log From 85e0f2ff08307d315a4322608b4a32c5c0f43b56 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 6 Mar 2024 20:53:33 +0100 Subject: [PATCH 026/458] v9.2 - CI | DietPi-Software build: Shutdown on failures before the custom script is executed, and remove obsolete workaround --- .build/software/dietpi-software-build.bash | 6 +++--- .github/workflows/dietpi-software.bash | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.build/software/dietpi-software-build.bash b/.build/software/dietpi-software-build.bash index 1ee510ef4a..b29492cb9c 100644 --- a/.build/software/dietpi-software-build.bash +++ b/.build/software/dietpi-software-build.bash @@ -116,9 +116,6 @@ fi # Install Go for Gogs [[ $NAME == 'gogs' ]] && G_CONFIG_INJECT 'AUTO_SETUP_INSTALL_SOFTWARE_ID=' 'AUTO_SETUP_INSTALL_SOFTWARE_ID=188' rootfs/boot/dietpi.txt -# Gogs on RISC-V: Temporarily switch to dev branch until DietPi v8.24 has been released, installing Go from go.dev instead of APT -[[ $NAME == 'gogs' && $ARCH == 'riscv64' ]] && G_CONFIG_INJECT 'DEV_GITBRANCH=' 'DEV_GITBRANCH=dev' rootfs/boot/dietpi.txt - # Workaround invalid TERM on login # shellcheck disable=SC2016 G_EXEC eval 'echo '\''infocmp "$TERM" > /dev/null 2>&1 || { echo "[ WARN ] Unsupported TERM=\"$TERM\", switching to TERM=\"dumb\""; export TERM=dumb; }'\'' > rootfs/etc/bashrc.d/00-dietpi-build.sh' @@ -126,6 +123,9 @@ G_EXEC eval 'echo '\''infocmp "$TERM" > /dev/null 2>&1 || { echo "[ WARN ] Unsup # Workaround for failing IPv4 network connectivity check as GitHub Actions runners do not receive external ICMP echo replies G_CONFIG_INJECT 'CONFIG_CHECK_CONNECTION_IP=' 'CONFIG_CHECK_CONNECTION_IP=127.0.0.1' rootfs/boot/dietpi.txt +# Shutdown on failures before the custom script is executed +G_EXEC sed --follow-symlinks -i 's|Prompt_on_Failure$|{ journalctl -n 50; ss -tulpn; df -h; free -h; poweroff; }|' rootfs/boot/dietpi/dietpi-login + # Avoid DietPi-Survey uploads to not mess with the statistics G_EXEC rm rootfs/root/.ssh/known_hosts diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index 69225e7e84..3c012136d2 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -413,9 +413,9 @@ done # Success flag and shutdown # shellcheck disable=SC2016 -G_EXEC eval 'echo '\''[ $exit_code = 0 ] && > /success || { journalctl -n 50; ss -tlpn; df -h; free -h; poweroff; }; poweroff'\'' >> rootfs/boot/Automation_Custom_Script.sh' +G_EXEC eval 'echo '\''[ $exit_code = 0 ] && > /success || { journalctl -n 50; ss -tulpn; df -h; free -h; }; poweroff'\'' >> rootfs/boot/Automation_Custom_Script.sh' -# Shutdown as well on failure +# Shutdown as well on failures before the custom script is executed G_EXEC sed --follow-symlinks -i 's|Prompt_on_Failure$|{ journalctl -n 50; ss -tulpn; df -h; free -h; poweroff; }|' rootfs/boot/dietpi/dietpi-login ########################################## From 87248a9f30da3ec75ebb276101f3850c5b58054a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 6 Mar 2024 21:06:25 +0100 Subject: [PATCH 027/458] v9.2 - CI | Squeezelite: Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394 --- .build/software/squeezelite/build.bash | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.build/software/squeezelite/build.bash b/.build/software/squeezelite/build.bash index bb4e40835e..07788668a6 100755 --- a/.build/software/squeezelite/build.bash +++ b/.build/software/squeezelite/build.bash @@ -16,7 +16,8 @@ case $G_DISTRO in esac for i in "${adeps[@]}" do - dpkg-query -s "$i" &> /dev/null && continue + # Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394 + dpkg-query -s "$i" &> /dev/null || dpkg-query -s "${i}t64" &> /dev/null && continue G_DIETPI-NOTIFY 1 "Expected dependency package was not installed: $i" exit 1 done From 03093b9c8e715262305899358bb208052668c587 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 6 Mar 2024 21:08:33 +0100 Subject: [PATCH 028/458] v9.2 - CI | Amiberry: Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394 --- .build/software/Amiberry/build.bash | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.build/software/Amiberry/build.bash b/.build/software/Amiberry/build.bash index fadbbc3d75..692dba65d3 100755 --- a/.build/software/Amiberry/build.bash +++ b/.build/software/Amiberry/build.bash @@ -21,7 +21,8 @@ G_AGUP G_AGDUG "${adeps_build[@]}" for i in "${adeps[@]}" do - dpkg-query -s "$i" &> /dev/null && continue + # Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394 + dpkg-query -s "$i" &> /dev/null || dpkg-query -s "${i}t64" &> /dev/null && continue G_DIETPI-NOTIFY 1 "Expected dependency package was not installed: $i" exit 1 done From 9ff3f870161401da0908f4fbbaee653a57da2474 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 6 Mar 2024 21:42:32 +0100 Subject: [PATCH 029/458] v9.2 - CI | Fix version string for *t64 packages --- .build/software/Amiberry/build.bash | 2 ++ .build/software/squeezelite/build.bash | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.build/software/Amiberry/build.bash b/.build/software/Amiberry/build.bash index 692dba65d3..e238897a82 100755 --- a/.build/software/Amiberry/build.bash +++ b/.build/software/Amiberry/build.bash @@ -186,6 +186,8 @@ find "$DIR" ! \( -path "$DIR/DEBIAN" -prune \) -type f -exec md5sum {} + | sed " DEPS_APT_VERSIONED= for i in "${adeps[@]}" do + # Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394 + dpkg-query -s "$i" &> /dev/null || i+='t64' DEPS_APT_VERSIONED+=" $i (>= $(dpkg-query -Wf '${VERSION}' "$i"))," done DEPS_APT_VERSIONED=${DEPS_APT_VERSIONED%,} diff --git a/.build/software/squeezelite/build.bash b/.build/software/squeezelite/build.bash index 07788668a6..62dcebc265 100755 --- a/.build/software/squeezelite/build.bash +++ b/.build/software/squeezelite/build.bash @@ -144,6 +144,8 @@ find "$DIR" ! \( -path "$DIR/DEBIAN" -prune \) -type f -exec md5sum {} + | sed " DEPS_APT_VERSIONED= for i in "${adeps[@]}" do + # Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394 + dpkg-query -s "$i" &> /dev/null || i+='t64' DEPS_APT_VERSIONED+=" $i (>= $(dpkg-query -Wf '${VERSION}' "$i"))," done DEPS_APT_VERSIONED=${DEPS_APT_VERSIONED%,} From 9b4b5aa36889b0a0bd871750eca665481d8acc44 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 7 Mar 2024 21:28:39 +0100 Subject: [PATCH 030/458] v9.2 - DietPi-Software | DarkIce: Resolved an issue where the service failed to start due to false config file permissions. --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index ccbe616934..5d481cf221 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -11,6 +11,7 @@ Bug fixes: - DietPi-Software | PaperMC: Resolved an issue where installing the Geyser and Floodgate plugins failed due to changed download URLs, and a false syntax in the Geyser config file. Many thanks to @boterocamilo for reporting this issue: https://github.com/MichaIng/DietPi/issues/6898 - DietPi-Software | Nextcloud: Resolved an issue with the updated Nginx config where assets were served with the wrong MIME type. This fix was backported to v9.1 and a live patch offered. Many thanks to @howardroark for reporting this issue: https://dietpi.com/forum/t/nextcloud-theme-broken-after-upgrade-v9-1-1/19372 - DietPi-Software | Home Assistant: Resolved an issue on x86_64 and ARMv8 systems where some core integrations did not work if no C++ compiler was installed. If you are affected by this, "apt install g++ && systemctl restart home-assistant" will fix it. Many thanks to @pdsakurai for fixing this issue in our install code: https://github.com/MichaIng/DietPi/pull/6931 +- DietPi-Software | DarkIce: Resolved an issue where the service failed to start due to false config file permissions. 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 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 4402b570f4..0d24cedeec 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -5559,7 +5559,8 @@ _EOF_ # DarkIce [[ -f '/etc/darkice.cfg' ]] || > /etc/darkice.cfg - G_EXEC chmod 0600 /etc/darkice.cfg + G_EXEC chown root:dietpi /etc/darkice.cfg + G_EXEC chmod 0640 /etc/darkice.cfg local input_device_index=$(arecord -l | mawk -F'[ :]' '/card/{print $2;exit}') cat << _EOF_ > /etc/darkice.cfg [general] From b075d14d3c0766916e240cd7c782ca2f7bd99896 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 7 Mar 2024 21:55:47 +0100 Subject: [PATCH 031/458] v9.2 - DietPi-Software | DarkIce: Further tweak service permissions, to allow writing to /mnt/dietpi_userdata and listening on the audio recording device --- dietpi/dietpi-software | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 0d24cedeec..f15c4fd464 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -5557,10 +5557,13 @@ _EOF_ # - Remove default service config [[ -f '/etc/default/icecast2' ]] && G_EXEC rm /etc/default/icecast2 + # User + Create_User -g audio -G dietpi darkice + # DarkIce [[ -f '/etc/darkice.cfg' ]] || > /etc/darkice.cfg - G_EXEC chown root:dietpi /etc/darkice.cfg - G_EXEC chmod 0640 /etc/darkice.cfg + G_EXEC chown darkice:root /etc/darkice.cfg + G_EXEC chmod 0600 /etc/darkice.cfg local input_device_index=$(arecord -l | mawk -F'[ :]' '/card/{print $2;exit}') cat << _EOF_ > /etc/darkice.cfg [general] @@ -5569,7 +5572,7 @@ bufferSecs = 3 reconnect = yes [input] -device = hw:$input_device_index,0 +device = hw:${input_device_index:-0},0 sampleRate = 44100 bitsPerSample = 16 channel = 1 @@ -5597,8 +5600,7 @@ Requires=icecast2.service After=icecast2.service [Service] -User=nobody -Group=dietpi +User=darkice ExecStart=$(command -v darkice) [Install] From 155855f8c112e458674ea3178265bed3203e13f1 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 7 Mar 2024 22:12:09 +0100 Subject: [PATCH 032/458] v9.2 - DietPi-Software | DarkIce: Allow process to change its CPU scheduling priority, to mute a related warning on startup, which suggests to run DarkIce as root. We do not want that, hence we grant it via capabiliteis instead. --- dietpi/dietpi-software | 1 + 1 file changed, 1 insertion(+) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index f15c4fd464..a85a9b9ce1 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -5601,6 +5601,7 @@ After=icecast2.service [Service] User=darkice +AmbientCapabilities=CAP_SYS_NICE ExecStart=$(command -v darkice) [Install] From a17c5137c7a1f96f41660dc6aaf2b3045827d5ff Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 7 Mar 2024 22:23:03 +0100 Subject: [PATCH 033/458] v9.2 - CI | DietPi-Software: darkice service cannot start in container as is requires audio recording device access, test CLI instead --- .github/workflows/dietpi-software.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index 3c012136d2..696928bf65 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -162,7 +162,7 @@ Process_Software() 132) aSERVICES[i]='aria2' aTCP[i]='6800';; # aTCP[i]+=' 6881-6999';; # Listens on random port 133) (( $arch == 2 || $arch == 11 )) || aSERVICES[i]='yacy' aTCP[i]='8090'; (( $arch == 10 )) && aDELAY[i]=30; (( $arch == 10 || $arch == 2 || $arch == 11)) || aDELAY[i]=60;; 134) aCOMMANDS[i]='docker compose version';; - 135) aSERVICES[i]='icecast2 darkice' aTCP[i]='8000';; + 135) aSERVICES[i]='icecast2' aTCP[i]='8000' aCOMMANDS[i]='darkice -h';; # darkice service cannot start in container as is requires audio recording device access 136) aSERVICES[i]='motioneye' aTCP[i]='8765';; 137) aCOMMANDS[i]='/opt/mjpg-streamer/mjpg_streamer -v';; # aSERVICES[i]='mjpg-streamer' aTCP[i]='8082' Service does not start without an actual video device 138) aSERVICES[i]='virtualhere' aTCP[i]='7575';; From 83f7cb1dbe64c2b8db62c8281163698a8e4e35ae Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 7 Mar 2024 23:31:53 +0100 Subject: [PATCH 034/458] v9.2 - DietPi-Services | Icecast: Replace init.d service with native systemd service, and some minor code restructure --- dietpi/dietpi-software | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index a85a9b9ce1..2329e4a618 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -463,7 +463,7 @@ Available commands: aSOFTWARE_DEPS[$software_id]='88 89 128 195 webserver' #------------------ software_id=135 - aSOFTWARE_NAME[$software_id]='IceCast' + aSOFTWARE_NAME[$software_id]='Icecast' aSOFTWARE_DESC[$software_id]='Shoutcast streaming server (+DarkIce)' aSOFTWARE_CATX[$software_id]=2 aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/media/#icecast' @@ -5545,22 +5545,36 @@ _EOF_ G_EXEC chown -R www-data:www-data /var/www/ompd/{tmp,stream,cache} fi - if To_Install 135 icecast2 darkice # IceCast + DarkIce + if To_Install 135 icecast2 darkice # Icecast + DarkIce then G_AGI darkice icecast2 G_EXEC systemctl stop darkice icecast2 - # IceCast: Set passwords if not yet done (default found) + # Icecast + # - Config: Set passwords if not yet done (default found) sed --follow-symlinks -i "/hackme/c\ $GLOBAL_PW" /etc/icecast2/icecast.xml sed --follow-symlinks -i "/hackme/c\ $GLOBAL_PW" /etc/icecast2/icecast.xml sed --follow-symlinks -i "/hackme/c\ $GLOBAL_PW" /etc/icecast2/icecast.xml - # - Remove default service config - [[ -f '/etc/default/icecast2' ]] && G_EXEC rm /etc/default/icecast2 + # - Service: Replace init.d service with native systemd service + Remove_SysV icecast2 1 + cat << _EOF_ > /etc/systemd/system/icecast2.service +[Unit] +Description=Icecast (DietPi) +Wants=network-online.target +After=network-online.target - # User - Create_User -g audio -G dietpi darkice +[Service] +User=icecast2 +Group=icecast +ExecStart=/usr/bin/icecast2 -c /etc/icecast2/icecast.xml +[Install] +WantedBy=multi-user.target +_EOF_ # DarkIce + # - User + Create_User -g audio -G dietpi darkice + # - Config [[ -f '/etc/darkice.cfg' ]] || > /etc/darkice.cfg G_EXEC chown darkice:root /etc/darkice.cfg G_EXEC chmod 0600 /etc/darkice.cfg @@ -5592,17 +5606,17 @@ genre = none public = no #localDumpFile = /mnt/dietpi_userdata/darkice_recording.ogg _EOF_ + # - Service: Replace init.d service with native systemd service Remove_SysV darkice 1 cat << _EOF_ > /etc/systemd/system/darkice.service [Unit] Description=DarkIce (DietPi) -Requires=icecast2.service After=icecast2.service [Service] User=darkice AmbientCapabilities=CAP_SYS_NICE -ExecStart=$(command -v darkice) +ExecStart=/usr/bin/darkice [Install] WantedBy=multi-user.target @@ -6848,7 +6862,7 @@ _EOF_ # Cleanup G_EXEC rm -R WebIOPi-master - # On fresh installs, change port to 8002 to avoid conflict with IceCast + # On fresh installs, change port to 8002 to avoid conflict with Icecast (( $reinstall )) || G_EXEC sed --follow-symlinks -i 's/^port = 8000$/port = 8002/' /etc/webiopi/config # Service @@ -9419,7 +9433,7 @@ _EOF_ G_EXEC_OUTPUT=1 G_EXEC sudo -u koel "php$PHP_VERSION" artisan koel:sync G_EXEC cd "$G_WORKING_DIR" - # Service: Run on port 8003 by default to avoid conflict with IceCast + # Service: Run on port 8003 by default to avoid conflict with Icecast cat << _EOF_ > /etc/systemd/system/koel.service [Unit] Description=Koel (DietPi) From d228ab7b22ca1c6da63624e00b77527fd081adae Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 7 Mar 2024 23:34:49 +0100 Subject: [PATCH 035/458] v9.2 - CI | DietPi-Software: "darkice -h" returns exit code 1, hence check with grep for expected output --- .github/workflows/dietpi-software.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index 696928bf65..a5b8e36915 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -162,7 +162,7 @@ Process_Software() 132) aSERVICES[i]='aria2' aTCP[i]='6800';; # aTCP[i]+=' 6881-6999';; # Listens on random port 133) (( $arch == 2 || $arch == 11 )) || aSERVICES[i]='yacy' aTCP[i]='8090'; (( $arch == 10 )) && aDELAY[i]=30; (( $arch == 10 || $arch == 2 || $arch == 11)) || aDELAY[i]=60;; 134) aCOMMANDS[i]='docker compose version';; - 135) aSERVICES[i]='icecast2' aTCP[i]='8000' aCOMMANDS[i]='darkice -h';; # darkice service cannot start in container as is requires audio recording device access + 135) aSERVICES[i]='icecast2' aTCP[i]='8000' aCOMMANDS[i]='darkice -h | grep '\''^DarkIce\';; # darkice service cannot start in container as is requires audio recording device access 136) aSERVICES[i]='motioneye' aTCP[i]='8765';; 137) aCOMMANDS[i]='/opt/mjpg-streamer/mjpg_streamer -v';; # aSERVICES[i]='mjpg-streamer' aTCP[i]='8082' Service does not start without an actual video device 138) aSERVICES[i]='virtualhere' aTCP[i]='7575';; From 2284b4b998bc0d12aeff8ca93c1f840604deaa1f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 7 Mar 2024 23:46:00 +0100 Subject: [PATCH 036/458] v9.2 - CI | DietPi-Software: Syntax --- .github/workflows/dietpi-software.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index a5b8e36915..f10f4e2687 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -162,7 +162,7 @@ Process_Software() 132) aSERVICES[i]='aria2' aTCP[i]='6800';; # aTCP[i]+=' 6881-6999';; # Listens on random port 133) (( $arch == 2 || $arch == 11 )) || aSERVICES[i]='yacy' aTCP[i]='8090'; (( $arch == 10 )) && aDELAY[i]=30; (( $arch == 10 || $arch == 2 || $arch == 11)) || aDELAY[i]=60;; 134) aCOMMANDS[i]='docker compose version';; - 135) aSERVICES[i]='icecast2' aTCP[i]='8000' aCOMMANDS[i]='darkice -h | grep '\''^DarkIce\';; # darkice service cannot start in container as is requires audio recording device access + 135) aSERVICES[i]='icecast2' aTCP[i]='8000' aCOMMANDS[i]='darkice -h | grep '\''^DarkIce'\';; # darkice service cannot start in container as is requires audio recording device access 136) aSERVICES[i]='motioneye' aTCP[i]='8765';; 137) aCOMMANDS[i]='/opt/mjpg-streamer/mjpg_streamer -v';; # aSERVICES[i]='mjpg-streamer' aTCP[i]='8082' Service does not start without an actual video device 138) aSERVICES[i]='virtualhere' aTCP[i]='7575';; From 3a0f8dfdadff1ee2ea3911ad499a3641cc1a5526 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 9 Mar 2024 15:55:41 +0100 Subject: [PATCH 037/458] v9.2 (#6952) - CI | Squeezelite: Use again latest commit, with a fix for upstream libFLAC: https://github.com/ralph-irving/squeezelite/commit/fd89d67 - Coding | Mute new shellcheck annotation SC2324 --- .build/software/squeezelite/build.bash | 8 +++----- dietpi/dietpi-config | 4 ++-- dietpi/dietpi-software | 4 ++-- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.build/software/squeezelite/build.bash b/.build/software/squeezelite/build.bash index 62dcebc265..ab6c717d89 100755 --- a/.build/software/squeezelite/build.bash +++ b/.build/software/squeezelite/build.bash @@ -24,13 +24,11 @@ done G_DIETPI-NOTIFY 2 'Downloading source code...' G_EXEC cd /tmp -# Freeze commit: https://github.com/ralph-irving/squeezelite/issues/206 -G_EXEC curl -sSfLO 'https://github.com/ralph-irving/squeezelite/archive/6de9e229aa4cc7c3131ff855f3ead39581127090.tar.gz' +G_EXEC curl -sSfLO 'https://github.com/ralph-irving/squeezelite/archive/master.tar.gz' [[ -d 'squeezelite-master' ]] && G_EXEC rm -R squeezelite-master -G_EXEC tar xf 6de9e229aa4cc7c3131ff855f3ead39581127090.tar.gz -G_EXEC rm 6de9e229aa4cc7c3131ff855f3ead39581127090.tar.gz +G_EXEC tar xf master.tar.gz +G_EXEC rm master.tar.gz G_DIETPI-NOTIFY 2 'Compiling binary...' -G_EXEC mv squeezelite-{6de9e229aa4cc7c3131ff855f3ead39581127090,master} G_EXEC cd squeezelite-master G_EXEC_OUTPUT=1 G_EXEC make CFLAGS='-g0 -O3' OPTS='-DDSD -DFFMPEG -DRESAMPLE -DVISEXPORT -DLINKALL -DIR -DUSE_SSL' G_EXEC strip --remove-section=.comment --remove-section=.note squeezelite diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 927f7ed6c9..f8f0ad85cd 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -2290,14 +2290,14 @@ NB: All Ethernet connections will be temporarily dropped!' && Network_ApplyChang do if (( $i < $full_octets )) then - mask+=255 + mask+='255' elif (( $i == $full_octets )) then mask+=$(( 256 - 2 ** ( 8 - $partial_octet ) )) else - mask+=0 + mask+='0' fi (( $i < 3 )) && mask+=. done diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 2329e4a618..38107abeeb 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -14572,13 +14572,13 @@ _EOF_ do if (( $i < $full_octets )) then - mask+=255 + mask+='255' elif (( $i == $full_octets )) then mask+=$(( 256 - 2 ** ( 8 - $partial_octet ) )) else - mask+=0 + mask+='0' fi (( $i < 3 )) && mask+=. done From 187a21f8dc7bcd8393ee0de79a72d15da5e3ded1 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 9 Mar 2024 16:21:26 +0100 Subject: [PATCH 038/458] v9.2 - DietPi-Software | VNC server: Restructure code a little --- dietpi/dietpi-software | 56 ++++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 38107abeeb..98fe62702b 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -7107,7 +7107,7 @@ _EOF_ G_AGI realvnc-vnc-server libraspberrypi0 # Depends on libbcm_host.so but does not pull libraspberrypi0 as dependency fi - # TigerVNC/RealVNC Server - Shared setup + # TigerVNC/RealVNC Server: Shared setup if (( ${aSOFTWARE_INSTALL_STATE[28]} == 1 || ${aSOFTWARE_INSTALL_STATE[120]} == 1 )) then # Service @@ -7131,9 +7131,6 @@ WantedBy=multi-user.target _EOF_ aSTART_SERVICES+=('vncserver') - # RealVNC: Assure that its services are disabled when ours is enabled - (( ${aSOFTWARE_INSTALL_STATE[120]} == 1 )) && G_EXEC systemctl --no-reload disable vncserver-virtuald vncserver-x11-serviced - cat << '_EOF_' > /usr/local/bin/vncserver #!/bin/dash @@ -7147,8 +7144,7 @@ elif [ -f '/usr/bin/tigervncserver' ] then echo '[ OK ] TigerVNC detected' FP_BINARY='/usr/bin/tigervncserver' - [ -f '/usr/bin/X0tigervnc' ] && FP_SHARED='/usr/bin/X0tigervnc' || FP_SHARED='/usr/bin/x0tigervncserver' - FP_SHARED="$FP_SHARED -display :0 -rfbauth $HOME/.vnc/passwd" + FP_SHARED="/usr/bin/X0tigervnc -display :0 -rfbauth $HOME/.vnc/passwd" else echo '[FAILED] No supported VNC server installed' exit 1 @@ -7177,9 +7173,9 @@ case "$1" in WIDTH=$(sed -n '/^[[:blank:]]*SOFTWARE_VNCSERVER_WIDTH=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) HEIGHT=$(sed -n '/^[[:blank:]]*SOFTWARE_VNCSERVER_HEIGHT=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) DEPTH=$(sed -n '/^[[:blank:]]*SOFTWARE_VNCSERVER_DEPTH=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) - echo "[ INFO ] Starting virtual desktop at display :${DISPLAY:-1} in ${WIDTH:-1280}x${HEIGHT:-720}x${DEPTH:-16}" + echo "[ INFO ] Starting virtual desktop at display :${DISPLAY:=1} in ${WIDTH:=1280}x${HEIGHT:=720}x${DEPTH:=16}" export SHELL='/bin/bash' - exec $FP_BINARY ":${DISPLAY:-1}" -geometry "${WIDTH:-1280}x${HEIGHT:-720}" -depth "${DEPTH:-16}" + exec $FP_BINARY ":$DISPLAY" -geometry "${WIDTH}x$HEIGHT" -depth "$DEPTH" fi ;; @@ -7188,13 +7184,13 @@ case "$1" in if grep -q '^[[:blank:]]*SOFTWARE_VNCSERVER_SHARE_DESKTOP=1' /boot/dietpi.txt then echo '[ INFO ] Disconnecting from shared desktop' - killall -qw vncserver-x11-core x0tigervncserver X0tigervnc + killall -qw vncserver-x11-core X0tigervnc # Virtual desktop mode else DISPLAY=$(sed -n '/^[[:blank:]]*SOFTWARE_VNCSERVER_DISPLAY_INDEX=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) - echo "[ INFO ] Stopping virtual desktop at display :${DISPLAY:-1}" - $FP_BINARY -kill ":${DISPLAY:-1}" + echo "[ INFO ] Stopping virtual desktop at display :${DISPLAY:=1}" + $FP_BINARY -kill ":$DISPLAY" fi ;; @@ -7209,26 +7205,38 @@ exit 0 _EOF_ G_EXEC chmod +x /usr/local/bin/vncserver - # TigerVNC: Permit remote connections which implies TLSVnc authentications being enabled additionally - # shellcheck disable=SC2016 - (( ${aSOFTWARE_INSTALL_STATE[28]} == 1 )) && GCI_PRESERVE=1 G_CONFIG_INJECT '\$localhost[[:blank:]]*=' '$localhost = "no";' /etc/tigervnc/vncserver-config-defaults - - # TigerVNC: Set control + read-only passwords - if [[ ${aSOFTWARE_INSTALL_STATE[28]} == 1 && ! -f '/root/.vnc/passwd' ]] + # TigerVNC + if (( ${aSOFTWARE_INSTALL_STATE[28]} == 1 )) then - G_EXEC mkdir -p /root/.vnc - tigervncpasswd -f <<< "$GLOBAL_PW + # TigerVNC: Permit remote connections which implies TLSVnc authentications being enabled additionally + # shellcheck disable=SC2016 + GCI_PRESERVE=1 G_CONFIG_INJECT '\$localhost[[:blank:]]*=' '$localhost = "no";' /etc/tigervnc/vncserver-config-defaults + + # Set control + read-only passwords + if [[ ! -f '/root/.vnc/passwd' ]] + then + G_EXEC mkdir -p /root/.vnc + tigervncpasswd -f <<< "$GLOBAL_PW $GLOBAL_PW" > /root/.vnc/passwd - G_EXEC chmod 600 /root/.vnc/passwd + G_EXEC chmod 600 /root/.vnc/passwd + fi fi - # RealVNC: Set virtual + shared desktop passwords, repeat virtual password command two times: https://github.com/MichaIng/DietPi/pull/4679#issuecomment-908196511 - if [[ ${aSOFTWARE_INSTALL_STATE[120]} == 1 && ! -s '/root/.vnc/config.d/Xvnc' ]] + # RealVNC + if (( ${aSOFTWARE_INSTALL_STATE[120]} == 1 )) then - vncpasswd -virtual <<< "$GLOBAL_PW + # Assure that its services are disabled when ours is enabled + G_EXEC systemctl --no-reload disable vncserver-virtuald vncserver-x11-serviced + + # Set (+verify) virtual + shared desktop passwords: https://github.com/MichaIng/DietPi/pull/4679#issuecomment-908196511 + if [[ ! -s '/root/.vnc/config.d/Xvnc' ]] + then + vncpasswd -virtual <<< "$GLOBAL_PW $GLOBAL_PW" - vncpasswd -service <<< "$GLOBAL_PW + vncpasswd -service <<< "$GLOBAL_PW $GLOBAL_PW" + fi + [[ -f '/root/.vnc/config.d/.Xvnc-v5-marker' ]] || > /root/.vnc/config.d/.Xvnc-v5-marker fi fi From fec381841c696449a0d747b7624ea7f9b0fbee33 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 9 Mar 2024 17:10:06 +0100 Subject: [PATCH 039/458] v9.2 - META | Remove live patches from dev --- .update/version | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.update/version b/.update/version index 0ce5df534a..83d5135338 100644 --- a/.update/version +++ b/.update/version @@ -14,6 +14,6 @@ G_MIN_DEBIAN=6 # Alternative Git branch to automatically migrate to when Debian version is too low G_OLD_DEBIAN_BRANCH='8' # Live patches -G_LIVE_PATCH_DESC=('Fix Nextcloud Nginx config, serving wrong MIME types') -G_LIVE_PATCH_COND=('[[ -f /etc/nginx/sites-dietpi/dietpi-nextcloud.conf ]] && ! grep -q '\''include mime.types;'\'' /etc/nginx/sites-dietpi/dietpi-nextcloud.conf') -G_LIVE_PATCH=('sed -i '\''/types {/i\\tinclude mime.types;'\'' /etc/nginx/sites-dietpi/dietpi-nextcloud.conf; systemctl -q is-active nginx && systemctl restart nginx') +G_LIVE_PATCH_DESC=() +G_LIVE_PATCH_COND=() +G_LIVE_PATCH=() From c5a28f15fdf9b7e0560da4f8f95f1da2728dbefc Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 9 Mar 2024 20:28:53 +0100 Subject: [PATCH 040/458] v9.2 - CI | vaultwarden: Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394 --- .build/software/vaultwarden/build.bash | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.build/software/vaultwarden/build.bash b/.build/software/vaultwarden/build.bash index b141a2314d..ce68c4bc55 100755 --- a/.build/software/vaultwarden/build.bash +++ b/.build/software/vaultwarden/build.bash @@ -11,7 +11,8 @@ G_AGUP G_AGDUG "${adeps_build[@]}" for i in "${adeps[@]}" do - dpkg-query -s "$i" &> /dev/null && continue + # Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394 + dpkg-query -s "$i" &> /dev/null || dpkg-query -s "${i}t64" &> /dev/null && continue G_DIETPI-NOTIFY 1 "Expected dependency package was not installed: $i" exit 1 done @@ -205,6 +206,8 @@ find "$DIR" ! \( -path "$DIR/DEBIAN" -prune \) -type f -exec md5sum {} + | sed " DEPS_APT_VERSIONED= for i in "${adeps[@]}" do + # Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394 + dpkg-query -s "$i" &> /dev/null || i+='t64' DEPS_APT_VERSIONED+=" $i (>= $(dpkg-query -Wf '${VERSION}' "$i"))," done DEPS_APT_VERSIONED=${DEPS_APT_VERSIONED%,} From cff6c017088e338755f405b2e9723c4c9c5ca7d2 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 9 Mar 2024 23:29:39 +0100 Subject: [PATCH 041/458] v9.2 - DietPi-Patches | Move forward RISC-V kernel updates --- .update/patches | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.update/patches b/.update/patches index 889d67ed2c..155255725e 100755 --- a/.update/patches +++ b/.update/patches @@ -1484,22 +1484,6 @@ Patch_9_1() G_EXEC rm package.deb break done - - # VisionFive 2 - elif (( $G_HW_MODEL == 81 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-visionfive2 2> /dev/null)" lt-nl 6.1.78-dietpi1 - 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' - G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb - G_EXEC rm package.deb - - # Star64 - elif (( $G_HW_MODEL == 84 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-star64 2> /dev/null)" lt-nl 6.1.78-dietpi1 - then - G_DIETPI-NOTIFY 2 'Updating RISC-V PINE64 Star64 kernel ...' - G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/linux-image-star64.deb' - G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb - G_EXEC rm package.deb fi # Software updates and migrations @@ -1581,6 +1565,22 @@ Patch_9_2() dpkg-query -s 'linux-headers-current-rockchip64' &> /dev/null && { G_EXEC_OUTPUT=1 G_EXEC curl -fo package4.deb 'https://dietpi.com/downloads/binaries/linux-headers-current-rockchip64.deb'; headers=('package4.deb'); } G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package1.deb package2.deb package3.deb "${headers[@]}" G_EXEC rm package1.deb package2.deb package3.deb "${headers[@]}" + + # VisionFive 2 + elif (( $G_HW_MODEL == 81 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-visionfive2 2> /dev/null)" lt-nl 6.1.81-dietpi1 + 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' + G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb + G_EXEC rm package.deb + + # Star64 + elif (( $G_HW_MODEL == 84 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-star64 2> /dev/null)" lt-nl 6.1.81-dietpi1 + then + G_DIETPI-NOTIFY 2 'Updating RISC-V PINE64 Star64 kernel ...' + G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/linux-image-star64.deb' + G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb + G_EXEC rm package.deb fi # Software updates and migrations From 7eaa07326ef73249859428481cd8a5b50968e0ea Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 9 Mar 2024 23:54:27 +0100 Subject: [PATCH 042/458] v9.2 - DietPi-Patches | Move forward further updates --- .update/patches | 75 ++++++++++++++++++++++++------------------------- 1 file changed, 37 insertions(+), 38 deletions(-) diff --git a/.update/patches b/.update/patches index 155255725e..a5cc3f36b4 100755 --- a/.update/patches +++ b/.update/patches @@ -1472,20 +1472,6 @@ Patch_9_1() G_EXEC rm /etc/kernel/postinst.d/dietpi-USBridgeSig fi - # Quartz64 - if (( $G_HW_MODEL == 49 )) - then - for i in quartz64{a,b} soquartz - do - dpkg --compare-versions "$(dpkg-query -Wf '${Version}' "firmware-$i" 2> /dev/null)" lt-nl 6.7.4-dietpi1 || continue - G_DIETPI-NOTIFY 2 "Updating $i kernel and bootloader ..." - G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/firmware-$i.deb" - G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb - G_EXEC rm package.deb - break - done - fi - # Software updates and migrations if [[ -f '/boot/dietpi/.installed' ]] then @@ -1519,36 +1505,12 @@ map $arg_v $asset_immutable { G_EXEC sed -i "s|, reboot, poweroff|, $(which reboot), $(which poweroff)|" /etc/sudoers.d/octoprint fi - # Squeezelite - if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[36\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' squeezelite 2> /dev/null)" lt 2.0.0-1465-dietpi1 - then - G_DIETPI-NOTIFY 2 'Updating Squeezelite package ...' - G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/squeezelite_$G_HW_ARCH_NAME.deb" - G_AGI ./package.deb - G_EXEC rm package.deb - fi - # Amiberry if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[108\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' amiberry 2> /dev/null)" lt 5.6.6-dietpi1 then G_DIETPI-NOTIFY 2 'Preparing Amiberry upgrade to v5.6.6, including migration for RPi systems from fake KMS DispmanX to full KMS SDL2 graphics backend' echo 108 >> /var/tmp/dietpi/dietpi-update_reinstalls fi - - # vaultwarden - if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[183\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' vaultwarden 2> /dev/null)" lt 1.30.3-dietpi2 - then - # Pre-v8.7 cleanup - if [[ -f '/opt/vaultwarden/target/release/vaultwarden' ]] - then - G_EXEC rm -R /opt/vaultwarden - [[ -f '/etc/systemd/system/vaultwarden.service' ]] && G_EXEC rm /etc/systemd/system/vaultwarden.service - fi - G_DIETPI-NOTIFY 2 'Updating vaultwarden package ...' - G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/vaultwarden_$G_HW_ARCH_NAME.deb" - G_AGI ./package.deb - G_EXEC rm package.deb - fi fi } @@ -1566,6 +1528,19 @@ Patch_9_2() G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package1.deb package2.deb package3.deb "${headers[@]}" G_EXEC rm package1.deb package2.deb package3.deb "${headers[@]}" + # Quartz64 + elif (( $G_HW_MODEL == 49 )) + then + for i in quartz64{a,b} soquartz + do + dpkg --compare-versions "$(dpkg-query -Wf '${Version}' "firmware-$i" 2> /dev/null)" lt-nl 6.7.4-dietpi1 || continue + G_DIETPI-NOTIFY 2 "Updating $i kernel and bootloader ..." + G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/firmware-$i.deb" + G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb + G_EXEC rm package.deb + break + done + # VisionFive 2 elif (( $G_HW_MODEL == 81 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-visionfive2 2> /dev/null)" lt-nl 6.1.81-dietpi1 then @@ -1608,6 +1583,30 @@ Patch_9_2() G_EXEC sed -i 's/^auth-type: floodgate/ auth-type: floodgate/' /mnt/dietpi_userdata/papermc/plugins/Geyser-Spigot/config.yml fi fi + + # Squeezelite + if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[36\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' squeezelite 2> /dev/null)" lt 2.0.0-1468-dietpi1 + then + G_DIETPI-NOTIFY 2 'Updating Squeezelite package ...' + G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/squeezelite_$G_HW_ARCH_NAME.deb" + G_AGI ./package.deb + G_EXEC rm package.deb + fi + + # vaultwarden + if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[183\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' vaultwarden 2> /dev/null)" lt 1.30.5-dietpi1 + then + # Pre-v8.7 cleanup + if [[ -f '/opt/vaultwarden/target/release/vaultwarden' ]] + then + G_EXEC rm -R /opt/vaultwarden + [[ -f '/etc/systemd/system/vaultwarden.service' ]] && G_EXEC rm /etc/systemd/system/vaultwarden.service + fi + G_DIETPI-NOTIFY 2 'Updating vaultwarden package ...' + G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/vaultwarden_$G_HW_ARCH_NAME.deb" + G_AGI ./package.deb + G_EXEC rm package.deb + fi fi } From 7be541e5512a0b6ae649e08d3f07140219e11e78 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 10 Mar 2024 00:18:47 +0100 Subject: [PATCH 043/458] v9.2 - DietPi-Config | Fix and simplify journalctl handling when restarting network connections: Job control messages are not printed within scripts, hence no need to wrap everything in command blocks and mute STDERR. SIGINT somehow does not work in this script to kill journalctl, while it does work from console. Hence use SIGTERM, which does work. --- dietpi/dietpi-config | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index f8f0ad85cd..e93be67e13 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -1936,18 +1936,18 @@ If unsure, set any value, 'Ondemand Down Factor' option on the next screen will # - Ethernet if (( ! $ETH_DISABLED )) then - { journalctl -fn 0 -u "ifup@$ETH_DEV_IFACE" & } 2> /dev/null + journalctl -fn 0 -u "ifup@$ETH_DEV_IFACE" & G_EXEC_NOHALT=1 G_EXEC_OUTPUT=1 G_EXEC systemctl restart "ifup@$ETH_DEV_IFACE" - { kill -2 %% && wait; } 2> /dev/null + kill -15 %% else ifdown --force "$ETH_DEV_IFACE" 2> /dev/null fi # - WiFi: Only try to configure if this is either a hotspot or an SSID has been configured if (( ! $WIFI_DISABLED )) && { (( $WIFI_HOTSPOT )) || grep -q '^network=' /etc/wpa_supplicant/wpa_supplicant.conf; } then - { journalctl -fn 0 -u "ifup@$WIFI_DEV_IFACE" & } 2> /dev/null + journalctl -fn 0 -u "ifup@$WIFI_DEV_IFACE" & G_EXEC_NOHALT=1 G_EXEC_OUTPUT=1 G_EXEC systemctl restart "ifup@$WIFI_DEV_IFACE" - { kill -2 %% && wait; } 2> /dev/null + kill -15 %% else ifdown --force "$WIFI_DEV_IFACE" 2> /dev/null fi From 0d9449b74216c63d2d6ccbc3d0f4bd5b2c187113 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 10 Mar 2024 00:46:44 +0100 Subject: [PATCH 044/458] v9.2 - DietPi-Globals | Fix concurrency check: Consider PIDs of shells running a matching script name, and correctly invert logic to remove stale working dir --- dietpi/func/dietpi-globals | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index c20287082d..cfbfac578f 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -108,7 +108,7 @@ G_GITOWNER='$G_GITOWNER'" > /boot/dietpi/.version while [[ -d $G_WORKING_DIR ]] do # SIGKILL prevents the exit trap from removing this dir. Remove it in this case and proceed. - [[ $(pidof "$0") == *' '* ]] && { rm -R "$G_WORKING_DIR"; break; } + [[ $(pidof -x "$0") == *' '* ]] || { rm -R "$G_WORKING_DIR"; break; } if (( $i < $G_INIT_WAIT_CONCURRENT )) then ((i++)) From 62d8e7e1d5d5e9e21d0d7a94de72cfb386342f92 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 10 Mar 2024 00:53:08 +0100 Subject: [PATCH 045/458] v9.2 - RC up --- .update/version | 2 +- dietpi/func/dietpi-globals | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.update/version b/.update/version index 83d5135338..85c98a4951 100644 --- a/.update/version +++ b/.update/version @@ -3,7 +3,7 @@ # Available DietPi version G_REMOTE_VERSION_CORE=9 G_REMOTE_VERSION_SUB=2 -G_REMOTE_VERSION_RC=-1 +G_REMOTE_VERSION_RC=0 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=7 G_MIN_VERSION_SUB=0 diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index cfbfac578f..76d0b380f3 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -55,7 +55,7 @@ # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=9 [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=2 - [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=-1 + [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=0 [[ $G_GITBRANCH ]] || G_GITBRANCH='master' [[ $G_GITOWNER ]] || G_GITOWNER='MichaIng' # - Save current version and Git branch From 5d1d7987a3f8ee409173f68ade9e337e8a34c3ae Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 10 Mar 2024 00:56:54 +0100 Subject: [PATCH 046/458] v9.2 - CHANGELOG | LXQt: Resolved an issue where the installation failed on Trixie and RISC-V systems, since we did not host a config archive for those Debian versions yet. Many thanks to @jtmoon79 for reporting this issue: https://github.com/MichaIng/DietPi/issues/6939 --- CHANGELOG.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 5d481cf221..388c25b22c 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -12,6 +12,7 @@ Bug fixes: - DietPi-Software | Nextcloud: Resolved an issue with the updated Nginx config where assets were served with the wrong MIME type. This fix was backported to v9.1 and a live patch offered. Many thanks to @howardroark for reporting this issue: https://dietpi.com/forum/t/nextcloud-theme-broken-after-upgrade-v9-1-1/19372 - DietPi-Software | Home Assistant: Resolved an issue on x86_64 and ARMv8 systems where some core integrations did not work if no C++ compiler was installed. If you are affected by this, "apt install g++ && systemctl restart home-assistant" will fix it. Many thanks to @pdsakurai for fixing this issue in our install code: https://github.com/MichaIng/DietPi/pull/6931 - DietPi-Software | DarkIce: Resolved an issue where the service failed to start due to false config file permissions. +- DietPi-Software | LXQt: Resolved an issue where the installation failed on Trixie and RISC-V systems, since we did not host a config archive for those Debian versions yet. Many thanks to @jtmoon79 for reporting this issue: https://github.com/MichaIng/DietPi/issues/6939 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 From 6beb0c91defd8464f16afd3f975c4bff7b8272a8 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 10 Mar 2024 15:39:38 +0100 Subject: [PATCH 047/458] v9.2 - DietPi-Software | Update fallback URLs --- dietpi/dietpi-software | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 98fe62702b..857792622a 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -10088,7 +10088,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.19.2437/Readarr.develop.0.3.19.2437.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.20.2452/Readarr.develop.0.3.20.2452.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Readarr/Readarr/releases' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}" | head -1)" G_EXEC mv Readarr /opt/readarr fi @@ -11584,7 +11584,7 @@ _EOF_ *) local arch='amd64';; esac - local fallback_url="https://github.com/rclone/rclone/releases/download/v1.65.2/rclone-v1.65.2-linux-$arch.deb" + local fallback_url="https://github.com/rclone/rclone/releases/download/v1.66.0/rclone-v1.66.0-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 @@ -11598,7 +11598,7 @@ _EOF_ *) local arch='arm';; esac - local fallback_url="https://github.com/restic/restic/releases/download/v0.15.2/restic_0.15.2_linux_$arch.bz2" + local fallback_url="https://github.com/restic/restic/releases/download/v0.16.4/restic_0.16.4_linux_$arch.bz2" Download_Install "$(curl -sSfL 'https://api.github.com/repos/restic/restic/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/restic_[^\"\/]*_linux_$arch\.bz2\"$/{print \$4}")" /usr/local/bin/restic G_EXEC chmod +x /usr/local/bin/restic fi From 8b0e13180d90c5c941063a2de468c77979a389c2 Mon Sep 17 00:00:00 2001 From: JappeHallunken Date: Sun, 10 Mar 2024 18:06:58 +0100 Subject: [PATCH 048/458] v9.2 (#6940) - META | Simplify branch switch instructions, using `G_DEV_BRANCH `, which implies changing the `dietpi.txt` setting as well as applying the update right away --- BRANCH_SYSTEM.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/BRANCH_SYSTEM.md b/BRANCH_SYSTEM.md index 57c7836b22..d67502152b 100644 --- a/BRANCH_SYSTEM.md +++ b/BRANCH_SYSTEM.md @@ -14,12 +14,11 @@ By joining the Beta and reporting issues, you will be assisting DietPi (and all 1. Recommended: Backup your system with `dietpi-backup` (or backup quickly with `dietpi-backup 1`). 2. Run the following command to switch to "beta" branch: ```sh - G_CONFIG_INJECT 'DEV_GITBRANCH=' 'DEV_GITBRANCH=beta' /boot/dietpi.txt + G_DEV_BRANCH beta ``` -3. Run `dietpi-update` to update the system, then reboot (or update quickly with `dietpi-update 1`). -4. Test away, please report any issues on our GitHub page. Also ensure you mention "beta branch" in your post: https://github.com/MichaIng/DietPi/issues -5. If you want to return the system to the previous restore state, run `dietpi-backup` to restore (or restore quickly with `dietpi-backup -1`). +3. Test away, please report any issues on our GitHub page. Also ensure you mention "beta branch" in your post: https://github.com/MichaIng/DietPi/issues +4. If you want to return the system to the previous restore state, run `dietpi-backup` to restore (or restore quickly with `dietpi-backup -1`). ## Steps to use the DietPi "dev" branch #### This is the active development branch. It is potentially unstable, unsupported and should not be used by end users. -1. Same as above, however, use `DEV_GITBRANCH=dev` instead. +1. Same as above, however, use `G_DEV_BRANCH dev` instead. From bc4c63cdc37ba9865ff1a3a98f5f360eecf26a00 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 10 Mar 2024 22:25:51 +0100 Subject: [PATCH 049/458] v9.2 - CHANGELOG | Add v9.2 release PR and correctly sort solved R4S issue below bug fixes --- CHANGELOG.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 388c25b22c..eb0927320b 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,10 +2,10 @@ v9.2 (2024-03-16) Enhancements: -- NanoPi R4S | Resolved an issue where Ethernet adapter of the "LAN" port could disappear after a soft reboot. Many thanks to @idaanx for reporting this issue: https://github.com/MichaIng/DietPi/issues/6342 - DietPi-Software | It is now possible to run "dietpi-software list" concurrent to other dietpi-software instances, and as non-root user. This avoids an issue in DietPi-Dashboard, where opening dietpi-software in the Terminal and switching to the Software page, caused an infinite hang. Bug fixes: +- NanoPi R4S | Resolved an issue where Ethernet adapter of the "LAN" port could disappear after a soft reboot. Many thanks to @idaanx for reporting this issue: https://github.com/MichaIng/DietPi/issues/6342 - DietPi-Globals | Resolved an issue where a concurrent DietPi script detection could have prevented the start of a script, if a previous instance was killed via SIGKILL. - DietPi-Config | Resolved an issue where a WiFi connection, configured for the first time via dietpi-config from a local terminal session, was automatically stopped when exiting or logging out from the terminal session. - DietPi-Software | PaperMC: Resolved an issue where installing the Geyser and Floodgate plugins failed due to changed download URLs, and a false syntax in the Geyser config file. Many thanks to @boterocamilo for reporting this issue: https://github.com/MichaIng/DietPi/issues/6898 @@ -14,7 +14,7 @@ Bug fixes: - DietPi-Software | DarkIce: Resolved an issue where the service failed to start due to false config file permissions. - DietPi-Software | LXQt: Resolved an issue where the installation failed on Trixie and RISC-V systems, since we did not host a config archive for those Debian versions yet. Many thanks to @jtmoon79 for reporting this issue: https://github.com/MichaIng/DietPi/issues/6939 -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/6955 ----------------------------------------------------------------------------------------------------------- From 235e755b6ed51105419a7b8635b025b62e47b737 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 12 Mar 2024 19:35:25 +0100 Subject: [PATCH 050/458] v9.2 - DietPi-Software | Update fallback URLs --- dietpi/dietpi-software | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 857792622a..a48a9bc1ac 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6501,7 +6501,7 @@ _EOF_ esac # Download - local fallback_url="https://github.com/fatedier/frp/releases/download/v0.54.0/frp_0.54.0_linux_$arch.tar.gz" + local fallback_url="https://github.com/fatedier/frp/releases/download/v0.55.1/frp_0.55.1_linux_$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/fatedier/frp/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/frp_[0-9.]*_linux_$arch\.tar\.gz\"/{print \$4}")" G_EXEC cd frp_* @@ -7425,7 +7425,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/1.10.3/komga-1.10.3.jar' + local fallback_url='https://github.com/gotson/komga/releases/download/1.10.4/komga-1.10.4.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 From 4a1e0bf84868884e9a41bed016d8febcccfa96f1 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 14 Mar 2024 17:41:48 +0100 Subject: [PATCH 051/458] v9.2 - DietPi-Software | Docker: Remove docker.io package on uninstall, installed on RISC-V (the Debian variant of the Docker package), and skip the non-existing/ancient docker-engine package instead --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index a48a9bc1ac..d8a0aaaaeb 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -13676,7 +13676,7 @@ _EOF_ Remove_Service docker # Packages, repo and key - G_AGP docker-ce docker-ce-cli docker-engine + G_AGP docker-ce docker-ce-cli docker.io [[ -f '/etc/apt/sources.list.d/docker.list' ]] && G_EXEC rm /etc/apt/sources.list.d/docker.list [[ -f '/etc/apt/trusted.gpg.d/dietpi-docker.gpg' ]] && G_EXEC rm /etc/apt/trusted.gpg.d/dietpi-docker.gpg From 0dac52bd63743da339bf7e4b3195a762311c6323 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 17 Mar 2024 02:18:46 +0100 Subject: [PATCH 052/458] v9.2 - DietPi-Patches | Bump Amiberry to v5.6.8 - DietPi-Software | Gogs/Gitea: Using repositories via SSH should now work OOTB with new installs and reinstalls. If pull or push operations via SSH fail in your case, try to give the respective user a default shell: "sudo usermod -s /bin/dash gogs" respectively "sudo usermod -s /bin/dash gitea". This is now included in our default setup. Many thanks to @din14970 for reporting this missing feature: https://github.com/MichaIng/DietPi/discussions/6964#discussioncomment-8813390 - DietPi-Config | Resolved an issue on RPi systems, where HDMI audio did not work if full KMS was enabled. The firmware/bcm2835 HDMI audio driver conflicts with the full KMS display driver, hence the VC4 HDMI driver needs to be used instead. That one however only supports the IEC958 audio format, which requires a complex ALSA config. This config is shipped with the "libasound2-data" package of the RPi APT repository, but it was overwritten by our /etc/asound.conf. For HDMI audio to work with KMS, the "default" or "sysdefault" ALSA PCM needs to be used by players. This is usually the case, but some allow to select a specific sound card, in which case the ALSA config and plugin for IEC958 conversion is bypassed, breaking HDMI audio. Many thanks to `@Lollly2997` for reporting this issue. We are working with Amiberry on a solution for Amiberry in particular. This fix is for the underlying system level: https://dietpi.com/forum/t/19568 --- .update/patches | 14 ++-- .update/version | 2 +- CHANGELOG.txt | 2 + dietpi/dietpi-software | 130 ++++++++++++++++---------------- dietpi/func/dietpi-globals | 2 +- dietpi/func/dietpi-set_hardware | 59 +++++++++------ 6 files changed, 110 insertions(+), 99 deletions(-) diff --git a/.update/patches b/.update/patches index a5cc3f36b4..737025bc6d 100755 --- a/.update/patches +++ b/.update/patches @@ -1504,13 +1504,6 @@ map $arg_v $asset_immutable { # shellcheck disable=SC2230 G_EXEC sed -i "s|, reboot, poweroff|, $(which reboot), $(which poweroff)|" /etc/sudoers.d/octoprint fi - - # Amiberry - if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[108\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' amiberry 2> /dev/null)" lt 5.6.6-dietpi1 - then - G_DIETPI-NOTIFY 2 'Preparing Amiberry upgrade to v5.6.6, including migration for RPi systems from fake KMS DispmanX to full KMS SDL2 graphics backend' - echo 108 >> /var/tmp/dietpi/dietpi-update_reinstalls - fi fi } @@ -1607,6 +1600,13 @@ Patch_9_2() G_AGI ./package.deb G_EXEC rm package.deb fi + + # Amiberry + if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[108\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' amiberry 2> /dev/null)" lt 5.6.8-dietpi1 + then + G_DIETPI-NOTIFY 2 'Preparing Amiberry upgrade to v5.6.6, including migration for RPi systems from fake KMS DispmanX to full KMS SDL2 graphics backend' + echo 108 >> /var/tmp/dietpi/dietpi-update_reinstalls + fi fi } diff --git a/.update/version b/.update/version index 85c98a4951..a19ad9e36f 100644 --- a/.update/version +++ b/.update/version @@ -3,7 +3,7 @@ # Available DietPi version G_REMOTE_VERSION_CORE=9 G_REMOTE_VERSION_SUB=2 -G_REMOTE_VERSION_RC=0 +G_REMOTE_VERSION_RC=1 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=7 G_MIN_VERSION_SUB=0 diff --git a/CHANGELOG.txt b/CHANGELOG.txt index eb0927320b..4d48b35539 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,11 +3,13 @@ v9.2 Enhancements: - DietPi-Software | It is now possible to run "dietpi-software list" concurrent to other dietpi-software instances, and as non-root user. This avoids an issue in DietPi-Dashboard, where opening dietpi-software in the Terminal and switching to the Software page, caused an infinite hang. +- DietPi-Software | Gogs/Gitea: Using repositories via SSH should now work OOTB with new installs and reinstalls. If pull or push operations via SSH fail in your case, try to give the respective user a default shell: "sudo usermod -s /bin/dash gogs" respectively "sudo usermod -s /bin/dash gitea". This is now included in our default setup. Many thanks to @din14970 for reporting this missing feature: https://github.com/MichaIng/DietPi/discussions/6964#discussioncomment-8813390 Bug fixes: - NanoPi R4S | Resolved an issue where Ethernet adapter of the "LAN" port could disappear after a soft reboot. Many thanks to @idaanx for reporting this issue: https://github.com/MichaIng/DietPi/issues/6342 - DietPi-Globals | Resolved an issue where a concurrent DietPi script detection could have prevented the start of a script, if a previous instance was killed via SIGKILL. - DietPi-Config | Resolved an issue where a WiFi connection, configured for the first time via dietpi-config from a local terminal session, was automatically stopped when exiting or logging out from the terminal session. +- DietPi-Config | Resolved an issue on RPi systems, where HDMI audio did not work if full KMS was enabled. The firmware/bcm2835 HDMI audio driver conflicts with the full KMS display driver, hence the VC4 HDMI driver needs to be used instead. That one however only supports the IEC958 audio format, which requires a complex ALSA config. This config is shipped with the "libasound2-data" package of the RPi APT repository, but it was overwritten by our /etc/asound.conf. For HDMI audio to work with KMS, the "default" or "sysdefault" ALSA PCM needs to be used by players. This is usually the case, but some allow to select a specific sound card, in which case the ALSA config and plugin for IEC958 conversion is bypassed, breaking HDMI audio. Many thanks to @Lollly2997 for reporting this issue. We are working with Amiberry on a solution for Amiberry in particular. This fix is for the underlying system level: https://dietpi.com/forum/t/19568 - DietPi-Software | PaperMC: Resolved an issue where installing the Geyser and Floodgate plugins failed due to changed download URLs, and a false syntax in the Geyser config file. Many thanks to @boterocamilo for reporting this issue: https://github.com/MichaIng/DietPi/issues/6898 - DietPi-Software | Nextcloud: Resolved an issue with the updated Nginx config where assets were served with the wrong MIME type. This fix was backported to v9.1 and a live patch offered. Many thanks to @howardroark for reporting this issue: https://dietpi.com/forum/t/nextcloud-theme-broken-after-upgrade-v9-1-1/19372 - DietPi-Software | Home Assistant: Resolved an issue on x86_64 and ARMv8 systems where some core integrations did not work if no C++ compiler was installed. If you are affected by this, "apt install g++ && systemctl restart home-assistant" will fix it. Many thanks to @pdsakurai for fixing this issue in our install code: https://github.com/MichaIng/DietPi/pull/6931 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index d8a0aaaaeb..a1cc12d8bf 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -7521,7 +7521,7 @@ _EOF_ local json=() [[ $PHP_VERSION == 8* ]] || aDEPS+=("php$PHP_VERSION-json") json=('json') - local fallback_url="https://github.com/ampache/ampache/releases/download/6.2.1/ampache-6.2.1_all_php$PHP_VERSION.zip" + local fallback_url="https://github.com/ampache/ampache/releases/download/6.3.0/ampache-6.3.0_all_php$PHP_VERSION.zip" Download_Install "$(curl -sSfL 'https://api.github.com/repos/ampache/ampache/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/ampache-[0-9\.]*_all_php$PHP_VERSION.zip\"$/{print \$4}")" ampache # Reinstall: Preserve configs from old and new paths @@ -8401,68 +8401,6 @@ Environment="SHELL=/bin/bash" "HOME=/root" ExecStart=$(command -v node) webui.js KillMode=process -[Install] -WantedBy=multi-user.target -_EOF_ - fi - - if To_Install 49 gogs # Gogs - then - # ARMv6/RISC-V: No pre-compiled binaries available, so we host our own. - if (( $G_HW_ARCH == 1 || $G_HW_ARCH == 11 )) - then - local url="https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/gogs_$G_HW_ARCH_NAME.7z" - - # Else install latest binaries from GitHub - else - case $G_HW_ARCH in - 2) local arch='armv7';; - 3) local arch='armv8';; - *) local arch='amd64';; - esac - - local fallback_url="https://github.com/gogs/gogs/releases/download/v0.13.0/gogs_0.13.0_linux_$arch.tar.gz" - local url=$(curl -sSfL 'https://api.github.com/repos/gogs/gogs/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/gogs_[^\"\/]*_linux_$arch.tar.gz\"$/{print \$4}") - fi - - Download_Install "$url" - G_EXEC mkdir -p /etc/gogs - G_EXEC mv gogs/gogs /etc/gogs/gogs - G_EXEC rm -R gogs - - # Pre-v8.14: Remove unnecessary init scripts - [[ -d '/etc/gogs/scripts' ]] && G_EXEC rm -R /etc/gogs/scripts - - # User - Create_User -d /etc/gogs gogs - - # Directories + permissions - G_EXEC mkdir -p /mnt/dietpi_userdata/gogs-repo - G_EXEC chown -R gogs:gogs /etc/gogs /mnt/dietpi_userdata/gogs-repo - - # Database - /boot/dietpi/func/create_mysql_db gogs gogs "$GLOBAL_PW" - - # Service: https://github.com/gogs/gogs/blob/main/scripts/systemd/gogs.service - cat << '_EOF_' > /etc/systemd/system/gogs.service -[Unit] -Description=Gogs (DietPi) -Wants=network-online.target -After=network-online.target mariadb.service - -[Service] -User=gogs -LogsDirectory=gogs -WorkingDirectory=/etc/gogs -ExecStart=/etc/gogs/gogs web - -# Hardening -ProtectSystem=full -PrivateDevices=yes -PrivateTmp=yes -NoNewPrivileges=true -ReadWritePaths=-/etc/gogs - [Install] WantedBy=multi-user.target _EOF_ @@ -10576,6 +10514,68 @@ WorkingDirectory=/usr/local/bin/nukkit ExecStart=/usr/bin/java -jar /usr/local/bin/nukkit/nukkit.jar SuccessExitStatus=143 +[Install] +WantedBy=multi-user.target +_EOF_ + fi + + if To_Install 49 gogs # Gogs + then + # ARMv6/RISC-V: No pre-compiled binaries available, so we host our own. + if (( $G_HW_ARCH == 1 || $G_HW_ARCH == 11 )) + then + local url="https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/gogs_$G_HW_ARCH_NAME.7z" + + # Else install latest binaries from GitHub + else + case $G_HW_ARCH in + 2) local arch='armv7';; + 3) local arch='armv8';; + *) local arch='amd64';; + esac + + local fallback_url="https://github.com/gogs/gogs/releases/download/v0.13.0/gogs_0.13.0_linux_$arch.tar.gz" + local url=$(curl -sSfL 'https://api.github.com/repos/gogs/gogs/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/gogs_[^\"\/]*_linux_$arch.tar.gz\"$/{print \$4}") + fi + + Download_Install "$url" + G_EXEC mkdir -p /etc/gogs + G_EXEC mv gogs/gogs /etc/gogs/gogs + G_EXEC rm -R gogs + + # Pre-v8.14: Remove unnecessary init scripts + [[ -d '/etc/gogs/scripts' ]] && G_EXEC rm -R /etc/gogs/scripts + + # User + Create_User -d /etc/gogs -s /bin/dash gogs + + # Directories + permissions + G_EXEC mkdir -p /mnt/dietpi_userdata/gogs-repo + G_EXEC chown -R gogs:gogs /etc/gogs /mnt/dietpi_userdata/gogs-repo + + # Database + /boot/dietpi/func/create_mysql_db gogs gogs "$GLOBAL_PW" + + # Service: https://github.com/gogs/gogs/blob/main/scripts/systemd/gogs.service + cat << '_EOF_' > /etc/systemd/system/gogs.service +[Unit] +Description=Gogs (DietPi) +Wants=network-online.target +After=network-online.target mariadb.service + +[Service] +User=gogs +LogsDirectory=gogs +WorkingDirectory=/etc/gogs +ExecStart=/etc/gogs/gogs web + +# Hardening +ProtectSystem=full +PrivateDevices=yes +PrivateTmp=yes +NoNewPrivileges=true +ReadWritePaths=-/etc/gogs + [Install] WantedBy=multi-user.target _EOF_ @@ -10590,11 +10590,11 @@ _EOF_ *) local arch='arm-6';; esac - local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.21.7/gitea-1.21.7-linux-$arch.xz" + local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.21.8/gitea-1.21.8-linux-$arch.xz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/go-gitea/gitea/releases/latest' | mawk -F\" "/\"browser_download_url\": \".*\/gitea-[^\"\/]*-linux-$arch\.xz\"/{print \$4}")" /mnt/dietpi_userdata/gitea/gitea # User - Create_User -d /mnt/dietpi_userdata/gitea gitea + Create_User -d /mnt/dietpi_userdata/gitea -s /bin/dash gitea # Permissions G_EXEC chown -R gitea:gitea /mnt/dietpi_userdata/gitea diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 76d0b380f3..6f50841fce 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -55,7 +55,7 @@ # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=9 [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=2 - [[ $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 diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index 597bf3b683..42b75dc796 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -609,7 +609,7 @@ _EOF_ # Fake KMS supports CMA params only [[ $params ]] && params=$(mawk -F, '{for(i=1; i<=NF; i++) {if($i~/^cma-*/){print $i;exit}}}' <<< "$params") else - # Disable full KMS HDMI audio if onboard HDMI is disabled + # Disable VC4 HDMI audio if onboard HDMI is disabled [[ $params != *',noaudio'* ]] && { ! grep -q '^[[:blank:]]*dtparam=audio=on' /boot/config.txt || grep -Eq '(^|[[:blank:]])snd_bcm2835.enable_hdmi=0([[:blank:]]|$)' /boot/cmdline.txt; } && params+=',noaudio' fi @@ -1725,7 +1725,7 @@ _EOF_ # Remove kernel module options G_EXEC sed --follow-symlinks -Ei '/root=/s/[[:blank:]]*snd_bcm2835.enable_[^[:blank:]]*([[:blank:]]*$)?//g' /boot/cmdline.txt - # Disable full KMS HDMI audio + # Disable VC4 HDMI audio local kms=$(grep -Em1 '^[[:blank:]]*dtoverlay=vc4-kms-v3d(-pi4)?(,|$)' /boot/config.txt) [[ $kms && ! $kms =~ ',noaudio'(,|$) ]] && G_EXEC sed --follow-symlinks -Ei '/^[[:blank:]]*dtoverlay=vc4-kms-v3d(-pi4)?(,|$)/s/$/,noaudio/' /boot/config.txt @@ -1943,33 +1943,42 @@ _EOF_ # rpi-bcm2835-hdmi 'rpi-bcm2835-'*) - # Remove blacklist for onboard audio kernel module - G_EXEC rm /etc/modprobe.d/dietpi-disable_rpi_audio.conf - - # Enable onboard audio - G_CONFIG_INJECT 'dtparam=audio=' 'dtparam=audio=on' /boot/config.txt - - # Force 3.5mm output? - if [[ $INPUT_DEVICE_VALUE == *'3.5mm' ]] - then - # Disable HDMI audio via kernel module option - G_EXEC sed --follow-symlinks -i '/root=/s/$/ snd_bcm2835.enable_hdmi=0/' /boot/cmdline.txt - - # Force HDMI output? - elif [[ $INPUT_DEVICE_VALUE == *'hdmi' ]] + # Enable VC4 HDMI audio if onboard HDMI is enabled and KMS used, as the bcm2835 HDMI audio driver and KMS conflict: https://dietpi.com/forum/t/19568, https://github.com/raspberrypi/linux/issues/4651 + if [[ $INPUT_DEVICE_VALUE != *'3.5mm' ]] && grep -Eq '^[[:blank:]]*dtoverlay=vc4-kms-v3d(-pi4)?,(noaudio|.+,noaudio)(,|$)' /boot/config.txt then - # Disable headphones via kernel module option - G_EXEC sed --follow-symlinks -i '/root=/s/$/ snd_bcm2835.enable_headphones=0/' /boot/cmdline.txt - # Force HDMI audio via config.txt option - G_CONFIG_INJECT 'hdmi_drive=' 'hdmi_drive=2' /boot/config.txt - (( $G_HW_MODEL > 3 )) && G_CONFIG_INJECT 'hdmi_drive:1=' 'hdmi_drive:1=2' /boot/config.txt 'hdmi_drive=' + G_EXEC sed --follow-symlinks -Ei '/^[[:blank:]]*dtoverlay=vc4-kms-v3d(-pi4)?,/s/,noaudio(,|$)/\1/' /boot/config.txt fi - # Enable full KMS HDMI audio if onboard HDMI is not disabled - if [[ $INPUT_DEVICE_VALUE != *'3.5mm' ]] + # Enable bcm2835 audio driver if 3.5mm is enabled or no VC4 used + if [[ $INPUT_DEVICE_VALUE != *'hdmi' ]] || ! grep -Eq '^[[:blank:]]*dtoverlay=vc4-kms-v3d(-pi4)?(,|$)' /boot/config.txt then - local kms=$(grep -Em1 '^[[:blank:]]*dtoverlay=vc4-kms-v3d(-pi4)?,(noaudio|.+,noaudio)(,|$)' /boot/config.txt) - [[ $kms ]] && G_EXEC sed --follow-symlinks -Ei '/^[[:blank:]]*dtoverlay=vc4-kms-v3d(-pi4)?,/s/,noaudio(,|$)/\1/' /boot/config.txt + # Remove blacklist for bcm2835 audio kernel module + G_EXEC rm /etc/modprobe.d/dietpi-disable_rpi_audio.conf + + # Enable bcm2835 audio via device tree parameter + G_CONFIG_INJECT 'dtparam=audio=' 'dtparam=audio=on' /boot/config.txt + + # Force 3.5mm output? + if [[ $INPUT_DEVICE_VALUE == *'3.5mm' ]] + then + # Disable HDMI audio via kernel module option + G_EXEC sed --follow-symlinks -i '/root=/s/$/ snd_bcm2835.enable_hdmi=0/' /boot/cmdline.txt + + # Force HDMI output? + elif [[ $INPUT_DEVICE_VALUE == *'hdmi' ]] + then + # Disable headphones via kernel module option + G_EXEC sed --follow-symlinks -i '/root=/s/$/ snd_bcm2835.enable_headphones=0/' /boot/cmdline.txt + + # Force HDMI audio via config.txt option + G_CONFIG_INJECT 'hdmi_drive=' 'hdmi_drive=2' /boot/config.txt + (( $G_HW_MODEL > 3 )) && G_CONFIG_INJECT 'hdmi_drive:1=' 'hdmi_drive:1=2' /boot/config.txt 'hdmi_drive=' + fi + + # If only VC4 HDMI audio is used, return here to skip /etc/asound.conf generation and remove potential root user config: https://dietpi.com/forum/t/19568 + else + [[ -f '/root/.asoundrc' ]] && G_EXEC rm /root/.asoundrc + return 0 fi ;; From 0c4116aa3c575ed960a161261fad47b471a46884 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Carvalho?= Date: Sun, 17 Mar 2024 02:39:45 +0100 Subject: [PATCH 053/458] v9.2 (#6844) - DietPi-Banner | Support for showing the current RAM usage was added. Many thanks to @Andr3Carvalh0 for the implementation: https://github.com/MichaIng/DietPi/pull/6844 --- CHANGELOG.txt | 1 + dietpi/func/dietpi-banner | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 4d48b35539..3d333f37e3 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,6 +2,7 @@ v9.2 (2024-03-16) Enhancements: +- DietPi-Banner | Support for showing the current RAM usage was added. Many thanks to @Andr3Carvalh0 for the implementation: https://github.com/MichaIng/DietPi/pull/6844 - DietPi-Software | It is now possible to run "dietpi-software list" concurrent to other dietpi-software instances, and as non-root user. This avoids an issue in DietPi-Dashboard, where opening dietpi-software in the Terminal and switching to the Software page, caused an infinite hang. - DietPi-Software | Gogs/Gitea: Using repositories via SSH should now work OOTB with new installs and reinstalls. If pull or push operations via SSH fail in your case, try to give the respective user a default shell: "sudo usermod -s /bin/dash gogs" respectively "sudo usermod -s /bin/dash gitea". This is now included in our default setup. Many thanks to @din14970 for reporting this missing feature: https://github.com/MichaIng/DietPi/discussions/6964#discussioncomment-8813390 diff --git a/dietpi/func/dietpi-banner b/dietpi/func/dietpi-banner index c77958bc4b..e119656403 100755 --- a/dietpi/func/dietpi-banner +++ b/dietpi/func/dietpi-banner @@ -57,14 +57,15 @@ 'Large hostname' 'Print credits' 'Let'\''s Encrypt cert status' + 'RAM usage' ) # Set defaults: Disable CPU temp by default in VMs if (( $G_HW_MODEL == 20 )) then - aENABLED=(1 0 0 0 0 1 0 1 0 0 0 1 1 0 0 1 0) + aENABLED=(1 0 0 0 0 1 0 1 0 0 0 1 1 0 0 1 0 0) else - aENABLED=(1 0 1 0 0 1 0 0 0 0 0 1 1 0 0 1 0) + aENABLED=(1 0 1 0 0 1 0 0 0 0 0 1 1 0 0 1 0 0) fi COLOUR_RESET='\e[0m' @@ -237,6 +238,8 @@ $GREEN_LINE" (( ${aENABLED[1]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[1]} $GREEN_SEPARATOR $(uptime -p 2>&1)" # CPU temp (( ${aENABLED[2]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[2]} $GREEN_SEPARATOR $(print_full_info=1 G_OBTAIN_CPU_TEMP 2>&1)" + # RAM usage + (( ${aENABLED[17]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[17]} $GREEN_SEPARATOR $(free -b | mawk 'NR==2 {CONVFMT="%.0f"; print $3/1024^2" of "$2/1024^2" MiB ("$3/$2*100"%)"}')" # Hostname (( ${aENABLED[3]} == 1 && ${aENABLED[14]} != 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[3]} $GREEN_SEPARATOR $( Date: Sun, 17 Mar 2024 02:40:43 +0100 Subject: [PATCH 054/458] v9.2 - DietPi-Software | rutorrent: Update fallback version --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index a1cc12d8bf..4bab90acda 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8514,7 +8514,7 @@ _EOF_ # Install ruTorrent: Web UI for rTorrent # - Grab current version local version=$(curl -sSfL 'https://api.github.com/repos/Novik/ruTorrent/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}') - [[ $version ]] || { version='v4.2.10'; G_DIETPI-NOTIFY 1 "Automatic latest ruTorrent version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } + [[ $version ]] || { version='v4.2.11'; G_DIETPI-NOTIFY 1 "Automatic latest ruTorrent version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } Download_Install "https://github.com/Novik/ruTorrent/archive/$version.tar.gz" # - Reinstall freshly with preserved configs and 3rd party plugins From 3d6f598ff8518b16be6e113900565de36d1c7f5e Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 17 Mar 2024 02:51:38 +0100 Subject: [PATCH 055/458] v9.2 - DietPi-Patches | Fix Amiberry update text --- .update/patches | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.update/patches b/.update/patches index 737025bc6d..9083c42eef 100755 --- a/.update/patches +++ b/.update/patches @@ -1604,7 +1604,7 @@ Patch_9_2() # Amiberry if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[108\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' amiberry 2> /dev/null)" lt 5.6.8-dietpi1 then - G_DIETPI-NOTIFY 2 'Preparing Amiberry upgrade to v5.6.6, including migration for RPi systems from fake KMS DispmanX to full KMS SDL2 graphics backend' + G_DIETPI-NOTIFY 2 'Preparing Amiberry upgrade to v5.6.8' echo 108 >> /var/tmp/dietpi/dietpi-update_reinstalls fi fi From 316ec0aeb1201e5fe4a80a75691608fb12c39e33 Mon Sep 17 00:00:00 2001 From: StephanStS Date: Tue, 19 Mar 2024 09:03:32 +0100 Subject: [PATCH 056/458] Init v9.3 (#6972) --- .meta/dietpi-survey_report | 3 ++- .update/version | 4 ++-- CHANGELOG.txt | 13 +++++++++++++ dietpi/func/dietpi-globals | 4 ++-- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index 4e5e3b3ccc..c601631b40 100755 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -712,10 +712,11 @@ shopt -s extglob aSOFTWARE_NAME9_0[i]=${aSOFTWARE_NAME8_25[i]} aSOFTWARE_NAME9_1[i]=${aSOFTWARE_NAME9_0[i]} aSOFTWARE_NAME9_2[i]=${aSOFTWARE_NAME9_1[i]} + aSOFTWARE_NAME9_3[i]=${aSOFTWARE_NAME9_2[i]} done # Pre-create software counter array so that we can see also software (available in newest version) with 0 installs - for i in "${aSOFTWARE_NAME9_2[@]}" + for i in "${aSOFTWARE_NAME9_3[@]}" do aSOFTWARE[$i]=0 done diff --git a/.update/version b/.update/version index a19ad9e36f..42b0f6b092 100644 --- a/.update/version +++ b/.update/version @@ -2,8 +2,8 @@ # shellcheck disable=SC2034 # Available DietPi version G_REMOTE_VERSION_CORE=9 -G_REMOTE_VERSION_SUB=2 -G_REMOTE_VERSION_RC=1 +G_REMOTE_VERSION_SUB=3 +G_REMOTE_VERSION_RC=-1 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=7 G_MIN_VERSION_SUB=0 diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 3d333f37e3..6a9676e03e 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,16 @@ +v9.3 +(2024-04-13) + +New images: + +Enhancements: + +Bug fixes: + +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 + +----------------------------------------------------------------------------------------------------------- + v9.2 (2024-03-16) diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 6f50841fce..7b6c58de0b 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -54,8 +54,8 @@ [[ -f '/boot/dietpi/.version' ]] && . /boot/dietpi/.version # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=9 - [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=2 - [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=1 + [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=3 + [[ $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 From cbf29a01572927b7e0245c94a75c1b5e8edebc27 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 22 Mar 2024 19:27:09 +0800 Subject: [PATCH 057/458] v9.3 - DietPi-Software | Update fallback URLs --- dietpi/dietpi-software | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 4bab90acda..0c18cc3b54 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6501,7 +6501,7 @@ _EOF_ esac # Download - local fallback_url="https://github.com/fatedier/frp/releases/download/v0.55.1/frp_0.55.1_linux_$arch.tar.gz" + local fallback_url="https://github.com/fatedier/frp/releases/download/v0.56.0/frp_0.56.0_linux_$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/fatedier/frp/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/frp_[0-9.]*_linux_$arch\.tar\.gz\"/{print \$4}")" G_EXEC cd frp_* @@ -8176,7 +8176,7 @@ _EOF_ # APT deps: https://github.com/sabre-io/Baikal/wiki/Baïkal-dependencies aDEPS=("php$PHP_VERSION-xml" "php$PHP_VERSION-mbstring" "php$PHP_VERSION-mysql") - local fallback_url='https://github.com/sabre-io/Baikal/releases/download/0.9.3/baikal-0.9.3.zip' + local fallback_url='https://github.com/sabre-io/Baikal/releases/download/0.9.5/baikal-0.9.5.zip' Download_Install "$(curl -sSfL 'https://api.github.com/repos/sabre-io/Baikal/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/baikal-[^"\/]*\.zip"$/{print $4}')" # Reinstall: https://sabre.io/baikal/upgrade/ @@ -9951,7 +9951,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.13.3.4273/Prowlarr.master.1.13.3.4273.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.14.3.4333/Prowlarr.master.1.14.3.4333.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Prowlarr/Prowlarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}")" G_EXEC mv Prowlarr /opt/prowlarr fi @@ -10590,7 +10590,7 @@ _EOF_ *) local arch='arm-6';; esac - local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.21.8/gitea-1.21.8-linux-$arch.xz" + local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.21.9/gitea-1.21.9-linux-$arch.xz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/go-gitea/gitea/releases/latest' | mawk -F\" "/\"browser_download_url\": \".*\/gitea-[^\"\/]*-linux-$arch\.xz\"/{print \$4}")" /mnt/dietpi_userdata/gitea/gitea # User From 380305096c6b35b4e494b4b8af399c5efa52ebcc Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 22 Mar 2024 20:20:59 +0800 Subject: [PATCH 058/458] v9.3 - DietPi-Installer | Since Armbian dropped Bullseye support, the related APT package lists are empty. Use the Bookworm suite instead, which works well since kernel and firmware are Debian-verison-agnostic. Apply a related pre-patch, and re-assure that only kernel and firmware packages are pulled form this repo - DietPi-Patches/Pre-patches | Follow symlinks consistently with all sed calls --- .build/images/dietpi-installer | 2 +- .update/patches | 8 ++++---- .update/pre-patches | 26 +++++++++++++++++++++++--- 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 7254702d51..9c0b8d9a9e 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1037,7 +1037,7 @@ _EOF_ # Remove obsolete lists G_EXEC rm -Rf /etc/apt/sources.list.d/* # Add Armbian repository - G_EXEC eval "echo 'deb https://apt.armbian.com/ $DISTRO_TARGET_NAME main' > /etc/apt/sources.list.d/dietpi-armbian.list" + G_EXEC eval "echo 'deb https://apt.armbian.com/ ${DISTRO_TARGET_NAME/bullseye/bookworm} main' > /etc/apt/sources.list.d/dietpi-armbian.list" # Update APT lists G_AGUP # Install kernel, device tree, U-Boot, firmware and initramfs packages diff --git a/.update/patches b/.update/patches index 9083c42eef..f59836fc21 100755 --- a/.update/patches +++ b/.update/patches @@ -1494,7 +1494,7 @@ map $arg_v $asset_immutable { if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[163\]=2' /boot/dietpi/.installed && grep -q ' -f -I ' /etc/default/gmediarender then G_DIETPI-NOTIFY 2 'Fixing default GMediaRender command arguments' - G_EXEC sed -i "s/ -f -I / -f $HOSTNAME -I /" /etc/default/gmediarender + G_EXEC sed --follow-symlinks -i "s/ -f -I / -f $HOSTNAME -I /" /etc/default/gmediarender fi # OctoPrint: https://github.com/MichaIng/DietPi/issues/6915 @@ -1502,7 +1502,7 @@ map $arg_v $asset_immutable { then G_DIETPI-NOTIFY 2 'Fixing OctoPrint sudoers rule' # shellcheck disable=SC2230 - G_EXEC sed -i "s|, reboot, poweroff|, $(which reboot), $(which poweroff)|" /etc/sudoers.d/octoprint + G_EXEC sed --follow-symlinks -i "s|, reboot, poweroff|, $(which reboot), $(which poweroff)|" /etc/sudoers.d/octoprint fi fi } @@ -1559,7 +1559,7 @@ Patch_9_2() if [[ -f '/etc/nginx/sites-dietpi/dietpi-nextcloud.conf' ]] && ! grep -q 'include mime.types;' /etc/nginx/sites-dietpi/dietpi-nextcloud.conf then G_DIETPI-NOTIFY 2 'Fixing Nextclound Nginx config ...' - G_EXEC sed -i '/types {/i\\tinclude mime.types;' /etc/nginx/sites-dietpi/dietpi-nextcloud.conf + G_EXEC sed --follow-symlinks -i '/types {/i\\tinclude mime.types;' /etc/nginx/sites-dietpi/dietpi-nextcloud.conf fi # PaperMC @@ -1573,7 +1573,7 @@ Patch_9_2() if [[ -f '/mnt/dietpi_userdata/papermc/plugins/Geyser-Spigot/config.yml' ]] && grep -q '^auth-type: floodgate' /mnt/dietpi_userdata/papermc/plugins/Geyser-Spigot/config.yml then G_DIETPI-NOTIFY 2 'Fixing Geyser plugin config ...' - G_EXEC sed -i 's/^auth-type: floodgate/ auth-type: floodgate/' /mnt/dietpi_userdata/papermc/plugins/Geyser-Spigot/config.yml + G_EXEC sed --follow-symlinks -i 's/^auth-type: floodgate/ auth-type: floodgate/' /mnt/dietpi_userdata/papermc/plugins/Geyser-Spigot/config.yml fi fi diff --git a/.update/pre-patches b/.update/pre-patches index baf5c0d323..de6302c9bb 100755 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -369,9 +369,9 @@ then if (( $G_HW_MODEL < 10 || ( $G_HW_MODEL == 75 && ${G_RASPBIAN:-0} == 1 ) )) then G_DIETPI-NOTIFY 2 'Migrating from raspberrypi.org to raspberrypi.com' - G_EXEC sed -i 's/raspberrypi.org/raspberrypi.com/' /etc/apt/sources.list /boot/dietpi.txt - find /etc/apt/sources.list.d/* &> /dev/null && G_EXEC sed -i 's/raspberrypi.org/raspberrypi.com/' /etc/apt/sources.list.d/*.list - find /etc/apt/preferences.d/* &> /dev/null && G_EXEC sed -i 's/raspberrypi.org/raspberrypi.com/' /etc/apt/preferences.d/* + G_EXEC sed --follow-symlinks -i 's/raspberrypi.org/raspberrypi.com/' /etc/apt/sources.list /boot/dietpi.txt + find /etc/apt/sources.list.d/* &> /dev/null && G_EXEC sed --follow-symlinks -i 's/raspberrypi.org/raspberrypi.com/' /etc/apt/sources.list.d/*.list + find /etc/apt/preferences.d/* &> /dev/null && G_EXEC sed --follow-symlinks -i 's/raspberrypi.org/raspberrypi.com/' /etc/apt/preferences.d/* fi GITBRANCH_TARGET=$(sed -n '/^[[:blank:]]*DEV_GITBRANCH=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) GITBRANCH_TARGET=${GITBRANCH_TARGET:-master} @@ -392,5 +392,25 @@ then fi fi +# v9.3 +if (( $G_DIETPI_VERSION_CORE < 9 || ( $G_DIETPI_VERSION_CORE == 9 && $G_DIETPI_VERSION_SUB < 3 ) )) +then + # Update APT repo on Bullseye systems to Bookworm, but re-assure only kernel and firmware packages are pulled form it. Armbian dropped Bullseye support + if [[ $G_DISTRO == 6 && -f '/etc/apt/sources.list.d/dietpi-armbian.list' ]] + then + G_DIETPI-NOTIFY 2 'Moving EOL Armbian Bullseye repo to Bookworm for Debian-version-agnostic firmware and kernel upgrades' + cat << '_EOF_' > /etc/apt/preferences.d/dietpi-armbian +Package: * +Pin: origin apt.armbian.com +Pin-Priority: -1 + +Package: armbian-firmware* linux-* +Pin: origin apt.armbian.com +Pin-Priority: 500 +_EOF_ + G_EXEC sed --follow-symlinks -i 's/bullseye/bookworm/g' /etc/apt/sources.list.d/dietpi-armbian.list + fi +fi + exit 0 } From 43b8bd7b9690015b7ede9e3bf7f2501a13470b1e Mon Sep 17 00:00:00 2001 From: wiedehopf Date: Wed, 27 Mar 2024 13:17:01 +0100 Subject: [PATCH 059/458] v9.3 (#6988) - DietPi-Login | Log dietpi-update incl. network check, time sync and version check results from dietpi-update on first login, to enhance debug abilities in automated first run setup cases. This is not includes in /var/log/dietpi-update.log, but since it is the very first network check and time sync (state check) done, it is crucial for everything else. --- dietpi/dietpi-login | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-login b/dietpi/dietpi-login index f23b2cdadc..7d1d685c4d 100755 --- a/dietpi/dietpi-login +++ b/dietpi/dietpi-login @@ -185,7 +185,7 @@ Please login again as user "root" with password "dietpi", respectively the one y if (( $G_DIETPI_INSTALL_STAGE == 0 )); then # Start DietPi-Update - /boot/dietpi/dietpi-update 1 # Sets /boot/dietpi/.install_stage > G_DIETPI_INSTALL_STAGE=1 + /boot/dietpi/dietpi-update 1 2>&1 | tee "$FP_DIETPI_FIRSTRUNSETUP_LOG" # Sets /boot/dietpi/.install_stage > G_DIETPI_INSTALL_STAGE=1 # Prompt on failure (( $(&1 | tee "$FP_DIETPI_FIRSTRUNSETUP_LOG" # Sets /boot/dietpi/.install_stage > G_DIETPI_INSTALL_STAGE=2 + /boot/dietpi/dietpi-software 2>&1 | tee -a "$FP_DIETPI_FIRSTRUNSETUP_LOG" # Sets /boot/dietpi/.install_stage > G_DIETPI_INSTALL_STAGE=2 # Prompt on failure (( $( Date: Fri, 29 Mar 2024 13:19:16 +0100 Subject: [PATCH 060/458] v9.3 - DietPi-Software | Logitech Media Server: Resolved an issue where the install failed due to a changed download URL. Many thanks to @JRK0469 for reporting this issue: https://github.com/MichaIng/DietPi/issues/6992 --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 6a9676e03e..6fb392cf24 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -6,6 +6,7 @@ New images: Enhancements: Bug fixes: +- DietPi-Software | Logitech Media Server: Resolved an issue where the install failed due to a changed download URL. Many thanks to @JRK0469 for reporting this issue: https://github.com/MichaIng/DietPi/issues/6992 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 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 0c18cc3b54..bda49d9e62 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6990,8 +6990,8 @@ _EOF_ (( $G_HW_ARCH == 10 )) && arch='amd64' # Grab latest package URL - local fallback_url="https://downloads.slimdevices.com/nightly/logitechmediaserver_8.3.2~1702911674_$arch.deb" - Download_Install "$(curl -sSf 'https://lms-community.github.io/lms-server-repository/stable.xml' | grep -om1 "https://[^\"]*_$arch.deb")" + local fallback_url="https://downloads.lms-community.org/nightly/logitechmediaserver_8.5.1~1711624004_$arch.deb" + Download_Install "$(curl -sSf 'https://raw.githubusercontent.com/LMS-Community/lms-server-repository/master/stable.xml' | grep -om1 "https://[^\"]*_$arch.deb")" G_EXEC systemctl stop logitechmediaserver Remove_SysV logitechmediaserver From d885efcf3c4234da08219a4aa6a562829f75d958 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 29 Mar 2024 13:37:31 +0100 Subject: [PATCH 061/458] v9.3 - DietPi-Software | Update fallback URLs --- dietpi/dietpi-software | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index bda49d9e62..d341a25ceb 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -7521,7 +7521,7 @@ _EOF_ local json=() [[ $PHP_VERSION == 8* ]] || aDEPS+=("php$PHP_VERSION-json") json=('json') - local fallback_url="https://github.com/ampache/ampache/releases/download/6.3.0/ampache-6.3.0_all_php$PHP_VERSION.zip" + local fallback_url="https://github.com/ampache/ampache/releases/download/6.3.1/ampache-6.3.1_all_php$PHP_VERSION.zip" Download_Install "$(curl -sSfL 'https://api.github.com/repos/ampache/ampache/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/ampache-[0-9\.]*_all_php$PHP_VERSION.zip\"$/{print \$4}")" ampache # Reinstall: Preserve configs from old and new paths @@ -9951,7 +9951,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.14.3.4333/Prowlarr.master.1.14.3.4333.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.15.0.4361/Prowlarr.master.1.15.0.4361.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Prowlarr/Prowlarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}")" G_EXEC mv Prowlarr /opt/prowlarr fi @@ -10026,7 +10026,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.20.2452/Readarr.develop.0.3.20.2452.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.21.2475/Readarr.develop.0.3.21.2475.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Readarr/Readarr/releases' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}" | head -1)" G_EXEC mv Readarr /opt/readarr fi @@ -10590,7 +10590,7 @@ _EOF_ *) local arch='arm-6';; esac - local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.21.9/gitea-1.21.9-linux-$arch.xz" + local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.21.10/gitea-1.21.10-linux-$arch.xz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/go-gitea/gitea/releases/latest' | mawk -F\" "/\"browser_download_url\": \".*\/gitea-[^\"\/]*-linux-$arch\.xz\"/{print \$4}")" /mnt/dietpi_userdata/gitea/gitea # User From afe0074a0e64c6c46b3ccff5166ed87c02de9b8d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 1 Apr 2024 18:16:19 +0200 Subject: [PATCH 062/458] v9.3 - DietPi-Config | Removed the 3.5mm audio option on Raspberry Pi 5, as it does not have a 3.5mm jack. Additionally, the KMS graphics driver is enabled OOTB when HDMI audio is selected, as the snd_bcm2835 driver does not work on Raspberry Pi 5. Many thanks to `@JRK0469` for making us aware of this: https://dietpi.com/forum/t/19760 - Raspberry Pi 5 | Fixed X11/desktop startup if KMS is enabled. Many thanks to `@denguido` for reporting the issue and solution: https://dietpi.com/forum/t/19760 --- CHANGELOG.txt | 2 + dietpi/dietpi-config | 95 ++++++++++++++++----------------- dietpi/dietpi-software | 34 +++++++----- dietpi/func/dietpi-set_hardware | 20 ++++++- 4 files changed, 88 insertions(+), 63 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 6fb392cf24..fb0d04eb11 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,8 +4,10 @@ v9.3 New images: Enhancements: +- DietPi-Config | Removed the 3.5mm audio option on Raspberry Pi 5, as it does not have a 3.5mm jack. Additionally, the KMS graphics driver is enabled OOTB when HDMI audio is selected, as the snd_bcm2835 driver does not work on Raspberry Pi 5. Many thanks to @JRK0469 for making us aware of this: https://dietpi.com/forum/t/19760 Bug fixes: +- Raspberry Pi 5 | Fixed X11/desktop startup if KMS is enabled. Many thanks to @denguido for reporting the issue and solution: https://dietpi.com/forum/t/19760 - DietPi-Software | Logitech Media Server: Resolved an issue where the install failed due to a changed download URL. Many thanks to @JRK0469 for reporting this issue: https://github.com/MichaIng/DietPi/issues/6992 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 diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index e93be67e13..e586907567 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -3442,39 +3442,41 @@ Additional benchmarks: # RPi if (( $G_HW_MODEL < 10 )); then - G_WHIP_MENU_ARRAY+=('rpi-bcm2835-auto' ': Onboard HDMI if plugged, else 3.5mm') - G_WHIP_MENU_ARRAY+=('rpi-bcm2835-3.5mm' ': Onboard 3.5mm output') - G_WHIP_MENU_ARRAY+=('rpi-bcm2835-hdmi' ': Onboard HDMI output') - G_WHIP_MENU_ARRAY+=('allo-boss-dac-pcm512x-audio' ': Allo Boss DAC') - G_WHIP_MENU_ARRAY+=('allo-boss2-dac-audio' ': Allo Boss2 DAC') - G_WHIP_MENU_ARRAY+=('allo-digione' ': Allo DigiOne') - G_WHIP_MENU_ARRAY+=('allo-katana-dac-audio' ': Allo Katana DAC') - G_WHIP_MENU_ARRAY+=('allo-piano-dac-pcm512x-audio' ': Allo Piano DAC') - G_WHIP_MENU_ARRAY+=('allo-piano-dac-plus-pcm512x-audio' ': Allo Piano DAC 2.1') - G_WHIP_MENU_ARRAY+=('applepi-dac' ': ApplePi DAC (Orchard Audio)') - G_WHIP_MENU_ARRAY+=('dionaudio-loco' ': Dion Audio LOCO') - G_WHIP_MENU_ARRAY+=('dionaudio-loco-v2' ': Dion Audio LOCO V2') - G_WHIP_MENU_ARRAY+=('googlevoicehat-soundcard' ': Google AIY voice kit') - G_WHIP_MENU_ARRAY+=('hifiberry-amp' ': HifiBerry AMP / AMP+') - G_WHIP_MENU_ARRAY+=('hifiberry-dac' ': HifiBerry DAC / MiniAMP') - G_WHIP_MENU_ARRAY+=('hifiberry-dacplus' ': HifiBerry DAC+ / DAC+ Pro / AMP2') - G_WHIP_MENU_ARRAY+=('hifiberry-dacplusadc' ': HifiBerry DAC+ADC') - G_WHIP_MENU_ARRAY+=('hifiberry-dacplusadcpro' ': HifiBerry DAC+ADC Pro') - G_WHIP_MENU_ARRAY+=('hifiberry-dacplusdsp' ': HifiBerry DAC+DSP') - G_WHIP_MENU_ARRAY+=('hifiberry-dacplushd' ': HifiBerry DAC+ HD') - G_WHIP_MENU_ARRAY+=('hifiberry-digi' ': HifiBerry Digi / Digi+') - G_WHIP_MENU_ARRAY+=('hifiberry-digi-pro' ': HifiBerry Digi+ Pro') - G_WHIP_MENU_ARRAY+=('i-sabre-q2m' ': AudioPhonics I-Sabre ES9028Q2M / ES9038Q2M') - G_WHIP_MENU_ARRAY+=('iqaudio-codec' ': IQaudIO Pi-Codec HAT') - G_WHIP_MENU_ARRAY+=('iqaudio-dac' ': IQaudIO DAC audio card') - G_WHIP_MENU_ARRAY+=('iqaudio-dacplus' ': Pi-DAC+, Pi-DACZero, Pi-DAC+ Pro, Pi-DigiAMP+') - G_WHIP_MENU_ARRAY+=('iqaudio-digi-wm8804-audio' ': Pi-Digi+') - G_WHIP_MENU_ARRAY+=('iqaudio-dacplus,auto_mute_amp' ': Pi-DigiAMP+') - G_WHIP_MENU_ARRAY+=('iqaudio-dacplus,unmute_amp' ': Pi-DigiAMP+') - G_WHIP_MENU_ARRAY+=('justboom-dac' ': JustBoom: DAC HAT, Amp HAT, DAC Zero and Amp Zero') - G_WHIP_MENU_ARRAY+=('justboom-digi' ': JustBoom: Digi HAT and Digi Zero') - G_WHIP_MENU_ARRAY+=('justboom-both' ': JustBoom: Simultaneous DAC and Digi usage') - G_WHIP_MENU_ARRAY+=('rpi-dac' ': Soekris DAM1021 (pcm1794a)') + # RPi 5 has no 3.5mm jack: https://dietpi.com/forum/t/19760 + (( $G_HW_MODEL == 5 )) || G_WHIP_MENU_ARRAY+=('rpi-bcm2835-auto' ': Onboard HDMI if plugged, else 3.5mm' 'rpi-bcm2835-3.5mm' ': Onboard 3.5mm output') + G_WHIP_MENU_ARRAY+=( + 'rpi-bcm2835-hdmi' ': Onboard HDMI output' + 'allo-boss-dac-pcm512x-audio' ': Allo Boss DAC' + 'allo-boss2-dac-audio' ': Allo Boss2 DAC' + 'allo-digione' ': Allo DigiOne' + 'allo-katana-dac-audio' ': Allo Katana DAC' + 'allo-piano-dac-pcm512x-audio' ': Allo Piano DAC' + 'allo-piano-dac-plus-pcm512x-audio' ': Allo Piano DAC 2.1' + 'applepi-dac' ': ApplePi DAC (Orchard Audio)' + 'dionaudio-loco' ': Dion Audio LOCO' + 'dionaudio-loco-v2' ': Dion Audio LOCO V2' + 'googlevoicehat-soundcard' ': Google AIY voice kit' + 'hifiberry-amp' ': HifiBerry AMP / AMP+' + 'hifiberry-dac' ': HifiBerry DAC / MiniAMP' + 'hifiberry-dacplus' ': HifiBerry DAC+ / DAC+ Pro / AMP2' + 'hifiberry-dacplusadc' ': HifiBerry DAC+ADC' + 'hifiberry-dacplusadcpro' ': HifiBerry DAC+ADC Pro' + 'hifiberry-dacplusdsp' ': HifiBerry DAC+DSP' + 'hifiberry-dacplushd' ': HifiBerry DAC+ HD' + 'hifiberry-digi' ': HifiBerry Digi / Digi+' + 'hifiberry-digi-pro' ': HifiBerry Digi+ Pro' + 'i-sabre-q2m' ': AudioPhonics I-Sabre ES9028Q2M / ES9038Q2M' + 'iqaudio-codec' ': IQaudIO Pi-Codec HAT' + 'iqaudio-dac' ': IQaudIO DAC audio card' + 'iqaudio-dacplus' ': Pi-DAC+, Pi-DACZero, Pi-DAC+ Pro, Pi-DigiAMP+' + 'iqaudio-digi-wm8804-audio' ': Pi-Digi+' + 'iqaudio-dacplus,auto_mute_amp' ': Pi-DigiAMP+' + 'iqaudio-dacplus,unmute_amp' ': Pi-DigiAMP+' + 'justboom-dac' ': JustBoom: DAC HAT, Amp HAT, DAC Zero and Amp Zero' + 'justboom-digi' ': JustBoom: Digi HAT and Digi Zero' + 'justboom-both' ': JustBoom: Simultaneous DAC and Digi usage' + 'rpi-dac' ': Soekris DAM1021 (pcm1794a)' + ) # Odroid C1/C2 legacy image elif [[ $G_HW_MODEL == 1[12] ]]; then @@ -3486,42 +3488,39 @@ Additional benchmarks: # NanoPi M2/M3 elif [[ $G_HW_MODEL == 6[12] ]]; then - G_WHIP_MENU_ARRAY+=('default' ': 3.5mm Analogue') - G_WHIP_MENU_ARRAY+=('s5pxx18-hdmi' ': HDMI') + G_WHIP_MENU_ARRAY+=('default' ': 3.5mm Analogue' 's5pxx18-hdmi' ': HDMI') # H3 elif (( $G_HW_CPUID == 1 )); then - G_WHIP_MENU_ARRAY+=('default' ': HDMI') - G_WHIP_MENU_ARRAY+=('h3-analogue' ': 3.5mm Analogue') + G_WHIP_MENU_ARRAY+=('default' ': HDMI' 'h3-analogue' ': 3.5mm Analogue') # Sparky SBC elif (( $G_HW_MODEL == 70 )); then - G_WHIP_MENU_ARRAY+=('default' ': HDMI') - G_WHIP_MENU_ARRAY+=('snd-soc-allo-piano-dac' ': Allo Piano DAC') - G_WHIP_MENU_ARRAY+=('snd-soc-allo-piano-dac-plus' ': Allo Piano DAC 2.1') - G_WHIP_MENU_ARRAY+=('allo-cheapo-analogue' ': Allo Cheapo (3.5mm / RCA output)') - G_WHIP_MENU_ARRAY+=('allo-cheapo-optical' ': Allo Cheapo (Optical output)') - G_WHIP_MENU_ARRAY+=('usb-dac-1.1' ': USB 1.1 Audio DAC (any)') + G_WHIP_MENU_ARRAY+=( + 'default' ': HDMI' + 'snd-soc-allo-piano-dac' ': Allo Piano DAC' + 'snd-soc-allo-piano-dac-plus' ': Allo Piano DAC 2.1' + 'allo-cheapo-analogue' ': Allo Cheapo (3.5mm / RCA output)' + 'allo-cheapo-optical' ': Allo Cheapo (Optical output)' + 'usb-dac-1.1' ': USB 1.1 Audio DAC (any)' + ) # ASUS TB elif (( $G_HW_MODEL == 52 )); then - G_WHIP_MENU_ARRAY+=('default' ': HDMI') - G_WHIP_MENU_ARRAY+=('asus-tb-analogue' ': 3.5mm Analogue') + G_WHIP_MENU_ARRAY+=('default' ': HDMI' 'asus-tb-analogue' ': 3.5mm Analogue') # Odroid N2: Modern image elif [[ $G_HW_MODEL == 15 && -f '/boot/dietpiEnv.txt' ]]; then - G_WHIP_MENU_ARRAY+=('OdroidN2_HDMI' ': Onboard digital HDMI audio (default)') - G_WHIP_MENU_ARRAY+=('OdroidN2_3.5mm' ': Onboard analogue 3.5mm audio') + G_WHIP_MENU_ARRAY+=('OdroidN2_HDMI' ': Onboard digital HDMI audio (default)' 'OdroidN2_3.5mm' ': Onboard analogue 3.5mm audio') # Odroid C4: Modern image elif [[ $G_HW_MODEL == 16 && -f '/boot/dietpiEnv.txt' ]]; then G_WHIP_MENU_ARRAY+=('OdroidC4_HDMI' ': Onboard digital HDMI audio (default)') - fi # Intel SST DSP diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index d341a25ceb..14264ef9e4 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -2662,7 +2662,15 @@ _EOF_ then # Add fbdev display driver for legacy framebuffer graphics support, as modesetting requires KMS driver overlay for /dev/dri/card0 to exists. aDEPS+=('xserver-xorg-video-fbdev') - + # RPi 5: Add config to force X11 using the correct DRM device: https://forums.raspberrypi.com/viewtopic.php?t=358853 + (( $G_HW_MODEL == 5 )) && cat << '_EOF_' > /etc/X11/xorg.conf.d/02-dietpi-rpi5.conf +Section "OutputClass" + Identifier "vc4" + MatchDriver "vc4" + Driver "modesetting" + Option "PrimaryGPU" "true" +EndSection +_EOF_ # x86_64 VM elif (( $G_HW_ARCH == 10 && $G_HW_MODEL == 20 )) then @@ -2675,20 +2683,20 @@ _EOF_ then cat << '_EOF_' > /etc/X11/xorg.conf.d/02-dietpi-aml-s905.conf Section "OutputClass" - Identifier "Amlogic" - MatchDriver "meson" - Driver "modesetting" - Option "PrimaryGPU" "true" + Identifier "Amlogic" + MatchDriver "meson" + Driver "modesetting" + Option "PrimaryGPU" "true" EndSection Section "Screen" - Identifier "Default Screen" - Device "Meson" - Monitor "foo" - DefaultDepth 24 - SubSection "Display" - Depth 24 - Modes "1920x1080" "1440x900" "1280x720" "1280x1024" "1280x960" "1024x768" "800x600" "640x480" "720x400" - EndSubSection + Identifier "Default Screen" + Device "Meson" + Monitor "foo" + DefaultDepth 24 + SubSection "Display" + Depth 24 + Modes "1920x1080" "1440x900" "1280x720" "1280x1024" "1280x960" "1024x768" "800x600" "640x480" "720x400" + EndSubSection EndSection _EOF_ fi diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index 42b75dc796..d83d19f3b2 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -1729,8 +1729,21 @@ _EOF_ local kms=$(grep -Em1 '^[[:blank:]]*dtoverlay=vc4-kms-v3d(-pi4)?(,|$)' /boot/config.txt) [[ $kms && ! $kms =~ ',noaudio'(,|$) ]] && G_EXEC sed --follow-symlinks -Ei '/^[[:blank:]]*dtoverlay=vc4-kms-v3d(-pi4)?(,|$)/s/$/,noaudio/' /boot/config.txt - # Use "auto" as default - [[ $INPUT_DEVICE_VALUE == 'default' ]] && INPUT_DEVICE_VALUE='rpi-bcm2835-auto' + # On RPi 5, use "hdmi" by default, else "auto": https://dietpi.com/forum/t/19760 + if [[ $INPUT_DEVICE_VALUE == 'default' ]] + then + if (( $G_HW_MODEL == 5 )) + then + INPUT_DEVICE_VALUE='rpi-bcm2835-hdmi' + else + INPUT_DEVICE_VALUE='rpi-bcm2835-auto' + fi + + # RPi 5: Enforce HDMI audio if any onboard audio was selected, as it does not have a 3.5mm jack. + elif [[ $G_HW_MODEL == 5 && INPUT_DEVICE_VALUE == 'rpi-bcm2835-'* ]] + then + INPUT_DEVICE_VALUE='rpi-bcm2835-hdmi' + fi } Soundcard_Reset_Odroid() @@ -1943,6 +1956,9 @@ _EOF_ # rpi-bcm2835-hdmi 'rpi-bcm2835-'*) + # RPi 5: Enable KMS as the snd_bcm2835 driver does not work on Raspberry Pi 5. It has no 3.5mm jack, hence the only supported onboard audio is HDMI. + (( $G_HW_MODEL == 5 )) && INPUT_DEVICE_VALUE='vc4-kms-v3d' RPi_OpenGL_Main + # Enable VC4 HDMI audio if onboard HDMI is enabled and KMS used, as the bcm2835 HDMI audio driver and KMS conflict: https://dietpi.com/forum/t/19568, https://github.com/raspberrypi/linux/issues/4651 if [[ $INPUT_DEVICE_VALUE != *'3.5mm' ]] && grep -Eq '^[[:blank:]]*dtoverlay=vc4-kms-v3d(-pi4)?,(noaudio|.+,noaudio)(,|$)' /boot/config.txt then From 870b91ae1746dd652aed94e39168aa535a12e672 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 1 Apr 2024 18:26:44 +0200 Subject: [PATCH 063/458] v9.3 - dietpi-set_hardware | Syntax --- dietpi/func/dietpi-set_hardware | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index d83d19f3b2..0108f1d727 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -1740,7 +1740,7 @@ _EOF_ fi # RPi 5: Enforce HDMI audio if any onboard audio was selected, as it does not have a 3.5mm jack. - elif [[ $G_HW_MODEL == 5 && INPUT_DEVICE_VALUE == 'rpi-bcm2835-'* ]] + elif [[ $G_HW_MODEL == 5 && $INPUT_DEVICE_VALUE == 'rpi-bcm2835-'* ]] then INPUT_DEVICE_VALUE='rpi-bcm2835-hdmi' fi From fe42e9e0ed4b4191c695c8de2a2fd48cfd278fd3 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 2 Apr 2024 21:15:54 +0200 Subject: [PATCH 064/458] v9.3 - DietPi-Software | Mosquitto: The official APT repository added support for 64-bit ARM on Bookworm, which is now used for our installation. --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index fb0d04eb11..1769450b1d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,6 +5,7 @@ New images: Enhancements: - DietPi-Config | Removed the 3.5mm audio option on Raspberry Pi 5, as it does not have a 3.5mm jack. Additionally, the KMS graphics driver is enabled OOTB when HDMI audio is selected, as the snd_bcm2835 driver does not work on Raspberry Pi 5. Many thanks to @JRK0469 for making us aware of this: https://dietpi.com/forum/t/19760 +- DietPi-Software | Mosquitto: The official APT repository added support for 64-bit ARM on Bookworm, which is now used for our installation. Bug fixes: - Raspberry Pi 5 | Fixed X11/desktop startup if KMS is enabled. Many thanks to @denguido for reporting the issue and solution: https://dietpi.com/forum/t/19760 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 14264ef9e4..6a205c50eb 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6687,7 +6687,7 @@ _EOF_ then # Use official APT repository where available: https://repo.mosquitto.org/debian/pool/main/m/mosquitto/ # - Current builds are not ARMv6 compatible: https://github.com/MichaIng/DietPi/issues/5140 - if (( $G_DISTRO < 8 )) && [[ $G_HW_ARCH == 2 || $G_HW_ARCH == 10 ]] + if (( $G_DISTRO < 8 )) && [[ $G_HW_ARCH == 2 || $G_HW_ARCH == 10 || ( $G_HW_ARCH == 3 && $G_DISTRO == 7 ) ]] then # APT key local url='https://repo.mosquitto.org/debian/mosquitto-repo.gpg.key' From bdf526f41f7fadb26dd2d2a3da91e70bc0910f2d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 4 Apr 2024 23:05:24 +0200 Subject: [PATCH 065/458] v9.3 - DietPi-Patches | Purge ancient vmtouch which prevents /boot from being unmounted e.g. for RPi firmware migration: https://github.com/MichaIng/DietPi/issues/6819, https://github.com/MichaIng/DietPi/issues/6976 --- .update/patches | 6 ++++++ dietpi/func/dietpi-set_software | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.update/patches b/.update/patches index f59836fc21..8c714aa78c 100755 --- a/.update/patches +++ b/.update/patches @@ -1610,6 +1610,12 @@ Patch_9_2() fi } +Patch_9_3() +{ + # Purge ancient vmtouch which prevents /boot from being unmounted e.g. for RPi firmware migration: https://github.com/MichaIng/DietPi/issues/6819, https://github.com/MichaIng/DietPi/issues/6976 + [[ -f '/etc/default/vmtouch' ]] && grep -q '/boot/dietpi' /etc/default/vmtouch && G_AGP vmtouch +} + # v6.35 => v7 migration if (( $G_DIETPI_VERSION_CORE == 6 && $G_DIETPI_VERSION_SUB > 34 )) then diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index 878f052f5d..e257ebecd4 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -96,7 +96,7 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R # Generate locales and set new default # - 1. this calls "locale-gen" to regenerate a fresh locale cache based on /etc/locale.gen to /usr/lib/locale/locale-archive. - # - 2. this calls "update-locale LANG=" to apply the new default locale form the debconf default assigned above. + # - 2. this calls "update-locale LANG=" to apply the new default locale from the debconf default assigned above. G_CHECK_OUTPUT=1 G_EXEC dpkg-reconfigure -f noninteractive locales # Update dietpi.txt entry From 23898ba1525d47fa02567fb89af3360214f72454 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 7 Apr 2024 21:52:25 +0200 Subject: [PATCH 066/458] v9.3 - DietPi-Software | Update fallback URLs --- dietpi/dietpi-software | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 6a205c50eb..9a1a0c694a 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8913,7 +8913,7 @@ _EOF_ *) local arch='arm';; esac - local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.27.4/syncthing-linux-$arch-v1.27.4.tar.gz" + local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.27.5/syncthing-linux-$arch-v1.27.5.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/syncthing/syncthing/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/syncthing-linux-$arch-[^\"\/]*\.tar\.gz\"/{print \$4}")" G_EXEC mv syncthing-* /opt/syncthing fi @@ -10034,7 +10034,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.21.2475/Readarr.develop.0.3.21.2475.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.22.2499/Readarr.develop.0.3.22.2499.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Readarr/Readarr/releases' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}" | head -1)" G_EXEC mv Readarr /opt/readarr fi @@ -11710,15 +11710,7 @@ _EOF_ if To_Install 198 filebrowser # File Browser then - case $G_HW_ARCH in - 1) local arch='armv6';; - 2) local arch='armv7';; - 3) local arch='arm64';; - 11) local arch='riscv64';; - *) local arch='amd64';; - esac - - local fallback_url="https://github.com/filebrowser/filebrowser/releases/download/v2.27.0/linux-$arch-filebrowser.tar.gz" + local fallback_url="https://github.com/filebrowser/filebrowser/releases/download/v2.28.0/linux-${G_HW_ARCH_NAME%l}-filebrowser.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/filebrowser/filebrowser/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/linux-$arch-filebrowser\.tar\.gz\"$/{print \$4}")" ./filebrowser/ # Reinstall From 22096cc4a39ad72d8234549b7c6182f059afc4b6 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 7 Apr 2024 22:05:45 +0200 Subject: [PATCH 067/458] v9.3 - DietPi-Software | File Browser: Fix URL detection --- dietpi/dietpi-software | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 9a1a0c694a..6552c05e63 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -11710,8 +11710,9 @@ _EOF_ if To_Install 198 filebrowser # File Browser then - local fallback_url="https://github.com/filebrowser/filebrowser/releases/download/v2.28.0/linux-${G_HW_ARCH_NAME%l}-filebrowser.tar.gz" - Download_Install "$(curl -sSfL 'https://api.github.com/repos/filebrowser/filebrowser/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/linux-$arch-filebrowser\.tar\.gz\"$/{print \$4}")" ./filebrowser/ + local arch=$(dpkg --print-architecture) + local fallback_url="https://github.com/filebrowser/filebrowser/releases/download/v2.28.0/linux-${arch%l}-filebrowser.tar.gz" + Download_Install "$(curl -sSfL 'https://api.github.com/repos/filebrowser/filebrowser/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/linux-${arch%l}-filebrowser\.tar\.gz\"$/{print \$4}")" ./filebrowser/ # Reinstall [[ -d '/opt/filebrowser' ]] && G_EXEC rm -R /opt/filebrowser From ce4fd3c53b6bc13e1932ed6defc271e025035f86 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 7 Apr 2024 22:07:27 +0200 Subject: [PATCH 068/458] v9.3 - DietPi-Software | File Browser: Revert URL detection --- dietpi/dietpi-software | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 6552c05e63..b196aff84d 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -11710,9 +11710,16 @@ _EOF_ if To_Install 198 filebrowser # File Browser then - local arch=$(dpkg --print-architecture) - local fallback_url="https://github.com/filebrowser/filebrowser/releases/download/v2.28.0/linux-${arch%l}-filebrowser.tar.gz" - Download_Install "$(curl -sSfL 'https://api.github.com/repos/filebrowser/filebrowser/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/linux-${arch%l}-filebrowser\.tar\.gz\"$/{print \$4}")" ./filebrowser/ + case $G_HW_ARCH in + 1) local arch='armv6';; + 2) local arch='armv7';; + 3) local arch='arm64';; + 11) local arch='riscv64';; + *) local arch='amd64';; + esac + + local fallback_url="https://github.com/filebrowser/filebrowser/releases/download/v2.28.0/linux-$arch-filebrowser.tar.gz" + Download_Install "$(curl -sSfL 'https://api.github.com/repos/filebrowser/filebrowser/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/linux-$arch-filebrowser\.tar\.gz\"$/{print \$4}")" ./filebrowser/ # Reinstall [[ -d '/opt/filebrowser' ]] && G_EXEC rm -R /opt/filebrowser From f58e71b19424e946bc1ed37110d01cc4575e22fe Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 8 Apr 2024 23:11:58 +0200 Subject: [PATCH 069/458] v9.3 (#7008) - DietPi-Software | SABnzbd: Skip obsolete dependencies on ARMv6/7 Bookworm systems, since piwheels does now support Bookworm/Python 3.11 --- dietpi/dietpi-software | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index b196aff84d..c60eb91df6 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6998,7 +6998,7 @@ _EOF_ (( $G_HW_ARCH == 10 )) && arch='amd64' # Grab latest package URL - local fallback_url="https://downloads.lms-community.org/nightly/logitechmediaserver_8.5.1~1711624004_$arch.deb" + local fallback_url="https://downloads.lms-community.org/nightly/logitechmediaserver_8.5.1~1712473975_$arch.deb" Download_Install "$(curl -sSf 'https://raw.githubusercontent.com/LMS-Community/lms-server-repository/master/stable.xml' | grep -om1 "https://[^\"]*_$arch.deb")" G_EXEC systemctl stop logitechmediaserver Remove_SysV logitechmediaserver @@ -9172,8 +9172,8 @@ _EOF_ then # APT deps aDEPS=('par2' 'p7zip-full') - # - ARMv6/7 on Bookworm + RISC-V: gcc and libffi-dev for cffi; pkg-config, libssl-dev and Rust for cryptography, g++ for sabctools and ujson - if (( $G_DISTRO > 6 && $G_HW_ARCH < 3 || $G_HW_ARCH == 11 )) + # - RISC-V: gcc and libffi-dev for cffi; pkg-config, libssl-dev and Rust for cryptography, g++ for sabctools and ujson + if (( $G_HW_ARCH == 11 )) then aDEPS+=('g++' 'libffi-dev' 'libssl-dev' 'pkg-config') G_EXEC curl -sSf 'https://sh.rustup.rs/' -o rustup-init.sh @@ -9181,11 +9181,6 @@ _EOF_ G_EXEC_OUTPUT=1 G_EXEC ./rustup-init.sh -y --profile minimal G_EXEC rm rustup-init.sh export PATH="/root/.cargo/bin:$PATH" - - # - ARMv6/7 temporary workaround: https://github.com/piwheels/packages/issues/358 - elif (( $G_HW_ARCH < 3 )) - then - aDEPS+=('g++') fi Download_Install 'https://github.com/sabnzbd/sabnzbd/archive/master.tar.gz' From 04589dd9f3c1e8f6c1599cbbadad421e441a9430 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 9 Apr 2024 18:26:44 +0200 Subject: [PATCH 070/458] v9.3 - dietpi-set_software | ntpd-mode: Remove obsolete condition for installing the systemd-timesyncd package --- dietpi/func/dietpi-set_software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index e257ebecd4..f5178be1c1 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -300,7 +300,7 @@ deb $INPUT_MODE_VALUE $G_DISTRO_NAME-backports main contrib non-free' > /etc/apt # Oneshot modes: Enable systemd-timesyncd to start early at boot, but stop it now elif [[ $INPUT_MODE_VALUE == [123] ]] then - [[ ${timesyncd[0]} ]] && G_AG_CHECK_INSTALL_PREREQ systemd-timesyncd + G_AG_CHECK_INSTALL_PREREQ systemd-timesyncd G_EXEC systemctl unmask systemd-timesyncd # Failsafe G_EXEC systemctl enable systemd-timesyncd G_EXEC systemctl stop systemd-timesyncd From 028369379ec44070561b87f4e28acb6a10149466 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 9 Apr 2024 19:55:17 +0200 Subject: [PATCH 071/458] v9.3 - dietpi.txt | Update default and description for CONFIG_NTP_MIRROR --- dietpi.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dietpi.txt b/dietpi.txt index a5d83c8000..d0db5bb566 100644 --- a/dietpi.txt +++ b/dietpi.txt @@ -223,10 +223,13 @@ CONFIG_APT_RASPBIAN_MIRROR=http://raspbian.raspberrypi.com/raspbian/ # - Debian: https://www.debian.org/mirror/official#list CONFIG_APT_DEBIAN_MIRROR=https://deb.debian.org/debian/ -# NTP mirror, applied to /etc/ntp.conf -# - For a full list, please see: https://www.ntppool.org/zone/@ -# - Please remove the initial integer and full stop from the value (removing "0."), eg: debian.pool.ntp.org -CONFIG_NTP_MIRROR=debian.pool.ntp.org +# NTP server(s) applied to /etc/systemd/timesyncd.conf +# - "default": Use the NTP server(s) provided via DHCP, else the debian.pool.ntp.org NTP pool. +# - "gateway": Use the router/gateway as NTP server. Recommended, if it does provide this functionality. +# - To use a public NTP pool, see the full list at: https://www.ntppool.org/zone/@ +# Use the pool domain without leading integer and dot (without "0."), like "debian.pool.ntp.org", "pool.ntp.org" or "uk.pool.ntp.org". +# - You can also use a custom IP address, hostname or any combination of space-separated IP addresses, hostnames and NTP pool domain. +CONFIG_NTP_MIRROR=default #------------------------------------------------------------------------------------------------------ ##### DietPi-Software settings ##### From c754c164d20efbbfb3bd63fc591ef725dd014821 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 9 Apr 2024 20:02:53 +0200 Subject: [PATCH 072/458] v9.3 - Minor --- dietpi.txt | 4 ++-- dietpi/func/dietpi-set_software | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dietpi.txt b/dietpi.txt index d0db5bb566..fdd5e82a8e 100644 --- a/dietpi.txt +++ b/dietpi.txt @@ -226,9 +226,9 @@ CONFIG_APT_DEBIAN_MIRROR=https://deb.debian.org/debian/ # NTP server(s) applied to /etc/systemd/timesyncd.conf # - "default": Use the NTP server(s) provided via DHCP, else the debian.pool.ntp.org NTP pool. # - "gateway": Use the router/gateway as NTP server. Recommended, if it does provide this functionality. -# - To use a public NTP pool, see the full list at: https://www.ntppool.org/zone/@ +# - To use another public NTP pool, see the full list at: https://www.ntppool.org/zone/@ # Use the pool domain without leading integer and dot (without "0."), like "debian.pool.ntp.org", "pool.ntp.org" or "uk.pool.ntp.org". -# - You can also use a custom IP address, hostname or any combination of space-separated IP addresses, hostnames and NTP pool domain. +# - You can also use a custom IP address, hostname or any combination of space-separated IP addresses, hostnames and NTP pool domains. CONFIG_NTP_MIRROR=default #------------------------------------------------------------------------------------------------------ diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index f5178be1c1..93e7b1fb27 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -245,7 +245,7 @@ deb $INPUT_MODE_VALUE $G_DISTRO_NAME-backports main contrib non-free' > /etc/apt #///////////////////////////////////////////////////////////////////////////////////// TimeSync_Main() { - if [[ ! $INPUT_MODE_VALUE || $INPUT_MODE_VALUE == [01234] ]] + if [[ ! $INPUT_MODE_VALUE || $INPUT_MODE_VALUE == [0-4] ]] then # If no input given, re-apply current dietpi.txt setting, else revert to default mode 2 [[ $INPUT_MODE_VALUE ]] || INPUT_MODE_VALUE=$(sed -n '/^[[:blank:]]*CONFIG_NTP_MODE=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) From 1828eadf89f38d3306efff1cc9526e768f1b761d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 10 Apr 2024 16:03:14 +0200 Subject: [PATCH 073/458] v9.3 - CI | Packages: Remove unnecessary fields from package control files and simplify "date" command --- .build/software/Amiberry/build.bash | 5 +---- .build/software/gmediarender/build.bash | 5 +---- .build/software/raspberrypi-sys-mods/build.bash | 5 +---- .build/software/shairport-sync/build.bash | 5 +---- .build/software/squeezelite/build.bash | 5 +---- .build/software/vaultwarden/build.bash | 5 +---- .build/software/ympd/build.bash | 5 +---- 7 files changed, 7 insertions(+), 28 deletions(-) diff --git a/.build/software/Amiberry/build.bash b/.build/software/Amiberry/build.bash index e238897a82..61379b0115 100755 --- a/.build/software/Amiberry/build.bash +++ b/.build/software/Amiberry/build.bash @@ -207,15 +207,12 @@ Package: amiberry Version: $v_ami Architecture: $(dpkg --print-architecture) Maintainer: MichaIng -Date: $(date -u '+%a, %d %b %Y %T %z') -Standards-Version: 4.6.2.0 +Date: $(date -uR) Installed-Size: $(du -sk "$DIR" | mawk '{print $1}') Depends:$DEPS_APT_VERSIONED Section: games Priority: optional Homepage: https://amiberry.com/ -Vcs-Git: https://github.com/BlitterStudio/amiberry.git -Vcs-Browser: https://github.com/BlitterStudio/amiberry Description: Optimized Amiga emulator for the Raspberry Pi and other ARM boards This package ships with optimized libSDL2 and capsimg builds. _EOF_ diff --git a/.build/software/gmediarender/build.bash b/.build/software/gmediarender/build.bash index 94ef27a0bc..1b276f857f 100755 --- a/.build/software/gmediarender/build.bash +++ b/.build/software/gmediarender/build.bash @@ -182,15 +182,12 @@ Package: $name Version: $version-$suffix Architecture: $(dpkg --print-architecture) Maintainer: MichaIng -Date: $(date -u '+%a, %d %b %Y %T %z') -Standards-Version: 4.6.2.0 +Date: $(date -uR) Installed-Size: $(du -sk "$DIR" | mawk '{print $1}') Depends:$DEPS_APT_VERSIONED Section: sound Priority: optional Homepage: $repo -Vcs-Git: $repo.git -Vcs-Browser: $repo Description: Minimalist UPNP AV renderer gmrender-resurrect is a minimalist UPNP AV renderer that can be used to play music controlled by a UPNP AV control point. This package contains diff --git a/.build/software/raspberrypi-sys-mods/build.bash b/.build/software/raspberrypi-sys-mods/build.bash index ac91cd6ef2..569109ec06 100755 --- a/.build/software/raspberrypi-sys-mods/build.bash +++ b/.build/software/raspberrypi-sys-mods/build.bash @@ -54,14 +54,11 @@ Package: raspberrypi-sys-mods Version: 2:20230510-dietpi2 Architecture: all Maintainer: MichaIng -Date: $(date -u '+%a, %d %b %Y %T %z') -Standards-Version: 4.6.2.0 +Date: $(date -uR) Installed-Size: $(du -sk raspberrypi-sys-mods | mawk '{print $1}') Section: admin Priority: optional Homepage: https://github.com/RPi-Distro/raspberrypi-sys-mods -Vcs-Git: https://github.com/RPi-Distro/raspberrypi-sys-mods.git -Vcs-Browser: https://github.com/RPi-Distro/raspberrypi-sys-mods Description: System tweaks for the Raspberry Pi, DietPi edition _EOF_ G_CONFIG_INJECT 'Installed-Size: ' "Installed-Size: $(du -sk raspberrypi-sys-mods | mawk '{print $1}')" raspberrypi-sys-mods/DEBIAN/control diff --git a/.build/software/shairport-sync/build.bash b/.build/software/shairport-sync/build.bash index 37ca209a36..98437febff 100755 --- a/.build/software/shairport-sync/build.bash +++ b/.build/software/shairport-sync/build.bash @@ -539,16 +539,13 @@ Package: $name-airplay2 Version: $version-$suffix Architecture: $(dpkg --print-architecture) Maintainer: MichaIng -Date: $(date -u '+%a, %d %b %Y %T %z') -Standards-Version: 4.6.2.0 +Date: $(date -uR) Installed-Size: $(du -sk "$DIR" | mawk '{print $1}') Depends:$DEPS_APT_VERSIONED Conflicts: $name Section: sound Priority: optional Homepage: $repo -Vcs-Git: $repo.git -Vcs-Browser: $repo Description: AirPlay audio player Plays audio streamed from iTunes, iOS devices and third-party AirPlay sources such as ForkedDaapd and others. Audio played by a Shairport diff --git a/.build/software/squeezelite/build.bash b/.build/software/squeezelite/build.bash index ab6c717d89..a21169ae0b 100755 --- a/.build/software/squeezelite/build.bash +++ b/.build/software/squeezelite/build.bash @@ -164,16 +164,13 @@ Package: squeezelite Version: $version-$suffix Architecture: $(dpkg --print-architecture) Maintainer: MichaIng -Date: $(date -u '+%a, %d %b %Y %T %z') -Standards-Version: 4.6.2.0 +Date: $(date -uR) Installed-Size: $(du -sk "$DIR" | mawk '{print $1}') Depends:$DEPS_APT_VERSIONED Conflicts: squeezelite-pa, squeezelite-pulseaudio Section: sound Priority: optional Homepage: https://github.com/ralph-irving/squeezelite -Vcs-Git: https://github.com/ralph-irving/squeezelite.git -Vcs-Browser: https://github.com/ralph-irving/squeezelite Description: lightweight headless Squeezebox emulator - ALSA version Squeezelite is a small headless Squeezebox emulator. It is aimed at supporting high quality audio including USB DAC based output at multiple diff --git a/.build/software/vaultwarden/build.bash b/.build/software/vaultwarden/build.bash index ce68c4bc55..5948118d08 100755 --- a/.build/software/vaultwarden/build.bash +++ b/.build/software/vaultwarden/build.bash @@ -227,15 +227,12 @@ Package: vaultwarden Version: $version Architecture: $(dpkg --print-architecture) Maintainer: MichaIng -Date: $(date -u '+%a, %d %b %Y %T %z') -Standards-Version: 4.6.2.0 +Date: $(date -uR) Installed-Size: $(du -sk "$DIR" | mawk '{print $1}') Depends:$DEPS_APT_VERSIONED Section: misc Priority: optional Homepage: https://github.com/dani-garcia/vaultwarden -Vcs-Git: https://github.com/dani-garcia/vaultwarden.git -Vcs-Browser: https://github.com/dani-garcia/vaultwarden Description: Alternative implementation of the Bitwarden server API written in Rust and compatible with upstream Bitwarden clients, perfect for self-hosted deployment where running the official resource-heavy service might not be ideal. diff --git a/.build/software/ympd/build.bash b/.build/software/ympd/build.bash index e0a6cc11f1..824b7a4ae0 100644 --- a/.build/software/ympd/build.bash +++ b/.build/software/ympd/build.bash @@ -157,15 +157,12 @@ Package: ympd Version: $version-$suffix Architecture: $(dpkg --print-architecture) Maintainer: MichaIng -Date: $(date -u '+%a, %d %b %Y %T %z') -Standards-Version: 4.6.2.0 +Date: $(date -uR) Installed-Size: $(du -sk "$DIR" | mawk '{print $1}') Depends:$DEPS_APT_VERSIONED Section: sound Priority: optional Homepage: https://github.com/SuperBFG7/ympd -Vcs-Git: https://github.com/SuperBFG7/ympd.git -Vcs-Browser: https://github.com/SuperBFG7/ympd Description: Standalone MPD Web GUI written in C, utilizing Websockets and Bootstrap/JS _EOF_ G_CONFIG_INJECT 'Installed-Size: ' "Installed-Size: $(du -sk "$DIR" | mawk '{print $1}')" "$DIR/DEBIAN/control" From 7a7f8f9a814ce9ff4333e8661757c37317719fdf Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 12 Apr 2024 15:27:47 +0200 Subject: [PATCH 074/458] v9.3 - CI | Add support for 64-bit time_t transition on Sid for all builds: https://bugs.debian.org/1065394 --- .build/software/gmediarender/build.bash | 5 ++++- .build/software/shairport-sync/build.bash | 7 ++++++- .build/software/ympd/build.bash | 5 ++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.build/software/gmediarender/build.bash b/.build/software/gmediarender/build.bash index 1b276f857f..b6bc41ccb8 100755 --- a/.build/software/gmediarender/build.bash +++ b/.build/software/gmediarender/build.bash @@ -9,7 +9,8 @@ adeps=('libc6' 'gstreamer1.0-alsa' 'gstreamer1.0-libav' 'gstreamer1.0-plugins-go (( $G_DISTRO > 7 )) && adeps+=('libupnp17') || adeps+=('libupnp13') for i in "${adeps[@]}" do - dpkg-query -s "$i" &> /dev/null && continue + # Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394 + dpkg-query -s "$i" &> /dev/null || dpkg-query -s "${i}t64" &> /dev/null && continue G_DIETPI-NOTIFY 1 "Expected dependency package was not installed: $i" exit 1 done @@ -163,6 +164,8 @@ find "$DIR" ! \( -path "$DIR/DEBIAN" -prune \) -type f -exec md5sum {} + | sed " DEPS_APT_VERSIONED= for i in "${adeps[@]}" do + # Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394 + dpkg-query -s "$i" &> /dev/null || i+='t64' DEPS_APT_VERSIONED+=" $i (>= $(dpkg-query -Wf '${VERSION}' "$i"))," done DEPS_APT_VERSIONED=${DEPS_APT_VERSIONED%,} diff --git a/.build/software/shairport-sync/build.bash b/.build/software/shairport-sync/build.bash index 98437febff..5792ea41e4 100755 --- a/.build/software/shairport-sync/build.bash +++ b/.build/software/shairport-sync/build.bash @@ -22,7 +22,8 @@ case $G_DISTRO in esac for i in "${adeps[@]}" "${adeps2[@]}" do - dpkg-query -s "$i" &> /dev/null && continue + # Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394 + dpkg-query -s "$i" &> /dev/null || dpkg-query -s "${i}t64" &> /dev/null && continue G_DIETPI-NOTIFY 1 "Expected dependency package was not installed: $i" exit 1 done @@ -348,6 +349,8 @@ find "$DIR" ! \( -path "$DIR/DEBIAN" -prune \) -type f -exec md5sum {} + | sed " DEPS_APT_VERSIONED= for i in "${adeps[@]}" do + # Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394 + dpkg-query -s "$i" &> /dev/null || i+='t64' DEPS_APT_VERSIONED+=" $i (>= $(dpkg-query -Wf '${VERSION}' "$i"))," done DEPS_APT_VERSIONED=${DEPS_APT_VERSIONED%,} @@ -528,6 +531,8 @@ find "$DIR" ! \( -path "$DIR/DEBIAN" -prune \) -type f -exec md5sum {} + | sed " # - Obtain DEB dependency versions for i in "${adeps2[@]}" do + # Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394 + dpkg-query -s "$i" &> /dev/null || i+='t64' DEPS_APT_VERSIONED+=", $i (>= $(dpkg-query -Wf '${VERSION}' "$i"))" done # shellcheck disable=SC2001 diff --git a/.build/software/ympd/build.bash b/.build/software/ympd/build.bash index 824b7a4ae0..806c17368b 100644 --- a/.build/software/ympd/build.bash +++ b/.build/software/ympd/build.bash @@ -15,7 +15,8 @@ case $G_DISTRO in esac for i in "${adeps[@]}" do - dpkg-query -s "$i" &> /dev/null && continue + # Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394 + dpkg-query -s "$i" &> /dev/null || dpkg-query -s "${i}t64" &> /dev/null && continue G_DIETPI-NOTIFY 1 "Expected dependency package was not installed: $i" exit 1 done @@ -137,6 +138,8 @@ find "$DIR" ! \( -path "$DIR/DEBIAN" -prune \) -type f -exec md5sum {} + | sed " DEPS_APT_VERSIONED= for i in "${adeps[@]}" do + # Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394 + dpkg-query -s "$i" &> /dev/null || i+='t64' DEPS_APT_VERSIONED+=" $i (>= $(dpkg-query -Wf '${VERSION}' "$i"))," done DEPS_APT_VERSIONED=${DEPS_APT_VERSIONED%,} From 768a3d2c37875b35e709a8d4958983da82da128a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 12 Apr 2024 15:42:26 +0200 Subject: [PATCH 075/458] v9.3 - DietPi-Software | UnRAR: The non-free package is now available for RISC-V: https://packages.debian.org/sid/unrar --- dietpi/dietpi-software | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index c60eb91df6..7d018a2383 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3082,8 +3082,8 @@ unix_socket_directories = '/run/postgresql'" > "$i/00dietpi.conf" if To_Install 170 # UnRAR then - # On Raspbian and for RISC-V, only "unrar-free" is available which does not support all RAR formats, thus we use "unrar" [non-free] from Debian on ARMv7+ models: http://raspbian.raspberrypi.com/raspbian/pool/non-free/u/unrar-nonfree/, https://deb.debian.org/debian-ports/pool/non-free/u/unrar-nonfree/ - if (( $G_HW_ARCH == 1 || $G_HW_ARCH == 11 )) + # On Raspbian, only "unrar-free" is available which does not support all RAR formats, thus we use "unrar" [non-free] from Debian on ARMv7+ models: http://raspbian.raspberrypi.com/raspbian/pool/non-free/u/unrar-nonfree/ + if (( $G_HW_ARCH == 1 )) then G_AGI unrar-free From 681cfe2d0748c6594d7e0bb1d862b3f8eabe3d1a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 13 Apr 2024 17:15:58 +0200 Subject: [PATCH 076/458] v9.3 - DietPi-Software | Update some fallback URL and versions --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 1769450b1d..d5374390e5 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -6,6 +6,7 @@ New images: Enhancements: - DietPi-Config | Removed the 3.5mm audio option on Raspberry Pi 5, as it does not have a 3.5mm jack. Additionally, the KMS graphics driver is enabled OOTB when HDMI audio is selected, as the snd_bcm2835 driver does not work on Raspberry Pi 5. Many thanks to @JRK0469 for making us aware of this: https://dietpi.com/forum/t/19760 - DietPi-Software | Mosquitto: The official APT repository added support for 64-bit ARM on Bookworm, which is now used for our installation. +- DietPi-Software | UnRAR: Debian added unrar packages for RISC-V, which are now used for our installation. Bug fixes: - Raspberry Pi 5 | Fixed X11/desktop startup if KMS is enabled. Many thanks to @denguido for reporting the issue and solution: https://dietpi.com/forum/t/19760 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 7d018a2383..6219ae9cfd 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -4140,8 +4140,8 @@ _EOF_ esac # Download latest version - local version=$(curl -sSfL 'https://dist.ipfs.io/go-ipfs/versions' | tail -1) - [[ $version ]] || { version='v0.20.0'; G_DIETPI-NOTIFY 1 "Automatic latest ${aSOFTWARE_NAME[$software_id]} version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } + local version=$(curl -sSfL 'https://dist.ipfs.io/go-ipfs/versions' | sed '/-rc[0-9]*$/d' | tail -1) + [[ $version ]] || { version='v0.27.0'; G_DIETPI-NOTIFY 1 "Automatic latest ${aSOFTWARE_NAME[$software_id]} version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } Download_Install "https://dist.ipfs.io/go-ipfs/$version/go-ipfs_${version}_linux-$arch.tar.gz" # Install @@ -4192,7 +4192,7 @@ _EOF_ if To_Install 16 # microblog.pub then local micro_name='microblog-pub' - local micro_python_version='3.11.4' # https://github.com/pyenv/pyenv/tree/master/plugins/python-build/share/python-build + local micro_python_version='3.12.3' # https://github.com/pyenv/pyenv/tree/master/plugins/python-build/share/python-build local micro_pyenv_dir="/opt/$micro_name" local micro_pyenv_activate_file="$micro_pyenv_dir/pyenv-activate.sh" local micro_virtualenv="$micro_pyenv_dir/.virtual_path" @@ -5287,7 +5287,7 @@ _EOF_ local arch=$(dpkg --print-architecture) local version=$(curl -sSfL 'https://hndl.urbackup.org/Server/' | grep -Pwo '(?<=href=")[0-9.]+(?=/")' | sort -Vr | head -1) local file=$(curl -sSfL "https://hndl.urbackup.org/Server/$version/" | grep -Pwom1 "(?<=href=\")urbackup-server_${version}_$arch\.deb(?=\")") - local fallback_url="https://hndl.urbackup.org/Server/2.5.31/urbackup-server_2.5.31_$arch.deb" + local fallback_url="https://hndl.urbackup.org/Server/2.5.33/urbackup-server_2.5.33_$arch.deb" Download_Install "${file:+https://hndl.urbackup.org/Server/$version/$file}" G_EXEC systemctl stop urbackupsrv unset -v backuppath arch version file @@ -6301,7 +6301,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Kareadita/Kavita/releases/download/v0.7.14/kavita-linux-$arch.tar.gz" + local fallback_url="https://github.com/Kareadita/Kavita/releases/download/v0.8.0/kavita-linux-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Kareadita/Kavita/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/kavita-linux-$arch\.tar\.gz\"$/{print \$4}")" G_EXEC chmod +x Kavita/Kavita @@ -6509,7 +6509,7 @@ _EOF_ esac # Download - local fallback_url="https://github.com/fatedier/frp/releases/download/v0.56.0/frp_0.56.0_linux_$arch.tar.gz" + local fallback_url="https://github.com/fatedier/frp/releases/download/v0.57.0/frp_0.57.0_linux_$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/fatedier/frp/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/frp_[0-9.]*_linux_$arch\.tar\.gz\"/{print \$4}")" G_EXEC cd frp_* @@ -6896,7 +6896,7 @@ _EOF_ if To_Install 98 haproxy # HAProxy then - local version='2.8.3' # https://www.haproxy.org/download/ + local version='2.9.7' # https://www.haproxy.org/download/ aDEPS=('make' 'gcc' 'libpcre3-dev' 'libssl-dev' 'zlib1g-dev' 'libsystemd-dev') Download_Install "https://www.haproxy.org/download/${version%.*}/src/haproxy-$version.tar.gz" @@ -8522,7 +8522,7 @@ _EOF_ # Install ruTorrent: Web UI for rTorrent # - Grab current version local version=$(curl -sSfL 'https://api.github.com/repos/Novik/ruTorrent/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}') - [[ $version ]] || { version='v4.2.11'; G_DIETPI-NOTIFY 1 "Automatic latest ruTorrent version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } + [[ $version ]] || { version='v4.3.0'; G_DIETPI-NOTIFY 1 "Automatic latest ruTorrent version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } Download_Install "https://github.com/Novik/ruTorrent/archive/$version.tar.gz" # - Reinstall freshly with preserved configs and 3rd party plugins @@ -8913,7 +8913,7 @@ _EOF_ *) local arch='arm';; esac - local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.27.5/syncthing-linux-$arch-v1.27.5.tar.gz" + local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.27.6/syncthing-linux-$arch-v1.27.6.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/syncthing/syncthing/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/syncthing-linux-$arch-[^\"\/]*\.tar\.gz\"/{print \$4}")" G_EXEC mv syncthing-* /opt/syncthing fi @@ -9510,7 +9510,7 @@ _EOF_ esac url=$(curl -sSfL 'https://api.github.com/repos/Radarr/Radarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}") - local fallback_url="https://github.com/Radarr/Radarr/releases/download/v5.3.6.8612/Radarr.master.5.3.6.8612.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Radarr/Radarr/releases/download/v5.4.6.8723/Radarr.master.5.4.6.8723.linux-core-$arch.tar.gz" fi Download_Install "$url" @@ -9607,7 +9607,7 @@ _EOF_ esac url=$(curl -sSfL 'https://api.github.com/repos/Lidarr/Lidarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}") - local fallback_url="https://github.com/Lidarr/Lidarr/releases/download/v2.1.7.4030/Lidarr.master.2.1.7.4030.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Lidarr/Lidarr/releases/download/v2.2.5.4141/Lidarr.master.2.2.5.4141.linux-core-$arch.tar.gz" fi Download_Install "$url" @@ -11133,7 +11133,7 @@ _EOF_ # v3 drops PHP 7.4 support: https://github.com/TasmoAdmin/TasmoAdmin/releases/tag/v3.0.0 if (( $G_DISTRO > 6 )) then - local fallback_url='https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v4.0.1/tasmoadmin_v4.0.1.tar.gz' + local fallback_url='https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v4.0.2/tasmoadmin_v4.0.2.tar.gz' Download_Install "$(curl -sSfL 'https://api.github.com/repos/TasmoAdmin/TasmoAdmin/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/tasmoadmin_v[^"\/]*\.tar\.gz"$/{print $4}')" else Download_Install 'https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v2.4.2/tasmoadmin_v2.4.2.tar.gz' @@ -11230,7 +11230,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.12.1' # https://github.com/pyenv/pyenv/tree/master/plugins/python-build/share/python-build + local ha_python_version='3.12.3' # 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" From 81791b4a809ba68cdddec21418405e174d76f420 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 13 Apr 2024 18:02:51 +0200 Subject: [PATCH 077/458] v9.3 - DietPi-Software | microblog.pub: Downgrade to latest Python 3.11 due to poetry/pyyaml error with 3.12: https://github.com/python-poetry/poetry/issues/8287 --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 6219ae9cfd..5198f0406a 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -4192,7 +4192,7 @@ _EOF_ if To_Install 16 # microblog.pub then local micro_name='microblog-pub' - local micro_python_version='3.12.3' # https://github.com/pyenv/pyenv/tree/master/plugins/python-build/share/python-build + local micro_python_version='3.11.9' # https://github.com/pyenv/pyenv/tree/master/plugins/python-build/share/python-build local micro_pyenv_dir="/opt/$micro_name" local micro_pyenv_activate_file="$micro_pyenv_dir/pyenv-activate.sh" local micro_virtualenv="$micro_pyenv_dir/.virtual_path" From ce51c98c4594a0cb156cbd7b94b4cdea729e0bb6 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 13 Apr 2024 18:04:58 +0200 Subject: [PATCH 078/458] v9.3 - RC up --- .update/version | 2 +- dietpi/func/dietpi-globals | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.update/version b/.update/version index 42b0f6b092..a54ce2d4d0 100644 --- a/.update/version +++ b/.update/version @@ -3,7 +3,7 @@ # Available DietPi version G_REMOTE_VERSION_CORE=9 G_REMOTE_VERSION_SUB=3 -G_REMOTE_VERSION_RC=-1 +G_REMOTE_VERSION_RC=0 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=7 G_MIN_VERSION_SUB=0 diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 7b6c58de0b..3f3cf3a3a1 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -55,7 +55,7 @@ # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=9 [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=3 - [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=-1 + [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=0 [[ $G_GITBRANCH ]] || G_GITBRANCH='master' [[ $G_GITOWNER ]] || G_GITOWNER='MichaIng' # - Save current version and Git branch From 43f1b9a7e2903154eabde1b05e92e459427a67fc Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 13 Apr 2024 18:11:00 +0200 Subject: [PATCH 079/458] v8.3 - CHANGELOG | Remove new images category from v9.3 changelog --- CHANGELOG.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index d5374390e5..2d90214d98 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,8 +1,6 @@ v9.3 (2024-04-13) -New images: - Enhancements: - DietPi-Config | Removed the 3.5mm audio option on Raspberry Pi 5, as it does not have a 3.5mm jack. Additionally, the KMS graphics driver is enabled OOTB when HDMI audio is selected, as the snd_bcm2835 driver does not work on Raspberry Pi 5. Many thanks to @JRK0469 for making us aware of this: https://dietpi.com/forum/t/19760 - DietPi-Software | Mosquitto: The official APT repository added support for 64-bit ARM on Bookworm, which is now used for our installation. From 93b79163662d93da91e5d2326d78c352b049414e Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 13 Apr 2024 21:21:33 +0200 Subject: [PATCH 080/458] v9.3 - DietPi-Patches | Remove obsolete rockchip64 upgrade from our server - DietPi-Installer | Remove obsolete rockchip64 kernel upgrades from our server --- .build/images/dietpi-installer | 5 ++--- .update/patches | 14 +------------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 9c0b8d9a9e..4485fb1e5b 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1151,14 +1151,13 @@ _EOF_ G_AGI initramfs-tools u-boot-tools armbian-firmware "${zstd[@]}" [[ ${zstd[0]} ]] && G_CONFIG_INJECT 'COMPRESS=' 'COMPRESS=zstd' /etc/initramfs-tools/initramfs.conf # Download and pre-install kernel hosted on dietpi.com where the Armbian APT repo provides a too old version - # - NanoPi R4S: Solve Ethernet adapter disappearing on soft reboot: https://github.com/MichaIng/DietPi/issues/6342 - if [[ ( $G_HW_MODEL == 72 && $HW_VARIANT == 2 ) || $G_HW_MODEL =~ ^(47|76|83)$ ]] + if (( $G_HW_MODEL == 83 )) then G_EXEC_OUTPUT=1 G_EXEC curl -fo package1.deb "https://dietpi.com/downloads/binaries/linux-image-$branch-$kernel.deb" G_EXEC_OUTPUT=1 G_EXEC curl -fo package2.deb "https://dietpi.com/downloads/binaries/linux-dtb-$branch-$kernel.deb" G_EXEC_OUTPUT=1 G_EXEC curl -fo package3.deb 'https://dietpi.com/downloads/binaries/armbian-firmware.deb' local uboot=() - [[ $G_HW_MODEL == 76 || ( $G_HW_MODEL == 83 && $HW_VARIANT == 1 ) ]] && { G_EXEC_OUTPUT=1 G_EXEC curl -fo package4.deb "https://dietpi.com/downloads/binaries/linux-u-boot-$model-$branch.deb"; uboot=('package4.deb'); } + #(( $G_HW_MODEL == 83 )) && (( $HW_VARIANT == 1 )) && { G_EXEC_OUTPUT=1 G_EXEC curl -fo package4.deb "https://dietpi.com/downloads/binaries/linux-u-boot-$model-$branch.deb"; uboot=('package4.deb'); } G_EXEC_OUTPUT=1 G_EXEC dpkg -i package1.deb package2.deb package3.deb "${uboot[@]}" G_EXEC rm package1.deb package2.deb package3.deb "${uboot[@]}" fi diff --git a/.update/patches b/.update/patches index 8c714aa78c..a91e7e0954 100755 --- a/.update/patches +++ b/.update/patches @@ -1509,20 +1509,8 @@ map $arg_v $asset_immutable { Patch_9_2() { - # NanoPi R4S: Solve Ethernet adapter disappearing on soft reboot: https://github.com/MichaIng/DietPi/issues/6342 - if (( $G_HW_MODEL == 47 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-current-rockchip64 2> /dev/null)" lt-nl 24.2.0 - then - G_DIETPI-NOTIFY 2 'Updating NanoPi R4S kernel ...' - G_EXEC_OUTPUT=1 G_EXEC curl -fo package1.deb 'https://dietpi.com/downloads/binaries/linux-image-current-rockchip64.deb' - G_EXEC_OUTPUT=1 G_EXEC curl -fo package2.deb 'https://dietpi.com/downloads/binaries/linux-dtb-current-rockchip64.deb' - G_EXEC_OUTPUT=1 G_EXEC curl -fo package3.deb 'https://dietpi.com/downloads/binaries/armbian-firmware.deb' - local headers=() - dpkg-query -s 'linux-headers-current-rockchip64' &> /dev/null && { G_EXEC_OUTPUT=1 G_EXEC curl -fo package4.deb 'https://dietpi.com/downloads/binaries/linux-headers-current-rockchip64.deb'; headers=('package4.deb'); } - G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package1.deb package2.deb package3.deb "${headers[@]}" - G_EXEC rm package1.deb package2.deb package3.deb "${headers[@]}" - # Quartz64 - elif (( $G_HW_MODEL == 49 )) + if (( $G_HW_MODEL == 49 )) then for i in quartz64{a,b} soquartz do From 924fb20020013952cd8c5515a467dfaaa55836dc Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 13 Apr 2024 21:34:09 +0200 Subject: [PATCH 081/458] v9.3 - DietPi-Installer | Some cleanup --- .build/images/dietpi-installer | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 4485fb1e5b..149af68314 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1194,7 +1194,7 @@ _EOF_ elif (( $G_HW_MODEL == 74 )) then G_AGI device-tree-compiler - [[ -d '/boot/overlay-user' ]] || G_EXEC mkdir /boot/overlay-user + G_EXEC mkdir -p /boot/overlay-user cat << '_EOF_' > /boot/overlay-user/dietpi-usb-otg.dts /dts-v1/; /plugin/; @@ -1285,6 +1285,14 @@ _EOF_ [[ -f '/etc/apt/trusted.gpg' ]] && G_EXEC rm /etc/apt/trusted.gpg [[ -f '/etc/apt/trusted.gpg~' ]] && G_EXEC rm '/etc/apt/trusted.gpg~' + # Skip creating kernel symlinks and remove existing ones + if [[ -L '/vmlinuz' ]] + then + G_DIETPI-NOTIFY 2 'Preventing obsolete kernel and initramfs symlink generation' + G_EXEC eval 'echo '\''do_symlinks=0'\'' > /etc/kernel-img.conf' + G_EXEC rm -f /{initrd.img,vmlinuz}{,.old} + fi + # Quartz64 elif [[ $G_HW_MODEL == 49 && $(findmnt -Ufnro TARGET -T /boot) == '/' ]] then @@ -1476,10 +1484,6 @@ _EOF_ if dpkg-query -s 'armbian-firmware' &> /dev/null then aPACKAGES_REQUIRED_INSTALL+=('armbian-firmware') - - elif dpkg-query -s 'orangepi-firmware' &> /dev/null - then - aPACKAGES_REQUIRED_INSTALL+=('orangepi-firmware') else aPACKAGES_REQUIRED_INSTALL+=('firmware-linux-free') # Free misc aPACKAGES_REQUIRED_INSTALL+=('firmware-misc-nonfree') # Non-free misc incl. Ralink and MediaTek WiFi/BT From ec9206f337856c371486d0cf8a67b3156a1cc081 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 14 Apr 2024 14:57:09 +0200 Subject: [PATCH 082/458] v9.3 - General | Remove trailing slash from APT repos, which are redundant and removed internally. It can make sense for complete (dir) URLs to avoid a redirect, but APT repo URLs are never called as is but final "Release" and "Packages" URLs created from them. We hence save those few bits. --- .build/images/dietpi-installer | 6 +++--- .update/pre-patches | 10 +++++----- dietpi.txt | 4 ++-- dietpi/dietpi-config | 28 ++++++++++++++-------------- dietpi/dietpi-software | 28 ++++++++++++++-------------- dietpi/func/dietpi-set_software | 8 ++++---- 6 files changed, 42 insertions(+), 42 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 149af68314..b21bf8f8eb 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -964,7 +964,7 @@ setenv rootuuid "true"' /boot/boot.cmd fi # Assure that dir for additional sources is present - [[ -d '/etc/apt/sources.list.d' ]] || G_EXEC mkdir /etc/apt/sources.list.d + G_EXEC mkdir -p /etc/apt/sources.list.d ### Kernel/bootloader/initramfs packages: We need to install those directly to allow G_AGA() autoremove possible older packages later: https://github.com/MichaIng/DietPi/issues/1285#issuecomment-354602594 @@ -1037,7 +1037,7 @@ _EOF_ # Remove obsolete lists G_EXEC rm -Rf /etc/apt/sources.list.d/* # Add Armbian repository - G_EXEC eval "echo 'deb https://apt.armbian.com/ ${DISTRO_TARGET_NAME/bullseye/bookworm} main' > /etc/apt/sources.list.d/dietpi-armbian.list" + G_EXEC eval "echo 'deb https://apt.armbian.com ${DISTRO_TARGET_NAME/bullseye/bookworm} main' > /etc/apt/sources.list.d/dietpi-armbian.list" # Update APT lists G_AGUP # Install kernel, device tree, U-Boot, firmware and initramfs packages @@ -1448,7 +1448,7 @@ _EOF_ # Remove obsolete components from Armbian list and connect via HTTPS G_EXEC rm -Rf /etc/apt/sources.list.d/{,.??,.[^.]}* - G_EXEC eval "echo 'deb https://apt.armbian.com/ $DISTRO_TARGET_NAME main' > /etc/apt/sources.list.d/dietpi-armbian.list" + G_EXEC eval "echo 'deb https://apt.armbian.com $DISTRO_TARGET_NAME main' > /etc/apt/sources.list.d/dietpi-armbian.list" # Skip creating kernel symlinks and remove existing ones if [[ -L '/vmlinuz' ]] diff --git a/.update/pre-patches b/.update/pre-patches index de6302c9bb..e650adb30e 100755 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -161,7 +161,7 @@ fi if (( $G_DIETPI_VERSION_CORE < 8 || ( $G_DIETPI_VERSION_CORE == 8 && $G_DIETPI_VERSION_SUB < 11 ) )) && [[ -f '/etc/apt/sources.list.d/grafana.list' ]] then G_DIETPI-NOTIFY 2 'Updating Grafana APT list to use the new repository: https://grafana.com/docs/grafana/latest/setup-grafana/installation/debian/#repository-migration-november-8th-2022' - G_EXEC eval "echo 'deb https://apt.grafana.com/ stable main' > /etc/apt/sources.list.d/grafana.list" + G_EXEC eval "echo 'deb https://apt.grafana.com stable main' > /etc/apt/sources.list.d/grafana.list" fi # v8.13 @@ -283,14 +283,14 @@ then if (( $G_HW_ARCH == 11 )) then G_DIETPI-NOTIFY 2 'Migrating from Debian ports to regular Debian Sid repository, which now supports RISC-V' - G_EXEC eval 'echo '\''deb https://deb.debian.org/debian/ sid main contrib non-free non-free-firmware'\'' > /etc/apt/sources.list' + G_EXEC eval 'echo '\''deb https://deb.debian.org/debian sid main contrib non-free non-free-firmware'\'' > /etc/apt/sources.list' dpkg-query -s 'debian-ports-archive-keyring' &> /dev/null && G_EXEC apt-mark auto debian-ports-archive-keyring # RPi/ARMv6 container Bookworm elif [[ $G_DISTRO -ge 7 && -f '/etc/apt/sources.list.d/raspi.list' ]] then G_DIETPI-NOTIFY 2 'Migrating RPi APT repository to Bookworm' - G_EXEC eval 'echo '\''deb https://archive.raspberrypi.com/debian/ bookworm main'\'' > /etc/apt/sources.list.d/raspi.list' + G_EXEC eval 'echo '\''deb https://archive.raspberrypi.com/debian bookworm main'\'' > /etc/apt/sources.list.d/raspi.list' G_DIETPI-NOTIFY 2 'Removing faulty non-free-firmware component if present' (( $G_RASPBIAN )) && G_EXEC sed --follow-symlinks -i 's/ non-free-firmware$//' /etc/apt/sources.list @@ -395,11 +395,11 @@ fi # v9.3 if (( $G_DIETPI_VERSION_CORE < 9 || ( $G_DIETPI_VERSION_CORE == 9 && $G_DIETPI_VERSION_SUB < 3 ) )) then - # Update APT repo on Bullseye systems to Bookworm, but re-assure only kernel and firmware packages are pulled form it. Armbian dropped Bullseye support + # Update APT repo on Bullseye systems to Bookworm, but re-assure only kernel and firmware packages are pulled form it. Armbian dropped Bullseye support. if [[ $G_DISTRO == 6 && -f '/etc/apt/sources.list.d/dietpi-armbian.list' ]] then G_DIETPI-NOTIFY 2 'Moving EOL Armbian Bullseye repo to Bookworm for Debian-version-agnostic firmware and kernel upgrades' - cat << '_EOF_' > /etc/apt/preferences.d/dietpi-armbian + cat << '_EOF_' > /etc/apt/preferences.d/dietpi-armbian || exit 1 Package: * Pin: origin apt.armbian.com Pin-Priority: -1 diff --git a/dietpi.txt b/dietpi.txt index fdd5e82a8e..0a2d49965c 100644 --- a/dietpi.txt +++ b/dietpi.txt @@ -219,9 +219,9 @@ CONFIG_ENABLE_IPV6=1 # APT mirrors which are applied to /etc/apt/sources.list | Values here will also be applied during 1st run setup # - Raspbian: https://www.raspbian.org/RaspbianMirrors -CONFIG_APT_RASPBIAN_MIRROR=http://raspbian.raspberrypi.com/raspbian/ +CONFIG_APT_RASPBIAN_MIRROR=http://raspbian.raspberrypi.com/raspbian # - Debian: https://www.debian.org/mirror/official#list -CONFIG_APT_DEBIAN_MIRROR=https://deb.debian.org/debian/ +CONFIG_APT_DEBIAN_MIRROR=https://deb.debian.org/debian # NTP server(s) applied to /etc/systemd/timesyncd.conf # - "default": Use the NTP server(s) provided via DHCP, else the debian.pool.ntp.org NTP pool. diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index e586907567..549a17b264 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -3864,23 +3864,23 @@ Additional benchmarks: if (( $G_RASPBIAN )) then local mirror_list='https://www.raspbian.org/RaspbianMirrors/' - G_WHIP_MENU_ARRAY+=('http://raspbian.raspberrypi.org/raspbian/' ': Global mirror director (default)') - G_WHIP_MENU_ARRAY+=('https://mirror.ox.ac.uk/sites/archive.raspbian.org/archive/raspbian/' ': UK') - G_WHIP_MENU_ARRAY+=('https://mirror.netcologne.de/raspbian/raspbian/' ': Germany') - G_WHIP_MENU_ARRAY+=('https://mirror.umd.edu/raspbian/raspbian/' ': USA') - G_WHIP_MENU_ARRAY+=('https://mirrors.ustc.edu.cn/raspbian/raspbian/' ': China') - G_WHIP_MENU_ARRAY+=('http://raspbian.mirror.digitalpacific.com.au/raspbian/' ': Australia') + G_WHIP_MENU_ARRAY+=('http://raspbian.raspberrypi.org/raspbian' ': Global mirror director (default)') + G_WHIP_MENU_ARRAY+=('https://mirror.ox.ac.uk/sites/archive.raspbian.org/archive/raspbian' ': UK') + G_WHIP_MENU_ARRAY+=('https://mirror.netcologne.de/raspbian/raspbian' ': Germany') + G_WHIP_MENU_ARRAY+=('https://mirror.umd.edu/raspbian/raspbian' ': USA') + G_WHIP_MENU_ARRAY+=('https://mirrors.ustc.edu.cn/raspbian/raspbian' ': China') + G_WHIP_MENU_ARRAY+=('http://raspbian.mirror.digitalpacific.com.au/raspbian' ': Australia') # Debian else local mirror_list='https://www.debian.org/mirror/list' - G_WHIP_MENU_ARRAY+=('https://deb.debian.org/debian/' ': Global mirror director (default)') - G_WHIP_MENU_ARRAY+=('https://ftp.debian.org/debian/' ': Global') - G_WHIP_MENU_ARRAY+=('http://ftp.uk.debian.org/debian/' ': UK') - G_WHIP_MENU_ARRAY+=('http://ftp.de.debian.org/debian/' ': Germany') - G_WHIP_MENU_ARRAY+=('http://ftp.us.debian.org/debian/' ': USA') - G_WHIP_MENU_ARRAY+=('http://ftp.cn.debian.org/debian/' ': China') - G_WHIP_MENU_ARRAY+=('http://ftp.au.debian.org/debian/' ': Australia') + G_WHIP_MENU_ARRAY+=('https://deb.debian.org/debian' ': Global mirror director (default)') + G_WHIP_MENU_ARRAY+=('https://ftp.debian.org/debian' ': Global') + G_WHIP_MENU_ARRAY+=('http://ftp.uk.debian.org/debian' ': UK') + G_WHIP_MENU_ARRAY+=('http://ftp.de.debian.org/debian' ': Germany') + G_WHIP_MENU_ARRAY+=('http://ftp.us.debian.org/debian' ': USA') + G_WHIP_MENU_ARRAY+=('http://ftp.cn.debian.org/debian' ': China') + G_WHIP_MENU_ARRAY+=('http://ftp.au.debian.org/debian' ': Australia') fi G_WHIP_DEFAULT_ITEM=$apt_mirror_current @@ -3889,7 +3889,7 @@ Additional benchmarks: if [[ $G_WHIP_RETURNED_VALUE == 'Custom' ]] then G_WHIP_DEFAULT_ITEM=$apt_mirror_current - G_WHIP_INPUTBOX 'Please enter a new APT mirror, e.g. https://ftp.debian.org/debian/' || continue + G_WHIP_INPUTBOX 'Please enter a new APT mirror, e.g. https://ftp.debian.org/debian' || continue fi /boot/dietpi/func/dietpi-set_software apt-mirror "$G_WHIP_RETURNED_VALUE" || { failure='[FAILED] An internal error occurred, please report this issue to:\n - https://github.com/MichaIng/DietPi/issues\n\n'; continue; } diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 5198f0406a..121e3edf55 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3041,7 +3041,7 @@ unix_socket_directories = '/run/postgresql'" > "$i/00dietpi.conf" # - On Raspbian use separate suite: https://github.com/MichaIng/DietPi/issues/1023 local suite='buster' (( $G_RASPBIAN )) && suite='raspbianbuster' - G_EXEC eval "echo 'deb https://download.mono-project.com/repo/debian/ $suite main' > /etc/apt/sources.list.d/dietpi-mono.list" + G_EXEC eval "echo 'deb https://download.mono-project.com/repo/debian $suite main' > /etc/apt/sources.list.d/dietpi-mono.list" G_AGUP # APT package @@ -5039,7 +5039,7 @@ _EOF_ G_EXEC eval "curl -sSfL '$url' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-mopidy.gpg --yes" # APT list - G_EXEC eval "echo 'deb https://apt.mopidy.com/ ${G_DISTRO_NAME/bookworm/bullseye} main contrib non-free' > /etc/apt/sources.list.d/mopidy.list" + G_EXEC eval "echo 'deb https://apt.mopidy.com ${G_DISTRO_NAME/bookworm/bullseye} main contrib non-free' > /etc/apt/sources.list.d/mopidy.list" G_AGUP fi @@ -6695,7 +6695,7 @@ _EOF_ G_EXEC eval "curl -sSfL '$url' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-mosquitto.gpg --yes" # APT list - G_EXEC eval "echo 'deb https://repo.mosquitto.org/debian/ $G_DISTRO_NAME main' > /etc/apt/sources.list.d/dietpi-mosquitto.list" + G_EXEC eval "echo 'deb https://repo.mosquitto.org/debian $G_DISTRO_NAME main' > /etc/apt/sources.list.d/dietpi-mosquitto.list" G_AGUP fi @@ -7293,7 +7293,7 @@ _EOF_ G_EXEC eval "curl -sSfL '$url' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-influxdb.gpg --yes" # APT list - G_EXEC eval "echo 'deb https://repos.influxdata.com/debian/ ${G_DISTRO_NAME/bookworm/bullseye} stable' > /etc/apt/sources.list.d/influxdb.list" + G_EXEC eval "echo 'deb https://repos.influxdata.com/debian ${G_DISTRO_NAME/bookworm/bullseye} stable' > /etc/apt/sources.list.d/influxdb.list" G_AGUP # APT package @@ -7331,7 +7331,7 @@ _EOF_ G_EXEC eval "curl -sSfL '$url' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-grafana.gpg --yes" # APT list - G_EXEC eval "echo 'deb https://apt.grafana.com/ stable main' > /etc/apt/sources.list.d/grafana.list" + G_EXEC eval "echo 'deb https://apt.grafana.com stable main' > /etc/apt/sources.list.d/grafana.list" G_AGUP # APT package @@ -7791,7 +7791,7 @@ _EOF_ G_EXEC eval "curl -sSfL '$url' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-zerotier.gpg --yes" # APT list - G_EXEC eval "echo 'deb https://download.zerotier.com/debian/${G_DISTRO_NAME/trixie/bookworm}/ ${G_DISTRO_NAME/trixie/bookworm} main' > /etc/apt/sources.list.d/dietpi-zerotier.list" + G_EXEC eval "echo 'deb https://download.zerotier.com/debian/${G_DISTRO_NAME/trixie/bookworm} ${G_DISTRO_NAME/trixie/bookworm} main' > /etc/apt/sources.list.d/dietpi-zerotier.list" G_AGUP # APT package @@ -8285,7 +8285,7 @@ location = /.well-known/caldav { return 301 /baikal/html/dav.php; }' > /etc/ngi G_EXEC eval "curl -sSfL '$url' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-plexmediaserver.gpg --yes" # APT list - G_EXEC eval 'echo '\''deb https://downloads.plex.tv/repo/deb/ public main'\'' > /etc/apt/sources.list.d/plexmediaserver.list' + G_EXEC eval 'echo '\''deb https://downloads.plex.tv/repo/deb public main'\'' > /etc/apt/sources.list.d/plexmediaserver.list' G_AGUP # APT package @@ -9408,7 +9408,7 @@ _EOF_ 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' # 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' + G_EXEC eval 'echo '\''deb https://apt.sonarr.tv/debian buster main'\'' > /etc/apt/sources.list.d/sonarr.list' # Update package lists G_AGUP @@ -10029,7 +10029,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.22.2499/Readarr.develop.0.3.22.2499.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.23.2506/Readarr.develop.0.3.23.2506.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Readarr/Readarr/releases' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}" | head -1)" G_EXEC mv Readarr /opt/readarr fi @@ -10372,7 +10372,7 @@ _EOF_ G_EXEC eval "curl -sSfL '$url' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-docker.gpg --yes" # APT list - G_EXEC eval "echo 'deb https://download.docker.com/linux/$distro/ ${G_DISTRO_NAME/trixie/bookworm} stable' > /etc/apt/sources.list.d/docker.list" + G_EXEC eval "echo 'deb https://download.docker.com/linux/$distro ${G_DISTRO_NAME/trixie/bookworm} stable' > /etc/apt/sources.list.d/docker.list" G_AGUP # APT package name @@ -10766,7 +10766,7 @@ _EOF_ G_EXEC eval "curl -sSfL '$url' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-raspotify.gpg --yes" # 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/raspotify.list' G_AGUP # APT package @@ -10927,7 +10927,7 @@ _EOF_ G_EXEC eval "curl -sSfL '$url' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-jellyfin.gpg --yes" # APT list - G_EXEC eval "echo 'deb https://repo.jellyfin.org/debian/ $G_DISTRO_NAME main' > /etc/apt/sources.list.d/dietpi-jellyfin.list" + G_EXEC eval "echo 'deb https://repo.jellyfin.org/debian $G_DISTRO_NAME main' > /etc/apt/sources.list.d/dietpi-jellyfin.list" G_AGUP # APT meta package: Server, web component and FFmpeg implementation @@ -11077,7 +11077,7 @@ _EOF_ G_EXEC eval "curl -sSfL '$url' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-moonlight.gpg --yes" # APT list - G_EXEC eval "echo 'deb https://dl.cloudsmith.io/public/moonlight-game-streaming/moonlight-embedded/deb/raspbian/ ${G_DISTRO_NAME/trixie/bookworm} main' > /etc/apt/sources.list.d/dietpi-moonlight.list" + G_EXEC eval "echo 'deb https://dl.cloudsmith.io/public/moonlight-game-streaming/moonlight-embedded/deb/raspbian ${G_DISTRO_NAME/trixie/bookworm} main' > /etc/apt/sources.list.d/dietpi-moonlight.list" G_AGUP # APT deps @@ -11099,7 +11099,7 @@ _EOF_ G_EXEC eval "curl -sSfL '$url' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-moonlight-qt.gpg --yes" # APT list - G_EXEC eval "echo 'deb https://dl.cloudsmith.io/public/moonlight-game-streaming/moonlight-qt/deb/raspbian/ ${G_DISTRO_NAME/trixie/bookworm} main' > /etc/apt/sources.list.d/dietpi-moonlight-qt.list" + G_EXEC eval "echo 'deb https://dl.cloudsmith.io/public/moonlight-game-streaming/moonlight-qt/deb/raspbian ${G_DISTRO_NAME/trixie/bookworm} main' > /etc/apt/sources.list.d/dietpi-moonlight-qt.list" G_AGUP # Install: libgl1 required, else start from console prints "SDL Error: Can't load EGL/GL library on window creation.", the GUI says it cannot find a video decoder and streaming does not start. diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index 93e7b1fb27..50c9abb995 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -114,17 +114,17 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R [[ $INPUT_MODE_VALUE ]] || { Unknown_Input_Mode; return 1; } # RPi Trixie: Suite does not exist yet: https://archive.raspberrypi.com/debian/dists/ - (( $G_HW_MODEL < 10 || ( $G_HW_MODEL == 75 && ${G_RASPBIAN:-0} == 1 ) )) && G_EXEC eval "echo 'deb https://archive.raspberrypi.com/debian/ ${G_DISTRO_NAME/trixie/bookworm} main' > /etc/apt/sources.list.d/raspi.list" + (( $G_HW_MODEL < 10 || ( $G_HW_MODEL == 75 && ${G_RASPBIAN:-0} == 1 ) )) && G_EXEC eval "echo 'deb https://archive.raspberrypi.com/debian ${G_DISTRO_NAME/trixie/bookworm} main' > /etc/apt/sources.list.d/raspi.list" # RISC-V: Provided via Sid only if (( $G_HW_ARCH == 11 )) then - G_EXEC eval 'echo '\''deb https://deb.debian.org/debian/ sid main contrib non-free non-free-firmware'\'' > /etc/apt/sources.list' + G_EXEC eval 'echo '\''deb https://deb.debian.org/debian sid main contrib non-free non-free-firmware'\'' > /etc/apt/sources.list' # Raspbian elif (( $G_RASPBIAN )) then - [[ $INPUT_MODE_VALUE == 'default' ]] && INPUT_MODE_VALUE='http://raspbian.raspberrypi.com/raspbian/' + [[ $INPUT_MODE_VALUE == 'default' ]] && INPUT_MODE_VALUE='http://raspbian.raspberrypi.com/raspbian' G_EXEC eval "echo 'deb $INPUT_MODE_VALUE $G_DISTRO_NAME main contrib non-free' > /etc/apt/sources.list" @@ -137,7 +137,7 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R G_EXEC eval "echo 'deb $INPUT_MODE_VALUE $G_DISTRO_NAME main contrib non-free deb $INPUT_MODE_VALUE $G_DISTRO_NAME-updates main contrib non-free -deb https://deb.debian.org/debian-security/ $G_DISTRO_NAME-security main contrib non-free +deb https://deb.debian.org/debian-security $G_DISTRO_NAME-security main contrib non-free deb $INPUT_MODE_VALUE $G_DISTRO_NAME-backports main contrib non-free' > /etc/apt/sources.list" # Bookworm: non-free firmware has been moved to new component: https://deb.debian.org/debian/pool/ From 32d8d41bfb6b8af39e0f22329d946afbf7bdf557 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 14 Apr 2024 17:02:39 +0200 Subject: [PATCH 083/458] v9.3 - General | We added an own APT repository for own software and kernel/firmware builds. This simplifies updates for software packages like Squeezelite, vaultwarden and Amiberry, as well as allows us to provide own up-to-date kernel and bootloader packages, applied via regular "apt upgrade". A goal is also to become independent of some 3rd party repositories, which are regularly affected by network errors or provide packages updates too infrequently. --- .build/images/dietpi-installer | 2 +- .update/patches | 71 +++------------------------------ CHANGELOG.txt | 1 + dietpi/func/dietpi-set_software | 57 ++++++++++++++++++++++++++ 4 files changed, 65 insertions(+), 66 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index b21bf8f8eb..66fc2b9bee 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -816,7 +816,7 @@ setenv rootuuid "true"' /boot/boot.cmd G_DIETPI-NOTIFY 2 "Setting APT sources.list: $DISTRO_TARGET_NAME $DISTRO_TARGET" # We need to forward $DISTRO_TARGET* to dietpi-set_software, as well as $G_HW_MODEL + $G_RASPBIAN for Debian vs Raspbian decision. - G_DISTRO=$DISTRO_TARGET G_DISTRO_NAME=$DISTRO_TARGET_NAME G_HW_ARCH=$G_HW_ARCH G_HW_MODEL=$G_HW_MODEL G_RASPBIAN=$G_RASPBIAN G_EXEC /boot/dietpi/func/dietpi-set_software apt-mirror default + G_DISTRO=$DISTRO_TARGET G_DISTRO_NAME=$DISTRO_TARGET_NAME G_HW_ARCH=$G_HW_ARCH G_HW_MODEL=$G_HW_MODEL G_RASPBIAN=$G_RASPBIAN HW_VARIANT=$HW_VARIANT G_EXEC /boot/dietpi/func/dietpi-set_software apt-mirror default # (Re)create DietPi runtime and logs dir, used by G_AGx G_EXEC mkdir -p /run/dietpi /var/tmp/dietpi/logs diff --git a/.update/patches b/.update/patches index a91e7e0954..603f27de3a 100755 --- a/.update/patches +++ b/.update/patches @@ -1314,16 +1314,8 @@ _EOF_ Patch_8_23() { - # RPi: Update raspberrypi-sys-mods: https://github.com/MichaIng/DietPi/issues/6666 - if (( $G_HW_MODEL < 10 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' raspberrypi-sys-mods 2> /dev/null)" lt-nl 2:20230510-dietpi2 - then - G_DIETPI-NOTIFY 2 'Updating raspberrypi-sys-mods package ...' - G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/raspberrypi-sys-mods.deb' - G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb - 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.59-dietpi1 + if (( $G_HW_MODEL == 81 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-visionfive2 2> /dev/null)" lt-nl 6.1.59-dietpi1 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' @@ -1404,19 +1396,6 @@ Patch_8_24() fi [[ -f '/etc/modprobe.d/dietpi-disable_bluetooth.conf' ]] || G_EXEC eval 'echo '\''sprdbt_tty'\'' > /etc/modules-load.d/dietpi-enable_bluetooth.conf' fi - - # Software updates and migrations - if [[ -f '/boot/dietpi/.installed' ]] - then - # Shairport Sync - if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[37\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' shairport-sync 2> /dev/null)" lt 4.3.2-dietpi2 - then - G_DIETPI-NOTIFY 2 'Updating Shairport Sync package ...' - G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/shairport-sync_$G_HW_ARCH_NAME.deb" - G_AGI ./package.deb - G_EXEC rm package.deb - fi - fi } Patch_8_25() @@ -1509,36 +1488,6 @@ map $arg_v $asset_immutable { Patch_9_2() { - # Quartz64 - if (( $G_HW_MODEL == 49 )) - then - for i in quartz64{a,b} soquartz - do - dpkg --compare-versions "$(dpkg-query -Wf '${Version}' "firmware-$i" 2> /dev/null)" lt-nl 6.7.4-dietpi1 || continue - G_DIETPI-NOTIFY 2 "Updating $i kernel and bootloader ..." - G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/firmware-$i.deb" - G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb - G_EXEC rm package.deb - break - done - - # VisionFive 2 - elif (( $G_HW_MODEL == 81 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-visionfive2 2> /dev/null)" lt-nl 6.1.81-dietpi1 - 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' - G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb - G_EXEC rm package.deb - - # Star64 - elif (( $G_HW_MODEL == 84 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-star64 2> /dev/null)" lt-nl 6.1.81-dietpi1 - then - G_DIETPI-NOTIFY 2 'Updating RISC-V PINE64 Star64 kernel ...' - G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/linux-image-star64.deb' - G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb - G_EXEC rm package.deb - fi - # Software updates and migrations if [[ -f '/boot/dietpi/.installed' ]] then @@ -1565,15 +1514,6 @@ Patch_9_2() fi fi - # Squeezelite - if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[36\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' squeezelite 2> /dev/null)" lt 2.0.0-1468-dietpi1 - then - G_DIETPI-NOTIFY 2 'Updating Squeezelite package ...' - G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/squeezelite_$G_HW_ARCH_NAME.deb" - G_AGI ./package.deb - G_EXEC rm package.deb - fi - # vaultwarden if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[183\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' vaultwarden 2> /dev/null)" lt 1.30.5-dietpi1 then @@ -1583,10 +1523,6 @@ Patch_9_2() G_EXEC rm -R /opt/vaultwarden [[ -f '/etc/systemd/system/vaultwarden.service' ]] && G_EXEC rm /etc/systemd/system/vaultwarden.service fi - G_DIETPI-NOTIFY 2 'Updating vaultwarden package ...' - G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/vaultwarden_$G_HW_ARCH_NAME.deb" - G_AGI ./package.deb - G_EXEC rm package.deb fi # Amiberry @@ -1602,6 +1538,11 @@ Patch_9_3() { # Purge ancient vmtouch which prevents /boot from being unmounted e.g. for RPi firmware migration: https://github.com/MichaIng/DietPi/issues/6819, https://github.com/MichaIng/DietPi/issues/6976 [[ -f '/etc/default/vmtouch' ]] && grep -q '/boot/dietpi' /etc/default/vmtouch && G_AGP vmtouch + + # Add DietPi APT repo + /boot/dietpi/dietpi-set_software apt-mirror dietpi + G_AGUP -v + (( $G_AGUP_COUNT )) && G_AGUG } # v6.35 => v7 migration diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 2d90214d98..b5a3c599cc 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,6 +2,7 @@ v9.3 (2024-04-13) Enhancements: +- General | We added an own APT repository for own software and kernel/firmware builds. This simplifies updates for software packages like Squeezelite, vaultwarden and Amiberry, as well as allows us to provide own up-to-date kernel and bootloader packages, applied via regular "apt upgrade". A goal is also to become independent of some 3rd party repositories, which are regularly affected by network errors or provide packages updates too infrequently. - DietPi-Config | Removed the 3.5mm audio option on Raspberry Pi 5, as it does not have a 3.5mm jack. Additionally, the KMS graphics driver is enabled OOTB when HDMI audio is selected, as the snd_bcm2835 driver does not work on Raspberry Pi 5. Many thanks to @JRK0469 for making us aware of this: https://dietpi.com/forum/t/19760 - DietPi-Software | Mosquitto: The official APT repository added support for 64-bit ARM on Bookworm, which is now used for our installation. - DietPi-Software | UnRAR: Debian added unrar packages for RISC-V, which are now used for our installation. diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index 50c9abb995..f018bb1a2c 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -113,6 +113,63 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R { [[ $INPUT_MODE_VALUE ]] || { Unknown_Input_Mode; return 1; } + # DietPi repo + [[ -f '/etc/apt/trusted.gpg.d/dietpi.asc' ]] || G_EXEC curl -sSf 'https://dietpi.com/apt/key.asc' -o /etc/apt/trusted.gpg.d/dietpi.asc + # - ARMv6: Since Debian cannot distinguish between ARMv6hf and ARMv7, both armhf, we use a dedicated main component for those. + local components='main' all_components='' + (( $G_HW_ARCH == 1 )) && components='main-armv6' + # - Additional components for SBC-specific packages and builds, some per distro version, some for all distro versions + [[ $G_HW_MODEL [2-5] ]] && components+=' rpi$G_HW_MODEL' + case $G_HW_MODEL in + [0-9]) all_components='rpi';; + 10) all_components='odroidc1';; + 49) + # Detect variant either based on $HW_VARIANT environment variable, existing "all" components or installed kernel/firmware package + case $HW_VARIANT in + 1) all_components='quartz64a';; + 2) all_components='quartz64b';; + 3) all_components='soquartz';; + *) + [[ -f '/etc/apt/sources.list.d/dietpi.list' ]] && all_components=$(sed -n '/ all /{s/^.* all //p;q}' /etc/apt/sources.list.d/dietpi.list) + [[ $all_components ]] || for i in quartz64{a,b} soquartz + do + dpkg-query -s "firmware-$i" &> /dev/null || continue + all_components=$i + break + done + ;; + esac + ;; + 61) all_components='nanopi2';; + 62) + # Detect variant either based on $HW_VARIANT environment variable, existing "all" components or installed U-Boot package + case $HW_VARIANT in + 1) all_components='nanopim3';; + 2) all_components='nanopifire3';; + *) + [[ -f '/etc/apt/sources.list.d/dietpi.list' ]] && all_components=$(sed -n '/ all /{s/^.* all //p;q}' /etc/apt/sources.list.d/dietpi.list) + [[ $all_components ]] || for i in nanopi{m,fire}3 + do + dpkg-query -s "linux-u-boot-$i-legacy" &> /dev/null || continue + all_components=$i + break + done + ;; + esac + ;; + 63) all_components='nanopim1';; + 66) all_components='nanopim1plus';; + 70) all_components='sparkysbc';; + 81) all_components='visionfive2';; + 84) all_components='star64';; + *) :;; + esac + G_EXEC eval "echo 'deb https://dietpi.com/apt $G_DISTRO_NAME $components' > /etc/apt/sources.list.d/dietpi.list" + [[ $all_components ]] && G_EXEC eval "echo 'deb https://dietpi.com/apt all $all_components' >> /etc/apt/sources.list.d/dietpi.list" + + # Exit path for quick DietPi-only repo updates + [[ $INPUT_MODE_VALUE == 'dietpi' ]] && return 0 + # RPi Trixie: Suite does not exist yet: https://archive.raspberrypi.com/debian/dists/ (( $G_HW_MODEL < 10 || ( $G_HW_MODEL == 75 && ${G_RASPBIAN:-0} == 1 ) )) && G_EXEC eval "echo 'deb https://archive.raspberrypi.com/debian ${G_DISTRO_NAME/trixie/bookworm} main' > /etc/apt/sources.list.d/raspi.list" From 232fb1309caa0bfe3c3f93bbe5c7b21df7bb31c8 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 14 Apr 2024 17:03:11 +0200 Subject: [PATCH 084/458] v9.3 - CHANGELOG | Update release date --- CHANGELOG.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index b5a3c599cc..e4099f1580 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,5 @@ v9.3 -(2024-04-13) +(2024-04-14) Enhancements: - General | We added an own APT repository for own software and kernel/firmware builds. This simplifies updates for software packages like Squeezelite, vaultwarden and Amiberry, as well as allows us to provide own up-to-date kernel and bootloader packages, applied via regular "apt upgrade". A goal is also to become independent of some 3rd party repositories, which are regularly affected by network errors or provide packages updates too infrequently. From 0df841a86117cf2e844a2b2fb44b016a3656101f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 14 Apr 2024 17:11:29 +0200 Subject: [PATCH 085/458] v9.3 - Coding | Address shellcheck annotations --- .update/patches | 2 ++ dietpi/func/dietpi-set_software | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.update/patches b/.update/patches index 603f27de3a..3bfc5f360a 100755 --- a/.update/patches +++ b/.update/patches @@ -38,6 +38,7 @@ export G_SERVICE_CONTROL=0 # ToDo: On RPi 4, the 64-bit kernel is now used by default, without "arm_64bit=1" set: https://forums.raspberrypi.com/viewtopic.php?p=2088935#p2088935 # - We could set "arm_64bit=0", but for now lets assure that 32-bit software is installed and see how it goes. This enables general support for RPi with 64-bit kernel running 32-bit userland. +# shellcheck disable=SC2034 [[ $G_HW_MODEL == [2-9] && $G_HW_ARCH == 3 && $(dpkg --print-architecture) == 'armhf' ]] && G_HW_ARCH=2 G_HW_ARCH_NAME='armv7l' # Version-based incremental patches @@ -1542,6 +1543,7 @@ Patch_9_3() # Add DietPi APT repo /boot/dietpi/dietpi-set_software apt-mirror dietpi G_AGUP -v + # shellcheck disable=SC2154 (( $G_AGUP_COUNT )) && G_AGUG } diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index f018bb1a2c..e774a8eeac 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -119,7 +119,7 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R local components='main' all_components='' (( $G_HW_ARCH == 1 )) && components='main-armv6' # - Additional components for SBC-specific packages and builds, some per distro version, some for all distro versions - [[ $G_HW_MODEL [2-5] ]] && components+=' rpi$G_HW_MODEL' + [[ $G_HW_MODEL == [2-5] ]] && components+=' rpi$G_HW_MODEL' case $G_HW_MODEL in [0-9]) all_components='rpi';; 10) all_components='odroidc1';; @@ -166,7 +166,7 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R esac G_EXEC eval "echo 'deb https://dietpi.com/apt $G_DISTRO_NAME $components' > /etc/apt/sources.list.d/dietpi.list" [[ $all_components ]] && G_EXEC eval "echo 'deb https://dietpi.com/apt all $all_components' >> /etc/apt/sources.list.d/dietpi.list" - + # Exit path for quick DietPi-only repo updates [[ $INPUT_MODE_VALUE == 'dietpi' ]] && return 0 From 2267bf81c228065bf0cbaa191d248d009bd408f4 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 14 Apr 2024 17:18:24 +0200 Subject: [PATCH 086/458] v9.3 - CHANGELOG | Extend APT repo changelog entry for those who want to browse it before the update - Coding | Address shellcheck annotations --- CHANGELOG.txt | 2 +- dietpi/func/dietpi-set_software | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index e4099f1580..5a2715a3bc 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,7 +2,7 @@ v9.3 (2024-04-14) Enhancements: -- General | We added an own APT repository for own software and kernel/firmware builds. This simplifies updates for software packages like Squeezelite, vaultwarden and Amiberry, as well as allows us to provide own up-to-date kernel and bootloader packages, applied via regular "apt upgrade". A goal is also to become independent of some 3rd party repositories, which are regularly affected by network errors or provide packages updates too infrequently. +- General | We added an own APT repository at https://dietpi.com/apt for own software and kernel/firmware builds. This simplifies updates for software packages like Squeezelite, vaultwarden and Amiberry, as well as allows us to provide own up-to-date kernel and bootloader packages, applied via regular "apt upgrade". A goal is also to become independent of some 3rd party repositories, which are regularly affected by network errors or provide packages updates too infrequently. - DietPi-Config | Removed the 3.5mm audio option on Raspberry Pi 5, as it does not have a 3.5mm jack. Additionally, the KMS graphics driver is enabled OOTB when HDMI audio is selected, as the snd_bcm2835 driver does not work on Raspberry Pi 5. Many thanks to @JRK0469 for making us aware of this: https://dietpi.com/forum/t/19760 - DietPi-Software | Mosquitto: The official APT repository added support for 64-bit ARM on Bookworm, which is now used for our installation. - DietPi-Software | UnRAR: Debian added unrar packages for RISC-V, which are now used for our installation. diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index e774a8eeac..b6f4c3cde9 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -119,12 +119,13 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R local components='main' all_components='' (( $G_HW_ARCH == 1 )) && components='main-armv6' # - Additional components for SBC-specific packages and builds, some per distro version, some for all distro versions - [[ $G_HW_MODEL == [2-5] ]] && components+=' rpi$G_HW_MODEL' + [[ $G_HW_MODEL == [2-5] ]] && components+=" rpi$G_HW_MODEL" case $G_HW_MODEL in [0-9]) all_components='rpi';; 10) all_components='odroidc1';; 49) # Detect variant either based on $HW_VARIANT environment variable, existing "all" components or installed kernel/firmware package + # shellcheck disable=SC2154 case $HW_VARIANT in 1) all_components='quartz64a';; 2) all_components='quartz64b';; @@ -143,6 +144,7 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R 61) all_components='nanopi2';; 62) # Detect variant either based on $HW_VARIANT environment variable, existing "all" components or installed U-Boot package + # shellcheck disable=SC2154 case $HW_VARIANT in 1) all_components='nanopim3';; 2) all_components='nanopifire3';; From 9b7e9136575ea41a49100c3a2d26a9a07d7605df Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 14 Apr 2024 17:33:27 +0200 Subject: [PATCH 087/458] v9.3 - DietPi-Software | vaultwarden: Remove pre-v8.7 cleanup from install script, as it is done via patches already. But restore manual DEB package install patch, since pre-v8.7 systems won't have any vaultwarden DEB package installed, hence it won't be upgraded from DietPi APT repo either. --- .update/patches | 11 ++++++----- dietpi/dietpi-software | 3 +-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.update/patches b/.update/patches index 3bfc5f360a..21def36056 100755 --- a/.update/patches +++ b/.update/patches @@ -1519,11 +1519,12 @@ Patch_9_2() if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[183\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' vaultwarden 2> /dev/null)" lt 1.30.5-dietpi1 then # Pre-v8.7 cleanup - if [[ -f '/opt/vaultwarden/target/release/vaultwarden' ]] - then - G_EXEC rm -R /opt/vaultwarden - [[ -f '/etc/systemd/system/vaultwarden.service' ]] && G_EXEC rm /etc/systemd/system/vaultwarden.service - fi + [[ -f '/opt/vaultwarden/target/release/vaultwarden' ]] && G_EXEC rm -R /opt/vaultwarden + [[ -f '/etc/systemd/system/vaultwarden.service' ]] && G_EXEC rm /etc/systemd/system/vaultwarden.service + G_DIETPI-NOTIFY 2 'Updating vaultwarden package ...' + G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/vaultwarden_$G_HW_ARCH_NAME.deb" + G_AGI ./package.deb + G_EXEC rm package.deb fi # Amiberry diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 121e3edf55..bf9a3d068c 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -4896,6 +4896,7 @@ The install script will now exit. After applying one of the the above, rerun die if To_Install 32 ympd # ympd then Download_Install "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/ympd_$G_HW_ARCH_NAME.deb" + G_EXEC systemctl stop ympd fi if To_Install 148 mympd # myMPD @@ -9260,8 +9261,6 @@ _EOF_ if To_Install 183 vaultwarden # vaultwarden then - [[ -f '/opt/vaultwarden/target/release/vaultwarden' ]] && G_EXEC rm -R /opt/vaultwarden # Pre-v8.7 - [[ -f '/etc/systemd/system/vaultwarden.service' ]] && G_EXEC rm /etc/systemd/system/vaultwarden.service # Pre-v8.7 Download_Install "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/vaultwarden_$G_HW_ARCH_NAME.deb" G_EXEC systemctl stop vaultwarden fi From 5f5af8a5b535e780042b2513491e3b2c82161fa9 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 14 Apr 2024 17:41:50 +0200 Subject: [PATCH 088/458] v9.3 - DietPi-Patches | Restore further manual DEB package installs, in cases where it is not assured that those are installed already, i.e. "lt" vs "lt-nl". --- .update/patches | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/.update/patches b/.update/patches index 21def36056..9c5ba613e3 100755 --- a/.update/patches +++ b/.update/patches @@ -713,6 +713,18 @@ Patch_8_7() G_DIETPI-NOTIFY 2 'Removing duplicate "cgroup_enable=memory" kernel command-line argument...' G_EXEC sed --follow-symlinks -i 's/ cgroup_enable=memory//' /boot/cmdline.txt done + + # vaultwarden + if [[ -f '/boot/dietpi/.installed' ]] && grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[183\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' vaultwarden 2> /dev/null)" lt 1.30.5-dietpi1 + then + # Pre-v8.7 cleanup + [[ -f '/opt/vaultwarden/target/release/vaultwarden' ]] && G_EXEC rm -R /opt/vaultwarden + [[ -f '/etc/systemd/system/vaultwarden.service' ]] && G_EXEC rm /etc/systemd/system/vaultwarden.service + G_DIETPI-NOTIFY 2 'Updating vaultwarden package ...' + G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/vaultwarden_$G_HW_ARCH_NAME.deb" + G_AGI ./package.deb + G_EXEC rm package.deb + fi } Patch_8_8(){ :; } @@ -1397,6 +1409,15 @@ Patch_8_24() fi [[ -f '/etc/modprobe.d/dietpi-disable_bluetooth.conf' ]] || G_EXEC eval 'echo '\''sprdbt_tty'\'' > /etc/modules-load.d/dietpi-enable_bluetooth.conf' fi + + # Shairport Sync + if [[ -f '/boot/dietpi/.installed' ]] && grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[37\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' shairport-sync 2> /dev/null)" lt 4.3.2-dietpi2 + then + G_DIETPI-NOTIFY 2 'Updating Shairport Sync package ...' + G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/shairport-sync_$G_HW_ARCH_NAME.deb" + G_AGI ./package.deb + G_EXEC rm package.deb + fi } Patch_8_25() @@ -1515,14 +1536,11 @@ Patch_9_2() fi fi - # vaultwarden - if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[183\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' vaultwarden 2> /dev/null)" lt 1.30.5-dietpi1 + # Squeezelite + if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[36\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' squeezelite 2> /dev/null)" lt 2.0.0-1468-dietpi1 then - # Pre-v8.7 cleanup - [[ -f '/opt/vaultwarden/target/release/vaultwarden' ]] && G_EXEC rm -R /opt/vaultwarden - [[ -f '/etc/systemd/system/vaultwarden.service' ]] && G_EXEC rm /etc/systemd/system/vaultwarden.service - G_DIETPI-NOTIFY 2 'Updating vaultwarden package ...' - G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/vaultwarden_$G_HW_ARCH_NAME.deb" + G_DIETPI-NOTIFY 2 'Updating Squeezelite package ...' + G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/squeezelite_$G_HW_ARCH_NAME.deb" G_AGI ./package.deb G_EXEC rm package.deb fi From 2d3e7de7658158114af01e3674f68565dbe33ae7 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 14 Apr 2024 17:45:32 +0200 Subject: [PATCH 089/458] v9.3 - DietPi-Patches | Fix script path --- .update/patches | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.update/patches b/.update/patches index 9c5ba613e3..d4bcc7f4e8 100755 --- a/.update/patches +++ b/.update/patches @@ -1560,7 +1560,7 @@ Patch_9_3() [[ -f '/etc/default/vmtouch' ]] && grep -q '/boot/dietpi' /etc/default/vmtouch && G_AGP vmtouch # Add DietPi APT repo - /boot/dietpi/dietpi-set_software apt-mirror dietpi + /boot/dietpi/func/dietpi-set_software apt-mirror dietpi G_AGUP -v # shellcheck disable=SC2154 (( $G_AGUP_COUNT )) && G_AGUG From 5ed62efb8afbc8f09045d4e779695756656181e4 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 14 Apr 2024 17:55:49 +0200 Subject: [PATCH 090/458] v9.3 - CHANGELOG | Add v9.3 PR link --- CHANGELOG.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 5a2715a3bc..11a2610a26 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -11,7 +11,7 @@ Bug fixes: - Raspberry Pi 5 | Fixed X11/desktop startup if KMS is enabled. Many thanks to @denguido for reporting the issue and solution: https://dietpi.com/forum/t/19760 - DietPi-Software | Logitech Media Server: Resolved an issue where the install failed due to a changed download URL. Many thanks to @JRK0469 for reporting this issue: https://github.com/MichaIng/DietPi/issues/6992 -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/7016 ----------------------------------------------------------------------------------------------------------- From 1de8f642065402e3a0d6359d746a8b6b6da0a8ab Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 15 Apr 2024 12:47:42 +0200 Subject: [PATCH 091/458] v9.4 - CHANGELOG | Fix typo and wrong user acknowledgement --- CHANGELOG.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 11a2610a26..4693fdd0b0 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,8 +2,8 @@ v9.3 (2024-04-14) Enhancements: -- General | We added an own APT repository at https://dietpi.com/apt for own software and kernel/firmware builds. This simplifies updates for software packages like Squeezelite, vaultwarden and Amiberry, as well as allows us to provide own up-to-date kernel and bootloader packages, applied via regular "apt upgrade". A goal is also to become independent of some 3rd party repositories, which are regularly affected by network errors or provide packages updates too infrequently. -- DietPi-Config | Removed the 3.5mm audio option on Raspberry Pi 5, as it does not have a 3.5mm jack. Additionally, the KMS graphics driver is enabled OOTB when HDMI audio is selected, as the snd_bcm2835 driver does not work on Raspberry Pi 5. Many thanks to @JRK0469 for making us aware of this: https://dietpi.com/forum/t/19760 +- General | We added an own APT repository at https://dietpi.com/apt for own software and kernel/firmware builds. This simplifies updates for software packages like Squeezelite, vaultwarden and Amiberry, as well as allows us to provide own up-to-date kernel and bootloader packages, applied via regular "apt upgrade". A goal is also to become independent of some 3rd party repositories, which are regularly affected by network errors or provide package updates too infrequently. +- DietPi-Config | Removed the 3.5mm audio option on Raspberry Pi 5, as it does not have a 3.5mm jack. Additionally, the KMS graphics driver is enabled OOTB when HDMI audio is selected, as the snd_bcm2835 driver does not work on Raspberry Pi 5. Many thanks to @denguido for making us aware of this: https://dietpi.com/forum/t/19760 - DietPi-Software | Mosquitto: The official APT repository added support for 64-bit ARM on Bookworm, which is now used for our installation. - DietPi-Software | UnRAR: Debian added unrar packages for RISC-V, which are now used for our installation. From 7a9d5a7bd6096caf80699c1e2ac54dae81f8250b Mon Sep 17 00:00:00 2001 From: StephanStS Date: Mon, 15 Apr 2024 21:37:00 +0200 Subject: [PATCH 092/458] Init v9.4 (#7021) * Init v9.4 * Fix v9.4 software array --------- Co-authored-by: MichaIng --- .meta/dietpi-survey_report | 3 ++- .update/version | 4 ++-- CHANGELOG.txt | 11 +++++++++++ dietpi/func/dietpi-globals | 4 ++-- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index c601631b40..367bbc9790 100755 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -713,10 +713,11 @@ shopt -s extglob aSOFTWARE_NAME9_1[i]=${aSOFTWARE_NAME9_0[i]} aSOFTWARE_NAME9_2[i]=${aSOFTWARE_NAME9_1[i]} aSOFTWARE_NAME9_3[i]=${aSOFTWARE_NAME9_2[i]} + aSOFTWARE_NAME9_4[i]=${aSOFTWARE_NAME9_3[i]} done # Pre-create software counter array so that we can see also software (available in newest version) with 0 installs - for i in "${aSOFTWARE_NAME9_3[@]}" + for i in "${aSOFTWARE_NAME9_4[@]}" do aSOFTWARE[$i]=0 done diff --git a/.update/version b/.update/version index a54ce2d4d0..e2d57b846a 100644 --- a/.update/version +++ b/.update/version @@ -2,8 +2,8 @@ # shellcheck disable=SC2034 # Available DietPi version G_REMOTE_VERSION_CORE=9 -G_REMOTE_VERSION_SUB=3 -G_REMOTE_VERSION_RC=0 +G_REMOTE_VERSION_SUB=4 +G_REMOTE_VERSION_RC=-1 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=7 G_MIN_VERSION_SUB=0 diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 4693fdd0b0..3dcfeb81b7 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,14 @@ +v9.4 +(2024-05-12) + +Enhancements: + +Bug fixes: + +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 + +----------------------------------------------------------------------------------------------------------- + v9.3 (2024-04-14) diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 3f3cf3a3a1..73cf65d6e7 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -54,8 +54,8 @@ [[ -f '/boot/dietpi/.version' ]] && . /boot/dietpi/.version # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=9 - [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=3 - [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=0 + [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=4 + [[ $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 From 6a5870763add677476a903d9ad9fae4e62bc0ea6 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 16 Apr 2024 23:58:09 +0200 Subject: [PATCH 093/458] v9.4 - APT | Add "nanopir5c" component to ship new U-Boot package for NanoPi R5C, which fixes PCIe WiFi --- dietpi/func/dietpi-set_software | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index b6f4c3cde9..55c50d1fc3 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -162,6 +162,23 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R 63) all_components='nanopim1';; 66) all_components='nanopim1plus';; 70) all_components='sparkysbc';; + 76) + # Detect variant either based on $HW_VARIANT environment variable, existing "all" components or installed U-Boot package + # shellcheck disable=SC2154 + case $HW_VARIANT in + 1) all_components='';; # no R5S component is available yet + 2) all_components='nanopir5c';; + *) + [[ -f '/etc/apt/sources.list.d/dietpi.list' ]] && all_components=$(sed -n '/ all /{s/^.* all //p;q}' /etc/apt/sources.list.d/dietpi.list) + [[ $all_components ]] || for i in nanopi-r5c + do + dpkg-query -s "linux-u-boot-$i-current" &> /dev/null || continue + all_components=${i/-//} + break + done + ;; + esac + ;; 81) all_components='visionfive2';; 84) all_components='star64';; *) :;; From 240756b83402e2e0334e266735e0009637f8411f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 17 Apr 2024 00:42:37 +0200 Subject: [PATCH 094/458] v9.4 - DietPi-Installer | Install self-hosted kernel/firmware packages via our APT repository and cleanup dpkg/ucf config files across the whole system, instead of removing those from our kernel/firmware packages individually --- .build/images/dietpi-installer | 38 ++++++--------------------------- dietpi/func/dietpi-set_software | 1 + 2 files changed, 8 insertions(+), 31 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 66fc2b9bee..bc22674084 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1301,55 +1301,31 @@ _EOF_ 3) variant='soquartz';; *) variant='quartz64a';; esac - G_EXEC curl -sSfo package.deb "https://dietpi.com/downloads/binaries/firmware-$variant.deb" - G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb - G_EXEC rm package.deb - aPACKAGES_REQUIRED_INSTALL+=("firmware-$variant") + G_AGI "firmware-$variant" # NanoPi M2/T2/Fire2 Linux 4.4: Requires dedicated boot partition, starting at 4 MiB for U-Boot, with ext4 filesystem elif [[ $G_HW_MODEL == 61 && $(findmnt -Ufnro FSTYPE -M /boot) == 'ext4' ]] && (( $(sfdisk -qlo Start "$BOOT_DEVICE" | mawk 'NR==2') >= 8192 )) then - G_EXEC curl -sSfo package.deb 'https://dietpi.com/downloads/binaries/firmware-nanopi2.deb' - G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb - G_EXEC rm package.deb - aPACKAGES_REQUIRED_INSTALL+=('firmware-nanopi2') + G_AGI firmware-nanopi2 # VisionFive 2 elif (( $G_HW_MODEL == 81 )) then - G_EXEC curl -sSfo package.deb 'https://dietpi.com/downloads/binaries/linux-image-visionfive2.deb' - dpkg-deb -I linux-image-visionfive2.deb conffiles | while read -r line - do - [[ -f $line ]] && G_EXEC rm "$line" - done - G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb - G_EXEC rm package.deb + G_AGI linux-image-visionfive2 libubootenv-tool G_EXEC sed --follow-symlinks -i "s/root=[^[:blank:]]*/root=PARTUUID=$(findmnt -Ufnro PARTUUID -M /)/" /boot/extlinux/extlinux.conf G_EXEC sed --follow-symlinks -i "s/rootfstype=[^[:blank:]]*/rootfstype=$(findmnt -Ufnro FSTYPE -M /)/" /boot/extlinux/extlinux.conf - aPACKAGES_REQUIRED_INSTALL+=('linux-image-visionfive2' 'libubootenv-tool') # Star64 elif (( $G_HW_MODEL == 84 )) then - G_EXEC curl -sSfo package.deb 'https://dietpi.com/downloads/binaries/linux-image-star64.deb' - dpkg-deb -I linux-image-star64.deb conffiles | while read -r line - do - [[ -f $line ]] && G_EXEC rm "$line" - done - G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb - G_EXEC rm package.deb + G_AGI linux-image-star64 libubootenv-tool G_EXEC sed --follow-symlinks -i "s/root=[^[:blank:]]*/root=PARTUUID=$(findmnt -Ufnro PARTUUID -M /)/" /boot/extlinux/extlinux.conf G_EXEC sed --follow-symlinks -i "s/rootfstype=[^[:blank:]]*/rootfstype=$(findmnt -Ufnro FSTYPE -M /)/" /boot/extlinux/extlinux.conf - aPACKAGES_REQUIRED_INSTALL+=('linux-image-star64' 'libubootenv-tool') # Sparky SBC elif (( $G_HW_MODEL == 70 )) then - G_EXEC curl -sSfo package.deb 'https://dietpi.com/downloads/binaries/firmware-sparkysbc.deb' - [[ -f '/boot/uenv.txt' ]] && G_EXEC rm /boot/uenv.txt - G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb - G_EXEC rm package.deb - aPACKAGES_REQUIRED_INSTALL+=('firmware-sparkysbc') + G_AGI firmware-sparkysbc G_EXEC curl -sSfo u-boot.gz 'https://dietpi.com/downloads/binaries/u-boot-sparkysbc.img.gz' G_EXEC gzip -d u-boot.gz @@ -1610,7 +1586,7 @@ _EOF_ [[ -d '/usr/share/calendar' ]] && G_EXEC rm -R /usr/share/calendar # - Unused DEB package config files - find /etc \( -name '?*\.dpkg-dist' -o -name '?*\.dpkg-old' -o -name '?*\.dpkg-new' -o -name '?*\.dpkg-bak' -o -name '?*\.dpkg-del' -o -name '?*\.ucf-dist' -o -name '?*\.ucf-old' -o -name '?*\.ucf-new' \) -exec rm -v {} + + find / \( -name '*?.dpkg-dist' -o -name '*?.dpkg-old' -o -name '*?.dpkg-new' -o -name '*?.dpkg-bak' -o -name '*?.dpkg-del' -o -name '*?.ucf-dist' -o -name '*?.ucf-old' -o -name '*?.ucf-new' \) -exec rm -v {} + # - Fonts [[ -d '/usr/share/fonts' ]] && G_EXEC rm -R /usr/share/fonts @@ -1753,7 +1729,7 @@ _EOF_ # - Enable /etc/bashrc.d/ support for custom interactive non-login shell scripts: sed --follow-symlinks -i '\#/etc/bashrc\.d/#d' /etc/bash.bashrc # shellcheck disable=SC2016 - echo 'for i in /etc/bashrc.d/*.sh /etc/bashrc.d/*.bash; do [ -r "$i" ] && . $i; done; unset -v i' >> /etc/bash.bashrc + echo 'for i in /etc/bashrc.d/*.sh /etc/bashrc.d/*.bash; do [ -r "$i" ] && . "$i"; done; unset -v i' >> /etc/bash.bashrc # - Enable bash-completion for non-login shells: # - NB: It is called twice on login shells then, but exits directly if called once already. G_EXEC ln -sf /etc/profile.d/bash_completion.sh /etc/bashrc.d/dietpi-bash_completion.sh diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index 55c50d1fc3..084da1888e 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -170,6 +170,7 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R 2) all_components='nanopir5c';; *) [[ -f '/etc/apt/sources.list.d/dietpi.list' ]] && all_components=$(sed -n '/ all /{s/^.* all //p;q}' /etc/apt/sources.list.d/dietpi.list) + # shellcheck disable=SC2043 [[ $all_components ]] || for i in nanopi-r5c do dpkg-query -s "linux-u-boot-$i-current" &> /dev/null || continue From 511d7a94d8f545c78b3426260cfe3d3d6bb7ba5a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 17 Apr 2024 00:54:01 +0200 Subject: [PATCH 095/458] v9.4 - DietPi-Installer | Do not remove dietpi.list and fix Bullseye suite on Armbian-based images --- .build/images/dietpi-installer | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index bc22674084..6a9814b96c 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1035,7 +1035,7 @@ _EOF_ [[ -f '/etc/apt/trusted.gpg' ]] && G_EXEC rm /etc/apt/trusted.gpg [[ -f '/etc/apt/trusted.gpg~' ]] && G_EXEC rm '/etc/apt/trusted.gpg~' # Remove obsolete lists - G_EXEC rm -Rf /etc/apt/sources.list.d/* + find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -Rf {} + # Add Armbian repository G_EXEC eval "echo 'deb https://apt.armbian.com ${DISTRO_TARGET_NAME/bullseye/bookworm} main' > /etc/apt/sources.list.d/dietpi-armbian.list" # Update APT lists @@ -1423,8 +1423,8 @@ _EOF_ [[ -f '/etc/apt/trusted.gpg~' ]] && G_EXEC rm '/etc/apt/trusted.gpg~' # Remove obsolete components from Armbian list and connect via HTTPS - G_EXEC rm -Rf /etc/apt/sources.list.d/{,.??,.[^.]}* - G_EXEC eval "echo 'deb https://apt.armbian.com $DISTRO_TARGET_NAME main' > /etc/apt/sources.list.d/dietpi-armbian.list" + find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -Rf {} + + G_EXEC eval "echo 'deb https://apt.armbian.com ${DISTRO_TARGET_NAME/bullseye/bookworm} main' > /etc/apt/sources.list.d/dietpi-armbian.list" # Skip creating kernel symlinks and remove existing ones if [[ -L '/vmlinuz' ]] From f0d69bb4adc0f0daa0841ffe5a343e2f19562832 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 17 Apr 2024 00:54:49 +0200 Subject: [PATCH 096/458] v9.4 - Coding | Remove trailing space --- dietpi/func/dietpi-set_software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index 084da1888e..0c07a26a6c 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -170,7 +170,7 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R 2) all_components='nanopir5c';; *) [[ -f '/etc/apt/sources.list.d/dietpi.list' ]] && all_components=$(sed -n '/ all /{s/^.* all //p;q}' /etc/apt/sources.list.d/dietpi.list) - # shellcheck disable=SC2043 + # shellcheck disable=SC2043 [[ $all_components ]] || for i in nanopi-r5c do dpkg-query -s "linux-u-boot-$i-current" &> /dev/null || continue From b3a7ebe04282c81515630872e6d9a1131cbaa4e4 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 17 Apr 2024 21:20:32 +0200 Subject: [PATCH 097/458] v9.4 - NanoPi R5C | New images, or when flashing the new bootloader binary via dietpi-config > Advanced Options > Update MMC bootloader, support M.2 WiFi modules. --- .update/patches | 6 ++++++ CHANGELOG.txt | 1 + 2 files changed, 7 insertions(+) diff --git a/.update/patches b/.update/patches index d4bcc7f4e8..551bd9e1f3 100755 --- a/.update/patches +++ b/.update/patches @@ -1566,6 +1566,12 @@ Patch_9_3() (( $G_AGUP_COUNT )) && G_AGUG } +Patch_9_4() +{ + # Update DietPi APT list for NanoPi R5C + (( $G_HW_MODEL == 76 )) && /boot/dietpi/func/dietpi-set_software apt-mirror dietpi +} + # v6.35 => v7 migration if (( $G_DIETPI_VERSION_CORE == 6 && $G_DIETPI_VERSION_SUB > 34 )) then diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 3dcfeb81b7..e546f85fa7 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,6 +2,7 @@ v9.4 (2024-05-12) Enhancements: +- NanoPi R5C | New images, or when flashing the new bootloader binary via dietpi-config > Advanced Options > Update MMC bootloader, support M.2 WiFi modules. Bug fixes: From 68da00a416a212d314a72688783329a2b7d07c12 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 18 Apr 2024 17:43:50 +0200 Subject: [PATCH 098/458] v9.4 - DietPi-Software | Update some fallback URLs and new (additional) Mosquitto APT key --- dietpi/dietpi-software | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index bf9a3d068c..21831cc080 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6691,7 +6691,7 @@ _EOF_ if (( $G_DISTRO < 8 )) && [[ $G_HW_ARCH == 2 || $G_HW_ARCH == 10 || ( $G_HW_ARCH == 3 && $G_DISTRO == 7 ) ]] then # APT key - local url='https://repo.mosquitto.org/debian/mosquitto-repo.gpg.key' + local url='https://repo.mosquitto.org/debian/mosquitto-repo.gpg' G_CHECK_URL "$url" G_EXEC eval "curl -sSfL '$url' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-mosquitto.gpg --yes" @@ -7434,7 +7434,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/1.10.4/komga-1.10.4.jar' + local fallback_url='https://github.com/gotson/komga/releases/download/1.11.0/komga-1.11.0.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 @@ -10592,7 +10592,7 @@ _EOF_ *) local arch='arm-6';; esac - local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.21.10/gitea-1.21.10-linux-$arch.xz" + local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.21.11/gitea-1.21.11-linux-$arch.xz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/go-gitea/gitea/releases/latest' | mawk -F\" "/\"browser_download_url\": \".*\/gitea-[^\"\/]*-linux-$arch\.xz\"/{print \$4}")" /mnt/dietpi_userdata/gitea/gitea # User From c9cc8df4d6a5ec4e9e5b9f7325c2b7023f027efe Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 18 Apr 2024 18:37:16 +0200 Subject: [PATCH 099/458] v9.4 - General | Our scripts do now internally enforce the default umask 0022. Many config and install options rely on this, hence it can cause issues when e.g. 0027 (deny read access for "other" users) has been applied on the parent shell. This affects only the (sub)shell of our scripts, while the current and default umask of parent and of shells/consoles remains untouched. --- CHANGELOG.txt | 1 + dietpi/func/dietpi-globals | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index e546f85fa7..d03de731bc 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,6 +2,7 @@ v9.4 (2024-05-12) Enhancements: +- General | Our scripts do now internally enforce the default umask 0022. Many config and install options rely on this, hence it can cause issues when e.g. 0027 (deny read access for "other" users) has been applied on the parent shell. This affects only the (sub)shell of our scripts, while the current and default umask of parent and of shells/consoles remains untouched. - NanoPi R5C | New images, or when flashing the new bootloader binary via dietpi-config > Advanced Options > Update MMC bootloader, support M.2 WiFi modules. Bug fixes: diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 73cf65d6e7..ecea008fc3 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -80,6 +80,9 @@ G_GITOWNER='$G_GITOWNER'" > /boot/dietpi/.version # Set PATH to expected default to rule out issues due to broken environment, e.g. in combination with "su" or "sudo -E" export LC_ALL='C.UTF-8' LANG='C.UTF-8' PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' + # Enforce default umask: https://github.com/MichaIng/DietPi/issues/7022 + umask 0022 + # Set G_PROGRAM_NAME to originating script file (or shell executable) name if it was not set by originating script [[ $G_PROGRAM_NAME ]] || readonly G_PROGRAM_NAME=${0##*/} From 58ef73dbfe27ca78971e70fffbce9db2e101d821 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 18 Apr 2024 22:18:34 +0200 Subject: [PATCH 100/458] v9.4 - DietPi-Software | Install packages we host on our APT repository from there, and move some migration steps to update patches --- .update/patches | 32 ++++++++++++++++++++++++-------- dietpi/dietpi-software | 25 +++++-------------------- 2 files changed, 29 insertions(+), 28 deletions(-) diff --git a/.update/patches b/.update/patches index 551bd9e1f3..a92b6c5d5b 100755 --- a/.update/patches +++ b/.update/patches @@ -1231,14 +1231,6 @@ Patch_8_19() # Mopidy: Bullseye suite now available in official APT repo [[ -f '/etc/apt/sources.list.d/mopidy.list' ]] && grep -q buster /etc/apt/sources.list.d/mopidy.list && G_EXEC sed --follow-symlinks -i 's/buster/bullseye/' /etc/apt/sources.list.d/mopidy.list - # GMediaRender - grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[163\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' gmediarender 2> /dev/null)" lt 0.1-dietpi1 && G_WHIP_MSG '[ INFO ] GMediaRender update available -\nAn update to GMediaRender 0.1 is available. -Release notes: https://github.com/hzeller/gmrender-resurrect/releases -\nDo you want to apply the update now? -\nYou can manually apply it any time via: -# dietpi-software reinstall 163' && echo 163 >> /var/tmp/dietpi/dietpi-update_reinstalls - # ympd if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[32\]=2' /boot/dietpi/.installed then @@ -1570,6 +1562,30 @@ Patch_9_4() { # Update DietPi APT list for NanoPi R5C (( $G_HW_MODEL == 76 )) && /boot/dietpi/func/dietpi-set_software apt-mirror dietpi + + if [[ -f '/boot/dietpi/.installed' ]] + then + # GMediaRender + if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[163\]=2' /boot/dietpi/.installed && ! dpkg-query -s 'gmediarender' &> /dev/null + then + # Pre-v8.10 + G_DIETPI-NOTIFY 2 'Updateing GMediaRender ...' + [[ -f '/etc/systemd/system/gmediarender.service' ]] && G_EXEC rm /etc/systemd/system/gmediarender.service + [[ -d '/etc/systemd/system/gmediarender.service.d' ]] && grep -Rq '/usr/local/bin/gmediarender' /etc/systemd/system/gmediarender.service.d && G_EXEC rm -R /etc/systemd/system/gmediarender.service.d + getent passwd gmrender > /dev/null && G_EXEC userdel gmrender + getent group gmrender > /dev/null && G_EXEC groupdel gmrender + [[ -f '/usr/local/bin/gmediarender' ]] && G_EXEC rm /usr/local/bin/gmediarender + [[ -d '/usr/local/share/gmediarender' ]] && G_EXEC rm -R /usr/local/share/gmediarender + G_AGI gmediarender + fi + + # Shairport Sync + if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[37\]=2' /boot/dietpi/.installed + then + [[ -f '/usr/local/share/man/man7/shairport-sync.7.gz' ]] && G_EXEC rm /usr/local/share/man/man7/shairport-sync.7.gz + [[ -d '/usr/local/share/man/man7' ]] G_EXEC rmdir -p --ignore-fail-on-non-empty /usr/local/share/man/man7 + fi + fi } # v6.35 => v7 migration diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 21831cc080..3c3f3c44da 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -4895,7 +4895,7 @@ The install script will now exit. After applying one of the the above, rerun die if To_Install 32 ympd # ympd then - Download_Install "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/ympd_$G_HW_ARCH_NAME.deb" + G_AGI ympd G_EXEC systemctl stop ympd fi @@ -8034,7 +8034,7 @@ _EOF_ airplay2= fi - Download_Install "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/shairport-sync${airplay2}_$G_HW_ARCH_NAME.deb" + G_AGI shairport-sync G_EXEC systemctl stop shairport-sync fi @@ -8120,7 +8120,7 @@ _EOF_ if To_Install 36 squeezelite # Squeezelite then - Download_Install "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/squeezelite_$G_HW_ARCH_NAME.deb" + G_AGI squeezelite G_EXEC systemctl stop squeezelite fi @@ -9261,7 +9261,7 @@ _EOF_ if To_Install 183 vaultwarden # vaultwarden then - Download_Install "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/vaultwarden_$G_HW_ARCH_NAME.deb" + G_AGI vaultwarden G_EXEC systemctl stop vaultwarden fi @@ -10633,14 +10633,7 @@ _EOF_ if To_Install 163 gmediarender # GMediaRender then - # Pre-v8.10 - [[ -f '/etc/systemd/system/gmediarender.service' ]] && G_EXEC rm /etc/systemd/system/gmediarender.service - [[ -d '/etc/systemd/system/gmediarender.service.d' ]] && grep -Rq '/usr/local/bin/gmediarender' /etc/systemd/system/gmediarender.service.d && G_EXEC rm -R /etc/systemd/system/gmediarender.service.d - getent passwd gmrender > /dev/null && G_EXEC userdel gmrender - getent group gmrender > /dev/null && G_EXEC groupdel gmrender - [[ -f '/usr/local/bin/gmediarender' ]] && G_EXEC rm /usr/local/bin/gmediarender - [[ -d '/usr/local/share/gmediarender' ]] && G_EXEC rm -R /usr/local/share/gmediarender - Download_Install "https://dietpi.com/downloads/binaries/$G_DISTRO_NAME/gmediarender_$G_HW_ARCH_NAME.deb" + G_AGI gmediarender G_EXEC systemctl stop gmediarender fi @@ -12816,10 +12809,6 @@ If no WireGuard (auto)start is included, but you require it, please do the follo if To_Uninstall 37 # Shairport Sync then G_AGP shairport-sync - # Pre-v6.29 - Remove_Service shairport-sync - [[ -f '/lib/systemd/system/shairport-sync.service' ]] && G_EXEC rm /lib/systemd/system/shairport-sync.service - G_EXEC rm -f /usr/local/bin/shairport-sync /usr/local/etc/shairport-sync.conf* /usr/local/share/man/man7/shairport-sync.7.gz fi if To_Uninstall 152 # Avahi-Daemon @@ -13702,10 +13691,6 @@ _EOF_ if To_Uninstall 163 # GMediaRender then G_AGP gmediarender - # Pre-v8.10 - Remove_Service gmediarender gmrender gmrender - [[ -f '/usr/local/bin/gmediarender' ]] && G_EXEC rm /usr/local/bin/gmediarender - [[ -d '/usr/local/share/gmediarender' ]] && G_EXEC rm -R /usr/local/share/gmediarender fi if To_Uninstall 67 # Firefox From 185a08f67ecf41345b29784ab3bb25196cdfaafb Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 18 Apr 2024 22:26:10 +0200 Subject: [PATCH 101/458] v9.4 - DietPi-Patches | Syntax --- .update/patches | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.update/patches b/.update/patches index a92b6c5d5b..e1e0b951bf 100755 --- a/.update/patches +++ b/.update/patches @@ -1583,7 +1583,7 @@ Patch_9_4() if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[37\]=2' /boot/dietpi/.installed then [[ -f '/usr/local/share/man/man7/shairport-sync.7.gz' ]] && G_EXEC rm /usr/local/share/man/man7/shairport-sync.7.gz - [[ -d '/usr/local/share/man/man7' ]] G_EXEC rmdir -p --ignore-fail-on-non-empty /usr/local/share/man/man7 + [[ -d '/usr/local/share/man/man7' ]] && G_EXEC rmdir -p --ignore-fail-on-non-empty /usr/local/share/man/man7 fi fi } From 160b8eac7f1894a5d0e1a010da1a47f6525fa555 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 18 Apr 2024 23:02:10 +0200 Subject: [PATCH 102/458] v9.4 - Raspberry Pi | Pro-actively install tiny-initramfs to satisfy the upcoming initramfs dependency for new Raspberry Pi kernel packages: https://github.com/RPi-Distro/repo/issues/358 --- .build/images/dietpi-installer | 7 ++++--- .update/pre-patches | 20 ++++++++++++++++++++ dietpi/func/dietpi-set_software | 2 +- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 6a9814b96c..c114200700 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1244,8 +1244,6 @@ _EOF_ # ARMv6/7: Add raspi-copies-and-fills local a32bit=() (( $G_HW_ARCH == 3 )) || a32bit=('raspi-copies-and-fills') - # Install our own raspberrypi-sys-mods - G_EXEC curl -sSfO 'https://dietpi.com/downloads/binaries/raspberrypi-sys-mods.deb' if findmnt -M /boot/firmware &> /dev/null then local kernel=() @@ -1270,7 +1268,10 @@ _EOF_ 5) kernel=('linux-image-rpi-2712');; *) { G_DIETPI-NOTIFY 1 "Unexpected hardware model passed: \"$G_HW_MODEL\". Aborting ..."; exit 1; };; esac - G_AGI raspi-firmware "${kernel[@]}" raspi-utils ./raspberrypi-sys-mods.deb raspberrypi-archive-keyring "${a32bit[@]}" + # tiny-initramfs to satisfy dependency: https://github.com/RPi-Distro/repo/issues/358 + G_AGI raspi-firmware + G_CONFIG_INJECT 'SKIP_INITRAMFS_GEN=' 'SKIP_INITRAMFS_GEN=yes' /etc/default/raspi-firmware + G_AGI "${kernel[@]}" raspi-utils raspberrypi-sys-mods raspberrypi-archive-keyring "${a32bit[@]}" tiny-initramfs else G_AGI raspberrypi-bootloader raspberrypi-kernel libraspberrypi0 libraspberrypi-bin ./raspberrypi-sys-mods.deb raspberrypi-archive-keyring "${a32bit[@]}" fi diff --git a/.update/pre-patches b/.update/pre-patches index e650adb30e..47c98d7b0a 100755 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -412,5 +412,25 @@ _EOF_ fi fi +# v9.4 +if (( $G_DIETPI_VERSION_CORE < 9 || ( $G_DIETPI_VERSION_CORE == 9 && $G_DIETPI_VERSION_SUB < 4 ) )) +then + if (( $G_HW_MDOEL < 10 && $G_DISTRO > 6 )) && dpkg-query -s 'raspi-firmware' &> /dev/null + then + # Satisfy upcoming initramfs dependency of new kernel packages with slim tiny-initramfs: https://github.com/RPi-Distro/repo/issues/358 + G_CONFIG_INJECT 'SKIP_INITRAMFS_GEN=' 'SKIP_INITRAMFS_GEN=yes' /etc/default/raspi-firmware + if ! dpkg-query -s 'initramfs-tools' &> /dev/null + then + G_AGI tiny-initramfs + + elif apt-mark showauto | grep '^initramfs-tools$' + then + G_AGI tiny-initamfs + G_AGP initramfs-tools + # ToDo: Remove existing initramfs images in /boot/initrd-* and /boot/firmware/initramfs* + fi + fi +fi + exit 0 } diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index 0c07a26a6c..eeda29c13f 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -771,7 +771,7 @@ deb $INPUT_MODE_VALUE $G_DISTRO_NAME-backports main contrib non-free' > /etc/apt \n- $optional for ${models[$optional]}" && to_install=("$optional") || to_remove=("$optional") fi - G_AGI "$kernel_package" "${to_install[@]}" raspi-firmware raspi-utils + G_AGI "$kernel_package" "${to_install[@]}" raspi-firmware raspi-utils tiny-initramfs G_AGP "${to_remove[@]}" raspberrypi-kernel raspberrypi-headers-kernel raspberrypi-bootloader libraspberrypi-bin libraspberrypi0 } From 3ca585ad517e9ff8ed136f1fe7c68f1ad1ae81b3 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 18 Apr 2024 23:08:34 +0200 Subject: [PATCH 103/458] v9.4 - DietPi-Pre-patches | Typo --- .update/pre-patches | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.update/pre-patches b/.update/pre-patches index 47c98d7b0a..c041090ab0 100755 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -415,7 +415,7 @@ fi # v9.4 if (( $G_DIETPI_VERSION_CORE < 9 || ( $G_DIETPI_VERSION_CORE == 9 && $G_DIETPI_VERSION_SUB < 4 ) )) then - if (( $G_HW_MDOEL < 10 && $G_DISTRO > 6 )) && dpkg-query -s 'raspi-firmware' &> /dev/null + if (( $G_HW_MODEL < 10 && $G_DISTRO > 6 )) && dpkg-query -s 'raspi-firmware' &> /dev/null then # Satisfy upcoming initramfs dependency of new kernel packages with slim tiny-initramfs: https://github.com/RPi-Distro/repo/issues/358 G_CONFIG_INJECT 'SKIP_INITRAMFS_GEN=' 'SKIP_INITRAMFS_GEN=yes' /etc/default/raspi-firmware From d4aea5244a3ffa2c6ee4cedca0ba6bf88b4c4376 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 19 Apr 2024 15:50:23 +0200 Subject: [PATCH 104/458] v9.4 - DietPi-Installer | Remove manual U-Boot package downloads from our server, as those are now hosted in our APT repository --- .build/images/dietpi-installer | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index c114200700..018f0bdfda 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1041,9 +1041,9 @@ _EOF_ # Update APT lists G_AGUP # Install kernel, device tree, U-Boot, firmware and initramfs packages - local model='odroidn2' kernel='meson64' arch='arm64' branch='current' zstd=() dietpi_com=0 + local model='odroidn2' kernel='meson64' arch='arm64' branch='current' zstd=() case $G_HW_MODEL in - 10) model='odroidc1' kernel='meson' arch='arm' dietpi_com=1;; + 10) model='odroidc1' kernel='meson' arch='arm';; 11) model='odroidxu4' kernel='odroidxu4' arch='arm';; 12) model='odroidc2';; 16) model='odroidc4';; @@ -1068,14 +1068,14 @@ _EOF_ 2) model='nanopifire3';; *) model='nanopim3';; esac;; - 63) model='nanopim1' kernel='sunxi' arch='arm' dietpi_com=1;; + 63) model='nanopim1' kernel='sunxi' arch='arm';; 64) model='nanopiair' kernel='sunxi' arch='arm';; 65) kernel='sunxi64' case $HW_VARIANT in 2) model='nanopineo2black';; *) model='nanopineo2';; esac;; - 66) model='nanopim1plus' kernel='sunxi' arch='arm' dietpi_com=1;; + 66) model='nanopim1plus' kernel='sunxi' arch='arm';; 67) model='nanopik1plus' kernel='sunxi64';; 68) kernel='rockchip64' case $HW_VARIANT in @@ -1110,14 +1110,6 @@ _EOF_ 87) model='orangepi3b' kernel='rockchip64' branch='edge';; *) :;; esac - # Download and pre-install U-Boot hosted on dietpi.com where it has not been ported to the Armbian Bookworm repo or has been removed completely - if (( $dietpi_com && $G_DISTRO > 6 || $G_HW_MODEL == 62 )) - then - G_EXEC curl -sSfo package.deb "https://dietpi.com/downloads/binaries/linux-u-boot-$model-$branch.deb" - G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb - G_EXEC rm package.deb - aPACKAGES_REQUIRED_INSTALL+=("linux-u-boot-$model-$branch") - fi # Odroid C1: https://dietpi.com/forum/t/odroid-c1-not-booting-after-kernel-upgrade/17818 if (( $G_HW_MODEL == 10 )) From acda521a58474122dc64662e0ed55540dd2e0560 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 19 Apr 2024 16:29:47 +0200 Subject: [PATCH 105/458] v9.4 - Orange Pi 3B | Added an option for updating the SPI bootloader via dietpi-config > Advanced Options > Update SPI bootloader. Since this implies generic support for flashcp based flashing to /dev/mtd using a different U-Boot image name as well, this re-adds the options for some other SBCs with recent U-Boot packages --- CHANGELOG.txt | 1 + dietpi/dietpi-config | 38 +++++++++++++++++++++++++++----------- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index d03de731bc..8dd3bdf604 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,6 +4,7 @@ v9.4 Enhancements: - General | Our scripts do now internally enforce the default umask 0022. Many config and install options rely on this, hence it can cause issues when e.g. 0027 (deny read access for "other" users) has been applied on the parent shell. This affects only the (sub)shell of our scripts, while the current and default umask of parent and of shells/consoles remains untouched. - NanoPi R5C | New images, or when flashing the new bootloader binary via dietpi-config > Advanced Options > Update MMC bootloader, support M.2 WiFi modules. +- Orange Pi 3B | Added an option for updating the SPI bootloader via dietpi-config > Advanced Options > Update SPI bootloader. Bug fixes: diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 549a17b264..258900fff6 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -1068,11 +1068,17 @@ Re-enabling HDMI requires a reboot. If you need emergency HDMI output, edit the G_WHIP_MENU_ARRAY+=('Update RPi EEPROM firmware' ': Install rpi-eeprom APT package') fi - # 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)$ ]] + # ROCK 4, ROCK 5B, Orange Pi 5 (Plus) and Orange Pi 3B: https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457 + elif [[ $G_HW_MODEL =~ ^(72|78|80|82|87)$ ]] then # 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') + local spidev='/dev/mtdblock0' + (( $G_HW_MODEL == 72 )) || { + [[ -f '/usr/lib/u-boot/platform_install.sh' ]] && { + { [[ -e '/dev/mtd0' ]] && grep -q '/dev/mtd0' /usr/lib/u-boot/platform_install.sh && spidev='/dev/mtd0'; } || + { [[ -b '/dev/mtdblock0' ]] && grep -q 'rksd_loader.img' /usr/lib/u-boot/platform_install.sh; } + } + } && G_WHIP_MENU_ARRAY+=("Update SPI bootloader' ': Flash current U-Boot to $spidev") # VisionFive 2/Star64: https://doc-en.rvspace.org/VisionFive2/PDF/VisionFive2_QSG.pdf elif (( $G_HW_MODEL == 81 || $G_HW_MODEL == 84 )) @@ -1238,17 +1244,27 @@ Further information: https://www.raspberrypi.org/documentation/hardware/raspberr 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 + + elif [[ $spidev == '/dev/mtd0' ]] + then + 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/mtd0. +\nDo you want to continue?' || return 0 + G_AG_CHECK_INSTALL_PREREQ mtd-utils + # shellcheck disable=SC1091 + . /usr/lib/u-boot/platform_install.sh + write_uboot_platform_mtd + else + 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 + # 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 + fi elif [[ $G_WHIP_RETURNED_VALUE == 'Update bootloader' ]]; then From 7da2b57a78a35bc6db5f0778ca1601faaad7356c Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 20 Apr 2024 13:44:24 +0200 Subject: [PATCH 106/458] v9.4 - CI | Armbian: Add support for more branches for RK35xx kernel builds --- .github/workflows/armbian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index 1872a37956..c966c872d2 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -11,7 +11,7 @@ on: branch: description: 'Branch' type: choice - options: [legacy, current, edge] + options: [legacy, current, edge, vendor, vendor-boogie-panthor, collabora] default: current required: true board: From 75e113d25068c991ea744fbaa9edd267f9c55ea7 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 20 Apr 2024 14:36:35 +0200 Subject: [PATCH 107/458] v9.4 - DietPi-Software | Snapcast: 64-bit ARM and Debian Bookworm + Trixie will have the now available packages from Snapcast installed, instead of those from the Debian repository. - DietPi-Software | Snapcast: Resolved an issue where version 0.27.0 was installed, because since version 0.28.0, Snapcast is provided with client and server packages wrapped into one archive, instead having individual downloads for each package. --- CHANGELOG.txt | 2 ++ dietpi/dietpi-software | 36 +++++++++++++++++------------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 8dd3bdf604..7d3093b4fb 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,8 +5,10 @@ Enhancements: - General | Our scripts do now internally enforce the default umask 0022. Many config and install options rely on this, hence it can cause issues when e.g. 0027 (deny read access for "other" users) has been applied on the parent shell. This affects only the (sub)shell of our scripts, while the current and default umask of parent and of shells/consoles remains untouched. - NanoPi R5C | New images, or when flashing the new bootloader binary via dietpi-config > Advanced Options > Update MMC bootloader, support M.2 WiFi modules. - Orange Pi 3B | Added an option for updating the SPI bootloader via dietpi-config > Advanced Options > Update SPI bootloader. +- DietPi-Software | Snapcast: 64-bit ARM and Debian Bookworm + Trixie will have the now available packages from Snapcast installed, instead of those from the Debian repository. Bug fixes: +- DietPi-Software | Snapcast: Resolved an issue where version 0.27.0 was installed, because since version 0.28.0, Snapcast is provided with client and server packages wrapped into one archive, instead having individual downloads for each package. 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 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 3c3f3c44da..0d1b149cb1 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -9953,7 +9953,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.15.0.4361/Prowlarr.master.1.15.0.4361.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.16.2.4435/Prowlarr.master.1.16.2.4435.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Prowlarr/Prowlarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}")" G_EXEC mv Prowlarr /opt/prowlarr fi @@ -11497,20 +11497,19 @@ _EOF_ if To_Install 191 snapserver # Snapcast Server then - # ARMv6/7/x86_64: Install package from GitHub repo (no Bookworm as package depends on libflac8) - if (( $G_DISTRO < 7 )) && [[ $G_HW_ARCH =~ ^(1|2|10)$ ]] + # RISC-V: Install from Debian repo: https://github.com/badaix/snapcast/releases + if (( $G_HW_ARCH == 11 )) then - local arch='armhf' - (( $G_HW_ARCH == 10 )) && arch='amd64' - local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.27.0/snapserver_0.27.0-1_$arch.deb" - Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapserver_[^\"\/]*_$arch.deb\"/{print \$4}")" - - # Else install from Debian repo - else G_AGI snapserver # Enable web UI to align with upstream package G_CONFIG_INJECT 'doc_root[[:blank:]=]' 'doc_root = /usr/share/snapserver/snapweb' /etc/snapserver.conf '\[http\]' + else + local arch=$(dpkg --print-architecture) dist=${G_DISTRO_NAME/trixie/bookworm} + local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.28.0/snapcast_0.28.0_$arch-debian-$dist.zip" + Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapcast_[^\"\/]*_$arch-debian-$dist.zip\"/{print \$4}")" + G_AGI ./snapserver_*_"$dist.deb" + G_EXEC rm snap*.deb fi G_EXEC systemctl stop snapserver @@ -11520,17 +11519,16 @@ _EOF_ if To_Install 192 snapclient # Snapcast Client then - # ARMv6/7/x86_64: Install package from GitHub repo (no Bookworm as package depends on libflac8) - if (( $G_DISTRO < 7 )) && [[ $G_HW_ARCH =~ ^(1|2|10)$ ]] + # RISC-V: Install from Debian repo: https://github.com/badaix/snapcast/releases + if (( $G_HW_ARCH == 11 )) then - local arch='armhf' - (( $G_HW_ARCH == 10 )) && arch='amd64' - local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.27.0/snapclient_0.27.0-1_without-pulse_$arch.deb" - Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapclient_[^\"\/]*_without-pulse_$arch.deb\"$/{print \$4}")" - - # Else install from Debian repo - else G_AGI snapclient + else + local arch=$(dpkg --print-architecture) dist=${G_DISTRO_NAME/trixie/bookworm} + local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.28.0/snapcast_0.28.0_$arch-debian-$dist.zip" + Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapcast_[^\"\/]*_$arch-debian-$dist.zip\"/{print \$4}")" + G_AGI ./snapclient_*_without-pulse_"$dist.deb" + G_EXEC rm snap*.deb fi G_EXEC systemctl stop snapclient From 79086e1539e33506682f0e1f0b7383ef9d30179a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 20 Apr 2024 16:06:05 +0200 Subject: [PATCH 108/458] v9.4 - CI | Armbian: Always rebase onto latest upstream commit --- .github/workflows/armbian.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index c966c872d2..306267b2a7 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -37,6 +37,16 @@ jobs: branch='${{ github.event.inputs.gitbranch }}' [ "$branch" ] || branch='main' git clone -b "$branch" --depth=1 "https://github.com/$owner/build" + if [ "$owner" != 'armbian' ] + then + git remote add upstream https://github.com/armbian/build + git fetch upstream main + git rebase upstream main + elif [ "$branch" != 'main' ] + then + git fetch origin main + git rebase main + fi - name: Build asset run: | cd build From 44177aa6bf7d09be2cfa44770cb3487ae142f441 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 20 Apr 2024 16:24:08 +0200 Subject: [PATCH 109/458] v9.4 - CI | Armbian: Fix rebase --- .github/workflows/armbian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index 306267b2a7..c0486aa36c 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -37,6 +37,7 @@ jobs: branch='${{ github.event.inputs.gitbranch }}' [ "$branch" ] || branch='main' git clone -b "$branch" --depth=1 "https://github.com/$owner/build" + cd build if [ "$owner" != 'armbian' ] then git remote add upstream https://github.com/armbian/build @@ -49,7 +50,6 @@ jobs: fi - name: Build asset run: | - cd build ./compile.sh '${{ github.event.inputs.asset }}' BRANCH='${{ github.event.inputs.branch }}' BOARD='${{ github.event.inputs.board }}' - name: Upload run: | From e6183a652962bef3b9520d15a0188792ed0d0827 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 20 Apr 2024 16:28:02 +0200 Subject: [PATCH 110/458] v9.4 - CI | Armbian: Fix rebase --- .github/workflows/armbian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index c0486aa36c..67db92831a 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -42,7 +42,7 @@ jobs: then git remote add upstream https://github.com/armbian/build git fetch upstream main - git rebase upstream main + git rebase upstream/main elif [ "$branch" != 'main' ] then git fetch origin main From 47a24d6330411b2a266cf4b20eb04a5abffce24b Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 20 Apr 2024 16:33:54 +0200 Subject: [PATCH 111/458] v9.4 - CI | Armbian: Allow to skip rebase --- .github/workflows/armbian.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index 67db92831a..f184b79247 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -21,6 +21,10 @@ on: description: 'Override Git owner of Armbian repo' gitbranch: description: 'Override Git branch of Armbian repo' + rebase: + description: 'Rebase onto latest armbian/main' + type: boolean + default: true concurrency: group: ${{ github.workflow }}-${{ github.event.inputs.asset }}-${{ github.event.inputs.branch }}-${{ github.event.inputs.board }} cancel-in-progress: true @@ -38,6 +42,7 @@ jobs: [ "$branch" ] || branch='main' git clone -b "$branch" --depth=1 "https://github.com/$owner/build" cd build + [ '${{ github.event.inputs.rebase }}' == 'false' ] && exit 0 || : if [ "$owner" != 'armbian' ] then git remote add upstream https://github.com/armbian/build From 1d0d39ff3b8bb0ab9d6b7b33c8e0f0da048342dc Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 20 Apr 2024 16:37:09 +0200 Subject: [PATCH 112/458] v9.4 - CI | Fix skipping rebase --- .github/workflows/armbian.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index f184b79247..6af27719ac 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -42,16 +42,18 @@ jobs: [ "$branch" ] || branch='main' git clone -b "$branch" --depth=1 "https://github.com/$owner/build" cd build - [ '${{ github.event.inputs.rebase }}' == 'false' ] && exit 0 || : - if [ "$owner" != 'armbian' ] + if [ '${{ github.event.inputs.rebase }}' == 'true' ] then - git remote add upstream https://github.com/armbian/build - git fetch upstream main - git rebase upstream/main - elif [ "$branch" != 'main' ] - then - git fetch origin main - git rebase main + if [ "$owner" != 'armbian' ] + then + git remote add upstream https://github.com/armbian/build + git fetch upstream main + git rebase upstream/main + elif [ "$branch" != 'main' ] + then + git fetch origin main + git rebase main + fi fi - name: Build asset run: | From b41a92cc9e3f1fe8f950d1cd919fad6f38ffe33d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 20 Apr 2024 16:39:15 +0200 Subject: [PATCH 113/458] v9.4 - CI | Armbian: ... --- .github/workflows/armbian.yml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index 6af27719ac..e0d848ab41 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -41,22 +41,21 @@ jobs: branch='${{ github.event.inputs.gitbranch }}' [ "$branch" ] || branch='main' git clone -b "$branch" --depth=1 "https://github.com/$owner/build" + [ '${{ github.event.inputs.rebase }}' == 'false' ] && exit 0 || : cd build - if [ '${{ github.event.inputs.rebase }}' == 'true' ] + if [ "$owner" != 'armbian' ] then - if [ "$owner" != 'armbian' ] - then - git remote add upstream https://github.com/armbian/build - git fetch upstream main - git rebase upstream/main - elif [ "$branch" != 'main' ] - then - git fetch origin main - git rebase main - fi + git remote add upstream https://github.com/armbian/build + git fetch upstream main + git rebase upstream/main + elif [ "$branch" != 'main' ] + then + git fetch origin main + git rebase main fi - name: Build asset run: | + cd build ./compile.sh '${{ github.event.inputs.asset }}' BRANCH='${{ github.event.inputs.branch }}' BOARD='${{ github.event.inputs.board }}' - name: Upload run: | From bfd0acc8fab45e7d9783f8356d93ce5ee0fe7720 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 20 Apr 2024 20:45:24 +0200 Subject: [PATCH 114/458] v9.4 - DietPi-Software | Snapcast: Fix package name --- dietpi/dietpi-software | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 0d1b149cb1..b1897635f4 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -11508,7 +11508,7 @@ _EOF_ local arch=$(dpkg --print-architecture) dist=${G_DISTRO_NAME/trixie/bookworm} local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.28.0/snapcast_0.28.0_$arch-debian-$dist.zip" Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapcast_[^\"\/]*_$arch-debian-$dist.zip\"/{print \$4}")" - G_AGI ./snapserver_*_"$dist.deb" + G_AGI ./snapserver_*_"$arch.deb" G_EXEC rm snap*.deb fi G_EXEC systemctl stop snapserver @@ -11527,7 +11527,7 @@ _EOF_ local arch=$(dpkg --print-architecture) dist=${G_DISTRO_NAME/trixie/bookworm} local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.28.0/snapcast_0.28.0_$arch-debian-$dist.zip" Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapcast_[^\"\/]*_$arch-debian-$dist.zip\"/{print \$4}")" - G_AGI ./snapclient_*_without-pulse_"$dist.deb" + G_AGI ./snapclient_*_without-pulse_"$arch.deb" G_EXEC rm snap*.deb fi G_EXEC systemctl stop snapclient From 3da35f5996b093bc9cbdfcc603ab38a35691e4a7 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 21 Apr 2024 15:46:27 +0200 Subject: [PATCH 115/458] v9.4 - DietPi-Software | Readarr: Update fallback URL --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index b1897635f4..ad7d1f3829 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -10028,7 +10028,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.23.2506/Readarr.develop.0.3.23.2506.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.24.2510/Readarr.develop.0.3.24.2510.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Readarr/Readarr/releases' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}" | head -1)" G_EXEC mv Readarr /opt/readarr fi From 1004d606a9c3ced7215ec28cc7eba25e32c72b1b Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 21 Apr 2024 16:44:51 +0200 Subject: [PATCH 116/458] v9.4 - DietPi-Build/Installer | Add support for ROCK 4C Plus, since the recent ROCK 4B bootloader does not select the correct device tree automatically anymore, and cleanup method for installing self-hosted kernel/bootloader builds. --- .build/images/dietpi-build | 1 + .build/images/dietpi-installer | 25 ++++++++++++++----------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 2464c916d4..d70376fb2a 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -122,6 +122,7 @@ case $HW_MODEL in 70) iname='SparkySBC' HW_ARCH=2 partition_start=8 boot_size=48 root_size=712 boot_fstype='fat16';; '72.1') iname='ROCKPi4' HW_ARCH=3 partition_start=16 root_size=1008;; '72.2') iname='ROCK4SE' HW_ARCH=3 partition_start=16 root_size=1008;; + '72.3') iname='ROCK4CPlus' HW_ARCH=3 partition_start=16 root_size=1008;; 73) iname='ROCKPiS' HW_ARCH=3 partition_start=16 root_size=1008;; 74) iname='RadxaZero' HW_ARCH=3 partition_start=4 root_size=1020;; 75) iname='Container' HW_ARCH=${HW_ARCH:-10} root_size=575;; diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 018f0bdfda..6c37f6365b 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -412,6 +412,7 @@ _EOF_ '79.3' ': NanoPC T6' '72.1' ': ROCK 4 (all other variants)' '72.2' ': ROCK 4 SE' + '72.3' ': ROCK 4C Plus' '73' ': ROCK Pi S' '74' ': Radxa Zero' '77' ': ROCK 3A' @@ -1041,7 +1042,7 @@ _EOF_ # Update APT lists G_AGUP # Install kernel, device tree, U-Boot, firmware and initramfs packages - local model='odroidn2' kernel='meson64' arch='arm64' branch='current' zstd=() + local model='odroidn2' kernel='meson64' arch='arm64' branch='current' zstd=() dietpi_uboot=0 dietpi_kernel=0 case $G_HW_MODEL in 10) model='odroidc1' kernel='meson' arch='arm';; 11) model='odroidxu4' kernel='odroidxu4' arch='arm';; @@ -1086,6 +1087,7 @@ _EOF_ 72) kernel='rockchip64' case $HW_VARIANT in 2) model='rock-4se';; + 3) model='rockpi-4cplus';; *) model='rockpi-4b';; esac;; 73) model='rockpi-s' kernel='rockchip64';; @@ -1136,22 +1138,23 @@ _EOF_ fi # Install initramfs-tools first to have an initramfs generated on kernel install, and configure it to use zstd if supported for better compression and faster decompression [[ $kernel == 'rockchip64' || $kernel == 'rk35xx' || $kernel == 'meson64' || $kernel == 'sunxi64' || $kernel == 'sunxi' || $kernel == 'rockchip' ]] && zstd=('zstd') - # - Download and pre-install a more recent armbian-firmware package from our server - #G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/armbian-firmware.deb' - #G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb - #G_EXEC rm package.deb G_AGI initramfs-tools u-boot-tools armbian-firmware "${zstd[@]}" [[ ${zstd[0]} ]] && G_CONFIG_INJECT 'COMPRESS=' 'COMPRESS=zstd' /etc/initramfs-tools/initramfs.conf - # Download and pre-install kernel hosted on dietpi.com where the Armbian APT repo provides a too old version - if (( $G_HW_MODEL == 83 )) + # Download and pre-install kernel hosted on dietpi.com where the Armbian APT repo provides a too old version or is not available + if (( $dietpi_kernel )) then G_EXEC_OUTPUT=1 G_EXEC curl -fo package1.deb "https://dietpi.com/downloads/binaries/linux-image-$branch-$kernel.deb" G_EXEC_OUTPUT=1 G_EXEC curl -fo package2.deb "https://dietpi.com/downloads/binaries/linux-dtb-$branch-$kernel.deb" G_EXEC_OUTPUT=1 G_EXEC curl -fo package3.deb 'https://dietpi.com/downloads/binaries/armbian-firmware.deb' - local uboot=() - #(( $G_HW_MODEL == 83 )) && (( $HW_VARIANT == 1 )) && { G_EXEC_OUTPUT=1 G_EXEC curl -fo package4.deb "https://dietpi.com/downloads/binaries/linux-u-boot-$model-$branch.deb"; uboot=('package4.deb'); } - G_EXEC_OUTPUT=1 G_EXEC dpkg -i package1.deb package2.deb package3.deb "${uboot[@]}" - G_EXEC rm package1.deb package2.deb package3.deb "${uboot[@]}" + G_EXEC_OUTPUT=1 G_EXEC dpkg -i package[1-3].deb + G_EXEC rm package[1-3].deb + fi + # Download and pre-install U-Boot hosted on dietpi.com where the Armbian APT repo provides a too old version or is not available + if (( $dietpi_uboot )) + then + G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/linux-u-boot-$model-$branch.deb" + G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb + G_EXEC rm package.deb fi # Orange Pi Zero 3 1.5G RAM variant: Install original Orange Pi bootloader if (( $G_HW_MODEL == 83 )) && (( $HW_VARIANT == 2 )) From 977a3b4d80977208a06ca1ec44fa64cfdaa91890 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 21 Apr 2024 17:19:37 +0200 Subject: [PATCH 117/458] v9.4 - CHANGELOG | Add entry for new ROCK 4C Plus image --- CHANGELOG.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 7d3093b4fb..296862db51 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,6 +1,9 @@ v9.4 (2024-05-12) +New images: +- ROCK 4C Plus | Since our Radxa ROCK 4 image has become incompatible with the ROCK 4C Plus, we provide a new image for this particular variant. Many thanks to @lfiorini and @arpegius5555 for reporting this issue: https://github.com/MichaIng/DietPi/issues/6593, https://github.com/MichaIng/DietPi/issues/6935 + Enhancements: - General | Our scripts do now internally enforce the default umask 0022. Many config and install options rely on this, hence it can cause issues when e.g. 0027 (deny read access for "other" users) has been applied on the parent shell. This affects only the (sub)shell of our scripts, while the current and default umask of parent and of shells/consoles remains untouched. - NanoPi R5C | New images, or when flashing the new bootloader binary via dietpi-config > Advanced Options > Update MMC bootloader, support M.2 WiFi modules. From b05711fcb73db36e2a7c5fdb7b8beb96d24ef3d6 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 21 Apr 2024 21:21:10 +0200 Subject: [PATCH 118/458] v9.4 - CI | Use GITHUB_REF_NAME instead of scraping from GITHUB_REF --- .github/workflows/dietpi-build.yml | 2 +- .github/workflows/raspberrypi-sys-mods.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dietpi-build.yml b/.github/workflows/dietpi-build.yml index cb92edee03..d8f98dc353 100644 --- a/.github/workflows/dietpi-build.yml +++ b/.github/workflows/dietpi-build.yml @@ -130,4 +130,4 @@ jobs: ${{ secrets.GPG_KEY }} _EOF_ - name: Run DietPi-Build - run: sudo bash -c "G_GITOWNER=$GITHUB_REPOSITORY_OWNER G_GITBRANCH=${GITHUB_REF#refs/heads/}; $(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/${GITHUB_REF#refs/heads/}/.build/images/dietpi-build")" 'DietPi-Build' ${{ matrix.buildargs }} --sign '${{ secrets.GPG_PASS }}' + run: sudo bash -c "G_GITOWNER=$GITHUB_REPOSITORY_OWNER G_GITBRANCH=$GITHUB_REF_NAME; $(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/$GITHUB_REF_NAME/.build/images/dietpi-build")" 'DietPi-Build' ${{ matrix.buildargs }} --sign '${{ secrets.GPG_PASS }}' diff --git a/.github/workflows/raspberrypi-sys-mods.yml b/.github/workflows/raspberrypi-sys-mods.yml index ea4e845776..675e3af75e 100644 --- a/.github/workflows/raspberrypi-sys-mods.yml +++ b/.github/workflows/raspberrypi-sys-mods.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Build - run: sudo bash -c "$(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/${GITHUB_REF#refs/heads/}/.build/software/raspberrypi-sys-mods/build.bash")" + run: sudo bash -c "$(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/$GITHUB_REF_NAME/.build/software/raspberrypi-sys-mods/build.bash")" - name: Upload run: | # SSH server and client keys From 234cc689fa8f4c7736300661b01204373abc9824 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 22 Apr 2024 23:41:42 +0200 Subject: [PATCH 119/458] v9.4 - DietPi-Software | Kavita: Update fallback URL --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index ad7d1f3829..e2f8231e80 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6302,7 +6302,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Kareadita/Kavita/releases/download/v0.8.0/kavita-linux-$arch.tar.gz" + local fallback_url="https://github.com/Kareadita/Kavita/releases/download/v0.8.1/kavita-linux-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Kareadita/Kavita/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/kavita-linux-$arch\.tar\.gz\"$/{print \$4}")" G_EXEC chmod +x Kavita/Kavita From 079710ad0f58d5bf7682c5dc71b3de109dd07873 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 23 Apr 2024 13:15:15 +0200 Subject: [PATCH 120/458] v9.4 (#7033) - DietPi-Imager | Skip moving backup partition table before touching the image. parted/sfdisk may throw warnings, but the step can fail if the last partition reaches the end of the image, e.g. if the file was cut right after the last partition, ignoring the backup table. Additionally, obtain the size needed for the GPT backup correctly by the first usabe LBA/sector, instead of using the 34 sectors default GPT size. fdisk/sfdisk use 2048 by default, while parted defaults to the actual 34 sectors the GPT truly uses. --- .build/images/dietpi-imager | 18 +++++++++++------- CHANGELOG.txt | 1 + 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.build/images/dietpi-imager b/.build/images/dietpi-imager index 47412ad2e1..fdc61988b5 100755 --- a/.build/images/dietpi-imager +++ b/.build/images/dietpi-imager @@ -336,10 +336,7 @@ # Move GPT backup partition table to end of drive elif [[ $PART_TABLE_TYPE == 'gpt' ]] then - G_DIETPI-NOTIFY 2 'GPT partition table detected, moving GPT backup partition table to end of drive...' - G_AG_CHECK_INSTALL_PREREQ gdisk - G_EXEC_OUTPUT=1 G_EXEC sgdisk -e "$FP_SOURCE" - G_SLEEP 0.5 # Give the root filesystem a little time to be detected + G_DIETPI-NOTIFY 2 'GPT partition table detected' else Error_Exit "Unknown partition table type ($PART_TABLE_TYPE), aborting..." fi @@ -512,9 +509,16 @@ # - WARNING: this assumes that the partitions in the table are in order (which we do in other places as well) local last_part_end=$(sfdisk -qlo End "$FP_SOURCE" | tail -1) # 512 byte sectors IMAGE_SIZE=$last_part_end - # Add 34 sectors for GPT backup partition table and 1 sector for MBR - # shellcheck disable=SC2015 - [[ $PART_TABLE_TYPE == 'gpt' ]] && ((IMAGE_SIZE+=34)) || ((IMAGE_SIZE++)) + # Add space for GPT backup partition table, or 1 sector for MBR + if [[ $PART_TABLE_TYPE == 'gpt' ]] + then + # Obtain first usable LBA, which defines the size of the GPT backup, else use 34 sectors as default: https://github.com/MichaIng/DietPi/issues/7024 + local gpt_size=$(sgdisk -p "$FP_SOURCE" 2>&1 | mawk -F[\ ,] '/^First usable sector/{print $5}') + # shellcheck disable=SC2015 + (( $gpt_size )) && ((IMAGE_SIZE+=$gpt_size)) || ((IMAGE_SIZE+=34)) + else + ((IMAGE_SIZE++)) + fi ((IMAGE_SIZE*=512)) # 512 byte sectors => bytes # RPi: Move configs to boot FAT partition to allow easier edit from Windows/macOS diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 296862db51..2a51cfa2f8 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -11,6 +11,7 @@ Enhancements: - DietPi-Software | Snapcast: 64-bit ARM and Debian Bookworm + Trixie will have the now available packages from Snapcast installed, instead of those from the Debian repository. Bug fixes: +- DietPi-Imager | Resolved an issue where the imager could have failed on GPT partitioned images, if either the source image size did not leave space for the GPT backup partition table, or the first usable LBA/sector was above 34. The GPT backup partition table is now created only at the end of the image generation, not anymore additionally at the start, and the required size it takes is correctly obtained. Many thanks to @SelfhostedPro and @disablewong for reporting this issue: https://github.com/MichaIng/DietPi/issues/7024, https://dietpi.com/forum/t/18035 - DietPi-Software | Snapcast: Resolved an issue where version 0.27.0 was installed, because since version 0.28.0, Snapcast is provided with client and server packages wrapped into one archive, instead having individual downloads for each package. 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 From f372c8ac3cb26d486eaf5fe50ed64628549ab02b Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 24 Apr 2024 14:34:04 +0200 Subject: [PATCH 121/458] v9.4 - CI | DietPi-Software test: Temporarily remove the Microsoft APT repository, which currently fails to fetch - DietPi-Software | Komga: Update fallback URL - DietPi-Set_hardware | Remove pre-v6.10 step when disabling the Waveshare32 LCD, which just removes a comment line, added in ancient DietPi versions when enabling it --- .github/workflows/dietpi-software.bash | 2 ++ dietpi/dietpi-software | 2 +- dietpi/func/dietpi-set_hardware | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index f10f4e2687..ae6abf853b 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -260,6 +260,8 @@ done ########################################## apackages=('xz-utils' 'parted' 'fdisk' 'systemd-container') (( $G_HW_ARCH == $arch || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $arch ) )) || apackages+=('qemu-user-static' 'binfmt-support') +# Temporary workaround for failing Microsoft repo fetch: https://github.com/microsoft/linux-package-repositories/issues/130 +G_EXEC rm /etc/apt/sources.list.d/microsoft-prod.list G_AG_CHECK_INSTALL_PREREQ "${apackages[@]}" ########################################## diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index e2f8231e80..84593d594e 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -7434,7 +7434,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/1.11.0/komga-1.11.0.jar' + local fallback_url='https://github.com/gotson/komga/releases/download/1.11.1/komga-1.11.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 diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index 0108f1d727..e5b3747fd0 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -803,7 +803,6 @@ _EOF_ [[ -f '/boot/overlays/waveshare32b.dtbo' ]] && G_EXEC rm /boot/overlays/waveshare32b.dtbo G_EXEC sed --follow-symlinks -i 's/ fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo//' /boot/cmdline.txt - G_EXEC sed --follow-symlinks -i '/Waveshare 32 LCD/d' /boot/config.txt G_EXEC sed --follow-symlinks -i '/^[[:blank:]]*dtoverlay=waveshare32b/d' /boot/config.txt G_EXEC sed --follow-symlinks -i '/^[[:blank:]]*dtoverlay=ads7846,cs=1,penirq=17/d' /boot/config.txt G_EXEC sed --follow-symlinks -i '/^[[:blank:]]*dtoverlay=w1-gpio-pullup,gpiopin=4,extpullup=1/d' /boot/config.txt From 2080acdc853e2f30863d80ed06ad7e9d0e0bdb33 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 24 Apr 2024 16:00:54 +0200 Subject: [PATCH 122/458] v9.4 - DietPi-Software | OctoPrint: Resolved an issue where the installation failed on RISC-V and ARMv6/7 Bullseye systems, due to changed dependencies. - CI | DietPi-Software test: Remove workaround for fixed Microsoft repo issue --- .github/workflows/dietpi-software.bash | 2 -- CHANGELOG.txt | 1 + dietpi/dietpi-software | 17 +++++++++++------ 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index ae6abf853b..f10f4e2687 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -260,8 +260,6 @@ done ########################################## apackages=('xz-utils' 'parted' 'fdisk' 'systemd-container') (( $G_HW_ARCH == $arch || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $arch ) )) || apackages+=('qemu-user-static' 'binfmt-support') -# Temporary workaround for failing Microsoft repo fetch: https://github.com/microsoft/linux-package-repositories/issues/130 -G_EXEC rm /etc/apt/sources.list.d/microsoft-prod.list G_AG_CHECK_INSTALL_PREREQ "${apackages[@]}" ########################################## diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 2a51cfa2f8..1ded7a0554 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -13,6 +13,7 @@ Enhancements: Bug fixes: - DietPi-Imager | Resolved an issue where the imager could have failed on GPT partitioned images, if either the source image size did not leave space for the GPT backup partition table, or the first usable LBA/sector was above 34. The GPT backup partition table is now created only at the end of the image generation, not anymore additionally at the start, and the required size it takes is correctly obtained. Many thanks to @SelfhostedPro and @disablewong for reporting this issue: https://github.com/MichaIng/DietPi/issues/7024, https://dietpi.com/forum/t/18035 - DietPi-Software | Snapcast: Resolved an issue where version 0.27.0 was installed, because since version 0.28.0, Snapcast is provided with client and server packages wrapped into one archive, instead having individual downloads for each package. +- DietPi-Software | OctoPrint: Resolved an issue where the installation failed on RISC-V and ARMv6/7 Bullseye systems, due to changed dependencies. 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 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 84593d594e..463f75f130 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -10143,14 +10143,19 @@ _EOF_ if To_Install 153 octoprint # OctoPrint then # Deps - # - RISC-V and ARMv6/7 Bookworm: gcc and libffi-dev for cffi - if (( $G_HW_ARCH == 11 || ( $G_HW_ARCH < 3 && $G_DISTRO > 6 ) )) + # - RISC-V: gcc and libffi-dev for cffi, Rust for maturin + if (( $G_HW_ARCH == 11 )) then - G_AGI gcc libffi-dev + aDEPS=('gcc' 'libffi-dev') + G_EXEC curl -sSf 'https://sh.rustup.rs/' -o rustup-init.sh + G_EXEC chmod +x rustup-init.sh + G_EXEC_OUTPUT=1 G_EXEC ./rustup-init.sh -y --profile minimal + G_EXEC rm rustup-init.sh + export PATH="/root/.cargo/bin:$PATH" - # - ARMv8:: gcc for netifaces and psutil - # - Bookworm: gcc for netifaces - elif (( $G_HW_ARCH == 3 || $G_DISTRO > 6 )) + # - ARMv8: gcc for psutil + # - ARMv6/7: gcc for regex: https://github.com/piwheels/packages/issues/442 + elif (( $G_HW_ARCH == 3 || ( $G_HW_ARCH < 3 && $G_DISTRO == 6 ) )) then G_AGI gcc fi From 7a851cc180f5f6c38e82c1d1e7fe9c4e14a6d4dc Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 24 Apr 2024 16:02:28 +0200 Subject: [PATCH 123/458] v9.4 - DietPi-Software | Prometheus Node Exporter: Update fallback URL --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 463f75f130..88dac89ab5 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3332,7 +3332,7 @@ _EOF_ esac # Download binary - local fallback_url="https://github.com/prometheus/node_exporter/releases/download/v1.7.0/node_exporter-1.7.0.linux-$arch.tar.gz" + local fallback_url="https://github.com/prometheus/node_exporter/releases/download/v1.8.0/node_exporter-1.8.0.linux-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/prometheus/node_exporter/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/node_exporter-.*\.linux-$arch\.tar\.gz\"$/{print \$4}")" G_EXEC mkdir -p /opt/node_exporter G_EXEC cp --preserve=mode node_exporter*/node_exporter /opt/node_exporter/ From f0adb283a401b115f7b8ce5f1029ced12e0a0fb4 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 24 Apr 2024 16:51:44 +0200 Subject: [PATCH 124/458] v9.4 - DietPi-Software | OctoPrint: The Rust compiler, required for RISC-V, needs to be available for the "octoprint" user - DietPi-Software | HTPC Manager: Skip obsolete dependencies for installs on ARMv6/7 Bookworm/Trixie systems --- dietpi/dietpi-software | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 88dac89ab5..57832afe23 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -10085,22 +10085,18 @@ _EOF_ # APT deps case $G_HW_ARCH in - [12]|11) - if (( $G_DISTRO < 7 )) - then - G_AGI libtiff5 libopenjp2-7 libxcb1 # ARMv6/7: Runtime libs for Pillow from piwheels (libtiff5 pulls libjpeg62-turbo) - else - # Bookworm: Most wheels need to be compiled: gcc and libffi-dev for cffi, libssl-dev and Rust for cryptography and bcrypt, make for PyNaCl, libjpeg62-turbo-dev for Pillow, pkg-config for cryptography - G_AGI gcc libffi-dev libssl-dev make libjpeg62-turbo-dev pkg-config - 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 - G_EXEC_OUTPUT=1 G_EXEC ./rustup-init.sh -y --profile minimal ${RPI_64KERNEL_32OS:+'--default-host' 'armv7-unknown-linux-gnueabihf'} - G_EXEC rm rustup-init.sh - export PATH="/root/.cargo/bin:$PATH" - fi - ;; + 1|2) G_AGI libtiff5 libopenjp2-7 libxcb1;; # ARMv6/7: Runtime libs for Pillow from piwheels (libtiff5 pulls libjpeg62-turbo) 3) G_AGI gcc;; # gcc for psutil + 11) + # gcc and libffi-dev for cffi, libssl-dev and Rust for cryptography and bcrypt, make for PyNaCl, libjpeg62-turbo-dev for Pillow, pkg-config for cryptography + G_AGI gcc libffi-dev libssl-dev make libjpeg62-turbo-dev pkg-config + 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 + G_EXEC_OUTPUT=1 G_EXEC ./rustup-init.sh -y --profile minimal ${RPI_64KERNEL_32OS:+'--default-host' 'armv7-unknown-linux-gnueabihf'} + G_EXEC rm rustup-init.sh + export PATH="/root/.cargo/bin:$PATH" + ;; *) :;; esac @@ -10142,6 +10138,11 @@ _EOF_ if To_Install 153 octoprint # OctoPrint then + # Pre-create user and its home directory to allow user-level (Rust and) Python instance + Create_User -G dialout,tty,video -d /mnt/dietpi_userdata/octoprint octoprint + G_EXEC mkdir -p /mnt/dietpi_userdata/octoprint + G_EXEC chown -R octoprint:octoprint /mnt/dietpi_userdata/octoprint + # Deps # - RISC-V: gcc and libffi-dev for cffi, Rust for maturin if (( $G_HW_ARCH == 11 )) @@ -10149,7 +10150,7 @@ _EOF_ aDEPS=('gcc' 'libffi-dev') G_EXEC curl -sSf 'https://sh.rustup.rs/' -o rustup-init.sh G_EXEC chmod +x rustup-init.sh - G_EXEC_OUTPUT=1 G_EXEC ./rustup-init.sh -y --profile minimal + G_EXEC_OUTPUT=1 G_EXEC sudo -u octoprint ./rustup-init.sh -y --profile minimal G_EXEC rm rustup-init.sh export PATH="/root/.cargo/bin:$PATH" @@ -10160,11 +10161,6 @@ _EOF_ G_AGI gcc fi - # Pre-create user and its home directory to allow user-level Python instance - Create_User -G dialout,tty,video -d /mnt/dietpi_userdata/octoprint octoprint - G_EXEC mkdir -p /mnt/dietpi_userdata/octoprint - G_EXEC chown -R octoprint:octoprint /mnt/dietpi_userdata/octoprint - # Clear pip cache in case it got somehow created [[ -d '/mnt/dietpi_userdata/octoprint/.cache' ]] && G_EXEC rm -R /mnt/dietpi_userdata/octoprint/.cache From f50aba81dd60c2632e2a280e7bf6dd9ecb1ef9f1 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 24 Apr 2024 17:47:22 +0200 Subject: [PATCH 125/458] v9.4 - DietPi-Software | OctoPrint: Pass PATH correctly for RISC-V PATH --- dietpi/dietpi-software | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 57832afe23..29ed6c25c1 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -10145,6 +10145,7 @@ _EOF_ # Deps # - RISC-V: gcc and libffi-dev for cffi, Rust for maturin + local aPATH=() if (( $G_HW_ARCH == 11 )) then aDEPS=('gcc' 'libffi-dev') @@ -10152,7 +10153,7 @@ _EOF_ G_EXEC chmod +x rustup-init.sh G_EXEC_OUTPUT=1 G_EXEC sudo -u octoprint ./rustup-init.sh -y --profile minimal G_EXEC rm rustup-init.sh - export PATH="/root/.cargo/bin:$PATH" + aPATH=("PATH='/mnt/dietpi_userdata/octoprint/.cargo/bin:$PATH'") # - ARMv8: gcc for psutil # - ARMv6/7: gcc for regex: https://github.com/piwheels/packages/issues/442 @@ -10165,7 +10166,7 @@ _EOF_ [[ -d '/mnt/dietpi_userdata/octoprint/.cache' ]] && G_EXEC rm -R /mnt/dietpi_userdata/octoprint/.cache # Install OctoPrint - G_EXEC_OUTPUT=1 G_EXEC sudo -u octoprint pip3 install -U --user --no-warn-script-location octoprint + G_EXEC_OUTPUT=1 G_EXEC sudo -u octoprint "${aPATH[@]}" pip3 install -U --user --no-warn-script-location octoprint # Service: https://github.com/OctoPrint/OctoPrint/blob/master/scripts/octoprint.service cat << '_EOF_' > /etc/systemd/system/octoprint.service From ea4959739e35c85178d1a9a827799736836a285e Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 24 Apr 2024 17:50:02 +0200 Subject: [PATCH 126/458] v9.4 - CI | DietPi-Software test: Allow service in emulated container more time to startup --- .github/workflows/dietpi-software.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index f10f4e2687..46575d232f 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -181,7 +181,7 @@ Process_Software() 152) aSERVICES[i]='avahi-daemon' aUDP[i]='5353';; 153) aSERVICES[i]='octoprint' aTCP[i]='5001'; (( $arch == 10 )) || aDELAY[i]=60;; 154) aSERVICES[i]='roonserver';; # Listens on a variety of different port ranges - 155) aSERVICES[i]='htpc-manager' aTCP[i]='8085';; + 155) aSERVICES[i]='htpc-manager' aTCP[i]='8085'; (( $arch == 10 )) || aDELAY[i]=30;; 157) aSERVICES[i]='home-assistant' aTCP[i]='8123'; (( $arch == 10 )) && aDELAY[i]=60 || aDELAY[i]=900;; 158) aSERVICES[i]='minio' aTCP[i]='9001 9004';; 161) aSERVICES[i]='bdd' aTCP[i]='80 443';; From 9e872115cdbb47d539534396e308f40baf0a1ea9 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 24 Apr 2024 18:15:22 +0200 Subject: [PATCH 127/458] v9.4 - DietPi-Software | HTPC Manager: Fix libtiff version for Bookworm/Trixie - DietPi-Software | Synapse: Skip obsolete dependencies for installs on ARMv6/7 Bookworm/Trixie systems --- dietpi/dietpi-software | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 29ed6c25c1..f7908e1554 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3881,20 +3881,20 @@ _EOF_ then # APT deps for Synapse with PostgreSQL case $G_HW_ARCH in - [12]|11) - if (( $G_DISTRO < 7 )) - then - G_AGI libtiff5 libopenjp2-7 libxcb1 # ARMv6/7: Runtime libs for Pillow from piwheels (libtiff5 pulls libjpeg62-turbo) - else - # Bookworm: Most wheels need to be compiled: gcc and libffi-dev for cffi, Rust for cryptography and matrix-synapse, libpq-dev for psycopg2, make for PyNaCl, libjpeg62-turbo-dev for Pillow, libssl-dev and pkg-config for cryptography - G_AGI gcc libffi-dev libpq-dev make libjpeg62-turbo-dev libssl-dev pkg-config - 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 - G_EXEC_OUTPUT=1 G_EXEC ./rustup-init.sh -y --profile minimal ${RPI_64KERNEL_32OS:+'--default-host' 'armv7-unknown-linux-gnueabihf'} - G_EXEC rm rustup-init.sh - export PATH="/root/.cargo/bin:$PATH" - fi + 1|2) + local libtiff='libtiff6' + (( $G_DISTRO < 7 )) && libtiff='libtiff5' + G_AGI "$libtiff" libopenjp2-7 libxcb1;; # ARMv6/7: Runtime libs for Pillow from piwheels (libtiff pulls libjpeg62-turbo) + ;; + 11) + # gcc and libffi-dev for cffi, Rust for cryptography and matrix-synapse, libpq-dev for psycopg2, make for PyNaCl, libjpeg62-turbo-dev for Pillow, libssl-dev and pkg-config for cryptography + G_AGI gcc libffi-dev libpq-dev make libjpeg62-turbo-dev libssl-dev pkg-config + 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 + G_EXEC_OUTPUT=1 G_EXEC ./rustup-init.sh -y --profile minimal ${RPI_64KERNEL_32OS:+'--default-host' 'armv7-unknown-linux-gnueabihf'} + G_EXEC rm rustup-init.sh + export PATH="/root/.cargo/bin:$PATH" ;; *) G_AGI gcc libpq-dev;; # ARMv8/x86_64: psycopg2 needs to be compiled esac @@ -10085,7 +10085,11 @@ _EOF_ # APT deps case $G_HW_ARCH in - 1|2) G_AGI libtiff5 libopenjp2-7 libxcb1;; # ARMv6/7: Runtime libs for Pillow from piwheels (libtiff5 pulls libjpeg62-turbo) + 1|2) + local libtiff='libtiff6' + (( $G_DISTRO < 7 )) && libtiff='libtiff5' + G_AGI "$libtiff" libopenjp2-7 libxcb1;; # ARMv6/7: Runtime libs for Pillow from piwheels (libtiff pulls libjpeg62-turbo) + ;; 3) G_AGI gcc;; # gcc for psutil 11) # gcc and libffi-dev for cffi, libssl-dev and Rust for cryptography and bcrypt, make for PyNaCl, libjpeg62-turbo-dev for Pillow, pkg-config for cryptography From 6bfafb7b8b8efb323e1a48a9701e7cefe758de77 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 24 Apr 2024 18:25:57 +0200 Subject: [PATCH 128/458] v9.4 - DietPi-Software | Syntax --- dietpi/dietpi-software | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index f7908e1554..47effc1e32 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3884,7 +3884,7 @@ _EOF_ 1|2) local libtiff='libtiff6' (( $G_DISTRO < 7 )) && libtiff='libtiff5' - G_AGI "$libtiff" libopenjp2-7 libxcb1;; # ARMv6/7: Runtime libs for Pillow from piwheels (libtiff pulls libjpeg62-turbo) + G_AGI "$libtiff" libopenjp2-7 libxcb1 # ARMv6/7: Runtime libs for Pillow from piwheels (libtiff pulls libjpeg62-turbo) ;; 11) # gcc and libffi-dev for cffi, Rust for cryptography and matrix-synapse, libpq-dev for psycopg2, make for PyNaCl, libjpeg62-turbo-dev for Pillow, libssl-dev and pkg-config for cryptography @@ -10088,7 +10088,7 @@ _EOF_ 1|2) local libtiff='libtiff6' (( $G_DISTRO < 7 )) && libtiff='libtiff5' - G_AGI "$libtiff" libopenjp2-7 libxcb1;; # ARMv6/7: Runtime libs for Pillow from piwheels (libtiff pulls libjpeg62-turbo) + G_AGI "$libtiff" libopenjp2-7 libxcb1 # ARMv6/7: Runtime libs for Pillow from piwheels (libtiff pulls libjpeg62-turbo) ;; 3) G_AGI gcc;; # gcc for psutil 11) From 921bdb18e64a9728d74a41fe5b642fe1a4c7d210 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 24 Apr 2024 20:51:05 +0200 Subject: [PATCH 129/458] v9.4 - CI | DietPi-Software test: Add more service startup time for HTPC Manager on ARMv8 Trixie systems, needed for whatever reason --- .github/workflows/dietpi-software.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index 46575d232f..d735537fa5 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -181,7 +181,7 @@ Process_Software() 152) aSERVICES[i]='avahi-daemon' aUDP[i]='5353';; 153) aSERVICES[i]='octoprint' aTCP[i]='5001'; (( $arch == 10 )) || aDELAY[i]=60;; 154) aSERVICES[i]='roonserver';; # Listens on a variety of different port ranges - 155) aSERVICES[i]='htpc-manager' aTCP[i]='8085'; (( $arch == 10 )) || aDELAY[i]=30;; + 155) aSERVICES[i]='htpc-manager' aTCP[i]='8085'; (( $arch == 10 )) || aDELAY[i]=30; [[ $arch == 3 && $DISTRO == 'trixie' ]] && aDELAY[i]=60;; 157) aSERVICES[i]='home-assistant' aTCP[i]='8123'; (( $arch == 10 )) && aDELAY[i]=60 || aDELAY[i]=900;; 158) aSERVICES[i]='minio' aTCP[i]='9001 9004';; 161) aSERVICES[i]='bdd' aTCP[i]='80 443';; From a509085445ba5d4db3e9da16846bc6b713aaa754 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 25 Apr 2024 11:28:16 +0200 Subject: [PATCH 130/458] v9.4 - DietPi-Software | Bazarr/OctoPrint: Remove obsolete dependencies --- dietpi/dietpi-software | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 47effc1e32..3a64d1c49b 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -9666,8 +9666,7 @@ _EOF_ # APT deps if (( $G_HW_ARCH < 3 )) then - aDEPS=('g++' 'libopenblas-dev' 'pkg-config') # g++, libopenblas-dev and pkg-config for numpy until wheels have been built on piwheels. Afterwards install libopenblas0 runtime library instead: https://piwheels.org/project/numpy/ - (( $G_DISTRO < 7 )) || aDEPS+=('libxslt1-dev') # Bookworm: libxslt1-dev and gcc for lxml until wheels have been built on piwheels: https://piwheels.org/project/lxml/ + aDEPS=('libopenblas0-pthread') # libopenblas0-pthread runtime library for piwheels wheel: https://piwheels.org/project/numpy/ (( $G_HW_ARCH == 1 )) && aDEPS+=('unar') # ARMv6 does not support unrar-nonfree and Bazarr does not support unrar-free, so we need to use "unar": https://github.com/morpheus65535/bazarr/issues/2172 fi @@ -10160,8 +10159,7 @@ _EOF_ aPATH=("PATH='/mnt/dietpi_userdata/octoprint/.cargo/bin:$PATH'") # - ARMv8: gcc for psutil - # - ARMv6/7: gcc for regex: https://github.com/piwheels/packages/issues/442 - elif (( $G_HW_ARCH == 3 || ( $G_HW_ARCH < 3 && $G_DISTRO == 6 ) )) + elif (( $G_HW_ARCH == 3 )) then G_AGI gcc fi From 01a53c2d74d04f321b870a66eb45d7281c46efc7 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 25 Apr 2024 14:01:31 +0200 Subject: [PATCH 131/458] v9.4 - CI | DietPi-Build: Add ROCK 4C Plus to "all" builds --- .github/workflows/dietpi-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/dietpi-build.yml b/.github/workflows/dietpi-build.yml index d8f98dc353..0307a374b4 100644 --- a/.github/workflows/dietpi-build.yml +++ b/.github/workflows/dietpi-build.yml @@ -70,6 +70,7 @@ jobs: '"-m 70 -d 6 -e all", '\ '"-m 72.1 -d 6", "-m 72.1 -d 7", "-m 72.1 -d 8", '\ '"-m 72.2 -d 6", "-m 72.2 -d 7", "-m 72.2 -d 8", '\ + '"-m 72.3 -d 6", "-m 72.3 -d 7", "-m 72.3 -d 8", '\ '"-m 73 -d 6", "-m 73 -d 7", "-m 73 -d 8", '\ '"-m 74 -d 6", "-m 74 -d 7", "-m 74 -d 8", '\ '"-m 75 -a 1 -d 6", "-m 75 -a 2 -d 6", "-m 75 -a 3 -d 6", "-m 75 -a 10 -d 6", '\ From 8a404f786e88fa599e8f1f4ef08ad8cb547ccae1 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 25 Apr 2024 18:14:56 +0200 Subject: [PATCH 132/458] v9.4 - DietPi-Globals | Apply Armbian APT fetch failure workaround for APT updates as well (instead of installs/upgrades only) --- dietpi/func/dietpi-globals | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index ecea008fc3..314e3c3089 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -1572,6 +1572,9 @@ Press any key to continue...' # Clean cache before every update, which can corrupt and gets fully rewritten anyway G_EXEC_PRE_FUNC(){ apt-get clean; } + # Workaround for Armbian mirrors being out of sync regularly or throwing 5xx errors + [[ -f '/etc/apt/sources.list.d/dietpi-armbian.list' ]] && G_EXEC_POST_FUNC(){ [[ $exit_code != 0 ]] && grep -q '^E: Failed to fetch .*armbian' "$fp_log" && G_EXEC_RETRIES=2 && unset -f G_EXEC_POST_FUNC; } + G_EXEC_DESC='\e[0mAPT update' G_EXEC_OUTPUT=1 G_EXEC_OUTPUT_COL='\e[90m' G_EXEC apt-get -y -eany update local exit_code=$? From c791d2a5ce0364b5a7e2369db0414a9cb084563f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 25 Apr 2024 18:23:36 +0200 Subject: [PATCH 133/458] v9.4 - CI | DietPi-Build: Test mmdebstrap, which should be faster, includes security and update suites automatically, and hopefully fixes current and regularly happening issues with debootstrap and Debian testing/unstable --- .build/images/dietpi-build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index d70376fb2a..2286f66a05 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -217,7 +217,7 @@ fi # Virtual machine disk conversion [[ $VMTYPE && $VMTYPE != 'raw' ]] && apackages+=('qemu-utils') -G_AG_CHECK_INSTALL_PREREQ parted debootstrap dbus systemd-container xz-utils "${apackages[@]}" +G_AG_CHECK_INSTALL_PREREQ parted mmdebstrap dbus systemd-container xz-utils "${apackages[@]}" # Bootstrap archive keyring if missing if [[ ! -f $keyring ]] @@ -379,8 +379,8 @@ G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/lib/apt/lists G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/log packages='apt,bash-completion,bzip2,ca-certificates,cron,curl,fdisk,gnupg,htop,iputils-ping,locales,nano,p7zip,parted,procps,psmisc,sudo,systemd-sysv,tzdata,udev,unzip,wget,whiptail,' [[ $HW_MODEL == 75 ]] && packages+='iproute2' || packages+='console-setup,dropbear,ethtool,fake-hwclock,ifupdown,isc-dhcp-client,kmod,rfkill,systemd-timesyncd,usbutils' -G_EXEC_POST_FUNC(){ [[ $exit_code == 0 ]] || cat rootfs/debootstrap/debootstrap.log; } -G_EXEC_OUTPUT=1 G_EXEC debootstrap --variant=minbase --include="$packages" --arch="$parch" --keyring="$keyring" "$distro" ./rootfs "$repo" +#G_EXEC_POST_FUNC(){ [[ $exit_code == 0 ]] || cat rootfs/debootstrap/debootstrap.log; } +G_EXEC_OUTPUT=1 G_EXEC mmdebstrap --variant=minbase --include="$packages" --arch="$parch" --keyring="$keyring" "$distro" ./rootfs "$repo" G_EXEC umount rootfs/dev rootfs/run rootfs/var/cache/apt rootfs/var/lib/apt/lists rootfs/var/log ########################################## From ae7fe5201e30e4c6a7cb0cbfa7fb8ef2eacd7f5e Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 25 Apr 2024 18:24:56 +0200 Subject: [PATCH 134/458] v9.4 - DietPi-Installer | Fix raspberrypi-sys-mods package install from our repo --- .build/images/dietpi-installer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 6c37f6365b..283003fc9f 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1268,7 +1268,7 @@ _EOF_ G_CONFIG_INJECT 'SKIP_INITRAMFS_GEN=' 'SKIP_INITRAMFS_GEN=yes' /etc/default/raspi-firmware G_AGI "${kernel[@]}" raspi-utils raspberrypi-sys-mods raspberrypi-archive-keyring "${a32bit[@]}" tiny-initramfs else - G_AGI raspberrypi-bootloader raspberrypi-kernel libraspberrypi0 libraspberrypi-bin ./raspberrypi-sys-mods.deb raspberrypi-archive-keyring "${a32bit[@]}" + G_AGI raspberrypi-bootloader raspberrypi-kernel libraspberrypi0 libraspberrypi-bin raspberrypi-sys-mods raspberrypi-archive-keyring "${a32bit[@]}" fi G_EXEC rm raspberrypi-sys-mods.deb From 9088c1adf4121edcfe9d8b1d81aed0e14fb1bf29 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 25 Apr 2024 18:53:45 +0200 Subject: [PATCH 135/458] v9.4 - DietPi-Build | Try to allow non-empty target dir for mmdebstrap --- .build/images/dietpi-build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 2286f66a05..397930aad0 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -380,7 +380,7 @@ G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/log packages='apt,bash-completion,bzip2,ca-certificates,cron,curl,fdisk,gnupg,htop,iputils-ping,locales,nano,p7zip,parted,procps,psmisc,sudo,systemd-sysv,tzdata,udev,unzip,wget,whiptail,' [[ $HW_MODEL == 75 ]] && packages+='iproute2' || packages+='console-setup,dropbear,ethtool,fake-hwclock,ifupdown,isc-dhcp-client,kmod,rfkill,systemd-timesyncd,usbutils' #G_EXEC_POST_FUNC(){ [[ $exit_code == 0 ]] || cat rootfs/debootstrap/debootstrap.log; } -G_EXEC_OUTPUT=1 G_EXEC mmdebstrap --variant=minbase --include="$packages" --arch="$parch" --keyring="$keyring" "$distro" ./rootfs "$repo" +G_EXEC_OUTPUT=1 G_EXEC mmdebstrap --skip=check/empty --variant=minbase --include="$packages" --arch="$parch" --keyring="$keyring" "$distro" ./rootfs "$repo" G_EXEC umount rootfs/dev rootfs/run rootfs/var/cache/apt rootfs/var/lib/apt/lists rootfs/var/log ########################################## From b544a700492b1c7b528728f1f5bac8fc809dff5c Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 25 Apr 2024 20:22:40 +0200 Subject: [PATCH 136/458] v9.4 - DietPi-Software | NZBGet: Update fallback URL --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 3a64d1c49b..fb19a7f77c 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -9872,7 +9872,7 @@ _EOF_ local reinstall=0 [[ -f '/mnt/dietpi_userdata/nzbget/nzbget.conf' ]] && reinstall=1 - local fallback_url='https://github.com/nzbgetcom/nzbget/releases/download/v22.0/nzbget-22.0-bin-linux.run' + local fallback_url='https://github.com/nzbgetcom/nzbget/releases/download/v24.0/nzbget-24.0-bin-linux.run' Download_Install "$(curl -sSfL 'https://api.github.com/repos/nzbgetcom/nzbget/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/nzbget-[^"/]*-bin-linux.run"$/{print $4}')" nzbget.run G_EXEC mkdir -p /mnt/dietpi_userdata/nzbget G_EXEC_OUTPUT=1 G_EXEC dash nzbget.run --destdir /mnt/dietpi_userdata/nzbget From f806fe8381ee296365aedc6f03850d955eabfe31 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 25 Apr 2024 21:16:35 +0200 Subject: [PATCH 137/458] v9.4 - DietPi-Imager | Remove obsolete step --- .build/images/dietpi-installer | 1 - 1 file changed, 1 deletion(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 283003fc9f..c2656159b9 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1270,7 +1270,6 @@ _EOF_ else G_AGI raspberrypi-bootloader raspberrypi-kernel libraspberrypi0 libraspberrypi-bin raspberrypi-sys-mods raspberrypi-archive-keyring "${a32bit[@]}" fi - G_EXEC rm raspberrypi-sys-mods.deb # https://github.com/RPi-Distro/raspberrypi-sys-mods/pull/60 [[ -f '/etc/apt/trusted.gpg.d/microsoft.gpg' ]] && G_EXEC rm /etc/apt/trusted.gpg.d/microsoft.gpg From 18ca04a513a4d637064b32e18e8041b7afa323a2 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 25 Apr 2024 22:28:51 +0200 Subject: [PATCH 138/458] v9.4 - DietPi-Build | Workaround for failing build on ARMv6/7 Trixie systems due to conflicting libssl3 and libssl3t64 dependencies --- .build/images/dietpi-build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 397930aad0..2164d2ebec 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -379,6 +379,8 @@ G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/lib/apt/lists G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/log packages='apt,bash-completion,bzip2,ca-certificates,cron,curl,fdisk,gnupg,htop,iputils-ping,locales,nano,p7zip,parted,procps,psmisc,sudo,systemd-sysv,tzdata,udev,unzip,wget,whiptail,' [[ $HW_MODEL == 75 ]] && packages+='iproute2' || packages+='console-setup,dropbear,ethtool,fake-hwclock,ifupdown,isc-dhcp-client,kmod,rfkill,systemd-timesyncd,usbutils' +# Workaround for failing build on ARMv6/7 Trixie systems due to conflicting libssl3 and libssl3t64 dependencies +(( $HW_ARCH < 3 && $DISTRO > 7 )) && packages+=',libssl3t64' #G_EXEC_POST_FUNC(){ [[ $exit_code == 0 ]] || cat rootfs/debootstrap/debootstrap.log; } G_EXEC_OUTPUT=1 G_EXEC mmdebstrap --skip=check/empty --variant=minbase --include="$packages" --arch="$parch" --keyring="$keyring" "$distro" ./rootfs "$repo" G_EXEC umount rootfs/dev rootfs/run rootfs/var/cache/apt rootfs/var/lib/apt/lists rootfs/var/log From 90d6c6fd5e5ef0c1f1c0560a529227a6686573a3 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 25 Apr 2024 23:08:43 +0200 Subject: [PATCH 139/458] v9.4 - DietPi-Installer | Install firmware package from our server prior to its APT install, to avoid a doubled install/upgrade step --- .build/images/dietpi-installer | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index c2656159b9..ab610487b8 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1137,6 +1137,12 @@ blacklist rockchip_vdec _EOF_ fi # Install initramfs-tools first to have an initramfs generated on kernel install, and configure it to use zstd if supported for better compression and faster decompression + if (( $dietpi_kernel )) + then + G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/armbian-firmware.deb' + G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb + G_EXEC rm package.deb + fi [[ $kernel == 'rockchip64' || $kernel == 'rk35xx' || $kernel == 'meson64' || $kernel == 'sunxi64' || $kernel == 'sunxi' || $kernel == 'rockchip' ]] && zstd=('zstd') G_AGI initramfs-tools u-boot-tools armbian-firmware "${zstd[@]}" [[ ${zstd[0]} ]] && G_CONFIG_INJECT 'COMPRESS=' 'COMPRESS=zstd' /etc/initramfs-tools/initramfs.conf @@ -1145,9 +1151,8 @@ _EOF_ then G_EXEC_OUTPUT=1 G_EXEC curl -fo package1.deb "https://dietpi.com/downloads/binaries/linux-image-$branch-$kernel.deb" G_EXEC_OUTPUT=1 G_EXEC curl -fo package2.deb "https://dietpi.com/downloads/binaries/linux-dtb-$branch-$kernel.deb" - G_EXEC_OUTPUT=1 G_EXEC curl -fo package3.deb 'https://dietpi.com/downloads/binaries/armbian-firmware.deb' - G_EXEC_OUTPUT=1 G_EXEC dpkg -i package[1-3].deb - G_EXEC rm package[1-3].deb + G_EXEC_OUTPUT=1 G_EXEC dpkg -i package[12].deb + G_EXEC rm package[12].deb fi # Download and pre-install U-Boot hosted on dietpi.com where the Armbian APT repo provides a too old version or is not available if (( $dietpi_uboot )) From 16a75a47bee94ba5604ae74fa405ffb7c4181ef3 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 25 Apr 2024 23:46:30 +0200 Subject: [PATCH 140/458] v9.4 - DietPi-Imager | dietpiEnv.txt cannot exist on the rootfs, if it is not the bootfs --- .build/images/dietpi-imager | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build/images/dietpi-imager b/.build/images/dietpi-imager index fdc61988b5..176c6021d4 100755 --- a/.build/images/dietpi-imager +++ b/.build/images/dietpi-imager @@ -529,7 +529,7 @@ G_EXEC mount "${FP_ROOT_DEV::-1}1" "$fat_mountpoint" G_EXEC mount "$FP_ROOT_DEV" "$root_mountpoint" G_DIETPI-NOTIFY 2 'Copying dietpi.txt and other config files to the DIETPISETUP partition' - for f in 'dietpi.txt' 'dietpi-wifi.txt' 'dietpiEnv.txt' 'unattended_pivpn.conf' 'Automation_Custom_PreScript.sh' 'Automation_Custom_Script.sh' + for f in 'dietpi.txt' 'dietpi-wifi.txt' 'unattended_pivpn.conf' 'Automation_Custom_PreScript.sh' 'Automation_Custom_Script.sh' do [[ -f $root_mountpoint/boot/$f ]] && G_EXEC cp "$root_mountpoint/boot/$f" "$fat_mountpoint/" done From 3710fdd56a3d456dd8980f9d56535db2fbe30c7b Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 26 Apr 2024 13:44:04 +0200 Subject: [PATCH 141/458] v9.4 - DietPi-Build | Raise some image sizes required for Trixie and temporarily skip Trixie AlloGUI builds: The netdata package is currently not available (only on Raspbian, not Debian) and systemd-logind fails to start within the container as of a new change/bug, to investigate. --- .build/images/dietpi-build | 23 ++++++++++++----------- .build/images/dietpi-imager | 4 ++-- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 2164d2ebec..4bba54f1ec 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -83,9 +83,9 @@ case $HW_MODEL in 5) iname='RPi5' HW_ARCH=3 boot_size=128 root_size=895;; 10) iname='OdroidC1' HW_ARCH=2 partition_start=4 boot_size=128 root_size=700 boot_fstype='fat16';; 11) iname='OdroidXU4' HW_ARCH=2 partition_start=4 root_size=764;; - 12) iname='OdroidC2' HW_ARCH=3 partition_start=4 root_size=1020;; - 15) iname='OdroidN2' HW_ARCH=3 partition_start=4 root_size=1020;; - 16) iname='OdroidC4' HW_ARCH=3 partition_start=4 root_size=1020;; + 12) iname='OdroidC2' HW_ARCH=3 partition_start=4 root_size=1148;; + 15) iname='OdroidN2' HW_ARCH=3 partition_start=4 root_size=1148;; + 16) iname='OdroidC4' HW_ARCH=3 partition_start=4 root_size=1148;; 20) iname='VM' HW_ARCH=${HW_ARCH:-10} VMTYPE=${VMTYPE:-raw};; 21) iname='NativePC-BIOS' HW_ARCH=10 root_size=1663;; 40) iname='PINEA64' HW_ARCH=3 partition_start=4 root_size=892;; @@ -100,7 +100,7 @@ case $HW_MODEL in '49.2') iname='Quartz64B' HW_ARCH=3 partition_start=16 root_size=752;; '49.3') iname='SOQuartz' HW_ARCH=3 partition_start=16 root_size=752;; 52) iname='ASUSTB' HW_ARCH=2 partition_start=4 root_size=764;; - 54) iname='NanoPiK2' HW_ARCH=3 partition_start=4 root_size=1020;; + 54) iname='NanoPiK2' HW_ARCH=3 partition_start=4 root_size=1148;; 55) iname='NanoPiR2S' HW_ARCH=3 partition_start=16 root_size=1008;; 56) iname='NanoPiNEO3' HW_ARCH=3 partition_start=16 root_size=1008;; 57) iname='NanoPiNEOPlus2' HW_ARCH=3 partition_start=4 root_size=892;; @@ -112,10 +112,10 @@ case $HW_MODEL in '62.2') iname='NanoPiFire3' HW_ARCH=3 partition_start=4 root_size=700;; 63) iname='NanoPiM1' HW_ARCH=2 partition_start=4 root_size=764;; 64) iname='NanoPiNEOAir' HW_ARCH=2 partition_start=4 root_size=764;; - '65.1') iname='NanoPiNEO2' HW_ARCH=3 partition_start=4 root_size=892;; - '65.2') iname='NanoPiNEO2Black' HW_ARCH=3 partition_start=4 root_size=892;; + '65.1') iname='NanoPiNEO2' HW_ARCH=3 partition_start=4 root_size=1020;; + '65.2') iname='NanoPiNEO2Black' HW_ARCH=3 partition_start=4 root_size=1020;; 66) iname='NanoPiM1Plus' HW_ARCH=2 partition_start=4 root_size=764;; - 67) iname='NanoPiK1Plus' HW_ARCH=3 partition_start=4 root_size=892;; + 67) iname='NanoPiK1Plus' HW_ARCH=3 partition_start=4 root_size=1020;; '68.1') iname='NanoPiM4' HW_ARCH=3 partition_start=16 root_size=1008;; '68.2') iname='NanoPCT4' HW_ARCH=3 partition_start=16 root_size=1008;; '68.3') iname='NanoPiNEO4' HW_ARCH=3 partition_start=16 root_size=1008;; @@ -124,11 +124,11 @@ case $HW_MODEL in '72.2') iname='ROCK4SE' HW_ARCH=3 partition_start=16 root_size=1008;; '72.3') iname='ROCK4CPlus' HW_ARCH=3 partition_start=16 root_size=1008;; 73) iname='ROCKPiS' HW_ARCH=3 partition_start=16 root_size=1008;; - 74) iname='RadxaZero' HW_ARCH=3 partition_start=4 root_size=1020;; + 74) iname='RadxaZero' HW_ARCH=3 partition_start=4 root_size=1148;; 75) iname='Container' HW_ARCH=${HW_ARCH:-10} root_size=575;; '76.1') iname='NanoPiR5S' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; '76.2') iname='NanoPiR5C' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; - 77) iname='ROCK3A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; + 77) iname='ROCK3A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; 78) iname='ROCK5B' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; '79.1') iname='NanoPiR6S' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; '79.2') iname='NanoPiR6C' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; @@ -141,7 +141,7 @@ case $HW_MODEL in 84) iname='Star64' HW_ARCH=11 root_size=639;; 85) iname='ROCK5A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; 86) iname='ASUSTB2' HW_ARCH=3 partition_start=16 root_size=1008;; - 87) iname='OrangePi3B' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; + 87) iname='OrangePi3B' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; *) G_DIETPI-NOTIFY 1 "Invalid hardware model \"$HW_MODEL\" passed, aborting..."; exit 1;; esac @@ -510,7 +510,8 @@ then fi # AlloGUI edition: Pre-install Allo GUI with all managed audiophile software -if [[ $EDITION == 'AlloGUI' || ( $EDITION == 'all' && $HW_MODEL =~ ^(0|70)$ ) ]] +# - Temporarily skip Trixie AlloGUI builds: The netdata package is currently not available (only on Raspbian, not Debian) and systemd-logind fails to start within the container as of a new change/bug, to investigate. +if [[ $EDITION == 'AlloGUI' || ( $EDITION == 'all' && $HW_MODEL =~ ^(0|70)$ && $DISTRO != 8 ) ]] then G_EXEC mv "$OUTPUT_IMG_NAME.img" "${OUTPUT_IMG_NAME%_Amiberry}_AlloGUI.img" OUTPUT_IMG_NAME="${OUTPUT_IMG_NAME%_Amiberry}_AlloGUI" diff --git a/.build/images/dietpi-imager b/.build/images/dietpi-imager index 176c6021d4..832e3d6e46 100755 --- a/.build/images/dietpi-imager +++ b/.build/images/dietpi-imager @@ -61,8 +61,8 @@ [[ $SKIP_FIRSTBOOT_RESIZE == 1 ]] || SKIP_FIRSTBOOT_RESIZE=0 [[ $SHRINK_ONLY == 1 ]] || SHRINK_ONLY=0 [[ $SKIP_ARCHIVE == 1 ]] || SKIP_ARCHIVE=0 - ADD_DOS_PART=0 - CONFIGS_TO_BOOT=0 + ADD_DOS_PART=0 # trailing FAT partition for first boot config files, automatically imported and partition removed on first boot + CONFIGS_TO_BOOT=0 # for new RPi kernel/firmware stack where a boot FAT partition exists, but is mounted to /boot/firmware instead of /boot SIGN_PASS= while (( $# )) do From 06dc9a31ccfb46a7797b8b5af4eeaaeb6ab87c6c Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 26 Apr 2024 14:00:32 +0200 Subject: [PATCH 142/458] v9.4 - DietPi-Imager | Use multi-threaded xz compression. Other than 7zip, xz uses a single thread only by default --- .build/images/dietpi-imager | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.build/images/dietpi-imager b/.build/images/dietpi-imager index 832e3d6e46..10ed47c673 100755 --- a/.build/images/dietpi-imager +++ b/.build/images/dietpi-imager @@ -746,10 +746,10 @@ _EOF_ # Generate xz archive # NB: LZMA2 ultra compression requires much memory per thread. 1 GiB is not sufficient for >2 threads, hence use "-T2" to limit used CPU threads to "2" on 1 GiB devices with more than two cores. - local limit_threads=() - (( $(free -m | mawk '/Mem:/{print $2}') < 1750 && $(nproc) > 2 )) && limit_threads=('-T2') + local threads=$(nproc) + (( $(free -m | mawk '/Mem:/{print $2}') < 1750 && $threads > 2 )) && threads=2 [[ -f $OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz ]] && G_EXEC rm "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz" - G_EXEC_DESC='Creating final xz archive' G_EXEC xz -9e -k "${limit_threads[@]}" "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT" + G_EXEC_DESC='Creating final xz archive' G_EXEC xz -9e -k "$threads" "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT" G_EXEC_DESC='Generating SHA256 hash' G_EXEC eval "sha256sum '$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz' > '$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz.sha256'" local signature=() sig_text='' [[ $SIGN_PASS ]] && { G_DIETPI-NOTIFY 2 'Signing archive ...'; gpg --batch --pinentry-mode loopback --passphrase "$SIGN_PASS" -b --armor "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz" || exit 1; signature=("$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz.asc") sig_text="\nSignature: $PWD/${signature[*]}"; } From 60600bdae76ee06d8f64e0eeb3d68bd35dacdd78 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 26 Apr 2024 14:04:32 +0200 Subject: [PATCH 143/458] v9.4 - DietPi-Imager | Fix xz threads option and use special value "0" to automate the number of threads and assure multi-theaded mode (for decompression) even in case of a single CPU core/thread. --- .build/images/dietpi-imager | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.build/images/dietpi-imager b/.build/images/dietpi-imager index 10ed47c673..e1d975a6e4 100755 --- a/.build/images/dietpi-imager +++ b/.build/images/dietpi-imager @@ -746,10 +746,10 @@ _EOF_ # Generate xz archive # NB: LZMA2 ultra compression requires much memory per thread. 1 GiB is not sufficient for >2 threads, hence use "-T2" to limit used CPU threads to "2" on 1 GiB devices with more than two cores. - local threads=$(nproc) - (( $(free -m | mawk '/Mem:/{print $2}') < 1750 && $threads > 2 )) && threads=2 + local threads=0 + (( $(free -m | mawk '/Mem:/{print $2}') < 1750 && $(nproc) > 2 )) && threads=2 [[ -f $OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz ]] && G_EXEC rm "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz" - G_EXEC_DESC='Creating final xz archive' G_EXEC xz -9e -k "$threads" "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT" + G_EXEC_DESC='Creating final xz archive' G_EXEC xz -9e -k "-T$threads" "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT" G_EXEC_DESC='Generating SHA256 hash' G_EXEC eval "sha256sum '$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz' > '$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz.sha256'" local signature=() sig_text='' [[ $SIGN_PASS ]] && { G_DIETPI-NOTIFY 2 'Signing archive ...'; gpg --batch --pinentry-mode loopback --passphrase "$SIGN_PASS" -b --armor "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz" || exit 1; signature=("$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz.asc") sig_text="\nSignature: $PWD/${signature[*]}"; } From 13d20c75aeec6669a57ee0da25ca5e1479e601ab Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 27 Apr 2024 21:26:08 +0200 Subject: [PATCH 144/458] v9.4 - DietPi-Installer | When flashing U-Boot via Armbian's script, do not mute progress and error messages --- .build/images/dietpi-installer | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index ab610487b8..eb7ca51e26 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1181,6 +1181,8 @@ _EOF_ # Flash U-Boot # shellcheck disable=SC1091 . /usr/lib/u-boot/platform_install.sh + # - Do not mute progress and error messages + eval "$(declare -f write_uboot_platform | sed -e 's| > /dev/null 2>&1||g' -e 's|status=none|status=progress|g')" # shellcheck disable=SC2154 write_uboot_platform "$DIR" "$BOOT_DEVICE" From 80536116081d329b48005b1f9633b6e64c42658b Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 27 Apr 2024 21:39:34 +0200 Subject: [PATCH 145/458] v9.4 (#7046) - DietPi-Imager | Skip moving backup partition table before touching the image. parted/sfdisk may throw warnings, but the step can fail if the last partition reaches the end of the image, e.g. if the file was cut right after the last partition, ignoring the backup table. Additionally, obtain the size needed for the GPT backup correctly by the first usabe LBA/sector, instead of using the 34 sectors default GPT size. fdisk/sfdisk use 2048 by default, while parted defaults to the actual 34 sectors the GPT truly uses. From b215c0149b4add4e8e20e03d326a8b197d2ee3cf Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 28 Apr 2024 15:59:04 +0200 Subject: [PATCH 146/458] v9.4 - DietPi-Build | Raise some image sizes for Trixie - DietPi-Software | Update fallback URLs --- .build/images/dietpi-build | 8 ++++---- dietpi/dietpi-software | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 4bba54f1ec..5d9992374c 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -88,11 +88,11 @@ case $HW_MODEL in 16) iname='OdroidC4' HW_ARCH=3 partition_start=4 root_size=1148;; 20) iname='VM' HW_ARCH=${HW_ARCH:-10} VMTYPE=${VMTYPE:-raw};; 21) iname='NativePC-BIOS' HW_ARCH=10 root_size=1663;; - 40) iname='PINEA64' HW_ARCH=3 partition_start=4 root_size=892;; + 40) iname='PINEA64' HW_ARCH=3 partition_start=4 root_size=1020;; 42) iname='ROCKPro64' HW_ARCH=3 partition_start=16 root_size=1008;; 43) iname='ROCK64' HW_ARCH=3 partition_start=16 root_size=1008;; - 44) iname='Pinebook' HW_ARCH=3 partition_start=4 root_size=892;; - 45) iname='PINEH64' HW_ARCH=3 partition_start=4 root_size=892;; + 44) iname='Pinebook' HW_ARCH=3 partition_start=4 root_size=1020;; + 45) iname='PINEH64' HW_ARCH=3 partition_start=4 root_size=1020;; 46) iname='PinebookPro' HW_ARCH=3 partition_start=16 root_size=1008;; 47) iname='NanoPiR4S' HW_ARCH=3 partition_start=16 root_size=1008;; 48) iname='NanoPiR1' HW_ARCH=2 partition_start=4 root_size=764;; @@ -133,7 +133,7 @@ case $HW_MODEL in '79.1') iname='NanoPiR6S' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; '79.2') iname='NanoPiR6C' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; '79.3') iname='NanoPCT6' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; - 80) iname='OrangePi5' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; + 80) iname='OrangePi5' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; 81) iname='VisionFive2' HW_ARCH=11 root_size=639;; 82) iname='OrangePi5Plus' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; '83.1') iname='OrangePiZero3' HW_ARCH=3 partition_start=4 root_size=1148;; diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index fb19a7f77c..66fbfd30e2 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6206,7 +6206,7 @@ _EOF_ *) local arch='amd64';; esac - local fallback_url="https://github.com/navidrome/navidrome/releases/download/v0.51.1/navidrome_0.51.1_linux_$arch.tar.gz" + local fallback_url="https://github.com/navidrome/navidrome/releases/download/v0.52.0/navidrome_0.52.0_linux_$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/navidrome/navidrome/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/navidrome_[0-9.]*_linux_$arch\.tar\.gz\"$/{print \$4}")" /opt/navidrome # Data dir @@ -10027,7 +10027,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.24.2510/Readarr.develop.0.3.24.2510.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.25.2515/Readarr.develop.0.3.25.2515.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Readarr/Readarr/releases' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}" | head -1)" G_EXEC mv Readarr /opt/readarr fi From 939ec3d40c5e0253221bebf6a4535d6e404ee1ab Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 28 Apr 2024 16:33:31 +0200 Subject: [PATCH 147/458] v9.4 - CI | Armbian: Setup Python to make available /usr/bin/python, requried for legacy s5p6818 build. Use our fork with some patches/commits by default. Rebase any other fork/branch onto ours and onto upstream. --- .github/workflows/armbian.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index e0d848ab41..a998f57432 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -34,15 +34,30 @@ jobs: name: "${{ github.event.inputs.asset }} - ${{ github.event.inputs.branch }} - ${{ github.event.inputs.board }}" runs-on: ubuntu-22.04 steps: + # https://github.com/actions/setup-python/tags + - uses: actions/setup-python@v5 + with: + python-version: '3.x' + check-latest: true - name: Clone Armbian repo run: | owner='${{ github.event.inputs.gitowner }}' - [ "$owner" ] || owner='armbian' + [ "$owner" ] || owner='MichaIng' branch='${{ github.event.inputs.gitbranch }}' - [ "$branch" ] || branch='main' + [ "$branch" ] || branch='dietpi' git clone -b "$branch" --depth=1 "https://github.com/$owner/build" [ '${{ github.event.inputs.rebase }}' == 'false' ] && exit 0 || : cd build + if [ "$owner" != 'MichaIng' ] + then + git remote add dietpi https://github.com/MichaIng/build + git fetch dietpi dietpi + git rebase dietpi/dietpi + elif [ "$branch" != 'dietpi' ] + then + git fetch origin dietpi + git rebase dietpi + fi if [ "$owner" != 'armbian' ] then git remote add upstream https://github.com/armbian/build From 7f776867a4990139d7f400ebc0385852517f63a4 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 28 Apr 2024 17:08:02 +0200 Subject: [PATCH 148/458] v9.4 - CI | Armbian: Fix rebasing if branch contains more than 1 new commit. In this case, with only the last commit in history, any rebase conflicts due to unexpected diffs from previous commits. --- .github/workflows/armbian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index a998f57432..c8a7ed2130 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -45,7 +45,7 @@ jobs: [ "$owner" ] || owner='MichaIng' branch='${{ github.event.inputs.gitbranch }}' [ "$branch" ] || branch='dietpi' - git clone -b "$branch" --depth=1 "https://github.com/$owner/build" + git clone -b "$branch" "https://github.com/$owner/build" [ '${{ github.event.inputs.rebase }}' == 'false' ] && exit 0 || : cd build if [ "$owner" != 'MichaIng' ] From 4279e4ac14a2e780941fcb91cef9eadac575d1bc Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 28 Apr 2024 17:14:36 +0200 Subject: [PATCH 149/458] v9.4 - CI | Armbian: Further attempt to fix missing /usr/bin/python --- .github/workflows/armbian.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index c8a7ed2130..cc74ed1381 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -71,6 +71,7 @@ jobs: - name: Build asset run: | cd build + which python || sudo ln -sv python3 /usr/bin/python ./compile.sh '${{ github.event.inputs.asset }}' BRANCH='${{ github.event.inputs.branch }}' BOARD='${{ github.event.inputs.board }}' - name: Upload run: | From 019b2e81902bbfec7d67bf16f178cef924f8db2f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 28 Apr 2024 17:20:23 +0200 Subject: [PATCH 150/458] v9.4 - CI | Armbian: Final fix for missing /usr/bin/python --- .github/workflows/armbian.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index cc74ed1381..5b68f9f816 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -71,7 +71,8 @@ jobs: - name: Build asset run: | cd build - which python || sudo ln -sv python3 /usr/bin/python + # Add python executable for legacy s5p6818 builds + sudo ln -sv python3 /usr/bin/python ./compile.sh '${{ github.event.inputs.asset }}' BRANCH='${{ github.event.inputs.branch }}' BOARD='${{ github.event.inputs.board }}' - name: Upload run: | From 93844ba625e8965f121c42564a05559215e540da Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 28 Apr 2024 23:15:38 +0200 Subject: [PATCH 151/458] v9.4 - DietPi-Software | Enhance cancel button text for Pi-hole/AdGuard home pre-install dialogues, to show both "Skip" instead of "Cancel". --- dietpi/dietpi-software | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 66fbfd30e2..820a203c78 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -15009,13 +15009,13 @@ We allow it to take up to 30 minutes, it's process can be followed, please be pa # Add option to use Unbound as upstream DNS server if (( ${aSOFTWARE_INSTALL_STATE[182]} == 0 )) then - G_WHIP_YESNO 'Would you like to use Unbound, a tiny recursive DNS server hosted on your device, as your upstream DNS server? + G_WHIP_BUTTON_CANCEL_TEXT='Skip' G_WHIP_YESNO 'Would you like to use Unbound, a tiny recursive DNS server hosted on your device, as your upstream DNS server? \nThis will increase privacy, because you will not be sending data to Google etc. \nHowever, the downside is that some websites may load slower the first time you visit them.' && aSOFTWARE_INSTALL_STATE[182]=1 fi # Prompt for static IP - if G_WHIP_YESNO 'A static IP address is essential for a DNS server installations. DietPi-Config can be used to quickly setup your static IP address. + if G_WHIP_BUTTON_CANCEL_TEXT='Skip' G_WHIP_YESNO 'A static IP address is essential for a DNS server installation. DietPi-Config can be used to quickly setup your static IP address. \nIf you have already setup your static IP, please ignore this message.\n\nWould you like to setup your static IP address now?' then G_WHIP_MSG 'DietPi-Config will now be launched. Simply select your Ethernet or Wifi connection from the menu to access the IP address settings. From 7cdb014d9a68803be100328dafea111c551f546c Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 28 Apr 2024 23:28:15 +0200 Subject: [PATCH 152/458] v9.4 (#7050) - CI | Armbian: Fix rebase syntax and remove obsolete workaround attempts for failing s5p6818 buids: This is now fixed via Armbian patch. --- .github/workflows/armbian.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index 5b68f9f816..088be9a818 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -34,11 +34,6 @@ jobs: name: "${{ github.event.inputs.asset }} - ${{ github.event.inputs.branch }} - ${{ github.event.inputs.board }}" runs-on: ubuntu-22.04 steps: - # https://github.com/actions/setup-python/tags - - uses: actions/setup-python@v5 - with: - python-version: '3.x' - check-latest: true - name: Clone Armbian repo run: | owner='${{ github.event.inputs.gitowner }}' @@ -56,7 +51,7 @@ jobs: elif [ "$branch" != 'dietpi' ] then git fetch origin dietpi - git rebase dietpi + git rebase origin/dietpi fi if [ "$owner" != 'armbian' ] then @@ -66,13 +61,11 @@ jobs: elif [ "$branch" != 'main' ] then git fetch origin main - git rebase main + git rebase origin/main fi - name: Build asset run: | cd build - # Add python executable for legacy s5p6818 builds - sudo ln -sv python3 /usr/bin/python ./compile.sh '${{ github.event.inputs.asset }}' BRANCH='${{ github.event.inputs.branch }}' BOARD='${{ github.event.inputs.board }}' - name: Upload run: | From 406ddb3f78ceb3ba18c02744120c77d4587380ec Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 29 Apr 2024 00:25:59 +0200 Subject: [PATCH 153/458] v9.4 - DietPi-Build | Remove non-functional Trixie armhf workaround for time_t transition: It does not work, since there are still/again hard dependencies on both versions of some packages. We need to wait until all this has settled. --- .build/images/dietpi-build | 2 -- 1 file changed, 2 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 5d9992374c..f6b8c072e7 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -379,8 +379,6 @@ G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/lib/apt/lists G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/log packages='apt,bash-completion,bzip2,ca-certificates,cron,curl,fdisk,gnupg,htop,iputils-ping,locales,nano,p7zip,parted,procps,psmisc,sudo,systemd-sysv,tzdata,udev,unzip,wget,whiptail,' [[ $HW_MODEL == 75 ]] && packages+='iproute2' || packages+='console-setup,dropbear,ethtool,fake-hwclock,ifupdown,isc-dhcp-client,kmod,rfkill,systemd-timesyncd,usbutils' -# Workaround for failing build on ARMv6/7 Trixie systems due to conflicting libssl3 and libssl3t64 dependencies -(( $HW_ARCH < 3 && $DISTRO > 7 )) && packages+=',libssl3t64' #G_EXEC_POST_FUNC(){ [[ $exit_code == 0 ]] || cat rootfs/debootstrap/debootstrap.log; } G_EXEC_OUTPUT=1 G_EXEC mmdebstrap --skip=check/empty --variant=minbase --include="$packages" --arch="$parch" --keyring="$keyring" "$distro" ./rootfs "$repo" G_EXEC umount rootfs/dev rootfs/run rootfs/var/cache/apt rootfs/var/lib/apt/lists rootfs/var/log From 78d27c070018fd76fc7a7600e8cfa581978e5497 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 1 May 2024 00:08:20 +0200 Subject: [PATCH 154/458] v9.4 - DietPi-Installer | ROCK 4C Plus: Hardcode device tree since even the variant-specific U-Boot build does not pick the correct one --- .build/images/dietpi-installer | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index eb7ca51e26..3f26c90755 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -674,7 +674,13 @@ setenv rootuuid "true"' /boot/boot.cmd 46) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3399-pinebook-pro.dtb' /boot/dietpiEnv.txt;; 55) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3328-nanopi-r2-rev00.dtb' /boot/dietpiEnv.txt;; # Not necessarily needed as rk3328-nanopi-r2s.dtb is automatically chosen, but provides more consistent /sys/class/leds/{wan,lan}_led interface and blinking instead of steady lid power LED 56) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3328-nanopi-neo3-rev02.dtb' /boot/dietpiEnv.txt;; # Loads rk3328-nanopi-r2s.dtb by default - 72) (( $HW_VARIANT == 2 )) && G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3399-rock-4se.dtb' /boot/dietpiEnv.txt;; + 72) + case $HW_VARIANT in + 2) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3399-rock-4se.dtb' /boot/dietpiEnv.txt;; + 3) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3399-rock-4c-plus.dtb' /boot/dietpiEnv.txt;; + *) :;; + esac + ;; 73) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3308-rock-pi-s.dtb' /boot/dietpiEnv.txt;; # U-Boot does not pass any ${fdtfile} 77) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3568-rock-3a.dtb' /boot/dietpiEnv.txt;; 78) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588-rock-5b.dtb' /boot/dietpiEnv.txt;; From 15ab92ec34ac71f4c672033694005f2a86fbd1ee Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 1 May 2024 19:05:16 +0200 Subject: [PATCH 155/458] v9.4 - DietPi-Software | Update fallback URLs --- dietpi/dietpi-software | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 820a203c78..b627fe7576 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -11129,7 +11129,7 @@ _EOF_ # v3 drops PHP 7.4 support: https://github.com/TasmoAdmin/TasmoAdmin/releases/tag/v3.0.0 if (( $G_DISTRO > 6 )) then - local fallback_url='https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v4.0.2/tasmoadmin_v4.0.2.tar.gz' + local fallback_url='https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v4.1.0/tasmoadmin_v4.1.0.tar.gz' Download_Install "$(curl -sSfL 'https://api.github.com/repos/TasmoAdmin/TasmoAdmin/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/tasmoadmin_v[^"\/]*\.tar\.gz"$/{print $4}')" else Download_Install 'https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v2.4.2/tasmoadmin_v2.4.2.tar.gz' @@ -11707,7 +11707,7 @@ _EOF_ *) local arch='amd64';; esac - local fallback_url="https://github.com/filebrowser/filebrowser/releases/download/v2.28.0/linux-$arch-filebrowser.tar.gz" + local fallback_url="https://github.com/filebrowser/filebrowser/releases/download/v2.29.0/linux-$arch-filebrowser.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/filebrowser/filebrowser/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/linux-$arch-filebrowser\.tar\.gz\"$/{print \$4}")" ./filebrowser/ # Reinstall From 9f55baebb3834beb9c9a742a72ca50a7b2a2a7e5 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 1 May 2024 22:12:40 +0200 Subject: [PATCH 156/458] v9.4 - DietPi-VPN | Resolved an issue where installing the IPVanish config failed, due to a changed URL. Many thanks to @DreamPhreak and @Michael-Robson for reporting this issue: https://github.com/MichaIng/DietPi/issues/7043 --- CHANGELOG.txt | 1 + dietpi/dietpi-vpn | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 1ded7a0554..ad3a8af1bb 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -11,6 +11,7 @@ Enhancements: - DietPi-Software | Snapcast: 64-bit ARM and Debian Bookworm + Trixie will have the now available packages from Snapcast installed, instead of those from the Debian repository. Bug fixes: +- DietPi-VPN | Resolved an issue where installing the IPVanish config failed, due to a changed URL. Many thanks to @DreamPhreak and @Michael-Robson for reporting this issue: https://github.com/MichaIng/DietPi/issues/7043 - DietPi-Imager | Resolved an issue where the imager could have failed on GPT partitioned images, if either the source image size did not leave space for the GPT backup partition table, or the first usable LBA/sector was above 34. The GPT backup partition table is now created only at the end of the image generation, not anymore additionally at the start, and the required size it takes is correctly obtained. Many thanks to @SelfhostedPro and @disablewong for reporting this issue: https://github.com/MichaIng/DietPi/issues/7024, https://dietpi.com/forum/t/18035 - DietPi-Software | Snapcast: Resolved an issue where version 0.27.0 was installed, because since version 0.28.0, Snapcast is provided with client and server packages wrapped into one archive, instead having individual downloads for each package. - DietPi-Software | OctoPrint: Resolved an issue where the installation failed on RISC-V and ARMv6/7 Bullseye systems, due to changed dependencies. diff --git a/dietpi/dietpi-vpn b/dietpi/dietpi-vpn index 9c052ca47a..094d70f82d 100755 --- a/dietpi/dietpi-vpn +++ b/dietpi/dietpi-vpn @@ -124,7 +124,7 @@ Available commands: then [[ $1 != '-f' && -d $FP_IPVANISH ]] && return 0 [[ $1 != '-f' ]] || G_WHIP_YESNO 'This will remove all IPVanish server files and perform a fresh download of IPVanish server configurations. Once completed, you will need to reselect a IPVanish server from the new list.\n\nDo you want to continue?' || return 0 - G_EXEC curl -sSfLO 'https://www.ipvanish.com/software/configs/configs.zip' + G_EXEC curl -sSfLO 'https://configs.ipvanish.com/configs/configs.zip' VPN_SERVER= [[ -d $FP_IPVANISH ]] && G_EXEC_DESC='Removing old IPVanish server configs' G_EXEC rm -R "$FP_IPVANISH" G_EXEC mkdir -p "$FP_IPVANISH" From 7b6a556127b66aa3bcace7696b7e69f621ad7ccd Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 1 May 2024 22:23:28 +0200 Subject: [PATCH 157/458] v9.4 - DietPi-VPN | IPVanish: As well remove "keysize" option from config on Bookworm (and above), which has been deprecated and is invalid sine Bookworm. --- CHANGELOG.txt | 2 +- dietpi/dietpi-vpn | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index ad3a8af1bb..f96db459b2 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -11,7 +11,7 @@ Enhancements: - DietPi-Software | Snapcast: 64-bit ARM and Debian Bookworm + Trixie will have the now available packages from Snapcast installed, instead of those from the Debian repository. Bug fixes: -- DietPi-VPN | Resolved an issue where installing the IPVanish config failed, due to a changed URL. Many thanks to @DreamPhreak and @Michael-Robson for reporting this issue: https://github.com/MichaIng/DietPi/issues/7043 +- DietPi-VPN | Resolved an issue where installing the IPVanish config failed, due to a changed URL, and startup failed on Bookworm systems since their configs contain a deprecated option. Many thanks to @DreamPhreak and @Michael-Robson for reporting this issue: https://github.com/MichaIng/DietPi/issues/7043 - DietPi-Imager | Resolved an issue where the imager could have failed on GPT partitioned images, if either the source image size did not leave space for the GPT backup partition table, or the first usable LBA/sector was above 34. The GPT backup partition table is now created only at the end of the image generation, not anymore additionally at the start, and the required size it takes is correctly obtained. Many thanks to @SelfhostedPro and @disablewong for reporting this issue: https://github.com/MichaIng/DietPi/issues/7024, https://dietpi.com/forum/t/18035 - DietPi-Software | Snapcast: Resolved an issue where version 0.27.0 was installed, because since version 0.28.0, Snapcast is provided with client and server packages wrapped into one archive, instead having individual downloads for each package. - DietPi-Software | OctoPrint: Resolved an issue where the installation failed on RISC-V and ARMv6/7 Bullseye systems, due to changed dependencies. diff --git a/dietpi/dietpi-vpn b/dietpi/dietpi-vpn index 094d70f82d..38cc32967d 100755 --- a/dietpi/dietpi-vpn +++ b/dietpi/dietpi-vpn @@ -233,6 +233,8 @@ _EOF_ # Set protocol and port: UDP port 443 is default, but TCP 1194 and UDP 1194 are supported as well. G_CONFIG_INJECT 'proto[[:blank:]]' "proto $PROTOCOL" "$FP_CLIENT_OVPN" G_EXEC sed --follow-symlinks -i '/^[[:blank:]]*remote[[:blank:]]/s/[[:blank:]][0-9][0-9]*$/ 1194/' "$FP_CLIENT_OVPN" + # Bookworm: Remove "keysize" option, which has been removed with OpenVPN 2.6 + (( $G_DISTRO > 6 )) && G_EXEC sed --follow-symlinks -i '/^[[:blank:]]*keysize[[:blank:]]/d' "$FP_CLIENT_OVPN" elif [[ $VPN_PROVIDER == 'PIA' ]] then From 3dedf4009970d4be2e19373b700ccf0ccc3be059 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 2 May 2024 14:16:13 +0200 Subject: [PATCH 158/458] v9.4 (#7053) - CI | Armbian: Set Git user and email to repo owner name and email --- .github/workflows/armbian.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index 088be9a818..329064ee06 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -43,6 +43,8 @@ jobs: git clone -b "$branch" "https://github.com/$owner/build" [ '${{ github.event.inputs.rebase }}' == 'false' ] && exit 0 || : cd build + git config user.name "$GITHUB_REPOSITORY_OWNER" + git config user.email '${{ github.repository.owner.email }}' if [ "$owner" != 'MichaIng' ] then git remote add dietpi https://github.com/MichaIng/build From 0a3a252768b219bf75dabd0d164bdb8b8f6e15f2 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 2 May 2024 22:44:25 +0200 Subject: [PATCH 159/458] v9.4 (#7042) - Orange Pi 3 LTS/Radxa ZERO 3 | Add support --- .build/images/dietpi-build | 2 ++ .build/images/dietpi-installer | 19 ++++++++++++------- .github/workflows/dietpi-build.yml | 4 +++- .meta/dietpi-survey_report | 2 ++ CHANGELOG.txt | 2 ++ dietpi/func/dietpi-obtain_hw_model | 12 +++++++++++- dietpi/func/dietpi-set_hardware | 2 +- dietpi/func/dietpi-set_software | 1 + 8 files changed, 34 insertions(+), 10 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index f6b8c072e7..a1465f21d7 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -142,6 +142,8 @@ case $HW_MODEL in 85) iname='ROCK5A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; 86) iname='ASUSTB2' HW_ARCH=3 partition_start=16 root_size=1008;; 87) iname='OrangePi3B' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; + 89) iname='OrangePi3LTS' HW_ARCH=3 partition_start=4 root_size=892;; + 90) iname='RadxaZERO3' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; *) G_DIETPI-NOTIFY 1 "Invalid hardware model \"$HW_MODEL\" passed, aborting..."; exit 1;; esac diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 3f26c90755..3f7becfcee 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -415,10 +415,12 @@ _EOF_ '72.3' ': ROCK 4C Plus' '73' ': ROCK Pi S' '74' ': Radxa Zero' + '90' ': Radxa ZERO 3' '77' ': ROCK 3A' '78' ': ROCK 5B' '85' ': ROCK 5A' '87' ': Orange Pi 3B' + '89' ': Orange Pi 3 LTS' '80' ': Orange Pi 5' '82' ': Orange Pi 5 Plus' '83.1' ': Orange Pi Zero 3' @@ -619,7 +621,7 @@ _EOF_ G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/99-dietpi-uboot" /etc/initramfs/post-update.d/99-dietpi-uboot G_EXEC sed --follow-symlinks -i 's/arm64/arm/' /etc/initramfs/post-update.d/99-dietpi-uboot - elif [[ $G_HW_MODEL =~ ^(12|15|16|40|42|43|44|45|46|47|48|52|54|55|56|57|58|59|60|62|63|64|65|66|67|68|72|73|74|76|77|78|79|80|82|83|85|86|87)$ ]] + elif [[ $G_HW_MODEL =~ ^(12|15|16|40|42|43|44|45|46|47|48|52|54|55|56|57|58|59|60|62|63|64|65|66|67|68|72|73|74|76|77|78|79|80|82|83|85|86|87|89|90)$ ]] then armbian_repo=1 G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/boot.cmd" /boot/boot.cmd @@ -660,7 +662,7 @@ setenv rootuuid "true"' /boot/boot.cmd (( $G_HW_MODEL == 15 )) && G_EXEC eval 'echo '\''meson_rng'\'' > /etc/modules-load.d/dietpi-hwrng.conf' # Rockchip 64-bit (configs work with Amlogic OOTB) - elif [[ $G_HW_MODEL =~ ^(42|43|46|47|55|56|58|68|72|73|76|77|78|79|80|82|85|86|87)$ ]] + elif [[ $G_HW_MODEL =~ ^(42|43|46|47|55|56|58|68|72|73|76|77|78|79|80|82|85|86|87|90)$ ]] then G_EXEC sed --follow-symlinks -Ei '/^setenv (kernel|fdt)_addr_r/d' /boot/boot.cmd G_CONFIG_INJECT 'setenv scriptaddr ' 'setenv scriptaddr "0x9000000"' /boot/boot.cmd @@ -687,6 +689,7 @@ setenv rootuuid "true"' /boot/boot.cmd 79) (( $HW_VARIANT == 2 )) && G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-nanopi-r6c.dtb' /boot/dietpiEnv.txt;; 85) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-rock-5a.dtb' /boot/dietpiEnv.txt;; 87) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3566-orangepi-3b.dtb' /boot/dietpiEnv.txt;; + 90) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3566-radxa-zero3.dtb' /boot/dietpiEnv.txt;; *) :;; esac case $G_HW_MODEL in @@ -712,7 +715,7 @@ setenv rootuuid "true"' /boot/boot.cmd G_EXEC sed --follow-symlinks -i -e 's/ttyAML0/ttyS2/' -e '/^extraargs=/s/$/ systemd.unified_cgroup_hierarchy=0/' /boot/dietpiEnv.txt # Allwinner 64-bit - elif [[ $G_HW_MODEL =~ ^(40|44|45|57|65|67|83)$ ]] + elif [[ $G_HW_MODEL =~ ^(40|44|45|57|65|67|83|89)$ ]] then G_EXEC sed --follow-symlinks -Ei '/^setenv (kernel|fdt)_addr_r/d' /boot/boot.cmd G_CONFIG_INJECT 'setenv scriptaddr ' 'setenv scriptaddr "0x45000000"' /boot/boot.cmd @@ -1116,6 +1119,8 @@ _EOF_ 85) model='rock-5a' kernel='rk35xx' branch='legacy';; 86) model='tinkerboard-2' kernel='rockchip64';; 87) model='orangepi3b' kernel='rockchip64' branch='edge';; + 89) model='orangepi3-lts' kernel='sunxi64';; + 90) model='radxa-zero3' kernel='rk35xx' branch='legacy';; *) :;; esac @@ -1957,8 +1962,8 @@ _EOF_' then /boot/dietpi/func/dietpi-set_hardware serialconsole enable ttyS2 - # PINE A64, Pinebook, PINE H64, NenoPi NEO Plus2, ZeroPi, NanoPi NEO, NanoPi M1, NanoPi NEO Air, NenoPi NEO2, NanoPi M1 Plus, NanoPi K1 Plus, ROCK Pi S, VisionFive 2, Orange Pi Zero 3, Star64 - elif [[ $G_HW_MODEL =~ ^(40|44|45|57|59|60|63|64|65|66|67|73|81|83|84)$ ]] + # PINE A64, Pinebook, PINE H64, NenoPi NEO Plus2, ZeroPi, NanoPi NEO, NanoPi M1, NanoPi NEO Air, NenoPi NEO2, NanoPi M1 Plus, NanoPi K1 Plus, ROCK Pi S, VisionFive 2, Orange Pi Zero 3, Star64, Orange Pi 3 LTS + elif [[ $G_HW_MODEL =~ ^(40|44|45|57|59|60|63|64|65|66|67|73|81|83|84|89)$ ]] then /boot/dietpi/func/dietpi-set_hardware serialconsole enable ttyS0 @@ -1967,8 +1972,8 @@ _EOF_' then /boot/dietpi/func/dietpi-set_hardware serialconsole enable ttyS1 - # RK3588: ROCK 5B, NanoPi 6, Orange Pi 5, Orange Pi 5 Plus, ROCK 5A - elif [[ $G_HW_MODEL =~ ^(78|79|80|82|85)$ ]] + # Rockchip vendor: ROCK 5B, NanoPi 6, Orange Pi 5, Orange Pi 5 Plus, ROCK 5A, Radxa ZERO 3 + elif [[ $G_HW_MODEL =~ ^(78|79|80|82|85|90)$ ]] then /boot/dietpi/func/dietpi-set_hardware serialconsole enable ttyFIQ0 diff --git a/.github/workflows/dietpi-build.yml b/.github/workflows/dietpi-build.yml index 0307a374b4..249fd50fc5 100644 --- a/.github/workflows/dietpi-build.yml +++ b/.github/workflows/dietpi-build.yml @@ -91,7 +91,9 @@ jobs: '"-m 84 -d 8", '\ '"-m 85 -d 6", "-m 85 -d 7", "-m 85 -d 8", '\ '"-m 86 -d 6", "-m 86 -d 7", "-m 86 -d 8", '\ - '"-m 87 -d 6", "-m 87 -d 7", "-m 87 -d 8"]' >> "$GITHUB_OUTPUT" + '"-m 87 -d 6", "-m 87 -d 7", "-m 87 -d 8", '\ + '"-m 89 -d 6", "-m 89 -d 7", "-m 89 -d 8", '\ + '"-m 90 -d 6", "-m 90 -d 7", "-m 90 -d 8"]' >> "$GITHUB_OUTPUT" elif [ "${{ github.event.inputs.buildargs }}" = 'quartz64' ] then echo buildargs=[\ diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index 367bbc9790..2afeda1bd3 100755 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -92,6 +92,8 @@ shopt -s extglob [85]='ROCK 5A' [86]='ASUS Tinker Board 2' [87]='Orange Pi 3B' + [89]='Orange Pi 3 LTS' + [90]='Radxa ZERO 3' ) ## Benchmark data arrays: aBENCH_XX[$HW_MODEL,${aBENCH_XX_INDEX[$HW_MODEL]}] diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f96db459b2..11a29214dd 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,6 +3,8 @@ v9.4 New images: - ROCK 4C Plus | Since our Radxa ROCK 4 image has become incompatible with the ROCK 4C Plus, we provide a new image for this particular variant. Many thanks to @lfiorini and @arpegius5555 for reporting this issue: https://github.com/MichaIng/DietPi/issues/6593, https://github.com/MichaIng/DietPi/issues/6935 +- Orange Pi 3 LTS | Added support for this Allwinner H6 based SBC. +- Radxa ZERO 3 | Added support for this Rockchip RK3566 based SBC, the 3E variant with Ethernet as well as the 3W variant with onboard WiFi. Enhancements: - General | Our scripts do now internally enforce the default umask 0022. Many config and install options rely on this, hence it can cause issues when e.g. 0027 (deny read access for "other" users) has been applied on the parent shell. This affects only the (sub)shell of our scripts, while the current and default umask of parent and of shells/consoles remains untouched. diff --git a/dietpi/func/dietpi-obtain_hw_model b/dietpi/func/dietpi-obtain_hw_model index 9a0c8748ef..e49ec26e31 100755 --- a/dietpi/func/dietpi-obtain_hw_model +++ b/dietpi/func/dietpi-obtain_hw_model @@ -316,7 +316,17 @@ G_HW_MODEL=$(mawk 'NR==1' "$FP_G_HW_MODEL_IDENTIFIER") - if (( $G_HW_MODEL == 87 )); then + if (( $G_HW_MODEL == 90 )); then + + G_HW_MODEL_NAME='Radxa ZERO 3' + G_HW_CPUID=9 + + elif (( $G_HW_MODEL == 89 )); then + + G_HW_MODEL_NAME='Orange Pi 3 LTS' + G_HW_CPUID=5 + + elif (( $G_HW_MODEL == 87 )); then G_HW_MODEL_NAME='Orange Pi 3B' G_HW_CPUID=9 diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index e5b3747fd0..1d13bb641e 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -1519,7 +1519,7 @@ Do you want to continue and disable the serial login console?' || return 1 elif (( $DIETPIENV || $G_HW_MODEL == 49 || $G_HW_MODEL == 76 || $G_HW_MODEL == 79 )) then local baudrate='115200' - if [[ $G_HW_MODEL =~ ^(42|43|46|47|49|55|56|58|68|72|76|77|87)$ && $INPUT_ADDITIONAL == 'ttyS2' ]] || [[ $G_HW_MODEL == 73 && $INPUT_ADDITIONAL == 'ttyS'[012] ]] || [[ $G_HW_MODEL =~ ^(76|78|79|80|82|85)$ && $INPUT_ADDITIONAL == 'ttyFIQ0' ]] + if [[ $G_HW_MODEL =~ ^(42|43|46|47|49|55|56|58|68|72|76|77|78|79|80|82|85|87|90)$ && $INPUT_ADDITIONAL =~ ^('ttyS2'|'ttyFIQ0')$ ]] || [[ $G_HW_MODEL == 73 && $INPUT_ADDITIONAL == 'ttyS'[012] ]] then baudrate='1500000' [[ -d /etc/systemd/system/serial-getty@$INPUT_ADDITIONAL.service.d ]] || G_EXEC mkdir "/etc/systemd/system/serial-getty@$INPUT_ADDITIONAL.service.d" diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index eeda29c13f..08de43ed98 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -182,6 +182,7 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R ;; 81) all_components='visionfive2';; 84) all_components='star64';; + 90) all_components='radxazero3';; *) :;; esac G_EXEC eval "echo 'deb https://dietpi.com/apt $G_DISTRO_NAME $components' > /etc/apt/sources.list.d/dietpi.list" From a0e43d7a9d41d8054c8b14623912cb3a5d8eafe7 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 3 May 2024 01:42:22 +0200 Subject: [PATCH 160/458] v9.4 - DietPi-Obtain_HW_model | On RPi, if no known revision code has been found, but ARMv7/8 detected, fall back to RPi 2 device index, as it cannot be an RPi 1 or Zero (1) then. For this to be checked a little simpler, detect architecture (and distro version) first. --- dietpi/func/dietpi-obtain_hw_model | 93 +++++++++++++++--------------- 1 file changed, 47 insertions(+), 46 deletions(-) diff --git a/dietpi/func/dietpi-obtain_hw_model b/dietpi/func/dietpi-obtain_hw_model index e49ec26e31..1e02062e4d 100755 --- a/dietpi/func/dietpi-obtain_hw_model +++ b/dietpi/func/dietpi-obtain_hw_model @@ -303,6 +303,10 @@ fi G_HW_MANUFACTURER='Embest' + elif (( $G_HW_ARCH > 1 )) + then + # In case of ARMv7/8 architecture, if no model was detected, fall back to RPi 2. + G_HW_MODEL=2 fi } @@ -311,6 +315,49 @@ # NBB: DO NOT REORDER INDEX's. These are now fixed and will never change (due to survey results etc) Obtain_HW_Info(){ + # Get distro ID + local distro=$( Date: Fri, 3 May 2024 15:57:30 +0200 Subject: [PATCH 161/458] v9.4 - DietPi-Software | Update fallback URL - DietPi-WiFiDB | Simplify sed command a little --- dietpi/dietpi-software | 2 +- dietpi/func/dietpi-wifidb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index b627fe7576..e19ec7ec54 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -7530,7 +7530,7 @@ _EOF_ local json=() [[ $PHP_VERSION == 8* ]] || aDEPS+=("php$PHP_VERSION-json") json=('json') - local fallback_url="https://github.com/ampache/ampache/releases/download/6.3.1/ampache-6.3.1_all_php$PHP_VERSION.zip" + local fallback_url="https://github.com/ampache/ampache/releases/download/6.4.0/ampache-6.4.0_all_php$PHP_VERSION.zip" Download_Install "$(curl -sSfL 'https://api.github.com/repos/ampache/ampache/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/ampache-[0-9\.]*_all_php$PHP_VERSION.zip\"$/{print \$4}")" ampache # Reinstall: Preserve configs from old and new paths diff --git a/dietpi/func/dietpi-wifidb b/dietpi/func/dietpi-wifidb index 8b5c168dcb..f2c4fec1de 100755 --- a/dietpi/func/dietpi-wifidb +++ b/dietpi/func/dietpi-wifidb @@ -227,7 +227,7 @@ _EOF_ do G_WHIP_MENU_ARRAY+=("$line" '') - done < <(iwlist "$wifi_iface" scan | sed -n '/^[[:blank:]]*ESSID:/s/^[[:blank:]]*ESSID:"\(.*\)"/\1/p') + done < <(iwlist "$wifi_iface" scan | sed -n 's/^[[:blank:]]*ESSID:"\(.*\)"/\1/p') [[ ${G_WHIP_MENU_ARRAY[0]} ]] || { G_WHIP_MSG 'No WiFi SSID has been found in your area.'; return 1; } From cdacbc021d264499835b2e47389f33f46b3e02e7 Mon Sep 17 00:00:00 2001 From: Joulinar <47155374+Joulinar@users.noreply.github.com> Date: Fri, 3 May 2024 21:28:43 +0200 Subject: [PATCH 162/458] v9.4 (#7056) - DietPi-Software | X.Org X Server: Resolved an issue where an important config files might might have been missing on RPi 5 an potentially Amlogic S905 SBCs, if the config directory /etc/X11/xorg.conf.d did not exist and was not created as part of the related APT packages. Many thanks to @rmscode for reporting this issue: https://dietpi.com/forum/t/19963 --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 11a29214dd..c36f95330e 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -17,6 +17,7 @@ Bug fixes: - DietPi-Imager | Resolved an issue where the imager could have failed on GPT partitioned images, if either the source image size did not leave space for the GPT backup partition table, or the first usable LBA/sector was above 34. The GPT backup partition table is now created only at the end of the image generation, not anymore additionally at the start, and the required size it takes is correctly obtained. Many thanks to @SelfhostedPro and @disablewong for reporting this issue: https://github.com/MichaIng/DietPi/issues/7024, https://dietpi.com/forum/t/18035 - DietPi-Software | Snapcast: Resolved an issue where version 0.27.0 was installed, because since version 0.28.0, Snapcast is provided with client and server packages wrapped into one archive, instead having individual downloads for each package. - DietPi-Software | OctoPrint: Resolved an issue where the installation failed on RISC-V and ARMv6/7 Bullseye systems, due to changed dependencies. +- DietPi-Software | X.Org X Server: Resolved an issue where an important config files might might have been missing on RPi 5 an potentially Amlogic S905 SBCs, if the config directory /etc/X11/xorg.conf.d did not exist and was not created as part of the related APT packages. Many thanks to @rmscode for reporting this issue: https://dietpi.com/forum/t/19963 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 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index e19ec7ec54..aa8a442193 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -2657,6 +2657,9 @@ _EOF_ # Generic X server + Mesa OpenGL libraries and utilities aDEPS=('xserver-xorg-core' 'xserver-xorg-input-libinput' 'xinit' 'dbus-user-session' 'xfonts-base' 'x11-xserver-utils' 'x11-utils') + # Disable DPMS and screen blanking + dps_index=$software_id Download_Install '98-dietpi-disable_dpms.conf' /etc/X11/xorg.conf.d/98-dietpi-disable_dpms.conf + # RPi if (( $G_HW_MODEL < 10 )) then @@ -2700,9 +2703,6 @@ Section "Screen" EndSection _EOF_ fi - - # Disable DPMS and screen blanking - dps_index=$software_id Download_Install '98-dietpi-disable_dpms.conf' /etc/X11/xorg.conf.d/98-dietpi-disable_dpms.conf fi if To_Install 152 avahi-daemon # Avahi-Daemon From 3d4b8253411e2b95c49183d1f1006d0eb5a71546 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 4 May 2024 13:28:43 +0200 Subject: [PATCH 163/458] v9.4 - DietPi-Software | X.Org X Server: Fix fix for missing config dir on RPi 5: Download_Install installs aDEPS, hence must stay where it was. --- CHANGELOG.txt | 2 +- dietpi/dietpi-software | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index c36f95330e..58df2a1d7c 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -17,7 +17,7 @@ Bug fixes: - DietPi-Imager | Resolved an issue where the imager could have failed on GPT partitioned images, if either the source image size did not leave space for the GPT backup partition table, or the first usable LBA/sector was above 34. The GPT backup partition table is now created only at the end of the image generation, not anymore additionally at the start, and the required size it takes is correctly obtained. Many thanks to @SelfhostedPro and @disablewong for reporting this issue: https://github.com/MichaIng/DietPi/issues/7024, https://dietpi.com/forum/t/18035 - DietPi-Software | Snapcast: Resolved an issue where version 0.27.0 was installed, because since version 0.28.0, Snapcast is provided with client and server packages wrapped into one archive, instead having individual downloads for each package. - DietPi-Software | OctoPrint: Resolved an issue where the installation failed on RISC-V and ARMv6/7 Bullseye systems, due to changed dependencies. -- DietPi-Software | X.Org X Server: Resolved an issue where an important config files might might have been missing on RPi 5 an potentially Amlogic S905 SBCs, if the config directory /etc/X11/xorg.conf.d did not exist and was not created as part of the related APT packages. Many thanks to @rmscode for reporting this issue: https://dietpi.com/forum/t/19963 +- DietPi-Software | X.Org X Server: Resolved an issue where an important config file might have been missing on RPi 5 and potentially Amlogic S905 SBCs, if the config directory /etc/X11/xorg.conf.d did not exist and was not created as part of the related APT packages. Many thanks to @rmscode for reporting this issue: https://dietpi.com/forum/t/19963 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 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index aa8a442193..9cac6e1e92 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -2654,11 +2654,11 @@ _EOF_ if To_Install 6 # X.Org X Server then - # Generic X server + Mesa OpenGL libraries and utilities + # Generic X server and utilities aDEPS=('xserver-xorg-core' 'xserver-xorg-input-libinput' 'xinit' 'dbus-user-session' 'xfonts-base' 'x11-xserver-utils' 'x11-utils') - # Disable DPMS and screen blanking - dps_index=$software_id Download_Install '98-dietpi-disable_dpms.conf' /etc/X11/xorg.conf.d/98-dietpi-disable_dpms.conf + # Pre-create config dir: https://dietpi.com/forum/t/19963 + G_EXEC mkdir -p /etc/X11/xorg.conf.d # RPi if (( $G_HW_MODEL < 10 )) @@ -2703,6 +2703,9 @@ Section "Screen" EndSection _EOF_ fi + + # Disable DPMS and screen blanking + dps_index=$software_id Download_Install '98-dietpi-disable_dpms.conf' /etc/X11/xorg.conf.d/98-dietpi-disable_dpms.conf fi if To_Install 152 avahi-daemon # Avahi-Daemon From d1266cf72a0d022f6095f3ea1f116a90145761ce Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 6 May 2024 22:33:24 +0200 Subject: [PATCH 164/458] v9.4 (#6995) - Image | Add support for Orange Pi Zero 2W --- .build/images/dietpi-build | 1 + .build/images/dietpi-installer | 42 +++++++++++++++--------------- .github/workflows/dietpi-build.yml | 1 + .meta/dietpi-survey_report | 1 + CHANGELOG.txt | 1 + dietpi/dietpi-config | 4 +-- dietpi/func/dietpi-obtain_hw_model | 7 +++++ dietpi/func/dietpi-set_hardware | 18 ++++++------- dietpi/func/dietpi-set_software | 1 + 9 files changed, 44 insertions(+), 32 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index a1465f21d7..e8af5b05ae 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -142,6 +142,7 @@ case $HW_MODEL in 85) iname='ROCK5A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; 86) iname='ASUSTB2' HW_ARCH=3 partition_start=16 root_size=1008;; 87) iname='OrangePi3B' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; + 88) iname='OrangePiZero2W' HW_ARCH=3 partition_start=4 root_size=1148;; 89) iname='OrangePi3LTS' HW_ARCH=3 partition_start=4 root_size=892;; 90) iname='RadxaZERO3' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; *) G_DIETPI-NOTIFY 1 "Invalid hardware model \"$HW_MODEL\" passed, aborting..."; exit 1;; diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 3f7becfcee..063da44e33 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -425,6 +425,7 @@ _EOF_ '82' ': Orange Pi 5 Plus' '83.1' ': Orange Pi Zero 3' '83.2' ': Orange Pi Zero 3 (1.5 GB RAM)' + '88' ': Orange Pi Zero 2W' '86' ': ASUS Tinker Board 2' '23' ': Generic Rockchip RK3328' '24' ': Generic Rockchip RK3399' @@ -621,7 +622,7 @@ _EOF_ G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/99-dietpi-uboot" /etc/initramfs/post-update.d/99-dietpi-uboot G_EXEC sed --follow-symlinks -i 's/arm64/arm/' /etc/initramfs/post-update.d/99-dietpi-uboot - elif [[ $G_HW_MODEL =~ ^(12|15|16|40|42|43|44|45|46|47|48|52|54|55|56|57|58|59|60|62|63|64|65|66|67|68|72|73|74|76|77|78|79|80|82|83|85|86|87|89|90)$ ]] + elif [[ $G_HW_MODEL =~ ^(12|15|16|40|42|43|44|45|46|47|48|52|54|55|56|57|58|59|60|62|63|64|65|66|67|68|72|73|74|76|77|78|79|80|82|83|85|86|87|88|89|90)$ ]] then armbian_repo=1 G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/boot.cmd" /boot/boot.cmd @@ -715,30 +716,33 @@ setenv rootuuid "true"' /boot/boot.cmd G_EXEC sed --follow-symlinks -i -e 's/ttyAML0/ttyS2/' -e '/^extraargs=/s/$/ systemd.unified_cgroup_hierarchy=0/' /boot/dietpiEnv.txt # Allwinner 64-bit - elif [[ $G_HW_MODEL =~ ^(40|44|45|57|65|67|83|89)$ ]] + elif [[ $G_HW_MODEL =~ ^(40|44|45|57|65|67|83|88|89)$ ]] then G_EXEC sed --follow-symlinks -Ei '/^setenv (kernel|fdt)_addr_r/d' /boot/boot.cmd G_CONFIG_INJECT 'setenv scriptaddr ' 'setenv scriptaddr "0x45000000"' /boot/boot.cmd G_CONFIG_INJECT 'overlay_path=' 'overlay_path=allwinner' /boot/dietpiEnv.txt + # Device tree case $G_HW_MODEL in 45) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=allwinner/sun50i-h6-pine-h64-model-b.dtb' /boot/dietpiEnv.txt;; + 83) (( $HW_VARIANT == 2 )) && G_CONFIG_INJECT 'fdtfile=' 'fdtfile=allwinner/sun50i-h618-orangepi-zero3.dtb' /boot/dietpiEnv.txt;; + 88) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=allwinner/sun50i-h618-orangepi-zero2w.dtb' /boot/dietpiEnv.txt;; *) :;; esac + # Overlay prefix case $G_HW_MODEL in 40|44) G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=sun50i-a64' /boot/dietpiEnv.txt;; 45) G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=sun50i-h6' /boot/dietpiEnv.txt;; 57|65|67) G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=sun50i-h5' /boot/dietpiEnv.txt;; - 83) - G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=sun50i-h616' /boot/dietpiEnv.txt - (( $HW_VARIANT == 2 )) && G_CONFIG_INJECT 'fdtfile=' 'fdtfile=allwinner/sun50i-h618-orangepi-zero3.dtb' /boot/dietpiEnv.txt - ;; + 83|88) G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=sun50i-h616' /boot/dietpiEnv.txt;; *) :;; esac + # Overlays case $G_HW_MODEL in 57|65) G_CONFIG_INJECT 'overlays=' 'overlays=usbhost1 usbhost2' /boot/dietpiEnv.txt;; 67) G_CONFIG_INJECT 'overlays=' 'overlays=analog-codec' /boot/dietpiEnv.txt;; *) :;; esac + # Console args case $G_HW_MODEL in 57|65) G_CONFIG_INJECT 'consoleargs=' 'consoleargs=console=ttyS0,115200' /boot/dietpiEnv.txt;; # headless *) G_EXEC sed --follow-symlinks -i 's/ttyAML0/ttyS0/' /boot/dietpiEnv.txt;; @@ -1005,7 +1009,7 @@ setenv rootuuid "true"' /boot/boot.cmd fi # Skip creating kernel symlinks and remove existing ones - G_DIETPI-NOTIFY 2 'Preventing obsolete kernel and initramfs symlink generation' + G_DIETPI-NOTIFY 2 'Preventing needless kernel and initramfs symlink generation' G_EXEC eval 'echo '\''do_symlinks=0'\'' > /etc/kernel-img.conf' G_EXEC rm -f /{,boot/}{initrd.img,vmlinuz}{,.old} @@ -1119,6 +1123,7 @@ _EOF_ 85) model='rock-5a' kernel='rk35xx' branch='legacy';; 86) model='tinkerboard-2' kernel='rockchip64';; 87) model='orangepi3b' kernel='rockchip64' branch='edge';; + 88) model='orangepizero2w' kernel='sunxi64';; 89) model='orangepi3-lts' kernel='sunxi64';; 90) model='radxa-zero3' kernel='rk35xx' branch='legacy';; *) :;; @@ -1246,7 +1251,7 @@ _EOF_ # Skip creating kernel symlinks and remove existing ones if [[ -L '/vmlinuz' ]] then - G_DIETPI-NOTIFY 2 'Preventing obsolete kernel and initramfs symlink generation' + G_DIETPI-NOTIFY 2 'Preventing needless kernel and initramfs symlink generation' G_EXEC eval 'echo '\''do_symlinks=0'\'' > /etc/kernel-img.conf' G_EXEC rm -f /{initrd.img,vmlinuz}{,.old} fi @@ -1259,6 +1264,9 @@ _EOF_ (( $G_HW_ARCH == 3 )) || a32bit=('raspi-copies-and-fills') if findmnt -M /boot/firmware &> /dev/null then + G_DIETPI-NOTIFY 2 'Preventing needless kernel and initramfs symlink generation' + G_EXEC eval 'echo '\''do_symlinks=0'\'' > /etc/kernel-img.conf' + G_EXEC rm -f /{initrd.img,vmlinuz}{,.old} local kernel=() case $G_HW_MODEL in 0) @@ -1298,14 +1306,6 @@ _EOF_ [[ -f '/etc/apt/trusted.gpg' ]] && G_EXEC rm /etc/apt/trusted.gpg [[ -f '/etc/apt/trusted.gpg~' ]] && G_EXEC rm '/etc/apt/trusted.gpg~' - # Skip creating kernel symlinks and remove existing ones - if [[ -L '/vmlinuz' ]] - then - G_DIETPI-NOTIFY 2 'Preventing obsolete kernel and initramfs symlink generation' - G_EXEC eval 'echo '\''do_symlinks=0'\'' > /etc/kernel-img.conf' - G_EXEC rm -f /{initrd.img,vmlinuz}{,.old} - fi - # Quartz64 elif [[ $G_HW_MODEL == 49 && $(findmnt -Ufnro TARGET -T /boot) == '/' ]] then @@ -1442,7 +1442,7 @@ _EOF_ # Skip creating kernel symlinks and remove existing ones if [[ -L '/vmlinuz' ]] then - G_DIETPI-NOTIFY 2 'Preventing obsolete kernel and initramfs symlink generation' + G_DIETPI-NOTIFY 2 'Preventing needless kernel and initramfs symlink generation' G_EXEC eval 'echo '\''do_symlinks=0'\'' > /etc/kernel-img.conf' G_EXEC rm -f /{initrd.img,vmlinuz}{,.old} fi @@ -1962,8 +1962,8 @@ _EOF_' then /boot/dietpi/func/dietpi-set_hardware serialconsole enable ttyS2 - # PINE A64, Pinebook, PINE H64, NenoPi NEO Plus2, ZeroPi, NanoPi NEO, NanoPi M1, NanoPi NEO Air, NenoPi NEO2, NanoPi M1 Plus, NanoPi K1 Plus, ROCK Pi S, VisionFive 2, Orange Pi Zero 3, Star64, Orange Pi 3 LTS - elif [[ $G_HW_MODEL =~ ^(40|44|45|57|59|60|63|64|65|66|67|73|81|83|84|89)$ ]] + # PINE A64, Pinebook, PINE H64, NenoPi NEO Plus2, ZeroPi, NanoPi NEO, NanoPi M1, NanoPi NEO Air, NenoPi NEO2, NanoPi M1 Plus, NanoPi K1 Plus, ROCK Pi S, VisionFive 2, Orange Pi Zero 3, Star64, Orange Pi Zero 2W, Orange Pi 3 LTS + elif [[ $G_HW_MODEL =~ ^(40|44|45|57|59|60|63|64|65|66|67|73|81|83|84|88|89)$ ]] then /boot/dietpi/func/dietpi-set_hardware serialconsole enable ttyS0 @@ -2184,8 +2184,8 @@ SUBSYSTEM=="leds", KERNEL=="wan_led", ACTION=="add", ATTR{trigger}="netdev", ATT SUBSYSTEM=="leds", KERNEL=="lan1_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth1", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev eth1", RUN+="/bin/ip l s down dev eth1" SUBSYSTEM=="leds", KERNEL=="user_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="wlan0", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev wlan0", RUN+="/bin/ip l s down dev wlan0" _EOF_ - # Orange Pi 3B/Zero 3: Module does not load automatically, but we want it loaded on first boot in case firstrun setup is done via WiFi - elif [[ $G_HW_MODEL =~ ^(83|87)$ ]] + # Orange Pi 3B/Zero 3/Zero 2W: Module does not load automatically, but we want it loaded on first boot in case firstrun setup is done via WiFi + elif [[ $G_HW_MODEL =~ ^(83|87|88)$ ]] then G_EXEC eval 'echo '\''sprdwl_ng'\'' > /etc/modules-load.d/dietpi-enable_wifi.conf' fi diff --git a/.github/workflows/dietpi-build.yml b/.github/workflows/dietpi-build.yml index 249fd50fc5..601b6a1291 100644 --- a/.github/workflows/dietpi-build.yml +++ b/.github/workflows/dietpi-build.yml @@ -92,6 +92,7 @@ jobs: '"-m 85 -d 6", "-m 85 -d 7", "-m 85 -d 8", '\ '"-m 86 -d 6", "-m 86 -d 7", "-m 86 -d 8", '\ '"-m 87 -d 6", "-m 87 -d 7", "-m 87 -d 8", '\ + '"-m 88 -d 6", "-m 88 -d 7", "-m 88 -d 8", '\ '"-m 89 -d 6", "-m 89 -d 7", "-m 89 -d 8", '\ '"-m 90 -d 6", "-m 90 -d 7", "-m 90 -d 8"]' >> "$GITHUB_OUTPUT" elif [ "${{ github.event.inputs.buildargs }}" = 'quartz64' ] diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index 2afeda1bd3..cb2c6a5599 100755 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -92,6 +92,7 @@ shopt -s extglob [85]='ROCK 5A' [86]='ASUS Tinker Board 2' [87]='Orange Pi 3B' + [88]='Orange Pi Zero 2W' [89]='Orange Pi 3 LTS' [90]='Radxa ZERO 3' ) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 58df2a1d7c..4841de64c0 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,6 +5,7 @@ New images: - ROCK 4C Plus | Since our Radxa ROCK 4 image has become incompatible with the ROCK 4C Plus, we provide a new image for this particular variant. Many thanks to @lfiorini and @arpegius5555 for reporting this issue: https://github.com/MichaIng/DietPi/issues/6593, https://github.com/MichaIng/DietPi/issues/6935 - Orange Pi 3 LTS | Added support for this Allwinner H6 based SBC. - Radxa ZERO 3 | Added support for this Rockchip RK3566 based SBC, the 3E variant with Ethernet as well as the 3W variant with onboard WiFi. +- Orange Pi Zero 2W | Support for this small form factor SBC with Allwinner H618 SoC was added. Enhancements: - General | Our scripts do now internally enforce the default umask 0022. Many config and install options rely on this, hence it can cause issues when e.g. 0027 (deny read access for "other" users) has been applied on the parent shell. This affects only the (sub)shell of our scripts, while the current and default umask of parent and of shells/consoles remains untouched. diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 258900fff6..35e9c1bb13 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -1094,8 +1094,8 @@ Re-enabling HDMI requires a reboot. If you need emergency HDMI output, edit the [[ -f '/etc/modprobe.d/dietpi-disable_bluetooth.conf' ]] && bluetooth_state=0 bluetooth_state_text='Off' G_WHIP_MENU_ARRAY+=('Bluetooth' ": [$bluetooth_state_text]") - # Orange Pi Zero 3 specific - if (( $G_HW_MODEL == 83 )) + # Orange Pi Zero 3/Zero 2W specific + if (( $G_HW_MODEL == 83 || $G_HW_MODEL == 88 )) then # SPI state local spi_enabled=$(grep -Ecm1 '^[[:blank:]]*overlays=(.*[[:blank:]])?spi1-cs1-spidev([[:blank:]]|$)' /boot/dietpiEnv.txt) diff --git a/dietpi/func/dietpi-obtain_hw_model b/dietpi/func/dietpi-obtain_hw_model index 1e02062e4d..030bf3cceb 100755 --- a/dietpi/func/dietpi-obtain_hw_model +++ b/dietpi/func/dietpi-obtain_hw_model @@ -12,6 +12,9 @@ # - Generates /boot/dietpi/.hw_model # - Called from /boot/dietpi/preboot, called by /etc/systemd/system/dietpi-preboot.service # + # G_HW_MODEL 90 Radxa ZERO 3 + # G_HW_MODEL 89 Orange Pi 3 LTS + # G_HW_MODEL 88 Orange Pi Zero 2W # G_HW_MODEL 87 Orange Pi 3B # G_HW_MODEL 86 ASUS Tinker Board 2 # G_HW_MODEL 85 ROCK 5A @@ -373,6 +376,10 @@ G_HW_MODEL_NAME='Orange Pi 3 LTS' G_HW_CPUID=5 + elif (( $G_HW_MODEL == 88 )); then + + G_HW_MODEL_NAME='Orange Pi Zero 2W' + elif (( $G_HW_MODEL == 87 )); then G_HW_MODEL_NAME='Orange Pi 3B' diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index 1d13bb641e..492bf545e1 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -1112,8 +1112,8 @@ _EOF_ Unknown_Input_Mode fi - # Orange Pi Zero 3 - elif (( $G_HW_MODEL == 83 )) + # Orange Pi Zero 3/Zero 2W + elif (( $G_HW_MODEL == 83 || $G_HW_MODEL == 88 )) then if [[ $INPUT_DEVICE_VALUE == 'enable' ]] then @@ -1148,7 +1148,7 @@ _EOF_ 'hci_uart' ) - [[ $G_HW_MODEL =~ ^(83|87)$ ]] && aBLUETOOTH_MODULES+=('sprdbt_tty') # Orange Pi 3B/Zero 3 + [[ $G_HW_MODEL =~ ^(83|87|88)$ ]] && aBLUETOOTH_MODULES+=('sprdbt_tty') # Orange Pi 3B/Zero 3/Zero 2W if [[ $INPUT_DEVICE_VALUE == 'disable' ]]; then @@ -1244,8 +1244,8 @@ Do you want to continue and disable the serial login console?' || return 1 then (( $G_HW_ONBOARD_WIFI )) && G_EXEC systemctl enable hciuart - # Orange Pi 3B/Zero 3: Module does not load automatically - elif [[ $G_HW_MODEL =~ ^(83|87)$ ]] + # Orange Pi 3B/Zero 3/Zero 2W: Module does not load automatically + elif [[ $G_HW_MODEL =~ ^(83|87|88)$ ]] then modprobe -n sprdbt_tty 2> /dev/null && G_EXEC eval 'echo '\''sprdbt_tty'\'' > /etc/modules-load.d/dietpi-enable_bluetooth.conf' fi @@ -1340,8 +1340,8 @@ Do you want to continue and disable the serial login console?' || return 1 then aWIFI_MODULES+=('bcmdhd') - # + Orange Pi 3B/Zero 3 - elif [[ $G_HW_MODEL =~ ^(83|87)$ ]] + # + Orange Pi 3B/Zero 3/Zero 2W + elif [[ $G_HW_MODEL =~ ^(83|87|88)$ ]] then aWIFI_MODULES+=('sprdwl_ng') fi @@ -1387,8 +1387,8 @@ Do you want to continue and disable the serial login console?' || return 1 then G_EXEC eval 'echo -e '\''options wlan_8192eu rtw_power_mgnt=0\noptions wlan_8812au rtw_power_mgnt=0'\'' > /etc/modprobe.d/dietpi-disable_wifi_powersaving.conf' - # - Orange Pi 3B/Zero 3: Module does not load automatically - elif [[ $G_HW_MODEL =~ ^(83|87)$ ]] + # - Orange Pi 3B/Zero 3/Zero 2W: Module does not load automatically + elif [[ $G_HW_MODEL =~ ^(83|87|88)$ ]] then modprobe -n sprdwl_ng 2> /dev/null && G_EXEC eval 'echo '\''sprdwl_ng'\'' > /etc/modules-load.d/dietpi-enable_wifi.conf' fi diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index 08de43ed98..c5bb1cd91f 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -182,6 +182,7 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R ;; 81) all_components='visionfive2';; 84) all_components='star64';; + 88) all_components='orangepizero2w';; 90) all_components='radxazero3';; *) :;; esac From 743622ef2cfc802cd6a2b5363a1894c1f54ffe1a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 6 May 2024 22:39:35 +0200 Subject: [PATCH 165/458] v9.4 - DietPi-Set_software | Add more APT repo components for SBCs we started to host kernel/U-Boot/firmware fore --- dietpi/func/dietpi-set_software | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index c5bb1cd91f..b7bb255d97 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -123,6 +123,10 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R case $G_HW_MODEL in [0-9]) all_components='rpi';; 10) all_components='odroidc1';; + 40) all_components='pinea64';; + 44) all_components='pinebook';; + 45) all_components='pineh64';; + 48) all_components='nanopir1';; 49) # Detect variant either based on $HW_VARIANT environment variable, existing "all" components or installed kernel/firmware package # shellcheck disable=SC2154 @@ -141,6 +145,10 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R ;; esac ;; + 56) all_components='nanopineo3';; + 45) all_components='nanopineoplus2';; + 59) all_components='zeropi';; + 60) all_components='nanopineo';; 61) all_components='nanopi2';; 62) # Detect variant either based on $HW_VARIANT environment variable, existing "all" components or installed U-Boot package @@ -160,7 +168,26 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R esac ;; 63) all_components='nanopim1';; + 64) all_components='nanopineoair';; + 65) + # Detect variant either based on $HW_VARIANT environment variable, existing "all" components or installed U-Boot package + # shellcheck disable=SC2154 + case $HW_VARIANT in + 1) all_components='nanopineo2';; + 2) all_components='nanopineo2black';; + *) + [[ -f '/etc/apt/sources.list.d/dietpi.list' ]] && all_components=$(sed -n '/ all /{s/^.* all //p;q}' /etc/apt/sources.list.d/dietpi.list) + [[ $all_components ]] || for i in nanopineo2{,black} + do + dpkg-query -s "linux-u-boot-$i-legacy" &> /dev/null || continue + all_components=$i + break + done + ;; + esac + ;; 66) all_components='nanopim1plus';; + 67) all_components='nanopik1plus';; 70) all_components='sparkysbc';; 76) # Detect variant either based on $HW_VARIANT environment variable, existing "all" components or installed U-Boot package @@ -181,8 +208,10 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R esac ;; 81) all_components='visionfive2';; + 83) all_components='orangepizero3';; 84) all_components='star64';; 88) all_components='orangepizero2w';; + 89) all_components='orangepi3lts';; 90) all_components='radxazero3';; *) :;; esac From 96c735eb56d9bc7167941d9d9474d11219b8182a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 6 May 2024 22:46:05 +0200 Subject: [PATCH 166/458] v9.4 - DietPi-Software | Fix NanoPi NEO Plus2 hardware ID - DietPi-Patches | Update DietPi APT list for several SBCs we added components to our repo for --- .update/patches | 10 ++++++++-- dietpi/func/dietpi-set_software | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.update/patches b/.update/patches index e1e0b951bf..bb8669cd4f 100755 --- a/.update/patches +++ b/.update/patches @@ -1560,8 +1560,14 @@ Patch_9_3() Patch_9_4() { - # Update DietPi APT list for NanoPi R5C - (( $G_HW_MODEL == 76 )) && /boot/dietpi/func/dietpi-set_software apt-mirror dietpi + # Update DietPi APT list for several SBCs we added components to our repo for + if (( $G_HW_MODEL =~ ^(40|44|45|48|56|57||59||60|64|65|67|76|83|88|89|90)$ )) + then + /boot/dietpi/func/dietpi-set_software apt-mirror dietpi + G_AGUP -v + # shellcheck disable=SC2154 + (( $G_AGUP_COUNT )) && G_AGUG + fi if [[ -f '/boot/dietpi/.installed' ]] then diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index b7bb255d97..1d2ba000e6 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -146,7 +146,7 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R esac ;; 56) all_components='nanopineo3';; - 45) all_components='nanopineoplus2';; + 57) all_components='nanopineoplus2';; 59) all_components='zeropi';; 60) all_components='nanopineo';; 61) all_components='nanopi2';; From d2701918c9ad7ba3cfc526f02be9fb925455359d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 6 May 2024 22:51:45 +0200 Subject: [PATCH 167/458] v9.4 (#7059) - DietPi-WiFiDB | Minor coding --- dietpi/func/dietpi-wifidb | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/dietpi/func/dietpi-wifidb b/dietpi/func/dietpi-wifidb index f2c4fec1de..661652c9a3 100755 --- a/dietpi/func/dietpi-wifidb +++ b/dietpi/func/dietpi-wifidb @@ -207,20 +207,19 @@ _EOF_ # Menus #///////////////////////////////////////////////////////////////////////////////////// - Scan_Wifi(){ - + Scan_Wifi() + { local wifi_iface=$(G_GET_NET -t wlan iface) # Return if no WiFi adapter is detected - [[ ! $wifi_iface ]] && G_WHIP_MSG 'No WiFi adapter was detected on your device. Scanning for interfaces cannot be done.' && return 1 + [[ $wifi_iface ]] || { G_WHIP_MSG 'No WiFi adapter was detected on your device. Scanning for interfaces cannot be done.'; return 1; } + + G_DIETPI-NOTIFY 0 'Scanning for WiFi SSIDs, please wait....' # Assure WiFi adapter is up to allow SSID scanning # - Compared to "ifup", this method does not imply DHCP scanning, which times out when no SSID has been configured yet. ip l set dev "$wifi_iface" up - # Get all SSIDs - G_DIETPI-NOTIFY 0 'Scanning for WiFi SSIDs, please wait....' - # ToDo: We would love to use modern 'iw dev "$wifi_iface" scan' here, but on NanoPi Fire3 with modern USB WiFi adapter this command runs forever without showing any output. Probably the old vendor kernel has something to do with it. G_WHIP_MENU_ARRAY=() while read -r line @@ -235,7 +234,6 @@ _EOF_ aWIFI_SSID[$WIFI_SSID_INDEX]=$G_WHIP_RETURNED_VALUE Change_WifiKey - } Change_WifiSsid(){ From 7560c253af4ef52041db55a76e07908638d7bc12 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 6 May 2024 22:52:23 +0200 Subject: [PATCH 168/458] v9.4 - DietPi-Patches | Syntax --- .update/patches | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.update/patches b/.update/patches index bb8669cd4f..a1eba3fbce 100755 --- a/.update/patches +++ b/.update/patches @@ -1561,7 +1561,7 @@ Patch_9_3() Patch_9_4() { # Update DietPi APT list for several SBCs we added components to our repo for - if (( $G_HW_MODEL =~ ^(40|44|45|48|56|57||59||60|64|65|67|76|83|88|89|90)$ )) + if [[ $G_HW_MODEL =~ ^(40|44|45|48|56|57||59||60|64|65|67|76|83|88|89|90)$ ]] then /boot/dietpi/func/dietpi-set_software apt-mirror dietpi G_AGUP -v From e1eca1b71961e2d87439c97847509810cfb71745 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 6 May 2024 22:54:59 +0200 Subject: [PATCH 169/458] v9.4 - CHANGELOG | Add entry about solved NanoPi NEO3 issue --- CHANGELOG.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 4841de64c0..a9f98a1d39 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -14,6 +14,7 @@ Enhancements: - DietPi-Software | Snapcast: 64-bit ARM and Debian Bookworm + Trixie will have the now available packages from Snapcast installed, instead of those from the Debian repository. Bug fixes: +- NanoPi NEO3 | Resolved an issue where the Ethernet adapter was not available after reboots. Many thanks to @murraythegoz for reporting this issue: https://github.com/MichaIng/DietPi/issues/6987 - DietPi-VPN | Resolved an issue where installing the IPVanish config failed, due to a changed URL, and startup failed on Bookworm systems since their configs contain a deprecated option. Many thanks to @DreamPhreak and @Michael-Robson for reporting this issue: https://github.com/MichaIng/DietPi/issues/7043 - DietPi-Imager | Resolved an issue where the imager could have failed on GPT partitioned images, if either the source image size did not leave space for the GPT backup partition table, or the first usable LBA/sector was above 34. The GPT backup partition table is now created only at the end of the image generation, not anymore additionally at the start, and the required size it takes is correctly obtained. Many thanks to @SelfhostedPro and @disablewong for reporting this issue: https://github.com/MichaIng/DietPi/issues/7024, https://dietpi.com/forum/t/18035 - DietPi-Software | Snapcast: Resolved an issue where version 0.27.0 was installed, because since version 0.28.0, Snapcast is provided with client and server packages wrapped into one archive, instead having individual downloads for each package. From be3dacebff7eb2780e6da833f4b56dbd2a983c05 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 6 May 2024 22:56:12 +0200 Subject: [PATCH 170/458] v9.4 - DietPi-Patches | Coding --- .update/patches | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.update/patches b/.update/patches index a1eba3fbce..56dc3a70af 100755 --- a/.update/patches +++ b/.update/patches @@ -1561,7 +1561,7 @@ Patch_9_3() Patch_9_4() { # Update DietPi APT list for several SBCs we added components to our repo for - if [[ $G_HW_MODEL =~ ^(40|44|45|48|56|57||59||60|64|65|67|76|83|88|89|90)$ ]] + if [[ $G_HW_MODEL =~ ^(40|44|45|48|56|57|59|60|64|65|67|76|83|88|89|90)$ ]] then /boot/dietpi/func/dietpi-set_software apt-mirror dietpi G_AGUP -v From 13898a20a0321ba4267efdfeaf0d8a5401b6a62f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 6 May 2024 23:00:57 +0200 Subject: [PATCH 171/458] v9.4 - RC up --- .update/version | 2 +- CHANGELOG.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.update/version b/.update/version index e2d57b846a..eaecf7dfba 100644 --- a/.update/version +++ b/.update/version @@ -3,7 +3,7 @@ # Available DietPi version G_REMOTE_VERSION_CORE=9 G_REMOTE_VERSION_SUB=4 -G_REMOTE_VERSION_RC=-1 +G_REMOTE_VERSION_RC=0 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=7 G_MIN_VERSION_SUB=0 diff --git a/CHANGELOG.txt b/CHANGELOG.txt index a9f98a1d39..6a019a13ea 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,5 @@ v9.4 -(2024-05-12) +(2024-05-11) New images: - ROCK 4C Plus | Since our Radxa ROCK 4 image has become incompatible with the ROCK 4C Plus, we provide a new image for this particular variant. Many thanks to @lfiorini and @arpegius5555 for reporting this issue: https://github.com/MichaIng/DietPi/issues/6593, https://github.com/MichaIng/DietPi/issues/6935 From 2a97ec8e0d6c03710d62949c4fa71ecd42c3b650 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 6 May 2024 23:10:43 +0200 Subject: [PATCH 172/458] v9.4 - DietPi-Globals | Update default RC version --- dietpi/func/dietpi-globals | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 314e3c3089..403bdf85b8 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -55,7 +55,7 @@ # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=9 [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=4 - [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=-1 + [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=0 [[ $G_GITBRANCH ]] || G_GITBRANCH='master' [[ $G_GITOWNER ]] || G_GITOWNER='MichaIng' # - Save current version and Git branch From 6768bee4483c3a9d38a38a515dbc85ef754fb0da Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 7 May 2024 02:35:03 +0200 Subject: [PATCH 173/458] v9.4 - DietPi-Pre-patches | Typo --- .update/pre-patches | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.update/pre-patches b/.update/pre-patches index c041090ab0..92a022d80c 100755 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -425,7 +425,7 @@ then elif apt-mark showauto | grep '^initramfs-tools$' then - G_AGI tiny-initamfs + G_AGI tiny-initramfs G_AGP initramfs-tools # ToDo: Remove existing initramfs images in /boot/initrd-* and /boot/firmware/initramfs* fi From 3edba117009e12fa276f178608d2ec6ac8c3e143 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 7 May 2024 14:01:13 +0200 Subject: [PATCH 174/458] v9.4 - DietPi-Software | frp: Update fallback URL and use new ARM hard-float build on ARMv6/7 --- dietpi/dietpi-software | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 9cac6e1e92..f50b3b76bf 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6509,11 +6509,11 @@ _EOF_ 3) local arch='arm64';; 10) local arch='amd64';; 11) local arch='riscv64';; - *) local arch='arm';; + *) local arch='arm_hf';; esac # Download - local fallback_url="https://github.com/fatedier/frp/releases/download/v0.57.0/frp_0.57.0_linux_$arch.tar.gz" + local fallback_url="https://github.com/fatedier/frp/releases/download/v0.58.0/frp_0.58.0_linux_$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/fatedier/frp/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/frp_[0-9.]*_linux_$arch\.tar\.gz\"/{print \$4}")" G_EXEC cd frp_* From e9bcca66de033b7ff0b1cda389cea0e73a54a9e7 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 7 May 2024 17:22:53 +0200 Subject: [PATCH 175/458] v9.4 - DietPi-Software | Remote.It: Update device registratio docs URL --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index f50b3b76bf..f580d9a8ba 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6371,7 +6371,7 @@ _EOF_ G_WHIP_MSG "[ INFO ] The installation of Remote.It is complete. \nThe final step is to register your claim code with your desktop application. See the manual below for instructions on how to do this. -\nhttps://docs.remote.it/software/device-package/installation#3.-claim-and-register-the-device +\nhttps://docs.remote.it/software/device-package/installation#id-3.-claim-and-register-the-device \nYour claim code: $(mawk -F\" '/claim/{print $4}' /etc/remoteit/config.json) \nThen this DietPi device will be online as your Remote.It device and you can start using it." From d02b59513f6032eaa59a3b2b6f6df0064b0f10fb Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 8 May 2024 13:25:19 +0200 Subject: [PATCH 176/458] v9.4 - DietPi-Software | Syncthing: Update fallback URL --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index f580d9a8ba..47060c7dae 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8917,7 +8917,7 @@ _EOF_ *) local arch='arm';; esac - local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.27.6/syncthing-linux-$arch-v1.27.6.tar.gz" + local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.27.7/syncthing-linux-$arch-v1.27.7.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/syncthing/syncthing/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/syncthing-linux-$arch-[^\"\/]*\.tar\.gz\"/{print \$4}")" G_EXEC mv syncthing-* /opt/syncthing fi From 56770e91aa484c3fbc6cc4006abf2f2e75162555 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 8 May 2024 13:56:15 +0200 Subject: [PATCH 177/458] v9.4 - CHANGELOG | Add v9.4 PR URL --- CHANGELOG.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 6a019a13ea..1798547579 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -21,7 +21,7 @@ Bug fixes: - DietPi-Software | OctoPrint: Resolved an issue where the installation failed on RISC-V and ARMv6/7 Bullseye systems, due to changed dependencies. - DietPi-Software | X.Org X Server: Resolved an issue where an important config file might have been missing on RPi 5 and potentially Amlogic S905 SBCs, if the config directory /etc/X11/xorg.conf.d did not exist and was not created as part of the related APT packages. Many thanks to @rmscode for reporting this issue: https://dietpi.com/forum/t/19963 -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/7063 ----------------------------------------------------------------------------------------------------------- From c7a7975f680fe48e2998a138af0f04dbe8e39685 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 8 May 2024 22:49:30 +0200 Subject: [PATCH 178/458] v9.4 - CI | Armbian: Add own version suffix for packages --- .github/workflows/armbian.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index 329064ee06..221335980b 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -65,6 +65,31 @@ jobs: git fetch origin main git rebase origin/main fi + - name: Obtain version suffix + run: | + cd build + read -r version < VERSION + case '${{ github.event.inputs.asset }}' in + firmware) package='armbian-firmware';; + uboot) package='linux-uboot-${{ github.event.inputs.board }}-${{ github.event.inputs.board }}';; + kernel) + family=$(. 'config/boards/${{ github.event.inputs.board }}.'* &> /dev/null; echo "$BOARDFAMILY") + echo "Board family is: $family" + family=$(BRANCH='${{ github.event.inputs.branch }}'; . "config/sources/families/$family.conf" &> /dev/null; echo "$LINUXFAMILY") + echo "Linux family is: $family" + package="linux-image-${{ github.event.inputs.branch }}-$family" + ;; + *) echo 'ERROR: Invalid asset "${{ github.event.inputs.asset }}"'; exit 1;; + esac + curl -fO "https://dietpi.com/downloads/binaries/$package.deb" + cur_version=$(dpkg-deb -f "$package.deb" Version) + rm "$package.deb" + cur_suffix=${cur_version#*-dietpi} + echo "Current package version is: $cur_version" + echo "New Armbian version is: $version" + [ "$version-dietpi$cur_suffix" = "$cur_version" ] && version="$version-dietpi$((cur_suffix+1))" || version="$version-dietpi1" + echo "New package version will be: $version" + echo "version" > VERSION - name: Build asset run: | cd build From 1f60b87c5e99b70733a2cc45631d4d57d491e3a0 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 8 May 2024 22:57:41 +0200 Subject: [PATCH 179/458] v9.4 (#7064) - Orange Pi Zero 3 | Resolved an issue on the 1.5 GiB RAM variant, where the Ethernet adapter was not available anymore after soft/warm reboots. --- .build/images/dietpi-build | 3 +-- .build/images/dietpi-installer | 15 +++------------ .github/workflows/dietpi-build.yml | 3 +-- .update/patches | 14 ++++++++++++++ CHANGELOG.txt | 1 + 5 files changed, 20 insertions(+), 16 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index e8af5b05ae..c13fbf7041 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -136,8 +136,7 @@ case $HW_MODEL in 80) iname='OrangePi5' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; 81) iname='VisionFive2' HW_ARCH=11 root_size=639;; 82) iname='OrangePi5Plus' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; - '83.1') iname='OrangePiZero3' HW_ARCH=3 partition_start=4 root_size=1148;; - '83.2') iname='OrangePiZero3-1.5G' HW_ARCH=3 partition_start=4 root_size=1148;; + 83) iname='OrangePiZero3' HW_ARCH=3 partition_start=4 root_size=1148;; 84) iname='Star64' HW_ARCH=11 root_size=639;; 85) iname='ROCK5A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; 86) iname='ASUSTB2' HW_ARCH=3 partition_start=16 root_size=1008;; diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 063da44e33..289cf0cc13 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -423,8 +423,7 @@ _EOF_ '89' ': Orange Pi 3 LTS' '80' ': Orange Pi 5' '82' ': Orange Pi 5 Plus' - '83.1' ': Orange Pi Zero 3' - '83.2' ': Orange Pi Zero 3 (1.5 GB RAM)' + '83' ': Orange Pi Zero 3' '88' ': Orange Pi Zero 2W' '86' ': ASUS Tinker Board 2' '23' ': Generic Rockchip RK3328' @@ -724,7 +723,6 @@ setenv rootuuid "true"' /boot/boot.cmd # Device tree case $G_HW_MODEL in 45) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=allwinner/sun50i-h6-pine-h64-model-b.dtb' /boot/dietpiEnv.txt;; - 83) (( $HW_VARIANT == 2 )) && G_CONFIG_INJECT 'fdtfile=' 'fdtfile=allwinner/sun50i-h618-orangepi-zero3.dtb' /boot/dietpiEnv.txt;; 88) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=allwinner/sun50i-h618-orangepi-zero2w.dtb' /boot/dietpiEnv.txt;; *) :;; esac @@ -1177,15 +1175,8 @@ _EOF_ G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb G_EXEC rm package.deb fi - # Orange Pi Zero 3 1.5G RAM variant: Install original Orange Pi bootloader - if (( $G_HW_MODEL == 83 )) && (( $HW_VARIANT == 2 )) - then - G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/linux-u-boot-orangepizero3-next_1.5G.deb' - G_AGI linux-{image,dtb}-"$branch-$kernel" ./package.deb - G_EXEC rm package.deb - else - G_AGI linux-{image,dtb}-"$branch-$kernel" "linux-u-boot-$model-$branch" - fi + # Install kernel and bootloader + G_AGI linux-{image,dtb}-"$branch-$kernel" "linux-u-boot-$model-$branch" # Cleanup [[ $G_HW_MODEL != 10 && -f '/boot/uImage' ]] && G_EXEC rm /boot/uImage [[ -f '/boot/.next' ]] && G_EXEC rm /boot/.next diff --git a/.github/workflows/dietpi-build.yml b/.github/workflows/dietpi-build.yml index 601b6a1291..273bc1a334 100644 --- a/.github/workflows/dietpi-build.yml +++ b/.github/workflows/dietpi-build.yml @@ -86,8 +86,7 @@ jobs: '"-m 80 -d 6", "-m 80 -d 7", "-m 80 -d 8", '\ '"-m 81 -d 8", '\ '"-m 82 -d 6", "-m 82 -d 7", "-m 82 -d 8", '\ - '"-m 83.1 -d 6", "-m 83.1 -d 7", "-m 83.1 -d 8", '\ - '"-m 83.2 -d 6", "-m 83.2 -d 7", "-m 83.2 -d 8", '\ + '"-m 83 -d 6", "-m 83 -d 7", "-m 83 -d 8", '\ '"-m 84 -d 8", '\ '"-m 85 -d 6", "-m 85 -d 7", "-m 85 -d 8", '\ '"-m 86 -d 6", "-m 86 -d 7", "-m 86 -d 8", '\ diff --git a/.update/patches b/.update/patches index 56dc3a70af..d489497e72 100755 --- a/.update/patches +++ b/.update/patches @@ -1569,6 +1569,20 @@ Patch_9_4() (( $G_AGUP_COUNT )) && G_AGUG fi + # Orange Pi Zero 3 1.5 GiB RAM: Fix lost Ethernet adapter on reboot: https://github.com/MichaIng/DietPi/issues/6938 + if (( $G_HW_MODEL == 83 )) && dpkg-query -s 'linux-u-boot-orangepizero3-next' &> /dev/null + then + G_DIETPI-NOTIFY 2 'Switching to new U-Boot build which fixes lost Ethernet adapter on reboot ...' + G_AGP linux-u-boot-orangepizero3-next + G_AGI linux-u-boot-orangepizero3-current + # shellcheck disable=SC1091 + . /usr/lib/u-boot/platform_install.sh + # Do not mute progress and error messages + eval "$(declare -f write_uboot_platform | sed -e 's| > /dev/null 2>&1||g' -e 's|status=none|status=progress|g')" + # shellcheck disable=SC2154 + write_uboot_platform "$DIR" "$(lsblk -npo PKNAME "$G_ROOTFS_DEV")" + fi + if [[ -f '/boot/dietpi/.installed' ]] then # GMediaRender diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 1798547579..2e540f0ba3 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -15,6 +15,7 @@ Enhancements: Bug fixes: - NanoPi NEO3 | Resolved an issue where the Ethernet adapter was not available after reboots. Many thanks to @murraythegoz for reporting this issue: https://github.com/MichaIng/DietPi/issues/6987 +- Orange Pi Zero 3 | Resolved an issue on the 1.5 GiB RAM variant, where the Ethernet adapter was not available anymore after soft/warm reboots. - DietPi-VPN | Resolved an issue where installing the IPVanish config failed, due to a changed URL, and startup failed on Bookworm systems since their configs contain a deprecated option. Many thanks to @DreamPhreak and @Michael-Robson for reporting this issue: https://github.com/MichaIng/DietPi/issues/7043 - DietPi-Imager | Resolved an issue where the imager could have failed on GPT partitioned images, if either the source image size did not leave space for the GPT backup partition table, or the first usable LBA/sector was above 34. The GPT backup partition table is now created only at the end of the image generation, not anymore additionally at the start, and the required size it takes is correctly obtained. Many thanks to @SelfhostedPro and @disablewong for reporting this issue: https://github.com/MichaIng/DietPi/issues/7024, https://dietpi.com/forum/t/18035 - DietPi-Software | Snapcast: Resolved an issue where version 0.27.0 was installed, because since version 0.28.0, Snapcast is provided with client and server packages wrapped into one archive, instead having individual downloads for each package. From f0b049001bd8197b353c4f59a413653a9bd08bab Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 8 May 2024 23:12:42 +0200 Subject: [PATCH 180/458] v9.4 - CI | Armbian: Typo --- .github/workflows/armbian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index 221335980b..47c4fac0fd 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -89,7 +89,7 @@ jobs: echo "New Armbian version is: $version" [ "$version-dietpi$cur_suffix" = "$cur_version" ] && version="$version-dietpi$((cur_suffix+1))" || version="$version-dietpi1" echo "New package version will be: $version" - echo "version" > VERSION + echo "$version" > VERSION - name: Build asset run: | cd build From 03b8282751f6020a116809314868aa589b395b7b Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 9 May 2024 00:06:10 +0200 Subject: [PATCH 181/458] v9.4 - DietPi-Set_hardware | Fix condition for Raspberry Pi check, to avoid (visual-only) failure when non-RPi devices enable Bluetooth --- dietpi/func/dietpi-set_hardware | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index 492bf545e1..dc70037ac1 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -1240,9 +1240,9 @@ Do you want to continue and disable the serial login console?' || return 1 G_EXEC systemctl enable --now bluetooth # RPi - if (( $G_HW_MODEL > 9 )) + if (( $G_HW_MODEL < 10 )) && (( $G_HW_ONBOARD_WIFI )) then - (( $G_HW_ONBOARD_WIFI )) && G_EXEC systemctl enable hciuart + G_EXEC systemctl enable hciuart # Orange Pi 3B/Zero 3/Zero 2W: Module does not load automatically elif [[ $G_HW_MODEL =~ ^(83|87|88)$ ]] From 101401b7536b00a2f6bddcee1c052ca836ee1352 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 9 May 2024 13:36:30 +0200 Subject: [PATCH 182/458] v9.4 - CI | Skip APT dist/full-upgrade on ARMv6/7 Trixie systems, until time_t transition has finished, as the repo currently contains dependency conflicts - CI | Amiberry: Shutdown system if first run setup failed, and print debug info --- .build/software/Amiberry/container_build.bash | 6 ++++++ .build/software/dietpi-software-build.bash | 3 +++ .github/workflows/dietpi-software.bash | 3 +++ 3 files changed, 12 insertions(+) diff --git a/.build/software/Amiberry/container_build.bash b/.build/software/Amiberry/container_build.bash index ec02d67c2c..ef5063d4a9 100755 --- a/.build/software/Amiberry/container_build.bash +++ b/.build/software/Amiberry/container_build.bash @@ -116,6 +116,9 @@ G_EXEC eval 'echo '\''infocmp "$TERM" > /dev/null 2>&1 || { echo "[ WARN ] Unsup # Workaround for failing IPv4 network connectivity check as GitHub Actions runners do not receive external ICMP echo replies G_CONFIG_INJECT 'CONFIG_CHECK_CONNECTION_IP=' 'CONFIG_CHECK_CONNECTION_IP=127.0.0.1' rootfs/boot/dietpi.txt +# Shutdown on failures before the custom script is executed +G_EXEC sed --follow-symlinks -i 's|Prompt_on_Failure$|{ journalctl -n 50; ss -tulpn; df -h; free -h; poweroff; }|' rootfs/boot/dietpi/dietpi-login + # Avoid DietPi-Survey uploads to not mess with the statistics G_EXEC rm rootfs/root/.ssh/known_hosts @@ -134,6 +137,9 @@ Pin-Priority: -1 _EOF_ fi +# ARMv6/7 Trixie: Temporarily prevent dist-upgrade on Trixie, as it fails due to 64-bit time_t transition causing dependency conflicts across the repo. +(( $arch < 3 )) && [[ $DISTRO == 'trixie' ]] && G_EXEC touch rootfs/boot/dietpi/.skip_distro_upgrade + # Automated build cat << _EOF_ >> rootfs/boot/Automation_Custom_Script.sh || Error_Exit 'Failed to generate Automation_Custom_Script.sh' echo '[ INFO ] Running Amiberry build script ...' diff --git a/.build/software/dietpi-software-build.bash b/.build/software/dietpi-software-build.bash index b29492cb9c..922283360b 100644 --- a/.build/software/dietpi-software-build.bash +++ b/.build/software/dietpi-software-build.bash @@ -129,6 +129,9 @@ G_EXEC sed --follow-symlinks -i 's|Prompt_on_Failure$|{ journalctl -n 50; ss -tu # Avoid DietPi-Survey uploads to not mess with the statistics G_EXEC rm rootfs/root/.ssh/known_hosts +# ARMv6/7 Trixie: Temporarily prevent dist-upgrade on Trixie, as it fails due to 64-bit time_t transition causing dependency conflicts across the repo. +(( $arch < 3 )) && [[ $DISTRO == 'trixie' ]] && G_EXEC touch rootfs/boot/dietpi/.skip_distro_upgrade + # Automated build cat << _EOF_ > rootfs/boot/Automation_Custom_Script.sh || Error_Exit 'Failed to generate Automation_Custom_Script.sh' #!/bin/dash diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index d735537fa5..397e94220d 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -368,6 +368,9 @@ G_EXEC eval 'echo -e '\''[Service]\nAmbientCapabilities='\'' > rootfs/etc/system # Workaround for sysctl: permission denied on key "net.core.rmem_max" in containers G_EXEC sed --follow-symlinks -i '/# Start DietPi-Software/a\sed -i '\''/G_EXEC sysctl -w net\.core\.rmem_max/d'\'' /boot/dietpi/dietpi-software' rootfs/boot/dietpi/dietpi-login +# ARMv6/7 Trixie: Temporarily prevent dist-upgrade on Trixie, as it fails due to 64-bit time_t transition causing dependency conflicts across the repo. +(( $arch < 3 )) && [[ $DISTRO == 'trixie' ]] && G_EXEC touch rootfs/boot/dietpi/.skip_distro_upgrade + # Check for service status, ports and commands # shellcheck disable=SC2016 # - Start all services From d2251bb4b93af6385b32a07f3c1a3a8ebe09dae1 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 9 May 2024 15:26:46 +0200 Subject: [PATCH 183/458] v9.4 - Raspberry Pi | On images with new kernel/firmware stack, remove left over initramfs images, and skip it in pre-patches, if any initramfs implementation was manually installed. --- .build/images/dietpi-installer | 2 ++ .update/pre-patches | 18 ++++++------------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 289cf0cc13..001d06a338 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1284,6 +1284,8 @@ _EOF_ G_AGI raspi-firmware G_CONFIG_INJECT 'SKIP_INITRAMFS_GEN=' 'SKIP_INITRAMFS_GEN=yes' /etc/default/raspi-firmware G_AGI "${kernel[@]}" raspi-utils raspberrypi-sys-mods raspberrypi-archive-keyring "${a32bit[@]}" tiny-initramfs + G_EXEC apt-mark auto tiny-initramfs + G_EXEC rm -f /boot/initrd.img-* /boot/firmware/initramfs* else G_AGI raspberrypi-bootloader raspberrypi-kernel libraspberrypi0 libraspberrypi-bin raspberrypi-sys-mods raspberrypi-archive-keyring "${a32bit[@]}" fi diff --git a/.update/pre-patches b/.update/pre-patches index 92a022d80c..11fbb5afe4 100755 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -415,20 +415,14 @@ fi # v9.4 if (( $G_DIETPI_VERSION_CORE < 9 || ( $G_DIETPI_VERSION_CORE == 9 && $G_DIETPI_VERSION_SUB < 4 ) )) then - if (( $G_HW_MODEL < 10 && $G_DISTRO > 6 )) && dpkg-query -s 'raspi-firmware' &> /dev/null + if (( $G_HW_MODEL < 10 && $G_DISTRO > 6 )) && dpkg-query -s 'raspi-firmware' &> /dev/null && ! apt-mark showmanual | grep -E '^(initramfs-tools|dracut|tiny-initramfs)(-core)?$' then - # Satisfy upcoming initramfs dependency of new kernel packages with slim tiny-initramfs: https://github.com/RPi-Distro/repo/issues/358 + G_DIETPI-NOTIFY 2 'Satisfying initramfs package dependency of raspi-firmware with tiny-initramfs' # https://github.com/RPi-Distro/repo/issues/358 G_CONFIG_INJECT 'SKIP_INITRAMFS_GEN=' 'SKIP_INITRAMFS_GEN=yes' /etc/default/raspi-firmware - if ! dpkg-query -s 'initramfs-tools' &> /dev/null - then - G_AGI tiny-initramfs - - elif apt-mark showauto | grep '^initramfs-tools$' - then - G_AGI tiny-initramfs - G_AGP initramfs-tools - # ToDo: Remove existing initramfs images in /boot/initrd-* and /boot/firmware/initramfs* - fi + G_AGI tiny-initramfs + G_EXEC apt-mark auto tiny-initramfs + G_AGP initramfs-tools + G_EXEC rm -f /boot/initrd.img-* /boot/firmware/initramfs* fi fi From 0c53d73dc6e021058b39a5e3109013ff3e89c321 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 9 May 2024 16:11:51 +0200 Subject: [PATCH 184/458] v9.4 - CI | Armbian: Allow current package download to fail, since we do not host all of them yet --- .github/workflows/armbian.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index 47c4fac0fd..ab86ec4f0c 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -81,11 +81,13 @@ jobs: ;; *) echo 'ERROR: Invalid asset "${{ github.event.inputs.asset }}"'; exit 1;; esac - curl -fO "https://dietpi.com/downloads/binaries/$package.deb" - cur_version=$(dpkg-deb -f "$package.deb" Version) - rm "$package.deb" - cur_suffix=${cur_version#*-dietpi} - echo "Current package version is: $cur_version" + if curl -fO "https://dietpi.com/downloads/binaries/$package.deb" + then + cur_version=$(dpkg-deb -f "$package.deb" Version) + rm "$package.deb" + cur_suffix=${cur_version#*-dietpi} + echo "Current package version is: $cur_version" + fi echo "New Armbian version is: $version" [ "$version-dietpi$cur_suffix" = "$cur_version" ] && version="$version-dietpi$((cur_suffix+1))" || version="$version-dietpi1" echo "New package version will be: $version" From a8ef0d7e8b3db0a59cb51e3067ff196e96f4db61 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 11 May 2024 01:41:05 +0200 Subject: [PATCH 185/458] v9.4 - RC up --- .update/version | 2 +- dietpi/func/dietpi-globals | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.update/version b/.update/version index eaecf7dfba..dfc5291528 100644 --- a/.update/version +++ b/.update/version @@ -3,7 +3,7 @@ # Available DietPi version G_REMOTE_VERSION_CORE=9 G_REMOTE_VERSION_SUB=4 -G_REMOTE_VERSION_RC=0 +G_REMOTE_VERSION_RC=1 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=7 G_MIN_VERSION_SUB=0 diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 403bdf85b8..0c51d713cc 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -55,7 +55,7 @@ # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=9 [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=4 - [[ $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 From b1cbc54ff68a6abbf41295c820d4267359331b7a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 11 May 2024 01:52:42 +0200 Subject: [PATCH 186/458] v9.4 (#7067) - Odroid XU4 | Update boot.ini for Linux 6.1/6.6 --- .build/images/OdroidXU4/boot.ini | 87 +++++++------------------------- .build/images/dietpi-installer | 7 +-- .update/patches | 21 +++++--- CHANGELOG.txt | 1 + dietpi/dietpi-config | 14 ++--- dietpi/func/dietpi-set_hardware | 22 +++++++- dietpi/func/dietpi-set_software | 1 + 7 files changed, 60 insertions(+), 93 deletions(-) diff --git a/.build/images/OdroidXU4/boot.ini b/.build/images/OdroidXU4/boot.ini index efcbd66771..e86febe9f7 100644 --- a/.build/images/OdroidXU4/boot.ini +++ b/.build/images/OdroidXU4/boot.ini @@ -4,24 +4,25 @@ ODROIDXU-UBOOT-CONFIG setenv initrd_high "0xffffffff" setenv fdt_high "0xffffffff" -# MAC address configuration -setenv macaddr "00:1e:06:61:7a:72" - # Kernel command-line parameters setenv bootrootfs "root=/dev/mmcblk0p1 rootfstype=ext4 rootwait ro console=ttySAC2,115200n8 console=tty1 consoleblank=0 net.ifnames=0" -# HDMI/DVI selection: "hdmi" or "dvi" -# - DVI mode disables HDMI sound -setenv vout "hdmi" - -# HDMI Hot Plug Detect -# - "false" disables auto-detection and forces HDMI output. -# - "true" enables HDMI detection based on cable connection. -setenv HPD "true" - # HDMI CEC: "false" or "true", defaults to "true" #setenv cecenable "true" +# Disable ODROID-VU7 touchscreen support: "false" or "true", defaults to "true" +#setenv disable_vu7 "true" + +# ODROID CloudShell 2 TFT LCD and FAN control via I2C bus: "false" or "true", defaults to "false" +#setenv cs2enable "false" + +# Device tree overlays +# - See /boot/dtb/overlays or /boot/dtb for available overlays (*.dtbo files): defaults to empty string "" +#setenv overlays "i2c0" + +# DDR frequency [MHz]: "633", "728", "825" or "933", defaults to "825" +#setenv ddr_freq "825" + # HDMI resolution # - Uncomment only ONE line! Leave all commented for automatic selection. # - Uncomment only the setenv line! @@ -123,71 +124,21 @@ setenv HPD "true" #setenv videoconfig "drm_kms_helper.edid_firmware=edid/480x800.bin" # ----------------------------------------------- -# Disable ODROID-VU7 touchscreen support: "false" or "true", defaults to "true" -#setenv disable_vu7 "true" - -# ODROID CloudShell 2 TFT LCD and FAN control via I2C bus: "false" or "true", defaults to "false" -#setenv cs2enable "false" - -# Device tree overlays -# - See /boot/dtb/overlays for available overlays: defaults to empty string "" -#setenv overlays "i2c0" - -# CPU governor -# - DietPi will override this setting to user configured in dietpi-config > Performance Options > CPU governor -setenv governor "performance" - -# DDR frequency [MHz]: "633", "728", "825" or "933", defaults to "825" -#setenv ddr_freq "825" - -# TMDS data amplitude control. -# - 1LSB corresponds to 20 mVdiff amplitude level -# - tx_amp_lvl : 0 = 760 mVdiff(Min), 31 = 1380 mVdiff(Max) -# - Hardkernel default: hdmi_tx_amp_lvl = 31(1380 mVdiff) -setenv hdmi_tx_amp_lvl "31" - -# TMDS data amplitude fine control for each channel -# - 1LSB corresponds to 20 mVdiff amplitude level -# - tx_lvl : 0 = 0 mVdiff(Min), 3 = 60 mVdiff(Max) -# - Hardkernel default: hdmi_tx_lvl_ch0=hdmi_tx_lvl_ch1=hdmi_tx_lvl_ch2 = 3 -setenv hdmi_tx_lvl_ch0 "3" -setenv hdmi_tx_lvl_ch1 "3" -setenv hdmi_tx_lvl_ch2 "3" - -# TMDS data pre-emphasis level control -# - 1LSB corresponds to -0.45dB emphasis level except for 1 -# - tx_emp_lvl : 0 = 0 db(Min), 1 = -0.25 db, 2 = 0.7 db, 15 = -7.45 db(Max) -# - Hardkernel default: hdmi_tx_emp_lvl = 6 (-2.50 db) -setenv hdmi_tx_emp_lvl "6" - -# TMDS clock amplitude control -# - 1LSB corresponds to 20 mVdiff amplitude level. -# - clk_amp_lvl : 0 = 790 mVdiff(Min), 31 = 1410 mVdiff(Max) -# - Hardkernel default hdmi_clk_amp_lvl = 31 (1410 mVdiff) -setenv hdmi_clk_amp_lvl "31" - -# TMDS data source termination resistor control -# - tx_res : 0 = Source Termination OFF(Min), 1 = 200 ohm, 2 = 300 ohm, 3 = 120 ohm(Max) -# - Hardkernel default hdmi_tx_res = 0 (Source Termination OFF) -setenv hdmi_tx_res "0" - ### DO NOT EDIT ANYTHING BELOW THIS LINE ### -setenv hdmi_phy_control "hdmi_tx_amp_lvl=${hdmi_tx_amp_lvl} hdmi_tx_lvl_ch0=${hdmi_tx_lvl_ch0} hdmi_tx_lvl_ch1=${hdmi_tx_lvl_ch1} hdmi_tx_lvl_ch2=${hdmi_tx_lvl_ch2} hdmi_tx_emp_lvl=${hdmi_tx_emp_lvl} hdmi_clk_amp_lvl=${hdmi_clk_amp_lvl} hdmi_tx_res=${hdmi_tx_res} HPD=${HPD} vout=${vout}" - # Load kernel, initrd and dtb in that sequence -ext4load mmc 0:1 0x40008000 /boot/zImage || fatload mmc 0:1 0x40008000 zImage || ext4load mmc 0:1 0x40008000 zImage -ext4load mmc 0:1 0x42000000 /boot/uInitrd || fatload mmc 0:1 0x42000000 uInitrd || ext4load mmc 0:1 0x42000000 uInitrd +load mmc 0:1 0x40008000 /boot/zImage || load mmc 0:1 0x40008000 zImage +load mmc 0:1 0x42000000 /boot/uInitrd || load mmc 0:1 0x42000000 uInitrd if test "${board_name}" = "xu4"; then setenv fdtfile "exynos5422-odroidxu4.dtb"; fi if test "${board_name}" = "xu3"; then setenv fdtfile "exynos5422-odroidxu3.dtb"; fi if test "${board_name}" = "xu3l"; then setenv fdtfile "exynos5422-odroidxu3-lite.dtb"; fi if test "${board_name}" = "hc1"; then setenv fdtfile "exynos5422-odroidhc1.dtb"; fi -ext4load mmc 0:1 0x44000000 /boot/dtb/${fdtfile} || fatload mmc 0:1 0x44000000 dtb/${fdtfile} || ext4load mmc 0:1 0x44000000 dtb/${fdtfile} +load mmc 0:1 0x44000000 /boot/dtb/${fdtfile} || load mmc 0:1 0x44000000 dtb/${fdtfile} # Set FDT address fdt addr 0x44000000 -if test "${cecenable}" = "false"; then fdt rm /cec@101B0000; fi +if test "${cecenable}" = "false"; then fdt rm /soc/cec@101b0000; fi if test "${disable_vu7}" = "false"; then setenv hid_quirks "usbhid.quirks=0x0eef:0x0005:0x0004"; fi # Add overlays for CloudShell @@ -205,7 +156,7 @@ fi if test "x${overlays}" != "x"; then fdt resize 8192 for overlay in ${overlays}; do - ext4load mmc 0:1 0x60000000 /boot/dtb/overlays/${overlay}.dtbo || fatload mmc 0:1 0x60000000 dtb/overlays/${overlay}.dtbo || ext4load mmc 0:1 0x60000000 dtb/overlays/${overlay}.dtbo + load mmc 0:1 0x60000000 /boot/dtb/${overlay}.dtbo || load mmc 0:1 0x60000000 /boot/dtb/overlays/${overlay}.dtbo || load mmc 0:1 0x60000000 dtb/${overlay}.dtbo || load mmc 0:1 0x60000000 dtb/overlays/${overlay}.dtbo fdt apply 0x60000000 done fi @@ -214,7 +165,7 @@ fi if test "x${ddr_freq}" != "x"; then dmc "${ddr_freq}"; fi # Final boot args (DRM debugging: drm.debug=0xff) -setenv bootargs "${bootrootfs} ${videoconfig} smsc95xx.macaddr=${macaddr} governor=${governor} ${hdmi_phy_control} ${hid_quirks}" +setenv bootargs "${bootrootfs} ${videoconfig} ${hid_quirks}" # Boot the board bootz 0x40008000 0x42000000 0x44000000 diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 001d06a338..4eb8b9588a 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1186,12 +1186,7 @@ _EOF_ # Compile U-Boot script [[ -f '/boot/boot.cmd' ]] && G_EXEC mkimage -C none -A "$arch" -T script -d /boot/boot.cmd /boot/boot.scr # Flash U-Boot - # shellcheck disable=SC1091 - . /usr/lib/u-boot/platform_install.sh - # - Do not mute progress and error messages - eval "$(declare -f write_uboot_platform | sed -e 's| > /dev/null 2>&1||g' -e 's|status=none|status=progress|g')" - # shellcheck disable=SC2154 - write_uboot_platform "$DIR" "$BOOT_DEVICE" + /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc "$BOOT_DEVICE" # Odroid C1 cleanup: https://dietpi.com/forum/t/odroid-c1-not-booting-after-kernel-upgrade/17818 if (( $G_HW_MODEL == 10 )) diff --git a/.update/patches b/.update/patches index d489497e72..973ed5f67d 100755 --- a/.update/patches +++ b/.update/patches @@ -1561,7 +1561,7 @@ Patch_9_3() Patch_9_4() { # Update DietPi APT list for several SBCs we added components to our repo for - if [[ $G_HW_MODEL =~ ^(40|44|45|48|56|57|59|60|64|65|67|76|83|88|89|90)$ ]] + if [[ $G_HW_MODEL =~ ^(11|40|44|45|48|56|57|59|60|64|65|67|76|83|88|89|90)$ ]] then /boot/dietpi/func/dietpi-set_software apt-mirror dietpi G_AGUP -v @@ -1569,18 +1569,23 @@ Patch_9_4() (( $G_AGUP_COUNT )) && G_AGUG fi + # Odroid XU4 + if (( $G_HW_MODEL == 11 )) + then + G_DIETPI-NOTIFY 2 'Migrating boot.ini to support new Linux 6.6 device tree overlay locations' + /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc + # shellcheck disable=SC2016 + G_EXEC sed -i '\|/boot/dtb/overlays/${overlay}.dtbo|c load mmc 0:1 0x60000000 /boot/dtb/${overlay}.dtbo || load mmc 0:1 0x60000000 /boot/dtb/overlays/${overlay}.dtbo || load mmc 0:1 0x60000000 dtb/${overlay}.dtbo || load mmc 0:1 0x60000000 dtb/overlays/${overlay}.dtbo' /boot/boot.ini + G_DIETPI-NOTIFY 2 'Fixing CEC toggle in boot.ini' + G_EXEC sed -i 's|rm /cec@101B0000;|rm /soc/cec@101b0000;|' /boot/boot.ini + # Orange Pi Zero 3 1.5 GiB RAM: Fix lost Ethernet adapter on reboot: https://github.com/MichaIng/DietPi/issues/6938 - if (( $G_HW_MODEL == 83 )) && dpkg-query -s 'linux-u-boot-orangepizero3-next' &> /dev/null + elif (( $G_HW_MODEL == 83 )) && dpkg-query -s 'linux-u-boot-orangepizero3-next' &> /dev/null then G_DIETPI-NOTIFY 2 'Switching to new U-Boot build which fixes lost Ethernet adapter on reboot ...' G_AGP linux-u-boot-orangepizero3-next G_AGI linux-u-boot-orangepizero3-current - # shellcheck disable=SC1091 - . /usr/lib/u-boot/platform_install.sh - # Do not mute progress and error messages - eval "$(declare -f write_uboot_platform | sed -e 's| > /dev/null 2>&1||g' -e 's|status=none|status=progress|g')" - # shellcheck disable=SC2154 - write_uboot_platform "$DIR" "$(lsblk -npo PKNAME "$G_ROOTFS_DEV")" + /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc fi if [[ -f '/boot/dietpi/.installed' ]] diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 2e540f0ba3..93e83feb40 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -11,6 +11,7 @@ Enhancements: - General | Our scripts do now internally enforce the default umask 0022. Many config and install options rely on this, hence it can cause issues when e.g. 0027 (deny read access for "other" users) has been applied on the parent shell. This affects only the (sub)shell of our scripts, while the current and default umask of parent and of shells/consoles remains untouched. - NanoPi R5C | New images, or when flashing the new bootloader binary via dietpi-config > Advanced Options > Update MMC bootloader, support M.2 WiFi modules. - Orange Pi 3B | Added an option for updating the SPI bootloader via dietpi-config > Advanced Options > Update SPI bootloader. +- Odroid XU4 | The kernel will be upgraded to Linux 6.6. - DietPi-Software | Snapcast: 64-bit ARM and Debian Bookworm + Trixie will have the now available packages from Snapcast installed, instead of those from the Debian repository. Bug fixes: diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 35e9c1bb13..cff560b470 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -1050,8 +1050,8 @@ Re-enabling HDMI requires a reboot. If you need emergency HDMI output, edit the # Armbian U-Boot update if [[ -f '/usr/lib/u-boot/platform_install.sh' ]] then - local rootdev=$(lsblk -npo PKNAME "$G_ROOTFS_DEV") - G_WHIP_MENU_ARRAY+=('Update MMC bootloader' ": Flash current U-Boot to $rootdev") + local bootdev=$(lsblk -npo PKNAME "$(findmnt -Ufnro SOURCE -T /boot)") + G_WHIP_MENU_ARRAY+=('Update MMC bootloader' ": Flash current U-Boot to $bootdev") fi # RPi 4/5 EEPROM update: https://www.raspberrypi.org/documentation/hardware/raspberrypi/booteeprom.md @@ -1214,14 +1214,9 @@ Further information: https://www.raspberrypi.org/documentation/hardware/raspberr elif [[ $G_WHIP_RETURNED_VALUE == 'Update MMC bootloader' ]]; then G_WHIP_YESNO "[ INFO ] MMC bootloader update -\nThis will flash the U-Boot image of the installed linux-u-boot-* package to the MMC device $rootdev. +\nThis will flash the U-Boot image of the installed linux-u-boot-* package to the MMC device $bootdev. \nDo you want to continue?" || return 0 - # shellcheck disable=SC1091 - . /usr/lib/u-boot/platform_install.sh - # Do not mute progress and error messages - eval "$(declare -f write_uboot_platform | sed -e 's| > /dev/null 2>&1||g' -e 's|status=none|status=progress|g')" - # shellcheck disable=SC2154 - write_uboot_platform "$DIR" "$rootdev" + /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc "$bootdev" elif [[ $G_WHIP_RETURNED_VALUE == 'Update SPI bootloader' ]]; then @@ -1261,6 +1256,7 @@ Further information: https://www.raspberrypi.org/documentation/hardware/raspberr \nDo you want to continue?' || return 0 # shellcheck disable=SC1091 . /usr/lib/u-boot/platform_install.sh + # shellcheck disable=SC2154 [[ -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 diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index dc70037ac1..1cf1e5a6de 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -30,8 +30,9 @@ $FP_SCRIPT rpi-camera enable/disable $FP_SCRIPT rpi-codec enable/disable $FP_SCRIPT rpi-opengl vc4-kms-v3d/vc4-fkms-v3d/disable $FP_SCRIPT rpi3_usb_boot enable -$FP_SCRIPT rpi-eeprom Update RPi 4 EEPROM bootloader and USB firmware +$FP_SCRIPT rpi-eeprom Update RPi 4/5 EEPROM bootloader and USB firmware $FP_SCRIPT vf2-spi-update Update StarFive VisionFive 2 SPI bootloader +$FP_SCRIPT flash-u-boot-mmc [] Flash U-Boot binary to eMMC/SD card, taking device path as optional argument, else flashes to /boot drive $FP_SCRIPT gpudriver none|intel|nvidia|amd|custom $FP_SCRIPT qemu-guest-agent|qga enable/disable " #//////////////////////////////////// @@ -215,7 +216,7 @@ _EOF_ #///////////////////////////////////////////////////////////////////////////////////// RPi_EEPROM() { - (( $G_HW_MODEL > 3 )) || { Unsupported_Input_Name; return 1; } # Exit path for non-RPi 4/5 + (( $G_HW_MODEL > 3 && $G_HW_MODEL < 10 )) || { Unsupported_Input_Name; return 1; } # Exit path for non-RPi 4/5 # Install required APT package G_AG_CHECK_INSTALL_PREREQ rpi-eeprom @@ -243,6 +244,22 @@ _EOF_ G_EXEC rm u-boot-spl.bin.normal.out visionfive2_fw_payload.img } + #///////////////////////////////////////////////////////////////////////////////////// + # flash-u-boot-mmc + #///////////////////////////////////////////////////////////////////////////////////// + Flash_U-Boot_MMC() + { + [[ -f '/usr/lib/u-boot/platform_install.sh' ]] || { G_DIETPI-NOTIFY 1 'Flash script /usr/lib/u-boot/platform_install.sh not found. Aborting ...'; return 1; } + [[ $INPUT_DEVICE_VALUE ]] || INPUT_DEVICE_VALUE=$(lsblk -npo PKNAME "$(findmnt -Ufnro SOURCE -T /boot)") + [[ -b $INPUT_DEVICE_VALUE ]] || { G_DIETPI-NOTIFY 1 "Block device \"$INPUT_DEVICE_VALUE\" not found. Aborting ..."; return 1; } + # shellcheck disable=SC1091 + . /usr/lib/u-boot/platform_install.sh || return 1 + # Do not mute progress and error messages + eval "$(declare -f write_uboot_platform | sed -e 's| > /dev/null 2>&1||g' -e 's|status=none|status=progress|g')" + # shellcheck disable=SC2154 + write_uboot_platform "$DIR" "$rootdev" + } + #///////////////////////////////////////////////////////////////////////////////////// # gpumemsplit #///////////////////////////////////////////////////////////////////////////////////// @@ -2381,6 +2398,7 @@ _EOF_ 'rpi3_usb_boot') RPi_USB_Boot_Main;; 'rpi-eeprom') RPi_EEPROM;; 'vf2-spi-update') VF2_SPI_Update;; + 'flash-u-boot-mmc') Flash_U-Boot_MMC || EXIT_CODE=1;; 'headless') Headless_Main;; 'gpudriver') GPUDriver_Main;; 'qemu-guest-agent'|'qga') QEMU_Guest_Agent_Main;; diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index 1d2ba000e6..929d90b182 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -123,6 +123,7 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R case $G_HW_MODEL in [0-9]) all_components='rpi';; 10) all_components='odroidc1';; + 11) all_components='odroidxu4';; 40) all_components='pinea64';; 44) all_components='pinebook';; 45) all_components='pineh64';; From 5d137607bb10e98ff190899dd8f65813d0a6e720 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 11 May 2024 02:06:43 +0200 Subject: [PATCH 187/458] v9.4 - CHANGELOG | Add missing dietpi-config bug fix entry --- CHANGELOG.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 93e83feb40..253b05b59a 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,7 @@ Bug fixes: - Orange Pi Zero 3 | Resolved an issue on the 1.5 GiB RAM variant, where the Ethernet adapter was not available anymore after soft/warm reboots. - DietPi-VPN | Resolved an issue where installing the IPVanish config failed, due to a changed URL, and startup failed on Bookworm systems since their configs contain a deprecated option. Many thanks to @DreamPhreak and @Michael-Robson for reporting this issue: https://github.com/MichaIng/DietPi/issues/7043 - DietPi-Imager | Resolved an issue where the imager could have failed on GPT partitioned images, if either the source image size did not leave space for the GPT backup partition table, or the first usable LBA/sector was above 34. The GPT backup partition table is now created only at the end of the image generation, not anymore additionally at the start, and the required size it takes is correctly obtained. Many thanks to @SelfhostedPro and @disablewong for reporting this issue: https://github.com/MichaIng/DietPi/issues/7024, https://dietpi.com/forum/t/18035 +- DietPi-Config | Resolved a visual-only failure message on non-RPi systems, when enabling Bluetooth, and an actual failure doing so on Orange Pi Zero 3, Orange Pi 3B and Orange Pi Zero 2W, since the required kernel module "sprdbt_tty" was not loaded. Many thanks to @b9AcE for reporting this issue: https://dietpi.com/forum/t/19929/45 - DietPi-Software | Snapcast: Resolved an issue where version 0.27.0 was installed, because since version 0.28.0, Snapcast is provided with client and server packages wrapped into one archive, instead having individual downloads for each package. - DietPi-Software | OctoPrint: Resolved an issue where the installation failed on RISC-V and ARMv6/7 Bullseye systems, due to changed dependencies. - DietPi-Software | X.Org X Server: Resolved an issue where an important config file might have been missing on RPi 5 and potentially Amlogic S905 SBCs, if the config directory /etc/X11/xorg.conf.d did not exist and was not created as part of the related APT packages. Many thanks to @rmscode for reporting this issue: https://dietpi.com/forum/t/19963 From 0ab8c429a4cfbb5f0565943acbb09841d704719d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 11 May 2024 18:56:55 +0200 Subject: [PATCH 188/458] v9.4 - DietPi-Patches | Fix syntax for replacing overlay load commands, to assure indentation - DietPi-Set_hardware | Fix variable name for flashing U-Boot t SD/eMMC - DietPi-CloudShell | On Odroid XU4, when using the CloudShell 2 LCD, during configured auto screen off times, the backlight power of the LCD will be disabled as well, to safe energy and avoid still visible black display content. Many thanks to @smac for suggesting this enhancement: https://dietpi.com/forum/t/15331/55 - DietPi-Config | Added an option to the LCD display menu to toggle the Odroid XU4 CloudShell 2 LCD. - DietPi-Config | Fix detection for Odroid IR remote state - DietPi-Set_hardware | Cleanup Odroid LCD and IR functions, remove handling/config of kernel modules which do not exist anymore since Linux 5.4 --- .update/patches | 7 +- CHANGELOG.txt | 2 + dietpi/dietpi-cloudshell | 5 ++ dietpi/dietpi-config | 9 ++- dietpi/func/dietpi-set_hardware | 116 +++++++++++++++----------------- 5 files changed, 72 insertions(+), 67 deletions(-) diff --git a/.update/patches b/.update/patches index 973ed5f67d..45deca45e0 100755 --- a/.update/patches +++ b/.update/patches @@ -1575,9 +1575,12 @@ Patch_9_4() G_DIETPI-NOTIFY 2 'Migrating boot.ini to support new Linux 6.6 device tree overlay locations' /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc # shellcheck disable=SC2016 - G_EXEC sed -i '\|/boot/dtb/overlays/${overlay}.dtbo|c load mmc 0:1 0x60000000 /boot/dtb/${overlay}.dtbo || load mmc 0:1 0x60000000 /boot/dtb/overlays/${overlay}.dtbo || load mmc 0:1 0x60000000 dtb/${overlay}.dtbo || load mmc 0:1 0x60000000 dtb/overlays/${overlay}.dtbo' /boot/boot.ini + G_EXEC sed --follow-symlinks -i '\|/boot/dtb/overlays/${overlay}.dtbo|c\ load mmc 0:1 0x60000000 /boot/dtb/${overlay}.dtbo || load mmc 0:1 0x60000000 /boot/dtb/overlays/${overlay}.dtbo || load mmc 0:1 0x60000000 dtb/${overlay}.dtbo || load mmc 0:1 0x60000000 dtb/overlays/${overlay}.dtbo' /boot/boot.ini G_DIETPI-NOTIFY 2 'Fixing CEC toggle in boot.ini' - G_EXEC sed -i 's|rm /cec@101B0000;|rm /soc/cec@101b0000;|' /boot/boot.ini + G_EXEC sed --follow-symlinks -i 's|rm /cec@101B0000;|rm /soc/cec@101b0000;|' /boot/boot.ini + G_DIETPI-NOTIFY 2 'Cleaning up obsolete configs' + [[ -f '/etc/modprobe.d/odroid-cloudshell.conf' ]] && G_EXEC rm /etc/modprobe.d/odroid-cloudshell.conf + G_EXEC sed --follow-symlinks -Ei '/^[[:blank:]]*(gpioplug-ir-recv|fbtft_device)[[:blank:]]*$/d' /etc/modules # Orange Pi Zero 3 1.5 GiB RAM: Fix lost Ethernet adapter on reboot: https://github.com/MichaIng/DietPi/issues/6938 elif (( $G_HW_MODEL == 83 )) && dpkg-query -s 'linux-u-boot-orangepizero3-next' &> /dev/null diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 253b05b59a..3d0024d5e9 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -12,6 +12,8 @@ Enhancements: - NanoPi R5C | New images, or when flashing the new bootloader binary via dietpi-config > Advanced Options > Update MMC bootloader, support M.2 WiFi modules. - Orange Pi 3B | Added an option for updating the SPI bootloader via dietpi-config > Advanced Options > Update SPI bootloader. - Odroid XU4 | The kernel will be upgraded to Linux 6.6. +- DietPi-CloudShell | On Odroid XU4, when using the CloudShell 2 LCD, during configured auto screen off times, the backlight power of the LCD will be disabled as well, to safe energy and avoid still visible black display content. Many thanks to @smac for suggesting this enhancement: https://dietpi.com/forum/t/15331/55 +- DietPi-Config | Added an option to the LCD display menu to toggle the Odroid XU4 CloudShell 2 LCD. - DietPi-Software | Snapcast: 64-bit ARM and Debian Bookworm + Trixie will have the now available packages from Snapcast installed, instead of those from the Debian repository. Bug fixes: diff --git a/dietpi/dietpi-cloudshell b/dietpi/dietpi-cloudshell index d5927cee6c..1198b1afcf 100755 --- a/dietpi/dietpi-cloudshell +++ b/dietpi/dietpi-cloudshell @@ -53,6 +53,9 @@ setterm --blank 1 --powersave on # Blank after 1 minute as force requires a poke to bring it back up BLANK_SCREEN_ACTIVE=1 + # Odroid XU4 CloudShell 2 backlight + [[ $G_HW_MODEL == 11 && -f '/sys/class/backlight/fb_hktft32/bl_power' ]] && echo 0 > /sys/class/backlight/fb_hktft32/bl_power + # Turn screen on elif (( $BLANK_SCREEN_TIME_HOUR_END == $current_hour )); then @@ -68,6 +71,8 @@ setterm --blank 0 --powersave off BLANK_SCREEN_ACTIVE=0 + # Odroid XU4 CloudShell 2 backlight + [[ $G_HW_MODEL == 11 && -f '/sys/class/backlight/fb_hktft32/bl_power' ]] && echo 1 > /sys/class/backlight/fb_hktft32/bl_power } # Converts a byte int to string, in human readable byte format. diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index cff560b470..f97fc96d59 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -216,11 +216,10 @@ # Remote local odroid_remote_text='Off' local odroid_remote_enabled=0 - if [[ -f '/etc/systemd/system/odroid-remote.service' ]]; then - + if grep -Eq '^[[:blank:]]*(gpio-ir-recv|meson_ir)[[:blank:]]*$' /etc/modules || systemctl -q is-enabled lircd 2> /dev/null + then odroid_remote_text='On' odroid_remote_enabled=1 - fi G_WHIP_MENU_ARRAY+=('10' ": Odroid remote : [$odroid_remote_text]") @@ -260,7 +259,7 @@ else G_WHIP_MENU_ARRAY+=('odroid-lcd35' ': 480x320 panel with touch input') - (( $G_HW_MODEL == 11 )) && G_WHIP_MENU_ARRAY+=('odroid-cloudshell' ': 320x240 panel') + (( $G_HW_MODEL == 11 )) && G_WHIP_MENU_ARRAY+=('odroid-cloudshell' ': 320x240 panel' 'odroid-cloudshell2' ': Odroid XU4 CloudShell 2 LCD') fi @@ -330,7 +329,7 @@ A long (or insufficiently manufactured) cable may required a higher boost settin /boot/dietpi/func/dietpi-set_hardware remoteir none && REBOOT_REQUIRED=1 - elif G_WHIP_YESNO 'This will enable the IR modules, setup Lirc and the Odroid Remote for Odroid C1, C2 and XU4 Cloudshell. + elif G_WHIP_YESNO 'This will enable the IR modules, setup Lirc and the Odroid Remote for Odroid C1, C2 and XU4 CloudShell. \nNB: Other remotes can be configured by running "irrecord" and applying the codes to "/etc/lirc/lircd.conf"\n\nDo you wish to continue?'; then /boot/dietpi/func/dietpi-set_hardware remoteir odroid_remote && REBOOT_REQUIRED=1 diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index 1cf1e5a6de..f2ad38477b 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -257,7 +257,7 @@ _EOF_ # Do not mute progress and error messages eval "$(declare -f write_uboot_platform | sed -e 's| > /dev/null 2>&1||g' -e 's|status=none|status=progress|g')" # shellcheck disable=SC2154 - write_uboot_platform "$DIR" "$rootdev" + write_uboot_platform "$DIR" "$INPUT_DEVICE_VALUE" } #///////////////////////////////////////////////////////////////////////////////////// @@ -332,65 +332,52 @@ _EOF_ #///////////////////////////////////////////////////////////////////////////////////// # remoteir #///////////////////////////////////////////////////////////////////////////////////// - RemoteIR_Prereqs(){ G_AG_CHECK_INSTALL_PREREQ lirc; } - - RemoteIR_Reset(){ - + RemoteIR_Reset() + { # Disable JustBoom - if (( $G_HW_MODEL < 10 )); then - - if [[ -f '/etc/systemd/system/justboom-ir-mpd.service' ]]; then - + if (( $G_HW_MODEL < 10 )) + then + if [[ -f '/etc/systemd/system/justboom-ir-mpd.service' ]] + then G_EXEC systemctl disable --now justboom-ir-mpd G_EXEC rm /etc/systemd/system/justboom-ir-mpd.service - fi [[ -d '/etc/systemd/system/justboom-ir-mpd.service.d' ]] && G_EXEC rm -R /etc/systemd/system/justboom-ir-mpd.service.d - G_EXEC sed --follow-symlinks -i '/^[[:blank:]]*dtoverlay=gpio-ir/d' /boot/config.txt # Disable Odroids - elif (( $G_HW_MODEL < 20 )); then - - if [[ -f '/etc/systemd/system/odroid-remote.service' ]]; then - - G_EXEC systemctl disable --now odroid-remote - G_EXEC rm /etc/systemd/system/odroid-remote.service - + elif (( $G_HW_MODEL < 20 )) + then + if systemctl -q is-active lircd || systemctl -q is-enabled lircd 2> /dev/null + then + G_EXEC systemctl disable --now lircd fi - [[ -d '/etc/systemd/system/odroid-remote.service.d' ]] && G_EXEC rm -R /etc/systemd/system/odroid-remote.service.d - + G_EXEC sed --follow-symlinks -Ei '/^[[:blank:]]*(gpio-ir-recv|meson_ir)[[:blank:]]*$/d' /etc/modules fi - } - RemoteIR_Main(){ - + RemoteIR_Main() + { (( $G_HW_MODEL > 19 )) && { Unsupported_Input_Name; return 1; } # Exit path for non-Odroid/non-RPi RemoteIR_Reset - if [[ $INPUT_DEVICE_VALUE == 'odroid_remote' ]]; then - + if [[ $INPUT_DEVICE_VALUE == 'odroid_remote' ]] + then (( $G_HW_MODEL > 9 )) || { Unsupported_Input_Mode; return 1; } # Exit path for non-Odroid - RemoteIR_Prereqs - - # XU4 Cloudshell - if (( $G_HW_MODEL == 11 )); then + G_AG_CHECK_INSTALL_PREREQ lirc - # Modules - local string='options gpioplug_ir_recv gpio_nr=24 active_low=1' - G_CONFIG_INJECT "$string" "$string" /etc/modprobe.d/odroid-cloudshell.conf + # Kernel modules + # - XU4 CloudShell + if (( $G_HW_MODEL == 11 )) + then G_CONFIG_INJECT 'gpio-ir-recv' 'gpio-ir-recv' /etc/modules - G_CONFIG_INJECT 'gpioplug-ir-recv' 'gpioplug-ir-recv' /etc/modules - - # C2 - elif (( $G_HW_MODEL == 12 )); then - # Module + # - C2 + elif (( $G_HW_MODEL == 12 )) + then G_CONFIG_INJECT 'meson_ir' 'meson_ir' /etc/modules - fi # Config @@ -433,12 +420,13 @@ _EOF_ # Service G_EXEC systemctl enable --now lircd - elif [[ $INPUT_DEVICE_VALUE == 'justboom_ir_remote' ]]; then - + elif [[ $INPUT_DEVICE_VALUE == 'justboom_ir_remote' ]] + then (( $G_HW_MODEL > 9 )) && { Unsupported_Input_Mode; return 1; } # Exit path for non-RPi - RemoteIR_Prereqs + G_AG_CHECK_INSTALL_PREREQ lirc mpc + # Device tree overlay G_CONFIG_INJECT 'dtoverlay=gpio-ir' 'dtoverlay=gpio-ir,gpio_pin=25' /boot/config.txt # Config @@ -490,9 +478,6 @@ begin remote end remote _EOF_ - # MPD control - G_AG_CHECK_INSTALL_PREREQ mpc - cat << '_EOF_' > /root/.lircrc begin prog = irexec @@ -555,12 +540,10 @@ _EOF_ G_EXEC systemctl daemon-reload G_EXEC systemctl enable --now justboom-ir-mpd - elif [[ $INPUT_DEVICE_VALUE != 'none' ]]; then - + elif [[ $INPUT_DEVICE_VALUE != 'none' ]] + then Unknown_Input_Mode - fi - } #///////////////////////////////////////////////////////////////////////////////////// @@ -660,11 +643,13 @@ _EOF_ 'odroid-lcd35') Lcd_Panel_OdroidLCD35_Enable;; 'waveshare32') Lcd_Panel_Waveshare32_Enable;; 'odroid-cloudshell') Lcd_Panel_Odroidcloudshell_Enable;; + 'odroid-cloudshell2') Lcd_Panel_Odroidcloudshell2_Enable;; 'esp01215e') Lcd_Panel_ESP01215E_Enable;; 'allo-boss2-oled') OLED_Allo_Boss2_Enable;; 'none') Lcd_Panel_Waveshare32_Disable Lcd_Panel_Odroidcloudshell_Disable + Lcd_Panel_Odroidcloudshell2_Disable Lcd_Panel_OdroidLCD35_Disable Lcd_Panel_ESP01215E_Disable OLED_Allo_Boss2_Disable @@ -848,23 +833,34 @@ _EOF_ } - # Odroid CloudShell - Lcd_Panel_Odroidcloudshell_Enable(){ - - echo 'options fbtft_device name=hktft9340 busnum=1 rotate=270' > /etc/modprobe.d/odroid-cloudshell.conf - + # Odroid CloudShell: ToDo: Broken after fbtft_device kernel module does not exist anymore with Linux 5.4/6.1/6.6... + Lcd_Panel_Odroidcloudshell_Enable() + { G_CONFIG_INJECT 'spi_s3c64xx' 'spi_s3c64xx' /etc/modules - G_CONFIG_INJECT 'fbtft_device' 'fbtft_device' /etc/modules - echo 'fbtft_device' >> /etc/modules # XU4 4.9 workaround: https://github.com/MichaIng/DietPi/issues/926#issuecomment-299480918 - } - Lcd_Panel_Odroidcloudshell_Disable(){ + Lcd_Panel_Odroidcloudshell_Disable() + { + G_EXEC sed --follow-symlinks -i '/^[[:blank:]]*spi_s3c64xx[[:blank:]]*/d' /etc/modules + } - [[ -f '/etc/modprobe.d/odroid-cloudshell.conf' ]] && G_EXEC rm /etc/modprobe.d/odroid-cloudshell.conf - G_EXEC sed --follow-symlinks -i '/^[[:blank:]]*spi_s3c64xx/d' /etc/modules - G_EXEC sed --follow-symlinks -i '/^[[:blank:]]*fbtft_device/d' /etc/modules + # Odroid CloudShell 2 + Lcd_Panel_Odroidcloudshell2_Enable() + { + (( $G_HW_MODEL == 11 )) && { Unsupported_Input_Mode; return 1; } # Odroid XU4 only + # Device tree overlay + G_CONFIG_INJECT 'setenv[[:blank:]]+cs2enable[[:blank:]]' 'setenv cs2enable "true"' /boot/boot.ini 'ODROIDXU-UBOOT-CONFIG' + # udev rule to enable backlight power + G_EXEC eval 'echo '\''SUBSYSTEM=="backlight", KERNEL=="fb_hktft32", ACTION=="add", ATTR{bl_power}="1"'\'' > /etc/udev/rules.d/dietpi-odroid-cloudshell2.rules' + } + Lcd_Panel_Odroidcloudshell2_Disable() + { + (( $G_HW_MODEL == 11 )) && { Unsupported_Input_Mode; return 1; } # Odroid XU4 only + # udev rule to enable backlight power + [[ -f '/etc/udev/rules.d/dietpi-odroid-cloudshell2.rules' ]] && G_EXEC rm /etc/udev/rules.d/dietpi-odroid-cloudshell2.rules + # Device tree overlay + G_CONFIG_INJECT 'setenv[[:blank:]]+cs2enable[[:blank:]]' '#setenv cs2enable "false"' /boot/boot.ini 'ODROIDXU-UBOOT-CONFIG' } # Odroid LCD 3.5 From fd8b25d2576997a82398800c5fc4e54fc4c4278f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 11 May 2024 19:20:41 +0200 Subject: [PATCH 189/458] v9.4 - DietPi-Set_hardware | Fix CloudShell 2 device condition --- dietpi/func/dietpi-set_hardware | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index f2ad38477b..4f30d16418 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -847,7 +847,7 @@ _EOF_ # Odroid CloudShell 2 Lcd_Panel_Odroidcloudshell2_Enable() { - (( $G_HW_MODEL == 11 )) && { Unsupported_Input_Mode; return 1; } # Odroid XU4 only + (( $G_HW_MODEL == 11 )) || { Unsupported_Input_Mode; return 1; } # Odroid XU4 only # Device tree overlay G_CONFIG_INJECT 'setenv[[:blank:]]+cs2enable[[:blank:]]' 'setenv cs2enable "true"' /boot/boot.ini 'ODROIDXU-UBOOT-CONFIG' # udev rule to enable backlight power @@ -856,7 +856,7 @@ _EOF_ Lcd_Panel_Odroidcloudshell2_Disable() { - (( $G_HW_MODEL == 11 )) && { Unsupported_Input_Mode; return 1; } # Odroid XU4 only + (( $G_HW_MODEL == 11 )) || { Unsupported_Input_Mode; return 1; } # Odroid XU4 only # udev rule to enable backlight power [[ -f '/etc/udev/rules.d/dietpi-odroid-cloudshell2.rules' ]] && G_EXEC rm /etc/udev/rules.d/dietpi-odroid-cloudshell2.rules # Device tree overlay From 1cb56318ca59f21d8b91b12451570425584b333f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 11 May 2024 19:48:21 +0200 Subject: [PATCH 190/458] v9.4 - DietPi-Set_hardware | Reset all LCD settings before applying a new one, so that changes from one to another, without selecting "none" in between, works cleanly. For this, assure that all "Disable" functions are skipped on unsupported SBCs. Also hard fail when calling the "lcdpanel" command or giving an invalid/unsupported LCD name, or if an error-handled command fails. --- dietpi/func/dietpi-set_hardware | 53 +++++++++++++++++---------------- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index 4f30d16418..af4a19e95d 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -639,25 +639,25 @@ _EOF_ #///////////////////////////////////////////////////////////////////////////////////// Lcd_Panel_Main() { + (( $G_HW_MODEL > 19 )) && { Unsupported_Input_Name; return 1; } # Exit path for non-RPi/non-Odroid + + # Reset all LCDs + Lcd_Panel_Waveshare32_Disable + Lcd_Panel_Odroidcloudshell_Disable + Lcd_Panel_Odroidcloudshell2_Disable + Lcd_Panel_OdroidLCD35_Disable + Lcd_Panel_ESP01215E_Disable + OLED_Allo_Boss2_Disable + case $INPUT_DEVICE_VALUE in - 'odroid-lcd35') Lcd_Panel_OdroidLCD35_Enable;; - 'waveshare32') Lcd_Panel_Waveshare32_Enable;; - 'odroid-cloudshell') Lcd_Panel_Odroidcloudshell_Enable;; - 'odroid-cloudshell2') Lcd_Panel_Odroidcloudshell2_Enable;; - 'esp01215e') Lcd_Panel_ESP01215E_Enable;; - 'allo-boss2-oled') OLED_Allo_Boss2_Enable;; - 'none') - Lcd_Panel_Waveshare32_Disable - Lcd_Panel_Odroidcloudshell_Disable - Lcd_Panel_Odroidcloudshell2_Disable - Lcd_Panel_OdroidLCD35_Disable - Lcd_Panel_ESP01215E_Disable - OLED_Allo_Boss2_Disable - ;; - *) - Unknown_Input_Mode - return 1 - ;; + 'odroid-lcd35') Lcd_Panel_OdroidLCD35_Enable || return 1;; + 'waveshare32') Lcd_Panel_Waveshare32_Enable || return 1;; + 'odroid-cloudshell') Lcd_Panel_Odroidcloudshell_Enable || return 1;; + 'odroid-cloudshell2') Lcd_Panel_Odroidcloudshell2_Enable || return 1;; + 'esp01215e') Lcd_Panel_ESP01215E_Enable || return 1;; + 'allo-boss2-oled') OLED_Allo_Boss2_Enable || return 1;; + 'none') :;; + *) Unknown_Input_Mode; return 1;; esac # Update dietpi.txt entry @@ -666,6 +666,8 @@ _EOF_ Lcd_Panel_ESP01215E_Enable(){ + (( $G_HW_MODEL > 9 )) && { Unsupported_Input_Mode; return 1; } # Exit path for non-RPi + G_CONFIG_INJECT 'framebuffer_width=' 'framebuffer_width=1024' /boot/config.txt G_CONFIG_INJECT 'framebuffer_height=' 'framebuffer_height=600' /boot/config.txt G_CONFIG_INJECT 'SOFTWARE_CHROMIUM_RES_X=' "SOFTWARE_CHROMIUM_RES_X=1024" /boot/dietpi.txt @@ -715,8 +717,6 @@ _EOF_ Lcd_Panel_Waveshare32_Enable(){ - (( $G_HW_MODEL > 19 )) && { Unsupported_Input_Mode; return 1; } # Exit path for non-RPi/non-Odroid - # Disable 1st to reset any existing installations Lcd_Panel_Waveshare32_Disable @@ -836,11 +836,13 @@ _EOF_ # Odroid CloudShell: ToDo: Broken after fbtft_device kernel module does not exist anymore with Linux 5.4/6.1/6.6... Lcd_Panel_Odroidcloudshell_Enable() { + (( $G_HW_MODEL == 11 )) || { Unsupported_Input_Mode; return 1; } # Odroid XU4 only G_CONFIG_INJECT 'spi_s3c64xx' 'spi_s3c64xx' /etc/modules } Lcd_Panel_Odroidcloudshell_Disable() { + (( $G_HW_MODEL == 11 )) || return 0 G_EXEC sed --follow-symlinks -i '/^[[:blank:]]*spi_s3c64xx[[:blank:]]*/d' /etc/modules } @@ -856,7 +858,7 @@ _EOF_ Lcd_Panel_Odroidcloudshell2_Disable() { - (( $G_HW_MODEL == 11 )) || { Unsupported_Input_Mode; return 1; } # Odroid XU4 only + (( $G_HW_MODEL == 11 )) || return 0 # udev rule to enable backlight power [[ -f '/etc/udev/rules.d/dietpi-odroid-cloudshell2.rules' ]] && G_EXEC rm /etc/udev/rules.d/dietpi-odroid-cloudshell2.rules # Device tree overlay @@ -866,7 +868,7 @@ _EOF_ # Odroid LCD 3.5 Lcd_Panel_OdroidLCD35_Enable(){ - (( $G_HW_MODEL > 9 && $G_HW_MODEL < 20 )) || { Unsupported_Input_Mode; return 1; } # Exit path for non-Odroid + (( $G_HW_MODEL > 9 )) || { Unsupported_Input_Mode; return 1; } # Exit path for non-Odroid # Reset to disabled Lcd_Panel_OdroidLCD35_Disable @@ -970,7 +972,9 @@ EndSection _EOF_ } - Lcd_Panel_OdroidLCD35_Disable(){ + Lcd_Panel_OdroidLCD35_Disable() + { + (( $G_HW_MODEL > 9 )) || return 0 # Skip on non-Odroid [[ -f '/etc/X11/xorg.conf.d/99-calibration.conf' ]] && G_EXEC rm /etc/X11/xorg.conf.d/99-calibration.conf [[ -f '/etc/modprobe.d/odroid-lcd35.conf' ]] && G_EXEC rm /etc/modprobe.d/odroid-lcd35.conf @@ -981,7 +985,6 @@ _EOF_ fi [[ -d '/etc/systemd/system/odroid-lcd35.service.d' ]] && G_EXEC rm -R /etc/systemd/system/odroid-lcd35.service.d [[ -f '/etc/X11/xorg.conf.d/99-odroid-lcd35.conf' ]] && G_EXEC rm /etc/X11/xorg.conf.d/99-odroid-lcd35.conf - } OLED_Allo_Boss2_Enable(){ @@ -2384,7 +2387,7 @@ _EOF_ 'wificountrycode') Wifi_Countrycode_Main;; 'i2c') I2c_Main;; 'spi') SPI_Main;; - 'lcdpanel') Lcd_Panel_Main;; + 'lcdpanel') Lcd_Panel_Main || EXIT_CODE=1;; 'rpi-opengl') RPi_OpenGL_Main;; 'eth-forcespeed') Eth_Force_Speed_Main;; 'remoteir') RemoteIR_Main;; From 1e8c0af3c0b693c55e3d1b9fcd47b01b7e51a485 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 11 May 2024 23:56:47 +0200 Subject: [PATCH 191/458] v9.4 - APT | Add repo components for all RK3588 SBCs --- .update/patches | 2 +- dietpi/func/dietpi-set_software | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.update/patches b/.update/patches index 45deca45e0..85738f9809 100755 --- a/.update/patches +++ b/.update/patches @@ -1561,7 +1561,7 @@ Patch_9_3() Patch_9_4() { # Update DietPi APT list for several SBCs we added components to our repo for - if [[ $G_HW_MODEL =~ ^(11|40|44|45|48|56|57|59|60|64|65|67|76|83|88|89|90)$ ]] + if [[ $G_HW_MODEL =~ ^(11|40|44|45|48|56|57|59|60|64|65|67|76|78|79|80|82|83|85|88|89|90)$ ]] then /boot/dietpi/func/dietpi-set_software apt-mirror dietpi G_AGUP -v diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index 929d90b182..0b6631f002 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -208,9 +208,31 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R ;; esac ;; + 78) all_components='rock5b';; + 79) + # Detect variant either based on $HW_VARIANT environment variable, existing "all" components or installed U-Boot package + # shellcheck disable=SC2154 + case $HW_VARIANT in + 1|2) all_components='nanopir6s';; # R6C shares R6S component (and bootloader) for now + 3) all_components='nanopct6';; + *) + [[ -f '/etc/apt/sources.list.d/dietpi.list' ]] && all_components=$(sed -n '/ all /{s/^.* all //p;q}' /etc/apt/sources.list.d/dietpi.list) + # shellcheck disable=SC2043 + [[ $all_components ]] || for i in nano{pi-r6s,pct6} + do + dpkg-query -s "linux-u-boot-$i-current" &> /dev/null || continue + all_components=${i/-//} + break + done + ;; + esac + ;; + 80) all_components='orangepi5';; 81) all_components='visionfive2';; + 82) all_components='orangepi5plus';; 83) all_components='orangepizero3';; 84) all_components='star64';; + 85) all_components='rock5a';; 88) all_components='orangepizero2w';; 89) all_components='orangepi3lts';; 90) all_components='radxazero3';; From 35c72b15af53c6e2fa196d813e43af335f2b6d48 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 12 May 2024 00:23:57 +0200 Subject: [PATCH 192/458] v9.4 - DietPi-CloudShell | Do not disable screen blanking when it has been disabled already --- dietpi/dietpi-cloudshell | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/dietpi/dietpi-cloudshell b/dietpi/dietpi-cloudshell index 1198b1afcf..3d2e91e048 100755 --- a/dietpi/dietpi-cloudshell +++ b/dietpi/dietpi-cloudshell @@ -39,15 +39,13 @@ BLANK_SCREEN_TIME_HOUR_END=0 # This will only work if dietpi-cloudshell was started via dietpi-autostart/dietpi-login, as the setterm power options can only be applied when the command originates from the same terminal without redirects. - RUN_BLANK_SCREEN_AT_SPECIFIC_TIME(){ - + RUN_BLANK_SCREEN_AT_SPECIFIC_TIME() + { local current_hour=$(date '+%-H') # Turn screen off - if (( ! $BLANK_SCREEN_ACTIVE )); then - - (( $BLANK_SCREEN_TIME_HOUR_START == $current_hour )) || return - + if (( ! $BLANK_SCREEN_ACTIVE && $BLANK_SCREEN_TIME_HOUR_START == $current_hour )) + then clear echo -e '\n\nScreen will be powered down in under 1 minute\n' setterm --blank 1 --powersave on # Blank after 1 minute as force requires a poke to bring it back up @@ -57,12 +55,10 @@ [[ $G_HW_MODEL == 11 && -f '/sys/class/backlight/fb_hktft32/bl_power' ]] && echo 0 > /sys/class/backlight/fb_hktft32/bl_power # Turn screen on - elif (( $BLANK_SCREEN_TIME_HOUR_END == $current_hour )); then - + elif (( $BLANK_SCREEN_ACTIVE && $BLANK_SCREEN_TIME_HOUR_END == $current_hour )) + then Disable_Screen_Blanking - fi - } Disable_Screen_Blanking(){ @@ -1504,8 +1500,7 @@ _EOF_ if [[ $G_WHIP_RETURNED_VALUE == 'Toggle' ]];then - ((BLANK_SCREEN_AT_SPECIFIC_TIME_ENABLED++)) - (( $BLANK_SCREEN_AT_SPECIFIC_TIME_ENABLED > 1 )) && BLANK_SCREEN_AT_SPECIFIC_TIME_ENABLED=0 + BLANK_SCREEN_AT_SPECIFIC_TIME_ENABLED=$(( ! $BLANK_SCREEN_AT_SPECIFIC_TIME_ENABLED )) elif [[ $G_WHIP_RETURNED_VALUE == 'Start time' ]];then From a3e0848eb239a62d6da32d31f3de94273d798aec Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 12 May 2024 14:53:23 +0200 Subject: [PATCH 193/458] v9.4 - RC up - DietPi-Patches | Avoid doubled apt update/upgrade when systems upgrade from before DietPi v9.3 --- .update/patches | 14 +++++++------- .update/version | 2 +- dietpi/func/dietpi-globals | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.update/patches b/.update/patches index 85738f9809..2fa977e1d3 100755 --- a/.update/patches +++ b/.update/patches @@ -1546,6 +1546,7 @@ Patch_9_2() fi } +PATCH_9_3_RAN=0 Patch_9_3() { # Purge ancient vmtouch which prevents /boot from being unmounted e.g. for RPi firmware migration: https://github.com/MichaIng/DietPi/issues/6819, https://github.com/MichaIng/DietPi/issues/6976 @@ -1553,20 +1554,19 @@ Patch_9_3() # Add DietPi APT repo /boot/dietpi/func/dietpi-set_software apt-mirror dietpi - G_AGUP -v - # shellcheck disable=SC2154 - (( $G_AGUP_COUNT )) && G_AGUG + G_AGUP + G_AGUG + PATCH_9_3_RAN=1 } Patch_9_4() { # Update DietPi APT list for several SBCs we added components to our repo for - if [[ $G_HW_MODEL =~ ^(11|40|44|45|48|56|57|59|60|64|65|67|76|78|79|80|82|83|85|88|89|90)$ ]] + if [[ $PATCH_9_3_RAN == 0 && $G_HW_MODEL =~ ^(11|40|44|45|48|56|57|59|60|64|65|67|76|78|79|80|82|83|85|88|89|90)$ ]] then /boot/dietpi/func/dietpi-set_software apt-mirror dietpi - G_AGUP -v - # shellcheck disable=SC2154 - (( $G_AGUP_COUNT )) && G_AGUG + G_AGUP + G_AGUG fi # Odroid XU4 diff --git a/.update/version b/.update/version index dfc5291528..9e903dac26 100644 --- a/.update/version +++ b/.update/version @@ -3,7 +3,7 @@ # Available DietPi version G_REMOTE_VERSION_CORE=9 G_REMOTE_VERSION_SUB=4 -G_REMOTE_VERSION_RC=1 +G_REMOTE_VERSION_RC=2 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=7 G_MIN_VERSION_SUB=0 diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 0c51d713cc..d3bda29db1 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -55,7 +55,7 @@ # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=9 [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=4 - [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=1 + [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=2 [[ $G_GITBRANCH ]] || G_GITBRANCH='master' [[ $G_GITOWNER ]] || G_GITOWNER='MichaIng' # - Save current version and Git branch From d67ced4d9decd1810e3484df1f5d071e72b1a447 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 12 May 2024 16:31:21 +0200 Subject: [PATCH 194/458] v9.4 - DietPi config partition | To assure that elsewhere stored and copied config files are treated newer than the ones on the root filesystem, set mtime of those to 1 second after epoch. Set mtime of those on the config partition to 0 seconds after epoch, so, in case they were never touched, they won't be copied. Any (last) edited config file takes hence precedence over the one on the rootfs. Add boot.ini and extlinux.conf to the handled config files. For those, as well as dietpiEnv.txt, if the file from the config partition was copied, hence the one on the effective boot partition overwritten, reboot the system, so the change is effective for 1st boot setup. Such bootloader config files never need to be copied from the RPi boot/firmware partition, since they are effective only there, which is also the reason config.txt and cmdline.txt are not copied. Also update and rephrase the README. --- .build/images/dietpi-imager | 31 ++++++++++++------- .../dietpi/services/fs_partition_resize.sh | 26 +++++++++++++--- 2 files changed, 40 insertions(+), 17 deletions(-) diff --git a/.build/images/dietpi-imager b/.build/images/dietpi-imager index e1d975a6e4..c830d408a5 100755 --- a/.build/images/dietpi-imager +++ b/.build/images/dietpi-imager @@ -529,9 +529,12 @@ G_EXEC mount "${FP_ROOT_DEV::-1}1" "$fat_mountpoint" G_EXEC mount "$FP_ROOT_DEV" "$root_mountpoint" G_DIETPI-NOTIFY 2 'Copying dietpi.txt and other config files to the DIETPISETUP partition' - for f in 'dietpi.txt' 'dietpi-wifi.txt' 'unattended_pivpn.conf' 'Automation_Custom_PreScript.sh' 'Automation_Custom_Script.sh' + for f in 'dietpi.txt' 'dietpi-wifi.txt' 'Automation_Custom_PreScript.sh' 'Automation_Custom_Script.sh' 'unattended_pivpn.conf' do - [[ -f $root_mountpoint/boot/$f ]] && G_EXEC cp "$root_mountpoint/boot/$f" "$fat_mountpoint/" + [[ -f $root_mountpoint/boot/$f ]] || continue + G_EXEC cp "$root_mountpoint/boot/$f" "$fat_mountpoint/" + TZ=UTC G_EXEC touch -t '197001010000' "$fat_mountpoint/$f" + TZ=UTC G_EXEC touch -t '197001010001' "$root_mountpoint/boot/$f" done G_EXEC umount "$root_mountpoint" "$fat_mountpoint" G_EXEC rmdir "$root_mountpoint" "$fat_mountpoint" @@ -558,22 +561,26 @@ G_EXEC mount "$new_dos_part" "$fat_mountpoint" G_EXEC mount "$FP_ROOT_DEV" "$root_mountpoint" G_DIETPI-NOTIFY 2 'Copying dietpi.txt and other config files to the DIETPISETUP partition' - for f in 'dietpi.txt' 'dietpi-wifi.txt' 'dietpiEnv.txt' 'unattended_pivpn.conf' 'Automation_Custom_PreScript.sh' 'Automation_Custom_Script.sh' + for f in 'dietpi.txt' 'dietpi-wifi.txt' 'dietpiEnv.txt' 'boot.ini' 'extlinux/extlinux.conf' 'Automation_Custom_PreScript.sh' 'Automation_Custom_Script.sh' 'unattended_pivpn.conf' do - [[ -f $root_mountpoint/boot/$f ]] && G_EXEC cp "$root_mountpoint/boot/$f" "$fat_mountpoint/" + [[ -f $root_mountpoint/boot/$f ]] || continue + G_EXEC cp "$root_mountpoint/boot/$f" "$fat_mountpoint/" + TZ=UTC G_EXEC touch -t '197001010000' "$fat_mountpoint/${f#extlinux/}" + TZ=UTC G_EXEC touch -t '197001010001' "$root_mountpoint/boot/$f" done - cat << '_EOF_' > "$fat_mountpoint/Readme-DietPi-Config.txt" -DietPi pre-boot configuration + cat << '_EOF_' > "$fat_mountpoint/README.txt" +DietPi config partition -You can edit the files in this folder to setup some configuration options -or even a completely automated install. Please check the documentation and -dietpi.txt for details: https://dietpi.com/docs/install/ +This FAT partition is a place for relevant configuration files to pre-configure and automate your DietPi setup. +Those files will be copied into the root filesystem on first boot, if modified, to become effective, and the partition will be removed. -This folder also supports the following additional files. Please ensure that -they have UNIX style LF line endings: -- unattended_pivpn.conf +Apart of editing the existing files, you can also create the following for further automation: - Automation_Custom_PreScript.sh - Automation_Custom_Script.sh +- unattended_pivpn.conf + +For details, please check our documentation and dietpi.txt itself: +https://dietpi.com/docs/usage/#how-to-do-an-automatic-base-installation-at-first-boot-dietpi-automation _EOF_ G_EXEC umount "$root_mountpoint" "$fat_mountpoint" G_EXEC rmdir "$root_mountpoint" "$fat_mountpoint" diff --git a/rootfs/var/lib/dietpi/services/fs_partition_resize.sh b/rootfs/var/lib/dietpi/services/fs_partition_resize.sh index 5640c5142e..abc554bfca 100755 --- a/rootfs/var/lib/dietpi/services/fs_partition_resize.sh +++ b/rootfs/var/lib/dietpi/services/fs_partition_resize.sh @@ -2,6 +2,7 @@ { # Error out on command failures set -e + EXIT_CODE=0 Reboot_to_load_Partition_table() { @@ -41,6 +42,7 @@ echo "[ INFO ] Detected root drive $ROOT_DRIVE with root partition $ROOT_PART" # Check if the last partition contains a FAT filesystem with DIETPISETUP label + REBOOT=0 LAST_PART=$(lsblk -nrbo FSTYPE,LABEL "$ROOT_DRIVE" | tail -1) if [[ $LAST_PART == 'vfat DIETPISETUP' ]] then @@ -49,9 +51,20 @@ # Mount it and copy files if present and newer TMP_MOUNT=$(mktemp -d) mount -v "$SETUP_PART" "$TMP_MOUNT" - for f in 'dietpi.txt' 'dietpi-wifi.txt' 'dietpiEnv.txt' 'unattended_pivpn.conf' 'Automation_Custom_PreScript.sh' 'Automation_Custom_Script.sh' + for f in 'dietpi.txt' 'dietpi-wifi.txt' 'dietpiEnv.txt' 'boot.ini' 'extlinux.conf' 'Automation_Custom_PreScript.sh' 'Automation_Custom_Script.sh' 'unattended_pivpn.conf' do - [[ -f $TMP_MOUNT/$f ]] && cp -uv "$TMP_MOUNT/$f" /boot/ + [[ -f $TMP_MOUNT/$f ]] || continue + if [[ $f == 'extlinux.conf' ]] + then + mkdir -pv /boot/extlinux + [[ -f '/boot/extlinux/extlinux.conf' ]] && mtime=$(date -r '/boot/extlinux/extlinux.conf' '+%s') || mtime=0 + cp -uv "$TMP_MOUNT/$f" /boot/extlinux/ + (( $(date -r '/boot/extlinux/extlinux.conf' '+%s') > $mtime )) && REBOOT=1 + else + [[ ( $f == 'dietpiEnv.txt' || $f == 'boot.ini' ) && -f /boot/$f ]] && mtime=$(date -r "/boot/$f" '+%s') || mtime=0 + cp -uv "$TMP_MOUNT/$f" /boot/ + [[ $f == 'dietpiEnv.txt' || $f == 'boot.ini' ]] && (( $(date -r "/boot/$f" '+%s') '+%s') > $mtime )) && REBOOT=1 + fi done umount -v "$SETUP_PART" rmdir -v "$TMP_MOUNT" @@ -65,7 +78,7 @@ # Mount it and copy files if present and newer TMP_MOUNT=$(mktemp -d) mount -v "$BOOT_PART" "$TMP_MOUNT" - for f in 'dietpi.txt' 'dietpi-wifi.txt' 'dietpiEnv.txt' 'unattended_pivpn.conf' 'Automation_Custom_PreScript.sh' 'Automation_Custom_Script.sh' + for f in 'dietpi.txt' 'dietpi-wifi.txt' 'Automation_Custom_PreScript.sh' 'Automation_Custom_Script.sh' 'unattended_pivpn.conf' do [[ -f $TMP_MOUNT/$f ]] && cp -uv "$TMP_MOUNT/$f" /boot/ done @@ -113,9 +126,12 @@ 'btrfs') btrfs filesystem resize max /;; *) echo "[FAILED] Unsupported root filesystem type ($ROOT_FSTYPE). Aborting..." - exit 1 + EXIT_CODE=1 ;; esac - exit 0 + # Reboot if needed + (( $REBOOT )) && reboot + + exit "$EXIT_CODE" } From e5e8e60c9b32df85b32bb7a88e054d3f05348b5c Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 12 May 2024 16:44:24 +0200 Subject: [PATCH 195/458] v9.4 - DietPi-FS_partition_resize | Typo --- rootfs/var/lib/dietpi/services/fs_partition_resize.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootfs/var/lib/dietpi/services/fs_partition_resize.sh b/rootfs/var/lib/dietpi/services/fs_partition_resize.sh index abc554bfca..f99f7d913f 100755 --- a/rootfs/var/lib/dietpi/services/fs_partition_resize.sh +++ b/rootfs/var/lib/dietpi/services/fs_partition_resize.sh @@ -63,7 +63,7 @@ else [[ ( $f == 'dietpiEnv.txt' || $f == 'boot.ini' ) && -f /boot/$f ]] && mtime=$(date -r "/boot/$f" '+%s') || mtime=0 cp -uv "$TMP_MOUNT/$f" /boot/ - [[ $f == 'dietpiEnv.txt' || $f == 'boot.ini' ]] && (( $(date -r "/boot/$f" '+%s') '+%s') > $mtime )) && REBOOT=1 + [[ $f == 'dietpiEnv.txt' || $f == 'boot.ini' ]] && (( $(date -r "/boot/$f" '+%s') > $mtime )) && REBOOT=1 fi done umount -v "$SETUP_PART" From 61a24e354b09c1aaeb527432ade96a91a4faf476 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 12 May 2024 21:46:59 +0200 Subject: [PATCH 196/458] v9.4 - Orange Pi 5 Plus | Resolved an issue where the Ethernet interface names eth0/eth1 could swap on (re)boot. We add a udev rule which assures they are named persistently based on the PCI bus identifier. In case you created own udev rules to mitigate the issue, please check whether they conflict and decide whether to use ours or your solution. The DietPi update will also inform you about this change with a prompt. Many thanks to @dirkhh and many others for reporting this issue: https://github.com/MichaIng/DietPi/issues/6592 --- .build/images/dietpi-installer | 9 +++++++++ .update/patches | 13 +++++++++++++ CHANGELOG.txt | 1 + 3 files changed, 23 insertions(+) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 4eb8b9588a..440f046afd 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -2171,6 +2171,15 @@ _EOF_ SUBSYSTEM=="leds", KERNEL=="wan_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth0", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev eth0", RUN+="/bin/ip l s down dev eth0" SUBSYSTEM=="leds", KERNEL=="lan1_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth1", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev eth1", RUN+="/bin/ip l s down dev eth1" SUBSYSTEM=="leds", KERNEL=="user_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="wlan0", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev wlan0", RUN+="/bin/ip l s down dev wlan0" +_EOF_ + # Orange Pi 5 Plus + elif (( $G_HW_MODEL == 82 )) + then + G_DIETPI-NOTIFY 2 'Assuring persistent classic Ethernet interface names: /etc/udev/rules.d/99-dietpi-orangepi5plus.rules' + cat << '_EOF_' > /etc/udev/rules.d/99-dietpi-orangepi5plus.rules +SUBSYSTEM=="net", KERNEL=="eth0", KERNELS=="0004:41:00.0", RUN:="/bin/true" +SUBSYSTEM=="net", KERNEL=="eth1", KERNELS=="0003:31:00.0", NAME="to_eth0", RUN:="/bin/true" +SUBSYSTEM=="net", KERNEL=="to_eth0", RUN="/bin/ip l s dev eth0 name eth1", RUN+="/bin/ip l s dev to_eth0 name eth0", RUN+="/bin/udevadm trigger -c add /sys/class/net/eth0 /sys/class/net/eth1" _EOF_ # Orange Pi 3B/Zero 3/Zero 2W: Module does not load automatically, but we want it loaded on first boot in case firstrun setup is done via WiFi elif [[ $G_HW_MODEL =~ ^(83|87|88)$ ]] diff --git a/.update/patches b/.update/patches index 2fa977e1d3..b3ddc055e3 100755 --- a/.update/patches +++ b/.update/patches @@ -1582,6 +1582,19 @@ Patch_9_4() [[ -f '/etc/modprobe.d/odroid-cloudshell.conf' ]] && G_EXEC rm /etc/modprobe.d/odroid-cloudshell.conf G_EXEC sed --follow-symlinks -Ei '/^[[:blank:]]*(gpioplug-ir-recv|fbtft_device)[[:blank:]]*$/d' /etc/modules + # Orange Pi 5 Plus + elif (( $G_HW_MODEL == 82 )) + then + G_DIETPI-NOTIFY 2 'Assuring persistent classic Ethernet interface names: /etc/udev/rules.d/99-dietpi-orangepi5plus.rules' + G_WHIP_MSG '[ WARN ] Persistent eth0/eth1 interface names will be applied +\nSince classic interface names are randomly applied among the two onboard Ethernet adapters, we install a udev rule, which assures they remain the same on each (re)boot: +- /etc/udev/rules.d/99-dietpi-orangepi5plus.rules +\nIf you applied an own workaround via /etc/network/interfaces or similar, this will not be affected. But if you created own udev rules to mitigate the issue, please check whether those conflict with ours. Of course you can remove or rename above file to maintain status quo.' + cat << '_EOF_' > /etc/udev/rules.d/99-dietpi-orangepi5plus.rules +SUBSYSTEM=="net", KERNEL=="eth0", KERNELS=="0004:41:00.0", RUN:="/bin/true" +SUBSYSTEM=="net", KERNEL=="eth1", KERNELS=="0003:31:00.0", NAME="to_eth0", RUN:="/bin/true" +SUBSYSTEM=="net", KERNEL=="to_eth0", RUN="/bin/ip l s dev eth0 name eth1", RUN+="/bin/ip l s dev to_eth0 name eth0", RUN+="/bin/udevadm trigger -c add /sys/class/net/eth0 /sys/class/net/eth1" +_EOF_ # Orange Pi Zero 3 1.5 GiB RAM: Fix lost Ethernet adapter on reboot: https://github.com/MichaIng/DietPi/issues/6938 elif (( $G_HW_MODEL == 83 )) && dpkg-query -s 'linux-u-boot-orangepizero3-next' &> /dev/null then diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 3d0024d5e9..7f28936e8c 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,7 @@ Enhancements: Bug fixes: - NanoPi NEO3 | Resolved an issue where the Ethernet adapter was not available after reboots. Many thanks to @murraythegoz for reporting this issue: https://github.com/MichaIng/DietPi/issues/6987 - Orange Pi Zero 3 | Resolved an issue on the 1.5 GiB RAM variant, where the Ethernet adapter was not available anymore after soft/warm reboots. +- Orange Pi 5 Plus | Resolved an issue where the Ethernet interface names eth0/eth1 could swap on (re)boot. We add a udev rule which assures they are named persistently based on the PCI bus identifier. In case you created own udev rules to mitigate the issue, please check whether they conflict and decide whether to use ours or your solution. The DietPi update will also inform you about this change with a prompt. Many thanks to @dirkhh and many others for reporting this issue: https://github.com/MichaIng/DietPi/issues/6592 - DietPi-VPN | Resolved an issue where installing the IPVanish config failed, due to a changed URL, and startup failed on Bookworm systems since their configs contain a deprecated option. Many thanks to @DreamPhreak and @Michael-Robson for reporting this issue: https://github.com/MichaIng/DietPi/issues/7043 - DietPi-Imager | Resolved an issue where the imager could have failed on GPT partitioned images, if either the source image size did not leave space for the GPT backup partition table, or the first usable LBA/sector was above 34. The GPT backup partition table is now created only at the end of the image generation, not anymore additionally at the start, and the required size it takes is correctly obtained. Many thanks to @SelfhostedPro and @disablewong for reporting this issue: https://github.com/MichaIng/DietPi/issues/7024, https://dietpi.com/forum/t/18035 - DietPi-Config | Resolved a visual-only failure message on non-RPi systems, when enabling Bluetooth, and an actual failure doing so on Orange Pi Zero 3, Orange Pi 3B and Orange Pi Zero 2W, since the required kernel module "sprdbt_tty" was not loaded. Many thanks to @b9AcE for reporting this issue: https://dietpi.com/forum/t/19929/45 From ede03b1a04cc912b702ef8688fa4d955d715b074 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 12 May 2024 21:51:23 +0200 Subject: [PATCH 197/458] v9.4 - CHANGELOG | Update release date --- CHANGELOG.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 7f28936e8c..e6e8a1cdfc 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,5 @@ v9.4 -(2024-05-11) +(2024-05-12) New images: - ROCK 4C Plus | Since our Radxa ROCK 4 image has become incompatible with the ROCK 4C Plus, we provide a new image for this particular variant. Many thanks to @lfiorini and @arpegius5555 for reporting this issue: https://github.com/MichaIng/DietPi/issues/6593, https://github.com/MichaIng/DietPi/issues/6935 From 92fc5e17a340fcd850b654250720dad1751feb10 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 12 May 2024 22:00:40 +0200 Subject: [PATCH 198/458] v9.4 - DietPi-Software | Update fallback URLs --- dietpi/dietpi-software | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 47060c7dae..7a315c4a76 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -9512,7 +9512,7 @@ _EOF_ esac url=$(curl -sSfL 'https://api.github.com/repos/Radarr/Radarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}") - local fallback_url="https://github.com/Radarr/Radarr/releases/download/v5.4.6.8723/Radarr.master.5.4.6.8723.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Radarr/Radarr/releases/download/v5.5.3.8819/Radarr.master.5.5.3.8819.linux-core-$arch.tar.gz" fi Download_Install "$url" @@ -9955,7 +9955,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.16.2.4435/Prowlarr.master.1.16.2.4435.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.17.2.4511/Prowlarr.master.1.17.2.4511.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Prowlarr/Prowlarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}")" G_EXEC mv Prowlarr /opt/prowlarr fi From 522409fe7ad6cfd596042abb0c5e82e766730dd0 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 12 May 2024 22:43:56 +0200 Subject: [PATCH 199/458] v9.4 - DietPi-Imager | Strangely, touch -t '197001010000' on the FAT filesystem leads to a 1980 timestamp, while only 197001010001 on the ext4 197001010001 gave the intended 1970 timestamp, sadly just older, so all configs were copied, even when not edited. I wasn't able to replicate locally when running these commands on a FAT filesytem file, but let's try with a more recent year, and a positive second in both cases. --- .build/images/dietpi-imager | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.build/images/dietpi-imager b/.build/images/dietpi-imager index c830d408a5..f4a4aaff46 100755 --- a/.build/images/dietpi-imager +++ b/.build/images/dietpi-imager @@ -565,8 +565,8 @@ do [[ -f $root_mountpoint/boot/$f ]] || continue G_EXEC cp "$root_mountpoint/boot/$f" "$fat_mountpoint/" - TZ=UTC G_EXEC touch -t '197001010000' "$fat_mountpoint/${f#extlinux/}" - TZ=UTC G_EXEC touch -t '197001010001' "$root_mountpoint/boot/$f" + TZ=UTC G_EXEC touch -t '202101010001' "$fat_mountpoint/${f#extlinux/}" + TZ=UTC G_EXEC touch -t '202101010002' "$root_mountpoint/boot/$f" done cat << '_EOF_' > "$fat_mountpoint/README.txt" DietPi config partition From bfd271b25e7e82cec000b4263e6d0fa0a0f77b9d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 13 May 2024 14:24:40 +0200 Subject: [PATCH 200/458] v9.5 - DietPi-Build | Raise initial rootfs size for some SBCs --- .build/images/dietpi-build | 22 +++++++++++----------- dietpi/dietpi-software | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index c13fbf7041..862621668e 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -95,26 +95,26 @@ case $HW_MODEL in 45) iname='PINEH64' HW_ARCH=3 partition_start=4 root_size=1020;; 46) iname='PinebookPro' HW_ARCH=3 partition_start=16 root_size=1008;; 47) iname='NanoPiR4S' HW_ARCH=3 partition_start=16 root_size=1008;; - 48) iname='NanoPiR1' HW_ARCH=2 partition_start=4 root_size=764;; + 48) iname='NanoPiR1' HW_ARCH=2 partition_start=4 root_size=800;; '49.1') iname='Quartz64A' HW_ARCH=3 partition_start=16 root_size=752;; '49.2') iname='Quartz64B' HW_ARCH=3 partition_start=16 root_size=752;; '49.3') iname='SOQuartz' HW_ARCH=3 partition_start=16 root_size=752;; 52) iname='ASUSTB' HW_ARCH=2 partition_start=4 root_size=764;; 54) iname='NanoPiK2' HW_ARCH=3 partition_start=4 root_size=1148;; 55) iname='NanoPiR2S' HW_ARCH=3 partition_start=16 root_size=1008;; - 56) iname='NanoPiNEO3' HW_ARCH=3 partition_start=16 root_size=1008;; - 57) iname='NanoPiNEOPlus2' HW_ARCH=3 partition_start=4 root_size=892;; + 56) iname='NanoPiNEO3' HW_ARCH=3 partition_start=16 root_size=1100;; + 57) iname='NanoPiNEOPlus2' HW_ARCH=3 partition_start=4 root_size=1000;; 58) iname='NanoPiM4V2' HW_ARCH=3 partition_start=16 root_size=1008;; - 59) iname='ZeroPi' HW_ARCH=2 partition_start=4 root_size=764;; - 60) iname='NanoPiNEO' HW_ARCH=2 partition_start=4 root_size=764;; + 59) iname='ZeroPi' HW_ARCH=2 partition_start=4 root_size=800;; + 60) iname='NanoPiNEO' HW_ARCH=2 partition_start=4 root_size=800;; 61) iname='NanoPiM2' HW_ARCH=2 partition_start=4 boot_size=64 root_size=700 boot_fstype='ext4';; - '62.1') iname='NanoPiM3' HW_ARCH=3 partition_start=4 root_size=700;; - '62.2') iname='NanoPiFire3' HW_ARCH=3 partition_start=4 root_size=700;; - 63) iname='NanoPiM1' HW_ARCH=2 partition_start=4 root_size=764;; - 64) iname='NanoPiNEOAir' HW_ARCH=2 partition_start=4 root_size=764;; + '62.1') iname='NanoPiM3' HW_ARCH=3 partition_start=4 root_size=800;; + '62.2') iname='NanoPiFire3' HW_ARCH=3 partition_start=4 root_size=800;; + 63) iname='NanoPiM1' HW_ARCH=2 partition_start=4 root_size=800;; + 64) iname='NanoPiNEOAir' HW_ARCH=2 partition_start=4 root_size=800;; '65.1') iname='NanoPiNEO2' HW_ARCH=3 partition_start=4 root_size=1020;; '65.2') iname='NanoPiNEO2Black' HW_ARCH=3 partition_start=4 root_size=1020;; - 66) iname='NanoPiM1Plus' HW_ARCH=2 partition_start=4 root_size=764;; + 66) iname='NanoPiM1Plus' HW_ARCH=2 partition_start=4 root_size=800;; 67) iname='NanoPiK1Plus' HW_ARCH=3 partition_start=4 root_size=1020;; '68.1') iname='NanoPiM4' HW_ARCH=3 partition_start=16 root_size=1008;; '68.2') iname='NanoPCT4' HW_ARCH=3 partition_start=16 root_size=1008;; @@ -142,7 +142,7 @@ case $HW_MODEL in 86) iname='ASUSTB2' HW_ARCH=3 partition_start=16 root_size=1008;; 87) iname='OrangePi3B' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; 88) iname='OrangePiZero2W' HW_ARCH=3 partition_start=4 root_size=1148;; - 89) iname='OrangePi3LTS' HW_ARCH=3 partition_start=4 root_size=892;; + 89) iname='OrangePi3LTS' HW_ARCH=3 partition_start=4 root_size=1000;; 90) iname='RadxaZERO3' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; *) G_DIETPI-NOTIFY 1 "Invalid hardware model \"$HW_MODEL\" passed, aborting..."; exit 1;; esac diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 7a315c4a76..616fe60c3b 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6209,7 +6209,7 @@ _EOF_ *) local arch='amd64';; esac - local fallback_url="https://github.com/navidrome/navidrome/releases/download/v0.52.0/navidrome_0.52.0_linux_$arch.tar.gz" + local fallback_url="https://github.com/navidrome/navidrome/releases/download/v0.52.5/navidrome_0.52.5_linux_$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/navidrome/navidrome/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/navidrome_[0-9.]*_linux_$arch\.tar\.gz\"$/{print \$4}")" /opt/navidrome # Data dir From 1eb7e2eff217a009b5c7420fe09973fa64c09b9e Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 13 May 2024 15:52:02 +0200 Subject: [PATCH 201/458] v9.5 - CI | Armbian: Remove vendor-boogie-panthor branch, removed upstream, while the Panthor driver can be enabled via device tree overlay and loading a kernel module --- .github/workflows/armbian.yml | 2 +- dietpi/dietpi-software | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index ab86ec4f0c..318ac9ddec 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -11,7 +11,7 @@ on: branch: description: 'Branch' type: choice - options: [legacy, current, edge, vendor, vendor-boogie-panthor, collabora] + options: [legacy, current, edge, vendor, collabora] default: current required: true board: diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 616fe60c3b..8c91fcae98 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -10030,7 +10030,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.25.2515/Readarr.develop.0.3.25.2515.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.27.2538/Readarr.develop.0.3.27.2538.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Readarr/Readarr/releases' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}" | head -1)" G_EXEC mv Readarr /opt/readarr fi From c806e94af0f0b18ce116137433066b76d27de62c Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 13 May 2024 18:06:48 +0200 Subject: [PATCH 202/458] v9.4 - CI | Armbian: Fix U-Boot package name when checking current version suffix --- .github/workflows/armbian.yml | 2 +- dietpi/dietpi-software | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index 318ac9ddec..40d6c81fc3 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -71,7 +71,7 @@ jobs: read -r version < VERSION case '${{ github.event.inputs.asset }}' in firmware) package='armbian-firmware';; - uboot) package='linux-uboot-${{ github.event.inputs.board }}-${{ github.event.inputs.board }}';; + uboot) package='linux-uboot-${{ github.event.inputs.board }}-${{ github.event.inputs.branch }}';; kernel) family=$(. 'config/boards/${{ github.event.inputs.board }}.'* &> /dev/null; echo "$BOARDFAMILY") echo "Board family is: $family" diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 8c91fcae98..3ed7abb5da 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -9609,7 +9609,7 @@ _EOF_ esac url=$(curl -sSfL 'https://api.github.com/repos/Lidarr/Lidarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}") - local fallback_url="https://github.com/Lidarr/Lidarr/releases/download/v2.2.5.4141/Lidarr.master.2.2.5.4141.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Lidarr/Lidarr/releases/download/v2.3.3.4204/Lidarr.master.2.3.3.4204.linux-core-$arch.tar.gz" fi Download_Install "$url" From da7af8e0271792b2e2cf51b0e56fc0107c6ee3e0 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 13 May 2024 19:58:37 +0200 Subject: [PATCH 203/458] v9.5 - DietPi-Config | Resolved an issue where Advanced Options were not accessible on some SBCs. Many thanks to @thuehlinger for reporting this issue: https://github.com/MichaIng/DietPi/issues/6663#issuecomment-2108351878 --- CHANGELOG.txt | 10 ++++++++++ dietpi/dietpi-config | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index e6e8a1cdfc..fc5f8740c1 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,13 @@ +v9.5 +(2024-06-08) + +Bug fixes: +- DietPi-Config | Resolved an issue where Advanced Options were not accessible on some SBCs. Many thanks to @thuehlinger for reporting this issue: https://github.com/MichaIng/DietPi/issues/6663#issuecomment-2108351878 + +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 + +----------------------------------------------------------------------------------------------------------- + v9.4 (2024-05-12) diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index f97fc96d59..a050f0f399 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -1077,7 +1077,7 @@ Re-enabling HDMI requires a reboot. If you need emergency HDMI output, edit the { [[ -e '/dev/mtd0' ]] && grep -q '/dev/mtd0' /usr/lib/u-boot/platform_install.sh && spidev='/dev/mtd0'; } || { [[ -b '/dev/mtdblock0' ]] && grep -q 'rksd_loader.img' /usr/lib/u-boot/platform_install.sh; } } - } && G_WHIP_MENU_ARRAY+=("Update SPI bootloader' ': Flash current U-Boot to $spidev") + } && G_WHIP_MENU_ARRAY+=('Update SPI bootloader' ": Flash current U-Boot to $spidev") # VisionFive 2/Star64: https://doc-en.rvspace.org/VisionFive2/PDF/VisionFive2_QSG.pdf elif (( $G_HW_MODEL == 81 || $G_HW_MODEL == 84 )) From b13c6731a1d01bb3d9179f26da1cd02dea1a9b28 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 13 May 2024 20:27:01 +0200 Subject: [PATCH 204/458] Live patch 0 v9.4 (#7070) - Live patch 0 | Fix dietpi-config Advanced Options for some SBCs --- .update/version | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.update/version b/.update/version index 9e903dac26..d2d5b4feea 100644 --- a/.update/version +++ b/.update/version @@ -14,6 +14,7 @@ G_MIN_DEBIAN=6 # Alternative Git branch to automatically migrate to when Debian version is too low G_OLD_DEBIAN_BRANCH='8' # Live patches -G_LIVE_PATCH_DESC=() -G_LIVE_PATCH_COND=() -G_LIVE_PATCH=() +G_LIVE_PATCH_DESC=('Fix dietpi-config Advanced Options for some SBCs') +# shellcheck disable=SC2016 +G_LIVE_PATCH_COND=('[[ $G_HW_MODEL =~ ^(78|80|82|87)$ ]]') +G_LIVE_PATCH=("sed -i 's/\"Update SPI bootloader'\'' '\''/'\''Update SPI bootloader'\'' \"/' /boot/dietpi/dietpi-config") From 412b4d721b9e8e5c7dd4fe7a427864c29f624475 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 13 May 2024 20:28:31 +0200 Subject: [PATCH 205/458] v9.5 - META | Remove live patches merged from master --- .update/version | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.update/version b/.update/version index d2d5b4feea..9e903dac26 100644 --- a/.update/version +++ b/.update/version @@ -14,7 +14,6 @@ G_MIN_DEBIAN=6 # Alternative Git branch to automatically migrate to when Debian version is too low G_OLD_DEBIAN_BRANCH='8' # Live patches -G_LIVE_PATCH_DESC=('Fix dietpi-config Advanced Options for some SBCs') -# shellcheck disable=SC2016 -G_LIVE_PATCH_COND=('[[ $G_HW_MODEL =~ ^(78|80|82|87)$ ]]') -G_LIVE_PATCH=("sed -i 's/\"Update SPI bootloader'\'' '\''/'\''Update SPI bootloader'\'' \"/' /boot/dietpi/dietpi-config") +G_LIVE_PATCH_DESC=() +G_LIVE_PATCH_COND=() +G_LIVE_PATCH=() From 6a57c8a5efae8a8da99ae57875c623265c58293d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 14 May 2024 02:27:35 +0200 Subject: [PATCH 206/458] v9.5 - DietPi-Software | MPD: Update flag on Bookworm and above: https://github.com/MusicPlayerDaemon/MPD/commit/ce77b14 --- .update/patches | 6 ++++++ dietpi/dietpi-software | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.update/patches b/.update/patches index b3ddc055e3..8141d49e2f 100755 --- a/.update/patches +++ b/.update/patches @@ -1629,6 +1629,12 @@ _EOF_ fi } +Patch_9_5() +{ + # Update MPD flag on Bookworm and above: https://github.com/MusicPlayerDaemon/MPD/commit/ce77b14 + (( $G_DISTRO > 6 )) && [[ -f '/etc/systemd/system/mpd.service.d/dietpi.conf' ]] && G_EXEC sed -i 's/no-daemon/systemd/' /etc/systemd/system/mpd.service.d/dietpi.conf +} + # 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 3ed7abb5da..eab06b1e28 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -4027,8 +4027,9 @@ User=mpd RuntimeDirectory=mpd EnvironmentFile= ExecStart= -ExecStart=/usr/bin/mpd --no-daemon +ExecStart=/usr/bin/mpd --systemd _EOF_ + (( $G_DISTRO < 7 )) && G_EXEC sed -i 's/systemd/no-daemon/' /etc/systemd/system/mpd.service.d/dietpi.conf Remove_SysV mpd 1 # Config From 2b34d7795d2a95e20e9f203295532bbd5e571e2d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 14 May 2024 18:28:13 +0200 Subject: [PATCH 207/458] v9.5 - DietPi-Software | Snapcast Server: Resolved on issue where on RISC-V systems, the web interface was not available, since it is not included in the "snapserver" package from Debian. Many thanks to @hllhll for reporting this issue: https://github.com/MichaIng/DietPi/issues/7073 --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index fc5f8740c1..d19d37cedf 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,6 +3,7 @@ v9.5 Bug fixes: - DietPi-Config | Resolved an issue where Advanced Options were not accessible on some SBCs. Many thanks to @thuehlinger for reporting this issue: https://github.com/MichaIng/DietPi/issues/6663#issuecomment-2108351878 +- DietPi-Software | Snapcast Server: Resolved on issue where on RISC-V systems, the web interface was not available, since it is not included in the "snapserver" package from Debian. Many thanks to @hllhll for reporting this issue: https://github.com/MichaIng/DietPi/issues/7073 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 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index eab06b1e28..9fae80dda8 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -11510,8 +11510,10 @@ _EOF_ then G_AGI snapserver - # Enable web UI to align with upstream package - G_CONFIG_INJECT 'doc_root[[:blank:]=]' 'doc_root = /usr/share/snapserver/snapweb' /etc/snapserver.conf '\[http\]' + # Install and enable snapweb web UI, not included in Debian's snapserver package: https://github.com/MichaIng/DietPi/issues/7073 + local fallback_url='https://github.com/badaix/snapweb/releases/download/v0.7.0/snapweb_0.7.0-1_all.deb' + Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapweb/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/snapweb_[^"\/]*_all.deb"/{print $4}')" + G_CONFIG_INJECT 'doc_root[[:blank:]=]' 'doc_root = /usr/share/snapweb' /etc/snapserver.conf '\[http\]' else local arch=$(dpkg --print-architecture) dist=${G_DISTRO_NAME/trixie/bookworm} local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.28.0/snapcast_0.28.0_$arch-debian-$dist.zip" From 00912190e5cc673a3c1baa6435d86b36d15d0ce6 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 14 May 2024 19:13:34 +0200 Subject: [PATCH 208/458] v9.5 - DietPi-Software | Snapcast Server: Resolved an issue where on Bookworm systems, which installed the Snapcast Server before DietPi v9.4 and reinstalled it afterwards, the server failed to start due to a permissions issue, since the services of both packages use different users. Many thanks to @hllhll for reporting this issue: https://github.com/MichaIng/DietPi/issues/7073 --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index d19d37cedf..b045e5aba0 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,6 +4,7 @@ v9.5 Bug fixes: - DietPi-Config | Resolved an issue where Advanced Options were not accessible on some SBCs. Many thanks to @thuehlinger for reporting this issue: https://github.com/MichaIng/DietPi/issues/6663#issuecomment-2108351878 - DietPi-Software | Snapcast Server: Resolved on issue where on RISC-V systems, the web interface was not available, since it is not included in the "snapserver" package from Debian. Many thanks to @hllhll for reporting this issue: https://github.com/MichaIng/DietPi/issues/7073 +- DietPi-Software | Snapcast Server: Resolved an issue where on Bookworm systems, which installed the Snapcast Server before DietPi v9.4 and reinstalled it afterwards, the server failed to start due to a permissions issue, since the services of both packages use different users. Many thanks to @hllhll for reporting this issue: https://github.com/MichaIng/DietPi/issues/7073 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 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 9fae80dda8..38e34501ae 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -11514,12 +11514,20 @@ _EOF_ local fallback_url='https://github.com/badaix/snapweb/releases/download/v0.7.0/snapweb_0.7.0-1_all.deb' Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapweb/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/snapweb_[^"\/]*_all.deb"/{print $4}')" G_CONFIG_INJECT 'doc_root[[:blank:]=]' 'doc_root = /usr/share/snapweb' /etc/snapserver.conf '\[http\]' + + # Fix /var/lib/snapserver permissions, just in case badaix's package was previously used, which uses the "snapserver" user, instead of "_snapserver" + [[ -d '/var/lib/snapserver' ]] && G_EXEC chown -R '_snapserver:_snapserver' /var/lib/snapserver + getent passwd snapserver > /dev/null && G_EXEC userdel snapserver else local arch=$(dpkg --print-architecture) dist=${G_DISTRO_NAME/trixie/bookworm} local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.28.0/snapcast_0.28.0_$arch-debian-$dist.zip" Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapcast_[^\"\/]*_$arch-debian-$dist.zip\"/{print \$4}")" G_AGI ./snapserver_*_"$arch.deb" G_EXEC rm snap*.deb + + # Fix /var/lib/snapserver permissions, just in case Debian's package was previously used, which uses the "_snapserver" user, instead of "snapserver" + [[ -d '/var/lib/snapserver' ]] && G_EXEC chown -R 'snapserver:snapserver' /var/lib/snapserver + getent passwd _snapserver > /dev/null && G_EXEC userdel _snapserver fi G_EXEC systemctl stop snapserver @@ -14089,6 +14097,9 @@ _EOF_ if To_Uninstall 191 # Snapcast Server then G_AGP snapserver + # Remove users from Debian's and badaix's packages, to cleanly cover upgrades from one to the other. + getent passwd snapserver > /dev/null && G_EXEC userdel snapserver + getent passwd _snapserver > /dev/null && G_EXEC userdel _snapserver fi if To_Uninstall 192 # Snapcast Client From 34e76c4f9e95bb65554acf17aeea7cb0178bdc12 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 14 May 2024 19:27:38 +0200 Subject: [PATCH 209/458] v9.5 - DietPi-Software | Radarr: Update fallback URL --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 38e34501ae..536241238b 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -9513,7 +9513,7 @@ _EOF_ esac url=$(curl -sSfL 'https://api.github.com/repos/Radarr/Radarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}") - local fallback_url="https://github.com/Radarr/Radarr/releases/download/v5.5.3.8819/Radarr.master.5.5.3.8819.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Radarr/Radarr/releases/download/v5.6.0.8846/Radarr.master.5.6.0.8846.linux-core-$arch.tar.gz" fi Download_Install "$url" From 237fdda2a024381854b980dff84dd34b171a3086 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 14 May 2024 19:30:02 +0200 Subject: [PATCH 210/458] v9.5 - CI | Switch all workflows to Ubuntu Noble: https://github.com/actions/runner-images/issues/9848 --- .github/workflows/amiberry.yml | 4 ++-- .github/workflows/armbian.yml | 2 +- .github/workflows/dietpi-build.yml | 4 ++-- .github/workflows/dietpi-software-build.yml | 4 ++-- .github/workflows/dietpi-software.yml | 4 ++-- .github/workflows/quartz64.yml | 2 +- .github/workflows/raspberrypi-sys-mods.yml | 2 +- .github/workflows/shellcheck.yml | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/amiberry.yml b/.github/workflows/amiberry.yml index f23af7750c..e4439bc863 100644 --- a/.github/workflows/amiberry.yml +++ b/.github/workflows/amiberry.yml @@ -25,7 +25,7 @@ jobs: plat: ${{ steps.plat.outputs.plat }} dist: ${{ steps.dist.outputs.dist }} # https://github.com/actions/runner-images - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - id: plat run: | @@ -54,7 +54,7 @@ jobs: - { plat: riscv64, dist: bookworm } fail-fast: false name: "${{ matrix.plat }} - ${{ matrix.dist }}" - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Build run: sudo bash -c "G_GITOWNER=$GITHUB_REPOSITORY_OWNER G_GITBRANCH=$GITHUB_REF_NAME; $(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/$GITHUB_REF_NAME/.build/software/Amiberry/container_build.bash")" -- -p '${{ matrix.plat }}' -d '${{ matrix.dist }}' diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index 40d6c81fc3..f2cf580a17 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -32,7 +32,7 @@ permissions: {} jobs: build: name: "${{ github.event.inputs.asset }} - ${{ github.event.inputs.branch }} - ${{ github.event.inputs.board }}" - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Clone Armbian repo run: | diff --git a/.github/workflows/dietpi-build.yml b/.github/workflows/dietpi-build.yml index 273bc1a334..a7db44fb96 100644 --- a/.github/workflows/dietpi-build.yml +++ b/.github/workflows/dietpi-build.yml @@ -14,7 +14,7 @@ jobs: outputs: buildargs: ${{ steps.buildargs.outputs.buildargs }} # https://github.com/actions/runner-images - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - id: buildargs run: | @@ -116,7 +116,7 @@ jobs: buildargs: ${{ fromJson(needs.prep.outputs.buildargs) }} fail-fast: false name: "Build: ${{ matrix.buildargs }}" - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Generate upload script run: | diff --git a/.github/workflows/dietpi-software-build.yml b/.github/workflows/dietpi-software-build.yml index 0570711301..29c7468126 100644 --- a/.github/workflows/dietpi-software-build.yml +++ b/.github/workflows/dietpi-software-build.yml @@ -31,7 +31,7 @@ jobs: arch: ${{ steps.arch.outputs.arch }} dist: ${{ steps.dist.outputs.dist }} # https://github.com/actions/runner-images - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - id: name run: | @@ -72,7 +72,7 @@ jobs: - { arch: x86_64, name: gogs } fail-fast: false name: "${{ matrix.name }} - ${{ matrix.arch }} - ${{ matrix.dist }}" - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Build run: sudo bash -c "G_GITOWNER=$GITHUB_REPOSITORY_OWNER G_GITBRANCH=$GITHUB_REF_NAME; $(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/$GITHUB_REF_NAME/.build/software/dietpi-software-build.bash")" -- -n '${{ matrix.name }}' -a '${{ matrix.arch }}' -d '${{ matrix.dist }}' diff --git a/.github/workflows/dietpi-software.yml b/.github/workflows/dietpi-software.yml index d1419f9ea4..708964fb51 100644 --- a/.github/workflows/dietpi-software.yml +++ b/.github/workflows/dietpi-software.yml @@ -36,7 +36,7 @@ permissions: {} jobs: prep: # https://github.com/actions/runner-images - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - id: arch run: | @@ -68,7 +68,7 @@ jobs: - { arch: riscv64, dist: bookworm } fail-fast: false name: "${{ matrix.arch }} - ${{ matrix.dist }} - ${{ github.event.inputs.soft }}" - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Install run: | diff --git a/.github/workflows/quartz64.yml b/.github/workflows/quartz64.yml index a176196e67..6d79b59235 100644 --- a/.github/workflows/quartz64.yml +++ b/.github/workflows/quartz64.yml @@ -7,7 +7,7 @@ permissions: {} jobs: build: # https://github.com/actions/runner-images - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 env: uboot_version: '2023.10' CROSS_COMPILE: 'aarch64-linux-gnu-' diff --git a/.github/workflows/raspberrypi-sys-mods.yml b/.github/workflows/raspberrypi-sys-mods.yml index 675e3af75e..67bfcdc9c7 100644 --- a/.github/workflows/raspberrypi-sys-mods.yml +++ b/.github/workflows/raspberrypi-sys-mods.yml @@ -7,7 +7,7 @@ permissions: {} jobs: build: # https://github.com/actions/runner-images - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Build run: sudo bash -c "$(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/$GITHUB_REF_NAME/.build/software/raspberrypi-sys-mods/build.bash")" diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index 6ac2dba1c6..aed94c650c 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -9,7 +9,7 @@ jobs: shellcheck: if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login != github.event.pull_request.base.repo.owner.login # https://github.com/actions/runner-images - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - name: Setup DietPi-Globals From e4c2818ff6d46097b78008f53a2927e6910a1c21 Mon Sep 17 00:00:00 2001 From: StephanStS Date: Thu, 16 May 2024 19:54:59 +0200 Subject: [PATCH 211/458] Init v9.5 (#7075) --- .meta/dietpi-survey_report | 3 ++- .update/version | 4 ++-- dietpi/func/dietpi-globals | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index cb2c6a5599..01d059b89b 100755 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -717,10 +717,11 @@ shopt -s extglob aSOFTWARE_NAME9_2[i]=${aSOFTWARE_NAME9_1[i]} aSOFTWARE_NAME9_3[i]=${aSOFTWARE_NAME9_2[i]} aSOFTWARE_NAME9_4[i]=${aSOFTWARE_NAME9_3[i]} + aSOFTWARE_NAME9_5[i]=${aSOFTWARE_NAME9_4[i]} done # Pre-create software counter array so that we can see also software (available in newest version) with 0 installs - for i in "${aSOFTWARE_NAME9_4[@]}" + for i in "${aSOFTWARE_NAME9_5[@]}" do aSOFTWARE[$i]=0 done diff --git a/.update/version b/.update/version index 9e903dac26..35605ae2d5 100644 --- a/.update/version +++ b/.update/version @@ -2,8 +2,8 @@ # shellcheck disable=SC2034 # Available DietPi version G_REMOTE_VERSION_CORE=9 -G_REMOTE_VERSION_SUB=4 -G_REMOTE_VERSION_RC=2 +G_REMOTE_VERSION_SUB=5 +G_REMOTE_VERSION_RC=-1 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=7 G_MIN_VERSION_SUB=0 diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index d3bda29db1..29530bd360 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -54,8 +54,8 @@ [[ -f '/boot/dietpi/.version' ]] && . /boot/dietpi/.version # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=9 - [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=4 - [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=2 + [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=5 + [[ $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 From 46831b78825152eecc84079abe4b273e7f10be5b Mon Sep 17 00:00:00 2001 From: pulpe <45254364+pulpe@users.noreply.github.com> Date: Sat, 18 May 2024 22:01:49 +0200 Subject: [PATCH 212/458] v9.5 (#7082) - DietPi-Software | Shairport Sync: Resolved a DietPi v9.4 regression, where the AirPlay 2 choice did not have an effect, but the AirPlay 1 package was always installed. Additionally, uninstalling Shairport Sync will now also purge the AirPlay 2 package. Many thanks to @pulpe for fixing this bug: https://github.com/MichaIng/DietPi/pull/7082 --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index b045e5aba0..9b6a64a441 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,6 +5,7 @@ Bug fixes: - DietPi-Config | Resolved an issue where Advanced Options were not accessible on some SBCs. Many thanks to @thuehlinger for reporting this issue: https://github.com/MichaIng/DietPi/issues/6663#issuecomment-2108351878 - DietPi-Software | Snapcast Server: Resolved on issue where on RISC-V systems, the web interface was not available, since it is not included in the "snapserver" package from Debian. Many thanks to @hllhll for reporting this issue: https://github.com/MichaIng/DietPi/issues/7073 - DietPi-Software | Snapcast Server: Resolved an issue where on Bookworm systems, which installed the Snapcast Server before DietPi v9.4 and reinstalled it afterwards, the server failed to start due to a permissions issue, since the services of both packages use different users. Many thanks to @hllhll for reporting this issue: https://github.com/MichaIng/DietPi/issues/7073 +- DietPi-Software | Shairport Sync: Resolved a DietPi v9.4 regression, where the AirPlay 2 choice did not have an effect, but the AirPlay 1 package was always installed. Additionally, uninstalling Shairport Sync will now also purge the AirPlay 2 package. Many thanks to @pulpe for fixing this bug: https://github.com/MichaIng/DietPi/pull/7082 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 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 536241238b..9a0e00f2d2 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8038,7 +8038,7 @@ _EOF_ airplay2= fi - G_AGI shairport-sync + G_AGI "shairport-sync$airplay2" G_EXEC systemctl stop shairport-sync fi @@ -12824,7 +12824,7 @@ If no WireGuard (auto)start is included, but you require it, please do the follo if To_Uninstall 37 # Shairport Sync then - G_AGP shairport-sync + G_AGP shairport-sync shairport-sync-airplay2 fi if To_Uninstall 152 # Avahi-Daemon From a310c548e1941ef06f863518f80ddb593245f669 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 18 May 2024 22:02:27 +0200 Subject: [PATCH 213/458] v9.5 - DietPi-Software | NZBGet: Update fallback URL --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 9a0e00f2d2..dc5d9ec0fc 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -9876,7 +9876,7 @@ _EOF_ local reinstall=0 [[ -f '/mnt/dietpi_userdata/nzbget/nzbget.conf' ]] && reinstall=1 - local fallback_url='https://github.com/nzbgetcom/nzbget/releases/download/v24.0/nzbget-24.0-bin-linux.run' + local fallback_url='https://github.com/nzbgetcom/nzbget/releases/download/v24.1/nzbget-24.1-bin-linux.run' Download_Install "$(curl -sSfL 'https://api.github.com/repos/nzbgetcom/nzbget/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/nzbget-[^"/]*-bin-linux.run"$/{print $4}')" nzbget.run G_EXEC mkdir -p /mnt/dietpi_userdata/nzbget G_EXEC_OUTPUT=1 G_EXEC dash nzbget.run --destdir /mnt/dietpi_userdata/nzbget From 591087d3beaef9a9915c31623cc1d074e20caf92 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 19 May 2024 14:51:38 +0200 Subject: [PATCH 214/458] v9.5 - CI | Amiberry: Do ARMv8 Bullseye builds on Ubuntu Focal, since the QEMU version shipped with Noble runs into a segmentation fault, when configuring the libc-bin package, or just running its triggers. --- .github/workflows/amiberry.yml | 2 +- dietpi/dietpi-software | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/amiberry.yml b/.github/workflows/amiberry.yml index e4439bc863..e340482da7 100644 --- a/.github/workflows/amiberry.yml +++ b/.github/workflows/amiberry.yml @@ -54,7 +54,7 @@ jobs: - { plat: riscv64, dist: bookworm } fail-fast: false name: "${{ matrix.plat }} - ${{ matrix.dist }}" - runs-on: ubuntu-24.04 + runs-on: ${{ matrix.dist == 'bullseye' && ( endsWith(matrix.plat, '-64-sdl2') || matrix.plat == 'AMLSM1' || matrix.plat == 'n2' || matrix.plat == 'a64' || matrix.plat == 'rk3588' ) && 'ubuntu-22.04' || 'ubuntu-24.04' }} steps: - name: Build run: sudo bash -c "G_GITOWNER=$GITHUB_REPOSITORY_OWNER G_GITBRANCH=$GITHUB_REF_NAME; $(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/$GITHUB_REF_NAME/.build/software/Amiberry/container_build.bash")" -- -p '${{ matrix.plat }}' -d '${{ matrix.dist }}' diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index dc5d9ec0fc..b23c64cdff 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -11721,7 +11721,7 @@ _EOF_ *) local arch='amd64';; esac - local fallback_url="https://github.com/filebrowser/filebrowser/releases/download/v2.29.0/linux-$arch-filebrowser.tar.gz" + local fallback_url="https://github.com/filebrowser/filebrowser/releases/download/v2.30.0/linux-$arch-filebrowser.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/filebrowser/filebrowser/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/linux-$arch-filebrowser\.tar\.gz\"$/{print \$4}")" ./filebrowser/ # Reinstall From f0d79c5d85cc87412e801f8176eb7fc41a93e3b8 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 20 May 2024 21:46:14 +0200 Subject: [PATCH 215/458] v9.5 - CI | Amiberry: Prevent dist-upgrade from within build script for ARMv6/7 Trixie builds, as it fails due to 64-bit time_t transition causing dependency conflicts across the repo. --- .build/software/Amiberry/build.bash | 8 +++++++- .build/software/Amiberry/container_build.bash | 2 +- .github/workflows/dietpi-software.bash | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.build/software/Amiberry/build.bash b/.build/software/Amiberry/build.bash index 61379b0115..a0ea914359 100755 --- a/.build/software/Amiberry/build.bash +++ b/.build/software/Amiberry/build.bash @@ -18,7 +18,13 @@ adeps=('libdrm2' 'libgl1-mesa-dri' 'libgbm1' 'libegl1' 'libudev1' 'libxml2' 'lib (( $G_HW_ARCH == 10 )) && opengl_flags=('--disable-video-opengles2' '--enable-video-opengl') adeps_build+=('libgl1-mesa-dev') adeps+=('libgl1') || opengl_flags=('--enable-video-opengles2' '--disable-video-opengl') adeps_build+=('libgles2-mesa-dev') adeps+=('libgles2') G_AGUP -G_AGDUG "${adeps_build[@]}" +# ARMv6/7 Trixie: Temporarily prevent dist-upgrade, as it fails due to 64-bit time_t transition causing dependency conflicts across the repo. +if (( $G_HW_ARCH < 3 && $G_DISTRO == 8 )) +then + G_AGI "${adeps_build[@]}" +else + G_AGDUG "${adeps_build[@]}" +fi for i in "${adeps[@]}" do # Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394 diff --git a/.build/software/Amiberry/container_build.bash b/.build/software/Amiberry/container_build.bash index ef5063d4a9..358fca624a 100755 --- a/.build/software/Amiberry/container_build.bash +++ b/.build/software/Amiberry/container_build.bash @@ -137,7 +137,7 @@ Pin-Priority: -1 _EOF_ fi -# ARMv6/7 Trixie: Temporarily prevent dist-upgrade on Trixie, as it fails due to 64-bit time_t transition causing dependency conflicts across the repo. +# ARMv6/7 Trixie: Temporarily prevent dist-upgrade, as it fails due to 64-bit time_t transition causing dependency conflicts across the repo. (( $arch < 3 )) && [[ $DISTRO == 'trixie' ]] && G_EXEC touch rootfs/boot/dietpi/.skip_distro_upgrade # Automated build diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index 397e94220d..50465c80e5 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -368,7 +368,7 @@ G_EXEC eval 'echo -e '\''[Service]\nAmbientCapabilities='\'' > rootfs/etc/system # Workaround for sysctl: permission denied on key "net.core.rmem_max" in containers G_EXEC sed --follow-symlinks -i '/# Start DietPi-Software/a\sed -i '\''/G_EXEC sysctl -w net\.core\.rmem_max/d'\'' /boot/dietpi/dietpi-software' rootfs/boot/dietpi/dietpi-login -# ARMv6/7 Trixie: Temporarily prevent dist-upgrade on Trixie, as it fails due to 64-bit time_t transition causing dependency conflicts across the repo. +# ARMv6/7 Trixie: Temporarily prevent dist-upgrade, as it fails due to 64-bit time_t transition causing dependency conflicts across the repo. (( $arch < 3 )) && [[ $DISTRO == 'trixie' ]] && G_EXEC touch rootfs/boot/dietpi/.skip_distro_upgrade # Check for service status, ports and commands From 3ed3b5358053a43e2264a5796a19d30ae5342e8e Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 20 May 2024 22:15:43 +0200 Subject: [PATCH 216/458] v9.5 - CI | Amiberry: Instead of preening the dist-upgrade, purge kmod (libkmod2), to prevent time_t transition package ocnflicts. It is not needed in containers anyway. Hopefully no build tries to call lsmod of similar. --- .build/software/Amiberry/build.bash | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.build/software/Amiberry/build.bash b/.build/software/Amiberry/build.bash index a0ea914359..8d57c5729c 100755 --- a/.build/software/Amiberry/build.bash +++ b/.build/software/Amiberry/build.bash @@ -18,13 +18,9 @@ adeps=('libdrm2' 'libgl1-mesa-dri' 'libgbm1' 'libegl1' 'libudev1' 'libxml2' 'lib (( $G_HW_ARCH == 10 )) && opengl_flags=('--disable-video-opengles2' '--enable-video-opengl') adeps_build+=('libgl1-mesa-dev') adeps+=('libgl1') || opengl_flags=('--enable-video-opengles2' '--disable-video-opengl') adeps_build+=('libgles2-mesa-dev') adeps+=('libgles2') G_AGUP -# ARMv6/7 Trixie: Temporarily prevent dist-upgrade, as it fails due to 64-bit time_t transition causing dependency conflicts across the repo. -if (( $G_HW_ARCH < 3 && $G_DISTRO == 8 )) -then - G_AGI "${adeps_build[@]}" -else - G_AGDUG "${adeps_build[@]}" -fi +# ARMv6/7 Trixie: Temporarily purge kmod, since libkmod2 causes a dependency conflict due to 64-bit time_t transition. +(( $G_HW_ARCH < 3 && $G_DISTRO == 8 )) && G_AGP kmod +G_AGDUG "${adeps_build[@]}" for i in "${adeps[@]}" do # Temporarily allow lib*t64 packages, while the 64-bit time_t transition is ongoing on Sid: https://bugs.debian.org/1065394 From c6c30fc86bd52cedfdf6453f9306a2eb268e298e Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 21 May 2024 00:35:05 +0200 Subject: [PATCH 217/458] v9.5 - CI | Amiberry: kmod is (reasonably) not installed on our contianer images. Not sure what keeps libkmod2 around, let's find it out. --- .build/software/Amiberry/build.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.build/software/Amiberry/build.bash b/.build/software/Amiberry/build.bash index 8d57c5729c..9b4c39802a 100755 --- a/.build/software/Amiberry/build.bash +++ b/.build/software/Amiberry/build.bash @@ -18,8 +18,8 @@ adeps=('libdrm2' 'libgl1-mesa-dri' 'libgbm1' 'libegl1' 'libudev1' 'libxml2' 'lib (( $G_HW_ARCH == 10 )) && opengl_flags=('--disable-video-opengles2' '--enable-video-opengl') adeps_build+=('libgl1-mesa-dev') adeps+=('libgl1') || opengl_flags=('--enable-video-opengles2' '--disable-video-opengl') adeps_build+=('libgles2-mesa-dev') adeps+=('libgles2') G_AGUP -# ARMv6/7 Trixie: Temporarily purge kmod, since libkmod2 causes a dependency conflict due to 64-bit time_t transition. -(( $G_HW_ARCH < 3 && $G_DISTRO == 8 )) && G_AGP kmod +# ARMv6/7 Trixie: Temporarily purge libkmod2, since it causes a dependency conflict due to 64-bit time_t transition. +(( $G_HW_ARCH < 3 && $G_DISTRO == 8 )) && G_AGP libkmod2 G_AGDUG "${adeps_build[@]}" for i in "${adeps[@]}" do From ff1ae27fcad24c503c5ff7834d1208cc8686cab1 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 21 May 2024 01:06:44 +0200 Subject: [PATCH 218/458] v9.5 - CI | Remove ARMv6/7 Trixie time_t migration relateted workaround. We ship kmod+libkmod2 from Sid now from our repo, which depends on libssl3t64, solving this one major conflict which breaks nearly every system upgrade and most package installs --- .build/software/Amiberry/build.bash | 2 -- .build/software/Amiberry/container_build.bash | 3 --- .github/workflows/dietpi-software.bash | 3 --- 3 files changed, 8 deletions(-) diff --git a/.build/software/Amiberry/build.bash b/.build/software/Amiberry/build.bash index 9b4c39802a..61379b0115 100755 --- a/.build/software/Amiberry/build.bash +++ b/.build/software/Amiberry/build.bash @@ -18,8 +18,6 @@ adeps=('libdrm2' 'libgl1-mesa-dri' 'libgbm1' 'libegl1' 'libudev1' 'libxml2' 'lib (( $G_HW_ARCH == 10 )) && opengl_flags=('--disable-video-opengles2' '--enable-video-opengl') adeps_build+=('libgl1-mesa-dev') adeps+=('libgl1') || opengl_flags=('--enable-video-opengles2' '--disable-video-opengl') adeps_build+=('libgles2-mesa-dev') adeps+=('libgles2') G_AGUP -# ARMv6/7 Trixie: Temporarily purge libkmod2, since it causes a dependency conflict due to 64-bit time_t transition. -(( $G_HW_ARCH < 3 && $G_DISTRO == 8 )) && G_AGP libkmod2 G_AGDUG "${adeps_build[@]}" for i in "${adeps[@]}" do diff --git a/.build/software/Amiberry/container_build.bash b/.build/software/Amiberry/container_build.bash index 358fca624a..7b88ee0014 100755 --- a/.build/software/Amiberry/container_build.bash +++ b/.build/software/Amiberry/container_build.bash @@ -137,9 +137,6 @@ Pin-Priority: -1 _EOF_ fi -# ARMv6/7 Trixie: Temporarily prevent dist-upgrade, as it fails due to 64-bit time_t transition causing dependency conflicts across the repo. -(( $arch < 3 )) && [[ $DISTRO == 'trixie' ]] && G_EXEC touch rootfs/boot/dietpi/.skip_distro_upgrade - # Automated build cat << _EOF_ >> rootfs/boot/Automation_Custom_Script.sh || Error_Exit 'Failed to generate Automation_Custom_Script.sh' echo '[ INFO ] Running Amiberry build script ...' diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index 50465c80e5..d735537fa5 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -368,9 +368,6 @@ G_EXEC eval 'echo -e '\''[Service]\nAmbientCapabilities='\'' > rootfs/etc/system # Workaround for sysctl: permission denied on key "net.core.rmem_max" in containers G_EXEC sed --follow-symlinks -i '/# Start DietPi-Software/a\sed -i '\''/G_EXEC sysctl -w net\.core\.rmem_max/d'\'' /boot/dietpi/dietpi-software' rootfs/boot/dietpi/dietpi-login -# ARMv6/7 Trixie: Temporarily prevent dist-upgrade, as it fails due to 64-bit time_t transition causing dependency conflicts across the repo. -(( $arch < 3 )) && [[ $DISTRO == 'trixie' ]] && G_EXEC touch rootfs/boot/dietpi/.skip_distro_upgrade - # Check for service status, ports and commands # shellcheck disable=SC2016 # - Start all services From d27048cda0ae9ed5f15d50bd0f3e460c52ce722f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 21 May 2024 15:30:40 +0200 Subject: [PATCH 219/458] v9.5 - DietPi-Software | Remove some obsolete Buster case switches and update link for .NET core dependencies --- dietpi/dietpi-software | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index b23c64cdff..9c233654df 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -180,7 +180,6 @@ Available commands: # PHP version case $G_DISTRO in - 5) PHP_VERSION='7.3';; 6) PHP_VERSION='7.4';; *) PHP_VERSION='8.2';; esac @@ -4910,7 +4909,6 @@ The install script will now exit. After applying one of the the above, rerun die (( $G_RASPBIAN )) && distro='Raspbian_' case $G_DISTRO in - 5) distro+='10';; 6) distro+='11';; 7) distro+='12';; *) distro+='Testing';; @@ -6293,9 +6291,8 @@ _EOF_ if To_Install 212 kavita # Kavita then - # .NET dependency: https://github.com/dotnet/core/blob/main/Documentation/linux-prereqs.md + # .NET dependency: https://github.com/dotnet/docs/blob/main/docs/core/install/linux-debian.md#dependencies case $G_DISTRO in - 5) aDEPS=('libicu63');; 6) aDEPS=('libicu67');; *) aDEPS=('libicu72');; esac @@ -9482,11 +9479,10 @@ _EOF_ then # APT dependencies aDEPS=('mediainfo') - # - .NET: https://github.com/dotnet/core/blob/main/Documentation/linux-prereqs.md + # - .NET: https://github.com/dotnet/docs/blob/main/docs/core/install/linux-debian.md#dependencies if (( $G_HW_ARCH != 1 )) then case $G_DISTRO in - 5) aDEPS+=('libicu63');; 6) aDEPS+=('libicu67');; *) aDEPS+=('libicu72');; esac @@ -9576,11 +9572,10 @@ _EOF_ then # APT dependencies aDEPS=('mediainfo') - # - .NET: https://github.com/dotnet/core/blob/main/Documentation/linux-prereqs.md + # - .NET: https://github.com/dotnet/docs/blob/main/docs/core/install/linux-debian.md#dependencies if (( $G_HW_ARCH != 1 )) then case $G_DISTRO in - 5) aDEPS+=('libicu63');; 6) aDEPS+=('libicu67');; *) aDEPS+=('libicu72');; esac @@ -9798,11 +9793,10 @@ _EOF_ if To_Install 147 jackett # Jackett then # ARMv6 requires Mono: https://github.com/Jackett/Jackett#installation-on-linux-armv6-or-below - # .NET dependency: https://github.com/dotnet/core/blob/main/Documentation/linux-prereqs.md + # .NET dependency: https://github.com/dotnet/docs/blob/main/docs/core/install/linux-debian.md#dependencies if (( $G_HW_ARCH != 1 )) then case $G_DISTRO in - 5) aDEPS=('libicu63');; 6) aDEPS=('libicu67');; *) aDEPS=('libicu72');; esac @@ -9933,9 +9927,8 @@ _EOF_ if To_Install 151 prowlarr # Prowlarr then - # .NET dependency: https://github.com/dotnet/core/blob/main/Documentation/linux-prereqs.md + # .NET dependency: https://github.com/dotnet/docs/blob/main/docs/core/install/linux-debian.md#dependencies case $G_DISTRO in - 5) aDEPS=('libicu63');; 6) aDEPS=('libicu67');; *) aDEPS=('libicu72');; esac @@ -10008,9 +10001,8 @@ _EOF_ if To_Install 203 readarr # Readarr then - # .NET dependency: https://github.com/dotnet/core/blob/main/Documentation/linux-prereqs.md + # .NET dependency: https://github.com/dotnet/docs/blob/main/docs/core/install/linux-debian.md#dependencies case $G_DISTRO in - 5) aDEPS=('libicu63');; 6) aDEPS=('libicu67');; *) aDEPS=('libicu72');; esac @@ -10227,9 +10219,8 @@ _EOF_ if To_Install 154 roonserver # Roon Server then # https://help.roonlabs.com/portal/en/kb/articles/linux-install#Manual_Install - # .NET dependency: https://github.com/dotnet/core/blob/main/Documentation/linux-prereqs.md + # .NET dependency: https://github.com/dotnet/docs/blob/main/docs/core/install/linux-debian.md#dependencies case $G_DISTRO in - 5) aDEPS=('libicu63');; 6) aDEPS=('libicu67');; *) aDEPS=('libicu72');; esac From dba521dfbb0c399e97dc8f046e56909ce920b234 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 22 May 2024 15:54:01 +0200 Subject: [PATCH 220/458] v9.5 - DietPi-Software | Box64: Resolved an issue where an invalid build target was used on Raspberry Pi 5 with 16k page size kernel. This target was removed with latest Box64, as page size handling is now done at runtime. - DietPi-Software | Box86/64: Do not build with symbols, as we strip them anyway and likely override it with "-g0". - DietPi-Software | Update fallback URLs --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 36 +++++++++++++++++------------------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 9b6a64a441..42a0ee79d8 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -6,6 +6,7 @@ Bug fixes: - DietPi-Software | Snapcast Server: Resolved on issue where on RISC-V systems, the web interface was not available, since it is not included in the "snapserver" package from Debian. Many thanks to @hllhll for reporting this issue: https://github.com/MichaIng/DietPi/issues/7073 - DietPi-Software | Snapcast Server: Resolved an issue where on Bookworm systems, which installed the Snapcast Server before DietPi v9.4 and reinstalled it afterwards, the server failed to start due to a permissions issue, since the services of both packages use different users. Many thanks to @hllhll for reporting this issue: https://github.com/MichaIng/DietPi/issues/7073 - DietPi-Software | Shairport Sync: Resolved a DietPi v9.4 regression, where the AirPlay 2 choice did not have an effect, but the AirPlay 1 package was always installed. Additionally, uninstalling Shairport Sync will now also purge the AirPlay 2 package. Many thanks to @pulpe for fixing this bug: https://github.com/MichaIng/DietPi/pull/7082 +- DietPi-Software | Box64: Resolved an issue where an invalid build target was used on Raspberry Pi 5 with 16k page size kernel. This target was removed with latest Box64, as page size handling is now done at runtime. 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 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 9c233654df..517b232fe6 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3334,7 +3334,7 @@ _EOF_ esac # Download binary - local fallback_url="https://github.com/prometheus/node_exporter/releases/download/v1.8.0/node_exporter-1.8.0.linux-$arch.tar.gz" + local fallback_url="https://github.com/prometheus/node_exporter/releases/download/v1.8.1/node_exporter-1.8.1.linux-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/prometheus/node_exporter/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/node_exporter-.*\.linux-$arch\.tar\.gz\"$/{print \$4}")" G_EXEC mkdir -p /opt/node_exporter G_EXEC cp --preserve=mode node_exporter*/node_exporter /opt/node_exporter/ @@ -10967,7 +10967,7 @@ _EOF_ # Download local version=$(curl -sSfL 'https://api.github.com/repos/ptitSeb/box86/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}') - [[ $version ]] || { version='v0.3.4'; G_DIETPI-NOTIFY 1 "Automatic latest ${aSOFTWARE_NAME[$software_id]} version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } + [[ $version ]] || { version='v0.3.6'; G_DIETPI-NOTIFY 1 "Automatic latest ${aSOFTWARE_NAME[$software_id]} version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } Download_Install "https://github.com/ptitSeb/box86/archive/$version.tar.gz" # Build for targets: https://github.com/ptitSeb/box86/blob/master/CMakeLists.txt @@ -10976,26 +10976,26 @@ _EOF_ # - RPi 2 if (( $G_HW_MODEL == 2 )) then - G_EXEC cmake .. -DRPI2=1 -DNOGIT=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DRPI2=1 # - RPi 3 elif (( $G_HW_MODEL == 3 )) then - G_EXEC cmake .. -DRPI3=1 -DNOGIT=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DRPI3=1 # - RPi 4 elif (( $G_HW_MODEL == 4 )) then - G_EXEC cmake .. -DRPI4=1 -DNOGIT=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DRPI4=1 # - Odroids elif (( $G_HW_MODEL < 20 )) then - G_EXEC cmake .. -DODROID=1 -DNOGIT=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DODROID=1 # - ASUS Tinker Board elif (( $G_HW_MODEL == 52 )) then - G_EXEC cmake .. -DRK3288=1 -DNOGIT=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DRK3288=1 # - Others else - G_EXEC cmake .. -DARM_DYNAREC=1 -DNOGIT=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DARM_DYNAREC=1 fi G_EXEC_OUTPUT=1 G_EXEC make CFLAGS='-g0 -O3' "-j$(nproc)" G_EXEC strip --remove-section=.comment --remove-section=.note box86 @@ -11012,7 +11012,7 @@ _EOF_ # Download local version=$(curl -sSfL 'https://api.github.com/repos/ptitSeb/box64/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}') - [[ $version ]] || { version='v0.2.6'; G_DIETPI-NOTIFY 1 "Automatic latest ${aSOFTWARE_NAME[$software_id]} version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } + [[ $version ]] || { version='v0.2.8'; G_DIETPI-NOTIFY 1 "Automatic latest ${aSOFTWARE_NAME[$software_id]} version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } Download_Install "https://github.com/ptitSeb/box64/archive/$version.tar.gz" # Build for targets: https://github.com/ptitSeb/box64/blob/main/CMakeLists.txt @@ -11021,36 +11021,34 @@ _EOF_ # - RISC-V if (( $G_HW_ARCH == 11 )) then - G_EXEC cmake .. -DRV64=1 -DNOGIT=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DRV64=1 # - RPi 3 elif (( $G_HW_MODEL == 3 )) then - G_EXEC cmake .. -DRPI3ARM64=1 -DNOGIT=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DRPI3ARM64=1 # - RPi 4 elif (( $G_HW_MODEL == 4 )) then - G_EXEC cmake .. -DRPI4ARM64=1 -DNOGIT=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DRPI4ARM64=1 # - RPi 5 elif (( $G_HW_MODEL == 5 )) then - local ps16k='' - dpkg-query -s 'linux-image-rpi-2712' &> /dev/null && ps16k='PS16K' - G_EXEC cmake .. "-DRPI5ARM64$ps16k=1" -DNOGIT=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DRPI5ARM64=1 # - Odroid N2 elif (( $G_HW_MODEL == 15 )) then - G_EXEC cmake .. -DODROIDN2=1 -DNOGIT=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DODROIDN2=1 # - RK3399 elif (( $G_HW_CPUID == 3 )) then - G_EXEC cmake .. -DRK3399=1 -DNOGIT=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DRK3399=1 # - RK3588 elif (( $G_HW_CPUID == 11 )) then - G_EXEC cmake .. -DRK3588=1 -DNOGIT=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DRK3588=1 # - Generic ARMv8 else - G_EXEC cmake .. -DARM64=1 -DNOGIT=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DARM64=1 fi G_EXEC_OUTPUT=1 G_EXEC make CFLAGS='-g0 -O3' "-j$(nproc)" G_EXEC strip --remove-section=.comment --remove-section=.note box64 From 896166d9118204985191870247e91ab148299482 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 22 May 2024 16:01:17 +0200 Subject: [PATCH 221/458] v9.5 - CI | DietPi-Software test: Run ARMv8 Bullseye tests on Ubuntu Focal, since QEMU throws segmentation faults on Noble --- .github/workflows/armbian.yml | 1 + .github/workflows/dietpi-software.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index f2cf580a17..e654a48838 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -32,6 +32,7 @@ permissions: {} jobs: build: name: "${{ github.event.inputs.asset }} - ${{ github.event.inputs.branch }} - ${{ github.event.inputs.board }}" + # https://github.com/actions/runner-images runs-on: ubuntu-24.04 steps: - name: Clone Armbian repo diff --git a/.github/workflows/dietpi-software.yml b/.github/workflows/dietpi-software.yml index 708964fb51..f641bbf85e 100644 --- a/.github/workflows/dietpi-software.yml +++ b/.github/workflows/dietpi-software.yml @@ -68,7 +68,7 @@ jobs: - { arch: riscv64, dist: bookworm } fail-fast: false name: "${{ matrix.arch }} - ${{ matrix.dist }} - ${{ github.event.inputs.soft }}" - runs-on: ubuntu-24.04 + runs-on: ${{ matrix.dist == 'bullseye' && matrix.arch == 'aarch64' && 'ubuntu-22.04' || 'ubuntu-24.04' }} steps: - name: Install run: | From 5e01b397c2c28ba9a548e97fe7b1355f657d2499 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 22 May 2024 20:41:31 +0200 Subject: [PATCH 222/458] v9.5 - DietPi-Software | Jellyfin: Since a while FFmpeg 6 is available for Jellyfin, but on old installs with the old FFmpeg 5 package, it is not upgraded automatically by APT. This DietPi update applies the FFmpeg upgrade to all affected systems. Many thanks to @gioxx and @WolfganP for reporting this issue: https://github.com/MichaIng/DietPi/issues/7080 - DietPi-Software | Jellyfin: Resolved an issue where the intended HTTP port change could not be applied, since the network config file is not created anymore at service start. We do now pre-create a minimal one, which is complemented with defaults automatically. There was a related issue: https://github.com/MichaIng/DietPi/pull/5559. However, now, indeed network.xml is never created, intentionally, which is fine, since Jellyfin internally applies defaults for all non-defined settings, and stores them back to the config file when completing the web UI setup or saving network settings in web UI. So we can perfectly pre-create a minimal config with just the settings we need to have changed from defaults. Also XML syntax can be minimal, no XML meta data or schemes needed. No need to wait for config files to be created while setting the service start up. --- .update/patches | 7 +++++++ CHANGELOG.txt | 4 ++++ dietpi/dietpi-software | 19 +++++++++---------- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/.update/patches b/.update/patches index 8141d49e2f..4e8b14827b 100755 --- a/.update/patches +++ b/.update/patches @@ -1633,6 +1633,13 @@ Patch_9_5() { # Update MPD flag on Bookworm and above: https://github.com/MusicPlayerDaemon/MPD/commit/ce77b14 (( $G_DISTRO > 6 )) && [[ -f '/etc/systemd/system/mpd.service.d/dietpi.conf' ]] && G_EXEC sed -i 's/no-daemon/systemd/' /etc/systemd/system/mpd.service.d/dietpi.conf + + # Migrate jellyfin-ffmpeg5 => jellyfin-ffmpeg6 + if dpkg-query -s jellyfin &> /dev/null && dpkg-query -s jellyfin-ffmpeg5 + then + G_DIETPI-NOTIFY 2 'Migrating to Jellyfin FFmpeg 6' + G_AGI jellyfin + fi } # v6.35 => v7 migration diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 42a0ee79d8..7e4f3d7660 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,12 +1,16 @@ v9.5 (2024-06-08) +Enhancements: +- DietPi-Software | Jellyfin: Since a while FFmpeg 6 is available for Jellyfin, but on old installs with the old FFmpeg 5 package, it is not upgraded automatically by APT. This DietPi update applies the FFmpeg upgrade to all affected systems. Many thanks to @gioxx and @WolfganP for reporting this issue: https://github.com/MichaIng/DietPi/issues/7080 + Bug fixes: - DietPi-Config | Resolved an issue where Advanced Options were not accessible on some SBCs. Many thanks to @thuehlinger for reporting this issue: https://github.com/MichaIng/DietPi/issues/6663#issuecomment-2108351878 - DietPi-Software | Snapcast Server: Resolved on issue where on RISC-V systems, the web interface was not available, since it is not included in the "snapserver" package from Debian. Many thanks to @hllhll for reporting this issue: https://github.com/MichaIng/DietPi/issues/7073 - DietPi-Software | Snapcast Server: Resolved an issue where on Bookworm systems, which installed the Snapcast Server before DietPi v9.4 and reinstalled it afterwards, the server failed to start due to a permissions issue, since the services of both packages use different users. Many thanks to @hllhll for reporting this issue: https://github.com/MichaIng/DietPi/issues/7073 - DietPi-Software | Shairport Sync: Resolved a DietPi v9.4 regression, where the AirPlay 2 choice did not have an effect, but the AirPlay 1 package was always installed. Additionally, uninstalling Shairport Sync will now also purge the AirPlay 2 package. Many thanks to @pulpe for fixing this bug: https://github.com/MichaIng/DietPi/pull/7082 - DietPi-Software | Box64: Resolved an issue where an invalid build target was used on Raspberry Pi 5 with 16k page size kernel. This target was removed with latest Box64, as page size handling is now done at runtime. +- DietPi-Software | Jellyfin: Resolved an issue where the intended HTTP port change could not be applied, since the network config file is not created anymore at service start. We do now pre-create a minimal one, which is complemented with defaults automatically. 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 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 517b232fe6..e2521553ba 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -10923,12 +10923,7 @@ _EOF_ # APT meta package: Server, web component and FFmpeg implementation G_AGI jellyfin - if [[ -d '/mnt/dietpi_userdata/jellyfin' || -f '/etc/jellyfin/network.xml' ]] - then - G_EXEC systemctl stop jellyfin - else - CREATE_CONFIG_CONTENT='AddPeopleQueryIndex' Create_Config '/etc/jellyfin/migrations.xml' jellyfin 60 - fi + G_EXEC systemctl stop jellyfin # Grant dietpi group permissions and assure video access Create_User -G dietpi,video,render -d /mnt/dietpi_userdata/jellyfin jellyfin @@ -10936,8 +10931,6 @@ _EOF_ # Config: Only apply on fresh install, assumed when /mnt/dietpi_userdata/jellyfin does not yet exist if [[ ! -d '/mnt/dietpi_userdata/jellyfin' ]] then - # Start service until /etc/jellyfin/network.xml exists - Create_Config '/etc/jellyfin/network.xml' jellyfin # Data dir # shellcheck disable=SC2015 [[ -d '/var/lib/jellyfin' ]] && G_EXEC mv /var/lib/jellyfin /mnt/dietpi_userdata/jellyfin || G_EXEC mkdir /mnt/dietpi_userdata/jellyfin @@ -10950,8 +10943,14 @@ _EOF_ [[ -d '/var/cache/jellyfin' ]] && G_EXEC mv /var/cache/jellyfin /mnt/dietpi_userdata/jellyfin/cache || G_EXEC mkdir /mnt/dietpi_userdata/jellyfin/cache G_CONFIG_INJECT 'JELLYFIN_CACHE_DIR=' 'JELLYFIN_CACHE_DIR=/mnt/dietpi_userdata/jellyfin/cache' /etc/default/jellyfin # Change default port due to conflict with Emby - G_CONFIG_INJECT '' '8097' /etc/jellyfin/network.xml - G_CONFIG_INJECT '' ' 8097' /etc/jellyfin/network.xml + # - This config file is not generated at service start, but only when saving network settings via web UI. This also complements any existing config with defaults, hence we pre-create one with only the changes we need. + cat << '_EOF_' > /etc/jellyfin/network.xml + + 8097 + 8097 + +_EOF_ + G_EXEC chown jellyfin: /etc/jellyfin/network.xml fi # Permissions From 236746034f5a8a80f523c75fda7070c9c4b2ca58 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 22 May 2024 20:56:18 +0200 Subject: [PATCH 223/458] v9.5 - DietPi-Patches | Purge left config files when migrating from jellyfin-ffmpeg5 to jellyfin-ffmpeg6 --- .update/patches | 1 + 1 file changed, 1 insertion(+) diff --git a/.update/patches b/.update/patches index 4e8b14827b..b98ad328ee 100755 --- a/.update/patches +++ b/.update/patches @@ -1639,6 +1639,7 @@ Patch_9_5() then G_DIETPI-NOTIFY 2 'Migrating to Jellyfin FFmpeg 6' G_AGI jellyfin + G_AGP jellyfin-ffmpeg5 # conffiles fi } From bef95c9e648833e06d252839d6dc8b6d989057e5 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 22 May 2024 21:02:38 +0200 Subject: [PATCH 224/458] v9.5 - DietPi-Patches | Hide output when checking for installed jellyfin-ffmpeg5 package --- .update/patches | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.update/patches b/.update/patches index b98ad328ee..78c8cedce3 100755 --- a/.update/patches +++ b/.update/patches @@ -1635,7 +1635,7 @@ Patch_9_5() (( $G_DISTRO > 6 )) && [[ -f '/etc/systemd/system/mpd.service.d/dietpi.conf' ]] && G_EXEC sed -i 's/no-daemon/systemd/' /etc/systemd/system/mpd.service.d/dietpi.conf # Migrate jellyfin-ffmpeg5 => jellyfin-ffmpeg6 - if dpkg-query -s jellyfin &> /dev/null && dpkg-query -s jellyfin-ffmpeg5 + if dpkg-query -s jellyfin &> /dev/null && dpkg-query -s jellyfin-ffmpeg5 &> /dev/null then G_DIETPI-NOTIFY 2 'Migrating to Jellyfin FFmpeg 6' G_AGI jellyfin From 457ae2368bc3a354cd5df635db342fa7a62737b0 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 23 May 2024 15:29:08 +0200 Subject: [PATCH 225/458] v9.5 - DietPi-Software | FreshRSS: Update fallback version --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index e2521553ba..a4d9d5757f 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -7041,7 +7041,7 @@ _EOF_ aDEPS=() else local version=$(curl -sSfL 'https://api.github.com/repos/FreshRSS/FreshRSS/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}') - [[ $version ]] || { version='1.23.1'; G_DIETPI-NOTIFY 1 "Automatic latest FreshRSS version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } + [[ $version ]] || { version='1.24.0'; G_DIETPI-NOTIFY 1 "Automatic latest FreshRSS version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } Download_Install "https://github.com/FreshRSS/FreshRSS/archive/$version.tar.gz" G_EXEC mv "FreshRSS-$version" /opt/FreshRSS fi From 1f32880a02187141ad8bd36e3071f2655991ff81 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 25 May 2024 23:11:44 +0200 Subject: [PATCH 226/458] v9.5 - DietPi-Config | Detect as well UART devices with indices above 9. The Raspberry Pi 5 has a ttyAMA10 --- dietpi/dietpi-config | 2 +- dietpi/func/dietpi-set_hardware | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index a050f0f399..4353832da9 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -944,7 +944,7 @@ Re-enabling HDMI requires a reboot. If you need emergency HDMI output, edit the G_WHIP_MENU_ARRAY=() (( $G_HW_MODEL < 10 )) && G_WHIP_MENU_ARRAY+=('' '●─ Toggle console ') - for i in /dev/{tty{S,AMA,SAC,AML,SC,GS,FIQ,MV},hvc}[0-9] + for i in /dev/{tty{S,AMA,SAC,AML,SC,GS,FIQ,MV},hvc}[0-9]* do [[ -e $i ]] || continue i=${i#/dev/} diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index af4a19e95d..5c086944d9 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -1503,7 +1503,7 @@ Do you want to continue and disable the serial login console?' || return 1 # Enable boot messages depending on device # - Skip on USB getget serial device, which requires loading a kernel module first and hence cannot be used for boot outputs - if [[ $INPUT_ADDITIONAL == 'ttyGS'[0-9] ]] + if [[ $INPUT_ADDITIONAL == 'ttyGS'[0-9]* ]] then : @@ -1567,7 +1567,7 @@ _EOF_ # Enable for all detected Serial/UART devices else - for i in /dev/{tty{S,AMA,SAC,AML,SC,GS,FIQ,MV},hvc}[0-9] + for i in /dev/{tty{S,AMA,SAC,AML,SC,GS,FIQ,MV},hvc}[0-9]* do [[ -e $i ]] || continue INPUT_ADDITIONAL=${i/\/dev\/} Serial_Main @@ -1629,7 +1629,7 @@ _EOF_ # Disable for all detected Serial/UART devices else - for i in /dev/{tty{S,AMA,SAC,AML,SC,GS,FIQ,MV},hvc}[0-9] + for i in /dev/{tty{S,AMA,SAC,AML,SC,GS,FIQ,MV},hvc}[0-9]* do [[ -e $i ]] || continue INPUT_ADDITIONAL=${i/\/dev\/} Serial_Main From 4b9edba6c1f450b39ce013b8af2de30124384c0d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 26 May 2024 14:06:25 +0200 Subject: [PATCH 227/458] v9.5 - DietPi-Software | rutorrent: Update fallback version --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index a4d9d5757f..750019858f 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8524,7 +8524,7 @@ _EOF_ # Install ruTorrent: Web UI for rTorrent # - Grab current version local version=$(curl -sSfL 'https://api.github.com/repos/Novik/ruTorrent/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}') - [[ $version ]] || { version='v4.3.0'; G_DIETPI-NOTIFY 1 "Automatic latest ruTorrent version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } + [[ $version ]] || { version='v4.3.2'; G_DIETPI-NOTIFY 1 "Automatic latest ruTorrent version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } Download_Install "https://github.com/Novik/ruTorrent/archive/$version.tar.gz" # - Reinstall freshly with preserved configs and 3rd party plugins From 81c04eebcb13ce768c0a21130df2b2349f4e763f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 26 May 2024 14:33:47 +0200 Subject: [PATCH 228/458] v9.5 - APT | Add URL components for 64-bit Amlogic SoC SBCs --- .update/patches | 8 ++++++++ dietpi/func/dietpi-set_software | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/.update/patches b/.update/patches index 78c8cedce3..437ad34f01 100755 --- a/.update/patches +++ b/.update/patches @@ -1631,6 +1631,14 @@ _EOF_ Patch_9_5() { + # Update DietPi APT list for several SBCs we added components to our repo for + if [[ $PATCH_9_3_RAN == 0 && $G_HW_MODEL =~ ^(12|15|16|54|74)$ ]] + then + /boot/dietpi/func/dietpi-set_software apt-mirror dietpi + G_AGUP + G_AGUG + fi + # Update MPD flag on Bookworm and above: https://github.com/MusicPlayerDaemon/MPD/commit/ce77b14 (( $G_DISTRO > 6 )) && [[ -f '/etc/systemd/system/mpd.service.d/dietpi.conf' ]] && G_EXEC sed -i 's/no-daemon/systemd/' /etc/systemd/system/mpd.service.d/dietpi.conf diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index 0b6631f002..5479c79b77 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -124,6 +124,9 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R [0-9]) all_components='rpi';; 10) all_components='odroidc1';; 11) all_components='odroidxu4';; + 12) all_components='odroidc2';; + 15) all_components='odroidn2';; + 16) all_components='odroidc4';; 40) all_components='pinea64';; 44) all_components='pinebook';; 45) all_components='pineh64';; @@ -146,6 +149,7 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R ;; esac ;; + 54) all_components='nanopik2';; 56) all_components='nanopineo3';; 57) all_components='nanopineoplus2';; 59) all_components='zeropi';; @@ -190,6 +194,7 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R 66) all_components='nanopim1plus';; 67) all_components='nanopik1plus';; 70) all_components='sparkysbc';; + 74) all_components='radxazero';; 76) # Detect variant either based on $HW_VARIANT environment variable, existing "all" components or installed U-Boot package # shellcheck disable=SC2154 From 29761eceef1ba69dba0d4f51ab98def7284db0a7 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 26 May 2024 14:45:56 +0200 Subject: [PATCH 229/458] v9.5 - CHANGELOG | Odroid C1/C2: Resolved an issue on both SBCs where reboots could hang and a power cycle was required to get the device back up. Many thanks to @yandritos, @gociii and others for reporting this issue: https://github.com/MichaIng/DietPi/issues/5414, https://github.com/MichaIng/DietPi/issues/6332 --- CHANGELOG.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 7e4f3d7660..11b32c5080 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,6 +5,7 @@ Enhancements: - DietPi-Software | Jellyfin: Since a while FFmpeg 6 is available for Jellyfin, but on old installs with the old FFmpeg 5 package, it is not upgraded automatically by APT. This DietPi update applies the FFmpeg upgrade to all affected systems. Many thanks to @gioxx and @WolfganP for reporting this issue: https://github.com/MichaIng/DietPi/issues/7080 Bug fixes: +- Odroid C1/C2 | Resolved an issue on both SBCs where reboots could hang and a power cycle was required to get the device back up. Many thanks to @yandritos, @gociii and others for reporting this issue: https://github.com/MichaIng/DietPi/issues/5414, https://github.com/MichaIng/DietPi/issues/6332 - DietPi-Config | Resolved an issue where Advanced Options were not accessible on some SBCs. Many thanks to @thuehlinger for reporting this issue: https://github.com/MichaIng/DietPi/issues/6663#issuecomment-2108351878 - DietPi-Software | Snapcast Server: Resolved on issue where on RISC-V systems, the web interface was not available, since it is not included in the "snapserver" package from Debian. Many thanks to @hllhll for reporting this issue: https://github.com/MichaIng/DietPi/issues/7073 - DietPi-Software | Snapcast Server: Resolved an issue where on Bookworm systems, which installed the Snapcast Server before DietPi v9.4 and reinstalled it afterwards, the server failed to start due to a permissions issue, since the services of both packages use different users. Many thanks to @hllhll for reporting this issue: https://github.com/MichaIng/DietPi/issues/7073 From dace3885978bd88dc38a5a76cc1ce6d9df139922 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 26 May 2024 14:48:43 +0200 Subject: [PATCH 230/458] v9.5 - CHANGELOG | Give credits to @gitmeister specifically for providing the Odroid C2 reboot fix --- CHANGELOG.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 11b32c5080..d1679b80f1 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,7 +5,7 @@ Enhancements: - DietPi-Software | Jellyfin: Since a while FFmpeg 6 is available for Jellyfin, but on old installs with the old FFmpeg 5 package, it is not upgraded automatically by APT. This DietPi update applies the FFmpeg upgrade to all affected systems. Many thanks to @gioxx and @WolfganP for reporting this issue: https://github.com/MichaIng/DietPi/issues/7080 Bug fixes: -- Odroid C1/C2 | Resolved an issue on both SBCs where reboots could hang and a power cycle was required to get the device back up. Many thanks to @yandritos, @gociii and others for reporting this issue: https://github.com/MichaIng/DietPi/issues/5414, https://github.com/MichaIng/DietPi/issues/6332 +- Odroid C1/C2 | Resolved an issue on both SBCs where reboots could hang and a power cycle was required to get the device back up. Many thanks to @yandritos, @gociii and others for reporting this issue, and @gitmeister for providing the fix for Odroid C2: https://github.com/MichaIng/DietPi/issues/5414, https://github.com/MichaIng/DietPi/issues/6332 - DietPi-Config | Resolved an issue where Advanced Options were not accessible on some SBCs. Many thanks to @thuehlinger for reporting this issue: https://github.com/MichaIng/DietPi/issues/6663#issuecomment-2108351878 - DietPi-Software | Snapcast Server: Resolved on issue where on RISC-V systems, the web interface was not available, since it is not included in the "snapserver" package from Debian. Many thanks to @hllhll for reporting this issue: https://github.com/MichaIng/DietPi/issues/7073 - DietPi-Software | Snapcast Server: Resolved an issue where on Bookworm systems, which installed the Snapcast Server before DietPi v9.4 and reinstalled it afterwards, the server failed to start due to a permissions issue, since the services of both packages use different users. Many thanks to @hllhll for reporting this issue: https://github.com/MichaIng/DietPi/issues/7073 From 68ed703e2c76dabfd982e7a5927501c87c36f272 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 26 May 2024 15:05:06 +0200 Subject: [PATCH 231/458] v9.5 - Odroid C1 | Flash new U-Boot, probably even the required part to fix reboot issues --- .update/patches | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.update/patches b/.update/patches index 437ad34f01..67ec60037a 100755 --- a/.update/patches +++ b/.update/patches @@ -1639,6 +1639,9 @@ Patch_9_5() G_AGUG fi + # Flash new U-Boot on Odroid C1 + (( $G_HW_MODEL == 10 )) && /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc + # Update MPD flag on Bookworm and above: https://github.com/MusicPlayerDaemon/MPD/commit/ce77b14 (( $G_DISTRO > 6 )) && [[ -f '/etc/systemd/system/mpd.service.d/dietpi.conf' ]] && G_EXEC sed -i 's/no-daemon/systemd/' /etc/systemd/system/mpd.service.d/dietpi.conf From 412f65672c9a116b149565435d19fb40ff669399 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 29 May 2024 21:08:29 +0200 Subject: [PATCH 232/458] v9.5 - DietPi-Set_hardware | Add alias "flash-uboot-mmc" for "flash-u-boot-mmc" command - DietPi-Software | Gitea: Update fallback URL --- dietpi/dietpi-software | 2 +- dietpi/func/dietpi-set_hardware | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 750019858f..17cf14926f 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -10591,7 +10591,7 @@ _EOF_ *) local arch='arm-6';; esac - local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.21.11/gitea-1.21.11-linux-$arch.xz" + local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.22.0/gitea-1.22.0-linux-$arch.xz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/go-gitea/gitea/releases/latest' | mawk -F\" "/\"browser_download_url\": \".*\/gitea-[^\"\/]*-linux-$arch\.xz\"/{print \$4}")" /mnt/dietpi_userdata/gitea/gitea # User diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index 5c086944d9..28f77b0d91 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -2397,7 +2397,7 @@ _EOF_ 'rpi3_usb_boot') RPi_USB_Boot_Main;; 'rpi-eeprom') RPi_EEPROM;; 'vf2-spi-update') VF2_SPI_Update;; - 'flash-u-boot-mmc') Flash_U-Boot_MMC || EXIT_CODE=1;; + 'flash-u-boot-mmc'|'flash-uboot-mmc') Flash_U-Boot_MMC || EXIT_CODE=1;; 'headless') Headless_Main;; 'gpudriver') GPUDriver_Main;; 'qemu-guest-agent'|'qga') QEMU_Guest_Agent_Main;; From 1eea6eb424fdce62eb5b9b21f1ee438d2269f46e Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 31 May 2024 16:11:12 +0200 Subject: [PATCH 233/458] v9.5 - DietPi-Build/Image | Better detect Debian version on non-DietPi and Ubuntu systems --- .build/images/dietpi-build | 11 ++++++++--- .build/images/dietpi-imager | 16 +++++++++++----- dietpi/dietpi-software | 2 +- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 862621668e..a596d51f78 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -11,10 +11,15 @@ else curl -sSf "https://raw.githubusercontent.com/${G_GITOWNER:=MichaIng}/DietPi/${G_GITBRANCH:=master}/dietpi/func/dietpi-globals" -o /tmp/dietpi-globals || exit 1 # shellcheck disable=SC1091 . /tmp/dietpi-globals - G_EXEC_NOHALT=1 G_EXEC rm /tmp/dietpi-globals + G_EXEC rm /tmp/dietpi-globals export G_GITOWNER G_GITBRANCH G_HW_ARCH_NAME=$(uname -m) - # shellcheck disable=SC2015 - [[ $( /dev/null) != '5'* ]] + # - Bullseye/Focal: We need Clonezilla 5.x for loop device support + if dpkg --compare-versions "$(dpkg-query -Wf '${Version}' clonezilla 2> /dev/null)" lt 5 then - G_EXEC curl -sSf 'https://deb.debian.org/debian/pool/main/c/clonezilla/clonezilla_5.2.7-1_all.deb' -o clonezilla.deb + G_EXEC curl -sSf 'https://deb.debian.org/debian/pool/main/c/clonezilla/clonezilla_5.3.17-2_all.deb' -o clonezilla.deb G_EXEC dpkg -i ./clonezilla.deb G_EXEC rm clonezilla.deb fi diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 17cf14926f..342095dd32 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6511,7 +6511,7 @@ _EOF_ esac # Download - local fallback_url="https://github.com/fatedier/frp/releases/download/v0.58.0/frp_0.58.0_linux_$arch.tar.gz" + local fallback_url="https://github.com/fatedier/frp/releases/download/v0.58.1/frp_0.58.1_linux_$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/fatedier/frp/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/frp_[0-9.]*_linux_$arch\.tar\.gz\"/{print \$4}")" G_EXEC cd frp_* From 8307ba23228904efc4a02134cf97386c485c2c0b Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 31 May 2024 19:47:34 +0200 Subject: [PATCH 234/458] v9.5 - DietPi-Config | If no Ethernet adapter hsa been detected but the Ethernet interface is enabled, offer to disable it --- .build/images/dietpi-installer | 14 +++++++------- dietpi/dietpi-config | 20 +++++++++++++++----- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 440f046afd..1ef04f13ff 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1574,26 +1574,26 @@ _EOF_ [[ -d '/etc/chromium.d' ]] && G_EXEC rm -R /etc/chromium.d [[ -d '/etc/lightdm' ]] && G_EXEC rm -R /etc/lightdm - # - www + # www [[ -d '/var/www' ]] && G_EXEC rm -Rf /var/www/{,.??,.[^.]}* - # - Source code and Linux headers + # Source code and Linux headers [[ -d '/usr/src' ]] && G_EXEC rm -Rf /usr/src/{,.??,.[^.]}* - # - Documentation dirs: https://github.com/MichaIng/DietPi/issues/3259 + # Documentation dirs: https://github.com/MichaIng/DietPi/issues/3259 #[[ -d '/usr/share/man' ]] && G_EXEC rm -R /usr/share/man #[[ -d '/usr/share/doc' ]] && G_EXEC rm -R /usr/share/doc #[[ -d '/usr/share/doc-base' ]] && G_EXEC rm -R /usr/share/doc-base [[ -d '/usr/share/calendar' ]] && G_EXEC rm -R /usr/share/calendar - # - Unused DEB package config files + # Unused DEB package config files find / \( -name '*?.dpkg-dist' -o -name '*?.dpkg-old' -o -name '*?.dpkg-new' -o -name '*?.dpkg-bak' -o -name '*?.dpkg-del' -o -name '*?.ucf-dist' -o -name '*?.ucf-old' -o -name '*?.ucf-new' \) -exec rm -v {} + - # - Fonts + # Fonts [[ -d '/usr/share/fonts' ]] && G_EXEC rm -R /usr/share/fonts [[ -d '/usr/share/icons' ]] && G_EXEC rm -R /usr/share/icons - # - Stop, disable and remove not required 3rd party services + # Stop, disable and remove not required 3rd party services local aservices=( # RPi @@ -1639,7 +1639,7 @@ _EOF_ done done - # - Remove obsolete SysV service entries + # Remove obsolete SysV service entries aservices=( 'fake-hwclock' diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 4353832da9..0fd4369391 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -2478,12 +2478,22 @@ NB: All Ethernet connections will be temporarily dropped!' && Network_ApplyChang 'Ethernet') - # No adapter detected + # No adapter detected: Offer to disable if enabled if (( ! $ETH_HARDWARE )) then + if (( ! $ETH_DISABLED )) + then + if G_WHIP_YESNO 'No Ethernet adapter was detected on your device. +\nWould you like to disable Ethernet?\n - NB: Connections may drop!' + then + ETH_DISABLED=1 + Network_ApplyChanges + fi + return 0 + fi G_WHIP_MSG 'No Ethernet adapter was detected on your device.' - # Disabled: Offer chance to enable + # Disabled: Offer to enable elif (( $ETH_DISABLED )) then if G_WHIP_YESNO 'Ethernet must be enabled before settings can be changed. @@ -2500,7 +2510,7 @@ NB: All Ethernet connections will be temporarily dropped!' && Network_ApplyChang 'WiFi') - # Disabled: Offer chance to enable (also enables WiFi modules) + # Disabled: Offer to enable, including WiFi modules for adapter to be detected if (( $WIFI_DISABLED )) then if G_WHIP_YESNO 'WiFi must be enabled before settings can be changed. @@ -2508,11 +2518,11 @@ NB: All Ethernet connections will be temporarily dropped!' && Network_ApplyChang then WIFI_DISABLED=0 Network_ApplyChanges - # Enter submenu if a WiFi adapters has been detected, else only preselect the menu entry + # Enter submenu if WiFi adapter has been detected, else only preselect the menu entry (( $WIFI_HARDWARE )) && TARGETMENUID=10 || G_WHIP_DEFAULT_ITEM='WiFi' # WiFi adapter menu fi - # No adapter detected + # No adapter detected: Offer to disable elif (( ! $WIFI_HARDWARE )) then if G_WHIP_YESNO 'No WiFi adapter was detected on your device. From ba4c7e34b2662084459a4c1794a6fa2afe337279 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 31 May 2024 21:18:15 +0200 Subject: [PATCH 235/458] v9.5 - DietPi-Installer | Add little note about raised boot time when printing kernel logs to console and install only "gpg" instead of "gnupg", which is sufficient now that "apt-key add" is not used anymore. Since dirmngr is then missing, gpg cannot interact with keyserver by itself anymore, and since gpg-agent is missing, the passphrase to decrypt keys cannot be entered anymore from the console, breaking e.g. "git commit". However, gpg is very clearly telling what is missing, so for users playing with gpg signing/encryption/validation, it should not be a big problem. We can revert in case of negative feedback, or add dirmngr/gpg-agent in particular, instead of the whole gnupg suite. --- .build/images/dietpi-installer | 4 ++-- CHANGELOG.txt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 1ef04f13ff..1baa3f7eee 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -876,7 +876,7 @@ setenv rootuuid "true"' /boot/boot.cmd 'cron' # Background job scheduler 'curl' # Web address testing, downloading, uploading etc. 'fdisk' # Partitioning tool used by DietPi-FS_partition_resize and DietPi-Imager - 'gnupg' # apt-key add / gpg + 'gpg' # apt-key list / gpg 'htop' # System monitor 'iputils-ping' # "ping" command 'locales' # Support locales, used by dietpi-config > Language/Regional Options > Locale @@ -2283,7 +2283,7 @@ _EOF_ fi # Update config - G_CONFIG_INJECT 'GRUB_CMDLINE_LINUX_DEFAULT=' 'GRUB_CMDLINE_LINUX_DEFAULT="consoleblank=0"' /etc/default/grub + G_CONFIG_INJECT 'GRUB_CMDLINE_LINUX_DEFAULT=' 'GRUB_CMDLINE_LINUX_DEFAULT="consoleblank=0"' /etc/default/grub # NB: Removing "quiet" adds ~0.5s to boot time on my 6.5s - 7.5s boot time laptop. G_CONFIG_INJECT 'GRUB_CMDLINE_LINUX=' 'GRUB_CMDLINE_LINUX="net.ifnames=0"' /etc/default/grub G_CONFIG_INJECT 'GRUB_TIMEOUT=' 'GRUB_TIMEOUT=0' /etc/default/grub G_EXEC_DESC='Regenerating GRUB config' G_EXEC_OUTPUT=1 G_EXEC grub-mkconfig -o /boot/grub/grub.cfg diff --git a/CHANGELOG.txt b/CHANGELOG.txt index d1679b80f1..10f42cd88d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,6 +2,7 @@ v9.5 (2024-06-08) Enhancements: +- Images | New DietPi images won't contain the "gnupg" package anymore, but "gpg" only, since other features of the suite are not required for our scripts anymore. E.g. "dirmngr" for interacting with keyservers, and "gpg-agent" for key passphrase inputs are hence missing. "gpg" however prints very clear error messages about what is missing. Let us know whether you find one of those GnuPG features too essential to not be pre-installed. - DietPi-Software | Jellyfin: Since a while FFmpeg 6 is available for Jellyfin, but on old installs with the old FFmpeg 5 package, it is not upgraded automatically by APT. This DietPi update applies the FFmpeg upgrade to all affected systems. Many thanks to @gioxx and @WolfganP for reporting this issue: https://github.com/MichaIng/DietPi/issues/7080 Bug fixes: From 4f0cc5c1ab1132f4bd46e2f741ded744929df6df Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 1 Jun 2024 13:29:25 +0200 Subject: [PATCH 236/458] v9.5 - CI | aarch64 builds/tests in QEMU-emulated Bullseye containers on Ubuntu Noble hosts fail on libc-bin postinst trigger with segmentation fault. Hence run those cases on Ubuntu Jammy. --- .github/workflows/amiberry.yml | 3 +++ .github/workflows/dietpi-build.yml | 5 ++++- .github/workflows/dietpi-software-build.yml | 5 ++++- .github/workflows/dietpi-software.yml | 3 +++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/amiberry.yml b/.github/workflows/amiberry.yml index e340482da7..9e8fa0851d 100644 --- a/.github/workflows/amiberry.yml +++ b/.github/workflows/amiberry.yml @@ -54,6 +54,9 @@ jobs: - { plat: riscv64, dist: bookworm } fail-fast: false name: "${{ matrix.plat }} - ${{ matrix.dist }}" + # aarch64 build in QEMU-emulated Bullseye containers on Ubuntu Noble hosts fail: + # Processing triggers for libc-bin (2.31-13+deb11u10) ... + # qemu: uncaught target signal 11 (Segmentation fault) - core dumped runs-on: ${{ matrix.dist == 'bullseye' && ( endsWith(matrix.plat, '-64-sdl2') || matrix.plat == 'AMLSM1' || matrix.plat == 'n2' || matrix.plat == 'a64' || matrix.plat == 'rk3588' ) && 'ubuntu-22.04' || 'ubuntu-24.04' }} steps: - name: Build diff --git a/.github/workflows/dietpi-build.yml b/.github/workflows/dietpi-build.yml index a7db44fb96..8ed3cab4cf 100644 --- a/.github/workflows/dietpi-build.yml +++ b/.github/workflows/dietpi-build.yml @@ -116,7 +116,10 @@ jobs: buildargs: ${{ fromJson(needs.prep.outputs.buildargs) }} fail-fast: false name: "Build: ${{ matrix.buildargs }}" - runs-on: ubuntu-24.04 + # aarch64 build in QEMU-emulated Bullseye containers on Ubuntu Noble hosts fail: + # Processing triggers for libc-bin (2.31-13+deb11u10) ... + # qemu: uncaught target signal 11 (Segmentation fault) - core dumped + runs-on: ${{ contains(matrix.buildargs, '-d 6') && 'ubuntu-22.04' || 'ubuntu-24.04' }} steps: - name: Generate upload script run: | diff --git a/.github/workflows/dietpi-software-build.yml b/.github/workflows/dietpi-software-build.yml index 29c7468126..bcf9db7820 100644 --- a/.github/workflows/dietpi-software-build.yml +++ b/.github/workflows/dietpi-software-build.yml @@ -72,7 +72,10 @@ jobs: - { arch: x86_64, name: gogs } fail-fast: false name: "${{ matrix.name }} - ${{ matrix.arch }} - ${{ matrix.dist }}" - runs-on: ubuntu-24.04 + # aarch64 build in QEMU-emulated Bullseye containers on Ubuntu Noble hosts fail: + # Processing triggers for libc-bin (2.31-13+deb11u10) ... + # qemu: uncaught target signal 11 (Segmentation fault) - core dumped + runs-on: ${{ matrix.dist == 'bullseye' && matrix.arch == 'aarch64' && 'ubuntu-22.04' || 'ubuntu-24.04' }} steps: - name: Build run: sudo bash -c "G_GITOWNER=$GITHUB_REPOSITORY_OWNER G_GITBRANCH=$GITHUB_REF_NAME; $(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/$GITHUB_REF_NAME/.build/software/dietpi-software-build.bash")" -- -n '${{ matrix.name }}' -a '${{ matrix.arch }}' -d '${{ matrix.dist }}' diff --git a/.github/workflows/dietpi-software.yml b/.github/workflows/dietpi-software.yml index f641bbf85e..d013908cee 100644 --- a/.github/workflows/dietpi-software.yml +++ b/.github/workflows/dietpi-software.yml @@ -68,6 +68,9 @@ jobs: - { arch: riscv64, dist: bookworm } fail-fast: false name: "${{ matrix.arch }} - ${{ matrix.dist }} - ${{ github.event.inputs.soft }}" + # aarch64 test in QEMU-emulated Bullseye containers on Ubuntu Noble hosts fail: + # Processing triggers for libc-bin (2.31-13+deb11u10) ... + # qemu: uncaught target signal 11 (Segmentation fault) - core dumped runs-on: ${{ matrix.dist == 'bullseye' && matrix.arch == 'aarch64' && 'ubuntu-22.04' || 'ubuntu-24.04' }} steps: - name: Install From a299c0edc405132a676bdaa3731607330bad6bde Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 2 Jun 2024 18:38:00 +0200 Subject: [PATCH 237/458] v9.5 - CI | Quartz64: Obtain latest U-Boot version automatically --- .github/workflows/quartz64.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/quartz64.yml b/.github/workflows/quartz64.yml index 6d79b59235..c65dabdd06 100644 --- a/.github/workflows/quartz64.yml +++ b/.github/workflows/quartz64.yml @@ -9,11 +9,9 @@ jobs: # https://github.com/actions/runner-images runs-on: ubuntu-24.04 env: - uboot_version: '2023.10' CROSS_COMPILE: 'aarch64-linux-gnu-' ARCH: 'arm64' steps: - # https://github.com/actions/setup-python/tags - uses: actions/setup-python@v5 with: python-version: '3.x' @@ -22,17 +20,20 @@ jobs: run: | { python3 -m pip install --no-cache-dir -U pip setuptools wheel; python3 -m pip install --no-cache-dir -U pyelftools; } & { sudo apt-get -q update; sudo DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -qq install make gcc libc6-dev flex bison gcc-aarch64-linux-gnu bc libssl-dev swig; } & - { curl -fLO "https://github.com/u-boot/u-boot/archive/v$uboot_version.tar.gz"; tar xf "v$uboot_version.tar.gz"; rm "v$uboot_version.tar.gz"; } & { curl -fO 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/snapshot/linux-rolling-stable.tar.gz'; tar xf linux-rolling-stable.tar.gz; rm linux-rolling-stable.tar.gz; } & + uboot_version=$(curl -sSf 'https://api.github.com/repos/u-boot/u-boot/tags' | mawk -F\" '/^ *"name": "v[0-9.]*",$/{print $4;exit}') + [ "$uboot_version" ] || { echo 'ERROR: Failed to obtain latest U-Boot version'; exit 1; } + echo "uboot_version=$uboot_version" >> "$GITHUB_ENV" + { curl -fLO "https://github.com/u-boot/u-boot/archive/v$uboot_version.tar.gz"; tar xf "v$uboot_version.tar.gz"; rm "v$uboot_version.tar.gz"; } & wait curl -sSfo "u-boot-$uboot_version/ddr.bin" 'https://raw.githubusercontent.com/JeffyCN/mirrors/ddf03c1/bin/rk35/rk3568_ddr_1560MHz_v1.13.bin' & curl -sSfo "u-boot-$uboot_version/bl31.elf" 'https://raw.githubusercontent.com/JeffyCN/mirrors/6186deb/bin/rk35/rk3568_bl31_v1.28.elf' & curl -sSfo linux-rolling-stable/arch/arm64/configs/quartz64_defconfig "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/$GITHUB_REF_NAME/.build/images/Quartz64/quartz64_defconfig" & - rm -Rf firmware-quartz64a/DEBIAN firmware-quartz64a/boot/extlinux firmware-quartz64a/lib/firmware/brcm + rm -Rf firmware-quartz64a mkdir -p firmware-quartz64a/DEBIAN firmware-quartz64a/boot/extlinux firmware-quartz64a/lib/firmware/brcm - rm -Rf firmware-quartz64b/DEBIAN firmware-quartz64b/boot/extlinux firmware-quartz64b/lib/firmware/brcm + rm -Rf firmware-quartz64b mkdir -p firmware-quartz64b/DEBIAN firmware-quartz64b/boot/extlinux firmware-quartz64b/lib/firmware/brcm - rm -Rf firmware-soquartz/DEBIAN firmware-soquartz/boot/extlinux firmware-soquartz/lib/firmware/brcm + rm -Rf firmware-soquartz mkdir -p firmware-soquartz/DEBIAN firmware-soquartz/boot/extlinux firmware-soquartz/lib/firmware/brcm wait - name: Build U-Boot From 8229158129e94be2dccd970db2d9d3d0cc9b0032 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 2 Jun 2024 18:50:02 +0200 Subject: [PATCH 238/458] v9.5 - DietPi-Installer | Replace manual kernel/U-Boot download with a way to install test builds. In the meantime, we can host all new builds quickly on our APT server, hence there is no need to download anything manually. But we do want to be able to create test images, before pushing untested kernel/bootloader builds to our APT server. --- .build/images/dietpi-build | 6 +++++- .build/images/dietpi-installer | 20 ++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index a596d51f78..3442571a38 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -52,6 +52,8 @@ EDITION= SUFFIX= ADD_DOS_PART=1 SIGN_PASS= +TEST_KERNEL=0 +TEST_UBOOT=0 while (( $# )) do case $1 in @@ -68,6 +70,8 @@ do '-s') shift; SUFFIX=$1;; '--no-dos-part') ADD_DOS_PART=0;; '--sign') shift; SIGN_PASS=$1;; + '--test-kernel') TEST_KERNEL=1;; + '--test-uboot') TEST_UBOOT=1;; *) G_DIETPI-NOTIFY 1 "Invalid input \"$1\", aborting..."; exit 1;; esac shift @@ -403,7 +407,7 @@ echo '[ INFO ] Running DietPi-Installer...' _EOF_ cat << _EOF_ >> rootfs/etc/rc.local -export GITOWNER='$GITOWNER' GITBRANCH='$GITBRANCH' HW_MODEL='$HW_MODEL' IMAGE_CREATOR=0 PREIMAGE_INFO=0 WIFI_REQUIRED=1 DISTRO_TARGET=$DISTRO +export GITOWNER='$GITOWNER' GITBRANCH='$GITBRANCH' HW_MODEL='$HW_MODEL' IMAGE_CREATOR=0 PREIMAGE_INFO=0 WIFI_REQUIRED=1 DISTRO_TARGET=$DISTRO TEST_KERNEL=$TEST_KERNEL TEST_UBOOT=$TEST_UBOOT echo '[ INFO ] Running DietPi-Installer for $G_GITOWNER/$G_GITBRANCH' bash -c "\$(curl -sSf 'https://raw.githubusercontent.com/$G_GITOWNER/DietPi/$G_GITBRANCH/.build/images/dietpi-installer')" || poweroff _EOF_ diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 1baa3f7eee..001029a73e 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -24,6 +24,8 @@ # - HW_MODEL=0 (must match one of the supported IDs below) # - WIFI_REQUIRED=0 [01] # - DISTRO_TARGET=7 [678] (Bullseye: 6, Bookworm: 7, Trixie: 8) + # - TEST_KERNEL=1 Install test kernel from https://dietpi.com/downloads/binaries/testing/ + # - TEST_UBOOT=1 Install test U-Boot from https://dietpi.com/downloads/binaries/testing/ #------------------------------------------------------------------------------------------------ # Core globals @@ -1053,7 +1055,7 @@ _EOF_ # Update APT lists G_AGUP # Install kernel, device tree, U-Boot, firmware and initramfs packages - local model='odroidn2' kernel='meson64' arch='arm64' branch='current' zstd=() dietpi_uboot=0 dietpi_kernel=0 + local model='odroidn2' kernel='meson64' arch='arm64' branch='current' zstd=() case $G_HW_MODEL in 10) model='odroidc1' kernel='meson' arch='arm';; 11) model='odroidxu4' kernel='odroidxu4' arch='arm';; @@ -1151,27 +1153,21 @@ blacklist rockchip_vdec _EOF_ fi # Install initramfs-tools first to have an initramfs generated on kernel install, and configure it to use zstd if supported for better compression and faster decompression - if (( $dietpi_kernel )) - then - G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/armbian-firmware.deb' - G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb - G_EXEC rm package.deb - fi [[ $kernel == 'rockchip64' || $kernel == 'rk35xx' || $kernel == 'meson64' || $kernel == 'sunxi64' || $kernel == 'sunxi' || $kernel == 'rockchip' ]] && zstd=('zstd') G_AGI initramfs-tools u-boot-tools armbian-firmware "${zstd[@]}" [[ ${zstd[0]} ]] && G_CONFIG_INJECT 'COMPRESS=' 'COMPRESS=zstd' /etc/initramfs-tools/initramfs.conf # Download and pre-install kernel hosted on dietpi.com where the Armbian APT repo provides a too old version or is not available - if (( $dietpi_kernel )) + if (( $TEST_KERNEL )) then - G_EXEC_OUTPUT=1 G_EXEC curl -fo package1.deb "https://dietpi.com/downloads/binaries/linux-image-$branch-$kernel.deb" - G_EXEC_OUTPUT=1 G_EXEC curl -fo package2.deb "https://dietpi.com/downloads/binaries/linux-dtb-$branch-$kernel.deb" + G_EXEC_OUTPUT=1 G_EXEC curl -fo package1.deb "https://dietpi.com/downloads/binaries/testing/linux-image-$branch-$kernel.deb" + G_EXEC_OUTPUT=1 G_EXEC curl -fo package2.deb "https://dietpi.com/downloads/binaries/testing/linux-dtb-$branch-$kernel.deb" G_EXEC_OUTPUT=1 G_EXEC dpkg -i package[12].deb G_EXEC rm package[12].deb fi # Download and pre-install U-Boot hosted on dietpi.com where the Armbian APT repo provides a too old version or is not available - if (( $dietpi_uboot )) + if (( $TEST_UBOOT )) then - G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/linux-u-boot-$model-$branch.deb" + G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/testing/linux-u-boot-$model-$branch.deb" G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb G_EXEC rm package.deb fi From d78542db12a5e6b7258817a829831f569a50a882 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 2 Jun 2024 18:52:25 +0200 Subject: [PATCH 239/458] v9.5 - Odroid N2 | Do not flash dedicated U-Boot binary anymore. Armbian merged a commit stating to stabilise eMMC boots. If it really does not solve the issue, we will patch our Armbian fork for proper own U-Boot package builds instead. --- .build/images/dietpi-installer | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 001029a73e..cec46faaef 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1212,14 +1212,6 @@ _EOF_ G_CONFIG_INJECT 'user_overlays=' 'user_overlays=dietpi-usb-otg' /boot/dietpiEnv.txt G_EXEC apt-mark auto device-tree-compiler - # Workaround for Odroid N2 failing to boot from eMMC: https://forum.armbian.com/topic/20206-odroid-n2-issues-with-recent-firmware-and-emmc-modules/#comment-142409 - elif (( $G_HW_MODEL == 15 )) - then - G_EXEC curl -sSfo u-boot.gz 'https://dietpi.com/downloads/binaries/u-boot-odroidn2.bin.gz' - G_EXEC gzip -d u-boot.gz - G_EXEC dd if=u-boot "of=$BOOT_DEVICE" bs=512 seek=1 conv=notrunc,fdatasync - G_EXEC rm u-boot - # Workaround for NanoPi R1 failing boot: https://github.com/MichaIng/DietPi/issues/5927 elif (( $G_HW_MODEL == 48 )) then From 8def4296d152031b320428f9f8f560d70515fc7d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 2 Jun 2024 18:57:34 +0200 Subject: [PATCH 240/458] v9.5 - CI | Quartz64: Purge needrestart package from Ubuntu Noble GitHub runner, which causes a restart of the runner-provider service, terminating the workflow run: https://github.com/actions/runner-images/pull/9956 --- .github/workflows/quartz64.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/quartz64.yml b/.github/workflows/quartz64.yml index c65dabdd06..6d4c96d245 100644 --- a/.github/workflows/quartz64.yml +++ b/.github/workflows/quartz64.yml @@ -18,6 +18,8 @@ jobs: check-latest: true - name: Build init run: | + # Workaround for runner provider restart: https://github.com/actions/runner-images/pull/9956 + sudo apt-get -qq autopurge needrestart { python3 -m pip install --no-cache-dir -U pip setuptools wheel; python3 -m pip install --no-cache-dir -U pyelftools; } & { sudo apt-get -q update; sudo DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -qq install make gcc libc6-dev flex bison gcc-aarch64-linux-gnu bc libssl-dev swig; } & { curl -fO 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/snapshot/linux-rolling-stable.tar.gz'; tar xf linux-rolling-stable.tar.gz; rm linux-rolling-stable.tar.gz; } & From 7f46ac96c90605d34e8c31c9cedf49d0cf880ba3 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 2 Jun 2024 19:00:23 +0200 Subject: [PATCH 241/458] v9.5 - DietPi-Installer | Satisfy shellcheck and that way sanitize the new test kernel/bootloader environment variables --- .build/images/dietpi-installer | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index cec46faaef..9b6888afb7 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -31,6 +31,10 @@ # Core globals G_PROGRAM_NAME='DietPi-Installer' + # Input variables + [[ $TEST_KERNEL == 1 ]] || TEST_KERNEL=0 + [[ $TEST_UBOOT == 1 ]] || TEST_UBOOT=0 + #------------------------------------------------------------------------------------------------ # Critical checks and requirements to run this script #------------------------------------------------------------------------------------------------ From 114da56d23c0eb2ae5daffa5954675f03a901b5c Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 2 Jun 2024 19:04:36 +0200 Subject: [PATCH 242/458] v9.5 - CI | Quartz64: Remove leading "v" from U-Boot version string, after downloads have been finished. It does not appear in the contained directories. --- .github/workflows/quartz64.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/quartz64.yml b/.github/workflows/quartz64.yml index 6d4c96d245..b2917cedc4 100644 --- a/.github/workflows/quartz64.yml +++ b/.github/workflows/quartz64.yml @@ -25,8 +25,8 @@ jobs: { curl -fO 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/snapshot/linux-rolling-stable.tar.gz'; tar xf linux-rolling-stable.tar.gz; rm linux-rolling-stable.tar.gz; } & uboot_version=$(curl -sSf 'https://api.github.com/repos/u-boot/u-boot/tags' | mawk -F\" '/^ *"name": "v[0-9.]*",$/{print $4;exit}') [ "$uboot_version" ] || { echo 'ERROR: Failed to obtain latest U-Boot version'; exit 1; } - echo "uboot_version=$uboot_version" >> "$GITHUB_ENV" - { curl -fLO "https://github.com/u-boot/u-boot/archive/v$uboot_version.tar.gz"; tar xf "v$uboot_version.tar.gz"; rm "v$uboot_version.tar.gz"; } & + { curl -fLO "https://github.com/u-boot/u-boot/archive/$uboot_version.tar.gz"; tar xf "$uboot_version.tar.gz"; rm "$uboot_version.tar.gz"; } & + echo "uboot_version=${uboot_version#v}" >> "$GITHUB_ENV" wait curl -sSfo "u-boot-$uboot_version/ddr.bin" 'https://raw.githubusercontent.com/JeffyCN/mirrors/ddf03c1/bin/rk35/rk3568_ddr_1560MHz_v1.13.bin' & curl -sSfo "u-boot-$uboot_version/bl31.elf" 'https://raw.githubusercontent.com/JeffyCN/mirrors/6186deb/bin/rk35/rk3568_bl31_v1.28.elf' & From 3848cbdd1f50ada76de42605eb3f32bba07312eb Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 2 Jun 2024 19:17:45 +0200 Subject: [PATCH 243/458] v9.5 - CI | Quartz64: Writing to "$GITHUB_ENV" does not seem to override variables for the current step. --- .github/workflows/quartz64.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/quartz64.yml b/.github/workflows/quartz64.yml index b2917cedc4..f9687c86dc 100644 --- a/.github/workflows/quartz64.yml +++ b/.github/workflows/quartz64.yml @@ -26,7 +26,8 @@ jobs: uboot_version=$(curl -sSf 'https://api.github.com/repos/u-boot/u-boot/tags' | mawk -F\" '/^ *"name": "v[0-9.]*",$/{print $4;exit}') [ "$uboot_version" ] || { echo 'ERROR: Failed to obtain latest U-Boot version'; exit 1; } { curl -fLO "https://github.com/u-boot/u-boot/archive/$uboot_version.tar.gz"; tar xf "$uboot_version.tar.gz"; rm "$uboot_version.tar.gz"; } & - echo "uboot_version=${uboot_version#v}" >> "$GITHUB_ENV" + uboot_version=${uboot_version#v} + echo "uboot_version=$uboot_version" >> "$GITHUB_ENV" wait curl -sSfo "u-boot-$uboot_version/ddr.bin" 'https://raw.githubusercontent.com/JeffyCN/mirrors/ddf03c1/bin/rk35/rk3568_ddr_1560MHz_v1.13.bin' & curl -sSfo "u-boot-$uboot_version/bl31.elf" 'https://raw.githubusercontent.com/JeffyCN/mirrors/6186deb/bin/rk35/rk3568_bl31_v1.28.elf' & From 5216429a5a3ce519ae48d071bb85aaa875e7f8b6 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 2 Jun 2024 20:26:08 +0200 Subject: [PATCH 244/458] v9.5 - DietPi-Software | MediaWiki: Uploaded images are now preserved on reinstalls. --- CHANGELOG.txt | 2 ++ dietpi/dietpi-software | 11 ++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 10f42cd88d..b123e83fbf 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,9 +4,11 @@ v9.5 Enhancements: - Images | New DietPi images won't contain the "gnupg" package anymore, but "gpg" only, since other features of the suite are not required for our scripts anymore. E.g. "dirmngr" for interacting with keyservers, and "gpg-agent" for key passphrase inputs are hence missing. "gpg" however prints very clear error messages about what is missing. Let us know whether you find one of those GnuPG features too essential to not be pre-installed. - DietPi-Software | Jellyfin: Since a while FFmpeg 6 is available for Jellyfin, but on old installs with the old FFmpeg 5 package, it is not upgraded automatically by APT. This DietPi update applies the FFmpeg upgrade to all affected systems. Many thanks to @gioxx and @WolfganP for reporting this issue: https://github.com/MichaIng/DietPi/issues/7080 +- DietPi-Software | MediaWiki: Uploaded images are now preserved on reinstalls. Bug fixes: - Odroid C1/C2 | Resolved an issue on both SBCs where reboots could hang and a power cycle was required to get the device back up. Many thanks to @yandritos, @gociii and others for reporting this issue, and @gitmeister for providing the fix for Odroid C2: https://github.com/MichaIng/DietPi/issues/5414, https://github.com/MichaIng/DietPi/issues/6332 +- Orange Pi Zero 2W | Resolved an issue where the onboard Ethernet adapter did not work. - DietPi-Config | Resolved an issue where Advanced Options were not accessible on some SBCs. Many thanks to @thuehlinger for reporting this issue: https://github.com/MichaIng/DietPi/issues/6663#issuecomment-2108351878 - DietPi-Software | Snapcast Server: Resolved on issue where on RISC-V systems, the web interface was not available, since it is not included in the "snapserver" package from Debian. Many thanks to @hllhll for reporting this issue: https://github.com/MichaIng/DietPi/issues/7073 - DietPi-Software | Snapcast Server: Resolved an issue where on Bookworm systems, which installed the Snapcast Server before DietPi v9.4 and reinstalled it afterwards, the server failed to start due to a permissions issue, since the services of both packages use different users. Many thanks to @hllhll for reporting this issue: https://github.com/MichaIng/DietPi/issues/7073 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 342095dd32..3f5bbb6996 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -9949,7 +9949,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.17.2.4511/Prowlarr.master.1.17.2.4511.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.18.0.4543/Prowlarr.master.1.18.0.4543.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Prowlarr/Prowlarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}")" G_EXEC mv Prowlarr /opt/prowlarr fi @@ -11619,7 +11619,7 @@ _EOF_ fi # Get latest version - local fallback_url='https://releases.wikimedia.org/mediawiki/1.40/mediawiki-1.40.0.tar.gz' + local fallback_url='https://releases.wikimedia.org/mediawiki/1.41/mediawiki-1.41.1.tar.gz' Download_Install "$(curl -sSfL 'https://www.mediawiki.org/wiki/Download' | grep -o 'https://releases\.wikimedia\.org/mediawiki/[^/"]*/mediawiki-[^"]*\.tar\.gz' | head -1)" # Enable required PHP modules @@ -11647,12 +11647,17 @@ location ^~ /wiki/images { _EOF_ fi - # Reinstall: Clean install but preserve existing config file + # Reinstall: Clean install but preserve existing config and uploaded images if [[ -f '/var/www/wiki/LocalSettings.php' ]] then G_EXEC mv /var/www/wiki/LocalSettings.php mediawiki-*/ G_EXEC chmod 600 mediawiki-*/LocalSettings.php fi + if [[ -d '/var/www/wiki/images' ]] + then + G_EXEC cp -a mediawiki-*/images/{.htaccess,README} /var/www/wiki/images/ + G_EXEC cp -a /var/www/wiki/images/. mediawiki-*/images/ + fi G_EXEC chown -R www-data:www-data mediawiki-* [[ -d '/var/www/wiki' ]] && G_EXEC rm -R /var/www/wiki From b48086a320e2ab5ec3a9ff399ba4b540573e25cf Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 2 Jun 2024 22:45:48 +0200 Subject: [PATCH 245/458] v9.5 - Network | Assure that "ifupdown-pre.service" finishes before "ifup@.service" instances, like it does for "networking.service", by ordering it before "network-pre.target". A case has been found where udev settles very late, so that hotplug interfaces could be brought up earlier, causing race conditions with udev rules: https://github.com/MichaIng/DietPi/issues/6951#issuecomment-2143987213 --- .../etc/systemd/system/ifupdown-pre.service.d/dietpi.conf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rootfs/etc/systemd/system/ifupdown-pre.service.d/dietpi.conf b/rootfs/etc/systemd/system/ifupdown-pre.service.d/dietpi.conf index 2213d71b0d..9300cd2806 100644 --- a/rootfs/etc/systemd/system/ifupdown-pre.service.d/dietpi.conf +++ b/rootfs/etc/systemd/system/ifupdown-pre.service.d/dietpi.conf @@ -1,4 +1,9 @@ -# Assure that ifupdown-pre always waits for udev to settle: https://dietpi.com/forum/t/dietpi-8-2-2-wireguard-doesnt-start-after-reboot/6415/28?u=michaing +# Assure that ifupdown-pre always waits for udev to settle: https://dietpi.com/forum/t/dietpi-8-2-2-wireguard-doesnt-start-after-reboot/6415/28 +# Assure it finishes before ifup@.service instances start: https://github.com/MichaIng/DietPi/issues/6951 +[Unit] +Wants=network-pre.target +Before=network-pre.target + [Service] ExecStart= ExecStart=/bin/dash -c '[ "$CONFIGURE_INTERFACES" = "no" ] || [ ! -x /bin/udevadm ] || udevadm settle' From 311da5be4ac3bfe2855b41b4c6ef9f6a0c0325bd Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 2 Jun 2024 22:58:18 +0200 Subject: [PATCH 246/458] v9.5 - Radxa ZERO 3 | Onboard WiFi does now work OOTB on early ZERO 3W revisions with AP6212 WiFi chip. --- .build/images/dietpi-installer | 1 - .update/patches | 7 +++++-- CHANGELOG.txt | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 9b6888afb7..2b07e09d2f 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -695,7 +695,6 @@ setenv rootuuid "true"' /boot/boot.cmd 79) (( $HW_VARIANT == 2 )) && G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-nanopi-r6c.dtb' /boot/dietpiEnv.txt;; 85) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-rock-5a.dtb' /boot/dietpiEnv.txt;; 87) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3566-orangepi-3b.dtb' /boot/dietpiEnv.txt;; - 90) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3566-radxa-zero3.dtb' /boot/dietpiEnv.txt;; *) :;; esac case $G_HW_MODEL in diff --git a/.update/patches b/.update/patches index 67ec60037a..348747baa3 100755 --- a/.update/patches +++ b/.update/patches @@ -1639,8 +1639,11 @@ Patch_9_5() G_AGUG fi - # Flash new U-Boot on Odroid C1 - (( $G_HW_MODEL == 10 )) && /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc + # Flash new U-Boot on Odroid C1 and Radxa ZERO 3 + (( $G_HW_MODEL == 10 || $G_HW_MODEL == 90 )) && /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc + + # Do not hardcode device tree on Radxa ZERO 3, after flashing our new U-Boot, since it does now select the correct device tree with onboard WiFi support, based on hardware details. + (( $G_HW_MODEL == 90 )) && sed -i '/^fdtfile=rockchip/rk3566-radxa-zero3.dtb$/d' /boot/dietpiEnv.txt # Update MPD flag on Bookworm and above: https://github.com/MusicPlayerDaemon/MPD/commit/ce77b14 (( $G_DISTRO > 6 )) && [[ -f '/etc/systemd/system/mpd.service.d/dietpi.conf' ]] && G_EXEC sed -i 's/no-daemon/systemd/' /etc/systemd/system/mpd.service.d/dietpi.conf diff --git a/CHANGELOG.txt b/CHANGELOG.txt index b123e83fbf..3db854db9c 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,6 +3,7 @@ v9.5 Enhancements: - Images | New DietPi images won't contain the "gnupg" package anymore, but "gpg" only, since other features of the suite are not required for our scripts anymore. E.g. "dirmngr" for interacting with keyservers, and "gpg-agent" for key passphrase inputs are hence missing. "gpg" however prints very clear error messages about what is missing. Let us know whether you find one of those GnuPG features too essential to not be pre-installed. +- Radxa ZERO 3 | Onboard WiFi does now work OOTB on early ZERO 3W revisions with AP6212 WiFi chip. - DietPi-Software | Jellyfin: Since a while FFmpeg 6 is available for Jellyfin, but on old installs with the old FFmpeg 5 package, it is not upgraded automatically by APT. This DietPi update applies the FFmpeg upgrade to all affected systems. Many thanks to @gioxx and @WolfganP for reporting this issue: https://github.com/MichaIng/DietPi/issues/7080 - DietPi-Software | MediaWiki: Uploaded images are now preserved on reinstalls. From a3a4b3706de4f7e5015f2714d19424e7ca927200 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 3 Jun 2024 01:04:20 +0200 Subject: [PATCH 247/458] v9.5 - DietPi-Software/FS_partition_resize | Sync write buffer to disk before reboots, when we just did some important updates or changes. A proper shutdown sequence implies this, but just do it as failsafe step: https://github.com/MichaIng/DietPi/issues/6827#issuecomment-2144033523 --- dietpi/dietpi-software | 2 +- rootfs/etc/systemd/system/ifupdown-pre.service.d/dietpi.conf | 2 +- rootfs/var/lib/dietpi/services/fs_partition_resize.sh | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 3f5bbb6996..deb6748ebe 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -14422,7 +14422,7 @@ _EOF_ # Create a persistent flag to not repeat G_AGDUG and rule out a reboot loop when kernel modules remain missing G_EXEC eval '> /boot/dietpi/.skip_distro_upgrade' # Perform a reboot if required as of missing kernel modules - G_CHECK_KERNEL || { G_DIETPI-NOTIFY 2 'A reboot is done to finalise the kernel upgrade'; reboot; } + G_CHECK_KERNEL || { G_DIETPI-NOTIFY 2 'A reboot is done to finalise the kernel upgrade'; sync; reboot; } fi # Global PW diff --git a/rootfs/etc/systemd/system/ifupdown-pre.service.d/dietpi.conf b/rootfs/etc/systemd/system/ifupdown-pre.service.d/dietpi.conf index 9300cd2806..e02554a055 100644 --- a/rootfs/etc/systemd/system/ifupdown-pre.service.d/dietpi.conf +++ b/rootfs/etc/systemd/system/ifupdown-pre.service.d/dietpi.conf @@ -1,4 +1,4 @@ -# Assure that ifupdown-pre always waits for udev to settle: https://dietpi.com/forum/t/dietpi-8-2-2-wireguard-doesnt-start-after-reboot/6415/28 +# Assure that ifupdown-pre always waits for udev to settle: https://dietpi.com/forum/t/6415/28 # Assure it finishes before ifup@.service instances start: https://github.com/MichaIng/DietPi/issues/6951 [Unit] Wants=network-pre.target diff --git a/rootfs/var/lib/dietpi/services/fs_partition_resize.sh b/rootfs/var/lib/dietpi/services/fs_partition_resize.sh index f99f7d913f..cf74b97788 100755 --- a/rootfs/var/lib/dietpi/services/fs_partition_resize.sh +++ b/rootfs/var/lib/dietpi/services/fs_partition_resize.sh @@ -9,6 +9,7 @@ > /dietpi_skip_partition_resize systemctl enable dietpi-fs_partition_resize echo '[ INFO ] Rebooting to load the new partition table' + sync reboot exit 0 } @@ -117,7 +118,7 @@ # Maximise root filesystem if type is supported case $ROOT_FSTYPE in - 'ext'[234]) resize2fs "$ROOT_DEV" || reboot;; # Reboot if resizing fails: https://github.com/MichaIng/DietPi/issues/6149 + 'ext'[234]) resize2fs "$ROOT_DEV" || REBOOT=1;; # Reboot if resizing fails: https://github.com/MichaIng/DietPi/issues/6149 'f2fs') mount -o remount,ro / resize.f2fs "$ROOT_DEV" @@ -131,7 +132,7 @@ esac # Reboot if needed - (( $REBOOT )) && reboot + (( $REBOOT )) && { sync; reboot; } exit "$EXIT_CODE" } From f324d763ce890f2cbf53b8ae7f47c186b4f94de7 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 3 Jun 2024 16:44:06 +0200 Subject: [PATCH 248/458] v9.5 - NanoPi NEO | Resolved an issue where LEDs of this SBC could not be configured, due to a conflicting kernel patch. Many thanks to @mhjessen for reporting this issue: https://github.com/MichaIng/DietPi/issues/5401 --- CHANGELOG.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 3db854db9c..4d6276dd06 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -10,6 +10,7 @@ Enhancements: Bug fixes: - Odroid C1/C2 | Resolved an issue on both SBCs where reboots could hang and a power cycle was required to get the device back up. Many thanks to @yandritos, @gociii and others for reporting this issue, and @gitmeister for providing the fix for Odroid C2: https://github.com/MichaIng/DietPi/issues/5414, https://github.com/MichaIng/DietPi/issues/6332 - Orange Pi Zero 2W | Resolved an issue where the onboard Ethernet adapter did not work. +- NanoPi NEO | Resolved an issue where LEDs of this SBC could not be configured, due to a conflicting kernel patch. Many thanks to @mhjessen for reporting this issue: https://github.com/MichaIng/DietPi/issues/5401 - DietPi-Config | Resolved an issue where Advanced Options were not accessible on some SBCs. Many thanks to @thuehlinger for reporting this issue: https://github.com/MichaIng/DietPi/issues/6663#issuecomment-2108351878 - DietPi-Software | Snapcast Server: Resolved on issue where on RISC-V systems, the web interface was not available, since it is not included in the "snapserver" package from Debian. Many thanks to @hllhll for reporting this issue: https://github.com/MichaIng/DietPi/issues/7073 - DietPi-Software | Snapcast Server: Resolved an issue where on Bookworm systems, which installed the Snapcast Server before DietPi v9.4 and reinstalled it afterwards, the server failed to start due to a permissions issue, since the services of both packages use different users. Many thanks to @hllhll for reporting this issue: https://github.com/MichaIng/DietPi/issues/7073 From 9b2d8c16d6c1446ba7045266b24d7f0a48c67f97 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 3 Jun 2024 17:18:26 +0200 Subject: [PATCH 249/458] v9.5 - RC up --- .update/version | 2 +- dietpi/func/dietpi-globals | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.update/version b/.update/version index 35605ae2d5..c828917a5c 100644 --- a/.update/version +++ b/.update/version @@ -3,7 +3,7 @@ # Available DietPi version G_REMOTE_VERSION_CORE=9 G_REMOTE_VERSION_SUB=5 -G_REMOTE_VERSION_RC=-1 +G_REMOTE_VERSION_RC=0 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=7 G_MIN_VERSION_SUB=0 diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 29530bd360..f67adf1ab2 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -55,7 +55,7 @@ # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=9 [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=5 - [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=-1 + [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=0 [[ $G_GITBRANCH ]] || G_GITBRANCH='master' [[ $G_GITOWNER ]] || G_GITOWNER='MichaIng' # - Save current version and Git branch From 67a382df4773c97aa0f77cdd7be956872c22e5e2 Mon Sep 17 00:00:00 2001 From: Nils <961151+jcnils@users.noreply.github.com> Date: Mon, 3 Jun 2024 17:50:15 +0000 Subject: [PATCH 250/458] v9.5 (#7071) - Forgejo | This Gitea fork has been added to our software library. Read about the background of this fork here: https://forgejo.org/2022-12-15-hello-forgejo/. Many thanks to @Cs137 for requesting and @jcnils for implementing this software option: https://github.com/MichaIng/DietPi/discussions/6133, https://github.com/MichaIng/DietPi/pull/7071 --- .github/workflows/dietpi-software.bash | 5 +- .meta/dietpi-survey_report | 1 + CHANGELOG.txt | 3 ++ README.md | 1 + dietpi/dietpi-services | 1 + dietpi/dietpi-software | 71 +++++++++++++++++++++++++- 6 files changed, 78 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index d735537fa5..21d03629b6 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -88,7 +88,7 @@ Process_Software() 7) aCOMMANDS[i]='ffmpeg -version';; 9) aCOMMANDS[i]='node -v';; #16) aSERVICES[i]='microblog-pub' aTCP[i]='8007';; Service enters a CPU-intense internal error loop until it has been configured interactively via "microblog-pub configure", hence it is not enabled and started anymore after install but instead as part of "microblog-pub configure" - 17) aCOMMANDS[i]='git -v';; + 17) aCOMMANDS[i]='git --version';; # from Bookworm on, the shorthand "-v" is supported 28) aSERVICES[i]='vncserver' aTCP[i]='5901';; 29) aSERVICES[i]='xrdp' aTCP[i]='3389';; 30) aSERVICES[i]='nxserver' aTCP[i]='4000';; @@ -197,6 +197,7 @@ Process_Software() 172) aSERVICES[i]='wg-quick@wg0' aUDP[i]='51820';; 174) aCOMMANDS[i]='gimp -v';; 176) aSERVICES[i]='mycroft';; + 177) aSERVICES[i]='forgejo' aTCP[i]='3000'; (( $arch < 10 )) && aDELAY[i]=30;; 178) aSERVICES[i]='jellyfin' aTCP[i]='8097'; [[ $arch == [23] ]] && aDELAY[i]=300;; # jellyfin[9983]: arm-binfmt-P: ../../target/arm/translate.c:9659: thumb_tr_translate_insn: Assertion `(dc->base.pc_next & 1) == 0' failed. ### jellyfin[9983]: qemu: uncaught target signal 6 (Aborted) - core dumped ### about 5 times 179) aSERVICES[i]='komga' aTCP[i]='2037'; (( $arch == 10 )) && aDELAY[i]=30; (( $arch < 10 )) && aDELAY[i]=300;; 180) aSERVICES[i]='bazarr' aTCP[i]='6767'; (( $arch == 10 )) && aDELAY[i]=30; (( $arch < 10 )) && aDELAY[i]=90;; @@ -244,7 +245,7 @@ do 8|33|131|179|206) Process_Software 196;; 32|148|119) Process_Software 128;; 129) Process_Software 88 89 128 webserver;; - 49|165) Process_Software 88;; + 49|165|177) Process_Software 0 17 88;; #61) Process_Software 60;; # Cannot be installed in CI 125) Process_Software 194;; #86|134|185) Process_Software 162;; # Docker does not start in systemd containers (without dedicated network) diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index 01d059b89b..8328fd9b53 100755 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -719,6 +719,7 @@ shopt -s extglob aSOFTWARE_NAME9_4[i]=${aSOFTWARE_NAME9_3[i]} aSOFTWARE_NAME9_5[i]=${aSOFTWARE_NAME9_4[i]} done + aSOFTWARE_NAME9_5[177]='Forgejo' # Pre-create software counter array so that we can see also software (available in newest version) with 0 installs for i in "${aSOFTWARE_NAME9_5[@]}" diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 4d6276dd06..f54024ac35 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,6 +1,9 @@ v9.5 (2024-06-08) +New software: +- Forgejo | This Gitea fork has been added to our software library. Read about the background of this fork here: https://forgejo.org/2022-12-15-hello-forgejo/. Many thanks to @Cs137 for requesting and @jcnils for implementing this software option: https://github.com/MichaIng/DietPi/discussions/6133, https://github.com/MichaIng/DietPi/pull/7071 + Enhancements: - Images | New DietPi images won't contain the "gnupg" package anymore, but "gpg" only, since other features of the suite are not required for our scripts anymore. E.g. "dirmngr" for interacting with keyservers, and "gpg-agent" for key passphrase inputs are hence missing. "gpg" however prints very clear error messages about what is missing. Let us know whether you find one of those GnuPG features too essential to not be pre-installed. - Radxa ZERO 3 | Onboard WiFi does now work OOTB on early ZERO 3W revisions with AP6212 WiFi chip. diff --git a/README.md b/README.md index 68f36bb638..a6805bf5bf 100644 --- a/README.md +++ b/README.md @@ -339,6 +339,7 @@ Links to hardware and software manufacturers, sources and build instructions use - [Homebridge](https://github.com/homebridge/homebridge) - [ADS-B Feeder](https://github.com/dirkhh/adsb-feeder-image) - [Kavita](https://github.com/Kareadita/Kavita) +- [Forgejo](https://codeberg.org/forgejo/forgejo) --- diff --git a/dietpi/dietpi-services b/dietpi/dietpi-services index b597d02137..07d9a13610 100755 --- a/dietpi/dietpi-services +++ b/dietpi/dietpi-services @@ -207,6 +207,7 @@ _EOF_ 'urbackupsrv' 'gogs' 'gitea' + 'forgejo' 'vaultwarden' 'filebrowser' diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index deb6748ebe..4cfd783433 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -806,7 +806,7 @@ Available commands: aSOFTWARE_CATX[$software_id]=4 aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/cloud/#gogs' aSOFTWARE_DEPS[$software_id]='17 88 0' - aSOFTWARE_CONFLICTS[$software_id]='165' + aSOFTWARE_CONFLICTS[$software_id]='165 177' #------------------ software_id=50 aSOFTWARE_NAME[$software_id]='Syncthing' @@ -838,10 +838,20 @@ Available commands: aSOFTWARE_CATX[$software_id]=4 aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/cloud/#gitea' aSOFTWARE_DEPS[$software_id]='17 88 0' - aSOFTWARE_CONFLICTS[$software_id]='49' + aSOFTWARE_CONFLICTS[$software_id]='49 177' # - RISC-V: Missing binary: https://github.com/go-gitea/gitea/releases aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,11]=0 #------------------ + software_id=177 + aSOFTWARE_NAME[$software_id]='Forgejo' + aSOFTWARE_DESC[$software_id]='Self-hosted lightweight software forge. Fork of Gitea.' + aSOFTWARE_CATX[$software_id]=4 + aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/cloud/#forgejo' + aSOFTWARE_DEPS[$software_id]='17 88 0' + aSOFTWARE_CONFLICTS[$software_id]='49 165' + # - RISC-V: Missing binary: https://codeberg.org/forgejo/forgejo/releases + aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,11]=0 + #------------------ software_id=183 aSOFTWARE_NAME[$software_id]='vaultwarden' aSOFTWARE_DESC[$software_id]='Unofficial Bitwarden password manager server written in Rust' @@ -10630,6 +10640,52 @@ _EOF_ [[ -f '/mnt/dietpi_userdata/gitea/custom/conf/app.ini' ]] && G_CONFIG_INJECT 'RUN_USER[[:blank:]]' 'RUN_USER = gitea' /mnt/dietpi_userdata/gitea/custom/conf/app.ini fi + if To_Install 177 forgejo # Forgejo + then + # ARMv7: Dedicated binaries are not provided: https://codeberg.org/forgejo/forgejo/releases + case $G_HW_ARCH in + 3) local arch='arm64';; + 10) local arch='amd64';; + *) local arch='arm-6';; + esac + + local fallback_url="https://codeberg.org/forgejo/forgejo/releases/download/v7.0.3/forgejo-7.0.3-linux-$arch.xz" + Download_Install "$(curl -sSfL 'https://codeberg.org/api/v1/repos/forgejo/forgejo/releases/latest' | mawk -v RS=, -F\" "/^\"browser_download_url\":\".*-linux-$arch\.xz\"/{print \$4;exit}")" /mnt/dietpi_userdata/forgejo/forgejo + + # User + Create_User -d /mnt/dietpi_userdata/forgejo -s /bin/dash forgejo + + # Permissions + G_EXEC chown -R forgejo:forgejo /mnt/dietpi_userdata/forgejo + G_EXEC chmod +x /mnt/dietpi_userdata/forgejo/forgejo + + # Database + /boot/dietpi/func/create_mysql_db forgejo forgejo "$GLOBAL_PW" + + # Service + cat << '_EOF_' > /etc/systemd/system/forgejo.service +[Unit] +Description=Forgejo (DietPi) +Wants=network-online.target +After=network-online.target mariadb.service + +[Service] +User=forgejo +LogsDirectory=forgejo +WorkingDirectory=/mnt/dietpi_userdata/forgejo +ExecStart=/mnt/dietpi_userdata/forgejo/forgejo web + +# Hardening +ProtectSystem=full +PrivateDevices=yes +PrivateTmp=yes +NoNewPrivileges=true + +[Install] +WantedBy=multi-user.target +_EOF_ + fi + if To_Install 163 gmediarender # GMediaRender then G_AGI gmediarender @@ -13557,6 +13613,17 @@ _EOF_ Remove_Database gitea fi + if To_Uninstall 177 # Forgejo + then + Remove_Service forgejo 1 1 + + # Data + [[ -d '/mnt/dietpi_userdata/forgejo' ]] && G_EXEC rm -R /mnt/dietpi_userdata/forgejo + [[ -d '/var/log/forgejo' ]] && G_EXEC rm -R /var/log/forgejo + + Remove_Database forgejo + fi + if To_Uninstall 166 # Audiophonics PI-SPC then Remove_Service pi-spc From 9cc51dcf17534c7fe6a5656c65f836debc313d53 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 4 Jun 2024 00:53:14 +0200 Subject: [PATCH 251/458] v9.5 - CHANGELOG | Set release PR URL --- CHANGELOG.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f54024ac35..065336bfc0 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -21,7 +21,7 @@ Bug fixes: - DietPi-Software | Box64: Resolved an issue where an invalid build target was used on Raspberry Pi 5 with 16k page size kernel. This target was removed with latest Box64, as page size handling is now done at runtime. - DietPi-Software | Jellyfin: Resolved an issue where the intended HTTP port change could not be applied, since the network config file is not created anymore at service start. We do now pre-create a minimal one, which is complemented with defaults automatically. -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/7098 ----------------------------------------------------------------------------------------------------------- From 43770fe202034d5dd17ab21f58fd2a76052f6530 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 4 Jun 2024 01:39:34 +0200 Subject: [PATCH 252/458] v9.5 - DietPi-Installer | Enhance generic kernel package detection for generic device choices, by keeping all packages which contain files below /lib/modules and /boot. --- .build/images/dietpi-installer | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 2b07e09d2f..abebfe898e 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1426,10 +1426,10 @@ _EOF_ G_EXEC rm -f /{initrd.img,vmlinuz}{,.old} fi - # Generic kernel + device tree + U-Boot package auto detect + initramfs-tools + # Generic kernel, device tree, bootloader and firmware package auto detect + initramfs-tools elif (( $G_HW_MODEL != 75 )) then - mapfile -t apackages < <(dpkg-query -Wf '${Package}\n' | grep -E '^linux-(image|dtb|u-boot)-|^u-boot') + mapfile -t apackages < <({ dpkg-query -Wf '${Package}\n' | grep -E '^linux-(image|dtb)|u-boot|bootloader|firmware'; dpkg-query -S /{lib/modules,boot}/* 2> /dev/null | sed 's/:.*//;s/, /\n/g'; } | sort -u) [[ ${apackages[0]} ]] || G_DIETPI-NOTIFY 2 'Unable to find kernel packages for installation. Assuming non-APT/.deb kernel installation.' G_AGI initramfs-tools "${apackages[@]}" unset -v apackages From f37420f5b1645299017fd44bf0a9ba922f1fbd39 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 4 Jun 2024 21:33:12 +0200 Subject: [PATCH 253/458] v9.5 - DietPi-Software | Update fallback URLs - DietPi-Build | Align pre-installed packages with DietPi-Installer --- .build/images/dietpi-build | 5 +++-- dietpi/dietpi-software | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 3442571a38..ee1e83efef 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -388,9 +388,10 @@ G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/run G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/cache/apt G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/lib/apt/lists G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/log -packages='apt,bash-completion,bzip2,ca-certificates,cron,curl,fdisk,gnupg,htop,iputils-ping,locales,nano,p7zip,parted,procps,psmisc,sudo,systemd-sysv,tzdata,udev,unzip,wget,whiptail,' +packages='apt,bash-completion,bzip2,ca-certificates,cron,curl,fdisk,gpg,htop,iputils-ping,locales,mawk,nano,parted,procps,psmisc,sudo,systemd-sysv,tzdata,udev,unzip,wget,whiptail,' +(( $DISTRO > 7 )) && apackages+='7zip,' || apackages+='p7zip,' [[ $HW_MODEL == 75 ]] && packages+='iproute2' || packages+='console-setup,dropbear,ethtool,fake-hwclock,ifupdown,isc-dhcp-client,kmod,rfkill,systemd-timesyncd,usbutils' -#G_EXEC_POST_FUNC(){ [[ $exit_code == 0 ]] || cat rootfs/debootstrap/debootstrap.log; } +# - "--skip=check/empty" to ignore /etc/fstab, boot and tmpfs mounts we added above G_EXEC_OUTPUT=1 G_EXEC mmdebstrap --skip=check/empty --variant=minbase --include="$packages" --arch="$parch" --keyring="$keyring" "$distro" ./rootfs "$repo" G_EXEC umount rootfs/dev rootfs/run rootfs/var/cache/apt rootfs/var/lib/apt/lists rootfs/var/log diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 4cfd783433..68ec263c25 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8925,7 +8925,7 @@ _EOF_ *) local arch='arm';; esac - local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.27.7/syncthing-linux-$arch-v1.27.7.tar.gz" + local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.27.8/syncthing-linux-$arch-v1.27.8.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/syncthing/syncthing/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/syncthing-linux-$arch-[^\"\/]*\.tar\.gz\"/{print \$4}")" G_EXEC mv syncthing-* /opt/syncthing fi @@ -11177,7 +11177,7 @@ _EOF_ # v3 drops PHP 7.4 support: https://github.com/TasmoAdmin/TasmoAdmin/releases/tag/v3.0.0 if (( $G_DISTRO > 6 )) then - local fallback_url='https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v4.1.0/tasmoadmin_v4.1.0.tar.gz' + local fallback_url='https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v4.1.1/tasmoadmin_v4.1.1.tar.gz' Download_Install "$(curl -sSfL 'https://api.github.com/repos/TasmoAdmin/TasmoAdmin/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/tasmoadmin_v[^"\/]*\.tar\.gz"$/{print $4}')" else Download_Install 'https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v2.4.2/tasmoadmin_v2.4.2.tar.gz' From 6c04c86d70d22e827a8290c5c6177dfeb8d93cc7 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 4 Jun 2024 21:40:07 +0200 Subject: [PATCH 254/458] v9.5 - DietPi-Build | Fix variable name --- .build/images/dietpi-build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index ee1e83efef..fb4c2ab2ab 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -389,7 +389,7 @@ G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/cache/apt G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/lib/apt/lists G_EXEC mount -o X-mount.mkdir -t tmpfs tmpfs rootfs/var/log packages='apt,bash-completion,bzip2,ca-certificates,cron,curl,fdisk,gpg,htop,iputils-ping,locales,mawk,nano,parted,procps,psmisc,sudo,systemd-sysv,tzdata,udev,unzip,wget,whiptail,' -(( $DISTRO > 7 )) && apackages+='7zip,' || apackages+='p7zip,' +(( $DISTRO > 7 )) && packages+='7zip,' || packages+='p7zip,' [[ $HW_MODEL == 75 ]] && packages+='iproute2' || packages+='console-setup,dropbear,ethtool,fake-hwclock,ifupdown,isc-dhcp-client,kmod,rfkill,systemd-timesyncd,usbutils' # - "--skip=check/empty" to ignore /etc/fstab, boot and tmpfs mounts we added above G_EXEC_OUTPUT=1 G_EXEC mmdebstrap --skip=check/empty --variant=minbase --include="$packages" --arch="$parch" --keyring="$keyring" "$distro" ./rootfs "$repo" From d2b00792f54475b2b8f7258ddb2c237f1bde647c Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 8 Jun 2024 20:54:32 +0200 Subject: [PATCH 255/458] v9.5 - DietPi-Drive_Manager | Do not set APM anymore. It is not supported often by modern HDDs, and some SSDs instead weirdly support it, where APM 127 leads to lower transfer speeds, which is of course even for energy usage total nonsense (longer transfer=activity times). The HDDs I can test, spin down as well when leaving APM untouched, when using "force_spindown_time" only. APM < 128 instead sometimes overrides the spindown time, and spins down the disk much faster, which again can have negative impact on the life time of spinning disk. Generally the effect of APM is mostly undefined, often negative, in this regards reasonably not supported by modern drives, hence we should not touch it. --- .build/images/dietpi-installer | 4 ++-- dietpi/dietpi-drive_manager | 34 ++++++++++++++-------------------- dietpi/dietpi-software | 2 +- 3 files changed, 17 insertions(+), 23 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index abebfe898e..71d6d33933 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -2026,8 +2026,8 @@ _EOF_' if (( $G_HW_MODEL != 20 && $G_HW_MODEL != 75 )) then G_EXEC_DESC='Configuring hdparm' - # Since Debian Bullseye, spindown_time is not applied if APM is not supported by the drive. force_spindown_time is required to override that. - G_EXEC eval 'echo -e '\''apm = 127\nforce_spindown_time = 120'\'' > /etc/hdparm.conf' + # Spin down disks after 10 minutes by default, regardless whether they support APM (spindown_time vs force_spindown_time): https://manpages.debian.org/hdparm#S + G_CONFIG_INJECT 'force_spindown_time[[:blank:]=]' 'force_spindown_time = 120' /etc/hdparm.conf fi # RPi diff --git a/dietpi/dietpi-drive_manager b/dietpi/dietpi-drive_manager index 8a720cc14c..7a18cd438f 100755 --- a/dietpi/dietpi-drive_manager +++ b/dietpi/dietpi-drive_manager @@ -893,11 +893,10 @@ Do you wish to ignore this warning, and, mount the drive regardless?" || return TARGETMENUID=3 # Add network drive menu - elif [[ $G_WHIP_RETURNED_VALUE == 'Idle Spindown' ]]; then - - local apm=127 # Hardcode to highest value that still allows spin-down + elif [[ $G_WHIP_RETURNED_VALUE == 'Idle Spindown' ]] + then local current_spindown= - [[ -f '/etc/hdparm.conf' ]] && current_spindown=$(mawk '/spindown_time/{print $3;exit}' /etc/hdparm.conf) + [[ -f '/etc/hdparm.conf' ]] && current_spindown=$(sed -n '/^[[:blank:]]*force_spindown_time[[:blank:]=]/{s/^[^=]*=[[:blank:]]*//p;q}' /etc/hdparm.conf) disable_error=1 G_CHECK_VALIDINT "$current_spindown" 0 251 && G_WHIP_DEFAULT_ITEM=$current_spindown || G_WHIP_DEFAULT_ITEM=241 G_WHIP_MENU_ARRAY=('0' ': Disabled') @@ -905,35 +904,30 @@ Do you wish to ignore this warning, and, mount the drive regardless?" || return local minutes seconds text for i in {12..251} do - if (( $i < 241 )); then - + if (( $i < 241 )) + then minutes=$(( $i * 5 / 60 )) seconds=$(( $i * 5 % 60 )) - text="$minutes Minute" (( $minutes > 1 )) && text+='s' (( $seconds )) && text+=", $seconds Seconds" - else - text=" $(( ( $i - 240 ) * 30 )) Minutes" - fi G_WHIP_MENU_ARRAY+=("$i" ": $text") done - if G_WHIP_MENU 'Please select an idle duration of time, before each drive is powered down: - - This will be applied to all drives on the system - - Not all drives support the feature of "hdparm" and visa versa. End results may vary. - - You can check status with "hdparm -C [sh]d[a-z]"'; then - - G_DIETPI-NOTIFY 2 'Applying spindown timeout to all drives now...' - hdparm -B "$apm" -S "$G_WHIP_RETURNED_VALUE" /dev/[sh]d[a-z] - - G_DIETPI-NOTIFY 2 'Applying spindown timeout to /etc/hdparm.conf to be effective from next boot on...' - echo -e "apm = $apm\nforce_spindown_time = $G_WHIP_RETURNED_VALUE" > /etc/hdparm.conf + if G_WHIP_MENU 'Please select an idle duration of time, before drives are powered down: + - This will be applied to all drives on the system. + - Not all drives support the features of "hdparm". End results may vary. + - You can check status with "hdparm -C /dev/[sh]d[a-z]"' + then + G_DIETPI-NOTIFY 2 'Applying spindown timeout to all drives now ...' + G_EXEC_NOHALT=1 G_EXEC hdparm -S "$G_WHIP_RETURNED_VALUE" /dev/[sh]d[a-z] + G_DIETPI-NOTIFY 2 'Applying spindown timeout to /etc/hdparm.conf as default from next boot on ...' + G_CONFIG_INJECT 'force_spindown_time[[:blank:]=]' "force_spindown_time = $G_WHIP_RETURNED_VALUE" /etc/hdparm.conf fi # Edit drive diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 68ec263c25..6dfde14245 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -7051,7 +7051,7 @@ _EOF_ aDEPS=() else local version=$(curl -sSfL 'https://api.github.com/repos/FreshRSS/FreshRSS/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}') - [[ $version ]] || { version='1.24.0'; G_DIETPI-NOTIFY 1 "Automatic latest FreshRSS version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } + [[ $version ]] || { version='1.24.1'; G_DIETPI-NOTIFY 1 "Automatic latest FreshRSS version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } Download_Install "https://github.com/FreshRSS/FreshRSS/archive/$version.tar.gz" G_EXEC mv "FreshRSS-$version" /opt/FreshRSS fi From 475d5814a853112590a495a698ea9d1c34419e0a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 8 Jun 2024 20:55:07 +0200 Subject: [PATCH 256/458] v9.5 - RC up --- .update/version | 2 +- dietpi/func/dietpi-globals | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.update/version b/.update/version index c828917a5c..3058b8362e 100644 --- a/.update/version +++ b/.update/version @@ -3,7 +3,7 @@ # Available DietPi version G_REMOTE_VERSION_CORE=9 G_REMOTE_VERSION_SUB=5 -G_REMOTE_VERSION_RC=0 +G_REMOTE_VERSION_RC=1 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=7 G_MIN_VERSION_SUB=0 diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index f67adf1ab2..06a70c3942 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -55,7 +55,7 @@ # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=9 [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=5 - [[ $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 From 486a2d4838957b5f35925ced17f77400396978bc Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 8 Jun 2024 21:14:41 +0200 Subject: [PATCH 257/458] v9.5 - DietPi-Build | Use systemd for binfmt support and assure QEMU configs are registered --- .build/images/dietpi-build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index fb4c2ab2ab..72b10d7ef1 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -223,13 +223,16 @@ fi (( $efi_size )) || [[ $boot_size -gt 0 && $boot_fstype == 'fat'* ]] && apackages+=('dosfstools') # Emulation support in case of incompatible architecture -(( ( $G_HW_ARCH < 10 && $G_HW_ARCH < $HW_ARCH ) || ( ( $G_HW_ARCH == 10 || $G_HW_ARCH == 11 ) && $G_HW_ARCH != $HW_ARCH ) )) && apackages+=('qemu-user-static' 'binfmt-support') +(( ( $G_HW_ARCH < 10 && $G_HW_ARCH < $HW_ARCH ) || ( ( $G_HW_ARCH == 10 || $G_HW_ARCH == 11 ) && $G_HW_ARCH != $HW_ARCH ) )) && apackages+=('qemu-user-static') # Virtual machine disk conversion [[ $VMTYPE && $VMTYPE != 'raw' ]] && apackages+=('qemu-utils') G_AG_CHECK_INSTALL_PREREQ parted mmdebstrap dbus systemd-container xz-utils "${apackages[@]}" +# Register QEMU binfmt configs +dpkg-query -s 'qemu-user-static' &> /dev/null && G_EXEC systemctl restart systemd-binfmt + # Bootstrap archive keyring if missing if [[ ! -f $keyring ]] then From 8fad3e1f028a8f2dcf07f8035a19fa6a3ee15668 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 8 Jun 2024 21:20:16 +0200 Subject: [PATCH 258/458] v9.5 - CI | Use systemd-binfmt in all cases. No idea why we used "binfmt-support" in the first place --- .build/software/Amiberry/container_build.bash | 5 ++++- .build/software/dietpi-software-build.bash | 5 ++++- .github/workflows/dietpi-software.bash | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.build/software/Amiberry/container_build.bash b/.build/software/Amiberry/container_build.bash index 7b88ee0014..18b95af376 100755 --- a/.build/software/Amiberry/container_build.bash +++ b/.build/software/Amiberry/container_build.bash @@ -59,9 +59,12 @@ image="DietPi_Container-$image.img" # Dependencies ########################################## apackages=('xz-utils' 'parted' 'fdisk' 'systemd-container') -(( $G_HW_ARCH == $arch || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $arch ) )) || apackages+=('qemu-user-static' 'binfmt-support') +(( $G_HW_ARCH == $arch || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $arch ) )) || apackages+=('qemu-user-static') G_AG_CHECK_INSTALL_PREREQ "${apackages[@]}" +# Register QEMU binfmt configs +dpkg-query -s 'qemu-user-static' &> /dev/null && G_EXEC systemctl restart systemd-binfmt + ########################################## # Prepare container ########################################## diff --git a/.build/software/dietpi-software-build.bash b/.build/software/dietpi-software-build.bash index 922283360b..de37c10ab5 100644 --- a/.build/software/dietpi-software-build.bash +++ b/.build/software/dietpi-software-build.bash @@ -63,9 +63,12 @@ image="DietPi_Container-$image.img" # Dependencies ########################################## apackages=('xz-utils' 'parted' 'fdisk' 'systemd-container') -(( $G_HW_ARCH == $arch || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $arch ) )) || apackages+=('qemu-user-static' 'binfmt-support') +(( $G_HW_ARCH == $arch || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $arch ) )) || apackages+=('qemu-user-static') G_AG_CHECK_INSTALL_PREREQ "${apackages[@]}" +# Register QEMU binfmt configs +dpkg-query -s 'qemu-user-static' &> /dev/null && G_EXEC systemctl restart systemd-binfmt + ########################################## # Prepare container ########################################## diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index 21d03629b6..518c360924 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -260,9 +260,12 @@ done # Dependencies ########################################## apackages=('xz-utils' 'parted' 'fdisk' 'systemd-container') -(( $G_HW_ARCH == $arch || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $arch ) )) || apackages+=('qemu-user-static' 'binfmt-support') +(( $G_HW_ARCH == $arch || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $arch ) )) || apackages+=('qemu-user-static') G_AG_CHECK_INSTALL_PREREQ "${apackages[@]}" +# Register QEMU binfmt configs +dpkg-query -s 'qemu-user-static' &> /dev/null && G_EXEC systemctl restart systemd-binfmt + ########################################## # Prepare container ########################################## From a4b124848b0ada6587b9d6306b90285946f5bfcd Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 9 Jun 2024 18:22:45 +0200 Subject: [PATCH 259/458] v9.5 - Quartz64/Star64/VisionFive 2 | dm-crypt/LUCS support has been added to the kernel for those two SBCs. Many thanks to @gxsw for reporting this missing feature: https://github.com/MichaIng/DietPi/issues/7091 --- .build/images/Quartz64/quartz64_defconfig | 1 + CHANGELOG.txt | 1 + dietpi/dietpi-software | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.build/images/Quartz64/quartz64_defconfig b/.build/images/Quartz64/quartz64_defconfig index 64a28852d8..adea7ecf51 100644 --- a/.build/images/Quartz64/quartz64_defconfig +++ b/.build/images/Quartz64/quartz64_defconfig @@ -158,6 +158,7 @@ CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y CONFIG_DMADEVICES=y CONFIG_DMA_CMA=y +CONFIG_DM_CRYPT=m CONFIG_DM_MIRROR=m CONFIG_DM_ZERO=m CONFIG_DRM=y diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 065336bfc0..2dfae20de8 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -7,6 +7,7 @@ New software: Enhancements: - Images | New DietPi images won't contain the "gnupg" package anymore, but "gpg" only, since other features of the suite are not required for our scripts anymore. E.g. "dirmngr" for interacting with keyservers, and "gpg-agent" for key passphrase inputs are hence missing. "gpg" however prints very clear error messages about what is missing. Let us know whether you find one of those GnuPG features too essential to not be pre-installed. - Radxa ZERO 3 | Onboard WiFi does now work OOTB on early ZERO 3W revisions with AP6212 WiFi chip. +- Quartz64/Star64/VisionFive 2 | dm-crypt/LUCS support has been added to the kernel for those two SBCs. Many thanks to @gxsw for reporting this missing feature: https://github.com/MichaIng/DietPi/issues/7091 - DietPi-Software | Jellyfin: Since a while FFmpeg 6 is available for Jellyfin, but on old installs with the old FFmpeg 5 package, it is not upgraded automatically by APT. This DietPi update applies the FFmpeg upgrade to all affected systems. Many thanks to @gioxx and @WolfganP for reporting this issue: https://github.com/MichaIng/DietPi/issues/7080 - DietPi-Software | MediaWiki: Uploaded images are now preserved on reinstalls. diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 6dfde14245..c723ca8201 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -10033,7 +10033,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.27.2538/Readarr.develop.0.3.27.2538.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.28.2554/Readarr.develop.0.3.28.2554.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Readarr/Readarr/releases' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}" | head -1)" G_EXEC mv Readarr /opt/readarr fi From 7582822bce888924208bd2f824a08fb24c3011db Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 9 Jun 2024 18:33:03 +0200 Subject: [PATCH 260/458] v9.5 - DietPi-Login | Try to install ncurses-term with sudo, when logging in as non-root user: https://github.com/MichaIng/DietPi/issues/6947 --- rootfs/etc/bashrc.d/dietpi.bash | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/rootfs/etc/bashrc.d/dietpi.bash b/rootfs/etc/bashrc.d/dietpi.bash index 16d90c0f86..e3512dd2b0 100644 --- a/rootfs/etc/bashrc.d/dietpi.bash +++ b/rootfs/etc/bashrc.d/dietpi.bash @@ -89,9 +89,17 @@ G_WHIP_DEFAULT_ITEM=1 fi - G_PROGRAM_NAME='Unsupported SSH client terminal' G_WHIP_MENU "[WARNING] Your SSH client passed an unsupported terminal: TERM=$TERM_old + if G_PROGRAM_NAME='Unsupported SSH client terminal' G_WHIP_MENU "[WARNING] Your SSH client passed an unsupported terminal: TERM=$TERM_old \nAs a workaround, we fooled the server by setting TERM=$TERM. This is not the cleanest solution as commands may use control sequences which are not supported by the current terminal. -\nPlease change your SSH clients terminal, respectively the passed \$TERM string$ncurses_term." && (( $G_WHIP_RETURNED_VALUE )) && G_AGI ncurses-term +\nPlease change your SSH clients terminal, respectively the passed \$TERM string$ncurses_term." && (( $G_WHIP_RETURNED_VALUE )) + then + if (( $UID )) + then + G_SUDO G_AGI ncurses-term + else + G_AGI ncurses-term + fi + fi unset -v TERM_old ncurses_term fi unset -v term From 305257d2310da0982dadffba4109a7e6d32c2903 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 9 Jun 2024 18:40:33 +0200 Subject: [PATCH 261/458] v9.5 - CHANGELOG | Update release date --- CHANGELOG.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 2dfae20de8..398da0455d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,5 @@ v9.5 -(2024-06-08) +(2024-06-09) New software: - Forgejo | This Gitea fork has been added to our software library. Read about the background of this fork here: https://forgejo.org/2022-12-15-hello-forgejo/. Many thanks to @Cs137 for requesting and @jcnils for implementing this software option: https://github.com/MichaIng/DietPi/discussions/6133, https://github.com/MichaIng/DietPi/pull/7071 From 2c44fa09df034f7abe5c596beada12474f8ecf30 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 10 Jun 2024 16:41:16 +0200 Subject: [PATCH 262/458] v9.6 - DietPi-Software | Ampache: Update fallback URL --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index c723ca8201..4f5b75893e 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -7541,7 +7541,7 @@ _EOF_ local json=() [[ $PHP_VERSION == 8* ]] || aDEPS+=("php$PHP_VERSION-json") json=('json') - local fallback_url="https://github.com/ampache/ampache/releases/download/6.4.0/ampache-6.4.0_all_php$PHP_VERSION.zip" + local fallback_url="https://github.com/ampache/ampache/releases/download/6.5.0/ampache-6.5.0_all_php$PHP_VERSION.zip" Download_Install "$(curl -sSfL 'https://api.github.com/repos/ampache/ampache/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/ampache-[0-9\.]*_all_php$PHP_VERSION.zip\"$/{print \$4}")" ampache # Reinstall: Preserve configs from old and new paths From a0264534245f964fec57cbfa1d1765889a7e866d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 10 Jun 2024 20:45:08 +0200 Subject: [PATCH 263/458] v9.5 - Quartz64/Star64/VisionFive 2 | The extended attribute handler for ext4 security labels "CONFIG_EXT4_FS_SECURITY" has been enabled for these SBCs, required for some Docker containers. Many thanks to @gxsw for reporting this missing feature: https://github.com/MichaIng/DietPi/issues/7102 --- .build/images/Quartz64/quartz64_defconfig | 1 + CHANGELOG.txt | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/.build/images/Quartz64/quartz64_defconfig b/.build/images/Quartz64/quartz64_defconfig index adea7ecf51..76e8c5888c 100644 --- a/.build/images/Quartz64/quartz64_defconfig +++ b/.build/images/Quartz64/quartz64_defconfig @@ -209,6 +209,7 @@ CONFIG_ENERGY_MODEL=y CONFIG_EXT2_FS=y CONFIG_EXT3_FS=y CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_EXT4_FS_SECURITY=y CONFIG_EXTCON_ADC_JACK=y CONFIG_EXTCON_GPIO=y CONFIG_EXTCON_USB_GPIO=y diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 398da0455d..dcc08c4a8f 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,16 @@ +v9.6 +(2024-07-06) + +Enhancements: +- Quartz64/Star64/VisionFive 2 | The extended attribute handler for ext4 security labels "CONFIG_EXT4_FS_SECURITY" has been enabled for these SBCs, required for some Docker containers. Many thanks to @gxsw for reporting this missing feature: https://github.com/MichaIng/DietPi/issues/7102 + +Bug fixes: +- + +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 + +----------------------------------------------------------------------------------------------------------- + v9.5 (2024-06-09) From 2a0f2314d2d534b38f48ec9a67bf76e4c5bd934a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 10 Jun 2024 21:11:02 +0200 Subject: [PATCH 264/458] Init v9.6 --- .meta/dietpi-survey_report | 8 +++++++- .update/version | 4 ++-- CHANGELOG.txt | 2 +- dietpi/func/dietpi-globals | 4 ++-- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index 8328fd9b53..690509e96c 100755 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -721,8 +721,14 @@ shopt -s extglob done aSOFTWARE_NAME9_5[177]='Forgejo' + aSOFTWARE_NAME9_6=() + for i in "${!aSOFTWARE_NAME9_5[@]}" + do + aSOFTWARE_NAME9_6[i]=${aSOFTWARE_NAME9_5[i]} + done + # Pre-create software counter array so that we can see also software (available in newest version) with 0 installs - for i in "${aSOFTWARE_NAME9_5[@]}" + for i in "${aSOFTWARE_NAME9_6[@]}" do aSOFTWARE[$i]=0 done diff --git a/.update/version b/.update/version index 3058b8362e..c0cf4610de 100644 --- a/.update/version +++ b/.update/version @@ -2,8 +2,8 @@ # shellcheck disable=SC2034 # Available DietPi version G_REMOTE_VERSION_CORE=9 -G_REMOTE_VERSION_SUB=5 -G_REMOTE_VERSION_RC=1 +G_REMOTE_VERSION_SUB=6 +G_REMOTE_VERSION_RC=-1 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=7 G_MIN_VERSION_SUB=0 diff --git a/CHANGELOG.txt b/CHANGELOG.txt index dcc08c4a8f..c42adea9ec 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,7 +5,7 @@ Enhancements: - Quartz64/Star64/VisionFive 2 | The extended attribute handler for ext4 security labels "CONFIG_EXT4_FS_SECURITY" has been enabled for these SBCs, required for some Docker containers. Many thanks to @gxsw for reporting this missing feature: https://github.com/MichaIng/DietPi/issues/7102 Bug fixes: -- +- 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 diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 06a70c3942..40d601b491 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -54,8 +54,8 @@ [[ -f '/boot/dietpi/.version' ]] && . /boot/dietpi/.version # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=9 - [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=5 - [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=1 + [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=6 + [[ $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 From c428ad160b1f5b1eb74018c3de3e3538f15ce940 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 10 Jun 2024 21:39:44 +0200 Subject: [PATCH 265/458] v9.6 - CI | DietPi-Build: Re-add binfmt-support for Bullseye builds, since mmdebstrap fails on Jammy runners with systemd-binfmt, for whatever reason --- .build/images/dietpi-build | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 72b10d7ef1..653e35eeaf 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -223,7 +223,11 @@ fi (( $efi_size )) || [[ $boot_size -gt 0 && $boot_fstype == 'fat'* ]] && apackages+=('dosfstools') # Emulation support in case of incompatible architecture -(( ( $G_HW_ARCH < 10 && $G_HW_ARCH < $HW_ARCH ) || ( ( $G_HW_ARCH == 10 || $G_HW_ARCH == 11 ) && $G_HW_ARCH != $HW_ARCH ) )) && apackages+=('qemu-user-static') +emulation=0 +(( ( $G_HW_ARCH < 10 && $G_HW_ARCH < $HW_ARCH ) || ( ( $G_HW_ARCH == 10 || $G_HW_ARCH == 11 ) && $G_HW_ARCH != $HW_ARCH ) )) && emulation=1 + +# Bullseye/Jammy: binfmt-support still required for emulation. With systemd-binfmt only, mmdebstrap throws "E: can neither be executed natively nor via qemu user emulation with binfmt_misc" +(( $emulation )) && { apackages+=('qemu-user-static'); (( $DISTRO == 6 )) && apackages+=('binfmt-support'); } # Virtual machine disk conversion [[ $VMTYPE && $VMTYPE != 'raw' ]] && apackages+=('qemu-utils') @@ -231,7 +235,7 @@ fi G_AG_CHECK_INSTALL_PREREQ parted mmdebstrap dbus systemd-container xz-utils "${apackages[@]}" # Register QEMU binfmt configs -dpkg-query -s 'qemu-user-static' &> /dev/null && G_EXEC systemctl restart systemd-binfmt +(( $emulation && $DISTRO != 6 )) && G_EXEC systemctl restart systemd-binfmt # Bootstrap archive keyring if missing if [[ ! -f $keyring ]] From 06d4ed6087bbd14cf27f0cebd34e403378562dc2 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 11 Jun 2024 19:48:10 +0200 Subject: [PATCH 266/458] v9.6 - CI | DietPi-Build: Raise some image sizes and attempt to fix another segmentation fault on armhf Bullseye systems, this time not at mmdebstrap, but when actually booting the system - DietPi-Installer/Patches | Install zstd on Odroid XU4 and 32-bit Amlogic (Odroid C1) systems, for better initramfs compression and faster decompression. Those are (now) supported by current kernel builds. --- .build/images/dietpi-build | 54 ++++++++++++++++++++-------------- .build/images/dietpi-installer | 2 +- .update/patches | 9 ++++++ 3 files changed, 42 insertions(+), 23 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 653e35eeaf..03cb17be59 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -91,29 +91,29 @@ case $HW_MODEL in 4) iname='RPi234' HW_ARCH=3 boot_size=128 root_size=895;; 5) iname='RPi5' HW_ARCH=3 boot_size=128 root_size=895;; 10) iname='OdroidC1' HW_ARCH=2 partition_start=4 boot_size=128 root_size=700 boot_fstype='fat16';; - 11) iname='OdroidXU4' HW_ARCH=2 partition_start=4 root_size=764;; + 11) iname='OdroidXU4' HW_ARCH=2 partition_start=4 root_size=800;; 12) iname='OdroidC2' HW_ARCH=3 partition_start=4 root_size=1148;; 15) iname='OdroidN2' HW_ARCH=3 partition_start=4 root_size=1148;; 16) iname='OdroidC4' HW_ARCH=3 partition_start=4 root_size=1148;; 20) iname='VM' HW_ARCH=${HW_ARCH:-10} VMTYPE=${VMTYPE:-raw};; 21) iname='NativePC-BIOS' HW_ARCH=10 root_size=1663;; 40) iname='PINEA64' HW_ARCH=3 partition_start=4 root_size=1020;; - 42) iname='ROCKPro64' HW_ARCH=3 partition_start=16 root_size=1008;; - 43) iname='ROCK64' HW_ARCH=3 partition_start=16 root_size=1008;; + 42) iname='ROCKPro64' HW_ARCH=3 partition_start=16 root_size=1100;; + 43) iname='ROCK64' HW_ARCH=3 partition_start=16 root_size=1100;; 44) iname='Pinebook' HW_ARCH=3 partition_start=4 root_size=1020;; 45) iname='PINEH64' HW_ARCH=3 partition_start=4 root_size=1020;; - 46) iname='PinebookPro' HW_ARCH=3 partition_start=16 root_size=1008;; - 47) iname='NanoPiR4S' HW_ARCH=3 partition_start=16 root_size=1008;; + 46) iname='PinebookPro' HW_ARCH=3 partition_start=16 root_size=1100;; + 47) iname='NanoPiR4S' HW_ARCH=3 partition_start=16 root_size=1100;; 48) iname='NanoPiR1' HW_ARCH=2 partition_start=4 root_size=800;; '49.1') iname='Quartz64A' HW_ARCH=3 partition_start=16 root_size=752;; '49.2') iname='Quartz64B' HW_ARCH=3 partition_start=16 root_size=752;; '49.3') iname='SOQuartz' HW_ARCH=3 partition_start=16 root_size=752;; 52) iname='ASUSTB' HW_ARCH=2 partition_start=4 root_size=764;; 54) iname='NanoPiK2' HW_ARCH=3 partition_start=4 root_size=1148;; - 55) iname='NanoPiR2S' HW_ARCH=3 partition_start=16 root_size=1008;; + 55) iname='NanoPiR2S' HW_ARCH=3 partition_start=16 root_size=1100;; 56) iname='NanoPiNEO3' HW_ARCH=3 partition_start=16 root_size=1100;; 57) iname='NanoPiNEOPlus2' HW_ARCH=3 partition_start=4 root_size=1000;; - 58) iname='NanoPiM4V2' HW_ARCH=3 partition_start=16 root_size=1008;; + 58) iname='NanoPiM4V2' HW_ARCH=3 partition_start=16 root_size=1100;; 59) iname='ZeroPi' HW_ARCH=2 partition_start=4 root_size=800;; 60) iname='NanoPiNEO' HW_ARCH=2 partition_start=4 root_size=800;; 61) iname='NanoPiM2' HW_ARCH=2 partition_start=4 boot_size=64 root_size=700 boot_fstype='ext4';; @@ -125,30 +125,30 @@ case $HW_MODEL in '65.2') iname='NanoPiNEO2Black' HW_ARCH=3 partition_start=4 root_size=1020;; 66) iname='NanoPiM1Plus' HW_ARCH=2 partition_start=4 root_size=800;; 67) iname='NanoPiK1Plus' HW_ARCH=3 partition_start=4 root_size=1020;; - '68.1') iname='NanoPiM4' HW_ARCH=3 partition_start=16 root_size=1008;; - '68.2') iname='NanoPCT4' HW_ARCH=3 partition_start=16 root_size=1008;; - '68.3') iname='NanoPiNEO4' HW_ARCH=3 partition_start=16 root_size=1008;; + '68.1') iname='NanoPiM4' HW_ARCH=3 partition_start=16 root_size=1100;; + '68.2') iname='NanoPCT4' HW_ARCH=3 partition_start=16 root_size=1100;; + '68.3') iname='NanoPiNEO4' HW_ARCH=3 partition_start=16 root_size=1100;; 70) iname='SparkySBC' HW_ARCH=2 partition_start=8 boot_size=48 root_size=712 boot_fstype='fat16';; - '72.1') iname='ROCKPi4' HW_ARCH=3 partition_start=16 root_size=1008;; - '72.2') iname='ROCK4SE' HW_ARCH=3 partition_start=16 root_size=1008;; - '72.3') iname='ROCK4CPlus' HW_ARCH=3 partition_start=16 root_size=1008;; - 73) iname='ROCKPiS' HW_ARCH=3 partition_start=16 root_size=1008;; + '72.1') iname='ROCKPi4' HW_ARCH=3 partition_start=16 root_size=1100;; + '72.2') iname='ROCK4SE' HW_ARCH=3 partition_start=16 root_size=1100;; + '72.3') iname='ROCK4CPlus' HW_ARCH=3 partition_start=16 root_size=1100;; + 73) iname='ROCKPiS' HW_ARCH=3 partition_start=16 root_size=1100;; 74) iname='RadxaZero' HW_ARCH=3 partition_start=4 root_size=1148;; 75) iname='Container' HW_ARCH=${HW_ARCH:-10} root_size=575;; '76.1') iname='NanoPiR5S' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; '76.2') iname='NanoPiR5C' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; 77) iname='ROCK3A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; - 78) iname='ROCK5B' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; - '79.1') iname='NanoPiR6S' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; - '79.2') iname='NanoPiR6C' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; - '79.3') iname='NanoPCT6' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; + 78) iname='ROCK5B' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;; + '79.1') iname='NanoPiR6S' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;; + '79.2') iname='NanoPiR6C' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;; + '79.3') iname='NanoPCT6' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;; 80) iname='OrangePi5' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; 81) iname='VisionFive2' HW_ARCH=11 root_size=639;; - 82) iname='OrangePi5Plus' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; + 82) iname='OrangePi5Plus' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;; 83) iname='OrangePiZero3' HW_ARCH=3 partition_start=4 root_size=1148;; 84) iname='Star64' HW_ARCH=11 root_size=639;; - 85) iname='ROCK5A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;; - 86) iname='ASUSTB2' HW_ARCH=3 partition_start=16 root_size=1008;; + 85) iname='ROCK5A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;; + 86) iname='ASUSTB2' HW_ARCH=3 partition_start=16 root_size=1100;; 87) iname='OrangePi3B' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; 88) iname='OrangePiZero2W' HW_ARCH=3 partition_start=4 root_size=1148;; 89) iname='OrangePi3LTS' HW_ARCH=3 partition_start=4 root_size=1000;; @@ -235,7 +235,17 @@ emulation=0 G_AG_CHECK_INSTALL_PREREQ parted mmdebstrap dbus systemd-container xz-utils "${apackages[@]}" # Register QEMU binfmt configs -(( $emulation && $DISTRO != 6 )) && G_EXEC systemctl restart systemd-binfmt +if (( $emulation )) +then + if (( $DISTRO == 6 )) + then + G_EXEC systemctl disbale --now systemd-binfmt + G_EXEC systemctl restart binfmt-support + else + G_EXEC systemctl restart systemd-binfmt + fi +fi + # Bootstrap archive keyring if missing if [[ ! -f $keyring ]] diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 71d6d33933..7ec056e9ec 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1156,7 +1156,7 @@ blacklist rockchip_vdec _EOF_ fi # Install initramfs-tools first to have an initramfs generated on kernel install, and configure it to use zstd if supported for better compression and faster decompression - [[ $kernel == 'rockchip64' || $kernel == 'rk35xx' || $kernel == 'meson64' || $kernel == 'sunxi64' || $kernel == 'sunxi' || $kernel == 'rockchip' ]] && zstd=('zstd') + [[ $kernel == 's5p6818' ]] || zstd=('zstd') G_AGI initramfs-tools u-boot-tools armbian-firmware "${zstd[@]}" [[ ${zstd[0]} ]] && G_CONFIG_INJECT 'COMPRESS=' 'COMPRESS=zstd' /etc/initramfs-tools/initramfs.conf # Download and pre-install kernel hosted on dietpi.com where the Armbian APT repo provides a too old version or is not available diff --git a/.update/patches b/.update/patches index 348747baa3..694d195297 100755 --- a/.update/patches +++ b/.update/patches @@ -1657,6 +1657,15 @@ Patch_9_5() fi } +Patch_9_6() +{ + # Odroid XU4/Meson: Install zstd for better compressed initramfs images + if dpkg-query -s 'linux-image-current-odroidxu4' &> /dev/null || dpkg-query -s 'linux-image-current-meson' &> /dev/null + then + G_AGI zstd + fi +} + # v6.35 => v7 migration if (( $G_DIETPI_VERSION_CORE == 6 && $G_DIETPI_VERSION_SUB > 34 )) then From 2439d78b51649a24d3c84b8fca25ec723c9b1287 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 11 Jun 2024 19:57:37 +0200 Subject: [PATCH 267/458] v9.6 - CI | DietPi-Build: Remove doubled newline --- .build/images/dietpi-build | 1 - 1 file changed, 1 deletion(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 03cb17be59..db3e0d9fc0 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -246,7 +246,6 @@ then fi fi - # Bootstrap archive keyring if missing if [[ ! -f $keyring ]] then From ced3e38ff8e62684bc3a2f1759591e50e63a5dce Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 11 Jun 2024 21:16:42 +0200 Subject: [PATCH 268/458] v9.6 - DietPi-Installer | Stop apt-daily services and timers before doing any APT installs. It just happened that they triggered while the installer tried to do its APT installs --- .build/images/dietpi-installer | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 7ec056e9ec..339425a51b 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -830,6 +830,13 @@ setenv rootuuid "true"' /boot/boot.cmd G_DIETPI-NOTIFY 3 "$G_PROGRAM_NAME" "[$SETUP_STEP] APT configuration"; ((SETUP_STEP++)) #------------------------------------------------------------------------------------------------ + G_DIETPI-NOTIFY 2 'Disabling apt-daily services to prevent random APT cache lock' + for i in apt-daily{,-upgrade}.{service,timer} + do + G_EXEC systemctl disable --now "$i" + G_EXEC systemctl mask "$i" + done + G_DIETPI-NOTIFY 2 "Setting APT sources.list: $DISTRO_TARGET_NAME $DISTRO_TARGET" # We need to forward $DISTRO_TARGET* to dietpi-set_software, as well as $G_HW_MODEL + $G_RASPBIAN for Debian vs Raspbian decision. @@ -1823,13 +1830,6 @@ _EOF_' #----------------------------------------------------------------------------------- # MISC - G_DIETPI-NOTIFY 2 'Disabling apt-daily services to prevent random APT cache lock' - for i in apt-daily{,-upgrade}.{service,timer} - do - G_EXEC systemctl disable --now "$i" - G_EXEC systemctl mask "$i" - done - if command -v e2scrub > /dev/null then G_DIETPI-NOTIFY 2 'Disabling e2scrub services which are for LVM and require lvm2/lvcreate being installed' From 04b58a299c120ad269e0ca298c56f1c12cf50825 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 11 Jun 2024 21:19:25 +0200 Subject: [PATCH 269/458] v9.6 - DietPi-Build | Typo --- .build/images/dietpi-build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index db3e0d9fc0..c55821e2f8 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -239,7 +239,7 @@ if (( $emulation )) then if (( $DISTRO == 6 )) then - G_EXEC systemctl disbale --now systemd-binfmt + G_EXEC systemctl disable --now systemd-binfmt G_EXEC systemctl restart binfmt-support else G_EXEC systemctl restart systemd-binfmt From d8aad599eaf4d6a5edd8c0d4d57a72b989254c4c Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 12 Jun 2024 00:12:18 +0200 Subject: [PATCH 270/458] v9.6 - DietPi-Build | Do not install recommended packages along with dependencies --- .build/images/dietpi-build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index c55821e2f8..8941b4d79a 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -232,7 +232,7 @@ emulation=0 # Virtual machine disk conversion [[ $VMTYPE && $VMTYPE != 'raw' ]] && apackages+=('qemu-utils') -G_AG_CHECK_INSTALL_PREREQ parted mmdebstrap dbus systemd-container xz-utils "${apackages[@]}" +G_AG_CHECK_INSTALL_PREREQ --no-install-recommends parted mmdebstrap dbus systemd-container xz-utils "${apackages[@]}" # Register QEMU binfmt configs if (( $emulation )) From f6390741dff48bf0b343e640cfa674e5b3fbd8ec Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 12 Jun 2024 16:00:20 +0200 Subject: [PATCH 271/458] v9.6 - Odroid C1 | Resolved an issue, where the kernel upgrade did not apply as intended. Many thanks to @th2j for reporting this issue: https://github.com/MichaIng/DietPi/issues/6332#issuecomment-2162959873 --- .build/images/dietpi-installer | 21 ++------------------- .update/patches | 10 +--------- .update/pre-patches | 28 ++++++++++++++-------------- CHANGELOG.txt | 2 +- 4 files changed, 18 insertions(+), 43 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 339425a51b..57f6a953e8 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1139,19 +1139,8 @@ _EOF_ *) :;; esac - # Odroid C1: https://dietpi.com/forum/t/odroid-c1-not-booting-after-kernel-upgrade/17818 - if (( $G_HW_MODEL == 10 )) - then - G_DIETPI-NOTIFY 2 'Pinning Odroid C1 "current" and "edge" kernel packages to latest known functional version and in case enforcing automated downgrade' - cat << '_EOF_' > /etc/apt/preferences.d/00-dietpi-odroidc1 -Package: linux-image-current-meson linux-dtb-current-meson linux-headers-current-meson linux-image-edge-meson linux-dtb-edge-meson linux-headers-edge-meson -Pin: version 23.02.2 -Pin-Priority: 1000 -_EOF_ - G_EXEC eval 'echo '\''APT::Get::Allow-Downgrades "1";'\'' > /etc/apt/apt.conf.d/dietpi-armbian' - # NanoPi R2S/NEO3 - elif [[ $G_HW_MODEL =~ ^(55|56)$ ]] + if [[ $G_HW_MODEL =~ ^(55|56)$ ]] then G_DIETPI-NOTIFY 2 'Blacklisting video related kernel modules' cat << '_EOF_' > /etc/modprobe.d/dietpi-headless.conf @@ -1194,14 +1183,8 @@ _EOF_ # Flash U-Boot /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc "$BOOT_DEVICE" - # Odroid C1 cleanup: https://dietpi.com/forum/t/odroid-c1-not-booting-after-kernel-upgrade/17818 - if (( $G_HW_MODEL == 10 )) - then - G_DIETPI-NOTIFY 2 'Setting Odroid C1 "current" and "edge" kernel packages on hold' - G_EXEC apt-mark hold linux-image-current-meson linux-dtb-current-meson linux-headers-current-meson linux-image-edge-meson linux-dtb-edge-meson linux-headers-edge-meson - # Radxa Zero: Enable USB OTG OOTB: https://github.com/MichaIng/DietPi/issues/5931 - elif (( $G_HW_MODEL == 74 )) + if (( $G_HW_MODEL == 74 )) then G_AGI device-tree-compiler G_EXEC mkdir -p /boot/overlay-user diff --git a/.update/patches b/.update/patches index 694d195297..52f0bb8c33 100755 --- a/.update/patches +++ b/.update/patches @@ -1291,16 +1291,8 @@ 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 - # 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 - if (( $G_HW_MODEL == 10 )) - then - G_DIETPI-NOTIFY 2 'Setting Odroid C1 "current" and "edge" kernel packages on hold' - G_EXEC apt-mark hold linux-image-current-meson linux-dtb-current-meson linux-headers-current-meson linux-image-edge-meson linux-dtb-edge-meson linux-headers-edge-meson - # NanoPi R4S: Fix Ethernet LEDs: https://github.com/MichaIng/DietPi/issues/6342#issuecomment-1697669420 - elif (( $G_HW_MODEL == 47 )) + if (( $G_HW_MODEL == 47 )) then G_DIETPI-NOTIFY 2 'Updating udev rule for NanoPi R4S Ethernet LEDs' G_EXEC eval 'echo '\''ledtrig-netdev'\'' > /etc/modules-load.d/dietpi-eth-leds.conf' diff --git a/.update/pre-patches b/.update/pre-patches index 11fbb5afe4..0f6c7c38ba 100755 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -257,20 +257,6 @@ _EOF_ Package: base-files Pin: release o=Debian Pin-Priority: 1000 -_EOF_ - G_EXEC eval 'echo '\''APT::Get::Allow-Downgrades "1";'\'' > /etc/apt/apt.conf.d/dietpi-armbian' - fi - - # Odroid C1: Pin "current" and "edge" kernel versions to Armbian 23.02.2, which are the latest currently known functional versions for C1: - # - https://dietpi.com/forum/t/odroid-c1-not-booting-after-kernel-upgrade/17818 - # - https://github.com/MichaIng/DietPi/issues/6616#issuecomment-1730900296 - if (( $G_HW_MODEL == 10 )) - then - G_DIETPI-NOTIFY 2 'Pinning Odroid C1 "current" and "edge" kernel packages to latest known functional version and in case enforcing automated downgrade' - cat << '_EOF_' > /etc/apt/preferences.d/00-dietpi-odroidc1 -Package: linux-image-current-meson linux-dtb-current-meson linux-headers-current-meson linux-image-edge-meson linux-dtb-edge-meson linux-headers-edge-meson -Pin: version 23.02.2 -Pin-Priority: 1000 _EOF_ G_EXEC eval 'echo '\''APT::Get::Allow-Downgrades "1";'\'' > /etc/apt/apt.conf.d/dietpi-armbian' fi @@ -426,5 +412,19 @@ then fi fi +# v9.6 +if (( $G_DIETPI_VERSION_CORE < 9 || ( $G_DIETPI_VERSION_CORE == 9 && $G_DIETPI_VERSION_SUB < 6 ) )) +then + # https://github.com/MichaIng/DietPi/issues/6332#issuecomment-2162959873 + if (( $G_HW_MODEL == 10 )) + then + G_DIETPI-NOTIFY 2 'Re-allowing kernel upgrades on Odroid C1' + [[ -f '/etc/apt/preferences.d/00-dietpi-odroidc1' ]] G_EXEC rm /etc/apt/preferences.d/00-dietpi-odroidc1 + mapfile -t apackages < <(apt-mark showhold | grep -E '^linux-(image|dtb|headers}-(current|edge)-meson$') + [[ ${apackages[0]} ]] && G_EXEC apt-mark unhold "${apackages[@]}" + unset -v apackages + fi +fi + exit 0 } diff --git a/CHANGELOG.txt b/CHANGELOG.txt index c42adea9ec..b6aab5a5c9 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,7 +5,7 @@ Enhancements: - Quartz64/Star64/VisionFive 2 | The extended attribute handler for ext4 security labels "CONFIG_EXT4_FS_SECURITY" has been enabled for these SBCs, required for some Docker containers. Many thanks to @gxsw for reporting this missing feature: https://github.com/MichaIng/DietPi/issues/7102 Bug fixes: -- +- Odroid C1 | Resolved an issue, where the kernel upgrade did not apply as intended. Many thanks to @th2j for reporting this issue: https://github.com/MichaIng/DietPi/issues/6332#issuecomment-2162959873 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 From 50e6f8b66b5f75415e8d3d34bf9be330ac1407c4 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 12 Jun 2024 16:30:47 +0200 Subject: [PATCH 272/458] v9.6 - DietPi-Pre-patches | Syntax --- .update/pre-patches | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.update/pre-patches b/.update/pre-patches index 0f6c7c38ba..702c1bd182 100755 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -419,7 +419,7 @@ then if (( $G_HW_MODEL == 10 )) then G_DIETPI-NOTIFY 2 'Re-allowing kernel upgrades on Odroid C1' - [[ -f '/etc/apt/preferences.d/00-dietpi-odroidc1' ]] G_EXEC rm /etc/apt/preferences.d/00-dietpi-odroidc1 + [[ -f '/etc/apt/preferences.d/00-dietpi-odroidc1' ]] && G_EXEC rm /etc/apt/preferences.d/00-dietpi-odroidc1 mapfile -t apackages < <(apt-mark showhold | grep -E '^linux-(image|dtb|headers}-(current|edge)-meson$') [[ ${apackages[0]} ]] && G_EXEC apt-mark unhold "${apackages[@]}" unset -v apackages From bdabec56da1004dc8b09cbb5f30184b483242890 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 12 Jun 2024 19:45:39 +0200 Subject: [PATCH 273/458] v9.6 - CI | DietPi-Build: Add mmdebstrap debug flag and define mode and format explicitly --- .build/images/dietpi-build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 8941b4d79a..b00a6a7737 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -408,7 +408,7 @@ packages='apt,bash-completion,bzip2,ca-certificates,cron,curl,fdisk,gpg,htop,ipu (( $DISTRO > 7 )) && packages+='7zip,' || packages+='p7zip,' [[ $HW_MODEL == 75 ]] && packages+='iproute2' || packages+='console-setup,dropbear,ethtool,fake-hwclock,ifupdown,isc-dhcp-client,kmod,rfkill,systemd-timesyncd,usbutils' # - "--skip=check/empty" to ignore /etc/fstab, boot and tmpfs mounts we added above -G_EXEC_OUTPUT=1 G_EXEC mmdebstrap --skip=check/empty --variant=minbase --include="$packages" --arch="$parch" --keyring="$keyring" "$distro" ./rootfs "$repo" +G_EXEC_OUTPUT=1 G_EXEC mmdebstrap --debug --mode=root --format=dir --skip=check/empty --variant=minbase --include="$packages" --arch="$parch" --keyring="$keyring" "$distro" ./rootfs "$repo" G_EXEC umount rootfs/dev rootfs/run rootfs/var/cache/apt rootfs/var/lib/apt/lists rootfs/var/log ########################################## From fc820dd3d285174dc686f70149a965b3c0415fad Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 12 Jun 2024 19:53:17 +0200 Subject: [PATCH 274/458] v9.6 - CI | DietPi-Build: Remove the need for "arch-test" package --- .build/images/dietpi-build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index b00a6a7737..f63b21a80c 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -408,7 +408,8 @@ packages='apt,bash-completion,bzip2,ca-certificates,cron,curl,fdisk,gpg,htop,ipu (( $DISTRO > 7 )) && packages+='7zip,' || packages+='p7zip,' [[ $HW_MODEL == 75 ]] && packages+='iproute2' || packages+='console-setup,dropbear,ethtool,fake-hwclock,ifupdown,isc-dhcp-client,kmod,rfkill,systemd-timesyncd,usbutils' # - "--skip=check/empty" to ignore /etc/fstab, boot and tmpfs mounts we added above -G_EXEC_OUTPUT=1 G_EXEC mmdebstrap --debug --mode=root --format=dir --skip=check/empty --variant=minbase --include="$packages" --arch="$parch" --keyring="$keyring" "$distro" ./rootfs "$repo" +# - "--skip=check/qemu" to skip arch test, which requires the "arch-test" package. We however assure emulation support out end. +G_EXEC_OUTPUT=1 G_EXEC mmdebstrap --debug --mode=root --format=dir --skip=check/empty,check/qemu --variant=minbase --include="$packages" --arch="$parch" --keyring="$keyring" "$distro" ./rootfs "$repo" G_EXEC umount rootfs/dev rootfs/run rootfs/var/cache/apt rootfs/var/lib/apt/lists rootfs/var/log ########################################## From eea7c5a0a64a70060e1a6ba90189a78e51602e2a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 12 Jun 2024 19:56:45 +0200 Subject: [PATCH 275/458] v9.6 - DietPi-Software | ruTorrent: Update fallback version --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 4f5b75893e..8d7d9a3095 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8534,7 +8534,7 @@ _EOF_ # Install ruTorrent: Web UI for rTorrent # - Grab current version local version=$(curl -sSfL 'https://api.github.com/repos/Novik/ruTorrent/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}') - [[ $version ]] || { version='v4.3.2'; G_DIETPI-NOTIFY 1 "Automatic latest ruTorrent version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } + [[ $version ]] || { version='v4.3.3'; G_DIETPI-NOTIFY 1 "Automatic latest ruTorrent version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } Download_Install "https://github.com/Novik/ruTorrent/archive/$version.tar.gz" # - Reinstall freshly with preserved configs and 3rd party plugins From 5dac7e3557c5f0eb995660956bb74d85c45d5f12 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 12 Jun 2024 22:52:40 +0200 Subject: [PATCH 276/458] v9.6 - Network | Resolved a rare issue, where shutdowns could hang, when networking.service and ifup@.service instances try to bring down the same network interface concurrently. Many thanks to @ioctl2 for reporting this issue: https://github.com/MichaIng/DietPi/issues/7104 --- .update/patches | 5 ++++- CHANGELOG.txt | 1 + rootfs/etc/systemd/system/ifup@.service | 17 +++++++++++++++++ .../systemd/system/ifup@.service.d/dietpi.conf | 5 ----- 4 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 rootfs/etc/systemd/system/ifup@.service delete mode 100644 rootfs/etc/systemd/system/ifup@.service.d/dietpi.conf diff --git a/.update/patches b/.update/patches index 52f0bb8c33..9a41f6ec12 100755 --- a/.update/patches +++ b/.update/patches @@ -1652,10 +1652,13 @@ Patch_9_5() Patch_9_6() { # Odroid XU4/Meson: Install zstd for better compressed initramfs images - if dpkg-query -s 'linux-image-current-odroidxu4' &> /dev/null || dpkg-query -s 'linux-image-current-meson' &> /dev/null + if dpkg-query -s 'linux-image-current-odroidxu4' &> /dev/null || dpkg-query -s 'linux-image-edge-odroidxu4' &> /dev/null || dpkg-query -s 'linux-image-current-meson' &> /dev/null || dpkg-query -s 'linux-image-edge-meson' &> /dev/null then G_AGI zstd fi + + # Remove obsolete drop-in config: https://github.com/MichaIng/DietPi/issues/7104 + [[ -d '/etc/systemd/system/ifup@.service.d' ]] && G_EXEC rm -R /etc/systemd/system/ifup@.service.d } # v6.35 => v7 migration diff --git a/CHANGELOG.txt b/CHANGELOG.txt index b6aab5a5c9..2b6d95b15e 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,6 +5,7 @@ Enhancements: - Quartz64/Star64/VisionFive 2 | The extended attribute handler for ext4 security labels "CONFIG_EXT4_FS_SECURITY" has been enabled for these SBCs, required for some Docker containers. Many thanks to @gxsw for reporting this missing feature: https://github.com/MichaIng/DietPi/issues/7102 Bug fixes: +- Network | Resolved a rare issue, where shutdowns could hang, when networking.service and ifup@.service instances try to bring down the same network interface concurrently. Many thanks to @ioctl2 for reporting this issue: https://github.com/MichaIng/DietPi/issues/7104 - Odroid C1 | Resolved an issue, where the kernel upgrade did not apply as intended. Many thanks to @th2j for reporting this issue: https://github.com/MichaIng/DietPi/issues/6332#issuecomment-2162959873 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 diff --git a/rootfs/etc/systemd/system/ifup@.service b/rootfs/etc/systemd/system/ifup@.service new file mode 100644 index 0000000000..c9f8c45466 --- /dev/null +++ b/rootfs/etc/systemd/system/ifup@.service @@ -0,0 +1,17 @@ +[Unit] +Description=ifup for %I +After=local-fs.target network-pre.target apparmor.service systemd-sysctl.service +Before=network.target network-online.target +BindsTo=sys-subsystem-net-devices-%i.device +After=sys-subsystem-net-devices-%i.device +DefaultDependencies=no +IgnoreOnIsolate=yes + +[Service] +Type=oneshot +# avoid stopping on shutdown via stopping system-ifup.slice +Slice=system.slice +ExecStart=/sbin/ifup --allow=hotplug %I +ExecStop=/sbin/ifdown %I +RemainAfterExit=true +TimeoutStartSec=5min diff --git a/rootfs/etc/systemd/system/ifup@.service.d/dietpi.conf b/rootfs/etc/systemd/system/ifup@.service.d/dietpi.conf deleted file mode 100644 index eacef9fac8..0000000000 --- a/rootfs/etc/systemd/system/ifup@.service.d/dietpi.conf +++ /dev/null @@ -1,5 +0,0 @@ -# Override service type to give network(-online).target more meaning and remove obsolete ifquery call: https://github.com/MichaIng/DietPi/issues/4121#issuecomment-782057374 -[Service] -Type=oneshot -ExecStart= -ExecStart=/sbin/ifup --allow=hotplug %I From 738a6113a0d8c89417b399b0fa972400c7e2ba21 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 13 Jun 2024 15:37:26 +0200 Subject: [PATCH 277/458] v9.6 - DietPi-Installer | Raise /tmp tmpfs size to 1 GiB, since in a few cases, APT update fails with "getline (12: Cannot allocate memory)" --- .build/images/dietpi-installer | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 57f6a953e8..103d031ea9 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -60,9 +60,9 @@ # Assure that /tmp is a tmpfs of at least 512 MiB if findmnt -M /tmp > /dev/null then - (( $(findmnt -Ufnrbo SIZE -M /tmp) < 536870912 )) && mount -o 'remount,size=512M,noatime,lazytime,nodev,nosuid,mode=1777' /tmp + (( $(findmnt -Ufnrbo SIZE -M /tmp) < 1024**3 )) && mount -o 'remount,size=1G,noatime,lazytime,nodev,nosuid,mode=1777' /tmp else - mount -t tmpfs -o 'size=512M,noatime,lazytime,nodev,nosuid,mode=1777' tmpfs /tmp + mount -t tmpfs -o 'size=1G,noatime,lazytime,nodev,nosuid,mode=1777' tmpfs /tmp fi # Work inside /tmp tmpfs to reduce disk I/O and speed up download and unpacking From 0217da682811a0b66ab86afed4953cf47bd6ab6c Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 13 Jun 2024 21:25:45 +0200 Subject: [PATCH 278/458] v9.6 - CHANGELOG | Add entry about fixed VisionFive 2 image --- CHANGELOG.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 2b6d95b15e..edfd84b8c1 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -7,6 +7,7 @@ Enhancements: Bug fixes: - Network | Resolved a rare issue, where shutdowns could hang, when networking.service and ifup@.service instances try to bring down the same network interface concurrently. Many thanks to @ioctl2 for reporting this issue: https://github.com/MichaIng/DietPi/issues/7104 - Odroid C1 | Resolved an issue, where the kernel upgrade did not apply as intended. Many thanks to @th2j for reporting this issue: https://github.com/MichaIng/DietPi/issues/6332#issuecomment-2162959873 +- VisionFive 2 | Resolved an issue where our new image did not boot, because of a false device tree name in /boot/extlinux/extlinux.conf. 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 From bea468bbf8c9a455c4f9d7f0163caf3dd03344fa Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 14 Jun 2024 17:14:25 +0200 Subject: [PATCH 279/458] v9.6 - DietPi-Banner | Resolved an issue where incorrect RAM usage was printed with German and potentially other locales. Many thanks to @jwgn for reporting this issue: https://github.com/MichaIng/DietPi/issues/7107 --- CHANGELOG.txt | 1 + dietpi/func/dietpi-banner | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index edfd84b8c1..47755c8e84 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -8,6 +8,7 @@ Bug fixes: - Network | Resolved a rare issue, where shutdowns could hang, when networking.service and ifup@.service instances try to bring down the same network interface concurrently. Many thanks to @ioctl2 for reporting this issue: https://github.com/MichaIng/DietPi/issues/7104 - Odroid C1 | Resolved an issue, where the kernel upgrade did not apply as intended. Many thanks to @th2j for reporting this issue: https://github.com/MichaIng/DietPi/issues/6332#issuecomment-2162959873 - VisionFive 2 | Resolved an issue where our new image did not boot, because of a false device tree name in /boot/extlinux/extlinux.conf. +- DietPi-Banner | Resolved an issue where incorrect RAM usage was printed with German and potentially other locales. Many thanks to @jwgn for reporting this issue: https://github.com/MichaIng/DietPi/issues/7107 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 diff --git a/dietpi/func/dietpi-banner b/dietpi/func/dietpi-banner index e119656403..044f0c8cc5 100755 --- a/dietpi/func/dietpi-banner +++ b/dietpi/func/dietpi-banner @@ -29,6 +29,9 @@ readonly G_PROGRAM_NAME='DietPi-Banner' G_CHECK_ROOT_USER # Required to store settings G_INIT + else + # Apply safe locale in non-menu mode (where G_INIT does it) + export LC_ALL='C.UTF-8' LANG='C.UTF-8' fi # Import DietPi-Globals -------------------------------------------------------------- From 9ca6c8a5580847d9bcbff8a0dfd47c14efb9330c Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 14 Jun 2024 23:19:06 +0200 Subject: [PATCH 280/458] v9.6 - DietPi-Software | Rclone: Update fallback URL --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 8d7d9a3095..be500575da 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -11639,7 +11639,7 @@ _EOF_ *) local arch='amd64';; esac - local fallback_url="https://github.com/rclone/rclone/releases/download/v1.66.0/rclone-v1.66.0-linux-$arch.deb" + local fallback_url="https://github.com/rclone/rclone/releases/download/v1.67.0/rclone-v1.67.0-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 5db7d27f4690186c807ac017435852796c4b6708 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 15 Jun 2024 14:09:32 +0200 Subject: [PATCH 281/458] v9.6 - NanoPi R6C | Resolved an issue where our new images did not boot, since the latest mainline U-Boot for R6S does not support the R6C anymore. Many thanks to @labmaster for reporting this issue: https://github.com/MichaIng/DietPi/issues/7109 --- .build/images/dietpi-installer | 2 +- .update/patches | 9 ++++++++- CHANGELOG.txt | 1 + dietpi/func/dietpi-set_software | 6 +++--- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 103d031ea9..605e1df8e5 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -692,7 +692,6 @@ setenv rootuuid "true"' /boot/boot.cmd 73) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3308-rock-pi-s.dtb' /boot/dietpiEnv.txt;; # U-Boot does not pass any ${fdtfile} 77) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3568-rock-3a.dtb' /boot/dietpiEnv.txt;; 78) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588-rock-5b.dtb' /boot/dietpiEnv.txt;; - 79) (( $HW_VARIANT == 2 )) && G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-nanopi-r6c.dtb' /boot/dietpiEnv.txt;; 85) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-rock-5a.dtb' /boot/dietpiEnv.txt;; 87) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3566-orangepi-3b.dtb' /boot/dietpiEnv.txt;; *) :;; @@ -1124,6 +1123,7 @@ _EOF_ 78) model='rock-5b' kernel='rk35xx' branch='legacy';; 79) kernel='rk35xx' branch='legacy' case $HW_VARIANT in + 2) model='nanopi-r6c';; 3) model='nanopct6';; *) model='nanopi-r6s';; esac;; diff --git a/.update/patches b/.update/patches index 9a41f6ec12..7d346adc71 100755 --- a/.update/patches +++ b/.update/patches @@ -1651,8 +1651,15 @@ Patch_9_5() Patch_9_6() { + # NanoPi R6C: Migrate to dedicated APT component and U-Boot package: https://github.com/MichaIng/DietPi/issues/7109 + if (( $G_HW_MODEL == 79 )) && grep -q '^[[:blank:]]*fdtfile=rockchip/rk3588s-nanopi-r6c.dtb$' /boot/dietpiEnv.txt + then + HW_VARIANT=2 /boot/dietpi/func/dietpi-set_software apt-mirror dietpi + G_AGUP + G_AGUG + # Odroid XU4/Meson: Install zstd for better compressed initramfs images - if dpkg-query -s 'linux-image-current-odroidxu4' &> /dev/null || dpkg-query -s 'linux-image-edge-odroidxu4' &> /dev/null || dpkg-query -s 'linux-image-current-meson' &> /dev/null || dpkg-query -s 'linux-image-edge-meson' &> /dev/null + elif dpkg-query -s 'linux-image-current-odroidxu4' &> /dev/null || dpkg-query -s 'linux-image-edge-odroidxu4' &> /dev/null || dpkg-query -s 'linux-image-current-meson' &> /dev/null || dpkg-query -s 'linux-image-edge-meson' &> /dev/null then G_AGI zstd fi diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 47755c8e84..9fa56995ca 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -8,6 +8,7 @@ Bug fixes: - Network | Resolved a rare issue, where shutdowns could hang, when networking.service and ifup@.service instances try to bring down the same network interface concurrently. Many thanks to @ioctl2 for reporting this issue: https://github.com/MichaIng/DietPi/issues/7104 - Odroid C1 | Resolved an issue, where the kernel upgrade did not apply as intended. Many thanks to @th2j for reporting this issue: https://github.com/MichaIng/DietPi/issues/6332#issuecomment-2162959873 - VisionFive 2 | Resolved an issue where our new image did not boot, because of a false device tree name in /boot/extlinux/extlinux.conf. +- NanoPi R6C | Resolved an issue where our new images did not boot, since the latest mainline U-Boot for R6S does not support the R6C anymore. Many thanks to @labmaster for reporting this issue: https://github.com/MichaIng/DietPi/issues/7109 - DietPi-Banner | Resolved an issue where incorrect RAM usage was printed with German and potentially other locales. Many thanks to @jwgn for reporting this issue: https://github.com/MichaIng/DietPi/issues/7107 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 diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index 5479c79b77..a219453703 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -218,12 +218,12 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R # Detect variant either based on $HW_VARIANT environment variable, existing "all" components or installed U-Boot package # shellcheck disable=SC2154 case $HW_VARIANT in - 1|2) all_components='nanopir6s';; # R6C shares R6S component (and bootloader) for now + 1) all_components='nanopir6s';; + 2) all_components='nanopir6c';; 3) all_components='nanopct6';; *) [[ -f '/etc/apt/sources.list.d/dietpi.list' ]] && all_components=$(sed -n '/ all /{s/^.* all //p;q}' /etc/apt/sources.list.d/dietpi.list) - # shellcheck disable=SC2043 - [[ $all_components ]] || for i in nano{pi-r6s,pct6} + [[ $all_components ]] || for i in nano{pi-r6s,pi-r6c,pct6} do dpkg-query -s "linux-u-boot-$i-current" &> /dev/null || continue all_components=${i/-//} From ed92c63deee1ab628877067a65dbea1a49e537bb Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 15 Jun 2024 14:18:19 +0200 Subject: [PATCH 282/458] v9.6 - NanoPi R6C | Do actually migrate to new U-Boot package --- .update/patches | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.update/patches b/.update/patches index 7d346adc71..a28d96bce0 100755 --- a/.update/patches +++ b/.update/patches @@ -1628,7 +1628,7 @@ Patch_9_5() then /boot/dietpi/func/dietpi-set_software apt-mirror dietpi G_AGUP - G_AGUG + G_AGI linux-u-boot-nanopi-r6c-current fi # Flash new U-Boot on Odroid C1 and Radxa ZERO 3 From e885cd9ff92679ec216bb22143a495cb28c7f50e Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 15 Jun 2024 14:19:15 +0200 Subject: [PATCH 283/458] v9.6 - DietPi-Patches | Move patch to correct code block --- .update/patches | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.update/patches b/.update/patches index a28d96bce0..186996ecbe 100755 --- a/.update/patches +++ b/.update/patches @@ -1628,7 +1628,7 @@ Patch_9_5() then /boot/dietpi/func/dietpi-set_software apt-mirror dietpi G_AGUP - G_AGI linux-u-boot-nanopi-r6c-current + G_AGUG fi # Flash new U-Boot on Odroid C1 and Radxa ZERO 3 @@ -1656,7 +1656,7 @@ Patch_9_6() then HW_VARIANT=2 /boot/dietpi/func/dietpi-set_software apt-mirror dietpi G_AGUP - G_AGUG + G_AGI linux-u-boot-nanopi-r6c-current # Odroid XU4/Meson: Install zstd for better compressed initramfs images elif dpkg-query -s 'linux-image-current-odroidxu4' &> /dev/null || dpkg-query -s 'linux-image-edge-odroidxu4' &> /dev/null || dpkg-query -s 'linux-image-current-meson' &> /dev/null || dpkg-query -s 'linux-image-edge-meson' &> /dev/null From 83123042a830ff71aea350272195e8cd9be52eb5 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 15 Jun 2024 15:29:58 +0200 Subject: [PATCH 284/458] v9.6 - DietPi-Installer | NanoPi R6C: Revert back to defining the device tree explicitly, since Armbian for whichever reason chose to use a generic RK3588 config for explicit NanoPi R6C U-Boot builds. --- .build/images/dietpi-installer | 1 + 1 file changed, 1 insertion(+) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 605e1df8e5..24d77d624d 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -692,6 +692,7 @@ setenv rootuuid "true"' /boot/boot.cmd 73) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3308-rock-pi-s.dtb' /boot/dietpiEnv.txt;; # U-Boot does not pass any ${fdtfile} 77) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3568-rock-3a.dtb' /boot/dietpiEnv.txt;; 78) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588-rock-5b.dtb' /boot/dietpiEnv.txt;; + 79) (( $HW_VARIANT == 2 )) && G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-nanopi-r6c.dtb' /boot/dietpiEnv.txt;; 85) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-rock-5a.dtb' /boot/dietpiEnv.txt;; 87) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3566-orangepi-3b.dtb' /boot/dietpiEnv.txt;; *) :;; From f7a206b736e808af60d24f0c8017673c81383b12 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 15 Jun 2024 16:09:21 +0200 Subject: [PATCH 285/458] v9.6 - DietPi-Installer | NanoPi R6C: Temporarily assure correct APT component, until DietPi v9.6 release, to allow master branch builds. The live patch is applied before the APT config exist, and would be overwritten by it, hence we need to switch again here. --- .build/images/dietpi-installer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 24d77d624d..275121873f 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1124,7 +1124,7 @@ _EOF_ 78) model='rock-5b' kernel='rk35xx' branch='legacy';; 79) kernel='rk35xx' branch='legacy' case $HW_VARIANT in - 2) model='nanopi-r6c';; + 2) model='nanopi-r6c'; G_EXEC sed -i 's/r6s/r6c/' /etc/apt/sources.list.d/dietpi.list;; # ToDo: Temporarily assure correct APT component, until DietPi v9.6 release 3) model='nanopct6';; *) model='nanopi-r6s';; esac;; From 232cd37fdfb060eb0085e7f1d1ce7be772ae319d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 15 Jun 2024 16:29:31 +0200 Subject: [PATCH 286/458] v9.6 - DietPi-Installer | Skip live patch 0 on NanoPi R6C, which cannot succeed at this stage of the script, but will be applied at a later stage --- .build/images/dietpi-installer | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 275121873f..7832b35bd6 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -809,6 +809,8 @@ setenv rootuuid "true"' /boot/boot.cmd G_DIETPI-NOTIFY 2 'Applying DietPi live patches to fix known bugs in this version' for i in "${!G_LIVE_PATCH[@]}" do + # ToDo: Temporarily skip live patch 0 on NanoPi R6C, which cannot succeed here, but will be applied later in this script + (( $G_HW_MODEL == 79 && $HW_VARIANT == 2 && $i == 0 )) && [[ ${G_LIVE_PATCH_DESC[i]} == *'NanoPi R6C' ]] && continue if eval "${G_LIVE_PATCH_COND[$i]}" then G_DIETPI-NOTIFY 2 "Applying live patch $i" From 38cc8235f64ede7983c774f912dbae8f6a107b11 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 15 Jun 2024 16:34:36 +0200 Subject: [PATCH 287/458] v9.6 - DietPi-Patches | NanoPi R6C: Use correct U-Boot package branch --- .update/patches | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.update/patches b/.update/patches index 186996ecbe..e5dc060ec9 100755 --- a/.update/patches +++ b/.update/patches @@ -1656,7 +1656,7 @@ Patch_9_6() then HW_VARIANT=2 /boot/dietpi/func/dietpi-set_software apt-mirror dietpi G_AGUP - G_AGI linux-u-boot-nanopi-r6c-current + G_AGI linux-u-boot-nanopi-r6c-legacy # Odroid XU4/Meson: Install zstd for better compressed initramfs images elif dpkg-query -s 'linux-image-current-odroidxu4' &> /dev/null || dpkg-query -s 'linux-image-edge-odroidxu4' &> /dev/null || dpkg-query -s 'linux-image-current-meson' &> /dev/null || dpkg-query -s 'linux-image-edge-meson' &> /dev/null From ade85dbfd7348a3b12a9d5439b056bb61ddf7d09 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 15 Jun 2024 16:45:29 +0200 Subject: [PATCH 288/458] v9.6 - DietPi-Set_software | Fix U-Boot branch in some cases for auto-detecting correct APT component --- dietpi/func/dietpi-set_software | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index a219453703..8690a7f276 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -184,7 +184,7 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R [[ -f '/etc/apt/sources.list.d/dietpi.list' ]] && all_components=$(sed -n '/ all /{s/^.* all //p;q}' /etc/apt/sources.list.d/dietpi.list) [[ $all_components ]] || for i in nanopineo2{,black} do - dpkg-query -s "linux-u-boot-$i-legacy" &> /dev/null || continue + dpkg-query -s "linux-u-boot-$i-current" &> /dev/null || continue all_components=$i break done @@ -225,7 +225,7 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R [[ -f '/etc/apt/sources.list.d/dietpi.list' ]] && all_components=$(sed -n '/ all /{s/^.* all //p;q}' /etc/apt/sources.list.d/dietpi.list) [[ $all_components ]] || for i in nano{pi-r6s,pi-r6c,pct6} do - dpkg-query -s "linux-u-boot-$i-current" &> /dev/null || continue + dpkg-query -s "linux-u-boot-$i-legacy" &> /dev/null || continue all_components=${i/-//} break done From e653d8760f243d29af5b37c9910ef4b60292e900 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 15 Jun 2024 17:26:17 +0200 Subject: [PATCH 289/458] v9.6 - DietPi-Installer | Despite 1G /tmp size, apt update still somehow fails with "getline (12: Cannot allocate memory)". Clean APT lists after last change and add some debug info to see what exactly is consuming such huge amount of space --- .build/images/dietpi-installer | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 7832b35bd6..7a196c3ae2 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1064,7 +1064,9 @@ _EOF_ find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -Rf {} + # Add Armbian repository G_EXEC eval "echo 'deb https://apt.armbian.com ${DISTRO_TARGET_NAME/bullseye/bookworm} main' > /etc/apt/sources.list.d/dietpi-armbian.list" - # Update APT lists + # Update APT lists cleanly + find /tmp -exec ls -dl {} + # debug + /boot/dietpi/func/dietpi-set_software apt clean G_AGUP # Install kernel, device tree, U-Boot, firmware and initramfs packages local model='odroidn2' kernel='meson64' arch='arm64' branch='current' zstd=() From 25f4ce49c64aa84ae420e84bd0015c369fb2fada Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 15 Jun 2024 17:48:21 +0200 Subject: [PATCH 290/458] v9.6 - DietPi-Installer | APT updates fail despite ~10 MiB being used. Add more debug info, probably the reason is host memory, not guest or tmpfs size --- .build/images/dietpi-installer | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 7a196c3ae2..f2a64b054e 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1066,8 +1066,9 @@ _EOF_ G_EXEC eval "echo 'deb https://apt.armbian.com ${DISTRO_TARGET_NAME/bullseye/bookworm} main' > /etc/apt/sources.list.d/dietpi-armbian.list" # Update APT lists cleanly find /tmp -exec ls -dl {} + # debug + df -h /tmp # debug /boot/dietpi/func/dietpi-set_software apt clean - G_AGUP + G_EXEC_NOHALT=1 G_AGUP || { free -m; find /tmp -exec ls -dl {} +; df -h /tmp; exit 1; } # Install kernel, device tree, U-Boot, firmware and initramfs packages local model='odroidn2' kernel='meson64' arch='arm64' branch='current' zstd=() case $G_HW_MODEL in From 85467830279d5037a30a40322611d174da3b0eec Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 15 Jun 2024 18:05:35 +0200 Subject: [PATCH 291/458] v9.6 - DietPi-Installer | Update APT list after NanoPi R6C component has been added --- .build/images/dietpi-installer | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index f2a64b054e..73c29437db 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1055,21 +1055,21 @@ Pin-Priority: 1000 _EOF_ G_EXEC eval 'echo '\''APT::Get::Allow-Downgrades "1";'\'' > /etc/apt/apt.conf.d/dietpi-armbian' fi + # Bootstrap Armbian repository G_EXEC_RETRIES=2 G_EXEC eval 'curl -sSfL '\''https://apt.armbian.com/armbian.key'\'' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-armbian.gpg --yes' + # Remove obsolete combined keyring [[ -f '/etc/apt/trusted.gpg' ]] && G_EXEC rm /etc/apt/trusted.gpg [[ -f '/etc/apt/trusted.gpg~' ]] && G_EXEC rm '/etc/apt/trusted.gpg~' + # Remove obsolete lists find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -Rf {} + + # Add Armbian repository G_EXEC eval "echo 'deb https://apt.armbian.com ${DISTRO_TARGET_NAME/bullseye/bookworm} main' > /etc/apt/sources.list.d/dietpi-armbian.list" - # Update APT lists cleanly - find /tmp -exec ls -dl {} + # debug - df -h /tmp # debug - /boot/dietpi/func/dietpi-set_software apt clean - G_EXEC_NOHALT=1 G_AGUP || { free -m; find /tmp -exec ls -dl {} +; df -h /tmp; exit 1; } - # Install kernel, device tree, U-Boot, firmware and initramfs packages + + # Select kernel, device tree and U-Boot packages local model='odroidn2' kernel='meson64' arch='arm64' branch='current' zstd=() case $G_HW_MODEL in 10) model='odroidc1' kernel='meson' arch='arm';; @@ -1157,10 +1157,18 @@ blacklist rockchip_rga blacklist rockchip_vdec _EOF_ fi + + # Update APT lists cleanly + find /tmp -exec ls -dl {} + # debug + df -h /tmp # debug + /boot/dietpi/func/dietpi-set_software apt clean + G_EXEC_NOHALT=1 G_AGUP || { free -m; find /tmp -exec ls -dl {} +; df -h /tmp; exit 1; } + # Install initramfs-tools first to have an initramfs generated on kernel install, and configure it to use zstd if supported for better compression and faster decompression [[ $kernel == 's5p6818' ]] || zstd=('zstd') G_AGI initramfs-tools u-boot-tools armbian-firmware "${zstd[@]}" [[ ${zstd[0]} ]] && G_CONFIG_INJECT 'COMPRESS=' 'COMPRESS=zstd' /etc/initramfs-tools/initramfs.conf + # Download and pre-install kernel hosted on dietpi.com where the Armbian APT repo provides a too old version or is not available if (( $TEST_KERNEL )) then @@ -1169,6 +1177,7 @@ _EOF_ G_EXEC_OUTPUT=1 G_EXEC dpkg -i package[12].deb G_EXEC rm package[12].deb fi + # Download and pre-install U-Boot hosted on dietpi.com where the Armbian APT repo provides a too old version or is not available if (( $TEST_UBOOT )) then @@ -1176,16 +1185,20 @@ _EOF_ G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb G_EXEC rm package.deb fi + # Install kernel and bootloader G_AGI linux-{image,dtb}-"$branch-$kernel" "linux-u-boot-$model-$branch" + # Cleanup [[ $G_HW_MODEL != 10 && -f '/boot/uImage' ]] && G_EXEC rm /boot/uImage [[ -f '/boot/.next' ]] && G_EXEC rm /boot/.next [[ -f '/boot/armbianEnv.txt' ]] && G_EXEC rm /boot/armbianEnv.txt [[ -f '/boot/orangepiEnv.txt' ]] && G_EXEC rm /boot/orangepiEnv.txt [[ -f '/boot/uEnv.txt' ]] && G_EXEC rm /boot/uEnv.txt + # Compile U-Boot script [[ -f '/boot/boot.cmd' ]] && G_EXEC mkimage -C none -A "$arch" -T script -d /boot/boot.cmd /boot/boot.scr + # Flash U-Boot /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc "$BOOT_DEVICE" From 8d05a19f26b202b63483740127798cc399ecd0a1 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 15 Jun 2024 18:27:28 +0200 Subject: [PATCH 292/458] v9.6 - CI | DietPi-Build: Add most host side debug output in case of systems-nspawn or dietpi-installer failure. --- .build/images/dietpi-build | 4 ++-- .github/workflows/dietpi-software.bash | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index f63b21a80c..ee9716afd6 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -455,9 +455,9 @@ then abind=("--bind=$FP_LOOP" '--bind=/dev/disk') for i in "${FP_LOOP}p"*; do abind+=("--bind=$i"); done fi -systemd-nspawn -bD rootfs "${abind[@]}" || exit 1 +systemd-nspawn -bD rootfs "${abind[@]}" || { G_DIETPI-NOTIFY 1 'systemd-nspawn failed, aborting...'; journalctl -n 25; ss -tlpn; df -h; free -h; exit 1; } -[[ -f 'rootfs/success' ]] || { G_DIETPI-NOTIFY 1 'The container setup did not finish successfully, aborting...'; exit 1; } +[[ -f 'rootfs/success' ]] || { G_DIETPI-NOTIFY 1 'The container setup did not finish successfully, aborting...'; journalctl -n 25; ss -tlpn; df -h; free -h; exit 1; } G_EXEC rm rootfs/success G_EXEC rm -Rf rootfs/{dev,proc,run,sys,tmp,var/log}/{,.??,.[^.]}* # Failsafe: /var/log/journal was found despite tmpfs mount! G_EXEC sync diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index 518c360924..077ce42663 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -426,5 +426,5 @@ G_EXEC sed --follow-symlinks -i 's|Prompt_on_Failure$|{ journalctl -n 50; ss -tu # Boot container ########################################## systemd-nspawn -bD rootfs -[[ -f 'rootfs/success' ]] || { journalctl -n 25; ss -tulpn; df -h; free -h; exit 1; } +[[ -f 'rootfs/success' ]] || { journalctl -n 25; ss -tlpn; df -h; free -h; exit 1; } } From f0a40f08e2daf9027b405e6300ddcbbbf1662f33 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 15 Jun 2024 18:45:49 +0200 Subject: [PATCH 293/458] v9.6 - DietPi-Installer | Revert minimal /tmp tmpfs size to 512 MiB, since it turned out to not be the reason for "getline (12: Cannot allocate memory)". That the issue disappeared after doing this change was a coincidence. It re-appears and disappears randomly, pretty much an indicator for a host-side issue. Debug output has been added to investigate it in case. --- .build/images/dietpi-installer | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 73c29437db..85b9f3a094 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -60,9 +60,9 @@ # Assure that /tmp is a tmpfs of at least 512 MiB if findmnt -M /tmp > /dev/null then - (( $(findmnt -Ufnrbo SIZE -M /tmp) < 1024**3 )) && mount -o 'remount,size=1G,noatime,lazytime,nodev,nosuid,mode=1777' /tmp + (( $(findmnt -Ufnrbo SIZE -M /tmp) < 512*1024**2 )) && mount -o 'remount,size=512M,noatime,lazytime,nodev,nosuid,mode=1777' /tmp else - mount -t tmpfs -o 'size=1G,noatime,lazytime,nodev,nosuid,mode=1777' tmpfs /tmp + mount -t tmpfs -o 'size=512M,noatime,lazytime,nodev,nosuid,mode=1777' tmpfs /tmp fi # Work inside /tmp tmpfs to reduce disk I/O and speed up download and unpacking From 2b5b0e7943366edad7991a1897502fa6cd6b0ec3 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 15 Jun 2024 19:06:23 +0200 Subject: [PATCH 294/458] Live patch 0 v9.5 (#7110) - Live patch 0 | Migrate to new U-Boot package on NanoPi R6C --- .update/version | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.update/version b/.update/version index 3058b8362e..8b5b58abf4 100644 --- a/.update/version +++ b/.update/version @@ -14,6 +14,7 @@ G_MIN_DEBIAN=6 # Alternative Git branch to automatically migrate to when Debian version is too low G_OLD_DEBIAN_BRANCH='8' # Live patches -G_LIVE_PATCH_DESC=() -G_LIVE_PATCH_COND=() -G_LIVE_PATCH=() +G_LIVE_PATCH_DESC=('Migrate to new U-Boot package on NanoPi R6C') +# shellcheck disable=SC2016 +G_LIVE_PATCH_COND=('(( $G_HW_MODEL == 79 )) && grep -q '\''^[[:blank:]]*fdtfile=rockchip/rk3588s-nanopi-r6c.dtb$'\'' /boot/dietpiEnv.txt') +G_LIVE_PATCH=('sed -i '\''s/r6s/r6c/'\'' /etc/apt/sources.list.d/dietpi.list && G_AGUP && G_AGI linux-u-boot-nanopi-r6c-legacy') From c7198cbb7bf173104e0dbf1d72c0e1d789730d99 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 15 Jun 2024 19:07:52 +0200 Subject: [PATCH 295/458] v9.6 - META | Remove live patch merged from master --- .update/version | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.update/version b/.update/version index 498a16b17e..c0cf4610de 100644 --- a/.update/version +++ b/.update/version @@ -14,7 +14,6 @@ G_MIN_DEBIAN=6 # Alternative Git branch to automatically migrate to when Debian version is too low G_OLD_DEBIAN_BRANCH='8' # Live patches -G_LIVE_PATCH_DESC=('Migrate to new U-Boot package on NanoPi R6C') -# shellcheck disable=SC2016 -G_LIVE_PATCH_COND=('(( $G_HW_MODEL == 79 )) && grep -q '\''^[[:blank:]]*fdtfile=rockchip/rk3588s-nanopi-r6c.dtb$'\'' /boot/dietpiEnv.txt') -G_LIVE_PATCH=('sed -i '\''s/r6s/r6c/'\'' /etc/apt/sources.list.d/dietpi.list && G_AGUP && G_AGI linux-u-boot-nanopi-r6c-legacy') +G_LIVE_PATCH_DESC=() +G_LIVE_PATCH_COND=() +G_LIVE_PATCH=() From 18c694a6329ad14511a27420eeec19b07fbcf04b Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 15 Jun 2024 19:33:18 +0200 Subject: [PATCH 296/458] v9.6 - CI | DietPi-Build: Bullseye/Jammy host mmdebstrap seems to not support "--skip=check/empty,check/qemu", hence split options --- .build/images/dietpi-build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index ee9716afd6..92b064a622 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -409,7 +409,8 @@ packages='apt,bash-completion,bzip2,ca-certificates,cron,curl,fdisk,gpg,htop,ipu [[ $HW_MODEL == 75 ]] && packages+='iproute2' || packages+='console-setup,dropbear,ethtool,fake-hwclock,ifupdown,isc-dhcp-client,kmod,rfkill,systemd-timesyncd,usbutils' # - "--skip=check/empty" to ignore /etc/fstab, boot and tmpfs mounts we added above # - "--skip=check/qemu" to skip arch test, which requires the "arch-test" package. We however assure emulation support out end. -G_EXEC_OUTPUT=1 G_EXEC mmdebstrap --debug --mode=root --format=dir --skip=check/empty,check/qemu --variant=minbase --include="$packages" --arch="$parch" --keyring="$keyring" "$distro" ./rootfs "$repo" +# - Bullseye/Jammy host mmdebstrap seems to not support "--skip=check/empty,check/qemu". +G_EXEC_OUTPUT=1 G_EXEC mmdebstrap --debug --mode=root --format=dir --skip=check/empty --skip=check/qemu --variant=minbase --include="$packages" --arch="$parch" --keyring="$keyring" "$distro" ./rootfs "$repo" G_EXEC umount rootfs/dev rootfs/run rootfs/var/cache/apt rootfs/var/lib/apt/lists rootfs/var/log ########################################## From f7b60cf3c26878cfde451461df376b4ed3d2bbdb Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 15 Jun 2024 22:56:50 +0200 Subject: [PATCH 297/458] v9.6 - Orange Pi 5 | Older U-Boot builds caused the Ethernet MAC address to be random and change on every boot. Recent U-Boot builds solve this, but they are not flashed automatically on package upgrades. We hence inform users and offer to flash the latest U-Boot image during the DietPi update. Many thanks to @thuehlinger for reporting and testing the case: https://github.com/MichaIng/DietPi/issues/6663 --- .update/patches | 28 +++++++++++++++++++++++++++- CHANGELOG.txt | 1 + 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/.update/patches b/.update/patches index e5dc060ec9..b10f7bcd84 100755 --- a/.update/patches +++ b/.update/patches @@ -1651,8 +1651,34 @@ Patch_9_5() Patch_9_6() { + # Orange Pi 5: Offer to flash new U-Boot image to solve random Ethernet MAC address: https://github.com/MichaIng/DietPi/issues/6663 + if (( $G_HW_MODEL == 80 )) + then + if G_WHIP_YESNO '[ INFO ] U-Boot update available to solve random Ethernet MAC address +\nIn case you are affected by a random Ethernet MAC address, which changes every boot, flashing the latest U-Boot image has shown to solve it: https://github.com/MichaIng/DietPi/issues/6663 +\nDo you want to flash the latest U-Boot image now? +\nNB: This can be done any time later via dietpi-config > Advanced Options.' + then + if [[ $G_ROOTFS_DEV == '/dev/mmcblk'* ]] + then + /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc + + elif [[ -b '/dev/mtdblock0' ]] + then + . /usr/lib/u-boot/platform_install.sh + # shellcheck disable=SC2154 + G_EXEC_OUTPUT=1 G_EXEC dd if="$DIR/rkspi_loader.img" of=/dev/mtdblock0 oflag=direct conv=notrunc status=progress + else + G_WHIP_MSG '[FAILED] SPI block device /dev/mtdblock0 not found +\nWe expect the SPI block device /dev/mtdblock0 to be the target for the U-Boot image. It however does not exist. +\nPlease report this to our forum or GitHub site, so we can check back: +- https://dietpi.com/forum/c/troubleshooting/10 +- https://github.com/MichaIng/DietPi/issues' + fi + fi + # NanoPi R6C: Migrate to dedicated APT component and U-Boot package: https://github.com/MichaIng/DietPi/issues/7109 - if (( $G_HW_MODEL == 79 )) && grep -q '^[[:blank:]]*fdtfile=rockchip/rk3588s-nanopi-r6c.dtb$' /boot/dietpiEnv.txt + elif (( $G_HW_MODEL == 79 )) && grep -q '^[[:blank:]]*fdtfile=rockchip/rk3588s-nanopi-r6c.dtb$' /boot/dietpiEnv.txt then HW_VARIANT=2 /boot/dietpi/func/dietpi-set_software apt-mirror dietpi G_AGUP diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 9fa56995ca..5d26c72df5 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,6 +3,7 @@ v9.6 Enhancements: - Quartz64/Star64/VisionFive 2 | The extended attribute handler for ext4 security labels "CONFIG_EXT4_FS_SECURITY" has been enabled for these SBCs, required for some Docker containers. Many thanks to @gxsw for reporting this missing feature: https://github.com/MichaIng/DietPi/issues/7102 +- Orange Pi 5 | Older U-Boot builds caused the Ethernet MAC address to be random and change on every boot. Recent U-Boot builds solve this, but they are not flashed automatically on package upgrades. We hence inform users and offer to flash the latest U-Boot image during the DietPi update. Many thanks to @thuehlinger for reporting and testing the case: https://github.com/MichaIng/DietPi/issues/6663 Bug fixes: - Network | Resolved a rare issue, where shutdowns could hang, when networking.service and ifup@.service instances try to bring down the same network interface concurrently. Many thanks to @ioctl2 for reporting this issue: https://github.com/MichaIng/DietPi/issues/7104 From 8d57269989812622bca5dbf98d259d133c8b35e8 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 15 Jun 2024 23:21:50 +0200 Subject: [PATCH 298/458] v9.6 - Quartz64/Star64/VisionFive 2 | eBPF functionality for firewall and network monitoring software like Cilium has been added to our kernel builds for these SBCs. Many thanks to @kbrighton for reporting these missing features: https://github.com/MichaIng/DietPi/issues/6834 --- .build/images/Quartz64/quartz64_defconfig | 3 +++ CHANGELOG.txt | 1 + 2 files changed, 4 insertions(+) diff --git a/.build/images/Quartz64/quartz64_defconfig b/.build/images/Quartz64/quartz64_defconfig index 76e8c5888c..c2190049f6 100644 --- a/.build/images/Quartz64/quartz64_defconfig +++ b/.build/images/Quartz64/quartz64_defconfig @@ -142,6 +142,7 @@ CONFIG_CRYPTO_SHA2_ARM64_CE=y CONFIG_CRYPTO_SHA3_ARM64=m CONFIG_CRYPTO_SHA512_ARM64_CE=m CONFIG_CRYPTO_SM3_ARM64_CE=m +CONFIG_CRYPTO_USER_API_HASH=m CONFIG_CRYPTO_USER_API_RNG=m CONFIG_CUSE=m CONFIG_DEBUG_FS=y @@ -545,6 +546,7 @@ CONFIG_NET_ACT_GACT=m CONFIG_NET_ACT_GATE=m CONFIG_NET_ACT_MIRRED=m CONFIG_NET_CLS_ACT=y +CONFIG_NET_CLS_BPF=m CONFIG_NET_CLS_BASIC=m CONFIG_NET_CLS_FLOWER=m CONFIG_NET_DSA=m @@ -844,6 +846,7 @@ CONFIG_SATA_AHCI=y CONFIG_SATA_AHCI_PLATFORM=y CONFIG_SATA_MV=y CONFIG_SATA_SIL24=y +CONFIG_SCHEDSTATS=y CONFIG_SCHED_AUTOGROUP=y # CONFIG_SCHED_DEBUG is not set CONFIG_SCHED_MC=y diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 5d26c72df5..2b5a16464b 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,6 +3,7 @@ v9.6 Enhancements: - Quartz64/Star64/VisionFive 2 | The extended attribute handler for ext4 security labels "CONFIG_EXT4_FS_SECURITY" has been enabled for these SBCs, required for some Docker containers. Many thanks to @gxsw for reporting this missing feature: https://github.com/MichaIng/DietPi/issues/7102 +- Quartz64/Star64/VisionFive 2 | eBPF functionality for firewall and network monitoring software like Cilium has been added to our kernel builds for these SBCs. Many thanks to @kbrighton for reporting these missing features: https://github.com/MichaIng/DietPi/issues/6834 - Orange Pi 5 | Older U-Boot builds caused the Ethernet MAC address to be random and change on every boot. Recent U-Boot builds solve this, but they are not flashed automatically on package upgrades. We hence inform users and offer to flash the latest U-Boot image during the DietPi update. Many thanks to @thuehlinger for reporting and testing the case: https://github.com/MichaIng/DietPi/issues/6663 Bug fixes: From b041ddfc4fca46bd990152d205d7a9bebe7dac86 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 15 Jun 2024 23:22:57 +0200 Subject: [PATCH 299/458] v9.6 - META | Mute shellcheck annotation --- .update/patches | 1 + 1 file changed, 1 insertion(+) diff --git a/.update/patches b/.update/patches index b10f7bcd84..c4d55f2fe0 100755 --- a/.update/patches +++ b/.update/patches @@ -1665,6 +1665,7 @@ Patch_9_6() elif [[ -b '/dev/mtdblock0' ]] then + # shellcheck disable=SC1091 . /usr/lib/u-boot/platform_install.sh # shellcheck disable=SC2154 G_EXEC_OUTPUT=1 G_EXEC dd if="$DIR/rkspi_loader.img" of=/dev/mtdblock0 oflag=direct conv=notrunc status=progress From 9f6147ce6fc57d70dd7858682de938d43c75b064 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 16 Jun 2024 01:20:57 +0200 Subject: [PATCH 300/458] v9.6 - DietPi-Dashboard | Resolved an issue where the installation on RISC-V systems failed. --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 20 +++++++------------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 2b5a16464b..5dc6524597 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -12,6 +12,7 @@ Bug fixes: - VisionFive 2 | Resolved an issue where our new image did not boot, because of a false device tree name in /boot/extlinux/extlinux.conf. - NanoPi R6C | Resolved an issue where our new images did not boot, since the latest mainline U-Boot for R6S does not support the R6C anymore. Many thanks to @labmaster for reporting this issue: https://github.com/MichaIng/DietPi/issues/7109 - DietPi-Banner | Resolved an issue where incorrect RAM usage was printed with German and potentially other locales. Many thanks to @jwgn for reporting this issue: https://github.com/MichaIng/DietPi/issues/7107 +- DietPi-Dashboard | Resolved an issue where the installation on RISC-V systems failed. 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 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index be500575da..b7693bfdc4 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3285,27 +3285,21 @@ _EOF_ [[ $backend == 'Yes' ]] && backend='-backend' || backend= # Download binary and set config URL - local url - if (( $G_HW_ARCH == 11 )) - then - url="https://dietpi.com/downloads/binaries/dietpi-dashboard-$G_HW_ARCH_NAME$backend.zip" - - elif [[ $version == 'Stable' ]] - then - Download_Install "$(curl -sSfL 'https://api.github.com/repos/ravenclaw900/dietpi-dashboard/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*dietpi-dashboard-$G_HW_ARCH_NAME$backend\"$/{print \$4}")" /opt/dietpi-dashboard/dietpi-dashboard - url="https://raw.githubusercontent.com/ravenclaw900/DietPi-Dashboard/$(curl -sSfL 'https://api.github.com/repos/ravenclaw900/dietpi-dashboard/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}')/config.toml" - - elif [[ $version == 'Nightly' ]] + local config_url + if [[ $G_HW_ARCH == 11 || $version == 'Nightly' ]] then Download_Install "https://nightly.link/ravenclaw900/DietPi-Dashboard/workflows/push-build/main/dietpi-dashboard-$G_HW_ARCH_NAME$backend.zip" /opt/dietpi-dashboard - url='https://raw.githubusercontent.com/ravenclaw900/DietPi-Dashboard/main/config.toml' + config_url='https://raw.githubusercontent.com/ravenclaw900/DietPi-Dashboard/main/config.toml' + else + Download_Install "$(curl -sSfL 'https://api.github.com/repos/ravenclaw900/dietpi-dashboard/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*dietpi-dashboard-$G_HW_ARCH_NAME$backend\"$/{print \$4}")" /opt/dietpi-dashboard/dietpi-dashboard + config_url="https://raw.githubusercontent.com/ravenclaw900/DietPi-Dashboard/$(curl -sSfL 'https://api.github.com/repos/ravenclaw900/dietpi-dashboard/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}')/config.toml" fi G_EXEC chmod +x /opt/dietpi-dashboard/dietpi-dashboard # Config if [[ ! -f '/opt/dietpi-dashboard/config.toml' ]] then - G_EXEC curl -sSfL "$url" -o /opt/dietpi-dashboard/config.toml + G_EXEC curl -sSfL "$config_url" -o /opt/dietpi-dashboard/config.toml # Enable password protection with global software password by default G_CONFIG_INJECT 'pass[[:blank:]]' 'pass = true' /opt/dietpi-dashboard/config.toml G_CONFIG_INJECT 'hash[[:blank:]]' "hash = \"$(echo -n "$GLOBAL_PW" | sha512sum | mawk '{print $1}')\"" /opt/dietpi-dashboard/config.toml From 93b2ff690dbe331517d27dd36d928f651dc8fbe0 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 16 Jun 2024 01:24:11 +0200 Subject: [PATCH 301/458] v9.6 - CI | DietPi-Software test: Install nightly version of DietPi-Dashboard when passing test flag --- .github/workflows/dietpi-software.bash | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index 077ce42663..e9c5bdb332 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -311,8 +311,12 @@ then fi # Install test builds from dietpi.com if requested -# shellcheck disable=SC2016 -[[ $TEST == 'true' ]] && G_EXEC sed --follow-symlinks -i '/# Start DietPi-Software/a\sed -i '\''s|dietpi.com/downloads/binaries/$G_DISTRO_NAME/|dietpi.com/downloads/binaries/$G_DISTRO_NAME/testing/|'\'' /boot/dietpi/dietpi-software' rootfs/boot/dietpi/dietpi-login +if [[ $TEST == 'true' ]] +then + # shellcheck disable=SC2016 + G_EXEC sed --follow-symlinks -i '/# Start DietPi-Software/a\sed -i '\''s|dietpi.com/downloads/binaries/$G_DISTRO_NAME/|dietpi.com/downloads/binaries/$G_DISTRO_NAME/testing/|'\'' /boot/dietpi/dietpi-software' rootfs/boot/dietpi/dietpi-login + G_CONFIG_INJECT 'SOFTWARE_DIETPI_DASHBOARD_VERSION=' 'SOFTWARE_DIETPI_DASHBOARD_VERSION=Nightly' rootfs/boot/dietpi.txt +fi # Workaround invalid TERM on login # shellcheck disable=SC2016 From 9d0fbe50e6becd75b0e8362af2bd159ed895ed44 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 16 Jun 2024 01:51:11 +0200 Subject: [PATCH 302/458] v9.6 - CI | Align and update emulation dependencies and setup --- .build/images/dietpi-build | 2 +- .build/software/Amiberry/container_build.bash | 20 +++++++++++++++++-- .build/software/dietpi-software-build.bash | 20 +++++++++++++++++-- .github/workflows/dietpi-software.bash | 20 +++++++++++++++++-- 4 files changed, 55 insertions(+), 7 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 92b064a622..462cbb43a1 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -224,7 +224,7 @@ fi # Emulation support in case of incompatible architecture emulation=0 -(( ( $G_HW_ARCH < 10 && $G_HW_ARCH < $HW_ARCH ) || ( ( $G_HW_ARCH == 10 || $G_HW_ARCH == 11 ) && $G_HW_ARCH != $HW_ARCH ) )) && emulation=1 +(( $G_HW_ARCH == $HW_ARCH || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $HW_ARCH ) )) || emulation=1 # Bullseye/Jammy: binfmt-support still required for emulation. With systemd-binfmt only, mmdebstrap throws "E: can neither be executed natively nor via qemu user emulation with binfmt_misc" (( $emulation )) && { apackages+=('qemu-user-static'); (( $DISTRO == 6 )) && apackages+=('binfmt-support'); } diff --git a/.build/software/Amiberry/container_build.bash b/.build/software/Amiberry/container_build.bash index 18b95af376..8a2b9c5102 100755 --- a/.build/software/Amiberry/container_build.bash +++ b/.build/software/Amiberry/container_build.bash @@ -59,11 +59,27 @@ image="DietPi_Container-$image.img" # Dependencies ########################################## apackages=('xz-utils' 'parted' 'fdisk' 'systemd-container') -(( $G_HW_ARCH == $arch || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $arch ) )) || apackages+=('qemu-user-static') + +# Emulation support in case of incompatible architecture +emulation=0 +(( $G_HW_ARCH == $arch || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $arch ) )) || emulation=1 + +# Bullseye/Jammy: binfmt-support still required for emulation. With systemd-binfmt only, mmdebstrap throws "E: can neither be executed natively nor via qemu user emulation with binfmt_misc" +(( $emulation )) && { apackages+=('qemu-user-static'); [[ $DISTRO == 'bullseye' ]] && apackages+=('binfmt-support'); } + G_AG_CHECK_INSTALL_PREREQ "${apackages[@]}" # Register QEMU binfmt configs -dpkg-query -s 'qemu-user-static' &> /dev/null && G_EXEC systemctl restart systemd-binfmt +if (( $emulation )) +then + if [[ $DISTRO == 'bullseye' ]] + then + G_EXEC systemctl disable --now systemd-binfmt + G_EXEC systemctl restart binfmt-support + else + G_EXEC systemctl restart systemd-binfmt + fi +fi ########################################## # Prepare container diff --git a/.build/software/dietpi-software-build.bash b/.build/software/dietpi-software-build.bash index de37c10ab5..76da35068e 100644 --- a/.build/software/dietpi-software-build.bash +++ b/.build/software/dietpi-software-build.bash @@ -63,11 +63,27 @@ image="DietPi_Container-$image.img" # Dependencies ########################################## apackages=('xz-utils' 'parted' 'fdisk' 'systemd-container') -(( $G_HW_ARCH == $arch || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $arch ) )) || apackages+=('qemu-user-static') + +# Emulation support in case of incompatible architecture +emulation=0 +(( $G_HW_ARCH == $arch || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $arch ) )) || emulation=1 + +# Bullseye/Jammy: binfmt-support still required for emulation. With systemd-binfmt only, mmdebstrap throws "E: can neither be executed natively nor via qemu user emulation with binfmt_misc" +(( $emulation )) && { apackages+=('qemu-user-static'); [[ $DISTRO == 'bullseye' ]] && apackages+=('binfmt-support'); } + G_AG_CHECK_INSTALL_PREREQ "${apackages[@]}" # Register QEMU binfmt configs -dpkg-query -s 'qemu-user-static' &> /dev/null && G_EXEC systemctl restart systemd-binfmt +if (( $emulation )) +then + if [[ $DISTRO == 'bullseye' ]] + then + G_EXEC systemctl disable --now systemd-binfmt + G_EXEC systemctl restart binfmt-support + else + G_EXEC systemctl restart systemd-binfmt + fi +fi ########################################## # Prepare container diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index e9c5bdb332..de53cc80bc 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -260,11 +260,27 @@ done # Dependencies ########################################## apackages=('xz-utils' 'parted' 'fdisk' 'systemd-container') -(( $G_HW_ARCH == $arch || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $arch ) )) || apackages+=('qemu-user-static') + +# Emulation support in case of incompatible architecture +emulation=0 +(( $G_HW_ARCH == $arch || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $arch ) )) || emulation=1 + +# Bullseye/Jammy: binfmt-support still required for emulation. With systemd-binfmt only, mmdebstrap throws "E: can neither be executed natively nor via qemu user emulation with binfmt_misc" +(( $emulation )) && { apackages+=('qemu-user-static'); [[ $DISTRO == 'bullseye' ]] && apackages+=('binfmt-support'); } + G_AG_CHECK_INSTALL_PREREQ "${apackages[@]}" # Register QEMU binfmt configs -dpkg-query -s 'qemu-user-static' &> /dev/null && G_EXEC systemctl restart systemd-binfmt +if (( $emulation )) +then + if [[ $DISTRO == 'bullseye' ]] + then + G_EXEC systemctl disable --now systemd-binfmt + G_EXEC systemctl restart binfmt-support + else + G_EXEC systemctl restart systemd-binfmt + fi +fi ########################################## # Prepare container From 0e75521d5598ed37801e85fd7b798af55ecc3e20 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 17 Jun 2024 23:11:53 +0200 Subject: [PATCH 303/458] v9.6 - CI | Obtain host Debian/Ubuntu version in all build/test scripts. Since Ubuntu ships /etc/debian_version from Debian testing, assume that it is one version lower. Fix binfmt support in all scripts based on now correctly obtained host distro version. --- .build/images/dietpi-build | 7 +++++-- .build/images/dietpi-imager | 3 +++ .build/software/Amiberry/container_build.bash | 14 ++++++++++++-- .build/software/dietpi-software-build.bash | 14 ++++++++++++-- .github/workflows/dietpi-software.bash | 14 ++++++++++++-- 5 files changed, 44 insertions(+), 8 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 462cbb43a1..3c63703489 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -20,6 +20,9 @@ else '13.'*|'trixie/sid') G_DISTRO=8;; *) G_DIETPI-NOTIFY 1 "Unsupported distro version \"$debian_version\". Aborting ..."; exit 1;; esac + # Ubuntu ships with /etc/debian_version from Debian testing, hence we assume one version lower. + grep -q '^ID=ubuntu' /etc/os-release && ((G_DISTRO--)) + (( $G_DISTRO < 6 )) && { G_DIETPI-NOTIFY 1 'Unsupported Ubuntu version. Aborting ...'; exit 1; } fi case $G_HW_ARCH_NAME in 'armv6l') export G_HW_ARCH=1;; @@ -227,7 +230,7 @@ emulation=0 (( $G_HW_ARCH == $HW_ARCH || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $HW_ARCH ) )) || emulation=1 # Bullseye/Jammy: binfmt-support still required for emulation. With systemd-binfmt only, mmdebstrap throws "E: can neither be executed natively nor via qemu user emulation with binfmt_misc" -(( $emulation )) && { apackages+=('qemu-user-static'); (( $DISTRO == 6 )) && apackages+=('binfmt-support'); } +(( $emulation )) && { apackages+=('qemu-user-static'); (( $G_DISTRO < 7 )) && apackages+=('binfmt-support'); } # Virtual machine disk conversion [[ $VMTYPE && $VMTYPE != 'raw' ]] && apackages+=('qemu-utils') @@ -237,7 +240,7 @@ G_AG_CHECK_INSTALL_PREREQ --no-install-recommends parted mmdebstrap dbus systemd # Register QEMU binfmt configs if (( $emulation )) then - if (( $DISTRO == 6 )) + if (( $G_DISTRO < 7 )) then G_EXEC systemctl disable --now systemd-binfmt G_EXEC systemctl restart binfmt-support diff --git a/.build/images/dietpi-imager b/.build/images/dietpi-imager index 153565d5be..e4369281e0 100755 --- a/.build/images/dietpi-imager +++ b/.build/images/dietpi-imager @@ -33,6 +33,9 @@ '13.'*|'trixie/sid') G_DISTRO=8;; *) G_DIETPI-NOTIFY 1 "Unsupported distro version \"$debian_version\". Aborting ..."; exit 1;; esac + # Ubuntu ships with /etc/debian_version from Debian testing, hence we assume one version lower. + grep -q '^ID=ubuntu' /etc/os-release && ((G_DISTRO--)) + (( $G_DISTRO < 6 )) && { G_DIETPI-NOTIFY 1 'Unsupported Ubuntu version. Aborting ...'; exit 1; } fi readonly G_PROGRAM_NAME='DietPi-Imager' G_CHECK_ROOT_USER diff --git a/.build/software/Amiberry/container_build.bash b/.build/software/Amiberry/container_build.bash index 8a2b9c5102..c2c8cd7d8e 100755 --- a/.build/software/Amiberry/container_build.bash +++ b/.build/software/Amiberry/container_build.bash @@ -14,6 +14,16 @@ else . /tmp/dietpi-globals G_EXEC_NOHALT=1 G_EXEC rm /tmp/dietpi-globals export G_GITOWNER G_GITBRANCH G_HW_ARCH_NAME=$(uname -m) + read -r debian_version < /etc/debian_version + case $debian_version in + '11.'*|'bullseye/sid') G_DISTRO=6;; + '12.'*|'bookworm/sid') G_DISTRO=7;; + '13.'*|'trixie/sid') G_DISTRO=8;; + *) G_DIETPI-NOTIFY 1 "Unsupported distro version \"$debian_version\". Aborting ..."; exit 1;; + esac + # Ubuntu ships with /etc/debian_version from Debian testing, hence we assume one version lower. + grep -q '^ID=ubuntu' /etc/os-release && ((G_DISTRO--)) + (( $G_DISTRO < 6 )) && { G_DIETPI-NOTIFY 1 'Unsupported Ubuntu version. Aborting ...'; exit 1; } fi case $G_HW_ARCH_NAME in 'armv6l') export G_HW_ARCH=1;; @@ -65,14 +75,14 @@ emulation=0 (( $G_HW_ARCH == $arch || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $arch ) )) || emulation=1 # Bullseye/Jammy: binfmt-support still required for emulation. With systemd-binfmt only, mmdebstrap throws "E: can neither be executed natively nor via qemu user emulation with binfmt_misc" -(( $emulation )) && { apackages+=('qemu-user-static'); [[ $DISTRO == 'bullseye' ]] && apackages+=('binfmt-support'); } +(( $emulation )) && { apackages+=('qemu-user-static'); (( $G_DISTRO < 7 )) && apackages+=('binfmt-support'); } G_AG_CHECK_INSTALL_PREREQ "${apackages[@]}" # Register QEMU binfmt configs if (( $emulation )) then - if [[ $DISTRO == 'bullseye' ]] + if (( $G_DISTRO < 7 )) then G_EXEC systemctl disable --now systemd-binfmt G_EXEC systemctl restart binfmt-support diff --git a/.build/software/dietpi-software-build.bash b/.build/software/dietpi-software-build.bash index 76da35068e..554c274e1f 100644 --- a/.build/software/dietpi-software-build.bash +++ b/.build/software/dietpi-software-build.bash @@ -14,6 +14,16 @@ else . /tmp/dietpi-globals G_EXEC rm /tmp/dietpi-globals export G_GITOWNER G_GITBRANCH G_HW_ARCH_NAME=$(uname -m) + read -r debian_version < /etc/debian_version + case $debian_version in + '11.'*|'bullseye/sid') G_DISTRO=6;; + '12.'*|'bookworm/sid') G_DISTRO=7;; + '13.'*|'trixie/sid') G_DISTRO=8;; + *) G_DIETPI-NOTIFY 1 "Unsupported distro version \"$debian_version\". Aborting ..."; exit 1;; + esac + # Ubuntu ships with /etc/debian_version from Debian testing, hence we assume one version lower. + grep -q '^ID=ubuntu' /etc/os-release && ((G_DISTRO--)) + (( $G_DISTRO < 6 )) && { G_DIETPI-NOTIFY 1 'Unsupported Ubuntu version. Aborting ...'; exit 1; } fi case $G_HW_ARCH_NAME in 'armv6l') export G_HW_ARCH=1;; @@ -69,14 +79,14 @@ emulation=0 (( $G_HW_ARCH == $arch || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $arch ) )) || emulation=1 # Bullseye/Jammy: binfmt-support still required for emulation. With systemd-binfmt only, mmdebstrap throws "E: can neither be executed natively nor via qemu user emulation with binfmt_misc" -(( $emulation )) && { apackages+=('qemu-user-static'); [[ $DISTRO == 'bullseye' ]] && apackages+=('binfmt-support'); } +(( $emulation )) && { apackages+=('qemu-user-static'); (( $G_DISTRO < 7 )) && apackages+=('binfmt-support'); } G_AG_CHECK_INSTALL_PREREQ "${apackages[@]}" # Register QEMU binfmt configs if (( $emulation )) then - if [[ $DISTRO == 'bullseye' ]] + if (( $G_DISTRO < 7 )) then G_EXEC systemctl disable --now systemd-binfmt G_EXEC systemctl restart binfmt-support diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index de53cc80bc..4dd6efdf90 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -13,6 +13,16 @@ else . /tmp/dietpi-globals G_EXEC rm /tmp/dietpi-globals export G_GITOWNER G_GITBRANCH G_HW_ARCH_NAME=$(uname -m) + read -r debian_version < /etc/debian_version + case $debian_version in + '11.'*|'bullseye/sid') G_DISTRO=6;; + '12.'*|'bookworm/sid') G_DISTRO=7;; + '13.'*|'trixie/sid') G_DISTRO=8;; + *) G_DIETPI-NOTIFY 1 "Unsupported distro version \"$debian_version\". Aborting ..."; exit 1;; + esac + # Ubuntu ships with /etc/debian_version from Debian testing, hence we assume one version lower. + grep -q '^ID=ubuntu' /etc/os-release && ((G_DISTRO--)) + (( $G_DISTRO < 6 )) && { G_DIETPI-NOTIFY 1 'Unsupported Ubuntu version. Aborting ...'; exit 1; } fi case $G_HW_ARCH_NAME in 'armv6l') export G_HW_ARCH=1;; @@ -266,14 +276,14 @@ emulation=0 (( $G_HW_ARCH == $arch || ( $G_HW_ARCH < 10 && $G_HW_ARCH > $arch ) )) || emulation=1 # Bullseye/Jammy: binfmt-support still required for emulation. With systemd-binfmt only, mmdebstrap throws "E: can neither be executed natively nor via qemu user emulation with binfmt_misc" -(( $emulation )) && { apackages+=('qemu-user-static'); [[ $DISTRO == 'bullseye' ]] && apackages+=('binfmt-support'); } +(( $emulation )) && { apackages+=('qemu-user-static'); (( $G_DISTRO < 7 )) && apackages+=('binfmt-support'); } G_AG_CHECK_INSTALL_PREREQ "${apackages[@]}" # Register QEMU binfmt configs if (( $emulation )) then - if [[ $DISTRO == 'bullseye' ]] + if (( $G_DISTRO < 7 )) then G_EXEC systemctl disable --now systemd-binfmt G_EXEC systemctl restart binfmt-support From d27bc2c2a9b4e2b9f7410aa57de6250abccf7e9c Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 17 Jun 2024 23:53:08 +0200 Subject: [PATCH 304/458] v9.6 - DietPi-Globals | G_CHECK_NET: Update command string in G_EXEC info and error output and error handler dialogue with the actually checked IP/domain --- dietpi/func/dietpi-globals | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 40d601b491..e7845822a9 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -1137,6 +1137,7 @@ Press any key to continue...' { acommand[5]=$(sed -n '/^[[:blank:]]*CONFIG_CHECK_CONNECTION_IP=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) [[ ${acommand[5]} ]] || acommand[5]='9.9.9.9' + ecommand=${acommand[*]//\\/\\\\} } # Run check with given timeout and retries G_EXEC_RETRIES=$retries @@ -1165,6 +1166,7 @@ Press any key to continue...' G_GET_NET -6 -q gateway > /dev/null && [[ $(ip -6 -br a s scope global to 2000::/3 2> /dev/null) ]] || { exit_code=0; return 0; } acommand[5]=$(sed -n '/^[[:blank:]]*CONFIG_CHECK_CONNECTION_IPV6=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) [[ ${acommand[5]} ]] || acommand[5]='2620:fe::fe' + ecommand=${acommand[*]//\\/\\\\} } # Run check with given timeout and retries G_EXEC_RETRIES=$retries @@ -1187,6 +1189,7 @@ Press any key to continue...' { acommand[2]=$(sed -n '/^[[:blank:]]*CONFIG_CHECK_DNS_DOMAIN=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) [[ ${acommand[2]} ]] || acommand[2]='dns9.quad9.net' + ecommand=${acommand[*]//\\/\\\\} } # Run check with given retries G_EXEC_RETRIES=$retries From a636c0b4c7f20910baf1d1ef378a3ed453af2ff9 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 18 Jun 2024 17:52:09 +0200 Subject: [PATCH 305/458] v9.6 - CI | Armbian: Use version 5.7.1 for Raspberry Pi 1, since the target has been removed with v6.7.2 --- .build/software/Amiberry/build.bash | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.build/software/Amiberry/build.bash b/.build/software/Amiberry/build.bash index 61379b0115..7db831b63f 100755 --- a/.build/software/Amiberry/build.bash +++ b/.build/software/Amiberry/build.bash @@ -111,6 +111,8 @@ fi v_ami=$(curl -sSf 'https://api.github.com/repos/BlitterStudio/amiberry/releases/latest' | mawk -F\" '/^ "tag_name"/{print $4}') [[ $v_ami ]] || { G_DIETPI-NOTIFY 1 'No latest Amiberry version found, aborting ...'; exit 1; } v_ami=${v_ami#v} +# - ARMv6: v5.7.2 dropped support for Raspberry Pi 1, hence use v5.7.1 +[[ $PLATFORM == 'rpi1'* ]] && v_ami='5.7.1' G_DIETPI-NOTIFY 2 "Building Amiberry version \e[33m$v_ami\e[90m for platform: \e[33m$PLATFORM" G_EXEC cd /tmp G_EXEC curl -sSfLO "https://github.com/BlitterStudio/amiberry/archive/v$v_ami.tar.gz" From 8d25254ac27df1c7fbad42345880ff2c1c883505 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 18 Jun 2024 17:56:04 +0200 Subject: [PATCH 306/458] v9.6 - DietPi-Software | Box86/64: Update code for cleaner/complete uninstall, including de-registration from binfmt and cleanup of working dir on install. For Box64, on RPi 2 with BCM2710 (ARMv8, PCB v1.2) use RPi 3 target, which has the same SoC. --- dietpi/dietpi-software | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index b7693bfdc4..3aa24b368d 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -11050,6 +11050,10 @@ _EOF_ G_EXEC strip --remove-section=.comment --remove-section=.note box86 G_EXEC make install + # Cleanup + G_EXEC cd "$G_WORKING_DIR" + G_EXEC rm "box86-${version#v}" + # Reload binfmt if kernel module is available to have i386 binaries executed via box86 automatically from now on modprobe binfmt_misc 2> /dev/null && G_EXEC systemctl restart systemd-binfmt fi @@ -11071,8 +11075,8 @@ _EOF_ if (( $G_HW_ARCH == 11 )) then G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DRV64=1 - # - RPi 3 - elif (( $G_HW_MODEL == 3 )) + # - RPi 2/3 + elif (( $G_HW_MODEL == 2 || $G_HW_MODEL == 3 )) then G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DRPI3ARM64=1 # - RPi 4 @@ -11103,6 +11107,10 @@ _EOF_ G_EXEC strip --remove-section=.comment --remove-section=.note box64 G_EXEC make install + # Cleanup + G_EXEC cd "$G_WORKING_DIR" + G_EXEC rm "box64-${version#v}" + # Reload binfmt if kernel module is available to have x86_64 binaries executed via box64 automatically from now on modprobe binfmt_misc 2> /dev/null && G_EXEC systemctl restart systemd-binfmt fi @@ -12921,20 +12929,25 @@ If no WireGuard (auto)start is included, but you require it, please do the follo if To_Uninstall 62 # Box86 then - [[ -f '/usr/local/bin/box86' ]] && G_EXEC rm /usr/local/bin/box86 [[ -f '/etc/binfmt.d/box86.conf' ]] && G_EXEC rm /etc/binfmt.d/box86.conf - [[ -f '/usr/lib/i386-linux-gnu/libstdc++.so.6' ]] && G_EXEC rm /usr/lib/i386-linux-gnu/libstdc++.so.6 - [[ -f '/usr/lib/i386-linux-gnu/libstdc++.so.5' ]] && G_EXEC rm /usr/lib/i386-linux-gnu/libstdc++.so.5 - [[ -f '/usr/lib/i386-linux-gnu/libgcc_s.so.1' ]] && G_EXEC rm /usr/lib/i386-linux-gnu/libgcc_s.so.1 + [[ -d '/proc/sys/fs/binfmt_misc' ]] && G_EXEC systemctl restart systemd-binfmt + [[ -f '/usr/local/bin/box86' ]] && G_EXEC rm /usr/local/bin/box86 + for i in /usr/lib/i386-linux-gnu/lib{gcc_s,png12,stdc++,unwind}.so* + do + [[ -e $i ]] && ! dpkg-query -S "$i" &> /dev/null && G_EXEC rm "$i" + done [[ -d '/usr/lib/i386-linux-gnu' ]] && G_EXEC rmdir --ignore-fail-on-non-empty /usr/lib/i386-linux-gnu fi if To_Uninstall 197 # Box64 then - [[ -f '/usr/local/bin/box64' ]] && G_EXEC rm /usr/local/bin/box64 [[ -f '/etc/binfmt.d/box64.conf' ]] && G_EXEC rm /etc/binfmt.d/box64.conf - [[ -f '/usr/lib/x86_64-linux-gnu/libstdc++.so.6' ]] && G_EXEC rm /usr/lib/x86_64-linux-gnu/libstdc++.so.6 - [[ -f '/usr/lib/x86_64-linux-gnu/libgcc_s.so.1' ]] && G_EXEC rm /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 + [[ -d '/proc/sys/fs/binfmt_misc' ]] && G_EXEC systemctl restart systemd-binfmt + [[ -f '/usr/local/bin/box64' ]] && G_EXEC rm /usr/local/bin/box64 + for i in /usr/lib/x86_64-linux-gnu/lib{crypto,gcc_s,mbed,png12,ssl,stdc++,unwind}* + do + [[ -e $i ]] && ! dpkg-query -S "$i" &> /dev/null && G_EXEC rm "$i" + done [[ -d '/usr/lib/x86_64-linux-gnu' ]] && G_EXEC rmdir --ignore-fail-on-non-empty /usr/lib/x86_64-linux-gnu fi From b119f41f1f54f5f2489a9601b4a66e10adb4a216 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 18 Jun 2024 20:26:13 +0200 Subject: [PATCH 307/458] v9.6 - DietPi-Software | ruTorrent: Update fallback URL --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 3aa24b368d..268c314171 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8528,7 +8528,7 @@ _EOF_ # Install ruTorrent: Web UI for rTorrent # - Grab current version local version=$(curl -sSfL 'https://api.github.com/repos/Novik/ruTorrent/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}') - [[ $version ]] || { version='v4.3.3'; G_DIETPI-NOTIFY 1 "Automatic latest ruTorrent version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } + [[ $version ]] || { version='v4.3.4'; G_DIETPI-NOTIFY 1 "Automatic latest ruTorrent version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } Download_Install "https://github.com/Novik/ruTorrent/archive/$version.tar.gz" # - Reinstall freshly with preserved configs and 3rd party plugins From 42aec57ea7f0b3a215e724b73a98d69f085037dd Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 18 Jun 2024 12:15:05 -0700 Subject: [PATCH 308/458] v9.6 (#7115) - DietPi-Software | ADS-B Feeder: Newer versions of the Feeder Image no longer have the adsb-nonimage service. So don't try to start it. Signed-off-by: Dirk Hohndel --- dietpi/dietpi-software | 5 ----- 1 file changed, 5 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 268c314171..a4e0944e87 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -11931,11 +11931,6 @@ _EOF_ # finally ensure that /run allows executables (this is needed for the containers to be able to not do excessive # writes to physical storage - which might be an SD card) G_EXEC mount -o remount,exec /run - - # now that everything is in place, run the one time service to get the software pre-configured - # running this as a service allows it to do a bit of housekeeping in the background without disrupting - # the software install flow - G_EXEC systemctl start adsb-nonimage fi if To_Install 172 # WireGuard From 7982c249029bba9c899fd1d83d40973a2a528cc3 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 19 Jun 2024 22:02:54 +0200 Subject: [PATCH 309/458] v9.6 (#7118) - DietPi-Config | Some updates: Align coding. Hide LED control option on container images. Remove legacy Odroid C2 resolution and GPU memory split options. Add gateway/router and local DNS resolver to static DNS selection menu, when detected. --- CHANGELOG.txt | 2 + dietpi/dietpi-config | 546 ++++++++++++++----------------------------- 2 files changed, 183 insertions(+), 365 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 5dc6524597..01949cb322 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,6 +5,8 @@ Enhancements: - Quartz64/Star64/VisionFive 2 | The extended attribute handler for ext4 security labels "CONFIG_EXT4_FS_SECURITY" has been enabled for these SBCs, required for some Docker containers. Many thanks to @gxsw for reporting this missing feature: https://github.com/MichaIng/DietPi/issues/7102 - Quartz64/Star64/VisionFive 2 | eBPF functionality for firewall and network monitoring software like Cilium has been added to our kernel builds for these SBCs. Many thanks to @kbrighton for reporting these missing features: https://github.com/MichaIng/DietPi/issues/6834 - Orange Pi 5 | Older U-Boot builds caused the Ethernet MAC address to be random and change on every boot. Recent U-Boot builds solve this, but they are not flashed automatically on package upgrades. We hence inform users and offer to flash the latest U-Boot image during the DietPi update. Many thanks to @thuehlinger for reporting and testing the case: https://github.com/MichaIng/DietPi/issues/6663 +- DietPi-Config | Legacy Odroid C2 resolution and GPU memory options have been removed. +- DietPi-Config | The static DNS server menu now contains entries to select the default gateway/router or locally running DNS resolver (Pi-hole, AdGuard Home, Unbound, systemd-resolvd, ...), if detected. Bug fixes: - Network | Resolved a rare issue, where shutdowns could hang, when networking.service and ifup@.service instances try to bring down the same network interface concurrently. Many thanks to @ioctl2 for reporting this issue: https://github.com/MichaIng/DietPi/issues/7104 diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 0fd4369391..97b81a64c4 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -58,14 +58,12 @@ Menu_Main() { G_WHIP_MENU_ARRAY=( - '1' ': Display Options' '2' ': Audio Options' ) # Hide performance options on VM and container (( $G_HW_MODEL == 20 || $G_HW_MODEL == 75 )) || G_WHIP_MENU_ARRAY+=('3' ': Performance Options') G_WHIP_MENU_ARRAY+=( - '4' ': Advanced Options' '5' ': Language/Regional Options' '6' ': Security Options' @@ -92,23 +90,22 @@ esac } + # $1: 0=landscape 1=portrait Display_Rotation_Calc_XY_Invert() { - # 0=landscape 1=portrait - local input=$1 - local framebuffer_x=$(grep -m1 '^[[:blank:]]*framebuffer_width=' /boot/config.txt || vcgencmd get_config framebuffer_width) framebuffer_x=${framebuffer_x#*=}; framebuffer_x=${framebuffer_x:-0} local framebuffer_y=$(grep -m1 '^[[:blank:]]*framebuffer_height=' /boot/config.txt || vcgencmd get_config framebuffer_height) framebuffer_y=${framebuffer_y#*=}; framebuffer_y=${framebuffer_y:-0} + # 0/180 landscape - if (( $input == 0 && $framebuffer_x < $framebuffer_y )) + if (( $1 == 0 && $framebuffer_x < $framebuffer_y )) then G_CONFIG_INJECT 'framebuffer_width=' "framebuffer_width=$framebuffer_y" /boot/config.txt G_CONFIG_INJECT 'framebuffer_height=' "framebuffer_height=$framebuffer_x" /boot/config.txt # 90/270 portrait - elif (( $input == 1 && $framebuffer_x > $framebuffer_y )) + elif (( $1 == 1 && $framebuffer_x > $framebuffer_y )) then G_CONFIG_INJECT 'framebuffer_width=' "framebuffer_width=$framebuffer_y" /boot/config.txt G_CONFIG_INJECT 'framebuffer_height=' "framebuffer_height=$framebuffer_x" /boot/config.txt @@ -118,34 +115,35 @@ # TARGETMENUID=1 Menu_DisplayOptions() { - if (( $G_HW_MODEL == 21 )); then - + # Driver/Resolution + if (( $G_HW_MODEL == 21 )) + then G_WHIP_MENU_ARRAY=('1' ': Display Driver') - else - G_WHIP_MENU_ARRAY=('1' ': Display Resolution') - (( $G_HW_MODEL < 10 || $G_HW_MODEL == 12 )) && G_WHIP_MENU_ARRAY+=('2' ': GPU/RAM Memory Split') - if (( $G_HW_MODEL < 20 )) then local lcdpanel_text=$(sed -n '/^[[:blank:]]*CONFIG_LCDPANEL=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) G_WHIP_MENU_ARRAY+=('3' ": LCD/OLED Panel addon: [${lcdpanel_text:=none}]") fi - fi - # Display brightness + # Brightness G_WHIP_MENU_ARRAY+=('16' ': Display Brightness') + # X11 DPI local xorg_dpi_current=$(sed -n '/^[[:blank:]]*SOFTWARE_XORG_DPI=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) G_WHIP_MENU_ARRAY+=('17' ": X.Org DPI: [${xorg_dpi_current:-N/A}]") - (( $G_HW_MODEL == 20 )) || G_WHIP_MENU_ARRAY+=('14' ': LED Control') + # LED control: Hide on VM/container + (( $G_HW_MODEL == 20 || $G_HW_MODEL == 75 )) || G_WHIP_MENU_ARRAY+=('14' ': LED Control') # RPi only - if (( $G_HW_MODEL < 10 )); then + if (( $G_HW_MODEL < 10 )) + then + # GPU memory split + G_WHIP_MENU_ARRAY+=('2' ': GPU/RAM memory split') # HDMI rotation local rotation_hdmi_current=$(sed -n '/^[[:blank:]]*display_hdmi_rotate=/{s/^[^=]*=//p;q}' /boot/config.txt) @@ -161,23 +159,21 @@ (( $overscan_disabled )) && overscan_text='Off' G_WHIP_MENU_ARRAY+=('6' ": Overscan : [$overscan_text]") # - Overscan sizes - if (( ! $overscan_disabled )); then - + if (( ! $overscan_disabled )) + then local overscan_options=('overscan_left' 'overscan_right' 'overscan_top' 'overscan_bottom') local overscan_left=$(grep -m1 '^[[:blank:]]*overscan_left=' /boot/config.txt || vcgencmd get_config overscan_left); overscan_left=${overscan_left#*=} local overscan_right=$(grep -m1 '^[[:blank:]]*overscan_right=' /boot/config.txt || vcgencmd get_config overscan_right); overscan_right=${overscan_right#*=} local overscan_top=$(grep -m1 '^[[:blank:]]*overscan_top=' /boot/config.txt || vcgencmd get_config overscan_top); overscan_top=${overscan_top#*=} local overscan_bottom=$(grep -m1 '^[[:blank:]]*overscan_bottom=' /boot/config.txt || vcgencmd get_config overscan_bottom); overscan_bottom=${overscan_bottom#*=} G_WHIP_MENU_ARRAY+=('15' ": Overscan Compensation [L:${overscan_left:-N/A}] [R:${overscan_right:-N/A}] [T:${overscan_top:-N/A}] [B:${overscan_bottom:-N/A}]") - fi # HDMI signal boost, RPi up to 3 only - if (( $G_HW_MODEL < 4 )); then - + if (( $G_HW_MODEL < 4 )) + then local hdmi_boost_current=$(grep -m1 '^[[:blank:]]*config_hdmi_boost=' /boot/config.txt || vcgencmd get_config config_hdmi_boost); hdmi_boost_current=${hdmi_boost_current#*=} G_WHIP_MENU_ARRAY+=('7' ": HDMI Boost : [${hdmi_boost_current:-N/A}]") - fi # RPi codecs @@ -211,8 +207,8 @@ G_WHIP_MENU_ARRAY+=('13' ": MPEG2 Key : [${mpeg2_key_current:-none}]") # Odroids only - elif (( $G_HW_MODEL < 13 )); then - + elif (( $G_HW_MODEL < 13 )) + then # Remote local odroid_remote_text='Off' local odroid_remote_enabled=0 @@ -222,17 +218,14 @@ odroid_remote_enabled=1 fi G_WHIP_MENU_ARRAY+=('10' ": Odroid remote : [$odroid_remote_text]") - fi G_WHIP_DEFAULT_ITEM=$WHIP_SELECTION_PREVIOUS - G_WHIP_MENU 'Please select an option:' || { Back_or_Exit 0; return 0; } # Main menu - WHIP_SELECTION_PREVIOUS=$G_WHIP_RETURNED_VALUE - if (( $G_WHIP_RETURNED_VALUE == 15 )); then - + if (( $G_WHIP_RETURNED_VALUE == 15 )) + then for i in "${overscan_options[@]}" do G_WHIP_DEFAULT_ITEM=${!i} @@ -242,25 +235,22 @@ REBOOT_REQUIRED=1 done - elif (( $G_WHIP_RETURNED_VALUE == 1 )); then - + elif (( $G_WHIP_RETURNED_VALUE == 1 )) + then TARGETMENUID=2 - elif (( $G_WHIP_RETURNED_VALUE == 3 )); then - + elif (( $G_WHIP_RETURNED_VALUE == 3 )) + then G_WHIP_MENU_ARRAY=('none' ': Uninstall all panels') G_WHIP_MENU_ARRAY+=('waveshare32' ': 320x240 panel with touch input') - if (( $G_HW_MODEL < 10 )); then - + if (( $G_HW_MODEL < 10 )) + then G_WHIP_MENU_ARRAY+=('esp01215e' ': Elecrow 1024x600 7" IPS HDMI panel with touch input') G_WHIP_MENU_ARRAY+=('allo-boss2-oled' ': Allo Boss2 DAC OLED display') - else - G_WHIP_MENU_ARRAY+=('odroid-lcd35' ': 480x320 panel with touch input') (( $G_HW_MODEL == 11 )) && G_WHIP_MENU_ARRAY+=('odroid-cloudshell' ': 320x240 panel' 'odroid-cloudshell2' ': Odroid XU4 CloudShell 2 LCD') - fi G_WHIP_DEFAULT_ITEM=$lcdpanel_text @@ -268,32 +258,27 @@ /boot/dietpi/func/dietpi-set_hardware lcdpanel "$G_WHIP_RETURNED_VALUE" && REBOOT_REQUIRED=1 - elif (( $G_WHIP_RETURNED_VALUE == 2 )); then - - G_WHIP_MSG 'GPU/RAM Memory splits are pre-configured and applied during DietPi-Software setup.\n\nThe split value is optimized based on your software installs, however, feel free to tweak them.' + elif (( $G_WHIP_RETURNED_VALUE == 2 )) + then TARGETMENUID=6 - elif (( $G_WHIP_RETURNED_VALUE == 6 )); then - - if (( $overscan_disabled )); then - + elif (( $G_WHIP_RETURNED_VALUE == 6 )) + then + if (( $overscan_disabled )) + then G_CONFIG_INJECT 'disable_overscan=' 'disable_overscan=0' /boot/config.txt - else - G_CONFIG_INJECT 'disable_overscan=' 'disable_overscan=1' /boot/config.txt for i in "${overscan_options[@]}" do sed --follow-symlinks -i "/^[[:blank:]]*$i=/c\#$i=0" /boot/config.txt done - fi REBOOT_REQUIRED=1 - elif (( $G_WHIP_RETURNED_VALUE == 7 )); then - + elif (( $G_WHIP_RETURNED_VALUE == 7 )) + then G_WHIP_MENU_ARRAY=( - '0' ': Disabled' '2' ': RPi 1 A/B Default' '5' ': RPi 1+/2/3 Default' @@ -311,49 +296,47 @@ A long (or insufficiently manufactured) cable may required a higher boost settin G_CONFIG_INJECT 'config_hdmi_boost=' "config_hdmi_boost=$G_WHIP_RETURNED_VALUE" /boot/config.txt && REBOOT_REQUIRED=1 - elif (( $G_WHIP_RETURNED_VALUE == 18 )); then - + elif (( $G_WHIP_RETURNED_VALUE == 18 )) + then /boot/dietpi/func/dietpi-set_hardware rpi-codec $(( ! $rpi_codecs_enabled )) && REBOOT_REQUIRED=1 - elif (( $G_WHIP_RETURNED_VALUE == 8 )); then - + elif (( $G_WHIP_RETURNED_VALUE == 8 )) + then /boot/dietpi/func/dietpi-set_hardware rpi-camera $(( ! $rpi_camera_module_enabled )) && REBOOT_REQUIRED=1 - elif (( $G_WHIP_RETURNED_VALUE == 9 )); then - + elif (( $G_WHIP_RETURNED_VALUE == 9 )) + then G_CONFIG_INJECT 'disable_camera_led=' "disable_camera_led=$(( ! $rpi_camera_led_disabled ))" /boot/config.txt && REBOOT_REQUIRED=1 - elif (( $G_WHIP_RETURNED_VALUE == 10 )); then - - if (( $odroid_remote_enabled )); then - + elif (( $G_WHIP_RETURNED_VALUE == 10 )) + then + if (( $odroid_remote_enabled )) + then /boot/dietpi/func/dietpi-set_hardware remoteir none && REBOOT_REQUIRED=1 elif G_WHIP_YESNO 'This will enable the IR modules, setup Lirc and the Odroid Remote for Odroid C1, C2 and XU4 CloudShell. -\nNB: Other remotes can be configured by running "irrecord" and applying the codes to "/etc/lirc/lircd.conf"\n\nDo you wish to continue?'; then - +\nNB: Other remotes can be configured by running "irrecord" and applying the codes to "/etc/lirc/lircd.conf"\n\nDo you wish to continue?' + then /boot/dietpi/func/dietpi-set_hardware remoteir odroid_remote && REBOOT_REQUIRED=1 - fi - elif (( $G_WHIP_RETURNED_VALUE == 11 )); then - - if (( $justboom_ir_remote_enabled )); then - + elif (( $G_WHIP_RETURNED_VALUE == 11 )) + then + if (( $justboom_ir_remote_enabled )) + then /boot/dietpi/func/dietpi-set_hardware remoteir none && REBOOT_REQUIRED=1 elif G_WHIP_YESNO 'Got a JustBoom IR Remote? Excellent! -\nDietPi will enable the IR modules, setup Lirc and enable support for MPD controls by default:\n\nDo you wish to continue?'; then - +\nDietPi will enable the IR modules, setup Lirc and enable support for MPD controls by default:\n\nDo you wish to continue?' + then /boot/dietpi/func/dietpi-set_hardware remoteir justboom_ir_remote && REBOOT_REQUIRED=1 - fi - elif (( $G_WHIP_RETURNED_VALUE == 12 )); then - + elif (( $G_WHIP_RETURNED_VALUE == 12 )) + then G_WHIP_DEFAULT_ITEM=$vc1_key_current - if G_WHIP_INPUTBOX 'Please enter your key for VC1:\n - EG: 0x00000000'; then - + if G_WHIP_INPUTBOX 'Please enter your key for VC1:\n - EG: 0x00000000' + then G_CONFIG_INJECT 'decode_WVC1=' "decode_WVC1=$G_WHIP_RETURNED_VALUE" /boot/config.txt # https://github.com/MichaIng/DietPi/issues/1487 @@ -361,14 +344,13 @@ A long (or insufficiently manufactured) cable may required a higher boost settin (( ${current_gpu_mem:=76} < 96 )) && /boot/dietpi/func/dietpi-set_hardware gpumemsplit 96 REBOOT_REQUIRED=1 - fi - elif (( $G_WHIP_RETURNED_VALUE == 13 )); then - + elif (( $G_WHIP_RETURNED_VALUE == 13 )) + then G_WHIP_DEFAULT_ITEM=$mpeg2_key_current - if G_WHIP_INPUTBOX 'Please enter your key for MPEG2:\n - EG: 0x00000000'; then - + if G_WHIP_INPUTBOX 'Please enter your key for MPEG2:\n - EG: 0x00000000' + then G_CONFIG_INJECT 'decode_MPG2=' "decode_MPG2=$G_WHIP_RETURNED_VALUE" /boot/config.txt # https://github.com/MichaIng/DietPi/issues/1487 @@ -376,13 +358,11 @@ A long (or insufficiently manufactured) cable may required a higher boost settin (( ${current_gpu_mem:=76} < 96 )) && /boot/dietpi/func/dietpi-set_hardware gpumemsplit 96 REBOOT_REQUIRED=1 - fi - elif (( $G_WHIP_RETURNED_VALUE == 4 )); then - + elif (( $G_WHIP_RETURNED_VALUE == 4 )) + then G_WHIP_MENU_ARRAY=( - '0' ': Disabled (default)' '1' ': 90 degrees' '2' ': 180 degrees' @@ -408,8 +388,8 @@ A long (or insufficiently manufactured) cable may required a higher boost settin fi REBOOT_REQUIRED=1 - elif (( $G_WHIP_RETURNED_VALUE == 5 )); then - + elif (( $G_WHIP_RETURNED_VALUE == 5 )) + then G_WHIP_MENU_ARRAY=( '0' ': Disabled (default)' @@ -417,18 +397,17 @@ A long (or insufficiently manufactured) cable may required a higher boost settin ) G_WHIP_DEFAULT_ITEM=$rotation_lcd_current - if G_WHIP_MENU 'Please select an option:\n\nNB: This option is for RPi touchscreen.'; then - + if G_WHIP_MENU 'Please select an option:\n\nNB: This option is for RPi touchscreen.' + then G_CONFIG_INJECT 'lcd_rotate=' "lcd_rotate=$G_WHIP_RETURNED_VALUE" /boot/config.txt && REBOOT_REQUIRED=1 - fi - elif (( $G_WHIP_RETURNED_VALUE == 14 )); then - + elif (( $G_WHIP_RETURNED_VALUE == 14 )) + then /boot/dietpi/dietpi-led_control - elif (( $G_WHIP_RETURNED_VALUE == 16 )); then - + elif (( $G_WHIP_RETURNED_VALUE == 16 )) + then # Find and obtain values for all backlight devices local fp_brightness iTotalAvailable=0 aFp_Brightness_Available=() aBrightness_Name=() aBrightness_Current=() aBrightness_Max=() for fp_brightness in /sys/class/backlight/* @@ -494,10 +473,9 @@ A long (or insufficiently manufactured) cable may required a higher boost settin Info_HW_OptionNotSupported fi - elif (( $G_WHIP_RETURNED_VALUE == 17 )); then - + elif (( $G_WHIP_RETURNED_VALUE == 17 )) + then G_WHIP_MENU_ARRAY=( - '96' ': Default' '120' ": +25% larger" '144' ": +50% larger" @@ -509,31 +487,28 @@ A long (or insufficiently manufactured) cable may required a higher boost settin if G_WHIP_MENU "Please select a DPI value for Xorg: - A higher value will make text and windows larger - Has no effect on local terminal (eg: no desktop installed) - \nNB: Setting will only take effect, once system is restarted."; then - + \nNB: Setting will only take effect, once system is restarted." + then G_CONFIG_INJECT 'SOFTWARE_XORG_DPI=' "SOFTWARE_XORG_DPI=$G_WHIP_RETURNED_VALUE" /boot/dietpi.txt G_EXEC mkdir -p /etc/X11/Xsession.d echo "xrandr --dpi $G_WHIP_RETURNED_VALUE" > /etc/X11/Xsession.d/99-dietpi-dpi REBOOT_REQUIRED=1 - fi - fi } # TARGETMENUID=2 - Menu_DisplayOptions_Driver_Resolution(){ - + Menu_DisplayOptions_Driver_Resolution() + { G_WHIP_BUTTON_CANCEL_TEXT='Cancel' # VM - if (( $G_HW_MODEL == 20 )); then - + if (( $G_HW_MODEL == 20 )) + then local current=$(sed -n '/^[[:blank:]]*GRUB_GFXMODE=/{s/^[^=]*=//p;q}' /etc/default/grub) [[ $current ]] || current='System default' G_WHIP_MENU_ARRAY=( - 'System default' '' '1600x1200' '' '1280x1024' '' @@ -547,23 +522,20 @@ A long (or insufficiently manufactured) cable may required a higher boost settin \nNB: This only affects the virtual screen resolution, not the SSH session. You might need to increase the maximum guest screen resolution within your VM software." || { Back_or_Exit 1; return 0; } # Display Options - if [[ $G_WHIP_RETURNED_VALUE == 'System default' ]]; then - + if [[ $G_WHIP_RETURNED_VALUE == 'System default' ]] + then sed --follow-symlinks -i 's/^[[:blank:]]*GRUB_GFXMODE=/#GRUB_GFXMODE=/' /etc/default/grub sed --follow-symlinks -i 's/^[[:blank:]]*GRUB_GFXPAYLOAD_LINUX=/#GRUB_GFXPAYLOAD_LINUX=/' /etc/default/grub - else - G_CONFIG_INJECT 'GRUB_GFXMODE=' "GRUB_GFXMODE=$G_WHIP_RETURNED_VALUE" /etc/default/grub G_CONFIG_INJECT 'GRUB_GFXPAYLOAD_LINUX=' 'GRUB_GFXPAYLOAD_LINUX=keep' /etc/default/grub 'GRUB_GFXMODE=' - fi update-grub # Native PC - elif (( $G_HW_MODEL == 21 )); then - + elif (( $G_HW_MODEL == 21 )) + then local gpu_current=$(sed -n '/^[[:blank:]]*CONFIG_GPU_DRIVER=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) gpu_current=${gpu_current,,} local driver_installed=() @@ -596,7 +568,6 @@ A long (or insufficiently manufactured) cable may required a higher boost settin fi G_WHIP_MENU_ARRAY=( - 'Nvidia' ": ${driver_installed[0]} | Proprietary GPU driver" 'Intel' ": ${driver_installed[1]} | Open-Source VA-API GPU drivers" 'AMD' ": ${driver_installed[2]} | Proprietary GPU driver" @@ -625,25 +596,23 @@ A long (or insufficiently manufactured) cable may required a higher boost settin fi # RPi - elif (( $G_HW_MODEL < 10 )); then - + elif (( $G_HW_MODEL < 10 )) + then local framebuffer_x=$(grep -m1 '^[[:blank:]]*framebuffer_width=' /boot/config.txt || vcgencmd get_config framebuffer_width) framebuffer_x=${framebuffer_x#*=}; framebuffer_x=${framebuffer_x:-0} local framebuffer_y=$(grep -m1 '^[[:blank:]]*framebuffer_height=' /boot/config.txt || vcgencmd get_config framebuffer_height) framebuffer_y=${framebuffer_y#*=}; framebuffer_y=${framebuffer_y:-0} local current_value=$(sed -n '/^[[:blank:]]*dtoverlay=vc4-/{s/^[^=]*=//p;q}' /boot/config.txt) # OpenGL check 1st - if [[ ! $current_value ]]; then - + if [[ ! $current_value ]] + then # Framebuffer current_value="$framebuffer_x X $framebuffer_y" # Check for headless grep -q '^[[:blank:]]*AUTO_SETUP_HEADLESS=1' /boot/dietpi.txt && current_value='Headless' - fi G_WHIP_MENU_ARRAY=( - 'vc4-kms-v3d' ': OpenGL | 1920 x 1080' 'vc4-fkms-v3d' ': OpenGL | 1920 x 1080' '1080p' ': 1920 x 1080' @@ -667,8 +636,8 @@ A long (or insufficiently manufactured) cable may required a higher boost settin REBOOT_REQUIRED=1 # Enable headless if chosen, else always disable - if [[ $G_WHIP_RETURNED_VALUE == 'Headless' ]]; then - + if [[ $G_WHIP_RETURNED_VALUE == 'Headless' ]] + then G_WHIP_YESNO 'Using the Headless option will: - Disable HDMI and composite output - Disable the framebuffer @@ -680,91 +649,42 @@ Re-enabling HDMI requires a reboot. If you need emergency HDMI output, edit the - In dietpi.txt, set "AUTO_SETUP_HEADLESS=0".' || { REBOOT_REQUIRED=0; return; } /boot/dietpi/func/dietpi-set_hardware headless 1 - else - /boot/dietpi/func/dietpi-set_hardware headless 0 - fi # Disable composite if not chosen - if [[ $G_WHIP_RETURNED_VALUE != 'sdtv_mode'* ]]; then - + if [[ $G_WHIP_RETURNED_VALUE != 'sdtv_mode'* ]] + then sed --follow-symlinks -i '/sdtv_mode=/c\#sdtv_mode=0' /boot/config.txt sed --follow-symlinks -i '/enable_tvout=/c\#enable_tvout=0' /boot/config.txt - fi # Disable OpenGL if not chosen [[ $G_WHIP_RETURNED_VALUE == 'vc4-'* ]] || /boot/dietpi/func/dietpi-set_hardware rpi-opengl disable - if [[ $G_WHIP_RETURNED_VALUE == 'vc4-'* ]]; then - + if [[ $G_WHIP_RETURNED_VALUE == 'vc4-'* ]] + then /boot/dietpi/func/dietpi-set_hardware rpi-opengl "$G_WHIP_RETURNED_VALUE" - elif [[ $G_WHIP_RETURNED_VALUE != 'Headless' ]]; then - + elif [[ $G_WHIP_RETURNED_VALUE != 'Headless' ]] + then case "$G_WHIP_RETURNED_VALUE" in - 'sdtv_mode'*) - # Enable SDTV on RPi4, apply to all RPi to allow SD card switch G_CONFIG_INJECT 'enable_tvout=' 'enable_tvout=1' /boot/config.txt G_CONFIG_INJECT 'sdtv_mode=' "$G_WHIP_RETURNED_VALUE" /boot/config.txt - framebuffer_x=720 - framebuffer_y=576 - ;; - - 'DietPi-CloudShell') - - framebuffer_x=320 - framebuffer_y=240 + framebuffer_x=720 framebuffer_y=576 ;; - - '1080p') - - framebuffer_x=1920 - framebuffer_y=1080 - ;; - - '720p') - - framebuffer_x=1280 - framebuffer_y=720 - ;; - - '480p') - - framebuffer_x=854 - framebuffer_y=480 - ;; - - 'RPi Touchscreen') - - framebuffer_x=800 - framebuffer_y=480 - ;; - - 'PC1') - - framebuffer_x=1024 - framebuffer_y=768 - ;; - - 'PC2') - - framebuffer_x=800 - framebuffer_y=640 - ;; - - 'PC3') - - framebuffer_x=640 - framebuffer_y=480 - ;; - + 'DietPi-CloudShell') framebuffer_x=320 framebuffer_y=240;; + '1080p') framebuffer_x=1920 framebuffer_y=1080;; + '720p') framebuffer_x=1280 framebuffer_y=720;; + '480p') framebuffer_x=854 framebuffer_y=480;; + 'RPi Touchscreen') framebuffer_x=800 framebuffer_y=480;; + 'PC1') framebuffer_x=1024 framebuffer_y=768;; + 'PC2') framebuffer_x=800 framebuffer_y=640;; + 'PC3') framebuffer_x=640 framebuffer_y=480;; *) :;; - esac # Apply framebuffer size and Chromium autostart resolution @@ -772,30 +692,22 @@ Re-enabling HDMI requires a reboot. If you need emergency HDMI output, edit the G_CONFIG_INJECT 'framebuffer_height=' "framebuffer_height=$framebuffer_y" /boot/config.txt G_CONFIG_INJECT 'SOFTWARE_CHROMIUM_RES_X=' "SOFTWARE_CHROMIUM_RES_X=$framebuffer_x" /boot/dietpi.txt G_CONFIG_INJECT 'SOFTWARE_CHROMIUM_RES_Y=' "SOFTWARE_CHROMIUM_RES_Y=$framebuffer_y" /boot/dietpi.txt - fi # Odroid XU4 - elif (( $G_HW_MODEL == 11 )); then - + elif (( $G_HW_MODEL == 11 )) + then # Get Current Values local current_resolution=$(grep -Em1 'setenv[[:blank:]]+videoconfig[[:blank:]]' /boot/boot.ini) - if [[ $current_resolution == *'1920x1080'* ]]; then - - current_resolution='1080p' - - elif [[ $current_resolution == *'1280x720'* ]]; then - - current_resolution='720p' - - elif [[ $current_resolution == *'720x480'* ]]; then - - current_resolution='480p' - - fi + case $current_resolution in + *'1920x1080'*) current_resolution='1920x1080';; + *'1280x720'*) current_resolution='1280x720';; + *'720x480'*) current_resolution='720x480';; + *'1024x600'*) current_resolution='1024x600';; + *) :;; + esac G_WHIP_MENU_ARRAY=( - '1920x1080' ': 1080p' '1280x720' ': 720p' '720x480' ': 480p' @@ -805,8 +717,6 @@ Re-enabling HDMI requires a reboot. If you need emergency HDMI output, edit the G_WHIP_DEFAULT_ITEM=$current_resolution G_WHIP_MENU "Hardware : $G_HW_MODEL_NAME\nCurrent: $current_resolution" || { Back_or_Exit 1; return 0; } # Display Options - REBOOT_REQUIRED=1 - # DVI or HDMI if [[ $G_WHIP_RETURNED_VALUE == '1024x600' ]] then @@ -817,56 +727,11 @@ Re-enabling HDMI requires a reboot. If you need emergency HDMI output, edit the G_CONFIG_INJECT 'setenv[[:blank:]]+videoconfig[[:blank:]]' "setenv videoconfig \"drm_kms_helper.edid_firmware=edid/$G_WHIP_RETURNED_VALUE.bin\"" /boot/boot.ini 'ODROIDXU-UBOOT-CONFIG' - # Odroid C2 legacy - elif [[ $G_HW_MODEL == 12 && -f '/boot/boot.ini' ]]; then - - # Get Current Values - local current_resolution=$(mawk -F '"' '/setenv m "/{print $2;exit}' /boot/boot.ini | sed 's/p/p /') - # - NB: also added space after xxxp, so its easier to read, and selects default item. - - G_WHIP_MENU_ARRAY=( - - '2160p 60hz' ': 4K (Recommended)' - '2160p 50hz' ': 4K' - '2160p 30hz' ': 4K' - '2160p 25hz' ': 4K' - '2160p 24hz' ': 4K' - '1080p 60hz' ': 1080p (Recommended)' - '1080p 50hz' ': 1080p' - '1080p 24hz' ': 1080p' - '720p 60hz' ': 720p (Recommended)' - '720p 50hz' ': 720p' - '480p 60hz' ': 480p' - '1024x600p 60hz' ': VU7+' - '1024x768p 60hz' ': 4:3' - '800x600p 60hz' ': 4:3' - ) - - G_WHIP_DEFAULT_ITEM=$current_resolution - G_WHIP_MENU "Hardware : $G_HW_MODEL_NAME\nCurrent: $current_resolution" || { Back_or_Exit 1; return 0; } # Display Options - - [[ $current_resolution != "$G_WHIP_RETURNED_VALUE" ]] && REBOOT_REQUIRED=1 - - # Always reset vga/dvi options - sed --follow-symlinks -Ei 's/^[[:blank:]]*(setenv[[:blank:]]+vout[[:blank:]].*$)/#\1/' /boot/boot.ini - - # DVI / VU7+ - if [[ $G_WHIP_RETURNED_VALUE == '1024x600p 60hz' ]]; then - - # DVI mode - G_CONFIG_INJECT 'setenv[[:blank:]]+vout[[:blank:]]' 'setenv vout "dvi"' /boot/boot.ini 'ODROIDC2-UBOOT-CONFIG' - - fi - - # Remove the space from option - local temp_string=${G_WHIP_RETURNED_VALUE//[[:blank:]]/} - - G_CONFIG_INJECT 'setenv[[:blank:]]+m[[:blank:]]' "setenv m \"$temp_string\"" /boot/boot.ini 'ODROIDC2-UBOOT-CONFIG' + REBOOT_REQUIRED=1 else Info_HW_OptionNotSupported Back_or_Exit 1 # Display Options fi - } # TARGETMENUID=19 @@ -1725,79 +1590,30 @@ If unsure, set any value, 'Ondemand Down Factor' option on the next screen will # TARGETMENUID=6 Menu_GpumemoryOptions() { - G_WHIP_BUTTON_CANCEL_TEXT='Cancel' - - # RPi - if (( $G_HW_MODEL < 10 )); then - - # Get current memory split - # - Get override setting: gpu_mem_1024 is effective for all models with >= 1 GiB - local value=1024 - (( $value < 1024 )) && value=$G_HW_MEMORY_SIZE - local gpu_mem_current=$(sed -n "/^[[:blank:]]*gpu_mem_$value=/{s/^[^=]*=//p;q}" /boot/config.txt) # override setting - [[ $gpu_mem_current ]] || gpu_mem_current=$(sed -n "/^[[:blank:]]*gpu_mem=/{s/^[^=]*=//p;q}" /boot/config.txt) # base setting - [[ $gpu_mem_current ]] || { (( $value < 1024 )) && gpu_mem_current=64 || gpu_mem_current=76; } # default value - local ram_mem_current=$((G_HW_MEMORY_SIZE-gpu_mem_current)) - - # Create array for storing menu selectable options. - G_WHIP_MENU_ARRAY=( - - 16 ': Server' - 64 ': Desktop' - 96 ': Camera' - 128 ': Gaming' - ) - - if (( $G_HW_MEMORY_SIZE >= 512 )); then - - G_WHIP_MENU_ARRAY+=(192 '') - G_WHIP_MENU_ARRAY+=(256 ': Video de/encoding') - - if (( $G_HW_MEMORY_SIZE >= 1024 )); then - - G_WHIP_MENU_ARRAY+=(384 '') - G_WHIP_MENU_ARRAY+=(512 ': You are insane!') - - fi - - fi - - G_WHIP_DEFAULT_ITEM=$gpu_mem_current - G_WHIP_MENU "Hardware : $G_HW_MODEL_NAME\nCurrent: $gpu_mem_current MiB GPU | $ram_mem_current MiB RAM" || { Back_or_Exit 1; return 0; } # Display Options - - /boot/dietpi/func/dietpi-set_hardware gpumemsplit "$G_WHIP_RETURNED_VALUE" && REBOOT_REQUIRED=1 - - # Odroid C2 legacy - elif [[ $G_HW_MODEL == 12 && -f '/boot/boot.ini' ]]; then - - # Get current memory split - local ram_mem_current=$(free -m | mawk '/Mem:/{print $2;exit}') - local gpu_mem_current=$((2048-ram_mem_current)) - - # HDMI/headless extra data - local display_output_enabled=$(grep -Ecm1 '^[[:blank:]]*setenv[[:blank:]]+nographics[[:blank:]]+"0"' /boot/boot.ini) - local display_output_text='On' - (( $display_output_enabled )) || display_output_text='Off' - - G_WHIP_MENU_ARRAY=( - - 'Headless' ': HDMI: Disabled | VPU: Disabled | +300 MiB RAM' - 'Default' ': HDMI: Enabled | VPU: Enabled | -300 MiB RAM' - ) - - G_WHIP_MENU "Hardware : $G_HW_MODEL_NAME\nCurrent : HDMI: [$display_output_text] | VPU: [$display_output_text]\nMemory : $gpu_mem_current MiB GPU | $ram_mem_current MiB RAM\nNB: GPU/RAM figures require a reboot after a change is made." || { Back_or_Exit 1; return 0; } # Display Options + # Get current memory split + # - Get override setting: gpu_mem_1024 is effective for all models with >= 1 GiB RAM + local size=1024 default=76 + (( $G_HW_MEMORY_SIZE < 1024 )) && size=$G_HW_MEMORY_SIZE default=64 + local gpu_mem_current=$(sed -n "/^[[:blank:]]*gpu_mem_$size=/{s/^[^=]*=//p;q}" /boot/config.txt) # override setting + [[ $gpu_mem_current ]] || gpu_mem_current=$(sed -n "/^[[:blank:]]*gpu_mem=/{s/^[^=]*=//p;q}" /boot/config.txt) # base setting + [[ $gpu_mem_current ]] || gpu_mem_current=$default # default value + local ram_mem_current=$((G_HW_MEMORY_SIZE-gpu_mem_current)) + + # Create array for storing menu selectable options. + G_WHIP_MENU_ARRAY=( - case $G_WHIP_RETURNED_VALUE in + 16 ': Server/Console/Headless' + 32 ': Minimal GUI' + "$default" ': Full GUI/Desktop/Default' + 96 ': Camera/Legacy GPU' + ) - 'Headless') /boot/dietpi/func/dietpi-set_hardware headless 1 && REBOOT_REQUIRED=1;; - 'Default') /boot/dietpi/func/dietpi-set_hardware headless 0 && REBOOT_REQUIRED=1;; - *) G_DIETPI-NOTIFY 1 'An invalid "case" option was used. This is a bug, please report at: https://github.com/MichaIng/DietPi/issues'; exit 1;; - esac + G_WHIP_BUTTON_CANCEL_TEXT='Cancel' + G_WHIP_DEFAULT_ITEM=$gpu_mem_current + G_WHIP_MENU "GPU/RAM memory splits are pre-configured and optimized by DietPi-Software based on your software installs. However, feel free to tweak them. +\nCurrent: $gpu_mem_current MiB GPU | $ram_mem_current MiB RAM" || { Back_or_Exit 1; return 0; } # Display Options - else - Info_HW_OptionNotSupported - Back_or_Exit 1 # Display Options - fi + /boot/dietpi/func/dietpi-set_hardware gpumemsplit "$G_WHIP_RETURNED_VALUE" && REBOOT_REQUIRED=1 } # TARGETMENUID=7 @@ -1853,7 +1669,7 @@ If unsure, set any value, 'Ondemand Down Factor' option on the next screen will NET_RX_MB='N/A' NET_TX_MB='N/A' - # $1 = device+index + # $1 = interface Net_Update_UsageStats() { local input=$1 @@ -1910,7 +1726,7 @@ If unsure, set any value, 'Ondemand Down Factor' option on the next screen will Network_ETH_CopyCurrentToStatic() { # Apply if we have a connection - (( $ETH_CONNECTED )) || return + (( $ETH_CONNECTED )) || return 0 ETH_IP_STATIC=$ETH_IP ETH_GATEWAY_STATIC=$ETH_GATEWAY @@ -1921,7 +1737,7 @@ If unsure, set any value, 'Ondemand Down Factor' option on the next screen will Network_WIFI_CopyCurrentToStatic() { # Apply if we have a connection - (( $WIFI_CONNECTED )) || return + (( $WIFI_CONNECTED )) || return 0 WIFI_IP_STATIC=$WIFI_IP WIFI_GATEWAY_STATIC=$WIFI_GATEWAY @@ -1981,20 +1797,18 @@ If unsure, set any value, 'Ondemand Down Factor' option on the next screen will # Check if resolvconf is available, else apply static DNS server via /etc/resolv.conf directly instead of /etc/network/interfaces entry local i resolvconf=0 command -v resolvconf > /dev/null && resolvconf=1 - if (( ! $resolvconf )); then - - if (( ! $ETH_DISABLED && $ETH_MODE_TARGET == 0 )); then - + if (( ! $resolvconf )) + then + if (( ! $ETH_DISABLED && $ETH_MODE_TARGET == 0 )) + then > /etc/resolv.conf for i in $ETH_DNS_STATIC; do echo "nameserver $i" >> /etc/resolv.conf; done - elif (( ! $WIFI_DISABLED && $WIFI_MODE_TARGET == 0 )); then - + elif (( ! $WIFI_DISABLED && $WIFI_MODE_TARGET == 0 )) + then > /etc/resolv.conf for i in $WIFI_DNS_STATIC; do echo "nameserver $i" >> /etc/resolv.conf; done - fi - fi # Eth @@ -2092,67 +1906,72 @@ _EOF_ Network_Restart } + # $1: Adapter type | 0=Eth, 1=WiFi Change_StaticIp() { # Ethernet - if (( $1 == 0 )); then - + if (( ! $1 )) + then G_WHIP_DEFAULT_ITEM=$ETH_IP_STATIC G_WHIP_INPUTBOX 'Please enter a new static Ethernet IP address:' && ETH_IP_STATIC=$G_WHIP_RETURNED_VALUE # WiFi - elif (( $1 == 1 )); then - + else G_WHIP_DEFAULT_ITEM=$WIFI_IP_STATIC G_WHIP_INPUTBOX 'Please enter a new static WiFi IP address:' && WIFI_IP_STATIC=$G_WHIP_RETURNED_VALUE - fi } + # $1: Adapter type | 0=Eth, 1=WiFi Change_StaticGateway() { # Ethernet - if (( $1 == 0 )); then - + if (( ! $1 )) + then G_WHIP_DEFAULT_ITEM=$ETH_GATEWAY_STATIC G_WHIP_INPUTBOX 'Please enter a new static Ethernet gateway address:' && ETH_GATEWAY_STATIC=$G_WHIP_RETURNED_VALUE # WiFi - elif (( $1 == 1 )); then - + else G_WHIP_DEFAULT_ITEM=$WIFI_GATEWAY_STATIC G_WHIP_INPUTBOX 'Please enter a new static WiFi gateway address:' && WIFI_GATEWAY_STATIC=$G_WHIP_RETURNED_VALUE - fi } + # $1: Adapter type | 0=Eth, 1=WiFi Change_StaticMask() { # Ethernet - if (( $1 == 0 )); then - + if (( ! $1 )) + then G_WHIP_DEFAULT_ITEM=$ETH_MASK_STATIC G_WHIP_INPUTBOX 'Please enter a new static Ethernet network mask:' && ETH_MASK_STATIC=$G_WHIP_RETURNED_VALUE # WiFi - elif (( $1 == 1 )); then - + else G_WHIP_DEFAULT_ITEM=$WIFI_MASK_STATIC G_WHIP_INPUTBOX 'Please enter a new static WiFi network mask:' && WIFI_MASK_STATIC=$G_WHIP_RETURNED_VALUE - fi } + # $1: Adapter type | 0=Eth, 1=WiFi Change_StaticDns() { - # $1 = Adapater type | 0=Eth, 1=WiFi - # Current value => default choice (( $1 )) && G_WHIP_DEFAULT_ITEM=$WIFI_DNS_STATIC || G_WHIP_DEFAULT_ITEM=$ETH_DNS_STATIC + G_WHIP_MENU_ARRAY=("$G_WHIP_DEFAULT_ITEM" ': Your current DNS server') - G_WHIP_MENU_ARRAY=( + # Auto detect local gateway(s)/router(s) to offer as DNS server(s). + local gateway=$(ip r l 0/0 | mawk '{print $3}' ORS=' ') + while [[ $gateway == *' '*' '* ]]; do gateway=${gateway% *}; done + [[ $gateway ]] && G_WHIP_MENU_ARRAY+=("$gateway" ': Use local router as DNS server (recommended)') + # Auto detect local DNS resolver to offer as system DNS + ss -uln | grep -q ':53[[:blank:]]' && G_WHIP_MENU_ARRAY+=('127.0.0.1' ': Use local Pi-hole/AdGuard Home/Unbound (not recommended)') + + G_WHIP_MENU_ARRAY+=( 'Custom' ': Manually enter your DNS server' + '' '●─ Public DNS providers ' '1.1.1.1 1.0.0.1' ': Cloudflare' '9.9.9.9 149.112.112.112' ': Quad9' '8.8.8.8 8.8.4.4' ': Google' @@ -2164,12 +1983,14 @@ _EOF_ '84.200.69.80 84.200.70.40' ': DNS.WATCH' ) - G_WHIP_MENU 'Please select a DNS server, or choose "Custom" for manual entry:' || return - if [[ $G_WHIP_RETURNED_VALUE == 'Custom' ]]; then + G_WHIP_MENU 'Please select a DNS server, or choose "Custom" for manual entry:' || return 0 + if [[ $G_WHIP_RETURNED_VALUE == 'Custom' ]] + then (( $1 )) && G_WHIP_DEFAULT_ITEM=$WIFI_DNS_STATIC || G_WHIP_DEFAULT_ITEM=$ETH_DNS_STATIC - G_WHIP_INPUTBOX 'Please enter a new DNS server address\n - 2 maximum, seperated by a space.\n - E.g.: 9.9.9.9 149.112.112.112' || return - + G_WHIP_INPUTBOX "Please enter one or two space-separated DNS server addresses + - E.g.: 9.9.9.9 149.112.112.112 + - Current: $G_WHIP_DEFAULT_ITEM" || return 0 fi # Apply new value @@ -2427,20 +2248,16 @@ NB: All Ethernet connections will be temporarily dropped!' && Network_ApplyChang # Onboard WiFi # - RPi 3/4/Zero W - if (( $G_HW_ONBOARD_WIFI )); then - + if (( $G_HW_ONBOARD_WIFI )) + then local onboard_wifi_enabled=1 - if grep -q '^[[:blank:]]*dtoverlay=disable-wifi' /boot/config.txt; then - + if grep -q '^[[:blank:]]*dtoverlay=disable-wifi' /boot/config.txt + then onboard_wifi_enabled=0 G_WHIP_MENU_ARRAY+=('Onboard WiFi' ': [Off]') - else - G_WHIP_MENU_ARRAY+=('Onboard WiFi' ': [On]') - fi - fi G_WHIP_MENU_ARRAY+=('' '●─ Additional Options ') @@ -2574,14 +2391,13 @@ NB: All Ethernet connections will be temporarily dropped!' && Network_ApplyChang G_WHIP_MENU_ARRAY+=('Change Mode' ": [$mode_text]") # Show static options - if (( $ETH_MODE_TARGET == 0 )); then - + if (( $ETH_MODE_TARGET == 0 )) + then G_WHIP_MENU_ARRAY+=('Copy' ': Copy current address to "Static"') G_WHIP_MENU_ARRAY+=('Static IP' ": [$ETH_IP_STATIC]") G_WHIP_MENU_ARRAY+=('Static Mask' ": [$ETH_MASK_STATIC]") G_WHIP_MENU_ARRAY+=('Static Gateway' ": [$ETH_GATEWAY_STATIC]") G_WHIP_MENU_ARRAY+=('Static DNS' ": [$ETH_DNS_STATIC]") - fi G_WHIP_MENU_ARRAY+=('' '●─ Additional Options ') From f741f322cdef844a8d4d6d2ed58f776fe0fe17c1 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 21 Jun 2024 23:13:06 +0200 Subject: [PATCH 310/458] v9.6 - DietPi-Software | Update fallback URLs --- dietpi/dietpi-software | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index a4e0944e87..cc84a22608 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -9513,7 +9513,7 @@ _EOF_ esac url=$(curl -sSfL 'https://api.github.com/repos/Radarr/Radarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}") - local fallback_url="https://github.com/Radarr/Radarr/releases/download/v5.6.0.8846/Radarr.master.5.6.0.8846.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Radarr/Radarr/releases/download/v5.7.0.8882/Radarr.master.5.7.0.8882.linux-core-$arch.tar.gz" fi Download_Install "$url" @@ -9953,7 +9953,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.18.0.4543/Prowlarr.master.1.18.0.4543.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.19.0.4568/Prowlarr.master.1.19.0.4568.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Prowlarr/Prowlarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}")" G_EXEC mv Prowlarr /opt/prowlarr fi From 29034e964aca94dd0968f20703c65bf6d6dbce64 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 22 Jun 2024 19:24:29 +0200 Subject: [PATCH 311/458] v9.6 (#7122) - General | Since we provide all kernel, bootloader and firmware packages from our own APT repository now, the Armbian APT repository is removed form all systems. In case you use an SBC which is not officially supported by DietPi, as generic device, it is however preserved. --- .build/images/dietpi-build | 14 ++--- .build/images/dietpi-installer | 105 ++++++++++++++++---------------- .update/patches | 18 +++++- .update/pre-patches | 19 +++--- CHANGELOG.txt | 1 + dietpi/func/dietpi-globals | 15 ----- dietpi/func/dietpi-set_software | 52 +++++++++++++++- 7 files changed, 137 insertions(+), 87 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 3c63703489..1490dc7f6a 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -412,8 +412,8 @@ packages='apt,bash-completion,bzip2,ca-certificates,cron,curl,fdisk,gpg,htop,ipu [[ $HW_MODEL == 75 ]] && packages+='iproute2' || packages+='console-setup,dropbear,ethtool,fake-hwclock,ifupdown,isc-dhcp-client,kmod,rfkill,systemd-timesyncd,usbutils' # - "--skip=check/empty" to ignore /etc/fstab, boot and tmpfs mounts we added above # - "--skip=check/qemu" to skip arch test, which requires the "arch-test" package. We however assure emulation support out end. -# - Bullseye/Jammy host mmdebstrap seems to not support "--skip=check/empty,check/qemu". -G_EXEC_OUTPUT=1 G_EXEC mmdebstrap --debug --mode=root --format=dir --skip=check/empty --skip=check/qemu --variant=minbase --include="$packages" --arch="$parch" --keyring="$keyring" "$distro" ./rootfs "$repo" +# - Bullseye/Jammy host mmdebstrap does not support "--skip=check/empty,check/qemu". +G_EXEC_OUTPUT=1 G_EXEC mmdebstrap --mode=root --format=dir --skip=check/empty --skip=check/qemu --variant=minbase --include="$packages" --arch="$parch" --keyring="$keyring" "$distro" ./rootfs "$repo" G_EXEC umount rootfs/dev rootfs/run rootfs/var/cache/apt rootfs/var/lib/apt/lists rootfs/var/log ########################################## @@ -431,15 +431,15 @@ _EOF_ cat << _EOF_ >> rootfs/etc/rc.local export GITOWNER='$GITOWNER' GITBRANCH='$GITBRANCH' HW_MODEL='$HW_MODEL' IMAGE_CREATOR=0 PREIMAGE_INFO=0 WIFI_REQUIRED=1 DISTRO_TARGET=$DISTRO TEST_KERNEL=$TEST_KERNEL TEST_UBOOT=$TEST_UBOOT echo '[ INFO ] Running DietPi-Installer for $G_GITOWNER/$G_GITBRANCH' -bash -c "\$(curl -sSf 'https://raw.githubusercontent.com/$G_GITOWNER/DietPi/$G_GITBRANCH/.build/images/dietpi-installer')" || poweroff +bash -c "\$(curl -sSf 'https://raw.githubusercontent.com/$G_GITOWNER/DietPi/$G_GITBRANCH/.build/images/dietpi-installer')" || { echo '[FAILED] DietPi-Installer failed, shutting down ...'; journalctl -n 25; df -h; free -h; poweroff; exit 1; } _EOF_ # - VM: Generate tiny-initramfs with explicit kernel modules, as auto-detection doesn't work correctly within container and loop devices [[ $HW_MODEL == 20 ]] && cat << _EOF_ >> rootfs/etc/rc.local echo '[ INFO ] Rebuilding virtual machine initramfs to support all virtualizers...' -version=\$(dpkg --get-selections | mawk '\$1~/^linux-image-.*-$parch\$/{print \$1;exit}') || poweroff +version=\$(dpkg --get-selections | mawk '\$1~/^linux-image-.*-$parch\$/{print \$1;exit}') || { echo '[FAILED] Obtaining kernel version failed, shutting down ...'; journalctl -n 25; df -h; free -h; poweroff; exit 1; } version=\${version#linux-image-} -mktirfs -m no -M no --include-modules='ahci,sd_mod,vmw_pvscsi,hv_storvsc,virtio_scsi,virtio_pci,BusLogic,$FSTYPE' -o "/boot/initrd.img-\$version" "\$version" || poweroff +mktirfs -m no -M no --include-modules='ahci,sd_mod,vmw_pvscsi,hv_storvsc,virtio_scsi,virtio_pci,BusLogic,$FSTYPE' -o "/boot/initrd.img-\$version" "\$version" || { echo '[FAILED] Generating initramfs failed, shutting down ...'; journalctl -n 25; df -h; free -h; poweroff; exit 1; } _EOF_ cat << '_EOF_' >> rootfs/etc/rc.local @@ -459,9 +459,9 @@ then abind=("--bind=$FP_LOOP" '--bind=/dev/disk') for i in "${FP_LOOP}p"*; do abind+=("--bind=$i"); done fi -systemd-nspawn -bD rootfs "${abind[@]}" || { G_DIETPI-NOTIFY 1 'systemd-nspawn failed, aborting...'; journalctl -n 25; ss -tlpn; df -h; free -h; exit 1; } +systemd-nspawn -bD rootfs "${abind[@]}" || { G_DIETPI-NOTIFY 1 'systemd-nspawn failed, aborting ...'; journalctl -n 25; ss -tlpn; df -h; free -h; exit 1; } -[[ -f 'rootfs/success' ]] || { G_DIETPI-NOTIFY 1 'The container setup did not finish successfully, aborting...'; journalctl -n 25; ss -tlpn; df -h; free -h; exit 1; } +[[ -f 'rootfs/success' ]] || { G_DIETPI-NOTIFY 1 'The container setup did not finish successfully, aborting ...'; journalctl -n 25; ss -tlpn; df -h; free -h; exit 1; } G_EXEC rm rootfs/success G_EXEC rm -Rf rootfs/{dev,proc,run,sys,tmp,var/log}/{,.??,.[^.]}* # Failsafe: /var/log/journal was found despite tmpfs mount! G_EXEC sync diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 85b9f3a094..c2fd0f14d5 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -598,7 +598,7 @@ _EOF_ G_DIETPI-NOTIFY 2 'Moving kernel and boot configuration to /boot' # Hardware specific boot configs - local armbian_repo=0 + local armbian_packages=0 if (( $G_HW_MODEL < 10 )) then if findmnt -M /boot/firmware &> /dev/null @@ -615,7 +615,7 @@ _EOF_ elif [[ $G_HW_MODEL =~ ^(10|11)$ ]] then - armbian_repo=1 + armbian_packages=1 local model='OdroidC1' (( $G_HW_MODEL == 11 )) && model='OdroidXU4' G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/$model/boot.ini" /boot/boot.ini @@ -629,7 +629,7 @@ _EOF_ elif [[ $G_HW_MODEL =~ ^(12|15|16|40|42|43|44|45|46|47|48|52|54|55|56|57|58|59|60|62|63|64|65|66|67|68|72|73|74|76|77|78|79|80|82|83|85|86|87|88|89|90)$ ]] then - armbian_repo=1 + armbian_packages=1 G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/boot.cmd" /boot/boot.cmd G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/dietpiEnv.txt" /boot/dietpiEnv.txt G_CONFIG_INJECT 'rootdev=' "rootdev=UUID=$(findmnt -Ufnro UUID -M /)" /boot/dietpiEnv.txt @@ -673,11 +673,7 @@ setenv rootuuid "true"' /boot/boot.cmd G_EXEC sed --follow-symlinks -Ei '/^setenv (kernel|fdt)_addr_r/d' /boot/boot.cmd G_CONFIG_INJECT 'setenv scriptaddr ' 'setenv scriptaddr "0x9000000"' /boot/boot.cmd G_CONFIG_INJECT 'overlay_path=' 'overlay_path=rockchip' /boot/dietpiEnv.txt - case $G_HW_MODEL in - 73) G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=rk3308' /boot/dietpiEnv.txt;; - 78|79|80|82|85) G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=rk3588' /boot/dietpiEnv.txt;; # ToDo: There are multiple other prefixes used in the kernel package, "rock-5b", "rock-5ab", "rockchip" (for fixup), so the boot.cmd need heavy adjustments (eliminate the prefix entirely) to work with all overlays. - *) G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=rockchip' /boot/dietpiEnv.txt;; - esac + # Device tree case $G_HW_MODEL in 46) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3399-pinebook-pro.dtb' /boot/dietpiEnv.txt;; 55) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3328-nanopi-r2-rev00.dtb' /boot/dietpiEnv.txt;; # Not necessarily needed as rk3328-nanopi-r2s.dtb is automatically chosen, but provides more consistent /sys/class/leds/{wan,lan}_led interface and blinking instead of steady lid power LED @@ -697,6 +693,13 @@ setenv rootuuid "true"' /boot/boot.cmd 87) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3566-orangepi-3b.dtb' /boot/dietpiEnv.txt;; *) :;; esac + # Overlay prefix + case $G_HW_MODEL in + 73) G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=rk3308' /boot/dietpiEnv.txt;; + 78|79|80|82|85) G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=rk3588' /boot/dietpiEnv.txt;; # ToDo: There are multiple other prefixes used in the kernel package, "rock-5b", "rock-5ab", "rockchip" (for fixup), so the boot.cmd need heavy adjustments (eliminate the prefix entirely) to work with all overlays. + *) G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=rockchip' /boot/dietpiEnv.txt;; + esac + # Console args case $G_HW_MODEL in 73) G_CONFIG_INJECT 'consoleargs=' 'consoleargs=console=ttyS0,1500000' /boot/dietpiEnv.txt;; # headless 47|55|56) G_CONFIG_INJECT 'consoleargs=' 'consoleargs=console=ttyS2,1500000' /boot/dietpiEnv.txt;; # headless @@ -761,12 +764,14 @@ setenv rootuuid "true"' /boot/boot.cmd G_EXEC sed --follow-symlinks -i -e 's|\${prefix}Image|${prefix}zImage|' -e 's/booti/bootz/' -e 's|\${overlay_path}/||' /boot/boot.cmd G_EXEC sed --follow-symlinks -i '/^overlay_path/d' /boot/dietpiEnv.txt G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=sun8i-h3' /boot/dietpiEnv.txt + # Overlays case $G_HW_MODEL in 48) G_CONFIG_INJECT 'overlays=' 'overlays=usbhost1 usbhost2 uart1' /boot/dietpiEnv.txt;; 59|60) G_CONFIG_INJECT 'overlays=' 'overlays=usbhost1 usbhost2' /boot/dietpiEnv.txt;; 64) G_CONFIG_INJECT 'overlays=' 'overlays=usbhost2 usbhost3' /boot/dietpiEnv.txt;; *) :;; esac + # Console args case $G_HW_MODEL in 48) G_CONFIG_INJECT 'consoleargs=' 'consoleargs=console=ttyS1,115200' /boot/dietpiEnv.txt;; # headless 59|60|64) G_CONFIG_INJECT 'consoleargs=' 'consoleargs=console=ttyS0,115200' /boot/dietpiEnv.txt;; # headless @@ -1033,10 +1038,19 @@ setenv rootuuid "true"' /boot/boot.cmd [[ -f '/etc/apt/trusted.gpg~' ]] && G_EXEC rm '/etc/apt/trusted.gpg~' # DietPi-Build with Armbian kernel/bootloader/firmware - elif (( $armbian_repo )) + elif (( $armbian_packages )) then - # Prevent any unintended packages from being installed from Armbian's APT repository, like base-files: https://github.com/MichaIng/DietPi/issues/6227#issuecomment-1713688577 - cat << '_EOF_' > /etc/apt/preferences.d/dietpi-armbian + # Remove obsolete combined keyring + [[ -f '/etc/apt/trusted.gpg' ]] && G_EXEC rm /etc/apt/trusted.gpg + [[ -f '/etc/apt/trusted.gpg~' ]] && G_EXEC rm '/etc/apt/trusted.gpg~' + + # Remove obsolete lists + find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -Rf {} + + + if [[ $G_GITBRANCH == 'master' ]] + then + # Prevent any unintended packages from being installed from Armbian's APT repository, like base-files: https://github.com/MichaIng/DietPi/issues/6227#issuecomment-1713688577 + cat << '_EOF_' > /etc/apt/preferences.d/dietpi-armbian Package: * Pin: origin apt.armbian.com Pin-Priority: -1 @@ -1045,29 +1059,23 @@ Package: armbian-firmware* linux-* Pin: origin apt.armbian.com Pin-Priority: 500 _EOF_ - if dpkg --compare-versions "$(dpkg-query -Wf '${Version}' base-files)" gt 20 - then - G_DIETPI-NOTIFY 2 'Enforcing downgrade of Armbian'\''s base-files package to Debian'\''s' - cat << '_EOF_' > /etc/apt/preferences.d/dietpi-armbian-tmp + if dpkg --compare-versions "$(dpkg-query -Wf '${Version}' base-files)" gt 20 + then + G_DIETPI-NOTIFY 2 'Enforcing downgrade of Armbian'\''s base-files package to Debian'\''s' + cat << '_EOF_' > /etc/apt/preferences.d/dietpi-armbian-tmp Package: base-files Pin: release o=Debian Pin-Priority: 1000 _EOF_ - G_EXEC eval 'echo '\''APT::Get::Allow-Downgrades "1";'\'' > /etc/apt/apt.conf.d/dietpi-armbian' - fi - - # Bootstrap Armbian repository - G_EXEC_RETRIES=2 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 eval 'echo '\''APT::Get::Allow-Downgrades "1";'\'' > /etc/apt/apt.conf.d/dietpi-armbian' + fi - # Remove obsolete combined keyring - [[ -f '/etc/apt/trusted.gpg' ]] && G_EXEC rm /etc/apt/trusted.gpg - [[ -f '/etc/apt/trusted.gpg~' ]] && G_EXEC rm '/etc/apt/trusted.gpg~' + # Bootstrap Armbian repository + G_EXEC_RETRIES=2 G_EXEC eval 'curl -sSfL '\''https://apt.armbian.com/armbian.key'\'' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-armbian.gpg --yes' - # Remove obsolete lists - find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -Rf {} + - - # Add Armbian repository - G_EXEC eval "echo 'deb https://apt.armbian.com ${DISTRO_TARGET_NAME/bullseye/bookworm} main' > /etc/apt/sources.list.d/dietpi-armbian.list" + # Add Armbian repository + G_EXEC eval "echo 'deb https://apt.armbian.com ${DISTRO_TARGET_NAME/bullseye/bookworm} main' > /etc/apt/sources.list.d/dietpi-armbian.list" + fi # Select kernel, device tree and U-Boot packages local model='odroidn2' kernel='meson64' arch='arm64' branch='current' zstd=() @@ -1367,14 +1375,7 @@ _EOF_ systemctl stop armbian-* # Keep currently installed kernel and bootloader packages - local apackages=( - - 'linux-image-' - 'linux-dtb-' - 'linux-u-boot-' - ) - - for i in "${apackages[@]}" + for i in linux-{image,dtb,u-boot}- do while read -r line do @@ -1383,7 +1384,6 @@ _EOF_ done < <(dpkg-query -Wf '${Package}\n' | mawk -v pat="^$i" '$0~pat') done - unset -v apackages # Add initramfs-tools and u-boot-tools, required to convert initramfs images into u-boot format aPACKAGES_REQUIRED_INSTALL+=('initramfs-tools' 'u-boot-tools') @@ -1435,6 +1435,21 @@ _EOF_ G_EXEC rm -f /{initrd.img,vmlinuz}{,.old} fi + if [[ -f '/boot/armbianEnv.txt' ]] + then + # Force legacy network interface names + G_CONFIG_INJECT 'extraargs=' 'extraargs=net.ifnames=0' /boot/armbianEnv.txt + + # Disable bootsplash logo, as we removed the file above: https://github.com/MichaIng/DietPi/issues/3932#issuecomment-852376681 + G_CONFIG_INJECT 'bootlogo=' 'bootlogo=false' /boot/armbianEnv.txt + + # Reset default kernel log verbosity, reduced to "1" on most Armbian images + G_CONFIG_INJECT 'verbosity=' 'verbosity=4' /boot/armbianEnv.txt + + # Disable Docker optimisations, since this has some performance drawbacks, enable on Docker install instead + G_CONFIG_INJECT 'docker_optimizations=' 'docker_optimizations=off' /boot/armbianEnv.txt + fi + # Generic kernel, device tree, bootloader and firmware package auto detect + initramfs-tools elif (( $G_HW_MODEL != 75 )) then @@ -2180,22 +2195,6 @@ _EOF_ G_EXEC eval 'echo '\''sprdwl_ng'\'' > /etc/modules-load.d/dietpi-enable_wifi.conf' fi - # Armbian - if [[ -f '/boot/armbianEnv.txt' ]] - then - # Force legacy network interface names - G_CONFIG_INJECT 'extraargs=' 'extraargs=net.ifnames=0' /boot/armbianEnv.txt - - # Disable bootsplash logo, as we removed the file above: https://github.com/MichaIng/DietPi/issues/3932#issuecomment-852376681 - G_CONFIG_INJECT 'bootlogo=' 'bootlogo=false' /boot/armbianEnv.txt - - # Reset default kernel log verbosity, reduced to "1" on most Armbian images - G_CONFIG_INJECT 'verbosity=' 'verbosity=4' /boot/armbianEnv.txt - - # Disable Docker optimisations, since this has some performance drawbacks, enable on Docker install instead - G_CONFIG_INJECT 'docker_optimizations=' 'docker_optimizations=off' /boot/armbianEnv.txt - fi - #------------------------------------------------------------------------------------------------ G_DIETPI-NOTIFY 3 "$G_PROGRAM_NAME" "[$SETUP_STEP] Finalise system for first boot of DietPi"; ((SETUP_STEP++)) #------------------------------------------------------------------------------------------------ diff --git a/.update/patches b/.update/patches index c4d55f2fe0..272c58bf99 100755 --- a/.update/patches +++ b/.update/patches @@ -1651,8 +1651,15 @@ Patch_9_5() Patch_9_6() { + # Update DietPi APT list for several SBCs we added components to our repo for + if [[ $PATCH_9_3_RAN == 0 && $G_HW_MODEL =~ ^(42|43|46|47|52|55|58|68|72|73|76|77|86|87)$ ]] + then + /boot/dietpi/func/dietpi-set_software apt-mirror dietpi + G_AGUP + G_AGUG + # Orange Pi 5: Offer to flash new U-Boot image to solve random Ethernet MAC address: https://github.com/MichaIng/DietPi/issues/6663 - if (( $G_HW_MODEL == 80 )) + elif (( $G_HW_MODEL == 80 )) then if G_WHIP_YESNO '[ INFO ] U-Boot update available to solve random Ethernet MAC address \nIn case you are affected by a random Ethernet MAC address, which changes every boot, flashing the latest U-Boot image has shown to solve it: https://github.com/MichaIng/DietPi/issues/6663 @@ -1691,6 +1698,15 @@ Patch_9_6() G_AGI zstd fi + # Remove Armbian APT repository from all systems which have an "all" component for kernel/bootloader/firmware packages form our APT repository + if [[ -f '/etc/apt/sources.list.d/dietpi-armbian.list' && -f '/etc/apt/sources.list.d/dietpi.list' ]] && grep -q 'dietpi.com/apt all' /etc/apt/sources.list.d/dietpi.list + then + G_DIETPI-NOTIFY 2 'Removing obsolete Armbian APT repository' + G_EXEC rm /etc/apt/sources.list.d/dietpi-armbian.list + [[ -f '/etc/apt/preferences.d/dietpi-armbian' ]] && G_EXEC rm /etc/apt/preferences.d/dietpi-armbian + [[ -f '/etc/apt/trusted.gpg.d/dietpi-armbian.gpg' ]] && G_EXEC rm /etc/apt/trusted.gpg.d/dietpi-armbian.gpg + fi + # Remove obsolete drop-in config: https://github.com/MichaIng/DietPi/issues/7104 [[ -d '/etc/systemd/system/ifup@.service.d' ]] && G_EXEC rm -R /etc/systemd/system/ifup@.service.d } diff --git a/.update/pre-patches b/.update/pre-patches index 702c1bd182..a7715faad7 100755 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -211,12 +211,6 @@ then G_DIETPI-NOTIFY 2 'Adding new non-free-firmware component to APT lists, to re-enable firmware upgrades' G_EXEC sed --follow-symlinks -i '/non-free/s/$/ non-free-firmware/' /etc/apt/sources.list fi - if (( $G_DISTRO > 6 )) && [[ -f '/etc/apt/sources.list.d/dietpi-armbian.list' || -f '/etc/apt/sources.list.d/armbian.list' ]] - then - G_DIETPI-NOTIFY 2 'Updating Armbian APT repo list with Bookworm suite' - [[ -f '/etc/apt/sources.list.d/dietpi-armbian.list' ]] && G_EXEC sed --follow-symlinks -i 's/bullseye/bookworm/' /etc/apt/sources.list.d/dietpi-armbian.list - [[ -f '/etc/apt/sources.list.d/armbian.list' ]] && G_EXEC sed --follow-symlinks -i 's/bullseye/bookworm/' /etc/apt/sources.list.d/armbian.list - fi fi # v8.21 @@ -240,7 +234,7 @@ then if [[ -f '/etc/apt/sources.list.d/dietpi-armbian.list' ]] then G_DIETPI-NOTIFY 2 'Preventing any unintended packages from being installed from Armbian'\''s APT repository' - cat << '_EOF_' > /etc/apt/preferences.d/dietpi-armbian + cat << '_EOF_' > /etc/apt/preferences.d/dietpi-armbian || exit 1 Package: * Pin: origin apt.armbian.com Pin-Priority: -1 @@ -382,7 +376,7 @@ fi if (( $G_DIETPI_VERSION_CORE < 9 || ( $G_DIETPI_VERSION_CORE == 9 && $G_DIETPI_VERSION_SUB < 3 ) )) then # Update APT repo on Bullseye systems to Bookworm, but re-assure only kernel and firmware packages are pulled form it. Armbian dropped Bullseye support. - if [[ $G_DISTRO == 6 && -f '/etc/apt/sources.list.d/dietpi-armbian.list' ]] + if [[ -f '/etc/apt/sources.list.d/dietpi-armbian.list' ]] && grep -q 'bullseye' /etc/apt/sources.list.d/dietpi-armbian.list then G_DIETPI-NOTIFY 2 'Moving EOL Armbian Bullseye repo to Bookworm for Debian-version-agnostic firmware and kernel upgrades' cat << '_EOF_' > /etc/apt/preferences.d/dietpi-armbian || exit 1 @@ -424,6 +418,15 @@ then [[ ${apackages[0]} ]] && G_EXEC apt-mark unhold "${apackages[@]}" unset -v apackages fi + + # Remove Armbian APT repository from all systems which have an "all" component for kernel/bootloader/firmware packages form our APT repository + if [[ -f '/etc/apt/sources.list.d/dietpi-armbian.list' && -f '/etc/apt/sources.list.d/dietpi.list' ]] && grep -q 'dietpi.com/apt all' /etc/apt/sources.list.d/dietpi.list + then + G_DIETPI-NOTIFY 2 'Removing obsolete Armbian APT repository' + G_EXEC rm /etc/apt/sources.list.d/dietpi-armbian.list + [[ -f '/etc/apt/preferences.d/dietpi-armbian' ]] && G_EXEC rm /etc/apt/preferences.d/dietpi-armbian + [[ -f '/etc/apt/trusted.gpg.d/dietpi-armbian.gpg' ]] && G_EXEC rm /etc/apt/trusted.gpg.d/dietpi-armbian.gpg + fi fi exit 0 diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 01949cb322..cf06a4daaf 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,6 +2,7 @@ v9.6 (2024-07-06) Enhancements: +- General | Since we provide all kernel, bootloader and firmware packages from our own APT repository now, the Armbian APT repository is removed form all systems. In case you use an SBC which is not officially supported by DietPi, as generic device, it is however preserved. - Quartz64/Star64/VisionFive 2 | The extended attribute handler for ext4 security labels "CONFIG_EXT4_FS_SECURITY" has been enabled for these SBCs, required for some Docker containers. Many thanks to @gxsw for reporting this missing feature: https://github.com/MichaIng/DietPi/issues/7102 - Quartz64/Star64/VisionFive 2 | eBPF functionality for firewall and network monitoring software like Cilium has been added to our kernel builds for these SBCs. Many thanks to @kbrighton for reporting these missing features: https://github.com/MichaIng/DietPi/issues/6834 - Orange Pi 5 | Older U-Boot builds caused the Ethernet MAC address to be random and change on every boot. Recent U-Boot builds solve this, but they are not flashed automatically on package upgrades. We hence inform users and offer to flash the latest U-Boot image during the DietPi update. Many thanks to @thuehlinger for reporting and testing the case: https://github.com/MichaIng/DietPi/issues/6663 diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index e7845822a9..baba175c77 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -1499,9 +1499,6 @@ Press any key to continue...' G_CHECK_ROOT_USER 1 - # Workaround for Armbian mirrors being out of sync regularly or throwing 5xx errors - [[ -f '/etc/apt/sources.list.d/dietpi-armbian.list' ]] && G_EXEC_POST_FUNC(){ [[ $exit_code != 0 ]] && grep -q '^E: Failed to fetch .*armbian' "$fp_log" && G_EXEC_RETRIES=2 && unset -f G_EXEC_POST_FUNC; } - G_EXEC_DESC="\e[0mAPT install \e[33m$*\e[0m" DEBIAN_FRONTEND=noninteractive G_EXEC_OUTPUT=1 G_EXEC_OUTPUT_COL='\e[90m' G_EXEC apt-get -y --allow-change-held-packages install "$@" local exit_code=$? @@ -1548,9 +1545,6 @@ Press any key to continue...' { G_CHECK_ROOT_USER 1 - # Workaround for Armbian mirrors being out of sync regularly or throwing 5xx errors - [[ -f '/etc/apt/sources.list.d/dietpi-armbian.list' ]] && G_EXEC_POST_FUNC(){ [[ $exit_code != 0 ]] && grep -q '^E: Failed to fetch .*armbian' "$fp_log" && G_EXEC_RETRIES=2 && unset -f G_EXEC_POST_FUNC; } - G_EXEC_DESC="\e[0mAPT fix${*:+ \e[33m$*\e[0m}" DEBIAN_FRONTEND=noninteractive G_EXEC_OUTPUT=1 G_EXEC_OUTPUT_COL='\e[90m' G_EXEC apt-get -y --allow-change-held-packages -f install "$@" local exit_code=$? @@ -1575,9 +1569,6 @@ Press any key to continue...' # Clean cache before every update, which can corrupt and gets fully rewritten anyway G_EXEC_PRE_FUNC(){ apt-get clean; } - # Workaround for Armbian mirrors being out of sync regularly or throwing 5xx errors - [[ -f '/etc/apt/sources.list.d/dietpi-armbian.list' ]] && G_EXEC_POST_FUNC(){ [[ $exit_code != 0 ]] && grep -q '^E: Failed to fetch .*armbian' "$fp_log" && G_EXEC_RETRIES=2 && unset -f G_EXEC_POST_FUNC; } - G_EXEC_DESC='\e[0mAPT update' G_EXEC_OUTPUT=1 G_EXEC_OUTPUT_COL='\e[90m' G_EXEC apt-get -y -eany update local exit_code=$? @@ -1620,9 +1611,6 @@ Press any key to continue...' { G_CHECK_ROOT_USER 1 - # Workaround for Armbian mirrors being out of sync regularly or throwing 5xx errors - [[ -f '/etc/apt/sources.list.d/dietpi-armbian.list' ]] && G_EXEC_POST_FUNC(){ [[ $exit_code != 0 ]] && grep -q '^E: Failed to fetch .*armbian' "$fp_log" && G_EXEC_RETRIES=2 && unset -f G_EXEC_POST_FUNC; } - G_EXEC_DESC="\e[0mAPT upgrade${*:+ \e[33m$*\e[0m}" DEBIAN_FRONTEND=noninteractive G_EXEC_OUTPUT=1 G_EXEC_OUTPUT_COL='\e[90m' G_EXEC apt-get -y --with-new-pkgs upgrade "$@" local exit_code=$? @@ -1639,9 +1627,6 @@ Press any key to continue...' { G_CHECK_ROOT_USER 1 - # Workaround for Armbian mirrors being out of sync regularly or throwing 5xx errors - [[ -f '/etc/apt/sources.list.d/dietpi-armbian.list' ]] && G_EXEC_POST_FUNC(){ [[ $exit_code != 0 ]] && grep -q '^E: Failed to fetch .*armbian' "$fp_log" && G_EXEC_RETRIES=2 && unset -f G_EXEC_POST_FUNC; } - G_EXEC_DESC="\e[0mAPT dist-upgrade${*:+ \e[33m$*\e[0m}" DEBIAN_FRONTEND=noninteractive G_EXEC_OUTPUT=1 G_EXEC_OUTPUT_COL='\e[90m' G_EXEC apt-get -y dist-upgrade "$@" local exit_code=$? diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index 8690a7f276..ca4952bf64 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -128,8 +128,12 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R 15) all_components='odroidn2';; 16) all_components='odroidc4';; 40) all_components='pinea64';; + 42) all_components='rockpro64';; + 43) all_components='rock64';; 44) all_components='pinebook';; 45) all_components='pineh64';; + 46) all_components='pinebookpro';; + 47) all_components='nanopir4s';; 48) all_components='nanopir1';; 49) # Detect variant either based on $HW_VARIANT environment variable, existing "all" components or installed kernel/firmware package @@ -149,9 +153,12 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R ;; esac ;; + 52) all_components='tinkerboard';; 54) all_components='nanopik2';; + 55) all_components='nanopir2s';; 56) all_components='nanopineo3';; 57) all_components='nanopineoplus2';; + 58) all_components='nanopim4v2';; 59) all_components='zeropi';; 60) all_components='nanopineo';; 61) all_components='nanopi2';; @@ -193,18 +200,54 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R ;; 66) all_components='nanopim1plus';; 67) all_components='nanopik1plus';; + 68) + # Detect variant either based on $HW_VARIANT environment variable, existing "all" components or installed U-Boot package + # shellcheck disable=SC2154 + case $HW_VARIANT in + 1) all_components='nanopim4';; + 2) all_components='nanopct4';; + 3) all_components='nanopineo4';; + *) + [[ -f '/etc/apt/sources.list.d/dietpi.list' ]] && all_components=$(sed -n '/ all /{s/^.* all //p;q}' /etc/apt/sources.list.d/dietpi.list) + [[ $all_components ]] || for i in nano{pim4,pineo4,pct4} + do + dpkg-query -s "linux-u-boot-$i-current" &> /dev/null || continue + all_components=${i/-//} + break + done + ;; + esac + ;; 70) all_components='sparkysbc';; + 72) + # Detect variant either based on $HW_VARIANT environment variable, existing "all" components or installed U-Boot package + # shellcheck disable=SC2154 + case $HW_VARIANT in + 1) all_components='rock4';; + 2) all_components='rock4se';; + 3) all_components='rock4cplus';; + *) + [[ -f '/etc/apt/sources.list.d/dietpi.list' ]] && all_components=$(sed -n '/ all /{s/^.* all //p;q}' /etc/apt/sources.list.d/dietpi.list) + [[ $all_components ]] || for i in rock{pi-4b,-4se,pi-4cplus} + do + dpkg-query -s "linux-u-boot-$i-current" &> /dev/null || continue + all_components=${i/-//} + break + done + ;; + esac + ;; + 73) all_components='rockpis';; 74) all_components='radxazero';; 76) # Detect variant either based on $HW_VARIANT environment variable, existing "all" components or installed U-Boot package # shellcheck disable=SC2154 case $HW_VARIANT in - 1) all_components='';; # no R5S component is available yet + 1) all_components='nanopir5s';; 2) all_components='nanopir5c';; *) [[ -f '/etc/apt/sources.list.d/dietpi.list' ]] && all_components=$(sed -n '/ all /{s/^.* all //p;q}' /etc/apt/sources.list.d/dietpi.list) - # shellcheck disable=SC2043 - [[ $all_components ]] || for i in nanopi-r5c + [[ $all_components ]] || for i in nanopi-r5{c,s} do dpkg-query -s "linux-u-boot-$i-current" &> /dev/null || continue all_components=${i/-//} @@ -213,6 +256,7 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R ;; esac ;; + 77) all_components='rock3a';; 78) all_components='rock5b';; 79) # Detect variant either based on $HW_VARIANT environment variable, existing "all" components or installed U-Boot package @@ -238,6 +282,8 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R 83) all_components='orangepizero3';; 84) all_components='star64';; 85) all_components='rock5a';; + 86) all_components='tinkerboard2';; + 87) all_components='orangepi3b';; 88) all_components='orangepizero2w';; 89) all_components='orangepi3lts';; 90) all_components='radxazero3';; From 611c04784c98b9dd07e98ad9b72685d7040e775f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 25 Jun 2024 18:16:59 +0200 Subject: [PATCH 312/458] v9.6 - DietPi-Software | Node-RED: Resolved an issue where reinstalls/updates failed because of incompatibilities between latest Node.js or global modules with older local instances. Many thanks to @thinkbig1979 for reporting this issue: https://github.com/MichaIng/DietPi/issues/7128 - DietPi-Software | Add "@latest" version tag to all Node module installs, else installed modules won't necessarily be updated - DietPi-Software | Replace sudo calls with "runuser". It is an alternative, which can only be executed as root user, and hence does not imply any authentication system. Shell aliases added for future user calls, however, need to keep using sudo, to support non-root logins. --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 90 +++++++++++++++++++++++------------------- 2 files changed, 51 insertions(+), 40 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index cf06a4daaf..57d67fffb9 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -16,6 +16,7 @@ Bug fixes: - NanoPi R6C | Resolved an issue where our new images did not boot, since the latest mainline U-Boot for R6S does not support the R6C anymore. Many thanks to @labmaster for reporting this issue: https://github.com/MichaIng/DietPi/issues/7109 - DietPi-Banner | Resolved an issue where incorrect RAM usage was printed with German and potentially other locales. Many thanks to @jwgn for reporting this issue: https://github.com/MichaIng/DietPi/issues/7107 - DietPi-Dashboard | Resolved an issue where the installation on RISC-V systems failed. +- DietPi-Software | Node-RED: Resolved an issue where reinstalls/updates failed because of incompatibilities between latest Node.js or global modules with older local instances. Many thanks to @thinkbig1979 for reporting this issue: https://github.com/MichaIng/DietPi/issues/7128 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 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index cc84a22608..9ef1111964 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3932,15 +3932,15 @@ _EOF_ # Database G_EXEC systemctl start postgresql local synapse_pass=$(tr -dc '[:alnum:]' < /dev/random | head -c30) - if [[ $(sudo -u postgres psql -tAc "SELECT 1 FROM pg_roles WHERE rolname='synapse'") != 1 ]] + if [[ $(runuser -u postgres -- psql -tAc "SELECT 1 FROM pg_roles WHERE rolname='synapse'") != 1 ]] then - G_EXEC sudo -u postgres psql -c "CREATE ROLE synapse WITH LOGIN PASSWORD '$synapse_pass';" + G_EXEC runuser -u postgres -- psql -c "CREATE ROLE synapse WITH LOGIN PASSWORD '$synapse_pass';" else - G_EXEC sudo -u postgres psql -c "ALTER ROLE synapse WITH PASSWORD '$synapse_pass';" + G_EXEC runuser -u postgres -- psql -c "ALTER ROLE synapse WITH PASSWORD '$synapse_pass';" fi - if [[ $(sudo -u postgres psql -tAc "SELECT 1 FROM pg_database WHERE datname='synapse'") != 1 ]] + if [[ $(runuser -u postgres -- psql -tAc "SELECT 1 FROM pg_database WHERE datname='synapse'") != 1 ]] then - G_EXEC sudo -u postgres createdb --encoding=UTF8 --locale=C --template=template0 --owner=synapse synapse + G_EXEC runuser -u postgres -- createdb --encoding=UTF8 --locale=C --template=template0 --owner=synapse synapse fi # Pre-create drop-in config for database access details @@ -4236,7 +4236,7 @@ _EOF_ 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 - G_EXEC_OUTPUT=1 G_EXEC sudo -u "$micro_name" ./rustup-init.sh -y --profile minimal ${RPI_64KERNEL_32OS:+'--default-host' 'armv7-unknown-linux-gnueabihf'} + G_EXEC_OUTPUT=1 G_EXEC runuser -u "$micro_name" -- ./rustup-init.sh -y --profile minimal ${RPI_64KERNEL_32OS:+'--default-host' 'armv7-unknown-linux-gnueabihf'} G_EXEC rm rustup-init.sh fi @@ -4261,7 +4261,7 @@ PS1=\"(microblog.pub) \$PS1\"" > "$micro_pyenv_activate_file" # Install Python 3.10 and Poetry G_EXEC chown -R "$micro_name:$micro_name" "$micro_pyenv_dir" G_EXEC_DESC='Installing Python with Poetry into pyenv' - G_EXEC_OUTPUT=1 G_EXEC sudo -u "$micro_name" dash -c " + G_EXEC_OUTPUT=1 G_EXEC runuser -u "$micro_name" -- dash -c " . $micro_pyenv_activate_file || exit 1 pyenv install $micro_python_version || exit 1 pyenv local $micro_python_version || exit 1 @@ -4454,7 +4454,7 @@ location = /.well-known/caldav { return 301 /owncloud/remote.php/dav/; }' > /et G_EXEC systemctl restart redis-server # Initially add occ command shortcut, will be added as alias by /etc/bashrc.d/dietpi.bash if occ file exist: - occ(){ sudo -u www-data php /var/www/owncloud/occ "$@"; } + occ(){ runuser -u www-data -- php /var/www/owncloud/occ "$@"; } # Adjusting config file: local config_php='/var/www/owncloud/config/config.php' @@ -4685,7 +4685,7 @@ location = /.well-known/caldav { return 301 /nextcloud/remote.php/dav/; }' > /e G_EXEC systemctl restart redis-server # Initially add occ command shortcut, will be added as alias by /etc/bashrc.d/dietpi.bash if occ file exist: - ncc(){ sudo -u www-data php /var/www/nextcloud/occ "$@"; } + ncc(){ runuser -u www-data -- php /var/www/nextcloud/occ "$@"; } # Adjusting config file: local config_php='/var/www/nextcloud/config/config.php' @@ -6668,7 +6668,17 @@ _EOF_ # Install as local instance for "nodered" user G_EXEC cd /mnt/dietpi_userdata/node-red - G_EXEC_OUTPUT=1 G_EXEC sudo -u nodered npm i --no-audit node-red + # - Disable cache + local cache=$(runuser -u nodered -- mktemp -d) + # - Reinstall: Remove all locally installed modules, to work around update issues, but preserve installed plugins from package.json: https://github.com/MichaIng/DietPi/issues/7128 + if [[ -f 'package.json' ]] + then + G_EXEC rm -Rf node_modules .npm/_cacache + G_EXEC_OUTPUT=1 G_EXEC runuser -u nodered -- npm up --cache "$cache" --no-audit + else + G_EXEC_OUTPUT=1 G_EXEC runuser -u nodered -- npm i --cache "$cache" --no-audit node-red + fi + G_EXEC rm -R "$cache" G_EXEC cd "$G_WORKING_DIR" # Service @@ -6769,10 +6779,10 @@ _EOF_ fi # RPi: Install "onoff" for GPIO access - (( $G_HW_MODEL > 9 )) || G_EXEC_OUTPUT=1 G_EXEC npm i -g --no-audit onoff + (( $G_HW_MODEL > 9 )) || G_EXEC_OUTPUT=1 G_EXEC npm i -g --no-audit onoff@latest # Install Blynk JS library - G_EXEC_OUTPUT=1 G_EXEC npm i -g --no-audit blynk-library + G_EXEC_OUTPUT=1 G_EXEC npm i -g --no-audit blynk-library@latest # Preserve existing config if [[ ! -f '/mnt/dietpi_userdata/blynk/server.properties' ]] @@ -7092,12 +7102,12 @@ _EOF_ # CLI install: https://github.com/FreshRSS/FreshRSS/blob/master/cli/README.md#commands G_EXEC cd /opt/FreshRSS - sudo -u www-data php ./cli/prepare.php - sudo -u www-data php ./cli/do-install.php --default_user dietpi --auth_type form --environment production --title FreshRSS --db-type mysql --db-host localhost --db-user freshrss --db-password "$password" --db-base freshrss --db-prefix freshrss + runuser -u www-data -- php ./cli/prepare.php + runuser -u www-data -- php ./cli/do-install.php --default_user dietpi --auth_type form --environment production --title FreshRSS --db-type mysql --db-host localhost --db-user freshrss --db-password "$password" --db-base freshrss --db-prefix freshrss unset -v password - sudo -u www-data php ./cli/create-user.php --user dietpi --password "$GLOBAL_PW" --api_password "$GLOBAL_PW" - sudo -u www-data php ./cli/actualize-user.php --user dietpi - sudo -u www-data php ./cli/db-optimize.php --user dietpi + runuser -u www-data -- php ./cli/create-user.php --user dietpi --password "$GLOBAL_PW" --api_password "$GLOBAL_PW" + runuser -u www-data -- php ./cli/actualize-user.php --user dietpi + runuser -u www-data -- php ./cli/db-optimize.php --user dietpi G_EXEC cd "$G_WORKING_DIR" # Link web interface to webroot @@ -8383,7 +8393,7 @@ _EOF_ G_EXEC chmod +x mineos_console.js webui.js update_webui.sh reset_webui.sh generate-sslcert.sh # Workaround: Node.js posix needs to be installed alone first: https://github.com/MichaIng/DietPi/issues/5181 - G_EXEC_OUTPUT=1 G_EXEC npm i --no-audit --no-package-lock posix + G_EXEC_OUTPUT=1 G_EXEC npm i --no-audit --no-package-lock posix@latest # Install MineOS G_EXEC_OUTPUT=1 G_EXEC npm i --no-audit @@ -8934,7 +8944,7 @@ _EOF_ G_EXEC chown dietpi /mnt/dietpi_userdata # Run Syncthing to pre-create config dir and exit - G_EXEC_OUTPUT=1 G_EXEC sudo -u dietpi /opt/syncthing/syncthing -generate=/mnt/dietpi_userdata/syncthing + G_EXEC_OUTPUT=1 G_EXEC runuser -u dietpi -- /opt/syncthing/syncthing -generate=/mnt/dietpi_userdata/syncthing # Allow remote access: https://docs.syncthing.net/users/faq.html#how-do-i-access-the-web-gui-from-another-computer G_EXEC sed --follow-symlinks -i '\|:8384|c\
0.0.0.0:8384
' /mnt/dietpi_userdata/syncthing/config.xml @@ -9127,9 +9137,9 @@ _EOF_ if [[ ${aSOFTWARE_INSTALL_STATE[153]} == 2 && -f '/mnt/dietpi_userdata/octoprint/.octoprint/config.yaml' ]] then G_DIETPI-NOTIFY 2 'Configuring OctoPrint to use mjpg-streamer for webcam support' - G_EXEC sudo -u octoprint /mnt/dietpi_userdata/octoprint/.local/bin/octoprint config set webcam.stream "http://$(G_GET_NET ip):8082/?action=stream" - G_EXEC sudo -u octoprint /mnt/dietpi_userdata/octoprint/.local/bin/octoprint config set webcam.snapshot 'http://127.0.0.1:8082/?action=snapshot' - G_EXEC sudo -u octoprint /mnt/dietpi_userdata/octoprint/.local/bin/octoprint config set webcam.ffmpeg "$(command -v ffmpeg)" + G_EXEC runuser -u octoprint -- /mnt/dietpi_userdata/octoprint/.local/bin/octoprint config set webcam.stream "http://$(G_GET_NET ip):8082/?action=stream" + G_EXEC runuser -u octoprint -- /mnt/dietpi_userdata/octoprint/.local/bin/octoprint config set webcam.snapshot 'http://127.0.0.1:8082/?action=snapshot' + G_EXEC runuser -u octoprint -- /mnt/dietpi_userdata/octoprint/.local/bin/octoprint config set webcam.ffmpeg "$(command -v ffmpeg)" fi fi @@ -9382,8 +9392,8 @@ _EOF_ Download_Test_Media # Init - G_EXEC_OUTPUT=1 G_EXEC sudo -u koel "php$PHP_VERSION" artisan koel:init -n --no-assets - G_EXEC_OUTPUT=1 G_EXEC sudo -u koel "php$PHP_VERSION" artisan koel:sync + G_EXEC_OUTPUT=1 G_EXEC runuser -u koel -- "php$PHP_VERSION" artisan koel:init -n --no-assets + G_EXEC_OUTPUT=1 G_EXEC runuser -u koel -- "php$PHP_VERSION" artisan koel:sync G_EXEC cd "$G_WORKING_DIR" # Service: Run on port 8003 by default to avoid conflict with Icecast @@ -10154,7 +10164,7 @@ _EOF_ aDEPS=('gcc' 'libffi-dev') G_EXEC curl -sSf 'https://sh.rustup.rs/' -o rustup-init.sh G_EXEC chmod +x rustup-init.sh - G_EXEC_OUTPUT=1 G_EXEC sudo -u octoprint ./rustup-init.sh -y --profile minimal + G_EXEC_OUTPUT=1 G_EXEC runuser -u octoprint -- ./rustup-init.sh -y --profile minimal G_EXEC rm rustup-init.sh aPATH=("PATH='/mnt/dietpi_userdata/octoprint/.cargo/bin:$PATH'") @@ -10168,7 +10178,7 @@ _EOF_ [[ -d '/mnt/dietpi_userdata/octoprint/.cache' ]] && G_EXEC rm -R /mnt/dietpi_userdata/octoprint/.cache # Install OctoPrint - G_EXEC_OUTPUT=1 G_EXEC sudo -u octoprint "${aPATH[@]}" pip3 install -U --user --no-warn-script-location octoprint + G_EXEC_OUTPUT=1 G_EXEC runuser -u octoprint -- "${aPATH[@]}" pip3 install -U --user --no-warn-script-location octoprint # Service: https://github.com/OctoPrint/OctoPrint/blob/master/scripts/octoprint.service cat << '_EOF_' > /etc/systemd/system/octoprint.service @@ -10190,22 +10200,22 @@ _EOF_ echo "alias octoprint='sudo -u octoprint /mnt/dietpi_userdata/octoprint/.local/bin/octoprint'" > /etc/bashrc.d/dietpi-octoprint.sh # On fresh installs, change listening port to 5001 to avoid conflict with Shairport Sync. - [[ -f '/mnt/dietpi_userdata/octoprint/.octoprint/config.yaml' ]] || G_EXEC sudo -u octoprint /mnt/dietpi_userdata/octoprint/.local/bin/octoprint config set server.port '5001' + [[ -f '/mnt/dietpi_userdata/octoprint/.octoprint/config.yaml' ]] || G_EXEC runuser -u octoprint -- /mnt/dietpi_userdata/octoprint/.local/bin/octoprint config set server.port '5001' # Apply service and system commands: Allow execution via specific sudoers config, use "which" for "reboot" and "poweroff", since we create shell functions in dietpi-globals to bypass logind calls, if logind is not running. # shellcheck disable=SC2230 echo "octoprint ALL=NOPASSWD: $(command -v systemctl) restart octoprint, $(which reboot), $(which poweroff)" > /etc/sudoers.d/octoprint - G_EXEC sudo -u octoprint /mnt/dietpi_userdata/octoprint/.local/bin/octoprint config set server.commands.serverRestartCommand 'sudo systemctl restart octoprint' - G_EXEC sudo -u octoprint /mnt/dietpi_userdata/octoprint/.local/bin/octoprint config set server.commands.systemRestartCommand 'sudo reboot' - G_EXEC sudo -u octoprint /mnt/dietpi_userdata/octoprint/.local/bin/octoprint config set server.commands.systemShutdownCommand 'sudo poweroff' + G_EXEC runuser -u octoprint -- /mnt/dietpi_userdata/octoprint/.local/bin/octoprint config set server.commands.serverRestartCommand 'sudo systemctl restart octoprint' + G_EXEC runuser -u octoprint -- /mnt/dietpi_userdata/octoprint/.local/bin/octoprint config set server.commands.systemRestartCommand 'sudo reboot' + G_EXEC runuser -u octoprint -- /mnt/dietpi_userdata/octoprint/.local/bin/octoprint config set server.commands.systemShutdownCommand 'sudo poweroff' # mjpg-streamer: Configure OctoPrint to use it, if installed if (( ${aSOFTWARE_INSTALL_STATE[137]} > 0 )) then G_DIETPI-NOTIFY 2 'Configuring OctoPrint to use mjpg-streamer for webcam support' - G_EXEC sudo -u octoprint /mnt/dietpi_userdata/octoprint/.local/bin/octoprint config set webcam.stream "http://$(G_GET_NET ip):8082/?action=stream" - G_EXEC sudo -u octoprint /mnt/dietpi_userdata/octoprint/.local/bin/octoprint config set webcam.snapshot 'http://127.0.0.1:8082/?action=snapshot' - G_EXEC sudo -u octoprint /mnt/dietpi_userdata/octoprint/.local/bin/octoprint config set webcam.ffmpeg "$(command -v ffmpeg)" + G_EXEC runuser -u octoprint -- /mnt/dietpi_userdata/octoprint/.local/bin/octoprint config set webcam.stream "http://$(G_GET_NET ip):8082/?action=stream" + G_EXEC runuser -u octoprint -- /mnt/dietpi_userdata/octoprint/.local/bin/octoprint config set webcam.snapshot 'http://127.0.0.1:8082/?action=snapshot' + G_EXEC runuser -u octoprint -- /mnt/dietpi_userdata/octoprint/.local/bin/octoprint config set webcam.ffmpeg "$(command -v ffmpeg)" fi fi @@ -10892,7 +10902,7 @@ _EOF_ # -sm: Skip mimic build which is time intense and can be manually done any time later. # - Remove PulseAudio from dependencies, we use ALSA G_EXEC sed --follow-symlinks -Ei 's/[^[:blank:]"'\'']*pulseaudio[^[:blank:]"'\'']*//g' ./dev_setup.sh - G_EXEC_OUTPUT=1 G_EXEC sudo -u mycroft ./dev_setup.sh -sm + G_EXEC_OUTPUT=1 G_EXEC runuser -u mycroft -- ./dev_setup.sh -sm G_EXEC cd "$G_WORKING_DIR" # Service @@ -11306,7 +11316,7 @@ _EOF_ 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 - G_EXEC_OUTPUT=1 G_EXEC sudo -u "$ha_user" ./rustup-init.sh -y --profile minimal ${RPI_64KERNEL_32OS:+'--default-host' 'armv7-unknown-linux-gnueabihf'} + G_EXEC_OUTPUT=1 G_EXEC runuser -u "$ha_user" -- ./rustup-init.sh -y --profile minimal ${RPI_64KERNEL_32OS:+'--default-host' 'armv7-unknown-linux-gnueabihf'} G_EXEC rm rustup-init.sh fi @@ -11353,7 +11363,7 @@ eval \"\$(pyenv init -)\" [ -f '.cargo/env' ] && . .cargo/env" > "$ha_home/pyenv-activate.sh" G_EXEC_DESC='Installing Python with Home Assistant module into pyenv' - G_EXEC_OUTPUT=1 G_EXEC sudo -u "$ha_user" dash -c " + G_EXEC_OUTPUT=1 G_EXEC runuser -u "$ha_user" -- dash -c " $ha_pyenv_activation pyenv install $ha_python_version pyenv local $ha_python_version @@ -12359,8 +12369,8 @@ If no WireGuard (auto)start is included, but you require it, please do the follo systemctl start redis-server if systemctl start mariadb then - sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --off - sudo -u www-data php /var/www/nextcloud/occ app:disable spreed + runuser -u www-data -- php /var/www/nextcloud/occ maintenance:mode --off + runuser -u www-data -- php /var/www/nextcloud/occ app:disable spreed fi G_DIETPI-NOTIFY 2 'Disabled Nextcloud Talk app, but you need to remove it manually from Nextcloud web UI, if desired.' fi @@ -12630,8 +12640,8 @@ If no WireGuard (auto)start is included, but you require it, please do the follo [[ -d '/mnt/dietpi_userdata/synapse' ]] && G_EXEC rm -R /mnt/dietpi_userdata/synapse command -v pip3 > /dev/null && G_EXEC_OUTPUT=1 G_EXEC pip3 uninstall -y matrix-synapse - command -v dropdb > /dev/null && sudo -u postgres dropdb synapse - command -v dropuser > /dev/null && sudo -u postgres dropuser synapse + command -v dropdb > /dev/null && runuser -u postgres -- dropdb synapse + command -v dropuser > /dev/null && runuser -u postgres -- dropuser synapse fi if To_Uninstall 132 # Aria2 From 4a5d8b2f031c90b8a282e760630a9592040b8964 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 25 Jun 2024 23:16:56 +0200 Subject: [PATCH 313/458] v9.6 - DietPi-Software | Readarr: Update fallback URL --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 9ef1111964..26a06369a6 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -10037,7 +10037,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.28.2554/Readarr.develop.0.3.28.2554.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.29.2565/Readarr.develop.0.3.29.2565.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Readarr/Readarr/releases' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}" | head -1)" G_EXEC mv Readarr /opt/readarr fi From e4c8c86f99185171266eedb2fcc76f1b9c59f240 Mon Sep 17 00:00:00 2001 From: Frapi d'Illiers Date: Wed, 26 Jun 2024 17:25:18 +0200 Subject: [PATCH 314/458] v9.6 (#7121) - DietPi-Banner | Resolved an issue where logins as non-root user printed "No certificate found" if the Let's Encrypt cert status option was enabled, since non-root users have no permission to see the certificate files. In such cases, sudo is now used automatically, if the user has NOPASSWD permissions, else a meaningful info is shown. Many thanks to @FrapiFrance for implementing this fix: https://github.com/MichaIng/DietPi/pull/7121 Co-authored-by: fdilliers Co-authored-by: MichaIng --- CHANGELOG.txt | 1 + dietpi/func/dietpi-banner | 31 +++++++++++++++++++++++-------- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 57d67fffb9..c017118aca 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -15,6 +15,7 @@ Bug fixes: - VisionFive 2 | Resolved an issue where our new image did not boot, because of a false device tree name in /boot/extlinux/extlinux.conf. - NanoPi R6C | Resolved an issue where our new images did not boot, since the latest mainline U-Boot for R6S does not support the R6C anymore. Many thanks to @labmaster for reporting this issue: https://github.com/MichaIng/DietPi/issues/7109 - DietPi-Banner | Resolved an issue where incorrect RAM usage was printed with German and potentially other locales. Many thanks to @jwgn for reporting this issue: https://github.com/MichaIng/DietPi/issues/7107 +- DietPi-Banner | Resolved an issue where logins as non-root user printed "No certificate found" if the Let's Encrypt cert status option was enabled, since non-root users have no permission to see the certificate files. In such cases, sudo is now used automatically, if the user has NOPASSWD permissions, else a meaningful info is shown. Many thanks to @FrapiFrance for implementing this fix: https://github.com/MichaIng/DietPi/pull/7121 - DietPi-Dashboard | Resolved an issue where the installation on RISC-V systems failed. - DietPi-Software | Node-RED: Resolved an issue where reinstalls/updates failed because of incompatibilities between latest Node.js or global modules with older local instances. Many thanks to @thinkbig1979 for reporting this issue: https://github.com/MichaIng/DietPi/issues/7128 diff --git a/dietpi/func/dietpi-banner b/dietpi/func/dietpi-banner index 044f0c8cc5..c6b04d3b98 100755 --- a/dietpi/func/dietpi-banner +++ b/dietpi/func/dietpi-banner @@ -182,6 +182,20 @@ $GREEN_LINE" echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[5]} $GREEN_SEPARATOR ${ip:-Use dietpi-config to setup a connection} (${iface:-NONE})" } + Print_Cert_Status() + { + # Let's Encrypt cert status - MUST be run as root + local i + for i in /etc/letsencrypt/live/*/cert.pem + do + # shellcheck disable=SC2292 + [ -f "$i" ] || continue + openssl x509 -enddate -noout -in "$i" | mawk '/notAfter=/{print "Valid until "$4"-"substr($1,10)"-"$2" "$3}' + return 0 + done + echo 'No certificate found' + } + Print_Credits() { echo -e " ${aCOLOUR[2]}DietPi Team : https://github.com/MichaIng/DietPi#the-dietpi-project-team" @@ -262,14 +276,15 @@ $GREEN_LINE" # Let's Encrypt cert status if (( ${aENABLED[16]} == 1 )) then - local i certinfo='No certificate found' - for i in /etc/letsencrypt/live/*/cert.pem - do - [[ -f $i ]] || continue - certinfo=$(openssl x509 -enddate -noout -in "$i" | mawk '/notAfter=/{print "Valid until "$4"-"substr($1,10)"-"$2" "$3}' 2>&1) - break - done - echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[16]} $GREEN_SEPARATOR $certinfo" + echo -en "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[16]} $GREEN_SEPARATOR " + if [[ $EUID == 0 ]] + then + # Running as root + Print_Cert_Status 2>&1 + else + # Running as non-root: Fail silently without NOPASSWD to avoid password prompt, but print info instead + sudo -n dash -c "$(declare -f Print_Cert_Status); Print_Cert_Status 2>&1" 2> /dev/null || echo 'NOPASSWD sudo required to obtain cert status' + fi fi # Custom (( ${aENABLED[10]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[10]} $GREEN_SEPARATOR $(bash "$FP_CUSTOM" 2>&1)" From adb54f37cc13ef0d2bd41245b3562870a2b00f52 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 26 Jun 2024 17:37:33 +0200 Subject: [PATCH 315/458] v9.6 - DietPi-Software | ruTorrent: Update fallback version --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 26a06369a6..3d8192e54e 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8538,7 +8538,7 @@ _EOF_ # Install ruTorrent: Web UI for rTorrent # - Grab current version local version=$(curl -sSfL 'https://api.github.com/repos/Novik/ruTorrent/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}') - [[ $version ]] || { version='v4.3.4'; G_DIETPI-NOTIFY 1 "Automatic latest ruTorrent version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } + [[ $version ]] || { version='v4.3.5'; G_DIETPI-NOTIFY 1 "Automatic latest ruTorrent version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } Download_Install "https://github.com/Novik/ruTorrent/archive/$version.tar.gz" # - Reinstall freshly with preserved configs and 3rd party plugins From 4ea651484805d49971a26268b3758db729453738 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 29 Jun 2024 13:23:23 +0200 Subject: [PATCH 316/458] v9.6 - DietPi-Software | qBittorrent: Stashed tiny change: I want to generally replace "command -v" derived executable paths in systemd units with the hardcoded ones we know and expect from installed packages. If someone compiles alternative versions, it is just consequent that this requires an alteration of the systemd service as well. --- dietpi/dietpi-software | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 3d8192e54e..0219213083 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8511,7 +8511,7 @@ _EOF_ fi # Service - cat << _EOF_ > /etc/systemd/system/qbittorrent.service + cat << '_EOF_' > /etc/systemd/system/qbittorrent.service [Unit] Description=qBittorrent (DietPi) Documentation=man:qbittorrent-nox(1) @@ -8522,7 +8522,7 @@ After=network-online.target remote-fs.target User=qbittorrent UMask=002 LogsDirectory=qbittorrent -ExecStart=$(command -v qbittorrent-nox) +ExecStart=/usr/bin/qbittorrent-nox [Install] WantedBy=multi-user.target From 00c4099b40d9b67f3f795d1192593db099783358 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 29 Jun 2024 04:37:15 -0700 Subject: [PATCH 317/458] v9.6 (#7133) - DietPi-Software | ADS-B Feeder: Fix failing service start by adding the missing python requests library and the app flag file. Signed-off-by: Dirk Hohndel --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 14 +++++--------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index c017118aca..e7275e818d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -46,6 +46,7 @@ Bug fixes: - DietPi-Software | Shairport Sync: Resolved a DietPi v9.4 regression, where the AirPlay 2 choice did not have an effect, but the AirPlay 1 package was always installed. Additionally, uninstalling Shairport Sync will now also purge the AirPlay 2 package. Many thanks to @pulpe for fixing this bug: https://github.com/MichaIng/DietPi/pull/7082 - DietPi-Software | Box64: Resolved an issue where an invalid build target was used on Raspberry Pi 5 with 16k page size kernel. This target was removed with latest Box64, as page size handling is now done at runtime. - DietPi-Software | Jellyfin: Resolved an issue where the intended HTTP port change could not be applied, since the network config file is not created anymore at service start. We do now pre-create a minimal one, which is complemented with defaults automatically. +- DietPi-Software | ADS-B Feeder: Resolved an issue where the service start could have failed because of a missing Python module. Many thanks to @moonraka for reporting the issue and @dirkhh sending a fix quickly: https://dietpi.com/forum/t/ads-b-feeder-not-working/20601 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/7098 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 0219213083..74b728d88f 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -11925,18 +11925,14 @@ _EOF_ G_EXEC mkdir -p /mnt/dietpi_userdata/adsb-feeder/config G_EXEC ln -s /mnt/dietpi_userdata/adsb-feeder/config . - # set the 'image name' and version that are shown in the footer of the Web UI + # set the 'image name' and version that are shown in the footer of the Web UI and mark as app, not image G_EXEC eval 'echo '\''ADSB Feeder app running on DietPi'\'' > feeder-image.name' G_EXEC eval "echo '$ADSB_FEEDER_VERSION' > adsb.im.version" + G_EXEC rm -f os.adsb.feeder.image + G_EXEC touch app.adsb.feeder.image - # get the Python module - # for older distros we need to install via pip in order to get flask 2 - if (( $G_DISTRO < 7 )) - then - G_EXEC_OUTPUT=1 G_EXEC pip3 install -U flask - else - G_AGI python3-flask - fi + # get the Python modules + G_EXEC_OUTPUT=1 G_EXEC pip3 install -U flask requests # finally ensure that /run allows executables (this is needed for the containers to be able to not do excessive # writes to physical storage - which might be an SD card) From d3f88a15d967bdba810c37cb2d1980621640771c Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 29 Jun 2024 16:54:56 +0200 Subject: [PATCH 318/458] v9.6 - DietPi-Software | Forefox: Remove user configs on uninstall --- dietpi/dietpi-software | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 74b728d88f..1de13284f4 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -13780,6 +13780,8 @@ _EOF_ if To_Uninstall 67 # Firefox then G_AGP firefox-esr + G_EXEC rm -Rf /{root,home/*}/.mozilla/firefox + for i in /{root,home/*}/.mozilla; do [[ -d $i ]] && G_EXEC rmdir --ignore-fail-on-non-empty "$i"; done fi if To_Uninstall 159 # Allo GUI full From 562630acc29a81321799ec1c089c8630cf99838e Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 29 Jun 2024 19:43:34 +0200 Subject: [PATCH 319/458] v9.6 - DietPi-Drive_Manager | Resolved an issue, where network drives and potentially mounts in general could be attempted to be unmounted on shutdown, before services which can access them are stopped, leading to hanging shutdown sequences and potentially even data loss. Many thanks to @polite-garlic for reporting this issue: https://dietpi.com/forum/t/20542 --- CHANGELOG.txt | 1 + dietpi/dietpi-drive_manager | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index e7275e818d..8a9913100b 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -16,6 +16,7 @@ Bug fixes: - NanoPi R6C | Resolved an issue where our new images did not boot, since the latest mainline U-Boot for R6S does not support the R6C anymore. Many thanks to @labmaster for reporting this issue: https://github.com/MichaIng/DietPi/issues/7109 - DietPi-Banner | Resolved an issue where incorrect RAM usage was printed with German and potentially other locales. Many thanks to @jwgn for reporting this issue: https://github.com/MichaIng/DietPi/issues/7107 - DietPi-Banner | Resolved an issue where logins as non-root user printed "No certificate found" if the Let's Encrypt cert status option was enabled, since non-root users have no permission to see the certificate files. In such cases, sudo is now used automatically, if the user has NOPASSWD permissions, else a meaningful info is shown. Many thanks to @FrapiFrance for implementing this fix: https://github.com/MichaIng/DietPi/pull/7121 +- DietPi-Drive_Manager | Resolved an issue, where network drives and potentially mounts in general could be attempted to be unmounted on shutdown, before services which can access them are stopped, leading to hanging shutdown sequences and potentially even data loss. Many thanks to @polite-garlic for reporting this issue: https://dietpi.com/forum/t/20542 - DietPi-Dashboard | Resolved an issue where the installation on RISC-V systems failed. - DietPi-Software | Node-RED: Resolved an issue where reinstalls/updates failed because of incompatibilities between latest Node.js or global modules with older local instances. Many thanks to @thinkbig1979 for reporting this issue: https://github.com/MichaIng/DietPi/issues/7128 diff --git a/dietpi/dietpi-drive_manager b/dietpi/dietpi-drive_manager index 7a18cd438f..00e10d6ab5 100755 --- a/dietpi/dietpi-drive_manager +++ b/dietpi/dietpi-drive_manager @@ -267,7 +267,7 @@ $swap_mounts else - options+=',nofail,noauto,x-systemd.automount' + options+=',noauto,x-systemd.automount' fi @@ -369,7 +369,7 @@ $swap_mounts # - Container: Assume host supports it (relevant for network drives) if (( $G_HW_MODEL != 75 )) && ! modprobe -nq autofs4 then - sed --follow-symlinks -Ei '/x-systemd\.automount/s/,(noauto|x-systemd\.automount)//g' "$fp_fstab_tmp" + sed --follow-symlinks -i -e '/,x-systemd\.automount/s/noauto/nofail/' -e 's/,x-systemd\.automount//' "$fp_fstab_tmp" G_DIETPI-NOTIFY 2 'autofs4 module not available in kernel, x-systemd.automount has been disabled, all drives will be mounted at boot instead' fi @@ -1757,7 +1757,7 @@ _EOF_ # Apply to fstab sed --follow-symlinks -i "\#[[:blank:]]${samba_fp_mount_target}[[:blank:]]#d" /etc/fstab # - NB: Convert spaces to '\040': https://github.com/MichaIng/DietPi/issues/1201#issuecomment-339720271 - echo "//$samba_clientname/${samba_clientshare//[[:blank:]]/\\040} $samba_fp_mount_target cifs cred=$cred,iocharset=utf8,uid=dietpi,gid=dietpi,file_mode=0770,dir_mode=0770,vers=$i,nofail,noauto,x-systemd.automount" >> /etc/fstab + echo "//$samba_clientname/${samba_clientshare//[[:blank:]]/\\040} $samba_fp_mount_target cifs cred=$cred,iocharset=utf8,uid=dietpi,gid=dietpi,file_mode=0770,dir_mode=0770,vers=$i,noauto,x-systemd.automount" >> /etc/fstab MENU_DRIVE_TARGET=$samba_fp_mount_target Init_Drives_and_Refresh @@ -1870,7 +1870,7 @@ _EOF_ then # Apply to fstab sed --follow-symlinks -i "\#[[:blank:]]${nfs_fp_mount_target}[[:blank:]]#d" /etc/fstab - echo "$nfs_server_ip:$nfs_fp_server_share $nfs_fp_mount_target nfs nofail,noauto,x-systemd.automount" >> /etc/fstab + echo "$nfs_server_ip:$nfs_fp_server_share $nfs_fp_mount_target nfs noauto,x-systemd.automount" >> /etc/fstab MENU_DRIVE_TARGET=$nfs_fp_mount_target Init_Drives_and_Refresh From f1eb0ee1d40f1e148180f862574a407db716fa20 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 30 Jun 2024 19:23:33 +0200 Subject: [PATCH 320/458] v9.6 - DietPi-Backup | Add additional note to backup confirmation dialogue, that software services will be stopped: https://github.com/MichaIng/DietPi/issues/6897 --- dietpi/dietpi-backup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-backup b/dietpi/dietpi-backup index 733b6d3bda..c453844a95 100755 --- a/dietpi/dietpi-backup +++ b/dietpi/dietpi-backup @@ -489,7 +489,7 @@ _EOF_ 'Help') G_WHIP_MSG 'DietPi-Backup is a program that allows you to Backup and Restore your DietPi system. \nIf you have broken your system, or want to reset your system to an earlier date, this can all be done with DietPi-Backup. \nSimply choose a location where you want to save and restore your backups from, then, select Backup or Restore. -\nEnable a daily system backup to run it once a day via daily cron job. The execution time can be changed in "dietpi-cron". Note that this temporarily stops server services. Also we recommend to configure and test the backup with a manual call before enabling this feature. +\nEnable a daily system backup to run it once a day via daily cron job. The execution time can be changed in "dietpi-cron". Note that this temporarily stops software services. Also we recommend to configure and test the backup with a manual call before enabling this feature. \nMore information: https://dietpi.com/docs/dietpi_tools/#dietpi-backup-backuprestore';; 'Last log') log=1 G_WHIP_VIEWFILE "$FP_TARGET/$FP_LOG";; @@ -506,7 +506,7 @@ _EOF_ 'Delete') G_WHIP_YESNO "Do you wish to DELETE the following backup?\n - $FP_TARGET" && G_EXEC_NOEXIT=1 G_EXEC rm -R "$FP_TARGET";; - 'Backup') G_WHIP_YESNO "The system will be backed up to:\n - $FP_TARGET\n\nDo you wish to continue and start the backup?" && Run_Backup;; + 'Backup') G_WHIP_YESNO "The system will be backed up to:\n - $FP_TARGET\n\nThis will temporarily stop software services\!\n\nDo you wish to continue and start the backup?" && Run_Backup;; 'Restore') if (( $AMOUNT > 1 )) From d1d23686e97feb7fe28cc29263ec75a325fcf3ea Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 30 Jun 2024 19:41:14 +0200 Subject: [PATCH 321/458] v9.6 - DietPi-Software | Assure that the script does not continue to run after the reboot call, when a dist-upgrade is done on first login, with a kernel upgrade which removes currently used kernel modules. Also auto-remove packages after the dist-upgrade, to assure x86_64 systems are rebooted as well. Debian uses versioned kernel packages, pulled in by the meta package, so old kernel modules remain until the auto-removal purges the old versioned package. --- dietpi/dietpi-software | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 1de13284f4..cceab29f60 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -14493,13 +14493,14 @@ _EOF_ if [[ ! -f '/boot/dietpi/.skip_distro_upgrade' ]] then G_AGUP - # Do not repeat APT update in Run_Installations() - SKIP_APT_UPDATE=1 G_AGDUG + G_AGA # Create a persistent flag to not repeat G_AGDUG and rule out a reboot loop when kernel modules remain missing G_EXEC eval '> /boot/dietpi/.skip_distro_upgrade' # Perform a reboot if required as of missing kernel modules - G_CHECK_KERNEL || { G_DIETPI-NOTIFY 2 'A reboot is done to finalise the kernel upgrade'; sync; reboot; } + G_CHECK_KERNEL || { G_DIETPI-NOTIFY 2 'A reboot is done to finalise the kernel upgrade'; sync; reboot; exit 0; } + # Do not repeat APT update in Run_Installations() + SKIP_APT_UPDATE=1 fi # Global PW From 31d6c89da072ccd915386b46406f387e0ff82ae9 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 30 Jun 2024 19:47:58 +0200 Subject: [PATCH 322/458] v9.6 - DietPi-Backup | A leading exclamation mark is interpreted as event call. Escaping it with slash prevents that, but the slash remains in the string. Solve it with trailing space instead. --- dietpi/dietpi-backup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-backup b/dietpi/dietpi-backup index c453844a95..ce894b9d0f 100755 --- a/dietpi/dietpi-backup +++ b/dietpi/dietpi-backup @@ -506,7 +506,7 @@ _EOF_ 'Delete') G_WHIP_YESNO "Do you wish to DELETE the following backup?\n - $FP_TARGET" && G_EXEC_NOEXIT=1 G_EXEC rm -R "$FP_TARGET";; - 'Backup') G_WHIP_YESNO "The system will be backed up to:\n - $FP_TARGET\n\nThis will temporarily stop software services\!\n\nDo you wish to continue and start the backup?" && Run_Backup;; + 'Backup') G_WHIP_YESNO "The system will be backed up to:\n - $FP_TARGET\n\nThis will temporarily stop software services! \n\nDo you wish to continue and start the backup?" && Run_Backup;; 'Restore') if (( $AMOUNT > 1 )) From 867addaea737edde4be7efcfe9ae1ec781364841 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 2 Jul 2024 22:04:39 +0200 Subject: [PATCH 323/458] v9.6 - DietPi-Software | Update fallback URLs --- dietpi/dietpi-software | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index cceab29f60..68c980a882 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8929,7 +8929,7 @@ _EOF_ *) local arch='arm';; esac - local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.27.8/syncthing-linux-$arch-v1.27.8.tar.gz" + local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.27.9/syncthing-linux-$arch-v1.27.9.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/syncthing/syncthing/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/syncthing-linux-$arch-[^\"\/]*\.tar\.gz\"/{print \$4}")" G_EXEC mv syncthing-* /opt/syncthing fi @@ -11665,7 +11665,7 @@ _EOF_ *) local arch='arm';; esac - local fallback_url="https://github.com/restic/restic/releases/download/v0.16.4/restic_0.16.4_linux_$arch.bz2" + local fallback_url="https://github.com/restic/restic/releases/download/v0.16.5/restic_0.16.5_linux_$arch.bz2" Download_Install "$(curl -sSfL 'https://api.github.com/repos/restic/restic/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/restic_[^\"\/]*_linux_$arch\.bz2\"$/{print \$4}")" /usr/local/bin/restic G_EXEC chmod +x /usr/local/bin/restic fi From 1470a6b35fa0b8e90f9345bc4c4e7185bb0837cc Mon Sep 17 00:00:00 2001 From: Subhaditya Nath <56714626+subnut@users.noreply.github.com> Date: Wed, 3 Jul 2024 04:12:21 +0530 Subject: [PATCH 324/458] v9.6 (#7124) - DietPi-Software | soju: This IRC bouncer has been added to our software catalogue. Many thanks to @subnut for implementing it: https://github.com/MichaIng/DietPi/pull/7124 Co-authored-by: MichaIng --- .github/workflows/dietpi-software.bash | 5 ++ .meta/dietpi-survey_report | 1 + CHANGELOG.txt | 3 + README.md | 1 + dietpi/dietpi-services | 1 + dietpi/dietpi-software | 89 ++++++++++++++++++++++++++ 6 files changed, 100 insertions(+) diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index 4dd6efdf90..28882c83ad 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -240,6 +240,7 @@ Process_Software() 209) aCOMMANDS[i]='restic version';; 211) aCOMMANDS[i]='hb-service status' aSERVICES[i]='homebridge' aTCP[i]='8581'; (( $arch < 10 )) && aDELAY[i]=30; (( $arch == 3 )) && aDELAY[i]=120;; 212) aSERVICES[i]='kavita' aTCP[i]='2036'; (( $arch < 10 )) && aDELAY[i]=180; (( $arch == 10 )) && aDELAY[i]=30;; + 213) aSERVICES[i]='soju' aTCP[i]='6667';; *) :;; esac done @@ -261,6 +262,8 @@ do #86|134|185) Process_Software 162;; # Docker does not start in systemd containers (without dedicated network) 166) Process_Software 70;; 180) (( $arch == 10 || $arch == 3 )) || Process_Software 170;; + 188) Process_Software 17;; + 213) Process_Software 17 188;; *) :;; esac Process_Software "$i" @@ -351,6 +354,7 @@ G_EXEC eval 'echo '\''infocmp "$TERM" > /dev/null 2>&1 || { echo "[ INFO ] Unsup # Enable automated setup G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt # - Workaround for skipped autologin in emulated Trixie/Sid containers: https://gitlab.com/qemu-project/qemu/-/issues/1962 +# - Set HOME path, required e.g. go builds, which is otherwise missing when started from a systemd unit. if [[ $DISTRO == 'trixie' ]] && (( $G_HW_ARCH != $arch && ( $G_HW_ARCH > 9 || $G_HW_ARCH < $arch ) )) then cat << '_EOF_' > rootfs/etc/systemd/system/dietpi-automation.service @@ -361,6 +365,7 @@ After=dietpi-postboot.service [Service] Type=idle StandardOutput=tty +Environment=HOME=/root ExecStart=/bin/dash -c 'infocmp "$TERM" > /dev/null 2>&1 || export TERM=dumb; exec /boot/dietpi/dietpi-login' ExecStop=/sbin/poweroff diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index 690509e96c..c13944aa27 100755 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -726,6 +726,7 @@ shopt -s extglob do aSOFTWARE_NAME9_6[i]=${aSOFTWARE_NAME9_5[i]} done + aSOFTWARE_NAME9_6[213]='soju' # Pre-create software counter array so that we can see also software (available in newest version) with 0 installs for i in "${aSOFTWARE_NAME9_6[@]}" diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 8a9913100b..f94024d1ce 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,6 +1,9 @@ v9.6 (2024-07-06) +New software: +- soju | This IRC bouncer has been added to our software catalogue. Many thanks to @subnut for implementing it: https://github.com/MichaIng/DietPi/pull/7124 + Enhancements: - General | Since we provide all kernel, bootloader and firmware packages from our own APT repository now, the Armbian APT repository is removed form all systems. In case you use an SBC which is not officially supported by DietPi, as generic device, it is however preserved. - Quartz64/Star64/VisionFive 2 | The extended attribute handler for ext4 security labels "CONFIG_EXT4_FS_SECURITY" has been enabled for these SBCs, required for some Docker containers. Many thanks to @gxsw for reporting this missing feature: https://github.com/MichaIng/DietPi/issues/7102 diff --git a/README.md b/README.md index a6805bf5bf..95022d1050 100644 --- a/README.md +++ b/README.md @@ -340,6 +340,7 @@ Links to hardware and software manufacturers, sources and build instructions use - [ADS-B Feeder](https://github.com/dirkhh/adsb-feeder-image) - [Kavita](https://github.com/Kareadita/Kavita) - [Forgejo](https://codeberg.org/forgejo/forgejo) +- [soju](https://github.com/emersion/soju) --- diff --git a/dietpi/dietpi-services b/dietpi/dietpi-services index 07d9a13610..2c267a3045 100755 --- a/dietpi/dietpi-services +++ b/dietpi/dietpi-services @@ -230,6 +230,7 @@ _EOF_ 'openbazaar' 'synapse' 'microblog-pub' + 'soju' # - Hardware Projects 'pi-spc' diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 68c980a882..50e323539f 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -1047,6 +1047,13 @@ Available commands: aSOFTWARE_CATX[$software_id]=6 aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/social/#mediawiki' aSOFTWARE_DEPS[$software_id]='88 89 webserver' + #------------------ + software_id=213 + aSOFTWARE_NAME[$software_id]='soju' + aSOFTWARE_DESC[$software_id]='A user-friendly IRC bouncer' + aSOFTWARE_CATX[$software_id]=6 + aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/social/#soju' + aSOFTWARE_DEPS[$software_id]='188' # Camera & Surveillance #-------------------------------------------------------------------------------- @@ -12097,6 +12104,70 @@ If no WireGuard (auto)start is included, but you require it, please do the follo unset -v choice_required domain port invalid_text server_ip fi + + if To_Install 213 soju # soju + then + # Dependencies + aDEPS=('make' 'scdoc' 'gcc' 'libsqlite3-dev' 'libpam-dev') + + # Download + local fallback_url='https://github.com/emersion/soju/releases/download/v0.8.0/soju-0.8.0.tar.gz' + Download_Install "$(curl -sSfL 'https://api.github.com/repos/emersion/soju/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/soju-[^"\/]*\.tar\.gz"$/{print $4}')" + + # Build + G_EXEC cd soju-* + G_EXEC_OUTPUT=1 G_EXEC make all "-j$(nproc)" config_path='/mnt/dietpi_userdata/soju/config' GOFLAGS='-tags=pam,libsqlite3' + + # Install + local commands=('soju' 'sojuctl' 'sojudb') + local manpages=('doc/soju.1' 'doc/sojuctl.1') + G_EXEC cp "${commands[@]}" /usr/local/bin/ + G_EXEC mkdir -p /usr/local/share/man/man1 + G_EXEC cp "${manpages[@]}" /usr/local/share/man/man1/ + + # Config + if [[ ! -f '/mnt/dietpi_userdata/soju/config' ]] + then + # We shall default to on-disk chat logs + # It's a lossy format, as stated under `message-store` subsection in https://soju.im/doc/soju.1.html#CONFIG_FILE + # But it's the recommended setting as per https://git.sr.ht/~emersion/soju/tree/master/doc/getting-started.md + G_EXEC mkdir -p /mnt/dietpi_userdata/soju + cat <<- '_EOF_' > /mnt/dietpi_userdata/soju/config + db sqlite3 /mnt/dietpi_userdata/soju/data.db + message-store fs /mnt/dietpi_userdata/soju/logs + listen irc+insecure:// + listen unix+admin:// + _EOF_ + fi + + # User + Create_User -d /mnt/dietpi_userdata/soju soju + G_EXEC chown 'soju:soju' -R /mnt/dietpi_userdata/soju + G_EXEC chmod 0660 -R /mnt/dietpi_userdata/soju + G_EXEC chmod 0770 /mnt/dietpi_userdata/soju + + # Service: https://github.com/emersion/soju/blob/master/contrib/soju.service + # - CAP_NET_BIND_SERVICE needed for builtin identd server: https://github.com/emersion/soju/blob/master/doc/packaging.md#binding-to-privileged-ports + cat << '_EOF_' > /etc/systemd/system/soju.service +[Unit] +Description=soju IRC bouncer service +Documentation=https://soju.im/ +Documentation=man:soju(1) man:sojuctl(1) +Wants=network-online.target +After=network-online.target + +[Service] +User=soju +RuntimeDirectory=soju +WorkingDirectory=/mnt/dietpi_userdata/soju +AmbientCapabilities=CAP_NET_BIND_SERVICE +ExecStart=/usr/local/bin/soju +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target +_EOF_ + fi } # $1: 0=None -1=Dropbear -2=OpenSSH @@ -14229,6 +14300,24 @@ _EOF_ [[ -d '/mnt/dietpi_userdata/spotifyd' ]] && G_EXEC rm -R /mnt/dietpi_userdata/spotifyd fi + if To_Uninstall 213 # soju + then + Remove_Service soju 1 1 + local x + local commands=('soju' 'sojuctl' 'sojudb') + local manpages=('soju.1' 'sojuctl.1') + for x in "${commands[@]}" + do + [[ -f /usr/local/bin/$x ]] && G_EXEC rm "/usr/local/bin/$x" + done + for x in "${manpages[@]}" + do + [[ -f /usr/local/share/man/man1/$x ]] && G_EXEC rm "/usr/local/share/man/man1/$x" + done + [[ -d '/usr/local/share/man/man1' ]] && G_EXEC rmdir -p --ignore-fail-on-non-empty /usr/local/share/man/man1 + [[ -d '/mnt/dietpi_userdata/soju' ]] && G_EXEC rm -Rf /mnt/dietpi_userdata/soju + fi + G_DIETPI-NOTIFY 3 "$G_PROGRAM_NAME" 'Finalising uninstall' # Uninstall finished, set all uninstalled software to state 0 (not installed) From a3068d2a4dcef349080bed4a073ced690103cca1 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 3 Jul 2024 00:46:51 +0200 Subject: [PATCH 325/458] v9.6 - RC up --- .update/version | 2 +- dietpi/func/dietpi-globals | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.update/version b/.update/version index c0cf4610de..6c2285e750 100644 --- a/.update/version +++ b/.update/version @@ -3,7 +3,7 @@ # Available DietPi version G_REMOTE_VERSION_CORE=9 G_REMOTE_VERSION_SUB=6 -G_REMOTE_VERSION_RC=-1 +G_REMOTE_VERSION_RC=0 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=7 G_MIN_VERSION_SUB=0 diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index baba175c77..326d8a831b 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -55,7 +55,7 @@ # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=9 [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=6 - [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=-1 + [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=0 [[ $G_GITBRANCH ]] || G_GITBRANCH='master' [[ $G_GITOWNER ]] || G_GITOWNER='MichaIng' # - Save current version and Git branch From e765387f55d87dcb0328a243b0dd3f2b06202a77 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 3 Jul 2024 01:09:51 +0200 Subject: [PATCH 326/458] v9.6 - DietPi-Patches | Treat loop devices as MMC devices, to flash U-Boot to. This could be relevant for testing DietPi updates in containers. --- .update/patches | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.update/patches b/.update/patches index 272c58bf99..4c248367e8 100755 --- a/.update/patches +++ b/.update/patches @@ -1666,7 +1666,7 @@ Patch_9_6() \nDo you want to flash the latest U-Boot image now? \nNB: This can be done any time later via dietpi-config > Advanced Options.' then - if [[ $G_ROOTFS_DEV == '/dev/mmcblk'* ]] + if [[ $G_ROOTFS_DEV == '/dev/mmcblk'* || $G_ROOTFS_DEV == '/dev/loop'* ]] then /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc From c0bd77d8aa3a07052ec3efba2c293252972eadb9 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 3 Jul 2024 01:12:37 +0200 Subject: [PATCH 327/458] v9.6 - DietPi-Patches | Be more careful when removing our ifup@.service config. Remove our own config, and the directory only, if it is empty afterwards. --- .update/patches | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.update/patches b/.update/patches index 4c248367e8..fdb8a26263 100755 --- a/.update/patches +++ b/.update/patches @@ -1708,7 +1708,8 @@ Patch_9_6() fi # Remove obsolete drop-in config: https://github.com/MichaIng/DietPi/issues/7104 - [[ -d '/etc/systemd/system/ifup@.service.d' ]] && G_EXEC rm -R /etc/systemd/system/ifup@.service.d + [[ -f '/etc/systemd/system/ifup@.service.d/dietpi.conf' ]] && G_EXEC rm -R /etc/systemd/system/ifup@.service.d/dietpi.conf + [[ -d '/etc/systemd/system/ifup@.service.d' ]] && G_EXEC rmdir --ignore-fail-on-non-empty /etc/systemd/system/ifup@.service.d } # v6.35 => v7 migration From cd7e1c5da625b5d9279e690a0446f642930064dd Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 4 Jul 2024 22:05:09 +0200 Subject: [PATCH 328/458] v9.6 - DietPi-Software | Node-RED: Use "npm install @latest" to update to latest Node-RED. "npm update" re-generates the package-lock.json only, based on the package.json, but does not update the defined versions. "npm install node-red@latest" does also install other modes defined in package.json, but does not update them. --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 50e323539f..490fb394df 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6681,7 +6681,7 @@ _EOF_ if [[ -f 'package.json' ]] then G_EXEC rm -Rf node_modules .npm/_cacache - G_EXEC_OUTPUT=1 G_EXEC runuser -u nodered -- npm up --cache "$cache" --no-audit + G_EXEC_OUTPUT=1 G_EXEC runuser -u nodered -- npm i --cache "$cache" --no-audit node-red@latest else G_EXEC_OUTPUT=1 G_EXEC runuser -u nodered -- npm i --cache "$cache" --no-audit node-red fi From 52ef406cff823dbf678e11c80080729d14b8cfe2 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 5 Jul 2024 22:10:33 +0200 Subject: [PATCH 329/458] v9.6 - DietPi-Software | Node-RED: Simplify install code, now that installs and reinstalls share the same command --- dietpi/dietpi-software | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 490fb394df..1a94d9d27d 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6678,13 +6678,8 @@ _EOF_ # - Disable cache local cache=$(runuser -u nodered -- mktemp -d) # - Reinstall: Remove all locally installed modules, to work around update issues, but preserve installed plugins from package.json: https://github.com/MichaIng/DietPi/issues/7128 - if [[ -f 'package.json' ]] - then - G_EXEC rm -Rf node_modules .npm/_cacache - G_EXEC_OUTPUT=1 G_EXEC runuser -u nodered -- npm i --cache "$cache" --no-audit node-red@latest - else - G_EXEC_OUTPUT=1 G_EXEC runuser -u nodered -- npm i --cache "$cache" --no-audit node-red - fi + [[ -f 'package.json' ]] && G_EXEC rm -Rf node_modules .npm/_cacache + G_EXEC_OUTPUT=1 G_EXEC runuser -u nodered -- npm i --cache "$cache" --no-audit node-red@latest G_EXEC rm -R "$cache" G_EXEC cd "$G_WORKING_DIR" From 08902000fd0f0a8fe0400d9a31cb0798291b4b37 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 6 Jul 2024 22:23:21 +0200 Subject: [PATCH 330/458] v9.6 - DietPi-Software | Gitea: Update fallback URL --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 1a94d9d27d..9c14970181 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -10607,7 +10607,7 @@ _EOF_ *) local arch='arm-6';; esac - local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.22.0/gitea-1.22.0-linux-$arch.xz" + local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.22.1/gitea-1.22.1-linux-$arch.xz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/go-gitea/gitea/releases/latest' | mawk -F\" "/\"browser_download_url\": \".*\/gitea-[^\"\/]*-linux-$arch\.xz\"/{print \$4}")" /mnt/dietpi_userdata/gitea/gitea # User From 1de1ccbc9d51a85651946b349521972056ecba18 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 7 Jul 2024 16:42:51 +0200 Subject: [PATCH 331/458] v9.6 - DietPi-Software | Update fallback URLs --- dietpi/dietpi-software | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 9c14970181..fcbc7999ae 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6314,7 +6314,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Kareadita/Kavita/releases/download/v0.8.1/kavita-linux-$arch.tar.gz" + local fallback_url="https://github.com/Kareadita/Kavita/releases/download/v0.8.2/kavita-linux-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Kareadita/Kavita/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/kavita-linux-$arch\.tar\.gz\"$/{print \$4}")" G_EXEC chmod +x Kavita/Kavita @@ -9965,7 +9965,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.19.0.4568/Prowlarr.master.1.19.0.4568.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.20.1.4603/Prowlarr.master.1.20.1.4603.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Prowlarr/Prowlarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}")" G_EXEC mv Prowlarr /opt/prowlarr fi From 88dec156153794df1e75aaa85aa302df30184669 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 7 Jul 2024 21:05:03 +0200 Subject: [PATCH 332/458] v9.6 - DietPi-Software | Readarr: Update fallback URL --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index fcbc7999ae..9ddffb0b71 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -10039,7 +10039,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.29.2565/Readarr.develop.0.3.29.2565.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.30.2576/Readarr.develop.0.3.30.2576.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Readarr/Readarr/releases' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}" | head -1)" G_EXEC mv Readarr /opt/readarr fi From 7095f96b9933030bd62ec9e82a01ca2bbdf341b7 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 7 Jul 2024 22:45:46 +0200 Subject: [PATCH 333/458] v9.6 - DietPi-Software | Fail2Ban: Resolved an issue on Debian Bookworm and above, where Dropbear login failures were not detected due to a non-matching default filter. Dropbear runs as native systemd unit since Bookworm, logging to the system journal via STDOUT, which results in a different log entry prefix. The default filter however has not been updated for this. The fix is as well applied to existing Fail2Ban installs, as long as no own override /etc/fail2ban/filter.d/dropbear.local has been created. Many thanks to @ThePlanplan for reporting this issue: https://github.com/MichaIng/DietPi/issues/6665 --- .update/patches | 26 ++++++++++++++++++++++++++ CHANGELOG.txt | 1 + dietpi/dietpi-software | 21 +++++++++++++++++++++ 3 files changed, 48 insertions(+) diff --git a/.update/patches b/.update/patches index fdb8a26263..b509ae51e6 100755 --- a/.update/patches +++ b/.update/patches @@ -1710,6 +1710,32 @@ Patch_9_6() # Remove obsolete drop-in config: https://github.com/MichaIng/DietPi/issues/7104 [[ -f '/etc/systemd/system/ifup@.service.d/dietpi.conf' ]] && G_EXEC rm -R /etc/systemd/system/ifup@.service.d/dietpi.conf [[ -d '/etc/systemd/system/ifup@.service.d' ]] && G_EXEC rmdir --ignore-fail-on-non-empty /etc/systemd/system/ifup@.service.d + + # Fix filter for STDOUT logging since Bookworm: https://github.com/fail2ban/fail2ban/pull/3597 + if [[ -f '/etc/fail2ban/filter.d/dropbear.conf' && ! -f '/etc/fail2ban/filter.d/dropbear.local' ]] + then + G_DIETPI-NOTIFY 2 'Fixing Dropbear Fail2Ban filter for STDOUT logging since Bookworm: https://github.com/fail2ban/fail2ban/pull/3597' + cat << '_EOF_' > /etc/fail2ban/filter.d/dropbear.local +[INCLUDES] +before = common.conf + +[Definition] + +_daemon = dropbear + +# Fix filter for STDOUT logging since Bookworm: https://github.com/fail2ban/fail2ban/pull/3597 +prefregex = ^%(__prefix_line)s(\[\d+\] [A-Z][a-z]+ \d\d \d\d:\d\d:\d\d )?(?:[Ll]ogin|[Bb]ad|[Ee]xit).+$ + +failregex = ^[Ll]ogin attempt for nonexistent user ('.*' )?from :\d+$ + ^[Bb]ad (PAM )?password attempt for .+ from (:\d+)?$ + ^[Ee]xit before auth \(user '.+', \d+ fails\): Max auth tries reached - user '.+' from :\d+\s*$ + +ignoreregex = + +# Add journalmatch to enhance performance since Bookworm +journalmatch = _SYSTEMD_UNIT=dropbear.service + _COMM=dropbear +_EOF_ + fi } # v6.35 => v7 migration diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f94024d1ce..a51f158b93 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -22,6 +22,7 @@ Bug fixes: - DietPi-Drive_Manager | Resolved an issue, where network drives and potentially mounts in general could be attempted to be unmounted on shutdown, before services which can access them are stopped, leading to hanging shutdown sequences and potentially even data loss. Many thanks to @polite-garlic for reporting this issue: https://dietpi.com/forum/t/20542 - DietPi-Dashboard | Resolved an issue where the installation on RISC-V systems failed. - DietPi-Software | Node-RED: Resolved an issue where reinstalls/updates failed because of incompatibilities between latest Node.js or global modules with older local instances. Many thanks to @thinkbig1979 for reporting this issue: https://github.com/MichaIng/DietPi/issues/7128 +- DietPi-Software | Fail2Ban: Resolved an issue on Debian Bookworm and above, where Dropbear login failures were not detected due to a non-matching default filter. Dropbear runs as native systemd unit since Bookworm, logging to the system journal via STDOUT, which results in a different log entry prefix. The default filter however has not been updated for this. The fix is as well applied to existing Fail2Ban installs, as long as no own override /etc/fail2ban/filter.d/dropbear.local has been created. Many thanks to @ThePlanplan for reporting this issue: https://github.com/MichaIng/DietPi/issues/6665 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 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 9ddffb0b71..102d2b42ed 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -7295,6 +7295,27 @@ _EOF_ # Log to systemd by default G_EXEC eval 'echo -e '\''[Definition]\nlogtarget = SYSOUT'\'' > /etc/fail2ban/fail2ban.d/97_dietpi.conf' + # Fix Dropbear filter for STDOUT logging since Bookworm: https://github.com/fail2ban/fail2ban/pull/3597 + [[ -f '/etc/fail2ban/filter.d/dropbear.local' ]] || cat << '_EOF_' > /etc/fail2ban/filter.d/dropbear.local +[INCLUDES] +before = common.conf + +[Definition] + +_daemon = dropbear + +# Fix filter for STDOUT logging since Bookworm: https://github.com/fail2ban/fail2ban/pull/3597 +prefregex = ^%(__prefix_line)s(\[\d+\] [A-Z][a-z]+ \d\d \d\d:\d\d:\d\d )?(?:[Ll]ogin|[Bb]ad|[Ee]xit).+$ + +failregex = ^[Ll]ogin attempt for nonexistent user ('.*' )?from :\d+$ + ^[Bb]ad (PAM )?password attempt for .+ from (:\d+)?$ + ^[Ee]xit before auth \(user '.+', \d+ fails\): Max auth tries reached - user '.+' from :\d+\s*$ + +ignoreregex = + +# Add journalmatch to enhance performance since Bookworm +journalmatch = _SYSTEMD_UNIT=dropbear.service + _COMM=dropbear +_EOF_ G_AGI python3-systemd fail2ban Remove_SysV fail2ban 1 From d0971a4c4c36eda26b7bf1cab50e7a2a9f533db9 Mon Sep 17 00:00:00 2001 From: PaNue Date: Sun, 7 Jul 2024 22:55:22 +0200 Subject: [PATCH 334/458] v9.6 (#6880) - DietPi-Globals | Created a G_BUG_REPORT() function, which prints out a pre-filled template for GitHub and forum bug reports. G_EXEC uses the same function to print the template to console and for bug report uploads. - DietPi-Globals | G_EXEC: Do not always print bug report template on error. Instead add error handler option to do so. Co-authored-by: MichaIng --- dietpi/func/dietpi-globals | 154 +++++++++++++++++++++++-------------- 1 file changed, 95 insertions(+), 59 deletions(-) diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 326d8a831b..4d22afac09 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -803,6 +803,63 @@ $grey───────────────────────── return "${result:-1}" } + # G_BUG_REPORT [-c COMMAND] [-? EXIT_CODE] + # - Print pre-filled bug report template + G_BUG_REPORT() + { + local command exit_code + while (( $# )) + do + case $1 in + '-c') shift; command=$1;; + '-?') shift; exit_code=$1;; + *) G_DIETPI-NOTIFY 1 "Invalid argument \"$1\""; return 1;; + esac + shift + done + + # Print bug report template + echo "#### Details: +- Date | $(date '+%F %T')" + # - Add program/script name, failed command and exit code if given + [[ $G_PROGRAM_NAME ]] && echo "- Program name | $G_PROGRAM_NAME" + [[ $command ]] && echo "- Command | \`$command\`" + [[ $exit_code ]] && echo "- Exit code | $exit_code" + echo "- DietPi version | v$G_DIETPI_VERSION_CORE.$G_DIETPI_VERSION_SUB.$G_DIETPI_VERSION_RC ($G_GITOWNER/$G_GITBRANCH) +- Distro version | $G_DISTRO_NAME (ID=$G_DISTRO${G_RASPBIAN:+,RASPBIAN=$G_RASPBIAN}) +- Kernel version | \`$(uname -a)\` +- Architecture | \`$(dpkg --print-architecture)\` +- Hardware model | $G_HW_MODEL_NAME (ID=$G_HW_MODEL) +- Power supply | (EG: RAVPower 5V 1A) +- SD card | (EG: SanDisk Ultra 16 GB)" + # - Add image creator and pre-image info if given + if [[ -f '/boot/dietpi/.prep_info' ]] + then + image_creator=$(mawk 'NR==1' /boot/dietpi/.prep_info) + [[ ${image_creator:-0} == 0 ]] || echo "- Image creator | $image_creator" + preimage_name=$(mawk 'NR==2' /boot/dietpi/.prep_info) + [[ $preimage_name ]] && echo "- Pre-image | $preimage_name" + fi + echo '#### Steps to reproduce: + +1. ... +2. ... +#### Expected behaviour: + +- ... +#### Actual behaviour: + +- ... +#### Extra details: + +- ... +#### Additional logs: +```' + # - Add log if given + [[ -f '/tmp/G_EXEC_LOG' ]] && cat '/tmp/G_EXEC_LOG' || echo '' + echo '```' + } + #----------------------------------------------------------------------------------- # Error handled command execution wrapper #----------------------------------------------------------------------------------- @@ -867,60 +924,17 @@ $grey───────────────────────── # Retry non-interactively if current $attempt is <= $G_EXEC_RETRIES [[ $attempt -le $G_EXEC_RETRIES ]] && { ((attempt++)) && continue; } + # Print command output if not done already + [[ $G_EXEC_OUTPUT != 1 ]] && cat "$fp_log" + # Print FAILED, append raw command string if $G_EXEC_DESC is given G_DIETPI-NOTIFY 1 "${G_EXEC_DESC:+$G_EXEC_DESC\n - Command: }$ecommand" # Exit retry loop if $G_EXEC_NOHALT=1 is given [[ $G_EXEC_NOHALT == 1 ]] && break - # Prepare error handler menu and GitHub issue template - local fp_error_report='/tmp/G_EXEC_ERROR_REPORT' log_content=$(<"$fp_log") image_creator preimage_name dietpi_version="v$G_DIETPI_VERSION_CORE.$G_DIETPI_VERSION_SUB.$G_DIETPI_VERSION_RC ($G_GITOWNER/$G_GITBRANCH)" last_whip_menu_item sent_bug_report - if [[ -f '/boot/dietpi/.prep_info' ]]; then - - image_creator=$(mawk 'NR==1' /boot/dietpi/.prep_info) - [[ $image_creator == 0 ]] && image_creator='DietPi Core Team' - preimage_name=$(mawk 'NR==2' /boot/dietpi/.prep_info) - - fi - - # Create GitHub issue template if error was produced by one of our scripts - [[ ${G_PROGRAM_NAME,,} == 'dietpi-'* ]] && echo -e "\e[41m ---------------------------------------------------------------------- -- DietPi has encountered an error - -- Please create a ticket: https://github.com/MichaIng/DietPi/issues - -- Copy and paste only the BLUE lines below into the ticket - ----------------------------------------------------------------------\e[44m -#### Details: -- Date | $(date) -- DietPi version | $dietpi_version -- Image creator | $image_creator -- Pre-image | $preimage_name -- Hardware | $G_HW_MODEL_NAME (ID=$G_HW_MODEL) -- Kernel version | \`$(uname -a)\` -- Distro | $G_DISTRO_NAME (ID=$G_DISTRO${G_RASPBIAN:+,RASPBIAN=$G_RASPBIAN}) -- Command | \`$ecommand\` -- Exit code | $exit_code -- Software title | $G_PROGRAM_NAME -#### Steps to reproduce: - -1. ... -2. ... -#### Expected behaviour: - -- ... -#### Actual behaviour: - -- ... -#### Extra details: - -- ... -#### Additional logs: -\`\`\` -$log_content -\`\`\`\e[41m ----------------------------------------------------------------------\e[0m" > "$fp_error_report" - # Enter error handler menu loop in interactive mode + local last_whip_menu_item sent_bug_report fp_error_report='/tmp/G_EXEC_ERROR_REPORT' dietpi_version="v$G_DIETPI_VERSION_CORE.$G_DIETPI_VERSION_SUB.$G_DIETPI_VERSION_RC ($G_GITOWNER/$G_GITBRANCH)" [[ $G_INTERACTIVE == 1 ]] && while : do G_WHIP_MENU_ARRAY=('Retry' ': Re-run the last command that failed') @@ -929,8 +943,13 @@ $log_content # Allow to open DietPi-Config if this error was not produced within DietPi-Config pgrep -cf 'dietpi-config' &> /dev/null || G_WHIP_MENU_ARRAY+=('DietPi-Config' ': Edit network, APT/NTP mirror settings etc') G_WHIP_MENU_ARRAY+=('Open subshell' ': Open a subshell to investigate or solve the issue') - # Allow to send bug report, if it was produced by one of our scripts - [[ ${G_PROGRAM_NAME,,} == 'dietpi-'* && $G_PROGRAM_NAME != 'DietPi-Installer' ]] && G_WHIP_MENU_ARRAY+=('Send report' ': Uploads bugreport containing system info to DietPi') + + # Allow to send bug report if it was produced by one of our scripts, excluding DietPi-Installer + [[ ${G_PROGRAM_NAME,,} == 'dietpi-'* && $G_PROGRAM_NAME != 'DietPi-Installer' ]] && G_WHIP_MENU_ARRAY+=('Send report' ': Upload bug report including system info to DietPi') + + # Allow to print bug report template if it was produced by one of our scripts + [[ ${G_PROGRAM_NAME,,} == 'dietpi-'* ]] && G_WHIP_MENU_ARRAY+=('Print report' ': Print bug report template for GitHub or forum') + G_WHIP_MENU_ARRAY+=('' '●─ Devs only ') G_WHIP_MENU_ARRAY+=('Change command' ': Adjust and rerun the command') @@ -940,8 +959,8 @@ $log_content G_WHIP_MENU "${G_EXEC_DESC:+$(mawk '{gsub("\\\e[[0-9][;0-9]*m","");print}' <<< "$G_EXEC_DESC")\n} - Command: ${acommand[*]} - Exit code: $exit_code - DietPi version: $dietpi_version | HW_MODEL: $G_HW_MODEL | HW_ARCH: $G_HW_ARCH | DISTRO: $G_DISTRO -${image_creator:+ - Image creator: $image_creator\n}${preimage_name:+ - Pre-image: $preimage_name\n} - Error log: -$log_content" || break # Exit error handler menu loop on cancel + - Error log: +$(<"$fp_log")" || break # Exit error handler menu loop on cancel last_whip_menu_item=$G_WHIP_RETURNED_VALUE @@ -968,10 +987,34 @@ $log_content" || break # Exit error handler menu loop on cancel elif [[ $G_WHIP_RETURNED_VALUE == 'Send report' ]]; then + # Store error details to append to bug report upload + G_BUG_REPORT -c "${acommand[*]}" -? "$exit_code" > "$fp_error_report" + + # Send report /boot/dietpi/dietpi-bugreport 1 && sent_bug_report=1 read -rp ' Press any key to continue...' + elif [[ $G_WHIP_RETURNED_VALUE == 'Print report' ]]; then + + echo -e '\e[41m--------------------------------------------------------------------- +- DietPi bug report template for GitHub or forum - +- Please report at: https://github.com/MichaIng/DietPi/issues - + or: https://dietpi.com/forum/c/troubleshooting/10 - +- Copy and paste ONLY the BLUE lines below, replacing the template! - +---------------------------------------------------------------------\e[44m' + # Add bug report ID if sent already + if [[ $sent_bug_report == 1 ]] + then + sed --follow-symlinks -i "/^- Date | /a\- Bug report | $G_HW_UUID" "$fp_error_report" + cat "$fp_error_report" + else + G_BUG_REPORT -c "${acommand[*]}" -? "$exit_code" + fi + echo -e '\e[41m---------------------------------------------------------------------\e[0m' + read -rp ' +Press any key to continue...' + elif [[ $G_WHIP_RETURNED_VALUE == 'Change command' ]]; then G_WHIP_DEFAULT_ITEM=${acommand[*]} @@ -997,14 +1040,7 @@ Press any key to continue...' fi done - # Error has not been solved, print GitHub issue template if it was produced and exit error handler menu loop - if [[ -f $fp_error_report ]]; then - - # Add bug report ID if it was sent - [[ $sent_bug_report == 1 ]] && sed --follow-symlinks -i "/^- Date | /a\- Bug report | $G_HW_UUID" "$fp_error_report" - cat "$fp_error_report" - - fi + # Error has not been solved, exit error handler menu loop break done From 1b0d4398f2986a68fc63db31ee42746b9e41bdc0 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 7 Jul 2024 22:57:02 +0200 Subject: [PATCH 335/458] v9.6 - RC up --- .update/version | 2 +- dietpi/func/dietpi-globals | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.update/version b/.update/version index 6c2285e750..5f21a93cd2 100644 --- a/.update/version +++ b/.update/version @@ -3,7 +3,7 @@ # Available DietPi version G_REMOTE_VERSION_CORE=9 G_REMOTE_VERSION_SUB=6 -G_REMOTE_VERSION_RC=0 +G_REMOTE_VERSION_RC=1 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=7 G_MIN_VERSION_SUB=0 diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 4d22afac09..e23b016e8c 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -55,7 +55,7 @@ # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=9 [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=6 - [[ $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 From bcd459be87b8ca9f164a17501c52c922f6002c53 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 7 Jul 2024 23:12:44 +0200 Subject: [PATCH 336/458] v9.6 - CHANGELOG | Update v9.6 release date --- CHANGELOG.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index a51f158b93..a5770728f5 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,5 @@ v9.6 -(2024-07-06) +(2024-07-07) New software: - soju | This IRC bouncer has been added to our software catalogue. Many thanks to @subnut for implementing it: https://github.com/MichaIng/DietPi/pull/7124 From dda0c51736caecda4cd9c484b06f5e3407b87cd4 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 8 Jul 2024 00:22:44 +0200 Subject: [PATCH 337/458] v9.6 - DietPi-Patches | Apply changed Fail2Ban Dropbear filter immediately with a service restart --- .update/patches | 1 + 1 file changed, 1 insertion(+) diff --git a/.update/patches b/.update/patches index b509ae51e6..58d384991b 100755 --- a/.update/patches +++ b/.update/patches @@ -1735,6 +1735,7 @@ ignoreregex = # Add journalmatch to enhance performance since Bookworm journalmatch = _SYSTEMD_UNIT=dropbear.service + _COMM=dropbear _EOF_ + G_EXEC systemctl restart fail2ban fi } From f6a6fd2f4d55f028444d91445558eb3fe18fa17a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 8 Jul 2024 00:34:13 +0200 Subject: [PATCH 338/458] v9.6 - DietPi-Installer | Remove pre-v9.6 steps --- .build/images/dietpi-installer | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index c2fd0f14d5..ff082f29a8 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -814,8 +814,6 @@ setenv rootuuid "true"' /boot/boot.cmd G_DIETPI-NOTIFY 2 'Applying DietPi live patches to fix known bugs in this version' for i in "${!G_LIVE_PATCH[@]}" do - # ToDo: Temporarily skip live patch 0 on NanoPi R6C, which cannot succeed here, but will be applied later in this script - (( $G_HW_MODEL == 79 && $HW_VARIANT == 2 && $i == 0 )) && [[ ${G_LIVE_PATCH_DESC[i]} == *'NanoPi R6C' ]] && continue if eval "${G_LIVE_PATCH_COND[$i]}" then G_DIETPI-NOTIFY 2 "Applying live patch $i" @@ -1137,7 +1135,7 @@ _EOF_ 78) model='rock-5b' kernel='rk35xx' branch='legacy';; 79) kernel='rk35xx' branch='legacy' case $HW_VARIANT in - 2) model='nanopi-r6c'; G_EXEC sed -i 's/r6s/r6c/' /etc/apt/sources.list.d/dietpi.list;; # ToDo: Temporarily assure correct APT component, until DietPi v9.6 release + 2) model='nanopi-r6c';; 3) model='nanopct6';; *) model='nanopi-r6s';; esac;; From bb8c25957b084975eba48500d3bd32a616e888a0 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 8 Jul 2024 00:48:25 +0200 Subject: [PATCH 339/458] v9.6 - CHANGELOG | Add v9.6 release PR URL --- CHANGELOG.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index a5770728f5..f0f604f972 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -24,7 +24,7 @@ Bug fixes: - DietPi-Software | Node-RED: Resolved an issue where reinstalls/updates failed because of incompatibilities between latest Node.js or global modules with older local instances. Many thanks to @thinkbig1979 for reporting this issue: https://github.com/MichaIng/DietPi/issues/7128 - DietPi-Software | Fail2Ban: Resolved an issue on Debian Bookworm and above, where Dropbear login failures were not detected due to a non-matching default filter. Dropbear runs as native systemd unit since Bookworm, logging to the system journal via STDOUT, which results in a different log entry prefix. The default filter however has not been updated for this. The fix is as well applied to existing Fail2Ban installs, as long as no own override /etc/fail2ban/filter.d/dropbear.local has been created. Many thanks to @ThePlanplan for reporting this issue: https://github.com/MichaIng/DietPi/issues/6665 -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/7142 ----------------------------------------------------------------------------------------------------------- From d8041c2d87052fcc639f434c9969e9f513fb963a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 8 Jul 2024 22:03:41 +0200 Subject: [PATCH 340/458] v9.6 - CHANGELOG | Typo --- CHANGELOG.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f0f604f972..fa07aaf847 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,7 +5,7 @@ New software: - soju | This IRC bouncer has been added to our software catalogue. Many thanks to @subnut for implementing it: https://github.com/MichaIng/DietPi/pull/7124 Enhancements: -- General | Since we provide all kernel, bootloader and firmware packages from our own APT repository now, the Armbian APT repository is removed form all systems. In case you use an SBC which is not officially supported by DietPi, as generic device, it is however preserved. +- General | Since we provide all kernel, bootloader and firmware packages from our own APT repository now, the Armbian APT repository is removed from all systems. In case you use an SBC which is not officially supported by DietPi, as generic device, it is however preserved. - Quartz64/Star64/VisionFive 2 | The extended attribute handler for ext4 security labels "CONFIG_EXT4_FS_SECURITY" has been enabled for these SBCs, required for some Docker containers. Many thanks to @gxsw for reporting this missing feature: https://github.com/MichaIng/DietPi/issues/7102 - Quartz64/Star64/VisionFive 2 | eBPF functionality for firewall and network monitoring software like Cilium has been added to our kernel builds for these SBCs. Many thanks to @kbrighton for reporting these missing features: https://github.com/MichaIng/DietPi/issues/6834 - Orange Pi 5 | Older U-Boot builds caused the Ethernet MAC address to be random and change on every boot. Recent U-Boot builds solve this, but they are not flashed automatically on package upgrades. We hence inform users and offer to flash the latest U-Boot image during the DietPi update. Many thanks to @thuehlinger for reporting and testing the case: https://github.com/MichaIng/DietPi/issues/6663 From 4e657c2f5a86a89fc1511bc4824bfe0962cb4650 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 9 Jul 2024 00:15:36 +0200 Subject: [PATCH 341/458] Init v9.7 --- .meta/dietpi-survey_report | 8 +++++++- .update/patches | 5 +++++ .update/version | 4 ++-- CHANGELOG.txt | 11 +++++++++++ dietpi/func/dietpi-globals | 4 ++-- 5 files changed, 27 insertions(+), 5 deletions(-) diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index c13944aa27..0c4e7c5a02 100755 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -728,8 +728,14 @@ shopt -s extglob done aSOFTWARE_NAME9_6[213]='soju' + aSOFTWARE_NAME9_7=() + for i in "${!aSOFTWARE_NAME9_6[@]}" + do + aSOFTWARE_NAME9_7[i]=${aSOFTWARE_NAME9_6[i]} + done + # Pre-create software counter array so that we can see also software (available in newest version) with 0 installs - for i in "${aSOFTWARE_NAME9_6[@]}" + for i in "${aSOFTWARE_NAME9_7[@]}" do aSOFTWARE[$i]=0 done diff --git a/.update/patches b/.update/patches index 58d384991b..1d35dccfc2 100755 --- a/.update/patches +++ b/.update/patches @@ -1739,6 +1739,11 @@ _EOF_ fi } +Patch_9_7() +{ + : +} + # v6.35 => v7 migration if (( $G_DIETPI_VERSION_CORE == 6 && $G_DIETPI_VERSION_SUB > 34 )) then diff --git a/.update/version b/.update/version index 5f21a93cd2..d49b5664fd 100644 --- a/.update/version +++ b/.update/version @@ -2,8 +2,8 @@ # shellcheck disable=SC2034 # Available DietPi version G_REMOTE_VERSION_CORE=9 -G_REMOTE_VERSION_SUB=6 -G_REMOTE_VERSION_RC=1 +G_REMOTE_VERSION_SUB=7 +G_REMOTE_VERSION_RC=-1 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=7 G_MIN_VERSION_SUB=0 diff --git a/CHANGELOG.txt b/CHANGELOG.txt index fa07aaf847..f5a67988bd 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,14 @@ +v9.7 +(2024-08-03) + +Enhancements: + +Bug fixes: + +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 + +----------------------------------------------------------------------------------------------------------- + v9.6 (2024-07-07) diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index e23b016e8c..ff61b9d38d 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -54,8 +54,8 @@ [[ -f '/boot/dietpi/.version' ]] && . /boot/dietpi/.version # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=9 - [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=6 - [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=1 + [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=7 + [[ $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 From 276aaac0016f2098575faa977d66569117cde480 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 9 Jul 2024 00:16:28 +0200 Subject: [PATCH 342/458] v9.7 - DietPi-Software | HAProxy: Bump to v3.0.2 --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 102d2b42ed..1632a4503d 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6914,7 +6914,7 @@ _EOF_ if To_Install 98 haproxy # HAProxy then - local version='2.9.7' # https://www.haproxy.org/download/ + local version='3.0.2' # https://www.haproxy.org/download/ aDEPS=('make' 'gcc' 'libpcre3-dev' 'libssl-dev' 'zlib1g-dev' 'libsystemd-dev') Download_Install "https://www.haproxy.org/download/${version%.*}/src/haproxy-$version.tar.gz" From 0b6f85e7594e48024d449091e69bb0d0cb042b2c Mon Sep 17 00:00:00 2001 From: Lukasz Sobala <61153692+lukaszsobala@users.noreply.github.com> Date: Wed, 10 Jul 2024 18:41:49 +0100 Subject: [PATCH 343/458] v9.7 (#7149) - DietPi-Software | Box86/Box64: Resolved an issue where the installation failed because of a false directory removal attempt. Many thanks to @lukaszsobala for fixing this issue: https://github.com/MichaIng/DietPi/pull/7149 Co-authored-by: MichaIng --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f5a67988bd..7f72ca74b4 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,6 +4,7 @@ v9.7 Enhancements: Bug fixes: +- DietPi-Software | Box86/Box64: Resolved an issue where the installation failed because of a false directory removal attempt. Many thanks to @lukaszsobala for fixing this issue: https://github.com/MichaIng/DietPi/pull/7149 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 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 1632a4503d..c732e6bf02 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -11085,7 +11085,7 @@ _EOF_ # Cleanup G_EXEC cd "$G_WORKING_DIR" - G_EXEC rm "box86-${version#v}" + G_EXEC rm -R "box86-${version#v}" # Reload binfmt if kernel module is available to have i386 binaries executed via box86 automatically from now on modprobe binfmt_misc 2> /dev/null && G_EXEC systemctl restart systemd-binfmt @@ -11142,7 +11142,7 @@ _EOF_ # Cleanup G_EXEC cd "$G_WORKING_DIR" - G_EXEC rm "box64-${version#v}" + G_EXEC rm -R "box64-${version#v}" # Reload binfmt if kernel module is available to have x86_64 binaries executed via box64 automatically from now on modprobe binfmt_misc 2> /dev/null && G_EXEC systemctl restart systemd-binfmt From 4b4742dc64492c1f8e840ae7a90b1cddb4deba77 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 10 Jul 2024 20:25:55 +0200 Subject: [PATCH 344/458] v8.7 - DietPi-Software | Bazarr: Resolved an issue where service stops and restarts were hanging until timeout, leading also to hanging system shutdowns and restarts. Many thansk to `@clarky000` and `@blablazzz` for reporting this issue, and `@gregordinary` for pointing us to the solution: https://dietpi.com/forum/t/19610 - DietPi-Software | Bazarr: Install unzip explicitly, since dietpi-software should depend less on which packages DietPi comes pre-installed with --- .update/patches | 10 +++++++++- CHANGELOG.txt | 1 + dietpi/dietpi-software | 4 +++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.update/patches b/.update/patches index 1d35dccfc2..de38652bcb 100755 --- a/.update/patches +++ b/.update/patches @@ -1741,7 +1741,15 @@ _EOF_ Patch_9_7() { - : + # Software updates, migrations and patches + if [[ -f '/boot/dietpi/.installed' ]] + then + # Bazarr + if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[180\]=2' /boot/dietpi/.installed && [[ -f '/etc/systemd/system/bazarr.service' ]] + then + G_CONFIG_INJECT 'KillSignal=' 'KillSignal=SIGINT' /etc/systemd/system/bazarr.service '\[Service\]' + fi + fi } # v6.35 => v7 migration diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 7f72ca74b4..30f2b2c157 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,6 +5,7 @@ Enhancements: Bug fixes: - DietPi-Software | Box86/Box64: Resolved an issue where the installation failed because of a false directory removal attempt. Many thanks to @lukaszsobala for fixing this issue: https://github.com/MichaIng/DietPi/pull/7149 +- DietPi-Software | Bazarr: Resolved an issue where service stops and restarts were hanging until timeout, leading also to hanging system shutdowns and restarts. Many thansk to @clarky000 and @blablazzz for reporting this issue, and @gregordinary for pointing us to the solution: https://dietpi.com/forum/t/19610 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 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index c732e6bf02..d6473713d1 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -9700,9 +9700,10 @@ _EOF_ if To_Install 180 bazarr # Bazarr: https://wiki.bazarr.media/Getting-Started/Installation/Linux/linux/ then # APT deps + aDEPS=('unzip') if (( $G_HW_ARCH < 3 )) then - aDEPS=('libopenblas0-pthread') # libopenblas0-pthread runtime library for piwheels wheel: https://piwheels.org/project/numpy/ + aDEPS+=('libopenblas0-pthread') # libopenblas0-pthread runtime library for piwheels wheel: https://piwheels.org/project/numpy/ (( $G_HW_ARCH == 1 )) && aDEPS+=('unar') # ARMv6 does not support unrar-nonfree and Bazarr does not support unrar-free, so we need to use "unar": https://github.com/morpheus65535/bazarr/issues/2172 fi @@ -9742,6 +9743,7 @@ User=bazarr UMask=002 LogsDirectory=bazarr ExecStart=/usr/bin/python3 /opt/bazarr/bazarr.py -c /mnt/dietpi_userdata/bazarr +KillSignal=SIGINT # Hardening ProtectSystem=strict From 6be1140bf2b6921a0e57918ec0a50e2a79257155 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 10 Jul 2024 21:23:54 +0200 Subject: [PATCH 345/458] v9.7 - CI | DietPi-Software test: Allow 30 seconds for Koel to bind to port in emulated container --- .github/workflows/dietpi-software.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index 28882c83ad..7953fe9cc1 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -179,7 +179,7 @@ Process_Software() 139) aSERVICES[i]='sabnzbd' aTCP[i]='8080'; (( $arch == 10 )) || aDELAY[i]=30;; # ToDo: Solve conflict with Airsonic 140) aSERVICES[i]='domoticz' aTCP[i]='8124 8424';; #142) aSERVICES[i]='snapd';; "system does not fully support snapd: cannot mount squashfs image using "squashfs": mount: /tmp/syscheck-mountpoint-2075108377: mount failed: Operation not permitted." - 143) aSERVICES[i]='koel' aTCP[i]='8003';; + 143) aSERVICES[i]='koel' aTCP[i]='8003'; (( $arch == 10 )) || aDELAY[i]=30;; 144) aSERVICES[i]='sonarr' aTCP[i]='8989'; (( $arch < 10 )) && aDELAY[i]=90;; 145) aSERVICES[i]='radarr' aTCP[i]='7878'; (( $arch < 10 )) && aDELAY[i]=90;; 146) aSERVICES[i]='tautulli' aTCP[i]='8181'; (( $arch == 10 )) || aDELAY[i]=60;; From cede450f50a7e673573902a8f0a8e68f9de40e91 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 11 Jul 2024 19:50:29 +0200 Subject: [PATCH 346/458] v9.7 (#7153) - DietPi-Software | Node.js: Install libatomic1 only where required - DietPi-Software | Update fallback URLs --- dietpi/dietpi-software | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index d6473713d1..1d205825ec 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3009,8 +3009,8 @@ unix_socket_directories = '/run/postgresql'" > "$i/00dietpi.conf" if To_Install 9 # Node.js then - # Deps: https://github.com/MichaIng/DietPi/issues/3614 - aDEPS=('libatomic1') + # ARMv6/7/RISC-V deps (verified 2024-07-11): https://github.com/MichaIng/DietPi/issues/3614 + (( $G_HW_ARCH < 3 || $G_HW_ARCH == 11 )) && aDEPS=('libatomic1') # Download installer Download_Install 'https://raw.githubusercontent.com/MichaIng/nodejs-linux-installer/master/node-install.sh' @@ -6522,7 +6522,7 @@ _EOF_ esac # Download - local fallback_url="https://github.com/fatedier/frp/releases/download/v0.58.1/frp_0.58.1_linux_$arch.tar.gz" + local fallback_url="https://github.com/fatedier/frp/releases/download/v0.59.0/frp_0.59.0_linux_$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/fatedier/frp/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/frp_[0-9.]*_linux_$arch\.tar\.gz\"/{print \$4}")" G_EXEC cd frp_* @@ -9364,7 +9364,7 @@ _EOF_ if (( ${PHP_VERSION::1} > 7 )) then aDEPS+=("php$PHP_VERSION-curl") - local fallback_url='https://github.com/koel/koel/releases/download/v6.12.1/koel-v6.12.1.tar.gz' aphp_deps=('curl' 'dom') + local fallback_url='https://github.com/koel/koel/releases/download/v7.0.2/koel-v7.0.2.tar.gz' aphp_deps=('curl' 'dom') Download_Install "$(curl -sSfL 'https://api.github.com/repos/koel/koel/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/koel-[^"\/]*\.tar\.gz"$/{print $4}')" else aDEPS+=("php$PHP_VERSION-json") @@ -11100,7 +11100,7 @@ _EOF_ # Download local version=$(curl -sSfL 'https://api.github.com/repos/ptitSeb/box64/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}') - [[ $version ]] || { version='v0.2.8'; G_DIETPI-NOTIFY 1 "Automatic latest ${aSOFTWARE_NAME[$software_id]} version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } + [[ $version ]] || { version='v0.3.0'; G_DIETPI-NOTIFY 1 "Automatic latest ${aSOFTWARE_NAME[$software_id]} version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } Download_Install "https://github.com/ptitSeb/box64/archive/$version.tar.gz" # Build for targets: https://github.com/ptitSeb/box64/blob/main/CMakeLists.txt From 7be8a855c8c755c25d9c020915dcdaaab62278f7 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 18 Jul 2024 16:13:51 +0200 Subject: [PATCH 347/458] v9.6 - DietPi-Installer | Do not add Armbian repository for stable builds anymore, after DietPi v9.6 has been released --- .build/images/dietpi-installer | 30 ------------------------------ dietpi/dietpi-software | 4 ++-- 2 files changed, 2 insertions(+), 32 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index ff082f29a8..84504110be 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1045,36 +1045,6 @@ setenv rootuuid "true"' /boot/boot.cmd # Remove obsolete lists find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -Rf {} + - if [[ $G_GITBRANCH == 'master' ]] - then - # Prevent any unintended packages from being installed from Armbian's APT repository, like base-files: https://github.com/MichaIng/DietPi/issues/6227#issuecomment-1713688577 - cat << '_EOF_' > /etc/apt/preferences.d/dietpi-armbian -Package: * -Pin: origin apt.armbian.com -Pin-Priority: -1 - -Package: armbian-firmware* linux-* -Pin: origin apt.armbian.com -Pin-Priority: 500 -_EOF_ - if dpkg --compare-versions "$(dpkg-query -Wf '${Version}' base-files)" gt 20 - then - G_DIETPI-NOTIFY 2 'Enforcing downgrade of Armbian'\''s base-files package to Debian'\''s' - cat << '_EOF_' > /etc/apt/preferences.d/dietpi-armbian-tmp -Package: base-files -Pin: release o=Debian -Pin-Priority: 1000 -_EOF_ - G_EXEC eval 'echo '\''APT::Get::Allow-Downgrades "1";'\'' > /etc/apt/apt.conf.d/dietpi-armbian' - fi - - # Bootstrap Armbian repository - G_EXEC_RETRIES=2 G_EXEC eval 'curl -sSfL '\''https://apt.armbian.com/armbian.key'\'' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-armbian.gpg --yes' - - # Add Armbian repository - G_EXEC eval "echo 'deb https://apt.armbian.com ${DISTRO_TARGET_NAME/bullseye/bookworm} main' > /etc/apt/sources.list.d/dietpi-armbian.list" - fi - # Select kernel, device tree and U-Boot packages local model='odroidn2' kernel='meson64' arch='arm64' branch='current' zstd=() case $G_HW_MODEL in diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 1d205825ec..65c7e2879d 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -7953,7 +7953,7 @@ _EOF_ cat << _EOF_ > /etc/hostapd/hostapd.conf interface=$wifi_iface driver=nl80211 -ssid=${ssid:-DietPi-HotSpot} +ssid=${ssid:-DietPi-Hotspot} country_code=00 hw_mode=$mode channel=$channel @@ -9355,7 +9355,7 @@ _EOF_ if To_Install 143 koel # Koel then - # APT dependencies: https://docs.koel.dev/#server > https://laravel.com/docs/9.x/deployment#server-requirements / https://laravel.com/docs/8.x/deployment#server-requirements + # APT dependencies: https://docs.koel.dev/guide/getting-started > https://laravel.com/docs/10.x/deployment#server-requirements / https://laravel.com/docs/8.x/deployment#server-requirements # - Skip JSON module from PHP 8.0 on, where it is embedded into core # - pdo_sqlite module required for "artisan koel:init" < "artisan db:seed", despite MySQL database engine used aDEPS=("php$PHP_VERSION-bcmath" "php$PHP_VERSION-mbstring" "php$PHP_VERSION-sqlite3" "php$PHP_VERSION-xml") From 72e1eeb459bd9e653b1e943c1080eefa1aca285e Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 18 Jul 2024 17:41:03 +0200 Subject: [PATCH 348/458] v9.7 - DietPi-Installer | Transparently remove obsolete APT sources, and do expect all of them to be files or symlinks, no directories, else throw an error. --- .build/images/dietpi-installer | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 84504110be..8d83eafd48 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1043,7 +1043,7 @@ setenv rootuuid "true"' /boot/boot.cmd [[ -f '/etc/apt/trusted.gpg~' ]] && G_EXEC rm '/etc/apt/trusted.gpg~' # Remove obsolete lists - find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -Rf {} + + find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -v {} + # Select kernel, device tree and U-Boot packages local model='odroidn2' kernel='meson64' arch='arm64' branch='current' zstd=() @@ -1392,7 +1392,7 @@ _EOF_ [[ -f '/etc/apt/trusted.gpg~' ]] && G_EXEC rm '/etc/apt/trusted.gpg~' # Remove obsolete components from Armbian list and connect via HTTPS - find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -Rf {} + + find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -v {} + G_EXEC eval "echo 'deb https://apt.armbian.com ${DISTRO_TARGET_NAME/bullseye/bookworm} main' > /etc/apt/sources.list.d/dietpi-armbian.list" # Skip creating kernel symlinks and remove existing ones From ec8e74a496c16bf9c77b0335710720b4272ad7e9 Mon Sep 17 00:00:00 2001 From: Joulinar <47155374+Joulinar@users.noreply.github.com> Date: Thu, 18 Jul 2024 19:10:58 +0200 Subject: [PATCH 349/458] v9.7 (#7166) - DietPi-Software | WiFi Hotspot: Resolved an issue where the hotspot failed because of an unintended character in the interface configuration. Many thanks to `@wimduk` for reporting this issue: https://dietpi.com/forum/t/20744 --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 30f2b2c157..abb9aec2be 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -6,6 +6,7 @@ Enhancements: Bug fixes: - DietPi-Software | Box86/Box64: Resolved an issue where the installation failed because of a false directory removal attempt. Many thanks to @lukaszsobala for fixing this issue: https://github.com/MichaIng/DietPi/pull/7149 - DietPi-Software | Bazarr: Resolved an issue where service stops and restarts were hanging until timeout, leading also to hanging system shutdowns and restarts. Many thansk to @clarky000 and @blablazzz for reporting this issue, and @gregordinary for pointing us to the solution: https://dietpi.com/forum/t/19610 +- DietPi-Software | WiFi Hotspot: Resolved an issue where the hotspot failed because of an unintended character in the interface configuration. Many thanks to @wimduk for reporting this issue: https://dietpi.com/forum/t/20744 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 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 65c7e2879d..f503c794aa 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -7906,7 +7906,7 @@ netmask 255.255.255.0 #gateway 192.168.0.1 #dns-nameservers 9.9.9.9 149.112.112.112 pre-up iw dev $wifi_iface set power_save off -post-down iw dev "$wifi_iface set power_save on +post-down iw dev $wifi_iface set power_save on # iptables NAT rules up iptables-restore < /etc/iptables.ipv4.nat From 56ca577c0827bbf702a89662c3d6f8e6e7c808ba Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 18 Jul 2024 20:14:13 +0200 Subject: [PATCH 350/458] v9.7 - DietPi-Installer | Remove all systemd-networkd configs: https://github.com/MichaIng/DietPi/issues/5871 --- .build/images/dietpi-installer | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 8d83eafd48..335010fd1b 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1762,7 +1762,10 @@ _EOF_' G_AGP rfkill [[ -d '/var/lib/systemd/rfkill' ]] && G_EXEC rm -R /var/lib/systemd/rfkill - G_DIETPI-NOTIFY 2 'Configuring wlan/eth naming to be preferred for networked devices:' + G_DIETPI-NOTIFY 2 'Removing all systemd-networkd configs, since DietPi uses ifupdown by default' # https://github.com/MichaIng/DietPi/issues/5871 + G_EXEC rm -Rf /etc/systemd/network/{,.??,.[^.]}* + + G_DIETPI-NOTIFY 2 'Avoid "predictable" network interface names' G_EXEC ln -sf /dev/null /etc/systemd/network/99-default.link G_EXEC ln -sf /dev/null /etc/udev/rules.d/80-net-setup-link.rules From e6c0b8b540a3b45eb76dbc698f4e1d158c644068 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 18 Jul 2024 21:18:07 +0200 Subject: [PATCH 351/458] v9.7 - DietPi-Software | Update fallback URLs --- dietpi/dietpi-software | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index f503c794aa..3f62c2888f 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3345,7 +3345,7 @@ _EOF_ esac # Download binary - local fallback_url="https://github.com/prometheus/node_exporter/releases/download/v1.8.1/node_exporter-1.8.1.linux-$arch.tar.gz" + local fallback_url="https://github.com/prometheus/node_exporter/releases/download/v1.8.2/node_exporter-1.8.2.linux-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/prometheus/node_exporter/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/node_exporter-.*\.linux-$arch\.tar\.gz\"$/{print \$4}")" G_EXEC mkdir -p /opt/node_exporter G_EXEC cp --preserve=mode node_exporter*/node_exporter /opt/node_exporter/ @@ -8561,7 +8561,7 @@ _EOF_ # Install ruTorrent: Web UI for rTorrent # - Grab current version local version=$(curl -sSfL 'https://api.github.com/repos/Novik/ruTorrent/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}') - [[ $version ]] || { version='v4.3.5'; G_DIETPI-NOTIFY 1 "Automatic latest ruTorrent version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } + [[ $version ]] || { version='v4.3.6'; G_DIETPI-NOTIFY 1 "Automatic latest ruTorrent version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } Download_Install "https://github.com/Novik/ruTorrent/archive/$version.tar.gz" # - Reinstall freshly with preserved configs and 3rd party plugins @@ -9364,7 +9364,7 @@ _EOF_ if (( ${PHP_VERSION::1} > 7 )) then aDEPS+=("php$PHP_VERSION-curl") - local fallback_url='https://github.com/koel/koel/releases/download/v7.0.2/koel-v7.0.2.tar.gz' aphp_deps=('curl' 'dom') + local fallback_url='https://github.com/koel/koel/releases/download/v7.0.8/koel-v7.0.8.tar.gz' aphp_deps=('curl' 'dom') Download_Install "$(curl -sSfL 'https://api.github.com/repos/koel/koel/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/koel-[^"\/]*\.tar\.gz"$/{print $4}')" else aDEPS+=("php$PHP_VERSION-json") @@ -9642,7 +9642,7 @@ _EOF_ esac url=$(curl -sSfL 'https://api.github.com/repos/Lidarr/Lidarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}") - local fallback_url="https://github.com/Lidarr/Lidarr/releases/download/v2.3.3.4204/Lidarr.master.2.3.3.4204.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Lidarr/Lidarr/releases/download/v2.4.3.4248/Lidarr.master.2.4.3.4248.linux-core-$arch.tar.gz" fi Download_Install "$url" @@ -10062,7 +10062,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.30.2576/Readarr.develop.0.3.30.2576.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.31.2578/Readarr.develop.0.3.31.2578.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Readarr/Readarr/releases' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}" | head -1)" G_EXEC mv Readarr /opt/readarr fi @@ -11214,7 +11214,7 @@ _EOF_ # v3 drops PHP 7.4 support: https://github.com/TasmoAdmin/TasmoAdmin/releases/tag/v3.0.0 if (( $G_DISTRO > 6 )) then - local fallback_url='https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v4.1.1/tasmoadmin_v4.1.1.tar.gz' + local fallback_url='https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v4.1.2/tasmoadmin_v4.1.2.tar.gz' Download_Install "$(curl -sSfL 'https://api.github.com/repos/TasmoAdmin/TasmoAdmin/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/tasmoadmin_v[^"\/]*\.tar\.gz"$/{print $4}')" else Download_Install 'https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v2.4.2/tasmoadmin_v2.4.2.tar.gz' From 76b80a724fcaa0b5536e442702f8c3100b73fcfb Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 21 Jul 2024 21:11:38 +0200 Subject: [PATCH 352/458] v9.7 - DietPi-Software | Update fallback URLs --- dietpi/dietpi-software | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 3f62c2888f..6df8ae5a8d 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -9546,7 +9546,7 @@ _EOF_ esac url=$(curl -sSfL 'https://api.github.com/repos/Radarr/Radarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}") - local fallback_url="https://github.com/Radarr/Radarr/releases/download/v5.7.0.8882/Radarr.master.5.7.0.8882.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Radarr/Radarr/releases/download/v5.8.3.8933/Radarr.master.5.8.3.8933.linux-core-$arch.tar.gz" fi Download_Install "$url" @@ -10062,7 +10062,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.31.2578/Readarr.develop.0.3.31.2578.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.32.2587/Readarr.develop.0.3.32.2587.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Readarr/Readarr/releases' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}" | head -1)" G_EXEC mv Readarr /opt/readarr fi From 24000a3e2cc4fd1895527dcc8832cfa1c16d6ad1 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 22 Jul 2024 22:04:30 +0200 Subject: [PATCH 353/458] v9.7 - Odroid N2 | Add an option to update (flash) the SPI bootloader to the dietpi-config "Advanced Options" menu. --- CHANGELOG.txt | 1 + dietpi/dietpi-config | 58 +++++++++++++++++++++++++++++--------------- 2 files changed, 39 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index abb9aec2be..457cbdf95b 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,6 +2,7 @@ v9.7 (2024-08-03) Enhancements: +- Odroid N2 | Added an option to update (flash) the SPI bootloader to the dietpi-config "Advanced Options" menu. Bug fixes: - DietPi-Software | Box86/Box64: Resolved an issue where the installation failed because of a false directory removal attempt. Many thanks to @lukaszsobala for fixing this issue: https://github.com/MichaIng/DietPi/pull/7149 diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 97b81a64c4..881723848b 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -932,15 +932,15 @@ Re-enabling HDMI requires a reboot. If you need emergency HDMI output, edit the G_WHIP_MENU_ARRAY+=('Update RPi EEPROM firmware' ': Install rpi-eeprom APT package') fi - # ROCK 4, ROCK 5B, Orange Pi 5 (Plus) and Orange Pi 3B: https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457 - elif [[ $G_HW_MODEL =~ ^(72|78|80|82|87)$ ]] + # Odroid N2, ROCK 4, ROCK 5B, Orange Pi 5 (Plus) and Orange Pi 3B: https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457 + elif [[ $G_HW_MODEL =~ ^(15|72|78|80|82|87)$ ]] then - # ROCK 4: Device tree overlay required + # Odroid N2/ROCK 4: Device tree overlay required local spidev='/dev/mtdblock0' - (( $G_HW_MODEL == 72 )) || { + (( $G_HW_MODEL == 15 || $G_HW_MODEL == 72 )) || { [[ -f '/usr/lib/u-boot/platform_install.sh' ]] && { { [[ -e '/dev/mtd0' ]] && grep -q '/dev/mtd0' /usr/lib/u-boot/platform_install.sh && spidev='/dev/mtd0'; } || - { [[ -b '/dev/mtdblock0' ]] && grep -q 'rksd_loader.img' /usr/lib/u-boot/platform_install.sh; } + { [[ -b '/dev/mtdblock0' ]] && grep -q '/dev/mtdblock0' /usr/lib/u-boot/platform_install.sh; } } } && G_WHIP_MENU_ARRAY+=('Update SPI bootloader' ": Flash current U-Boot to $spidev") @@ -1084,25 +1084,47 @@ 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' ]] + if [[ $G_HW_MODEL == 15 && ! -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 == 'g12b-odroid-n2-spi' ]] && break; done + if [[ $i == 'g12b-odroid-n2-spi' ]] + then + G_WHIP_MSG '[FAILED] No SPI device found +\nThe expected SPI device /dev/mtdblock0 was not found on your Odroid N2 system, despite the fact that the related device tree overlay has been applied already. You may need to reboot for the change to take effect. +\nIn case, reboot the system before selecting this menu option again. If you did so, please report this issue on our forum or GitHub page.' + return 1 + else + G_WHIP_YESNO '[ INFO ] Device tree overlay required +\nA kernel device tree overlay is required to access the SPI device on the Odroid N2. +\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+=('g12b-odroid-n2-spi') + G_CONFIG_INJECT 'overlays=' "overlays=${overlays[*]}" /boot/dietpiEnv.txt + REBOOT_REQUIRED=1 + return 0 + fi + + elif [[ $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.' + G_WHIP_MSG '[FAILED] No SPI device found +\nThe expected SPI 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. + G_WHIP_YESNO '[ INFO ] No SPI device found +\nThe expected SPI 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 SPI 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 elif [[ $spidev == '/dev/mtd0' ]] @@ -1111,21 +1133,17 @@ Further information: https://www.raspberrypi.org/documentation/hardware/raspberr \nThis will flash the U-Boot image of the installed linux-u-boot-* package to the SPI device /dev/mtd0. \nDo you want to continue?' || return 0 G_AG_CHECK_INSTALL_PREREQ mtd-utils - # shellcheck disable=SC1091 - . /usr/lib/u-boot/platform_install.sh - write_uboot_platform_mtd else 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 - # shellcheck disable=SC2154 - [[ -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 fi + # shellcheck disable=SC1091 + . /usr/lib/u-boot/platform_install.sh + eval "$(declare -f write_uboot_platform_mtd | sed -e 's| > /dev/null 2>&1||g' -e 's|status=none|status=progress|g' -e 's/^[[:blank:]]*dd /dd oflag=direct conv=notrunc status=progress/')" + write_uboot_platform_mtd "$DIR" + elif [[ $G_WHIP_RETURNED_VALUE == 'Update bootloader' ]]; then G_WHIP_YESNO '[ INFO ] SPI bootloader update From 0d55e5aa557498b64fca489f81a18857ad206e0a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 22 Jul 2024 22:17:56 +0200 Subject: [PATCH 354/458] v9.7 - DietPi-Config | Fix sed --- dietpi/dietpi-config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 881723848b..58a2389d3c 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -1141,7 +1141,7 @@ Further information: https://www.raspberrypi.org/documentation/hardware/raspberr # shellcheck disable=SC1091 . /usr/lib/u-boot/platform_install.sh - eval "$(declare -f write_uboot_platform_mtd | sed -e 's| > /dev/null 2>&1||g' -e 's|status=none|status=progress|g' -e 's/^[[:blank:]]*dd /dd oflag=direct conv=notrunc status=progress/')" + eval "$(declare -f write_uboot_platform_mtd | sed -e 's| > /dev/null 2>&1||g' -e 's|status=none|status=progress|g' -e 's/^[[:blank:]]*dd /dd oflag=direct conv=notrunc status=progress /')" write_uboot_platform_mtd "$DIR" elif [[ $G_WHIP_RETURNED_VALUE == 'Update bootloader' ]]; then From 933f86160bc5d399a16e3db9ac6d8815edd85e62 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 22 Jul 2024 22:42:46 +0200 Subject: [PATCH 355/458] v9.7 - DietPi-Config | Satisfy shellcheck --- dietpi/dietpi-config | 1 + 1 file changed, 1 insertion(+) diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 58a2389d3c..4cd93f9d2e 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -1142,6 +1142,7 @@ Further information: https://www.raspberrypi.org/documentation/hardware/raspberr # shellcheck disable=SC1091 . /usr/lib/u-boot/platform_install.sh eval "$(declare -f write_uboot_platform_mtd | sed -e 's| > /dev/null 2>&1||g' -e 's|status=none|status=progress|g' -e 's/^[[:blank:]]*dd /dd oflag=direct conv=notrunc status=progress /')" + # shellcheck disable=SC2154 write_uboot_platform_mtd "$DIR" elif [[ $G_WHIP_RETURNED_VALUE == 'Update bootloader' ]]; then From ad523f86093cabda132fc74445001ec24c8b0d87 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 22 Jul 2024 23:35:48 +0200 Subject: [PATCH 356/458] v9.7 - CI | Armbian: Fix U-Boot package name for obtaining version --- .github/workflows/armbian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index e654a48838..6e61a3e3e2 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -72,7 +72,7 @@ jobs: read -r version < VERSION case '${{ github.event.inputs.asset }}' in firmware) package='armbian-firmware';; - uboot) package='linux-uboot-${{ github.event.inputs.board }}-${{ github.event.inputs.branch }}';; + uboot) package='linux-u-boot-${{ github.event.inputs.board }}-${{ github.event.inputs.branch }}';; kernel) family=$(. 'config/boards/${{ github.event.inputs.board }}.'* &> /dev/null; echo "$BOARDFAMILY") echo "Board family is: $family" From 8eaefb4923f73647e21cc8b53aade8d489ef20a1 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 23 Jul 2024 00:06:02 +0200 Subject: [PATCH 357/458] v9.7 - CI | Armbian: Download much smaller dtb package to obtain kernel version suffix --- .github/workflows/armbian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index 6e61a3e3e2..e4fef8ee6d 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -78,7 +78,7 @@ jobs: echo "Board family is: $family" family=$(BRANCH='${{ github.event.inputs.branch }}'; . "config/sources/families/$family.conf" &> /dev/null; echo "$LINUXFAMILY") echo "Linux family is: $family" - package="linux-image-${{ github.event.inputs.branch }}-$family" + package="linux-dtb-${{ github.event.inputs.branch }}-$family" ;; *) echo 'ERROR: Invalid asset "${{ github.event.inputs.asset }}"'; exit 1;; esac From d294a99da73b2351944a7c499c3654ec4acbdb2d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 25 Jul 2024 20:31:55 +0200 Subject: [PATCH 358/458] v9.7 - DietPi-Software | Komga: Update fallback URL --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 6df8ae5a8d..145f999391 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -7472,7 +7472,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/1.11.1/komga-1.11.1.jar' + local fallback_url='https://github.com/gotson/komga/releases/download/1.11.2/komga-1.11.2.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 From b3afdf176442f36b13655e362bf09ff5cfcc8e6f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 25 Jul 2024 23:08:58 +0200 Subject: [PATCH 359/458] v9.7 - DietPi-Software | Ampache: Update fallback URL --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 145f999391..c3128758ce 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -7568,7 +7568,7 @@ _EOF_ local json=() [[ $PHP_VERSION == 8* ]] || aDEPS+=("php$PHP_VERSION-json") json=('json') - local fallback_url="https://github.com/ampache/ampache/releases/download/6.5.0/ampache-6.5.0_all_php$PHP_VERSION.zip" + local fallback_url="https://github.com/ampache/ampache/releases/download/6.6.0/ampache-6.6.0_all_php$PHP_VERSION.zip" Download_Install "$(curl -sSfL 'https://api.github.com/repos/ampache/ampache/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/ampache-[0-9\.]*_all_php$PHP_VERSION.zip\"$/{print \$4}")" ampache # Reinstall: Preserve configs from old and new paths From 8b4b74916b6c1cb92479f4d66ab06d36f89f0893 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 29 Jul 2024 22:40:07 +0200 Subject: [PATCH 360/458] v9.7 - DietPi-Software | Update fallback URLs --- dietpi/dietpi-software | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index c3128758ce..db765c2f8a 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -9364,7 +9364,7 @@ _EOF_ if (( ${PHP_VERSION::1} > 7 )) then aDEPS+=("php$PHP_VERSION-curl") - local fallback_url='https://github.com/koel/koel/releases/download/v7.0.8/koel-v7.0.8.tar.gz' aphp_deps=('curl' 'dom') + local fallback_url='https://github.com/koel/koel/releases/download/v7.0.9/koel-v7.0.9.tar.gz' aphp_deps=('curl' 'dom') Download_Install "$(curl -sSfL 'https://api.github.com/repos/koel/koel/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/koel-[^"\/]*\.tar\.gz"$/{print $4}')" else aDEPS+=("php$PHP_VERSION-json") @@ -9988,7 +9988,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.20.1.4603/Prowlarr.master.1.20.1.4603.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.21.2.4649/Prowlarr.master.1.21.2.4649.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Prowlarr/Prowlarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}")" G_EXEC mv Prowlarr /opt/prowlarr fi @@ -11690,7 +11690,7 @@ _EOF_ *) local arch='arm';; esac - local fallback_url="https://github.com/restic/restic/releases/download/v0.16.5/restic_0.16.5_linux_$arch.bz2" + local fallback_url="https://github.com/restic/restic/releases/download/v0.17.0/restic_0.17.0_linux_$arch.bz2" Download_Install "$(curl -sSfL 'https://api.github.com/repos/restic/restic/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/restic_[^\"\/]*_linux_$arch\.bz2\"$/{print \$4}")" /usr/local/bin/restic G_EXEC chmod +x /usr/local/bin/restic fi From e8dead0b62709d1d97a4dba32272557d6c68a592 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 1 Aug 2024 20:16:41 +0200 Subject: [PATCH 361/458] v9.7 - DietPi-Installer | Assure that the base-files package from Armbian base images is downgraded/replaced with the Debian package --- .build/images/dietpi-installer | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 335010fd1b..3d495c7a44 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1045,6 +1045,9 @@ setenv rootuuid "true"' /boot/boot.cmd # Remove obsolete lists find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -v {} + + # Armbian base images: Downgrade base-files package to the version provided by Debian + dpkg --compare-versions "$(dpkg-query -Wf '${Version}' base-files)" gt 20 && G_EXEC eval 'echo '\''APT::Get::Allow-Downgrades "1";'\'' > /etc/apt/apt.conf.d/dietpi-armbian' + # Select kernel, device tree and U-Boot packages local model='odroidn2' kernel='meson64' arch='arm64' branch='current' zstd=() case $G_HW_MODEL in From eb5fb6a131de2195a4919951481e2db8b484a0b8 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 1 Aug 2024 20:50:01 +0200 Subject: [PATCH 362/458] v9.7 - DietPi-Installer | Hard code device tree for NanoPi R6S as well. Somehow, first boot does not work without it, while reboots work without it, weird ... --- .build/images/dietpi-installer | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 3d495c7a44..d4f560fb51 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -688,7 +688,13 @@ setenv rootuuid "true"' /boot/boot.cmd 73) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3308-rock-pi-s.dtb' /boot/dietpiEnv.txt;; # U-Boot does not pass any ${fdtfile} 77) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3568-rock-3a.dtb' /boot/dietpiEnv.txt;; 78) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588-rock-5b.dtb' /boot/dietpiEnv.txt;; - 79) (( $HW_VARIANT == 2 )) && G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-nanopi-r6c.dtb' /boot/dietpiEnv.txt;; + 79) + case $HW_VARIANT in + 1) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-nanopi-r6s.dtb' /boot/dietpiEnv.txt;; + 2) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-nanopi-r6c.dtb' /boot/dietpiEnv.txt;; + *) :;; + esac + ;; 85) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-rock-5a.dtb' /boot/dietpiEnv.txt;; 87) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3566-orangepi-3b.dtb' /boot/dietpiEnv.txt;; *) :;; From 89848c1a71167e237d32c489f25eb333767f5ff4 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 1 Aug 2024 22:59:55 +0200 Subject: [PATCH 363/458] v9.7 - DietPi-Installer | Switch to "vendor" kernel (Linux 6.1) with all RK3588 boards --- .build/images/dietpi-installer | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index d4f560fb51..01ef989236 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1111,17 +1111,17 @@ setenv rootuuid "true"' /boot/boot.cmd *) model='nanopi-r5s';; esac;; 77) model='rock-3a' kernel='rockchip64';; - 78) model='rock-5b' kernel='rk35xx' branch='legacy';; - 79) kernel='rk35xx' branch='legacy' + 78) model='rock-5b' kernel='rk35xx' branch='vendor';; + 79) kernel='rk35xx' branch='vendor' case $HW_VARIANT in 2) model='nanopi-r6c';; 3) model='nanopct6';; *) model='nanopi-r6s';; esac;; - 80) model='orangepi5' kernel='rk35xx' branch='legacy';; - 82) model='orangepi5-plus' kernel='rk35xx' branch='legacy';; + 80) model='orangepi5' kernel='rk35xx' branch='vendor';; + 82) model='orangepi5-plus' kernel='rk35xx' branch='vendor';; 83) model='orangepizero3' kernel='sunxi64';; - 85) model='rock-5a' kernel='rk35xx' branch='legacy';; + 85) model='rock-5a' kernel='rk35xx' branch='vendor';; 86) model='tinkerboard-2' kernel='rockchip64';; 87) model='orangepi3b' kernel='rockchip64' branch='edge';; 88) model='orangepizero2w' kernel='sunxi64';; From a97c9494b3d4161155caed5b210150dd5b97906d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 8 Aug 2024 23:13:59 +0200 Subject: [PATCH 364/458] v9.7 - DietPi-Patches | Offer migration from Linux 5.10 legacy kernel to Linux 6.1 vendor kernel on RK3588 SBCs --- .update/patches | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/.update/patches b/.update/patches index de38652bcb..2a7d4d47b6 100755 --- a/.update/patches +++ b/.update/patches @@ -1741,6 +1741,45 @@ _EOF_ Patch_9_7() { + # RK3588 migration to vendor kernel + if (( $G_HW_CPUID == 11 )) && dpkg-query -s 'linux-image-legacy-rk35xx' &> /dev/null && ! dpkg-query -s 'linux-image-vendor-rk35xx' &> /dev/null + then + if G_WHIP_YESNO '[ INFO ] Major kernel upgrade to Linux 6.1 available +\nFor RK3588 SoC SBCs, we offer a major kernel upgrade to Linux 6.1, base on a new Rockchip kernel source which should provide not only new kernel features, but higher quality as well, compared to the old Rockchip Linux 5.10 legacy kernel. +\nHowever, while we are not aware of any left issues, it is still good to have a backup in place, and we do not enforce the upgrade. +\nDo you want to migrate to the new Linux 6.1 kernel now?' + then + G_AGI linux-{image,dtb}-vendor-rk35xx + dpkg-query -s 'linux-headers-legacy-rk35xx' &> /dev/null && G_AGI linux-headers-vendor-rk35xx + dpkg-query -s 'linux-libc-dev-legacy-rk35xx' &> /dev/null && G_AGI linux-libc-dev-vendor-rk35xx + G_AGP linux-{image,dtb,headers,libc-dev}-legacy-rk35xx + # The /boot/dtb symlink has been found to be missing after kernel removed, despite a newer kernel being installed already. Assure it is present and correct. + [[ $(realpath '/boot/dtb') == '/boot/dtb-6.1.'* ]] || G_EXEC ln -sf /boot/dtb-6.1.* /boot/dtb + # Migrate U-Boot as well + case $G_HW_MODEL in + 78) G_AGI linux-u-boot-rock-5b-vendor;; + 79) + if dpkg-query -s 'linux-u-boot-nanopi-r6s-legacy' &> /dev/null + then + G_AGI linux-u-boot-nanopi-r6s-vendor + + elif dpkg-query -s 'linux-u-boot-nanopi-r6c-legacy' &> /dev/null + then + G_AGI linux-u-boot-nanopi-r6c-vendor + + elif dpkg-query -s 'linux-u-boot-nanopct6-legacy' &> /dev/null + then + G_AGI linux-u-boot-nanopct6-vendor + fi + ;; + 80) G_AGI linux-u-boot-orangepi5-vendor;; + 82) G_AGI linux-u-boot-orangepi5-plus-vendor;; + 85) G_AGI linux-u-boot-rock-5a-vendor;; + *) :;; + esac + fi + fi + # Software updates, migrations and patches if [[ -f '/boot/dietpi/.installed' ]] then From 364a207c15d61e3ee1e3f533cc2f887da28fd049 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 8 Aug 2024 23:21:34 +0200 Subject: [PATCH 365/458] v9.7 - CHANGELOG | Add entry about RK3588 kernel upgrade --- .update/patches | 2 +- CHANGELOG.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.update/patches b/.update/patches index 2a7d4d47b6..ab3a4fda2a 100755 --- a/.update/patches +++ b/.update/patches @@ -1746,7 +1746,7 @@ Patch_9_7() then if G_WHIP_YESNO '[ INFO ] Major kernel upgrade to Linux 6.1 available \nFor RK3588 SoC SBCs, we offer a major kernel upgrade to Linux 6.1, base on a new Rockchip kernel source which should provide not only new kernel features, but higher quality as well, compared to the old Rockchip Linux 5.10 legacy kernel. -\nHowever, while we are not aware of any left issues, it is still good to have a backup in place, and we do not enforce the upgrade. +\nHowever, while we are not aware of any left issues, it is still good to have a backup in place, and we do not enforce the upgrade. You can do it any time later. \nDo you want to migrate to the new Linux 6.1 kernel now?' then G_AGI linux-{image,dtb}-vendor-rk35xx diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 457cbdf95b..c6a2ba23d0 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,6 +3,7 @@ v9.7 Enhancements: - Odroid N2 | Added an option to update (flash) the SPI bootloader to the dietpi-config "Advanced Options" menu. +- RK3588 SoCs | This DietPi update offers a migration from the legacy Linux 5.10 kernel to "vendor" Linux 6.1 kernel, from newer and cleaner Rockchip kernel sources. Aside of new kernel features, it provides cleaner higher quality code, so we generally recommend the upgrade. However, we do not enforce it, and it makes sense to have a backup in place, and you can do the migration any time later. Bug fixes: - DietPi-Software | Box86/Box64: Resolved an issue where the installation failed because of a false directory removal attempt. Many thanks to @lukaszsobala for fixing this issue: https://github.com/MichaIng/DietPi/pull/7149 From 5e6e6527a00d04ef961ec43dcee1a27c10ca456f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 8 Aug 2024 23:51:05 +0200 Subject: [PATCH 366/458] v9.7 - VisionFive 2 | Add workflow for mainline kernel build --- .../images/VisionFive2/visionfive2_defconfig | 410 ++++++++++++++++++ .github/workflows/visionfive2.yml | 84 ++++ 2 files changed, 494 insertions(+) create mode 100644 .build/images/VisionFive2/visionfive2_defconfig create mode 100644 .github/workflows/visionfive2.yml diff --git a/.build/images/VisionFive2/visionfive2_defconfig b/.build/images/VisionFive2/visionfive2_defconfig new file mode 100644 index 0000000000..04f2814efc --- /dev/null +++ b/.build/images/VisionFive2/visionfive2_defconfig @@ -0,0 +1,410 @@ +CONFIG_AIC8800_WLAN_SUPPORT=m +CONFIG_AIC_LOADFW_SUPPORT=m +CONFIG_AIC_WLAN_SUPPORT=y +CONFIG_AMBA_PL08X=y +CONFIG_ATA=y +CONFIG_AUTOFS_FS=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_BINFMT_MISC=y +CONFIG_BLK_DEV_DM=m +CONFIG_BLK_DEV_INITRD=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_NVME=y +CONFIG_BLK_DEV_SD=y +CONFIG_BLK_DEV_SR=y +CONFIG_BPF_JIT=y +CONFIG_BPF_SYSCALL=y +CONFIG_BT=m +CONFIG_BTRFS_FS=y +CONFIG_BTRFS_FS_POSIX_ACL=y +CONFIG_BT_BNEP=y +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HCIUART=y +CONFIG_BT_HCIUART_H4=y +CONFIG_BT_RFCOMM=y +CONFIG_BT_RFCOMM_TTY=y +CONFIG_CAN=y +CONFIG_CFG80211=m +CONFIG_CFS_BANDWIDTH=y +CONFIG_CGROUPS=y +CONFIG_CGROUP_BPF=y +CONFIG_CGROUP_SCHED=y +CONFIG_CHECKPOINT_RESTORE=y +CONFIG_CIFS=m +CONFIG_CIFS_DFS_UPCALL=y +CONFIG_CIFS_FSCACHE=y +CONFIG_CIFS_POSIX=y +CONFIG_CIFS_UPCALL=y +CONFIG_CIFS_XATTR=y +CONFIG_CLK_STARFIVE_JH7110_AON=y +CONFIG_CLK_STARFIVE_JH7110_ISP=y +CONFIG_CLK_STARFIVE_JH7110_STG=y +CONFIG_CLK_STARFIVE_JH7110_VOUT=y +CONFIG_CMA=y +CONFIG_COMPILE_TEST=y +CONFIG_CPUFREQ_DT=y +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_STAT=y +CONFIG_CPU_IDLE=y +CONFIG_CPU_THERMAL=y +CONFIG_CRYPTO_DEV_JH7110=y +CONFIG_CRYPTO_DEV_VIRTIO=n +CONFIG_CRYPTO_SHA1=y +CONFIG_CRYPTO_TEST=m +CONFIG_CRYPTO_USER=y +CONFIG_CRYPTO_USER_API_AEAD=y +CONFIG_CRYPTO_USER_API_HASH=y +CONFIG_CRYPTO_USER_API_RNG=y +CONFIG_CRYPTO_USER_API_SKCIPHER=y +CONFIG_CUSE=y +CONFIG_DEBUG_FS=y +CONFIG_DEBUG_LIST=y +CONFIG_DEBUG_PLIST=y +CONFIG_DEBUG_RT_MUTEXES=y +CONFIG_DEBUG_RWSEMS=y +CONFIG_DEBUG_SG=y +CONFIG_DEBUG_SPINLOCK=y +CONFIG_DEBUG_TIMEKEEPING=y +CONFIG_DEFAULT_HOSTNAME="DietPi" +CONFIG_DEVFREQ_THERMAL=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_DMADEVICES=y +CONFIG_DMATEST=y +CONFIG_DMA_CMA=y +CONFIG_DM_CRYPT=m +CONFIG_DRM_IMG_ROGUE=y +CONFIG_DRM_LEGACY=y +CONFIG_DRM_PANEL_SIMPLE=y +CONFIG_DRM_PANEL_STARFIVE_JADARD=y +CONFIG_DRM_TOSHIBA_TC358762=y +CONFIG_DRM_VERISILICON=y +CONFIG_DWMAC_DWC_QOS_ETH=y +CONFIG_DWMAC_STARFIVE=y +CONFIG_DW_AXI_DMAC=y +CONFIG_EEPROM_AT24=y +CONFIG_ENERGY_MODEL=y +CONFIG_EXFAT_FS=m +CONFIG_EXPERT=y +CONFIG_EXT4_FS=y +CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_EXT4_FS_SECURITY=y +CONFIG_F2FS_FS=y +CONFIG_FAT_DEFAULT_UTF8=y +CONFIG_FB=y +CONFIG_FSCACHE=y +CONFIG_FSCACHE_STATS=y +CONFIG_FUSE_FS=y +CONFIG_GOLDFISH=y +CONFIG_GPIO_SYSFS=y +CONFIG_HIBERNATION=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_HOSTAP=y +CONFIG_HUGETLBFS=y +CONFIG_HVC_RISCV_SBI=n +CONFIG_HW_RANDOM=y +CONFIG_HW_RANDOM_JH7110=y +CONFIG_HZ_100=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_DESIGNWARE_PLATFORM=y +CONFIG_IIO=y +CONFIG_IIO_ST_ACCEL_3AXIS=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_INIT_STACK_NONE=y +CONFIG_INPUT_EVDEV=y +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_IPMS_CAN=y +CONFIG_IPV6=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_NF_FILTER=y +CONFIG_IP_NF_IPTABLES=y +CONFIG_IP_NF_NAT=y +CONFIG_IP_NF_TARGET_MASQUERADE=y +CONFIG_IP_NF_TARGET_NETMAP=y +CONFIG_IP_NF_TARGET_REDIRECT=y +CONFIG_IP_NF_TARGET_REJECT=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_RARP=y +CONFIG_IWLDVM=y +CONFIG_IWLMVM=y +CONFIG_IWLWIFI=y +CONFIG_JFFS2_FS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEGACY_PTYS=n +CONFIG_MAC80211=m +CONFIG_MAILBOX=y +CONFIG_MARVELL_PHY=y +CONFIG_MD=y +CONFIG_MEDIA_SUPPORT=m +CONFIG_MEDIA_USB_SUPPORT=y +CONFIG_MEMTEST=y +CONFIG_MFD_AXP20X_I2C=y +CONFIG_MICREL_PHY=y +CONFIG_MICROCHIP_PHY=y +CONFIG_MMC=y +CONFIG_MMC_DEBUG=y +CONFIG_MMC_DW=y +CONFIG_MMC_DW_STARFIVE=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_OF_DWCMSHC=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHI=y +CONFIG_MMC_SPI=y +CONFIG_MODULES=y +CONFIG_MODULE_COMPRESS_XZ=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MOTORCOMM_PHY=y +CONFIG_MSDOS_FS=y +CONFIG_MTD=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_CFI=y +CONFIG_MTD_CFI_ADV_OPTIONS=y +CONFIG_MTD_SPI_NOR=y +CONFIG_NAMESPACES=y +CONFIG_NET=y +CONFIG_NETDEVICES=y +CONFIG_NETFILTER=y +CONFIG_NETFILTER_NETLINK_ACCT=y +CONFIG_NETFILTER_NETLINK_QUEUE=y +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y +CONFIG_NETFILTER_XT_MATCH_IPCOMP=y +CONFIG_NETFILTER_XT_MATCH_IPRANGE=y +CONFIG_NETFILTER_XT_MATCH_MAC=y +CONFIG_NETFILTER_XT_MATCH_MARK=y +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y +CONFIG_NETFILTER_XT_MATCH_SOCKET=y +CONFIG_NETFILTER_XT_MATCH_STATE=y +CONFIG_NETFILTER_XT_MATCH_STRING=y +CONFIG_NETFILTER_XT_MATCH_U32=y +CONFIG_NETLINK_DIAG=y +CONFIG_NET_9P=m +CONFIG_NET_9P_VIRTIO=n +CONFIG_NET_CLS_ACT=y +CONFIG_NET_CLS_BPF=m +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_INGRESS=m +CONFIG_NEW_LEDS=y +CONFIG_NFSD=m +CONFIG_NFSD_V4=y +CONFIG_NFS_FS=m +CONFIG_NFS_V4=y +CONFIG_NFS_V4_1=y +CONFIG_NFS_V4_2=y +CONFIG_NFT_COMPAT=y +CONFIG_NFT_CT=y +CONFIG_NFT_DUP_IPV4=m +CONFIG_NFT_DUP_IPV6=m +CONFIG_NFT_FIB_IPV4=m +CONFIG_NFT_FIB_IPV6=m +CONFIG_NF_CONNTRACK=y +CONFIG_NF_TABLES=y +CONFIG_NF_TABLES_IPV4=y +CONFIG_NF_TABLES_IPV6=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ISO8859_1=y +CONFIG_NONPORTABLE=y +CONFIG_NO_HZ_IDLE=y +CONFIG_NTFS_FS=m +CONFIG_NTFS_RW=y +CONFIG_OF_CONFIGFS=y +CONFIG_OVERLAY_FS=m +CONFIG_OVERLAY_FS_INDEX=y +CONFIG_OVERLAY_FS_METACOPY=y +CONFIG_OVERLAY_FS_XINO_AUTO=y +CONFIG_PACKET=y +CONFIG_PAGE_REPORTING=y +CONFIG_PCI=y +CONFIG_PCIE_STARFIVE_HOST=y +CONFIG_PERF_EVENTS=y +CONFIG_PHY_M31_DPHY_RX0=y +CONFIG_PHY_STARFIVE_JH7110_PCIE=y +CONFIG_PHY_STARFIVE_JH7110_USB=y +CONFIG_PM_ADVANCED_DEBUG=y +CONFIG_PM_DEBUG=y +CONFIG_PM_DEVFREQ=y +CONFIG_PM_STD_PARTITION="PARTLABEL=hibernation" +CONFIG_PM_TEST_SUSPEND=y +CONFIG_POSIX_MQUEUE=y +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_GPIO_RESTART=y +CONFIG_POWER_RESET_SYSCON=y +CONFIG_POWER_RESET_SYSCON_POWEROFF=y +CONFIG_PRINTK_TIME=y +CONFIG_PWM=y +CONFIG_PWM_OCORES=y +CONFIG_R8169=y +CONFIG_RAS=y +CONFIG_RCU_EQS_DEBUG=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_AXP20X=y +CONFIG_REGULATOR_GPIO=y +CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY=y +CONFIG_RISCV_SBI_CPUIDLE=y +CONFIG_ROOT_NFS=y +CONFIG_RPMSG_CHAR=y +CONFIG_RPMSG_VIRTIO=n +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_GOLDFISH=y +CONFIG_RTC_DRV_STARFIVE=y +CONFIG_SATA_AHCI=y +CONFIG_SCHEDSTATS=y +CONFIG_SCSI_VIRTIO=y +CONFIG_SENSORS_SFCTEMP=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_DW=y +CONFIG_SERIAL_8250_EXTENDED=y +CONFIG_SERIAL_8250_MANY_PORTS=y +CONFIG_SERIAL_8250_NR_UARTS=6 +CONFIG_SERIAL_8250_RUNTIME_UARTS=6 +CONFIG_SERIAL_OF_PLATFORM=y +CONFIG_SERIO_LIBPS2=y +CONFIG_SIFIVE_CCACHE=y +CONFIG_SMB_SERVER=m +CONFIG_SMP=y +CONFIG_SND=y +CONFIG_SND_DESIGNWARE_I2S=y +CONFIG_SND_SIMPLE_CARD=y +CONFIG_SND_SOC=y +CONFIG_SND_SOC_AC108=y +CONFIG_SND_SOC_JH7110_PWMDAC=y +CONFIG_SND_SOC_JH7110_TDM=y +CONFIG_SND_SOC_RZ=m +CONFIG_SND_SOC_STARFIVE=y +CONFIG_SND_SOC_WM8960=y +CONFIG_SND_USB_AUDIO=y +CONFIG_SOC_STARFIVE=y +CONFIG_SOFTLOCKUP_DETECTOR=y +CONFIG_SOUND=y +CONFIG_SPI=y +CONFIG_SPI_CADENCE_QUADSPI=y +CONFIG_SPI_PL022=y +CONFIG_SPI_SIFIVE=y +CONFIG_SPI_SPIDEV=y +CONFIG_STARFIVE_DSI=y +CONFIG_STARFIVE_INNO_HDMI=y +CONFIG_STARFIVE_MBOX=m +CONFIG_STARFIVE_MBOX_TEST=n +CONFIG_STMMAC_ETH=y +CONFIG_STMMAC_SELFTESTS=y +CONFIG_SYSVIPC=y +CONFIG_THERMAL=y +CONFIG_THERMAL_EMULATION=y +CONFIG_THERMAL_WRITABLE_TRIPS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_TOUCHSCREEN_GOODIX=m +CONFIG_TOUCHSCREEN_TINKER_FT5406=m +CONFIG_TTY_PRINTK=y +CONFIG_TUN=m +CONFIG_UHID=m +CONFIG_UNIX=y +CONFIG_USB=y +CONFIG_USB_CDNS3=y +CONFIG_USB_CDNS3_GADGET=y +CONFIG_USB_CDNS3_HOST=y +CONFIG_USB_CDNS3_STARFIVE=y +CONFIG_USB_CDNS_SUPPORT=y +CONFIG_USB_CONFIGFS=y +CONFIG_USB_CONFIGFS_ACM=y +CONFIG_USB_CONFIGFS_ECM=y +CONFIG_USB_CONFIGFS_ECM_SUBSET=y +CONFIG_USB_CONFIGFS_EEM=y +CONFIG_USB_CONFIGFS_F_FS=y +CONFIG_USB_CONFIGFS_MASS_STORAGE=y +CONFIG_USB_CONFIGFS_NCM=y +CONFIG_USB_CONFIGFS_OBEX=y +CONFIG_USB_CONFIGFS_RNDIS=y +CONFIG_USB_CONFIGFS_SERIAL=y +CONFIG_USB_GADGET=y +CONFIG_USB_OTG=y +CONFIG_USB_RENESAS_USBHS=y +CONFIG_USB_RENESAS_USBHS_UDC=m +CONFIG_USB_SERIAL=m +CONFIG_USB_SERIAL_AIRCABLE=m +CONFIG_USB_SERIAL_ARK3116=m +CONFIG_USB_SERIAL_BELKIN=m +CONFIG_USB_SERIAL_CH341=m +CONFIG_USB_SERIAL_CP210X=m +CONFIG_USB_SERIAL_CYBERJACK=m +CONFIG_USB_SERIAL_CYPRESS_M8=m +CONFIG_USB_SERIAL_DEBUG=m +CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m +CONFIG_USB_SERIAL_EDGEPORT=m +CONFIG_USB_SERIAL_EDGEPORT_TI=m +CONFIG_USB_SERIAL_EMPEG=m +CONFIG_USB_SERIAL_F81232=m +CONFIG_USB_SERIAL_FTDI_SIO=m +CONFIG_USB_SERIAL_GARMIN=m +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_IPAQ=m +CONFIG_USB_SERIAL_IPW=m +CONFIG_USB_SERIAL_IR=m +CONFIG_USB_SERIAL_IUU=m +CONFIG_USB_SERIAL_KEYSPAN=m +CONFIG_USB_SERIAL_KEYSPAN_PDA=m +CONFIG_USB_SERIAL_KLSI=m +CONFIG_USB_SERIAL_KOBIL_SCT=m +CONFIG_USB_SERIAL_MCT_U232=m +CONFIG_USB_SERIAL_METRO=m +CONFIG_USB_SERIAL_MOS7720=m +CONFIG_USB_SERIAL_MOS7840=m +CONFIG_USB_SERIAL_NAVMAN=m +CONFIG_USB_SERIAL_OMNINET=m +CONFIG_USB_SERIAL_OPTICON=m +CONFIG_USB_SERIAL_OTI6858=m +CONFIG_USB_SERIAL_PL2303=m +CONFIG_USB_SERIAL_QCAUX=m +CONFIG_USB_SERIAL_QUALCOMM=m +CONFIG_USB_SERIAL_SAFE=m +CONFIG_USB_SERIAL_SIERRAWIRELESS=m +CONFIG_USB_SERIAL_SPCP8X5=m +CONFIG_USB_SERIAL_SSU100=m +CONFIG_USB_SERIAL_SYMBOL=m +CONFIG_USB_SERIAL_TI=m +CONFIG_USB_SERIAL_VISOR=m +CONFIG_USB_SERIAL_WHITEHEAT=m +CONFIG_USB_SERIAL_WISHBONE=m +CONFIG_USB_SERIAL_XSENS_MT=m +CONFIG_USB_STORAGE=y +CONFIG_USB_UAS=y +CONFIG_USB_VIDEO_CLASS=y +CONFIG_USB_WIFI_ECR6600U=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USELIB=y +CONFIG_USER_NS=y +CONFIG_V4L_PLATFORM_DRIVERS=y +CONFIG_VFAT_FS=y +CONFIG_VIDEO_CADENCE_CSI2RX=y +CONFIG_VIDEO_IMX219=y +CONFIG_VIDEO_IMX708=m +CONFIG_VIDEO_STF_VIN=y +CONFIG_VIDEO_WAVE_VPU=m +CONFIG_VIN_SENSOR_IMX219=m +CONFIG_VIN_SENSOR_OV4689=m +CONFIG_VIRTIO_BLK=n +CONFIG_VIRTIO_CONSOLE=n +CONFIG_VIRTIO_FS=n +CONFIG_VIRTIO_NET=n +CONFIG_WATCHDOG=y +CONFIG_WATCHDOG_SYSFS=y +CONFIG_WERROR=n +CONFIG_WIREGUARD=m +CONFIG_WQ_WATCHDOG=y +CONFIG_ZRAM=m +CONFIG_ZRAM_DEF_COMP_ZSTD=y +CONFIG_ZSMALLOC=y +CONFIG_ZSWAP=y +CONFIG_ZSWAP_COMPRESSOR_DEFAULT_ZSTD=y \ No newline at end of file diff --git a/.github/workflows/visionfive2.yml b/.github/workflows/visionfive2.yml new file mode 100644 index 0000000000..d8cc16ae64 --- /dev/null +++ b/.github/workflows/visionfive2.yml @@ -0,0 +1,84 @@ +name: visionfive2 +on: workflow_dispatch +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +permissions: {} +jobs: + build: + # https://github.com/actions/runner-images + runs-on: ubuntu-24.04 + env: + CROSS_COMPILE: 'aarch64-linux-gnu-' + ARCH: 'arm64' + steps: + - uses: actions/setup-python@v5 + with: + python-version: '3.x' + check-latest: true + - name: Build init + run: | + { sudo apt-get -q update; sudo DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -qq install make gcc libc6-dev flex bison gcc-riscv64-linux-gnu bc libssl-dev; } & + { curl -fO 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/snapshot/linux-6.11-rc2.tar.gz'; tar xf linux-6.11-rc2.tar.gz; rm llinux-6.11-rc2.tar.gz; } & + wait + curl -sSfo linux-6.11-rc2/arch/riscv64/configs/visionfive2_defconfig "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/$GITHUB_REF_NAME/.build/images/VisionFive2/visionfive2_defconfig" & + rm -Rf linux-image-visionfive2 + mkdir -p linux-image-visionfive2/DEBIAN linux-image-visionfive2/boot/extlinux + wait + - name: Build Linux + run: | + cd linux-6.11-rc2 + make visionfive2_defconfig + make -j$(nproc) + cp arch/riscv64/boot/Image.gz ../linux-image-visionfive2/boot/vmlinuz + mv arch/riscv64/boot/dts/rockchip/rk3566-quartz64-a.dtb ../linux-image-visionfive2/boot/ + make modules_install INSTALL_MOD_PATH='../linux-image-visionfive2' + cd .. + rm linux-image-visionfive2/lib/modules/*/build + - name: Build package + run: | + version=$(mawk '/^VERSION =/{a=$3};/^PATCHLEVEL =/{b=$3};/^SUBLEVEL/{c=$3};END{print a"."b"."c}' linux-6.11-rc2/Makefile) + rm -R linux-6.11-rc2 + curl -sSfO 'https://dietpi.com/downloads/binaries/linux-image-visionfive2.deb' & + curl -sSfo linux-image-visionfive2/lib/firmware/brcm/brcmfmac43455-sdio.txt 'https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/brcm/brcmfmac43455-sdio.AW-CM256SM.txt' & + wait + cur_version=$(dpkg-deb -f linux-image-visionfive2.deb Version) + rm linux-image-visionfive2.deb + cur_suffix=${cur_version#*-dietpi} + echo "Current package version is: $cur_version" + echo "New kernel version is: $version" + [ "$version-dietpi$cur_suffix" = "$cur_version" ] && version="$version-dietpi$((cur_suffix+1))" || version="$version-dietpi1" + echo "New package version will be: $version" + cat << '_EOF_' > linux-image-visionfive2/boot/extlinux/extlinux.conf + label DietPi + linux /boot/vmlinuz + fdt /boot/rk3566-quartz64-a.dtb + append root=/dev/mmcblk0p1 rootfstype=ext4 rootwait earlycon=uart8250,mmio32,0xfe660000 console=ttyS2,1500000n8 console=tty1 consoleblank=0 net.ifnames=0 + _EOF_ + echo '/boot/extlinux/extlinux.conf' > linux-image-visionfive2/DEBIAN/conffiles + find linux-image-visionfive2 ! \( -path linux-image-visionfive2/DEBIAN -prune \) -type f -exec md5sum {} + | sed 's|linux-image-visionfive2/||' > linux-image-visionfive2/DEBIAN/md5sums + cat << _EOF_ > linux-image-visionfive2/DEBIAN/control + Package: linux-image-visionfive2 + Version: $version + Architecture: arm64 + Maintainer: MichaIng + Date: $(date -u '+%a, %d %b %Y %T %z') + Standards-Version: 4.6.2.0 + Installed-Size: $(du -sk 'linux-image-visionfive2' | mawk '{print $1}') + Section: kernel + Priority: optional + Description: Linux kernel and U-Boot bootloader for Quartz64 Model A + _EOF_ + sed --follow-symlinks -i "/^Installed-Size:/c\Installed-Size: $(du -sk 'linux-image-visionfive2' | mawk '{print $1}')" linux-image-visionfive2/DEBIAN/control + sudo chown -R root:root linux-image-visionfive2 + dpkg-deb -b -Zxz -z9 -Sextreme linux-image-visionfive2 + sudo rm -R linux-image-visionfive2 + - name: Upload + run: | + [ -d ~/.ssh ] || mkdir ~/.ssh + umask 377 + echo '${{ secrets.KNOWN_HOSTS }}' > ~/.ssh/known_hosts + echo '${{ secrets.SSH_KEY }}' > ~/.ssh/id_ed25519 + curl -T "flinux-image-visionfive2.deb" --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}all/' + curl 'https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE }}/purge_cache' -H 'Authorization: Bearer ${{ secrets.CF_TOKEN }}' -H 'Content-Type: application/json' \ + --data '{"files":["https://dietpi.com/downloads/binaries/testing/","https://dietpi.com/downloads/binaries/testing/linux-image-visionfive2.deb"]}' From d062a0dd73d8ede7fd8261b2061015bb64bfaff5 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 11 Aug 2024 23:31:03 +0200 Subject: [PATCH 367/458] v9.7 - DietPi-Software | Syncthing: Update fallback URL --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index db765c2f8a..92bfba1cda 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8952,7 +8952,7 @@ _EOF_ *) local arch='arm';; esac - local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.27.9/syncthing-linux-$arch-v1.27.9.tar.gz" + local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.27.10/syncthing-linux-$arch-v1.27.10.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/syncthing/syncthing/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/syncthing-linux-$arch-[^\"\/]*\.tar\.gz\"/{print \$4}")" G_EXEC mv syncthing-* /opt/syncthing fi From 6ea7f54d9c13e3234dee76c00fb381b607a25409 Mon Sep 17 00:00:00 2001 From: Roberto Kok Date: Tue, 13 Aug 2024 00:43:19 +0800 Subject: [PATCH 368/458] v9.7 (#7186) - DietPi-Banner | Add CPU load average option --- CHANGELOG.txt | 1 + dietpi/func/dietpi-banner | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index c6a2ba23d0..b18fd2beee 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,6 +4,7 @@ v9.7 Enhancements: - Odroid N2 | Added an option to update (flash) the SPI bootloader to the dietpi-config "Advanced Options" menu. - RK3588 SoCs | This DietPi update offers a migration from the legacy Linux 5.10 kernel to "vendor" Linux 6.1 kernel, from newer and cleaner Rockchip kernel sources. Aside of new kernel features, it provides cleaner higher quality code, so we generally recommend the upgrade. However, we do not enforce it, and it makes sense to have a backup in place, and you can do the migration any time later. +- DietPi-Banner | An option has been added to show the CPU load as common 1/5/15 minutes averages. Many thanks to @rkok for implementing this feature: https://github.com/MichaIng/DietPi/pull/7186 Bug fixes: - DietPi-Software | Box86/Box64: Resolved an issue where the installation failed because of a false directory removal attempt. Many thanks to @lukaszsobala for fixing this issue: https://github.com/MichaIng/DietPi/pull/7149 diff --git a/dietpi/func/dietpi-banner b/dietpi/func/dietpi-banner index c6b04d3b98..2fda70472d 100755 --- a/dietpi/func/dietpi-banner +++ b/dietpi/func/dietpi-banner @@ -61,14 +61,15 @@ 'Print credits' 'Let'\''s Encrypt cert status' 'RAM usage' + 'Load average' ) # Set defaults: Disable CPU temp by default in VMs if (( $G_HW_MODEL == 20 )) then - aENABLED=(1 0 0 0 0 1 0 1 0 0 0 1 1 0 0 1 0 0) + aENABLED=(1 0 0 0 0 1 0 1 0 0 0 1 1 0 0 1 0 0 0) else - aENABLED=(1 0 1 0 0 1 0 0 0 0 0 1 1 0 0 1 0 0) + aENABLED=(1 0 1 0 0 1 0 0 0 0 0 1 1 0 0 1 0 0 0) fi COLOUR_RESET='\e[0m' @@ -257,6 +258,8 @@ $GREEN_LINE" (( ${aENABLED[2]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[2]} $GREEN_SEPARATOR $(print_full_info=1 G_OBTAIN_CPU_TEMP 2>&1)" # RAM usage (( ${aENABLED[17]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[17]} $GREEN_SEPARATOR $(free -b | mawk 'NR==2 {CONVFMT="%.0f"; print $3/1024^2" of "$2/1024^2" MiB ("$3/$2*100"%)"}')" + # Load average + (( ${aENABLED[18]} == 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[18]} $GREEN_SEPARATOR $(mawk '{print $1 ", " $2 ", " $3}' /proc/loadavg) ($(nproc) cores)" # Hostname (( ${aENABLED[3]} == 1 && ${aENABLED[14]} != 1 )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[3]} $GREEN_SEPARATOR $( Date: Mon, 12 Aug 2024 21:16:04 +0200 Subject: [PATCH 369/458] v9.7 - CI | Add better workaround for QEMU ARMv6 containers detecting themselves as ARMv7. --- .build/images/dietpi-build | 8 +++++--- .build/software/Amiberry/container_build.bash | 2 +- .build/software/dietpi-software-build.bash | 2 +- .github/workflows/dietpi-software.bash | 3 ++- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 1490dc7f6a..0115ade9f0 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -4,6 +4,7 @@ ########################################## # Load DietPi-Globals ########################################## +Error_Exit(){ G_DIETPI-NOTIFY 1 "$1, aborting ..."; exit 1; } if [[ -f '/boot/dietpi/func/dietpi-globals' ]] then . /boot/dietpi/func/dietpi-globals @@ -612,7 +613,7 @@ _EOF_ G_CONFIG_INJECT 'AUTO_SETUP_AUTOSTART_TARGET_INDEX=' 'AUTO_SETUP_AUTOSTART_TARGET_INDEX=0' rootfs/boot/dietpi.txt # Force ARMv6 arch on Raspbian - (( $HW_ARCH == 1 )) && echo 'sed --follow-symlinks -i -e '\''/^G_HW_ARCH=/c\G_HW_ARCH=1'\'' -e '\''/^G_HW_ARCH_NAME=/c\G_HW_ARCH_NAME=armv6l'\'' /boot/dietpi/.hw_model' > rootfs/boot/Automation_Custom_PreScript.sh + (( $HW_ARCH > 1 )) || echo -e '#/bin/dash\n[ "$*" == -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Skip filesystem expansion G_EXEC rm rootfs/etc/systemd/system/local-fs.target.wants/dietpi-fs_partition_resize.service @@ -672,8 +673,6 @@ G_EXEC rm /etc/bashrc.d/00-dietpi-build.sh /boot/Automation_Custom_Script.sh poweroff } _EOF_ - (( $HW_ARCH == 1 )) && G_EXEC sed --follow-symlinks -i 's/Custom_Script/Custom_{Pre,}Script/' rootfs/boot/Automation_Custom_Script.sh - # Start container # - Bind mounts required to allow container reading its own drive info, /dev/disk for GRUB and probably other tools to detect UUIDs # - Skip for container images @@ -688,6 +687,9 @@ _EOF_ # Reset IPv4 network connectivity check setting G_CONFIG_INJECT 'CONFIG_CHECK_CONNECTION_IP=' 'CONFIG_CHECK_CONNECTION_IP=9.9.9.9' rootfs/boot/dietpi.txt + # Revert ARMv6 Workaround + (( $HW_ARCH == 1 )) && G_EXEC rm /usr/local/bin/uname + # Revert workaround for skipped autologin in emulated Trixie/Sid containers: https://gitlab.com/qemu-project/qemu/-/issues/1962 (( $DISTRO == 8 )) && G_EXEC rm rootfs/etc/systemd/system/{multi-user.target.wants/,}dietpi-automation.service diff --git a/.build/software/Amiberry/container_build.bash b/.build/software/Amiberry/container_build.bash index c2c8cd7d8e..e34aa33f9d 100755 --- a/.build/software/Amiberry/container_build.bash +++ b/.build/software/Amiberry/container_build.bash @@ -114,7 +114,7 @@ G_EXEC mkdir rootfs G_EXEC mount "${FP_LOOP}p1" rootfs # Enforce ARMv6 arch on Raspbian -(( $arch > 1 )) || echo 'sed --follow-symlinks -i -e '\''/^G_HW_ARCH=/c\G_HW_ARCH=1'\'' -e '\''/^G_HW_ARCH_NAME=/c\G_HW_ARCH_NAME=armv6l'\'' /boot/dietpi/.hw_model' > rootfs/boot/Automation_Custom_PreScript.sh || Error_Exit 'Failed to generate Automation_Custom_PreScript.sh' +(( $arch > 1 )) || echo -e '#/bin/dash\n[ "$*" == -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Enable automated setup G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt diff --git a/.build/software/dietpi-software-build.bash b/.build/software/dietpi-software-build.bash index 554c274e1f..146003a949 100644 --- a/.build/software/dietpi-software-build.bash +++ b/.build/software/dietpi-software-build.bash @@ -118,7 +118,7 @@ G_EXEC mkdir rootfs G_EXEC mount "${FP_LOOP}p1" rootfs # Enforce ARMv6 arch on Raspbian -(( $arch > 1 )) || echo 'sed --follow-symlinks -i -e '\''/^G_HW_ARCH=/c\G_HW_ARCH=1'\'' -e '\''/^G_HW_ARCH_NAME=/c\G_HW_ARCH_NAME=armv6l'\'' /boot/dietpi/.hw_model' > rootfs/boot/Automation_Custom_PreScript.sh || Error_Exit 'Failed to generate Automation_Custom_PreScript.sh' +(( $arch > 1 )) || echo -e '#/bin/dash\n[ "$*" == -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Enable automated setup G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index 7953fe9cc1..db0d2adfa5 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -4,6 +4,7 @@ ########################################## # Load DietPi-Globals ########################################## +Error_Exit(){ G_DIETPI-NOTIFY 1 "$1, aborting ..."; exit 1; } if [[ -f '/boot/dietpi/func/dietpi-globals' ]] then . /boot/dietpi/func/dietpi-globals @@ -318,7 +319,7 @@ G_EXEC mkdir rootfs G_EXEC mount "${FP_LOOP}p1" rootfs # Force ARMv6 arch on Raspbian -(( $arch == 1 )) && G_EXEC sed --follow-symlinks -i '/# Start DietPi-Software/iG_EXEC sed -i -e '\''/^G_HW_ARCH=/cG_HW_ARCH=1'\'' -e '\''/^G_HW_ARCH_NAME=/cG_HW_ARCH_NAME=armv6l'\'' /boot/dietpi/.hw_model' rootfs/boot/dietpi/dietpi-login +(( $HW_ARCH > 1 )) || echo -e '#/bin/dash\n[ "$*" == -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname || Error_Exit 'Failed to download DietPi-Globals' # Force RPi on ARM systems if requested if [[ $RPI == 'true' ]] && (( $arch < 10 )) From 90be1abc0b0e5390056ab51d2f915011d8f1810e Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 12 Aug 2024 21:26:27 +0200 Subject: [PATCH 370/458] v9.7 - CI | DietPi-Software test: Fix variable name --- .github/workflows/dietpi-software.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index db0d2adfa5..3754ab75f5 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -319,7 +319,7 @@ G_EXEC mkdir rootfs G_EXEC mount "${FP_LOOP}p1" rootfs # Force ARMv6 arch on Raspbian -(( $HW_ARCH > 1 )) || echo -e '#/bin/dash\n[ "$*" == -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname || Error_Exit 'Failed to download DietPi-Globals' +(( $arch > 1 )) || echo -e '#/bin/dash\n[ "$*" == -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname || Error_Exit 'Failed to download DietPi-Globals' # Force RPi on ARM systems if requested if [[ $RPI == 'true' ]] && (( $arch < 10 )) From ffe4fdab12e64f27fdad1297ead96174378b6de4 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 12 Aug 2024 23:42:29 +0200 Subject: [PATCH 371/458] v9.7 - CI | Fix ARMv6 uname workaround --- .build/images/dietpi-build | 4 ++-- .build/software/Amiberry/container_build.bash | 2 +- .build/software/dietpi-software-build.bash | 2 +- .github/workflows/dietpi-software.bash | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 0115ade9f0..831c7bedba 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -9,7 +9,7 @@ if [[ -f '/boot/dietpi/func/dietpi-globals' ]] then . /boot/dietpi/func/dietpi-globals else - curl -sSf "https://raw.githubusercontent.com/${G_GITOWNER:=MichaIng}/DietPi/${G_GITBRANCH:=master}/dietpi/func/dietpi-globals" -o /tmp/dietpi-globals || exit 1 + curl -sSf "https://raw.githubusercontent.com/${G_GITOWNER:=MichaIng}/DietPi/${G_GITBRANCH:=master}/dietpi/func/dietpi-globals" -o /tmp/dietpi-globals || Error_Exit 'Failed to download DietPi-Globals' # shellcheck disable=SC1091 . /tmp/dietpi-globals G_EXEC rm /tmp/dietpi-globals @@ -613,7 +613,7 @@ _EOF_ G_CONFIG_INJECT 'AUTO_SETUP_AUTOSTART_TARGET_INDEX=' 'AUTO_SETUP_AUTOSTART_TARGET_INDEX=0' rootfs/boot/dietpi.txt # Force ARMv6 arch on Raspbian - (( $HW_ARCH > 1 )) || echo -e '#/bin/dash\n[ "$*" == -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' + (( $HW_ARCH > 1 )) || echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Skip filesystem expansion G_EXEC rm rootfs/etc/systemd/system/local-fs.target.wants/dietpi-fs_partition_resize.service diff --git a/.build/software/Amiberry/container_build.bash b/.build/software/Amiberry/container_build.bash index e34aa33f9d..5410a6178f 100755 --- a/.build/software/Amiberry/container_build.bash +++ b/.build/software/Amiberry/container_build.bash @@ -114,7 +114,7 @@ G_EXEC mkdir rootfs G_EXEC mount "${FP_LOOP}p1" rootfs # Enforce ARMv6 arch on Raspbian -(( $arch > 1 )) || echo -e '#/bin/dash\n[ "$*" == -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' +(( $arch > 1 )) || echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Enable automated setup G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt diff --git a/.build/software/dietpi-software-build.bash b/.build/software/dietpi-software-build.bash index 146003a949..3586b35747 100644 --- a/.build/software/dietpi-software-build.bash +++ b/.build/software/dietpi-software-build.bash @@ -118,7 +118,7 @@ G_EXEC mkdir rootfs G_EXEC mount "${FP_LOOP}p1" rootfs # Enforce ARMv6 arch on Raspbian -(( $arch > 1 )) || echo -e '#/bin/dash\n[ "$*" == -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' +(( $arch > 1 )) || echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Enable automated setup G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index 3754ab75f5..0bf6d7e8f2 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -9,7 +9,7 @@ if [[ -f '/boot/dietpi/func/dietpi-globals' ]] then . /boot/dietpi/func/dietpi-globals else - curl -sSf "https://raw.githubusercontent.com/${G_GITOWNER:=MichaIng}/DietPi/${G_GITBRANCH:=master}/dietpi/func/dietpi-globals" -o /tmp/dietpi-globals || exit 1 + curl -sSf "https://raw.githubusercontent.com/${G_GITOWNER:=MichaIng}/DietPi/${G_GITBRANCH:=master}/dietpi/func/dietpi-globals" -o /tmp/dietpi-globals || Error_Exit 'Failed to download DietPi-Globals' # shellcheck disable=SC1091 . /tmp/dietpi-globals G_EXEC rm /tmp/dietpi-globals @@ -319,7 +319,7 @@ G_EXEC mkdir rootfs G_EXEC mount "${FP_LOOP}p1" rootfs # Force ARMv6 arch on Raspbian -(( $arch > 1 )) || echo -e '#/bin/dash\n[ "$*" == -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname || Error_Exit 'Failed to download DietPi-Globals' +(( $arch > 1 )) || echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Force RPi on ARM systems if requested if [[ $RPI == 'true' ]] && (( $arch < 10 )) From 581e22100a8c8629790c161b4e64809756bea80e Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 15 Aug 2024 20:12:22 +0200 Subject: [PATCH 372/458] v9.7 - CI | Satisfy shellcheck - DietPi-Patches | Migrate to vendor kernel with RK3588 in case of automated first run setup --- .build/images/dietpi-build | 1 + .build/software/Amiberry/container_build.bash | 1 + .build/software/dietpi-software-build.bash | 1 + .github/workflows/dietpi-software.bash | 1 + .update/patches | 4 ++-- 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 831c7bedba..e5ab892bd1 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -613,6 +613,7 @@ _EOF_ G_CONFIG_INJECT 'AUTO_SETUP_AUTOSTART_TARGET_INDEX=' 'AUTO_SETUP_AUTOSTART_TARGET_INDEX=0' rootfs/boot/dietpi.txt # Force ARMv6 arch on Raspbian + # shellcheck disable=SC2015 (( $HW_ARCH > 1 )) || echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Skip filesystem expansion diff --git a/.build/software/Amiberry/container_build.bash b/.build/software/Amiberry/container_build.bash index 5410a6178f..2a79a55f45 100755 --- a/.build/software/Amiberry/container_build.bash +++ b/.build/software/Amiberry/container_build.bash @@ -114,6 +114,7 @@ G_EXEC mkdir rootfs G_EXEC mount "${FP_LOOP}p1" rootfs # Enforce ARMv6 arch on Raspbian +# shellcheck disable=SC2015 (( $arch > 1 )) || echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Enable automated setup diff --git a/.build/software/dietpi-software-build.bash b/.build/software/dietpi-software-build.bash index 3586b35747..f51d261999 100644 --- a/.build/software/dietpi-software-build.bash +++ b/.build/software/dietpi-software-build.bash @@ -118,6 +118,7 @@ G_EXEC mkdir rootfs G_EXEC mount "${FP_LOOP}p1" rootfs # Enforce ARMv6 arch on Raspbian +# shellcheck disable=SC2015 (( $arch > 1 )) || echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Enable automated setup diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index 0bf6d7e8f2..f07b1034fa 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -319,6 +319,7 @@ G_EXEC mkdir rootfs G_EXEC mount "${FP_LOOP}p1" rootfs # Force ARMv6 arch on Raspbian +# shellcheck disable=SC2015 (( $arch > 1 )) || echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Force RPi on ARM systems if requested diff --git a/.update/patches b/.update/patches index ab3a4fda2a..9203d7762c 100755 --- a/.update/patches +++ b/.update/patches @@ -1690,7 +1690,7 @@ Patch_9_6() then HW_VARIANT=2 /boot/dietpi/func/dietpi-set_software apt-mirror dietpi G_AGUP - G_AGI linux-u-boot-nanopi-r6c-legacy + G_AGI linux-u-boot-nanopi-r6c-vendor # Odroid XU4/Meson: Install zstd for better compressed initramfs images elif dpkg-query -s 'linux-image-current-odroidxu4' &> /dev/null || dpkg-query -s 'linux-image-edge-odroidxu4' &> /dev/null || dpkg-query -s 'linux-image-current-meson' &> /dev/null || dpkg-query -s 'linux-image-edge-meson' &> /dev/null @@ -1744,7 +1744,7 @@ Patch_9_7() # RK3588 migration to vendor kernel if (( $G_HW_CPUID == 11 )) && dpkg-query -s 'linux-image-legacy-rk35xx' &> /dev/null && ! dpkg-query -s 'linux-image-vendor-rk35xx' &> /dev/null then - if G_WHIP_YESNO '[ INFO ] Major kernel upgrade to Linux 6.1 available + if G_WHIP_DEFAULT_ITEM='yes' G_WHIP_YESNO '[ INFO ] Major kernel upgrade to Linux 6.1 available \nFor RK3588 SoC SBCs, we offer a major kernel upgrade to Linux 6.1, base on a new Rockchip kernel source which should provide not only new kernel features, but higher quality as well, compared to the old Rockchip Linux 5.10 legacy kernel. \nHowever, while we are not aware of any left issues, it is still good to have a backup in place, and we do not enforce the upgrade. You can do it any time later. \nDo you want to migrate to the new Linux 6.1 kernel now?' From 0690eaf4a1cc5dafa2dc02fe112d84aa46359fea Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 15 Aug 2024 20:52:42 +0200 Subject: [PATCH 373/458] v9.7 - DietPi-Imager | Better detect last partition of root device: lsblk prints all partitions when given a drive as input, sorted. This avoids /dev/mmcblk0boot0 and alike to be mistakenly picked --- .build/images/dietpi-imager | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build/images/dietpi-imager b/.build/images/dietpi-imager index e4369281e0..b560be17d8 100755 --- a/.build/images/dietpi-imager +++ b/.build/images/dietpi-imager @@ -387,7 +387,7 @@ Run_fsck # Shrink last filesystem to minimum - local last_part_dev=$(lsblk -rnpo NAME "$FP_SOURCE"?* | tail -1) + local last_part_dev=$(lsblk -rnpo NAME "$FP_SOURCE" | tail -1) local last_fs_type=$(lsblk -no FSTYPE "$last_part_dev") if [[ $last_fs_type == 'ext4' ]] then From c63d5cfe1bf061892d7d993e4089ec29d193dd38 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 15 Aug 2024 22:24:28 +0200 Subject: [PATCH 374/458] v9.7 - DietPi-Patches | WIP: Migration for legacy R5S/R5C/6 series --- .update/patches | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/.update/patches b/.update/patches index 9203d7762c..55486da02b 100755 --- a/.update/patches +++ b/.update/patches @@ -1778,6 +1778,44 @@ Patch_9_7() *) :;; esac fi + + # NanoPi R5S/R6S migration from legacy image with 8 partitions to Armbian-based kernel and bootloader + elif [[ $G_HW_MODEL == 76 && $(dpkg-query -s 'firmware-nanopi5' &> /dev/null) ]] + then + case $( /dev/null) ]] + then + case $( Date: Thu, 15 Aug 2024 22:31:13 +0200 Subject: [PATCH 375/458] v9.7 - DietPi-Patches | Fix logic --- .update/patches | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.update/patches b/.update/patches index 55486da02b..e25c825515 100755 --- a/.update/patches +++ b/.update/patches @@ -1780,7 +1780,7 @@ Patch_9_7() fi # NanoPi R5S/R6S migration from legacy image with 8 partitions to Armbian-based kernel and bootloader - elif [[ $G_HW_MODEL == 76 && $(dpkg-query -s 'firmware-nanopi5' &> /dev/null) ]] + elif [[ $G_HW_MODEL == 76 ]] && dpkg-query -s 'firmware-nanopi5' &> /dev/null then case $( /dev/null) ]] + elif [[ $G_HW_MODEL == 79 ]] && dpkg-query -s 'firmware-nanopi6' &> /dev/null then case $( Date: Thu, 15 Aug 2024 22:36:21 +0200 Subject: [PATCH 376/458] v9.7 - DietPi-Patches | Fix HW_MODEL --- .update/patches | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.update/patches b/.update/patches index e25c825515..b25d0b88d7 100755 --- a/.update/patches +++ b/.update/patches @@ -1784,7 +1784,7 @@ Patch_9_7() then case $( Date: Thu, 15 Aug 2024 23:38:38 +0200 Subject: [PATCH 377/458] v9.7 - DietPi-Installer | Suppport Git branch names with forwards flashes - DietPi-Patches | Install kernel and bootloader scripts and configs for legacy image migrations --- .build/images/dietpi-installer | 43 +++++++++++++++--------------- .update/patches | 48 ++++++++++++++++++++++++++++++++-- 2 files changed, 68 insertions(+), 23 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 01ef989236..e955c2c4a6 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -588,10 +588,11 @@ _EOF_ #------------------------------------------------------------------------------------------------ G_EXEC_DESC='Downloading source code' G_EXEC curl -sSfLO "https://github.com/$G_GITOWNER/DietPi/archive/$G_GITBRANCH.tar.gz" - [[ -d DietPi-$G_GITBRANCH ]] && G_EXEC_DESC='Removing old source code' G_EXEC rm -R "DietPi-$G_GITBRANCH" - G_EXEC_DESC='Unpacking source code' G_EXEC tar xf "$G_GITBRANCH.tar.gz" - G_EXEC_DESC='Removing unused files' G_EXEC rm -f "$G_GITBRANCH.tar.gz" "DietPi-$G_GITBRANCH/dietpi/"{pre-patch_file,patch_file,server_version-6} - G_EXEC_DESC='Hardening source code mode' G_EXEC chmod -R g-w "DietPi-$G_GITBRANCH" + local dir="DietPi-${G_GITBRANCH//\//-}" # GitHub translates forward slashes into dashes + [[ -d $dir ]] && G_EXEC_DESC='Removing old source code' G_EXEC rm -R "$dir" + G_EXEC_DESC='Unpacking source code' G_EXEC tar xf "${G_GITBRANCH##*/}.tar.gz" # Support for Git branch names with forward slashes + G_EXEC_DESC='Removing unused files' G_EXEC rm -f "${G_GITBRANCH##*/}.tar.gz" "$dir/"{pre-patch_file,patch_file,server_version-6} + G_EXEC_DESC='Hardening update archive mode' G_EXEC chmod -R g-w "$dir" [[ -d '/boot' ]] || G_EXEC mkdir /boot @@ -605,9 +606,9 @@ _EOF_ then G_EXEC ln -sf firmware/cmdline.txt /boot/cmdline.txt G_EXEC ln -sf firmware/config.txt /boot/config.txt - G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/RPi/config.txt" /boot/firmware/ + G_EXEC mv "$dir/.build/images/RPi/config.txt" /boot/firmware/ else - G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/RPi/config.txt" /boot/ + G_EXEC mv "$dir/.build/images/RPi/config.txt" /boot/ fi echo "root=PARTUUID=$(findmnt -Ufnro PARTUUID -M /) rootfstype=$(findmnt -Ufnro FSTYPE -M /) rootwait net.ifnames=0 logo.nologo console=serial0,115200 console=tty1" > /boot/cmdline.txt # Boot in 64-bit mode if this is a 64-bit image @@ -618,26 +619,26 @@ _EOF_ armbian_packages=1 local model='OdroidC1' (( $G_HW_MODEL == 11 )) && model='OdroidXU4' - G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/$model/boot.ini" /boot/boot.ini + G_EXEC mv "$dir/.build/images/$model/boot.ini" /boot/boot.ini G_EXEC sed --follow-symlinks -i "s/root=[^[:blank:]]*/root=UUID=$(findmnt -Ufnro UUID -M /)/" /boot/boot.ini G_EXEC sed --follow-symlinks -i "s/rootfstype=[^[:blank:]]*/rootfstype=$(findmnt -Ufnro FSTYPE -M /)/" /boot/boot.ini G_EXEC mkdir -p /etc/kernel/post{inst,rm}.d /etc/initramfs/post-update.d - G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/dietpi-initramfs_cleanup" /etc/kernel/postinst.d/dietpi-initramfs_cleanup + G_EXEC mv "$dir/.build/images/U-Boot/dietpi-initramfs_cleanup" /etc/kernel/postinst.d/dietpi-initramfs_cleanup G_EXEC ln -sf /etc/kernel/post{inst,rm}.d/dietpi-initramfs_cleanup - G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/99-dietpi-uboot" /etc/initramfs/post-update.d/99-dietpi-uboot + G_EXEC mv "$dir/.build/images/U-Boot/99-dietpi-uboot" /etc/initramfs/post-update.d/99-dietpi-uboot G_EXEC sed --follow-symlinks -i 's/arm64/arm/' /etc/initramfs/post-update.d/99-dietpi-uboot elif [[ $G_HW_MODEL =~ ^(12|15|16|40|42|43|44|45|46|47|48|52|54|55|56|57|58|59|60|62|63|64|65|66|67|68|72|73|74|76|77|78|79|80|82|83|85|86|87|88|89|90)$ ]] then armbian_packages=1 - G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/boot.cmd" /boot/boot.cmd - G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/dietpiEnv.txt" /boot/dietpiEnv.txt + G_EXEC mv "$dir/.build/images/U-Boot/boot.cmd" /boot/boot.cmd + G_EXEC mv "$dir/.build/images/U-Boot/dietpiEnv.txt" /boot/dietpiEnv.txt G_CONFIG_INJECT 'rootdev=' "rootdev=UUID=$(findmnt -Ufnro UUID -M /)" /boot/dietpiEnv.txt G_CONFIG_INJECT 'rootfstype=' "rootfstype=$(findmnt -Ufnro FSTYPE -M /)" /boot/dietpiEnv.txt G_EXEC mkdir -p /etc/kernel/post{inst,rm}.d /etc/initramfs/post-update.d - G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/dietpi-initramfs_cleanup" /etc/kernel/postinst.d/dietpi-initramfs_cleanup + G_EXEC mv "$dir/.build/images/U-Boot/dietpi-initramfs_cleanup" /etc/kernel/postinst.d/dietpi-initramfs_cleanup G_EXEC ln -sf /etc/kernel/post{inst,rm}.d/dietpi-initramfs_cleanup - G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/99-dietpi-uboot" /etc/initramfs/post-update.d/99-dietpi-uboot + G_EXEC mv "$dir/.build/images/U-Boot/99-dietpi-uboot" /etc/initramfs/post-update.d/99-dietpi-uboot # Odroid C2: Fix USB device detection: https://github.com/MichaIng/DietPi/issues/5963 if (( $G_HW_MODEL == 12 )) then @@ -787,7 +788,7 @@ setenv rootuuid "true"' /boot/boot.cmd # NanoPi M3/T3/Fire3 (64-bit) elif (( $G_HW_MODEL == 62 )) then - G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/NanoPiM3/boot.cmd" /boot/boot.cmd + G_EXEC mv "$dir/.build/images/NanoPiM3/boot.cmd" /boot/boot.cmd G_EXEC sed --follow-symlinks -i '/overlay/d' /boot/dietpiEnv.txt G_EXEC sed --follow-symlinks -i 's/ttyAML0/ttySAC0/' /boot/dietpiEnv.txt fi @@ -796,20 +797,20 @@ setenv rootuuid "true"' /boot/boot.cmd # shellcheck disable=SC2016 [[ -f '/etc/initramfs/post-update.d/99-dietpi-uboot' && $(findmnt -t vfat -M /boot) ]] && G_EXEC sed --follow-symlinks -i '/^ln -s/c\mv -v "/boot/uInitrd-$1" /boot/uInitrd' /etc/initramfs/post-update.d/99-dietpi-uboot # FAT does not support symlinks - G_EXEC mv "DietPi-$G_GITBRANCH/dietpi.txt" /boot/ - G_EXEC mv "DietPi-$G_GITBRANCH/README.md" /boot/dietpi-README.md - G_EXEC mv "DietPi-$G_GITBRANCH/LICENSE" /boot/dietpi-LICENSE.txt + G_EXEC mv "$dir/dietpi.txt" /boot/ + G_EXEC mv "$dir/README.md" /boot/dietpi-README.md + G_EXEC mv "$dir/LICENSE" /boot/dietpi-LICENSE.txt # Reading version string for later use # shellcheck source=.update/version source=/boot/dietpi/.version - . "DietPi-$G_GITBRANCH/.update/version" + . "$dir/.update/version" G_DIETPI_VERSION_CORE=$G_REMOTE_VERSION_CORE G_DIETPI_VERSION_SUB=$G_REMOTE_VERSION_SUB G_DIETPI_VERSION_RC=$G_REMOTE_VERSION_RC - G_EXEC_DESC='Copy DietPi scripts to /boot/dietpi' G_EXEC cp -a "DietPi-$G_GITBRANCH/dietpi" /boot/ - G_EXEC_DESC='Copy DietPi system files in place' G_EXEC cp -a "DietPi-$G_GITBRANCH/rootfs/." / - G_EXEC_DESC='Clean download location' G_EXEC rm -R "DietPi-$G_GITBRANCH" + G_EXEC_DESC='Copy DietPi scripts to /boot/dietpi' G_EXEC cp -a "$dir/dietpi" /boot/ + G_EXEC_DESC='Copy DietPi system files in place' G_EXEC cp -a "$dir/rootfs/." / + G_EXEC_DESC='Clean download location' G_EXEC rm -R "$dir" G_DIETPI-NOTIFY 2 'Storing DietPi version info:' G_CONFIG_INJECT 'DEV_GITBRANCH=' "DEV_GITBRANCH=$G_GITBRANCH" /boot/dietpi.txt diff --git a/.update/patches b/.update/patches index b25d0b88d7..c851196c3c 100755 --- a/.update/patches +++ b/.update/patches @@ -1795,7 +1795,26 @@ Patch_9_7() \nHowever, while we are not aware of any left issues, it is still good to have a backup in place, and we do not enforce the upgrade. You can do it any time later. \nDo you want to migrate to the new Linux 6.1 kernel now?' then - : + # Packages + G_AGI armbian-firmware initramfs-tools u-boot-tools zstd + G_AGI linux-{image,dtb}-current-rockchip64 "linux-u-boot-$model-current" + # Install boot scripts and configs + local dir="DietPi-${G_GITBRANCH//\//-}" # GitHub translates forward slashes into dashes + G_EXEC mv "$dir/.build/images/U-Boot/boot.cmd" /boot/boot.cmd + G_EXEC mv "$dir/.build/images/U-Boot/dietpiEnv.txt" /boot/dietpiEnv.txt + G_CONFIG_INJECT 'rootdev=' "rootdev=UUID=$(findmnt -Ufnro UUID -M /)" /boot/dietpiEnv.txt + G_CONFIG_INJECT 'rootfstype=' "rootfstype=$(findmnt -Ufnro FSTYPE -M /)" /boot/dietpiEnv.txt + G_EXEC mkdir -p /etc/kernel/post{inst,rm}.d /etc/initramfs/post-update.d + G_EXEC mv "$dir/.build/images/U-Boot/dietpi-initramfs_cleanup" /etc/kernel/postinst.d/dietpi-initramfs_cleanup + G_EXEC ln -sf /etc/kernel/post{inst,rm}.d/dietpi-initramfs_cleanup + G_EXEC mv "$dir/.build/images/U-Boot/99-dietpi-uboot" /etc/initramfs/post-update.d/99-dietpi-uboot + G_EXEC sed --follow-symlinks -Ei '/^setenv (kernel|fdt)_addr_r/d' /boot/boot.cmd + G_CONFIG_INJECT 'setenv scriptaddr ' 'setenv scriptaddr "0x9000000"' /boot/boot.cmd + G_CONFIG_INJECT 'overlay_path=' 'overlay_path=rockchip' /boot/dietpiEnv.txt + # Overlay prefix + G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=rockchip' /boot/dietpiEnv.txt + # Console args + G_EXEC sed --follow-symlinks -i 's/ttyAML0,115200/ttyS2,1500000/' /boot/dietpiEnv.txt fi elif [[ $G_HW_MODEL == 79 ]] && dpkg-query -s 'firmware-nanopi6' &> /dev/null @@ -1814,7 +1833,32 @@ Patch_9_7() \nHowever, while we are not aware of any left issues, it is still good to have a backup in place, and we do not enforce the upgrade. You can do it any time later. \nDo you want to migrate to the new Linux 6.6 kernel now?' then - : + # Packages + G_AGI armbian-firmware initramfs-tools u-boot-tools zstd + G_AGI linux-{image,dtb}-vendor-rk35xx "linux-u-boot-$model-vendor" + # Install boot scripts and configs + local dir="DietPi-${G_GITBRANCH//\//-}" # GitHub translates forward slashes into dashes + G_EXEC mv "$dir/.build/images/U-Boot/boot.cmd" /boot/boot.cmd + G_EXEC mv "$dir/.build/images/U-Boot/dietpiEnv.txt" /boot/dietpiEnv.txt + G_CONFIG_INJECT 'rootdev=' "rootdev=UUID=$(findmnt -Ufnro UUID -M /)" /boot/dietpiEnv.txt + G_CONFIG_INJECT 'rootfstype=' "rootfstype=$(findmnt -Ufnro FSTYPE -M /)" /boot/dietpiEnv.txt + G_EXEC mkdir -p /etc/kernel/post{inst,rm}.d /etc/initramfs/post-update.d + G_EXEC mv "$dir/.build/images/U-Boot/dietpi-initramfs_cleanup" /etc/kernel/postinst.d/dietpi-initramfs_cleanup + G_EXEC ln -sf /etc/kernel/post{inst,rm}.d/dietpi-initramfs_cleanup + G_EXEC mv "$dir/.build/images/U-Boot/99-dietpi-uboot" /etc/initramfs/post-update.d/99-dietpi-uboot + G_EXEC sed --follow-symlinks -Ei '/^setenv (kernel|fdt)_addr_r/d' /boot/boot.cmd + G_CONFIG_INJECT 'setenv scriptaddr ' 'setenv scriptaddr "0x9000000"' /boot/boot.cmd + G_CONFIG_INJECT 'overlay_path=' 'overlay_path=rockchip' /boot/dietpiEnv.txt + # Device tree + case $model in + 'nanopi-r6s') G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-nanopi-r6s.dtb' /boot/dietpiEnv.txt;; + 'nanopi-r6c') G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-nanopi-r6c.dtb' /boot/dietpiEnv.txt;; + *) :;; + esac + # Overlay prefix + G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=rk3588' /boot/dietpiEnv.txt + # Console args + G_EXEC sed --follow-symlinks -i 's/ttyAML0,115200/ttyFIQ0,1500000/' /boot/dietpiEnv.txt fi fi From 026db6f1772f8a87ac910f3067b271b4e5061f67 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 15 Aug 2024 23:41:27 +0200 Subject: [PATCH 378/458] v9.7 - DietPi-Patches | Fix directories --- .update/patches | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.update/patches b/.update/patches index c851196c3c..959dc36079 100755 --- a/.update/patches +++ b/.update/patches @@ -1799,7 +1799,7 @@ Patch_9_7() G_AGI armbian-firmware initramfs-tools u-boot-tools zstd G_AGI linux-{image,dtb}-current-rockchip64 "linux-u-boot-$model-current" # Install boot scripts and configs - local dir="DietPi-${G_GITBRANCH//\//-}" # GitHub translates forward slashes into dashes + local dir="../DietPi-Update/DietPi-${G_GITBRANCH//\//-}" # GitHub translates forward slashes into dashes G_EXEC mv "$dir/.build/images/U-Boot/boot.cmd" /boot/boot.cmd G_EXEC mv "$dir/.build/images/U-Boot/dietpiEnv.txt" /boot/dietpiEnv.txt G_CONFIG_INJECT 'rootdev=' "rootdev=UUID=$(findmnt -Ufnro UUID -M /)" /boot/dietpiEnv.txt @@ -1837,7 +1837,7 @@ Patch_9_7() G_AGI armbian-firmware initramfs-tools u-boot-tools zstd G_AGI linux-{image,dtb}-vendor-rk35xx "linux-u-boot-$model-vendor" # Install boot scripts and configs - local dir="DietPi-${G_GITBRANCH//\//-}" # GitHub translates forward slashes into dashes + local dir="../DietPi-Update/DietPi-${G_GITBRANCH//\//-}" # GitHub translates forward slashes into dashes G_EXEC mv "$dir/.build/images/U-Boot/boot.cmd" /boot/boot.cmd G_EXEC mv "$dir/.build/images/U-Boot/dietpiEnv.txt" /boot/dietpiEnv.txt G_CONFIG_INJECT 'rootdev=' "rootdev=UUID=$(findmnt -Ufnro UUID -M /)" /boot/dietpiEnv.txt From 17b35a998c8e984245fe9a7dacf556996e726fea Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 16 Aug 2024 00:31:44 +0200 Subject: [PATCH 379/458] v9.7 - DietPi-Patches | Install packages after postinst scripts have been installed, avoid needless kernel and initramfs image symlinks in filesystem root, build boot script and flash bootloader --- .update/patches | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.update/patches b/.update/patches index 959dc36079..7c2d7d6851 100755 --- a/.update/patches +++ b/.update/patches @@ -1795,9 +1795,6 @@ Patch_9_7() \nHowever, while we are not aware of any left issues, it is still good to have a backup in place, and we do not enforce the upgrade. You can do it any time later. \nDo you want to migrate to the new Linux 6.1 kernel now?' then - # Packages - G_AGI armbian-firmware initramfs-tools u-boot-tools zstd - G_AGI linux-{image,dtb}-current-rockchip64 "linux-u-boot-$model-current" # Install boot scripts and configs local dir="../DietPi-Update/DietPi-${G_GITBRANCH//\//-}" # GitHub translates forward slashes into dashes G_EXEC mv "$dir/.build/images/U-Boot/boot.cmd" /boot/boot.cmd @@ -1815,6 +1812,14 @@ Patch_9_7() G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=rockchip' /boot/dietpiEnv.txt # Console args G_EXEC sed --follow-symlinks -i 's/ttyAML0,115200/ttyS2,1500000/' /boot/dietpiEnv.txt + # Packages + G_EXEC eval 'echo '\''do_symlinks=0'\'' > /etc/kernel-img.conf' + G_AGI armbian-firmware initramfs-tools u-boot-tools zstd + G_AGI linux-{image,dtb}-current-rockchip64 "linux-u-boot-$model-current" + # Build boot script + G_EXEC_OUTPUT=1 G_EXEC mkimage -C none -A arm64 -T script -d /boot/boot.cmd /boot/boot.scr + # Flash bootloader + /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc fi elif [[ $G_HW_MODEL == 79 ]] && dpkg-query -s 'firmware-nanopi6' &> /dev/null @@ -1833,9 +1838,6 @@ Patch_9_7() \nHowever, while we are not aware of any left issues, it is still good to have a backup in place, and we do not enforce the upgrade. You can do it any time later. \nDo you want to migrate to the new Linux 6.6 kernel now?' then - # Packages - G_AGI armbian-firmware initramfs-tools u-boot-tools zstd - G_AGI linux-{image,dtb}-vendor-rk35xx "linux-u-boot-$model-vendor" # Install boot scripts and configs local dir="../DietPi-Update/DietPi-${G_GITBRANCH//\//-}" # GitHub translates forward slashes into dashes G_EXEC mv "$dir/.build/images/U-Boot/boot.cmd" /boot/boot.cmd @@ -1859,6 +1861,14 @@ Patch_9_7() G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=rk3588' /boot/dietpiEnv.txt # Console args G_EXEC sed --follow-symlinks -i 's/ttyAML0,115200/ttyFIQ0,1500000/' /boot/dietpiEnv.txt + # Packages + G_EXEC eval 'echo '\''do_symlinks=0'\'' > /etc/kernel-img.conf' + G_AGI armbian-firmware initramfs-tools u-boot-tools zstd + G_AGI linux-{image,dtb}-vendor-rk35xx "linux-u-boot-$model-vendor" + # Build boot script + G_EXEC_OUTPUT=1 G_EXEC mkimage -C none -A arm64 -T script -d /boot/boot.cmd /boot/boot.scr + # Flash bootloader + /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc fi fi From 81b0a524c333a43256387fbdb3324468b0ec06c0 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 22 Aug 2024 02:12:57 +0200 Subject: [PATCH 380/458] v9.7 - DietPi-Patches | Fix kernel version info on NanoPi 5/6 migration, do some safety checks and do the sadly needed re-partitioning, to have the root partition at number 1. --- .update/patches | 43 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/.update/patches b/.update/patches index 7c2d7d6851..8f211100ce 100755 --- a/.update/patches +++ b/.update/patches @@ -1789,12 +1789,23 @@ Patch_9_7() esac G_AGUP if G_WHIP_DEFAULT_ITEM='yes' G_WHIP_YESNO '[ INFO ] Major kernel and bootloader upgrade available -\nFor the NanoPi R5S/R5C, we offer a major kernel upgrade to Linux 6.1, based on a new Rockchip kernel source which should provide not only new kernel features, but higher quality as well, compared to the old Rockchip Linux 5.10 legacy kernel. +\nFor the NanoPi R5S/R5C, we offer a major kernel upgrade to Linux 6.6, based on a new Rockchip kernel source which should provide not only new kernel features, but higher quality as well, compared to the old Rockchip Linux 5.10 legacy kernel. \nAdditionally, compared to the previously hidden kernel image and boot config on the first 7 partitions, the new image and configs will stored and available within the /boot partition, so that kernel command-line parameters can be adjusted. Also kernel headers are available to compile new kernel modules. \nThis implies flashing a new bootloader image, which reads boot scripts from the root partition. \nHowever, while we are not aware of any left issues, it is still good to have a backup in place, and we do not enforce the upgrade. You can do it any time later. -\nDo you want to migrate to the new Linux 6.1 kernel now?' +\nDo you want to migrate to the new Linux 6.6 kernel now?' then + # Safety checks + if [[ $G_ROOTFS_DEV != *'8' ]] + then + G_DIETPI-NOTIFY 1 "Root filesystem is not located on partition 8 as intended, but \"$G_ROOTFS_DEV\" instead. Aborting, please report at: https://github.com/MichaIng/DietPi/issues" + exit 1 + + elif [[ $(lsblk -no START "$G_ROOTFS_DEV") != 286720 ]] + then + G_DIETPI-NOTIFY 1 "Root partition does not start at sector 286720 as intended, but \"$(lsblk -no START "$G_ROOTFS_DEV")\" instead. Aborting, please report at: https://github.com/MichaIng/DietPi/issues" + exit 1 + fi # Install boot scripts and configs local dir="../DietPi-Update/DietPi-${G_GITBRANCH//\//-}" # GitHub translates forward slashes into dashes G_EXEC mv "$dir/.build/images/U-Boot/boot.cmd" /boot/boot.cmd @@ -1820,6 +1831,12 @@ Patch_9_7() G_EXEC_OUTPUT=1 G_EXEC mkimage -C none -A arm64 -T script -d /boot/boot.cmd /boot/boot.scr # Flash bootloader /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc + G_EXEC apt-mark auto firmware-nanopi5 + # Redo partitioning + G_DIETPI-NOTIFY 1 'Rewriting partition table to have root filesystem in partition 1' + local rootdrive=$(lsblk -npo PKNAME "$G_ROOTFS_DEV") + G_EXEC parted "$rootdrive" rm 1 rm 2 rm 3 rm 4 rm 5 rm 6 rm 7 rm 8 + G_EXEC_OUTPUT=1 G_EXEC sfdisk "$rootdrive" <<< '286720,+' # somehow needed, since above command and '286720,+' somehow create the partition 2015 sectors smaller, resulting in too large filesystem size. Only a subsequent ',+' expands it to the true end of the drive. fi elif [[ $G_HW_MODEL == 79 ]] && dpkg-query -s 'firmware-nanopi6' &> /dev/null @@ -1832,12 +1849,23 @@ Patch_9_7() esac G_AGUP if G_WHIP_DEFAULT_ITEM='yes' G_WHIP_YESNO '[ INFO ] Major kernel and bootloader upgrade available -\nFor the NanoPi 6 series, we offer a major kernel upgrade to Linux 6.6, based on mainline kernel sources which should provide not only new kernel features, but higher quality as well, compared to the old Rockchip Linux 5.10 legacy kernel. +\nFor the NanoPi 6 series, we offer a major kernel upgrade to Linux 6.1, based on mainline kernel sources which should provide not only new kernel features, but higher quality as well, compared to the old Rockchip Linux 5.10 legacy kernel. \nAdditionally, compared to the previously hidden kernel image and boot config on the first 7 partitions, the new image and configs will stored and available within the /boot partition, so that kernel command-line parameters can be adjusted. Also kernel headers are available to compile new kernel modules. \nThis implies flashing a new bootloader image, which reads boot scripts from the root partition. \nHowever, while we are not aware of any left issues, it is still good to have a backup in place, and we do not enforce the upgrade. You can do it any time later. -\nDo you want to migrate to the new Linux 6.6 kernel now?' +\nDo you want to migrate to the new Linux 6.1 kernel now?' then + # Safety checks + if [[ $G_ROOTFS_DEV != *'8' ]] + then + G_DIETPI-NOTIFY 1 "Root filesystem is not located on partition 8 as intended, but \"$G_ROOTFS_DEV\" instead. Aborting, please report at: https://github.com/MichaIng/DietPi/issues" + exit 1 + + elif [[ $(lsblk -no START "$G_ROOTFS_DEV") != 286720 ]] + then + G_DIETPI-NOTIFY 1 "Root partition does not start at sector 286720 as intended, but \"$(lsblk -no START "$G_ROOTFS_DEV")\" instead. Aborting, please report at: https://github.com/MichaIng/DietPi/issues" + exit 1 + fi # Install boot scripts and configs local dir="../DietPi-Update/DietPi-${G_GITBRANCH//\//-}" # GitHub translates forward slashes into dashes G_EXEC mv "$dir/.build/images/U-Boot/boot.cmd" /boot/boot.cmd @@ -1869,6 +1897,13 @@ Patch_9_7() G_EXEC_OUTPUT=1 G_EXEC mkimage -C none -A arm64 -T script -d /boot/boot.cmd /boot/boot.scr # Flash bootloader /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc + G_EXEC apt-mark auto firmware-nanopi6 + # Redo partitioning + G_DIETPI-NOTIFY 1 'Rewriting partition table to have root filesystem in partition 1' + local rootdrive=$(lsblk -npo PKNAME "$G_ROOTFS_DEV") + G_EXEC parted "$rootdrive" rm 1 rm 2 rm 3 rm 4 rm 5 rm 6 rm 7 rm 8 + G_EXEC_OUTPUT=1 G_EXEC sfdisk -N1 "$rootdrive" <<< '286720' + G_EXEC_OUTPUT=1 G_EXEC sfdisk -N1 "$rootdrive" <<< ',+' # somehow needed, since above command and '286720,+' somehow create the partition 2015 sectors smaller, resulting in too large filesystem size. Only a subsequent ',+' expands it to the true end of the drive. fi fi From c47fef4cb007abfce12421d5ad21d44b869db296 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 22 Aug 2024 03:24:55 +0200 Subject: [PATCH 381/458] v9.7 - DietPi-Patches | Switch to sfdisk for removing root partition, as it is nearly impossible to do this with parted non-interactively. Avoid sfdisk error, since the kernel cannot re-read the root partition table. --- .update/patches | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.update/patches b/.update/patches index 8f211100ce..3506f35a8b 100755 --- a/.update/patches +++ b/.update/patches @@ -1833,10 +1833,11 @@ Patch_9_7() /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc G_EXEC apt-mark auto firmware-nanopi5 # Redo partitioning - G_DIETPI-NOTIFY 1 'Rewriting partition table to have root filesystem in partition 1' + G_DIETPI-NOTIFY 2 'Rewriting partition table to have root filesystem in partition 1' local rootdrive=$(lsblk -npo PKNAME "$G_ROOTFS_DEV") - G_EXEC parted "$rootdrive" rm 1 rm 2 rm 3 rm 4 rm 5 rm 6 rm 7 rm 8 - G_EXEC_OUTPUT=1 G_EXEC sfdisk "$rootdrive" <<< '286720,+' # somehow needed, since above command and '286720,+' somehow create the partition 2015 sectors smaller, resulting in too large filesystem size. Only a subsequent ',+' expands it to the true end of the drive. + G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread --delete "$rootdrive" 1 2 3 4 5 6 7 8 + G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread -N1 "$rootdrive" <<< '286720' + G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread -N1 "$rootdrive" <<< ',+' # somehow needed, since above command and '286720,+' somehow create the partition 2015 sectors smaller, resulting in too large filesystem size. Only a subsequent ',+' expands it to the true end of the drive. fi elif [[ $G_HW_MODEL == 79 ]] && dpkg-query -s 'firmware-nanopi6' &> /dev/null @@ -1899,11 +1900,11 @@ Patch_9_7() /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc G_EXEC apt-mark auto firmware-nanopi6 # Redo partitioning - G_DIETPI-NOTIFY 1 'Rewriting partition table to have root filesystem in partition 1' + G_DIETPI-NOTIFY 2 'Rewriting partition table to have root filesystem in partition 1' local rootdrive=$(lsblk -npo PKNAME "$G_ROOTFS_DEV") - G_EXEC parted "$rootdrive" rm 1 rm 2 rm 3 rm 4 rm 5 rm 6 rm 7 rm 8 - G_EXEC_OUTPUT=1 G_EXEC sfdisk -N1 "$rootdrive" <<< '286720' - G_EXEC_OUTPUT=1 G_EXEC sfdisk -N1 "$rootdrive" <<< ',+' # somehow needed, since above command and '286720,+' somehow create the partition 2015 sectors smaller, resulting in too large filesystem size. Only a subsequent ',+' expands it to the true end of the drive. + G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread --delete "$rootdrive" 1 2 3 4 5 6 7 8 + G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread -N1 "$rootdrive" <<< '286720' + G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread -N1 "$rootdrive" <<< ',+' # somehow needed, since above command and '286720,+' somehow create the partition 2015 sectors smaller, resulting in too large filesystem size. Only a subsequent ',+' expands it to the true end of the drive. fi fi From 7ba254eea488992786a5d33a707982906368e987 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 22 Aug 2024 23:19:21 +0200 Subject: [PATCH 382/458] v9.7 - Odroid C1 | MIgrate to edge kernel - NanoPi R5S/R5C | Migrate changed LAN port in network config after kernel migration --- .build/images/dietpi-imager | 2 +- .build/images/dietpi-installer | 2 +- .update/patches | 32 +++++++++++++++++++++++++++++--- .update/version | 2 +- CHANGELOG.txt | 5 +++-- dietpi/func/dietpi-globals | 2 +- 6 files changed, 36 insertions(+), 9 deletions(-) diff --git a/.build/images/dietpi-imager b/.build/images/dietpi-imager index b560be17d8..7c5f21817e 100755 --- a/.build/images/dietpi-imager +++ b/.build/images/dietpi-imager @@ -753,7 +753,7 @@ _EOF_ # Move GPT backup partition table to end of drive if [[ $CLONING_TOOL != 'Clonezilla' && $PART_TABLE_TYPE == 'gpt' ]] then - G_EXEC_DESC='Moving GPT backup partition table to end of drive' G_EXEC_OUTPUT=1 G_EXEC sgdisk -e "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT" + G_EXEC_DESC='Re-creating GPT backup partition table and header at end of image' G_EXEC_OUTPUT=1 G_EXEC sgdisk -e "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT" G_EXEC sync fi diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index e955c2c4a6..a21b977c0d 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1058,7 +1058,7 @@ setenv rootuuid "true"' /boot/boot.cmd # Select kernel, device tree and U-Boot packages local model='odroidn2' kernel='meson64' arch='arm64' branch='current' zstd=() case $G_HW_MODEL in - 10) model='odroidc1' kernel='meson' arch='arm';; + 10) model='odroidc1' kernel='meson' arch='arm' branch='edge';; 11) model='odroidxu4' kernel='odroidxu4' arch='arm';; 12) model='odroidc2';; 16) model='odroidc4';; diff --git a/.update/patches b/.update/patches index 3506f35a8b..dc9de133b3 100755 --- a/.update/patches +++ b/.update/patches @@ -1741,8 +1741,19 @@ _EOF_ Patch_9_7() { + # Odroid C1: Migrate to edge kernel, which fixes USB: https://github.com/MichaIng/DietPi/issues/7089 + if (( $G_HW_MODEL == 10 )) && dpkg-query -s 'linux-image-current-meson' &> /dev/null && ! dpkg-query -s 'linux-image-edge-meson' &> /dev/null && ! dpkg-query -s 'linux-image-legacy-meson' &> /dev/null + then + G_DIETPI-NOTIFY 2 'Migrating to edge kernel to fix USB support' + G_AGI linux-{image,dtb}-edge-meson linux-u-boot-odroidc1-edge + dpkg-query -s 'linux-headers-edge-meson' &> /dev/null && G_AGI linux-headers-edge-meson + dpkg-query -s 'linux-libc-dev-edge-meson' &> /dev/null && G_AGI linux-libc-dev-edge-meson + G_AGP linux-{image,dtb,headers,libc-dev}-edge-meson + # The /boot/dtb symlink has been found to be missing after kernel removed, despite a newer kernel being installed already. Assure it is present and correct. + [[ $(realpath '/boot/dtb') == '/boot/dtb-6.'* ]] || G_EXEC ln -sf /boot/dtb-6.* /boot/dtb + # RK3588 migration to vendor kernel - if (( $G_HW_CPUID == 11 )) && dpkg-query -s 'linux-image-legacy-rk35xx' &> /dev/null && ! dpkg-query -s 'linux-image-vendor-rk35xx' &> /dev/null + elif (( $G_HW_CPUID == 11 )) && dpkg-query -s 'linux-image-legacy-rk35xx' &> /dev/null && ! dpkg-query -s 'linux-image-vendor-rk35xx' &> /dev/null then if G_WHIP_DEFAULT_ITEM='yes' G_WHIP_YESNO '[ INFO ] Major kernel upgrade to Linux 6.1 available \nFor RK3588 SoC SBCs, we offer a major kernel upgrade to Linux 6.1, base on a new Rockchip kernel source which should provide not only new kernel features, but higher quality as well, compared to the old Rockchip Linux 5.10 legacy kernel. @@ -1825,6 +1836,7 @@ Patch_9_7() G_EXEC sed --follow-symlinks -i 's/ttyAML0,115200/ttyS2,1500000/' /boot/dietpiEnv.txt # Packages G_EXEC eval 'echo '\''do_symlinks=0'\'' > /etc/kernel-img.conf' + G_AGP firmware-atheros firmware-iwlwifi # missing conflict in armbian-firmware package G_AGI armbian-firmware initramfs-tools u-boot-tools zstd G_AGI linux-{image,dtb}-current-rockchip64 "linux-u-boot-$model-current" # Build boot script @@ -1837,7 +1849,20 @@ Patch_9_7() local rootdrive=$(lsblk -npo PKNAME "$G_ROOTFS_DEV") G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread --delete "$rootdrive" 1 2 3 4 5 6 7 8 G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread -N1 "$rootdrive" <<< '286720' - G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread -N1 "$rootdrive" <<< ',+' # somehow needed, since above command and '286720,+' somehow create the partition 2015 sectors smaller, resulting in too large filesystem size. Only a subsequent ',+' expands it to the true end of the drive. + G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread -N1 "$rootdrive" <<< ',+' # Needed, since above command and '286720,+' somehow create the partition 2015 sectors smaller, resulting in too large filesystem size. Only a subsequent ',+' expands it to the true end of the drive. + # LAN interface migration + G_DIETPI-NOTIFY 2 'Migrating LAN interface configs' + case $( /dev/null @@ -1892,6 +1917,7 @@ Patch_9_7() G_EXEC sed --follow-symlinks -i 's/ttyAML0,115200/ttyFIQ0,1500000/' /boot/dietpiEnv.txt # Packages G_EXEC eval 'echo '\''do_symlinks=0'\'' > /etc/kernel-img.conf' + G_AGP firmware-atheros firmware-iwlwifi # missing conflict in armbian-firmware package G_AGI armbian-firmware initramfs-tools u-boot-tools zstd G_AGI linux-{image,dtb}-vendor-rk35xx "linux-u-boot-$model-vendor" # Build boot script @@ -1904,7 +1930,7 @@ Patch_9_7() local rootdrive=$(lsblk -npo PKNAME "$G_ROOTFS_DEV") G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread --delete "$rootdrive" 1 2 3 4 5 6 7 8 G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread -N1 "$rootdrive" <<< '286720' - G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread -N1 "$rootdrive" <<< ',+' # somehow needed, since above command and '286720,+' somehow create the partition 2015 sectors smaller, resulting in too large filesystem size. Only a subsequent ',+' expands it to the true end of the drive. + G_EXEC_OUTPUT=1 G_EXEC sfdisk --no-reread -N1 "$rootdrive" <<< ',+' # Needed, since above command and '286720,+' somehow create the partition 2015 sectors smaller, resulting in too large filesystem size. Only a subsequent ',+' expands it to the true end of the drive. fi fi diff --git a/.update/version b/.update/version index d49b5664fd..97cc67b238 100644 --- a/.update/version +++ b/.update/version @@ -3,7 +3,7 @@ # Available DietPi version G_REMOTE_VERSION_CORE=9 G_REMOTE_VERSION_SUB=7 -G_REMOTE_VERSION_RC=-1 +G_REMOTE_VERSION_RC=0 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=7 G_MIN_VERSION_SUB=0 diff --git a/CHANGELOG.txt b/CHANGELOG.txt index b18fd2beee..7a990af87b 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,9 +1,10 @@ v9.7 -(2024-08-03) +(2024-08-23) Enhancements: - Odroid N2 | Added an option to update (flash) the SPI bootloader to the dietpi-config "Advanced Options" menu. -- RK3588 SoCs | This DietPi update offers a migration from the legacy Linux 5.10 kernel to "vendor" Linux 6.1 kernel, from newer and cleaner Rockchip kernel sources. Aside of new kernel features, it provides cleaner higher quality code, so we generally recommend the upgrade. However, we do not enforce it, and it makes sense to have a backup in place, and you can do the migration any time later. +- Odroid C1 | This DietPi update performs a migration of all Odroid C1 systems to +- RK3588 SoCs | New RK3588 images will be shipped with Linux 6.1 from now on. This DietPi update offers a migration from the legacy Linux 5.10 kernel to this "vendor" Linux 6.1 kernel, from newer and cleaner Rockchip kernel sources. Aside of new kernel features, it provides cleaner higher quality code, so we generally recommend the upgrade. However, we do not enforce it, and it makes sense to have a backup in place, and you can do the migration any time later. Next DietPi update, unless there were serious issue reported with the migration, we will enforce it for everyone, to get all RK3588 systems up to a further supported and updated kernel source. - DietPi-Banner | An option has been added to show the CPU load as common 1/5/15 minutes averages. Many thanks to @rkok for implementing this feature: https://github.com/MichaIng/DietPi/pull/7186 Bug fixes: diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index ff61b9d38d..63d9afa93d 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -55,7 +55,7 @@ # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=9 [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=7 - [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=-1 + [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=0 [[ $G_GITBRANCH ]] || G_GITBRANCH='master' [[ $G_GITOWNER ]] || G_GITOWNER='MichaIng' # - Save current version and Git branch From 9373e2d4b11b20e99b2cdad585a7b80970920a36 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 23 Aug 2024 00:13:24 +0200 Subject: [PATCH 383/458] v9.7 - DietPi-Patches | Fix Ethernet port migration --- .update/patches | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/.update/patches b/.update/patches index dc9de133b3..925b41c759 100755 --- a/.update/patches +++ b/.update/patches @@ -1812,7 +1812,7 @@ Patch_9_7() G_DIETPI-NOTIFY 1 "Root filesystem is not located on partition 8 as intended, but \"$G_ROOTFS_DEV\" instead. Aborting, please report at: https://github.com/MichaIng/DietPi/issues" exit 1 - elif [[ $(lsblk -no START "$G_ROOTFS_DEV") != 286720 ]] + elif [[ $(partx -rgo START "$G_ROOTFS_DEV") != 286720 ]] then G_DIETPI-NOTIFY 1 "Root partition does not start at sector 286720 as intended, but \"$(lsblk -no START "$G_ROOTFS_DEV")\" instead. Aborting, please report at: https://github.com/MichaIng/DietPi/issues" exit 1 @@ -1853,15 +1853,16 @@ Patch_9_7() # LAN interface migration G_DIETPI-NOTIFY 2 'Migrating LAN interface configs' case $( Date: Fri, 23 Aug 2024 00:19:33 +0200 Subject: [PATCH 384/458] v9.7 - DietPi-Patches | Avoid shell warning for command substitution reading /proc node --- .update/patches | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.update/patches b/.update/patches index 925b41c759..002e2d995f 100755 --- a/.update/patches +++ b/.update/patches @@ -1793,7 +1793,9 @@ Patch_9_7() # NanoPi R5S/R6S migration from legacy image with 8 partitions to Armbian-based kernel and bootloader elif [[ $G_HW_MODEL == 76 ]] && dpkg-query -s 'firmware-nanopi5' &> /dev/null then - case $( /dev/null then - case $( Date: Fri, 23 Aug 2024 00:32:23 +0200 Subject: [PATCH 385/458] v9.7 - DietPi-Patches | Always follow symlink when using sed --- .update/patches | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.update/patches b/.update/patches index 002e2d995f..5cc61dc3ab 100755 --- a/.update/patches +++ b/.update/patches @@ -1862,9 +1862,9 @@ Patch_9_7() for i in /etc/network/interfaces{,.d/*} do [[ -f $i ]] || continue - G_EXEC sed -i -e "s/eth0/$eth0/g" -e "s/eth1/$eth1/g" "$i" - [[ $eth2 ]] && G_EXEC sed -i "s/eth2/$eth2/g" "$i" - G_EXEC sed -i 's/ethto/eth/g' "$i" + G_EXEC sed --follow-symlinks -i -e "s/eth0/$eth0/g" -e "s/eth1/$eth1/g" "$i" + [[ $eth2 ]] && G_EXEC sed --follow-symlinks -i "s/eth2/$eth2/g" "$i" + G_EXEC sed --follow-symlinks -i 's/ethto/eth/g' "$i" done fi @@ -1945,8 +1945,8 @@ Patch_9_7() [[ $eth0 == 'skip' ]] || for i in /etc/network/interfaces{,.d/*} do [[ -f $i ]] || continue - G_EXEC sed -i -e "s/eth1/$eth1/g" -e "s/eth2/$eth2/g" "$i" - G_EXEC sed -i 's/ethto/eth/g' "$i" + G_EXEC sed --follow-symlinks -i -e "s/eth1/$eth1/g" -e "s/eth2/$eth2/g" "$i" + G_EXEC sed --follow-symlinks -i 's/ethto/eth/g' "$i" done fi fi From 53c9fab46b13f6e81a4d2b832dddcc684431d782 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 23 Aug 2024 00:45:12 +0200 Subject: [PATCH 386/458] v9.7 - CHANGELOG | Complement Odroid C1 changelog entry --- CHANGELOG.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 7a990af87b..eb6185a694 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,7 +3,7 @@ v9.7 Enhancements: - Odroid N2 | Added an option to update (flash) the SPI bootloader to the dietpi-config "Advanced Options" menu. -- Odroid C1 | This DietPi update performs a migration of all Odroid C1 systems to +- Odroid C1 | This DietPi update performs a migration of all Odroid C1 systems which run in "current" branch Linux 6.6 to edge branch kernel with Linux 6.9 or later. This solves non-functional USB ports: https://github.com/MichaIng/DietPi/issues/7089 - RK3588 SoCs | New RK3588 images will be shipped with Linux 6.1 from now on. This DietPi update offers a migration from the legacy Linux 5.10 kernel to this "vendor" Linux 6.1 kernel, from newer and cleaner Rockchip kernel sources. Aside of new kernel features, it provides cleaner higher quality code, so we generally recommend the upgrade. However, we do not enforce it, and it makes sense to have a backup in place, and you can do the migration any time later. Next DietPi update, unless there were serious issue reported with the migration, we will enforce it for everyone, to get all RK3588 systems up to a further supported and updated kernel source. - DietPi-Banner | An option has been added to show the CPU load as common 1/5/15 minutes averages. Many thanks to @rkok for implementing this feature: https://github.com/MichaIng/DietPi/pull/7186 From 7dc19d2dd1679b23fa3b7b8554567e09ae8d8091 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 23 Aug 2024 00:54:13 +0200 Subject: [PATCH 387/458] v9.7 - CHANGELOG | Complement changelog entry --- CHANGELOG.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index eb6185a694..568e9bf944 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,7 +4,7 @@ v9.7 Enhancements: - Odroid N2 | Added an option to update (flash) the SPI bootloader to the dietpi-config "Advanced Options" menu. - Odroid C1 | This DietPi update performs a migration of all Odroid C1 systems which run in "current" branch Linux 6.6 to edge branch kernel with Linux 6.9 or later. This solves non-functional USB ports: https://github.com/MichaIng/DietPi/issues/7089 -- RK3588 SoCs | New RK3588 images will be shipped with Linux 6.1 from now on. This DietPi update offers a migration from the legacy Linux 5.10 kernel to this "vendor" Linux 6.1 kernel, from newer and cleaner Rockchip kernel sources. Aside of new kernel features, it provides cleaner higher quality code, so we generally recommend the upgrade. However, we do not enforce it, and it makes sense to have a backup in place, and you can do the migration any time later. Next DietPi update, unless there were serious issue reported with the migration, we will enforce it for everyone, to get all RK3588 systems up to a further supported and updated kernel source. +- NanoPi R5S/R5C/R6S/R6C/T6, Orange Pi 5/5 Plus, ROCK 5 | New RK3588 images will be shipped with Linux 6.1 from now on. This DietPi update offers a migration from the legacy Linux 5.10 kernel to this "vendor" Linux 6.1 kernel, from newer and cleaner Rockchip kernel sources. Old NanoPi R5S/R5C images with 8 partitions setup will be migrated to mainline Linux 6.6. Aside of new kernel features, it provides cleaner higher quality code, so we generally recommend the upgrade. However, we do not enforce it, and it makes sense to have a backup in place, and you can do the migration any time later. Next DietPi update, unless there were serious issue reported with the migration, we will enforce it for everyone, to get all RK3588 and NanoPi R5S/R5C systems up to a further supported and updated kernel source. - DietPi-Banner | An option has been added to show the CPU load as common 1/5/15 minutes averages. Many thanks to @rkok for implementing this feature: https://github.com/MichaIng/DietPi/pull/7186 Bug fixes: From f540d545355992f9b55799c80d4a5a2efd5b04d9 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 23 Aug 2024 01:01:29 +0200 Subject: [PATCH 388/458] v9.7 - DietPi-Installer | Do complete Armbian base-files downgrade, if required --- .build/images/dietpi-installer | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index a21b977c0d..fe7a3e7469 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1052,8 +1052,16 @@ setenv rootuuid "true"' /boot/boot.cmd # Remove obsolete lists find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -v {} + - # Armbian base images: Downgrade base-files package to the version provided by Debian - dpkg --compare-versions "$(dpkg-query -Wf '${Version}' base-files)" gt 20 && G_EXEC eval 'echo '\''APT::Get::Allow-Downgrades "1";'\'' > /etc/apt/apt.conf.d/dietpi-armbian' + if dpkg --compare-versions "$(dpkg-query -Wf '${Version}' base-files)" gt 20 + then + G_DIETPI-NOTIFY 2 'Enforcing downgrade of Armbian'\''s base-files package to Debian'\''s' + cat << '_EOF_' > /etc/apt/preferences.d/dietpi-armbian-tmp +Package: base-files +Pin: release o=Debian +Pin-Priority: 1000 +_EOF_ + G_EXEC eval 'echo '\''APT::Get::Allow-Downgrades "1";'\'' > /etc/apt/apt.conf.d/dietpi-armbian' + fi # Select kernel, device tree and U-Boot packages local model='odroidn2' kernel='meson64' arch='arm64' branch='current' zstd=() From a9112c24f4ce59434f0c5df16359787d5ffbfaa0 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 23 Aug 2024 23:42:41 +0200 Subject: [PATCH 389/458] v9.7 - RC up - CHANGELOG | Fix typo and add release PR URL --- .update/version | 2 +- CHANGELOG.txt | 4 ++-- dietpi/func/dietpi-globals | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.update/version b/.update/version index 97cc67b238..a8977da8a1 100644 --- a/.update/version +++ b/.update/version @@ -3,7 +3,7 @@ # Available DietPi version G_REMOTE_VERSION_CORE=9 G_REMOTE_VERSION_SUB=7 -G_REMOTE_VERSION_RC=0 +G_REMOTE_VERSION_RC=1 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=7 G_MIN_VERSION_SUB=0 diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 568e9bf944..18d6657709 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -9,10 +9,10 @@ Enhancements: Bug fixes: - DietPi-Software | Box86/Box64: Resolved an issue where the installation failed because of a false directory removal attempt. Many thanks to @lukaszsobala for fixing this issue: https://github.com/MichaIng/DietPi/pull/7149 -- DietPi-Software | Bazarr: Resolved an issue where service stops and restarts were hanging until timeout, leading also to hanging system shutdowns and restarts. Many thansk to @clarky000 and @blablazzz for reporting this issue, and @gregordinary for pointing us to the solution: https://dietpi.com/forum/t/19610 +- DietPi-Software | Bazarr: Resolved an issue where service stops and restarts were hanging until timeout, leading also to hanging system shutdowns and restarts. Many thanks to @clarky000 and @blablazzz for reporting this issue, and @gregordinary for pointing us to the solution: https://dietpi.com/forum/t/19610 - DietPi-Software | WiFi Hotspot: Resolved an issue where the hotspot failed because of an unintended character in the interface configuration. Many thanks to @wimduk for reporting this issue: https://dietpi.com/forum/t/20744 -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/7193 ----------------------------------------------------------------------------------------------------------- diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 63d9afa93d..6e88809437 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -55,7 +55,7 @@ # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=9 [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=7 - [[ $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 From 393f77e22d8259d45f0150a12d6fabd090345d27 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 26 Aug 2024 00:14:26 +0200 Subject: [PATCH 390/458] v9.7 - DietPi-Build | Fix uname path on container host --- .build/images/dietpi-build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index e5ab892bd1..3f15a16e7e 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -689,7 +689,7 @@ _EOF_ G_CONFIG_INJECT 'CONFIG_CHECK_CONNECTION_IP=' 'CONFIG_CHECK_CONNECTION_IP=9.9.9.9' rootfs/boot/dietpi.txt # Revert ARMv6 Workaround - (( $HW_ARCH == 1 )) && G_EXEC rm /usr/local/bin/uname + (( $HW_ARCH == 1 )) && G_EXEC rm rootfs/usr/local/bin/uname # Revert workaround for skipped autologin in emulated Trixie/Sid containers: https://gitlab.com/qemu-project/qemu/-/issues/1962 (( $DISTRO == 8 )) && G_EXEC rm rootfs/etc/systemd/system/{multi-user.target.wants/,}dietpi-automation.service From 387706aa53a585e5191c57f296d920e17baa9f97 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 26 Aug 2024 00:19:02 +0200 Subject: [PATCH 391/458] v9.7 - DietPi-Installer | Do remove again directories from /etc/apt/sources.list.d. No directory has any reason to be within it. --- .build/images/dietpi-installer | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index fe7a3e7469..f60c82ddf2 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1050,7 +1050,7 @@ setenv rootuuid "true"' /boot/boot.cmd [[ -f '/etc/apt/trusted.gpg~' ]] && G_EXEC rm '/etc/apt/trusted.gpg~' # Remove obsolete lists - find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -v {} + + find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -Rv {} + if dpkg --compare-versions "$(dpkg-query -Wf '${Version}' base-files)" gt 20 then @@ -1410,7 +1410,7 @@ _EOF_ [[ -f '/etc/apt/trusted.gpg~' ]] && G_EXEC rm '/etc/apt/trusted.gpg~' # Remove obsolete components from Armbian list and connect via HTTPS - find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -v {} + + find /etc/apt/sources.list.d -mindepth 1 ! -name 'dietpi.list' -exec rm -Rv {} + G_EXEC eval "echo 'deb https://apt.armbian.com ${DISTRO_TARGET_NAME/bullseye/bookworm} main' > /etc/apt/sources.list.d/dietpi-armbian.list" # Skip creating kernel symlinks and remove existing ones From d9690d6ea13d2592c828a3884511a739116ce6b2 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 26 Aug 2024 00:42:51 +0200 Subject: [PATCH 392/458] v9.7 - DietPi-Software | Update fallback URL and revert Snapcast back to direct DEB package downloads, which are available again with latest release --- dietpi/dietpi-software | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 92bfba1cda..2dfedd3ed7 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6522,7 +6522,7 @@ _EOF_ esac # Download - local fallback_url="https://github.com/fatedier/frp/releases/download/v0.59.0/frp_0.59.0_linux_$arch.tar.gz" + local fallback_url="https://github.com/fatedier/frp/releases/download/v0.60.0/frp_0.60.0_linux_$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/fatedier/frp/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/frp_[0-9.]*_linux_$arch\.tar\.gz\"/{print \$4}")" G_EXEC cd frp_* @@ -7057,7 +7057,7 @@ _EOF_ aDEPS=() else local version=$(curl -sSfL 'https://api.github.com/repos/FreshRSS/FreshRSS/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}') - [[ $version ]] || { version='1.24.1'; G_DIETPI-NOTIFY 1 "Automatic latest FreshRSS version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } + [[ $version ]] || { version='1.24.2'; G_DIETPI-NOTIFY 1 "Automatic latest FreshRSS version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } Download_Install "https://github.com/FreshRSS/FreshRSS/archive/$version.tar.gz" G_EXEC mv "FreshRSS-$version" /opt/FreshRSS fi @@ -9364,7 +9364,7 @@ _EOF_ if (( ${PHP_VERSION::1} > 7 )) then aDEPS+=("php$PHP_VERSION-curl") - local fallback_url='https://github.com/koel/koel/releases/download/v7.0.9/koel-v7.0.9.tar.gz' aphp_deps=('curl' 'dom') + local fallback_url='https://github.com/koel/koel/releases/download/v7.0.10/koel-v7.0.10.tar.gz' aphp_deps=('curl' 'dom') Download_Install "$(curl -sSfL 'https://api.github.com/repos/koel/koel/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/koel-[^"\/]*\.tar\.gz"$/{print $4}')" else aDEPS+=("php$PHP_VERSION-json") @@ -9546,7 +9546,7 @@ _EOF_ esac url=$(curl -sSfL 'https://api.github.com/repos/Radarr/Radarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}") - local fallback_url="https://github.com/Radarr/Radarr/releases/download/v5.8.3.8933/Radarr.master.5.8.3.8933.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Radarr/Radarr/releases/download/v5.9.1.9070/Radarr.master.5.9.1.9070.linux-core-$arch.tar.gz" fi Download_Install "$url" @@ -9988,7 +9988,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.21.2.4649/Prowlarr.master.1.21.2.4649.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.22.0.4670/Prowlarr.master.1.22.0.4670.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Prowlarr/Prowlarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}")" G_EXEC mv Prowlarr /opt/prowlarr fi @@ -11592,7 +11592,7 @@ _EOF_ G_AGI snapserver # Install and enable snapweb web UI, not included in Debian's snapserver package: https://github.com/MichaIng/DietPi/issues/7073 - local fallback_url='https://github.com/badaix/snapweb/releases/download/v0.7.0/snapweb_0.7.0-1_all.deb' + local fallback_url='https://github.com/badaix/snapweb/releases/download/v0.8.0/snapweb_0.8.0-1_all.deb' Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapweb/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/snapweb_[^"\/]*_all.deb"/{print $4}')" G_CONFIG_INJECT 'doc_root[[:blank:]=]' 'doc_root = /usr/share/snapweb' /etc/snapserver.conf '\[http\]' @@ -11601,10 +11601,8 @@ _EOF_ getent passwd snapserver > /dev/null && G_EXEC userdel snapserver else local arch=$(dpkg --print-architecture) dist=${G_DISTRO_NAME/trixie/bookworm} - local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.28.0/snapcast_0.28.0_$arch-debian-$dist.zip" - Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapcast_[^\"\/]*_$arch-debian-$dist.zip\"/{print \$4}")" - G_AGI ./snapserver_*_"$arch.deb" - G_EXEC rm snap*.deb + local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.29.0/snapserver_0.29.0-1_${arch}_$dist.deb" + Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapserver_[^\"\/]*_${arch}_$dist.deb\"/{print \$4}")" # Fix /var/lib/snapserver permissions, just in case Debian's package was previously used, which uses the "_snapserver" user, instead of "snapserver" [[ -d '/var/lib/snapserver' ]] && G_EXEC chown -R 'snapserver:snapserver' /var/lib/snapserver @@ -11624,10 +11622,8 @@ _EOF_ G_AGI snapclient else local arch=$(dpkg --print-architecture) dist=${G_DISTRO_NAME/trixie/bookworm} - local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.28.0/snapcast_0.28.0_$arch-debian-$dist.zip" - Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapcast_[^\"\/]*_$arch-debian-$dist.zip\"/{print \$4}")" - G_AGI ./snapclient_*_without-pulse_"$arch.deb" - G_EXEC rm snap*.deb + local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.29.0/snapclient_0.29.0-1_${arch}_$dist.deb" + Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapclient_[^\"\/]*_${arch}_$dist.deb\"/{print \$4}")" fi G_EXEC systemctl stop snapclient From 260905e2436dbdc71aaa62138115920f52b7b342 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 26 Aug 2024 01:13:49 +0200 Subject: [PATCH 393/458] v9.7 - CI | Fix logic --- .build/images/dietpi-build | 2 +- .build/software/Amiberry/container_build.bash | 2 +- .build/software/dietpi-software-build.bash | 2 +- .github/workflows/dietpi-software.bash | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 3f15a16e7e..fb08611d90 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -614,7 +614,7 @@ _EOF_ # Force ARMv6 arch on Raspbian # shellcheck disable=SC2015 - (( $HW_ARCH > 1 )) || echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' + (( $HW_ARCH > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Skip filesystem expansion G_EXEC rm rootfs/etc/systemd/system/local-fs.target.wants/dietpi-fs_partition_resize.service diff --git a/.build/software/Amiberry/container_build.bash b/.build/software/Amiberry/container_build.bash index 2a79a55f45..92d7f0e222 100755 --- a/.build/software/Amiberry/container_build.bash +++ b/.build/software/Amiberry/container_build.bash @@ -115,7 +115,7 @@ G_EXEC mount "${FP_LOOP}p1" rootfs # Enforce ARMv6 arch on Raspbian # shellcheck disable=SC2015 -(( $arch > 1 )) || echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' +(( $arch > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Enable automated setup G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt diff --git a/.build/software/dietpi-software-build.bash b/.build/software/dietpi-software-build.bash index f51d261999..906e79a3da 100644 --- a/.build/software/dietpi-software-build.bash +++ b/.build/software/dietpi-software-build.bash @@ -119,7 +119,7 @@ G_EXEC mount "${FP_LOOP}p1" rootfs # Enforce ARMv6 arch on Raspbian # shellcheck disable=SC2015 -(( $arch > 1 )) || echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' +(( $arch > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Enable automated setup G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index f07b1034fa..96d5b46c79 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -320,7 +320,7 @@ G_EXEC mount "${FP_LOOP}p1" rootfs # Force ARMv6 arch on Raspbian # shellcheck disable=SC2015 -(( $arch > 1 )) || echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' +(( $arch > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Force RPi on ARM systems if requested if [[ $RPI == 'true' ]] && (( $arch < 10 )) From aa8e2d9753daddecf4b0ffa73e229267530c7354 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 26 Aug 2024 01:29:49 +0200 Subject: [PATCH 394/458] v9.7 - DietPi-Software | Snapcast: Fix install on Trixie, which has conflicting dependencies with the Bookworm package. Install from Debian repo, just like for RISC-V (which is Trixie/Sid anyway) --- dietpi/dietpi-software | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 2dfedd3ed7..099d46dd4b 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -11586,8 +11586,8 @@ _EOF_ if To_Install 191 snapserver # Snapcast Server then - # RISC-V: Install from Debian repo: https://github.com/badaix/snapcast/releases - if (( $G_HW_ARCH == 11 )) + # RISC-V/Trixie: Install from Debian repo: https://github.com/badaix/snapcast/releases + if (( $G_DISTRO > 7 )) then G_AGI snapserver @@ -11600,9 +11600,9 @@ _EOF_ [[ -d '/var/lib/snapserver' ]] && G_EXEC chown -R '_snapserver:_snapserver' /var/lib/snapserver getent passwd snapserver > /dev/null && G_EXEC userdel snapserver else - local arch=$(dpkg --print-architecture) dist=${G_DISTRO_NAME/trixie/bookworm} - local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.29.0/snapserver_0.29.0-1_${arch}_$dist.deb" - Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapserver_[^\"\/]*_${arch}_$dist.deb\"/{print \$4}")" + local arch=$(dpkg --print-architecture) + local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.29.0/snapserver_0.29.0-1_${arch}_$G_DISTRO_NAME.deb" + 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}")" # Fix /var/lib/snapserver permissions, just in case Debian's package was previously used, which uses the "_snapserver" user, instead of "snapserver" [[ -d '/var/lib/snapserver' ]] && G_EXEC chown -R 'snapserver:snapserver' /var/lib/snapserver @@ -11616,14 +11616,14 @@ _EOF_ if To_Install 192 snapclient # Snapcast Client then - # RISC-V: Install from Debian repo: https://github.com/badaix/snapcast/releases - if (( $G_HW_ARCH == 11 )) + # RISC-V/Trixie: Install from Debian repo: https://github.com/badaix/snapcast/releases + if (( $G_DISTRO > 7 )) then G_AGI snapclient else - local arch=$(dpkg --print-architecture) dist=${G_DISTRO_NAME/trixie/bookworm} - local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.29.0/snapclient_0.29.0-1_${arch}_$dist.deb" - Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapclient_[^\"\/]*_${arch}_$dist.deb\"/{print \$4}")" + local arch=$(dpkg --print-architecture) + local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.29.0/snapclient_0.29.0-1_${arch}_$G_DISTRO_NAME.deb" + 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}")" fi G_EXEC systemctl stop snapclient From fe82d8a69eea699a68596cd77c06e35a965994ed Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 26 Aug 2024 02:24:01 +0200 Subject: [PATCH 395/458] v9.7 - CHANGELOG | Fix release date --- CHANGELOG.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 18d6657709..4c7b199195 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,5 @@ v9.7 -(2024-08-23) +(2024-08-25) Enhancements: - Odroid N2 | Added an option to update (flash) the SPI bootloader to the dietpi-config "Advanced Options" menu. From 40050a2f223efe602c9983b5223f651275d822ef Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 26 Aug 2024 23:27:23 +0200 Subject: [PATCH 396/458] v9.8 - DietPi-Software | NoMachine: Resolved an issue where the installation failed due to an outdated download URL. Many thanks to @tzvi208 for reporting this issue: https://github.com/MichaIng/DietPi/issues/7198 --- CHANGELOG.txt | 12 ++++++++++++ dietpi/dietpi-software | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 4c7b199195..1e10bb210d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,15 @@ +v9.8 +(2024-09-XX) + +Enhancements: + +Bug fixes: +- DietPi-Software | NoMachine: Resolved an issue where the installation failed due to an outdated download URL. Many thanks to @tzvi208 for reporting this issue: https://github.com/MichaIng/DietPi/issues/7198 + +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 + +----------------------------------------------------------------------------------------------------------- + v9.7 (2024-08-25) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 099d46dd4b..e7be946a59 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3258,12 +3258,12 @@ _EOF_ if To_Install 30 # NoMachine then - local version='8.11.3_3' # https://downloads.nomachine.com/ + local version='8.13.1_1' # https://downloads.nomachine.com/ case $G_HW_ARCH in 1) local url="Raspberry/nomachine_${version}_armv6hf";; 2) local url="Arm/nomachine_${version}_armhf";; 3) local url="Arm/nomachine_${version}_arm64";; - *) version='8.11.3_4'; local url="Linux/nomachine_${version}_amd64";; + *) local url="Linux/nomachine_${version}_amd64";; esac Download_Install "https://download.nomachine.com/download/${version%.*}/$url.deb" aSTART_SERVICES+=('nxserver') From 371e958f94d7367d07b5e216dbe75e22eb351154 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 27 Aug 2024 19:13:29 +0200 Subject: [PATCH 397/458] v9.7 - DietPi-Patches | Remove missing /boot/dtb symlink handlling for Odroid C1, where /boot is always a FAT partition. --- .update/patches | 2 -- 1 file changed, 2 deletions(-) diff --git a/.update/patches b/.update/patches index 5cc61dc3ab..3ce8066a49 100755 --- a/.update/patches +++ b/.update/patches @@ -1749,8 +1749,6 @@ Patch_9_7() dpkg-query -s 'linux-headers-edge-meson' &> /dev/null && G_AGI linux-headers-edge-meson dpkg-query -s 'linux-libc-dev-edge-meson' &> /dev/null && G_AGI linux-libc-dev-edge-meson G_AGP linux-{image,dtb,headers,libc-dev}-edge-meson - # The /boot/dtb symlink has been found to be missing after kernel removed, despite a newer kernel being installed already. Assure it is present and correct. - [[ $(realpath '/boot/dtb') == '/boot/dtb-6.'* ]] || G_EXEC ln -sf /boot/dtb-6.* /boot/dtb # RK3588 migration to vendor kernel elif (( $G_HW_CPUID == 11 )) && dpkg-query -s 'linux-image-legacy-rk35xx' &> /dev/null && ! dpkg-query -s 'linux-image-vendor-rk35xx' &> /dev/null From 31d6a097af7e9861485c0407a72a3192ff727fd5 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 27 Aug 2024 19:49:47 +0200 Subject: [PATCH 398/458] v9.7 - DietPi-Patches | Purge correct kernel branch on Odroid C1 --- .update/patches | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.update/patches b/.update/patches index 3ce8066a49..422e8fd6e2 100755 --- a/.update/patches +++ b/.update/patches @@ -1748,7 +1748,7 @@ Patch_9_7() G_AGI linux-{image,dtb}-edge-meson linux-u-boot-odroidc1-edge dpkg-query -s 'linux-headers-edge-meson' &> /dev/null && G_AGI linux-headers-edge-meson dpkg-query -s 'linux-libc-dev-edge-meson' &> /dev/null && G_AGI linux-libc-dev-edge-meson - G_AGP linux-{image,dtb,headers,libc-dev}-edge-meson + G_AGP linux-{image,dtb,headers,libc-dev}-current-meson # RK3588 migration to vendor kernel elif (( $G_HW_CPUID == 11 )) && dpkg-query -s 'linux-image-legacy-rk35xx' &> /dev/null && ! dpkg-query -s 'linux-image-vendor-rk35xx' &> /dev/null From 7cdb2638408e495850f39b43a36f82a4fa162b40 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 28 Aug 2024 22:39:00 +0200 Subject: [PATCH 399/458] v9.8 - CI | Raise size for new RPi images --- .build/images/dietpi-build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index fb08611d90..b10383386f 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -92,8 +92,8 @@ case $HW_MODEL in 0) iname='RPi' HW_ARCH=${HW_ARCH:-1} boot_size=128 root_size=895;; 1) iname='RPi1' HW_ARCH=1 boot_size=128 root_size=895;; 2) iname='RPi2' HW_ARCH=2 boot_size=128 root_size=895;; - 4) iname='RPi234' HW_ARCH=3 boot_size=128 root_size=895;; - 5) iname='RPi5' HW_ARCH=3 boot_size=128 root_size=895;; + 4) iname='RPi234' HW_ARCH=3 boot_size=128 root_size=1000;; + 5) iname='RPi5' HW_ARCH=3 boot_size=128 root_size=1000;; 10) iname='OdroidC1' HW_ARCH=2 partition_start=4 boot_size=128 root_size=700 boot_fstype='fat16';; 11) iname='OdroidXU4' HW_ARCH=2 partition_start=4 root_size=800;; 12) iname='OdroidC2' HW_ARCH=3 partition_start=4 root_size=1148;; From a398cfc16200712387d11d640e1293f163666722 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 30 Aug 2024 22:49:33 +0200 Subject: [PATCH 400/458] v9.8 - NanoPi M3/T3 | Resolved an issue where our recent image did not boot because the bootloader did not define a default device tree path anymore. Many thanks to @rozcietrzewiacz for reporting this issue: https://github.com/MichaIng/DietPi/issues/2630#issuecomment-2322085507 --- .build/images/dietpi-installer | 5 +++++ CHANGELOG.txt | 1 + 2 files changed, 6 insertions(+) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index f60c82ddf2..21055faaff 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -791,6 +791,11 @@ setenv rootuuid "true"' /boot/boot.cmd G_EXEC mv "$dir/.build/images/NanoPiM3/boot.cmd" /boot/boot.cmd G_EXEC sed --follow-symlinks -i '/overlay/d' /boot/dietpiEnv.txt G_EXEC sed --follow-symlinks -i 's/ttyAML0/ttySAC0/' /boot/dietpiEnv.txt + # Device tree + case $HW_VARIANT in + 2) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=s5p6818-nanopi-fire3.dtb' /boot/dietpiEnv.txt;; + *) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=s5p6818-nanopi-m3.dtb' /boot/dietpiEnv.txt;; + esac fi fi diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 1e10bb210d..f2c373f916 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,6 +4,7 @@ v9.8 Enhancements: Bug fixes: +- NanoPi M3/T3 | Resolved an issue where our recent image did not boot because the bootloader did not define a default device tree path anymore. Many thanks to @rozcietrzewiacz for reporting this issue: https://github.com/MichaIng/DietPi/issues/2630#issuecomment-2322085507 - DietPi-Software | NoMachine: Resolved an issue where the installation failed due to an outdated download URL. Many thanks to @tzvi208 for reporting this issue: https://github.com/MichaIng/DietPi/issues/7198 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 From a01ce3abb49520170aa17b2b521214b182bb9bb3 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 1 Sep 2024 17:17:14 +0200 Subject: [PATCH 401/458] v9.8 - META | DietPi-Survey_report: Work around current bug in bash's printf function. Use mawk for now: https://bugs.debian.org/1078556 --- .meta/dietpi-survey_report | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index 0c4e7c5a02..2b7870e730 100755 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -791,7 +791,7 @@ shopt -s extglob eval "software=\${aSOFTWARE_NAME${version/./_}[$software]}" if [[ ! $software ]] then - echo "Invalid software ID for DietPi version $version" + echo "Invalid software ID \"$software\" for DietPi version $version" mv -v "/home/dietpi-survey/survey/$file" /home/dietpi-survey/invalid/ return 1 fi @@ -1005,9 +1005,12 @@ shopt -s extglob # Work out averages # - Divide CPU times by 100 and scale to revert decimal point removal - aBENCH_RESULT_CPU_MIN[i]=$(printf '%.2f' "${aBENCH_RESULT_CPU_MIN[i]}e-2") - aBENCH_RESULT_CPU_MAX[i]=$(printf '%.2f' "${aBENCH_RESULT_CPU_MAX[i]}e-2") - aBENCH_RESULT_CPU_AVG[i]=$(printf '%.2f' "$((${aBENCH_RESULT_CPU_AVG[i]}*10/${aBENCH_CPU_INDEX[i]}+1))e-3") + #aBENCH_RESULT_CPU_MIN[i]=$(printf '%.2f' "${aBENCH_RESULT_CPU_MIN[i]}e-2") + #aBENCH_RESULT_CPU_MAX[i]=$(printf '%.2f' "${aBENCH_RESULT_CPU_MAX[i]}e-2") + #aBENCH_RESULT_CPU_AVG[i]=$(printf '%.2f' "$((${aBENCH_RESULT_CPU_AVG[i]}*10/${aBENCH_CPU_INDEX[i]}+1))e-3") + aBENCH_RESULT_CPU_MIN[i]=$(mawk "{printf \"%.2f\", ${aBENCH_RESULT_CPU_MIN[i]}e-2}" <<< '') + aBENCH_RESULT_CPU_MAX[i]=$(mawk "{printf \"%.2f\", ${aBENCH_RESULT_CPU_MAX[i]}e-2}" <<< '') + aBENCH_RESULT_CPU_AVG[i]=$(mawk "{printf \"%.2f\", $((${aBENCH_RESULT_CPU_AVG[i]}*10/${aBENCH_CPU_INDEX[i]}+1))e-3}" <<< '') # CPU temps if available aBENCH_RESULT_CPU_TEMP_START_MIN[i]='N/A' From 3942854df4984575186605e8ba19e07c29be86aa Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 1 Sep 2024 19:22:35 +0200 Subject: [PATCH 402/458] v9.8 - DietPi-Software | NoMachine: Our install option will now always download the latest NoMachine version, instead of a hardcoded one depending on the DietPi version. Many thanks to @tzvi208 for for figuring it out to version-agnostic download URLs: https://github.com/MichaIng/DietPi/issues/7198 --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f2c373f916..d67dfed404 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,6 +2,7 @@ v9.8 (2024-09-XX) Enhancements: +- DietPi-Software | NoMachine: Our install option will now always download the latest NoMachine version, instead of a hardcoded one depending on the DietPi version. Many thanks to @tzvi208 for for figuring it out to version-agnostic download URLs: https://github.com/MichaIng/DietPi/issues/7198 Bug fixes: - NanoPi M3/T3 | Resolved an issue where our recent image did not boot because the bootloader did not define a default device tree path anymore. Many thanks to @rozcietrzewiacz for reporting this issue: https://github.com/MichaIng/DietPi/issues/2630#issuecomment-2322085507 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index e7be946a59..cef1f4fb6c 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3258,14 +3258,13 @@ _EOF_ if To_Install 30 # NoMachine then - local version='8.13.1_1' # https://downloads.nomachine.com/ case $G_HW_ARCH in - 1) local url="Raspberry/nomachine_${version}_armv6hf";; - 2) local url="Arm/nomachine_${version}_armhf";; - 3) local url="Arm/nomachine_${version}_arm64";; - *) local url="Linux/nomachine_${version}_amd64";; + 1) local url='raspberry/v6/deb/nomachine_latest_armv6hf';; + 2) local url='arm/v7/deb/nomachine_latest_armhf';; + 3) local url='arm/v8/deb/nomachine_latest_arm64';; + *) local url='linux/64/deb/nomachine_latest_amd64';; esac - Download_Install "https://download.nomachine.com/download/${version%.*}/$url.deb" + Download_Install "https://www.nomachine.com/free/$url.deb" aSTART_SERVICES+=('nxserver') fi From dc1793bcc6c45b669655d806028e20184f3aed99 Mon Sep 17 00:00:00 2001 From: StephanStS Date: Tue, 3 Sep 2024 23:10:24 +0200 Subject: [PATCH 403/458] Init v9.8 (#7205) * Update version * Update CHANGELOG.txt * Update dietpi-survey_report * Update dietpi-globals --- .meta/dietpi-survey_report | 4 +++- .update/version | 4 ++-- CHANGELOG.txt | 2 +- dietpi/func/dietpi-globals | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index 2b7870e730..2507c0b98a 100755 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -729,13 +729,15 @@ shopt -s extglob aSOFTWARE_NAME9_6[213]='soju' aSOFTWARE_NAME9_7=() + aSOFTWARE_NAME9_8=() for i in "${!aSOFTWARE_NAME9_6[@]}" do aSOFTWARE_NAME9_7[i]=${aSOFTWARE_NAME9_6[i]} + aSOFTWARE_NAME9_8[i]=${aSOFTWARE_NAME9_7[i]} done # Pre-create software counter array so that we can see also software (available in newest version) with 0 installs - for i in "${aSOFTWARE_NAME9_7[@]}" + for i in "${aSOFTWARE_NAME9_8[@]}" do aSOFTWARE[$i]=0 done diff --git a/.update/version b/.update/version index a8977da8a1..47a6b7f53e 100644 --- a/.update/version +++ b/.update/version @@ -2,8 +2,8 @@ # shellcheck disable=SC2034 # Available DietPi version G_REMOTE_VERSION_CORE=9 -G_REMOTE_VERSION_SUB=7 -G_REMOTE_VERSION_RC=1 +G_REMOTE_VERSION_SUB=8 +G_REMOTE_VERSION_RC=-1 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=7 G_MIN_VERSION_SUB=0 diff --git a/CHANGELOG.txt b/CHANGELOG.txt index d67dfed404..183c8a131a 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,5 @@ v9.8 -(2024-09-XX) +(2024-09-21) Enhancements: - DietPi-Software | NoMachine: Our install option will now always download the latest NoMachine version, instead of a hardcoded one depending on the DietPi version. Many thanks to @tzvi208 for for figuring it out to version-agnostic download URLs: https://github.com/MichaIng/DietPi/issues/7198 diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 6e88809437..419aef0be6 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -54,8 +54,8 @@ [[ -f '/boot/dietpi/.version' ]] && . /boot/dietpi/.version # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=9 - [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=7 - [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=1 + [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=8 + [[ $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 From d1916b0e1992c2dd2ede1b05ea4a4ad22d163a64 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 3 Sep 2024 23:32:20 +0200 Subject: [PATCH 404/458] v9.8 - Raspberry Pi firmware migration | switch to raspi-utils-core, which excludes a lot of optional developer-directed features, but includes vcgencmd, which is what we need. --- .build/images/dietpi-installer | 2 +- .update/patches | 3 ++- dietpi/func/dietpi-set_software | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 21055faaff..bfecdd23ae 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1277,7 +1277,7 @@ _EOF_ # tiny-initramfs to satisfy dependency: https://github.com/RPi-Distro/repo/issues/358 G_AGI raspi-firmware G_CONFIG_INJECT 'SKIP_INITRAMFS_GEN=' 'SKIP_INITRAMFS_GEN=yes' /etc/default/raspi-firmware - G_AGI "${kernel[@]}" raspi-utils raspberrypi-sys-mods raspberrypi-archive-keyring "${a32bit[@]}" tiny-initramfs + G_AGI "${kernel[@]}" raspi-utils-core raspberrypi-sys-mods raspberrypi-archive-keyring "${a32bit[@]}" tiny-initramfs G_EXEC apt-mark auto tiny-initramfs G_EXEC rm -f /boot/initrd.img-* /boot/firmware/initramfs* else diff --git a/.update/patches b/.update/patches index 422e8fd6e2..5c65c2882b 100755 --- a/.update/patches +++ b/.update/patches @@ -1788,7 +1788,7 @@ Patch_9_7() esac fi - # NanoPi R5S/R6S migration from legacy image with 8 partitions to Armbian-based kernel and bootloader + # NanoPi R5S/R5C migration from legacy image with 8 partitions to Armbian-based kernel and bootloader elif [[ $G_HW_MODEL == 76 ]] && dpkg-query -s 'firmware-nanopi5' &> /dev/null then local rmodel @@ -1866,6 +1866,7 @@ Patch_9_7() done fi + # NanoPi 6 series migration from legacy image with 8 partitions to Armbian-based kernel and bootloader elif [[ $G_HW_MODEL == 79 ]] && dpkg-query -s 'firmware-nanopi6' &> /dev/null then local rmodel diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index ca4952bf64..5a39ef5324 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -876,7 +876,7 @@ deb $INPUT_MODE_VALUE $G_DISTRO_NAME-backports main contrib non-free' > /etc/apt \n- $optional for ${models[$optional]}" && to_install=("$optional") || to_remove=("$optional") fi - G_AGI "$kernel_package" "${to_install[@]}" raspi-firmware raspi-utils tiny-initramfs + G_AGI "$kernel_package" "${to_install[@]}" raspi-firmware raspi-utils-core tiny-initramfs G_AGP "${to_remove[@]}" raspberrypi-kernel raspberrypi-headers-kernel raspberrypi-bootloader libraspberrypi-bin libraspberrypi0 } From f7096ee1bc54195bce88fb9e9a1d9bc1591f19fe Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 4 Sep 2024 18:37:45 +0200 Subject: [PATCH 405/458] v9.8 - DietPi-Config | Resolved an issue where username and password in proxy settings could not be cleared, since the inputbox kept asking for an non-empty input. Many thanks to @dipisoft for reporting this issue: https://github.com/MichaIng/DietPi/issues/7211 --- CHANGELOG.txt | 1 + dietpi/dietpi-config | 6 +++--- dietpi/func/dietpi-globals | 7 +++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 183c8a131a..6a566e2690 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -6,6 +6,7 @@ Enhancements: Bug fixes: - NanoPi M3/T3 | Resolved an issue where our recent image did not boot because the bootloader did not define a default device tree path anymore. Many thanks to @rozcietrzewiacz for reporting this issue: https://github.com/MichaIng/DietPi/issues/2630#issuecomment-2322085507 +- DietPi-Config | Resolved an issue where username and password in proxy settings could not be cleared, since the inputbox kept asking for an non-empty input. Many thanks to @dipisoft for reporting this issue: https://github.com/MichaIng/DietPi/issues/7211 - DietPi-Software | NoMachine: Resolved an issue where the installation failed due to an outdated download URL. Many thanks to @tzvi208 for reporting this issue: https://github.com/MichaIng/DietPi/issues/7198 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 diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 4cd93f9d2e..52943ec6b6 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -3867,7 +3867,7 @@ NB: If you need to use *.pool.ntp.org servers, enter the base domain only. The s 'Password' ": [$PROXY_PASSWORD]" ) - G_WHIP_MENU 'Please select an option to adjust. Logout and login for changes to take effect.' || { Back_or_Exit 8; return 0; } # Network Options: Adapters + G_WHIP_BUTTON_OK_TEXT='Apply' G_WHIP_MENU 'Please select an option to adjust. Logout and login for changes to take effect.' || { Back_or_Exit 8; return 0; } # Network Options: Adapters case "$G_WHIP_RETURNED_VALUE" in @@ -3891,14 +3891,14 @@ NB: If you need to use *.pool.ntp.org servers, enter the base domain only. The s G_WHIP_DEFAULT_ITEM=$PROXY_USERNAME G_WHIP_INPUTBOX 'Please enter the proxy username\n - eg: JoeBloggs\n - Leave blank if not required' && PROXY_USERNAME=$G_WHIP_RETURNED_VALUE || return 0 - G_CONFIG_INJECT 'CONFIG_PROXY_USERNAME=' "CONFIG_PROXY_USERNAME=$PROXY_USERNAME" /boot/dietpi.txt + G_WHIP_INPUTBOX_REGEX='.*' G_CONFIG_INJECT 'CONFIG_PROXY_USERNAME=' "CONFIG_PROXY_USERNAME=$PROXY_USERNAME" /boot/dietpi.txt ;; 'Password') G_WHIP_DEFAULT_ITEM=$PROXY_PASSWORD G_WHIP_INPUTBOX 'Please enter the proxy password\n - eg: LetMeIn\n - Leave blank if not required' && PROXY_PASSWORD=$G_WHIP_RETURNED_VALUE || return 0 - G_CONFIG_INJECT 'CONFIG_PROXY_PASSWORD=' "CONFIG_PROXY_PASSWORD=$PROXY_PASSWORD" /boot/dietpi.txt + G_WHIP_INPUTBOX_REGEX='.*' G_CONFIG_INJECT 'CONFIG_PROXY_PASSWORD=' "CONFIG_PROXY_PASSWORD=$PROXY_PASSWORD" /boot/dietpi.txt ;; *) return 0;; diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 419aef0be6..8f9a64dcbf 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -444,7 +444,7 @@ $grey───────────────────────── # - G_WHIP_RETURNED_VALUE | Returned value from inputbox/menu/checklist based whiptail items # G_WHIP_DESTROY | Clear vars after run of whiptail - G_WHIP_DESTROY(){ unset -v G_WHIP_DEFAULT_ITEM G_WHIP_SIZE_X_MAX G_WHIP_BUTTON_OK_TEXT G_WHIP_BUTTON_CANCEL_TEXT G_WHIP_NOCANCEL G_WHIP_MENU_ARRAY G_WHIP_CHECKLIST_ARRAY; } + G_WHIP_DESTROY(){ unset -v G_WHIP_DEFAULT_ITEM G_WHIP_SIZE_X_MAX G_WHIP_BUTTON_OK_TEXT G_WHIP_BUTTON_CANCEL_TEXT G_WHIP_NOCANCEL G_WHIP_MENU_ARRAY G_WHIP_CHECKLIST_ARRAY G_WHIP_INPUTBOX_REGEX G_WHIP_INPUTBOX_REGEX_TEXT; } # Run once, to be failsafe in case any exported/environment variables are left from originating shell G_WHIP_DESTROY @@ -700,6 +700,7 @@ $grey───────────────────────── # G_WHIP_INPUTBOX "message" # - Prompt user to input text and save it to G_WHIP_RETURNED_VALUE + # - G_WHIP_INPUTBOX_REGEX/G_WHIP_INPUTBOX_REGEX_TEXT: Regular expression and description about allowed input. Defaults to the requirement that the input is not empty. # - Exit code: 0=input done, else=user cancelled or noninteractive G_WHIP_INPUTBOX() { @@ -713,10 +714,12 @@ $grey───────────────────────── while : do G_WHIP_INIT + G_WHIP_INPUTBOX_REGEX=${G_WHIP_INPUTBOX_REGEX:-'.'} + G_WHIP_INPUTBOX_REGEX_TEXT=${G_WHIP_INPUTBOX_REGEX_TEXT:-'not be empty'} # shellcheck disable=SC2086 G_WHIP_RETURNED_VALUE=$(whiptail ${G_PROGRAM_NAME:+--title "$G_PROGRAM_NAME"} --backtitle "$WHIP_BACKTITLE" --inputbox "$WHIP_ERROR$WHIP_MESSAGE" --ok-button "$G_WHIP_BUTTON_OK_TEXT" --cancel-button "$G_WHIP_BUTTON_CANCEL_TEXT" "${NOCANCEL[@]}" $WHIP_SCROLLTEXT "$WHIP_SIZE_Y" "$WHIP_SIZE_X" "$G_WHIP_DEFAULT_ITEM" 3>&1 1>&2 2>&3-; echo $? > /tmp/.G_WHIP_INPUTBOX_RESULT) read -r result < /tmp/.G_WHIP_INPUTBOX_RESULT; rm -f /tmp/.G_WHIP_INPUTBOX_RESULT - [[ $result == 0 && -z $G_WHIP_RETURNED_VALUE ]] && { WHIP_ERROR='[FAILED] An input value was not entered, please try again...\n\n'; continue; } + [[ $result == 0 && ! $G_WHIP_RETURNED_VALUE =~ $G_WHIP_INPUTBOX_REGEX ]] && { WHIP_ERROR="[FAILED] Input must $G_WHIP_INPUTBOX_REGEX_TEXT, please try again ...\n\n"; continue; } break done From d0551cdf57bc60fced8349e6aa331914b4f72e07 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 4 Sep 2024 18:44:50 +0200 Subject: [PATCH 406/458] v9.8 - DietPi-Confg | Enhance "Ok" button text, do indicated that it selects the highlighted menu entry --- dietpi/dietpi-config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 52943ec6b6..3ab98100c1 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -3867,7 +3867,7 @@ NB: If you need to use *.pool.ntp.org servers, enter the base domain only. The s 'Password' ": [$PROXY_PASSWORD]" ) - G_WHIP_BUTTON_OK_TEXT='Apply' G_WHIP_MENU 'Please select an option to adjust. Logout and login for changes to take effect.' || { Back_or_Exit 8; return 0; } # Network Options: Adapters + G_WHIP_BUTTON_OK_TEXT='Select' G_WHIP_MENU 'Please select an option to adjust. Logout and login for changes to take effect.' || { Back_or_Exit 8; return 0; } # Network Options: Adapters case "$G_WHIP_RETURNED_VALUE" in From 20576fd2e1de65dc55178259932e4bafa41b429b Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 4 Sep 2024 18:46:37 +0200 Subject: [PATCH 407/458] v9.8 - DietPi-Config | Apply G_WHIP_INPUTBOX_REGEX to correct function call --- dietpi/dietpi-config | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 3ab98100c1..55feb04606 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -3890,15 +3890,15 @@ NB: If you need to use *.pool.ntp.org servers, enter the base domain only. The s 'Username') G_WHIP_DEFAULT_ITEM=$PROXY_USERNAME - G_WHIP_INPUTBOX 'Please enter the proxy username\n - eg: JoeBloggs\n - Leave blank if not required' && PROXY_USERNAME=$G_WHIP_RETURNED_VALUE || return 0 - G_WHIP_INPUTBOX_REGEX='.*' G_CONFIG_INJECT 'CONFIG_PROXY_USERNAME=' "CONFIG_PROXY_USERNAME=$PROXY_USERNAME" /boot/dietpi.txt + G_WHIP_INPUTBOX_REGEX='.*' G_WHIP_INPUTBOX 'Please enter the proxy username\n - eg: JoeBloggs\n - Leave blank if not required' && PROXY_USERNAME=$G_WHIP_RETURNED_VALUE || return 0 + G_CONFIG_INJECT 'CONFIG_PROXY_USERNAME=' "CONFIG_PROXY_USERNAME=$PROXY_USERNAME" /boot/dietpi.txt ;; 'Password') G_WHIP_DEFAULT_ITEM=$PROXY_PASSWORD - G_WHIP_INPUTBOX 'Please enter the proxy password\n - eg: LetMeIn\n - Leave blank if not required' && PROXY_PASSWORD=$G_WHIP_RETURNED_VALUE || return 0 - G_WHIP_INPUTBOX_REGEX='.*' G_CONFIG_INJECT 'CONFIG_PROXY_PASSWORD=' "CONFIG_PROXY_PASSWORD=$PROXY_PASSWORD" /boot/dietpi.txt + G_WHIP_INPUTBOX_REGEX='.*' G_WHIP_INPUTBOX 'Please enter the proxy password\n - eg: LetMeIn\n - Leave blank if not required' && PROXY_PASSWORD=$G_WHIP_RETURNED_VALUE || return 0 + G_CONFIG_INJECT 'CONFIG_PROXY_PASSWORD=' "CONFIG_PROXY_PASSWORD=$PROXY_PASSWORD" /boot/dietpi.txt ;; *) return 0;; From e7131f82c28ae54e3f8a4c513a4d62b621d41dd9 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 5 Sep 2024 21:36:31 +0200 Subject: [PATCH 408/458] v9.8 - NanoPi R5S/R5C | Resolved an issue where the Ethernet LEDs did not work on systems upgraded from the legacy Linux 5.10 kernel. Many thanks to `@innovodev` for reporting this issue: https://dietpi.com/forum/t/21026 --- .update/patches | 51 ++++++++++++++++++++++++++++++++++++++++++++++++- CHANGELOG.txt | 1 + 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/.update/patches b/.update/patches index 5c65c2882b..c851b162b4 100755 --- a/.update/patches +++ b/.update/patches @@ -1151,7 +1151,7 @@ _EOF_ [[ $( /dev/null && model='R5C' G_DIETPI-NOTIFY 2 "Updating udev rule for NanoPi $model Ethernet LEDs" G_EXEC eval 'echo '\''ledtrig-netdev'\'' > /etc/modules-load.d/dietpi-eth-leds.conf' - if [[ $model == 'R6S' ]] + if [[ $model == 'R5S' ]] then cat << '_EOF_' > /etc/udev/rules.d/dietpi-eth-leds.rules SUBSYSTEM=="leds", KERNEL=="wan_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth0", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev eth0", RUN+="/bin/ip l s down dev eth0" @@ -1961,6 +1961,55 @@ Patch_9_7() fi } +Patch_9_8() +{ + # NanoPi R5S/R5C + if (( $G_HW_MODEL == 76 )) && ! dpkg-query -s 'firmware-nanopi5' &> /dev/null + then + local model='R5S' + [[ $( /dev/null && model='R5C' + G_DIETPI-NOTIFY 2 "Updating udev rule for NanoPi $model Ethernet LEDs" + G_EXEC eval 'echo '\''ledtrig-netdev'\'' > /etc/modules-load.d/dietpi-eth-leds.conf' + if [[ $model == 'R5S' ]] + then + cat << '_EOF_' > /etc/udev/rules.d/dietpi-eth-leds.rules +SUBSYSTEM=="leds", KERNEL=="green:lan-1", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth0", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev eth0", RUN+="/bin/ip l s down dev eth0" +SUBSYSTEM=="leds", KERNEL=="green:lan-2", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth1", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev eth1", RUN+="/bin/ip l s down dev eth1" +SUBSYSTEM=="leds", KERNEL=="green:wan", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth2", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev eth2", RUN+="/bin/ip l s down dev eth2" +_EOF_ + else + cat << '_EOF_' > /etc/udev/rules.d/dietpi-eth-leds.rules +SUBSYSTEM=="leds", KERNEL=="green:lan", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth0", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev eth0", RUN+="/bin/ip l s down dev eth0" +SUBSYSTEM=="leds", KERNEL=="green:wan", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth1", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev eth1", RUN+="/bin/ip l s down dev eth1" +SUBSYSTEM=="leds", KERNEL=="green:wlan", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="wlan0", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev wlan0", RUN+="/bin/ip l s down dev wlan0" +_EOF_ + fi + + # NanoPi R6S/R6C + elif (( $G_HW_MODEL == 79 )) && ! dpkg-query -s 'firmware-nanopi6' &> /dev/null + then + local model='R6S' + [[ $( /dev/null && model='R6C' + G_DIETPI-NOTIFY 2 "Updating udev rule for NanoPi $model Ethernet LEDs" + G_EXEC eval 'echo '\''ledtrig-netdev'\'' > /etc/modules-load.d/dietpi-eth-leds.conf' + if [[ $model == 'R6S' ]] + then + cat << '_EOF_' > /etc/udev/rules.d/dietpi-eth-leds.rules +SUBSYSTEM=="leds", KERNEL=="lan2_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth0", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev eth0", RUN+="/bin/ip l s down dev eth0" +SUBSYSTEM=="leds", KERNEL=="wan_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth1", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1" +SUBSYSTEM=="leds", KERNEL=="lan1_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth2", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1" +_EOF_ + elif [[ $model == 'R6C' ]] + then + cat << '_EOF_' > /etc/udev/rules.d/dietpi-eth-leds.rules +SUBSYSTEM=="leds", KERNEL=="wan_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth0", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev eth0", RUN+="/bin/ip l s down dev eth0" +SUBSYSTEM=="leds", KERNEL=="lan1_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth1", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev eth1", RUN+="/bin/ip l s down dev eth1" +SUBSYSTEM=="leds", KERNEL=="user_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="wlan0", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev wlan0", RUN+="/bin/ip l s down dev wlan0" +_EOF_ + fi + fi +} + # v6.35 => v7 migration if (( $G_DIETPI_VERSION_CORE == 6 && $G_DIETPI_VERSION_SUB > 34 )) then diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 6a566e2690..02976e07ac 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -6,6 +6,7 @@ Enhancements: Bug fixes: - NanoPi M3/T3 | Resolved an issue where our recent image did not boot because the bootloader did not define a default device tree path anymore. Many thanks to @rozcietrzewiacz for reporting this issue: https://github.com/MichaIng/DietPi/issues/2630#issuecomment-2322085507 +- NanoPi R5S/R5C | Resolved an issue where the Ethernet LEDs did not work on systems upgraded from the legacy Linux 5.10 kernel. Many thanks to @innovodev for reporting this issue: https://dietpi.com/forum/t/21026 - DietPi-Config | Resolved an issue where username and password in proxy settings could not be cleared, since the inputbox kept asking for an non-empty input. Many thanks to @dipisoft for reporting this issue: https://github.com/MichaIng/DietPi/issues/7211 - DietPi-Software | NoMachine: Resolved an issue where the installation failed due to an outdated download URL. Many thanks to @tzvi208 for reporting this issue: https://github.com/MichaIng/DietPi/issues/7198 From 4ec7ebc2b050327d168e6cbabefedef78c0c2c5c Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 19 Sep 2024 17:31:56 +0200 Subject: [PATCH 409/458] v9.8 - DietPi-Services | Resolved an issue where the nfs-kernel-server service did show mode "alias". "nfs-kernel-server" is indeed an alias for the actual service name "nfs-server", which is now used. --- CHANGELOG.txt | 1 + dietpi/dietpi-services | 2 +- dietpi/dietpi-software | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 02976e07ac..f44537aa83 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -7,6 +7,7 @@ Enhancements: Bug fixes: - NanoPi M3/T3 | Resolved an issue where our recent image did not boot because the bootloader did not define a default device tree path anymore. Many thanks to @rozcietrzewiacz for reporting this issue: https://github.com/MichaIng/DietPi/issues/2630#issuecomment-2322085507 - NanoPi R5S/R5C | Resolved an issue where the Ethernet LEDs did not work on systems upgraded from the legacy Linux 5.10 kernel. Many thanks to @innovodev for reporting this issue: https://dietpi.com/forum/t/21026 +- DietPi-Services | Resolved an issue where the nfs-kernel-server service did show mode "alias". "nfs-kernel-server" is indeed an alias for the actual service name "nfs-server", which is now used. - DietPi-Config | Resolved an issue where username and password in proxy settings could not be cleared, since the inputbox kept asking for an non-empty input. Many thanks to @dipisoft for reporting this issue: https://github.com/MichaIng/DietPi/issues/7211 - DietPi-Software | NoMachine: Resolved an issue where the installation failed due to an outdated download URL. Many thanks to @tzvi208 for reporting this issue: https://github.com/MichaIng/DietPi/issues/7198 diff --git a/dietpi/dietpi-services b/dietpi/dietpi-services index 2c267a3045..646992a4d5 100755 --- a/dietpi/dietpi-services +++ b/dietpi/dietpi-services @@ -125,7 +125,7 @@ _EOF_ 'proftpd' 'vsftpd' 'nmbd' 'smbd' - 'nfs-kernel-server' + 'nfs-server' # Backends ----------------------------------------------------------- # - Databases diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index cef1f4fb6c..5e70f38f03 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3466,10 +3466,10 @@ _EOF_ G_EXEC sed --follow-symlinks -i 's/^[[:blank:]]*root/#root/' /etc/ftpusers fi - if To_Install 109 nfs-kernel-server # NFS Server + if To_Install 109 nfs-server # NFS Server then G_AGI nfs-kernel-server - G_EXEC systemctl stop nfs-kernel-server + G_EXEC systemctl stop nfs-server G_EXEC mkdir -p /etc/exports.d [[ -f '/etc/exports.d/dietpi.exports' ]] || G_EXEC eval 'echo '\''/mnt/dietpi_userdata *(rw,async,no_root_squash,fsid=0,crossmnt,no_subtree_check)'\'' > /etc/exports.d/dietpi.exports' From c0bf89d612f303561876f3263d4d14a4bbbb6238 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 19 Sep 2024 17:54:43 +0200 Subject: [PATCH 410/458] v9.8 - DietPi-Software | Update fallback URLs --- dietpi/dietpi-software | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 5e70f38f03..11feb2ca66 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6218,7 +6218,7 @@ _EOF_ *) local arch='amd64';; esac - local fallback_url="https://github.com/navidrome/navidrome/releases/download/v0.52.5/navidrome_0.52.5_linux_$arch.tar.gz" + local fallback_url="https://github.com/navidrome/navidrome/releases/download/v0.53.1/navidrome_0.53.1_linux_$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/navidrome/navidrome/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/navidrome_[0-9.]*_linux_$arch\.tar\.gz\"$/{print \$4}")" /opt/navidrome # Data dir @@ -6313,7 +6313,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Kareadita/Kavita/releases/download/v0.8.2/kavita-linux-$arch.tar.gz" + local fallback_url="https://github.com/Kareadita/Kavita/releases/download/v0.8.3/kavita-linux-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Kareadita/Kavita/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/kavita-linux-$arch\.tar\.gz\"$/{print \$4}")" G_EXEC chmod +x Kavita/Kavita @@ -7056,7 +7056,7 @@ _EOF_ aDEPS=() else local version=$(curl -sSfL 'https://api.github.com/repos/FreshRSS/FreshRSS/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}') - [[ $version ]] || { version='1.24.2'; G_DIETPI-NOTIFY 1 "Automatic latest FreshRSS version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } + [[ $version ]] || { version='1.24.3'; G_DIETPI-NOTIFY 1 "Automatic latest FreshRSS version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } Download_Install "https://github.com/FreshRSS/FreshRSS/archive/$version.tar.gz" G_EXEC mv "FreshRSS-$version" /opt/FreshRSS fi @@ -7471,7 +7471,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/1.11.2/komga-1.11.2.jar' + local fallback_url='https://github.com/gotson/komga/releases/download/1.13.0/komga-1.13.0.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 @@ -7567,7 +7567,7 @@ _EOF_ local json=() [[ $PHP_VERSION == 8* ]] || aDEPS+=("php$PHP_VERSION-json") json=('json') - local fallback_url="https://github.com/ampache/ampache/releases/download/6.6.0/ampache-6.6.0_all_php$PHP_VERSION.zip" + local fallback_url="https://github.com/ampache/ampache/releases/download/6.6.1/ampache-6.6.1_all_php$PHP_VERSION.zip" Download_Install "$(curl -sSfL 'https://api.github.com/repos/ampache/ampache/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/ampache-[0-9\.]*_all_php$PHP_VERSION.zip\"$/{print \$4}")" ampache # Reinstall: Preserve configs from old and new paths @@ -8951,7 +8951,7 @@ _EOF_ *) local arch='arm';; esac - local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.27.10/syncthing-linux-$arch-v1.27.10.tar.gz" + local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.27.12/syncthing-linux-$arch-v1.27.12.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/syncthing/syncthing/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/syncthing-linux-$arch-[^\"\/]*\.tar\.gz\"/{print \$4}")" G_EXEC mv syncthing-* /opt/syncthing fi @@ -9363,7 +9363,7 @@ _EOF_ if (( ${PHP_VERSION::1} > 7 )) then aDEPS+=("php$PHP_VERSION-curl") - local fallback_url='https://github.com/koel/koel/releases/download/v7.0.10/koel-v7.0.10.tar.gz' aphp_deps=('curl' 'dom') + local fallback_url='https://github.com/koel/koel/releases/download/v7.1.0/koel-v7.1.0.tar.gz' aphp_deps=('curl' 'dom') Download_Install "$(curl -sSfL 'https://api.github.com/repos/koel/koel/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/koel-[^"\/]*\.tar\.gz"$/{print $4}')" else aDEPS+=("php$PHP_VERSION-json") @@ -9641,7 +9641,7 @@ _EOF_ esac url=$(curl -sSfL 'https://api.github.com/repos/Lidarr/Lidarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}") - local fallback_url="https://github.com/Lidarr/Lidarr/releases/download/v2.4.3.4248/Lidarr.master.2.4.3.4248.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Lidarr/Lidarr/releases/download/v2.5.3.4341/Lidarr.master.2.5.3.4341.linux-core-$arch.tar.gz" fi Download_Install "$url" @@ -9908,7 +9908,7 @@ _EOF_ local reinstall=0 [[ -f '/mnt/dietpi_userdata/nzbget/nzbget.conf' ]] && reinstall=1 - local fallback_url='https://github.com/nzbgetcom/nzbget/releases/download/v24.1/nzbget-24.1-bin-linux.run' + local fallback_url='https://github.com/nzbgetcom/nzbget/releases/download/v24.3/nzbget-24.3-bin-linux.run' Download_Install "$(curl -sSfL 'https://api.github.com/repos/nzbgetcom/nzbget/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/nzbget-[^"/]*-bin-linux.run"$/{print $4}')" nzbget.run G_EXEC mkdir -p /mnt/dietpi_userdata/nzbget G_EXEC_OUTPUT=1 G_EXEC dash nzbget.run --destdir /mnt/dietpi_userdata/nzbget @@ -9987,7 +9987,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.22.0.4670/Prowlarr.master.1.22.0.4670.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.23.1.4708/Prowlarr.master.1.23.1.4708.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Prowlarr/Prowlarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}")" G_EXEC mv Prowlarr /opt/prowlarr fi @@ -10629,7 +10629,7 @@ _EOF_ *) local arch='arm-6';; esac - local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.22.1/gitea-1.22.1-linux-$arch.xz" + local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.22.2/gitea-1.22.2-linux-$arch.xz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/go-gitea/gitea/releases/latest' | mawk -F\" "/\"browser_download_url\": \".*\/gitea-[^\"\/]*-linux-$arch\.xz\"/{print \$4}")" /mnt/dietpi_userdata/gitea/gitea # User @@ -11213,7 +11213,7 @@ _EOF_ # v3 drops PHP 7.4 support: https://github.com/TasmoAdmin/TasmoAdmin/releases/tag/v3.0.0 if (( $G_DISTRO > 6 )) then - local fallback_url='https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v4.1.2/tasmoadmin_v4.1.2.tar.gz' + local fallback_url='https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v4.1.3/tasmoadmin_v4.1.3.tar.gz' Download_Install "$(curl -sSfL 'https://api.github.com/repos/TasmoAdmin/TasmoAdmin/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/tasmoadmin_v[^"\/]*\.tar\.gz"$/{print $4}')" else Download_Install 'https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v2.4.2/tasmoadmin_v2.4.2.tar.gz' @@ -11671,7 +11671,7 @@ _EOF_ *) local arch='amd64';; esac - local fallback_url="https://github.com/rclone/rclone/releases/download/v1.67.0/rclone-v1.67.0-linux-$arch.deb" + local fallback_url="https://github.com/rclone/rclone/releases/download/v1.68.0/rclone-v1.68.0-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 @@ -11685,7 +11685,7 @@ _EOF_ *) local arch='arm';; esac - local fallback_url="https://github.com/restic/restic/releases/download/v0.17.0/restic_0.17.0_linux_$arch.bz2" + local fallback_url="https://github.com/restic/restic/releases/download/v0.17.1/restic_0.17.1_linux_$arch.bz2" Download_Install "$(curl -sSfL 'https://api.github.com/repos/restic/restic/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/restic_[^\"\/]*_linux_$arch\.bz2\"$/{print \$4}")" /usr/local/bin/restic G_EXEC chmod +x /usr/local/bin/restic fi @@ -11802,7 +11802,7 @@ _EOF_ *) local arch='amd64';; esac - local fallback_url="https://github.com/filebrowser/filebrowser/releases/download/v2.30.0/linux-$arch-filebrowser.tar.gz" + local fallback_url="https://github.com/filebrowser/filebrowser/releases/download/v2.31.1/linux-$arch-filebrowser.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/filebrowser/filebrowser/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/linux-$arch-filebrowser\.tar\.gz\"$/{print \$4}")" ./filebrowser/ # Reinstall From 27fd1fa8343785d3132b70f6495095a3a8573113 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Carvalho?= Date: Thu, 19 Sep 2024 17:56:15 +0200 Subject: [PATCH 411/458] v9.8 (#7219) - DietPi-Config | Minor text changes to the ARM Initial Turbo section --- dietpi/dietpi-config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 55feb04606..6498f34d28 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -1559,8 +1559,8 @@ If unsure, set any value, 'Ondemand Down Factor' option on the next screen will MIN_VALUE=1 MAX_VALUE=60 G_WHIP_DEFAULT_ITEM=$initial_turbo - if G_WHIP_INPUTBOX "Amount of seconds on boot, where the CPU runs at highest clock, before it starts to respect the CPU governor. This reduces boot time quite much since RPi boots with powersave governor until the chosen one is applied at later boot stage. -- Recommended value: 20\n - Valid range: $MIN_VALUE - $MAX_VALUE\n - Setting a value outside of range will disable this feature."; then + if G_WHIP_INPUTBOX "Amount of seconds on boot, where the CPU runs at the highest clock speed, before it starts to respect the CPU governor. This reduces boot time quite significantly since the RPi boots using the powersave governor until the chosen one is applied at a later boot stage. +- Recommended value: 20\n - Valid range: $MIN_VALUE - $MAX_VALUE\n - Setting a value outside of this range will disable this feature."; then if disable_error=1 G_CHECK_VALIDINT "$G_WHIP_RETURNED_VALUE" "$MIN_VALUE" "$MAX_VALUE"; then From 4080d3dc8fe11be85d092a77b39abceaab45e19f Mon Sep 17 00:00:00 2001 From: Sebastian Bogaci Date: Thu, 19 Sep 2024 19:09:52 +0200 Subject: [PATCH 412/458] v9.8 (#7217) - DietPi-Software | Portainer: It has been enabled to accept private/custom CA certificates by using the trusted CA certificates of the host, instead of the ones shipped with the container image. Many thanks to @oldboys92 for implementing this enhancement: https://github.com/MichaIng/DietPi/pull/7217 Signed-off-by: Sebastian Bogaci --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f44537aa83..1b05e1292a 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,6 +3,7 @@ v9.8 Enhancements: - DietPi-Software | NoMachine: Our install option will now always download the latest NoMachine version, instead of a hardcoded one depending on the DietPi version. Many thanks to @tzvi208 for for figuring it out to version-agnostic download URLs: https://github.com/MichaIng/DietPi/issues/7198 +- DietPi-Software | Portainer: It has been enabled to accept private/custom CA certificates by using the trusted CA certificates of the host, instead of the ones shipped with the container image. Many thanks to @oldboys92 for implementing this enhancement: https://github.com/MichaIng/DietPi/pull/7217 Bug fixes: - NanoPi M3/T3 | Resolved an issue where our recent image did not boot because the bootloader did not define a default device tree path anymore. Many thanks to @rozcietrzewiacz for reporting this issue: https://github.com/MichaIng/DietPi/issues/2630#issuecomment-2322085507 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 11feb2ca66..4416937b4a 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -11913,7 +11913,7 @@ _EOF_ # Deploy the Portainer container G_DIETPI-NOTIFY 2 'Portainer will be deployed now. This could take a while...' - G_EXEC_OUTPUT=1 G_EXEC docker run -d -p '9002:9000' --name=portainer --restart=always -v '/run/docker.sock:/var/run/docker.sock' -v 'portainer_data:/data' 'portainer/portainer-ce' + G_EXEC_OUTPUT=1 G_EXEC docker run -d -p '9002:9000' --name=portainer --restart=always -v '/run/docker.sock:/var/run/docker.sock' -v '/etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt:ro' -v 'portainer_data:/data' 'portainer/portainer-ce' fi if To_Install 141 adsb-setup adsb-docker # ADS-B Feeder From 762ef5ba0680cfa9bbd9baed793fda3f85c188af Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 19 Sep 2024 22:05:14 +0200 Subject: [PATCH 413/458] v9.8 - CI | DietPi-Software test: Disable Raspotify 32-bit ARM test for now, as it fails with QEMU emulation --- .github/workflows/dietpi-software.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index 96d5b46c79..da0c26bd2e 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -201,7 +201,7 @@ Process_Software() 164) aSERVICES[i]='nukkit' aUDP[i]='19132'; (( $arch == 10 )) || aDELAY[i]=60;; 165) aSERVICES[i]='gitea' aTCP[i]='3000'; (( $arch < 10 )) && aDELAY[i]=30;; #166) aSERVICES[i]='pi-spc';; Service cannot reasonably start in container as WirinPi's gpio command fails reading /proc/cpuinfo - 167) aSERVICES[i]='raspotify';; + 167) (( $arch < 3 )) || aSERVICES[i]='raspotify';; # 32-bit ARM fails with: "arm-binfmt-P: /usr/bin/librespot: Unable to find a guest_base to satisfy all guest address mapping requirements" #169) aSERVICES[i]='voice-recognizer';; "RuntimeError: This module can only be run on a Raspberry Pi!" 170) aCOMMANDS[i]='unrar -V';; #171) aSERVICES[i]='frps frpc' aTCP[i]='7000 7400 7500';; Interactive install with service and ports depending on server/client/both choice From a794ddf55327762d5a6041490471b965b8958166 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 19 Sep 2024 22:18:32 +0200 Subject: [PATCH 414/458] v9.8 - CI | Fix ARMv6 uname workaround for Bullseye, where it is installed to /lib/uname and those Bullseye images, interestingly, do not have usr-merge applied. --- .build/images/dietpi-build | 2 +- .build/software/Amiberry/container_build.bash | 2 +- .build/software/dietpi-software-build.bash | 2 +- .github/workflows/dietpi-software.bash | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index b10383386f..8d3286bd94 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -614,7 +614,7 @@ _EOF_ # Force ARMv6 arch on Raspbian # shellcheck disable=SC2015 - (( $HW_ARCH > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' + (( $HW_ARCH > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Skip filesystem expansion G_EXEC rm rootfs/etc/systemd/system/local-fs.target.wants/dietpi-fs_partition_resize.service diff --git a/.build/software/Amiberry/container_build.bash b/.build/software/Amiberry/container_build.bash index 92d7f0e222..5acd92de48 100755 --- a/.build/software/Amiberry/container_build.bash +++ b/.build/software/Amiberry/container_build.bash @@ -115,7 +115,7 @@ G_EXEC mount "${FP_LOOP}p1" rootfs # Enforce ARMv6 arch on Raspbian # shellcheck disable=SC2015 -(( $arch > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' +(( $arch > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Enable automated setup G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt diff --git a/.build/software/dietpi-software-build.bash b/.build/software/dietpi-software-build.bash index 906e79a3da..09a060267b 100644 --- a/.build/software/dietpi-software-build.bash +++ b/.build/software/dietpi-software-build.bash @@ -119,7 +119,7 @@ G_EXEC mount "${FP_LOOP}p1" rootfs # Enforce ARMv6 arch on Raspbian # shellcheck disable=SC2015 -(( $arch > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' +(( $arch > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Enable automated setup G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index da0c26bd2e..1005e15c2a 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -320,7 +320,7 @@ G_EXEC mount "${FP_LOOP}p1" rootfs # Force ARMv6 arch on Raspbian # shellcheck disable=SC2015 -(( $arch > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' +(( $arch > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6' # Force RPi on ARM systems if requested if [[ $RPI == 'true' ]] && (( $arch < 10 )) From 115045adbdf8add4c872a319c2cef17e827c7403 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 19 Sep 2024 22:24:22 +0200 Subject: [PATCH 415/458] v9.8 - DietPi-Software | Raspotify: Resolved an issue where the service failed to start with the latest Raspotify release, since it contains a config, incompatible with the bundles librespot: https://github.com/dtcooper/raspotify/pull/674 --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 1b05e1292a..55667e20fb 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -11,6 +11,7 @@ Bug fixes: - DietPi-Services | Resolved an issue where the nfs-kernel-server service did show mode "alias". "nfs-kernel-server" is indeed an alias for the actual service name "nfs-server", which is now used. - DietPi-Config | Resolved an issue where username and password in proxy settings could not be cleared, since the inputbox kept asking for an non-empty input. Many thanks to @dipisoft for reporting this issue: https://github.com/MichaIng/DietPi/issues/7211 - DietPi-Software | NoMachine: Resolved an issue where the installation failed due to an outdated download URL. Many thanks to @tzvi208 for reporting this issue: https://github.com/MichaIng/DietPi/issues/7198 +- DietPi-Software | Raspotify: Resolved an issue where the service failed to start with the latest Raspotify release, since it contains a config, incompatible with the bundles librespot: https://github.com/dtcooper/raspotify/pull/674 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 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 4416937b4a..fba57700bb 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -10846,6 +10846,9 @@ _EOF_ # APT package G_AGI raspotify + + # Temporary workaround for: https://github.com/dtcooper/raspotify/pull/674 + G_CONFIG_INJECT 'LIBRESPOT_AUTOPLAY=' 'LIBRESPOT_AUTOPLAY=on' /etc/raspotify/conf fi # Stop service From d9ae4ab7e3ba1698469f0e3367e6d3cfdd0954a0 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 21 Sep 2024 16:45:28 +0200 Subject: [PATCH 416/458] v9.8 - DietPi-Software | ReadyMedia: Re-create config file with ours, if it does not exist yet, and merge code around the sadly enforced file logging - DietPi-Software | Raspotify: Remove obsolete workaround - DietPi-Software | Update fallback URLs --- .conf/dps_39/minidlna.conf | 6 +++--- dietpi/dietpi-software | 28 ++++++++++------------------ 2 files changed, 13 insertions(+), 21 deletions(-) diff --git a/.conf/dps_39/minidlna.conf b/.conf/dps_39/minidlna.conf index 448ac8b5d2..801748f0de 100644 --- a/.conf/dps_39/minidlna.conf +++ b/.conf/dps_39/minidlna.conf @@ -1,5 +1,5 @@ -# WARNING: After changing this option, you need to restart the service -# via: "systemctl restart minidlna" +# Note: After changing this option, you need to restart the service +# via: "systemctl restart minidlna" # Media paths media_dir=A,/mnt/dietpi_userdata/Music @@ -11,7 +11,7 @@ db_dir=/mnt/dietpi_userdata/.MiniDLNA_Cache # Must be one of "off", "fatal", "error", "warn", "info" or "debug". # "off" turns of logging entirely, "fatal" is the highest level of importance. -# Access logs via: "journalctl -u minidlna", on Bullseye in /var/log/minidlna. +# Access logs via: "journalctl -u minidlna" and /var/log/minidlna. log_level=warn # Use a different container as the root of the directory tree presented to diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index fba57700bb..e9c979cb18 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -5149,19 +5149,20 @@ _EOF_ if To_Install 39 minidlna # ReadyMedia then + # Config + [[ -f '/etc/minidlna.conf' ]] || dps_index=$software_id Download_Install 'minidlna.conf' /etc/minidlna.conf + G_AGI minidlna G_EXEC systemctl stop minidlna - # Remove obsolete service files + # Remove obsolete service file Remove_SysV minidlna 1 - [[ -f '/lib/systemd/system/minidlna.service' ]] && G_EXEC rm /lib/systemd/system/minidlna.service - [[ -d '/var/log/minidlna' ]] && G_EXEC rm -R /var/log/minidlna # User: Make "dietpi" the primary group to enable cross-access to media files Create_User -g dietpi -G minidlna -d /var/lib/minidlna minidlna - # Service - cat << _EOF_ > /etc/systemd/system/minidlna.service + # Service: Debian patch enforces file logging, overriding "-S": https://github.com/MichaIng/DietPi/issues/4745 + cat << '_EOF_' > /etc/systemd/system/minidlna.service [Unit] Description=ReadyMedia (DietPi) Documentation=man:minidlnad(1) man:minidlna.conf(5) @@ -5170,18 +5171,12 @@ After=network-online.target remote-fs.target [Service] User=minidlna -ExecStart=$(command -v minidlnad) -S -R -f /etc/minidlna.conf -P /dev/null +LogsDirectory=minidlna +ExecStart=/usr/sbin/minidlnad -S -R -f /etc/minidlna.conf -P /dev/null [Install] WantedBy=multi-user.target _EOF_ - # Debian patched forced file logging inside, overriding "-S": https://github.com/MichaIng/DietPi/issues/4745 - G_CONFIG_INJECT 'LogsDirectory=' 'LogsDirectory=minidlna' /etc/systemd/system/minidlna.service 'User=' - - # Config - G_BACKUP_FP /etc/minidlna.conf - dps_index=$software_id Download_Install 'minidlna.conf' /etc/minidlna.conf - # Cache G_EXEC mkdir -p /mnt/dietpi_userdata/.MiniDLNA_Cache G_EXEC chown -R minidlna:root /mnt/dietpi_userdata/.MiniDLNA_Cache @@ -6313,7 +6308,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Kareadita/Kavita/releases/download/v0.8.3/kavita-linux-$arch.tar.gz" + local fallback_url="https://github.com/Kareadita/Kavita/releases/download/v0.8.3.2/kavita-linux-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Kareadita/Kavita/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/kavita-linux-$arch\.tar\.gz\"$/{print \$4}")" G_EXEC chmod +x Kavita/Kavita @@ -9545,7 +9540,7 @@ _EOF_ esac url=$(curl -sSfL 'https://api.github.com/repos/Radarr/Radarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}") - local fallback_url="https://github.com/Radarr/Radarr/releases/download/v5.9.1.9070/Radarr.master.5.9.1.9070.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Radarr/Radarr/releases/download/v5.10.4.9218/Radarr.master.5.10.4.9218.linux-core-$arch.tar.gz" fi Download_Install "$url" @@ -10846,9 +10841,6 @@ _EOF_ # APT package G_AGI raspotify - - # Temporary workaround for: https://github.com/dtcooper/raspotify/pull/674 - G_CONFIG_INJECT 'LIBRESPOT_AUTOPLAY=' 'LIBRESPOT_AUTOPLAY=on' /etc/raspotify/conf fi # Stop service From 988c1981f5f758f6a4f6a6ec6a6c6fbdbe51be75 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 2 Oct 2024 23:41:10 +0200 Subject: [PATCH 417/458] v9.8 - ROCK 4 | Resolved an issue where a false APT component was applied for your APT server, leading to errors and missing kernel/firmware upgrades. Many thanks to `@cdlenfert` for reporting this issue: https://dietpi.com/forum/t/20771 --- .update/pre-patches | 24 ++++++++++++++++++++++++ CHANGELOG.txt | 1 + dietpi/func/dietpi-set_software | 18 ++++++++++++------ 3 files changed, 37 insertions(+), 6 deletions(-) diff --git a/.update/pre-patches b/.update/pre-patches index a7715faad7..a5dea649f6 100755 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -429,5 +429,29 @@ then fi fi +# v9.8 +if (( $G_DIETPI_VERSION_CORE < 9 || ( $G_DIETPI_VERSION_CORE == 9 && $G_DIETPI_VERSION_SUB < 8 ) )) +then + # https://dietpi.com/forum/t/20771 + if (( $G_HW_MODEL == 72 )) + then + G_DIETPI-NOTIFY 2 'Fix ROCK 4 APT component' + if dpkg-query -s 'linux-u-boot-rockpi-4b-current' &> /dev/null + then + all_components='rock4' + + elif dpkg-query -s 'linux-u-boot-rock-4se-current' &> /dev/null + then + all_components='rock4se' + + elif dpkg-query -s 'linux-u-boot-rockpi-4cplus-current' &> /dev/null + then + all_components='rock4cplus' + fi + G_EXEC sed -i '\|^deb https://dietpi.com/apt all |d' /etc/apt/sources.list.d/dietpi.list + G_EXEC eval "echo 'deb https://dietpi.com/apt all $all_components' >> /etc/apt/sources.list.d/dietpi.list" + fi +fi + exit 0 } diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 55667e20fb..3faa915174 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -8,6 +8,7 @@ Enhancements: Bug fixes: - NanoPi M3/T3 | Resolved an issue where our recent image did not boot because the bootloader did not define a default device tree path anymore. Many thanks to @rozcietrzewiacz for reporting this issue: https://github.com/MichaIng/DietPi/issues/2630#issuecomment-2322085507 - NanoPi R5S/R5C | Resolved an issue where the Ethernet LEDs did not work on systems upgraded from the legacy Linux 5.10 kernel. Many thanks to @innovodev for reporting this issue: https://dietpi.com/forum/t/21026 +- ROCK 4 | Resolved an issue where a false APT component was applied for your APT server, leading to errors and missing kernel/firmware upgrades. Many thanks to @cdlenfert for reporting this issue: https://dietpi.com/forum/t/20771 - DietPi-Services | Resolved an issue where the nfs-kernel-server service did show mode "alias". "nfs-kernel-server" is indeed an alias for the actual service name "nfs-server", which is now used. - DietPi-Config | Resolved an issue where username and password in proxy settings could not be cleared, since the inputbox kept asking for an non-empty input. Many thanks to @dipisoft for reporting this issue: https://github.com/MichaIng/DietPi/issues/7211 - DietPi-Software | NoMachine: Resolved an issue where the installation failed due to an outdated download URL. Many thanks to @tzvi208 for reporting this issue: https://github.com/MichaIng/DietPi/issues/7198 diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index 5a39ef5324..dc6d7d1fc2 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -228,12 +228,18 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R 3) all_components='rock4cplus';; *) [[ -f '/etc/apt/sources.list.d/dietpi.list' ]] && all_components=$(sed -n '/ all /{s/^.* all //p;q}' /etc/apt/sources.list.d/dietpi.list) - [[ $all_components ]] || for i in rock{pi-4b,-4se,pi-4cplus} - do - dpkg-query -s "linux-u-boot-$i-current" &> /dev/null || continue - all_components=${i/-//} - break - done + [[ $all_components ]] || if dpkg-query -s 'linux-u-boot-rockpi-4b-current' &> /dev/null + then + all_components='rock4' + + elif dpkg-query -s 'linux-u-boot-rock-4se-current' &> /dev/null + then + all_components='rock4se' + + elif dpkg-query -s 'linux-u-boot-rockpi-4cplus-current' &> /dev/null + then + all_components='rock4cplus' + fi ;; esac ;; From e7d4053f71f53d8a534517b1a79f59c12b434789 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 3 Oct 2024 21:56:03 +0200 Subject: [PATCH 418/458] v9.8 - DietPi-Software | Home Assistant: Resolved an issue where the latest Home Assistant version did not start. Many thanks to @whyisthisbroken and others for reporting this issue: https://github.com/MichaIng/DietPi/issues/7231 - DietPi-Software | Update fallback URLs --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 3faa915174..971109df8d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -13,6 +13,7 @@ Bug fixes: - DietPi-Config | Resolved an issue where username and password in proxy settings could not be cleared, since the inputbox kept asking for an non-empty input. Many thanks to @dipisoft for reporting this issue: https://github.com/MichaIng/DietPi/issues/7211 - DietPi-Software | NoMachine: Resolved an issue where the installation failed due to an outdated download URL. Many thanks to @tzvi208 for reporting this issue: https://github.com/MichaIng/DietPi/issues/7198 - DietPi-Software | Raspotify: Resolved an issue where the service failed to start with the latest Raspotify release, since it contains a config, incompatible with the bundles librespot: https://github.com/dtcooper/raspotify/pull/674 +- DietPi-Software | Home Assistant: Resolved an issue where the latest Home Assistant version did not start. Many thanks to @whyisthisbroken and others for reporting this issue: https://github.com/MichaIng/DietPi/issues/7231 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 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index e9c979cb18..12695105e1 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -7562,7 +7562,7 @@ _EOF_ local json=() [[ $PHP_VERSION == 8* ]] || aDEPS+=("php$PHP_VERSION-json") json=('json') - local fallback_url="https://github.com/ampache/ampache/releases/download/6.6.1/ampache-6.6.1_all_php$PHP_VERSION.zip" + local fallback_url="https://github.com/ampache/ampache/releases/download/6.6.3/ampache-6.6.3_all_php$PHP_VERSION.zip" Download_Install "$(curl -sSfL 'https://api.github.com/repos/ampache/ampache/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/ampache-[0-9\.]*_all_php$PHP_VERSION.zip\"$/{print \$4}")" ampache # Reinstall: Preserve configs from old and new paths @@ -11375,9 +11375,8 @@ if [ \$(whoami) != '$ha_user' ]; then kill -INT \$\$ fi cd $ha_home -export PYENV_ROOT='$ha_home/.pyenv' -export PATH=\"\$PYENV_ROOT/bin:\$PATH\" -eval \"\$(pyenv init --path)\" +# Permit uv to install into system Python: https://github.com/astral-sh/uv/issues/7907 +export PATH=\"$ha_home/.pyenv/bin:\$PATH\" UV_SYSTEM_PYTHON=1 eval \"\$(pyenv init -)\" [ -f '.cargo/env' ] && . .cargo/env" > "$ha_home/pyenv-activate.sh" @@ -11797,7 +11796,7 @@ _EOF_ *) local arch='amd64';; esac - local fallback_url="https://github.com/filebrowser/filebrowser/releases/download/v2.31.1/linux-$arch-filebrowser.tar.gz" + local fallback_url="https://github.com/filebrowser/filebrowser/releases/download/v2.31.2/linux-$arch-filebrowser.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/filebrowser/filebrowser/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/linux-$arch-filebrowser\.tar\.gz\"$/{print \$4}")" ./filebrowser/ # Reinstall From d3c970c1cca8a603b04f96aa0aaaa38800cdebbf Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 3 Oct 2024 23:59:33 +0200 Subject: [PATCH 419/458] v9.8 - DietPi-Software | Home Assistant: Fix dependency path, as with "uv", the target is the site-packages directory, instead of the Python home. --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 12695105e1..42b78ba684 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -11362,7 +11362,7 @@ _EOF_ # Reset and merge pyenv and HA Python environment to avoid version mismatches on Python upgrades: https://github.com/MichaIng/DietPi/issues/6117 [[ -d '/mnt/dietpi_userdata/homeassistant/deps' ]] && G_EXEC rm -R /mnt/dietpi_userdata/homeassistant/deps - G_EXEC ln -sf "$ha_home/.pyenv/versions/$ha_python_version" /mnt/dietpi_userdata/homeassistant/deps + G_EXEC ln -sf "$ha_home/.pyenv/versions/$ha_python_version/lib/python${ha_python_version%.*}/site-packages" /mnt/dietpi_userdata/homeassistant/deps # Disable pip cache G_EXEC mkdir -p "$ha_home/.pip" From f2ec267b5ddc5f031557d80467a20171b492ac6a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 8 Oct 2024 00:35:41 +0200 Subject: [PATCH 420/458] v9.8 - DietPi-FirstBoot | The network time sync mirror configured in dietpi.txt is now applied before the first time sync is done, instead of after login and initial DietPi update. Many thanks to `@bigops` for making us aware of this: https://dietpi.com/forum/t/21600 --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 4 +- dietpi/func/dietpi-set_software | 84 ++++++++++--------- .../lib/dietpi/services/dietpi-firstboot.bash | 7 +- 4 files changed, 53 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 971109df8d..114a9a2e81 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,6 +2,7 @@ v9.8 (2024-09-21) Enhancements: +- DietPi-FirstBoot | The network time sync mirror configured in dietpi.txt is now applied before the first time sync is done, instead of after login and initial DietPi update. Many thanks to @bigops for making us aware of this: https://dietpi.com/forum/t/21600 - DietPi-Software | NoMachine: Our install option will now always download the latest NoMachine version, instead of a hardcoded one depending on the DietPi version. Many thanks to @tzvi208 for for figuring it out to version-agnostic download URLs: https://github.com/MichaIng/DietPi/issues/7198 - DietPi-Software | Portainer: It has been enabled to accept private/custom CA certificates by using the trusted CA certificates of the host, instead of the ones shipped with the container image. Many thanks to @oldboys92 for implementing this enhancement: https://github.com/MichaIng/DietPi/pull/7217 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 42b78ba684..6839d5c5c0 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -14492,7 +14492,6 @@ _EOF_ local AUTOINSTALL_FILESERVERINDEX=$(sed -n '/^[[:blank:]]*AUTO_SETUP_FILE_SERVER_INDEX=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) # pre-v7.9 local AUTOINSTALL_LOGGINGINDEX=$(sed -n '/^[[:blank:]]*AUTO_SETUP_LOGGING_INDEX=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) AUTOINSTALL_CUSTOMSCRIPTURL=$(sed -n '/^[[:blank:]]*AUTO_SETUP_CUSTOM_SCRIPT_EXEC=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) - local AUTOINSTALL_TIMESYNCMODE=$(sed -n '/^[[:blank:]]*CONFIG_NTP_MODE=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) local AUTOINSTALL_RESTORE=$(sed -n '/^[[:blank:]]*AUTO_SETUP_BACKUP_RESTORE=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) local AUTOINSTALL_RAMLOG_SIZE=$(sed -n '/^[[:blank:]]*AUTO_SETUP_RAMLOG_MAXSIZE=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) AUTO_SETUP_DHCP_TO_STATIC=$(grep -cm1 '^[[:blank:]]*AUTO_SETUP_DHCP_TO_STATIC=1' /boot/dietpi.txt) @@ -14503,7 +14502,6 @@ _EOF_ [[ $AUTOINSTALL_FILESERVERINDEX ]] || AUTOINSTALL_FILESERVERINDEX=0 # pre-v7.9 [[ $AUTOINSTALL_LOGGINGINDEX ]] || AUTOINSTALL_LOGGINGINDEX=-1 [[ $AUTOINSTALL_CUSTOMSCRIPTURL ]] || AUTOINSTALL_CUSTOMSCRIPTURL=0 - [[ $AUTOINSTALL_TIMESYNCMODE ]] || AUTOINSTALL_TIMESYNCMODE=2 [[ $AUTOINSTALL_RESTORE ]] || AUTOINSTALL_RESTORE=0 [[ $AUTOINSTALL_RAMLOG_SIZE ]] || AUTOINSTALL_RAMLOG_SIZE=50 @@ -14658,7 +14656,7 @@ _EOF_ findmnt /var/log > /dev/null && G_EXEC mount -o remount /var/log # Set time sync mode if no container system - (( $G_HW_MODEL == 75 )) || /boot/dietpi/func/dietpi-set_software ntpd-mode "$AUTOINSTALL_TIMESYNCMODE" + (( $G_HW_MODEL == 75 )) || /boot/dietpi/func/dietpi-set_software ntpd-mode # Apply choice and preference system settings Apply_SSHServer_Choices "$AUTOINSTALL_SSHINDEX" diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index dc6d7d1fc2..4e2f828edb 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -19,6 +19,7 @@ $FP_SCRIPT useradd X=create user with name X and default permissions, using g $FP_SCRIPT apt-mirror |default $FP_SCRIPT apt clean|reset|cache|lists|archives|compress [enable|disable|ram|disk] $FP_SCRIPT ntpd-mode [0-4] Time sync modes: 0=custom|1=boot|2=boot+daily|3=boot+hourly|4=daemon+drift +$FP_SCRIPT timesync-mirror Apply network time sync mirror from dietpi.txt $FP_SCRIPT verify_dietpi.txt Verifies dietpi.txt entries, adds missing entries if required $FP_SCRIPT passwords NULL=Prompt user to change DietPi related passwords | X=optional set X as global password for future dietpi-software installations and \"root\" + \"dietpi\" login passwords. $FP_SCRIPT boot_wait_for_network [01] Enable or disable waiting for network interface configuration before DietPi-PostBoot is started, including postboot.d custom scripts and service startups @@ -431,52 +432,58 @@ deb $INPUT_MODE_VALUE $G_DISTRO_NAME-backports main contrib non-free' > /etc/apt #///////////////////////////////////////////////////////////////////////////////////// # ntpd-mode: Also sets mirror as defined in dietpi.txt CONFIG_NTP_MIRROR #///////////////////////////////////////////////////////////////////////////////////// - TimeSync_Main() + TimeSync_Mirror() { - if [[ ! $INPUT_MODE_VALUE || $INPUT_MODE_VALUE == [0-4] ]] - then - # If no input given, re-apply current dietpi.txt setting, else revert to default mode 2 - [[ $INPUT_MODE_VALUE ]] || INPUT_MODE_VALUE=$(sed -n '/^[[:blank:]]*CONFIG_NTP_MODE=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) - [[ $INPUT_MODE_VALUE ]] || INPUT_MODE_VALUE=2 - - local ntp_mirror=$(sed -n '/^[[:blank:]]*CONFIG_NTP_MIRROR=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) - [[ $ntp_mirror ]] || ntp_mirror='default' + local ntp_mirror=$(sed -n '/^[[:blank:]]*CONFIG_NTP_MIRROR=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) + [[ $ntp_mirror ]] || ntp_mirror='default' - # Gateway, auto detect local gateway(s)/router(s) to use as NTP server(s). - if [[ ${ntp_mirror,,} == 'gateway' ]] + # Gateway, auto detect local gateway(s)/router(s) to use as NTP server(s). + if [[ ${ntp_mirror,,} == 'gateway' ]] + then + # Convert mawk output to single line via ORS, remove trailing space afterwards + local gateway=$(ip r l 0/0 | mawk '{print $3}' ORS=' '); gateway=${gateway% } + if [[ $gateway ]] then - # Convert mawk output to single line via ORS, remove trailing space afterwards - local gateway=$(ip r l 0/0 | mawk '{print $3}' ORS=' '); gateway=${gateway% } - if [[ $gateway ]] + G_DIETPI-NOTIFY 0 "Gateway(s) detected: $gateway, adding as NTP server(s)." + ntp_mirror=$gateway + else + G_DIETPI-NOTIFY 1 'No local gateway detected. Reverting NTP mirror back to system defaults.' + EXIT_CODE=1 + ntp_mirror='default' + fi + fi + + # Default, lets timesyncd use DHCP server or fallback to debian.pool.ntp.org. + if [[ ${ntp_mirror,,} == 'default' ]] + then + [[ -f '/etc/systemd/timesyncd.conf' ]] && G_EXEC rm /etc/systemd/timesyncd.conf + else + local i ntp_mirror_entry + for i in $ntp_mirror + do + if [[ $i == *'pool.ntp.org' ]] then - G_DIETPI-NOTIFY 0 "Gateway(s) detected: $gateway, adding as NTP server(s)." - ntp_mirror=$gateway + ntp_mirror_entry+="0.$i 1.$i 2.$i 3.$i " else - G_DIETPI-NOTIFY 1 'No local gateway detected. Reverting NTP mirror back to system defaults.' - EXIT_CODE=1 - ntp_mirror='default' + ntp_mirror_entry+="$i " fi - fi + done - # Default, lets timesyncd use DHCP server or fallback to debian.pool.ntp.org. - if [[ ${ntp_mirror,,} == 'default' ]] - then - [[ -f '/etc/systemd/timesyncd.conf' ]] && G_EXEC rm /etc/systemd/timesyncd.conf - else - local i ntp_mirror_entry - for i in $ntp_mirror - do - if [[ $i == *'pool.ntp.org' ]] - then - ntp_mirror_entry+="0.$i 1.$i 2.$i 3.$i " - else - ntp_mirror_entry+="$i " - fi - done + # Set mirror + echo -e "[Time]\nNTP=${ntp_mirror_entry% }" > /etc/systemd/timesyncd.conf + fi + } - # Set mirror - echo -e "[Time]\nNTP=${ntp_mirror_entry% }" > /etc/systemd/timesyncd.conf - fi + TimeSync_Main() + { + if [[ ! $INPUT_MODE_VALUE || $INPUT_MODE_VALUE == [0-4] ]] + then + # Apply mirror as well + TimeSync_Mirror + + # If no input given, re-apply current dietpi.txt setting, else revert to default mode 2 + [[ $INPUT_MODE_VALUE ]] || INPUT_MODE_VALUE=$(sed -n '/^[[:blank:]]*CONFIG_NTP_MODE=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) + [[ $INPUT_MODE_VALUE == [0-4] ]] || INPUT_MODE_VALUE=2 # Daemon mode: dbus required for timedatectl which users may expect if [[ $INPUT_MODE_VALUE == 4 ]] @@ -897,6 +904,7 @@ deb $INPUT_MODE_VALUE $G_DISTRO_NAME-backports main contrib non-free' > /etc/apt 'apt'|'apt-cache') Apt_Main;; # Pre-v8.4: Backwards compatibility for "apt-cache" => "apt cache" 'useradd') Useradd_Main;; 'ntpd-mode') TimeSync_Main;; + 'timesync-mirror') TimeSync_Mirror;; 'allo') Allo_Main;; 'verify_dietpi.txt') Verify_DietPi_Txt;; 'locale') Locale_Main;; diff --git a/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash b/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash index 154914524b..b3a26db6b8 100755 --- a/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash +++ b/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash @@ -235,6 +235,9 @@ _EOF_ fi + # Disable serial console if set in dietpi.txt + grep -q '^[[:blank:]]*CONFIG_SERIAL_CONSOLE_ENABLE=0' /boot/dietpi.txt && /boot/dietpi/func/dietpi-set_hardware serialconsole disable + # Regenerate unique Dropbear host keys local i type for i in /etc/dropbear/dropbear_*_host_key @@ -251,8 +254,8 @@ _EOF_ # Apply SSH password login setting /boot/dietpi/func/dietpi-set_software disable_ssh_password_logins - # Disable serial console if set in dietpi.txt - grep -q '^[[:blank:]]*CONFIG_SERIAL_CONSOLE_ENABLE=0' /boot/dietpi.txt && /boot/dietpi/func/dietpi-set_hardware serialconsole disable + # Apply network time sync mirror + /boot/dietpi/func/dietpi-set_software timesync-mirror # Apply forced Ethernet link speed if set in dietpi.txt /boot/dietpi/func/dietpi-set_hardware eth-forcespeed "$(sed -n '/^[[:blank:]]*AUTO_SETUP_NET_ETH_FORCE_SPEED=/{s/^[^=]*=//p;q}' /boot/dietpi.txt)" From 20d5848e3385dc7c13f25ff71b5e55a2eec1bd8f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 8 Oct 2024 00:40:07 +0200 Subject: [PATCH 421/458] v9.8 - DietPi-Config | Make use of new function to apply the network time sync mirror without re-applying the mode in the same turn --- dietpi/dietpi-config | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 6498f34d28..43f59ac843 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -3790,8 +3790,7 @@ NB: If you need to use *.pool.ntp.org servers, enter the base domain only. The s fi G_CONFIG_INJECT 'CONFIG_NTP_MIRROR=' "CONFIG_NTP_MIRROR=$G_WHIP_RETURNED_VALUE" /boot/dietpi.txt - local mode=$(sed -n '/^[[:blank:]]*CONFIG_NTP_MODE=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) - /boot/dietpi/func/dietpi-set_software ntpd-mode "${mode:=2}" + /boot/dietpi/func/dietpi-set_software timesync-mirror # Run time sync only if not currently running, to avoid concurrent execution if dietpi-config was called from DietPi-Run_NTPD error handler # - Run non-interactively to avoid its internal error handler allowing to open a concurrent dietpi-config instance @@ -3800,7 +3799,7 @@ NB: If you need to use *.pool.ntp.org servers, enter the base domain only. The s G_WHIP_MSG "Time sync failed with mirror: $G_WHIP_RETURNED_VALUE\n\nReverting to previous mirror: $ntp_mirror_current" G_CONFIG_INJECT 'CONFIG_NTP_MIRROR=' "CONFIG_NTP_MIRROR=$ntp_mirror_current" /boot/dietpi.txt - /boot/dietpi/func/dietpi-set_software ntpd-mode "$mode" + /boot/dietpi/func/dietpi-set_software timesync-mirror ;; 'Dynamic DNS') /boot/dietpi/dietpi-ddns;; From 017698e2db8845224e12f1014982562546f1626e Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 8 Oct 2024 02:29:46 +0200 Subject: [PATCH 422/458] v9.8 - Bullseye | Solved an issue with our Bullseye images, where the FAT setup partition was not detected, preventing import of config files from it, as well as proper root filesystem expansion. Many thanks to @rozcietrzewiacz for reporting this issue and detecting the actual underlying reason for it: https://github.com/MichaIng/DietPi/issues/2630 --- CHANGELOG.txt | 1 + rootfs/var/lib/dietpi/services/fs_partition_resize.sh | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 114a9a2e81..843e0f8596 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -10,6 +10,7 @@ Bug fixes: - NanoPi M3/T3 | Resolved an issue where our recent image did not boot because the bootloader did not define a default device tree path anymore. Many thanks to @rozcietrzewiacz for reporting this issue: https://github.com/MichaIng/DietPi/issues/2630#issuecomment-2322085507 - NanoPi R5S/R5C | Resolved an issue where the Ethernet LEDs did not work on systems upgraded from the legacy Linux 5.10 kernel. Many thanks to @innovodev for reporting this issue: https://dietpi.com/forum/t/21026 - ROCK 4 | Resolved an issue where a false APT component was applied for your APT server, leading to errors and missing kernel/firmware upgrades. Many thanks to @cdlenfert for reporting this issue: https://dietpi.com/forum/t/20771 +- Bullseye | Solved an issue with our Bullseye images, where the FAT setup partition was not detected, preventing import of config files from it, as well as proper root filesystem expansion. Many thanks to @rozcietrzewiacz for reporting this issue and detecting the actual underlying reason for it: https://github.com/MichaIng/DietPi/issues/2630 - DietPi-Services | Resolved an issue where the nfs-kernel-server service did show mode "alias". "nfs-kernel-server" is indeed an alias for the actual service name "nfs-server", which is now used. - DietPi-Config | Resolved an issue where username and password in proxy settings could not be cleared, since the inputbox kept asking for an non-empty input. Many thanks to @dipisoft for reporting this issue: https://github.com/MichaIng/DietPi/issues/7211 - DietPi-Software | NoMachine: Resolved an issue where the installation failed due to an outdated download URL. Many thanks to @tzvi208 for reporting this issue: https://github.com/MichaIng/DietPi/issues/7198 diff --git a/rootfs/var/lib/dietpi/services/fs_partition_resize.sh b/rootfs/var/lib/dietpi/services/fs_partition_resize.sh index cf74b97788..f806c7f808 100755 --- a/rootfs/var/lib/dietpi/services/fs_partition_resize.sh +++ b/rootfs/var/lib/dietpi/services/fs_partition_resize.sh @@ -44,8 +44,7 @@ # Check if the last partition contains a FAT filesystem with DIETPISETUP label REBOOT=0 - LAST_PART=$(lsblk -nrbo FSTYPE,LABEL "$ROOT_DRIVE" | tail -1) - if [[ $LAST_PART == 'vfat DIETPISETUP' ]] + if [[ $(lsblk -no LABEL "$ROOT_DRIVE" | tail -1) == 'DIETPISETUP' ]] then SETUP_PART=$(sfdisk -lqo DEVICE "$ROOT_DRIVE" | tail -1) echo "[ INFO ] Detected trailing DietPi setup partition $SETUP_PART" @@ -86,7 +85,7 @@ umount -v "$BOOT_PART" rmdir -v "$TMP_MOUNT" else - echo "[ INFO ] No DietPi setup partition found, last partition is: \"$LAST_PART\"" + echo '[ INFO ] No DietPi setup partition found:' lsblk -po NAME,LABEL,SIZE,TYPE,FSTYPE,MOUNTPOINT "$ROOT_DRIVE" fi From 3516a6f196e4324c4b6a95aa14978cea52a1ccce Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 8 Oct 2024 15:31:00 +0200 Subject: [PATCH 423/458] v9.8 - DietPi-Imager | Skip lowering number of xz compression threads manually in case of limited RAM. This was needed with 7zip, but xz does it automatically, even too strict. By default, it loweres the number of threads until 25% of physical RAM are used for compresssion. We raise this to 50% for now: https://github.com/MichaIng/DietPi/issues/7234 --- .build/images/dietpi-imager | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.build/images/dietpi-imager b/.build/images/dietpi-imager index 7c5f21817e..61b93e7e34 100755 --- a/.build/images/dietpi-imager +++ b/.build/images/dietpi-imager @@ -761,11 +761,8 @@ _EOF_ (( $SKIP_ARCHIVE )) && exit 0 # Generate xz archive - # NB: LZMA2 ultra compression requires much memory per thread. 1 GiB is not sufficient for >2 threads, hence use "-T2" to limit used CPU threads to "2" on 1 GiB devices with more than two cores. - local threads=0 - (( $(free -m | mawk '/Mem:/{print $2}') < 1750 && $(nproc) > 2 )) && threads=2 [[ -f $OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz ]] && G_EXEC rm "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz" - G_EXEC_DESC='Creating final xz archive' G_EXEC xz -9e -k "-T$threads" "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT" + G_EXEC_DESC='Creating final xz archive' G_EXEC xz -9e -T0 -M50% -k "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT" G_EXEC_DESC='Generating SHA256 hash' G_EXEC eval "sha256sum '$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz' > '$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz.sha256'" local signature=() sig_text='' [[ $SIGN_PASS ]] && { G_DIETPI-NOTIFY 2 'Signing archive ...'; gpg --batch --pinentry-mode loopback --passphrase "$SIGN_PASS" -b --armor "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz" || exit 1; signature=("$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz.asc") sig_text="\nSignature: $PWD/${signature[*]}"; } From 6ac5576f619032b04f976f22f3f2514028cb06df Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 8 Oct 2024 16:43:58 +0200 Subject: [PATCH 424/458] v9.8 - RC up --- .update/version | 2 +- CHANGELOG.txt | 2 +- dietpi/func/dietpi-globals | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.update/version b/.update/version index 47a6b7f53e..2cb5377cf2 100644 --- a/.update/version +++ b/.update/version @@ -3,7 +3,7 @@ # Available DietPi version G_REMOTE_VERSION_CORE=9 G_REMOTE_VERSION_SUB=8 -G_REMOTE_VERSION_RC=-1 +G_REMOTE_VERSION_RC=0 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=7 G_MIN_VERSION_SUB=0 diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 843e0f8596..0833795e31 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,5 @@ v9.8 -(2024-09-21) +(2024-10-09) Enhancements: - DietPi-FirstBoot | The network time sync mirror configured in dietpi.txt is now applied before the first time sync is done, instead of after login and initial DietPi update. Many thanks to @bigops for making us aware of this: https://dietpi.com/forum/t/21600 diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 8f9a64dcbf..8a6d02944d 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -55,7 +55,7 @@ # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=9 [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=8 - [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=-1 + [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=0 [[ $G_GITBRANCH ]] || G_GITBRANCH='master' [[ $G_GITOWNER ]] || G_GITOWNER='MichaIng' # - Save current version and Git branch From 5d56aab29cec4b24b054ff312ad661c7b68fd95d Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 8 Oct 2024 16:52:07 +0200 Subject: [PATCH 425/458] v9.8 - META | DietPi-Survey_report: Add code comment about printf workaround since recent bash update on Debian Trixie and above. --- .meta/dietpi-survey_report | 1 + 1 file changed, 1 insertion(+) diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index 2507c0b98a..7aa44a394f 100755 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -1010,6 +1010,7 @@ shopt -s extglob #aBENCH_RESULT_CPU_MIN[i]=$(printf '%.2f' "${aBENCH_RESULT_CPU_MIN[i]}e-2") #aBENCH_RESULT_CPU_MAX[i]=$(printf '%.2f' "${aBENCH_RESULT_CPU_MAX[i]}e-2") #aBENCH_RESULT_CPU_AVG[i]=$(printf '%.2f' "$((${aBENCH_RESULT_CPU_AVG[i]}*10/${aBENCH_CPU_INDEX[i]}+1))e-3") + # - Workaround for current bash printf bug: https://bugs.debian.org/1078556 aBENCH_RESULT_CPU_MIN[i]=$(mawk "{printf \"%.2f\", ${aBENCH_RESULT_CPU_MIN[i]}e-2}" <<< '') aBENCH_RESULT_CPU_MAX[i]=$(mawk "{printf \"%.2f\", ${aBENCH_RESULT_CPU_MAX[i]}e-2}" <<< '') aBENCH_RESULT_CPU_AVG[i]=$(mawk "{printf \"%.2f\", $((${aBENCH_RESULT_CPU_AVG[i]}*10/${aBENCH_CPU_INDEX[i]}+1))e-3}" <<< '') From efadd9e86a4ee43584a2c0982e51d2d27abb23da Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 8 Oct 2024 16:57:11 +0200 Subject: [PATCH 426/458] v9.8 - DietPi-Patches | Do not install Ethernet LED udev rules on NanoPC T6 --- .update/patches | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.update/patches b/.update/patches index c851b162b4..fa4a80b237 100755 --- a/.update/patches +++ b/.update/patches @@ -1990,10 +1990,10 @@ _EOF_ then local model='R6S' [[ $( /dev/null && model='R6C' - G_DIETPI-NOTIFY 2 "Updating udev rule for NanoPi $model Ethernet LEDs" - G_EXEC eval 'echo '\''ledtrig-netdev'\'' > /etc/modules-load.d/dietpi-eth-leds.conf' if [[ $model == 'R6S' ]] then + G_DIETPI-NOTIFY 2 'Updating udev rule for NanoPi R6S Ethernet LEDs' + G_EXEC eval 'echo '\''ledtrig-netdev'\'' > /etc/modules-load.d/dietpi-eth-leds.conf' cat << '_EOF_' > /etc/udev/rules.d/dietpi-eth-leds.rules SUBSYSTEM=="leds", KERNEL=="lan2_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth0", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev eth0", RUN+="/bin/ip l s down dev eth0" SUBSYSTEM=="leds", KERNEL=="wan_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth1", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1" @@ -2001,6 +2001,8 @@ SUBSYSTEM=="leds", KERNEL=="lan1_led", ACTION=="add", ATTR{trigger}="netdev", AT _EOF_ elif [[ $model == 'R6C' ]] then + G_DIETPI-NOTIFY 2 'Updating udev rule for NanoPi R6C Ethernet LEDs' + G_EXEC eval 'echo '\''ledtrig-netdev'\'' > /etc/modules-load.d/dietpi-eth-leds.conf' cat << '_EOF_' > /etc/udev/rules.d/dietpi-eth-leds.rules SUBSYSTEM=="leds", KERNEL=="wan_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth0", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev eth0", RUN+="/bin/ip l s down dev eth0" SUBSYSTEM=="leds", KERNEL=="lan1_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth1", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev eth1", RUN+="/bin/ip l s down dev eth1" From d12b73831d4bc09e15101e53da65597051ebac41 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 8 Oct 2024 17:00:11 +0200 Subject: [PATCH 427/458] v9.8 - DietPi-Pre-patches | Prevent pre-patch error on ROCK 4 when updating from older images which do not use the DietPi APT repository yet. In those cases, it will be correctly applied via (post-)patches. --- .update/pre-patches | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.update/pre-patches b/.update/pre-patches index a5dea649f6..f6abfb0761 100755 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -433,7 +433,7 @@ fi if (( $G_DIETPI_VERSION_CORE < 9 || ( $G_DIETPI_VERSION_CORE == 9 && $G_DIETPI_VERSION_SUB < 8 ) )) then # https://dietpi.com/forum/t/20771 - if (( $G_HW_MODEL == 72 )) + if [[ $G_HW_MODEL == 72 && -f '/etc/apt/sources.list.d/dietpi.list' ]] then G_DIETPI-NOTIFY 2 'Fix ROCK 4 APT component' if dpkg-query -s 'linux-u-boot-rockpi-4b-current' &> /dev/null From 8a7847f15eecd7455c1953c8a0d30026214aacdb Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 10 Oct 2024 00:20:29 +0200 Subject: [PATCH 428/458] v9.8 - DietPi-Imager | Allow xz using up to 75% of physical RAM --- .build/images/dietpi-imager | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build/images/dietpi-imager b/.build/images/dietpi-imager index 61b93e7e34..28704f039a 100755 --- a/.build/images/dietpi-imager +++ b/.build/images/dietpi-imager @@ -762,7 +762,7 @@ _EOF_ # Generate xz archive [[ -f $OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz ]] && G_EXEC rm "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz" - G_EXEC_DESC='Creating final xz archive' G_EXEC xz -9e -T0 -M50% -k "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT" + G_EXEC_DESC='Creating final xz archive' G_EXEC xz -9e -T0 -M75% -k "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT" G_EXEC_DESC='Generating SHA256 hash' G_EXEC eval "sha256sum '$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz' > '$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz.sha256'" local signature=() sig_text='' [[ $SIGN_PASS ]] && { G_DIETPI-NOTIFY 2 'Signing archive ...'; gpg --batch --pinentry-mode loopback --passphrase "$SIGN_PASS" -b --armor "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz" || exit 1; signature=("$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz.asc") sig_text="\nSignature: $PWD/${signature[*]}"; } From 72ca3141dc1eaa6054000f392ea812d2dae5b730 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 10 Oct 2024 20:00:19 +0200 Subject: [PATCH 429/458] v9.8 - CHANGELOG | Update release date --- CHANGELOG.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 0833795e31..7223bc3704 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,5 @@ v9.8 -(2024-10-09) +(2024-10-10) Enhancements: - DietPi-FirstBoot | The network time sync mirror configured in dietpi.txt is now applied before the first time sync is done, instead of after login and initial DietPi update. Many thanks to @bigops for making us aware of this: https://dietpi.com/forum/t/21600 From 36ff6b02ccd01629eed5ed0ced10b04f8ea22ee4 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 10 Oct 2024 23:00:33 +0200 Subject: [PATCH 430/458] v9.8 - CI | Add build script for Orange Pi Zero 2W and other SBCs' onboard Bluetooth support --- .build/software/sprd-bluetooth/build.bash | 92 +++++++++++++++++++++++ .github/workflows/sprd-bluetooth.yml | 25 ++++++ 2 files changed, 117 insertions(+) create mode 100644 .build/software/sprd-bluetooth/build.bash create mode 100644 .github/workflows/sprd-bluetooth.yml diff --git a/.build/software/sprd-bluetooth/build.bash b/.build/software/sprd-bluetooth/build.bash new file mode 100644 index 0000000000..434ce48fe2 --- /dev/null +++ b/.build/software/sprd-bluetooth/build.bash @@ -0,0 +1,92 @@ +#!/bin/bash +{ +if [[ -f '/boot/dietpi/func/dietpi-globals' ]] +then + . /boot/dietpi/func/dietpi-globals || exit 1 +else + curl -sSf "https://raw.githubusercontent.com/${G_GITOWNER:-MichaIng}/DietPi/${G_GITBRANCH:-master}/dietpi/func/dietpi-globals" -o /tmp/dietpi-globals || exit 1 + # shellcheck disable=SC1091 + . /tmp/dietpi-globals || exit 1 + G_EXEC_NOHALT=1 G_EXEC rm /tmp/dietpi-globals +fi + +G_EXEC mkdir -p sprd-bluetooth/{DEBIAN,usr/bin,lib/systemd/system} + +G_EXEC curl -fo sprd-bluetooth/usr/bin/hciattach_opi 'https://raw.githubusercontent.com/orangepi-xunlong/orangepi-build/next/external/packages/blobs/bt/hciattach/hciattach_opi_arm64' +G_EXEC chmod +x sprd-bluetooth/usr/bin/hciattach_opi +cat << '_EOF_' > sprd-bluetooth/lib/systemd/system/sprd-bluetooth.service +[Unit] +Description=Spreadtrum (sprd) Bluetooth support +After=bluetooth.service + +[Service] +RemainAfterExit=yes +ExecStart=/usr/bin/hciattach_opi -n -s 1500000 /dev/ttyBT0 sprd + +[Install] +WantedBy=multi-user.target +_EOF_ + +# Control files +# - postinst +cat << '_EOF_' > sprd-bluetooth/DEBIAN/postinst +#!/bin/sh +if [ -d '/run/systemd/system' ] +then + echo 'Configuring sprd-bluetooth systemd service ...' + systemctl unmask sprd-bluetooth + systemctl enable --now sprd-bluetooth +fi +_EOF_ + +# - prerm +cat << '_EOF_' > sprd-bluetooth/DEBIAN/prerm +#!/bin/sh +if [ "$1" = 'remove' ] && [ -d '/run/systemd/system' ] +then + if [ -f '/lib/systemd/system/sprd-bluetooth.service' ] + then + echo 'Deconfiguring sprd-bluetooth systemd service ...' + systemctl unmask sprd-bluetooth + systemctl disable --now sprd-bluetooth + fi +fi +_EOF_ + +# - postrm +cat << '_EOF_' > sprd-bluetooth/DEBIAN/postrm +#!/bin/sh +if [ "$1" = 'purge' ] +then + if [ -d '/etc/systemd/system/sprd-bluetooth.service.d' ] + then + echo 'Removing sprd-bluetooth systemd service overrides ...' + rm -Rv /etc/systemd/system/sprd-bluetooth.service.d + fi +fi +_EOF_ + +# - md5sums +find sprd-bluetooth ! \( -path sprd-bluetooth/DEBIAN -prune \) -type f -exec md5sum {} + | sed 's|sprd-bluetooth/||' > sprd-bluetooth/DEBIAN/md5sums + +# - control +cat << _EOF_ > sprd-bluetooth/DEBIAN/control +Package: sprd-bluetooth +Version: 0.0.1 +Architecture: arm64 +Maintainer: MichaIng +Date: $(date -uR) +Installed-Size: $(du -sk sprd-bluetooth | mawk '{print $1}') +Section: admin +Priority: optional +Homepage: https://github.com/RPi-Distro/sprd-bluetooth +Description: System tweaks for the Raspberry Pi, DietPi edition +_EOF_ +G_CONFIG_INJECT 'Installed-Size: ' "Installed-Size: $(du -sk sprd-bluetooth | mawk '{print $1}')" sprd-bluetooth/DEBIAN/control + +# Build DEB package +G_EXEC_OUTPUT=1 G_EXEC dpkg-deb -b -Zxz -z9 sprd-bluetooth + +# Cleanup +G_EXEC rm -R sprd-bluetooth +} diff --git a/.github/workflows/sprd-bluetooth.yml b/.github/workflows/sprd-bluetooth.yml new file mode 100644 index 0000000000..7c6a06f295 --- /dev/null +++ b/.github/workflows/sprd-bluetooth.yml @@ -0,0 +1,25 @@ +name: sprd-bluetooth +on: workflow_dispatch +concurrency: + group: ${{ github.workflow }} + cancel-in-progress: true +permissions: {} +jobs: + build: + # https://github.com/actions/runner-images + runs-on: ubuntu-24.04 + steps: + - name: Build + run: sudo bash -c "$(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/$GITHUB_REF_NAME/.build/software/sprd-bluetooth/build.bash")" + - name: Upload + run: | + # SSH server and client keys + mkdir ~/.ssh + umask 377 + echo '${{ secrets.KNOWN_HOSTS }}' > ~/.ssh/known_hosts + echo '${{ secrets.SSH_KEY }}' > ~/.ssh/id_ed25519 + + # Upload + curl -T sprd-bluetooth.deb --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}all/' + curl 'https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE }}/purge_cache' -H 'Authorization: Bearer ${{ secrets.CF_TOKEN }}' -H 'Content-Type: application/json' \ + --data '{"files":["https://dietpi.com/downloads/binaries/testing/","https://dietpi.com/downloads/binaries/testing/sprd-bluetooth.deb"]}' From 89c2dd3182b1760ce738ec824b3fe84f0760ebc1 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 10 Oct 2024 23:02:12 +0200 Subject: [PATCH 431/458] v9.8 - CI | Add new build script to master branch, required to trigger builds on GitHub --- .build/software/sprd-bluetooth/build.bash | 92 +++++++++++++++++++++++ .github/workflows/sprd-bluetooth.yml | 25 ++++++ 2 files changed, 117 insertions(+) create mode 100644 .build/software/sprd-bluetooth/build.bash create mode 100644 .github/workflows/sprd-bluetooth.yml diff --git a/.build/software/sprd-bluetooth/build.bash b/.build/software/sprd-bluetooth/build.bash new file mode 100644 index 0000000000..434ce48fe2 --- /dev/null +++ b/.build/software/sprd-bluetooth/build.bash @@ -0,0 +1,92 @@ +#!/bin/bash +{ +if [[ -f '/boot/dietpi/func/dietpi-globals' ]] +then + . /boot/dietpi/func/dietpi-globals || exit 1 +else + curl -sSf "https://raw.githubusercontent.com/${G_GITOWNER:-MichaIng}/DietPi/${G_GITBRANCH:-master}/dietpi/func/dietpi-globals" -o /tmp/dietpi-globals || exit 1 + # shellcheck disable=SC1091 + . /tmp/dietpi-globals || exit 1 + G_EXEC_NOHALT=1 G_EXEC rm /tmp/dietpi-globals +fi + +G_EXEC mkdir -p sprd-bluetooth/{DEBIAN,usr/bin,lib/systemd/system} + +G_EXEC curl -fo sprd-bluetooth/usr/bin/hciattach_opi 'https://raw.githubusercontent.com/orangepi-xunlong/orangepi-build/next/external/packages/blobs/bt/hciattach/hciattach_opi_arm64' +G_EXEC chmod +x sprd-bluetooth/usr/bin/hciattach_opi +cat << '_EOF_' > sprd-bluetooth/lib/systemd/system/sprd-bluetooth.service +[Unit] +Description=Spreadtrum (sprd) Bluetooth support +After=bluetooth.service + +[Service] +RemainAfterExit=yes +ExecStart=/usr/bin/hciattach_opi -n -s 1500000 /dev/ttyBT0 sprd + +[Install] +WantedBy=multi-user.target +_EOF_ + +# Control files +# - postinst +cat << '_EOF_' > sprd-bluetooth/DEBIAN/postinst +#!/bin/sh +if [ -d '/run/systemd/system' ] +then + echo 'Configuring sprd-bluetooth systemd service ...' + systemctl unmask sprd-bluetooth + systemctl enable --now sprd-bluetooth +fi +_EOF_ + +# - prerm +cat << '_EOF_' > sprd-bluetooth/DEBIAN/prerm +#!/bin/sh +if [ "$1" = 'remove' ] && [ -d '/run/systemd/system' ] +then + if [ -f '/lib/systemd/system/sprd-bluetooth.service' ] + then + echo 'Deconfiguring sprd-bluetooth systemd service ...' + systemctl unmask sprd-bluetooth + systemctl disable --now sprd-bluetooth + fi +fi +_EOF_ + +# - postrm +cat << '_EOF_' > sprd-bluetooth/DEBIAN/postrm +#!/bin/sh +if [ "$1" = 'purge' ] +then + if [ -d '/etc/systemd/system/sprd-bluetooth.service.d' ] + then + echo 'Removing sprd-bluetooth systemd service overrides ...' + rm -Rv /etc/systemd/system/sprd-bluetooth.service.d + fi +fi +_EOF_ + +# - md5sums +find sprd-bluetooth ! \( -path sprd-bluetooth/DEBIAN -prune \) -type f -exec md5sum {} + | sed 's|sprd-bluetooth/||' > sprd-bluetooth/DEBIAN/md5sums + +# - control +cat << _EOF_ > sprd-bluetooth/DEBIAN/control +Package: sprd-bluetooth +Version: 0.0.1 +Architecture: arm64 +Maintainer: MichaIng +Date: $(date -uR) +Installed-Size: $(du -sk sprd-bluetooth | mawk '{print $1}') +Section: admin +Priority: optional +Homepage: https://github.com/RPi-Distro/sprd-bluetooth +Description: System tweaks for the Raspberry Pi, DietPi edition +_EOF_ +G_CONFIG_INJECT 'Installed-Size: ' "Installed-Size: $(du -sk sprd-bluetooth | mawk '{print $1}')" sprd-bluetooth/DEBIAN/control + +# Build DEB package +G_EXEC_OUTPUT=1 G_EXEC dpkg-deb -b -Zxz -z9 sprd-bluetooth + +# Cleanup +G_EXEC rm -R sprd-bluetooth +} diff --git a/.github/workflows/sprd-bluetooth.yml b/.github/workflows/sprd-bluetooth.yml new file mode 100644 index 0000000000..7c6a06f295 --- /dev/null +++ b/.github/workflows/sprd-bluetooth.yml @@ -0,0 +1,25 @@ +name: sprd-bluetooth +on: workflow_dispatch +concurrency: + group: ${{ github.workflow }} + cancel-in-progress: true +permissions: {} +jobs: + build: + # https://github.com/actions/runner-images + runs-on: ubuntu-24.04 + steps: + - name: Build + run: sudo bash -c "$(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/$GITHUB_REF_NAME/.build/software/sprd-bluetooth/build.bash")" + - name: Upload + run: | + # SSH server and client keys + mkdir ~/.ssh + umask 377 + echo '${{ secrets.KNOWN_HOSTS }}' > ~/.ssh/known_hosts + echo '${{ secrets.SSH_KEY }}' > ~/.ssh/id_ed25519 + + # Upload + curl -T sprd-bluetooth.deb --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}all/' + curl 'https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE }}/purge_cache' -H 'Authorization: Bearer ${{ secrets.CF_TOKEN }}' -H 'Content-Type: application/json' \ + --data '{"files":["https://dietpi.com/downloads/binaries/testing/","https://dietpi.com/downloads/binaries/testing/sprd-bluetooth.deb"]}' From 93e59440b512e12b6e3100bc7600ec7c96f88ed9 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 10 Oct 2024 23:08:47 +0200 Subject: [PATCH 432/458] v9.8 - CI | sprd-bluetooth: Fix maintainer script permissions --- .build/software/sprd-bluetooth/build.bash | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.build/software/sprd-bluetooth/build.bash b/.build/software/sprd-bluetooth/build.bash index 434ce48fe2..9fe2242af4 100644 --- a/.build/software/sprd-bluetooth/build.bash +++ b/.build/software/sprd-bluetooth/build.bash @@ -66,6 +66,8 @@ then fi _EOF_ +G_EXEC chmod +x sprd-bluetooth/DEBIAN/{postinst,prerm,postrm} + # - md5sums find sprd-bluetooth ! \( -path sprd-bluetooth/DEBIAN -prune \) -type f -exec md5sum {} + | sed 's|sprd-bluetooth/||' > sprd-bluetooth/DEBIAN/md5sums @@ -79,8 +81,8 @@ Date: $(date -uR) Installed-Size: $(du -sk sprd-bluetooth | mawk '{print $1}') Section: admin Priority: optional -Homepage: https://github.com/RPi-Distro/sprd-bluetooth -Description: System tweaks for the Raspberry Pi, DietPi edition +Homepage: https://github.com/orangepi-xunlong/orangepi-build/tree/next/external/packages/blobs/bt/hciattach +Description: Spreadtrum (sprd) Bluetooth support _EOF_ G_CONFIG_INJECT 'Installed-Size: ' "Installed-Size: $(du -sk sprd-bluetooth | mawk '{print $1}')" sprd-bluetooth/DEBIAN/control From e857d43633d2bd667aae54de9244ff6a08093e94 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 10 Oct 2024 23:24:06 +0200 Subject: [PATCH 433/458] v9.8 - Orange Pi 3B/Zero 3/Zero 2W | Resolved an issue where enabling Bluetooth via dietpi-config did not work. Many thanks to `@ridhoperdana` for reporting this issue: https://dietpi.com/forum/t/18808 --- CHANGELOG.txt | 1 + dietpi/func/dietpi-set_hardware | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 7223bc3704..e9b8fba4b5 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -10,6 +10,7 @@ Bug fixes: - NanoPi M3/T3 | Resolved an issue where our recent image did not boot because the bootloader did not define a default device tree path anymore. Many thanks to @rozcietrzewiacz for reporting this issue: https://github.com/MichaIng/DietPi/issues/2630#issuecomment-2322085507 - NanoPi R5S/R5C | Resolved an issue where the Ethernet LEDs did not work on systems upgraded from the legacy Linux 5.10 kernel. Many thanks to @innovodev for reporting this issue: https://dietpi.com/forum/t/21026 - ROCK 4 | Resolved an issue where a false APT component was applied for your APT server, leading to errors and missing kernel/firmware upgrades. Many thanks to @cdlenfert for reporting this issue: https://dietpi.com/forum/t/20771 +- Orange Pi 3B/Zero 3/Zero 2W | Resolved an issue where enabling Bluetooth via dietpi-config did not work. Many thanks to @ridhoperdana for reporting this issue: https://dietpi.com/forum/t/18808 - Bullseye | Solved an issue with our Bullseye images, where the FAT setup partition was not detected, preventing import of config files from it, as well as proper root filesystem expansion. Many thanks to @rozcietrzewiacz for reporting this issue and detecting the actual underlying reason for it: https://github.com/MichaIng/DietPi/issues/2630 - DietPi-Services | Resolved an issue where the nfs-kernel-server service did show mode "alias". "nfs-kernel-server" is indeed an alias for the actual service name "nfs-server", which is now used. - DietPi-Config | Resolved an issue where username and password in proxy settings could not be cleared, since the inputbox kept asking for an non-empty input. Many thanks to @dipisoft for reporting this issue: https://github.com/MichaIng/DietPi/issues/7211 diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index 28f77b0d91..f0a3ddd698 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -1264,6 +1264,7 @@ Do you want to continue and disable the serial login console?' || return 1 elif [[ $G_HW_MODEL =~ ^(83|87|88)$ ]] then modprobe -n sprdbt_tty 2> /dev/null && G_EXEC eval 'echo '\''sprdbt_tty'\'' > /etc/modules-load.d/dietpi-enable_bluetooth.conf' + G_AG_CHECK_INSTALL_PREREQ sprd-bluetooth fi else From 6970aa6dcc2db2d52797e2336b3847b3282a754b Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 10 Oct 2024 23:31:17 +0200 Subject: [PATCH 434/458] v9.8 - DietPi-Set_hardware | On Orange Pi 3B/Zero 3/Zero 2W, enable Bluetooth and WiFi modules via /etc/modules-load.d as well if loading them via modprobe fails. In some cases it does, while succeeds during boot, and there is no harm to just try it, even if the module is not present at all. --- dietpi/func/dietpi-set_hardware | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index f0a3ddd698..215d1635c1 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -1263,7 +1263,7 @@ Do you want to continue and disable the serial login console?' || return 1 # Orange Pi 3B/Zero 3/Zero 2W: Module does not load automatically elif [[ $G_HW_MODEL =~ ^(83|87|88)$ ]] then - modprobe -n sprdbt_tty 2> /dev/null && G_EXEC eval 'echo '\''sprdbt_tty'\'' > /etc/modules-load.d/dietpi-enable_bluetooth.conf' + G_EXEC eval 'echo '\''sprdbt_tty'\'' > /etc/modules-load.d/dietpi-enable_bluetooth.conf' G_AG_CHECK_INSTALL_PREREQ sprd-bluetooth fi @@ -1407,7 +1407,7 @@ Do you want to continue and disable the serial login console?' || return 1 # - Orange Pi 3B/Zero 3/Zero 2W: Module does not load automatically elif [[ $G_HW_MODEL =~ ^(83|87|88)$ ]] then - modprobe -n sprdwl_ng 2> /dev/null && G_EXEC eval 'echo '\''sprdwl_ng'\'' > /etc/modules-load.d/dietpi-enable_wifi.conf' + G_EXEC eval 'echo '\''sprdwl_ng'\'' > /etc/modules-load.d/dietpi-enable_wifi.conf' fi # Remove blacklists From 87c12471cec1031f22cd91ba99110b1751a57f62 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 11 Oct 2024 00:48:58 +0200 Subject: [PATCH 435/458] v9.8 - DietPi-FirstBoot | systemd-timesyncd needs to be restarted to apply changed NTP mirrors. Also this speeds up first run setup: A sync is not done immediately after network is up, but immediately when the service is restarted and network available. --- rootfs/var/lib/dietpi/services/dietpi-firstboot.bash | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash b/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash index b3a26db6b8..c0016c2ba9 100755 --- a/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash +++ b/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash @@ -254,9 +254,6 @@ _EOF_ # Apply SSH password login setting /boot/dietpi/func/dietpi-set_software disable_ssh_password_logins - # Apply network time sync mirror - /boot/dietpi/func/dietpi-set_software timesync-mirror - # Apply forced Ethernet link speed if set in dietpi.txt /boot/dietpi/func/dietpi-set_hardware eth-forcespeed "$(sed -n '/^[[:blank:]]*AUTO_SETUP_NET_ETH_FORCE_SPEED=/{s/^[^=]*=//p;q}' /boot/dietpi.txt)" @@ -350,6 +347,10 @@ _EOF_ # - Boot wait for network /boot/dietpi/func/dietpi-set_software boot_wait_for_network "$(( ! $(grep -cm1 '^[[:blank:]]*AUTO_SETUP_BOOT_WAIT_FOR_NETWORK=0' /boot/dietpi.txt) ))" + # Apply network time sync mirror and force sync now to speed up first run setup + /boot/dietpi/func/dietpi-set_software timesync-mirror + systemctl restart systemd-timesyncd + # x86_64 BIOS: Set GRUB install device: https://github.com/MichaIng/DietPi/issues/4542 if (( $G_HW_MODEL == 10 )) && dpkg-query -s grub-pc &> /dev/null then From 64af7e97e659e47fbf41a81d5f0a2193bd45d267 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 11 Oct 2024 16:44:27 +0200 Subject: [PATCH 436/458] v9.8 - DietPi-Config | Fix SPI bootloader flash option for Orange Pi 5 and probably other SBCs, where the flashing script does not contain the SPI device anymore, but requires it as 2nd argument instead. --- dietpi/dietpi-config | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 43f59ac843..020460a39d 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -933,15 +933,13 @@ Re-enabling HDMI requires a reboot. If you need emergency HDMI output, edit the fi # Odroid N2, ROCK 4, ROCK 5B, Orange Pi 5 (Plus) and Orange Pi 3B: https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457 - elif [[ $G_HW_MODEL =~ ^(15|72|78|80|82|87)$ ]] + elif [[ $G_HW_MODEL =~ ^(15|72|78|80|82|87)$ && -f '/usr/lib/u-boot/platform_install.sh' ]] then # Odroid N2/ROCK 4: Device tree overlay required local spidev='/dev/mtdblock0' (( $G_HW_MODEL == 15 || $G_HW_MODEL == 72 )) || { - [[ -f '/usr/lib/u-boot/platform_install.sh' ]] && { - { [[ -e '/dev/mtd0' ]] && grep -q '/dev/mtd0' /usr/lib/u-boot/platform_install.sh && spidev='/dev/mtd0'; } || - { [[ -b '/dev/mtdblock0' ]] && grep -q '/dev/mtdblock0' /usr/lib/u-boot/platform_install.sh; } - } + { [[ -e '/dev/mtd0' ]] && grep -q 'flashcp' /usr/lib/u-boot/platform_install.sh && spidev='/dev/mtd0'; } || + { [[ -b '/dev/mtdblock0' ]] && ! grep -q 'flashcp' /usr/lib/u-boot/platform_install.sh; } } && G_WHIP_MENU_ARRAY+=('Update SPI bootloader' ": Flash current U-Boot to $spidev") # VisionFive 2/Star64: https://doc-en.rvspace.org/VisionFive2/PDF/VisionFive2_QSG.pdf @@ -1143,7 +1141,7 @@ Further information: https://www.raspberrypi.org/documentation/hardware/raspberr . /usr/lib/u-boot/platform_install.sh eval "$(declare -f write_uboot_platform_mtd | sed -e 's| > /dev/null 2>&1||g' -e 's|status=none|status=progress|g' -e 's/^[[:blank:]]*dd /dd oflag=direct conv=notrunc status=progress /')" # shellcheck disable=SC2154 - write_uboot_platform_mtd "$DIR" + write_uboot_platform_mtd "$DIR" "$spidev" elif [[ $G_WHIP_RETURNED_VALUE == 'Update bootloader' ]]; then From ccf0ec4e87f96c497033d07094acc5a82a5c8f63 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 12 Oct 2024 17:08:52 +0200 Subject: [PATCH 437/458] v9.8 - DietPi-Software | Apply a minimum restart limit of 3 per minute consequently for all services with "Restart=on-failure". --- dietpi/dietpi-software | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 6839d5c5c0..cef7f0ebcc 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6140,7 +6140,7 @@ Wants=network-online.target nss-lookup.target After=network-online.target Before=nss-lookup.target StartLimitIntervalSec=60 -StartLimitBurst=5 +StartLimitBurst=3 [Service] User=adguardhome @@ -6246,6 +6246,8 @@ Description=navidrome (DietPi) Wants=network-online.target After=network-online.target remote-fs.target AssertPathExists=/mnt/dietpi_userdata/navidrome +StartLimitIntervalSec=60 +StartLimitBurst=3 [Service] User=navidrome @@ -6343,7 +6345,7 @@ Description=Kavita Server (DietPi) Wants=network-online.target After=network-online.target remote-fs.target StartLimitIntervalSec=60 -StartLimitBurst=5 +StartLimitBurst=3 [Service] SyslogIdentifier=Kavita @@ -6548,7 +6550,7 @@ Description=frp server (DietPi) Wants=network-online.target After=network-online.target StartLimitIntervalSec=60 -StartLimitBurst=5 +StartLimitBurst=3 [Service] User=frp @@ -6587,7 +6589,7 @@ Description=frp client (DietPi) Wants=network-online.target After=network-online.target frps.service StartLimitIntervalSec=60 -StartLimitBurst=5 +StartLimitBurst=3 [Service] User=frp @@ -8980,7 +8982,7 @@ Description=Syncthing (DietPi) Wants=network-online.target After=network-online.target StartLimitIntervalSec=60 -StartLimitBurst=4 +StartLimitBurst=3 [Service] User=dietpi @@ -9251,6 +9253,8 @@ Description=SABnzbd (DietPi) Documentation=https://sabnzbd.org/wiki/ Wants=network-online.target After=network-online.target remote-fs.target +StartLimitIntervalSec=60 +StartLimitBurst=3 [Service] SyslogIdentifier=SABnzbd @@ -9473,6 +9477,8 @@ _EOF_ Description=Sonarr (DietPi) Wants=network-online.target After=network-online.target remote-fs.target transmission-daemon.service qbittorrent.service rtorrent.service nzbget.service deluged.service aria2.service sabnzbd.service +StartLimitIntervalSec=60 +StartLimitBurst=3 [Service] SyslogIdentifier=Sonarr @@ -9563,6 +9569,8 @@ _EOF_ Description=Radarr (DietPi) Wants=network-online.target After=network-online.target remote-fs.target transmission-daemon.service qbittorrent.service rtorrent.service nzbget.service deluged.service aria2.service sabnzbd.service +StartLimitIntervalSec=60 +StartLimitBurst=3 [Service] SyslogIdentifier=Radarr @@ -9655,6 +9663,8 @@ _EOF_ Description=Lidarr (DietPi) Wants=network-online.target After=network-online.target remote-fs.target transmission-daemon.service qbittorrent.service rtorrent.service nzbget.service deluged.service aria2.service sabnzbd.service +StartLimitIntervalSec=60 +StartLimitBurst=3 [Service] SyslogIdentifier=Lidarr @@ -9869,7 +9879,7 @@ Description=Jackett (DietPi) Wants=network-online.target After=network-online.target StartLimitIntervalSec=60 -StartLimitBurst=5 +StartLimitBurst=3 [Service] SyslogIdentifier=Jackett @@ -9999,6 +10009,8 @@ _EOF_ Description=Prowlarr (DietPi) Wants=network-online.target After=network-online.target remote-fs.target transmission-daemon.service qbittorrent.service rtorrent.service nzbget.service deluged.service aria2.service sabnzbd.service +StartLimitIntervalSec=60 +StartLimitBurst=3 [Service] SyslogIdentifier=Prowlarr @@ -10073,6 +10085,8 @@ _EOF_ Description=Readarr (DietPi) Wants=network-online.target After=network-online.target remote-fs.target transmission-daemon.service qbittorrent.service rtorrent.service nzbget.service deluged.service aria2.service sabnzbd.service +StartLimitIntervalSec=60 +StartLimitBurst=3 [Service] SyslogIdentifier=Readarr From 2ca807cfbd966991871da4f6cbc546632535494b Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 12 Oct 2024 18:20:03 +0200 Subject: [PATCH 438/458] v9.8 - DietPi-Software | Update fallback URLs --- dietpi/dietpi-software | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index cef7f0ebcc..6c5596dd75 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6213,7 +6213,7 @@ _EOF_ *) local arch='amd64';; esac - local fallback_url="https://github.com/navidrome/navidrome/releases/download/v0.53.1/navidrome_0.53.1_linux_$arch.tar.gz" + local fallback_url="https://github.com/navidrome/navidrome/releases/download/v0.53.3/navidrome_0.53.3_linux_$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/navidrome/navidrome/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/navidrome_[0-9.]*_linux_$arch\.tar\.gz\"$/{print \$4}")" /opt/navidrome # Data dir @@ -7468,7 +7468,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/1.13.0/komga-1.13.0.jar' + local fallback_url='https://github.com/gotson/komga/releases/download/1.14.0/komga-1.14.0.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 @@ -8557,7 +8557,7 @@ _EOF_ # Install ruTorrent: Web UI for rTorrent # - Grab current version local version=$(curl -sSfL 'https://api.github.com/repos/Novik/ruTorrent/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}') - [[ $version ]] || { version='v4.3.6'; G_DIETPI-NOTIFY 1 "Automatic latest ruTorrent version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } + [[ $version ]] || { version='v5.0.0'; G_DIETPI-NOTIFY 1 "Automatic latest ruTorrent version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } Download_Install "https://github.com/Novik/ruTorrent/archive/$version.tar.gz" # - Reinstall freshly with preserved configs and 3rd party plugins @@ -9546,7 +9546,7 @@ _EOF_ esac url=$(curl -sSfL 'https://api.github.com/repos/Radarr/Radarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}") - local fallback_url="https://github.com/Radarr/Radarr/releases/download/v5.10.4.9218/Radarr.master.5.10.4.9218.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Radarr/Radarr/releases/download/v5.12.2.9335/Radarr.master.5.12.2.9335.linux-core-$arch.tar.gz" fi Download_Install "$url" @@ -9644,7 +9644,7 @@ _EOF_ esac url=$(curl -sSfL 'https://api.github.com/repos/Lidarr/Lidarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}") - local fallback_url="https://github.com/Lidarr/Lidarr/releases/download/v2.5.3.4341/Lidarr.master.2.5.3.4341.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Lidarr/Lidarr/releases/download/v2.6.4.4402/Lidarr.master.2.6.4.4402.linux-core-$arch.tar.gz" fi Download_Install "$url" @@ -9992,7 +9992,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.23.1.4708/Prowlarr.master.1.23.1.4708.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.24.3.4754/Prowlarr.master.1.24.3.4754.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Prowlarr/Prowlarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}")" G_EXEC mv Prowlarr /opt/prowlarr fi @@ -10068,7 +10068,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.32.2587/Readarr.develop.0.3.32.2587.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.4.0.2634/Readarr.develop.0.4.0.2634.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Readarr/Readarr/releases' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}" | head -1)" G_EXEC mv Readarr /opt/readarr fi @@ -10638,7 +10638,7 @@ _EOF_ *) local arch='arm-6';; esac - local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.22.2/gitea-1.22.2-linux-$arch.xz" + local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.22.3/gitea-1.22.3-linux-$arch.xz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/go-gitea/gitea/releases/latest' | mawk -F\" "/\"browser_download_url\": \".*\/gitea-[^\"\/]*-linux-$arch\.xz\"/{print \$4}")" /mnt/dietpi_userdata/gitea/gitea # User @@ -11679,7 +11679,7 @@ _EOF_ *) local arch='amd64';; esac - local fallback_url="https://github.com/rclone/rclone/releases/download/v1.68.0/rclone-v1.68.0-linux-$arch.deb" + local fallback_url="https://github.com/rclone/rclone/releases/download/v1.68.1/rclone-v1.68.1-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 1e434fb49f93d3e5800e87dc15b4b3fa2d958228 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 12 Oct 2024 19:41:56 +0200 Subject: [PATCH 439/458] v9.8 - Orange Pi Zero 3 | Fix dtb for new mainline U-Boot --- .build/images/dietpi-installer | 1 - 1 file changed, 1 deletion(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index bfecdd23ae..56f029b03d 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -697,7 +697,6 @@ setenv rootuuid "true"' /boot/boot.cmd esac ;; 85) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-rock-5a.dtb' /boot/dietpiEnv.txt;; - 87) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3566-orangepi-3b.dtb' /boot/dietpiEnv.txt;; *) :;; esac # Overlay prefix From 6b0e3b27559b932cd7aa908710d70c75afc8f461 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 12 Oct 2024 22:30:12 +0200 Subject: [PATCH 440/458] v9.8 - Orange Pi 3B | Added support for board revision v2.1, where Ethernet did not work with our previous kernel. Many thanks to `@raphamotta` and others for making us aware of this: https://dietpi.com/forum/t/20689 --- .update/patches | 18 ++++++++++++++++++ CHANGELOG.txt | 1 + 2 files changed, 19 insertions(+) diff --git a/.update/patches b/.update/patches index fa4a80b237..ad48cee6df 100755 --- a/.update/patches +++ b/.update/patches @@ -2009,6 +2009,24 @@ SUBSYSTEM=="leds", KERNEL=="lan1_led", ACTION=="add", ATTR{trigger}="netdev", AT SUBSYSTEM=="leds", KERNEL=="user_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="wlan0", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1", RUN+="/bin/ip l s up dev wlan0", RUN+="/bin/ip l s down dev wlan0" _EOF_ fi + + # Orange Pi 3B: Migrate to mainline kernel device tree names + elif (( $G_HW_MODEL == 87 )) + then + G_DIETPI-NOTIFY 2 'Flashing new Orange Pi 3B bootloader to support v2.1 board revision and automatic device tree selection' + /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc + if [[ $G_ROOTFS_DEV != '/dev/mmcblk'* ]] + then + . /usr/lib/u-boot/platform_install.sh + if declare -f write_uboot_platform_mtd | grep -q 'flashcp' + then + G_AG_CHECK_INSTALL_PREREQ mtd-utils + write_uboot_platform_mtd "$DIR" /dev/mtd0 + else + write_uboot_platform_mtd "$DIR" /dev/mtdblock0 + fi + fi + G_EXEC sed -i '/^fdtfile=/d' /boot/dietpiEnv.txt fi } diff --git a/CHANGELOG.txt b/CHANGELOG.txt index e9b8fba4b5..c06aeb7186 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,6 +2,7 @@ v9.8 (2024-10-10) Enhancements: +- Orange Pi 3B | Added support for board revision v2.1, where Ethernet did not work with our previous kernel. Many thanks to @raphamotta and others for making us aware of this: https://dietpi.com/forum/t/20689 - DietPi-FirstBoot | The network time sync mirror configured in dietpi.txt is now applied before the first time sync is done, instead of after login and initial DietPi update. Many thanks to @bigops for making us aware of this: https://dietpi.com/forum/t/21600 - DietPi-Software | NoMachine: Our install option will now always download the latest NoMachine version, instead of a hardcoded one depending on the DietPi version. Many thanks to @tzvi208 for for figuring it out to version-agnostic download URLs: https://github.com/MichaIng/DietPi/issues/7198 - DietPi-Software | Portainer: It has been enabled to accept private/custom CA certificates by using the trusted CA certificates of the host, instead of the ones shipped with the container image. Many thanks to @oldboys92 for implementing this enhancement: https://github.com/MichaIng/DietPi/pull/7217 From 1ee3f536eb431752bf14fa896fce7c3a471b98a9 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 12 Oct 2024 22:48:43 +0200 Subject: [PATCH 441/458] v9.8 - DietPi-Patches | Satisfy shellcheck --- .update/patches | 1 + 1 file changed, 1 insertion(+) diff --git a/.update/patches b/.update/patches index ad48cee6df..350034c2b7 100755 --- a/.update/patches +++ b/.update/patches @@ -2017,6 +2017,7 @@ _EOF_ /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc if [[ $G_ROOTFS_DEV != '/dev/mmcblk'* ]] then + # shellcheck disable=SC1091 . /usr/lib/u-boot/platform_install.sh if declare -f write_uboot_platform_mtd | grep -q 'flashcp' then From 18b09f7fc4855e1d4dbc6bb4fec2632276bd2f7a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 13 Oct 2024 14:08:15 +0200 Subject: [PATCH 442/458] v9.8 - DietPi-Set_hardware | Minor --- dietpi/func/dietpi-set_hardware | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index 215d1635c1..28c37af28e 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -547,18 +547,18 @@ _EOF_ } #///////////////////////////////////////////////////////////////////////////////////// - # Ethernet force link speed + # eth-forcespeed: Ethernet force link speed #///////////////////////////////////////////////////////////////////////////////////// - Eth_Force_Speed_Main(){ - - if disable_error=1 G_CHECK_VALIDINT "$INPUT_DEVICE_VALUE" 1; then - + Eth_Force_Speed_Main() + { + if disable_error=1 G_CHECK_VALIDINT "$INPUT_DEVICE_VALUE" 1 + then local speed_mbit=$INPUT_DEVICE_VALUE local iface=$(G_GET_NET -t eth iface) cat << _EOF_ > /etc/systemd/system/ethtool_force_speed.service [Unit] -Description=ethtool force speed (DietPi) +Description=Enforce $speed_mbit Mbit on $iface via ethtool (DietPi) Wants=network-online.target After=network-online.target @@ -572,21 +572,17 @@ _EOF_ G_EXEC systemctl daemon-reload G_EXEC systemctl enable --now ethtool_force_speed - elif [[ $INPUT_DEVICE_VALUE == 'disable' ]]; then # 0 is converted to "disable" - + elif [[ $INPUT_DEVICE_VALUE == 'disable' ]] # 0 is converted to "disable" + then if [[ -f '/etc/systemd/system/ethtool_force_speed.service' ]] then G_EXEC systemctl disable --now ethtool_force_speed G_EXEC rm /etc/systemd/system/ethtool_force_speed.service fi [[ -d '/etc/systemd/system/ethtool_force_speed.service.d' ]] && G_EXEC rm -R /etc/systemd/system/ethtool_force_speed.service.d - else - Unknown_Input_Mode - fi - } #///////////////////////////////////////////////////////////////////////////////////// From 065dc9d8c8be2153f68c3a6f303c3f2076e012c7 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 13 Oct 2024 14:21:55 +0200 Subject: [PATCH 443/458] v9.8 - DietPi-Drive_Manager | Resolved an issue where formatting the internal eMMC in drive mode on some SBCs, like Odroid N2, failed. Many thanks to `@ankagar` for reporting this issue: https://dietpi.com/forum/t/20689/33 --- CHANGELOG.txt | 1 + dietpi/dietpi-drive_manager | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index c06aeb7186..01a9d2c203 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -13,6 +13,7 @@ Bug fixes: - ROCK 4 | Resolved an issue where a false APT component was applied for your APT server, leading to errors and missing kernel/firmware upgrades. Many thanks to @cdlenfert for reporting this issue: https://dietpi.com/forum/t/20771 - Orange Pi 3B/Zero 3/Zero 2W | Resolved an issue where enabling Bluetooth via dietpi-config did not work. Many thanks to @ridhoperdana for reporting this issue: https://dietpi.com/forum/t/18808 - Bullseye | Solved an issue with our Bullseye images, where the FAT setup partition was not detected, preventing import of config files from it, as well as proper root filesystem expansion. Many thanks to @rozcietrzewiacz for reporting this issue and detecting the actual underlying reason for it: https://github.com/MichaIng/DietPi/issues/2630 +- DietPi-Drive_Manager | Resolved an issue where formatting the internal eMMC in drive mode on some SBCs, like Odroid N2, failed. Many thanks to @ankagar for reporting this issue: https://dietpi.com/forum/t/20689/33 - DietPi-Services | Resolved an issue where the nfs-kernel-server service did show mode "alias". "nfs-kernel-server" is indeed an alias for the actual service name "nfs-server", which is now used. - DietPi-Config | Resolved an issue where username and password in proxy settings could not be cleared, since the inputbox kept asking for an non-empty input. Many thanks to @dipisoft for reporting this issue: https://github.com/MichaIng/DietPi/issues/7211 - DietPi-Software | NoMachine: Resolved an issue where the installation failed due to an outdated download URL. Many thanks to @tzvi208 for reporting this issue: https://github.com/MichaIng/DietPi/issues/7198 diff --git a/dietpi/dietpi-drive_manager b/dietpi/dietpi-drive_manager index 00e10d6ab5..15610744b9 100755 --- a/dietpi/dietpi-drive_manager +++ b/dietpi/dietpi-drive_manager @@ -574,6 +574,7 @@ Do you wish to ignore this warning, and, mount the drive regardless?" || return # - Partition wipe must be done 1st, else UUIDs are still reported. for i in "/dev/${aDRIVE_SOURCE_DEVICE[$MENU_DRIVE_INDEX]}"?* do + [[ $i == '/dev/mmcblk'[0-9]'boot'[0-9] ]] && continue # Skip /dev/mmcblk0boot0 SPI storage devices on e.g. Odroid N2 [[ -b $i ]] || continue local target=$(findmnt -Ufnro TARGET -S "$i") [[ $target ]] && { Unmount_Drive "$target" || return 1; } From 2dce8e26d280477ffc002edd4209f9657ec90133 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 13 Oct 2024 14:39:41 +0200 Subject: [PATCH 444/458] v9.8 - DietPi-Drive_Manager | Wording --- dietpi/dietpi-drive_manager | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-drive_manager b/dietpi/dietpi-drive_manager index 15610744b9..aea801fba4 100755 --- a/dietpi/dietpi-drive_manager +++ b/dietpi/dietpi-drive_manager @@ -574,7 +574,7 @@ Do you wish to ignore this warning, and, mount the drive regardless?" || return # - Partition wipe must be done 1st, else UUIDs are still reported. for i in "/dev/${aDRIVE_SOURCE_DEVICE[$MENU_DRIVE_INDEX]}"?* do - [[ $i == '/dev/mmcblk'[0-9]'boot'[0-9] ]] && continue # Skip /dev/mmcblk0boot0 SPI storage devices on e.g. Odroid N2 + [[ $i == '/dev/mmcblk'[0-9]'boot'[0-9] ]] && continue # Skip /dev/mmcblk0boot0 special boot sector eMMC partitions on e.g. Odroid N2 [[ -b $i ]] || continue local target=$(findmnt -Ufnro TARGET -S "$i") [[ $target ]] && { Unmount_Drive "$target" || return 1; } From 542404dfe5a2806f760ff347f500ffc03627d2bb Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 14 Oct 2024 15:24:44 +0200 Subject: [PATCH 445/458] v9.8 - DietPi-Software | ruTorrent: Assure that only v5 is installed, despite v4 LTS version still being released --- dietpi/dietpi-software | 1 + 1 file changed, 1 insertion(+) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 6c5596dd75..8ebfb5e8fe 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8558,6 +8558,7 @@ _EOF_ # - Grab current version local version=$(curl -sSfL 'https://api.github.com/repos/Novik/ruTorrent/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}') [[ $version ]] || { version='v5.0.0'; G_DIETPI-NOTIFY 1 "Automatic latest ruTorrent version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } + [[ $version == 'v5.'* ]] || version='v5.0.0' Download_Install "https://github.com/Novik/ruTorrent/archive/$version.tar.gz" # - Reinstall freshly with preserved configs and 3rd party plugins From 31737ce09376783e1d919800e5f94ad625d24035 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 16 Oct 2024 01:05:07 +0200 Subject: [PATCH 446/458] v9.8 - DietPi-Software | Komga: Update fallback URL --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 8ebfb5e8fe..fbbadbd0f8 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -7468,7 +7468,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/1.14.0/komga-1.14.0.jar' + local fallback_url='https://github.com/gotson/komga/releases/download/1.14.1/komga-1.14.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 From d9b8a0bf8e0668f8f8e9e4b2a13d4074c7297d2e Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 16 Oct 2024 16:11:29 +0200 Subject: [PATCH 447/458] v9.8 - DietPi-Software | Folding@Home: Resolved an issue where the installation failed. Due to larger changes in Folding@Home v8, v7 will be installed for now, before we find time to implement the needed changes for v8. Many thanks to @cruzadernl for reporting this issue: https://github.com/MichaIng/DietPi/issues/7187 --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 01a9d2c203..a9bd0e76f9 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,7 @@ Bug fixes: - DietPi-Software | NoMachine: Resolved an issue where the installation failed due to an outdated download URL. Many thanks to @tzvi208 for reporting this issue: https://github.com/MichaIng/DietPi/issues/7198 - DietPi-Software | Raspotify: Resolved an issue where the service failed to start with the latest Raspotify release, since it contains a config, incompatible with the bundles librespot: https://github.com/dtcooper/raspotify/pull/674 - DietPi-Software | Home Assistant: Resolved an issue where the latest Home Assistant version did not start. Many thanks to @whyisthisbroken and others for reporting this issue: https://github.com/MichaIng/DietPi/issues/7231 +- DietPi-Software | Folding@Home: Resolved an issue where the installation failed. Due to larger changes in Folding@Home v8, v7 will be installed for now, before we find time to implement the needed changes for v8. Many thanks to @cruzadernl for reporting this issue: https://github.com/MichaIng/DietPi/issues/7187 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 diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index fbbadbd0f8..9aeb6eff04 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -4338,8 +4338,9 @@ _EOF_ debconf-set-selections <<< 'fahclient fahclient/passkey string 06c869246e88c00cb05cc4d1758a97f9' # Passkey for user "DietPi" local arch=$(dpkg --print-architecture) - local fallback_url="https://download.foldingathome.org/releases/public/release/fahclient/debian-stable-${arch/amd64/64bit}/v7.6/latest.deb" - Download_Install "$(curl -sSfL 'https://download.foldingathome.org/' | mawk -F\" "/^ *\"url\": \".*\/fahclient_.*_$arch\.deb\"$/{print \$4}")" + local url="https://download.foldingathome.org/releases/v7/public/fahclient/debian-stable-${arch/amd64/64bit}/release" + local fallback_url="$url/fahclient_7.6.21_$arch.deb" + Download_Install "$(curl -sSfL "$url/" | mawk -F\" "/\"fahclient_.*_$arch\.deb\"/{print \"$url/\" \$2}" | sort -Vr | head -1)" # Remove obsolete config + data directories and SysV service + config [[ -d '/var/lib/fahclient' ]] && G_EXEC rm -R /var/lib/fahclient From 5f4b48076f3b876e1d64deef64a2c978f50b36d6 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 16 Oct 2024 16:52:30 +0200 Subject: [PATCH 448/458] v9.8 - DietPi-Software | Syncthing: Update fallback URL --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 9aeb6eff04..a34d913112 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8950,7 +8950,7 @@ _EOF_ *) local arch='arm';; esac - local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.27.12/syncthing-linux-$arch-v1.27.12.tar.gz" + local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.28.0/syncthing-linux-$arch-v1.28.0.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/syncthing/syncthing/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/syncthing-linux-$arch-[^\"\/]*\.tar\.gz\"/{print \$4}")" G_EXEC mv syncthing-* /opt/syncthing fi From 5af8a85df14f61bfbf99a654aeed34c1c4eb3f69 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 16 Oct 2024 17:19:34 +0200 Subject: [PATCH 449/458] v9.8 - ROCK 4 SE | Resolved an issue where WiFi did not work if Bluetooth was disabled. Many thanks to @MidG971 and @c00ldchan for reporting this issue: https://github.com/MichaIng/DietPi/issues/6943 - DietPi-Set_hardware | Do not handle hciuart service on ASUS Tinker Board, when disabling Bluetooth, which we do not handle/start when enabling Bluetooth either. --- CHANGELOG.txt | 1 + dietpi/func/dietpi-set_hardware | 42 +++++++++++++-------------------- 2 files changed, 18 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index a9bd0e76f9..2f495f3614 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -11,6 +11,7 @@ Bug fixes: - NanoPi M3/T3 | Resolved an issue where our recent image did not boot because the bootloader did not define a default device tree path anymore. Many thanks to @rozcietrzewiacz for reporting this issue: https://github.com/MichaIng/DietPi/issues/2630#issuecomment-2322085507 - NanoPi R5S/R5C | Resolved an issue where the Ethernet LEDs did not work on systems upgraded from the legacy Linux 5.10 kernel. Many thanks to @innovodev for reporting this issue: https://dietpi.com/forum/t/21026 - ROCK 4 | Resolved an issue where a false APT component was applied for your APT server, leading to errors and missing kernel/firmware upgrades. Many thanks to @cdlenfert for reporting this issue: https://dietpi.com/forum/t/20771 +- ROCK 4 SE | Resolved an issue where WiFi did not work if Bluetooth was disabled. Many thanks to @MidG971 and @c00ldchan for reporting this issue: https://github.com/MichaIng/DietPi/issues/6943 - Orange Pi 3B/Zero 3/Zero 2W | Resolved an issue where enabling Bluetooth via dietpi-config did not work. Many thanks to @ridhoperdana for reporting this issue: https://dietpi.com/forum/t/18808 - Bullseye | Solved an issue with our Bullseye images, where the FAT setup partition was not detected, preventing import of config files from it, as well as proper root filesystem expansion. Many thanks to @rozcietrzewiacz for reporting this issue and detecting the actual underlying reason for it: https://github.com/MichaIng/DietPi/issues/2630 - DietPi-Drive_Manager | Resolved an issue where formatting the internal eMMC in drive mode on some SBCs, like Odroid N2, failed. Many thanks to @ankagar for reporting this issue: https://dietpi.com/forum/t/20689/33 diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index 28c37af28e..f7169c85b9 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -1148,40 +1148,36 @@ _EOF_ #///////////////////////////////////////////////////////////////////////////////////// # Bluetooth #///////////////////////////////////////////////////////////////////////////////////// - Bluetooth_Main(){ - + Bluetooth_Main() + { local aBLUETOOTH_MODULES=( - 'bluetooth' 'bnep' 'btbcm' # RPi3 Broadcom onboard 'rfcomm' # BPi Pro/M2+ and others 'hidp' # BPi Pro/M2+ and others - 'hci_uart' ) - [[ $G_HW_MODEL =~ ^(83|87|88)$ ]] && aBLUETOOTH_MODULES+=('sprdbt_tty') # Orange Pi 3B/Zero 3/Zero 2W - - if [[ $INPUT_DEVICE_VALUE == 'disable' ]]; then + case $G_HW_MODEL in + [0-9]) (( $G_HW_ONBOARD_WIFI )) && aBLUETOOTH_MODULES+=('hci_uart');; # RPi. This kernel module is used by other SBCs, but e.g. on ROCK 4 SE it is needed as well for WiFi: https://github.com/MichaIng/DietPi/issues/6943 + 83|87|88) aBLUETOOTH_MODULES+=('sprdbt_tty');; # Orange Pi 3B/Zero 3/Zero 2W + *) :;; + esac + if [[ $INPUT_DEVICE_VALUE == 'disable' ]] + then # RPi - if (( $G_HW_MODEL < 10 )) && (( $G_HW_ONBOARD_WIFI )); then - + if (( $G_HW_MODEL < 10 )) && (( $G_HW_ONBOARD_WIFI )) + then # Do not stop the service, otherwise it cannot be started anymore until reboot. Also for this reason the service is not stopped on pi-bluetooth package removal, hence disabling it on "is-active" via "disable --now" fails due to missing service file: https://github.com/RPi-Distro/pi-bluetooth/issues/34, https://github.com/MichaIng/DietPi/issues/5435 systemctl -q is-enabled hciuart 2> /dev/null && G_EXEC systemctl disable hciuart # Disable onboard Bluetooth via device tree overlay G_CONFIG_INJECT 'dtoverlay=disable-bt' 'dtoverlay=disable-bt' /boot/config.txt - # ASUS TB - elif (( $G_HW_MODEL == 52 )) && systemctl list-unit-files 'hciuart.service' > /dev/null; then - - systemctl -q is-enabled hciuart 2> /dev/null || systemctl -q is-active hciuart && G_EXEC systemctl disable --now hciuart - # Broadcom-based models that need brcm_patchram_plus - elif [[ $G_HW_MODEL == 6[12] ]] && systemctl list-unit-files 'brcm_patchram_plus.service' > /dev/null; then - + elif [[ $G_HW_MODEL == 6[12] ]] && systemctl list-unit-files 'brcm_patchram_plus.service' > /dev/null + then systemctl -q is-enabled brcm_patchram_plus 2> /dev/null || systemctl -q is-active brcm_patchram_plus && G_EXEC systemctl disable --now brcm_patchram_plus - fi systemctl -q is-enabled bluetooth 2> /dev/null || systemctl -q is-active bluetooth && G_EXEC systemctl disable --now bluetooth @@ -1190,7 +1186,7 @@ _EOF_ [[ -f '/etc/modules-load.d/dietpi-enable_bluetooth.conf' ]] && G_EXEC rm /etc/modules-load.d/dietpi-enable_bluetooth.conf # Unload and blacklist kernel modules, bluetooth last - [[ -d '/etc/modprobe.d' ]] || G_EXEC mkdir /etc/modprobe.d + G_EXEC mkdir -p /etc/modprobe.d > /etc/modprobe.d/dietpi-disable_bluetooth.conf for ((i=$(( ${#aBLUETOOTH_MODULES[@]} - 1 )); i>=0; i--)) do @@ -1201,12 +1197,12 @@ _EOF_ # Purge packages if (( $G_DIETPI_INSTALL_STAGE >= 0 )) then - G_AGP bluez bluez-firmware pi-bluetooth rtl8723ds-firmware + G_AGP bluez bluez-firmware pi-bluetooth rtl8723ds-firmware sprd-bluetooth G_AGA fi - elif [[ $INPUT_DEVICE_VALUE == 'enable' ]]; then - + elif [[ $INPUT_DEVICE_VALUE == 'enable' ]] + then # Remove kernel module blacklist [[ -f '/etc/modprobe.d/dietpi-disable_bluetooth.conf' ]] && G_EXEC rm /etc/modprobe.d/dietpi-disable_bluetooth.conf @@ -1262,13 +1258,9 @@ Do you want to continue and disable the serial login console?' || return 1 G_EXEC eval 'echo '\''sprdbt_tty'\'' > /etc/modules-load.d/dietpi-enable_bluetooth.conf' G_AG_CHECK_INSTALL_PREREQ sprd-bluetooth fi - else - Unknown_Input_Mode - fi - } #///////////////////////////////////////////////////////////////////////////////////// From 96a9f918f782811074cb7682941dab97d1c06164 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 17 Oct 2024 17:49:49 +0200 Subject: [PATCH 450/458] v9.8 - DietPi-Patches | Fix NanoPi R6S vs NanoPC T6 detection --- .update/patches | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.update/patches b/.update/patches index 350034c2b7..d33f4e80ac 100755 --- a/.update/patches +++ b/.update/patches @@ -1988,9 +1988,8 @@ _EOF_ # NanoPi R6S/R6C elif (( $G_HW_MODEL == 79 )) && ! dpkg-query -s 'firmware-nanopi6' &> /dev/null then - local model='R6S' - [[ $( /dev/null && model='R6C' - if [[ $model == 'R6S' ]] + read -r model < /proc/device-tree/model + if [[ $model == *'R6S'* ]] then G_DIETPI-NOTIFY 2 'Updating udev rule for NanoPi R6S Ethernet LEDs' G_EXEC eval 'echo '\''ledtrig-netdev'\'' > /etc/modules-load.d/dietpi-eth-leds.conf' @@ -1999,7 +1998,7 @@ SUBSYSTEM=="leds", KERNEL=="lan2_led", ACTION=="add", ATTR{trigger}="netdev", AT SUBSYSTEM=="leds", KERNEL=="wan_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth1", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1" SUBSYSTEM=="leds", KERNEL=="lan1_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth2", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1" _EOF_ - elif [[ $model == 'R6C' ]] + elif [[ $model == *'R6C'* ]] then G_DIETPI-NOTIFY 2 'Updating udev rule for NanoPi R6C Ethernet LEDs' G_EXEC eval 'echo '\''ledtrig-netdev'\'' > /etc/modules-load.d/dietpi-eth-leds.conf' From 644ed431e27fa6a7b1c6c04b0272e74e2c446d2f Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 17 Oct 2024 17:54:11 +0200 Subject: [PATCH 451/458] v9.8 - DietPi-Software | Update HAProcy and Home Assistant Python versions --- dietpi/dietpi-software | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index a34d913112..6947e347b7 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6911,7 +6911,7 @@ _EOF_ if To_Install 98 haproxy # HAProxy then - local version='3.0.2' # https://www.haproxy.org/download/ + local version='3.0.5' # https://www.haproxy.org/download/ aDEPS=('make' 'gcc' 'libpcre3-dev' 'libssl-dev' 'zlib1g-dev' 'libsystemd-dev') Download_Install "https://www.haproxy.org/download/${version%.*}/src/haproxy-$version.tar.gz" @@ -11321,7 +11321,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.12.3' # https://github.com/pyenv/pyenv/tree/master/plugins/python-build/share/python-build + local ha_python_version='3.12.7' # 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" From 5d8f5a578d0c17485530dc79159fbe53d2127d90 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 17 Oct 2024 17:58:34 +0200 Subject: [PATCH 452/458] v9.8 - CHANGELOG | Adjust release date --- CHANGELOG.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 2f495f3614..9a857dd45e 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,5 @@ v9.8 -(2024-10-10) +(2024-10-17) Enhancements: - Orange Pi 3B | Added support for board revision v2.1, where Ethernet did not work with our previous kernel. Many thanks to @raphamotta and others for making us aware of this: https://dietpi.com/forum/t/20689 From a4d273ddb0cd9b52ff40dfa66a68dd2912018cae Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 17 Oct 2024 18:17:32 +0200 Subject: [PATCH 453/458] v9.8 - Images | Add initial support for Orange Pi 5 Max and NanoPi M6, not as officially supported yet, but to allow building test images with stable DietPi code. --- .build/images/dietpi-build | 14 ++++++++------ .build/images/dietpi-installer | 14 +++++++++----- .meta/dietpi-survey_report | 2 ++ dietpi/func/dietpi-obtain_hw_model | 14 +++++++++++++- dietpi/func/dietpi-set_hardware | 2 +- dietpi/func/dietpi-set_software | 2 ++ 6 files changed, 35 insertions(+), 13 deletions(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 8d3286bd94..53ace2c6d5 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -139,24 +139,26 @@ case $HW_MODEL in 73) iname='ROCKPiS' HW_ARCH=3 partition_start=16 root_size=1100;; 74) iname='RadxaZero' HW_ARCH=3 partition_start=4 root_size=1148;; 75) iname='Container' HW_ARCH=${HW_ARCH:-10} root_size=575;; - '76.1') iname='NanoPiR5S' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; - '76.2') iname='NanoPiR5C' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; - 77) iname='ROCK3A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; + '76.1') iname='NanoPiR5S' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;; + '76.2') iname='NanoPiR5C' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;; + 77) iname='ROCK3A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;; 78) iname='ROCK5B' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;; '79.1') iname='NanoPiR6S' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;; '79.2') iname='NanoPiR6C' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;; '79.3') iname='NanoPCT6' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;; - 80) iname='OrangePi5' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; + 80) iname='OrangePi5' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;; 81) iname='VisionFive2' HW_ARCH=11 root_size=639;; 82) iname='OrangePi5Plus' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;; 83) iname='OrangePiZero3' HW_ARCH=3 partition_start=4 root_size=1148;; 84) iname='Star64' HW_ARCH=11 root_size=639;; 85) iname='ROCK5A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;; 86) iname='ASUSTB2' HW_ARCH=3 partition_start=16 root_size=1100;; - 87) iname='OrangePi3B' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; + 87) iname='OrangePi3B' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;; 88) iname='OrangePiZero2W' HW_ARCH=3 partition_start=4 root_size=1148;; 89) iname='OrangePi3LTS' HW_ARCH=3 partition_start=4 root_size=1000;; - 90) iname='RadxaZERO3' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;; + 90) iname='RadxaZERO3' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;; + 91) iname='OrangePi5Max' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;; + 92) iname='NanoPiM6' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;; *) G_DIETPI-NOTIFY 1 "Invalid hardware model \"$HW_MODEL\" passed, aborting..."; exit 1;; esac diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 56f029b03d..c980248410 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -416,6 +416,7 @@ _EOF_ '79.1' ': NanoPi R6S' '79.2' ': NanoPi R6C' '79.3' ': NanoPC T6' + '92' ': NanoPi M6' '72.1' ': ROCK 4 (all other variants)' '72.2' ': ROCK 4 SE' '72.3' ': ROCK 4C Plus' @@ -429,6 +430,7 @@ _EOF_ '89' ': Orange Pi 3 LTS' '80' ': Orange Pi 5' '82' ': Orange Pi 5 Plus' + '91' ': Orange Pi 5 Max' '83' ': Orange Pi Zero 3' '88' ': Orange Pi Zero 2W' '86' ': ASUS Tinker Board 2' @@ -669,7 +671,7 @@ setenv rootuuid "true"' /boot/boot.cmd (( $G_HW_MODEL == 15 )) && G_EXEC eval 'echo '\''meson_rng'\'' > /etc/modules-load.d/dietpi-hwrng.conf' # Rockchip 64-bit (configs work with Amlogic OOTB) - elif [[ $G_HW_MODEL =~ ^(42|43|46|47|55|56|58|68|72|73|76|77|78|79|80|82|85|86|87|90)$ ]] + elif [[ $G_HW_MODEL =~ ^(42|43|46|47|55|56|58|68|72|73|76|77|78|79|80|82|85|86|87|90|91|92)$ ]] then G_EXEC sed --follow-symlinks -Ei '/^setenv (kernel|fdt)_addr_r/d' /boot/boot.cmd G_CONFIG_INJECT 'setenv scriptaddr ' 'setenv scriptaddr "0x9000000"' /boot/boot.cmd @@ -702,14 +704,14 @@ setenv rootuuid "true"' /boot/boot.cmd # Overlay prefix case $G_HW_MODEL in 73) G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=rk3308' /boot/dietpiEnv.txt;; - 78|79|80|82|85) G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=rk3588' /boot/dietpiEnv.txt;; # ToDo: There are multiple other prefixes used in the kernel package, "rock-5b", "rock-5ab", "rockchip" (for fixup), so the boot.cmd need heavy adjustments (eliminate the prefix entirely) to work with all overlays. + 78|79|80|82|85|91|92) G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=rk3588' /boot/dietpiEnv.txt;; # ToDo: There are multiple other prefixes used in the kernel package, "rock-5b", "rock-5ab", "rockchip" (for fixup), so the boot.cmd need heavy adjustments (eliminate the prefix entirely) to work with all overlays. *) G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=rockchip' /boot/dietpiEnv.txt;; esac # Console args case $G_HW_MODEL in 73) G_CONFIG_INJECT 'consoleargs=' 'consoleargs=console=ttyS0,1500000' /boot/dietpiEnv.txt;; # headless 47|55|56) G_CONFIG_INJECT 'consoleargs=' 'consoleargs=console=ttyS2,1500000' /boot/dietpiEnv.txt;; # headless - 78|79|80|82|85) G_EXEC sed --follow-symlinks -i 's/ttyAML0,115200/ttyFIQ0,1500000/' /boot/dietpiEnv.txt;; # RK3588 + 78|79|80|82|85|91|92) G_EXEC sed --follow-symlinks -i 's/ttyAML0,115200/ttyFIQ0,1500000/' /boot/dietpiEnv.txt;; # RK3588 *) G_EXEC sed --follow-symlinks -i 's/ttyAML0,115200/ttyS2,1500000/' /boot/dietpiEnv.txt;; esac @@ -1140,6 +1142,8 @@ _EOF_ 88) model='orangepizero2w' kernel='sunxi64';; 89) model='orangepi3-lts' kernel='sunxi64';; 90) model='radxa-zero3' kernel='rk35xx' branch='legacy';; + 91) model='orangepi5-max' kernel='rk35xx' branch='vendor';; + 92) model='nanopi-m6' kernel='rk35xx' branch='vendor';; *) :;; esac @@ -1961,8 +1965,8 @@ _EOF_' then /boot/dietpi/func/dietpi-set_hardware serialconsole enable ttyS1 - # Rockchip vendor: ROCK 5B, NanoPi 6, Orange Pi 5, Orange Pi 5 Plus, ROCK 5A, Radxa ZERO 3 - elif [[ $G_HW_MODEL =~ ^(78|79|80|82|85|90)$ ]] + # Rockchip vendor/legacy: ROCK 5B, NanoPi 6, Orange Pi 5, Orange Pi 5 Plus, ROCK 5A, Radxa ZERO 3 + elif [[ $G_HW_MODEL =~ ^(78|79|80|82|85|90|91|92)$ ]] then /boot/dietpi/func/dietpi-set_hardware serialconsole enable ttyFIQ0 diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index 7aa44a394f..139bbd161a 100755 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -95,6 +95,8 @@ shopt -s extglob [88]='Orange Pi Zero 2W' [89]='Orange Pi 3 LTS' [90]='Radxa ZERO 3' + [91]='Orange Pi 5 Max' + [92]='NanoPi M6' ) ## Benchmark data arrays: aBENCH_XX[$HW_MODEL,${aBENCH_XX_INDEX[$HW_MODEL]}] diff --git a/dietpi/func/dietpi-obtain_hw_model b/dietpi/func/dietpi-obtain_hw_model index 030bf3cceb..b7876fd05e 100755 --- a/dietpi/func/dietpi-obtain_hw_model +++ b/dietpi/func/dietpi-obtain_hw_model @@ -12,6 +12,8 @@ # - Generates /boot/dietpi/.hw_model # - Called from /boot/dietpi/preboot, called by /etc/systemd/system/dietpi-preboot.service # + # G_HW_MODEL 92 NanoPi M6 + # G_HW_MODEL 91 Orange Pi 5 Max # G_HW_MODEL 90 Radxa ZERO 3 # G_HW_MODEL 89 Orange Pi 3 LTS # G_HW_MODEL 88 Orange Pi Zero 2W @@ -366,7 +368,17 @@ G_HW_MODEL=$(mawk 'NR==1' "$FP_G_HW_MODEL_IDENTIFIER") - if (( $G_HW_MODEL == 90 )); then + if (( $G_HW_MODEL == 92 )); then + + G_HW_MODEL_NAME='NanoPi M6' + G_HW_CPUID=11 + + elif (( $G_HW_MODEL == 91 )); then + + G_HW_MODEL_NAME='Orange Pi 5 Max' + G_HW_CPUID=11 + + elif (( $G_HW_MODEL == 90 )); then G_HW_MODEL_NAME='Radxa ZERO 3' G_HW_CPUID=9 diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index f7169c85b9..5f48bc73c5 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -1524,7 +1524,7 @@ Do you want to continue and disable the serial login console?' || return 1 elif (( $DIETPIENV || $G_HW_MODEL == 49 || $G_HW_MODEL == 76 || $G_HW_MODEL == 79 )) then local baudrate='115200' - if [[ $G_HW_MODEL =~ ^(42|43|46|47|49|55|56|58|68|72|76|77|78|79|80|82|85|87|90)$ && $INPUT_ADDITIONAL =~ ^('ttyS2'|'ttyFIQ0')$ ]] || [[ $G_HW_MODEL == 73 && $INPUT_ADDITIONAL == 'ttyS'[012] ]] + if [[ $G_HW_MODEL =~ ^(42|43|46|47|49|55|56|58|68|72|76|77|78|79|80|82|85|87|90|91|92)$ && $INPUT_ADDITIONAL =~ ^('ttyS2'|'ttyFIQ0')$ ]] || [[ $G_HW_MODEL == 73 && $INPUT_ADDITIONAL == 'ttyS'[012] ]] then baudrate='1500000' [[ -d /etc/systemd/system/serial-getty@$INPUT_ADDITIONAL.service.d ]] || G_EXEC mkdir "/etc/systemd/system/serial-getty@$INPUT_ADDITIONAL.service.d" diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index 4e2f828edb..0a812b7b8e 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -294,6 +294,8 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R 88) all_components='orangepizero2w';; 89) all_components='orangepi3lts';; 90) all_components='radxazero3';; + 91) all_components='orangepi5max';; + 92) all_components='nanopim6';; *) :;; esac G_EXEC eval "echo 'deb https://dietpi.com/apt $G_DISTRO_NAME $components' > /etc/apt/sources.list.d/dietpi.list" From 33767ef6f37618fd613112344a5f5d5ac65b7d30 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 17 Oct 2024 18:45:34 +0200 Subject: [PATCH 454/458] v9.8 - DietPi-Software | frp: Update fallback URL --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 6947e347b7..87ead11e8b 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6519,7 +6519,7 @@ _EOF_ esac # Download - local fallback_url="https://github.com/fatedier/frp/releases/download/v0.60.0/frp_0.60.0_linux_$arch.tar.gz" + local fallback_url="https://github.com/fatedier/frp/releases/download/v0.61.0/frp_0.61.0_linux_$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/fatedier/frp/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/frp_[0-9.]*_linux_$arch\.tar\.gz\"/{print \$4}")" G_EXEC cd frp_* From d37ebdd8a1512eb14abf537e6caf3fa761397ba7 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 17 Oct 2024 19:05:54 +0200 Subject: [PATCH 455/458] v9.8 - DietPi-Software | HAProxy: Fix install on Trixie, by replacing "old" pcre3 with "new" pcre2 (confusingly) for all distro versions --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 87ead11e8b..c256564c23 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6912,7 +6912,7 @@ _EOF_ if To_Install 98 haproxy # HAProxy then local version='3.0.5' # https://www.haproxy.org/download/ - aDEPS=('make' 'gcc' 'libpcre3-dev' 'libssl-dev' 'zlib1g-dev' 'libsystemd-dev') + aDEPS=('make' 'gcc' 'libpcre2-dev' 'libssl-dev' 'zlib1g-dev' 'libsystemd-dev') Download_Install "https://www.haproxy.org/download/${version%.*}/src/haproxy-$version.tar.gz" # Compile From 035f4de001d4fb08f1bd30befb0ed64b86af41ab Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 17 Oct 2024 19:13:58 +0200 Subject: [PATCH 456/458] v9.8 - DietPi-Software | HAProxy: Update build flags for pcre2 --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index c256564c23..abc50bc214 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6917,7 +6917,7 @@ _EOF_ # Compile G_EXEC cd "haproxy-$version" - G_EXEC_OUTPUT=1 G_EXEC make -j "$G_HW_CPU_CORES" TARGET=linux-glibc USE_PCRE=1 USE_OPENSSL=1 USE_ZLIB=1 USE_SYSTEMD=1 USE_PROMEX=1 DEBUG_CFLAGS='-g0 -O3' LDFLAGS='-Wl,-z,relro -Wl,-z,now -Wl,--as-needed' + G_EXEC_OUTPUT=1 G_EXEC make -j "$G_HW_CPU_CORES" TARGET=linux-glibc USE_PCRE2=1 USE_OPENSSL=1 USE_ZLIB=1 USE_SYSTEMD=1 USE_PROMEX=1 DEBUG_CFLAGS='-g0 -O3' LDFLAGS='-Wl,-z,relro -Wl,-z,now -Wl,--as-needed' # Strip binary size G_EXEC strip --remove-section=.comment --remove-section=.note haproxy # Install From 31dabcaae67a386453721bf6c18f9f2d58a5201b Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 17 Oct 2024 21:27:17 +0200 Subject: [PATCH 457/458] v9.8 - DietPi-Installer | Fix OPi 5 Max and NanoPi M6 build --- .build/images/dietpi-installer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index c980248410..5216874c02 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -630,7 +630,7 @@ _EOF_ G_EXEC mv "$dir/.build/images/U-Boot/99-dietpi-uboot" /etc/initramfs/post-update.d/99-dietpi-uboot G_EXEC sed --follow-symlinks -i 's/arm64/arm/' /etc/initramfs/post-update.d/99-dietpi-uboot - elif [[ $G_HW_MODEL =~ ^(12|15|16|40|42|43|44|45|46|47|48|52|54|55|56|57|58|59|60|62|63|64|65|66|67|68|72|73|74|76|77|78|79|80|82|83|85|86|87|88|89|90)$ ]] + elif [[ $G_HW_MODEL =~ ^(12|15|16|40|42|43|44|45|46|47|48|52|54|55|56|57|58|59|60|62|63|64|65|66|67|68|72|73|74|76|77|78|79|80|82|83|85|86|87|88|89|90|91|92)$ ]] then armbian_packages=1 G_EXEC mv "$dir/.build/images/U-Boot/boot.cmd" /boot/boot.cmd From 3e17c3a954cdbb3d1dc3052ebcf6f1f8fa1e9778 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 17 Oct 2024 22:14:55 +0200 Subject: [PATCH 458/458] v9.8 - CHANGELOG | Add release PR URL --- CHANGELOG.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 9a857dd45e..b36930ce8b 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -22,7 +22,7 @@ Bug fixes: - DietPi-Software | Home Assistant: Resolved an issue where the latest Home Assistant version did not start. Many thanks to @whyisthisbroken and others for reporting this issue: https://github.com/MichaIng/DietPi/issues/7231 - DietPi-Software | Folding@Home: Resolved an issue where the installation failed. Due to larger changes in Folding@Home v8, v7 will be installed for now, before we find time to implement the needed changes for v8. Many thanks to @cruzadernl for reporting this issue: https://github.com/MichaIng/DietPi/issues/7187 -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/7246 -----------------------------------------------------------------------------------------------------------