Page 1 of 1

Running sabnzbd on QNAP ARM device

Posted: November 8th, 2018, 3:16 pm
by usefulvid
After installing sabnzbd on my QNAP TS-431+ (ARM) I have 3 different messages:
1)

Code: Select all

Secure (SSL) connections from SABnzbd to newsservers and HTTPS websites will be encrypted, however, validating a server's identity using its certificates is not possible. Python 2.7.9 or above, OpenSSL 1.0.2 or above and up-to-date local CA certificates are required. 
What I tried:

Code: Select all

 opkg install ca-certificates
Package ca-certificates (20180409-3) installed in root is up to date.
Mostly qnap uses different user paths as on "normal" linux installations. In which folder does sabnzbd checks for the CA certificates?

2)

Code: Select all

Speed up repairs by installing multicore Par2, it is available for many platforms. 

Code: Select all

 par2 -V
par2cmdline version 0.8.0

3)

Code: Select all

SABYenc: 	Not available

Code: Select all

 pip install sabyenc --upgrade
Collecting sabyenc
  Using cachedxxxxxxles.pythonhosted .org/packages/4f/30/a1a313ee4d9881cc5e119fcefb9f746df71f1b4fa6d3b53cc334799dbfd8/sabyenc-335 .tar .gz
    Complete output from command python setup.  py egg_info:
    usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: -c --help [cmd1 cmd2 ...]
       or: -c --help-commands
       or: -c cmd --help

    error: invalid command 'egg_info'

    ----------------------------------------
Command "python setup.py egg_ info" failed with error code 1 in /tmp/pip-install-HAPVGF/sabyenc/

I checked for egg_info

Code: Select all

[/share/CE_CACHEDEV1_DATA/  . qpkg] # find -name egg_info*
./container-station/usr/local/container-station/python/lib/python2.7/site-packages/setuptools/command/egg_info .py
./container-station/usr/local/container-station/python/lib/python2.7/site-packages/setuptools/command/egg_info .pyc
./Python3/pkgs/setuptools-18.3.2/setuptools/command/egg_info .py
./Python3/pkgs/setuptools-18.3.2/setuptools/command/__pycache__/egg_info.cpython-35 .pyc
./Python3/pkgs/setuptools-18.3.2/build/lib/setuptools/command/egg_info .py
./Entware-3x/lib/python2.7/site-packages/setuptools/command/egg_info .pyc
./QSabNZBdPlus/lib/python2.7/site-packages/setuptools/command/egg_info .py
./QSabNZBdPlus/lib/python2.7/site-packages/setuptools/command/egg_info .pyc

Code: Select all

 python -c "import sabyenc ; print sabyenc.__version__ "
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named sabyenc
Environement

Code: Select all

Config File: 	/share/CE_CACHEDEV1_DATA/.qpkg/QSabNZBdPlus/SAB_CONFIG/config.ini
Parameters: 	SABnzbd.py --config-file /share/CE_CACHEDEV1_DATA/.qpkg/QSabNZBdPlus/SAB_CONFIG/config.ini --server 0.0.0.0:8282 --https 8243 --daemon
Python Version: 	2.7.13 (default, Jan 14 2017, 19:54:44) [GCC 4.8.4] [UTF-8]
OpenSSL: 	OpenSSL 1.0.2j 26 Sep 2016 

Re: Running sabnzbd on QNAP ARM device

Posted: November 8th, 2018, 3:33 pm
by sander
Of this, only sabyenc is really a problem: sabyenc is required.

But ... how did you install this? I would expect the packager (the person creating the SABnzbd package for QNAP) for QNAP would take of including sabyenc?

Re: Running sabnzbd on QNAP ARM device

Posted: November 8th, 2018, 4:04 pm
by usefulvid
I used the qnapclub appstore
https://www.qnapclub.eu/de/qpkg/233

edit:

Code: Select all

[/share/CE_CACHEDEV1_DATA] # find -name sabyenc*
./.qpkg/QSabNZBdPlus/lib/python2.7/site-packages/sabyenc.so
./.qpkg/QSabNZBdPlus/lib/python2.7/site-packages/sabyenc-3.3.5-py2.7.egg-info
May this just be a problem with the path?

Re: Running sabnzbd on QNAP ARM device

Posted: November 8th, 2018, 4:05 pm
by OneCD
Hey Guys. :)

That particular package is maintained by QNAP_Stephane. It's a static build.

It's not the one installed via the sherpa script I support.

Re: Running sabnzbd on QNAP ARM device

Posted: November 8th, 2018, 4:09 pm
by usefulvid
what does this mean for me?

edit:

Code: Select all

pip install --upgrade setuptools
looks like that this gets my one step further:

Code: Select all

 pip install sabyenc
Collecting sabyenc
  Using cached https://files.pythonhosted.org/packages/4f/30/a1a313ee4d9881cc5e119fcefb9f746df71f1b4fa6d3b53cc334799dbfd8/sabyenc-3.3.5.tar.gz
Installing collected packages: sabyenc
  Running setup.py install for sabyenc ... error
    Complete output from command /opt/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-QwnAoG/sabyenc/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-UOUfDo/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_ext
    building 'sabyenc' extension
    creating build
    creating build/temp.linux-armv7l-2.7
    creating build/temp.linux-armv7l-2.7/src
    arm-openwrt-linux-gnueabi-gcc -fno-strict-aliasing -O2 -pipe -march=armv7-a -mtune=cortex-a9 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=soft -DNDEBUG -fno-inline -DNDEBUG -O2 -pipe -march=armv7-a -mtune=cortex-a9 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=soft -fPIC -I/opt/include/python2.7 -c src/sabyenc.c -o build/temp.linux-armv7l-2.7/src/sabyenc.o
    In file included from src/sabyenc.c:22:0:
    src/sabyenc.h:22:20: fatal error: Python.h: No such file or directory
     #include <Python.h>
                        ^
    compilation terminated.
    error: command 'arm-openwrt-linux-gnueabi-gcc' failed with exit status 1

    ----------------------------------------
Command "/opt/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-QwnAoG/sabyenc/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-UOUfDo/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-QwnAoG/sabyenc/


edit 2: now the installation of sabyenc worked

Code: Select all

[/share/CE_CACHEDEV1_DATA] # pip install sabyenc --upgrade
Requirement already up-to-date: sabyenc in ./.qpkg/Entware-3x/lib/python2.7/site-packages (3.3.5)
i had to install

Code: Select all

opkg install python-dev python-pip
Nevertheless in the GUI its shown as missing after a restart

Code: Select all

[/share/CE_CACHEDEV1_DATA] # python -c "import sabyenc ; print sabyenc.__version__ "
3.3.5

Re: Running sabnzbd on QNAP ARM device

Posted: November 8th, 2018, 4:33 pm
by OneCD
Stephane's QSAB uses its own Python installation.

In all fairness to Stephane, his version has never been 100% right.

I started the sherpa installer so we would have proper working installations. It installs Python via Entware, then adds everything so SABnzbd works properly. ;)

Re: Running sabnzbd on QNAP ARM device

Posted: November 8th, 2018, 4:35 pm
by usefulvid
Forget everything :) just used sherpa
everything perfect now

Re: Running sabnzbd on QNAP ARM device

Posted: November 20th, 2018, 2:38 am
by safihre
Nice OneCD! Script still going strong :)

Re: Running sabnzbd on QNAP ARM device

Posted: November 20th, 2018, 2:46 am
by OneCD
It's a continuous work-in-progress - just like each of the apps it installs. ;)