The future is now: opkg vs apk

Managed to fix up the distfeeds.list. However, dependencies are missing:

root@OpenWRT-BUGS:/etc/apk/repositories.d# apk add nmap nmap-full nmap-ssl libstdc
fetch https://downloads.openwrt.org/releases/packages/arm_cortex-a15_neon-vfpv4/base/packages.adb
WARNING: updating and opening https://downloads.openwrt.org/releases/packages/arm_cortex-a15_neon-vfpv4/base/packages.adb: remote server returned error (try 'apk update')
fetch https://downloads.openwrt.org/releases/packages/arm_cortex-a15_neon-vfpv4/luci/packages.adb
WARNING: updating and opening https://downloads.openwrt.org/releases/packages/arm_cortex-a15_neon-vfpv4/luci/packages.adb: remote server returned error (try 'apk update')
fetch https://downloads.openwrt.org/releases/packages/arm_cortex-a15_neon-vfpv4/packages/packages.adb
WARNING: updating and opening https://downloads.openwrt.org/releases/packages/arm_cortex-a15_neon-vfpv4/packages/packages.adb: remote server returned error (try 'apk update')
ERROR: unable to select packages:
  libstdc (no such package):
    required by: world[libstdc]
  libstdcpp6 (no such package):
    required by: nmap-7.95-r1[libstdcpp6] nmap-ssl-7.95-r1[libstdcpp6] nmap-full-7.95-r1[libstdcpp6]
root@OpenWRT-BUGS:/etc/apk/repositories.d#

Anyway to resolve this one? Tried searching around for the .apk package but no luck so far.

in 2025 is planned to release stable serie with apk finally?

I'm looking forward for the migration!

So am I. Just shows how much work goes into it. We could have been waiting months for 24.10 if they had not decided to go without apk for the time being.

2 Likes

Hi!
Sorry, i am new to this and could not find an answer:
Why does luci package-manager report such huge requirements?

LuCI Shell Command Module
Require approx. 4.12 MiB size for 1 package(s) to install.

but:

apk info luci-app-commands
luci-app-commands-25.148.28444~09d3add installed size:
36 KiB
ubus call system board
"kernel": "6.12.30",
"hostname": "SZWLAN",
"system": "Qualcomm Atheros QCA956X ver 1 rev 0",
"model": "TP-Link Archer C7 v5",
"board_name": "tplink,archer-c7-v5",
"rootfs_type": "squashfs",
"release": {
	"distribution": "OpenWrt",
	"version": "SNAPSHOT",
	"firmware_url": "https://downloads.openwrt.org/",
	"revision": "r29829-f40250781d",
	"target": "ath79/generic",
	"description": "OpenWrt SNAPSHOT r29829-f40250781d",
	"builddate": "1748425168"
}
1 Like

That must be a bug somewhere, it's pretty clearly not the case.

$ apk fetch luci-app-commands
Downloading luci-app-commands-25.148.28444~09d3add

$ ll *.apk
-rw-r--r--    1 root root    5912 Dec 31  1969 luci-app-commands-25.148.28444~09d3add.apk

(What's up with that date stamp?)

$ apk adbdump luci-app-commands-25.148.28444\~09d3add.apk
... as expected, all the sizes are tiny ...

$ apk info --rdepends luci-app-commands

$ apk info --depends luci-app-commands
luci-app-commands-25.148.28444~09d3add depends on:
libc
luci-base

So, nothing weird in the dependencies other than things that will already be there, so should have zero impact. I wonder if that 4.12 MB is including luci-base and all of the stuff that would install if they weren't already there?

2 Likes

I kow, but did not find it here and want to ask if it's a known issue and/or it affects only me...

luci-app-commands was only a example.
it affects all packages and its clearly a bug.

here

Details for package luci-app-commands

Version: 25.148.28444~09d3add
Size: ~4.12 MiB installed
Dependencies:
    luci-base (4.12 MiB) Installed
        cgi-io (4.12 MiB) Installed
            libubox20241219 (4.12 MiB) Installed
            libubus20250516 (4.12 MiB) Installed
        liblucihttp-ucode (4.12 MiB) Installed
            liblucihttp0 (4.12 MiB) Installed
            libucode20230711 (4.12 MiB) Installed
                libjson-c5 (4.12 MiB) Installed
        rpcd (4.12 MiB) Installed
            libblobmsg-json20241219 (4.12 MiB) Installed
            libuci20250120 (4.12 MiB) Installed
        rpcd-mod-file (4.12 MiB) Installed
        rpcd-mod-luci (4.12 MiB) Installed
            libnl-tiny1 (4.12 MiB) Installed
        rpcd-mod-ucode (4.12 MiB) Installed
        ucode (4.12 MiB) Installed
        ucode-mod-fs (4.12 MiB) Installed
        ucode-mod-html (4.12 MiB) Installed
        ucode-mod-math (4.12 MiB) Installed
        ucode-mod-ubus (4.12 MiB) Installed
        ucode-mod-uci (4.12 MiB) Installed
1 Like

Having an issue with APK. Tried owut check, and it said not to update due to missing dependencies and like an idiot, I did apk update, and then apk upgrade. Here are the outputs. Trying to figure out how to manually install libubox.

root@OpenWrt:~# apk update
wget: Error loading shared library libubox.so.20240329: No such file or directory (needed by /usr/bin/wget)
wget: Error loading shared library libubox.so.20240329: No such file or directory (needed by /usr/lib/libuclient.so)
wget: Error relocating /usr/lib/libuclient.so: md5_end: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blob_buf_free: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_free: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blob_buf_init: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blobmsg_parse: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blobmsg_add_field: symbol not found
wget: Error relocating /usr/lib/libuclient.so: uloop_timeout_cancel: symbol not found
wget: Error relocating /usr/lib/libuclient.so: __calloc_a: symbol not found
wget: Error relocating /usr/lib/libuclient.so: usock_inet_timeout: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_write: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_get_read_buf: symbol not found
wget: Error relocating /usr/lib/libuclient.so: md5_hash: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_consume: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_printf: symbol not found
wget: Error relocating /usr/lib/libuclient.so: md5_begin: symbol not found
wget: Error relocating /usr/lib/libuclient.so: uloop_timeout_set: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_fd_init: symbol not found
wget: Error relocating /usr/bin/wget: uloop_done: symbol not found
wget: Error relocating /usr/bin/wget: blobmsg_parse: symbol not found
wget: Error relocating /usr/bin/wget: uloop_timeout_cancel: symbol not found
wget: Error relocating /usr/bin/wget: uloop_run_timeout: symbol not found
wget: Error relocating /usr/bin/wget: uloop_timeout_set: symbol not found
wget: Error relocating /usr/bin/wget: uloop_init: symbol not found
wget: Error relocating /usr/bin/wget: uloop_cancelled: symbol not found
ERROR: wget: exited with error 127
WARNING: updating https://downloads.openwrt.org/snapshots/targets/qualcommax/ipq807x/packages/packages.adb: unexpected end of file
wget: Error loading shared library libubox.so.20240329: No such file or directory (needed by /usr/bin/wget)
wget: Error loading shared library libubox.so.20240329: No such file or directory (needed by /usr/lib/libuclient.so)
wget: Error relocating /usr/lib/libuclient.so: md5_end: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blob_buf_free: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_free: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blob_buf_init: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blobmsg_parse: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blobmsg_add_field: symbol not found
wget: Error relocating /usr/lib/libuclient.so: uloop_timeout_cancel: symbol not found
wget: Error relocating /usr/lib/libuclient.so: __calloc_a: symbol not found
wget: Error relocating /usr/lib/libuclient.so: usock_inet_timeout: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_write: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_get_read_buf: symbol not found
wget: Error relocating /usr/lib/libuclient.so: md5_hash: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_consume: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_printf: symbol not found
wget: Error relocating /usr/lib/libuclient.so: md5_begin: symbol not found
wget: Error relocating /usr/lib/libuclient.so: uloop_timeout_set: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_fd_init: symbol not found
wget: Error relocating /usr/bin/wget: uloop_done: symbol not found
wget: Error relocating /usr/bin/wget: blobmsg_parse: symbol not found
wget: Error relocating /usr/bin/wget: uloop_timeout_cancel: symbol not found
wget: Error relocating /usr/bin/wget: uloop_run_timeout: symbol not found
wget: Error relocating /usr/bin/wget: uloop_timeout_set: symbol not found
wget: Error relocating /usr/bin/wget: uloop_init: symbol not found
wget: Error relocating /usr/bin/wget: uloop_cancelled: symbol not found
ERROR: wget: exited with error 127
WARNING: updating https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/base/packages.adb: unexpected end of file
wget: Error loading shared library libubox.so.20240329: No such file or directory (needed by /usr/bin/wget)
wget: Error loading shared library libubox.so.20240329: No such file or directory (needed by /usr/lib/libuclient.so)
wget: Error relocating /usr/lib/libuclient.so: md5_end: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blob_buf_free: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_free: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blob_buf_init: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blobmsg_parse: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blobmsg_add_field: symbol not found
wget: Error relocating /usr/lib/libuclient.so: uloop_timeout_cancel: symbol not found
wget: Error relocating /usr/lib/libuclient.so: __calloc_a: symbol not found
wget: Error relocating /usr/lib/libuclient.so: usock_inet_timeout: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_write: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_get_read_buf: symbol not found
wget: Error relocating /usr/lib/libuclient.so: md5_hash: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_consume: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_printf: symbol not found
wget: Error relocating /usr/lib/libuclient.so: md5_begin: symbol not found
wget: Error relocating /usr/lib/libuclient.so: uloop_timeout_set: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_fd_init: symbol not found
wget: Error relocating /usr/bin/wget: uloop_done: symbol not found
wget: Error relocating /usr/bin/wget: blobmsg_parse: symbol not found
wget: Error relocating /usr/bin/wget: uloop_timeout_cancel: symbol not found
wget: Error relocating /usr/bin/wget: uloop_run_timeout: symbol not found
wget: Error relocating /usr/bin/wget: uloop_timeout_set: symbol not found
wget: Error relocating /usr/bin/wget: uloop_init: symbol not found
wget: Error relocating /usr/bin/wget: uloop_cancelled: symbol not found
ERROR: wget: exited with error 127
WARNING: updating https://downloads.openwrt.org/snapshots/targets/qualcommax/ipq807x/kmods/6.6.84-1-600558e6320c90aebb4cc1b64377d091/packages.adb: unexpected end of file
wget: Error loading shared library libubox.so.20240329: No such file or directory (needed by /usr/bin/wget)
wget: Error loading shared library libubox.so.20240329: No such file or directory (needed by /usr/lib/libuclient.so)
wget: Error relocating /usr/lib/libuclient.so: md5_end: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blob_buf_free: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_free: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blob_buf_init: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blobmsg_parse: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blobmsg_add_field: symbol not found
wget: Error relocating /usr/lib/libuclient.so: uloop_timeout_cancel: symbol not found
wget: Error relocating /usr/lib/libuclient.so: __calloc_a: symbol not found
wget: Error relocating /usr/lib/libuclient.so: usock_inet_timeout: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_write: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_get_read_buf: symbol not found
wget: Error relocating /usr/lib/libuclient.so: md5_hash: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_consume: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_printf: symbol not found
wget: Error relocating /usr/lib/libuclient.so: md5_begin: symbol not found
wget: Error relocating /usr/lib/libuclient.so: uloop_timeout_set: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_fd_init: symbol not found
wget: Error relocating /usr/bin/wget: uloop_done: symbol not found
wget: Error relocating /usr/bin/wget: blobmsg_parse: symbol not found
wget: Error relocating /usr/bin/wget: uloop_timeout_cancel: symbol not found
wget: Error relocating /usr/bin/wget: uloop_run_timeout: symbol not found
wget: Error relocating /usr/bin/wget: uloop_timeout_set: symbol not found
wget: Error relocating /usr/bin/wget: uloop_init: symbol not found
wget: Error relocating /usr/bin/wget: uloop_cancelled: symbol not found
ERROR: wget: exited with error 127
WARNING: updating https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/luci/packages.adb: unexpected end of file
wget: Error loading shared library libubox.so.20240329: No such file or directory (needed by /usr/bin/wget)
wget: Error loading shared library libubox.so.20240329: No such file or directory (needed by /usr/lib/libuclient.so)
wget: Error relocating /usr/lib/libuclient.so: md5_end: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blob_buf_free: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_free: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blob_buf_init: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blobmsg_parse: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blobmsg_add_field: symbol not found
wget: Error relocating /usr/lib/libuclient.so: uloop_timeout_cancel: symbol not found
wget: Error relocating /usr/lib/libuclient.so: __calloc_a: symbol not found
wget: Error relocating /usr/lib/libuclient.so: usock_inet_timeout: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_write: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_get_read_buf: symbol not found
wget: Error relocating /usr/lib/libuclient.so: md5_hash: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_consume: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_printf: symbol not found
wget: Error relocating /usr/lib/libuclient.so: md5_begin: symbol not found
wget: Error relocating /usr/lib/libuclient.so: uloop_timeout_set: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_fd_init: symbol not found
wget: Error relocating /usr/bin/wget: uloop_done: symbol not found
wget: Error relocating /usr/bin/wget: blobmsg_parse: symbol not found
wget: Error relocating /usr/bin/wget: uloop_timeout_cancel: symbol not found
wget: Error relocating /usr/bin/wget: uloop_run_timeout: symbol not found
wget: Error relocating /usr/bin/wget: uloop_timeout_set: symbol not found
wget: Error relocating /usr/bin/wget: uloop_init: symbol not found
wget: Error relocating /usr/bin/wget: uloop_cancelled: symbol not found
ERROR: wget: exited with error 127
WARNING: updating https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/packages/packages.adb: unexpected end of file
wget: Error loading shared library libubox.so.20240329: No such file or directory (needed by /usr/bin/wget)
wget: Error loading shared library libubox.so.20240329: No such file or directory (needed by /usr/lib/libuclient.so)
wget: Error relocating /usr/lib/libuclient.so: md5_end: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blob_buf_free: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_free: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blob_buf_init: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blobmsg_parse: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blobmsg_add_field: symbol not found
wget: Error relocating /usr/lib/libuclient.so: uloop_timeout_cancel: symbol not found
wget: Error relocating /usr/lib/libuclient.so: __calloc_a: symbol not found
wget: Error relocating /usr/lib/libuclient.so: usock_inet_timeout: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_write: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_get_read_buf: symbol not found
wget: Error relocating /usr/lib/libuclient.so: md5_hash: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_consume: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_printf: symbol not found
wget: Error relocating /usr/lib/libuclient.so: md5_begin: symbol not found
wget: Error relocating /usr/lib/libuclient.so: uloop_timeout_set: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_fd_init: symbol not found
wget: Error relocating /usr/bin/wget: uloop_done: symbol not found
wget: Error relocating /usr/bin/wget: blobmsg_parse: symbol not found
wget: Error relocating /usr/bin/wget: uloop_timeout_cancel: symbol not found
wget: Error relocating /usr/bin/wget: uloop_run_timeout: symbol not found
wget: Error relocating /usr/bin/wget: uloop_timeout_set: symbol not found
wget: Error relocating /usr/bin/wget: uloop_init: symbol not found
wget: Error relocating /usr/bin/wget: uloop_cancelled: symbol not found
ERROR: wget: exited with error 127
WARNING: updating https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/routing/packages.adb: unexpected end of file
wget: Error loading shared library libubox.so.20240329: No such file or directory (needed by /usr/bin/wget)
wget: Error loading shared library libubox.so.20240329: No such file or directory (needed by /usr/lib/libuclient.so)
wget: Error relocating /usr/lib/libuclient.so: md5_end: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blob_buf_free: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_free: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blob_buf_init: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blobmsg_parse: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blobmsg_add_field: symbol not found
wget: Error relocating /usr/lib/libuclient.so: uloop_timeout_cancel: symbol not found
wget: Error relocating /usr/lib/libuclient.so: __calloc_a: symbol not found
wget: Error relocating /usr/lib/libuclient.so: usock_inet_timeout: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_write: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_get_read_buf: symbol not found
wget: Error relocating /usr/lib/libuclient.so: md5_hash: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_consume: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_printf: symbol not found
wget: Error relocating /usr/lib/libuclient.so: md5_begin: symbol not found
wget: Error relocating /usr/lib/libuclient.so: uloop_timeout_set: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_fd_init: symbol not found
wget: Error relocating /usr/bin/wget: uloop_done: symbol not found
wget: Error relocating /usr/bin/wget: blobmsg_parse: symbol not found
wget: Error relocating /usr/bin/wget: uloop_timeout_cancel: symbol not found
wget: Error relocating /usr/bin/wget: uloop_run_timeout: symbol not found
wget: Error relocating /usr/bin/wget: uloop_timeout_set: symbol not found
wget: Error relocating /usr/bin/wget: uloop_init: symbol not found
wget: Error relocating /usr/bin/wget: uloop_cancelled: symbol not found
ERROR: wget: exited with error 127
WARNING: updating https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/telephony/packages.adb: unexpected end of file
wget: Error loading shared library libubox.so.20240329: No such file or directory (needed by /usr/bin/wget)
wget: Error loading shared library libubox.so.20240329: No such file or directory (needed by /usr/lib/libuclient.so)
wget: Error relocating /usr/lib/libuclient.so: md5_end: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blob_buf_free: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_free: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blob_buf_init: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blobmsg_parse: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blobmsg_add_field: symbol not found
wget: Error relocating /usr/lib/libuclient.so: uloop_timeout_cancel: symbol not found
wget: Error relocating /usr/lib/libuclient.so: __calloc_a: symbol not found
wget: Error relocating /usr/lib/libuclient.so: usock_inet_timeout: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_write: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_get_read_buf: symbol not found
wget: Error relocating /usr/lib/libuclient.so: md5_hash: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_consume: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_printf: symbol not found
wget: Error relocating /usr/lib/libuclient.so: md5_begin: symbol not found
wget: Error relocating /usr/lib/libuclient.so: uloop_timeout_set: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_fd_init: symbol not found
wget: Error relocating /usr/bin/wget: uloop_done: symbol not found
wget: Error relocating /usr/bin/wget: blobmsg_parse: symbol not found
wget: Error relocating /usr/bin/wget: uloop_timeout_cancel: symbol not found
wget: Error relocating /usr/bin/wget: uloop_run_timeout: symbol not found
wget: Error relocating /usr/bin/wget: uloop_timeout_set: symbol not found
wget: Error relocating /usr/bin/wget: uloop_init: symbol not found
wget: Error relocating /usr/bin/wget: uloop_cancelled: symbol not found
ERROR: wget: exited with error 127
WARNING: updating https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/video/packages.adb: unexpected end of file
 [https://downloads.openwrt.org/snapshots/targets/qualcommax/ipq807x/packages]
 [https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/base]
 [https://downloads.openwrt.org/snapshots/targets/qualcommax/ipq807x/kmods/6.6.84-1-600558e6320c90aebb4cc1b64377d091]
 [https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/luci]
 [https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/packages]
 [https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/routing]
 [https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/telephony]
 [https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/video]
0 unavailable, 8 stale; 10782 distinct packages available

root@OpenWrt:~# apk upgrade
ERROR: unable to select packages:
  libubox20240329 (no such package):
    required by: netifd-2024.12.17~ea01ed41-r1[libubox20240329]
                 libustream-mbedtls20201210-2024.07.28~99bd3d2b-r1[libubox20240329]
                 rpcd-2024.12.02~cc9a471c-r1[libubox20240329]
                 cgi-io-2022.08.10~901b0f04-r21[libubox20240329]
                 odhcpd-ipv6only-2024.05.08~a2988231-r1[libubox20240329]
                 uhttpd-2023.06.25~34a8a74d-r4[libubox20240329]
                 libuci20250120-2025.01.20~16ff0bad-r1[libubox20240329]
                 logd-2024.04.26~85f10530-r1[libubox20240329]
                 rpcd-mod-rpcsys-2024.12.02~cc9a471c-r1[libubox20240329]
                 rpcd-mod-iwinfo-2024.12.02~cc9a471c-r1[libubox20240329]
                 rpcd-mod-ucode-2024.12.02~cc9a471c-r1[libubox20240329]
                 usign-2020.05.23~f1f65026-r1[libubox20240329]
                 rpcd-mod-luci-20240305-r1[libubox20240329]
                 libuclient20201210-2024.10.22~88ae8f20-r1[libubox20240329]
                 rpcd-mod-file-2024.12.02~cc9a471c-r1[libubox20240329]
                 urngd-2023.11.01~44365eb1-r1[libubox20240329]
                 ubox-2024.04.26~85f10530-r1[libubox20240329]
                 rpcd-mod-rrdns-20170710[libubox20240329]
                 libudebug-2023.12.06~6d3f51f9[libubox20240329]
                 mtd-26[libubox20240329]
  libblobmsg-json20240329 (no such package):
    required by: rpcd-2024.12.02~cc9a471c-r1[libblobmsg-json20240329]
                 uhttpd-2023.06.25~34a8a74d-r4[libblobmsg-json20240329]
                 logd-2024.04.26~85f10530-r1[libblobmsg-json20240329]
                 uhttpd-mod-ubus-2023.06.25~34a8a74d-r4[libblobmsg-json20240329]
  libubus20250102 (no such package):
    required by: netifd-2024.12.17~ea01ed41-r1[libubus20250102]
                 libiwinfo20230701-2025.02.06~9cec6b4d-r1[libubus20250102]
                 rpcd-2024.12.02~cc9a471c-r1[libubus20250102]
                 cgi-io-2022.08.10~901b0f04-r21[libubus20250102]
                 odhcpd-ipv6only-2024.05.08~a2988231-r1[libubus20250102]
                 logd-2024.04.26~85f10530-r1[libubus20250102]
                 rpcd-mod-rpcsys-2024.12.02~cc9a471c-r1[libubus20250102]
                 rpcd-mod-iwinfo-2024.12.02~cc9a471c-r1[libubus20250102]
                 rpcd-mod-ucode-2024.12.02~cc9a471c-r1[libubus20250102]
                 rpcd-mod-luci-20240305-r1[libubus20250102]
                 rpcd-mod-file-2024.12.02~cc9a471c-r1[libubus20250102]
                 ubox-2024.04.26~85f10530-r1[libubus20250102]
                 rpcd-mod-rrdns-20170710[libubus20250102]
                 uhttpd-mod-ubus-2023.06.25~34a8a74d-r4[libubus20250102]
                 libudebug-2023.12.06~6d3f51f9[libubus20250102]
  libjson-script20240329 (no such package):
    required by: uhttpd-2023.06.25~34a8a74d-r4[libjson-script20240329]

root@OpenWrt:~# apk fetch libubox
Downloading libubox20241219-2024.12.19~3868f47c-r1
wget: Error loading shared library libubox.so.20240329: No such file or directory (needed by /usr/bin/wget)
wget: Error loading shared library libubox.so.20240329: No such file or directory (needed by /usr/lib/libuclient.so)
wget: Error relocating /usr/lib/libuclient.so: md5_end: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blob_buf_free: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_free: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blob_buf_init: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blobmsg_parse: symbol not found
wget: Error relocating /usr/lib/libuclient.so: blobmsg_add_field: symbol not found
wget: Error relocating /usr/lib/libuclient.so: uloop_timeout_cancel: symbol not found
wget: Error relocating /usr/lib/libuclient.so: __calloc_a: symbol not found
wget: Error relocating /usr/lib/libuclient.so: usock_inet_timeout: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_write: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_get_read_buf: symbol not found
wget: Error relocating /usr/lib/libuclient.so: md5_hash: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_consume: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_printf: symbol not found
wget: Error relocating /usr/lib/libuclient.so: md5_begin: symbol not found
wget: Error relocating /usr/lib/libuclient.so: uloop_timeout_set: symbol not found
wget: Error relocating /usr/lib/libuclient.so: ustream_fd_init: symbol not found
wget: Error relocating /usr/bin/wget: uloop_done: symbol not found
wget: Error relocating /usr/bin/wget: blobmsg_parse: symbol not found
wget: Error relocating /usr/bin/wget: uloop_timeout_cancel: symbol not found
wget: Error relocating /usr/bin/wget: uloop_run_timeout: symbol not found
wget: Error relocating /usr/bin/wget: uloop_timeout_set: symbol not found
wget: Error relocating /usr/bin/wget: uloop_init: symbol not found
wget: Error relocating /usr/bin/wget: uloop_cancelled: symbol not found
ERROR: wget: exited with error 127
ERROR: libubox20241219-2024.12.19~3868f47c-r1: remote server returned error (try 'apk update')

Luci has stopped working, but I DO have SSH access. I DO have curl installed, but im not sure what address i need to use to get libubox.

libubox20241219-2024.12.19~3868f47c-r1

is what i need, I think. what is the url that i can use with curl, and then how do you install from file with apk? I know how to do it with opkg

Most of what you need should be in that dir.

https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/base/libubox-lua-2024.12.19~3868f47c-r1.apk

If apk is still working, once you've downloaded it, just

apk add --allow-untrusted libubox-lua-2024.12.19~3868f47c-r1.apk

The ABI-versioned library issues have all been resolved (pending bug fixes, of course). Owut: OpenWrt Upgrade Tool - #692 by efahl has details.

Also of note is this commit, which fixes an issue with restoring binaries when a package is removed. See the Fixes: links on the commit for various descriptions of the bug.

9 Likes

In terms of the eventual start of a 25.xx git branch (obviously still quite a ways off), as far as the OpenWrt developers currently know, does the APK migration have any major blockers left? Is it now mainly about getting more testing and perhaps waiting for apk-tools 3.0.0 stable to be released upstream, or am I missing something?

I'm not asking about 25.xx blockers more broadly, just APK.

Not sure if @aparcar or @Ansuel have anything on their lists, but here's my view of things right now...

As far as I can tell, no, OpenWrt+apk in its current state is good to go. There might be some issues with package pre- or post-install script triggers, but I think that's all enhancements at this point. The ABI-version naming was the single biggest blocker that I was tracking, and that has all the pieces in place so we're at the point where we just need to keep an eye on those changes and see if there are any lingering bugs (only time and commits to ABI-versioned packages will tell us).

Over on apk-tools, I think they are still debating whether to swap the installed database (see /lib/apk/db/installed) over from v2 format to v3 for their apk-tools-3.0 release. If they do, that will have significant impact on OpenWrt, as the rpcd code parses that file. Changing from the simple-to-parse v2 format to the completely opaque v3 binary would be a major undertaking, as the rpcd code is supposed to function on a minimal system without any package manager installed, and thus would require that we write a little standalone apk-v3 file parser.

3 Likes

@Dante Anything to add here? I think you had the most recent commits on that front, right?

Out of curiosity, what for ?

Can the code be externalized to a library, that rpcd could link with ?

That's the device-, version- and package-manager-agnostic implementation of ubus call rpc-sys packagelist that all of auc, owut and LuCI Attended Sysupgrade use to get the installed package list for the device.

Yes, it could be put into a library, and probably will be if the installed db turns into v3 format. The problem is creating that library, as the apk implementation is fairly monolithic and extracting that "small" part is sort of a major undertaking.

1 Like

Naïve questions (from a mostly-lurker here):

Isn't this lib usable ?

Do you only have the static apk binary ?

If yes, why not the dynamic one ? (and keep an easily available static one somewhere if needed)

Too bloated ?

Yeah, I don't know why but the apk builds are static, so that would have to change, but the bloat issue is the serious one. The intent is to have as small a solution as possible for systems without a package manager, and the libapk.a in my x86 builds is 1.9.M vs 117K for all of the rpc-sys functions, so it would need some serious stripping down.

$ ll ./build_dir/target-x86_64_musl/apk-mbedtls/apk-3.0.0_pre20250606/ipkg-install/usr/lib/libapk.a ./build_dir/hostpkg/apk-3.0.0_pre20250606/openwrt-build/src/apk ./staging_dir/target-x86_64_musl/root-x86/usr/lib/rpcd/rpcsys.so
Permissions Size User      Date Modified    Git Name
.rwxr-xr-x@ 3.8M efahlgren 2025-06-11 09:18  -I ./build_dir/hostpkg/apk-3.0.0_pre20250606/openwrt-build/src/apk
.rw-r--r--@ 1.9M efahlgren 2025-06-30 07:26  -I ./build_dir/target-x86_64_musl/apk-mbedtls/apk-3.0.0_pre20250606/ipkg-install/usr/lib/libapk.a
.rwxr-xr-x@ 117k efahlgren 2025-06-30 07:25  -I ./staging_dir/target-x86_64_musl/root-x86/usr/lib/rpcd/rpcsys.so

So far it's working as expected and the issue that was there (missing hooks) is addressed.

Unless I'm misremembering, apk didn't call pre-rm hooks on the old version of the package like opkg did before upgrade, but on the new one instead. No idea if there are many affected packages. That might be something to look into. Could be just a documentation change if nothing's using that logic.

The other minor apk-related issue is with the CI in packages:

There are a few packages that have EXTRA_DEPENDS and might be affected.

1 Like

I mentioned in a PR that apk query is my new favorite command. It really is pretty cool.

$ apk query --format json --fields name,origin --installed 'a*'
[
  {
    "name": "adblock",
    "origin": "feeds/packages/net/adblock"
  }, {
    "name": "apcupsd",
    "origin": "feeds/packages/net/apcupsd"
  }, {
    "name": "apk-mbedtls",
    "origin": "feeds/base/package/system/apk"
  }, {
    "name": "attendedsysupgrade-common",
    "origin": "feeds/packages/utils/attendedsysupgrade-common"
  }
]

$ apk query --format yaml --fields name,version,file-size --match provides 'wget'
# 3 items
- name: uclient-fetch
  version: 2024.10.22~88ae8f20-r1
  file-size: 8424
- name: wget-nossl
  version: 1.25.0-r1
  file-size: 196898
- name: wget-ssl
  version: 1.25.0-r1
  file-size: 218349
4 Likes