diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 96ea0ca5f2..67543b2c38 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -895,8 +895,13 @@ _EOF_ 'usbutils' # "lsusb", used by DietPi-Software + DietPi-BugReport ) + # Skip entropy daemon on all devices but those with old kernel + if [[ ! $G_HW_MODEL =~ ^(11|61|62|70|76|78|79|80|82)$ ]] # Odroid XU4, NanoPi M2/T2/Fire2, NanoPi M3/T3/Fire3, Sparky SBC, NanoPi R5S/R5C, ROCK 5B, NanoPi 6, Orange Pi 5, Orange Pi 5 Plus + then + : + # Entropy daemon: Use modern rng-tools5 on all devices where it has been proven to work, else haveged: https://github.com/MichaIng/DietPi/issues/2806 - if [[ $G_HW_MODEL -lt 10 || $G_HW_MODEL =~ ^(14|15|16|24|29|42|46|58|68|72|74|76|78|79|80|81|82)$ ]] # RPi, S922X, Odroid C4, RK3399 - 47 NanoPi R4S, Radxa Zero, NanoPi R5S/R5C, ROCK 5B, NanoPi 6, Orange Pi 5, VisionFive 2, Orange Pi 5 Plus + elif [[ $G_HW_MODEL -lt 10 || $G_HW_MODEL =~ ^(14|15|16|24|29|42|46|58|68|72|74|76|78|79|80|81|82)$ ]] # RPi, S922X, Odroid C4, RK3399 - 47 NanoPi R4S, Radxa Zero, NanoPi R5S/R5C, ROCK 5B, NanoPi 6, Orange Pi 5, VisionFive 2, Orange Pi 5 Plus then aPACKAGES_REQUIRED_INSTALL+=('rng-tools5') else diff --git a/.build/software/raspberrypi-sys-mods/build.bash b/.build/software/raspberrypi-sys-mods/build.bash index dbc25fdc41..4759aaea9d 100755 --- a/.build/software/raspberrypi-sys-mods/build.bash +++ b/.build/software/raspberrypi-sys-mods/build.bash @@ -74,7 +74,7 @@ cat << '_EOF_' > raspberrypi-sys-mods/lib/udev/rules.d/99-com.rules SUBSYSTEM=="input", GROUP="input", MODE="0660" SUBSYSTEM=="i2c-dev", GROUP="i2c", MODE="0660" SUBSYSTEM=="spidev", GROUP="spi", MODE="0660" -SUBSYSTEM=="bcm2835-gpiomem", GROUP="gpio", MODE="0660" +SUBSYSTEM=="*gpiomem*", GROUP="gpio", MODE="0660" SUBSYSTEM=="rpivid-*", GROUP="video", MODE="0660" KERNEL=="vcsm-cma", GROUP="video", MODE="0660" @@ -126,7 +126,7 @@ find raspberrypi-sys-mods ! \( -path raspberrypi-sys-mods/DEBIAN -prune \) -type cat << _EOF_ > raspberrypi-sys-mods/DEBIAN/control Package: raspberrypi-sys-mods -Version: 2:20220915-dietpi2 +Version: 2:20230510-dietpi1 Architecture: all Maintainer: MichaIng Date: $(date -u '+%a, %d %b %Y %T %z') diff --git a/.update/patches b/.update/patches index fed74700ed..b7f97082de 100755 --- a/.update/patches +++ b/.update/patches @@ -1441,14 +1441,6 @@ Patch_8_21() G_EXEC rm package.deb fi - # VisionFive 2 - elif (( $G_HW_MODEL == 81 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-visionfive2 2> /dev/null)" lt-nl 5.15.128-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 - # Rockchip64 kernel elif dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-current-rockchip64 2> /dev/null)" lt-nl 23.08.0 then @@ -1485,6 +1477,15 @@ _EOF_ G_EXEC apt-key --keyring /etc/apt/trusted.gpg del 'DF00FAF1C577104B50BF1D0093D6889F9F0E78D5' [[ $(apt-key --keyring /etc/apt/trusted.gpg list 2> /dev/null) ]] || G_EXEC rm /etc/apt/trusted.gpg fi + + # VisionFive 2 + if (( $G_HW_MODEL == 81 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-visionfive2 2> /dev/null)" lt-nl 5.15.131-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 + fi } # v6.35 => v7 migration diff --git a/.update/version b/.update/version index ee1494577d..a3d074247f 100644 --- a/.update/version +++ b/.update/version @@ -3,7 +3,7 @@ # Available DietPi version G_REMOTE_VERSION_CORE=8 G_REMOTE_VERSION_SUB=22 -G_REMOTE_VERSION_RC=0 +G_REMOTE_VERSION_RC=1 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=6 G_MIN_VERSION_SUB=14 diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 6fcc3d5f5d..58bec909e6 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -8,16 +8,19 @@ Enhancements: - Images | DietPi images are now shipped with a trailing FAT partition which contains dietpi.txt and other config files for easier pre-configuration and automation from Windows and macOS hosts. The partition is removed automatically on first boot, after copying all supported config files/scripts. Related CLI flags have been added to our build scripts: "--add-fat-part" for dietpi-imager and "--no-fat-part" for dietpi-build. Many thanks to @dirkhh for implementing this feature: https://github.com/MichaIng/DietPi/pull/6602 - Images | All our images are now compressed via xz instead of 7z. These are a little easier to handle, especially on Linux hosts, and many flashing utilities allow to flash zx-compressed images directly to disk, without the need to manually decompress them first. As xz compresses files and no directories, the dedicated README.md and hash text files are not included anymore. The hashes for integrity checks within an archive have no real purpose, as the compression algorithms imply hashes internally (CRC64 in case of xz), which are checked and integrity of the content assured as part of the decompression. - Images | SHA256 hashes and GPG signatures are now provided for all our images, linked from our download page or found here: https://dietpi.com/downloads/images/. Our public GPG keyring can be found at https://github.com/MichaIng.gpg. +- Images | Most of our images, those with do not ship with a very old Linux version, have no entropy daemon pre-installed anymore. Either rngd or haveged were required previously to assure that the system entropy pool remained sufficiently filled, otherwise boot, service starts, cryptography tasks or anything using random character from /dev/random could have hung. Recent Linux versions however fill the entropy pool from hardware random generators sufficiently by themselves, and have a HAVEGE-like fallback as well if no hardware random generator is available. +- DietPi-CloudShell | The date/time output format at the top of every 3rd scene is now localised. - DietPi-Software | Docker: Enabled for Trixie and RISC-V via "docker.io" package from Debian repository. - DietPi-Software | Portainer: Enabled for RISC-V as Docker is now supported on RISC-V as well. Bug fixes: - NanoPi R4S | Resolved a v8.20 regression where the Ethernet LEDs did not react correctly after the kernel upgrade. Many thanks to @idaanx for reporting this issue: https://github.com/MichaIng/DietPi/issues/6342#issuecomment-1697669420 +- Bookworm | Resolved an issue where poweroff/reboot/halt commands did throw errors about missing dbus or logind. DietPi ships without dbus and with logind masked by default, as we do not see their features being used on a typical DietPi system. Instead, dbus is installed and logind unmasked on demand on certain software installs or when chosen via dietpi.txt. However, the newer systemd version since Bookworm attempts dbus > logind communication in any case when calling poweroff/reboot/halt, despite no wall message being sent, e.g. to handle shutdown inhibitors (like open SSH session being able to prevent shutdown), and throws errors if either dbus is not reachable or logind not running. Until in case dbus or logind are further tied into common system commands or features, we solved the issue by creating shell functions for poweroff/reboot/halt which call the respective systemd target directly to bypass logind (and hence dbus), but fall back to the original commands, depending on given command-line parameters. - dietpi-bookworm-upgrade | Resolved an issue on systems with Armbian repository, where the system was still identified as Bullseye after the distribution upgrade to Bookworm. Reason was Armbian's base-files package, which was not upgraded as intended. On all DietPi systems, the original base-files package from Debian will now be enforced to prevent this and similar issues. Many thanks to @rogerthn2019 for reporting this issue: https://github.com/MichaIng/DietPi/issues/6227#issuecomment-1713688577 - DietPi-Config | The menu option to update the SPI bootloader is now shown on Orange Pi 5 Plus as well, as intended. Many thanks for @zappydood for reporting its absence: https://github.com/MichaIng/DietPi/issues/6501#issuecomment-1697175109 - DietPi-Software | Ampache: Resolved an issue where the latest version was not successfully detected on install, so that an older fallback version was installed instead. Many thanks to @bartolus39 for reporting this issue: https://github.com/MichaIng/DietPi/issues/6598 -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/6580 +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/6626 ----------------------------------------------------------------------------------------------------------- @@ -1901,7 +1904,7 @@ Bug Fixes: - DietPi-Config | RPi: gpu_mem_256/512 are now capped when being applied (to prevent value exceeding limits of each board type): https://github.com/MichaIng/DietPi/issues/2417 - DietPi-Config | Resolved a visual-only issue, where WiFi interface starts throw an error message about unsupported power management: https://github.com/MichaIng/DietPi/issues/2198 - DietPi-WiFi-Monitor | Resolved an issue, where DietPi-WiFi-Monitor stuck in a reconnection loop, if no valid WiFi interface was detected or the WiFi adapter is unplugged. -- DietPi-Cloudshell | Resolved an issue where CPU scene failed on VM and other devices that do not support CPU governors: https://github.com/MichaIng/DietPi/issues/2428 +- DietPi-CloudShell | Resolved an issue where CPU scene failed on VM and other devices that do not support CPU governors: https://github.com/MichaIng/DietPi/issues/2428 - DietPi-LetsEncrypt | Resolved an issue where Nginx and Apache modules are missing, if one installs Certbot first and the webserver afterwards on a separate dietpi-software run: https://github.com/MichaIng/DietPi/issues/2295 - General | Pinebook: Resolved issue with failed apt-get upgrades due to missing armbian-release data file. Also switched to stable kernel packages and kernel updates over APT are now enabled. - General | Enhanced and fixed some issue with dependencies and boot order of DietPi systemd units: https://github.com/MichaIng/DietPi/pull/2357 @@ -2039,7 +2042,7 @@ Changes / Improvements / Optimisations: Bug Fixes: - General | G_THREAD_START: Resolved issue where this was running in blocking mode. Now uses exit code to identify finished tasks instead of PID. -- DietPi-Cloudshell | Resolved various issues with inability to run service via SSH on another screen, and, G_DIETPI-NOTIFY errors. Many thanks to @potter-91 for reporting this issue! https://github.com/MichaIng/DietPi/issues/2104 +- DietPi-CloudShell | Resolved various issues with inability to run service via SSH on another screen, and, G_DIETPI-NOTIFY errors. Many thanks to @potter-91 for reporting this issue! https://github.com/MichaIng/DietPi/issues/2104 - DietPi-Config | WiFi-Monitor: Resolved an issue with syntax, and, incorrectly pinging the default gateway, instead of whats assigned to the wlan interface: https://github.com/MichaIng/DietPi/issues/2103 - DietPi-Config | dietpi-wifi.db code has been optimized, and, also resolves an issue where '/var/lib/dietpi/dietpi-wifi.db' was not generated automatically: https://github.com/MichaIng/DietPi/issues/2087#issuecomment-423836528 - DietPi-Config | Waveshare32b: Resolved inverted inputs under X11/Xorg: https://github.com/MichaIng/DietPi/issues/803 @@ -2114,7 +2117,7 @@ Bug Fixes: - General | Resolved an issue with RK based network devices, where enabling offloading would cause stability issues. Many thanks to @carlosedp for this fix!: https://github.com/MichaIng/DietPi/issues/2028#issue-352323603 - General | Resolved an issue where automatic swapfile generation, would not run a freespace check prior: https://github.com/MichaIng/DietPi/issues/2048#issuecomment-417855645 - DietPi-Automation | Resolved an issue where 'AUTO_SETUP_INSTALL_SOFTWARE_ID' would include numbers contained within comments: https://github.com/MichaIng/DietPi/issues/2036#issuecomment-416613903 -- DietPi-Cloudshell | Resolved incorrect RAM usage readout, and, inability to run from menu on same screen: https://github.com/MichaIng/DietPi/issues/2066 +- DietPi-CloudShell | Resolved incorrect RAM usage readout, and, inability to run from menu on same screen: https://github.com/MichaIng/DietPi/issues/2066 - DietPi-Config | Resolved an issue with PineA64 resolution changes, due to updated uEnv.txt on the latest PineA64 image. NB: for this feature to work, you must have an installation of the latest PineA64 v6.14 image from the DietPi site. - DietPi-Drive_Manager | Correctly handles bind mounts, contained within '/etc/fstab': https://github.com/MichaIng/DietPi/issues/2013 - DietPi-Process_Tool | Resolved an issue with PIDs no longer existing, causing an apply to fail: https://github.com/MichaIng/DietPi/issues/2059 diff --git a/dietpi/dietpi-cloudshell b/dietpi/dietpi-cloudshell index 692935c23c..d5927cee6c 100755 --- a/dietpi/dietpi-cloudshell +++ b/dietpi/dietpi-cloudshell @@ -289,7 +289,12 @@ } DATE_TIME= - Obtain_DATE_TIME(){ DATE_TIME=$(date +"%a %x - %R"); } + LOCALE= + Obtain_DATE_TIME() + { + [[ $LOCALE ]] || LOCALE=$(sed -n '/^[[:blank:]]*AUTO_SETUP_LOCALE=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) + DATE_TIME=$(LC_ALL=${LOCALE:=C.UTF-8} date '+%a %x - %R') + } UPTIME= Obtain_UPTIME(){ diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 7ad2784ab8..fd547da310 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6969,7 +6969,7 @@ _EOF_ if To_Install 98 haproxy # HAProxy then - local version='2.8.2' # https://www.haproxy.org/download/ + local version='2.8.3' # 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" @@ -10211,7 +10211,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.4.2207/Readarr.develop.0.3.4.2207.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.5.2217/Readarr.develop.0.3.5.2217.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 diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index d90ec52a45..cf186c2d83 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -59,7 +59,7 @@ # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=8 [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=22 - [[ $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 @@ -2140,6 +2140,53 @@ could not be found in file \$3 read -rt "$1" -u "$G_SLEEP_FD" || : } + # Override for poweroff/halt/reboot commands to mute dbus/logind error messages on Bookworm and above, if dbus/logind is not installed/masked: https://github.com/MichaIng/DietPi/issues/6500 + if [[ $G_DISTRO -gt 6 && -L '/etc/systemd/system/systemd-logind.service' ]] + then + poweroff() + { + local command='poweroff' + for i in "$@" + do + case $i in + '-p'|'--poweroff'|'--no-wall') :;; + '--reboot') command='reboot';; + '--halt') command='halt';; + *) /sbin/poweroff "$@"; return $?;; + esac + done + systemctl start "$command.target" + } + reboot() + { + local command='reboot' + for i in "$@" + do + case $i in + '-p'|'--poweroff') command='poweroff';; + '--reboot'|'--no-wall') :;; + '--halt') command='halt';; + *) /sbin/reboot "$@"; return $?;; + esac + done + systemctl start "$command.target" + } + halt() + { + local command='halt' + for i in "$@" + do + case $i in + '-p'|'--poweroff') command='poweroff';; + '--reboot') command='reboot';; + '--halt'|'--no-wall') :;; + *) /sbin/halt "$@"; return $?;; + esac + done + systemctl start "$command.target" + } + fi + #----------------------------------------------------------------------------------- : # Return exit code 0, by triggering null as last command to output #-----------------------------------------------------------------------------------