[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
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 »

Something odd happend recently when i used sherpa to update to the new sabnzbd .. i have been reading th pas few pages trying to use sherpa clen and sherpa check commands. but seems my sabnzbd wont reinstall/start anymore.

After a little diggin, i found it somehow cant install par2 .. i found the log and it says:

Code: Select all

= command: '/bin/sh /share/MD0_DATA/.qpkg/sherpa/cache/qpkgs/Par2_0.8.1.0_arm-x41.qpkg'
= result_code: [0] ***** stdout/stderr begins below *****
Install QNAP package on TS-NAS...
Installation Abort.
[App Center] Failed to install Par2cmdLine (CLI) 0.8.1.0. Installation package is incompatible. Use the correct package.
/share/MD0_DATA/.qpkg/sherpa/cache/qpkgs/Par2_0.8.1.0_arm-x41.qpkg: line 69: set_progress_fail: command not found
= ***** stdout/stderr is complete *****
Running QTS 4.3.3.1624 on and old ARM based TS-419P+ .. got any suggestions? :-)
Currently: TS-653D
Retired: TS-419+
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 »

Knuspar wrote: Mon Apr 19, 2021 5:57 am

Code: Select all

= command: '/bin/sh /share/MD0_DATA/.qpkg/sherpa/cache/qpkgs/Par2_0.8.1.0_arm-x41.qpkg'
Hmm, that's odd. The x41 QPKG has been selected for your x19 NAS. :'

Can you please run another 'check' operation:

Code: Select all

sherpa check
... then immediately post the debug log for that session online?

Code: Select all

sherpa paste last
... then post the URL for that log back here?

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 »

OneCD wrote: Mon Apr 19, 2021 6:12 am
Knuspar wrote: Mon Apr 19, 2021 5:57 am

Code: Select all

= command: '/bin/sh /share/MD0_DATA/.qpkg/sherpa/cache/qpkgs/Par2_0.8.1.0_arm-x41.qpkg'
Hmm, that's odd. The x41 QPKG has been selected for your x19 NAS. :'

Can you please run another 'check' operation:

Code: Select all

sherpa check
... then immediately post the debug log for that session online?

Code: Select all

sherpa paste last
... then post the URL for that log back here?
Done -> https://termbin.com/cvwk
Currently: TS-653D
Retired: TS-419+
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 »

Knuspar wrote: Mon Apr 19, 2021 3:55 pm Done -> https://termbin.com/cvwk
Wow, that log is so polluted, the actual info I need has been trimmed from the start. Never seen that before. :S

Can you please post the whole thing instead?

Code: Select all

sherpa paste all
This will generate another URL for your paste.

Have you tried reinstalling Entware yet?

Code: Select all

sherpa reinstall ew

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 »

OneCD wrote:
Knuspar wrote: Mon Apr 19, 2021 3:55 pm Done -> https://termbin.com/cvwk
Wow, that log is so polluted, the actual info I need has been trimmed from the start. Never seen that before. :S

Can you please post the whole thing instead?

Code: Select all

sherpa paste all
This will generate another URL for your paste.
https://termbin.com/e4om
OneCD wrote: Have you tried reinstalling Entware yet?

Code: Select all

sherpa reinstall ew
I tried the other day, yes .. ill do it again .. willing to try anything since my sabnzbd aint starting anyways :-)
As I recall it .. i ran out of memory or somthing, so had to restart the NAS since everything stoooped working.


Update: Tried running it:

[~] # sherpa reinstall ew
sherpa 210418 • a mini-package-manager for QNAP NAS

done: updated package cache with 1 QPKG
done: uninstalled 1 standalone QPKG
done: installed 1 standalone QPKG
done: downloaded & installed 57 IPKGs
fail: Download & install 'Python3' modules failed ! result_code: [1]
fail: Installed 1 PIP group failed

This is the install log:

Code: Select all

= command: '/opt/bin/pip3 install --upgrade pip wheel pyopenssl cryptography apprise apscheduler beautifulsoup4 cfscrape cheetah3 cherrypy configobj feedparser pygithub python-levenshtein python-magic random_user_agent sabyenc3 simplejson slugify --cache-dir /share/MD0_DATA/.qpkg/sherpa/cache/pips'
! result_code: [1] ***** stdout/stderr begins below *****
Collecting pip
  Downloading pip-21.0.1-py3-none-any.whl (1.5 MB)
Collecting wheel
  Downloading wheel-0.36.2-py2.py3-none-any.whl (35 kB)
Collecting pyopenssl
  Downloading pyOpenSSL-20.0.1-py2.py3-none-any.whl (54 kB)
Collecting cryptography
  Downloading cryptography-3.4.7.tar.gz (546 kB)
  Installing build dependencies: started
  Installing build dependencies: still running...
  Installing build dependencies: finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: /opt/bin/python3 /opt/lib/python3.9/site-packages/pip install --ignore-installed --no-user --prefix /share/MD0_DATA/.qpkg/Entware/tmp/pip-build-env-0b_w8ppn/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.6.0' wheel 'cffi>=1.12; platform_python_implementation != '"'"'PyPy'"'"'' 'setuptools-rust>=0.11.4'
       cwd: None
  Complete output (62 lines):
  Collecting setuptools>=40.6.0
    Using cached setuptools-56.0.0-py3-none-any.whl (784 kB)
  Collecting wheel
    Using cached wheel-0.36.2-py2.py3-none-any.whl (35 kB)
  Collecting cffi>=1.12
    Using cached cffi-1.14.5.tar.gz (475 kB)
  Collecting setuptools-rust>=0.11.4
    Using cached setuptools_rust-0.12.1-py3-none-any.whl (22 kB)
  Collecting pycparser
    Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)
  Collecting toml>=0.9.0
    Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
  Collecting semantic-version>=2.6.0
    Using cached semantic_version-2.8.5-py2.py3-none-any.whl (15 kB)
  Using legacy 'setup.py install' for cffi, since package 'wheel' is not installed.
  Installing collected packages: setuptools, wheel, pycparser, cffi, toml, semantic-version, setuptools-rust
      Running setup.py install for cffi: started
      Running setup.py install for cffi: finished with status 'error'
      ERROR: Command errored out with exit status 1:
       command: /opt/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/share/MD0_DATA/.qpkg/Entware/tmp/pip-install-t8_qxfof/cffi/setup.py'"'"'; __file__='"'"'/share/MD0_DATA/.qpkg/Entware/tmp/pip-install-t8_qxfof/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /share/MD0_DATA/.qpkg/Entware/tmp/pip-record-btt8runl/install-record.txt --single-version-externally-managed --prefix /share/MD0_DATA/.qpkg/Entware/tmp/pip-build-env-0b_w8ppn/overlay --compile --install-headers /share/MD0_DATA/.qpkg/Entware/tmp/pip-build-env-0b_w8ppn/overlay/include/python3.9/cffi
           cwd: /share/MD0_DATA/.qpkg/Entware/tmp/pip-install-t8_qxfof/cffi/
      Complete output (36 lines):
      running install
      running build
      running build_py
      creating build
      creating build/lib.linux-armv5tel-3.9
      creating build/lib.linux-armv5tel-3.9/cffi
      copying cffi/model.py -> build/lib.linux-armv5tel-3.9/cffi
      copying cffi/error.py -> build/lib.linux-armv5tel-3.9/cffi
      copying cffi/recompiler.py -> build/lib.linux-armv5tel-3.9/cffi
      copying cffi/commontypes.py -> build/lib.linux-armv5tel-3.9/cffi
      copying cffi/__init__.py -> build/lib.linux-armv5tel-3.9/cffi
      copying cffi/verifier.py -> build/lib.linux-armv5tel-3.9/cffi
      copying cffi/backend_ctypes.py -> build/lib.linux-armv5tel-3.9/cffi
      copying cffi/vengine_cpy.py -> build/lib.linux-armv5tel-3.9/cffi
      copying cffi/api.py -> build/lib.linux-armv5tel-3.9/cffi
      copying cffi/cparser.py -> build/lib.linux-armv5tel-3.9/cffi
      copying cffi/pkgconfig.py -> build/lib.linux-armv5tel-3.9/cffi
      copying cffi/vengine_gen.py -> build/lib.linux-armv5tel-3.9/cffi
      copying cffi/lock.py -> build/lib.linux-armv5tel-3.9/cffi
      copying cffi/cffi_opcode.py -> build/lib.linux-armv5tel-3.9/cffi
      copying cffi/setuptools_ext.py -> build/lib.linux-armv5tel-3.9/cffi
      copying cffi/ffiplatform.py -> build/lib.linux-armv5tel-3.9/cffi
      copying cffi/_cffi_include.h -> build/lib.linux-armv5tel-3.9/cffi
      copying cffi/parse_c_type.h -> build/lib.linux-armv5tel-3.9/cffi
      copying cffi/_embedding.h -> build/lib.linux-armv5tel-3.9/cffi
      copying cffi/_cffi_errors.h -> build/lib.linux-armv5tel-3.9/cffi
      running build_ext
      building '_cffi_backend' extension
      creating build/temp.linux-armv5tel-3.9
      creating build/temp.linux-armv5tel-3.9/c
      gcc -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -pipe -mtune=xscale -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=soft -O2 -pipe -mtune=xscale -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=soft -DNDEBUG -fno-inline -pthread -O2 -pipe -mtune=xscale -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=soft -DNDEBUG -fno-inline -pthread -I/media/ware4/Entware.2021.03/staging_dir/toolchain-arm_xscale_gcc-8.4.0_glibc-2.27_eabi/include -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/opt/include/python3.9 -c c/_cffi_backend.c -o build/temp.linux-armv5tel-3.9/c/_cffi_backend.o
      c/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory
       #include <ffi.h>
                ^~~~~~~
      compilation terminated.
      error: command '/opt/bin/gcc' failed with exit code 1
      ----------------------------------------
  ERROR: Command errored out with exit status 1: /opt/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/share/MD0_DATA/.qpkg/Entware/tmp/pip-install-t8_qxfof/cffi/setup.py'"'"'; __file__='"'"'/share/MD0_DATA/.qpkg/Entware/tmp/pip-install-t8_qxfof/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /share/MD0_DATA/.qpkg/Entware/tmp/pip-record-btt8runl/install-record.txt --single-version-externally-managed --prefix /share/MD0_DATA/.qpkg/Entware/tmp/pip-build-env-0b_w8ppn/overlay --compile --install-headers /share/MD0_DATA/.qpkg/Entware/tmp/pip-build-env-0b_w8ppn/overlay/include/python3.9/cffi Check the logs for full command output.
  WARNING: You are using pip version 20.2.3; however, version 21.0.1 is available.
  You should consider upgrading via the '/opt/bin/python3 -m pip install --upgrade pip' command.
  ----------------------------------------
ERROR: Command errored out with exit status 1: /opt/bin/python3 /opt/lib/python3.9/site-packages/pip install --ignore-installed --no-user --prefix /share/MD0_DATA/.qpkg/Entware/tmp/pip-build-env-0b_w8ppn/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.6.0' wheel 'cffi>=1.12; platform_python_implementation != '"'"'PyPy'"'"'' 'setuptools-rust>=0.11.4' Check the logs for full command output.
WARNING: You are using pip version 20.2.3; however, version 21.0.1 is available.
You should consider upgrading via the '/opt/bin/python3 -m pip install --upgrade pip' command.
= ***** stdout/stderr is complete *****

Currently: TS-653D
Retired: TS-419+
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 »

If you only recently reinstalled Entware, then no-need to do it again.

It’s the end of my day here so I’ll check this out in the morning.

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
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 »

OneCD wrote: Mon Apr 19, 2021 6:12 am
Knuspar wrote: Mon Apr 19, 2021 5:57 am

Code: Select all

= command: '/bin/sh /share/MD0_DATA/.qpkg/sherpa/cache/qpkgs/Par2_0.8.1.0_arm-x41.qpkg'
Hmm, that's odd. The x41 QPKG has been selected for your x19 NAS. :'
This problem is now fixed.

I'm investigating the PIP compilation sequence. It works fine every time on my test NAS but seems to fail on some x19 NAS. :(

BTW: I decided to purchase a cheap EOL x19-type NAS for testing - should arrive in a few days. :)

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
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 »

Knuspar wrote: Mon Apr 19, 2021 5:13 pm Update: Tried running it:

[~] # sherpa reinstall ew
sherpa 210418 • a mini-package-manager for QNAP NAS

done: updated package cache with 1 QPKG
done: uninstalled 1 standalone QPKG
done: installed 1 standalone QPKG
done: downloaded & installed 57 IPKGs
fail: Download & install 'Python3' modules failed ! result_code: [1]
fail: Installed 1 PIP group failed
And this is also (hopefully) fixed. :DD

As your last reinstall was interrupted, please try to reinstall Entware again:

Code: Select all

sherpa clean
sherpa reinstall ew

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 »

OneCD wrote: Tue Apr 20, 2021 3:04 am BTW: I decided to purchase a cheap EOL x19-type NAS for testing - should arrive in a few days. :)
haha .. thats insane - TY for the effort in here <3
OneCD wrote: Tue Apr 20, 2021 3:50 am
Knuspar wrote: Mon Apr 19, 2021 5:13 pm Update: Tried running it:

[~] # sherpa reinstall ew
sherpa 210418 • a mini-package-manager for QNAP NAS

done: updated package cache with 1 QPKG
done: uninstalled 1 standalone QPKG
done: installed 1 standalone QPKG
done: downloaded & installed 57 IPKGs
fail: Download & install 'Python3' modules failed ! result_code: [1]
fail: Installed 1 PIP group failed
And this is also (hopefully) fixed. :DD

As your last reinstall was interrupted, please try to reinstall Entware again:

Code: Select all

sherpa clean
sherpa reinstall ew
Sadly that dident help, I still get the same message :-/

Did a sherpa paste all again -> https://termbin.com/bx23
Currently: TS-653D
Retired: TS-419+
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 »

Knuspar wrote: Tue Apr 20, 2021 2:08 pm Sadly that dident help, I still get the same message :-/

Did a sherpa paste all again -> https://termbin.com/bx23
:(

I wonder if this occurred when I stopped using the 'python3-cryptography' IPKG and started using the 'cryptography' PIP module in its place? I'll try switching these back.

Testing now... be back shortly. :geek:

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: Tue Apr 20, 2021 3:04 am ....
I'm investigating the PIP compilation sequence. It works fine every time on my test NAS but seems to fail on some x19 NAS. :(
....
I have tested pip compilation (from Entware wiki) on my x19 TS121 without problems. I've used upgraded Entware. The official Entware upgrade will be in few days, may be even today.
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 »

zyxmon wrote: Tue Apr 20, 2021 2:30 pm I have tested pip compilation (from Entware wiki) on my x19 TS121 without problems. I've used upgraded Entware. The official Entware upgrade will be in few days, may be even today.
Ah nice! Thanks @zyxmon. :)

Actually, while you're there: is it better to use the Python3 IPKG modules instead of installing them via PIP? Is the reason Entware has Python3 IPKGs so they won't need to be compiled via PIP?

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: Tue Apr 20, 2021 2:37 pm
zyxmon wrote: Tue Apr 20, 2021 2:30 pm I have tested pip compilation (from Entware wiki) on my x19 TS121 without problems. I've used upgraded Entware. The official Entware upgrade will be in few days, may be even today.
Ah nice! Thanks @zyxmon. :)

Actually, while you're there: is it better to use the Python3 IPKG modules instead of installing them via PIP? Is the reason Entware has Python3 IPKGs so they won't need to be compiled via PIP?
We just follow openwrt approach. Some ipk have patches that users will not apply - https://github.com/Entware/entware-pack ... hy/patches
Some binaries depend on python packages.
BTW It was not easy to build python-cryptology some time ago.
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 »

zyxmon wrote: Tue Apr 20, 2021 3:02 pm We just follow openwrt approach. Some ipk have patches that users will not apply - https://github.com/Entware/entware-pack ... hy/patches
Some binaries depend on python packages.
BTW It was not easy to build python-cryptology some time ago.
I see. Thank you. :D

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
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 »

Knuspar wrote: Tue Apr 20, 2021 2:08 pm Sadly that dident help, I still get the same message :-/
OK, I've just pushed a mod that installs the 'python3-cryptography' IPKG.

Your log indicates the Par2 QPKG is missing. This means there's some remnant of it left behind in qpkg.conf. To remove this:

Code: Select all

rmcfg Par2 -f /etc/config/qpkg.conf
... then please clean your management script so your NAS will grab the updated one I've just pushed to GitHub:

Code: Select all

sherpa clean
... then reinstall Entware again:

Code: Select all

sherpa reinstall ew

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
Post Reply

Return to “Community Apps”