|
|
Subscribe / Log in / New account

A new package manager for OpenWrt

The OpenWrt router-oriented distribution has long used its own opkg package manager. The project has just announced, though, that future releases will use the apk package manager from Alpine Linux instead. "This new package manager offers a number of advantages over the older opkg system and is a significant milestone in the development of the OpenWrt platform. The older opkg package manager has been deprecated and is no longer part of OpenWrt." There is some more information on this page.

to post comments

Motivation

Posted Nov 17, 2024 14:40 UTC (Sun) by Kamiccolo (subscriber, #95159) [Link] (3 responses)

I wonder... what was the motivation?

Motivation

Posted Nov 17, 2024 16:17 UTC (Sun) by denials (subscriber, #3413) [Link] (1 responses)

Looks like maintenance: opkg was not maintained while APK is, because of it being core to Alpine (per this comment deep in the linked forum thread: https://forum.openwrt.org/t/the-future-is-now-opkg-vs-apk...)

Motivation

Posted Nov 17, 2024 18:03 UTC (Sun) by Kamiccolo (subscriber, #95159) [Link]

Agh, thanks! Haven't digged enough to this one through all the threads. Anyway, feels a bit weird not having any more decent explanation and ideas behind the choice along the announcement. May be be the issue with me not being connected to OpenWRT dev- community in any way, but as a user and enthusiast would love to hear more about these kind of changes.

Motivation

Posted Nov 18, 2024 10:51 UTC (Mon) by Tobu (subscriber, #24111) [Link]

These pull requests: package repository, OpenWRT (build side) have some rationale:

> Hi all, some fellow developers and me worked for some time now on making APK the new package manager for OpenWrt, replacing the unmaintained OPKG fork we've been using for the longest time.

> APK is actively developed and used in multiple other distributions, e.g. Alpine Linux 🎉

wonder about the footprint

Posted Nov 17, 2024 19:14 UTC (Sun) by shironeko (subscriber, #159952) [Link] (14 responses)

What a welcome surprise, opkg has been quite a pain for me when using openwrt but I understand the need for small footprint. I wonder how much apk will increase that given it's a much more capable system, hopefully it's well worth that price.

wonder about the footprint

Posted Nov 17, 2024 19:48 UTC (Sun) by champtar (subscriber, #128673) [Link] (12 responses)

For space constrained system you could imagine getting rid of the package manager entirely and only doing full image updates (with your own build or https://sysupgrade.openwrt.org/). Don't know if it's already possible today.

wonder about the footprint

Posted Nov 17, 2024 19:58 UTC (Sun) by shironeko (subscriber, #159952) [Link]

Yep it's what I do, but there's also the RAM constraint which is already making 64M RAM machine less useful.

wonder about the footprint

Posted Nov 18, 2024 14:35 UTC (Mon) by MKesper (subscriber, #38539) [Link] (10 responses)

A package manager is used to install additional tools, too. It's impractical to create a whole new image just for adding / removing one package.

wonder about the footprint

Posted Nov 19, 2024 7:19 UTC (Tue) by cate (subscriber, #1359) [Link] (7 responses)

How many times do you install new packages on a router? OTOH updates (and security updates) must be simple, so image may not be ideal but when there is no alternative (small footprint)

wonder about the footprint

Posted Nov 19, 2024 7:49 UTC (Tue) by Cyberax (✭ supporter ✭, #52523) [Link] (6 responses)

OpenWRT is not really a simple single-image router distribution. It's more of a general-purpose distro with a nice UI frontend for management. You can use it to host telephony, web servers, VPNs, and even Docker containers.

wonder about the footprint

Posted Nov 19, 2024 8:12 UTC (Tue) by intelfx (subscriber, #130118) [Link] (5 responses)

> OpenWRT is not really a simple single-image router distribution. It's more of a general-purpose distro with a nice UI frontend for management. You can use it to host telephony, web servers, VPNs, and even Docker containers.

And? This subthread's discussion happens in a context of worrying about the additional overhead caused by the switch to apk. I'm pretty sure that the installations where you worry about that kind of overhead aren't going to be hosting telephony, web servers, VPNs and Docker containers.

wonder about the footprint

Posted Nov 19, 2024 8:15 UTC (Tue) by Cyberax (✭ supporter ✭, #52523) [Link] (4 responses)

The minimum image size for OpenWRT is 32MB now. It _might_ work on 16MB. At these sizes, a distro manager overhead is not significant.

wonder about the footprint

Posted Nov 19, 2024 8:16 UTC (Tue) by intelfx (subscriber, #130118) [Link]

Even better — then the entire subthread is moot.

wonder about the footprint

Posted Nov 19, 2024 11:10 UTC (Tue) by e-rk (subscriber, #166547) [Link] (2 responses)

Where did you get the info about the 32 MB requirement? At least 16 MB is still listed as recommended [1] and personally I'm still 5.5 MB away from maxing-out a 16 MB device with OpenWRT 23.05 with some extra stuff installed, such as DAWN, dyndns, HTTPS DNS proxy, wireguard, etc.

[1] https://openwrt.org/toh/views/toh_available_16128_ax-wifi

wonder about the footprint

Posted Nov 19, 2024 18:30 UTC (Tue) by Cyberax (✭ supporter ✭, #52523) [Link] (1 responses)

They officially abandoned smaller devices some time ago. They _may_ work, but it's not guaranteed.

https://openwrt.org/supported_devices/432_warning

wonder about the footprint

Posted Nov 19, 2024 19:01 UTC (Tue) by e-rk (subscriber, #166547) [Link]

Seems like I got it all mixed up then. It looks like you were talking about the RAM, while I was talking about the FLASH. Now it all clicked. :-)

wonder about the footprint

Posted Nov 19, 2024 8:04 UTC (Tue) by intelfx (subscriber, #130118) [Link] (1 responses)

> A package manager is used to install additional tools, too. It's impractical to create a whole new image just for adding / removing one package.

If your system is space constrained *so much* that you begin to worry about the footprint of a *package manager*, this means you're far beyond the point where it would be feasible to install packages into the uncompressed partition.

In other words: if you don't have enough space for a better package manager, you sure as hell don't have enough space for any packages in the uncompressed partition. Any new packages would have to go into the squashfs.

wonder about the footprint

Posted Jan 8, 2025 15:33 UTC (Wed) by parametricpoly (subscriber, #143903) [Link]

Currently on devices with small amount of flash can't even store the package lists. Those are stored on RAM until reboot. It kind of works, but tells how tight the space is.

wonder about the footprint

Posted Nov 18, 2024 11:09 UTC (Mon) by aparcar (subscriber, #126277) [Link]

We're looking right now at 128KB in since but multiple features of APK are not used on running devices, like created the index etc.

The data structure including indexes of APKv3 (Alpine uses v2) is inspired by Flatbuffers (https://github.com/google/flatbuffers) and should be way more memory efficient than OPKG handling plaintext.

Farewell opkg

Posted Nov 18, 2024 15:41 UTC (Mon) by paulj (subscriber, #341) [Link] (1 responses)

So long opkg, thanks for everything!

First used opkg all the way back when it was ipkg, the Itsy Package Manager for Familiar Linux, the Handhelds.org distro for Compaq iPaq (and later some other handheld Linux's I think). Jim Gettys and Phil Blundell are LWN commenters and probably know more of the history.

Farewell opkg

Posted Nov 21, 2024 15:02 UTC (Thu) by jg (guest, #17537) [Link]

Ipkg came about, as I remember, because other package managers required using two different archive programs as part of themselves at the time, for no good reason I know. I'm forgetting who wrote ipkg of the top of my head. The neurons age after almost 30 years....

With limited flash, we couldn't afford the space used by the duplication: ergo ipkg...

OPKG as shell script

Posted Nov 18, 2024 16:20 UTC (Mon) by zoobab (guest, #9945) [Link] (1 responses)

I have some vague memories of OPKG being a simple shell script.

I am getting old...

OPKG as shell script

Posted Nov 21, 2024 15:03 UTC (Thu) by jg (guest, #17537) [Link]

Yup. Started life as a shell script is my memory as well.


Copyright © 2024, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds