canonical / pc-gadget

The gadget snap for Personal Computers using 64bit Intel or AMD processors
GNU General Public License v3.0
31 stars 73 forks source link

prepare-device: implement reference prepare-device hook #111

Open tonyespy opened 9 months ago

tonyespy commented 9 months ago

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.

This PR is just a backport of the reference hook added to the 22 and 24 branches.

alfonsosanchezbeato commented 8 months ago

Tbh I'm a bit reluctant to backport this sort of changes, as this is just for reference and it is in the more modern gadgets. And new projects should be based on those, not on 20.

xnox commented 8 months ago

also can we just make MODEL_APIKEY somehow snapctl set'able? such that verbantim pc gadget can just be used with serial vaults without need to maintain a forked gadged?