diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 560b8d8e8b..19a6c5e9c3 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -127,6 +127,10 @@ case $HW_MODEL in 80) iname='OrangePi5' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=752;; 81) iname='VisionFive2' HW_ARCH=11 root_size=639;; 82) iname='OrangePi5Plus' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=752;; + 83) iname='OrangePiZero3' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=752;; + 84) iname='Star64' HW_ARCH=11 root_size=639;; + 85) iname='ROCK5A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=752;; + 86) iname='ASUSTB2' HW_ARCH=3 partition_start=16 root_size=752;; *) G_DIETPI-NOTIFY 1 "Invalid hardware model \"$HW_MODEL\" passed, aborting..."; exit 1;; esac @@ -146,7 +150,7 @@ case $HW_ARCH in 2) iarch='ARMv7' parch='armhf';; 3) iarch='ARMv8' parch='arm64';; 10) iarch='x86_64' parch='amd64';; - 11) iarch='RISC-V' parch='riscv64' DISTRO=8 repo='https://deb.debian.org/debian-ports/' keyring='/usr/share/keyrings/debian-ports-archive-keyring.gpg';; # RISC-V architecture is available on Debian ports only + 11) iarch='RISC-V' parch='riscv64' DISTRO=8;; # RISC-V architecture is available on Sid only, but internally DietPi handles it as Trixie *) G_DIETPI-NOTIFY 1 "Invalid architecture \"$HW_ARCH\" passed, aborting..."; exit 1;; esac @@ -157,7 +161,7 @@ case $DISTRO in 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' - [[ $HW_ARCH == 11 ]] && distro='sid' # RISC-V architecture is available on Debian Sid/unstable only + [[ $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));; @@ -207,8 +211,7 @@ fi (( $efi_size )) || [[ $boot_size -gt 0 && $boot_fstype == 'fat'* ]] && apackages+=('dosfstools') # Emulation support in case of incompatible architecture -# - TEMPORARY: Early exit for Trixie/Sid until systemd + QEMU incompatibility fix has been released: https://github.com/systemd/systemd/pull/28954 -(( ( $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'); (( $DISTRO == 8 )) && { G_DIETPI-NOTIFY 1 'systemd on Trixie/Sid does currently not support QEMU emulation, aborting ...'; exit 0; } } +(( ( $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') # Virtual machine disk conversion [[ $VMTYPE && $VMTYPE != 'raw' ]] && apackages+=('qemu-utils') @@ -220,7 +223,6 @@ if [[ ! -f $keyring ]] then case $keyring in *'raspbian'*) url='https://archive.raspbian.org/raspbian/pool/main/r/raspbian-archive-keyring/raspbian-archive-keyring_20120528.2_all.deb';; - *'debian-ports'*) url='https://deb.debian.org/debian/pool/main/d/debian-ports-archive-keyring/debian-ports-archive-keyring_2023.02.01~deb11u1_all.deb';; *) url='https://deb.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2023.4_all.deb';; esac G_EXEC curl -sSf "$url" -o /tmp/keyring.deb @@ -401,7 +403,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' -[[ $HW_ARCH == 11 ]] && packages+=',debian-ports-archive-keyring' 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 umount rootfs/dev rootfs/run rootfs/var/cache/apt rootfs/var/lib/apt/lists rootfs/var/log @@ -582,7 +583,7 @@ then # Workaround invalid TERM on login # shellcheck disable=SC2016 - G_EXEC eval 'echo '\''infocmp "$TERM" > /dev/null 2>&1 || export TERM=dumb'\'' > rootfs/etc/bashrc.d/00-dietpi-build.sh' + G_EXEC eval 'echo '\''infocmp "$TERM" > /dev/null 2>&1 || { echo "[ INFO ] Unsupported TERM=\"$TERM\", switching to TERM=\"dumb\""; export TERM=dumb; }'\'' > rootfs/etc/bashrc.d/00-dietpi-build.sh' # 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 @@ -619,7 +620,7 @@ G_EXEC rm -R /var/tmp/dietpi/logs /boot/dietpi/func/dietpi-set_software apt-cache clean G_EXEC rm /boot/dietpi/.{hw_model,dietpi-services_include_exclude} /boot/dietpi-wifi.txt G_EXEC rm -Rf /{root,home/*}/.{bash_history,nano_history,wget-hsts,cache,local,config,gnupg,viminfo,dbus,gconf,nano,vim,zshrc,oh-my-zsh} /etc/*- /var/{cache/debconf,lib/dpkg}/*-old /var/lib/dhcp/{,.??,.[^.]}* -# Remove unique Roon IDs: https://community.roonlabs.com/t/roon-core-will-not-recognize-two-dietpi-allo-gui-roon-bridges-simultaneously/32563/18?u=dan_knight +# Remove unique Roon IDs: https://community.roonlabs.com/t/roon-core-will-not-recognize-two-dietpi-allo-gui-roon-bridges-simultaneously/32563/18 G_EXEC rm -f /mnt/dietpi_userdata/roon/{RoonBridge,RAATServer}/Settings/unique_id # Re-create required log dirs diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index ad6abc7059..2a5a5b30af 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -387,8 +387,11 @@ _EOF_ '74' ': Radxa Zero' '77' ': ROCK 3A' '78' ': ROCK 5B' + '85' ': ROCK 5A' '80' ': Orange Pi 5' '82' ': Orange Pi 5 Plus' + '83' ': Orange Pi Zero 3' + '86' ': ASUS Tinker Board 2' '23' ': Generic Rockchip RK3328' '24' ': Generic Rockchip RK3399' '26' ': Generic Allwinner H5' @@ -405,7 +408,10 @@ _EOF_ '20' ': Virtual machine' '21' ': Native PC' );; - 11) G_WHIP_DEFAULT_ITEM=81 G_WHIP_MENU_ARRAY=('81' ': StarFive VisionFive 2');; + 11) G_WHIP_DEFAULT_ITEM=81 G_WHIP_MENU_ARRAY=( + '81' ': StarFive VisionFive 2' + '84' ': Star64' + );; *) :;; esac G_WHIP_MENU_ARRAY+=( @@ -580,7 +586,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 -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|77|78|80|82)$ ]] + 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|77|78|80|82|85|86)$ ]] then armbian_repo=1 G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/boot.cmd" /boot/boot.cmd @@ -621,15 +627,14 @@ 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|77|78|80|82)$ ]] + elif [[ $G_HW_MODEL =~ ^(42|43|46|47|55|56|58|68|72|73|77|78|80|82|85|86)$ ]] then G_EXEC sed -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;; - 77) G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=rk35xx' /boot/dietpiEnv.txt;; - 78|80|82) 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|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 case $G_HW_MODEL in @@ -639,6 +644,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;; + 85) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-rock-5a.dtb' /boot/dietpiEnv.txt;; *) :;; esac case $G_HW_MODEL in @@ -901,7 +907,7 @@ _EOF_ : # 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 - 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 + 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|85|86)$ ]] # 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 @@ -985,6 +991,16 @@ 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' # Remove obsolete combined keyring @@ -1042,10 +1058,12 @@ _EOF_ 72) model='rockpi-4b' kernel='rockchip64';; 73) model='rockpi-s' kernel='rockchip64';; 74) model='radxa-zero';; - 77) model='rock-3a' kernel='rk35xx' branch='edge';; + 77) model='rock-3a' kernel='rockchip64';; 78) model='rock-5b' kernel='rk35xx' branch='legacy';; 80) model='orangepi5' kernel='rk35xx' branch='legacy';; 82) model='orangepi5-plus' kernel='rk35xx' branch='legacy';; + 85) model='rock-5a' kernel='rk35xx' branch='legacy';; + 86) model='tinkerboard-2' kernel='rockchip64';; *) :;; 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 @@ -1056,8 +1074,19 @@ _EOF_ G_EXEC rm package.deb fi + # 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 - if [[ $G_HW_MODEL =~ ^(55|56)$ ]] + elif [[ $G_HW_MODEL =~ ^(55|56)$ ]] then G_DIETPI-NOTIFY 2 'Blacklisting video related kernel modules' cat << '_EOF_' > /etc/modprobe.d/dietpi-headless.conf @@ -1069,7 +1098,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' ]] && zstd=('zstd') + [[ $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 @@ -1097,8 +1126,15 @@ _EOF_ . /usr/lib/u-boot/platform_install.sh # shellcheck disable=SC2154 write_uboot_platform "$DIR" "$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 - if (( $G_HW_MODEL == 74 )) + elif (( $G_HW_MODEL == 74 )) then G_AGI device-tree-compiler [[ -d '/boot/overlay-user' ]] || G_EXEC mkdir /boot/overlay-user @@ -1202,11 +1238,15 @@ _EOF_ elif (( $G_HW_MODEL == 81 )) then G_EXEC curl -sSfo package.deb 'https://dietpi.com/downloads/binaries/linux-image-visionfive2.deb' - [[ -f '/boot/extlinux/extlinux.conf' ]] && G_EXEC rm /boot/extlinux/extlinux.conf + 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_EXEC sed -i "s/root=[^[:blank:]]*/root=PARTUUID=$(findmnt -Ufnro PARTUUID -M /)/" /boot/extlinux/extlinux.conf G_EXEC sed -i "s/rootfstype=[^[:blank:]]*/rootfstype=$(findmnt -Ufnro FSTYPE -M /)/" /boot/extlinux/extlinux.conf + aPACKAGES_REQUIRED_INSTALL+=('libubootenv-tool') # Sparky SBC elif (( $G_HW_MODEL == 70 )) @@ -1228,11 +1268,33 @@ _EOF_ # Apply Lighttpd as default webserver, since Apache does not run on Linux 3.10: https://dietpi.com/forum/t/allogui-not-working-apache-service-doesnt-start/15708 G_CONFIG_INJECT 'AUTO_SETUP_WEB_SERVER_INDEX=' 'AUTO_SETUP_WEB_SERVER_INDEX=-2' /boot/dietpi.txt - # Armbian grab currently installed packages + # Armbian elif [[ $G_HW_MODEL != 75 && $(dpkg-query -Wf '${Package} ') == *'armbian'* ]] 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 + systemctl stop armbian-* + # Keep currently installed kernel and bootloader packages local apackages=( 'linux-image-' @@ -1310,9 +1372,6 @@ _EOF_ unset -v apackages fi - # RISC-V: Install Debian ports repository key - (( $G_HW_ARCH == 11 )) && aPACKAGES_REQUIRED_INSTALL+=('debian-ports-archive-keyring') - # WiFi and firmware packages: Usually no firmware should be necessary for VMs. If user manually passes though some USB device, user might need to install the firmware then. if (( $G_HW_MODEL != 20 && $G_HW_MODEL != 75 )) then @@ -1383,6 +1442,10 @@ _EOF_ G_AGA + # Remove temporary APT configs + [[ -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 + #------------------------------------------------------------------------------------------------ G_DIETPI-NOTIFY 3 "$G_PROGRAM_NAME" "[$SETUP_STEP] Applying DietPi tweaks and cleanup"; ((SETUP_STEP++)) #------------------------------------------------------------------------------------------------ @@ -1403,12 +1466,8 @@ _EOF_ G_DIETPI-NOTIFY 2 'Restoring default base files:' # shellcheck disable=SC2114 rm -Rfv /etc/{motd,profile,update-motd.d,issue{,.net}} /root /home /media /var/mail - # Replace Armbian's base-files package with Debian's: https://github.com/MichaIng/DietPi/issues/6407 - G_EXEC eval 'echo -e '\''Package: base-files\nPin: origin *\nPin-Priority: 1000'\'' > /etc/apt/preferences.d/99dietpi-base-files' - G_AGI --reinstall --allow-downgrades base-files # Restore /etc/{update-motd.d,issue{,.net}} /root /home, allow downgrades to replace Armbian's base-files package - G_EXEC rm /etc/apt/preferences.d/99dietpi-base-files - G_AGA - [[ -L '/var/lock' ]] || G_EXEC rm -R /var/lock # Armbian images currently ship with this as directory (bug), and postinst fails migrating it to symlink => /run/lock if that directory has content: https://github.com/MichaIng/DietPi/issues/6407 + G_AGI --reinstall base-files # Restore /etc/{update-motd.d,issue{,.net}} /root /home + [[ -L '/var/lock' ]] || { [[ -d '/var/lock' ]] && G_EXEC rm -R /var/lock; G_EXEC ln -s /run/lock /var/lock; } # Armbian images currently ship with this as directory (bug), and postinst fails migrating it to symlink => /run/lock if that directory has content: https://github.com/MichaIng/DietPi/issues/6407 G_EXEC /var/lib/dpkg/info/base-files.postinst configure # Restore /root/.{profile,bashrc} /etc/{motd,profile} /media /var/mail G_DIETPI-NOTIFY 2 'Deleting list of known users and groups, not required by DietPi' @@ -1553,6 +1612,8 @@ _EOF_ G_EXEC rm -f /etc/{default,logrotate.d}/armbian* [[ -f '/lib/firmware/bootsplash.armbian' ]] && G_EXEC rm /lib/firmware/bootsplash.armbian [[ -L '/etc/systemd/system/sysinit.target.wants/bootsplash-ask-password-console.path' ]] && G_EXEC rm /etc/systemd/system/sysinit.target.wants/bootsplash-ask-password-console.path + [[ -f '/etc/udev/rules.d/70-rename-lan.rules' ]] && G_EXEC rm /etc/udev/rules.d/70-rename-lan.rules # NanoPi R2S/R2C: https://github.com/armbian/build/blob/main/config/boards/nanopi-r2s.csc, https://github.com/armbian/build/blob/main/config/boards/nanopi-r2c.csc + [[ -f '/etc/udev/rules.d/70-persistent-net.rules' ]] && G_EXEC rm /etc/udev/rules.d/70-persistent-net.rules # NanoPi R5S/R6S: https://github.com/armbian/build/blob/main/config/boards/nanopi-r5s.csc, https://github.com/armbian/build/blob/main/config/boards/nanopi-r6s.conf # - OMV: https://github.com/MichaIng/DietPi/issues/2994 [[ -d '/etc/openmediavault' ]] && G_EXEC rm -R /etc/openmediavault @@ -1818,13 +1879,13 @@ _EOF_' /boot/dietpi/func/dietpi-set_hardware serialconsole enable ttySAC0 /boot/dietpi/func/dietpi-set_hardware serialconsole enable ttyGS0 - # ROCKPro64, ROCK64, Pinebook Pro, NanoPi R4S, Quartz64, ASUS Tinker Board, NanoPi R2S, NanoPi NEO3, NanoPi M4V2, NanoPi M4/T4/NEO4, ROCK 4, ROCK 3A - elif [[ $G_HW_MODEL =~ ^(42|43|46|47|49|52|55|56|58|68|72|77)$ ]] + # ROCKPro64, ROCK64, Pinebook Pro, NanoPi R4S, Quartz64, ASUS Tinker Board, NanoPi R2S, NanoPi NEO3, NanoPi M4V2, NanoPi M4/T4/NEO4, ROCK 4, ROCK 3A, ASUS Tinker Board 2 + elif [[ $G_HW_MODEL =~ ^(42|43|46|47|49|52|55|56|58|68|72|77|86)$ ]] 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 - elif [[ $G_HW_MODEL =~ ^(40|44|45|57|59|60|63|64|65|66|67|73|81)$ ]] + # 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, Star64 + elif [[ $G_HW_MODEL =~ ^(40|44|45|57|59|60|63|64|65|66|67|73|81|84)$ ]] then /boot/dietpi/func/dietpi-set_hardware serialconsole enable ttyS0 @@ -1833,8 +1894,8 @@ _EOF_' then /boot/dietpi/func/dietpi-set_hardware serialconsole enable ttyS1 - # NanoPi R5S/R5C, ROCK 5B, NanoPi 6, Orange Pi 5, Orange Pi 5 Plus - elif [[ $G_HW_MODEL =~ ^(76|78|79|80|82)$ ]] + # NanoPi R5S/R5C, ROCK 5B, NanoPi 6, Orange Pi 5, Orange Pi 5 Plus, ROCK 5A + elif [[ $G_HW_MODEL =~ ^(76|78|79|80|82|85)$ ]] then /boot/dietpi/func/dietpi-set_hardware serialconsole enable ttyFIQ0 diff --git a/.build/software/raspberrypi-sys-mods/build.bash b/.build/software/raspberrypi-sys-mods/build.bash index 4759aaea9d..2e9ba2badb 100755 --- a/.build/software/raspberrypi-sys-mods/build.bash +++ b/.build/software/raspberrypi-sys-mods/build.bash @@ -12,40 +12,7 @@ fi G_EXEC mkdir -p raspberrypi-sys-mods/{DEBIAN,lib/udev/rules.d,usr/{lib,share/doc}/raspberrypi-sys-mods} -cat << '_EOF_' > raspberrypi-sys-mods/usr/share/doc/raspberrypi-sys-mods/copyright -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: raspberrypi-sys-mods -Source: https://github.com/RPi-Distro/raspberrypi-sys-mods - -Files: * -Copyright: 2015 Raspberry Pi Foundation -License: BSD-3-Clause - -License: BSD-3-Clause - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - . - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE HOLDERS OR - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -_EOF_ +G_EXEC curl -sSfo raspberrypi-sys-mods/usr/share/doc/raspberrypi-sys-mods/copyright 'https://raw.githubusercontent.com/RPi-Distro/raspberrypi-sys-mods/master/debian/copyright' cat << '_EOF_' > raspberrypi-sys-mods/usr/lib/raspberrypi-sys-mods/i2cprobe #!/bin/dash @@ -66,53 +33,11 @@ modprobe "$MODALIAS" || modprobe "of:N${OF_NAME}TC$OF_COMPATIBLE_0" _EOF_ G_EXEC chmod +x raspberrypi-sys-mods/usr/lib/raspberrypi-sys-mods/i2cprobe -cat << '_EOF_' > raspberrypi-sys-mods/lib/udev/rules.d/15-i2c-modprobe.rules -SUBSYSTEM=="i2c|spi", ENV{MODALIAS}=="?*", ENV{OF_NAME}=="?*", ENV{OF_COMPATIBLE_0}=="?*", RUN+="/usr/lib/raspberrypi-sys-mods/i2cprobe" -_EOF_ - -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=="*gpiomem*", GROUP="gpio", MODE="0660" -SUBSYSTEM=="rpivid-*", GROUP="video", MODE="0660" +G_EXEC curl -sSfo raspberrypi-sys-mods/lib/udev/rules.d/15-i2c-modprobe.rules 'https://raw.githubusercontent.com/RPi-Distro/raspberrypi-sys-mods/master/lib/udev/rules.d/15-i2c-modprobe.rules' -KERNEL=="vcsm-cma", GROUP="video", MODE="0660" -SUBSYSTEM=="dma_heap", GROUP="video", MODE="0660" - -SUBSYSTEM=="gpio", GROUP="gpio", MODE="0660" -SUBSYSTEM=="gpio", KERNEL=="gpiochip*", ACTION=="add", PROGRAM="/bin/sh -c 'chgrp -R gpio /sys/class/gpio && chmod -R g=u /sys/class/gpio'" -SUBSYSTEM=="gpio", ACTION=="add", PROGRAM="/bin/sh -c 'chgrp -R gpio /sys%p && chmod -R g=u /sys%p'" - -# PWM export results in a "change" action on the pwmchip device (not "add" of a new device), so match actions other than "remove". -SUBSYSTEM=="pwm", ACTION!="remove", PROGRAM="/bin/sh -c 'chgrp -R gpio /sys%p && chmod -R g=u /sys%p'" - -KERNEL=="ttyAMA[0-9]*|ttyS[0-9]*", PROGRAM="/bin/sh -c '\ - ALIASES=/proc/device-tree/aliases; \ - TTYNODE=$$(readlink /sys/class/tty/%k/device/of_node | sed 's/base/:/' | cut -d: -f2); \ - if [ -e $$ALIASES/bluetooth ] && [ $$TTYNODE/bluetooth = $$(strings $$ALIASES/bluetooth) ]; then \ - echo 1; \ - elif [ -e $$ALIASES/console ]; then \ - if [ $$TTYNODE = $$(strings $$ALIASES/console) ]; then \ - echo 0;\ - else \ - exit 1; \ - fi \ - elif [ $$TTYNODE = $$(strings $$ALIASES/serial0) ]; then \ - echo 0; \ - elif [ $$TTYNODE = $$(strings $$ALIASES/serial1) ]; then \ - echo 1; \ - else \ - exit 1; \ - fi \ -'", SYMLINK+="serial%c" - -ACTION=="add", SUBSYSTEM=="vtconsole", KERNEL=="vtcon1", RUN+="/bin/sh -c '\ - if echo RPi-Sense FB | cmp -s /sys/class/graphics/fb0/name; then \ - echo 0 > /sys$devpath/bind; \ - fi; \ -'" -_EOF_ +G_EXEC curl -sSfo raspberrypi-sys-mods/lib/udev/rules.d/99-com.rules 'https://raw.githubusercontent.com/RPi-Distro/raspberrypi-sys-mods/master/etc.armhf/udev/rules.d/99-com.rules' +# The original rule uses the "strings" command from binutils, which we do not want to have pre-installed (it is huge!). So we use cat, which is safe for the node values read here. +G_EXEC sed -i 's/(strings/(cat/g' raspberrypi-sys-mods/lib/udev/rules.d/99-com.rules cat << '_EOF_' > raspberrypi-sys-mods/DEBIAN/preinst #!/bin/dash @@ -126,7 +51,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:20230510-dietpi1 +Version: 2:20230510-dietpi2 Architecture: all Maintainer: MichaIng Date: $(date -u '+%a, %d %b %Y %T %z') @@ -142,7 +67,7 @@ _EOF_ G_CONFIG_INJECT 'Installed-Size: ' "Installed-Size: $(du -sk raspberrypi-sys-mods | mawk '{print $1}')" raspberrypi-sys-mods/DEBIAN/control # Build DEB package -G_EXEC_OUTPUT=1 G_EXEC dpkg-deb -b raspberrypi-sys-mods +G_EXEC_OUTPUT=1 G_EXEC dpkg-deb -b -Zxz -z9 raspberrypi-sys-mods # Cleanup G_EXEC rm -R raspberrypi-sys-mods diff --git a/.build/software/shairport-sync/build.bash b/.build/software/shairport-sync/build.bash index 52a88fdfa2..c20ff263d2 100755 --- a/.build/software/shairport-sync/build.bash +++ b/.build/software/shairport-sync/build.bash @@ -17,7 +17,7 @@ G_AGDUG automake pkg-config make g++ libpopt-dev libconfig-dev libssl-dev libsox name='shairport-sync' name_pretty='Shairport Sync' repo='https://github.com/mikebrady/shairport-sync' -version=$(curl -sSf 'https://api.github.com/repos/mikebrady/shairport-sync/releases/latest' | mawk -F\" '/^ "tag_name"/{print $4}') +version=$(curl -sSf 'https://api.github.com/repos/mikebrady/shairport-sync/releases/latest' | mawk -F\" '/^ "tag_name"/{print $4;exit}') [[ $version ]] || { G_DIETPI-NOTIFY 1 "No latest $name_pretty version found, aborting ..."; exit 1; } # Download @@ -102,6 +102,12 @@ general = // volume_control_profile = "standard" ; // use this advanced setting to specify how the airplay volume is transferred to the mixer volume. // "standard" makes the volume change more quickly at lower volumes and slower at higher volumes. // "flat" makes the volume change at the same rate at all volumes. +// "dasl_tapered" is similar to "standard" - it makes the volume change more quickly at lower volumes and slower at higher volumes. +// The intention behind dasl_tapered is that a given percentage change in volume should result in the same percentage change in +// perceived loudness. For instance, doubling the volume level should result in doubling the perceived loudness. +// With the range of AirPlay volume being from -30 to 0, doubling the volume from -22.5 to -15 results in an increase of 10 dB. +// Similarly, doubling the volume from -15 to 0 results in an increase of 10 dB. +// For compatibility with mixers having a restricted attenuation range (e.g. 30 dB), "dasl_tapered" will switch to a flat profile at low AirPlay volumes. // volume_control_combined_hardware_priority = "no"; // when extending the volume range by combining the built-in software attenuator with the hardware mixer attenuator, set this to "yes" to reduce volume by using the hardware mixer first, then the built-in software attenuator. // default_airplay_volume = -24.0; // this is the suggested volume after a reset or after the high_volume_threshold has been exceed and the high_volume_idle_timeout_in_minutes has passed @@ -190,7 +196,7 @@ alsa = // disable_standby_mode_silence_scan_interval = 0.004; // Use this optional advanced setting to control how often the amount of audio remaining in the output buffer should be checked. }; -// Parameters for the "pipe" audio back end, a back end that directs raw CD-style audio output to a pipe. No interpolation is done. +// Parameters for the "pipe" audio back end, a back end that directs raw CD-format audio output to a pipe. No interpolation is done. pipe = { // name = "/tmp/shairport-sync-audio"; // this is the default diff --git a/.build/software/shairport-sync/container_build.bash b/.build/software/shairport-sync/container_build.bash index dfee9e7fec..3085acbf5e 100755 --- a/.build/software/shairport-sync/container_build.bash +++ b/.build/software/shairport-sync/container_build.bash @@ -45,18 +45,19 @@ do done [[ $DISTRO =~ ^('buster'|'bullseye'|'bookworm'|'trixie')$ ]] || { G_DIETPI-NOTIFY 1 "Invalid distro \"$DISTRO\" passed, aborting..."; exit 1; } case $ARCH in - 'armv6l') image="DietPi_Container-ARMv6-${DISTRO^}" arch=1;; - 'armv7l') image="DietPi_Container-ARMv7-${DISTRO^}" arch=2;; - 'aarch64') image="DietPi_Container-ARMv8-${DISTRO^}" arch=3;; - 'x86_64') image="DietPi_Container-x86_64-${DISTRO^}" arch=10;; - 'riscv64') image='DietPi_Container-RISC-V-Sid' arch=11;; + 'armv6l') image="ARMv6-${DISTRO^}" arch=1;; + 'armv7l') image="ARMv7-${DISTRO^}" arch=2;; + 'aarch64') image="ARMv8-${DISTRO^}" arch=3;; + 'x86_64') image="x86_64-${DISTRO^}" arch=10;; + 'riscv64') image='RISC-V-Sid' arch=11;; *) G_DIETPI-NOTIFY 1 "Invalid architecture \"$ARCH\" passed, aborting..."; exit 1;; esac +image="DietPi_Container-$image.img" ########################################## # Dependencies ########################################## -apackages=('7zip' 'parted' 'fdisk' 'systemd-container') +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_AG_CHECK_INSTALL_PREREQ "${apackages[@]}" @@ -64,14 +65,13 @@ G_AG_CHECK_INSTALL_PREREQ "${apackages[@]}" # Prepare container ########################################## # Download -G_EXEC curl -sSfO "https://dietpi.com/downloads/images/$image.7z" -G_EXEC 7zz e "$image.7z" "$image.img" -G_EXEC rm "$image.7z" -G_EXEC truncate -s 2G "$image.img" +G_EXEC curl -sSfO "https://dietpi.com/downloads/images/$image.xz" +G_EXEC xz -d "$image.xz" +G_EXEC truncate -s 2G "$image" # Loop device FP_LOOP=$(losetup -f) -G_EXEC losetup "$FP_LOOP" "$image.img" +G_EXEC losetup "$FP_LOOP" "$image" G_EXEC partprobe "$FP_LOOP" G_EXEC partx -u "$FP_LOOP" G_EXEC_OUTPUT=1 G_EXEC e2fsck -fp "${FP_LOOP}p1" diff --git a/.build/software/vaultwarden/container_build.bash b/.build/software/vaultwarden/container_build.bash index 31916ea1c0..4f1a6fc0b6 100755 --- a/.build/software/vaultwarden/container_build.bash +++ b/.build/software/vaultwarden/container_build.bash @@ -45,18 +45,19 @@ do done [[ $DISTRO =~ ^('buster'|'bullseye'|'bookworm'|'trixie')$ ]] || { G_DIETPI-NOTIFY 1 "Invalid distro \"$DISTRO\" passed, aborting..."; exit 1; } case $ARCH in - 'armv6l') image="DietPi_Container-ARMv6-${DISTRO^}" arch=1;; - 'armv7l') image="DietPi_Container-ARMv7-${DISTRO^}" arch=2;; - 'aarch64') image="DietPi_Container-ARMv8-${DISTRO^}" arch=3;; - 'x86_64') image="DietPi_Container-x86_64-${DISTRO^}" arch=10;; - #'riscv64') image='DietPi_Container-RISC-V-Sid' arch=11;; + 'armv6l') image="ARMv6-${DISTRO^}" arch=1;; + 'armv7l') image="ARMv7-${DISTRO^}" arch=2;; + 'aarch64') image="ARMv8-${DISTRO^}" arch=3;; + 'x86_64') image="x86_64-${DISTRO^}" arch=10;; + 'riscv64') image='RISC-V-Sid' arch=11;; *) G_DIETPI-NOTIFY 1 "Invalid architecture \"$ARCH\" passed, aborting..."; exit 1;; esac +image="DietPi_Container-$image.img" ########################################## # Dependencies ########################################## -apackages=('7zip' 'parted' 'fdisk' 'systemd-container') +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_AG_CHECK_INSTALL_PREREQ "${apackages[@]}" @@ -64,14 +65,13 @@ G_AG_CHECK_INSTALL_PREREQ "${apackages[@]}" # Prepare container ########################################## # Download -G_EXEC curl -sSfO "https://dietpi.com/downloads/images/$image.7z" -G_EXEC 7zz e "$image.7z" "$image.img" -G_EXEC rm "$image.7z" -G_EXEC truncate -s 2G "$image.img" +G_EXEC curl -sSfO "https://dietpi.com/downloads/images/$image.xz" +G_EXEC xz -d "$image.xz" +G_EXEC truncate -s 2G "$image" # Loop device FP_LOOP=$(losetup -f) -G_EXEC losetup "$FP_LOOP" "$image.img" +G_EXEC losetup "$FP_LOOP" "$image" G_EXEC partprobe "$FP_LOOP" G_EXEC partx -u "$FP_LOOP" G_EXEC_OUTPUT=1 G_EXEC e2fsck -fp "${FP_LOOP}p1" diff --git a/.github/workflows/amiberry.yml b/.github/workflows/amiberry.yml index 5ff035d2f1..2d3546749c 100644 --- a/.github/workflows/amiberry.yml +++ b/.github/workflows/amiberry.yml @@ -55,10 +55,6 @@ jobs: dist: ${{ fromJson(needs.prep.outputs.dist) }} exclude: - { plat: rk3588, dist: buster } - - { plat: rpi1, dist: trixie } - - { plat: rpi2, dist: trixie } - - { plat: rpi3, dist: trixie } - - { plat: rpi4, dist: trixie } fail-fast: false name: "Build: ${{ matrix.plat }} - ${{ matrix.dist }}" runs-on: ubuntu-22.04 diff --git a/.github/workflows/dietpi-build.yml b/.github/workflows/dietpi-build.yml index 83bcfddf04..5f1bd0a0bc 100644 --- a/.github/workflows/dietpi-build.yml +++ b/.github/workflows/dietpi-build.yml @@ -27,7 +27,7 @@ jobs: echo buildargs=[\ '"-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 2 -d 8 -e all", "-m 0 -a 3 -d 8 -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 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", '\ @@ -74,7 +74,7 @@ jobs: '"-m 75 -a 1 -d 5", "-m 75 -a 2 -d 5", "-m 75 -a 3 -d 5", "-m 75 -a 10 -d 5", '\ '"-m 75 -a 1 -d 6", "-m 75 -a 2 -d 6", "-m 75 -a 3 -d 6", "-m 75 -a 10 -d 6", '\ '"-m 75 -a 1 -d 7", "-m 75 -a 2 -d 7", "-m 75 -a 3 -d 7", "-m 75 -a 10 -d 7", '\ - '"-m 75 -a 2 -d 8", "-m 75 -a 3 -d 8", "-m 75 -a 10 -d 8", "-m 75 -a 11 -d 8", '\ + '"-m 75 -a 1 -d 8", "-m 75 -a 2 -d 8", "-m 75 -a 3 -d 8", "-m 75 -a 10 -d 8", "-m 75 -a 11 -d 8", '\ '"-m 76 -d 6", "-m 76 -d 7", "-m 76 -d 8", '\ '"-m 77 -d 6", "-m 77 -d 7", "-m 77 -d 8", '\ '"-m 78 -d 6", "-m 78 -d 7", "-m 78 -d 8", '\ @@ -93,7 +93,7 @@ jobs: echo buildargs=[\ '"-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 2 -d 8 -e all", "-m 0 -a 3 -d 8 -e all"]' >> "$GITHUB_OUTPUT" + '"-m 0 -a 1 -d 8 -e all", "-m 0 -a 2 -d 8 -e all", "-m 0 -a 3 -d 8 -e all"]' >> "$GITHUB_OUTPUT" else echo buildargs='["${{ github.event.inputs.buildargs }}"]' >> "$GITHUB_OUTPUT" fi diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index 81bbd2cc1c..64a9249ec0 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -49,11 +49,11 @@ do done [[ $DISTRO =~ ^('buster'|'bullseye'|'bookworm'|'trixie')$ ]] || { G_DIETPI-NOTIFY 1 "Invalid distro \"$DISTRO\" passed, aborting..."; exit 1; } case $ARCH in - 'armv6l') image="DietPi_Container-ARMv6-${DISTRO^}" arch=1;; - 'armv7l') image="DietPi_Container-ARMv7-${DISTRO^}" arch=2;; - 'aarch64') image="DietPi_Container-ARMv8-${DISTRO^}" arch=3;; - 'x86_64') image="DietPi_Container-x86_64-${DISTRO^}" arch=10;; - 'riscv64') image="DietPi_Container-RISC-V-Sid" arch=11;; + 'armv6l') image="DietPi_Container-ARMv6-${DISTRO^}.img" arch=1;; + 'armv7l') image="DietPi_Container-ARMv7-${DISTRO^}.img" arch=2;; + 'aarch64') image="DietPi_Container-ARMv8-${DISTRO^}.img" arch=3;; + 'x86_64') image="DietPi_Container-x86_64-${DISTRO^}.img" arch=10;; + 'riscv64') image="DietPi_Container-RISC-V-Sid.img" arch=11;; *) G_DIETPI-NOTIFY 1 "Invalid architecture \"$ARCH\" passed, aborting..."; exit 1;; esac [[ $SOFTWARE =~ ^[0-9\ ]+$ ]] || { G_DIETPI-NOTIFY 1 "Invalid software list \"$SOFTWARE\" passed, aborting..."; exit 1; } @@ -97,7 +97,7 @@ Process_Software() 41) aSERVICES[i]='emby-server' aTCP[i]='8096';; 42) aSERVICES[i]='plexmediaserver' aTCP[i]='32400';; 43) aSERVICES[i]='mumble-server' aTCP[i]='64738';; - 44) aSERVICES[i]='transmission-daemon' aTCP[i]='9091';; + 44) aSERVICES[i]='transmission-daemon' aTCP[i]='9091 51413' aUDP[i]='51413';; 45) aSERVICES[i]='deluged deluge-web' aTCP[i]='8112 58846 6882';; 46) aSERVICES[i]='qbittorrent' aTCP[i]='1340 6881';; 49) aSERVICES[i]='gogs' aTCP[i]='3000';; @@ -131,8 +131,8 @@ Process_Software() 94) aSERVICES[i]='proftpd' aTCP[i]='21';; 95) aSERVICES[i]='vsftpd' aTCP[i]='21';; 96) aSERVICES[i]='smbd' aTCP[i]='139 445';; - 97) aCOMMANDS[i]='openvpn --version';; # aSERVICES[i]='openvpn' aUDP[i]='1194' GitHub Action runners to not support the TUN module - 98) aSERVICES[i]='haproxy' aTCP[i]='80';; + 97) aCOMMANDS[i]='openvpn --version';; # aSERVICES[i]='openvpn' aUDP[i]='1194' GitHub Action runners do not support the TUN module + 98) aSERVICES[i]='haproxy' aTCP[i]='80 1338';; 99) aSERVICES[i]='node_exporter' aTCP[i]='9100';; #100) (( $arch < 3 )) && aCOMMANDS[i]='/usr/bin/pijuice_cli32 -V' || aCOMMANDS[i]='/usr/bin/pijuice_cli64 -V' aSERVICES[i]='pijuice' aTCP[i]='????' Service does not start without I2C device, not present in container and CLI command always puts you in interactive console 104) aSERVICES[i]='dropbear' aTCP[i]='22';; @@ -196,7 +196,7 @@ Process_Software() 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;; - 181) aSERVICES[i]='papermc' aTCP[i]='25565';; + 181) aSERVICES[i]='papermc' aTCP[i]='25565 25575';; 182) aSERVICES[i]='unbound' aUDP[i]='53'; [[ ${aSERVICES[126]} ]] && aUDP[i]+=' 5335';; # Uses port 5335 if Pi-hole or AdGuard Home is installed, but those do listen on port 53 instead 183) aSERVICES[i]='vaultwarden' aTCP[i]='8001'; (( $arch < 10 )) && aDELAY[i]=20;; 184) aSERVICES[i]='tor';; # aTCP[i]='443 9051' Interactive install with ports depending on choice and relay type @@ -254,7 +254,7 @@ done ########################################## # Dependencies ########################################## -apackages=('7zip' 'parted' 'fdisk' 'systemd-container') +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_AG_CHECK_INSTALL_PREREQ "${apackages[@]}" @@ -262,14 +262,13 @@ G_AG_CHECK_INSTALL_PREREQ "${apackages[@]}" # Prepare container ########################################## # Download -G_EXEC curl -sSfO "https://dietpi.com/downloads/images/$image.7z" -G_EXEC 7zz e "$image.7z" "$image.img" -G_EXEC rm "$image.7z" -G_EXEC truncate -s 8G "$image.img" +G_EXEC curl -sSfO "https://dietpi.com/downloads/images/$image.xz" +G_EXEC xz -d "$image.xz" +G_EXEC truncate -s 8G "$image" # Loop device FP_LOOP=$(losetup -f) -G_EXEC losetup "$FP_LOOP" "$image.img" +G_EXEC losetup "$FP_LOOP" "$image" G_EXEC partprobe "$FP_LOOP" G_EXEC partx -u "$FP_LOOP" G_EXEC_OUTPUT=1 G_EXEC e2fsck -fp "${FP_LOOP}p1" diff --git a/.github/workflows/dietpi-software.yml b/.github/workflows/dietpi-software.yml index 0adc48db86..3be30f25f9 100644 --- a/.github/workflows/dietpi-software.yml +++ b/.github/workflows/dietpi-software.yml @@ -67,9 +67,6 @@ jobs: - { arch: riscv64, dist: buster } - { arch: riscv64, dist: bullseye } - { arch: riscv64, dist: bookworm } - - { arch: armv6l, dist: trixie } - # Temporarily prevent Trixie/Sid builds until systemd + QEMU incompatibility fix has been released: https://github.com/systemd/systemd/pull/28954 - - { dist: trixie } fail-fast: false name: "${{ matrix.arch }} - ${{ matrix.dist }} - ${{ github.event.inputs.soft }}" runs-on: ubuntu-22.04 diff --git a/.github/workflows/gmediarender.yml b/.github/workflows/gmediarender.yml index d05feb9db5..227a1001e4 100644 --- a/.github/workflows/gmediarender.yml +++ b/.github/workflows/gmediarender.yml @@ -56,7 +56,6 @@ jobs: - { arch: riscv64, dist: buster } - { arch: riscv64, dist: bullseye } - { arch: riscv64, dist: bookworm } - - { arch: armv6l, dist: trixie } fail-fast: false name: "Build: ${{ matrix.arch }} - ${{ matrix.dist }}" runs-on: ubuntu-22.04 diff --git a/.github/workflows/gogs.yml b/.github/workflows/gogs.yml index 881a7bd95d..ab6ce1742f 100644 --- a/.github/workflows/gogs.yml +++ b/.github/workflows/gogs.yml @@ -49,7 +49,6 @@ jobs: - { arch: 11, dist: 5 } - { arch: 11, dist: 6 } - { arch: 11, dist: 7 } - - { arch: 1, dist: 8 } fail-fast: false name: "Build: ${{ matrix.arch }} - ${{ matrix.dist }}" runs-on: ubuntu-22.04 @@ -65,7 +64,7 @@ jobs: arch=${{ matrix.arch }} dist=${{ matrix.dist }} arch_to_name=([1]='armv6l' [2]='armv7l' [3]='aarch64' [10]='x86_64' [11]='riscv64') - dist_to_name=([5]='buster' [6]='bullseye' [7]='bookworm') + dist_to_name=([5]='buster' [6]='bullseye' [7]='bookworm' [8]='trixie') arch_name=${arch_to_name[$arch]} dist_name=${dist_to_name[$dist]} diff --git a/.github/workflows/shairport-sync.yml b/.github/workflows/shairport-sync.yml index 5ab8fa4f1f..afb46fe8db 100644 --- a/.github/workflows/shairport-sync.yml +++ b/.github/workflows/shairport-sync.yml @@ -56,7 +56,6 @@ jobs: - { arch: riscv64, dist: buster } - { arch: riscv64, dist: bullseye } - { arch: riscv64, dist: bookworm } - - { arch: armv6l, dist: trixie } fail-fast: false name: "Build: ${{ matrix.arch }} - ${{ matrix.dist }}" runs-on: ubuntu-22.04 diff --git a/.github/workflows/squeezelite.yml b/.github/workflows/squeezelite.yml index fabdcd5ed0..e795784733 100644 --- a/.github/workflows/squeezelite.yml +++ b/.github/workflows/squeezelite.yml @@ -56,7 +56,6 @@ jobs: - { arch: riscv64, dist: buster } - { arch: riscv64, dist: bullseye } - { arch: riscv64, dist: bookworm } - - { arch: armv6l, dist: trixie } fail-fast: false name: "Build: ${{ matrix.arch }} - ${{ matrix.dist }}" runs-on: ubuntu-22.04 diff --git a/.github/workflows/vaultwarden.yml b/.github/workflows/vaultwarden.yml index c4681256ff..eddb693d35 100644 --- a/.github/workflows/vaultwarden.yml +++ b/.github/workflows/vaultwarden.yml @@ -5,7 +5,7 @@ on: arch: description: 'Target architecture' type: choice - options: [armv6l, armv7l, aarch64, x86_64, all] + options: [armv6l, armv7l, aarch64, x86_64, riscv64, all] default: all required: true dist: @@ -53,7 +53,9 @@ jobs: arch: ${{ fromJson(needs.prep.outputs.arch) }} dist: ${{ fromJson(needs.prep.outputs.dist) }} exclude: - - { arch: armv6l, dist: trixie } + - { arch: riscv64, dist: buster } + - { arch: riscv64, dist: bullseye } + - { arch: riscv64, dist: bookworm } fail-fast: false name: "Build: ${{ matrix.arch }} - ${{ matrix.dist }}" runs-on: ubuntu-22.04 diff --git a/.github/workflows/ympd.yml b/.github/workflows/ympd.yml index dcdf2aec10..ec63e31fe1 100644 --- a/.github/workflows/ympd.yml +++ b/.github/workflows/ympd.yml @@ -56,7 +56,6 @@ jobs: - { arch: riscv64, dist: buster } - { arch: riscv64, dist: bullseye } - { arch: riscv64, dist: bookworm } - - { arch: armv6l, dist: trixie } fail-fast: false name: "Build: ${{ matrix.arch }} - ${{ matrix.dist }}" runs-on: ubuntu-22.04 diff --git a/.meta/dietpi-bookworm-upgrade b/.meta/dietpi-bookworm-upgrade index 38879aaebf..92e2343d66 100755 --- a/.meta/dietpi-bookworm-upgrade +++ b/.meta/dietpi-bookworm-upgrade @@ -55,7 +55,8 @@ mapfile -t apackages < <(apt-mark showhold) unset -v apackages G_DIETPI-NOTIFY 2 'Migrating package lists to Bookworm suite' -G_EXEC sed -i -e 's/bullseye/bookworm/g' -e 's/ non-free$/ non-free non-free-firmware/' /etc/apt/sources.list +G_EXEC sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list +(( $G_RASPBIAN )) || G_EXEC sed -i 's/ non-free$/ non-free non-free-firmware/' /etc/apt/sources.list [[ $(find /etc/apt/sources.list.d/*.list 2> /dev/null) ]] && G_EXEC sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list.d/*.list [[ -f '/etc/apt/sources.list.d/dietpi-mympd.list' ]] && G_EXEC sed -i 's/Debian_11/Debian_Testing/' /etc/apt/sources.list.d/dietpi-mympd.list @@ -67,23 +68,6 @@ G_DIETPI-NOTIFY 2 'Reverting some package lists to Bullseye which have no Bookwo [[ -f '/etc/apt/sources.list.d/influxdb.list' ]] && G_EXEC sed -i 's/bookworm/bullseye/' /etc/apt/sources.list.d/influxdb.list [[ -f '/etc/apt/sources.list.d/mopidy.list' ]] && G_EXEC sed -i 's/bookworm/bullseye/' /etc/apt/sources.list.d/mopidy.list -# RPi/ARMv6 container Bookworm -if [[ -f '/etc/apt/sources.list.d/raspi.list' ]] -then - # Avoid conflict between RPi repo and Bookworm FFmpeg packages: https://github.com/MichaIng/DietPi/issues/6461 - G_DIETPI-NOTIFY 2 'Enforcing Debian Bookworm FFmpeg packages over RPi repo ones' - cat << '_EOF_' > /etc/apt/preferences.d/dietpi-ffmpeg -Package: src:ffmpeg -Pin: version 7:5* -Pin-Priority: 1000 -_EOF_ - if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[31\]=2' /boot/dietpi/.installed && dpkg-query -s kodi &> /dev/null - then - G_DIETPI-NOTIFY 2 'Temporarily removeing Kodi packages to avoid conflicts with Debian Bookworm packages' - G_EXEC_OUTPUT=1 G_EXEC apt-get -y autoremove kodi - fi -fi - G_DIETPI-NOTIFY 2 'Applying the actual upgrade to Debian Bookworm' /boot/dietpi/dietpi-services stop G_AGUP @@ -122,7 +106,7 @@ dpkg-query -s unbound &> /dev/null && G_AGI dns-root-data # Allow IPv6 port binding failure explicitly, not implicit anymore since Bookworm: https://github.com/MichaIng/DietPi/pull/6103#issuecomment-1407749720 [[ -f '/etc/redis/redis.conf' ]] && G_EXEC sed -i '/^bind 127.0.0.1 ::1$/c\bind 127.0.0.1 -::1' /etc/redis/redis.conf # Reinstall all PHP applications which require non-standard PHP modules, webservers which did access a versioned PHP-FPM socket, Python applications installed via pip, ... -G_PROMPT_BACKUP_DISABLED=1 /boot/dietpi/dietpi-software reinstall 31 38 40 47 48 83 84 85 89 93 114 118 125 130 134 136 139 143 153 155 157 180 +G_PROMPT_BACKUP_DISABLED=1 /boot/dietpi/dietpi-software reinstall 38 40 47 48 83 84 85 89 93 114 118 125 130 134 136 139 143 153 155 157 180 # PostgreSQL upgrade if grep -q '^aSOFTWARE_INSTALL_STATE\[194\]=2$' /boot/dietpi/.installed diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index b71f368813..fcd4d9c8d7 100755 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -86,6 +86,10 @@ shopt -s extglob [80]='Orange Pi 5' [81]='StarFive VisionFive 2' [82]='Orange Pi 5 Plus' + [83]='Orange Pi Zero 3' + [84]='Star64' + [85]='ROCK 5A' + [86]='ASUS Tinker Board 2' ) ## Benchmark data arrays: aBENCH_XX[$HW_MODEL,${aBENCH_XX_INDEX[$HW_MODEL]}] @@ -692,8 +696,14 @@ shopt -s extglob aSOFTWARE_NAME8_22[141]='ADS-B Feeder' aSOFTWARE_NAME8_22[212]='Kavita' + aSOFTWARE_NAME8_23=() + for i in "${!aSOFTWARE_NAME8_22[@]}" + do + aSOFTWARE_NAME8_23[i]=${aSOFTWARE_NAME8_22[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_NAME8_22[@]}" + for i in "${aSOFTWARE_NAME8_23[@]}" do aSOFTWARE[$i]=0 done diff --git a/.update/patches b/.update/patches index 7a7eabfae8..ea45c2dfc1 100755 --- a/.update/patches +++ b/.update/patches @@ -1376,9 +1376,6 @@ Patch_8_20() # Odroid N2: Assure that hardware random generator driver is loaded as early as possible to prevent rngd failures: https://github.com/MichaIng/DietPi/issues/6483 (( $G_HW_MODEL == 15 )) && G_EXEC eval 'echo '\''meson_rng'\'' > /etc/modules-load.d/dietpi-hwrng.conf' - - # Hotfix for FFmpeg "downgrade" on RPi Bookworm: https://github.com/MichaIng/DietPi/issues/6512 - [[ -f '/etc/apt/apt.conf.d/dietpi-ffmpeg' ]] && G_EXEC rm /etc/apt/apt.conf.d/dietpi-ffmpeg } Patch_8_21() @@ -1404,26 +1401,10 @@ Patch_8_22() [[ -f '/etc/apt/preferences.d/dietpi-armbian-tmp' ]] && G_EXEC rm /etc/apt/preferences.d/dietpi-armbian-tmp [[ -f '/etc/apt/apt.conf.d/dietpi-armbian' ]] && G_EXEC rm /etc/apt/apt.conf.d/dietpi-armbian - # Migrate Armbian keyring from /etc/apt/trusted.gpg to /etc/apt/trusted.gpg.d for old images - if [[ -f '/etc/apt/trusted.gpg' && $(apt-key --keyring /etc/apt/trusted.gpg list 'DF00FAF1C577104B50BF1D0093D6889F9F0E78D5' 2> /dev/null) ]] - then - G_EXEC eval 'curl -sSfL '\''https://apt.armbian.com/armbian.key'\'' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-armbian.gpg --yes' - G_EXEC apt-key --keyring /etc/apt/trusted.gpg del 'DF00FAF1C577104B50BF1D0093D6889F9F0E78D5' - [[ $(apt-key --keyring /etc/apt/trusted.gpg list 2> /dev/null) ]] || G_EXEC rm /etc/apt/trusted.gpg - fi - - # RPi: Update raspberrypi-sys-mods - if (( $G_HW_MODEL < 10 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' raspberrypi-sys-mods 2> /dev/null)" lt-nl 2:20230510-dietpi1 - 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 - # 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 - elif (( $G_HW_MODEL == 10 )) + 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 @@ -1437,24 +1418,43 @@ Patch_8_22() 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" _EOF_ + + # Orange Pi 5: Fix fdtfile entry + elif (( $G_HW_MODEL == 80 )) && grep -q '^fdtfile=$' /boot/dietpiEnv.txt + then + G_DIETPI-NOTIFY 2 'Fixing fdtfile entry in dietpiEnv.txt ...' + G_EXEC sed -i '/^fdtfile=$/d' /boot/dietpiEnv.txt + fi +} + +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 + # Quartz64 elif (( $G_HW_MODEL == 49 )) then - if dpkg --compare-versions "$(dpkg-query -Wf '${Version}' firmware-quartz64a 2> /dev/null)" lt-nl 6.5.5-dietpi1 + if dpkg --compare-versions "$(dpkg-query -Wf '${Version}' firmware-quartz64a 2> /dev/null)" lt-nl 6.5.8-dietpi1 then G_DIETPI-NOTIFY 2 'Updating Quartz64 Model A kernel and bootloader ...' G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/firmware-quartz64a.deb' G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb G_EXEC rm package.deb - elif dpkg --compare-versions "$(dpkg-query -Wf '${Version}' firmware-quartz64b 2> /dev/null)" lt-nl 6.5.5-dietpi1 + elif dpkg --compare-versions "$(dpkg-query -Wf '${Version}' firmware-quartz64b 2> /dev/null)" lt-nl 6.5.8-dietpi1 then G_DIETPI-NOTIFY 2 'Updating Quartz64 Model B kernel and bootloader ...' G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/firmware-quartz64b.deb' G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb G_EXEC rm package.deb - elif dpkg --compare-versions "$(dpkg-query -Wf '${Version}' firmware-soquartz 2> /dev/null)" lt-nl 6.5.5-dietpi1 + elif dpkg --compare-versions "$(dpkg-query -Wf '${Version}' firmware-soquartz 2> /dev/null)" lt-nl 6.5.8-dietpi1 then G_DIETPI-NOTIFY 2 'Updating SOQuartz kernel and bootloader ...' G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/firmware-soquartz.deb' @@ -1462,19 +1462,63 @@ _EOF_ G_EXEC rm package.deb fi - # Orange Pi 5: Fix fdtfile entry - elif (( $G_HW_MODEL == 80 )) && grep -q '^fdtfile=$' /boot/dietpiEnv.txt - then - G_DIETPI-NOTIFY 2 'Fixing fdtfile entry in dietpiEnv.txt ...' - G_EXEC sed -i '/^fdtfile=$/d' /boot/dietpiEnv.txt - # VisionFive 2 - elif (( $G_HW_MODEL == 81 )) && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' linux-image-visionfive2 2> /dev/null)" lt-nl 5.15.133-dietpi1 + elif (( $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' G_EXEC_OUTPUT=1 G_EXEC dpkg -i --force-confdef,confold package.deb G_EXEC rm package.deb + local serial overlays=() + read -r serial < /proc/device-tree/serial-number + if [[ $serial == 'VF7110A1-'* ]] + then + G_DIETPI-NOTIFY 2 'A revision detected, applying device tree overlay to fix Ethernet ...' + read -ra overlays < <(mawk '$1=="fdtoverlays"{$1="";print}' /boot/extlinux/extlinux.conf) + local i= + for i in "${overlays[@]}"; do [[ $i == *'/ethernet-A12.dtbo' ]] && break; done + if [[ $i == *'/ethernet-A12.dtbo' ]] + then + G_DIETPI-NOTIFY 2 'A revision Ethernet overlay was applied already ...' + else + overlays+=('/usr/lib/linux-image-visionfive2/starfive/vf2-overlay/ethernet-A12.dtbo') + G_CONFIG_INJECT 'fdtoverlays[[:blank:]]' "fdtoverlays ${overlays[*]}" /boot/extlinux/extlinux.conf + fi + fi + if [[ $serial == *'-D008E000-'* ]] + then + G_DIETPI-NOTIFY 2 '8 GB RAM model detected, applying device tree overlay to make all 8 GB available to the system ...' + read -ra overlays < <(mawk '$1=="fdtoverlays"{$1="";print}' /boot/extlinux/extlinux.conf) + local i= + for i in "${overlays[@]}"; do [[ $i == *'/8GB.dtbo' ]] && break; done + if [[ $i == *'/8GB.dtbo' ]] + then + G_DIETPI-NOTIFY 2 '8 GB RAM overlay was applied already ...' + else + overlays+=('/usr/lib/linux-image-visionfive2/starfive/vf2-overlay/8GB.dtbo') + G_CONFIG_INJECT 'fdtoverlays[[:blank:]]' "fdtoverlays ${overlays[*]}" /boot/extlinux/extlinux.conf + fi + fi + G_AGI libubootenv-tool + G_WHIP_MSG '[ INFO ] VisionFive 2 U-Boot environment and boot priorities +\nThe latest StarFive U-Boot release does not support our image anymore without adjusting the U-Boot environment. +\nThe kernel package we just installed comes with the needed config files to change the U-Boot environment. We took the chance to ship a generic default which allows to boot from all filesystems on all partitions from all boot media, including NVMe, USB, eMMC, SD cards and DHCP/TFTP. +\nEspecially before updating to latest SPI bootloader, we recommend to flash this environment, right after you rebooted the system, with the following command: +# fw_setenv +\nAfterwards, you can print the U-Boot environment via "fw_printenv" and set individual variables via +# fw_setenv name value +\nThe "boot_targets" variabe takes a list of targets, which U-Boot tries to boot from left to right. The default is +# fw_setenv boot_targets "mmc1 usb0 nvme0 mmc0 dhcp" +\n"mnc1" is the SD card, "mmc0" the eMMC module. +\nPlease report back if you face any issues with this U-Boot environment, e.g. also with other distributions.' + fi + # ADS-B Feeder used to install two service files that aren't needed: https://github.com/MichaIng/DietPi/pull/6661 + if [[ -f '/boot/dietpi/.installed' ]] && grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[141\]=2' /boot/dietpi/.installed + then + systemctl -q is-enabled adsb-update.timer && G_EXEC systemctl --no-reload disable --now adsb-update.timer + [[ -f '/etc/systemd/system/adsb-update.timer' ]] && G_EXEC rm /etc/systemd/system/adsb-update.timer + systemctl -q is-enabled adsb-update && G_EXEC systemctl --no-reload disable --now adsb-update + [[ -f '/etc/systemd/system/adsb-update.service' ]] && G_EXEC rm /etc/systemd/system/adsb-update.service fi } diff --git a/.update/pre-patches b/.update/pre-patches index f961470db7..b5317d83c2 100755 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -221,7 +221,7 @@ fi # v8.15 if (( $G_DIETPI_VERSION_CORE < 8 || ( $G_DIETPI_VERSION_CORE == 8 && $G_DIETPI_VERSION_SUB < 15 ) )) then - if [[ $G_RASPBIAN != 1 ]] && (( $G_DISTRO == 7 )) && grep -q 'non-free' /etc/apt/sources.list && ! grep -q 'non-free-firmware' /etc/apt/sources.list + if [[ $G_RASPBIAN != 1 ]] && (( $G_DISTRO > 6 )) && grep -q 'non-free' /etc/apt/sources.list && ! grep -q 'non-free-firmware' /etc/apt/sources.list then # https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.en.html#non-free-split G_DIETPI-NOTIFY 2 'Adding new non-free-firmware component to APT lists, to re-enable firmware upgrades' @@ -235,22 +235,6 @@ then fi fi -# v8.20 -if (( $G_DIETPI_VERSION_CORE < 8 || ( $G_DIETPI_VERSION_CORE == 8 && $G_DIETPI_VERSION_SUB < 20 ) )) -then - # RPi/ARMv6 container Bookworm: Avoid conflict between RPi repo and Bookworm FFmpeg packages: https://github.com/MichaIng/DietPi/issues/6461 - if [[ $G_DISTRO -ge 7 && -f '/etc/apt/sources.list.d/raspi.list' ]] - then - G_DIETPI-NOTIFY 2 'Enforcing Debian Bookworm FFmpeg packages over RPi repo ones' - cat << '_EOF_' > /etc/apt/preferences.d/dietpi-ffmpeg -Package: src:ffmpeg -Pin: version 7:5* -Pin-Priority: 1000 -_EOF_ - G_EXEC eval 'echo '\''APT::Get::Allow-Downgrades "1";'\'' > /etc/apt/apt.conf.d/dietpi-ffmpeg' - fi -fi - # v8.21 if (( $G_DIETPI_VERSION_CORE < 8 || ( $G_DIETPI_VERSION_CORE == 8 && $G_DIETPI_VERSION_SUB < 21 ) )) then @@ -308,5 +292,47 @@ _EOF_ fi fi +# v8.23 +if (( $G_DIETPI_VERSION_CORE < 8 || ( $G_DIETPI_VERSION_CORE == 8 && $G_DIETPI_VERSION_SUB < 23 ) )) +then + # RISC-V: Migrate from Debian ports to regular Debian Sid + if (( $G_HW_ARCH == 11 )) + 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' + 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 and removing obsolete FFmpeg workaround' + G_EXEC eval 'echo '\''deb https://archive.raspberrypi.org/debian/ bookworm main'\'' > /etc/apt/sources.list.d/raspi.list' + [[ -f '/etc/apt/preferences.d/dietpi-ffmpeg' ]] && G_EXEC rm /etc/apt/preferences.d/dietpi-ffmpeg + + G_DIETPI-NOTIFY 2 'Removing faulty non-free-firmware component if present' + (( $G_RASPBIAN )) && G_EXEC sed -i 's/ non-free-firmware$//' /etc/apt/sources.list + fi + + # Migrate Armbian keyring from /etc/apt/trusted.gpg to /etc/apt/trusted.gpg.d for old images + if [[ -f '/etc/apt/trusted.gpg' && $(apt-key --keyring /etc/apt/trusted.gpg list 'DF00FAF1C577104B50BF1D0093D6889F9F0E78D5' 2> /dev/null) ]] + then + G_DIETPI-NOTIFY 2 'Migrating Armbian keyring from /etc/apt/trusted.gpg to /etc/apt/trusted.gpg.d' + G_EXEC eval 'curl -sSfL '\''https://apt.armbian.com/armbian.key'\'' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-armbian.gpg --yes' + G_EXEC apt-key --keyring /etc/apt/trusted.gpg del 'DF00FAF1C577104B50BF1D0093D6889F9F0E78D5' + [[ $(apt-key --keyring /etc/apt/trusted.gpg list 2> /dev/null) ]] || G_EXEC rm /etc/apt/trusted.gpg + fi + + # Migrate Sonarr keyring from apt-key and /etc/apt/trusted.gpg to /etc/apt/trusted.gpg.d + if [[ -f '/etc/apt/trusted.gpg' && $(apt-key --keyring /etc/apt/trusted.gpg list '2009837CBFFD68F45BC180471F4F90DE2A9B4BF8' 2> /dev/null) ]] + then + G_DIETPI-NOTIFY 2 'Migrating Sonarr keyring from apt-key and /etc/apt/trusted.gpg to /etc/apt/trusted.gpg.d' + G_EXEC eval 'curl -sSf '\''https://keyserver.ubuntu.com/pks/lookup?search=0x2009837CBFFD68F45BC180471F4F90DE2A9B4BF8&op=get'\'' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-sonarr.gpg --yes' + G_EXEC apt-key --keyring /etc/apt/trusted.gpg del '2009837CBFFD68F45BC180471F4F90DE2A9B4BF8' + [[ $(apt-key --keyring /etc/apt/trusted.gpg list 2> /dev/null) ]] || G_EXEC rm /etc/apt/trusted.gpg + fi + # Workaround for Beta v8.23.1 users as previous gpg method installed a 0600 file + [[ -f '/etc/apt/trusted.gpg.d/dietpi-sonarr.gpg' ]] && G_EXEC chmod 0644 /etc/apt/trusted.gpg.d/dietpi-sonarr.gpg +fi + exit 0 } diff --git a/.update/version b/.update/version index 0e2d288fb4..e4894e7115 100644 --- a/.update/version +++ b/.update/version @@ -2,7 +2,7 @@ # shellcheck disable=SC2034 # Available DietPi version G_REMOTE_VERSION_CORE=8 -G_REMOTE_VERSION_SUB=22 +G_REMOTE_VERSION_SUB=23 G_REMOTE_VERSION_RC=3 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=6 diff --git a/CHANGELOG.txt b/CHANGELOG.txt index c7b1b47b5a..33d3fa6e9a 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,29 @@ +v8.23 +(2023-10-21) + +Enhancements: +- RPi | On Debian Bookworm and above, the RPi APT repository will be migrated to its new Bookworm suite. This solves issues and should enhance performance with FFmpeg, Kodi and some other A/V software, where we used the Debian packages with less hardware support before. The packages should be upgraded automatically on DietPi update. Please report back if you experience any issues during this process. +- ROCK 5B | Added an option to dietpi-config "Advanced Option" to flash the SPI bootloader, which enables USB and NVMe boot for DietPi images. +- ROCK 4 | Added an option to dietpi-config "Advanced Option" to flash the SPI bootloader, which enables USB and in case NVMe boot for DietPi images. Note that not all ROCK 4 models ship with an onboard SPI storage. DietPi-Config will check for it, in case apply a related device tree overlay and suggests a reboot. If after the reboot an SPI device has still not been found, your board seems to have none. Report back if this is definitely wrong. Many thanks to @andreagdipaolo for doing this request: https://github.com/MichaIng/DietPi/issues/6688 +- VisionFive 2 | A major kernel upgrade to Linux 6.1 will be applied, including the needed configuration files to read and write the U-Boot environment, and a generic default environment. This allows booting from all filesystems of all partitions of all storage media, including NVMe SSDs, USB, eMMC, SD cards and DHCP/TFTP. This was necessary since the default environment of the latest StarFive U-Boot release does not support booting from any other then FAT filesystems on partition 3 anymore. It is hence necessary to apply our default environment before updating the SPI bootloader. After the DietPi update and a reboot, run "fw_setenv" to do that. Afterwards you can use this command and "fw_printenv" to edit the environment, including the "boot_targets" variable to define boot targets and priorities. Additionally this release will apply device tree overlays to enable 8 GB RAM and A revision Ethernet support. As this is a major change, we recommend a dietpi-backup or even an image backup. We are happy for any feedback: https://github.com/MichaIng/DietPi/issues/6212 +- DietPi-Software | Firefox: Enabled the software option for RISC-V, since Debian provides packages now. But do not expect good performance, as GPU-acceleration is missing. +- DietPi-Software | ADS-B Feeder: The uninstall has been hardened to rule out the removal of unused Docker images which were not created by ADS-B Feeder. Furthermore, beta tags are now correctly shown in the version string. Many thanks to @andreagdipaolo for reporting a related issue and @dirkhh for implementing the enhancement: https://github.com/MichaIng/DietPi/pull/6587#issuecomment-1743744008 +- DietPi-Software | DietPi-Dashboard: Experimental support for RISC-V has been added. Note that this will be an alpha build with alpha versions of certain dependencies, required to compile on RISC-V. Hence this is not suitable for production usage, which basically applies for RISC-V and the VisionFive 2 in general. + +Bug fixes: +- Raspberry Pi | Resolved an issue where the /dev/serial* symlinks were missing if binutils was not installed, which broke Bluetooth support among other things. Many thanks to @Rhiz3K for reporting this issue: https://github.com/MichaIng/DietPi/issues/6666 +- Sparky SBC | Resolved an issue where our current image was not booting because the old initramfs did not support new ext4 filesystem capabilities. Many thanks to @tenoritiger for reporting this issue: https://dietpi.com/forum/t/sparky-sbc-allo-not-booting-os/18011 +- DietPi daily cron | Resolved an issue where daily APT update checks failed if daily DietPi update checks were disabled. Many thanks to @lz1aam for reporting this issue: https://github.com/MichaIng/DietPi/issues/6651 +- DietPi-DDNS | YDNS has been added to the list of natively supported DDNS providers. Many thanks to @edmundlaugasson for requesting and @TDuffinNTU for implementing it: https://github.com/MichaIng/DietPi/issues/5128, https://github.com/MichaIng/DietPi/pull/6674 +- DietPi-Config | Resolved an issue where the WiFi channel selection was not possible with 5 GHz mode enabled. Many thanks to @lukaszsobala for reporting this issue: https://github.com/MichaIng/DietPi/issues/6636#issuecomment-1734427451 +- DietPi-Software | Resolved an issue where motionEye failed to build on Bullseye systems since piwheels currently have no wheel for the latest Pillow version. +- DietPi-Software | frp: Resolved an issue where the frp client could not connect to the frp server, because of missing spaces around the equal sign for the token setting in /etc/frp/frpc.ini. Many thanks to @josemahj for reporting this issue: https://github.com/MichaIng/DietPi/issues/6647 +- DietPi-Software | Home Assistant: Resolved an issue where the install failed on ARMv6, ARMv7 and RISC-V systems, since new build dependencies are required. + +As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/6693 + +----------------------------------------------------------------------------------------------------------- + v8.22 (2023-09-23) @@ -37,7 +63,7 @@ New images: Enhancements: - Orange Pi 5/ROCK 5B | An update of the kernel to Linux 5.10.160 will be applied automatically as part of the DietPi update. - Orange Pi 5 | An update of the U-Boot package will be applied. When flashing it to SPI via dietpi-config > Advanced Options > Update SPI bootloader, it enables booting DietPi via NVMe and USB. -- RK33xx SBCs | All SBCs with RK33xx SoC and Armbian's "linux-image-current-rockchip64" kernel package will receive a major kernel upgrade to Linux 6.1.46, including lots of fixes and enhancements that have been applied upstream and by Armbian in the meantime. Since Armbian's APT repository has not seen any update since February 2023, we started compiling and hosting own builds. An own APT repository is being worked on to better distribute our own package builds. Until then, headers for this kernel package can be downloaded at: https://dietpi.com/downloads/binaries/linux-headers-current-rockchip64.deb +- RK33xx SBCs | All SBCs with RK33xx SoC and Armbian's "linux-image-current-rockchip64" kernel package will receive a major kernel upgrade to Linux 6.1.46, including lots of fixes and enhancements that have been applied upstream and by Armbian in the meantime. Since Armbian's APT repository has not seen any update since February 2023, we started compiling and hosting own builds. An own APT repository is being worked on to better distribute our own package builds. - DietPi-Config | WiFi Hotspot: When applying settings, manually changed IP addresses in /etc/network/interfaces will now be preserved. Additionally, it is now assured that changing interface names, e.g. due to an additionally attached WiFi adapter, are now aligned across /etc/network/interfaces, hostapd and DHCP server configs. - DietPi-Config | WiFi Hotspot: Toggles for enabling 802.11ac/WiFi 5, 802.11ax/WiFi 6 (Bookworm only) and 5 GHz WiFi respectively have been added to the menu. - DietPi-Software | WiFi Hotspot: We added new dietpi.txt settings "SOFTWARE_WIFI_HOTSPOT_WIFI4", "SOFTWARE_WIFI_HOTSPOT_WIFI5", "SOFTWARE_WIFI_HOTSPOT_WIFI6" and "SOFTWARE_WIFI_HOTSPOT_5G" to have 802.11n/WiFi 4, 802.11ac/WiFi 5, 802.11ax/WiFi 6 (Bookworm only) and 5 GHz support respectively enabled on install. diff --git a/dietpi/dietpi-backup b/dietpi/dietpi-backup index 1d524f75b4..7ad4fea2b6 100755 --- a/dietpi/dietpi-backup +++ b/dietpi/dietpi-backup @@ -541,8 +541,9 @@ _EOF_ 'Manual' ': Manually type a directory to use' ) - if G_WHIP_MENU "Please select the location where the backup will be saved, and restored from.\n\nYour current location:\n$FP_TARGET"; then - + G_WHIP_BUTTON_OK_TEXT='Select' G_WHIP_BUTTON_CANCEL_TEXT='Back' + if G_WHIP_MENU "Please select the location where the backup will be saved, and restored from.\n\nYour current location:\n$FP_TARGET" + then local current_directory=$FP_TARGET case "$G_WHIP_RETURNED_VALUE" in @@ -554,8 +555,8 @@ _EOF_ mapfile -t alist < <(find / -type f -name "$FP_STATS") # Do we have any results? - if [[ ${alist[0]} ]]; then - + if [[ ${alist[0]} ]] + then # Create List for Whiptail G_WHIP_MENU_ARRAY=() for i in "${alist[@]}" @@ -567,14 +568,10 @@ _EOF_ G_WHIP_MENU 'Please select a previous backup to use:' || return 0 FP_TARGET=$G_WHIP_RETURNED_VALUE - else - G_WHIP_MSG 'No previous backups were found.' return 0 - fi - ;; 'Manual') @@ -582,7 +579,6 @@ _EOF_ G_WHIP_DEFAULT_ITEM=$FP_TARGET G_WHIP_INPUTBOX 'Please enter the absolute path to the backup directory.\nE.g.: /mnt/dietpi-backup\n - Must be a filesystem which supports symlinks and UNIX permissions, like ext4, F2FS, Btrfs, XFS, ZFS or a proper NFS mount' || return 0 FP_TARGET=$G_WHIP_RETURNED_VALUE - ;; 'List') @@ -593,7 +589,6 @@ _EOF_ [[ $FP_TARGET == '/' ]] && FP_TARGET='/mnt' FP_TARGET+='/dietpi-backup' - ;; *) :;; @@ -602,11 +597,8 @@ _EOF_ # If not supported, reset directory target to previous Check_Supported_Directory_Location || FP_TARGET=$current_directory - else - TARGETMENUID=0 # Return to main menu - fi } diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index b5ee2a8100..7f1804f5ca 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -1068,10 +1068,11 @@ Re-enabling HDMI requires a reboot. If you need emergency HDMI output, edit the G_WHIP_MENU_ARRAY+=('Update RPi4 EEPROM firmware' ': Install rpi-eeprom APT package') fi - # Orange Pi 5 (Plus): https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457 - elif [[ $G_HW_MODEL == 8[02] ]] + # ROCK 4, ROCK 5B and Orange Pi 5 (Plus): https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457 + elif [[ $G_HW_MODEL =~ ^(72|78|80|82)$ ]] then - [[ -b '/dev/mtdblock0' && -f '/usr/lib/u-boot/platform_install.sh' ]] && G_WHIP_MENU_ARRAY+=('Update SPI bootloader' ': Flash current U-Boot to /dev/mtdblock0') + # ROCK 4: Device tree overlay required + (( $G_HW_MODEL == 72 )) || [[ -b '/dev/mtdblock0' && -f '/usr/lib/u-boot/platform_install.sh' ]] && G_WHIP_MENU_ARRAY+=('Update SPI bootloader' ': Flash current U-Boot to /dev/mtdblock0') # VisionFive 2: https://doc-en.rvspace.org/VisionFive2/PDF/VisionFive2_QSG.pdf elif (( $G_HW_MODEL == 81 )) @@ -1208,11 +1209,34 @@ Further information: https://www.raspberrypi.org/documentation/hardware/raspberr elif [[ $G_WHIP_RETURNED_VALUE == 'Update SPI bootloader' ]]; then + if [[ $G_HW_MODEL == 72 && ! -b '/dev/mtdblock0' ]] + then + local overlays=() i= + read -ra overlays < <(mawk -F= '$1=="overlays"{$1="";print}' /boot/dietpiEnv.txt) + for i in "${overlays[@]}"; do [[ $i == 'spi-jedec-nor' ]] && break; done + if [[ $i == 'spi-jedec-nor' ]] + then + G_WHIP_MSG '[FAILED] No MTD device found +\nThe expected MTD device /dev/mtdblock0 was not found on your ROCK 4 system, despite the fact that the related device tree overlay has been applied already. You may either have a model which has no onboard SPI storage, or you did not reboot yet for the change to take effect. +\nIn case reboot the system before selecting this menu option again, otherwise check back whether your ROCK 4 variant is really supposed to have an SPI storge.' + return 1 + else + G_WHIP_YESNO '[ INFO ] No MTD device found +\nThe expected MTD device /dev/mtdblock0 was not found on your ROCK 4 system. You may either have a model which has no onboard SPI storage, or a device tree overlay may be required to make the MTD device available. +\nShall we add the overlay for you? A reboot will be required for the change to take effect, after which you can reselect this menu option.' || return 0 + overlays+=('spi-jedec-nor') + G_CONFIG_INJECT 'overlays=' "overlays=${overlays[*]}" /boot/dietpiEnv.txt + G_CONFIG_INJECT 'param_spinor_spi_bus=' 'param_spinor_spi_bus=1' /boot/dietpiEnv.txt + REBOOT_REQUIRED=1 + return 0 + fi + fi G_WHIP_YESNO '[ INFO ] SPI bootloader update \nThis will flash the U-Boot image of the installed linux-u-boot-* package to the SPI device /dev/mtdblock0. \nDo you want to continue?' || return 0 # shellcheck disable=SC1091 . /usr/lib/u-boot/platform_install.sh + [[ -f $DIR/rkspi_loader.img ]] || { G_WHIP_MSG "[FAILED] SPI U-Boot image missing\n\nThe expected U-Boot image at $DIR/rkspi_loader.img could not be found. Please report this to our GitHub or forum, so we can check back and in case update this dietpi-config option."; return 1; } # shellcheck disable=SC2154 G_EXEC_OUTPUT=1 G_EXEC dd if="$DIR/rkspi_loader.img" of=/dev/mtdblock0 oflag=direct conv=notrunc status=progress @@ -1222,6 +1246,17 @@ Further information: https://www.raspberrypi.org/documentation/hardware/raspberr \nThis will download and flash the latest U-Boot from StarFive to your VisionFive 2 SPI storage. Latest release notes: https://github.com/starfive-tech/VisionFive2/releases \nDo you want to continue?' || return 0 + G_AG_CHECK_INSTALL_PREREQ libubootenv-tool + if fw_printenv 2>&1 | head -1 | grep -q '^Cannot read environment, using default' + then + G_WHIP_YESNO '[ INFO ] No U-Boot environment found +\nThere is currently no dedicated U-Boot environment on your SPI flash. U-Boot hence uses the embedded default and the latest StarFive U-Boot default environment does not support the DietPi OS partitioning anymore. +\nWith our latest kernel upgrade, we shipped the tools and configs to flash a reasonable generic U-Boot environment which supports boot from all filesystems of all partitions of all boot media, including NVMe, USB, eMMC, SD cards and DHCP/TFTP. Flashing assures that our image continues to boot after updating to the latest U-Boot release from StarFive. +\nOur U-Boot environment should support the official StarFive images, including all features. If you are missing anything or face issues with them, please report back: https://github.com/MichaIng/DietPi/issues/6212 +\nYou can use the commands "fw_printenv" and "fw_setenv" to read and write to the U-Boot environment, especially set boot priorities via "boot_targets" variable. +\nDo you want to flash our new U-Boot environment to continue?' || return 0 + G_EXEC fw_setenv + fi /boot/dietpi/func/dietpi-set_hardware vf2-spi-update elif [[ $G_WHIP_RETURNED_VALUE == 'I2C state' ]]; then @@ -2735,7 +2770,7 @@ This is mainly aimed at PINE A64 which may have a hardware issue that causes uns if (( $HOTSPOT_5G )) then G_WHIP_DEFAULT_ITEM=$HOTSPOT_5G_CHANNEL - G_WHIP_MENU 'Please enter a 5 GHz WiFi channel for your hotspot. + G_WHIP_INPUTBOX 'Please enter a 5 GHz WiFi channel for your hotspot. \nA full list of supported 5 GHz WiFi channels per region can be found e.g. on Wikipedia: https://en.wikipedia.org/wiki/List_of_WLAN_channels#5_GHz_(802.11a/h/n/ac/ax)' && HOTSPOT_5G_CHANNEL=$G_WHIP_RETURNED_VALUE else local channel_mhz=2412 channel_min=1 channel_max=13 diff --git a/dietpi/dietpi-ddns b/dietpi/dietpi-ddns index b95562e584..6b9d463d31 100755 --- a/dietpi/dietpi-ddns +++ b/dietpi/dietpi-ddns @@ -40,6 +40,8 @@ Available providers: Use the "-p" option to set the account token. OVH Read more: https://docs.ovh.com/gb/en/domains/hosting_dynhost/ Use the "-d", "-u" and "-p" options to set domains, username and password. + YDNS Read More https://ydns.io + Use the "-d", "-u" and "-p" options to set the domain, username and password. ' # Load DietPi-Globals @@ -122,6 +124,14 @@ Read() [[ $USERNAME ]] || USERNAME=${command#*\'} USERNAME=${USERNAME%%:*} [[ $PASSWORD ]] || PASSWORD=${command#*:} PASSWORD=${PASSWORD%%\'*} + # YDNS + elif [[ $command == *'www.ydns.io'* ]] + then + [[ $PROVIDER ]] || PROVIDER='YDNS' + [[ $DOMAINS ]] || DOMAINS=${command#*host=} DOMAINS=${DOMAINS%\'*} + [[ $USERNAME ]] || USERNAME=${command#*\'} USERNAME=${USERNAME%%:*} + [[ $PASSWORD ]] || PASSWORD=${command#*:} PASSWORD=${PASSWORD%%\'*} + # Custom else [[ $PROVIDER ]] || PROVIDER=${command%\'*} PROVIDER=${PROVIDER##*\'} @@ -177,6 +187,11 @@ Apply() then url="https://www.ovh.com/nic/update?system=dyndns&hostname=$DOMAINS" + # - YDNS + elif [[ $PROVIDER == 'YDNS' ]] + then + url="https://ydns.io/api/v1/update/?host=$DOMAINS" + # - Custom else url=$PROVIDER @@ -208,6 +223,7 @@ Apply() # shellcheck disable=SC2086 if ! result=$(curl $ipfamily -sSfL ${http_auth:+ -u "$USERNAME:$PASSWORD"} "$url" 2>&1) || [[ $PROVIDER == 'DuckDNS' && $result == 'KO' ]] || + [[ $PROVIDER == 'YDNS' && $result != 'ok' ]] || [[ $PROVIDER == 'Dynu' && $result != 'good'* && $result != 'nochg'* ]] then G_DIETPI-NOTIFY 1 "DDNS update test failed, please check your input${result:+:\n$result}" @@ -278,7 +294,7 @@ Menu_Provider() G_WHIP_DEFAULT_ITEM=${PROVIDER:-DuckDNS} # Custom provider selected - if [[ $PROVIDER && $PROVIDER != 'DuckDNS' && $PROVIDER != 'No-IP' && $PROVIDER != 'Dynu' && $PROVIDER != 'FreeDNS' && $PROVIDER != 'OVH' ]] + if [[ $PROVIDER && $PROVIDER != 'DuckDNS' && $PROVIDER != 'No-IP' && $PROVIDER != 'Dynu' && $PROVIDER != 'FreeDNS' && $PROVIDER != 'OVH' && $PROVIDER != 'YDNS' ]] then G_WHIP_DEFAULT_ITEM='Custom' custom_text="[$PROVIDER]" @@ -289,7 +305,8 @@ Menu_Provider() 'No-IP' ': Read more: https://www.noip.com/about' 'Dynu' ': Read more: https://www.dynu.com/DynamicDNS' 'FreeDNS' ': Read more: https://freedns.afraid.org/' - 'OVH' ': Read More: https://docs.ovh.com/gb/en/domains/hosting_dynhost/' + 'OVH' ': Read more: https://docs.ovh.com/gb/en/domains/hosting_dynhost/' + 'YDNS' ': Read more: https://ydns.io' 'Custom' ": $custom_text" ) G_WHIP_MENU 'Please select your DDNS provider:' || return 1 @@ -307,17 +324,23 @@ Menu_Provider() Menu_Domains() { - # Skip with FreeDNS and custom provider - [[ $PROVIDER == 'DuckDNS' || $PROVIDER == 'No-IP' || $PROVIDER == 'Dynu' || $PROVIDER == 'OVH' ]] || return 0 + # Skip with FreeDNS/Custom providers + [[ $PROVIDER == 'DuckDNS' || $PROVIDER == 'No-IP' || $PROVIDER == 'Dynu' || $PROVIDER == 'OVH' || $PROVIDER == 'YDNS' ]] || return 0 G_WHIP_DEFAULT_ITEM=$DOMAINS - G_WHIP_INPUTBOX 'Please enter a comma-separated list of domains that shall point to this system:' || return 1 + # Hint that YDNS only allows one domain + if [[ $PROVIDER == 'YDNS' ]] + then + G_WHIP_INPUTBOX 'Please enter the domain that shall point to this system:' || return 1 + else + G_WHIP_INPUTBOX 'Please enter a comma-separated list of domains that shall point to this system:' || return 1 + fi DOMAINS=$G_WHIP_RETURNED_VALUE } Menu_Username() { - # Skip with DuckDNS, Dynu and FreeDNS + # Skip with these providers [[ $PROVIDER == 'DuckDNS' || $PROVIDER == 'Dynu' || $PROVIDER == 'FreeDNS' ]] && return 0 # Add note for custom provider @@ -336,14 +359,14 @@ Menu_Password() { # Add note for custom provider local text="Please enter the $password to update your dynamic IP against your DDNS provider.\n - The single quote character ' is currently not supported!" - [[ $PROVIDER == 'DuckDNS' || $PROVIDER == 'No-IP' || $PROVIDER == 'Dynu' || $PROVIDER == 'FreeDNS' || $PROVIDER == 'OVH' ]] || text+='\n\nThis is used for HTTP authentication. If no HTTP authentication is required, type in a \"0\" to skip the password.' + [[ $PROVIDER == 'DuckDNS' || $PROVIDER == 'No-IP' || $PROVIDER == 'Dynu' || $PROVIDER == 'FreeDNS' || $PROVIDER == 'OVH' || $PROVIDER == 'YDNS' ]] || text+='\n\nThis is used for HTTP authentication. If no HTTP authentication is required, type in a \"0\" to skip the password.' G_WHIP_PASSWORD "$text" || return 1 PASSWORD=$result unset -v result # Unset with custom provider when "0" is given - [[ $PROVIDER == 'DuckDNS' || $PROVIDER == 'No-IP' || $PROVIDER == 'Dynu' || $PROVIDER == 'FreeDNS' || $PROVIDER == 'OVH' || $PASSWORD != 0 ]] || unset -v PASSWORD + [[ $PROVIDER == 'DuckDNS' || $PROVIDER == 'No-IP' || $PROVIDER == 'Dynu' || $PROVIDER == 'FreeDNS' || $PROVIDER == 'OVH' || $PROVIDER == 'YDNS' || $PASSWORD != 0 ]] || unset -v PASSWORD } Menu_IPfamily() @@ -355,7 +378,7 @@ Menu_IPfamily() ) G_WHIP_DEFAULT_ITEM=${IPFAMILY:--4} G_WHIP_DEFAULT_ITEM=${G_WHIP_DEFAULT_ITEM/-/IPv} G_WHIP_MENU 'Please select whether you want to force an IP family to associate with your DDNS domain. -\nFor best compatibility with all clients and networks, we recomment to use IPv4. +\nFor best compatibility with all clients and networks, we recommend to use IPv4. \nIf you do not force any IP family, IPv6 is used, if enabled on this server and if the DDNS provider is reachable via IPv6, else IPv4 is used. \nIf IPv6 is used, only clients with IPv6 enabled and connected via networks which support IPv6 can reach your server.' || return 1 IPFAMILY=${G_WHIP_RETURNED_VALUE/IPv/-} @@ -378,8 +401,8 @@ Menu_Main() [[ $PROVIDER ]] || { G_WHIP_BUTTON_CANCEL_TEXT='Exit' Menu_Provider || exit 0 && Menu_Domains && Menu_Username && Menu_Password && NEXT_MENU_START='Apply'; } G_WHIP_MENU_ARRAY=('Provider' ": [$PROVIDER]") - [[ $PROVIDER == 'DuckDNS' || $PROVIDER == 'No-IP' || $PROVIDER == 'Dynu' || $PROVIDER == 'OVH' ]] && G_WHIP_MENU_ARRAY+=('Domains' ": [$DOMAINS]") - [[ $PROVIDER == 'DuckDNS' || $PROVIDER == 'Dynu' || $PROVIDER == 'FreeDNS' ]] || G_WHIP_MENU_ARRAY+=("$username" ": [$USERNAME]") + [[ $PROVIDER == 'DuckDNS' || $PROVIDER == 'No-IP' || $PROVIDER == 'Dynu' || $PROVIDER == 'OVH' || $PROVIDER == 'YDNS' ]] && G_WHIP_MENU_ARRAY+=('Domains' ": [$DOMAINS]") + [[ $PROVIDER == 'DuckDNS' || $PROVIDER == 'Dynu' || $PROVIDER == 'FreeDNS' || $PROVIDER == 'YDNS' ]] || G_WHIP_MENU_ARRAY+=("$username" ": [$USERNAME]") G_WHIP_MENU_ARRAY+=( "$password" ": [${PASSWORD//?/*}]" 'IP family' ": [${IPFAMILY:--4}]" diff --git a/dietpi/dietpi-drive_manager b/dietpi/dietpi-drive_manager index 28f33ad097..f310f5e1df 100755 --- a/dietpi/dietpi-drive_manager +++ b/dietpi/dietpi-drive_manager @@ -598,8 +598,8 @@ Do you wish to ignore this warning, and, mount the drive regardless?" || return G_DIETPI-NOTIFY 2 "Creating new $partition_table_type partition table" G_EXEC parted -s "/dev/${aDRIVE_SOURCE_DEVICE[$MENU_DRIVE_INDEX]}" mklabel "$partition_table_type" G_EXEC parted -s "/dev/${aDRIVE_SOURCE_DEVICE[$MENU_DRIVE_INDEX]}" mkpart primary 0% 100% - partprobe "/dev/${aDRIVE_SOURCE_DEVICE[$MENU_DRIVE_INDEX]}" - partx -u "/dev/${aDRIVE_SOURCE_DEVICE[$MENU_DRIVE_INDEX]}" + G_EXEC partprobe "/dev/${aDRIVE_SOURCE_DEVICE[$MENU_DRIVE_INDEX]}" + G_EXEC partx -u "/dev/${aDRIVE_SOURCE_DEVICE[$MENU_DRIVE_INDEX]}" # Generate new aDRIVE_MOUNT_SOURCE location to use # - hda1/sda1/vda1 @@ -619,7 +619,7 @@ Do you wish to ignore this warning, and, mount the drive regardless?" || return # force info_format_fs_type='ext4' G_EXEC mkfs.ext4 -F -m 0 "${aDRIVE_MOUNT_SOURCE[$MENU_DRIVE_INDEX]}" - resize2fs "${aDRIVE_MOUNT_SOURCE[$MENU_DRIVE_INDEX]}" + G_EXEC resize2fs "${aDRIVE_MOUNT_SOURCE[$MENU_DRIVE_INDEX]}" # Format NTFS elif (( $FORMAT_FILESYSTEM_TYPE == 1 )); then @@ -751,8 +751,8 @@ Do you wish to ignore this warning, and, mount the drive regardless?" || return [[ $rootfstype_current ]] && G_EXEC sed -i "s#$rootfstype_current#rootfstype=${aDRIVE_FSTYPE[$MENU_DRIVE_INDEX]}#g" /boot/boot.ini fi - systemctl daemon-reload - sync + G_EXEC systemctl daemon-reload + G_EXEC sync G_WHIP_MSG 'RootFS transfer has successfully completed.\n\nA reboot is required, please press to reboot now.' reboot diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 2a95985c0a..eb7c2097da 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -1172,8 +1172,6 @@ Available commands: aSOFTWARE_DESC[$software_id]='Official lightweight DietPi web interface (Rust)' aSOFTWARE_CATX[$software_id]=8 aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/system_stats/#dietpi-dashboard' - # - RISC-V: Missing binary, missing support by ring crate: https://github.com/ravenclaw900/DietPi-Dashboard/pull/504 - aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,11]=0 #------------------ software_id=99 aSOFTWARE_NAME[$software_id]='Prometheus Node Exporter' @@ -1873,8 +1871,6 @@ Available commands: aSOFTWARE_DEPS[$software_id]='5 6' # - ARMv6 since Bullseye: https://github.com/RPi-Distro/chromium-browser/issues/21#issuecomment-997044303 (( $G_DISTRO < 6 )) || aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0 - # - RISC-V: Missing package: https://packages.debian.org/sid/firefox-esr - aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,11]=0 #------------------ software_id=174 aSOFTWARE_NAME[$software_id]='GIMP' @@ -2936,8 +2932,8 @@ unix_socket_directories = '/run/postgresql'" > "$i/00dietpi.conf" if To_Install 190 # Beets then # Config: Preserve existing on reinstall - [[ -d '/mnt/dietpi_userdata/beets' ]] || G_EXEC mkdir /mnt/dietpi_userdata/beets - [[ -f '/mnt/dietpi_userdata/beets/config.yaml' ]] || echo -e 'directory: /mnt/dietpi_userdata/Music\nlibrary: /mnt/dietpi_userdata/beets/library.db' > /mnt/dietpi_userdata/beets/config.yaml + G_EXEC mkdir -p /mnt/dietpi_userdata/beets + [[ -f '/mnt/dietpi_userdata/beets/config.yaml' ]] || G_EXEC eval 'echo -e '\''directory: /mnt/dietpi_userdata/Music\nlibrary: /mnt/dietpi_userdata/beets/library.db'\'' > /mnt/dietpi_userdata/beets/config.yaml' # Allow dietpi user and audio group members to manage library [[ -f '/mnt/dietpi_userdata/beets/library.db' ]] || > /mnt/dietpi_userdata/beets/library.db @@ -3290,7 +3286,7 @@ _EOF_ ) G_WHIP_DEFAULT_ITEM=$version G_WHIP_BUTTON_CANCEL_TEXT=$version - G_WHIP_MENU 'Please choose which version of DietPi-Dashboard should be installed.' && version=$G_WHIP_RETURNED_VALUE + (( $G_HW_ARCH == 11 )) || { G_WHIP_MENU 'Please choose which version of DietPi-Dashboard should be installed.' && version=$G_WHIP_RETURNED_VALUE; } # Backend only? local backend=$(sed -n '/^[[:blank:]]*SOFTWARE_DIETPI_DASHBOARD_BACKEND=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) @@ -3302,9 +3298,13 @@ _EOF_ # Download binary and set config URL local url - if [[ $version == 'Stable' ]] + 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 + 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' ]] @@ -3446,7 +3446,7 @@ _EOF_ # - Remove previous disk cache dir or symlink G_EXEC rm -Rf /var/cache/samba # - Pre-create RAM cache dir - [[ -d '/run/samba-cache' ]] || G_EXEC mkdir /run/samba-cache + G_EXEC mkdir -p /run/samba-cache # - Link disk cache to RAM G_EXEC ln -s /run/samba-cache /var/cache/samba # - Create RAM cache dir automatically on boot @@ -3482,8 +3482,8 @@ _EOF_ G_AGI nfs-kernel-server G_EXEC systemctl stop nfs-kernel-server - [[ -d '/etc/exports.d' ]] || G_EXEC mkdir /etc/exports.d - [[ -f '/etc/exports.d/dietpi.exports' ]] || echo '/mnt/dietpi_userdata *(rw,async,no_root_squash,fsid=0,crossmnt,no_subtree_check)' > /etc/exports.d/dietpi.exports + G_EXEC mkdir -p /etc/exports.d + [[ -f '/etc/exports.d/dietpi.exports' ]] || G_EXEC 'echo '\''/mnt/dietpi_userdata *(rw,async,no_root_squash,fsid=0,crossmnt,no_subtree_check)'\'' > /etc/exports.d/dietpi.exports' fi if To_Install 83 apache2 # Apache @@ -3491,7 +3491,7 @@ _EOF_ # Pre-create a dummy port 80 vhost if it does not exist yet, so we can avoid overwriting it on reinstalls. if [[ ! -f '/etc/apache2/sites-available/000-default.conf' ]] then - [[ -d '/etc/apache2/sites-available' ]] || G_EXEC mkdir -p /etc/apache2/sites-available + G_EXEC mkdir -p /etc/apache2/sites-available cat << _EOF_ > /etc/apache2/sites-available/000-default.conf # /etc/apache2/sites-available/000-default.conf @@ -3580,7 +3580,7 @@ _EOF_ G_EXEC systemctl stop nginx # Custom configs, included by sites-enabled/default within server directive, while nginx/(conf.d|sites-enabled) is included by nginx.conf outside server directive - [[ -d '/etc/nginx/sites-dietpi' ]] || G_EXEC mkdir /etc/nginx/sites-dietpi + G_EXEC mkdir -p /etc/nginx/sites-dietpi G_BACKUP_FP /etc/nginx/nginx.conf dps_index=$software_id Download_Install 'nginx.conf' /etc/nginx/nginx.conf @@ -3918,7 +3918,7 @@ _EOF_ fi # Pre-create TempDir: https://docs.phpmyadmin.net/en/latest/config.html#cfg_TempDir - [[ -d '/var/www/phpmyadmin/tmp' ]] || G_EXEC mkdir /var/www/phpmyadmin/tmp + G_EXEC mkdir -p /var/www/phpmyadmin/tmp G_EXEC chown www-data:root /var/www/phpmyadmin/tmp G_EXEC chmod 700 /var/www/phpmyadmin/tmp fi @@ -4194,7 +4194,7 @@ _EOF_ G_EXEC_OUTPUT=1 G_EXEC go-ipfs/install.sh # Data and config directory - [[ -d '/mnt/dietpi_userdata/ipfs' ]] || G_EXEC mkdir /mnt/dietpi_userdata/ipfs + G_EXEC mkdir -p /mnt/dietpi_userdata/ipfs # User Create_User -d /mnt/dietpi_userdata/ipfs ipfs @@ -4383,7 +4383,7 @@ _EOF_ # Prepare our new config + data directory if not yet present if [[ ! -f '/mnt/dietpi_userdata/fahclient/config.xml' ]] then - [[ -d '/mnt/dietpi_userdata/fahclient' ]] || G_EXEC mkdir /mnt/dietpi_userdata/fahclient + G_EXEC mkdir -p /mnt/dietpi_userdata/fahclient dps_index=$software_id Download_Install 'config.xml' /mnt/dietpi_userdata/fahclient/config.xml fi @@ -5199,12 +5199,12 @@ _EOF_ then G_EXEC mv /var/lib/mopidy /mnt/dietpi_userdata/mopidy # Workaround error about moving data dir into itself - [[ -d '/mnt/dietpi_userdata/mopidy/.hidden_data' ]] || G_EXEC mkdir /mnt/dietpi_userdata/mopidy/.hidden_data + G_EXEC mkdir -p /mnt/dietpi_userdata/mopidy/.hidden_data # Non-hidden files/folders are data G_EXEC mv /mnt/dietpi_userdata/mopidy/* /mnt/dietpi_userdata/mopidy/.hidden_data G_EXEC mv /mnt/dietpi_userdata/mopidy/.hidden_data /mnt/dietpi_userdata/mopidy/data else - [[ -d '/mnt/dietpi_userdata/mopidy/data' ]] || G_EXEC mkdir -p /mnt/dietpi_userdata/mopidy/data + G_EXEC mkdir -p /mnt/dietpi_userdata/mopidy/data [[ -d '/var/lib/mopidy' ]] && G_EXEC rm -R /var/lib/mopidy fi @@ -5213,7 +5213,7 @@ _EOF_ then G_EXEC mv /var/cache/mopidy /mnt/dietpi_userdata/mopidy/cache else - [[ -d '/mnt/dietpi_userdata/mopidy/cache' ]] || G_EXEC mkdir /mnt/dietpi_userdata/mopidy/cache + G_EXEC mkdir -p /mnt/dietpi_userdata/mopidy/cache [[ -d '/var/cache/mopidy' ]] && G_EXEC rm -R /var/cache/mopidy fi @@ -5483,7 +5483,7 @@ _EOF_ [[ -f 'www/status_mjpeg.txt' ]] && G_EXEC rm www/status_mjpeg.txt # Web base dir - [[ -d '/var/www/rpicam' ]] || G_EXEC mkdir /var/www/rpicam + G_EXEC mkdir -p /var/www/rpicam G_EXEC cp -dR www/. /var/www/rpicam/ [[ -e '/var/www/rpicam/FIFO' ]] || G_EXEC mknod /var/www/rpicam/FIFO p [[ -e '/var/www/rpicam/FIFO1' ]] || G_EXEC mknod /var/www/rpicam/FIFO1 p @@ -5524,7 +5524,7 @@ _EOF_ G_EXEC rm -R RPi_Cam_Web_Interface-master # Data directory - [[ -d '/mnt/dietpi_userdata/rpicam' ]] || G_EXEC mkdir /mnt/dietpi_userdata/rpicam + G_EXEC mkdir -p /mnt/dietpi_userdata/rpicam G_EXEC rm -Rf /var/www/rpicam/media G_EXEC ln -s /mnt/dietpi_userdata/rpicam /var/www/rpicam/media @@ -6075,7 +6075,7 @@ _EOF_ fi # Install - G_EXEC curl -sSfL "$url" -o install.sh + G_EXEC curl -sSfLo install.sh "$url" G_EXEC chmod +x install.sh # - Skip web interface dialogue (which defaults to "true"), since we install a web server and PHP anyway # - Skip query logging dialogue (which affects file logging only, not database>web UI) and set to "false" @@ -6129,7 +6129,8 @@ _EOF_ then G_CONFIG_INJECT '"mod_setenv"' ' "mod_setenv",' /etc/lighttpd/lighttpd.conf '"mod_.+",' else - [[ -f '/etc/lighttpd/conf-enabled/05-setenv.conf' ]] || G_EXEC lighty-enable-mod setenv + G_EXEC_POST_FUNC(){ [[ $exit_code == 2 ]] && exit_code=0; } # Do not fail if modules are enabled already + G_EXEC lighty-enable-mod setenv fi # Add and enable Pi-hole config @@ -6179,8 +6180,9 @@ _EOF_ - 10.* - 172.16.* - 172.31.* - ::1 - - fe80:* - febf:* - - fc00:* - fdff:* + - fe80:* - febf:* (LLAs) + - fc00:* - fdff:* (ULAs) +\nNote that if you use IPv6 and hostnames within your LAN, but no ULAs (Unique Local Addresses), this might also block accesses from within your LAN, as then GUAs (Global Unicast Addresses) are used, which cannot be distinguished from public accesses. \nYou can always enable/disable this later using the commands: - $enable_cmd - $disable_cmd @@ -6188,11 +6190,11 @@ _EOF_ # Create symlinks to align Pi-hole admin and 404 page relative to webroot [[ -e '/var/www/admin' && ! -L '/var/www/admin' ]] && G_EXEC mv /var/www/admin{,.bak} - G_EXEC ln -sf /var/www/{html/admin,admin} + G_EXEC ln -sf /var/www/{html/,}admin [[ -e '/var/www/pihole' && ! -L '/var/www/pihole' ]] && G_EXEC mv /var/www/pihole{,.bak} - G_EXEC ln -sf /var/www/{html/pihole,pihole} + G_EXEC ln -sf /var/www/{html/,}pihole - # Pi-hole v5: Add webserver user to pihole group to allow gravity.db access from web UI: https://github.com/MichaIng/DietPi/issues/3391 + # Add webserver user to pihole group to allow gravity.db access from web UI: https://github.com/MichaIng/DietPi/issues/3391 G_EXEC usermod -aG pihole www-data # Set web interface PW: https://github.com/MichaIng/DietPi/issues/662 @@ -6331,7 +6333,7 @@ ExecStart=/usr/bin/java -Xmx${memory_limit}m -Dairsonic.home=/mnt/dietpi_userdat WantedBy=multi-user.target _EOF_ # Enable FFmpeg transcode - [[ -d '/mnt/dietpi_userdata/airsonic/transcode' ]] || G_EXEC mkdir /mnt/dietpi_userdata/airsonic/transcode + G_EXEC mkdir -p /mnt/dietpi_userdata/airsonic/transcode [[ -f '/mnt/dietpi_userdata/airsonic/transcode/ffmpeg' ]] || G_EXEC ln -sf "$(command -v ffmpeg)" /mnt/dietpi_userdata/airsonic/transcode # Permissions @@ -6354,7 +6356,7 @@ _EOF_ 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 - [[ -d '/mnt/dietpi_userdata/navidrome' ]] || G_EXEC mkdir /mnt/dietpi_userdata/navidrome + G_EXEC mkdir -p /mnt/dietpi_userdata/navidrome # User Create_User -g dietpi -d /mnt/dietpi_userdata/navidrome navidrome @@ -6446,7 +6448,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Kareadita/Kavita/releases/download/v0.7.8/kavita-linux-$arch.tar.gz" + local fallback_url="https://github.com/Kareadita/Kavita/releases/download/v0.7.9/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 @@ -6540,7 +6542,7 @@ See the manual below for instructions on how to do this. then Download_Install 'https://github.com/WiringPi/WiringPi/archive/master.tar.gz' G_EXEC cd WiringPi-master - [[ -d '/usr/local/include' ]] || G_EXEC mkdir /usr/local/include + G_EXEC mkdir -p /usr/local/include G_EXEC_OUTPUT=1 G_EXEC ./build # Odroids @@ -6654,7 +6656,7 @@ _EOF_ esac # Download - local fallback_url="https://github.com/fatedier/frp/releases/download/v0.51.3/frp_0.51.3_linux_$arch.tar.gz" + local fallback_url="https://github.com/fatedier/frp/releases/download/v0.52.1/frp_0.52.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_* @@ -6673,7 +6675,7 @@ _EOF_ done local mode=$G_WHIP_RETURNED_VALUE - [[ -d '/etc/frp' ]] || G_EXEC mkdir /etc/frp + G_EXEC mkdir -p /etc/frp Create_User frp -d /etc/frp local token= @@ -6777,7 +6779,7 @@ admin_port = 7400 admin_user = admin admin_pwd = $GLOBAL_PW -token=$token +token = $token _EOF_ G_EXEC chmod 0660 /etc/frp/frpc.ini G_EXEC chown root:frp /etc/frp/frpc.ini @@ -7375,7 +7377,7 @@ _EOF_ # TigerVNC: Set control + read-only passwords if [[ ${aSOFTWARE_INSTALL_STATE[28]} == 1 && ! -f '/root/.vnc/passwd' ]] then - [[ -d '/root/.vnc' ]] || G_EXEC mkdir /root/.vnc + G_EXEC mkdir -p /root/.vnc tigervncpasswd -f <<< "$GLOBAL_PW $GLOBAL_PW" > /root/.vnc/passwd G_EXEC chmod 600 /root/.vnc/passwd @@ -7395,7 +7397,7 @@ $GLOBAL_PW" if To_Install 73 fail2ban # Fail2Ban then # Create jail.conf (backend = systemd) first, to prevent APT failure due to missing /var/log/auth.log: https://github.com/MichaIng/DietPi/issues/475#issuecomment-310873879 - [[ -d '/etc/fail2ban/fail2ban.d' ]] || G_EXEC mkdir -p /etc/fail2ban/fail2ban.d + G_EXEC mkdir -p /etc/fail2ban/fail2ban.d [[ -f '/etc/fail2ban/jail.conf' ]] || cat << '_EOF_' > /etc/fail2ban/jail.conf [DEFAULT] enabled = true @@ -7526,7 +7528,7 @@ _EOF_ G_EXEC curl -sSfL 'https://vaemendis.net/ubooquity/service/download.php' -o Ubooquity.zip G_EXEC unzip -o Ubooquity.zip G_EXEC rm Ubooquity.zip - [[ -d '/mnt/dietpi_userdata/ubooquity' ]] || G_EXEC mkdir /mnt/dietpi_userdata/ubooquity + G_EXEC mkdir -p /mnt/dietpi_userdata/ubooquity G_EXEC mv {,/mnt/dietpi_userdata/ubooquity/}Ubooquity.jar # User @@ -7574,7 +7576,7 @@ _EOF_ then Download_Install 'https://github.com/gotson/komga/releases/download/v0.165.0/komga-0.165.0.jar' /mnt/dietpi_userdata/komga/komga.jar else - local fallback_url='https://github.com/gotson/komga/releases/download/v1.4.0/komga-1.4.0.jar' + local fallback_url='https://github.com/gotson/komga/releases/download/v1.6.2/komga-1.6.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 @@ -7625,7 +7627,7 @@ _EOF_ G_EXEC chmod +x /mnt/dietpi_userdata/komga/komga.jar G_EXEC chown -R komga /mnt/dietpi_userdata/komga G_EXEC chown komga:dietpi /mnt/dietpi_userdata/{ebooks,comics} - G_EXEC chmod 775 /mnt/dietpi_userdata/{ebooks,comics} + G_EXEC chmod 0775 /mnt/dietpi_userdata/{ebooks,comics} fi if To_Install 56 # Single File PHP Gallery @@ -7652,9 +7654,9 @@ _EOF_ unset -v phrase # Create test galleries - [[ -d '/var/www/gallery/DietPi' ]] || G_EXEC mkdir /var/www/gallery/DietPi + G_EXEC mkdir -p /var/www/gallery/DietPi [[ -f '/var/www/gallery/DietPi/logo_256.png' ]] || G_THREAD_START curl -sSf 'https://dietpi.com/images/dietpi-logo_256x256.png' -o /var/www/gallery/DietPi/logo_256.png - [[ -d '/var/www/gallery/Tr-Zero' ]] || G_EXEC mkdir /var/www/gallery/Tr-Zero + G_EXEC mkdir -p /var/www/gallery/Tr-Zero [[ -f '/var/www/gallery/Tr-Zero/SS_0.jpg' ]] || G_THREAD_START curl -sSfL 'https://media.indiedb.com/images/games/1/25/24673/SS_0.jpg' -o /var/www/gallery/Tr-Zero/SS_0.jpg [[ -f '/var/www/gallery/Tr-Zero/SS_1.jpg' ]] || G_THREAD_START curl -sSfL 'https://media.indiedb.com/images/games/1/25/24673/SS_44.jpg' -o /var/www/gallery/Tr-Zero/SS_1.jpg [[ -f '/var/www/gallery/Tr-Zero/SS_2.jpg' ]] || G_THREAD_START curl -sSfL 'https://media.indiedb.com/images/games/1/25/24673/3.png' -o /var/www/gallery/Tr-Zero/SS_2.jpg @@ -7672,7 +7674,7 @@ _EOF_ # Bullseye+ if (( $G_DISTRO > 5 )) then - local fallback_url="https://github.com/ampache/ampache/releases/download/6.0.2/ampache-6.0.2_all_php$PHP_VERSION.zip" + local fallback_url="https://github.com/ampache/ampache/releases/download/6.0.3/ampache-6.0.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 # Ampache is installed to /mnt/dietpi_userdata/ampache and the "public" directory linked to /var/www/ampache: https://github.com/MichaIng/DietPi/pull/5205 local fp_install='/mnt/dietpi_userdata' fp_public='ampache/public' @@ -8435,7 +8437,7 @@ location = /.well-known/caldav { return 301 /baikal/html/dav.php; }' > /etc/ngi # User: Run service as "dietpi" group: https://github.com/MichaIng/DietPi/issues/350#issuecomment-423763518 Create_User -g dietpi -G plex,video,render -d /var/lib/plexmediaserver plex # - Unset explicit group in service file (applied by DEB package) as this may override supplementary group permissions - [[ -d '/etc/systemd/system/plexmediaserver.service.d' ]] || G_EXEC mkdir /etc/systemd/system/plexmediaserver.service.d + G_EXEC mkdir -p /etc/systemd/system/plexmediaserver.service.d G_EXEC eval 'echo -e '\''[Service]\nGroup='\'' > /etc/systemd/system/plexmediaserver.service.d/dietpi-group.conf' # Unbound: Fix secure remote access: https://dietpi.com/forum/t/cant-connect-to-plex-directly-due-to-unbound/5199 @@ -8503,7 +8505,7 @@ _EOF_ G_AGI rdiff-backup rsync screen make g++ "${python[@]}" # Download/Update MineOS - [[ -d '/mnt/dietpi_userdata/mineos' ]] || G_EXEC mkdir /mnt/dietpi_userdata/mineos + G_EXEC mkdir -p /mnt/dietpi_userdata/mineos G_EXEC cd /mnt/dietpi_userdata/mineos if [[ -d 'minecraft' ]] then @@ -8882,7 +8884,7 @@ _EOF_ G_CONFIG_INJECT '"curl"[[:blank:]]' ' "curl" => "/usr/bin/curl",' /var/www/rutorrent/conf/config.php # Session dir - [[ -d '/mnt/dietpi_userdata/downloads/.session' ]] || G_EXEC mkdir /mnt/dietpi_userdata/downloads/.session + G_EXEC mkdir -p /mnt/dietpi_userdata/downloads/.session # User Create_User -g dietpi -d /mnt/dietpi_userdata/rtorrent rtorrent @@ -8906,7 +8908,7 @@ _EOF_ # - Deprecated commands: # https://github.com/rakshasa/rtorrent/wiki/rTorrent-0.9-Comprehensive-Command-list-(WIP) # https://github.com/rakshasa/rtorrent/blob/master/doc/scripts/update_commands_0.9.sed - [[ -d '/mnt/dietpi_userdata/rtorrent' ]] || G_EXEC mkdir /mnt/dietpi_userdata/rtorrent + G_EXEC mkdir -p /mnt/dietpi_userdata/rtorrent if [[ -f '/mnt/dietpi_userdata/rtorrent/.rtorrent.rc' ]] then # In case dist-upgraded systems, assure that daemon mode is enabled @@ -8991,7 +8993,7 @@ _EOF_ Create_User -g dietpi -d /mnt/dietpi_userdata/aria2 aria2 # Config - [[ -d '/mnt/dietpi_userdata/aria2' ]] || G_EXEC mkdir /mnt/dietpi_userdata/aria2 + G_EXEC mkdir -p /mnt/dietpi_userdata/aria2 [[ -f '/mnt/dietpi_userdata/aria2/aria2.conf' ]] || cat << _EOF_ > /mnt/dietpi_userdata/aria2/aria2.conf # DietPi default aria2c options served as aria2.conf file via --conf-path # https://aria2.github.io/manual/en/html/aria2c.html#options @@ -9129,7 +9131,7 @@ _EOF_ *) local arch='arm';; esac - local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.24.0/syncthing-linux-$arch-v1.24.0.tar.gz" + local fallback_url="https://github.com/syncthing/syncthing/releases/download/v1.25.0/syncthing-linux-$arch-v1.25.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 @@ -9253,12 +9255,12 @@ _EOF_ if To_Install 136 motioneye # motionEye then # APT deps - # - ARMv6/7 Bookworm + RISC-V: libcurl4-openssl-dev gcc libssl-dev for pycurl, libjpeg-dev for Pillow - if (( ( $G_HW_ARCH < 3 && $G_DISTRO > 6 ) || $G_HW_ARCH == 11 )) + # - ARMv6/7 Bullseye/Bookworm + RISC-V: libjpeg62-turbo-dev and gcc for Pillow + if (( ( $G_HW_ARCH < 3 && $G_DISTRO > 5 ) || $G_HW_ARCH == 11 )) then - G_AGI libcurl4-openssl-dev gcc libssl-dev libjpeg-dev + G_AGI libjpeg62-turbo-dev gcc - # - ARMv8/x86_64 + # - ARMv8/x86_64: libcurl4-openssl-dev, gcc and libssl-dev for pycurl elif (( $G_HW_ARCH > 2 )) then G_AGI libcurl4-openssl-dev gcc libssl-dev @@ -9641,12 +9643,13 @@ _EOF_ if To_Install 144 sonarr # Sonarr then # https://sonarr.tv/#downloads-v3-linux-debian - # APT repo key - G_EXEC apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-keys '2009837CBFFD68F45BC180471F4F90DE2A9B4BF8' + # APT key + local url='https://keyserver.ubuntu.com/pks/lookup?search=0x2009837CBFFD68F45BC180471F4F90DE2A9B4BF8&op=get' + G_CHECK_URL "$url" + G_EXEC eval "curl -sSf '$url' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-sonarr.gpg --yes" - # APT repo list - local distro=${G_DISTRO_NAME/bookworm/bullseye} - G_EXEC eval "echo 'deb https://apt.sonarr.tv/debian/ ${distro/bullseye/buster} main' > /etc/apt/sources.list.d/sonarr.list" + # APT list: Buster is the latest available suite: https://apt.sonarr.tv/debian/dists/ + G_EXEC eval 'echo '\''deb https://apt.sonarr.tv/debian/ buster main'\'' > /etc/apt/sources.list.d/sonarr.list' # Update package lists G_AGUP @@ -9660,12 +9663,16 @@ _EOF_ G_EXEC systemctl stop sonarr # Pre-v7.1: Remove Sonarr v2 key, PID file and database backups from DietPi-Arr_to_RAM - [[ $(apt-key list 'A236C58F409091A18ACA53CBEBFF6B99D9B78493' 2> /dev/null) ]] && G_EXEC apt-key del 'A236C58F409091A18ACA53CBEBFF6B99D9B78493' + if [[ -f '/etc/apt/trusted.gpg' && $(apt-key --keyring /etc/apt/trusted.gpg list 'A236C58F409091A18ACA53CBEBFF6B99D9B78493' 2> /dev/null) ]] + then + G_EXEC apt-key --keyring /etc/apt/trusted.gpg del 'A236C58F409091A18ACA53CBEBFF6B99D9B78493' + [[ $(apt-key --keyring /etc/apt/trusted.gpg list 2> /dev/null) ]] || G_EXEC rm /etc/apt/trusted.gpg + fi [[ -f '/mnt/dietpi_userdata/sonarr/nzbdrone.pid' ]] && G_EXEC rm /mnt/dietpi_userdata/sonarr/nzbdrone.pid [[ -f '/mnt/dietpi_userdata/sonarr/nzbdrone.db.bak' ]] && G_EXEC rm /mnt/dietpi_userdata/sonarr/nzbdrone.db.bak # Data dir - [[ -d '/mnt/dietpi_userdata/sonarr' ]] || G_EXEC mkdir /mnt/dietpi_userdata/sonarr + G_EXEC mkdir -p /mnt/dietpi_userdata/sonarr # User Create_User -g dietpi -d /mnt/dietpi_userdata/sonarr sonarr @@ -9740,8 +9747,8 @@ _EOF_ # ARMv7 else - local url=$(curl -sSfL 'https://api.github.com/repos/Radarr/Radarr/releases/latest' | mawk -F\" '/"browser_download_url": .*linux-core-arm\.tar\.gz"/{print $4}') - local fallback_url='https://github.com/Radarr/Radarr/releases/download/v4.7.5.7809/Radarr.master.4.7.5.7809.linux-core-arm.tar.gz' + local url=$(curl -sSfL 'https://api.github.com/repos/Radarr/Radarr/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*linux-core-arm\.tar\.gz"$/{print $4}') + local fallback_url='https://github.com/Radarr/Radarr/releases/download/v5.0.3.8127/Radarr.master.5.0.3.8127.linux-core-arm.tar.gz' fi # ARMv8 @@ -9766,7 +9773,7 @@ _EOF_ [[ -f '/mnt/dietpi_userdata/radarr/nzbdrone.db.bak' ]] && G_EXEC rm /mnt/dietpi_userdata/radarr/nzbdrone.db.bak # Data dir - [[ -d '/mnt/dietpi_userdata/radarr' ]] || G_EXEC mkdir /mnt/dietpi_userdata/radarr + G_EXEC mkdir -p /mnt/dietpi_userdata/radarr # User Create_User -g dietpi -d /mnt/dietpi_userdata/radarr radarr @@ -9847,8 +9854,8 @@ _EOF_ # ARMv7 else - local url=$(curl -sSfL 'https://api.github.com/repos/Lidarr/Lidarr/releases/latest' | mawk -F\" '/"browser_download_url": .*linux-core-arm\.tar\.gz"/{print $4}') - local fallback_url='https://github.com/Lidarr/Lidarr/releases/download/v1.3.5.3530/Lidarr.master.1.3.5.3530.linux-core-arm.tar.gz' + local url=$(curl -sSfL 'https://api.github.com/repos/Lidarr/Lidarr/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*linux-core-arm\.tar\.gz"$/{print $4}') + local fallback_url='https://github.com/Lidarr/Lidarr/releases/download/v1.4.5.3639/Lidarr.master.1.4.5.3639.linux-core-arm.tar.gz' fi # ARMv8 @@ -9869,7 +9876,7 @@ _EOF_ fi # Data dir - [[ -d '/mnt/dietpi_userdata/lidarr' ]] || G_EXEC mkdir /mnt/dietpi_userdata/lidarr + G_EXEC mkdir -p /mnt/dietpi_userdata/lidarr # User Create_User -g dietpi -d /mnt/dietpi_userdata/lidarr lidarr @@ -10026,7 +10033,7 @@ _EOF_ Create_User -d /mnt/dietpi_userdata/tautulli tautulli # Directory - [[ -d '/mnt/dietpi_userdata/tautulli' ]] || G_EXEC mkdir /mnt/dietpi_userdata/tautulli + G_EXEC mkdir -p /mnt/dietpi_userdata/tautulli # Service: https://github.com/Tautulli/Tautulli/blob/master/init-scripts/init.systemd cat << '_EOF_' > /etc/systemd/system/tautulli.service @@ -10068,7 +10075,7 @@ _EOF_ esac local fallback_url="https://github.com/Jackett/Jackett/releases/download/v0.20.2444/Jackett.Binaries.$arch.tar.gz" - Download_Install "$(curl -sSfL 'https://api.github.com/repos/Jackett/Jackett/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/Jackett\.Binaries\.$arch\.tar\.gz\"/{print \$4}")" + Download_Install "$(curl -sSfL 'https://api.github.com/repos/Jackett/Jackett/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/Jackett\.Binaries\.$arch\.tar\.gz\"$/{print \$4}")" # Move existing configs to unpacked install dir [[ -d '/opt/jackett/Jackett' ]] && G_EXEC mv /opt/jackett/Jackett Jackett/ @@ -10203,13 +10210,13 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.8.6.3946/Prowlarr.master.1.8.6.3946.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}")" + local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.9.4.4039/Prowlarr.master.1.9.4.4039.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 # Data dir - [[ -d '/mnt/dietpi_userdata/prowlarr' ]] || G_EXEC mkdir /mnt/dietpi_userdata/prowlarr + G_EXEC mkdir -p /mnt/dietpi_userdata/prowlarr # User Create_User -g dietpi -d /mnt/dietpi_userdata/prowlarr prowlarr @@ -10278,13 +10285,13 @@ _EOF_ *) local arch='x64';; esac - 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)" + local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.8.2267/Readarr.develop.0.3.8.2267.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 # Data dir - [[ -d '/mnt/dietpi_userdata/readarr' ]] || G_EXEC mkdir /mnt/dietpi_userdata/readarr + G_EXEC mkdir -p /mnt/dietpi_userdata/readarr # User Create_User -g dietpi -d /mnt/dietpi_userdata/readarr readarr @@ -10407,7 +10414,7 @@ _EOF_ # 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 - [[ -d '/mnt/dietpi_userdata/octoprint' ]] || G_EXEC mkdir /mnt/dietpi_userdata/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 @@ -10635,7 +10642,7 @@ _EOF_ G_EXEC systemctl start docker.socket # Change Docker service type to "simple": https://github.com/MichaIng/DietPi/issues/2238#issuecomment-439474766 - [[ -d '/lib/systemd/system/docker.service.d' ]] || G_EXEC mkdir /lib/systemd/system/docker.service.d + G_EXEC mkdir -p /lib/systemd/system/docker.service.d G_EXEC eval "echo -e '[Service]\nType=simple' > /lib/systemd/system/docker.service.d/dietpi-simple.conf" # Config: https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file @@ -10650,7 +10657,7 @@ _EOF_ GCI_PRESERVE=1 G_CONFIG_INJECT '"log-level":' ' "log-level": "warn",' /etc/docker/daemon.json '^\{([[:space:]]|$)' GCI_PRESERVE=1 G_CONFIG_INJECT '"debug":' ' "debug": false,' /etc/docker/daemon.json '^\{([[:space:]]|$)' else - [[ -d '/etc/docker' ]] || G_EXEC mkdir /etc/docker + G_EXEC mkdir -p /etc/docker echo '{ "data-root": "/mnt/dietpi_userdata/docker-data", "log-driver": "journald", @@ -10778,7 +10785,7 @@ _EOF_ *) local arch='arm-6';; esac - local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.20.4/gitea-1.20.4-linux-$arch.xz" + local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.20.5/gitea-1.20.5-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 @@ -11073,7 +11080,7 @@ _EOF_ if To_Install 86 roon-extension-manager # Roon Extension Manager then # Data dir - [[ -d '/mnt/dietpi_userdata/roon-extension-manager' ]] || G_EXEC mkdir /mnt/dietpi_userdata/roon-extension-manager + G_EXEC mkdir -p /mnt/dietpi_userdata/roon-extension-manager # Pre-v8.2 migration if [[ -f '/etc/systemd/system/roon-extension-manager.service' ]] @@ -11137,7 +11144,7 @@ _EOF_ [[ -d '/var/lib/jellyfin' ]] && G_EXEC mv /var/lib/jellyfin /mnt/dietpi_userdata/jellyfin || G_EXEC mkdir /mnt/dietpi_userdata/jellyfin G_CONFIG_INJECT 'JELLYFIN_DATA_DIR=' 'JELLYFIN_DATA_DIR=/mnt/dietpi_userdata/jellyfin' /etc/default/jellyfin # Change default WorkingDirectory - [[ -d '/etc/systemd/system/jellyfin.service.d' ]] || G_EXEC mkdir /etc/systemd/system/jellyfin.service.d + G_EXEC mkdir -p /etc/systemd/system/jellyfin.service.d G_EXEC eval 'echo -e '\''[Service]\nWorkingDirectory=/mnt/dietpi_userdata/jellyfin'\'' > /etc/systemd/system/jellyfin.service.d/dietpi.conf' # Cache dir # shellcheck disable=SC2015 @@ -11414,7 +11421,7 @@ _EOF_ local ha_user='homeassistant' local ha_home="/home/$ha_user" local ha_pyenv_activation=". $ha_home/pyenv-activate.sh" - local ha_python_version='3.11.5' # https://github.com/pyenv/pyenv/tree/master/plugins/python-build/share/python-build + local ha_python_version='3.11.6' # https://github.com/pyenv/pyenv/tree/master/plugins/python-build/share/python-build G_DIETPI-NOTIFY 2 "Home Assistant user: $ha_user" G_DIETPI-NOTIFY 2 "Home Assistant home: $ha_home" @@ -11438,9 +11445,9 @@ _EOF_ G_EXEC chown "$ha_user:$ha_user" "$ha_home" if [[ $G_HW_ARCH =~ ^(1|2|11)$ ]] then - # libjpeg62-turbo-dev for Pillow, libopenblas-dev and pkg-config for numpy, pkg-config for cryptography, g++ for numpy < PyTurboJPEG and greenlet < SQLAlchemy, libavdevice-dev for ha-av - aDEPS+=('libjpeg62-turbo-dev' 'libopenblas-dev' 'pkg-config' 'g++' 'libavdevice-dev') - # Rust for cryptography + # libjpeg62-turbo-dev for Pillow, libopenblas-dev and pkg-config for numpy, pkg-config for cryptography, g++ for PyTurboJPEG, SQLAlchemy and ninja > PyTurboJPEG, libavdevice-dev for ha-av, cmake for ninja > PyTurboJPEG, automake for patchelf > PyTurboJPEG + aDEPS+=('libjpeg62-turbo-dev' 'libopenblas-dev' 'pkg-config' 'g++' 'libavdevice-dev' 'cmake' 'automake') + # Rust for cryptography and bcrypt G_EXEC curl -sSf 'https://sh.rustup.rs/' -o rustup-init.sh G_EXEC chmod +x rustup-init.sh # RPi with 64-bit kernel on 32-bit image: Enforce 32-bit toolchain: https://github.com/MichaIng/DietPi/issues/6306 @@ -11529,7 +11536,7 @@ _EOF_ # Download HACS Download_Install 'https://github.com/hacs/integration/releases/latest/download/hacs.zip' hacs [[ -d '/mnt/dietpi_userdata/homeassistant/custom_components/hacs' ]] && G_EXEC rm -R /mnt/dietpi_userdata/homeassistant/custom_components/hacs - [[ -d '/mnt/dietpi_userdata/homeassistant/custom_components' ]] || G_EXEC mkdir /mnt/dietpi_userdata/homeassistant/custom_components + G_EXEC mkdir -p /mnt/dietpi_userdata/homeassistant/custom_components G_EXEC mv hacs /mnt/dietpi_userdata/homeassistant/custom_components/ G_EXEC chown -R "$ha_user:$ha_user" /mnt/dietpi_userdata/homeassistant G_DIETPI-NOTIFY 2 "Home Assistant Community Store (HACS) has been installed in addition. To activate it, follow this guide: https://hacs.xyz/docs/configuration/basic/" @@ -11547,7 +11554,7 @@ _EOF_ #local file=$(curl -sSfL "$url/versions/$version/builds/$build"); file=${file##*\"name\":\"} file=${file%%\"*} # Download and install PaperMC Download_Install "$url/versions/$version/builds/$build/downloads/paper-$version-$build.jar" /opt/papermc/paperclip.jar - [[ -d '/mnt/dietpi_userdata/papermc' ]] || G_EXEC mkdir /mnt/dietpi_userdata/papermc + G_EXEC mkdir -p /mnt/dietpi_userdata/papermc G_EXEC eval 'echo "eula=true" > /mnt/dietpi_userdata/papermc/eula.txt' # User @@ -11762,7 +11769,7 @@ _EOF_ *) local arch='amd64';; esac - local fallback_url="https://github.com/rclone/rclone/releases/download/v1.64.0/rclone-v1.64.0-linux-$arch-v6.deb" + local fallback_url="https://github.com/rclone/rclone/releases/download/v1.64.2/rclone-v1.64.2-linux-$arch.deb" Download_Install "$(curl -sSfL 'https://api.github.com/repos/rclone/rclone/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/rclone-v[^\"\/]*-linux-$arch.deb\"$/{print \$4}")" fi fi @@ -12017,11 +12024,13 @@ _EOF_ # remove the service that isn't needed for an app install on DietPi and install the rest G_EXEC cd /tmp/adsb-feeder/src/modules/adsb-feeder/filesystem/root G_EXEC rm ./usr/lib/systemd/system/adsb-bootstrap.service + G_EXEC rm ./usr/lib/systemd/system/adsb-update.service + G_EXEC rm ./usr/lib/systemd/system/adsb-update.timer G_EXEC mv ./usr/lib/systemd/system/* /etc/systemd/system/ # determine the version local ADSB_FEEDER_DATE_COMPONENT=$(git log -20 --date='format:%y%m%d' --format='%ad' | uniq -c | mawk '{print $2"."$1;exit}') - local ADSB_FEEDER_TAG_COMPONENT=$(git describe --match 'v[0-9]*' | cut -d- -f1) + local ADSB_FEEDER_TAG_COMPONENT=$(git describe --match 'v[0-9]*' --long | sed 's/-[0-9]*-g[0-9a-f]*//') local ADSB_FEEDER_VERSION="$ADSB_FEEDER_TAG_COMPONENT(dietpi)-$ADSB_FEEDER_DATE_COMPONENT" # create the target directory for the app and populated with the code from the git checkout @@ -12721,7 +12730,7 @@ If no WireGuard (auto)start is included, but you require it, please do the follo if To_Uninstall 128 # MPD then Remove_Service mpd 1 1 # group for pre-v6.29 - G_AGP mpd libmpdclient2 + G_AGP mpd [[ -d '/var/log/mpd' ]] && G_EXEC rm -R /var/log/mpd [[ -d '/mnt/dietpi_userdata/.mpd_cache' ]] && G_EXEC rm -R /mnt/dietpi_userdata/.mpd_cache [[ -f '/etc/mpd.conf' ]] && G_EXEC rm /etc/mpd.conf @@ -12816,11 +12825,10 @@ If no WireGuard (auto)start is included, but you require it, please do the follo if To_Uninstall 141 # ADS-B Feeder then G_EXEC_NOHALT=1 G_EXEC_OUTPUT=1 G_EXEC /opt/adsb/docker-compose-adsb down - Remove_Service adsb-bootstrap + Remove_Service adsb-docker Remove_Service adsb-feeder-update Remove_Service adsb-setup - Remove_Service adsb-update - command -v docker &> /dev/null && G_EXEC docker image prune -a -f + [[ -f /opt/adsb/pre-uninstall-cleanup ]] && G_EXEC /opt/adsb/pre-uninstall-cleanup G_EXEC rm -Rf /opt/adsb /mnt/dietpi_userdata/adsb-feeder /opt/adsb-feeder-update fi @@ -12941,8 +12949,13 @@ If no WireGuard (auto)start is included, but you require it, please do the follo [[ -d '/var/log/sonarr' ]] && G_EXEC rm -R /var/log/sonarr G_EXEC rm -Rf /mnt/dietpi_userdata/sonarr /opt/NzbDrone # Pre-v7.1 [[ -f '/etc/apt/sources.list.d/sonarr.list' ]] && G_EXEC rm /etc/apt/sources.list.d/sonarr.list - [[ $(apt-key list '2009837CBFFD68F45BC180471F4F90DE2A9B4BF8' 2> /dev/null) ]] && G_EXEC apt-key del '2009837CBFFD68F45BC180471F4F90DE2A9B4BF8' - [[ $(apt-key list 'A236C58F409091A18ACA53CBEBFF6B99D9B78493' 2> /dev/null) ]] && G_EXEC apt-key del 'A236C58F409091A18ACA53CBEBFF6B99D9B78493' # Pre-v7.1 + [[ -f '/etc/apt/trusted.gpg.d/dietpi-sonarr.gpg' ]] && G_EXEC rm /etc/apt/trusted.gpg.d/dietpi-sonarr.gpg + # Pre-v7.1: Remove Sonarr v2 key + if [[ -f '/etc/apt/trusted.gpg' && $(apt-key --keyring /etc/apt/trusted.gpg list 'A236C58F409091A18ACA53CBEBFF6B99D9B78493' 2> /dev/null) ]] + then + G_EXEC apt-key --keyring /etc/apt/trusted.gpg del 'A236C58F409091A18ACA53CBEBFF6B99D9B78493' + [[ $(apt-key --keyring /etc/apt/trusted.gpg list 2> /dev/null) ]] || G_EXEC rm /etc/apt/trusted.gpg + fi fi if To_Uninstall 145 # Radarr @@ -15178,7 +15191,7 @@ _EOF_ G_WHIP_CHECKLIST_ARRAY+=("$j" "${aSOFTWARE_NAME[$j]}: ${aSOFTWARE_DESC[$j]}" "$selected") # Add previously selected items to array to be unmarked if deselected when selection is confirmed. - (( ${aSOFTWARE_INSTALL_STATE[$j]} == 1 )) && reset+=("$i") + (( ${aSOFTWARE_INSTALL_STATE[$j]} == 1 )) && reset+=("$j") done done fi @@ -15190,7 +15203,7 @@ _EOF_ - Software and usage details: https://dietpi.com/docs/software/' || return 0 # Unmark all listed pending state items, so deselected items are not installed. - for i in "${!reset[@]}" + for i in "${reset[@]}" do aSOFTWARE_INSTALL_STATE[$i]=0 done diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index f3b5d4d082..d4aa436f61 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -54,7 +54,7 @@ [[ -f '/boot/dietpi/.version' ]] && . /boot/dietpi/.version # - 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_SUB ]] || G_DIETPI_VERSION_SUB=23 [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=3 [[ $G_GITBRANCH ]] || G_GITBRANCH='master' [[ $G_GITOWNER ]] || G_GITOWNER='MichaIng' diff --git a/dietpi/func/dietpi-obtain_hw_model b/dietpi/func/dietpi-obtain_hw_model index ff48bf1fa6..9a3ba93f8b 100755 --- a/dietpi/func/dietpi-obtain_hw_model +++ b/dietpi/func/dietpi-obtain_hw_model @@ -12,6 +12,10 @@ # - Generates /boot/dietpi/.hw_model # - Called from /boot/dietpi/preboot, called by /etc/systemd/system/dietpi-preboot.service # + # G_HW_MODEL 86 ASUS Tinker Board 2 + # G_HW_MODEL 85 ROCK 5A + # G_HW_MODEL 84 Star64 + # G_HW_MODEL 83 Orange Pi Zero 3 # G_HW_MODEL 82 Orange Pi 5 Plus # G_HW_MODEL 81 StarFive VisionFive 2 # G_HW_MODEL 80 Orange Pi 5 @@ -309,7 +313,25 @@ G_HW_MODEL=$(mawk 'NR==1' "$FP_G_HW_MODEL_IDENTIFIER") - if (( $G_HW_MODEL == 82 )); then + if (( $G_HW_MODEL == 86 )); then + + G_HW_MODEL_NAME='ASUS Tinker Board 2' + G_HW_CPUID=3 + + elif (( $G_HW_MODEL == 85 )); then + + G_HW_MODEL_NAME='ROCK 5A' + G_HW_CPUID=11 + + elif (( $G_HW_MODEL == 84 )); then + + G_HW_MODEL_NAME='Star64' + + elif (( $G_HW_MODEL == 83 )); then + + G_HW_MODEL_NAME='Orange Pi Zero 3' + + elif (( $G_HW_MODEL == 82 )); then G_HW_MODEL_NAME='Orange Pi 5 Plus' G_HW_CPUID=11 diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index 2ba23d2b00..42726a1b37 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -244,7 +244,7 @@ _EOF_ G_EXEC curl -sSfLO "https://github.com/starfive-tech/VisionFive2/releases/download/$version/u-boot-spl.bin.normal.out" G_EXEC curl -sSfLO "https://github.com/starfive-tech/VisionFive2/releases/download/$version/visionfive2_fw_payload.img" G_EXEC_OUTPUT=1 G_EXEC flashcp -v u-boot-spl.bin.normal.out /dev/mtd0 - G_EXEC_OUTPUT=1 G_EXEC flashcp -v visionfive2_fw_payload.img /dev/mtd1 + G_EXEC_OUTPUT=1 G_EXEC flashcp -v visionfive2_fw_payload.img /dev/mtd2 G_EXEC rm u-boot-spl.bin.normal.out visionfive2_fw_payload.img } @@ -1508,7 +1508,7 @@ _EOF_ 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|77)$ && $INPUT_ADDITIONAL == 'ttyS2' ]] || [[ $G_HW_MODEL == 73 && $INPUT_ADDITIONAL == 'ttyS'[012] ]] || [[ $G_HW_MODEL =~ ^(76|78|79|80)$ && $INPUT_ADDITIONAL == 'ttyFIQ0' ]] + if [[ $G_HW_MODEL =~ ^(42|43|46|47|49|55|56|58|68|72|77)$ && $INPUT_ADDITIONAL == 'ttyS2' ]] || [[ $G_HW_MODEL == 73 && $INPUT_ADDITIONAL == 'ttyS'[012] ]] || [[ $G_HW_MODEL =~ ^(76|78|79|80|82|85)$ && $INPUT_ADDITIONAL == 'ttyFIQ0' ]] 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 019bbcc82f..c2c9baa77a 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -101,15 +101,13 @@ $FP_SCRIPT disable_ssh_password_logins [01]|root| Whether to disable SSH [[ $INPUT_MODE_VALUE ]] || { Unknown_Input_Mode; return 1; } - # RPi: Trixie suite does not exist yet, Bookworm suite is still empty - local rpi_distro=${G_DISTRO_NAME/trixie/bookworm} - (( $G_HW_MODEL < 10 || ( $G_HW_MODEL == 75 && ${G_RASPBIAN:-0} == 1 ) )) && G_EXEC eval "echo 'deb https://archive.raspberrypi.org/debian/ ${rpi_distro/bookworm/bullseye} main' > /etc/apt/sources.list.d/raspi.list" + # RPi Trixie: Suite does not exist yet: https://archive.raspberrypi.org/debian/dists/ + (( $G_HW_MODEL < 10 || ( $G_HW_MODEL == 75 && ${G_RASPBIAN:-0} == 1 ) )) && G_EXEC eval "echo 'deb https://archive.raspberrypi.org/debian/ ${G_DISTRO_NAME/trixie/bookworm} main' > /etc/apt/sources.list.d/raspi.list" - # RISC-V: Provided via Debian ports and Sid only + # RISC-V: Provided via Sid only if (( $G_HW_ARCH == 11 )) then - G_EXEC eval 'echo '\''deb https://deb.debian.org/debian-ports/ sid main contrib non-free non-free-firmware -deb https://deb.debian.org/debian-ports/ unreleased 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 )) diff --git a/rootfs/etc/cron.daily/dietpi b/rootfs/etc/cron.daily/dietpi index c906587875..eff1a1db25 100755 --- a/rootfs/etc/cron.daily/dietpi +++ b/rootfs/etc/cron.daily/dietpi @@ -24,10 +24,11 @@ if grep -q '^[[:blank:]]*CONFIG_CHECK_DIETPI_UPDATES=1' /boot/dietpi.txt then /boot/dietpi/dietpi-update 2 - [[ $APT_UPDATE_MODE == 2 && -f '/run/dietpi/.update_available' ]] && G_AGUP -f + [[ $APT_UPDATE_MODE == 2 && -f '/run/dietpi/.update_available' ]] && { . /boot/dietpi/func/dietpi-globals; G_AGUP -f; } elif [[ $APT_UPDATE_MODE != 0 ]] then + . /boot/dietpi/func/dietpi-globals G_AGUP -f fi # Apply APT upgrades if chosen and available diff --git a/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash b/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash index b4ce9e6fee..6f7b29b118 100755 --- a/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash +++ b/rootfs/var/lib/dietpi/services/dietpi-firstboot.bash @@ -114,24 +114,55 @@ _EOF_ *'T6'*) [[ -f '/etc/udev/rules.d/dietpi-eth-leds.rules' ]] && rm /etc/udev/rules.d/dietpi-eth-leds.rules;; *) :;; esac + + # VisionFive 2 + elif [[ $G_HW_MODEL == 81 && -f '/proc/device-tree/serial-number' && -f '/boot/extlinux/extlinux.conf' ]] && ! grep -q '^[[:blank:]]*fdtoverlays[[:blank:]]' /boot/extlinux/extlinux.conf + then + local serial overlays=() + read -r serial < /proc/device-tree/serial-number + if [[ $serial == 'VF7110A1-'* ]] + then + G_DIETPI-NOTIFY 2 'A revision detected, applying device tree overlay to fix Ethernet ...' + read -ra overlays < <(mawk '$1=="fdtoverlays"{$1="";print}' /boot/extlinux/extlinux.conf) + local i= + for i in "${overlays[@]}"; do [[ $i == *'/ethernet-A12.dtbo' ]] && break; done + if [[ $i == *'/ethernet-A12.dtbo' ]] + then + G_DIETPI-NOTIFY 2 'A revision Ethernet overlay was applied already ...' + else + overlays+=('/usr/lib/linux-image-visionfive2/starfive/vf2-overlay/ethernet-A12.dtbo') + G_CONFIG_INJECT 'fdtoverlays[[:blank:]]' "fdtoverlays ${overlays[*]}" /boot/extlinux/extlinux.conf + fi + fi + if [[ $serial == *'-D008E000-'* ]] + then + G_DIETPI-NOTIFY 2 '8 GB RAM model detected, applying device tree overlay to make all 8 GB available to the system ...' + read -ra overlays < <(mawk '$1=="fdtoverlays"{$1="";print}' /boot/extlinux/extlinux.conf) + local i= + for i in "${overlays[@]}"; do [[ $i == *'/8GB.dtbo' ]] && break; done + if [[ $i == *'/8GB.dtbo' ]] + then + G_DIETPI-NOTIFY 2 '8 GB RAM overlay was applied already ...' + else + overlays+=('/usr/lib/linux-image-visionfive2/starfive/vf2-overlay/8GB.dtbo') + G_CONFIG_INJECT 'fdtoverlays[[:blank:]]' "fdtoverlays ${overlays[*]}" /boot/extlinux/extlinux.conf + fi + fi + grep -q '^[[:blank:]]*fdtoverlays[[:blank:]]' /boot/extlinux/extlinux.conf && { reboot; exit 0; } fi # End user automated script - if [[ -f '/boot/Automation_Custom_PreScript.sh' ]]; then - - G_DIETPI-NOTIFY 2 'Running custom script, please wait...' + if [[ -f '/boot/Automation_Custom_PreScript.sh' ]] + then + G_DIETPI-NOTIFY 2 'Running custom script, please wait ...' chmod +x /boot/Automation_Custom_PreScript.sh - if /boot/Automation_Custom_PreScript.sh 2>&1 | tee /var/tmp/dietpi/logs/dietpi-automation_custom_prescript.log; then - + if /boot/Automation_Custom_PreScript.sh 2>&1 | tee /var/tmp/dietpi/logs/dietpi-automation_custom_prescript.log + then G_DIETPI-NOTIFY 0 'Custom script' - else - G_DIETPI-NOTIFY 1 'Custom script: Please see the log file for more information: - /var/tmp/dietpi/logs/dietpi-automation_custom_prescript.log' - fi - fi # Apply swap settings