It looks to me that we can create customized Ubuntu Core image with local snaps using --snap arguments. But I got the following error while building my UC image with customized gadget snap:
WARNING: "ttzeng-pc" installed from local snaps disconnected from a store cannot be refreshed subsequently!
Copying "gadget/ttzeng-pc_0.1.0_amd64.snap" (ttzeng-pc)
error: model does not support the system-seed role
@ogra, thanks for reply. My model assertion is derived from ubuntu-core-20-amd64.json, but since I’d like to use local snap files, so I need to remove the snaps section, and specify gadget directly in the json file. Or, do you refer me any model assertion which uses local snap files to build UC images? Thanks.
you should not remove the snaps section. you just change the names in there … if you use --snap with ubuntu-image the snap-id’s can be ignored, but the format of the file still matters … you also need to keep grade: in there (which you seem to have dropped), i think thats a requrement with UC20. the model assertion you posted above is clearly a UC18 format … (gadget is gone, snaps is requred in the new format)
Is this new model assertion documented somewhere yet? I couldn’t find it and the link you posted above points at the assertion model from core18. I was specifically searching for the right ‘grade’ vale here when using local snaps, I took a guess and used ‘dangerous’ following an error message thrown by ubuntu-image but it would be great to know what all the different values are and what they mean. Thanks!