[QPKG] sherpa 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
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: Sat May 01, 2021 4:14 am
zyxmon wrote: Sat May 01, 2021 3:54 am It is probably the problem with libx256 entware package upgrade (from the opkg point of view - it is a downgrade). opkg cannot handle it. See my previous post with the probable solutions.
I've been testing a fresh install with only the Entware and OMedusa QPKGs installed via sherpa.

'ffmpeg' isn't installed as it's not required by these packages. Which means 'libx264' also isn't installed. Medusa uses the 'mediainfo' package to extract video dimensions instead of 'ffmpeg'. edit: .. but it will use 'ffmpeg' if 'mediainfo' isn't installed.

I think 'ffmpeg' is leftover from a previous sherpa version.

Might be better to remove 'libx264' and dependent packages like 'ffmpeg' as they're not needed anyway:

Code: Select all

opkg remove libx264 --force-removal-of-dependent-packages
@Dirk, apologies for the trouble. Most of the time, these breakages are because I've been refactoring the sherpa code to make it "better". ;)
Oh gosh no please no need to apologize, I always assume it is QNAP breaking things. You do an amazing job with keeping all of this going! Thank you, OneCD and also thank you, zyxmon for the assist!
Removal and restart of the app resolved the issue nicely :)
potestus
Easy as a breeze
Posts: 317
Joined: Tue May 10, 2011 7:30 pm

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

Post by potestus »

Screenshot_20210501-145329_Chrome.jpg
Any reason why sab should be stuck again? Fetching nzb..
You do not have the required permissions to view the files attached to this post.
User avatar
OneCD
Guru
Posts: 12037
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

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

Post by OneCD »

potestus wrote: Sat May 01, 2021 9:55 pm Any reason why sab should be stuck again? Fetching nzb..
This is a good question to ask on the SABnzbd forum. ;)

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
mog_wai
Starting out
Posts: 14
Joined: Tue Jun 15, 2010 12:45 am

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

Post by mog_wai »

SABnzbd fails to start after update (again). Last time the only solution was remove everything and start from scratch, but I'm getting a bit fed up with that.

If I run "sherpa update all" it fails to start SABnzbd. Below the log file. Any clue on how to fix.
I'm running it on a QNAP TS-112P.

Dump of /var/log/SABnzbd.log:

Code: Select all

>>>>>>>>>> datetime:'Sun May  2 20:44:57 CEST 2021',request:'stopping',QPKG:'210401',app:'3.2.1' <<<<<<<<<<
daemon: NOT active
disable QPKG icon: OK
>>>>>>>>>> datetime:'Sun May  2 20:44:58 CEST 2021',request:'starting',QPKG:'210401',app:'3.2.1' <<<<<<<<<<
daemon: NOT active
file (/opt/bin/git): exists
update 'SABnzbd' from remote repository: OK
current git branch: master
file (/opt/bin/python3): exists
update 'SABnzbd' language translations: 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 "/opt/lib/python3.9/subprocess.py", line 73, in <module>
ModuleNotFoundError: No module named 'msvcrt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/share/HDA_DATA/.qpkg/SABnzbd/SABnzbd/tools/make_mo.py", line 28, in <module>
    import subprocess
  File "/opt/lib/python3.9/subprocess.py", line 80, in <module>
  File "/opt/lib/python3.9/selectors.py", line 10, 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]
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/HDA_DATA/.qpkg/SABnzbd/SABnzbd/SABnzbd.py", line 25, 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]

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

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

Post by OneCD »

mog_wai wrote: Mon May 03, 2021 3:15 am Last time the only solution was remove everything and start from scratch, but I'm getting a bit fed up with that.
Yep, it's painfully slow to-do on an old NAS. :(

Let's try to avoid that this time by just reinstalling the Python stuff. ;)
mog_wai wrote: Mon May 03, 2021 3:15 am

Code: Select all

ImportError: cannot import name '_CallableGenericAlias' from 'collections.abc' (/opt/lib/python3.9/_collections_abc.pyc)"
You might be missing the 'jaraco.collections' module. :'

Please run these command in-order (note: the 'opkg remove' command will be run twice):

Code: Select all

pip3 freeze | xargs pip3 uninstall -y
opkg remove python3* --force-removal-of-dependent-packages
opkg remove python3* --force-removal-of-dependent-packages
sherpa restart sab

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
mog_wai
Starting out
Posts: 14
Joined: Tue Jun 15, 2010 12:45 am

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

Post by mog_wai »

OneCD wrote: Mon May 03, 2021 5:10 am
mog_wai wrote: Mon May 03, 2021 3:15 am Last time the only solution was remove everything and start from scratch, but I'm getting a bit fed up with that.
Yep, it's painfully slow to-do on an old NAS. :(

Let's try to avoid that this time by just reinstalling the Python stuff. ;)
mog_wai wrote: Mon May 03, 2021 3:15 am

Code: Select all

ImportError: cannot import name '_CallableGenericAlias' from 'collections.abc' (/opt/lib/python3.9/_collections_abc.pyc)"
You might be missing the 'jaraco.collections' module. :'

Please run these command in-order (note: the 'opkg remove' command will be run twice):

Code: Select all

pip3 freeze | xargs pip3 uninstall -y
opkg remove python3* --force-removal-of-dependent-packages
opkg remove python3* --force-removal-of-dependent-packages
sherpa restart sab
Unfortunately it didn't help and only removing and reinstalling worked ;(. Thanks for your help anyways!
User avatar
OneCD
Guru
Posts: 12037
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

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

Post by OneCD »

mog_wai wrote: Tue May 04, 2021 11:06 pm Unfortunately it didn't help and only removing and reinstalling worked ;(. Thanks for your help anyways!
On the plus side, I'm done with the package management operations for a while. So sherpa should remain stable now, which hopefully means no-need to reinstall Entware again. ;)

I'll only be working on smaller issues (like the line-blink when updating the display - it's annoying visible on slower NAS).

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
zyxmon
Experience counts
Posts: 1001
Joined: Mon Oct 27, 2014 2:27 pm
Location: Moscow, Russia
Contact:

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

Post by zyxmon »

OneCD wrote: Wed May 05, 2021 2:01 am I'll only be working on smaller issues (like the line-blink when updating the display - it's annoying visible on slower NAS).
I have not used sherpa, and do not know much what sort of blinking is happening.
One thing to try - install busybox from Entware and run /opt/bin/sh. May be there will be no screen blinking as it is in Entware alternative install.
User avatar
OneCD
Guru
Posts: 12037
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

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

Post by OneCD »

Thanks @zyxmon. :)

This problem isn’t anything to do with Entware. Without going into specifics, it’s something I should be able to solve by writing better shellcode.

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
zyxmon
Experience counts
Posts: 1001
Joined: Mon Oct 27, 2014 2:27 pm
Location: Moscow, Russia
Contact:

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

Post by zyxmon »

OneCD wrote: Wed May 05, 2021 3:54 am This problem isn’t anything to do with Entware. Without going into specifics, it’s something I should be able to solve by writing better shellcode.
Just using /opt/bin/sh (busybox from entware) instead of /bin/sh (busybox from qnap) helps with flickering on <tab> key as an example for arm NASes.
User avatar
OneCD
Guru
Posts: 12037
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

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

Post by OneCD »

I’ll give it a go. Cheers mate! :D

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
rs1001
Getting the hang of things
Posts: 72
Joined: Thu Jun 18, 2015 11:44 am

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

Post by rs1001 »

So I've got myself up & vaguely functional. Re-installing all the sherpa apps held onto most setting on Transmission / Medusa et al.
I've got myself into a bit of a mess with Mylar though. Looking at the history, the last update shows from last December.

In a nutshell, all my files are there in the designated comics folder, but the db is a bit of a mess.
The interface doesn't show anything I added since December, and when I try re-adding there's a db error in the logs.

So my question is, where are the db-backups, if any are stored? (by Mylar, as well as Sherpa)
If not, I'll just have to uninstall, remove everything and start over pointing import at my comics folder.
Not too terrible, but would prefer to avoid the mammoth task.
QNAP TS-653 Pro -- with 16Gb RAM
6 * Western Digital WD60EFRX WD Reds (RAID5) as a Single 27.1TB Volume
Firmware: QTS 5.0.1.2277
User avatar
OneCD
Guru
Posts: 12037
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

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

Post by OneCD »

rs1001 wrote: Fri May 07, 2021 9:10 pm So my question is, where are the db-backups, if any are stored? (by Mylar, as well as Sherpa)
The Mylar config can be found in the 'config' directory under the QPKG installation path for Mylar:

Code: Select all

cd $(getcfg Mylar3 Install_Path -f /etc/config/qpkg.conf)/config
If you've used the backup process built into the service script, your Mylar backup will be in the backups path:

Code: Select all

cd $(getcfg SHARE_DEF defVolMP -f /etc/config/def_share.info)/.qpkg_config_backup

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
Bedlore
Getting the hang of things
Posts: 67
Joined: Wed Jun 10, 2009 9:25 am

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

Post by Bedlore »

I see Watcher3 support was pulled, likely because it doesn't support beyond Python 3.7x, is there a supported replacement I can move to? Alternatively is running multiple instances of Python possible, I'm comfortable in CLI but not a python person.

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

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

Post by OneCD »

Bedlore wrote: Mon May 10, 2021 10:53 am I see Watcher3 support was pulled, likely because it doesn't support beyond Python 3.7x...
Correct, I'm still waiting for the current developers to update it to work with Python 3.9. https://github.com/barbequesauce/Watche ... -740194812

I had to pull it from use in sherpa (for-now) as downgrading Python 3 caused too many problems. :(
Bedlore wrote: Mon May 10, 2021 10:53 am ... is there a supported replacement I can move to?
@QNAP_Stephane has a Watcher3 QPKG available in the Qnapclub Store - I think he has embedded a compatible Python interpreter in the QPKG: https://qnapclub.eu/en/qpkg/471
Bedlore wrote: Mon May 10, 2021 10:53 am Alternatively is running multiple instances of Python possible, I'm comfortable in CLI but not a python person.
Yes, running multiple Pythons on the same device is possible - as long as you keep them separate. However, it's not something I can assist with, as I'd like to keep all the sherpa apps that depend on Python on a single version. ;)

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
Post Reply

Return to “Community Apps”