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

snapcraft.yaml: improve version,base and plugs #161

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

mvo5
Copy link
Contributor

@mvo5 mvo5 commented Feb 7, 2023

This PR adds three patches, I'm happy to propose individual PRs instead if that is preferred:

  1. move to base core22
  2. generate version number based on date and git hash
  3. provide spread and gcloud config personal-files plugs

I'm happy to tweak things as needed, especially the version number seems to be something that people have different opinions about.

mvo5 added 3 commits February 7, 2023 15:37
This results in a version number like:

	2023.02.07.g0746598

which gives more information than the curent hardcoded version.
Copy link

@sergiusens sergiusens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice!

Copy link

@alexmurray alexmurray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but the personal-files plug names need to be changed to match the usual conventions.

snapcraft.yaml Outdated Show resolved Hide resolved
snapcraft.yaml Outdated Show resolved Hide resolved
@mvo5 mvo5 added the Ready label Feb 28, 2023
dot-spread:
interface: personal-files
read:
- $HOME/.spread
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some concerns during a discussion: as $HOME inside the confinement does not point to the real /home but ~/snap/sparead/ this seems a bit useless without further changes. So this needs some more investigation/thinking.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes whilst $HOME in the snap environment points to $SNAP_USER_DATA, in this case $HOME gets used as an AppArmor rule and will translate to @{HOME} - see formatPath() in interfaces/builtin/common_files.go - https://github.com/snapcore/snapd/blob/master/interfaces/builtin/common_files.go#L70 - so this works as intended.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that what @mvo5 is alluding to is that perhaps spread needs to be aware of this detail

@mvo5 mvo5 removed the Ready label Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants