LuCI Attended Sysupgrade support thread

Lotta hand waving here, but grossly ASU clients take output from ubus call rpc-sys packagelist (which is ABI-sanitized), do any -default-package additions for user-removed defaults, and puts the resulting list into the API request https://sysupgrade.openwrt.org/redoc#operation/api_v1_build_post_api_v1_build_post as the packages member (do owut blob to see the raw request). The ASU server uses that list pretty much verbatim (with a few checks for missing packages across version boundaries). ASU is using the containerized imagebuilders using pypodman, so once the container is fetched and prepped, it basically does

run(container, ["make", "image", "PACKAGES=...all the packages..."])

(See it here

You can somewhat emulate this directly (I use this all the time for debugging):

$ podman run -it ghcr.io/openwrt/imagebuilder:x86-64-master
buildbot@b3e4139cf805:~$ ls
keys  setup.sh
buildbot@b3e4139cf805:~$ . setup.sh
...
buildbot@b3e4139cf805:~$ make image PROFILE=xxx PACKAGES="yyy zzz ..."

owut downloads the package indexes via sysupgrade, and does lots of comparisons between on-device info and upstream info. Run owut with double verbose, owut check -v -v --keep and it will spit out the file names as they are downloaded and the /tmp file in which the results are stored, and that --keep will tell owut to not do any housekeeping, so you can poke around inside all those files.

Again, I use this a lot to chase down issues with builds, with

owut download --device target/subtarget:profile --keep

being especially useful to look at /tmp/firmware-manifest.json as it contains the full stdout and stderr from the build, including all the apk adds and such...

docs on --device usage

1 Like