-
Notifications
You must be signed in to change notification settings - Fork 75
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
Add support for Snap build #181
Conversation
Add a snapcraft.yaml file to configure the snapcraft build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with how snap works. How do users use it? Could you update the README if this is another way to install gmailctl?
"classic" confinement requires approval to be pushed to the snap store and it was possible (using a few hacks) to use strict confinement. List of "hacks": - use xdg-open to open the an editor outside of the snap container - use a wrapper around xdg-open to wait for a user input - make $TMPDIR point to $SNAP_USER_DATA to allow xdg-open to open the config file - use homeishome-launcher to make sure Go returns the right path when using usr.HomeDir
I just pushed an other commit to add the documentation to the README and use strict confinement. I tried to document |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes and sorry for the delay in responding! We're almost there.
hack/editor-wrapper.sh
Outdated
@@ -0,0 +1,11 @@ | |||
#!/bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this script is used only by snap, could you move it under the snap
directory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My turn to apology for the delay 😄 . I moved it under snap/local
. I couldn't move it under snap
directly, it was raising this error:
The 'snap' directory is meant specifically for snapcraft, but it contains the following non-snapcraft-related paths, which is unsupported and will cause unexpected behavior:
- editor-wrapper.sh
If you must store these files within the 'snap' directory, move them to 'snap/local', which is ignored by snapcraft.
Thank you @gjolly! |
Add a
snapcraft.yaml
file to configure the snapcraft build.To build and install the snap (assuming
snapcraft
utility is installed):The snap requires "classic" isolation because it's relying on config files in $HOME.