tavinus / opkg-upgrade

List and install OpenWRT / LEDE opkg upgradable packages
319 stars 61 forks source link

Package for openwrt #4

Open candrews opened 5 years ago

candrews commented 5 years ago

Could you package this and submit it as a pull request to openwrt? https://github.com/openwrt/openwrt/pulls

It would be really great to be able to run opkg install opkg-upgrade :+1:

tavinus commented 5 years ago

I guess that would be nice.
I am not familiar with creating packages though.
~Do you know where I can find documentation on packaging?~


I may find the time to do this in a few days...
Cheers!

tavinus commented 5 years ago

Some search results for studying:

This needs no compiling, so should be easy.

Other things to consider:

sml156 commented 5 years ago

There is a discussion on the Openwrt forum's recently

Source: https://forum.openwrt.org/t/info-for-beginners-update-your-packages/25845

Well, following your advice will brick many devices.

The storage space is the first killer for most devices, and the possible dependency issues is the second one.

Opkg is a lightweight package manager for resource limited devices, and its main purpose is to enable users to install a few additional packages to their devices. It can also be used to upgrade inidividual packages selectively, if you know what you do. But for a reason it does not contain a mass-update command. You created that feature via external script...

The idea of regularly blindly upgrading all packages with crontab is even worse as there is e.g. no earlier check for free flash space.

Just remember that Openwrt targets resource constrained devices using some 50 different hardware architectures, so functionality is reduced and everything does not work like in a x86-only major Linux distro.

tavinus commented 5 years ago

He is not wrong on that.
That is why I have warnings about that kind of stuff on the readme.md.

That being said, it has become a lot more common for people to use extroot (because USB is common now), or have a decent flash size (e.g. 128Mb) or even an ext4 install on x86 for example. On those cases it makes sense to try and keep it updated, even though you should still try to re-flash with a new image from time to time, since that will also free some space and update the packages on the squashfs partition (does not apply to ext4, obviously).

I agree it is not good practice to update unattended (from cron). You may have to merge/revise config files, or even break something with a new version of a package. On which case you will probably have to check/fix manually, before you reboot.

One could use opkg-upgrade's email report on cron to know when updates are available and then update manually to avoid those problems.

I really wanted to have a way to select the updates to be installed.
But that is not so trivial from CLI and I am quite busy right now.

Also, opkg-upgrade is just a single ash script. Easy to just download and run (no biggie on not having a package, you just need a oneliner to install).

Thanks for the link! I will try to keep an eye on that.
Cheers!
Gus