pc-amd64-gadget icon indicating copy to clipboard operation
pc-amd64-gadget copied to clipboard

prepare-device: implement reference prepare-device hook

Open alexclewontin opened this issue 2 years ago • 2 comments

Snapcraft.io points to this as the "reference" implementation of the amd64 gadget. However, no prepare-device hook makes this an incomplete reference, especially for private store operators

The proposed prepare-device hook would not change the behavior of the default PC gadget. However, it could then be forked and trivially modified to use for private store authentication.

alexclewontin avatar Oct 31 '22 22:10 alexclewontin

however store operators should not fork pc-amd64-gadget, as that's hard to maintain. Instead they should really stage-snap: pc-gadget instead.

It probably is best to create a new branch here that does stage-snap: pc-gadget and has reference hooks to build a store specific pc-gadget.

xnox avatar Oct 31 '22 22:10 xnox

however store operators should not fork pc-amd64-gadget, as that's hard to maintain. Instead they should really stage-snap: pc-gadget instead.

It probably is best to create a new branch here that does stage-snap: pc-gadget and has reference hooks to build a store specific pc-gadget.

@xnox problem with that is that all the parts of the gadget are fairly coupled. Store operators still need their own gadget.yaml file (to set default snap config, some autoconnections), and then gadget.yaml directly references a bunch of the other pieces of the snap (the various boot assets and the like). So using the generic gadget as a stage snap and manually making sure your gadget.yaml picks up all the necessary changes is probably less maintainable than simply rebasing your source changes on top of our source changes.

Also stage snaps don't get USNs, but debs do. So when #66 gets merged, you'll actually get more security notifications if you publish your own forked version than if you stage the snap

alexclewontin avatar Nov 01 '22 14:11 alexclewontin

LGTM :)

dilyn-corner avatar Jan 26 '23 19:01 dilyn-corner

Is there an update on merging this? @alfonsosanchezbeato

dilyn-corner avatar Feb 16 '23 03:02 dilyn-corner

Thanks, merged now

alfonsosanchezbeato avatar Feb 16 '23 09:02 alfonsosanchezbeato