cli: use snap pack instead of mksquashfs
Metadata
Current evaluation
Merged. Replaced mksquashfs with snap pack, aligning with snapd standards and removing the --check-skeleton flag. Code refactored into snapcraft.cli. Windows support deferred to multipass. Approved and merged after passing CI.
Suggested action: —
No scores available.
Issue body
Moving to using snap pack for everything as agreed with the snapd team.
This makes it easy to ensure snapcraft is not deviating from snapd
standards. Additionally, --check-skeleton is no longer needed as snap
pack does that out of the box.
Some test fixtures were killed along the way.
The code was moved to snapcraft.cli as most of the implementation left
in lifecycle.pack was mostly presentation related.
The downside here is that this makes it harder to support some commands
in Windows, but luckily Snapcraft for Windows is yet unreleased and the
broken commands (pack and upload-metadata) can eventually be
passthroughed through multipass.
Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
- [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you successfully run `./runtests.sh static`?
- [ ] Have you successfully run `./runtests.sh tests/unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged. Replaced mksquashfs with snap pack, aligning with snapd standards and removing the --check-skeleton flag. Code refactored into snapcraft.cli. Windows support deferred to multipass. Approved and merged after passing CI. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged PR switching CLI packaging from mksquashfs to snap pack to align with snapd standards. Removes --check-skeleton as snap pack handles validation natively. Code moved to snapcraft.cli. Windows support temporarily limited. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Replaces mksquashfs with snap pack to align with snapd standards and remove the --check-skeleton flag. Code moved to snapcraft.cli with updated tests. Windows support for pack and upload-metadata is temporarily limited but planned for multipass passthrough. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #4 snap: introduce initial snap packaging (CRAFT-578) | rockcraft | merged | Merged initial snap packaging implementation (CRAFT-578). Approved by one reviewer, passed CI checks, and added 86 lines across three files. | |
| #5616 feat(snapcraft_legacy): pack command runs the lifecycle | snapcraft | merged | Merged squashed PR that aligns the core20 snapcraft pack command with core22 and core24 by running the lifecycle. Approved by three reviewers with all CI checks passing. Resolves #5425. | |
| #49 packages: add snap package support | craft-parts | merged | Merged after implementing snap download and installation for stage and build snaps. Approved by two reviewers, passed CI, and added 1,072 lines across five files. Follows snapcraft conventions with future refactoring planned. | |
| #228 packages: run snap operations silently | craft-parts | merged | Merged to fix #218 by running snap subprocesses silently, preventing stdout leakage that conflicts with craft-cli during lifecycle execution. Approved by one reviewer, passed CI, and modified two files (+32/-15 lines). | |
| #1891 lifecycle: use in-snap mksquashfs if running from snap | snapcraft | merged | Merged lifecycle changes to use the snap-bundled mksquashfs binary instead of relying on the system PATH when running as a snap. Approved by reviewer and passed CI checks. | |
| #5826 fix: parse a snap file for the sign-build command | snapcraft | merged | Merged fix aligning legacy and modern Craft CLI argument parsing for the sign-build command, resolving mismatch errors. Also removed redundant --local help text. Addresses #5618. Approved and passed CI. | |
| #86 meta: use snapcraft's versioning scheme | starbase | merged | Merged after two approvals and passing CI. Updates the versioning scheme to match snapcraft's using setuptools-scm, adding 78 lines across two files with zero coverage impact. | |
| #1902 many: use in-snap unsquashfs and readelf if running from snap | snapcraft | merged | Merged after review approval and passing CI. The change updates Snapcraft to use in-snap unsquashfs and readelf when running from a snap, modifying 11 files with 133 additions and 20 deletions. |