From fb60f5b760b558dd3980bdf09ae292703b8e342c Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 2 May 2023 14:03:10 +0200 Subject: [PATCH] v8.17 - CI | DietPi-Software: Attempt to fix SABnzbd install on RISC-V and add some more debugging info from within and outside the container - DietPi-Software | SABnzbd: Fix install on ARMv6/7 Bookworm systems --- .github/workflows/dietpi-software.bash | 11 +++++------ .github/workflows/dietpi-software.yml | 2 +- CHANGELOG.txt | 2 +- dietpi/dietpi-software | 13 ++++++------- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index 8db1f03be3..dc18cd1142 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -73,7 +73,7 @@ G_AG_CHECK_INSTALL_PREREQ "${apackages[@]}" 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 $((2*1024**3)) "$image.img" +G_EXEC truncate -s 3G "$image.img" # Loop device FP_LOOP=$(losetup -f) @@ -109,14 +109,13 @@ fi # 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-ci.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-ci.sh' # Enable automated setup G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt -# Workaround for network connection checks +# 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 -G_CONFIG_INJECT 'CONFIG_CHECK_DNS_DOMAIN=' 'CONFIG_CHECK_DNS_DOMAIN=localhost' rootfs/boot/dietpi.txt # Apply Git branch G_CONFIG_INJECT 'DEV_GITBRANCH=' "DEV_GITBRANCH=$G_GITBRANCH" rootfs/boot/dietpi.txt @@ -149,11 +148,11 @@ fi G_EXEC eval 'echo -e '\''#!/bin/dash\n/boot/dietpi/dietpi-services start\n> /success\npoweroff'\'' > rootfs/boot/Automation_Custom_Script.sh' # Shutdown as well on failure -G_EXEC sed -i 's|Prompt_on_Failure$|{ journalctl -e; ss -tlpn; poweroff; }|' rootfs/boot/dietpi/dietpi-login +G_EXEC sed -i 's|Prompt_on_Failure$|{ journalctl -e; ss -tlpn; df -h; free -h; poweroff; }|' rootfs/boot/dietpi/dietpi-login ########################################## # Boot container ########################################## systemd-nspawn -bD rootfs -[[ -f 'rootfs/success' ]] || exit 1 +[[ -f 'rootfs/success' ]] || { journalctl -e; df -h; free -h; exit 1; } } diff --git a/.github/workflows/dietpi-software.yml b/.github/workflows/dietpi-software.yml index c5f2b9ae6f..c5bc682e4b 100644 --- a/.github/workflows/dietpi-software.yml +++ b/.github/workflows/dietpi-software.yml @@ -31,7 +31,7 @@ concurrency: permissions: {} defaults: run: - working-directory: /dev/shm + #working-directory: /dev/shm # attempt to fix OOM kills shell: sh jobs: prep: diff --git a/CHANGELOG.txt b/CHANGELOG.txt index eeeed73207..b886c9dc41 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -26,7 +26,7 @@ Bug fixes: - DietPi-Software | Google AIY: Resolved an issue where the install failed on ARMv7 systems due to conflicting Python module dependencies. - DietPi-Software | UrBackup: Resolved an issue where the installation failed since the use "latest" directory has been removed the download server. Many thanks to @mikeruss1 for reporting this issue: https://dietpi.com/forum/t/404-on-trying-to-install-urbackup/16744 - DietPi-Software | SABnzbd: Resolved an issue where the service start failed on Buster systems since SABnzbd v4 does not support Python 3.7 anymore. The latest SABnzbd v3 is now installed instead on Buster systems. Many thanks to @githubchonger for reporting this issue: https://github.com/sabnzbd/sabnzbd/issues/2545 -- DietPi-Software | SABnzbd: Resolved an issue where the install failed on RISC-V due to missing dependencies for Python module builds. +- DietPi-Software | SABnzbd: Resolved an issue where the install failed on RISC-V and ARMv6/7 Bookworm systems due to missing dependencies for Python module builds. - DietPi-Software | UnRAR: Resolved an issue where the install failed on RISC-V systems, since the non-free "unrar" package is not available for this architecture yet. "unrar-free" is now installed instead. 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/xxxx diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index b780b7f56b..09f2549bae 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -9241,15 +9241,14 @@ _EOF_ [[ -f '/var/log/virtualhere.log' ]] && G_EXEC rm /var/log/virtualhere.log fi - if To_Install 139 sabnzbd # SABnzbd + if To_Install 139 sabnzbd # SABnzbd: https://sabnzbd.org/wiki/installation/install-off-modules then - # https://sabnzbd.org/wiki/installation/install-off-modules # APT deps aDEPS=('par2' 'p7zip-full') - # RISC-V: gcc and libffi-dev for cffi; pkg-config, libssl-dev and Rust for cryptography, g++ for sabctools and ujson - if (( $G_HW_ARCH == 11 )) + # - ARMv6/7 on Bookworm + RISC-V: gcc and libffi-dev for cffi; pkg-config, libssl-dev and Rust for cryptography, g++ for sabctools and ujson + if (( $G_DISTRO > 6 && $G_HW_ARCH < 3 || $G_HW_ARCH == 11 )) then - G_AGI g++ libffi-dev libssl-dev pkg-config + aDEPS+=('g++' 'libffi-dev' 'libssl-dev' 'pkg-config') G_EXEC curl -sSf 'https://sh.rustup.rs/' -o rustup-init.sh G_EXEC chmod +x rustup-init.sh G_EXEC_OUTPUT=1 G_EXEC ./rustup-init.sh -y --profile minimal @@ -9257,7 +9256,7 @@ _EOF_ export PATH="/root/.cargo/bin:$PATH" fi - # Download: SABnzbd v4 does not support Buster anymore: https://github.com/sabnzbd/sabnzbd/issues/2545 + # Download: SABnzbd v4 does not support Python 3.7 (Buster) anymore: https://github.com/sabnzbd/sabnzbd/issues/2545 if (( $G_DISTRO < 6 )) then Download_Install 'https://github.com/sabnzbd/sabnzbd/archive/3.7.2.tar.gz' @@ -9290,7 +9289,7 @@ _EOF_ # Service: https://github.com/sabnzbd/sabnzbd/blob/master/linux/sabnzbd%40.service # - Options: https://sabnzbd.org/wiki/advanced/command-line-parameters # "-OO": Optimise code and remove doc lines (default shebang of SABnzbd.py, but we run python3 explicitly to avoid version conflicts) - # "-d": Run in daemon mode without terminal and browser start (requires "-f ") + # "-d": Run in daemon mode without terminal and browser start (requires "-f /path/to/config.ini") # NB: In systemd unit leads to unreliable long taking webserver start. A new process is forked which allows web access, but sometimes after very long time, sometimes never: https://github.com/sabnzbd/sabnzbd/issues/1283 # "-n": Do no start browser with daemon cat << '_EOF_' > /etc/systemd/system/sabnzbd.service