lifecycle: use the -no-fragments mksquashfs option
Metadata
Current evaluation
Merged in #1805 (commit 9a131cb5b), adding mksquashfs -no-fragments so snap composition is predictable and review tools can validate snaps.
Resolution: closed resolved
Reason: PR #1805 was merged as commit 9a131cb5b. It disables SquashFS fragments to prevent unpredictable gathering and compression and allow review tools to validate snaps.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Use of the Squashfs fragments feature results in unpredictable snap
composition due to how fragments are gathered and compressed using a
separate thread in mksquashfs. Disable fragments entirely so that the
review tools can perform validation of snaps.
https://forum.snapcraft.io/t/proposal-to-disable-squashfs-fragments-in-snaps/3103
LP: #1576763
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)?
- [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)?
- [x] Have you successfully run `./runtests.sh static`?
- [x] Have you successfully run `./runtests.sh unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged in #1805 (commit 9a131cb5b), adding mksquashfs -no-fragments so snap composition is predictable and review tools can validate snaps. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #1805 in commit 9a131cb5b, adding mksquashfs -no-fragments so snap composition is predictable and review tools can validate snap contents. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #1805 (commit 9a131cb5b), adding mksquashfs -no-fragments to disable fragments and make snap composition predictable and reviewable. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged PR disabling Squashfs fragments in mksquashfs via the -no-fragments flag. This prevents unpredictable snap composition from threaded compression, enabling reliable validation. Approved and passed CI checks. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged changes disabling Squashfs fragments in mksquashfs via the -no-fragments flag. This ensures predictable snap composition for review tools by eliminating unpredictable thread-based compression. Approved and merged. |
Update history
No update history recorded yet.
Related work
-
Caused By:
snapcraft (launchpad)#1576763
(confidence 98%)
The Launchpad bug reported changing checksums across repeated mksquashfs runs and is cited in the PR.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1576763 snaps have different checksums on repeated mksquashfs runs | snapcraft (launchpad) | closed | Fixed by using mksquashfs -no-fragments in snapcraft PR #1805 (commit 9a131cb5b); snapd PR #4396 applied the option to review tools. | |
| #1891 lifecycle: use in-snap mksquashfs if running from snap | snapcraft | merged | PR #1891 merged (commit f3d870e4e) so lifecycle uses the mksquashfs bundled inside the snapcraft snap when running as a snap, instead of relying on $PATH. Later replaced by `snap pack` in #3173. | |
| #1546821 please add -all-root and -no-xattrs to mksquashfs options | snapcraft (launchpad) | closed | Fixed by merged snapcraft PR #334 (e93fcc0a8), adding mksquashfs -all-root and -no-xattrs for safer, reproducible SquashFS output. |