Add parameter to cleanbuild to allow selection of a base image

Bug #1597952 reported by Matt Middleton
22
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Snapcraft
Won't Fix
Undecided
Michael Hudson-Doyle

Bug Description

the cleanbuild option should allow for an optional parameter to specify which image the generated container should be based up.

Tags: cleanbuild
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

What is the use case and how would it still be a cleanbuild?

Changed in snapcraft:
status: New → Incomplete
Revision history for this message
Matt Middleton (mmiddleton) wrote :

The primary use case would be for building snaps for other versions of ubuntu. Upon release of Yakkety, snapcraft could be instructed to use a Xenial image in order to create a Xenial version of the snap.

Revision history for this message
Leo Arias (elopio) wrote :

I think I would like this too. We could preload some build packages in the image, and then cleanbuild would be a lot faster.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Snapcraft because there has been no activity for 60 days.]

Changed in snapcraft:
status: Incomplete → Expired
Revision history for this message
Alberto Mardegan (mardy) wrote :

As a side note, it might be a good idea considering also the possibility to specify non-Ubuntu base images (and therefore packages lists). Not that I would personally use this, but I think it might speed up the adoption of snaps among developers of other distros.

Changed in snapcraft:
status: Expired → Confirmed
tags: added: cleanbuild
Revision history for this message
Galileo Sartor (lyzardking) wrote :

This could be useful to select a specific version of ubuntu for now.
If in the xenial repo the library I need is not up to date or the correct version
I could run snapcraft cleanbuild --release yakkety
and this would run a build on a clean yakkety vm.

Revision history for this message
Felipe Reyes (freyes) wrote :

I implemented this adding a new config option to snapcraft.yaml (series)[0], but I'm not sure if this is the right way to do it, because some have said here that being able to set an arbitrary image is also a good idea. But the code is making assumptions about the OS[1].

Thoughts?

[0] https://paste.ubuntu.com/24843717/
[1] https://github.com/snapcore/snapcraft/blob/master/snapcraft/internal/lxd.py#L113

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

I have an implementation of this: https://github.com/mwhudson/snapcraft/commit/c095678a4e624043a269cd5a1fc30f4720964d11

I’m waiting for https://github.com/snapcore/snapcraft/pull/1718 to be merged first, which is waiting on snapcraft 2.35 to be released.

Changed in snapcraft:
assignee: nobody → Michael Hudson-Doyle (mwhudson)
status: Confirmed → In Progress
Revision history for this message
Luke Faraone (lfaraone) wrote :
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

cleanbuild is deprecated with bases.

Changed in snapcraft:
status: In Progress → Won't Fix
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.