Closed ghost closed 5 years ago
Hi @igorljubuncic -
Thank you for this, it's extremely helpful!
Ponzu has a dev dependency on the Go toolchain. Is there a way to ensure through the snap install that Go (above some defined version) is also installed? and if not, to install it along with Ponzu?
Yes, absolutely. You can define that with the build-packages keyword - so if you need a package named foobar3-dev, you can add it. For instance, the snapcraft.yaml I uploaded has:
build-packages:
- build-essential
You could have something like:
build-packages:
- build-essential
- foobar3-dev
Similarly, for runtime assets, you can use the stage-packages keyword.
I hope this answers your question.
Hello @igorljubuncic, may I ask, in the context of a snap, can a package dependency be another Snap. I see there's Go already in the snapcraft store. That would seem to be a simple way to ensure Go is available?
Hi Ollie, do you need this resubmitted to the dev branch?
@igorljubuncic if you could even though it's not a change that impacts the Ponzu code base that'd be great.
But is the file complete from your perspective? I don't think it factors in the golang build dependency discussed above, so would fail for some users?
Could that be added so you have a complete snap.yml?
Hey Ollie,
There are several options available:
https://forum.snapcraft.io/t/stage-snaps/11001
I believe this will fully satisfy your requirements.
I'm going to file a new PR - with the same text above, and reference this one.
Closing as PR superseded by #313
Hi Steve,
Following up on what we briefly discussed, this is the PR for building a snap package of ponzu.
Build and test
You can use:
Build locally
I used Ubuntu 18.04 for this.
snap install snapcraft --classic --beta git clone https://github.com/igorljubuncic/ponzu.git cd ponzu git checkout add-snapcraft snapcraft
This command will generate a.snap file, something like ponzu_1.0_amd64.snap.
Install locally
snap install ponzu_1.0_amd64.snap --dangerous
The --dangerous flag is necessary because the app (snap) does not originate from the snap store just yet and is not digitally signed.
Run ponzu
snap run ponzu "options"
Register dev account
You can do this here: https://snapcraft.io/account.
Register ponzu name in the store
This can be done on the command line with snapcraft:
snapcraft login snapcraft register
Upload/push ponzu to the store
snapcraft push ponzu_1.0_amd64.snap --release edge
We use release channels to denote risk, as follows:
You can promote to different channels after testing and validation.
Install from store for (a second) test
snap install ponzu --edge
I think this covers it.
Once you land the PR, we can help you with the promotion of ponzu.
Feel free to ask any questions you may have.
Thanks!