snapcraft kernel plugin needs to check compression method of the initrd before trying to unpack it
Metadata
Current evaluation
Kernel plugin gained initrd compression detection and LZMA/XZ support instead of assuming gzip; fixed by merged PR canonical/snapcraft#463 (commit ac25418f5).
Resolution: closed resolved
Reason: PR canonical/snapcraft#463 was merged as commit ac25418f5, adding compression detection and support for LZMA/XZ-compressed initrds.
Evaluated by: mr-cal-bot
No scores available.
Issue body
when building a kernel snap, snapcraft pulls the initrd out of an os snap package. with the dropping of the ubuntu-core-generic-initrd package this means the initrd.img is now using teh same compression method like the rest of the world ... which is lzma
the snapcraft kernel plugin should run something like "file usr/lib/ubuntu-core-generic-initrd/initrd.img-core" and select the right decompressor based on the output.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Kernel plugin gained initrd compression detection and LZMA/XZ support instead of assuming gzip; fixed by merged PR canonical/snapcraft#463 (commit ac25418f5). | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR #463 (commit ac25418f5), which added detection and support for LZMA/XZ-compressed initrds instead of assuming gzip. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR #463 (commit ac25418f5), adding LZMA/XZ initrd support to the kernel plugin. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without comments or resolution. The request to dynamically detect initrd compression in the snapcraft kernel plugin was abandoned or superseded by upstream changes. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution or comments. The report indicated snapcraft's kernel plugin failed to handle lzma-compressed initrd.img, recommending automatic decompressor detection based on file type. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
canonical/snapcraft#463
(confidence 100%)
Merged resolving PR, committed as ac25418f5.
-
Related To:
canonical/snapcraft#457
(confidence 100%)
Earlier proposed fix was closed unmerged in favor of PR #463.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1558970 Support downloading snaps | snapcraft (launchpad) | closed | Snap downloading support was merged in canonical/snapcraft#379 via commit 0c31143f3, enabling the kernel plugin to assemble a full initrd image. | |
| #1627923 kernel plugin initrd packaging fails when kernel modules have common dependencies | snapcraft (launchpad) | closed | Fixed by snapcore/snapcraft PR #837, which allowed initrd packaging to handle common kernel-module dependencies without duplicate-copy failures. | |
| #1816379 snapcraft kernel plugin includes always the uc16 initramfs | snapcraft (launchpad) | closed | Closed as stale after no progress since 2019. Later, snapcraft#5814 (8f56d299d) added replacement post-core18 kernel and initrd plugins. | |
| #463 Kernel plugin: Support lzma/xz-compressed initrd. | snapcraft | merged | Merged #463 as ac25418f5, adding lzma/xz initrd detection via the magic library and tests for LP bug #1569337. |