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

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

Post by OneCD »

HuskerDu wrote: Sun Mar 28, 2021 1:03 am My bad, the right path is /share/CACHEDEV1_DATA/.qpkg/OTransmission/config :shock:
I was just posting this, then saw you had figured it out. Good! Image

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
nemmanon
Starting out
Posts: 13
Joined: Wed Nov 19, 2008 1:32 am

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

Post by nemmanon »

Hello

I'm running QNAP 4.2.6 on a TS459 Pro II and I have installed sherpa to overcome the EOL problem with ClamAV especially
When running sherpa install ClamAV, I'm getting a MONITOR FLAG PATHFILE: unbound variable error at line 2828 of the script

Does that ring any bell ?

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

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

Post by OneCD »

nemmanon wrote: Sun Mar 28, 2021 4:04 pm Does that ring any bell ?
It does (unfortunately). I was playing with that code today, and looks like it's still not-quite-right. :(

Can you please make sure you have the latest management script?

Code: Select all

sherpa clean
edit: I've just pushed an additional fix to GitHub for this. Image

Also, please note: the minimum installed RAM required for ClamAV seems to be 1.5GB. I'm not sure how much is in your NAS.

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
nemmanon
Starting out
Posts: 13
Joined: Wed Nov 19, 2008 1:32 am

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

Post by nemmanon »

That worked indeed. Many thanks
Now am I'm supposed to restart the NAS? Cause freshclam command fails with
ERROR: Can't open/parse the config file /opt/etc/clamav/freshclam.conf


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

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

Post by OneCD »

nemmanon wrote: Sun Mar 28, 2021 5:20 pm Now am I'm supposed to restart the NAS? Cause freshclam command fails with
ERROR: Can't open/parse the config file /opt/etc/clamav/freshclam.conf
I've just added an alias for 'freshclam' to provide all the required parameters. This is included in the new 210329c version of the ClamAV QPKG.

First, please upgrade your ClamAV package via sherpa:

Code: Select all

sherpa upgrade clamav
(If ClamAV doesn't appear as an upgradable package, please run a 'sherpa clean' operation first).

Then, logout your SSH session, then back-in. You'll have a new alias for 'freshclam':

Code: Select all

[~] # alias freshclam
freshclam='/opt/sbin/freshclam -u admin --config-file=/etc/config/freshclam.conf --datadir=/share/CACHEDEV1_DATA/.antivirus/usr/share/clamav -l /tmp/.freshclam.log'

Code: Select all

[~] # freshclam
ClamAV update process started at Mon Mar 29 06:47:40 2021
daily.cld database is up to date (version: 26123, sigs: 3966434, f-level: 63, builder: raynman)
main.cvd database is up to date (version: 59, sigs: 4564902, f-level: 60, builder: sigmgr)
bytecode.cvd database is up to date (version: 333, sigs: 92, f-level: 63, builder: awillia2)

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
potestus
Easy as a breeze
Posts: 321
Joined: Tue May 10, 2011 7:30 pm

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

Post by potestus »

Screenshot_20210403-093849_Chrome.jpg
Sab stopped working. Fetch's since stalled in system since update yesterday entware etc updated with packages.

# sherpa reinstall ent sherpa 210403 • a mini-package-manager for QNAP NAS
done: stopped 3 dependent QPKGs
done: uninstalled 1 standalone QPKG
done: installed 1 standalone QPKG
done: downloaded & installed 57 IPKGs
eror: Download & install 'Python3' modules failed ! result_code: [1]
fail: Installed 1 PIP group failed

2 minutes ago Essential modules are missing, downloading cannot start.
ERROR 2 minutes ago par2 binary... NOT found!
ERROR 2 minutes ago [N/A] The command in build_command is undefined.

[~] # sherpa upgrade sab sherpa 210403 • a mini-package-manager for QNAP NAS

done: updated package cache with 1 QPKG
note: ignoring request to install 'Par2' as this NAS has an unsupported arch
eror: Download & install 'Python3' modules failed ! result_code: [1]
fail: Installed 1 PIP group failed
done: upgraded 1 dependent QPKG

>>>>>>>>>> datetime:'Sat Apr 3 18:04:13 BST 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
load UI ports from application: OK
start daemon: failed!
= ExecuteAndLog()
output: "Not all required Python modules are available, please check requirements.txt
Missing module: Cheetah
You can read more at: https://sabnzbd.org/wiki/installation/i ... ff-modules
If you still experience problems, remove all .pyc files in this folder and subfolders"
result: [1]
You do not have the required permissions to view the files attached to this post.
Brutalis
Starting out
Posts: 27
Joined: Thu Mar 15, 2012 6:33 pm

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

Post by Brutalis »

I have the same problem with SABnzbd and SickChill doesn't want to start either. So I thought let's update sherpa with the latest qnap package on your github and reinstall Entware. But I'm getting this error:

Code: Select all

[~] # sherpa reinstall ew

sherpa 210403 • a mini-package-manager for QNAP NAS

done: uninstalled 1 standalone QPKG                       
done: installed 1 standalone QPKG                                            
done: downloaded & installed 57 IPKGs                                              
eror: Download & install 'Python3' modules failed ! result_code: [1]  
fail: Installed 1 PIP group failed  
My system information:

Code: Select all

TS419P-II
Firmware version: 4.3.3.1432 Build 20201006

[~] # python -V
Python 3.9.2
User avatar
OneCD
Guru
Posts: 12155
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

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

Post by OneCD »

Brutalis wrote: Mon Apr 05, 2021 5:26 am I have the same problem with SABnzbd and SickChill doesn't want to start either. So I thought let's update sherpa with the latest qnap package on your github and reinstall Entware. But I'm getting this error:
@potestus and Brutalis, I've reverted the management script to an earlier state to get your installs working again. (I'm quite focused on the 'develop' branch at the moment and can't invest time fixing problems related only to the 'main' branch ;) ).

Please run:

Code: Select all

sherpa clean
sherpa check 

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
potestus
Easy as a breeze
Posts: 321
Joined: Tue May 10, 2011 7:30 pm

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

Post by potestus »

The check has been stuck on 50% for 1 hour?
[~] # sherpa clean done: logs path cleaned done: work path cleaned [~] # sherpa check sherpa 210330 • a mini-package-manager for QNAP NAS note: an upgraded QPKG is available for SABnzbd done: updated package cache with 1 QPKG proc: installing 1 essential QPKG (might take a while) ... 50% (1/1)
User avatar
OneCD
Guru
Posts: 12155
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

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

Post by OneCD »

Then it's clearly stalled. Abort it (CTRL+C) and try again.

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
potestus
Easy as a breeze
Posts: 321
Joined: Tue May 10, 2011 7:30 pm

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

Post by potestus »

I aborted right out.
Stalled again 50% but not saying stalled.
User avatar
OneCD
Guru
Posts: 12155
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

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

Post by OneCD »

Run it in debug mode to see what it’s doing.

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
potestus
Easy as a breeze
Posts: 321
Joined: Tue May 10, 2011 7:30 pm

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

Post by potestus »

How do I do that? Could it be that sab is still running?
potestus
Easy as a breeze
Posts: 321
Joined: Tue May 10, 2011 7:30 pm

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

Post by potestus »

Code: Select all

[~] # sherpa clean                                                                                                                            done: logs path cleaned                                                                                                                       done: work path cleaned                                                                                                                       [~] # sherpa check                                                                                                                            sherpa 210330 • a mini-package-manager for QNAP NAS                                                                                                                                                                                                                                         note: an upgraded QPKG is available for SABnzbd                                                                                               done: updated package cache with 1 QPKG                                                                                                       proc: installing 1 essential QPKG (might take a while) ... 50% (1/1)                                                                          sherpa                                                                                                                                        ^C                                                                                                                                            fail: Unable to install 'Par2' (see log for more details)                                                                                     fail: Installed 1 essential QPKG failed                                                                                                       proc: installing 1 PIP group (might take a while) ... 50% (1/1) 4c                                                                                                                                                                                                                          ^C                                                                                                                                            eror: Download & install 'Python3' modules failed ! result_code: [1]                                                                          proc: installing 2 PIP groups (might take a while) ... 33% (1/2) ^C                                                                           eror: Download & install 'Python3 sabyenc3' module failed ! result_code: [1]                                                                  proc: installing 1 PIP group (might take a while) ... 50% (1/1) 4                                                                             ^C                                                                                                                                                                                                                                                                                          [~] #                                                                                                                                         [~] # sherpa ean                                                                                                                              sherpa 210330 • a mini-package-manager for QNAP NAS                                                                                                                                                                                                                                         eror: Unknown argument: "ean"                                                                                                                                                                                                                                                               Usage: sherpa [action] [packages...] [action] [packages...] ... [options...]                                                                                                                                                                                                                   To list available [action]s, type:                                                                                                               # sherpa list actions                                                                                                                                                                                                                                                                    To list available [packages...], type:                                                                                                           # sherpa list packages                                                                                                                                                                                                                                                                   Or, for more [options...], type:                                                                                                                 # sherpa list options                                                                                                                                                                                                                                                                 There's also the wiki: https://github.com/OneCDOnly/sherpa/wiki                                                                                                                                                                                                                             [~] # sherpa clean                                                                                                                            done: logs path cleaned                                                                                                                       done: work path cleaned                                                                                                                       [~] # sherpa check                                                                                                                            sherpa 210330 • a mini-package-manager for QNAP NAS                                                                                                                                                                                                                                         note: an upgraded QPKG is available for SABnzbd                                                                                               done: updated package cache with 1 QPKG                                                                                                       proc: installing 1 essential QPKG (might take a while) ... 50% (1/1) ^C                                                                       fail: Unable to install 'Par2' (see log for more details)                                                                                     fail: Installed 1 essential QPKG failed                                                                                                       proc: installing 1 PIP group (might take a while) ... 50% (1/1) ^C                                                                            eror: Download & install 'Python3' modules failed ! result_code: [1]                                                                          proc: installing 2 PIP groups (might take a while) ... 33% (1/2) ^C                                                                           eror: Download & install 'Python3 sabyenc3' module failed ! result_code: [1] 
proc: installing 1 PIP group (might take a while) ... 50% (1/1) ^C
[~] # 
[~] # sherpa resrt sab                                                                                                                       
sherpa 210330 • a mini-package-manager for QNAP NAS

eror: Unknown argument: "resrt" 
 
Usage: sherpa [action] [packages...] [action] [packages...] ... [options...]

   To list available [action]s, type:
      # sherpa list actions

   To list available [packages...], type:
      # sherpa list packages

   Or, for more [options...], type:
      # sherpa list options

There's also the wiki: https://github.com/OneCDOnly/sherpa/wiki

[~] # sheroa restart sab
-sh: sheroa: command not found
[~] # sherpa restart sab
sherpa 210330 • a mini-package-manager for QNAP NAS

note: an upgraded QPKG is available for SABnzbd 
proc: installing 1 essential QPKG (might take a while) ... 50% (1/1) ^C
fail: Unable to install 'Par2' (see log for more details)                  
fail: Installed 1 essential QPKG failed                                    
proc: restarting 1 optional QPKG (might take a while) ... 50% (1/1)     


done: restarted 1 optional QPKG                                            
 

[~] # 
[~] # 
[~] # 
[~] # sherpa check debug                                                                                                                     
proc: init ... 
dbug: (vv) $_obj_session_debug_toscreen_flag_ : 'true' 
dbug: (II) ==================================================================================================== 
dbug: (**)    SCRIPT:           started: Mon Apr 5 06:41:37 BST 2021 
dbug: (**)    SCRIPT:           version: package: 210328, manager: 210330, loader: 200923 
dbug: (**)    SCRIPT:               PID: 6719 
dbug: (II) ---------------------------------------------------------------------------------------------------- 
dbug: (II) Markers: (**) detected, (II) information, (WW) warning, (EE) error, (LL) log file, (--) processing, 
dbug: (II) (==) done, (>>) f entry, (<<) f exit, (vv) variable name & value, ($1) positional argument value 
dbug: (II) ---------------------------------------------------------------------------------------------------- 
dbug: (vv) $_obj_session_summary_flag_ : 'true' 
dbug: (**)      QPKG: Entware installer: std 
dbug: (**)      QPKG:              arch: none 
dbug: (>>) ParseArguments 
dbug: (vv) $USER_ARGS_RAW : 'check debug' 
dbug: (>>) QPKGs.States.Build 
proc: checking installed QPKGs ... 
dbug: (vv) $_obj_qpkgs_states_built_flag_ : 'true' 
dbug: (<<) QPKGs.States.Build|0|0|3520ms 
dbug: (vv) $_obj_opts_dependencies_check_flag_ : 'true' 
dbug: (<<) ParseArguments|0|0|3932ms    
note: an upgraded QPKG is available for SABnzbd 
dbug: (<<) Session.Init|0|0|6464ms      
dbug: (>>) Session.Validate             
dbug: (>>) ArgumentSuggestions          
dbug: (<<) ArgumentSuggestions|0|0|87ms 
proc: validating parameters ... 
dbug: (>>) ListEnvironment           
dbug: (II) ---------------------------------------------------------------------------------------------------- 
dbug: (**)  HARDWARE:             model: TS-419P 
dbug: (**)  HARDWARE:               CPU 
dbug: (**)  HARDWARE:               RAM: 515492kB 
dbug: (**)  FIRMWARE:           version: 4.3.3 
dbug: (**)  FIRMWARE:             build: 20201006 
dbug: (**)  FIRMWARE:            kernel: 3.4.6 armv5tel 
dbug: (**)  FIRMWARE:          platform: MARVELL_6281 
dbug: (**) USERSPACE:         OS uptime: 113 days 
dbug: (**) USERSPACE:       system load: 1m:4.37, 5m:4.46, 15m:4.38 
dbug: (**) USERSPACE:             $USER: admin 
dbug: (**) USERSPACE:             $EUID: 0 
dbug: (**) USERSPACE:     $BASH_VERSION: 3.2.57(9)-release 
dbug: (**) USERSPACE:    default volume: /share/MD0_DATA 
dbug: (**) USERSPACE:              /opt: /share/MD0_DATA/.qpkg/Entware 
dbug: (**) USERSPACE:             $PATH: /opt/bin:/opt/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/bin/X11:/usr/... 
dbug: (**) USERSPACE:    'python3' path: /opt/bin/python3 
dbug: (**) USERSPACE: 'python3' version: 3.9.2 
dbug: (**) USERSPACE:     'python' path: /opt/bin/python 
dbug: (**) USERSPACE:  'python' version: 3.9.2 
dbug: (**)    SCRIPT:         logs path: /share/MD0_DATA/.qpkg/sherpa/logs 
dbug: (**)    SCRIPT:         work path: /share/MD0_DATA/.qpkg/sherpa/cache 
dbug: (**)    SCRIPT:      objects hash: d515fe88a87f5681069c9722db19ddd4 
dbug: (II) ---------------------------------------------------------------------------------------------------- 
dbug: (<<) ListEnvironment|0|0|2638ms 
dbug: (vv) $_obj_ipkgs_upgrade_flag_ : 'true' 
dbug: (vv) $_obj_ipkgs_install_flag_ : 'true' 
dbug: (vv) $_obj_pips_install_flag_ : 'true' 
dbug: (<<) Session.Validate|0|0|3341ms 
dbug: (>>) Tiers.Processor           
dbug: (>>) QPKGs.SupportsBackup.Build 
dbug: (<<) QPKGs.SupportsBackup.Build|0|0|328ms 
dbug: (>>) QPKGs.SupportsUpdateOnRestart.Build 
dbug: (<<) QPKGs.SupportsUpdateOnRestart.Build|0|0|325ms 
dbug: (>>) Tier.Processor            
proc: checking for packages to update package cache with ... 
proc: updating package cache with 2 QPKGs ... 33% (1/2) 
dbug: (>>) QPKG.Download                                     
dbug: (II) local package (Entware_1.03std.qpkg) checksum correct: skipping download 
dbug: (II) ignoring request to download 'Entware'            
dbug: (<<) QPKG.Download|2|0|377ms                           
proc: updating package cache with 1 QPKG ... 50% (1/1) 
dbug: (>>) QPKG.Download                                    
dbug: (WW) no URL or MD5 found for this package 'Par2' (unsupported arch?) 
dbug: (II) ignoring request to download 'Par2'              
dbug: (<<) QPKG.Download|2|0|366ms                          
dbug: (<<) Tier.Processor|0|0|1323ms                        
dbug: (>>) Tier.Processor                                   
proc: checking for packages to backup configuration for ... 
dbug: (II) no QPKGs to process                                   
dbug: (<<) Tier.Processor|0|0|284ms                              
dbug: (>>) Tier.Processor                                        
proc: checking for optional packages to stop ... 
dbug: (II) no QPKGs to process                        
dbug: (<<) Tier.Processor|0|0|265ms                   
dbug: (>>) Tier.Processor                             
proc: checking for essential packages to stop ... 
dbug: (II) no QPKGs to process                         
dbug: (<<) Tier.Processor|0|0|290ms                    
dbug: (>>) Tier.Processor                              
proc: checking for optional packages to uninstall ... 
dbug: (II) no QPKGs to process                             
dbug: (<<) Tier.Processor|0|0|276ms                        
proc: checking for addon packages to uninstall ... 
dbug: (>>) Tier.Processor                               
proc: checking for addon packages to uninstall ... 
dbug: (>>) IPKGs.Uninstall                              
dbug: (>>) CalcAllIPKGDepsToUninstall                   
dbug: (II)       0 IPKGs requested: none                
dbug: (--) excluding IPKGs not installed ...            
dbug: (==) no IPKGs to uninstall                        
dbug: (<<) CalcAllIPKGDepsToUninstall|0|0|443ms         
dbug: (<<) IPKGs.Uninstall|0|0|2279ms                   
dbug: (<<) Tier.Processor|0|0|2662ms                    
dbug: (>>) Tier.Processor                               
proc: checking for essential packages to uninstall ... 
dbug: (II) no QPKGs to process                              
dbug: (<<) Tier.Processor|0|0|278ms                         
dbug: (>>) Tier.Processor                                   
proc: checking for essential packages to upgrade ... 
dbug: (II) no QPKGs to process                            
dbug: (<<) Tier.Processor|0|0|310ms                       
dbug: (>>) Tier.Processor                                 
proc: checking for essential packages to reinstall ... 
dbug: (II) no QPKGs to process                              
dbug: (<<) Tier.Processor|0|0|278ms                         
dbug: (>>) Tier.Processor                                   
proc: checking for essential packages to install ... 
proc: installing 1 essential QPKG (might take a while) ... 50% (1/1) 
dbug: (>>) QPKG.Install                                                   
dbug: (--) installing 'Par2' ...                                          
dbug: (>>) RunAndLog                                                      
dbug: (--) exec: '/bin/sh ' ...
Last edited by OneCD on Mon Apr 05, 2021 1:53 pm, edited 1 time in total.
Reason: added code tags
User avatar
OneCD
Guru
Posts: 12155
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

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

Post by OneCD »

Yup, I can see why it's stalled. :(

I'm working on this problem now... give me a few minutes to test.

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
Post Reply

Return to “Community Apps”