This is the best place for community developers to publish their genius work. Your Apps enrich the QNAP Turbo NAS.
OneCD
Guru
Posts: 12146 Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"
Post
by OneCD » Sat May 06, 2017 2:05 pm
sherpa: a mini-package-manager for QNAP NAS
The world's first multi-action CLI package-manager!
Package management via
sherpa provides features like easy application backup, upgrading, service and daemon management, multi-threaded operation, self-checking and repair, and all operations may be automated via cron.
Important: this is a command-line package and service manager, it's in beta status, and packages have been known to break due to auto-upgrades going wrong. If you would like-to (and are able-to) help by diagnosing and providing logs, and don't mind things breaking from time-to-time, please use this package. If you're looking for complete stability and want a "set-and-forget" solution, it won't be found here just yet. Do not use sherpa in production environments, unless you're comfortable with the CLI and debugging bash and Python scripts, and/or can afford for applications to be out-of-order for extended periods of time.
That said: the majority of development is now complete, and I'm currently working-on increasing stability during auto-package upgrades. So, sherpa will work beautifully on a fresh (or new) system, but can experience issues when individual application updates are released.
Click here for installable packages
Installation
SSH into your NAS, and install the QPKG manually at the command-prompt:
Code: Select all
curl -skL https://tinyurl.com/get-sherpa > /share/Public/sherpa.qpkg;
sudo sh /share/Public/sherpa.qpkg
Usage
At the command-prompt, run:
... and follow the help from there.
If 'sudo' is unavailable in your version of QTS, SSH into your NAS as the 'admin' user instead, and run:
Checkout the wiki for more information:
https://github.com/OneCDOnly/sherpa/wiki
Last edited by
OneCD on Sat Apr 06, 2024 4:03 am, edited 64 times in total.
dirkonline
Easy as a breeze
Posts: 305 Joined: Mon Oct 18, 2010 4:08 pm
Post
by dirkonline » Sat May 06, 2017 4:28 pm
I will keep my eyes open and read along for now. This is so exciting. Thanks for the great work OneCD!
Xmantium
Been there, done that
Posts: 579 Joined: Fri Sep 03, 2010 3:55 am
Location: Manchester, England
Post
by Xmantium » Sun May 07, 2017 2:38 am
Are you able to put this on GitHub so others can input into it?
Any chance Sonarr can be added? Its way better than Sickrage, try and see for yourself
nzb-multi installer is a confusing name, think its best to put "Sabnzbd+ and Addons Installer" would be a better fit
OneCD
Guru
Posts: 12146 Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"
Post
by OneCD » Sun May 07, 2017 3:05 am
Xmantium wrote: Are you able to put this on GitHub so others can input into it?
Already there:
https://github.com/OneCDOnly/sherpa
Xmantium wrote: Any chance Sonarr can be added? Its way better than Sickrage, try and see for yourself
Ah, personally not a fan of Mono - or anything that runs .NET code. So, there's not much chance of that happening.
Xmantium wrote: nzb-multi installer is a confusing name, think its best to put "Sabnzbd+ and Addons Installer" would be a better fit
I agree it's confusing - but I'm hoping to add NZBGet in there at some point - so can't call it 'SABnzbd' anything.
edit: Decided to call it '
sherpa '. Because it ventures first and guides other apps through the dangerous wilderness. Y'know, something terribly meaningful like that.
The Mask
Starting out
Posts: 48 Joined: Sun Jan 10, 2016 2:18 am
Post
by The Mask » Sun May 07, 2017 9:41 pm
Hi OneCD,
I ran your sherpa script. It updated Sabnzbd and installed SR and CP. I encountered one issue.
Issue: I ran the command wget
https://goo.gl/Qot9QK -qO sherpa.tar.gz && tar -zxvf sherpa.tar.gz but got an error
wget: not an http or ftp url:
https://goo.gl/Qot9QK
I solved this by downloading it manually.
For the rest it ran smoothly, no problems at all.
Thanks for this script and the Qpkg packages.
OneCD
Guru
Posts: 12146 Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"
Post
by OneCD » Mon May 08, 2017 2:22 am
Hi and thanks for the feedback.
If you're able, can you try these two and let me know if they work for you?
Code: Select all
/usr/bin/wget https://goo.gl/Qot9QK -O sherpa.tar.gz
Code: Select all
wget http://goo.gl/Qot9QK -O sherpa.tar.gz
scorche
New here
Posts: 9 Joined: Mon Apr 01, 2013 8:56 am
Post
by scorche » Mon May 08, 2017 3:10 am
Thanks for your work on greatly simplifying the headache with keeping this stuff maintained!
I recently upgraded my QNAP and thought I'd try your script to get my SABNZBd updated to 2.x. However, the script fails at the pip modules. Below is the debug log:
Code: Select all
# ./SABnzbdplus --debug
[ dbug ] (>>) <Init>
[ dbug ] (II) ====================================================================
[ dbug ] (**) SCRIPT: started: Sun May 7 12:04:22 MST 2017
[ dbug ] (**) SCRIPT: file: sherpa.sh
[ dbug ] (**) SCRIPT: version: 2017.05.07b
[ dbug ] (**) SCRIPT: launched as: ./SABnzbdplus
[ dbug ] (**) SCRIPT: target app: SABnzbdplus
[ dbug ] (II) --------------------------------------------------------------------
[ dbug ] (II) Markers: (**) detected, (II) information, (WW) warning, (EE) error,
[ dbug ] (II) (--) done, (>>) function entry, (<<) function exit,
[ dbug ] (II) (vv) variable name & value, ($1) positional argument value.
[ dbug ] (II) --------------------------------------------------------------------
[ dbug ] (**) NAS: model: TS-869 Pro
[ dbug ] (**) NAS: firmware version: 4.3.3
[ dbug ] (**) NAS: firmware build: 20170413
[ dbug ] (**) NAS: kernel: 3.4.6 x86_64
[ dbug ] (**) NAS: OS uptime: 30 min
[ dbug ] (**) NAS: system load: 1 min=0.12, 5 min=0.28, 15 min=0.39
[ dbug ] (**) NAS: default volume: /share/CACHEDEV1_DATA
[ dbug ] (**) NAS: $PATH: /bin:/sbin:/usr/bin:/usr/sbin:/usr/bin/X11
[ dbug ] (**) NAS: /opt: /share/CACHEDEV1_DATA/.qpkg/Entware-ng
[ dbug ] (**) NAS: /share/Download: CACHEDEV1_DATA/Download
[ dbug ] (II) --------------------------------------------------------------------
[ dbug ] (**) QPKG: 'QSabNZBdPlus': not installed
[ dbug ] (**) QPKG: 'Entware-ng': installed
[ dbug ] (**) QPKG: 'Entware-3x': not installed
[ dbug ] (II) found a suitable ARCH for Clinton's QPKG (x64)
[ dbug ] (II) found a suitable ARCH for Stephane's QPKG (x64)
[ dbug ] (**) QPKG: 'Entware-ng': installed
[ dbug ] (II) found a suitable Entware package (Entware-ng)
[ dbug ] (<<) <Init> [0]
[ dbug ] (>>) <PauseSabs>
[ dbug ] (**) QPKG: 'SABnzbdplus': installed
[ dbug ] (--) paused existing SABnzbd queue
[ dbug ] (<<) <PauseSabs> [0]
[ dbug ] (>>) <DownloadQPKGs>
[ dbug ] (**) QPKG: 'Entware-ng': installed
[ dbug ] (**) QPKG: 'Par2cmdline-MT': installed
[ dbug ] (>>) <DownloadQPKG>
[ dbug ] (II) existing QPKG checksum correct (SABnzbdplus_170131.qpkg)
[ dbug ] (<<) <DownloadQPKG> [0]
[ dbug ] (<<) <DownloadQPKGs> [0]
[ dbug ] (>>) <RemovePackageInstallers>
[ dbug ] (**) QPKG: 'Optware': not installed [250]
[ dbug ] (<<) <RemovePackageInstallers> [0]
[ dbug ] (>>) <InstallEntware>
[ dbug ] (**) QPKG: 'Entware-ng': installed
[ dbug ] (II) patch: do the "opt shuffle" - already done
[ dbug ] (<<) <InstallEntware> [0]
[ dbug ] (>>) <InstallOther>
[ dbug ] (**) QPKG: 'Par2cmdline-MT': installed
[ dbug ] (>>) <InstallFakeQPKGs>
[ dbug ] (**) QPKG: 'Python': installed
[ dbug ] (**) QPKG: 'git': installed
[ dbug ] (vv) fakeQPKG_python [false]
[ dbug ] (vv) fakebin_python [false]
[ dbug ] (vv) fakeQPKG_git [false]
[ dbug ] (vv) fakebin_git [false]
[ dbug ] (<<) <InstallFakeQPKGs> [0]
[ dbug ] (>>) <InstallIPKs>
[ dbug ] (>>) <UpdateEntware>
[ proc ] updating 'Entware' ...
[ done ] updated 'Entware'
[ dbug ] (<<) <UpdateEntware> [0]
[ dbug ] (--) reloaded environment
[ proc ] downloading & installing IPKs (various) ...
[ done ] downloaded & installed IPKs (various)
[ proc ] downloading & installing IPK (python-dev) ...
[ done ] downloaded & installed IPK (python-dev)
[ dbug ] (<<) <InstallIPKs> [0]
[ dbug ] (>>) <InstallPIPs>
[ proc ] downloading & installing (pip modules) ...
[ fail ] Download & install failed (pip modules) [1]
[ dbug ] (<<) <InstallPIPs> [17]
[ dbug ] (<<) <InstallOther> [17]
[ dbug ] (>>) <Cleanup>
[ dbug ] (**) QPKG: 'SABnzbdplus': installed
[ dbug ] (--) resumed existing SABnzbd queue
[ dbug ] (<<) <Cleanup> [17]
[ dbug ] (>>) <DisplayResult>
[ fail ] SABnzbdplus install failed! :S [17]
[ dbug ] (**) SCRIPT: finished: Sun May 7 12:04:49 MST 2017
[ dbug ] (**) SCRIPT: elapsed time: 00h:00m:27s
[ dbug ] (II) ====================================================================
[ dbug ] (<<) <DisplayResult> [17]
OneCD
Guru
Posts: 12146 Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"
Post
by OneCD » Mon May 08, 2017 3:23 am
scorche wrote: However, the script fails at the pip modules.
Okiedoke, there's a separate log for pip modules. You can view this with:
Code: Select all
cat /share/Public/sherpa.tmp/pip_modules.install.log
Can you please post it back here?
scorche
New here
Posts: 9 Joined: Mon Apr 01, 2013 8:56 am
Post
by scorche » Mon May 08, 2017 3:26 am
Looks like I need to get CXXABI_1.3.9 on my QNAP...
Code: Select all
Requirement already up-to-date: pip in /share/CACHEDEV1_DATA/.qpkg/Entware-ng/lib/python2.7/site-packages
Requirement already up-to-date: setuptools in /share/CACHEDEV1_DATA/.qpkg/Entware-ng/lib/python2.7/site-packages
Requirement already up-to-date: packaging>=16.8 in /share/CACHEDEV1_DATA/.qpkg/Entware-ng/lib/python2.7/site-packages (from setuptools)
Requirement already up-to-date: appdirs>=1.4.0 in /share/CACHEDEV1_DATA/.qpkg/Entware-ng/lib/python2.7/site-packages (from setuptools)
Requirement already up-to-date: six>=1.6.0 in /share/CACHEDEV1_DATA/.qpkg/Entware-ng/lib/python2.7/site-packages (from setuptools)
Requirement already up-to-date: pyparsing in /share/CACHEDEV1_DATA/.qpkg/Entware-ng/lib/python2.7/site-packages (from packaging>=16.8->setuptools)
Collecting sabyenc
Using cached sabyenc-3.0.2.tar.gz
Collecting cheetah
Using cached Cheetah-2.4.4.tar.gz
Collecting Markdown>=2.0.1 (from cheetah)
Using cached Markdown-2.6.8.tar.gz
Installing collected packages: sabyenc, Markdown, cheetah
Running setup.py install for sabyenc: started
Running setup.py install for sabyenc: finished with status 'error'
Complete output from command /opt/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/share/CACHEDEV1_DATA/.qpkg/Entware-ng/tmp/pip-build-qbGM6r/sabyenc/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('
', '
');f.close();exec(compile(code, __file__, 'exec'))" install --record /opt/tmp/pip-6qg2mo-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
building 'sabyenc' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
x86_64-openwrt-linux-gnu-gcc -fno-strict-aliasing -O2 -pipe -fomit-frame-pointer -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -DNDEBUG -fno-inline -DNDEBUG -O2 -pipe -fomit-frame-pointer -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -fPIC -I/opt/include/python2.7 -c src/sabyenc.c -o build/temp.linux-x86_64-2.7/src/sabyenc.o -O2
x86_64-openwrt-linux-gnu-gcc: /opt/lib/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by x86_64-openwrt-linux-gnu-gcc)
error: command 'x86_64-openwrt-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/opt/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/share/CACHEDEV1_DATA/.qpkg/Entware-ng/tmp/pip-build-qbGM6r/sabyenc/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('
', '
');f.close();exec(compile(code, __file__, 'exec'))" install --record /opt/tmp/pip-6qg2mo-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /share/CACHEDEV1_DATA/.qpkg/Entware-ng/tmp/pip-build-qbGM6r/sabyenc/
result=[1]
OneCD
Guru
Posts: 12146 Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"
Post
by OneCD » Mon May 08, 2017 3:35 am
Hmmm... are you able to use Entware-3x instead of Entware-ng?
If so, please uninstall Entware-ng via the QTS App Center and re-run sherpa. It will install Entware-3x itself.
If not, please uninstall Entware-ng and reinstall it manually. Then re-run sherpa.
scorche
New here
Posts: 9 Joined: Mon Apr 01, 2013 8:56 am
Post
by scorche » Mon May 08, 2017 3:56 am
Looks good! Thanks!
The Mask
Starting out
Posts: 48 Joined: Sun Jan 10, 2016 2:18 am
Post
by The Mask » Mon May 08, 2017 4:06 am
OneCD wrote:
If you're able, can you try these two and let me know if they work for you?
Code: Select all
/usr/bin/wget https://goo.gl/Qot9QK -O sherpa.tar.gz
Code: Select all
wget http://goo.gl/Qot9QK -O sherpa.tar.gz
Only the first one works for me, the other one is giving the following error:
Connecting to goo.gl (216.58.212.206:80)
wget: not an http or ftp url:
https://github.com/OneCDOnly/sherpa/blo ... z?raw=true
OneCD
Guru
Posts: 12146 Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"
Post
by OneCD » Mon May 08, 2017 4:29 am
scorche wrote: Looks good! Thanks!
So, which one did you end up using? 3x or ng?
OneCD
Guru
Posts: 12146 Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"
Post
by OneCD » Mon May 08, 2017 4:32 am
Thanks for checking that. I'll change the download link code to specify the full path to the wget binary.
I think the second one failed on your NAS as it was trying to use BusyBox wget which doesn't support HTTPS.
scorche
New here
Posts: 9 Joined: Mon Apr 01, 2013 8:56 am
Post
by scorche » Mon May 08, 2017 5:00 am
OneCD wrote:
So, which one did you end up using? 3x or ng?
I just removed ng and let the script install 3x. I figured I would address any issues that popped up separately if there was a reason why I needed ng for something else.