SABnzbd on Fedora on (emulated) RISC-V / riscv64: howto

Feel free to talk about anything and everything in this board.
Post Reply
User avatar
sander
Release Testers
Release Testers
Posts: 8808
Joined: January 22nd, 2008, 2:22 pm

SABnzbd on Fedora on (emulated) RISC-V / riscv64: howto

Post by sander »

If you haven't a got real RISC, get and unpack fedora-on-risc images for QEMU emluation:

Code: Select all

wget https://dl.fedoraproject.org/pub/alt/risc-v/repo/virt-builder-images/images/Fedora-Minimal-Rawhide-20200108.n.0-sda.raw.xz
wget https://dl.fedoraproject.org/pub/alt/risc-v/repo/virt-builder-images/images/Fedora-Minimal-Rawhide-20200108.n.0-fw_payload-uboot-qemu-virt-smode.elf
unxz Fedora-Minimal-Rawhide-20200108.n.0-sda.raw.xz

Code: Select all

sudo apt install qemu-system-riscv64
Start fedora-on-risc-on-qemu, exposing internal port 8080 to port 18080 on the host system:

Code: Select all

qemu-system-riscv64    -nographic    -machine virt    -smp 4    -m 2G    -kernel Fedora-Minimal-Rawhide-*-fw_payload-uboot-qemu-virt-smode.elf    -bios none    -object rng-random,filename=/dev/urandom,id=rng0    -device virtio-rng-device,rng=rng0    -device virtio-blk-device,drive=hd0    -drive file=Fedora-Minimal-Rawhide-20200108.n.0-sda.raw,format=raw,id=hd0    -device virtio-net-device,netdev=usernet    -netdev user,id=usernet,hostfwd=tcp::18080-:8080

Booting fedora takes 5-10 minutes.
Login with: root / fedora_rocks!

Logged on, do this:

Code: Select all

# install dependencies
dnf install -y tar wget unzip python3-devel python3-cryptography par2cmdline gcc gcc-c++
... which will take 5-10 minutes.

Code: Select all

# install unrar
wget https://www.rarlab.com/rar/unrarsrc-6.0.5.tar.gz
tar xvzf unrarsrc-6.0.5.tar.gz
cd unrar
make -f makefile
make install

Code: Select all

# prepare SAB stuff
cd
wget https://github.com/sabnzbd/sabnzbd/releases/download/3.2.1/SABnzbd-3.2.1-src.tar.gz
tar xvzf SABnzbd-3.2.1-src.tar.gz
cd SABnzbd-3.2.1
sed -i -e 's/cryptography/# cryptography/g' requirements.txt # we got python3-cryptography already installed
python3 -m pip install -r requirements.txt
... which will take 5 minutes

Code: Select all

# start SAB
./SABnzbd.py -b0 -s 0.0.0.0 -l2
From the host, you can now access SABnzbd on http://127.0.0.1:18080/ (so: port 18080, as we exposed that from qemu)

The performance of the emulated RISC is quite poor: System performance (Pystone) is around 3.000. So about the same as an ARM device like a Synology DS212j from 2010 or so.
Post Reply