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

Add support for building snaps #625

Merged
merged 1 commit into from Feb 16, 2019
Merged

Add support for building snaps #625

merged 1 commit into from Feb 16, 2019

Conversation

ghost
Copy link

@ghost ghost commented Dec 12, 2018

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

  • Upload a built snap to the store. The store supports multiple risk levels as “channels” with the 'edge' channel typically used to host the latest build from git master. Stable is where stable releases are pushed. Optionally, beta and candidate channels can also be used, for different levels of stability and testing.

snapcraft push goreplay_1.0_amd64.snap --release edge

  • Test installing on a clean machine

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.

@buger buger merged commit c092718 into buger:master Feb 16, 2019
xingren23 referenced this pull request in xingren23/goreplay Sep 4, 2021
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.

1 participant