Support for removal of snaps from inside a chroot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
It would be great if support for removal of packages was supported in chroots, like installation is supported through seeds.
This is going to prevent us from releasing Ubuntu Web 22.04's Brave edition. We want to remove the Firefox snap from it, but looks like packages can't be removed from a seed.yaml file (to replace it with the Brave snap).
This doesn't only affect flavors and remixes like Ubuntu Unity, Ubuntu Web, Ubuntu Cinnamon etc, but also affects people who
1) build ISOs with tools like the Ubuntu Remix Builder (https:/
2) develop downstream distros which remove snap packages when building inside a chroot
3) build images for their embedded devices using their own builders (not Ubuntu's builder) which build inside a chroot
I think this issue is really important and should be re-opened. (seed.yaml is only a temporary workaround for very few usecases)
description: | updated |
Hi Rudra, I've spoken with people from the Foundations team, and it seems that if you take a published Ubuntu image, extract it, and then remove the unneeded snaps from both /var/lib/ snapd/seed/ snaps/ and /var/lib/ snapd/seed/ seed.yaml, and then reassemble it, you should be able to obtain an image identical to the original except for the snap being removed.
Please let me know if this helps. If not, please explain how you are building the image in detail. For the record, the place where snaps are preseeded into our images is
https:/ /git.launchpad. net/livecd- rootfs/ tree/live- build/functions #n705
(the snap_preseed() function).