The future is now: opkg vs apk

I have no idea, your guess is as good as mine. Sorry for pointing out a potential issue whilst not providing a good solution =(

It does get a little long haha.

I'm still thinking of a good way to draw users in to read. Opkg going away for next release seems like a good draw but eh.

another edit:
Also of note. At least for me it's now gone from the latest in the release and announcements category, when browsing categories, even though it's pinned.


But I'm guessing this is a function of the way activity is done on Discourse.

1 Like

The topic will remain pinned on a per-user basis until that user reads the thread.

4 Likes

Thanks for the clarification!

Is this the final apk that will no longer be replaced with apt?

1 Like

In my opinion, APK v3 using "adb" instead of tar is a regression. Now the only way to parse apk files is to install apk-tools? What is the need to reinvent an archive format?

How can I add an additional configuration file directory to the apk command (like /etc/opkg/)?So that I can add third-party software sources and avoid being reset during upgrades. And how can I specify the packages.adb cache directory (like "lists_dir ext" in opkg.conf)?

How to extract package:

staging_dir/host/bin/apk extract --allow-untrusted P
3 Likes
1 Like

I'm having an interesting issue, on clean build snapshot, from firmware selector (SNAPSHOT r28085-6720c4ccba) I got the following.

root@mt6000:/etc/apk# apk update
fetch https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/packages/packages.adb
WARNING: updating and opening https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/packages/packages.adb: No such file or directory
fetch https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/base/packages.adb
WARNING: updating and opening https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/base/packages.adb: No such file or directory
fetch https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/kmods/6.6.60-1-0561031e21f60f05c8f540bffb723036/packages.adb
WARNING: updating and opening https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/kmods/6.6.60-1-0561031e21f60f05c8f540bffb723036/packages.adb: No such file or directory
fetch https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/luci/packages.adb
WARNING: updating and opening https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/luci/packages.adb: No such file or directory
fetch https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/packages/packages.adb
WARNING: updating and opening https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/packages/packages.adb: No such file or directory
fetch https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/routing/packages.adb
WARNING: updating and opening https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/routing/packages.adb: No such file or directory
fetch https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/telephony/packages.adb
WARNING: updating and opening https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/telephony/packages.adb: No such file or directory
7 unavailable, 0 stale; 275 distinct packages available

Is there something that I'm doing wrong?

Here's the package list for my mt6000:

luci-proto-wireguard luci-app-statistics libc mkf2fs wpad-openssl busybox luci-app-https-dns-proxy kmod-phy-aquantia luci-app-irqbalance btop procd-ujail base-files libustream-mbedtls fitblk kmod-mt7986-firmware firewall4 uboot-envtools zerotier procd kmod-usb-net-rndis kmod-mt76-connac https-dns-proxy kmod-usb2 kmod-usb3 odhcp6c ethtool uci luci-ssl dropbear curl luci-theme-openwrt-2020 mtd odhcpd-ipv6only procd-seccomp kmod-crypto-hw-safexcel kmod-mt7915e luci-app-sqm urandom-seed usbmuxd ppp kmod-leds-gpio kmod-gpio-button-hotplug logd mt7986-wo-firmware lm-sensors drill e2fsprogs kmod-usb-net-ipheth htop f2fsck ca-bundle luci owut luci-app-pbr kernel iperf3 urngd ppp-mod-pppoe dnsmasq-full iptables-nft libudev-zero apk

sounds like either a network problem, some problem with the download tools in router, or a bad timing if buildbot has just been uploading its new build.

Right e.g. that one .adb is there and can be downloaded

Test one of those links with wget from router.

1 Like

Yeah, the problem is I do have connectivity and I can establish the connection. See eg:

root@mt6000:~# curl -I https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/packages/packages.adb
HTTP/2 200
server: nginx
content-type: application/octet-stream
last-modified: Thu, 14 Nov 2024 19:25:40 GMT
etag: "67364eb4-20b88"
access-control-allow-origin: *
access-control-allow-methods: GET, POST, OPTIONS
access-control-allow-headers: DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Content-Range, Range
via: 1.1 varnish, 1.1 varnish
tmp-path:
accept-ranges: bytes
age: 0
date: Fri, 15 Nov 2024 13:20:20 GMT
x-served-by: cache-fra-eddf8230142-FRA, cache-ams21032-AMS
x-cache: HIT, MISS
x-cache-hits: 365, 0
x-timer: S1731676820.454360,VS0,VE8
alt-svc: h3=":443";ma=86400,h3-29=":443";ma=86400,h3-27=":443";ma=86400
content-length: 134024

interesting.
I am not sure if apk uses some built-in download component, or an external wget style helper, like opkg did.

Gonna try to include wget in package list and try again I cant install from apk right now :smiley:

uclient-fetch is the smal normal OpenWrt specific wget alternative that should be / might be there already.

@ka2107 Can the 'arch' be read from an additional file (/etc/apk/arch.d?). I might add repositories for more generic architectures, for example aarch64_generic repositories for aarch64_cortex-a53 devices

my problem has solved by having wget-ssl and uclient-fetch included in packages list.
apk works fine now.

root@mt6000:~# apk update
fetch https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/packages/packages.adb
fetch https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/base/packages.adb
fetch https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/kmods/6.6.60-1-0561031e21f60f05c8f540bffb723036/packages.adb
fetch https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/luci/packages.adb
fetch https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/packages/packages.adb
fetch https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/routing/packages.adb
fetch https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/telephony/packages.adb
 [https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/packages/packages.adb]
 [https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/base/packages.adb]
 [https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/kmods/6.6.60-1-0561031e21f60f05c8f540bffb723036/packages.adb]
 [https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/luci/packages.adb]
 [https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/packages/packages.adb]
 [https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/routing/packages.adb]
 [https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/telephony/packages.adb]
OK: 10267 distinct packages available

And I guess it's uclient-fetch that does the trick.

There has never been any discussion of apt on OpenWrt that I've seen. apk was chosen due to its high functionality:size ratio, which is not a surprise coming from the Alpine Linux distro where, like OpenWrt, size is also a primary concern.

1 Like

You could put in a bug report at Alpine: https://gitlab.alpinelinux.org/alpine/aports/-/issues

Except that this isn't a 'bug', but -for better or worse- a design decision of the apk v3 package format and 'unchangeable' for the time being, therefore inactionable. If the OP wants to influence future apk v4+ design decisions, they will need to participate in its development, providing patches/ code and make well founded arguments, not drive-by bugreports to annoy its developers.

Don't get me wrong, there are advantages in reusing well-known tools to dissect packages, but apk's upstream might have had a reason to go a different route - and dismissing them off-hand is not exactly a productive approach.

5 Likes

do we need to do something to have apk?

I just updated my master build (E8450) and still have opkg..