build(snap): stage libarchive for the image build

Populating an ext4 image from a tarball is a runtime dlopen of
libarchive in mke2fs, not a linked dependency: the deb does not pull
it in, the stage set did not have it, and the first snap build failed
with "you need libarchive to be able to process tarballs". Stage
libarchive13t64 next to e2fsprogs.
This commit is contained in:
vhaudiquet committed 2026-10-30 21:22:33 +01:00
1 parent ed4214180e
commit f3da39011e
1 file changed
+4 -1
+4 -1
View File
@@ -65,7 +65,10 @@ parts:
build-packages: [cmake, perl] build-packages: [cmake, perl]
# mkfs.ext4 builds the cache image and debugfs provisions it; both # mkfs.ext4 builds the cache image and debugfs provisions it; both
# ship in e2fsprogs and run as child processes of the binary. # ship in e2fsprogs and run as child processes of the binary.
stage-packages: [e2fsprogs] # Populating from a tarball is dlopen("libarchive.so.13") at
# runtime — no hard dependency, so staging e2fsprogs alone leaves
# the run failing with "you need libarchive"; stage the lib too.
stage-packages: [e2fsprogs, libarchive13t64]
override-pull: | override-pull: |
craftctl default craftctl default
# [workspace.package] version — the single `version = "..."` at # [workspace.package] version — the single `version = "..."` at