Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support kernel.yaml similar to gadget.yaml #4982

Open
dilyn-corner opened this issue Aug 18, 2024 · 4 comments
Open

Support kernel.yaml similar to gadget.yaml #4982

dilyn-corner opened this issue Aug 18, 2024 · 4 comments
Labels
enhancement New features or optimizations triaged

Comments

@dilyn-corner
Copy link

What needs to get done

The kernel.yaml file in kernel snaps should be a supported metadata file similar to snapcraft.yaml, hooks/*, etc. It should be moved by Snapcraft to the meta/ directory.

Why it needs to get done

The kernel.yaml file integrates the kernel snap with the gadget snap, allowing kernel assets to be leveraged by the gadget snap during image creation time. A primary use-case for this is sharing things like DTB files. For instance, see the pi-gadget.

Supporting kernel.yaml will make supporting assumes: [kernel-assets] more meaningful, as that is a stated purpose of the assumes. kernel-assets has been an existent feature for three years and is not marked as experimental.
https://github.com/canonical/snapd/blame/d1ab1252636424044a97e596659c296441fdcfb4/overlord/snapstate/check_snap.go#L53

Tangentially related to this request is supporting the gadget.yaml similar to other metadata files (see #4344), and I think that if this feature request is accepted both the gadget.yaml and kernel.yaml should be supported in similar ways.

@mr-cal mr-cal added enhancement New features or optimizations triaged labels Aug 19, 2024
Copy link

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-3263.

This message was autogenerated

@mr-cal
Copy link
Collaborator

mr-cal commented Aug 19, 2024

This is a good idea. We can start with the same design as a snapcraft.yaml file where snapcraft first looks for snapcraft.yaml then looks for snap/snapcraft.yaml.

Do you want to deprecate gadget.yaml in favor of snap/gadget.yaml? Or allow it to exist in either location?

@dilyn-corner
Copy link
Author

I think the safest (shudder) choice is to allow both but offer a notice -- for legacy purposes it should be treated the same as how snapcraft treats the snapcraft.yaml.

@dilyn-corner
Copy link
Author

dilyn-corner commented Sep 10, 2024

Curiouser and curiouser.

Can't make heads or tails of why I have to manually intervene.

ETA: I just checked. You don't have to manually move it, the code path works as expected. I guess I never tested it without the intervention...?
Either way, this issue is now basically identical to #4344.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features or optimizations triaged
Projects
None yet
Development

No branches or pull requests

2 participants