[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
potestus
Getting the hang of things
Posts: 98
Joined: Tue May 10, 2011 7:30 pm

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

Post by potestus » Fri Jan 29, 2021 11:16 am

OK that worked thanks.. what happened?

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

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

Post by OneCD » Fri Jan 29, 2021 11:19 am

Mea culpa. I recently found QTS 4.5.1 includes GNU 'less' and thought maybe I had just not noticed it in the the older QTS versions. So I included a startup test for it, which has promptly shown it's NOT in the older firmwares. :oops:

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

potestus
Getting the hang of things
Posts: 98
Joined: Tue May 10, 2011 7:30 pm

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

Post by potestus » Fri Jan 29, 2021 11:22 am

Thank again.. I still install from the github because downloads from the club always fail?

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

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

Post by OneCD » Fri Jan 29, 2021 11:23 am

Same here. Qnapclub repo still appears to be broken, and I can't get hold of the site admin. Oh-well. :(

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

L3rd
Know my way around
Posts: 164
Joined: Thu Sep 20, 2007 8:11 pm

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

Post by L3rd » Wed Feb 03, 2021 5:51 am

I'm getting a strange issue with sherpa, maybe someone can help:

Code: Select all

[~] # sherpa status
proc: init ... /share/HDA_DATA/.qpkg/sherpa/cache/compiled.objects: line 3935: ${#array[@]:-}: bad substitution
/share/HDA_DATA/.qpkg/sherpa/cache/compiled.objects: line 3391: ${#_obj_args_unknown_array_[@]:-}: bad substitution
/share/HDA_DATA/.qpkg/sherpa/cache/compiled.objects: line 6130: ${#_obj_qpkgs_torebuild_array_[@]:-}: bad substitution
/share/HDA_DATA/.qpkg/sherpa/cache/compiled.objects: line 3395: ${#_obj_args_unknown_array_[@]:-}: bad substitution
[~] # 
All sherpa commands are giving the same results.

I already tried to reinstall sherpa, but the issue remains.

I face the issue on a TS-212p
Last edited by L3rd on Wed Feb 03, 2021 5:57 am, edited 1 time in total.
NAS:
QNAP TVS-682 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .FW: 4.5.2.xxxx
QNAP TS-351 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .FW: 4.5.2.xxxx
QNAP TS-509 Pro . . [Xeon L5408(SLBBT)] . . . . . . . . . . . . . . . FW: 4.2.6 Build 20200821 (2020-09-02) (TS-809 Pro)
QNAP TS-212P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FW: 4.3.3.1432
QNAP TS-109 Pro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FW: 3.3.3 build 1003 (2014-10-09)
QNAP QG-103N QGenie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FW: 3.2.3 (2018/08/10)

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

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

Post by OneCD » Wed Feb 03, 2021 5:56 am

L3rd wrote:
Wed Feb 03, 2021 5:51 am
I'm getting a strange issue with sherpa, maybe someone can help:

Code: Select all

[~] # sherpa status
proc: init ... /share/HDA_DATA/.qpkg/sherpa/cache/compiled.objects: line 3935: ${#array[@]:-}: bad substitution
/share/HDA_DATA/.qpkg/sherpa/cache/compiled.objects: line 3391: ${#_obj_args_unknown_array_[@]:-}: bad substitution
/share/HDA_DATA/.qpkg/sherpa/cache/compiled.objects: line 6130: ${#_obj_qpkgs_torebuild_array_[@]:-}: bad substitution
/share/HDA_DATA/.qpkg/sherpa/cache/compiled.objects: line 3395: ${#_obj_args_unknown_array_[@]:-}: bad substitution
[~] # 
Hmm, not seeing that here. :'

Can you please clean your cached files and check again?

Code: Select all

sherpa clean
sherpa status

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

L3rd
Know my way around
Posts: 164
Joined: Thu Sep 20, 2007 8:11 pm

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

Post by L3rd » Wed Feb 03, 2021 6:00 am

The cache is empty,I do not have anyissue on my other qnap.
Only on this model and it wasworking last time I used (december 2020).

What else I can try?
OneCD wrote:
Wed Feb 03, 2021 5:56 am
L3rd wrote:
Wed Feb 03, 2021 5:51 am
I'm getting a strange issue with sherpa, maybe someone can help:

Code: Select all

[~] # sherpa status
proc: init ... /share/HDA_DATA/.qpkg/sherpa/cache/compiled.objects: line 3935: ${#array[@]:-}: bad substitution
/share/HDA_DATA/.qpkg/sherpa/cache/compiled.objects: line 3391: ${#_obj_args_unknown_array_[@]:-}: bad substitution
/share/HDA_DATA/.qpkg/sherpa/cache/compiled.objects: line 6130: ${#_obj_qpkgs_torebuild_array_[@]:-}: bad substitution
/share/HDA_DATA/.qpkg/sherpa/cache/compiled.objects: line 3395: ${#_obj_args_unknown_array_[@]:-}: bad substitution
[~] # 
Hmm, not seeing that here. :'

Can you please clean your cached files and check again?

Code: Select all

sherpa clean
sherpa status
NAS:
QNAP TVS-682 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .FW: 4.5.2.xxxx
QNAP TS-351 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .FW: 4.5.2.xxxx
QNAP TS-509 Pro . . [Xeon L5408(SLBBT)] . . . . . . . . . . . . . . . FW: 4.2.6 Build 20200821 (2020-09-02) (TS-809 Pro)
QNAP TS-212P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FW: 4.3.3.1432
QNAP TS-109 Pro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FW: 3.3.3 build 1003 (2014-10-09)
QNAP QG-103N QGenie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FW: 3.2.3 (2018/08/10)

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

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

Post by OneCD » Wed Feb 03, 2021 6:02 am

L3rd wrote:
Wed Feb 03, 2021 6:00 am
The cache is empty,I do not have anyissue on my other qnap.
Only on this model and it wasworking last time I used (december 2020).
Let's check your BASH:

Code: Select all

type -a bash
bash --version

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

L3rd
Know my way around
Posts: 164
Joined: Thu Sep 20, 2007 8:11 pm

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

Post by L3rd » Wed Feb 03, 2021 6:05 am

Code: Select all

~] # type -a bash
bash is /opt/bin/bash
bash is /bin/bash

Code: Select all

[~] # bash --version
GNU bash, version 5.0.17(1)-release (arm-openwrt-linux-gnu)
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Last edited by L3rd on Wed Feb 03, 2021 6:09 am, edited 1 time in total.
NAS:
QNAP TVS-682 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .FW: 4.5.2.xxxx
QNAP TS-351 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .FW: 4.5.2.xxxx
QNAP TS-509 Pro . . [Xeon L5408(SLBBT)] . . . . . . . . . . . . . . . FW: 4.2.6 Build 20200821 (2020-09-02) (TS-809 Pro)
QNAP TS-212P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FW: 4.3.3.1432
QNAP TS-109 Pro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FW: 3.3.3 build 1003 (2014-10-09)
QNAP QG-103N QGenie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FW: 3.2.3 (2018/08/10)

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

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

Post by OneCD » Wed Feb 03, 2021 6:07 am

L3rd wrote:
Wed Feb 03, 2021 6:05 am
~] # type -a bash
bash is /opt/bin/bash
bash is /bin/bash

[~] # bash --version
GNU bash, version 5.0.17(1)-release (arm-openwrt-linux-gnu)
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
Hmm, that's not right - your NAS appears to be using the Entware 'bash', not the QTS 'bash'. :S

What's your $PATH look like?

Code: Select all

echo $PATH

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

L3rd
Know my way around
Posts: 164
Joined: Thu Sep 20, 2007 8:11 pm

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

Post by L3rd » Wed Feb 03, 2021 6:08 am

Code: Select all

[~] # echo $PATH
/opt/bin:/opt/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/bin/X11:/usr/local/sbin:/usr/local/bin:/Apps/bin:/Apps/sbin:/usr/local/jre/bin
[~] #
NAS:
QNAP TVS-682 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .FW: 4.5.2.xxxx
QNAP TS-351 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .FW: 4.5.2.xxxx
QNAP TS-509 Pro . . [Xeon L5408(SLBBT)] . . . . . . . . . . . . . . . FW: 4.2.6 Build 20200821 (2020-09-02) (TS-809 Pro)
QNAP TS-212P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FW: 4.3.3.1432
QNAP TS-109 Pro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FW: 3.3.3 build 1003 (2014-10-09)
QNAP QG-103N QGenie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FW: 3.2.3 (2018/08/10)

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

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

Post by OneCD » Wed Feb 03, 2021 6:10 am

Did you manually install BASH via Entware? It's not installed by-default:

Code: Select all

opkg info bash

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

L3rd
Know my way around
Posts: 164
Joined: Thu Sep 20, 2007 8:11 pm

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

Post by L3rd » Wed Feb 03, 2021 6:16 am

Yes I installed bash long time ago...

Code: Select all

[~] # opkg info bash
Package: bash
Version: 5.0-4
Depends: libc, libssp, librt, libpthread, libncurses, libreadline
Status: install user installed
Section: utils
Architecture: armv5-3.2
Size: 357924
Filename: bash_5.0-4_armv5-3.2.ipk
Description: Bash is an sh-compatible command language interpreter that executes
 commands read from the standard input or from a file. Bash also
 incorporates useful features from the Korn and C shells (ksh and csh).
Installed-Time: 1592852807
NAS:
QNAP TVS-682 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .FW: 4.5.2.xxxx
QNAP TS-351 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .FW: 4.5.2.xxxx
QNAP TS-509 Pro . . [Xeon L5408(SLBBT)] . . . . . . . . . . . . . . . FW: 4.2.6 Build 20200821 (2020-09-02) (TS-809 Pro)
QNAP TS-212P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FW: 4.3.3.1432
QNAP TS-109 Pro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FW: 3.3.3 build 1003 (2014-10-09)
QNAP QG-103N QGenie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FW: 3.2.3 (2018/08/10)

L3rd
Know my way around
Posts: 164
Joined: Thu Sep 20, 2007 8:11 pm

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

Post by L3rd » Wed Feb 03, 2021 6:17 am

L3rd wrote:
Wed Feb 03, 2021 6:16 am
Yes I installed bash long time ago...

Code: Select all

[~] # opkg info bash
Package: bash
Version: 5.0-4
Depends: libc, libssp, librt, libpthread, libncurses, libreadline
Status: install user installed
Section: utils
Architecture: armv5-3.2
Size: 357924
Filename: bash_5.0-4_armv5-3.2.ipk
Description: Bash is an sh-compatible command language interpreter that executes
 commands read from the standard input or from a file. Bash also
 incorporates useful features from the Korn and C shells (ksh and csh).
Installed-Time: 1592852807
I removed entware bash and sherpa started to work again.

Thnak you!!!
Last edited by L3rd on Wed Feb 03, 2021 6:26 am, edited 1 time in total.
NAS:
QNAP TVS-682 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .FW: 4.5.2.xxxx
QNAP TS-351 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .FW: 4.5.2.xxxx
QNAP TS-509 Pro . . [Xeon L5408(SLBBT)] . . . . . . . . . . . . . . . FW: 4.2.6 Build 20200821 (2020-09-02) (TS-809 Pro)
QNAP TS-212P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FW: 4.3.3.1432
QNAP TS-109 Pro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FW: 3.3.3 build 1003 (2014-10-09)
QNAP QG-103N QGenie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FW: 3.2.3 (2018/08/10)

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

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

Post by OneCD » Wed Feb 03, 2021 6:18 am

No worries. I've just updated the sherpa script to prevent those errors in BASH 5. You'll need to clean your existing installation again so the new management script will be pulled from GitHub:

Code: Select all

sherpa clean
Testing at my end indicates it works fine with BASH 5. Image

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

Post Reply

Return to “Community Apps”