-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
electron-builder uses mksquashfs options that are incompatible with snap store #2803
Comments
FYI, if you want to test for yourself if a snap will pass automated review, you can do:
Eg:
|
My recommendation to fix this bug would be to use ' |
|
@develar - thanks for taking care of this! I'm not sure how electron-builder consumers get fixes like this. When will it be available to your users? (I'd like to add a message to our review-tools to point users to the new release). |
Fixed in 20.9.2 and marked as latest stable release. |
I am a snap store reviewer. We've recently re-enabled our resquashfs tests and noticed that electron snaps are now failing automated review with messages like this:
At a high-level, the 'resquash tests' consist of unsquashing the uploaded snap, then running mksquashfs on it to generate a new snap, then checking the hash of the original and resquashed snaps. The store therefore expects that mksquashfs is invoked with expected options (a new enough snapcraft will do this for you with the 'snapcraft pack' command (the last step in a snapcraft build)).
Looking at an affected snap, I see that it is using a non-default blocksize:
Looking at scripts/snap-template.sh in electron-builder, I see that it uses:
The above adds
-b 1048576 -comp xz -Xdict-size 100%
to mksquashfs options, which causes the resquashed snap to have a different hash.I'm not an electron-builder developer so I'm not sure how this template script affects normal builds, but I can say that if I unsquash the affected snap, then resquash using 'snapcraft pack /path/to/squashfs-root' that its superblock has:
and this resquashed snap passes review. I suspect you used the -b and -Xdict-size arguments to reduce the on disk file size, however this is incompatible with expected options for the snap store (due note that delta uploads and downloads should help with the larger file size of the expected options).
The bottom line is that in order for snap to pass snap store review, electron-builder needs to use '
snapcraft pack <dir>
' with snapcraft >= 2.38 or generate squashfs files with only the supported options (ie, 'mksquashfs <dir> <snap> -noappend -comp xz -all-root -no-xattrs -no-fragments
').Thanks!
Reference: https://forum.snapcraft.io/t/automated-reviews-and-snapcraft-2-38/4982/8
The text was updated successfully, but these errors were encountered: