can't use a gadget with a base when building a classic image with snap prepare-image
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Fix Released
|
Medium
|
Samuele Pedroni |
Bug Description
When trying to seed a classic image with `snap prepare-image`, if the gadget that is being included has a base, snapd refuses to seed the gadget snap unless a base is specified for the model:
```
$ sudo snap prepare-image --classic server-model.assert /tmp/img --snap edgex-pi-
Fetching core
Copying "edgex-
error: cannot use gadget snap because its base "core18" is different from model base ""
```
However adding a base to the model is not allowed by snap sign:
```
$ cat server-model.json | snap sign -k edgex-testing
error: cannot assemble assertion model: cannot specify a base with a classic model
```
Example server-model.json:
```
{
"type": "model",
"authority-id": "some-id",
"brand-id": "some-id",
"series": "16",
"model": "edgex-rpi-delhi",
"architecture": "arm64",
"classic": "true",
"base": "core18",
"gadget": "edgex-pi",
"required-snaps": [
"edgexfoundry",
"node-red",
"edgex-
],
"timestamp": "2019-06-
}
```
This is problematic when trying to use the same gadget snap for both a classic image and a core image for the same physical hardware setup (to provide users both a ubuntu server image using these snaps and a ubuntu core image using these snaps). The gadget snap is necessary on a classic device so that there is slots for device access to use with strictly confined snaps.
Changed in snapd: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in snapd: | |
status: | Fix Committed → Fix Released |
this should have been fixed here:
https:/ /github. com/snapcore/ snapd/pull/ 7135