Add support for snapcraft 7 credentials
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Image |
Fix Released
|
Undecided
|
Unassigned | ||
snapd |
Fix Released
|
High
|
Samuele Pedroni | ||
snapd (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Snapcraft 7 introduced a new format for credentials generated by the export-login command, however the latest version of ubuntu-image (2.2+snap9) isn't able to parse the new format. This means someone who wants to build an Ubuntu Core 22 image that requires access to snaps in a brand store must install snapcraft 6 to export login credentials.
For reference: https:/
Steps to reproduce:
1. Install snapcraft 7.1.1 from latest/stable
2. Export login credentials: snapcraft export-login --acls package_access mycreds
3. Download a core22 reference model assertion from: https:/
4. Install ubuntu-image from latest/stable
5. Build the image:
UBUNTU_
Error: Error preparing image: cannot decode auth file "./mycreds"
That said, I should've looked closer at the error, it looks like this is probably a snapd bug (i.e. in 'snap prepare-image') vs. a bug in ubuntu-image. If you agree, I'll move the bug.
description: | updated |
tags: | added: fr-2636 |
Changed in snapd: | |
status: | In Progress → Fix Committed |
Changed in ubuntu-image: | |
status: | New → Fix Committed |
Changed in snapd: | |
status: | Fix Committed → Fix Released |
Changed in ubuntu-image: | |
status: | Fix Committed → Fix Released |
Thanks for the steps to reproduce! This appears to be a bug in snapd's image.Prepare function. It seems to need updating to use the snapcraft v7 credentials. I've tried recompiling ubuntu-image with snapd 2.57 but that did not resolve the issue. As soon as this is fixed in snapd I can update go.mod to pull in the change.