The future is now: opkg vs apk

APK is from alpine, android APK is something different entirely

2 Likes

If you remember our exchange from 3 days ago you will recall that indeed apk uses wget, which by default is an alias of uclient-fetch.

That sounds like ipv6 trouble with uclient-fetch: If there is IPv6 addressing but no IPv6 connectivity, uclient-fetch may stall.

test from router, if nslookup finds an IPv6 address for downloads.openwrt.org and if that can be pinged.

GNU wget would fallback to IPv4. So, I suggest that you test downloading the wget-ssl package to PC and then install that by hand.

1 Like

Yes, that is what brought my attention to the fact that apk uses "wget" or whatever is aliased to wget ie by default uclient-fetch.

Neither uclient-fetch nor wget is available when apk-mbedtls is selected in the upgrade process.

Connectivity from the OpenWrt device is fine.

Manually adding uclient-fetch solves this problem. Therefore, this package is missing in upgrade process from my PoV.

Issue to which component: openwrt, package, asu ?

There have been several fixes yesterday to the imagebuilder etc., so it is quite possible that if you came from an earlier build than r28124-efc0c4666b, something was missing.

It may still take a few days until we really know if the package dependency solutions works ok with all the build tools.

1 Like

I followed most of the patches, thank you.

Therefore, I posted as a status update to help testing.

BTW firmware-selector.openwrt.org is broken ATM:

Unexpected end of JSON input

It appears that something is required. I did apk del uclient-fetch wget curl to make sure I didn't have any of the download-ish tools, and that broke apk update/fetch completely. Not sure what is going on, as my (somewhat superficial) digging through the apk repos appears to show the download work all going on inside it's own code...

Did you find it in the apk code yet? I'm still looking, and if you could point me to it, that would be great.

Hmm, that could be upstream or ASU server. Could you give me more details, target/subtarget, profile or whatever?

I've just tried to compile a new snapshot build. I did make clean before start.
I used my diffconfig file to expand to full config thinking that with apk maybe some dependencies might have changed.
I removed opkg from diffconfig but after expanding to full config I saw that opkg was still selected and apk was not.
In menuconfig I removed opkg and selected use apk and apk-openssl.
I get this error but IDK if it's apk related.

ln -sf mke2fs /home/debian/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/e2fsprogs-1.47.0/.pkgdir/e2fsprogs/usr/sbin/mkfs.ext2
ln -sf mke2fs /home/debian/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/e2fsprogs-1.47.0/.pkgdir/e2fsprogs/usr/sbin/mkfs.ext3
ln -sf mke2fs /home/debian/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/e2fsprogs-1.47.0/.pkgdir/e2fsprogs/usr/sbin/mkfs.ext4
ln -sf e2fsck /home/debian/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/e2fsprogs-1.47.0/.pkgdir/e2fsprogs/usr/sbin/fsck.ext2
ln -sf e2fsck /home/debian/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/e2fsprogs-1.47.0/.pkgdir/e2fsprogs/usr/sbin/fsck.ext3
ln -sf e2fsck /home/debian/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/e2fsprogs-1.47.0/.pkgdir/e2fsprogs/usr/sbin/fsck.ext4
install -d -m0755 /home/debian/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/e2fsprogs-1.47.0/.pkgdir/e2fsprogs/usr/lib
install -d -m0755 /home/debian/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/e2fsprogs-1.47.0/.pkgdir/e2fsprogs/etc/init.d
install -d -m0755 /home/debian/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/e2fsprogs-1.47.0/.pkgdir/e2fsprogs/lib/functions/fsck
install -m0644 ./files/e2fsck.sh /home/debian/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/e2fsprogs-1.47.0/.pkgdir/e2fsprogs/lib/functions/fsck/
install -m0644 ./files/e2fsck.conf /home/debian/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/e2fsprogs-1.47.0/.pkgdir/e2fsprogs/etc/e2fsck.conf
touch /home/debian/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/e2fsprogs-1.47.0/.pkgdir/e2fsprogs.installed
mkdir -p /home/debian/openwrt-ipq/staging_dir/target-aarch64_cortex-a53_musl/root-qualcommax/stamp
echo '2' | cmp -s - /home/debian/openwrt-ipq/staging_dir/target-aarch64_cortex-a53_musl/pkginfo/libss.version || { echo '2' > /home/debian/openwrt-ipq/staging_dir/target-aarch64_cortex-a53_musl/pkginfo/libss.version;  } 
SHELL= flock /home/debian/openwrt-ipq/tmp/.root-copy.flock -c 'cp -fpR /home/debian/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/e2fsprogs-1.47.0/.pkgdir/libss/. /home/debian/openwrt-ipq/staging_dir/target-aarch64_cortex-a53_musl/root-qualcommax/'
touch /home/debian/openwrt-ipq/staging_dir/target-aarch64_cortex-a53_musl/root-qualcommax/stamp/.libss_installed
echo "libss" >> /home/debian/openwrt-ipq/staging_dir/target-aarch64_cortex-a53_musl/pkginfo/e2fsprogs.default.install
mkdir -p /home/debian/openwrt-ipq/staging_dir/target-aarch64_cortex-a53_musl/root-qualcommax/stamp
echo '2' | cmp -s - /home/debian/openwrt-ipq/staging_dir/target-aarch64_cortex-a53_musl/pkginfo/libext2fs.version || { echo '2' > /home/debian/openwrt-ipq/staging_dir/target-aarch64_cortex-a53_musl/pkginfo/libext2fs.version;  } 
SHELL= flock /home/debian/openwrt-ipq/tmp/.root-copy.flock -c 'cp -fpR /home/debian/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/e2fsprogs-1.47.0/.pkgdir/libext2fs/. /home/debian/openwrt-ipq/staging_dir/target-aarch64_cortex-a53_musl/root-qualcommax/'
touch /home/debian/openwrt-ipq/staging_dir/target-aarch64_cortex-a53_musl/root-qualcommax/stamp/.libext2fs_installed
echo "libext2fs" >> /home/debian/openwrt-ipq/staging_dir/target-aarch64_cortex-a53_musl/pkginfo/e2fsprogs.default.install
mkdir -p /home/debian/openwrt-ipq/staging_dir/target-aarch64_cortex-a53_musl/root-qualcommax/stamp
echo '2' | cmp -s - /home/debian/openwrt-ipq/staging_dir/target-aarch64_cortex-a53_musl/pkginfo/libe2p.version || { echo '2' > /home/debian/openwrt-ipq/staging_dir/target-aarch64_cortex-a53_musl/pkginfo/libe2p.version;  } 
SHELL= flock /home/debian/openwrt-ipq/tmp/.root-copy.flock -c 'cp -fpR /home/debian/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/e2fsprogs-1.47.0/.pkgdir/libe2p/. /home/debian/openwrt-ipq/staging_dir/target-aarch64_cortex-a53_musl/root-qualcommax/'
touch /home/debian/openwrt-ipq/staging_dir/target-aarch64_cortex-a53_musl/root-qualcommax/stamp/.libe2p_installed
echo "libe2p" >> /home/debian/openwrt-ipq/staging_dir/target-aarch64_cortex-a53_musl/pkginfo/e2fsprogs.default.install
mkdir -p /home/debian/openwrt-ipq/staging_dir/target-aarch64_cortex-a53_musl/root-qualcommax/stamp
SHELL= flock /home/debian/openwrt-ipq/tmp/.root-copy.flock -c 'cp -fpR /home/debian/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/e2fsprogs-1.47.0/.pkgdir/e2fsprogs/. /home/debian/openwrt-ipq/staging_dir/target-aarch64_cortex-a53_musl/root-qualcommax/'
touch /home/debian/openwrt-ipq/staging_dir/target-aarch64_cortex-a53_musl/root-qualcommax/stamp/.e2fsprogs_installed
echo "e2fsprogs" >> /home/debian/openwrt-ipq/staging_dir/target-aarch64_cortex-a53_musl/pkginfo/e2fsprogs.default.install
make[3]: Leaving directory '/home/debian/openwrt-ipq/package/utils/e2fsprogs'
time: package/utils/e2fsprogs/compile#2.03#1.52#4.33
make[2]: Leaving directory '/home/debian/openwrt-ipq'
make[2]: Entering directory '/home/debian/openwrt-ipq'
rm -rf /home/debian/openwrt-ipq/staging_dir/packages/qualcommax
mkdir -p /home/debian/openwrt-ipq/staging_dir/packages/qualcommax
ln -s /home/debian/openwrt-ipq/bin/targets/qualcommax/ipq807x/packages/*.apk /home/debian/openwrt-ipq/staging_dir/packages/qualcommax; ln -s /home/debian/openwrt-ipq/bin/packages/aarch64_cortex-a53/base/*.apk /home/debian/openwrt-ipq/staging_dir/packages/qualcommax; ln -s /home/debian/openwrt-ipq/bin/packages/aarch64_cortex-a53/luci/*.apk /home/debian/openwrt-ipq/staging_dir/packages/qualcommax; ln -s /home/debian/openwrt-ipq/bin/packages/aarch64_cortex-a53/nss_packages/*.apk /home/debian/openwrt-ipq/staging_dir/packages/qualcommax; ln -s /home/debian/openwrt-ipq/bin/packages/aarch64_cortex-a53/packages/*.apk /home/debian/openwrt-ipq/staging_dir/packages/qualcommax;  ln -s /home/debian/openwrt-ipq/bin/packages/aarch64_cortex-a53/sqm_scripts_nss/*.apk /home/debian/openwrt-ipq/staging_dir/packages/qualcommax; 
(cd /home/debian/openwrt-ipq/staging_dir/packages/qualcommax && /home/debian/openwrt-ipq/staging_dir/host/bin/apk mkndx \
                --root /home/debian/openwrt-ipq \
                --keys-dir /home/debian/openwrt-ipq \
                --sign /home/debian/openwrt-ipq/private-key.pem \
                --output packages.adb \
                *.apk; \
)
Index has 379 packages (of which 379 are new)
find /home/debian/openwrt-ipq/staging_dir/target-aarch64_cortex-a53_musl/root-qualcommax -type d | xargs -r chmod 0755
rm -rf /home/debian/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/root-qualcommax /home/debian/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/root.orig-qualcommax
mkdir -p /home/debian/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/root-qualcommax/tmp
IPKG_INSTROOT=/home/debian/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/root-qualcommax /home/debian/openwrt-ipq/staging_dir/host/bin/fakeroot /home/debian/openwrt-ipq/staging_dir/host/bin/apk --root /home/debian/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/root-qualcommax --repositories-file /dev/zero --keys-dir /home/debian/openwrt-ipq --no-cache --no-logfile --preserve-env --repository file:///home/debian/openwrt-ipq/staging_dir/packages/qualcommax/packages.adb add --initdb --no-scripts --arch aarch64_cortex-a53 $(cat /home/debian/openwrt-ipq/tmp/apk_install_list)
ERROR: unable to select packages:
  uclient-fetch-2024.06.27~a220818a-r1:
    conflicts: wget-ssl-1.24.5-r1[wget=2024.06.27~a220818a-r1]
    satisfies: world[uclient-fetch] opkg-2024.10.16~38eccbb1-r1[uclient-fetch]
  wget-ssl-1.24.5-r1:
    conflicts: uclient-fetch-2024.06.27~a220818a-r1[wget=1.24.5-r1]
    satisfies: world[wget-ssl]
make[2]: *** [package/Makefile:99: package/install] Error 3
make[2]: Leaving directory '/home/debian/openwrt-ipq'
make[1]: *** [package/Makefile:172: /home/debian/openwrt-ipq/staging_dir/target-aarch64_cortex-a53_musl/stamp/.package_install] Error 2
make[1]: Leaving directory '/home/debian/openwrt-ipq'
make: *** [/home/debian/openwrt-ipq/include/toplevel.mk:248: world] Error 2

If I deselect wget or uclient-fetch from menuconfig it compiles successfully.

I am successfully including both wget-ssl and uclient-fetch into my builds for R7800, MT6000, RT3200, DL-WRX36.
Here is from today's RT3200 build, self-built from sources:

 OpenWrt SNAPSHOT, r28127-7e287b563a
 -----------------------------------------------------
root@router4:~# apk list -I uclie* wget*
uclient-fetch-2024.10.22~88ae8f20-r1 aarch64_cortex-a53 {feeds/base/libs/uclient} (ISC) [installed]
wget-ssl-1.24.5-r1 aarch64_cortex-a53 {feeds/packages/net/wget} (GPL-3.0-or-later) [installed]


root@router4:~# uclient-fetch --version
uclient-fetch: unrecognized option: version
Usage: uclient-fetch [options] <URL>
...
root@router4:~# wget --version
GNU Wget 1.24.5 built on linux-gnu.
...
1 Like

I observed it as well once it was reported here and took a look at it, like 2 hours ago maybe? It was target-independent as the file https://downloads.openwrt.org/.versions.json was missing, which made the firmware selector bork out completely since it tries to fetch that directly on page load, so there was a big red banner at the top with that error message.

It has fixed itself now so could be a temporary hiccup or a fix in the build-system with all of the different changes coming into APK.

1 Like

Something is not good on my build. The list is empty.


apk list --installed is OK.

root@QNAP:~# apk list --installed
adblock-4.2.2-r8 all {feeds/packages/net/adblock} (GPL-3.0-or-later) [installed]
apk-openssl-3.0.0_pre20240806-r1 aarch64_cortex-a53 {feeds/base/system/apk} (GPL-2.0-only) [installed]
ath11k-firmware-ipq8074-2024.10.14~15f05012-r1 aarch64_cortex-a53 {feeds/base/firmware/ath11k-firmware} () [installed]
avahi-dbus-daemon-0.8-r9 aarch64_cortex-a53 {feeds/packages/libs/avahi} (LGPL-2.1-or-later) [installed]

That's was for any target, just a bold read error with this text above everything. No target nor release selection possible.

Now it looks ok again.

1 Like

Thank you! I'll spread the word!

Well, at least it is really ancient and outdated.
APK version should be apk-openssl-3.0.0_pre20241108-r2
You apparently have version from August, which had that kind of problems about conflicts.

Make sure that you have up-to-date main/master.
SNAPSHOT, r28127-7e287b563a or newer.

(Fixes have not yet been backported to 24.10 by @Ansuel or @aparcar , so 24.10 is not fully APK compatible, yet)

1 Like

Entirely my fault building from wrong repo.
Thanks.

That would certainly cause some issues! :laughing:

Yeah, updates look (almost) ok now, my owut snapshot testing is partially working (I still need to figure out the rpc stuff/missing ABI version).

1 Like

This is due to the missing ubus call rpc-sys packagelist functionality. All of the ASU-based tools are currently broken.