Add support for building snaps #625
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've created this PR to request support for building a snap package of goreplay.
Snaps are cross-distro Linux software packages, supported on LTS and non-LTS Ubuntu, as well as Debian, Manjaro, Fedora, OpenSUSE, Arch, and many others distributions. Making a snap of goreplay will enable you to provide automatic updates on your schedule to your users via the snap store.
If you accept this PR, you can use snapcraft locally, your CI system or our free build system (build.snapcraft.io) to create snaps and upload to the Snap Store (snapcraft.io/store).
To test this PR locally, I used a stock Ubuntu 18.04 system. I built the goreplay snap from sources - I was able to create raw sockets, and it has bluetooth control, too. I did not build goreplay with support for USB adapters, but that can also be added quite easily. The snap has been compiled with libpcap0.8, and it also has X11 support. Again, snaps support multiple interfaces, so this can be extended if needed.
My build and test was as follows:
snap install snapcraft --classic --beta
git clone https://github.com/igorljubuncic/goreplay.git
cd goreplay
git checkout add-snapcraft
snapcraft
The last command will generate a .snap file, something like goreplay_1.0_amd64.snap.
This snap can be installed and tested locally with:
snap install goreplay_1.0_amd64.snap --dangerous
The --dangerous flag is necessary because the app (snap) hasn’t gone through the snap store review process and is not signed.
Once installed, the goreplay command can be executed, e.g.: snap run goreplay .
If landed, you will need to complete a couple more steps:
snapcraft login
snapcraft register
snapcraft push goreplay_1.0_amd64.snap --release edge
snap install goreplay --edge
After you have completed your tests, you can push a stable release to the stable channel, update the store page, and promote the application online. We can help there, and we'd be happy to feature your application in our store.