[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
Forward Look
Starting out
Posts: 12
Joined: Tue May 20, 2014 10:29 am

Re: [SCRIPT] sherpa.sh

Post by Forward Look »

OneCD wrote: Thu Feb 20, 2020 3:23 am
Forward Look wrote: Thu Feb 20, 2020 12:50 am Is it possible to get one of the old CouchPotato2 .qpkgs ?
Yup! :D

I've just pushed my local sherpa package archive up to GitHub so previous CP builds are now available.
Thanks so much! I will try it out shortly.
User avatar
OneCD
Guru
Posts: 12160
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa.sh

Post by OneCD »

potestus wrote: Thu Feb 20, 2020 5:57 pm So any idea why this happened seemingly a one off? I selected a release manually from cp.
...
[09:15:01] [ERROR]::MAIN: Category:[*] is not defined or is not enabled. Please rename it or ensure it is enabled for the appropriate section in your autoProcessMedia.cfg and try again.
Sorry, I don't support CP anymore. It has been removed as a sherpa-installable QPKG.

But, you might check your nzbToMedia config as per the error message. ;)

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
Forward Look
Starting out
Posts: 12
Joined: Tue May 20, 2014 10:29 am

Re: [SCRIPT] sherpa.sh

Post by Forward Look »

OneCD wrote: Thu Feb 20, 2020 3:23 am
To install: SSH into your NAS as the 'admin' user, then:

Code: Select all

cd /share/Public
opkg install python python-pyopenssl python-lxml
curl --insecure --output CouchPotato2_190928.qpkg https://raw.githubusercontent.com/OneCDOnly/sherpa/master/package-archives/CouchPotato2/build/CouchPotato2_190928.qpkg
sh CouchPotato2_190928.qpkg
Hi OneCD. When installing the opkg, I get "opkg: command not found". Is the new system missing Optware? I read it was no longer available. Should I just install a 2.73 python qpkg, or what's the best solution? Thanks for the help!
User avatar
OneCD
Guru
Posts: 12160
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa.sh

Post by OneCD »

Forward Look wrote: Sat Feb 22, 2020 5:23 am When installing the opkg, I get "opkg: command not found". Is the new system missing Optware?
Optware is deprecated.

Please install Entware. Wait until the install has finished, then login via SSH and the 'opkg' command should be available.

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
Forward Look
Starting out
Posts: 12
Joined: Tue May 20, 2014 10:29 am

Re: [SCRIPT] sherpa.sh

Post by Forward Look »

OneCD wrote: Sat Feb 22, 2020 6:52 am
Forward Look wrote: Sat Feb 22, 2020 5:23 am When installing the opkg, I get "opkg: command not found". Is the new system missing Optware?
Optware is deprecated.

Please install Entware. Wait until the install has finished, then login via SSH and the 'opkg' command should be available.
Thankis -- it looked like that did the trick! Now I just need to sort out the CouchPotato migration... =)
niwa2
Experience counts
Posts: 1786
Joined: Sat Oct 13, 2007 2:21 am
Location: Germany

Re: [SCRIPT] sherpa.sh

Post by niwa2 »

I am also having problems getting OWatcher to start

Code: Select all

[~] # /share/CACHEDEV1_DATA/.qpkg/OWatcher3/owatcher3.sh start
= (OWatcher3) is not active
* updating (OWatcher3): OK
* starting (OWatcher3): failed!
= result: 1
= startup messages: 'Userdata directory exists, continuing.
Connected to database sqlite:////share/CACHEDEV1_DATA/.qpkg/OWatcher3/config/watcher.sqlite
Config file found, merging any new options.
Clearing Mako cache.
Traceback (most recent call last):
  File "/share/CACHEDEV1_DATA/.qpkg/OWatcher3/OWatcher3/lib/cherrypy/lib/reprconf.py", line 213, in as_dict
    value = unrepr(value)
  File "/share/CACHEDEV1_DATA/.qpkg/OWatcher3/OWatcher3/lib/cherrypy/lib/reprconf.py", line 508, in unrepr
    return b.build(obj)
  File "/share/CACHEDEV1_DATA/.qpkg/OWatcher3/OWatcher3/lib/cherrypy/lib/reprconf.py", line 354, in build
    raise TypeError('unrepr does not recognize %s' %
TypeError: unrepr does not recognize 'Constant'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "watcher.py", line 139, in <module>
    root = cherrypy.tree.mount(App(), '{}/'.format(core.URL_BASE), 'core/conf_app.ini')
  File "/share/CACHEDEV1_DATA/.qpkg/OWatcher3/OWatcher3/lib/cherrypy/_cptree.py", line 226, in mount
    app.merge(config)
  File "/share/CACHEDEV1_DATA/.qpkg/OWatcher3/OWatcher3/lib/cherrypy/_cptree.py", line 100, in merge
    _cpconfig.merge(self.config, config)
  File "/share/CACHEDEV1_DATA/.qpkg/OWatcher3/OWatcher3/lib/cherrypy/_cpconfig.py", line 139, in merge
    for section, value_map in reprconf.as_dict(other).items():
  File "/share/CACHEDEV1_DATA/.qpkg/OWatcher3/OWatcher3/lib/cherrypy/lib/reprconf.py", line 46, in as_dict
    config = Parser().dict_from_file(config)
  File "/share/CACHEDEV1_DATA/.qpkg/OWatcher3/OWatcher3/lib/cherrypy/lib/reprconf.py", line 228, in dict_from_file
    return self.as_dict()
  File "/share/CACHEDEV1_DATA/.qpkg/OWatcher3/OWatcher3/lib/cherrypy/lib/reprconf.py", line 219, in as_dict
    raise ValueError(msg, x.__class__.__name__, x.args)
ValueError: ("Config error in section: '/', option: 'tools.auth.on', value: 'True'. Config values must be valid Python.", 'TypeError', ("unrepr does not recognize 'Constant'",))'
This is a fresh install of OWatcher.
Am i missing something?
TVS-1282 | Version 4.4.3 | 3x 12TB WDC WD121KRYZ RAID5
TS-639 Pro | Version 4.2.6 | 5x 3TB WDC WD30EFRX RAID5 as Backup
LianLi EX-50 with 3x 2TB SAMSUNG HD203WI + 2x 2TB SAMSUNG HD204UI in RAID5 as Backup drive
LianLi EX-503 with 5x 2TB SAMSUNG HD204UI in RAID5 as Backup drive
User avatar
OneCD
Guru
Posts: 12160
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa.sh

Post by OneCD »

niwa2 wrote: Wed Feb 26, 2020 1:57 am I am also having problems getting OWatcher to start

Code: Select all

TypeError: unrepr does not recognize 'Constant'
This crash looks identical to that experienced by @RickSanchez_C137. :(

Can you please try the steps suggested in my follow-up post, and advise?

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
niwa2
Experience counts
Posts: 1786
Joined: Sat Oct 13, 2007 2:21 am
Location: Germany

Re: [SCRIPT] sherpa.sh

Post by niwa2 »

here is the list of installed QPKGs

Code: Select all

[helpdesk]
[netmgr]
[Qboost]
[ResourceMonitor]
[QKVM]
[container-station]
[JRE]
[Python]
[Par2]
[SABnzbdplus]
[OsCAM]
[TVH_Dev_Sundtek]
[TVHeadend]
[NotificationCenter]
[SSDLaboratory]
[QVPN]
[SickChill]
[LogitechMediaServer]
[QPHPMyAdmin]
[MalwareRemover]
[MultimediaConsole]
[SecurityCounselor]
[QDMS]
[PhotoStation]
[HybridBackup]
[LicenseCenter]
[QcloudSSLCertificate]
[OWatcher3]
[Entware]
I have disabled any QPKG there is to disable.
Then i opened a shell with putty and tried to start OWatcher manually, but the issue persists.
TVS-1282 | Version 4.4.3 | 3x 12TB WDC WD121KRYZ RAID5
TS-639 Pro | Version 4.2.6 | 5x 3TB WDC WD30EFRX RAID5 as Backup
LianLi EX-50 with 3x 2TB SAMSUNG HD203WI + 2x 2TB SAMSUNG HD204UI in RAID5 as Backup drive
LianLi EX-503 with 5x 2TB SAMSUNG HD204UI in RAID5 as Backup drive
User avatar
OneCD
Guru
Posts: 12160
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa.sh

Post by OneCD »

niwa2 wrote: Thu Feb 27, 2020 3:07 am Then i opened a shell with putty and tried to start OWatcher manually, but the issue persists.
Can you please check the current Py3 version installed via Entware?

Code: Select all

/opt/bin/python3 -V
Stephane (don't know if that's our Stephane) had the same problem when attempting to run Watcher3 in Python 3.8.1

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
niwa2
Experience counts
Posts: 1786
Joined: Sat Oct 13, 2007 2:21 am
Location: Germany

Re: [SCRIPT] sherpa.sh

Post by niwa2 »

It is indeed v3.8.1
I have not installed this version...
Which Python should it be? 3.7?
TVS-1282 | Version 4.4.3 | 3x 12TB WDC WD121KRYZ RAID5
TS-639 Pro | Version 4.2.6 | 5x 3TB WDC WD30EFRX RAID5 as Backup
LianLi EX-50 with 3x 2TB SAMSUNG HD203WI + 2x 2TB SAMSUNG HD204UI in RAID5 as Backup drive
LianLi EX-503 with 5x 2TB SAMSUNG HD204UI in RAID5 as Backup drive
User avatar
OneCD
Guru
Posts: 12160
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa.sh

Post by OneCD »

niwa2 wrote: Thu Feb 27, 2020 4:42 am It is indeed v3.8.1
That's interesting... Entware installed Python 3.7.4 on my NAS. I wonder if Entware installs different versions for different archs? :'
niwa2 wrote: Thu Feb 27, 2020 4:42 am Which Python should it be? 3.7?
Yes, the Watcher devs are aware of problems when running with 3.8.1, so we'll need to try specifying the older 3.7.4 on your NAS.

Can you please try this?

Code: Select all

opkg remove python3
opkg install python3==3.7.4
/etc/init.d/owatcher3.sh start
If this works, I'll amend sherpa to force install 3.7.4.

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
niwa2
Experience counts
Posts: 1786
Joined: Sat Oct 13, 2007 2:21 am
Location: Germany

Re: [SCRIPT] sherpa.sh

Post by niwa2 »

it seems as if python 3.7 is not available on my architecture

Code: Select all

opkg install python3==3.7.4
Unknown package 'python3==3.7.4'.
Collected errors:
 * opkg_install_cmd: Cannot install package python3==3.7.4.

Code: Select all

opkg print-architecture
arch all 100
arch x64-3.x 150
arch x64-3.2 160

Code: Select all

opkg list python3
python3 - 3.8.1-1a - This package contains the (almost) full Python install.
 It's python3-light + all other packages.
TVS-1282 | Version 4.4.3 | 3x 12TB WDC WD121KRYZ RAID5
TS-639 Pro | Version 4.2.6 | 5x 3TB WDC WD30EFRX RAID5 as Backup
LianLi EX-50 with 3x 2TB SAMSUNG HD203WI + 2x 2TB SAMSUNG HD204UI in RAID5 as Backup drive
LianLi EX-503 with 5x 2TB SAMSUNG HD204UI in RAID5 as Backup drive
User avatar
OneCD
Guru
Posts: 12160
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa.sh

Post by OneCD »

niwa2 wrote: Thu Feb 27, 2020 5:09 am it seems as if python 3.7 is not available on my architecture

Code: Select all

opkg install python3==3.7.4
Unknown package 'python3==3.7.4'.
Oh dammit, just realised I gave you the 'pip' syntax, not the 'opkg' syntax. :oops:

Just testing now. BRB...

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

Re: [SCRIPT] sherpa.sh

Post by OneCD »

Notes (for the record) from my TS-559 Pro+:

Code: Select all

[~] # uname -a
Linux Sarah 3.4.6 #1 SMP Thu Jan 9 13:49:17 CST 2020 x86_64 unknown

Code: Select all

[~] # opkg print-architecture
arch all 100
arch x64-3.x 150
arch x64-3.2 160

Code: Select all

[~] # opkg list python3
python3 - 3.8.1-1a - This package contains the (almost) full Python install.
 It's python3-light + all other packages.
python3 - 3.7.4-2

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
niwa2
Experience counts
Posts: 1786
Joined: Sat Oct 13, 2007 2:21 am
Location: Germany

Re: [SCRIPT] sherpa.sh

Post by niwa2 »

Interesting.
From /opt/etc/opkg.conf i found http://bin.entware.net/x64-k3.2/ to be the repositiry.
If i open that in a browser, then python3_3.7.4 is not there anymore.
It has been moved to http://bin.entware.net/x64-k3.2/archive/
Is there a way to install archived modules?
TVS-1282 | Version 4.4.3 | 3x 12TB WDC WD121KRYZ RAID5
TS-639 Pro | Version 4.2.6 | 5x 3TB WDC WD30EFRX RAID5 as Backup
LianLi EX-50 with 3x 2TB SAMSUNG HD203WI + 2x 2TB SAMSUNG HD204UI in RAID5 as Backup drive
LianLi EX-503 with 5x 2TB SAMSUNG HD204UI in RAID5 as Backup drive
Post Reply

Return to “Community Apps”