Comment 12 for bug 1609903

Revision history for this message
shasheene (shasheene) wrote :

Beyond just cloud images, other use cases for Linux root filesystems configured using chroots are Linux live distribution ISOs and embedded Internet of Things devices. These filesystems are often embedded in read-only environments typically through the use of a squashfs-compressed archive (historically residing on read-only media such as optical disks). In this common situation, disk writes are handled by a tmpfs and OverlayFS which means any changes do not persistent between boots. This approach is often used as it helps with reliability of IoT devices in the face of sudden power interruptions.

Avoiding the snap pre-seeding workaround by providing the ability to install a snap from within a chroot means that the complete package environment of the live distribution can be fully configured at build-time. This does not just save time during boot up, it also prevents RAM wastage because the tmpfs overlay may get modified through work that would traditionally be done in the chroot and thus reside on the root filesystem.

This issue is already almost 4 years old. If it's possible to implement installation of snap-packages in chroot environments then I think it should be done. Otherwise in the coming years when/if snap-based packaging becomes more common the overhead of wasted CPU cycles and RAM will become more significant.