snaps with type: os should allow publishing of .manifest files

Bug #1608432 reported by Oliver Grawert
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Low
Colin Watson
Snapcraft
Incomplete
Undecided
Unassigned
launchpad-buildd
Fix Released
Low
Colin Watson

Bug Description

when we build an os snap using live-build (our standard method), then live-build produces a .manifest file that contains the list of packages (and their versions) used to assemble the rootfs.

with cdimage builds we published these so people could verify what is contained in their install. snapcraft should have an option to release this file along with the .snap as well.

http://cdimage.ubuntu.com/ubuntu-core/vivid/daily-preinstalled/current/vivid-preinstalled-core-amd64.manifest is an example of such a file

Related branches

Changed in snapcraft:
status: New → Incomplete
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

It seems this would be better handled by launchpad and having the manifest inside the snap in some predefined location like `meta/<name>.manifest`

Revision history for this message
Oliver Grawert (ogra) wrote :

i could surely do that, but that would mean that launchpad would have to unpack the .snap ... also snapcraft knows the proper package name and version, i.e.
https://code.launchpad.net/~snappy-dev/+snap/ubuntu-core/+build/2574

currently has ubuntu-core_16.04.1_s390x.snap,
former launchpad rootfs builds would have put ubuntu-core_16.04.1_s390x.manifest next to it.

(i would point to https://launchpad.net/~ubuntu-cdimage/+livefs/ubuntu/xenial/ubuntu-core-system-image/+build/70717 but sadly LP removes the snaps after a few days, so only the manifests are left in these older builds)

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

This manifest file would be interesting for more than just the core snap-- it would be useful for app snaps and really anything that uses stage-packages since the manifest could then be examined for out-of-dateness of staged packages. This seems like it would be useful for more than just Launchpad builds and seems like snapcraft should handle it itself (AIUI, the Launchpad buildds use snapcraft to build snaps). Am I missing something?

Revision history for this message
Sergio Schvezov (sergiusens) wrote : Re: [Bug 1608432] Re: snaps with type: os should allow publishing of .manifest files

El 09/08/16 a las 12:40, Jamie Strandboge escribió:
> This manifest file would be interesting for more than just the core
> snap-- it would be useful for app snaps and really anything that uses
> stage-packages since the manifest could then be examined for out-of-
> dateness of staged packages. This seems like it would be useful for more
> than just Launchpad builds and seems like snapcraft should handle it
> itself (AIUI, the Launchpad buildds use snapcraft to build snaps). Am I
> missing something?
>
Yes, we already have a bug for that ;-)

This is the manifest produced by live-build wrapped inside a part which is totally disconnected from snapcraft itself.

Revision history for this message
Oliver Grawert (ogra) wrote :

no, you are right, LP uses snapcraft ... but there is also code in launchpad-buildd missing to publish them currently ... for my usecase i agreed with colin to actually just make my build spit out a .manifest in the toplevel build dir next to the snap ... but that indeed only works when using a tool that creates these files so yes, i think it would make sense if snapcraft itself could also create them.

Revision history for this message
Oliver Grawert (ogra) wrote :

colin pointed to http://paste.ubuntu.com/22806674/ ... i'm currently preparing the ubuntu-core builds for putting the file into the right place, then this should just work...

Revision history for this message
Oliver Grawert (ogra) wrote :

the ubuntu-core build now puts the manifest into /build/ubuntu-core/
from a build log:
...
ls -l /build/ubuntu-core
total 36
-rw-r--r-- 2 root root 1010 Aug 29 10:50 Makefile
-rw-r--r-- 2 root root 432 Aug 29 10:50 README
drwxr-xr-x 2 root root 4096 Aug 29 10:50 cron-scripts
drwxr-xr-x 3 root root 4096 Aug 29 10:50 parts
drwxr-xr-x 2 root root 4096 Aug 29 10:50 prime
-rw-r--r-- 1 root root 245 Aug 29 10:50 snapcraft.yaml
drwxr-xr-x 2 root root 4096 Aug 29 10:50 stage
-rw-r--r-- 2 root root 7431 Aug 29 10:52 ubuntu-core_16.04.1_ppc64el.manifest
Staging livebuild
Priming livebuild
...

@colin: is this the location you need ? (or does it need to be one level up)

Revision history for this message
Colin Watson (cjwatson) wrote :

Yes, that's the right location.

I've just realised that we need a slight tweak to the Launchpad side as well to allow us to upload .manifest files without losing the check that at least one .snap file was uploaded.

tags: added: lp-snappy
Changed in launchpad-buildd:
importance: Undecided → Low
status: New → Triaged
Changed in launchpad:
status: New → Triaged
importance: Undecided → Low
Colin Watson (cjwatson)
Changed in launchpad:
status: Triaged → In Progress
assignee: nobody → Colin Watson (cjwatson)
Changed in launchpad-buildd:
status: Triaged → In Progress
assignee: nobody → Colin Watson (cjwatson)
Colin Watson (cjwatson)
Changed in launchpad-buildd:
status: In Progress → Fix Committed
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
Colin Watson (cjwatson)
tags: added: qa-ok
removed: qa-needstesting
Colin Watson (cjwatson)
Changed in launchpad-buildd:
status: Fix Committed → Fix Released
Colin Watson (cjwatson)
Changed in launchpad:
status: Fix Committed → Fix Released
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.