diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index c13fbf7041..3442571a38 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -11,10 +11,15 @@ else curl -sSf "https://raw.githubusercontent.com/${G_GITOWNER:=MichaIng}/DietPi/${G_GITBRANCH:=master}/dietpi/func/dietpi-globals" -o /tmp/dietpi-globals || exit 1 # shellcheck disable=SC1091 . /tmp/dietpi-globals - G_EXEC_NOHALT=1 G_EXEC rm /tmp/dietpi-globals + G_EXEC rm /tmp/dietpi-globals export G_GITOWNER G_GITBRANCH G_HW_ARCH_NAME=$(uname -m) - # shellcheck disable=SC2015 - [[ $(> rootfs/etc/rc.local -export GITOWNER='$GITOWNER' GITBRANCH='$GITBRANCH' HW_MODEL='$HW_MODEL' IMAGE_CREATOR=0 PREIMAGE_INFO=0 WIFI_REQUIRED=1 DISTRO_TARGET=$DISTRO +export GITOWNER='$GITOWNER' GITBRANCH='$GITBRANCH' HW_MODEL='$HW_MODEL' IMAGE_CREATOR=0 PREIMAGE_INFO=0 WIFI_REQUIRED=1 DISTRO_TARGET=$DISTRO TEST_KERNEL=$TEST_KERNEL TEST_UBOOT=$TEST_UBOOT echo '[ INFO ] Running DietPi-Installer for $G_GITOWNER/$G_GITBRANCH' bash -c "\$(curl -sSf 'https://raw.githubusercontent.com/$G_GITOWNER/DietPi/$G_GITBRANCH/.build/images/dietpi-installer')" || poweroff _EOF_ diff --git a/.build/images/dietpi-imager b/.build/images/dietpi-imager index f4a4aaff46..153565d5be 100755 --- a/.build/images/dietpi-imager +++ b/.build/images/dietpi-imager @@ -25,8 +25,14 @@ curl -sSf "https://raw.githubusercontent.com/$G_GITOWNER/DietPi/$G_GITBRANCH/dietpi/func/dietpi-globals" -o /tmp/dietpi-globals || exit 1 # shellcheck disable=SC1091 . /tmp/dietpi-globals - G_EXEC_NOHALT=1 G_EXEC rm /tmp/dietpi-globals - [[ $( /dev/null) != '5'* ]] + # - Bullseye/Focal: We need Clonezilla 5.x for loop device support + if dpkg --compare-versions "$(dpkg-query -Wf '${Version}' clonezilla 2> /dev/null)" lt 5 then - G_EXEC curl -sSf 'https://deb.debian.org/debian/pool/main/c/clonezilla/clonezilla_5.2.7-1_all.deb' -o clonezilla.deb + G_EXEC curl -sSf 'https://deb.debian.org/debian/pool/main/c/clonezilla/clonezilla_5.3.17-2_all.deb' -o clonezilla.deb G_EXEC dpkg -i ./clonezilla.deb G_EXEC rm clonezilla.deb fi diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 440f046afd..2b07e09d2f 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -24,11 +24,17 @@ # - HW_MODEL=0 (must match one of the supported IDs below) # - WIFI_REQUIRED=0 [01] # - DISTRO_TARGET=7 [678] (Bullseye: 6, Bookworm: 7, Trixie: 8) + # - TEST_KERNEL=1 Install test kernel from https://dietpi.com/downloads/binaries/testing/ + # - TEST_UBOOT=1 Install test U-Boot from https://dietpi.com/downloads/binaries/testing/ #------------------------------------------------------------------------------------------------ # Core globals G_PROGRAM_NAME='DietPi-Installer' + # Input variables + [[ $TEST_KERNEL == 1 ]] || TEST_KERNEL=0 + [[ $TEST_UBOOT == 1 ]] || TEST_UBOOT=0 + #------------------------------------------------------------------------------------------------ # Critical checks and requirements to run this script #------------------------------------------------------------------------------------------------ @@ -689,7 +695,6 @@ setenv rootuuid "true"' /boot/boot.cmd 79) (( $HW_VARIANT == 2 )) && G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-nanopi-r6c.dtb' /boot/dietpiEnv.txt;; 85) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-rock-5a.dtb' /boot/dietpiEnv.txt;; 87) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3566-orangepi-3b.dtb' /boot/dietpiEnv.txt;; - 90) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3566-radxa-zero3.dtb' /boot/dietpiEnv.txt;; *) :;; esac case $G_HW_MODEL in @@ -876,7 +881,7 @@ setenv rootuuid "true"' /boot/boot.cmd 'cron' # Background job scheduler 'curl' # Web address testing, downloading, uploading etc. 'fdisk' # Partitioning tool used by DietPi-FS_partition_resize and DietPi-Imager - 'gnupg' # apt-key add / gpg + 'gpg' # apt-key list / gpg 'htop' # System monitor 'iputils-ping' # "ping" command 'locales' # Support locales, used by dietpi-config > Language/Regional Options > Locale @@ -1053,7 +1058,7 @@ _EOF_ # Update APT lists G_AGUP # Install kernel, device tree, U-Boot, firmware and initramfs packages - local model='odroidn2' kernel='meson64' arch='arm64' branch='current' zstd=() dietpi_uboot=0 dietpi_kernel=0 + local model='odroidn2' kernel='meson64' arch='arm64' branch='current' zstd=() case $G_HW_MODEL in 10) model='odroidc1' kernel='meson' arch='arm';; 11) model='odroidxu4' kernel='odroidxu4' arch='arm';; @@ -1151,27 +1156,21 @@ blacklist rockchip_vdec _EOF_ fi # Install initramfs-tools first to have an initramfs generated on kernel install, and configure it to use zstd if supported for better compression and faster decompression - if (( $dietpi_kernel )) - then - G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb 'https://dietpi.com/downloads/binaries/armbian-firmware.deb' - G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb - G_EXEC rm package.deb - fi [[ $kernel == 'rockchip64' || $kernel == 'rk35xx' || $kernel == 'meson64' || $kernel == 'sunxi64' || $kernel == 'sunxi' || $kernel == 'rockchip' ]] && zstd=('zstd') G_AGI initramfs-tools u-boot-tools armbian-firmware "${zstd[@]}" [[ ${zstd[0]} ]] && G_CONFIG_INJECT 'COMPRESS=' 'COMPRESS=zstd' /etc/initramfs-tools/initramfs.conf # Download and pre-install kernel hosted on dietpi.com where the Armbian APT repo provides a too old version or is not available - if (( $dietpi_kernel )) + if (( $TEST_KERNEL )) then - G_EXEC_OUTPUT=1 G_EXEC curl -fo package1.deb "https://dietpi.com/downloads/binaries/linux-image-$branch-$kernel.deb" - G_EXEC_OUTPUT=1 G_EXEC curl -fo package2.deb "https://dietpi.com/downloads/binaries/linux-dtb-$branch-$kernel.deb" + G_EXEC_OUTPUT=1 G_EXEC curl -fo package1.deb "https://dietpi.com/downloads/binaries/testing/linux-image-$branch-$kernel.deb" + G_EXEC_OUTPUT=1 G_EXEC curl -fo package2.deb "https://dietpi.com/downloads/binaries/testing/linux-dtb-$branch-$kernel.deb" G_EXEC_OUTPUT=1 G_EXEC dpkg -i package[12].deb G_EXEC rm package[12].deb fi # Download and pre-install U-Boot hosted on dietpi.com where the Armbian APT repo provides a too old version or is not available - if (( $dietpi_uboot )) + if (( $TEST_UBOOT )) then - G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/linux-u-boot-$model-$branch.deb" + G_EXEC_OUTPUT=1 G_EXEC curl -fo package.deb "https://dietpi.com/downloads/binaries/testing/linux-u-boot-$model-$branch.deb" G_EXEC_OUTPUT=1 G_EXEC dpkg -i package.deb G_EXEC rm package.deb fi @@ -1216,14 +1215,6 @@ _EOF_ G_CONFIG_INJECT 'user_overlays=' 'user_overlays=dietpi-usb-otg' /boot/dietpiEnv.txt G_EXEC apt-mark auto device-tree-compiler - # Workaround for Odroid N2 failing to boot from eMMC: https://forum.armbian.com/topic/20206-odroid-n2-issues-with-recent-firmware-and-emmc-modules/#comment-142409 - elif (( $G_HW_MODEL == 15 )) - then - G_EXEC curl -sSfo u-boot.gz 'https://dietpi.com/downloads/binaries/u-boot-odroidn2.bin.gz' - G_EXEC gzip -d u-boot.gz - G_EXEC dd if=u-boot "of=$BOOT_DEVICE" bs=512 seek=1 conv=notrunc,fdatasync - G_EXEC rm u-boot - # Workaround for NanoPi R1 failing boot: https://github.com/MichaIng/DietPi/issues/5927 elif (( $G_HW_MODEL == 48 )) then @@ -1574,26 +1565,26 @@ _EOF_ [[ -d '/etc/chromium.d' ]] && G_EXEC rm -R /etc/chromium.d [[ -d '/etc/lightdm' ]] && G_EXEC rm -R /etc/lightdm - # - www + # www [[ -d '/var/www' ]] && G_EXEC rm -Rf /var/www/{,.??,.[^.]}* - # - Source code and Linux headers + # Source code and Linux headers [[ -d '/usr/src' ]] && G_EXEC rm -Rf /usr/src/{,.??,.[^.]}* - # - Documentation dirs: https://github.com/MichaIng/DietPi/issues/3259 + # Documentation dirs: https://github.com/MichaIng/DietPi/issues/3259 #[[ -d '/usr/share/man' ]] && G_EXEC rm -R /usr/share/man #[[ -d '/usr/share/doc' ]] && G_EXEC rm -R /usr/share/doc #[[ -d '/usr/share/doc-base' ]] && G_EXEC rm -R /usr/share/doc-base [[ -d '/usr/share/calendar' ]] && G_EXEC rm -R /usr/share/calendar - # - Unused DEB package config files + # Unused DEB package config files find / \( -name '*?.dpkg-dist' -o -name '*?.dpkg-old' -o -name '*?.dpkg-new' -o -name '*?.dpkg-bak' -o -name '*?.dpkg-del' -o -name '*?.ucf-dist' -o -name '*?.ucf-old' -o -name '*?.ucf-new' \) -exec rm -v {} + - # - Fonts + # Fonts [[ -d '/usr/share/fonts' ]] && G_EXEC rm -R /usr/share/fonts [[ -d '/usr/share/icons' ]] && G_EXEC rm -R /usr/share/icons - # - Stop, disable and remove not required 3rd party services + # Stop, disable and remove not required 3rd party services local aservices=( # RPi @@ -1639,7 +1630,7 @@ _EOF_ done done - # - Remove obsolete SysV service entries + # Remove obsolete SysV service entries aservices=( 'fake-hwclock' @@ -2283,7 +2274,7 @@ _EOF_ fi # Update config - G_CONFIG_INJECT 'GRUB_CMDLINE_LINUX_DEFAULT=' 'GRUB_CMDLINE_LINUX_DEFAULT="consoleblank=0"' /etc/default/grub + G_CONFIG_INJECT 'GRUB_CMDLINE_LINUX_DEFAULT=' 'GRUB_CMDLINE_LINUX_DEFAULT="consoleblank=0"' /etc/default/grub # NB: Removing "quiet" adds ~0.5s to boot time on my 6.5s - 7.5s boot time laptop. G_CONFIG_INJECT 'GRUB_CMDLINE_LINUX=' 'GRUB_CMDLINE_LINUX="net.ifnames=0"' /etc/default/grub G_CONFIG_INJECT 'GRUB_TIMEOUT=' 'GRUB_TIMEOUT=0' /etc/default/grub G_EXEC_DESC='Regenerating GRUB config' G_EXEC_OUTPUT=1 G_EXEC grub-mkconfig -o /boot/grub/grub.cfg diff --git a/.build/software/Amiberry/container_build.bash b/.build/software/Amiberry/container_build.bash index ef5063d4a9..7b88ee0014 100755 --- a/.build/software/Amiberry/container_build.bash +++ b/.build/software/Amiberry/container_build.bash @@ -137,9 +137,6 @@ Pin-Priority: -1 _EOF_ fi -# ARMv6/7 Trixie: Temporarily prevent dist-upgrade on Trixie, as it fails due to 64-bit time_t transition causing dependency conflicts across the repo. -(( $arch < 3 )) && [[ $DISTRO == 'trixie' ]] && G_EXEC touch rootfs/boot/dietpi/.skip_distro_upgrade - # Automated build cat << _EOF_ >> rootfs/boot/Automation_Custom_Script.sh || Error_Exit 'Failed to generate Automation_Custom_Script.sh' echo '[ INFO ] Running Amiberry build script ...' diff --git a/.github/workflows/amiberry.yml b/.github/workflows/amiberry.yml index f23af7750c..9e8fa0851d 100644 --- a/.github/workflows/amiberry.yml +++ b/.github/workflows/amiberry.yml @@ -25,7 +25,7 @@ jobs: plat: ${{ steps.plat.outputs.plat }} dist: ${{ steps.dist.outputs.dist }} # https://github.com/actions/runner-images - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - id: plat run: | @@ -54,7 +54,10 @@ jobs: - { plat: riscv64, dist: bookworm } fail-fast: false name: "${{ matrix.plat }} - ${{ matrix.dist }}" - runs-on: ubuntu-22.04 + # aarch64 build in QEMU-emulated Bullseye containers on Ubuntu Noble hosts fail: + # Processing triggers for libc-bin (2.31-13+deb11u10) ... + # qemu: uncaught target signal 11 (Segmentation fault) - core dumped + runs-on: ${{ matrix.dist == 'bullseye' && ( endsWith(matrix.plat, '-64-sdl2') || matrix.plat == 'AMLSM1' || matrix.plat == 'n2' || matrix.plat == 'a64' || matrix.plat == 'rk3588' ) && 'ubuntu-22.04' || 'ubuntu-24.04' }} steps: - name: Build run: sudo bash -c "G_GITOWNER=$GITHUB_REPOSITORY_OWNER G_GITBRANCH=$GITHUB_REF_NAME; $(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/$GITHUB_REF_NAME/.build/software/Amiberry/container_build.bash")" -- -p '${{ matrix.plat }}' -d '${{ matrix.dist }}' diff --git a/.github/workflows/armbian.yml b/.github/workflows/armbian.yml index ab86ec4f0c..e654a48838 100644 --- a/.github/workflows/armbian.yml +++ b/.github/workflows/armbian.yml @@ -11,7 +11,7 @@ on: branch: description: 'Branch' type: choice - options: [legacy, current, edge, vendor, vendor-boogie-panthor, collabora] + options: [legacy, current, edge, vendor, collabora] default: current required: true board: @@ -32,7 +32,8 @@ permissions: {} jobs: build: name: "${{ github.event.inputs.asset }} - ${{ github.event.inputs.branch }} - ${{ github.event.inputs.board }}" - runs-on: ubuntu-22.04 + # https://github.com/actions/runner-images + runs-on: ubuntu-24.04 steps: - name: Clone Armbian repo run: | @@ -71,7 +72,7 @@ jobs: read -r version < VERSION case '${{ github.event.inputs.asset }}' in firmware) package='armbian-firmware';; - uboot) package='linux-uboot-${{ github.event.inputs.board }}-${{ github.event.inputs.board }}';; + uboot) package='linux-uboot-${{ github.event.inputs.board }}-${{ github.event.inputs.branch }}';; kernel) family=$(. 'config/boards/${{ github.event.inputs.board }}.'* &> /dev/null; echo "$BOARDFAMILY") echo "Board family is: $family" diff --git a/.github/workflows/dietpi-build.yml b/.github/workflows/dietpi-build.yml index 273bc1a334..8ed3cab4cf 100644 --- a/.github/workflows/dietpi-build.yml +++ b/.github/workflows/dietpi-build.yml @@ -14,7 +14,7 @@ jobs: outputs: buildargs: ${{ steps.buildargs.outputs.buildargs }} # https://github.com/actions/runner-images - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - id: buildargs run: | @@ -116,7 +116,10 @@ jobs: buildargs: ${{ fromJson(needs.prep.outputs.buildargs) }} fail-fast: false name: "Build: ${{ matrix.buildargs }}" - runs-on: ubuntu-22.04 + # aarch64 build in QEMU-emulated Bullseye containers on Ubuntu Noble hosts fail: + # Processing triggers for libc-bin (2.31-13+deb11u10) ... + # qemu: uncaught target signal 11 (Segmentation fault) - core dumped + runs-on: ${{ contains(matrix.buildargs, '-d 6') && 'ubuntu-22.04' || 'ubuntu-24.04' }} steps: - name: Generate upload script run: | diff --git a/.github/workflows/dietpi-software-build.yml b/.github/workflows/dietpi-software-build.yml index 0570711301..bcf9db7820 100644 --- a/.github/workflows/dietpi-software-build.yml +++ b/.github/workflows/dietpi-software-build.yml @@ -31,7 +31,7 @@ jobs: arch: ${{ steps.arch.outputs.arch }} dist: ${{ steps.dist.outputs.dist }} # https://github.com/actions/runner-images - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - id: name run: | @@ -72,7 +72,10 @@ jobs: - { arch: x86_64, name: gogs } fail-fast: false name: "${{ matrix.name }} - ${{ matrix.arch }} - ${{ matrix.dist }}" - runs-on: ubuntu-22.04 + # aarch64 build in QEMU-emulated Bullseye containers on Ubuntu Noble hosts fail: + # Processing triggers for libc-bin (2.31-13+deb11u10) ... + # qemu: uncaught target signal 11 (Segmentation fault) - core dumped + runs-on: ${{ matrix.dist == 'bullseye' && matrix.arch == 'aarch64' && 'ubuntu-22.04' || 'ubuntu-24.04' }} steps: - name: Build run: sudo bash -c "G_GITOWNER=$GITHUB_REPOSITORY_OWNER G_GITBRANCH=$GITHUB_REF_NAME; $(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/$GITHUB_REF_NAME/.build/software/dietpi-software-build.bash")" -- -n '${{ matrix.name }}' -a '${{ matrix.arch }}' -d '${{ matrix.dist }}' diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index 397e94220d..21d03629b6 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -88,7 +88,7 @@ Process_Software() 7) aCOMMANDS[i]='ffmpeg -version';; 9) aCOMMANDS[i]='node -v';; #16) aSERVICES[i]='microblog-pub' aTCP[i]='8007';; Service enters a CPU-intense internal error loop until it has been configured interactively via "microblog-pub configure", hence it is not enabled and started anymore after install but instead as part of "microblog-pub configure" - 17) aCOMMANDS[i]='git -v';; + 17) aCOMMANDS[i]='git --version';; # from Bookworm on, the shorthand "-v" is supported 28) aSERVICES[i]='vncserver' aTCP[i]='5901';; 29) aSERVICES[i]='xrdp' aTCP[i]='3389';; 30) aSERVICES[i]='nxserver' aTCP[i]='4000';; @@ -197,6 +197,7 @@ Process_Software() 172) aSERVICES[i]='wg-quick@wg0' aUDP[i]='51820';; 174) aCOMMANDS[i]='gimp -v';; 176) aSERVICES[i]='mycroft';; + 177) aSERVICES[i]='forgejo' aTCP[i]='3000'; (( $arch < 10 )) && aDELAY[i]=30;; 178) aSERVICES[i]='jellyfin' aTCP[i]='8097'; [[ $arch == [23] ]] && aDELAY[i]=300;; # jellyfin[9983]: arm-binfmt-P: ../../target/arm/translate.c:9659: thumb_tr_translate_insn: Assertion `(dc->base.pc_next & 1) == 0' failed. ### jellyfin[9983]: qemu: uncaught target signal 6 (Aborted) - core dumped ### about 5 times 179) aSERVICES[i]='komga' aTCP[i]='2037'; (( $arch == 10 )) && aDELAY[i]=30; (( $arch < 10 )) && aDELAY[i]=300;; 180) aSERVICES[i]='bazarr' aTCP[i]='6767'; (( $arch == 10 )) && aDELAY[i]=30; (( $arch < 10 )) && aDELAY[i]=90;; @@ -244,7 +245,7 @@ do 8|33|131|179|206) Process_Software 196;; 32|148|119) Process_Software 128;; 129) Process_Software 88 89 128 webserver;; - 49|165) Process_Software 88;; + 49|165|177) Process_Software 0 17 88;; #61) Process_Software 60;; # Cannot be installed in CI 125) Process_Software 194;; #86|134|185) Process_Software 162;; # Docker does not start in systemd containers (without dedicated network) @@ -368,9 +369,6 @@ G_EXEC eval 'echo -e '\''[Service]\nAmbientCapabilities='\'' > rootfs/etc/system # Workaround for sysctl: permission denied on key "net.core.rmem_max" in containers G_EXEC sed --follow-symlinks -i '/# Start DietPi-Software/a\sed -i '\''/G_EXEC sysctl -w net\.core\.rmem_max/d'\'' /boot/dietpi/dietpi-software' rootfs/boot/dietpi/dietpi-login -# ARMv6/7 Trixie: Temporarily prevent dist-upgrade on Trixie, as it fails due to 64-bit time_t transition causing dependency conflicts across the repo. -(( $arch < 3 )) && [[ $DISTRO == 'trixie' ]] && G_EXEC touch rootfs/boot/dietpi/.skip_distro_upgrade - # Check for service status, ports and commands # shellcheck disable=SC2016 # - Start all services diff --git a/.github/workflows/dietpi-software.yml b/.github/workflows/dietpi-software.yml index d1419f9ea4..d013908cee 100644 --- a/.github/workflows/dietpi-software.yml +++ b/.github/workflows/dietpi-software.yml @@ -36,7 +36,7 @@ permissions: {} jobs: prep: # https://github.com/actions/runner-images - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - id: arch run: | @@ -68,7 +68,10 @@ jobs: - { arch: riscv64, dist: bookworm } fail-fast: false name: "${{ matrix.arch }} - ${{ matrix.dist }} - ${{ github.event.inputs.soft }}" - runs-on: ubuntu-22.04 + # aarch64 test in QEMU-emulated Bullseye containers on Ubuntu Noble hosts fail: + # Processing triggers for libc-bin (2.31-13+deb11u10) ... + # qemu: uncaught target signal 11 (Segmentation fault) - core dumped + runs-on: ${{ matrix.dist == 'bullseye' && matrix.arch == 'aarch64' && 'ubuntu-22.04' || 'ubuntu-24.04' }} steps: - name: Install run: | diff --git a/.github/workflows/quartz64.yml b/.github/workflows/quartz64.yml index a176196e67..f9687c86dc 100644 --- a/.github/workflows/quartz64.yml +++ b/.github/workflows/quartz64.yml @@ -7,32 +7,36 @@ permissions: {} jobs: build: # https://github.com/actions/runner-images - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 env: - uboot_version: '2023.10' CROSS_COMPILE: 'aarch64-linux-gnu-' ARCH: 'arm64' steps: - # https://github.com/actions/setup-python/tags - uses: actions/setup-python@v5 with: python-version: '3.x' check-latest: true - name: Build init run: | + # Workaround for runner provider restart: https://github.com/actions/runner-images/pull/9956 + sudo apt-get -qq autopurge needrestart { python3 -m pip install --no-cache-dir -U pip setuptools wheel; python3 -m pip install --no-cache-dir -U pyelftools; } & { sudo apt-get -q update; sudo DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -qq install make gcc libc6-dev flex bison gcc-aarch64-linux-gnu bc libssl-dev swig; } & - { curl -fLO "https://github.com/u-boot/u-boot/archive/v$uboot_version.tar.gz"; tar xf "v$uboot_version.tar.gz"; rm "v$uboot_version.tar.gz"; } & { curl -fO 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/snapshot/linux-rolling-stable.tar.gz'; tar xf linux-rolling-stable.tar.gz; rm linux-rolling-stable.tar.gz; } & + uboot_version=$(curl -sSf 'https://api.github.com/repos/u-boot/u-boot/tags' | mawk -F\" '/^ *"name": "v[0-9.]*",$/{print $4;exit}') + [ "$uboot_version" ] || { echo 'ERROR: Failed to obtain latest U-Boot version'; exit 1; } + { curl -fLO "https://github.com/u-boot/u-boot/archive/$uboot_version.tar.gz"; tar xf "$uboot_version.tar.gz"; rm "$uboot_version.tar.gz"; } & + uboot_version=${uboot_version#v} + echo "uboot_version=$uboot_version" >> "$GITHUB_ENV" wait curl -sSfo "u-boot-$uboot_version/ddr.bin" 'https://raw.githubusercontent.com/JeffyCN/mirrors/ddf03c1/bin/rk35/rk3568_ddr_1560MHz_v1.13.bin' & curl -sSfo "u-boot-$uboot_version/bl31.elf" 'https://raw.githubusercontent.com/JeffyCN/mirrors/6186deb/bin/rk35/rk3568_bl31_v1.28.elf' & curl -sSfo linux-rolling-stable/arch/arm64/configs/quartz64_defconfig "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/$GITHUB_REF_NAME/.build/images/Quartz64/quartz64_defconfig" & - rm -Rf firmware-quartz64a/DEBIAN firmware-quartz64a/boot/extlinux firmware-quartz64a/lib/firmware/brcm + rm -Rf firmware-quartz64a mkdir -p firmware-quartz64a/DEBIAN firmware-quartz64a/boot/extlinux firmware-quartz64a/lib/firmware/brcm - rm -Rf firmware-quartz64b/DEBIAN firmware-quartz64b/boot/extlinux firmware-quartz64b/lib/firmware/brcm + rm -Rf firmware-quartz64b mkdir -p firmware-quartz64b/DEBIAN firmware-quartz64b/boot/extlinux firmware-quartz64b/lib/firmware/brcm - rm -Rf firmware-soquartz/DEBIAN firmware-soquartz/boot/extlinux firmware-soquartz/lib/firmware/brcm + rm -Rf firmware-soquartz mkdir -p firmware-soquartz/DEBIAN firmware-soquartz/boot/extlinux firmware-soquartz/lib/firmware/brcm wait - name: Build U-Boot diff --git a/.github/workflows/raspberrypi-sys-mods.yml b/.github/workflows/raspberrypi-sys-mods.yml index 675e3af75e..67bfcdc9c7 100644 --- a/.github/workflows/raspberrypi-sys-mods.yml +++ b/.github/workflows/raspberrypi-sys-mods.yml @@ -7,7 +7,7 @@ permissions: {} jobs: build: # https://github.com/actions/runner-images - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Build run: sudo bash -c "$(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/$GITHUB_REF_NAME/.build/software/raspberrypi-sys-mods/build.bash")" diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index 6ac2dba1c6..aed94c650c 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -9,7 +9,7 @@ jobs: shellcheck: if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login != github.event.pull_request.base.repo.owner.login # https://github.com/actions/runner-images - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - name: Setup DietPi-Globals diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index cb2c6a5599..8328fd9b53 100755 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -717,10 +717,12 @@ shopt -s extglob aSOFTWARE_NAME9_2[i]=${aSOFTWARE_NAME9_1[i]} aSOFTWARE_NAME9_3[i]=${aSOFTWARE_NAME9_2[i]} aSOFTWARE_NAME9_4[i]=${aSOFTWARE_NAME9_3[i]} + aSOFTWARE_NAME9_5[i]=${aSOFTWARE_NAME9_4[i]} done + aSOFTWARE_NAME9_5[177]='Forgejo' # Pre-create software counter array so that we can see also software (available in newest version) with 0 installs - for i in "${aSOFTWARE_NAME9_4[@]}" + for i in "${aSOFTWARE_NAME9_5[@]}" do aSOFTWARE[$i]=0 done diff --git a/.update/patches b/.update/patches index b3ddc055e3..348747baa3 100755 --- a/.update/patches +++ b/.update/patches @@ -1629,6 +1629,34 @@ _EOF_ fi } +Patch_9_5() +{ + # Update DietPi APT list for several SBCs we added components to our repo for + if [[ $PATCH_9_3_RAN == 0 && $G_HW_MODEL =~ ^(12|15|16|54|74)$ ]] + then + /boot/dietpi/func/dietpi-set_software apt-mirror dietpi + G_AGUP + G_AGUG + fi + + # Flash new U-Boot on Odroid C1 and Radxa ZERO 3 + (( $G_HW_MODEL == 10 || $G_HW_MODEL == 90 )) && /boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc + + # Do not hardcode device tree on Radxa ZERO 3, after flashing our new U-Boot, since it does now select the correct device tree with onboard WiFi support, based on hardware details. + (( $G_HW_MODEL == 90 )) && sed -i '/^fdtfile=rockchip/rk3566-radxa-zero3.dtb$/d' /boot/dietpiEnv.txt + + # Update MPD flag on Bookworm and above: https://github.com/MusicPlayerDaemon/MPD/commit/ce77b14 + (( $G_DISTRO > 6 )) && [[ -f '/etc/systemd/system/mpd.service.d/dietpi.conf' ]] && G_EXEC sed -i 's/no-daemon/systemd/' /etc/systemd/system/mpd.service.d/dietpi.conf + + # Migrate jellyfin-ffmpeg5 => jellyfin-ffmpeg6 + if dpkg-query -s jellyfin &> /dev/null && dpkg-query -s jellyfin-ffmpeg5 &> /dev/null + then + G_DIETPI-NOTIFY 2 'Migrating to Jellyfin FFmpeg 6' + G_AGI jellyfin + G_AGP jellyfin-ffmpeg5 # conffiles + fi +} + # v6.35 => v7 migration if (( $G_DIETPI_VERSION_CORE == 6 && $G_DIETPI_VERSION_SUB > 34 )) then diff --git a/.update/version b/.update/version index 9e903dac26..c828917a5c 100644 --- a/.update/version +++ b/.update/version @@ -2,8 +2,8 @@ # shellcheck disable=SC2034 # Available DietPi version G_REMOTE_VERSION_CORE=9 -G_REMOTE_VERSION_SUB=4 -G_REMOTE_VERSION_RC=2 +G_REMOTE_VERSION_SUB=5 +G_REMOTE_VERSION_RC=0 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=7 G_MIN_VERSION_SUB=0 diff --git a/CHANGELOG.txt b/CHANGELOG.txt index e6e8a1cdfc..f54024ac35 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,30 @@ +v9.5 +(2024-06-08) + +New software: +- Forgejo | This Gitea fork has been added to our software library. Read about the background of this fork here: https://forgejo.org/2022-12-15-hello-forgejo/. Many thanks to @Cs137 for requesting and @jcnils for implementing this software option: https://github.com/MichaIng/DietPi/discussions/6133, https://github.com/MichaIng/DietPi/pull/7071 + +Enhancements: +- Images | New DietPi images won't contain the "gnupg" package anymore, but "gpg" only, since other features of the suite are not required for our scripts anymore. E.g. "dirmngr" for interacting with keyservers, and "gpg-agent" for key passphrase inputs are hence missing. "gpg" however prints very clear error messages about what is missing. Let us know whether you find one of those GnuPG features too essential to not be pre-installed. +- Radxa ZERO 3 | Onboard WiFi does now work OOTB on early ZERO 3W revisions with AP6212 WiFi chip. +- DietPi-Software | Jellyfin: Since a while FFmpeg 6 is available for Jellyfin, but on old installs with the old FFmpeg 5 package, it is not upgraded automatically by APT. This DietPi update applies the FFmpeg upgrade to all affected systems. Many thanks to @gioxx and @WolfganP for reporting this issue: https://github.com/MichaIng/DietPi/issues/7080 +- DietPi-Software | MediaWiki: Uploaded images are now preserved on reinstalls. + +Bug fixes: +- Odroid C1/C2 | Resolved an issue on both SBCs where reboots could hang and a power cycle was required to get the device back up. Many thanks to @yandritos, @gociii and others for reporting this issue, and @gitmeister for providing the fix for Odroid C2: https://github.com/MichaIng/DietPi/issues/5414, https://github.com/MichaIng/DietPi/issues/6332 +- Orange Pi Zero 2W | Resolved an issue where the onboard Ethernet adapter did not work. +- NanoPi NEO | Resolved an issue where LEDs of this SBC could not be configured, due to a conflicting kernel patch. Many thanks to @mhjessen for reporting this issue: https://github.com/MichaIng/DietPi/issues/5401 +- DietPi-Config | Resolved an issue where Advanced Options were not accessible on some SBCs. Many thanks to @thuehlinger for reporting this issue: https://github.com/MichaIng/DietPi/issues/6663#issuecomment-2108351878 +- DietPi-Software | Snapcast Server: Resolved on issue where on RISC-V systems, the web interface was not available, since it is not included in the "snapserver" package from Debian. Many thanks to @hllhll for reporting this issue: https://github.com/MichaIng/DietPi/issues/7073 +- DietPi-Software | Snapcast Server: Resolved an issue where on Bookworm systems, which installed the Snapcast Server before DietPi v9.4 and reinstalled it afterwards, the server failed to start due to a permissions issue, since the services of both packages use different users. Many thanks to @hllhll for reporting this issue: https://github.com/MichaIng/DietPi/issues/7073 +- DietPi-Software | Shairport Sync: Resolved a DietPi v9.4 regression, where the AirPlay 2 choice did not have an effect, but the AirPlay 1 package was always installed. Additionally, uninstalling Shairport Sync will now also purge the AirPlay 2 package. Many thanks to @pulpe for fixing this bug: https://github.com/MichaIng/DietPi/pull/7082 +- DietPi-Software | Box64: Resolved an issue where an invalid build target was used on Raspberry Pi 5 with 16k page size kernel. This target was removed with latest Box64, as page size handling is now done at runtime. +- DietPi-Software | Jellyfin: Resolved an issue where the intended HTTP port change could not be applied, since the network config file is not created anymore at service start. We do now pre-create a minimal one, which is complemented with defaults automatically. + +As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/ADDME + +----------------------------------------------------------------------------------------------------------- + v9.4 (2024-05-12) diff --git a/README.md b/README.md index 68f36bb638..a6805bf5bf 100644 --- a/README.md +++ b/README.md @@ -339,6 +339,7 @@ Links to hardware and software manufacturers, sources and build instructions use - [Homebridge](https://github.com/homebridge/homebridge) - [ADS-B Feeder](https://github.com/dirkhh/adsb-feeder-image) - [Kavita](https://github.com/Kareadita/Kavita) +- [Forgejo](https://codeberg.org/forgejo/forgejo) --- diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index f97fc96d59..0fd4369391 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -944,7 +944,7 @@ Re-enabling HDMI requires a reboot. If you need emergency HDMI output, edit the G_WHIP_MENU_ARRAY=() (( $G_HW_MODEL < 10 )) && G_WHIP_MENU_ARRAY+=('' '●─ Toggle console ') - for i in /dev/{tty{S,AMA,SAC,AML,SC,GS,FIQ,MV},hvc}[0-9] + for i in /dev/{tty{S,AMA,SAC,AML,SC,GS,FIQ,MV},hvc}[0-9]* do [[ -e $i ]] || continue i=${i#/dev/} @@ -1077,7 +1077,7 @@ Re-enabling HDMI requires a reboot. If you need emergency HDMI output, edit the { [[ -e '/dev/mtd0' ]] && grep -q '/dev/mtd0' /usr/lib/u-boot/platform_install.sh && spidev='/dev/mtd0'; } || { [[ -b '/dev/mtdblock0' ]] && grep -q 'rksd_loader.img' /usr/lib/u-boot/platform_install.sh; } } - } && G_WHIP_MENU_ARRAY+=("Update SPI bootloader' ': Flash current U-Boot to $spidev") + } && G_WHIP_MENU_ARRAY+=('Update SPI bootloader' ": Flash current U-Boot to $spidev") # VisionFive 2/Star64: https://doc-en.rvspace.org/VisionFive2/PDF/VisionFive2_QSG.pdf elif (( $G_HW_MODEL == 81 || $G_HW_MODEL == 84 )) @@ -2478,12 +2478,22 @@ NB: All Ethernet connections will be temporarily dropped!' && Network_ApplyChang 'Ethernet') - # No adapter detected + # No adapter detected: Offer to disable if enabled if (( ! $ETH_HARDWARE )) then + if (( ! $ETH_DISABLED )) + then + if G_WHIP_YESNO 'No Ethernet adapter was detected on your device. +\nWould you like to disable Ethernet?\n - NB: Connections may drop!' + then + ETH_DISABLED=1 + Network_ApplyChanges + fi + return 0 + fi G_WHIP_MSG 'No Ethernet adapter was detected on your device.' - # Disabled: Offer chance to enable + # Disabled: Offer to enable elif (( $ETH_DISABLED )) then if G_WHIP_YESNO 'Ethernet must be enabled before settings can be changed. @@ -2500,7 +2510,7 @@ NB: All Ethernet connections will be temporarily dropped!' && Network_ApplyChang 'WiFi') - # Disabled: Offer chance to enable (also enables WiFi modules) + # Disabled: Offer to enable, including WiFi modules for adapter to be detected if (( $WIFI_DISABLED )) then if G_WHIP_YESNO 'WiFi must be enabled before settings can be changed. @@ -2508,11 +2518,11 @@ NB: All Ethernet connections will be temporarily dropped!' && Network_ApplyChang then WIFI_DISABLED=0 Network_ApplyChanges - # Enter submenu if a WiFi adapters has been detected, else only preselect the menu entry + # Enter submenu if WiFi adapter has been detected, else only preselect the menu entry (( $WIFI_HARDWARE )) && TARGETMENUID=10 || G_WHIP_DEFAULT_ITEM='WiFi' # WiFi adapter menu fi - # No adapter detected + # No adapter detected: Offer to disable elif (( ! $WIFI_HARDWARE )) then if G_WHIP_YESNO 'No WiFi adapter was detected on your device. diff --git a/dietpi/dietpi-services b/dietpi/dietpi-services index b597d02137..07d9a13610 100755 --- a/dietpi/dietpi-services +++ b/dietpi/dietpi-services @@ -207,6 +207,7 @@ _EOF_ 'urbackupsrv' 'gogs' 'gitea' + 'forgejo' 'vaultwarden' 'filebrowser' diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 7a315c4a76..4cfd783433 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -180,7 +180,6 @@ Available commands: # PHP version case $G_DISTRO in - 5) PHP_VERSION='7.3';; 6) PHP_VERSION='7.4';; *) PHP_VERSION='8.2';; esac @@ -807,7 +806,7 @@ Available commands: aSOFTWARE_CATX[$software_id]=4 aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/cloud/#gogs' aSOFTWARE_DEPS[$software_id]='17 88 0' - aSOFTWARE_CONFLICTS[$software_id]='165' + aSOFTWARE_CONFLICTS[$software_id]='165 177' #------------------ software_id=50 aSOFTWARE_NAME[$software_id]='Syncthing' @@ -839,10 +838,20 @@ Available commands: aSOFTWARE_CATX[$software_id]=4 aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/cloud/#gitea' aSOFTWARE_DEPS[$software_id]='17 88 0' - aSOFTWARE_CONFLICTS[$software_id]='49' + aSOFTWARE_CONFLICTS[$software_id]='49 177' # - RISC-V: Missing binary: https://github.com/go-gitea/gitea/releases aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,11]=0 #------------------ + software_id=177 + aSOFTWARE_NAME[$software_id]='Forgejo' + aSOFTWARE_DESC[$software_id]='Self-hosted lightweight software forge. Fork of Gitea.' + aSOFTWARE_CATX[$software_id]=4 + aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/cloud/#forgejo' + aSOFTWARE_DEPS[$software_id]='17 88 0' + aSOFTWARE_CONFLICTS[$software_id]='49 165' + # - RISC-V: Missing binary: https://codeberg.org/forgejo/forgejo/releases + aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,11]=0 + #------------------ software_id=183 aSOFTWARE_NAME[$software_id]='vaultwarden' aSOFTWARE_DESC[$software_id]='Unofficial Bitwarden password manager server written in Rust' @@ -3335,7 +3344,7 @@ _EOF_ esac # Download binary - local fallback_url="https://github.com/prometheus/node_exporter/releases/download/v1.8.0/node_exporter-1.8.0.linux-$arch.tar.gz" + local fallback_url="https://github.com/prometheus/node_exporter/releases/download/v1.8.1/node_exporter-1.8.1.linux-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/prometheus/node_exporter/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/node_exporter-.*\.linux-$arch\.tar\.gz\"$/{print \$4}")" G_EXEC mkdir -p /opt/node_exporter G_EXEC cp --preserve=mode node_exporter*/node_exporter /opt/node_exporter/ @@ -4027,8 +4036,9 @@ User=mpd RuntimeDirectory=mpd EnvironmentFile= ExecStart= -ExecStart=/usr/bin/mpd --no-daemon +ExecStart=/usr/bin/mpd --systemd _EOF_ + (( $G_DISTRO < 7 )) && G_EXEC sed -i 's/systemd/no-daemon/' /etc/systemd/system/mpd.service.d/dietpi.conf Remove_SysV mpd 1 # Config @@ -4909,7 +4919,6 @@ The install script will now exit. After applying one of the the above, rerun die (( $G_RASPBIAN )) && distro='Raspbian_' case $G_DISTRO in - 5) distro+='10';; 6) distro+='11';; 7) distro+='12';; *) distro+='Testing';; @@ -6209,7 +6218,7 @@ _EOF_ *) local arch='amd64';; esac - local fallback_url="https://github.com/navidrome/navidrome/releases/download/v0.52.0/navidrome_0.52.0_linux_$arch.tar.gz" + local fallback_url="https://github.com/navidrome/navidrome/releases/download/v0.52.5/navidrome_0.52.5_linux_$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/navidrome/navidrome/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/navidrome_[0-9.]*_linux_$arch\.tar\.gz\"$/{print \$4}")" /opt/navidrome # Data dir @@ -6292,9 +6301,8 @@ _EOF_ if To_Install 212 kavita # Kavita then - # .NET dependency: https://github.com/dotnet/core/blob/main/Documentation/linux-prereqs.md + # .NET dependency: https://github.com/dotnet/docs/blob/main/docs/core/install/linux-debian.md#dependencies case $G_DISTRO in - 5) aDEPS=('libicu63');; 6) aDEPS=('libicu67');; *) aDEPS=('libicu72');; esac @@ -6513,7 +6521,7 @@ _EOF_ esac # Download - local fallback_url="https://github.com/fatedier/frp/releases/download/v0.58.0/frp_0.58.0_linux_$arch.tar.gz" + local fallback_url="https://github.com/fatedier/frp/releases/download/v0.58.1/frp_0.58.1_linux_$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/fatedier/frp/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/frp_[0-9.]*_linux_$arch\.tar\.gz\"/{print \$4}")" G_EXEC cd frp_* @@ -7043,7 +7051,7 @@ _EOF_ aDEPS=() else local version=$(curl -sSfL 'https://api.github.com/repos/FreshRSS/FreshRSS/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}') - [[ $version ]] || { version='1.23.1'; G_DIETPI-NOTIFY 1 "Automatic latest FreshRSS version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } + [[ $version ]] || { version='1.24.0'; G_DIETPI-NOTIFY 1 "Automatic latest FreshRSS version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } Download_Install "https://github.com/FreshRSS/FreshRSS/archive/$version.tar.gz" G_EXEC mv "FreshRSS-$version" /opt/FreshRSS fi @@ -8037,7 +8045,7 @@ _EOF_ airplay2= fi - G_AGI shairport-sync + G_AGI "shairport-sync$airplay2" G_EXEC systemctl stop shairport-sync fi @@ -8526,7 +8534,7 @@ _EOF_ # Install ruTorrent: Web UI for rTorrent # - Grab current version local version=$(curl -sSfL 'https://api.github.com/repos/Novik/ruTorrent/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}') - [[ $version ]] || { version='v4.3.0'; G_DIETPI-NOTIFY 1 "Automatic latest ruTorrent version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } + [[ $version ]] || { version='v4.3.2'; G_DIETPI-NOTIFY 1 "Automatic latest ruTorrent version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } Download_Install "https://github.com/Novik/ruTorrent/archive/$version.tar.gz" # - Reinstall freshly with preserved configs and 3rd party plugins @@ -9481,11 +9489,10 @@ _EOF_ then # APT dependencies aDEPS=('mediainfo') - # - .NET: https://github.com/dotnet/core/blob/main/Documentation/linux-prereqs.md + # - .NET: https://github.com/dotnet/docs/blob/main/docs/core/install/linux-debian.md#dependencies if (( $G_HW_ARCH != 1 )) then case $G_DISTRO in - 5) aDEPS+=('libicu63');; 6) aDEPS+=('libicu67');; *) aDEPS+=('libicu72');; esac @@ -9512,7 +9519,7 @@ _EOF_ esac url=$(curl -sSfL 'https://api.github.com/repos/Radarr/Radarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}") - local fallback_url="https://github.com/Radarr/Radarr/releases/download/v5.5.3.8819/Radarr.master.5.5.3.8819.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Radarr/Radarr/releases/download/v5.6.0.8846/Radarr.master.5.6.0.8846.linux-core-$arch.tar.gz" fi Download_Install "$url" @@ -9575,11 +9582,10 @@ _EOF_ then # APT dependencies aDEPS=('mediainfo') - # - .NET: https://github.com/dotnet/core/blob/main/Documentation/linux-prereqs.md + # - .NET: https://github.com/dotnet/docs/blob/main/docs/core/install/linux-debian.md#dependencies if (( $G_HW_ARCH != 1 )) then case $G_DISTRO in - 5) aDEPS+=('libicu63');; 6) aDEPS+=('libicu67');; *) aDEPS+=('libicu72');; esac @@ -9609,7 +9615,7 @@ _EOF_ esac url=$(curl -sSfL 'https://api.github.com/repos/Lidarr/Lidarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}") - local fallback_url="https://github.com/Lidarr/Lidarr/releases/download/v2.2.5.4141/Lidarr.master.2.2.5.4141.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Lidarr/Lidarr/releases/download/v2.3.3.4204/Lidarr.master.2.3.3.4204.linux-core-$arch.tar.gz" fi Download_Install "$url" @@ -9797,11 +9803,10 @@ _EOF_ if To_Install 147 jackett # Jackett then # ARMv6 requires Mono: https://github.com/Jackett/Jackett#installation-on-linux-armv6-or-below - # .NET dependency: https://github.com/dotnet/core/blob/main/Documentation/linux-prereqs.md + # .NET dependency: https://github.com/dotnet/docs/blob/main/docs/core/install/linux-debian.md#dependencies if (( $G_HW_ARCH != 1 )) then case $G_DISTRO in - 5) aDEPS=('libicu63');; 6) aDEPS=('libicu67');; *) aDEPS=('libicu72');; esac @@ -9875,7 +9880,7 @@ _EOF_ local reinstall=0 [[ -f '/mnt/dietpi_userdata/nzbget/nzbget.conf' ]] && reinstall=1 - local fallback_url='https://github.com/nzbgetcom/nzbget/releases/download/v24.0/nzbget-24.0-bin-linux.run' + local fallback_url='https://github.com/nzbgetcom/nzbget/releases/download/v24.1/nzbget-24.1-bin-linux.run' Download_Install "$(curl -sSfL 'https://api.github.com/repos/nzbgetcom/nzbget/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/nzbget-[^"/]*-bin-linux.run"$/{print $4}')" nzbget.run G_EXEC mkdir -p /mnt/dietpi_userdata/nzbget G_EXEC_OUTPUT=1 G_EXEC dash nzbget.run --destdir /mnt/dietpi_userdata/nzbget @@ -9932,9 +9937,8 @@ _EOF_ if To_Install 151 prowlarr # Prowlarr then - # .NET dependency: https://github.com/dotnet/core/blob/main/Documentation/linux-prereqs.md + # .NET dependency: https://github.com/dotnet/docs/blob/main/docs/core/install/linux-debian.md#dependencies case $G_DISTRO in - 5) aDEPS=('libicu63');; 6) aDEPS=('libicu67');; *) aDEPS=('libicu72');; esac @@ -9955,7 +9959,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.17.2.4511/Prowlarr.master.1.17.2.4511.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Prowlarr/Prowlarr/releases/download/v1.18.0.4543/Prowlarr.master.1.18.0.4543.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Prowlarr/Prowlarr/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}")" G_EXEC mv Prowlarr /opt/prowlarr fi @@ -10007,9 +10011,8 @@ _EOF_ if To_Install 203 readarr # Readarr then - # .NET dependency: https://github.com/dotnet/core/blob/main/Documentation/linux-prereqs.md + # .NET dependency: https://github.com/dotnet/docs/blob/main/docs/core/install/linux-debian.md#dependencies case $G_DISTRO in - 5) aDEPS=('libicu63');; 6) aDEPS=('libicu67');; *) aDEPS=('libicu72');; esac @@ -10030,7 +10033,7 @@ _EOF_ *) local arch='x64';; esac - local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.25.2515/Readarr.develop.0.3.25.2515.linux-core-$arch.tar.gz" + local fallback_url="https://github.com/Readarr/Readarr/releases/download/v0.3.27.2538/Readarr.develop.0.3.27.2538.linux-core-$arch.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/Readarr/Readarr/releases' | mawk -F\" "/^ *\"browser_download_url\": \".*linux-core-$arch\.tar\.gz\"$/{print \$4}" | head -1)" G_EXEC mv Readarr /opt/readarr fi @@ -10226,9 +10229,8 @@ _EOF_ if To_Install 154 roonserver # Roon Server then # https://help.roonlabs.com/portal/en/kb/articles/linux-install#Manual_Install - # .NET dependency: https://github.com/dotnet/core/blob/main/Documentation/linux-prereqs.md + # .NET dependency: https://github.com/dotnet/docs/blob/main/docs/core/install/linux-debian.md#dependencies case $G_DISTRO in - 5) aDEPS=('libicu63');; 6) aDEPS=('libicu67');; *) aDEPS=('libicu72');; esac @@ -10599,7 +10601,7 @@ _EOF_ *) local arch='arm-6';; esac - local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.21.11/gitea-1.21.11-linux-$arch.xz" + local fallback_url="https://github.com/go-gitea/gitea/releases/download/v1.22.0/gitea-1.22.0-linux-$arch.xz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/go-gitea/gitea/releases/latest' | mawk -F\" "/\"browser_download_url\": \".*\/gitea-[^\"\/]*-linux-$arch\.xz\"/{print \$4}")" /mnt/dietpi_userdata/gitea/gitea # User @@ -10638,6 +10640,52 @@ _EOF_ [[ -f '/mnt/dietpi_userdata/gitea/custom/conf/app.ini' ]] && G_CONFIG_INJECT 'RUN_USER[[:blank:]]' 'RUN_USER = gitea' /mnt/dietpi_userdata/gitea/custom/conf/app.ini fi + if To_Install 177 forgejo # Forgejo + then + # ARMv7: Dedicated binaries are not provided: https://codeberg.org/forgejo/forgejo/releases + case $G_HW_ARCH in + 3) local arch='arm64';; + 10) local arch='amd64';; + *) local arch='arm-6';; + esac + + local fallback_url="https://codeberg.org/forgejo/forgejo/releases/download/v7.0.3/forgejo-7.0.3-linux-$arch.xz" + Download_Install "$(curl -sSfL 'https://codeberg.org/api/v1/repos/forgejo/forgejo/releases/latest' | mawk -v RS=, -F\" "/^\"browser_download_url\":\".*-linux-$arch\.xz\"/{print \$4;exit}")" /mnt/dietpi_userdata/forgejo/forgejo + + # User + Create_User -d /mnt/dietpi_userdata/forgejo -s /bin/dash forgejo + + # Permissions + G_EXEC chown -R forgejo:forgejo /mnt/dietpi_userdata/forgejo + G_EXEC chmod +x /mnt/dietpi_userdata/forgejo/forgejo + + # Database + /boot/dietpi/func/create_mysql_db forgejo forgejo "$GLOBAL_PW" + + # Service + cat << '_EOF_' > /etc/systemd/system/forgejo.service +[Unit] +Description=Forgejo (DietPi) +Wants=network-online.target +After=network-online.target mariadb.service + +[Service] +User=forgejo +LogsDirectory=forgejo +WorkingDirectory=/mnt/dietpi_userdata/forgejo +ExecStart=/mnt/dietpi_userdata/forgejo/forgejo web + +# Hardening +ProtectSystem=full +PrivateDevices=yes +PrivateTmp=yes +NoNewPrivileges=true + +[Install] +WantedBy=multi-user.target +_EOF_ + fi + if To_Install 163 gmediarender # GMediaRender then G_AGI gmediarender @@ -10931,12 +10979,7 @@ _EOF_ # APT meta package: Server, web component and FFmpeg implementation G_AGI jellyfin - if [[ -d '/mnt/dietpi_userdata/jellyfin' || -f '/etc/jellyfin/network.xml' ]] - then - G_EXEC systemctl stop jellyfin - else - CREATE_CONFIG_CONTENT='AddPeopleQueryIndex' Create_Config '/etc/jellyfin/migrations.xml' jellyfin 60 - fi + G_EXEC systemctl stop jellyfin # Grant dietpi group permissions and assure video access Create_User -G dietpi,video,render -d /mnt/dietpi_userdata/jellyfin jellyfin @@ -10944,8 +10987,6 @@ _EOF_ # Config: Only apply on fresh install, assumed when /mnt/dietpi_userdata/jellyfin does not yet exist if [[ ! -d '/mnt/dietpi_userdata/jellyfin' ]] then - # Start service until /etc/jellyfin/network.xml exists - Create_Config '/etc/jellyfin/network.xml' jellyfin # Data dir # shellcheck disable=SC2015 [[ -d '/var/lib/jellyfin' ]] && G_EXEC mv /var/lib/jellyfin /mnt/dietpi_userdata/jellyfin || G_EXEC mkdir /mnt/dietpi_userdata/jellyfin @@ -10958,8 +10999,14 @@ _EOF_ [[ -d '/var/cache/jellyfin' ]] && G_EXEC mv /var/cache/jellyfin /mnt/dietpi_userdata/jellyfin/cache || G_EXEC mkdir /mnt/dietpi_userdata/jellyfin/cache G_CONFIG_INJECT 'JELLYFIN_CACHE_DIR=' 'JELLYFIN_CACHE_DIR=/mnt/dietpi_userdata/jellyfin/cache' /etc/default/jellyfin # Change default port due to conflict with Emby - G_CONFIG_INJECT '' '8097' /etc/jellyfin/network.xml - G_CONFIG_INJECT '' ' 8097' /etc/jellyfin/network.xml + # - This config file is not generated at service start, but only when saving network settings via web UI. This also complements any existing config with defaults, hence we pre-create one with only the changes we need. + cat << '_EOF_' > /etc/jellyfin/network.xml + + 8097 + 8097 + +_EOF_ + G_EXEC chown jellyfin: /etc/jellyfin/network.xml fi # Permissions @@ -10975,7 +11022,7 @@ _EOF_ # Download local version=$(curl -sSfL 'https://api.github.com/repos/ptitSeb/box86/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}') - [[ $version ]] || { version='v0.3.4'; G_DIETPI-NOTIFY 1 "Automatic latest ${aSOFTWARE_NAME[$software_id]} version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } + [[ $version ]] || { version='v0.3.6'; G_DIETPI-NOTIFY 1 "Automatic latest ${aSOFTWARE_NAME[$software_id]} version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } Download_Install "https://github.com/ptitSeb/box86/archive/$version.tar.gz" # Build for targets: https://github.com/ptitSeb/box86/blob/master/CMakeLists.txt @@ -10984,26 +11031,26 @@ _EOF_ # - RPi 2 if (( $G_HW_MODEL == 2 )) then - G_EXEC cmake .. -DRPI2=1 -DNOGIT=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DRPI2=1 # - RPi 3 elif (( $G_HW_MODEL == 3 )) then - G_EXEC cmake .. -DRPI3=1 -DNOGIT=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DRPI3=1 # - RPi 4 elif (( $G_HW_MODEL == 4 )) then - G_EXEC cmake .. -DRPI4=1 -DNOGIT=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DRPI4=1 # - Odroids elif (( $G_HW_MODEL < 20 )) then - G_EXEC cmake .. -DODROID=1 -DNOGIT=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DODROID=1 # - ASUS Tinker Board elif (( $G_HW_MODEL == 52 )) then - G_EXEC cmake .. -DRK3288=1 -DNOGIT=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DRK3288=1 # - Others else - G_EXEC cmake .. -DARM_DYNAREC=1 -DNOGIT=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DARM_DYNAREC=1 fi G_EXEC_OUTPUT=1 G_EXEC make CFLAGS='-g0 -O3' "-j$(nproc)" G_EXEC strip --remove-section=.comment --remove-section=.note box86 @@ -11020,7 +11067,7 @@ _EOF_ # Download local version=$(curl -sSfL 'https://api.github.com/repos/ptitSeb/box64/releases/latest' | mawk -F\" '/^ *"tag_name": "[^"]*",$/{print $4}') - [[ $version ]] || { version='v0.2.6'; G_DIETPI-NOTIFY 1 "Automatic latest ${aSOFTWARE_NAME[$software_id]} version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } + [[ $version ]] || { version='v0.2.8'; G_DIETPI-NOTIFY 1 "Automatic latest ${aSOFTWARE_NAME[$software_id]} version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; } Download_Install "https://github.com/ptitSeb/box64/archive/$version.tar.gz" # Build for targets: https://github.com/ptitSeb/box64/blob/main/CMakeLists.txt @@ -11029,36 +11076,34 @@ _EOF_ # - RISC-V if (( $G_HW_ARCH == 11 )) then - G_EXEC cmake .. -DRV64=1 -DNOGIT=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DRV64=1 # - RPi 3 elif (( $G_HW_MODEL == 3 )) then - G_EXEC cmake .. -DRPI3ARM64=1 -DNOGIT=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DRPI3ARM64=1 # - RPi 4 elif (( $G_HW_MODEL == 4 )) then - G_EXEC cmake .. -DRPI4ARM64=1 -DNOGIT=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DRPI4ARM64=1 # - RPi 5 elif (( $G_HW_MODEL == 5 )) then - local ps16k='' - dpkg-query -s 'linux-image-rpi-2712' &> /dev/null && ps16k='PS16K' - G_EXEC cmake .. "-DRPI5ARM64$ps16k=1" -DNOGIT=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DRPI5ARM64=1 # - Odroid N2 elif (( $G_HW_MODEL == 15 )) then - G_EXEC cmake .. -DODROIDN2=1 -DNOGIT=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DODROIDN2=1 # - RK3399 elif (( $G_HW_CPUID == 3 )) then - G_EXEC cmake .. -DRK3399=1 -DNOGIT=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DRK3399=1 # - RK3588 elif (( $G_HW_CPUID == 11 )) then - G_EXEC cmake .. -DRK3588=1 -DNOGIT=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DRK3588=1 # - Generic ARMv8 else - G_EXEC cmake .. -DARM64=1 -DNOGIT=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + G_EXEC cmake .. -DNOGIT=1 -DCMAKE_BUILD_TYPE=Release -DARM64=1 fi G_EXEC_OUTPUT=1 G_EXEC make CFLAGS='-g0 -O3' "-j$(nproc)" G_EXEC strip --remove-section=.comment --remove-section=.note box64 @@ -11509,14 +11554,24 @@ _EOF_ then G_AGI snapserver - # Enable web UI to align with upstream package - G_CONFIG_INJECT 'doc_root[[:blank:]=]' 'doc_root = /usr/share/snapserver/snapweb' /etc/snapserver.conf '\[http\]' + # Install and enable snapweb web UI, not included in Debian's snapserver package: https://github.com/MichaIng/DietPi/issues/7073 + local fallback_url='https://github.com/badaix/snapweb/releases/download/v0.7.0/snapweb_0.7.0-1_all.deb' + Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapweb/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/snapweb_[^"\/]*_all.deb"/{print $4}')" + G_CONFIG_INJECT 'doc_root[[:blank:]=]' 'doc_root = /usr/share/snapweb' /etc/snapserver.conf '\[http\]' + + # Fix /var/lib/snapserver permissions, just in case badaix's package was previously used, which uses the "snapserver" user, instead of "_snapserver" + [[ -d '/var/lib/snapserver' ]] && G_EXEC chown -R '_snapserver:_snapserver' /var/lib/snapserver + getent passwd snapserver > /dev/null && G_EXEC userdel snapserver else local arch=$(dpkg --print-architecture) dist=${G_DISTRO_NAME/trixie/bookworm} local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.28.0/snapcast_0.28.0_$arch-debian-$dist.zip" Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapcast_[^\"\/]*_$arch-debian-$dist.zip\"/{print \$4}")" G_AGI ./snapserver_*_"$arch.deb" G_EXEC rm snap*.deb + + # Fix /var/lib/snapserver permissions, just in case Debian's package was previously used, which uses the "_snapserver" user, instead of "snapserver" + [[ -d '/var/lib/snapserver' ]] && G_EXEC chown -R 'snapserver:snapserver' /var/lib/snapserver + getent passwd _snapserver > /dev/null && G_EXEC userdel _snapserver fi G_EXEC systemctl stop snapserver @@ -11620,7 +11675,7 @@ _EOF_ fi # Get latest version - local fallback_url='https://releases.wikimedia.org/mediawiki/1.40/mediawiki-1.40.0.tar.gz' + local fallback_url='https://releases.wikimedia.org/mediawiki/1.41/mediawiki-1.41.1.tar.gz' Download_Install "$(curl -sSfL 'https://www.mediawiki.org/wiki/Download' | grep -o 'https://releases\.wikimedia\.org/mediawiki/[^/"]*/mediawiki-[^"]*\.tar\.gz' | head -1)" # Enable required PHP modules @@ -11648,12 +11703,17 @@ location ^~ /wiki/images { _EOF_ fi - # Reinstall: Clean install but preserve existing config file + # Reinstall: Clean install but preserve existing config and uploaded images if [[ -f '/var/www/wiki/LocalSettings.php' ]] then G_EXEC mv /var/www/wiki/LocalSettings.php mediawiki-*/ G_EXEC chmod 600 mediawiki-*/LocalSettings.php fi + if [[ -d '/var/www/wiki/images' ]] + then + G_EXEC cp -a mediawiki-*/images/{.htaccess,README} /var/www/wiki/images/ + G_EXEC cp -a /var/www/wiki/images/. mediawiki-*/images/ + fi G_EXEC chown -R www-data:www-data mediawiki-* [[ -d '/var/www/wiki' ]] && G_EXEC rm -R /var/www/wiki @@ -11710,7 +11770,7 @@ _EOF_ *) local arch='amd64';; esac - local fallback_url="https://github.com/filebrowser/filebrowser/releases/download/v2.29.0/linux-$arch-filebrowser.tar.gz" + local fallback_url="https://github.com/filebrowser/filebrowser/releases/download/v2.30.0/linux-$arch-filebrowser.tar.gz" Download_Install "$(curl -sSfL 'https://api.github.com/repos/filebrowser/filebrowser/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/linux-$arch-filebrowser\.tar\.gz\"$/{print \$4}")" ./filebrowser/ # Reinstall @@ -12813,7 +12873,7 @@ If no WireGuard (auto)start is included, but you require it, please do the follo if To_Uninstall 37 # Shairport Sync then - G_AGP shairport-sync + G_AGP shairport-sync shairport-sync-airplay2 fi if To_Uninstall 152 # Avahi-Daemon @@ -13553,6 +13613,17 @@ _EOF_ Remove_Database gitea fi + if To_Uninstall 177 # Forgejo + then + Remove_Service forgejo 1 1 + + # Data + [[ -d '/mnt/dietpi_userdata/forgejo' ]] && G_EXEC rm -R /mnt/dietpi_userdata/forgejo + [[ -d '/var/log/forgejo' ]] && G_EXEC rm -R /var/log/forgejo + + Remove_Database forgejo + fi + if To_Uninstall 166 # Audiophonics PI-SPC then Remove_Service pi-spc @@ -14086,6 +14157,9 @@ _EOF_ if To_Uninstall 191 # Snapcast Server then G_AGP snapserver + # Remove users from Debian's and badaix's packages, to cleanly cover upgrades from one to the other. + getent passwd snapserver > /dev/null && G_EXEC userdel snapserver + getent passwd _snapserver > /dev/null && G_EXEC userdel _snapserver fi if To_Uninstall 192 # Snapcast Client @@ -14415,7 +14489,7 @@ _EOF_ # Create a persistent flag to not repeat G_AGDUG and rule out a reboot loop when kernel modules remain missing G_EXEC eval '> /boot/dietpi/.skip_distro_upgrade' # Perform a reboot if required as of missing kernel modules - G_CHECK_KERNEL || { G_DIETPI-NOTIFY 2 'A reboot is done to finalise the kernel upgrade'; reboot; } + G_CHECK_KERNEL || { G_DIETPI-NOTIFY 2 'A reboot is done to finalise the kernel upgrade'; sync; reboot; } fi # Global PW diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index d3bda29db1..f67adf1ab2 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -54,8 +54,8 @@ [[ -f '/boot/dietpi/.version' ]] && . /boot/dietpi/.version # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=9 - [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=4 - [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=2 + [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=5 + [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=0 [[ $G_GITBRANCH ]] || G_GITBRANCH='master' [[ $G_GITOWNER ]] || G_GITOWNER='MichaIng' # - Save current version and Git branch diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index af4a19e95d..28f77b0d91 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -1503,7 +1503,7 @@ Do you want to continue and disable the serial login console?' || return 1 # Enable boot messages depending on device # - Skip on USB getget serial device, which requires loading a kernel module first and hence cannot be used for boot outputs - if [[ $INPUT_ADDITIONAL == 'ttyGS'[0-9] ]] + if [[ $INPUT_ADDITIONAL == 'ttyGS'[0-9]* ]] then : @@ -1567,7 +1567,7 @@ _EOF_ # Enable for all detected Serial/UART devices else - for i in /dev/{tty{S,AMA,SAC,AML,SC,GS,FIQ,MV},hvc}[0-9] + for i in /dev/{tty{S,AMA,SAC,AML,SC,GS,FIQ,MV},hvc}[0-9]* do [[ -e $i ]] || continue INPUT_ADDITIONAL=${i/\/dev\/} Serial_Main @@ -1629,7 +1629,7 @@ _EOF_ # Disable for all detected Serial/UART devices else - for i in /dev/{tty{S,AMA,SAC,AML,SC,GS,FIQ,MV},hvc}[0-9] + for i in /dev/{tty{S,AMA,SAC,AML,SC,GS,FIQ,MV},hvc}[0-9]* do [[ -e $i ]] || continue INPUT_ADDITIONAL=${i/\/dev\/} Serial_Main @@ -2397,7 +2397,7 @@ _EOF_ 'rpi3_usb_boot') RPi_USB_Boot_Main;; 'rpi-eeprom') RPi_EEPROM;; 'vf2-spi-update') VF2_SPI_Update;; - 'flash-u-boot-mmc') Flash_U-Boot_MMC || EXIT_CODE=1;; + 'flash-u-boot-mmc'|'flash-uboot-mmc') Flash_U-Boot_MMC || EXIT_CODE=1;; 'headless') Headless_Main;; 'gpudriver') GPUDriver_Main;; 'qemu-guest-agent'|'qga') QEMU_Guest_Agent_Main;; diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index 0b6631f002..5479c79b77 100755 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -124,6 +124,9 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R [0-9]) all_components='rpi';; 10) all_components='odroidc1';; 11) all_components='odroidxu4';; + 12) all_components='odroidc2';; + 15) all_components='odroidn2';; + 16) all_components='odroidc4';; 40) all_components='pinea64';; 44) all_components='pinebook';; 45) all_components='pineh64';; @@ -146,6 +149,7 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R ;; esac ;; + 54) all_components='nanopik2';; 56) all_components='nanopineo3';; 57) all_components='nanopineoplus2';; 59) all_components='zeropi';; @@ -190,6 +194,7 @@ $FP_SCRIPT rpi_kernel_choice Supported on Debian Bookworm or newer on R 66) all_components='nanopim1plus';; 67) all_components='nanopik1plus';; 70) all_components='sparkysbc';; + 74) all_components='radxazero';; 76) # Detect variant either based on $HW_VARIANT environment variable, existing "all" components or installed U-Boot package # shellcheck disable=SC2154 diff --git a/rootfs/etc/systemd/system/ifupdown-pre.service.d/dietpi.conf b/rootfs/etc/systemd/system/ifupdown-pre.service.d/dietpi.conf index 2213d71b0d..e02554a055 100644 --- a/rootfs/etc/systemd/system/ifupdown-pre.service.d/dietpi.conf +++ b/rootfs/etc/systemd/system/ifupdown-pre.service.d/dietpi.conf @@ -1,4 +1,9 @@ -# Assure that ifupdown-pre always waits for udev to settle: https://dietpi.com/forum/t/dietpi-8-2-2-wireguard-doesnt-start-after-reboot/6415/28?u=michaing +# Assure that ifupdown-pre always waits for udev to settle: https://dietpi.com/forum/t/6415/28 +# Assure it finishes before ifup@.service instances start: https://github.com/MichaIng/DietPi/issues/6951 +[Unit] +Wants=network-pre.target +Before=network-pre.target + [Service] ExecStart= ExecStart=/bin/dash -c '[ "$CONFIGURE_INTERFACES" = "no" ] || [ ! -x /bin/udevadm ] || udevadm settle' diff --git a/rootfs/var/lib/dietpi/services/fs_partition_resize.sh b/rootfs/var/lib/dietpi/services/fs_partition_resize.sh index f99f7d913f..cf74b97788 100755 --- a/rootfs/var/lib/dietpi/services/fs_partition_resize.sh +++ b/rootfs/var/lib/dietpi/services/fs_partition_resize.sh @@ -9,6 +9,7 @@ > /dietpi_skip_partition_resize systemctl enable dietpi-fs_partition_resize echo '[ INFO ] Rebooting to load the new partition table' + sync reboot exit 0 } @@ -117,7 +118,7 @@ # Maximise root filesystem if type is supported case $ROOT_FSTYPE in - 'ext'[234]) resize2fs "$ROOT_DEV" || reboot;; # Reboot if resizing fails: https://github.com/MichaIng/DietPi/issues/6149 + 'ext'[234]) resize2fs "$ROOT_DEV" || REBOOT=1;; # Reboot if resizing fails: https://github.com/MichaIng/DietPi/issues/6149 'f2fs') mount -o remount,ro / resize.f2fs "$ROOT_DEV" @@ -131,7 +132,7 @@ esac # Reboot if needed - (( $REBOOT )) && reboot + (( $REBOOT )) && { sync; reboot; } exit "$EXIT_CODE" }