[RFC] ApkWrt

Ariadne Conill ariadne at dereferenced.org
Sat Feb 12 10:24:31 PST 2022


Hi,

On Sat, 12 Feb 2022, Paul Spooren wrote:

> Hi all,
>
> For the last year or so[1] I’ve been working on replacing the package manager OPKG with APK (Alpine Package Keeper)[2]. Different from our OPKG fork is APK an actively developed project. OPKG is replaced entirely, both on device as well as the build system.

One thing that excites me about this is that, while it's not yet possible, 
it will eventually be possible to use any APK ecosystem build tool 
(through the magic of `apk mkpkg`) to build packages which targets 
OpenWrt (as long as the build recipe is aware of OpenWrt, of course).

So, this means that a project could have a CI pipeline which generates 
packages for Alpine (e.g. for server roles), and also for OpenWrt (e.g. 
for embedded).  This will unlock a lot of new possibilities for OpenWrt 
outside the traditional "router" space I think.

> Using some CI I started to build all available snapshot firmware images and published them for others to test[3]. Some targets fail to build but I’m working on it. Please feel free to give it a try and provide feedback!
>
> At this point only the base system is compiled without the community feeds, the installation of remote packages already works (e.g. `apk add tc-full`). Other commands like `apk audit` allow system integrity checks and more.
>
> The SDK already works to create `.apk` packages, the ImageBuilder requires a bit more work. Overall APK still depends on OpenSSL and libfetch, after getting the base up and running I’ll start to look into replacing those with more lightweight alternatives like WolfSSL and uclient-fetch.

I should actually have patches for this next week, just need to finish up 
the packaging for Alpine first.  Alpine is not particularly attached to 
OpenSSL.

> Within the next month I hope to create documentation in collaboration with Daniel to explain how APK, uvol and uxc can work together. Essentially it allows to install containers on OpenWrt devices. Just a few days ago we ran Alpine Linux within a container on a Belkin RT3200, simply installed from an `alpine.apk` package, the same works for Debian containers. In future this could allow to run arbitrary container setups on routers.

Interestingly, I have been proposing a similar idea in the OCI world, to 
use ADB (the underlying APKv3 structured data + filesystem image format) 
as a way to represent container layers.  So, I am very curious to see what 
you all have come up with on the OpenWrt side.

Ariadne


More information about the openwrt-devel mailing list