You are looking at old code for some reason...
Like I said above, a different fix was already merged.
I'd rather delete this.
+perl$(PERL_VERSION2)
Will it be possible to upgrade the firmware with a single command line for example ?
It is not the case with opkg because we have to download the firmware manually and then flash firmware with sysupgrade.
That's not what apk (or opkg) is for in the context of openwrt and the use of an overlay FS. Use "owut upgrade" is you want to upgrade the whole firmware+packages.
Alternatively, you can also use the firmware selector to build your custom firmware then copy the link to the generated file and use sysupgrade . It will download and install it in one go.
I don't need to build my own firmware, I was asking about updating more easily from lets say 23.05.4 to 23.05.5 with a simple command or even automatically on a defined schedule(if the user choose to).
I'm not asking somebody to do it but just want to know if their is some better way with apk than opkg.
Apk and opkg have nothing to do with firmware sysupgrades.
So, they have no impact on the easiness of going from 23.05.4 to another version.
Again, owut is the command line tool you need to do what you want.
It's not the type of job a package manager can do on openwrt because of how the filesystem is configured for embedded devices with integrated "dumb" flash.
...once you're on 24.10.x or main SNAPSHOT, for the 23.05 and earlier releases, auc
is the "same" tool.
Oh, you're absolutely right about that. It skipped my mind that stable still relies on auc.
Patch failed! Please fix /media/james/D/Linksys_E8450/main/package/system/apk/patches/0010-app_list-add-full-print.patch!
make[3]: *** [Makefile:102: /media/james/D/Linksys_E8450/main/build_dir/hostpkg/apk-3.0.0_pre20241108/.prepared7f8df43f9f721c0d39dfed57766cc617_6664517399ebbbc92a37c5bb081b5c53] Error 1
make[3]: Leaving directory '/media/james/D/Linksys_E8450/main/package/system/apk'
time: package/system/apk/host-compile#0.13#0.39#0.45
ERROR: package/system/apk [host] failed to build.
make[2]: *** [package/Makefile:183: package/system/apk/host/compile] Error 1
make[2]: Leaving directory '/media/james/D/Linksys_E8450/main'
make[1]: *** [package/Makefile:179: /media/james/D/Linksys_E8450/main/staging_dir/target-aarch64_cortex-a53_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/media/james/D/Linksys_E8450/main'
make: *** [/media/james/D/Linksys_E8450/main/include/toplevel.mk:248: world] Error 2
error during build..
Thank you for digging deep on this. I've just looked at the server config and there were some erroneous things there, I'm also in the process of rebuilding things with the more recent snapshot, I'll let you know when it's done.
I just built r28102-65964c42f8 without any problems.
Just clean your source repo. You may have old unnecessary apk patches there.
There should be no patches there at at the moment:
perus@ub2410:/OpenWrt/aarch64$ git status package/system/apk/
On branch main
Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean
I was looking at the man page this morning, https://man.archlinux.org/man/apk-repositories.5.en, apparently you need to store the index in a $arch
directory. No idea how they deal with an all
architecture...
I've browsed packages at downloads.openwrt.org and couldn't find any index files there. What does the repositories file for apk look like on a live snapshots image?
The indexes on downloads are in packages.db
files:
https://downloads.openwrt.org/snapshots/targets/x86/64/packages/packages.adb
On the device they end up in tmp:
$ ll /var/cache/apk/
drwxr-xr-x 2 root root 80 Nov 16 15:00 ./
drwxr-xr-x 3 root root 60 Nov 16 03:25 ../
-rw-r--r-- 1 root root 93599 Nov 16 15:00 APKINDEX.3725f6be.tar.gz
-rw-r--r-- 1 root root 144197 Nov 16 15:00 APKINDEX.af2c9fd1.tar.gz
Just found this,
https://gitlab.alpinelinux.org/alpine/abuild/-/blob/master/abuild.in#L608
so maybe just add one more level and put your whole repo in an all
or noarch
directory??? https://dev.melmac.net/apk/all/APKINDEX.tar.gz
Again, appreciate all the help as I have very limited time to look into it.
Do you know if the binaries themselves would also need to be nested into ./all/ (or ./noarch/ or ./x86_64/) or just the index file?
Aha, I just did some experimentation and made a little progress. Apparently if you use the default APKINDEX.tar.gz
file name, it must be in an arch-specific directory, but if you name it packages.adb
, then no arch is needed. (I just had a hunch about this, seems to be correct; still haven't found corroboration in code or docs.)
- Made an
apk
dir on one of my internal servers.cd apk
wget -r https://dev.melmac.net/apk/
mv APKINDEX.tar.gz packages.adb
Jump onto device running brand new SNAPSHOT (built this morning):
echo "http://10.1.1.200/apk/packages.adb" > /etc/apk/repositories.d/customfeeds.list
- Do update and it does the download now, but fails to keep the package index due to lack of signature or something? Maybe it needs a cert or something somewhere?
apk adbsign
??? Certs and that sort of stuff are waaay outside my knowledge base.
$ apk update
...
fetch http://10.1.1.200/apk/packages.adb
WARNING: updating and opening http://10.1.1.200/apk/packages.adb: UNTRUSTED signature
...
1 unavailable, 0 stale; 2183 distinct packages available
The untrusted signature is usually overcome with --allow-untrusted
in the CLI. I'm trying to figure out how to add my signature to the build system so that hopefully, after importing a public key into a live OpenWrt install everything is trusted again, but setting up a repo is higher priority.
UPDATE: rebuilt binaries and added the packages.adb.
This likely is a point of confusion...
There are many APK formats - first thing I saw was Android and their apk format...
Not sure why this extension was decided on...
How will upgrade (sysupgrade) from 2 months old snapshot to 24.10 stable look like? Will it be possible with leaving current config in-place?