Support for removal of snaps from inside a chroot

Bug #1977651 reported by Rudra Saraswat
6
This bug affects 1 person
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://gitlab.com/ubuntu-unity/ubuntu-remixes) and @PJSingh5000's Cubic project for their regular setups

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)

Rudra Saraswat (rs2009)
description: updated
Revision history for this message
Alberto Mardegan (mardy) wrote :

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).

Changed in snapd (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for snapd (Ubuntu) because there has been no activity for 60 days.]

Changed in snapd (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.