ubuntu-core image hygiene

Oliver Grawert ogra at ubuntu.com
Wed Sep 14 12:29:19 UTC 2016


hi,

Tl;dr; 

- managing seeds for ubuntu-core changed from task to meta package
- x86 based ubuntu-core snaps lost multiple megabytes of fat ... 

And here the details: 

With the switch to ubuntu-image and the new gadget handling that comes
along with this, we were now able to drop all bits of bootloaders we
shipped inside the rootfs (bootloader binaries (specifically grub) are
actually shipped inside the gadget now and do not need to be copied
from the rootfs into the boot partition any more like we did in the
past with ubuntu-device-flash).

While working on dropping grub from ubuntu-core one large problem arose
... our seeds used tasks instead of a meta package. Since we can not
change the seed itself after a release is out (snappy is based on
xenial) this makes it impossible to actually drop packages ... at the
same time the only way to add new packages is to add very ugly hacks to
livecd-rootfs to import them directly during the rootfs build.

Since the classic ubuntu has always had similar issues with the above
when doing point releases, it was actually completely switched from
tasks to meta packages (relatively recently) ... i did the same for
ubuntu-core now so that package addition/removal gets easier and to be
in sync with the main distro.

If you need to add/remove a package in the ubuntu-core snap, please use
the ubuntu-core-meta package now (currently in the snappy-dev/image
PPA, it will be SRUed into xenial-updates proper before GA)

I am happy to report that thanks to the switch i was also able to drop
about 50 lines of awful hacks from the build system that injected
packages at build time in an undocumented way :)

Now to the more exciting bits ... 

Dropping all grub bits from the amd64 ubuntu-core snap got us from a
75.1MB package size down to 66.9MB ...

Likewise the i386 snap went from 72.1MB down to 64.9MB

I know that a bunch of people will actually celebrate that massive size
reduction (hey manik :) ).

Note that the arm based snaps did not change and are still at sizes
around 55MB ...

ciao
	oli 



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20160914/7b5fb95a/attachment.sig>


More information about the Snapcraft mailing list