support preseeding snaps in 16.04

Bug #1771177 reported by Mathieu Trudel-Lapierre
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
livecd-rootfs (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
Customized images built for 16.04

[Test case]
1) Install livecd-rootfs
2) Take a copy of the code tree for livecd-rootfs.
3) Prepare a project/subproject tree for hooks:
$ mkdir -p live-build/xyz/hooks/
$ echo <<EOF > live-build/xyz/hooks/000-snap-preseed.binary
#!/bin/sh

. config/functions

snap_preseed telegram
EOF

3) Build the image using livecd-rootfs:
$ PROJECT=xyz SUBPROJECT=snapped lb config
$ PROJECT=xyz SUBPROJECT=snapped lb build

4) Validate that the image contains the preseeded snap as intended.

[Regression potential]
Make sure any unexpected build behavior for images is investigated as a potential regression: the addition of config/functions (live-build/functions) in the build may lead to image builds failing, or could otherwise break the behavior of a part of the image build such that components of build images are missing. All images regularly built from livecd-rootfs should be tested to ensure they are equivalent to those previously built.

---

18.04 builds can included preseeded snaps; but 16.04 can't.

Please backport the relevant functions of livecd-rootfs, so while (ubuntu seed)-based preseeding of snaps can't be done yet (changing seeds might otherwise change image contents), customized images can include their own snaps as necessary by calling the right functions in hook scripts.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

This already works in 18.04 (SRU is backport of that code).

Changed in livecd-rootfs (Ubuntu):
status: New → Fix Released
Changed in livecd-rootfs (Ubuntu Xenial):
status: New → In Progress
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Mathieu, or anyone else affected,

Accepted livecd-rootfs into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/livecd-rootfs/2.408.31 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in livecd-rootfs (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-xenial
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Verification-done with livecd-rootfs 2.408.31 on xenial:

Verified that a project can call on snap_preseed to add a snap to the build, by providing both the "mountpoint" for the tree in use and the snap name to add.

tags: added: verification-done-xenial
removed: verification-needed verification-needed-xenial
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package livecd-rootfs - 2.408.31

---------------
livecd-rootfs (2.408.31) xenial; urgency=medium

  * Backport snap preseeding functions from bionic. (LP: #1771177)

 -- Mathieu Trudel-Lapierre <email address hidden> Mon, 14 May 2018 14:16:35 -0400

Changed in livecd-rootfs (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for livecd-rootfs has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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.