Skip to content

Commit

Permalink
v8.17
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
MichaIng committed May 2, 2023
1 parent d2382fd commit fb60f5b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/dietpi-software.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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; }
}
2 changes: 1 addition & 1 deletion .github/workflows/dietpi-software.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 6 additions & 7 deletions dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -9241,23 +9241,22 @@ _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
G_EXEC rm rustup-init.sh
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'
Expand Down Expand Up @@ -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 </path/to/config.ini>")
# "-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
Expand Down

0 comments on commit fb60f5b

Please sign in to comment.