Revert "base-files: fwtool: Fix wrong checksum on combined-image with metadata"
authorJo-Philipp Wich <jo@mein.io>
Sun, 2 Dec 2018 15:05:40 +0000 (16:05 +0100)
committerJo-Philipp Wich <jo@mein.io>
Tue, 18 Dec 2018 16:48:21 +0000 (17:48 +0100)
commit69399360423f2f77b61c0fe1faae8a9613c878d3
tree29d0e0d895e9f25887519e074beebc895599f564
parent54669e156c131d92f20dd3ceafd3ccfceccd9538
Revert "base-files: fwtool: Fix wrong checksum on combined-image with metadata"

This reverts commit 41770add03ad77a0ce41ed424ad050238f7d9272.

The fwtool_check_image() procedure is used by `sysupgrade --test` which must
not alter the image under test in any way.

Currently, when the LuCI ui or any other sysupgrade wrapper first invokes
sysupgrade --test to verify the compatibility of the image and then calculates
the sha256sum over it, the resulting checksum will differ from the original
image since the test invocation will implicitely strip the metadata trailer.

To properly fix the underlying issue, the combined image checksumming code
must be modified to skip the metadata trailer.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from 9808bd279927bcd2d3a78d19a55229b93bbbcf05)
package/base-files/files/lib/upgrade/fwtool.sh