[SCRIPT] sherpa.sh

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
Know my way around
Posts: 235
Joined: Mon Oct 18, 2010 4:08 pm

Re: [SCRIPT] Sherpa

Post by dirkonline » Wed May 17, 2017 2:50 am

Okay. Should I still stop both Sickrage and SAB before removing Entware?

User avatar
dirkonline
Know my way around
Posts: 235
Joined: Mon Oct 18, 2010 4:08 pm

Re: [SCRIPT] Sherpa

Post by dirkonline » Wed May 17, 2017 2:53 am

Done:
#

Code: Select all

[/share/Public] # /etc/init.d/sabnzbd.sh stop
armv7l
Shutting down SABnzbdplus at Tue May 16 20:50:52 CEST 2017...
 Waiting for SABnzbdplus to shut down: 1, Done (Tue May 16 20:50:53 CEST 2017)
[/share/Public] # /etc/init.d/SickRage.sh stop
Shutting down SickRage...
 Waiting for SickRage to shut down: 1, 2, Done
[/share/Public] # sh /share/Public/sherpa.tmp/qpkg-downloads/Entware-3x_0.99std.qpkg
Install QNAP package on TS-NAS...
33+1 records in
33+1 records out
./
./qinstall.sh
./package_routines
./qpkg.cfg
0+1 records in
0+1 records out
3+1 records in
3+1 records out
Sym-link /opt ...
Info: Opkg package manager deployment...
Info: Basic packages installation...
Downloading http://entware-3x.zyxmon.org/binaries/armv7/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/packages
Installing entware-opt (1.0-4) to root...
Downloading http://entware-3x.zyxmon.org/binaries/armv7/entware-opt_1.0-4_armv7-3x.ipk
Installing libc (2.25-8) to root...
Downloading http://entware-3x.zyxmon.org/binaries/armv7/libc_2.25-8_armv7-3x.ipk
Installing libgcc (6.3.0-8) to root...
Downloading http://entware-3x.zyxmon.org/binaries/armv7/libgcc_6.3.0-8_armv7-3x.ipk
Installing libssp (6.3.0-8) to root...
Downloading http://entware-3x.zyxmon.org/binaries/armv7/libssp_6.3.0-8_armv7-3x.ipk
Installing librt (2.25-8) to root...
Downloading http://entware-3x.zyxmon.org/binaries/armv7/librt_2.25-8_armv7-3x.ipk
Installing libpthread (2.25-8) to root...
Downloading http://entware-3x.zyxmon.org/binaries/armv7/libpthread_2.25-8_armv7-3x.ipk
Installing libstdcpp (6.3.0-8) to root...
Downloading http://entware-3x.zyxmon.org/binaries/armv7/libstdcpp_6.3.0-8_armv7-3x.ipk
Installing busybox (1.25.1-2) to root...
Downloading http://entware-3x.zyxmon.org/binaries/armv7/busybox_1.25.1-2_armv7-3x.ipk
Installing zoneinfo-asia (2017b-1) to root...
Downloading http://entware-3x.zyxmon.org/binaries/armv7/zoneinfo-asia_2017b-1_armv7-3x.ipk
Installing zoneinfo-europe (2017b-1) to root...
Downloading http://entware-3x.zyxmon.org/binaries/armv7/zoneinfo-europe_2017b-1_armv7-3x.ipk
Installing findutils (4.6.0-1) to root...
Downloading http://entware-3x.zyxmon.org/binaries/armv7/findutils_4.6.0-1_armv7-3x.ipk
Installing terminfo (6.0-1c) to root...
Downloading http://entware-3x.zyxmon.org/binaries/armv7/terminfo_6.0-1c_armv7-3x.ipk
Installing locales (2.25-8) to root...
Downloading http://entware-3x.zyxmon.org/binaries/armv7/locales_2.25-8_armv7-3x.ipk
Configuring libgcc.
Configuring libc.
Configuring libssp.
Configuring libpthread.
Configuring librt.
Configuring terminfo.
Configuring locales.
Entware uses separate locale-archive file independent from main system
Creating locale archive - /opt/usr/lib/locale/locale-archive
Adding en_EN.UTF-8
Adding ru_RU.UTF-8
You can download locale sources from http://pkg.entware.net/sources/i18n_glib225.tar.gz
You can add new locales to Entware using /opt/bin/localedef.new
Configuring zoneinfo-europe.
Configuring busybox.
Warning: '/opt/bin/find' is already exists, skipping.
Warning: '/opt/bin/xargs' is already exists, skipping.
Configuring zoneinfo-asia.
Configuring libstdcpp.
Configuring findutils.
Configuring entware-opt.
Installing opkg (2011-04-08-9c97d5ec-17a) to root...
Downloading http://entware-3x.zyxmon.org/binaries/armv7/opkg_2011-04-08-9c97d5ec-17a_armv7-3x.ipk
Configuring opkg.
Link service start/stop script: Entware-3x.sh
Set QPKG information in /etc/config/qpkg.conf
Enable Entware-3x/opkg
[App Center] Entware-3x 0.99std installation succeeded.
[App Center] Entware-3x enabled.

User avatar
OneCD
Ask me anything
Posts: 6964
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] Sherpa

Post by OneCD » Wed May 17, 2017 2:54 am

dirkonline wrote:Okay. Should I still stop both Sickrage and SAB before removing Entware?

It shouldn't matter due to the way Linux manages its file handles, but couldn't hurt either. I mistakenly considered it before as I momentarily regressed into 'Windows' fixit mode. ;)

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

User avatar
OneCD
Ask me anything
Posts: 6964
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] Sherpa

Post by OneCD » Wed May 17, 2017 3:11 am

Your Entware-3x install looks OK. That shifts the problem to the sherpa installer script.

I'm just about out-of-time now, but I'll be back later today to continue this on my own NAS.

For the record, here's the part of sherpa.sh that I think is causing the problem:

Code: Select all

# save old /opt
opt_path="/opt"
opt_backup_path="/opt.orig"
[ -d "$opt_path" ] && [ ! -L "$opt_path" ] && [ ! -e "$opt_backup_path" ] && $MV_CMD "$opt_path" "$opt_backup_path"

LoadQPKGDownloadDetails "$PREF_ENTWARE" && InstallQPKG && ReloadProfile

# shift all files in old /opt into new /opt
[ -L "$opt_path" ] && [ -d "$opt_backup_path" ] && $MV_CMD "$opt_backup_path"/* "$opt_path" && $RM_CMD -r "$opt_backup_path"

The error is occuring after InstallQPKG exits. And there's only one 'mv' command after that point.

Any thoughts? If you're able to diagnose this, please do. :geek:

Oh, and if you run the sherpa installer now that Entware-3x is installed, it will skip the code I've shown above.

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

User avatar
dirkonline
Know my way around
Posts: 235
Joined: Mon Oct 18, 2010 4:08 pm

Re: [SCRIPT] Sherpa

Post by dirkonline » Wed May 17, 2017 3:20 am

That is a wee bit beyond my skill :p Thank you for putting all this work and time into this and my weird troubles

But, I will run the script again to make sure it is all working again... and done.
Something though, tells me that none of that is actually related to the weird thing I see in the logs and why we started looking, right? :/

User avatar
OneCD
Ask me anything
Posts: 6964
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] Sherpa

Post by OneCD » Wed May 17, 2017 4:15 am

That is my guess too. But I hope by working out why this error occurs, it may go someway towards explaining the original fault you reported. ;)

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

joedrew
New here
Posts: 2
Joined: Mon Dec 02, 2013 2:02 am

Re: [SCRIPT] Sherpa

Post by joedrew » Wed May 17, 2017 8:24 am

OneCD wrote:In the meantime, if you don't mind upgrading to Entware-3x, you could try uninstalling Entware-ng and re-running Sherpa.

And in fact, this worked around the bug! Thanks!! :D

User avatar
OneCD
Ask me anything
Posts: 6964
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] Sherpa

Post by OneCD » Wed May 17, 2017 8:26 am

Ah, thanks @joedrew. I pushed a fix for this to Github only this morning, but forgot to get back to you. I was assisting with another issue at the same time. :oops:

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

User avatar
dirkonline
Know my way around
Posts: 235
Joined: Mon Oct 18, 2010 4:08 pm

Re: [SCRIPT] Sherpa

Post by dirkonline » Wed May 17, 2017 12:50 pm

OneCD wrote:That is my guess too. But I hope by working out why this error occurs, it may go someway towards explaining the original fault you reported. ;)


I am most certainly keeping my fingers crossed. Since I have not seen Clinton on here in while, I did also go and open an issue on this GIT tracker for the script set -> https://github.com/clinton-hall/nzbToMedia/issues
Can't hurt to get feedback from Clinton if he has the time to read it and give it some thought. Since we went and installed it all multiple times, there might also be an issue with the scripts too and my setup.

User avatar
OneCD
Ask me anything
Posts: 6964
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] Sherpa

Post by OneCD » Thu May 18, 2017 1:57 am

dirkonline wrote:I am most certainly keeping my fingers crossed.

I've been checking out that section of code, and haven't been able to get it to fault. :S

But, I've changed the 'move' into a 'copy-then-delete', so that should alter the manifestation of the error regarding /opt/lib .

Can you try the new version as per the notes in the OP? If it faults again, can you please post your sherpa debug log?

Also, what is the current state of your SAB install? Is it working?

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

User avatar
dirkonline
Know my way around
Posts: 235
Joined: Mon Oct 18, 2010 4:08 pm

Re: [SCRIPT] Sherpa

Post by dirkonline » Thu May 18, 2017 2:00 am

I just got home. About to workout ;)
My SAB install is working. I am still getting those error messages in the post process log but after the weird bread down last night, things are back to normal after er reinstalled it all.. multiple times.
I will remove Entware later and then run the script again and give feedback. Latest tomorrow.
The whole error message during startup really makes zero sense to me.

User avatar
dirkonline
Know my way around
Posts: 235
Joined: Mon Oct 18, 2010 4:08 pm

Re: [SCRIPT] Sherpa

Post by dirkonline » Thu May 18, 2017 2:12 am

I just got home.

My SAB install is working. I am still getting those error messages in the post process log but after the weird bread down last night, things are back to normal after er reinstalled it all.. multiple times.
I will remove Entware later and then run the script again and give feedback. Latest tomorrow.
The whole error message during startup really makes zero sense to me.

here you go:

Code: Select all

[/share/Public] # /usr/bin/wget https://goo.gl/Qot9QK -qO sherpa.tar.gz && tar -zxvf sherpa.tar.gz
sherpa.sh
SABnzbdplus
SickRage
CouchPotato2
[/share/Public] # ./SABnzbdplus
sherpa.sh (2017.05.18b)

[ done ] downloaded QPKG (Entware-3x_0.99std.qpkg)
[ done ] downloaded QPKG (SABnzbdplus_170131.qpkg)
[ done ] installed QPKG (Entware-3x_0.99std.qpkg)
[ done ] updated 'Entware'
[ done ] downloaded & installed IPKs (various)
[ done ] downloaded & installed IPK (python-dev)
[ done ] installed (pip modules)
[ done ] daemon stopped (sabnzbd.sh)
[ done ] created SABnzbd settings backup
[ done ] uninstalled QPKG 'SABnzbdplus'
[ done ] installed QPKG (SABnzbdplus_170131.qpkg)
[ done ] daemon stopped (sabnzbd.sh)
[ done ] restored SABnzbd settings backup
[ done ] daemon started (sabnzbd.sh)

[ done ] SABnzbdplus has been successfully reinstalled!

[/share/Public] # /etc/init.d/sabnzbd.sh restart
armv7l
armv7l
Shutting down SABnzbdplus at Wed May 17 20:12:05 CEST 2017...
 Waiting for SABnzbdplus to shut down: 1, 2, Done (Wed May 17 20:12:07 CEST 2017)
armv7l
Performing SABnzbdplus prestartup checks at Wed May 17 20:12:07 CEST 2017...
HEAD is now at 80c8ad5 remove -o from 7zip. Reverses #1149 Fixes #1175
Already up-to-date.
 Checking environment
  Checking if all configured directories exist....... Done
  Creating Symbolic links for required utils. Done
Done
Already up-to-date.
Starting SABnzbdplus/share/CACHEDEV1_DATA/.qpkg/SABnzbdplus/Repository/lib/python/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_7882f2abxb4bfcf60.c:210:43: fatal error: CoreFoundation/CoreFoundation.h: No such file or directory
 #include <CoreFoundation/CoreFoundation.h>
                                           ^
compilation terminated.
 Done (Wed May 17 20:12:25 CEST 2017)


It helps to post it all, grrr

Code: Select all

Install QNAP package on TS-NAS...
./
./qinstall.sh
./package_routines
./qpkg.cfg
0+1 records in
0+1 records out
3+1 records in
3+1 records out
Sym-link /opt ...
Info: Opkg package manager deployment...
Info: Basic packages installation...
Downloading http://entware-3x.zyxmon.org/binaries/armv7/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/packages
Entware uses separate locale-archive file independent from main system
Creating locale archive - /opt/usr/lib/locale/locale-archive
Adding en_EN.UTF-8
Adding ru_RU.UTF-8
You can download locale sources from http://pkg.entware.net/sources/i18n_glib225.tar.gz
You can add new locales to Entware using /opt/bin/localedef.new
Warning: '/opt/bin/find' is already exists, skipping.
Warning: '/opt/bin/xargs' is already exists, skipping.
Installing entware-opt (1.0-4) to root...
Downloading http://entware-3x.zyxmon.org/binaries/armv7/entware-opt_1.0-4_armv7-3x.ipk
Installing libc (2.25-8) to root...
Downloading http://entware-3x.zyxmon.org/binaries/armv7/libc_2.25-8_armv7-3x.ipk
Installing libgcc (6.3.0-8) to root...
Downloading http://entware-3x.zyxmon.org/binaries/armv7/libgcc_6.3.0-8_armv7-3x.ipk
Installing libssp (6.3.0-8) to root...
Downloading http://entware-3x.zyxmon.org/binaries/armv7/libssp_6.3.0-8_armv7-3x.ipk
Installing librt (2.25-8) to root...
Downloading http://entware-3x.zyxmon.org/binaries/armv7/librt_2.25-8_armv7-3x.ipk
Installing libpthread (2.25-8) to root...
Downloading http://entware-3x.zyxmon.org/binaries/armv7/libpthread_2.25-8_armv7-3x.ipk
Installing libstdcpp (6.3.0-8) to root...
Downloading http://entware-3x.zyxmon.org/binaries/armv7/libstdcpp_6.3.0-8_armv7-3x.ipk
Installing busybox (1.25.1-2) to root...
Downloading http://entware-3x.zyxmon.org/binaries/armv7/busybox_1.25.1-2_armv7-3x.ipk
Installing zoneinfo-asia (2017b-1) to root...
Downloading http://entware-3x.zyxmon.org/binaries/armv7/zoneinfo-asia_2017b-1_armv7-3x.ipk
Installing zoneinfo-europe (2017b-1) to root...
Downloading http://entware-3x.zyxmon.org/binaries/armv7/zoneinfo-europe_2017b-1_armv7-3x.ipk
Installing findutils (4.6.0-1) to root...
Downloading http://entware-3x.zyxmon.org/binaries/armv7/findutils_4.6.0-1_armv7-3x.ipk
Installing terminfo (6.0-1c) to root...
Downloading http://entware-3x.zyxmon.org/binaries/armv7/terminfo_6.0-1c_armv7-3x.ipk
Installing locales (2.25-8) to root...
Downloading http://entware-3x.zyxmon.org/binaries/armv7/locales_2.25-8_armv7-3x.ipk
Configuring libgcc.
Configuring libc.
Configuring libssp.
Configuring libpthread.
Configuring librt.
Configuring terminfo.
Configuring locales.
Configuring zoneinfo-europe.
Configuring busybox.
Configuring zoneinfo-asia.
Configuring libstdcpp.
Configuring findutils.
Configuring entware-opt.
Installing opkg (2011-04-08-9c97d5ec-17a) to root...
Downloading http://entware-3x.zyxmon.org/binaries/armv7/opkg_2011-04-08-9c97d5ec-17a_armv7-3x.ipk
Configuring opkg.
Link service start/stop script: Entware-3x.sh
Set QPKG information in /etc/config/qpkg.conf
Enable Entware-3x/opkg
[App Center] Entware-3x 0.99std installation succeeded.
[App Center] Entware-3x enabled.
result=[10]
Last edited by dirkonline on Thu May 18, 2017 1:27 pm, edited 1 time in total.

User avatar
OneCD
Ask me anything
Posts: 6964
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] Sherpa

Post by OneCD » Thu May 18, 2017 2:29 am

dirkonline wrote:here you go:

Code: Select all

Starting SABnzbdplus/share/CACHEDEV1_DATA/.qpkg/SABnzbdplus/Repository/lib/python/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_7882f2abxb4bfcf60.c:210:43: fatal error: CoreFoundation/CoreFoundation.h: No such file or directory
 #include <CoreFoundation/CoreFoundation.h>
                                           ^
compilation terminated.

Thank you.

I've just been looking back at the previous posts regarding this - and have only just realised this was a fault that we hadn't been able to solve previously. :S

I'm working on a new SABnzbd QPKG (my own this time), and hope to release it this weekend. If your SAB is currently working, can you wait until this new one is released then try it out? I'll message here when it's done.

It is quite different to Clinton's QPKG, but uses his idea (and is based on his code) of a SAB wrapper that installs SAB via Git. But it doesn't create any repo directories for different arches (x31, ARM, etc...) and instead relies upon these to be available via Entware. Which I'm hoping will not mean errors like you're seeing. ;)

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

User avatar
dirkonline
Know my way around
Posts: 235
Joined: Mon Oct 18, 2010 4:08 pm

Re: [SCRIPT] Sherpa

Post by dirkonline » Thu May 18, 2017 2:41 am

Of course I can wait, no problem at all. I mean as long as you backup the config and the compiled version matches the architecture, it ought to work just the same and you would have full controll :)

User avatar
OneCD
Ask me anything
Posts: 6964
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] Sherpa

Post by OneCD » Thu May 18, 2017 2:46 am

Yup - that's what will happen. The main difference is: instead of going the long way around 3 sides of a square (A-B-C-D), we can get there via one-side (A-D). :DD

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

Post Reply

Return to “Community Apps”