The resquash test is essentially: checksum the original snap, unsquash the original snap, mksquash the unsquashed files with expected options, checksum the resquashed snap and compare it to the original. When we turned the resquashfs tests to enforce last month, most snaps (by far) passed the resquash test but we discovered a few scenarios where app snaps failed review:
- Publishers using snapcraft < 2.38. To remedy, publishers should either:
a. upgrade to snapcraft >= 2.38 (recommended)
b. build the snap how you normally would, then run:
$ unsquashfs /path/to/snap $ mksquashfs ./squashfs-root ./path/to/new/snap -noappend -comp xz -all-root -no-xattrs -no-fragments (then upload the resulting snap)
- Publishers using electron-builder <20.14.7. To remedy, publishers should either:
a. use lastest stable electron-builder (recommended)
b. build the snap how you normally would, then run:
c. adjust package.json to use (latest stable will do this for you):$ unsquashfs /path/to/snap $ snapcraft pack ./squashfs-root (then upload the resulting snap)
{ "devDependencies": { ... "electron-builder": "^20.9.2", ... }, "build": { ... "linux": { ... "target": [ ... "snap" ], ... }, "snap": { ... "useTemplateApp": false }, ... }, ... }
In all of the above cases we’re simply ensuring that the snap that is published to the store is squashed with the expected options.