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

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
Guru
Posts: 12141
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

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

Post by OneCD »

Hey Dirk. :)
dirkonline wrote: Sun Sep 19, 2021 3:00 pm Should I do something about the wrong pip install I did or do you think I can just leave it lying around unused ?
No, I don't think you did anything wrong, you were just unlucky enough to catch the first sherpa bug since SAB 3.4.0 was released, and before I had made the necessary adjustments. ;)

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

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

Post by dirkonline »

OneCD wrote: Sun Sep 19, 2021 4:18 pm Hey Dirk. :)
dirkonline wrote: Sun Sep 19, 2021 3:00 pm Should I do something about the wrong pip install I did or do you think I can just leave it lying around unused ?
No, I don't think you did anything wrong, you were just unlucky enough to catch the first sherpa bug since SAB 3.4.0 was released, and before I had made the necessary adjustments. ;)
My timing is impeccable :)
macr6
New here
Posts: 2
Joined: Mon Sep 20, 2021 5:36 am

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

Post by macr6 »

Hey @onecd, I'm having a similar as dirkonline. I have a qnap with Sab. it won't start.

I tried the advice you gave, but get the below errors (includes trying to start sab. Says it's running but it's not.

Code: Select all

[/var/log] # pip3 install rebulk babelfish python-dateutil
Requirement already satisfied: rebulk in /share/CACHEDEV1_DATA/.qpkg/Entware/lib/python3.9/site-packages (3.0.1)
Requirement already satisfied: babelfish in /share/CACHEDEV1_DATA/.qpkg/Entware/lib/python3.9/site-packages (0.6.0)
Requirement already satisfied: python-dateutil in /share/CACHEDEV1_DATA/.qpkg/Entware/lib/python3.9/site-packages (2.8.2)
Requirement already satisfied: six>=1.5 in /share/CACHEDEV1_DATA/.qpkg/Entware/lib/python3.9/site-packages (from python-dateutil) (1.16.0)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
[/var/log] # sherpa start sab
sherpa 210919 • a mini-package-manager for QNAP NAS

done: downloaded & upgraded 5 IPKGs                         
done: installed 2 PIP groups                                            
note: ignoring request to start 'SABnzbd' as it's already started        
                                         
[/var/log] # 
The log of sab

Code: Select all

[/var/log] # cat SABnzbd.log 
>>>>>>>>>> datetime:'Sun Sep 19 17:32:39 EDT 2021',request:'start',QPKG:'201130',app:'3.4.0' <<<<<<<<<<
daemon: NOT active
file (/opt/bin/git): exists
update 'SABnzbd' from remote repository: OK
current git branch: master
file (/opt/bin/python3): exists
load UI ports from application: OK
start daemon: failed!
= ExecuteAndLog()
output: "Error processing line 1 of /opt/lib/python3.9/site-packages/zc.lockfile-2.0-py3.7-nspkg.pth:

  Traceback (most recent call last):
    File "/opt/lib/python3.9/site.py", line 169, in addpackage
    File "<string>", line 1, in <module>
    File "/opt/lib/python3.9/importlib/util.py", line 2, in <module>
    File "/opt/lib/python3.9/importlib/abc.py", line 17, in <module>
    File "/opt/lib/python3.9/typing.py", line 22, in <module>
    File "/opt/lib/python3.9/collections/abc.py", line 3, in <module>
  ImportError: cannot import name '_CallableGenericAlias' from 'collections.abc' (/opt/lib/python3.9/_collections_abc.pyc)

Remainder of file ignored
Traceback (most recent call last):
  File "/share/CACHEDEV1_DATA/.qpkg/SABnzbd/SABnzbd/SABnzbd.py", line 26, in <module>
    import logging
  File "/opt/lib/python3.9/logging/__init__.py", line 26, in <module>
  File "/opt/lib/python3.9/collections/abc.py", line 3, in <module>
ImportError: cannot import name '_CallableGenericAlias' from 'collections.abc' (/opt/lib/python3.9/_collections_abc.pyc)"
result: [1]
>>>>>>>>>> datetime:'Sun Sep 19 17:33:40 EDT 2021',request:'stop',QPKG:'201130',app:'3.4.0' <<<<<<<<<<
daemon: NOT active
>>>>>>>>>> datetime:'Sun Sep 19 17:33:56 EDT 2021',request:'start',QPKG:'201130',app:'3.4.0' <<<<<<<<<<
daemon: NOT active
file (/opt/bin/git): exists
update 'SABnzbd' from remote repository: OK
current git branch: master
file (/opt/bin/python3): exists
load UI ports from application: OK
start daemon: failed!
= ExecuteAndLog()
output: "Error processing line 1 of /opt/lib/python3.9/site-packages/zc.lockfile-2.0-py3.7-nspkg.pth:

  Traceback (most recent call last):
    File "/opt/lib/python3.9/site.py", line 169, in addpackage
    File "<string>", line 1, in <module>
    File "/opt/lib/python3.9/importlib/util.py", line 2, in <module>
    File "/opt/lib/python3.9/importlib/abc.py", line 17, in <module>
    File "/opt/lib/python3.9/typing.py", line 22, in <module>
    File "/opt/lib/python3.9/collections/abc.py", line 3, in <module>
  ImportError: cannot import name '_CallableGenericAlias' from 'collections.abc' (/opt/lib/python3.9/_collections_abc.pyc)

Remainder of file ignored
Traceback (most recent call last):
  File "/share/CACHEDEV1_DATA/.qpkg/SABnzbd/SABnzbd/SABnzbd.py", line 26, in <module>
    import logging
  File "/opt/lib/python3.9/logging/__init__.py", line 26, in <module>
  File "/opt/lib/python3.9/collections/abc.py", line 3, in <module>
ImportError: cannot import name '_CallableGenericAlias' from 'collections.abc' (/opt/lib/python3.9/_collections_abc.pyc)"
result: [1]
[/var/log] # 
macr6
New here
Posts: 2
Joined: Mon Sep 20, 2021 5:36 am

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

Post by macr6 »

So sab showed running in the app. I quit it there, went back to the console and ran sherpa start sab and it started up. However, do I have to do this everytime?
User avatar
OneCD
Guru
Posts: 12141
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

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

Post by OneCD »

Hi and welcome to the forum. :)
macr6 wrote: Mon Sep 20, 2021 5:48 am So sab showed running in the app. I quit it there, went back to the console and ran sherpa start sab and it started up. However, do I have to do this everytime?
I hope not.

I've not seen those errors you experienced. It seems there are many broken states the Python modules can get themselves into, and I can't account for them all.

So, I'm guessing this was a one-off. Please post back if it happens again. :geek:

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
User avatar
Knuspar
Know my way around
Posts: 155
Joined: Thu Aug 25, 2011 5:02 am
Location: Denmark
Contact:

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

Post by Knuspar »

dirkonline wrote: Sun Sep 19, 2021 3:00 pm
OneCD wrote: Sun Sep 19, 2021 1:37 am HI guys, looks like there are a few more PIP packages required on other arches. ;)

I've just updated the management script to install these, but you can install them manually too:

Code: Select all

pip3 install rebulk babelfish python-dateutil
... then restart SAB:

Code: Select all

/etc/init.d/sabnzbd3.sh restart
Hi OneCD :)
Thanks a bunch! SAB is back up and running again. Should I do something about the wrong pip install I did or do you think I can just leave it lying around unused ?
Unfortunatly it dident work here :-(

Code: Select all

[/share/Public] # pip3 install rebulk babelfish python-dateutil                                                                                                                             
Traceback (most recent call last):                                                                                                                                                          
  File "/opt/bin/pip3", line 5, in <module>                                                                                                                                                 
    from pip._internal.cli.main import main                                                                                                                                                 
  File "/opt/lib/python3.9/site-packages/pip/_internal/cli/main.py", line 8, in <module>                                                                                                    
    from pip._internal.cli.autocompletion import autocomplete                                                                                                                               
  File "/opt/lib/python3.9/site-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>                                                                                          
    from pip._internal.cli.main_parser import create_main_parser                                                                                                                            
  File "/opt/lib/python3.9/site-packages/pip/_internal/cli/main_parser.py", line 7, in <module>                                                                                             
    from pip._internal.cli import cmdoptions                                                                                                                                                
  File "/opt/lib/python3.9/site-packages/pip/_internal/cli/cmdoptions.py", line 22, in <module>                                                                                             
    from pip._internal.cli.progress_bars import BAR_TYPES                                                                                                                                   
  File "/opt/lib/python3.9/site-packages/pip/_internal/cli/progress_bars.py", line 9, in <module>                                                                                           
    from pip._internal.utils.logging import get_indentation                                                                                                                                 
  File "/opt/lib/python3.9/site-packages/pip/_internal/utils/logging.py", line 14, in <module>                                                                                              
    from pip._internal.utils.misc import ensure_dir                                                                                                                                         
  File "/opt/lib/python3.9/site-packages/pip/_internal/utils/misc.py", line 29, in <module>                                                                                                 
    from pip._internal.locations import get_major_minor_version, site_packages, user_site                                                                                                   
  File "/opt/lib/python3.9/site-packages/pip/_internal/locations/__init__.py", line 9, in <module>                                                                                          
  File "/opt/lib/python3.9/site-packages/pip/_internal/locations/_sysconfig.py", line 8, in <module>                                                                                        
ImportError: cannot import name 'InvalidSchemeCombination' from 'pip._internal.exceptions' (/opt/lib/python3.9/site-packages/pip/_internal/exceptions.py)        

Code: Select all

[/share/Public] # sherpa start sab                                                                                                                                                          
sherpa 210919 • a mini-package-manager for QNAP NAS
                                                                                                                                                                                            
fail: Download & install 'Python3' base modules failed ! result_code: [1] 
fail: Download & install 'Python3' specific modules failed ! result_code: [1] 
fail: Installed 2 PIP groups failed                                    
fail: 'SABnzbd' service operation failed. Check (/var/log/SABnzbd.log) for more information 
done: started 1 dependent QPKG                                            

[/share/Public] #

Edit:
Rebooted the NAS
Did a Sherpa clean, reinstalled entware and did a sherpa start sab again :D And it works fine now :-)
Currently: TS-653D
Retired: TS-419+
vasarolli
Getting the hang of things
Posts: 59
Joined: Sun Dec 29, 2013 11:04 pm

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

Post by vasarolli »

Hi,
So sickchill gone, sickgear in, does anyone have a way of simple swapping? Or should sickgear be set up from scratch?
User avatar
OneCD
Guru
Posts: 12141
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

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

Post by OneCD »

vasarolli wrote: Tue Sep 21, 2021 5:38 pm So sickchill gone, sickgear in, does anyone have a way of simple swapping? Or should sickgear be set up from scratch?
Must admit: I've not looked at this yet (my brain is mostly buried in an unrelated Java project). Maybe someone else has tried this?

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

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

Post by dirkonline »

OneCD wrote: Wed Sep 22, 2021 4:18 am
vasarolli wrote: Tue Sep 21, 2021 5:38 pm So sickchill gone, sickgear in, does anyone have a way of simple swapping? Or should sickgear be set up from scratch?
Must admit: I've not looked at this yet (my brain is mostly buried in an unrelated Java project). Maybe someone else has tried this?
I am afraid no, I have zero experience with a swap between these two
jonstass
Starting out
Posts: 19
Joined: Tue May 21, 2013 4:37 am

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

Post by jonstass »

Hi ,

please could you help?

I seem to be having a real problem getting Sherpa to work on my Ts-869L with firmware 4.3.4.1652.
I've installed the QPKG from GIT (https://github.com/OneCDOnly/sherpa/blo ... 0418b.qpkg) , but when I try to then install something it doesn't seem to do anything, always complaining that Grep is missing:

Code: Select all

sherpa install LazyLibrarian
sherpa 210919 • a mini-package-manager for QNAP NAS

eror: A required NAS system file is missing (/opt/bin/grep): aborting ...
done: installed 1 dependent QPKG
I think that Entware is not installed properly, because
  • echo $PATH gives: /bin:/sbin:/usr/bin:/usr/sbin:/usr/bin/X11:/usr/local/sbin:/usr/local/bin
    which I believe should include reference to /opt/bin/ at least
  • there is no file grep in the path above
  • Opkg is a 0 bytes file, which doesn't seem right
I have tried :

Code: Select all

 sherpa reinstall Entware
It seems to go through the motions but nothing changes.

Here is the last session log file:
https://pastebin.com/0HTtU3gT

Thank you.
User avatar
OneCD
Guru
Posts: 12141
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

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

Post by OneCD »

Hi and welcome to the forum. :)

Hmm, can you try installing Entware on its own? Let's see if there are any error messages generated:

Code: Select all

cd /share/Public
curl https://raw.githubusercontent.com/OneCDOnly/sherpa/main/QPKGs/Entware/Entware_1.03std.qpkg -o Entware.qpkg
sh Entware.qpkg

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
jonstass
Starting out
Posts: 19
Joined: Tue May 21, 2013 4:37 am

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

Post by jonstass »

Hi OneCD ,

Thank you for your assistance. I removed the Entware-std package using the app centre then followed your suggestion. There appears to be a couple of errors during installation

/bin/cp: cannot stat `/opt/etc/shells.1': No such file or directory
and
/etc/init.d/Entware.sh: line 32: /opt/etc/init.d/rc.unslung: No such file or directory

Here's the full output from those commands:

Code: Select all

[~] # cd /share/Public
[/share/Public] # curl https://raw.githubusercontent.com/OneCDOnly/sherpa/main/QPKGs/Entware/Entware_1.03std.qpkg -o Entware.qpkg
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 52548  100 52548    0     0   142k      0 --:--:-- --:--:-- --:--:--  147k
[/share/Public] # sh Entware.qpkg
Install QNAP package on TS-NAS...
15+1 records in
15+1 records out
49283 bytes (48.1KB) copied, 0.000111 seconds, 423.4MB/s
./
./built_info
./qinstall.sh
./package_routines
./qpkg.cfg
1+1 records in
1+1 records out
28803 bytes (28.1KB) copied, 0.000112 seconds, 245.3MB/s
26+0 records in
26+0 records out
26624 bytes (26.0KB) copied, 0.000301 seconds, 84.4MB/s
Firmware check is fine.
Sym-link /opt ...
Info: Opkg package manager deployment...
Info: Basic packages installation...
/bin/cp: cannot stat `/opt/etc/shells.1': No such file or directory
Link service start/stop script: Entware.sh
Set QPKG information in /etc/config/qpkg.conf
[App Center] Installed Entware-std 1.03 in /share/CACHEDEV1_DATA/.qpkg/Entware.
Enable Entware/opkg
/etc/init.d/Entware.sh: line 32: /opt/etc/init.d/rc.unslung: No such file or directory
[App Center] Enabled Entware-std.
[/share/Public] #
User avatar
OneCD
Guru
Posts: 12141
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

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

Post by OneCD »

jonstass wrote: Fri Sep 24, 2021 5:19 pm

Code: Select all

/bin/cp: cannot stat `/opt/etc/shells.1': No such file or directory
and
/etc/init.d/Entware.sh: line 32: /opt/etc/init.d/rc.unslung: No such file or directory
Yep, it's safe-to-say I have no-idea why those errors are occurring. :S
zyxmon wrote:
@zyxmon, have you seen this before? Do you have any suggestions?

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
jonstass
Starting out
Posts: 19
Joined: Tue May 21, 2013 4:37 am

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

Post by jonstass »

Yay, good to be first at something!
Appreciate you looking for me.
User avatar
OneCD
Guru
Posts: 12141
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

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

Post by OneCD »

BTW: what’s in your /opt directory?

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
Post Reply

Return to “Community Apps”