Comment 7 for bug 1763641

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

FYI, I've just committed (r1024) a short-circuit test to detect if fragments are not used:

$ PYTHONPATH=./ ./bin/click-review ./tests/test-no-fragments_4.snap
Errors
------
 - security-snap-v2:squashfs_fragments
 The squashfs was built without '-no-fragments'. If using snapcraft, please upgrade to at least 2.38 and rebuild. Otherwise, please ensure the snap is built using 'mksquashfs <dir> <snap> -noappend -comp xz -all-root -no-xattrs -no-fragments'
./tests/test-no-fragments_4.snap: FAIL
[2]

and if the resquash fails for some other reason:
$ PYTHONPATH=./ ./bin/click-review ./tests/test-void-dir_0.1_all.snap
Errors
------
 - security-snap-v2:squashfs_repack_checksum
 checksums do not match. Please ensure the snap is created with either 'snapcraft pack <DIR>' (using snapcraft >= 2.38) or 'mksquashfs <dir> <snap> -noappend -comp xz -all-root -no-xattrs -no-fragments'
./tests/test-void-dir_0.1_all.snap: FAIL
[2]