[QPKG] sherpa mini-package-manager (CLI)

This is the best place for community developers to publish their genius work. Your Apps enrich the QNAP Turbo NAS.
Post Reply
User avatar
OneCD
Ask me anything
Posts: 8068
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

[QPKG] sherpa mini-package-manager (CLI)

Post by OneCD » Sat May 06, 2017 2:05 pm

Image

The world's first multiple-action CLI package-manager! :D

Description

A mini-package-manager to install various media-management apps into QNAP NAS.

Before you begin

This is a command-line package manager. If you're unfamiliar with SSH, then please look at some of the fine GUI-only packaged alternatives available from the Qnapclub Store instead. You'll have a much better user-experience.

Package management via sherpa provides extra features like easy application backup and upgrading, and can be automated via cron.

Applications available
... and the following apps will be automatically installed as required:
  • Entware (standard version)
  • Python v3.8.5
  • Par2 or Par2cmdline-MT, except on ARMv5. This will use the single-thread par2 from Entware instead.

Requirements
  • Any model QNAP NAS with at-least 1GB RAM and running QTS 4.0 or-later.
  • Strongly suggest avoiding QTS 4.5.1.1456 through QTS 4.5.1.1461 as these don't permit the running of unsigned 3rd-party packages and will stop all sherpa QPKGs from working. If you're using QTS 4.5.1, please ensure it's at least 4.5.1.1465
Usage
  1. Install the sherpa QPKG, available from GitHub.
  2. SSH into your NAS as the 'admin' user,
  3. Then at the command prompt, run:

    Code: Select all

    sherpa
    ... and follow the help from there. ;)
Checkout the wiki for more information: https://github.com/OneCDOnly/sherpa/wiki
Last edited by OneCD on Wed Nov 06, 2019 6:31 am, edited 63 times in total.

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

User avatar
dirkonline
Easy as a breeze
Posts: 250
Joined: Mon Oct 18, 2010 4:08 pm

Re: [SCRIPT] nzb-multi-installer

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!

User avatar
Xmantium
Been there, done that
Posts: 560
Joined: Fri Sep 03, 2010 3:55 am
Location: Manchester, England

Re: [SCRIPT] nzb-multi-installer

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

User avatar
OneCD
Ask me anything
Posts: 8068
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] nzb-multi-installer

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. :wink:

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

The Mask
Starting out
Posts: 37
Joined: Sun Jan 10, 2016 2:18 am

Re: [SCRIPT] sherpa

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.

User avatar
OneCD
Ask me anything
Posts: 8068
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa

Post by OneCD » Mon May 08, 2017 2:22 am

Hi and thanks for the feedback. :)
The Mask wrote: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
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

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

scorche
New here
Posts: 9
Joined: Mon Apr 01, 2013 8:56 am

Re: [SCRIPT] sherpa

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]

User avatar
OneCD
Ask me anything
Posts: 8068
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa

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?

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

scorche
New here
Posts: 9
Joined: Mon Apr 01, 2013 8:56 am

Re: [SCRIPT] sherpa

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]

User avatar
OneCD
Ask me anything
Posts: 8068
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa

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.

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

scorche
New here
Posts: 9
Joined: Mon Apr 01, 2013 8:56 am

Re: [SCRIPT] sherpa

Post by scorche » Mon May 08, 2017 3:56 am

Looks good! Thanks!

The Mask
Starting out
Posts: 37
Joined: Sun Jan 10, 2016 2:18 am

Re: [SCRIPT] sherpa

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

User avatar
OneCD
Ask me anything
Posts: 8068
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa

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? :geek:

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

User avatar
OneCD
Ask me anything
Posts: 8068
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa

Post by OneCD » Mon May 08, 2017 4:32 am

The Mask wrote: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

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. ;)

Code: Select all

which wget; echo; wget -V

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

scorche
New here
Posts: 9
Joined: Mon Apr 01, 2013 8:56 am

Re: [SCRIPT] sherpa

Post by scorche » Mon May 08, 2017 5:00 am

OneCD wrote:So, which one did you end up using? 3x or ng? :geek:


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.

Post Reply

Return to “Community Apps”