mirror of
https://github.com/dikeckaan/mu300-linux.git
synced 2026-12-06 16:02:55 +00:00
Ported from kanoqwq/mu300-linuxb8d4f222,fb0b28e7,b9f71e72(OTA diff, diffs made from an old release's index), rebuilt on our signed releases: - tools/image-diff.py: a diff is the new image without the regular files the base image had with the same manifest line, only in program/library trees (never etc, var, home, usr/local, package DBs, files with xattrs or hard links, or the update's own tools); .mu300-diff names base, target and what was left out. check rebuilds the target manifest from diff + base. - tools/make-diffs.sh (run by make-release.sh before SHA256SUMS): diffs from the five releases before, from their published manifests; a base is taken only as its SHA256SUMS lists it and, with the release key in the tree, only when that SHA256SUMS is signed (mu300-update's sums_verdict). The diffs are then listed in this release's SHA256SUMS, so the release key signs them. - mu300-update (diff block): diff_fetch takes the diff named by the installed image's own manifest through fetch_verified (signature and checksum, as for the whole image); diffs_unpack, after every download, unpacks it with the delta block, fills the left-out files from the installed system only where it has them byte for byte, and keeps the result only when mu300-carry manifest of it equals the release's signed manifest. Otherwise the whole image is downloaded. Carry, accounts, vendor files, extras, VPN and kill switch, .old rollback: unchanged. MU300_DIFF=0 turns it off. - release_json reports the diff as the download (diffs count); the LuCI update page says "only what changed since the installed release". - magisk.yml no longer downloads the diffs. Trial on published releases (v2026.10.26.1 -> v2026.10.27.2): ubuntu 184 MB -> 10.8 MB, openwrt-luci 24 MB -> 8.6 MB; the rebuilt trees equal the whole images (diff -r) and their signed manifests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE