I developed a tool to convert binary OpenWrt packages from the old IPK (opkg) format to the new strict APK v2 format.
As OpenWrt transitions its package management system from opkg to Alpine Linux's apk, older .ipk packages are becoming incompatible. This tool acts as a bridge, repacking the contents and metadata of an .ipk into a fully native .apk v2 archive that is ready to be installed via apk add.
Key Use Case:
This tool makes it easy to utilize binary packages from downstream or older distributions that still use opkg (like Turris OS). It allows you to seamlessly install them on newer OpenWrt builds without the hassle of rebuilding from source!
Any non-trivial package depends on other packages, primarily libraries (libc, ssl, etc.), whose ABIs/ sonames do differ between 24.10.x (last release with opkg) and 25.12.x (first release using apk), so the packages will have to be rebuilt anyways. Some of the naming conventions had to be adapted for apk, so you can't just assume that they can be transposed. There've been quite considerable differences for themes (usually a rather static kind of package) and anything using wifi-scripts (not too uncommon on a wifi router).
So yes, doing this mechanical format conversion does kind of work - but there are very few use cases where that actually results in a functional package. Likewise it pretty much points towards a dead upstream and unmaintained software, respectively proprietary stuff - and even those tend to have libc dependencies.
fwiw OpenWRT already uses APK v3, while Alpine, Wolfi, Chainguard etc. are still on APK v2. (yes, I tried if I can use apko/melange with OpenWRT now. But it's to early)
You're right that APK v3 would be ideal. However, the apk tool is backward compatible, so version 2 APK files will still install and work perfectly fine (tested).
Yes, it is absolutely a workaround, and you are right about the compatibility risks – it's exactly the same risk as mixing packages across any different OpenWrt versions. I personally wrote this to solve a specific problem: installing simple, ABI-compatible packages from the Turris repository that aren't available upstream and would be a headache to rebuild from source. This is strictly a niche tool for legacy packages, simple scripts, or standalone binaries.