Offline upgrade

Moderators: Gully, peteru

Post Reply
User avatar
adoxa
Wizard
Posts: 1490
Joined: Thu Feb 23, 2017 22:58
Location: CQ
Contact:

Offline upgrade

Post by adoxa » Sun Mar 12, 2017 21:34

I don't have a network (judging from what I've read so far, I may be the only one :roll:), so my T2 cannot perform online updates. Attached is a series of scripts to perform an offline upgrade, using a bit of back-and-forth between your PVR and computer. Windows users will need c­url; others will need to port the batch files. Instructions are included, but the basic process is: run setup-upgrade.sh on the PVR to switch the feeds to file (and run again to restore); run get-lists.bat on the computer to update the packages lists; run get-upgrade-list.sh on the PVR to update the lists and get a list of upgradable packages; run get-packages.bat on the computer to get the packages; then finally do a normal software update on the PVR to install.
Attachments
offline-upgrade.zip
(3.71 KiB) Downloaded 103 times
Last edited by adoxa on Tue Feb 13, 2018 15:34, edited 6 times in total.

User avatar
MrQuade
Uber Wizard
Posts: 11844
Joined: Sun Jun 24, 2007 13:40
Location: Perth

Re: Offline upgrade

Post by MrQuade » Sun Mar 12, 2017 21:43

Cripes. That's rather a lot of effort!
Logitech Harmony Ultimate+Elite RCs
Beyonwiz T2/3/U4/V2, DP-S1 PVRs
Denon AVR-X3400h, LG OLED65C7T TV
QNAP TS-410 NAS, Centos File Server (Hosted under KVM)
Ubiquiti UniFi Managed LAN/WLAN, Draytek Vigor130/Asus RT-AC86U Internet
Pixel 4,5&6, iPad 3 Mobile Devices

User avatar
Gully
Moderator
Posts: 7736
Joined: Thu Aug 30, 2007 22:08
Location: Melbourne

Re: Offline upgrade

Post by Gully » Sun Mar 12, 2017 21:47

Hi Adoxa

Welcome and glad to see your contribution made it. :wink:

Have you considered powerline or wireless networking?

It would be a lot less hassle.
Cheers
Gully
_____________
Beyonwiz U4
Logitech Harmony Elite
Google Pixel 6 Pro

User avatar
adoxa
Wizard
Posts: 1490
Joined: Thu Feb 23, 2017 22:58
Location: CQ
Contact:

Re: Offline upgrade

Post by adoxa » Sun Mar 12, 2017 22:03

Powerline? I could perhaps take the WiFi dongle out of the desktop and try it in the PVR, then use the laptop as an access point, or connect the PVR & laptop via ethernet. In both instances, I'd still need the USB modem to get a signal within range of the WiFi. So there's hassle anyway I go.

User avatar
Gully
Moderator
Posts: 7736
Joined: Thu Aug 30, 2007 22:08
Location: Melbourne

Re: Offline upgrade

Post by Gully » Sun Mar 12, 2017 22:25

adoxa wrote:Powerline? I could perhaps take the WiFi dongle out of the desktop and try it in the PVR, then use the laptop as an access point, or connect the PVR & laptop via ethernet. In both instances, I'd still need the USB modem to get a signal within range of the WiFi. So there's hassle anyway I go.
Powerline adapters use the mains power circuit for networking. So you plug one into a power point near the Beyonwiz and use an ethernet cable from that to the Beyonwiz. Same thing near your desktop.

Main proviso is where they are plugged in needs to be on the same circuit.

Here's an example of one but of course there are other makes and other speeds.

http://www.tp-link.com.au/products/deta ... P-KIT.html
Cheers
Gully
_____________
Beyonwiz U4
Logitech Harmony Elite
Google Pixel 6 Pro

User avatar
MrQuade
Uber Wizard
Posts: 11844
Joined: Sun Jun 24, 2007 13:40
Location: Perth

Re: Offline upgrade

Post by MrQuade » Sun Mar 12, 2017 22:26

adoxa wrote:Powerline?
He means something like this.

You may also be able to buy a router with a wireless access point that can accommodate your USB modem (I assume you are on 4G Internet or similar). Having a dedicated router​ simplifies a lot of network hassles of your connection allows it.

Edit: beaten by Gully. Similar suggestion though :)
Logitech Harmony Ultimate+Elite RCs
Beyonwiz T2/3/U4/V2, DP-S1 PVRs
Denon AVR-X3400h, LG OLED65C7T TV
QNAP TS-410 NAS, Centos File Server (Hosted under KVM)
Ubiquiti UniFi Managed LAN/WLAN, Draytek Vigor130/Asus RT-AC86U Internet
Pixel 4,5&6, iPad 3 Mobile Devices

User avatar
adoxa
Wizard
Posts: 1490
Joined: Thu Feb 23, 2017 22:58
Location: CQ
Contact:

Re: Offline upgrade

Post by adoxa » Sun Mar 12, 2017 22:37

$136, don't think so. I'm using a Telstra Turbo modem, so NextG. :) We almost had the nbn installed, but cancelled it, as it turns out we won't be needing it for the home phone.

User avatar
peteru
Uber Wizard
Posts: 9735
Joined: Tue Jun 12, 2007 23:06
Location: Sydney, Australia
Contact:

Re: Offline upgrade

Post by peteru » Mon Mar 13, 2017 00:36

Cat5e cable and Internet Connection Sharing on the PC? You can get a 30m cable for under $10.

"Beauty lies in the hands of the beer holder."
Blog.

dRdoS7
Wizard
Posts: 1097
Joined: Tue Sep 22, 2015 11:47

Re: Offline upgrade

Post by dRdoS7 » Mon Mar 13, 2017 07:33

Hi,
adoxa wrote:Attached is a series of scripts to perform an offline upgrade, using a bit of back-and-forth between your PVR and computer.
I like that idea. Maybe I can use it (modified) and prevent the T2 from re-installing the plugins I don't want every time I do an online update.

Thanks,

dRdoS7

User avatar
Gully
Moderator
Posts: 7736
Joined: Thu Aug 30, 2007 22:08
Location: Melbourne

Re: Offline upgrade

Post by Gully » Mon Mar 13, 2017 11:05

adoxa wrote:$136, don't think so. I'm using a Telstra Turbo modem, so NextG. :) We almost had the nbn installed, but cancelled it, as it turns out we won't be needing it for the home phone.
They were on special last week at $99 but each to their own.
Cheers
Gully
_____________
Beyonwiz U4
Logitech Harmony Elite
Google Pixel 6 Pro

Grumpy_Geoff
Uber Wizard
Posts: 6490
Joined: Thu Mar 05, 2009 22:54
Location: Perth

Re: Offline upgrade

Post by Grumpy_Geoff » Mon Mar 13, 2017 12:35

A pair of TP-LINK TL-PA211s is $49 at MSY (50Mbit/s, https://forums.whirlpool.net.au/archive ... #r31460485, and 40Mbit/s http://apcmag.com/power-me-up-tp-link-t ... eview.htm/)
A pair of TP-LINK TL-PA411s is $59.00,
http://www.msy.com.au/66-power-linesmart-plug


A wireless ethernet bridge can be had cheap also.
For example, this $39 TP-Link access point can also operate in ethernet bridge mode ("Client Mode") -
http://www.tp-link.com/lk/products/deta ... 801ND.html
http://www.tp-link.com/lk/faq-493.html

The $49 D-Link access point can also operate in ethernet bridge mode ("Wireless Client Mode")
http://www.dlink.com.au/home-solutions/ ... cess-point

User avatar
adoxa
Wizard
Posts: 1490
Joined: Thu Feb 23, 2017 22:58
Location: CQ
Contact:

Re: Offline upgrade

Post by adoxa » Mon Mar 13, 2017 23:28

Gee, you're all pretty keen on getting me networked. Having telnet would be handy, but otherwise I'm content to leave the box offline.
dRdoS7 wrote:Maybe I can use it (modified) and prevent the T2 from re-installing the plugins I don't want every time I do an online update.
It looks like there's code to exclude packages, but no way to set them. Try running

Code: Select all

opkg flag hold <packages>
[/size] and see how that goes.
Last edited by adoxa on Tue Mar 14, 2017 16:40, edited 1 time in total.

User avatar
peteru
Uber Wizard
Posts: 9735
Joined: Tue Jun 12, 2007 23:06
Location: Sydney, Australia
Contact:

Re: Offline upgrade

Post by peteru » Mon Mar 13, 2017 23:45

The dependency solver moves in mysterious ways. It may not do everything that you want it to or it may do more than you wanted.

I managed to get a recent version of opkg into the 16.1 firmware, but opkg could still use more improvements. In particular, the solver backend capabilities are a bit of a tough one. The native solver can do some things that external solvers can't do, but it's perhaps not as good/robust.

By all means dRdoS7, experiment and try to make it do your bidding, but if things go pear-shaped, please ensure that the issue is present on a "standard" installation before reporting bugs.

"Beauty lies in the hands of the beer holder."
Blog.

dRdoS7
Wizard
Posts: 1097
Joined: Tue Sep 22, 2015 11:47

Re: Offline upgrade

Post by dRdoS7 » Tue Mar 14, 2017 07:11

Hi,
peteru wrote:The dependency solver moves in mysterious ways. It may not do everything that you want it to or it may do more than you wanted.

I managed to get a recent version of opkg into the 16.1 firmware, but opkg could still use more improvements. In particular, the solver backend capabilities are a bit of a tough one. The native solver can do some things that external solvers can't do, but it's perhaps not as good/robust.

By all means dRdoS7, experiment and try to make it do your bidding, but if things go pear-shaped, please ensure that the issue is present on a "standard" installation before reporting bugs.
If the online update didn't insist on re-installing plugins I've removed (HBBTV, WebCam, Gmail, & IceTV), I wouldn't need to experiment. :roll:

When I update, the number of packages is XX, but when the upgrade is completed it's XX+4. Is that "dependency solver" in action?

dRdoS7

dRdoS7
Wizard
Posts: 1097
Joined: Tue Sep 22, 2015 11:47

Re: Offline upgrade

Post by dRdoS7 » Tue Mar 14, 2017 15:35

Hi,

I tried the bats & scripts, eventually, but there's nothing to update with yet!

I found it doesn't like spaces in dir names though, both OSes (OSs?) threw a "wobbly".

drdoS7

prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Offline upgrade

Post by prl » Tue Mar 14, 2017 16:16

dRdoS7 wrote:...
I found it doesn't like spaces in dir names though, both OSes (OSs?) threw a "wobbly".
...
In shell scripts

"$var"

is your friend when there are spaces in the variable's contents.

Quoting in .bat files, though, requires the use of the Black Arts.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

User avatar
adoxa
Wizard
Posts: 1490
Joined: Thu Feb 23, 2017 22:58
Location: CQ
Contact:

Re: Offline upgrade

Post by adoxa » Tue Mar 14, 2017 16:54

dRdoS7 wrote:I found it doesn't like spaces in dir names though, both OSes (OSs?) threw a "wobbly".
I considered wrapping variables in quotes, but decided to keep it simple, since spaces weren't used anywhere. I guess you must have extracted to a directory with spaces? If you really want spaces, I'll fix 'em... (And it turns out "OSs" is correct.)

dRdoS7
Wizard
Posts: 1097
Joined: Tue Sep 22, 2015 11:47

Re: Offline upgrade

Post by dRdoS7 » Tue Mar 14, 2017 21:53

Hi,
adoxa wrote:
dRdoS7 wrote:I found it doesn't like spaces in dir names though, both OSes (OSs?) threw a "wobbly".
I considered wrapping variables in quotes, but decided to keep it simple, since spaces weren't used anywhere. I guess you must have extracted to a directory with spaces? If you really want spaces, I'll fix 'em... (And it turns out "OSs" is correct.)
No, I let the zip extract to the named directory, but then I copied the files to a USB stick into a dir with spaces. I've re-named it now, so I wouldn't bother to do anything to the files.

I'm sure others will read this thread, and now know not to have spaces in the dir name. :)

Just need some updates to try it out on.

Thanks,

dRdoS7

prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Offline upgrade

Post by prl » Tue Mar 14, 2017 22:04

adoxa wrote:
dRdoS7 wrote:... OSes (OSs?) ...
... it turns out "OSs" is correct.)
My old AGPS Style Guide is in agreement. I still think it looks odd, though. :)
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

dRdoS7
Wizard
Posts: 1097
Joined: Tue Sep 22, 2015 11:47

Re: Offline upgrade

Post by dRdoS7 » Fri Feb 09, 2018 09:12

Hi,

I've found that when I have Iansav's Feed (enigma2-plugin-systemplugins-IanSavBeyonwizFeed_1.10_all.ipk) enabled, it creates errors in offline-upgrade.

This when running setup-upgrade.sh:

Offline Upgrade-01.jpg

It creates an IanSav-Plugins directory OK.

This when running get-lists.bat:

Code: Select all

Updating package lists .curl: (6) Couldn't resolve host 'src.beyonwiz.org'
curl: (6) Couldn't resolve host 'IanSav-Plugins'
¬((Z //DATA/Project/Enigma2/Website-IanSav/feeds/Beyonwiz/IanSav-Plugins ¢öMS█0å´·:ûíV$█‗GZÿ┬P
30╔ÈöÚ-#╦ró┴Â\YNª?¥J▄  ä8õ`═¯f¸}̦!Òwl,·PTr\2ήïv,+'å9╔L>╣Qº÷Ò\ê▄
¦HU§!A£ëåkYøÕC
ìéïLÏÍ3µ6     µJ├S1WıLÌ├-EçÀ▀ÌÑ/Æ└PKÑÑÖ¸íZVe©f▓2÷'t^▓*aS°¨2Aâ{ø■┼÷+─Uy«$Ucð6╝Ü║çÓD¾ë4Âz½Ý#+
0°║þRÆë1uË´§f│JÑI[~'Rz▄ÙZÚüsYêèò{╩7▓¬ìl/HÍw æ¸6-|p}FôÂýCÛ17µäÒLÉêr?êIFàö¿V¾¢fGi║ø╠û°Ðë6X¨8ê|³ÇïÕyÿ    ­8├íªöb¤¤Ê ▓ý┬ðMwÒj¯ñÝ`0║`¾ï│§¡▓vx┬Õ.Æ ½2X▓╩-Ee`Wo╣`âZTÀ‗þçM[D Ï¥o╦Ì}ß6╦¬¡­[N6nkîÛ
O2dâ>ıZ┼Uq┤¼meÁ
e═ÔÈt9ËNvGV╣éÄÅ       q\LBýî­³cuıT■~Kv0ã╗ìÂ1ýhw├QAå>  ,Õàîf®Õö¨îgäRÎ馢ê²ò╬F ├Gä^£1l´I╩ê╦úö°i×║uSÆµÕ ³┤oʬ│  ...... already up-to-date.
Press any key to continue . . .
feeds.lst:

Code: Select all

beta/17.5/inihde2/3rdparty
src/gz IanSav-Plugins https://iansav.bitbucket.io/feeds/Beyonwiz
beta/17.5/inihde2/all
beta/17.5/inihde2/beyonwizt2
beta/17.5/inihde2/inihde2
beta/17.5/inihde2/inihde2_3rdparty
beta/17.5/inihde2/mips32el

Thanks,

dRdoS7

IanSav
Uber Wizard
Posts: 16846
Joined: Tue May 29, 2007 15:00
Location: Melbourne, Australia

Re: Offline upgrade

Post by IanSav » Fri Feb 09, 2018 11:04

Hi dRdoS7,

This looks like a problem in the offline upgrade scripts written by Adoxa. Offline updates are not a standard feature.

The script appears to not be correctly processing all the available feeds.

Regards,
Ian.

dRdoS7
Wizard
Posts: 1097
Joined: Tue Sep 22, 2015 11:47

Re: Offline upgrade

Post by dRdoS7 » Fri Feb 09, 2018 17:53

Hi,
IanSav wrote:
Fri Feb 09, 2018 11:04
Hi dRdoS7,

This looks like a problem in the offline upgrade scripts written by Adoxa. Offline updates are not a standard feature.

The script appears to not be correctly processing all the available feeds.

Regards,
Ian.

Yes, that's why I posted in this thread.

dRdoS7
Last edited by dRdoS7 on Sun Feb 11, 2018 07:33, edited 1 time in total.

prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Offline upgrade

Post by prl » Sat Feb 10, 2018 11:50

At a minimum, the sed commands in setup-upgrade.sh need to be extended to account for IanSav's feed URL if they are to work on systems that have Ian's IanSavBeyonwizFeed plugin installed.

e.g, from:

Code: Select all

  sed -r "s,^.*(feeds|beta).*/beyonwiz/,\1/," $src/*-feed.conf >$dst/feeds.lst
  sed -ri~ "s,http://(feeds|beta)\.beyonwiz\.org/beyonwiz,file://$dst/\1," $src/*-feed.conf
to something like:
^.*(feeds|beta).*/beyonwiz/,\1/,
https?://((feeds|beta)\.beyonwiz\.org/beyonwiz|iansav.bitbucket.io/feeds)

Code: Select all

  sed -r "s,^.*((feeds|beta).*/beyonwiz/,\1/|iansav.bitbucket.io/feeds),\1," $src/*-feed.conf >$dst/feeds.lst
  sed -ri~ "s,https?://((feeds|beta)\.beyonwiz\.org/beyonwiz|iansav.bitbucket.io/feeds),file://$dst/\1," $src/*-feed.conf
Or better, in general, to match the proto://host/first_path_element part of any URL, though getting that right is going to be a bit harder.

There may be other changes necessary, though something like those changes in setup-upgrade.sh are definitely needed if adoxa's offline update is to co-exist with using IanSav's feeds.

In the short term, you may just have to use manual installation of OverlayHD and uninstall IanSavBeyonwizFeed.

NB: code examples are untested suggestions. E&OE.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

User avatar
adoxa
Wizard
Posts: 1490
Joined: Thu Feb 23, 2017 22:58
Location: CQ
Contact:

Re: Offline upgrade

Post by adoxa » Sat Feb 10, 2018 16:35

Updated the zip in the first post. It uses a new directory structure (swapped 'em around, so it's BOX/VERSION/FEED instead of FEED/VERSION/BOX). It should work with multiple boxes (i.e. run the script on each box, then once on the computer). It's not smart, though, so duplicate files are not detected and will be downloaded multiple times.

User avatar
adoxa
Wizard
Posts: 1490
Joined: Thu Feb 23, 2017 22:58
Location: CQ
Contact:

Re: Offline upgrade

Post by adoxa » Mon Feb 12, 2018 12:43

Turns out I didn't do it quite right, so updated again. This version should also be somewhat faster retrieving the updated packages. Still not smart, though.

dRdoS7
Wizard
Posts: 1097
Joined: Tue Sep 22, 2015 11:47

Re: Offline upgrade

Post by dRdoS7 » Tue Feb 13, 2018 09:04

Hi,
adoxa wrote:
Mon Feb 12, 2018 12:43
Turns out I didn't do it quite right, so updated again. This version should also be somewhat faster retrieving the updated packages. Still not smart, though.

Nearly there: :)


Error.jpg

Thanks,

dRdoS7

User avatar
adoxa
Wizard
Posts: 1490
Joined: Thu Feb 23, 2017 22:58
Location: CQ
Contact:

Re: Offline upgrade

Post by adoxa » Tue Feb 13, 2018 15:35

Oops. :oops:

Post Reply

Return to “Hacks & Tricks”