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

Would you be interested in adding snap support on Linux? #103

Open
mcphail opened this issue Sep 14, 2020 · 6 comments
Open

Would you be interested in adding snap support on Linux? #103

mcphail opened this issue Sep 14, 2020 · 6 comments

Comments

@mcphail
Copy link

mcphail commented Sep 14, 2020

Feature description

NPM is a messy way for a user to install an app. Would you be interested in supporting a modern packaging format for your Linux users? Snaps, flatpaks and appimages would fit the bill. I've made a work-in-progress snap version at https://snapcraft.io/percollate which can be easily installed on any Linux distribution which supports snaps using snap install --edge percollate . I'd like to know whether it is worthwhile continuing to work on this, and whether you'd be interested in accepting the snap upstream when ready? There are issues with sandboxing clashing with snap confinement and at least one security issue to iron out as one of the generated binaries has an executable stack, but apart from this it already seems to run well.

Existing workarounds

It looks as if you've been working on docker support. For an end user, this is only marginally less messy than using npm. Supporting snaps or flatpaks would let users install your app from their favourite distribution's software store.

Many thanks for building this useful application!

@danburzo
Copy link
Owner

Hi Neil, sorry for the late reply, I was away from the computer last week. Between this proposal and @pedrolucasp's PR here, coupled with some issues that people have been running into when installing from npm on Linux, it seems more reliable mechanisms are welcome.

I'll have to read up on AUR and snaps to understand what each would entail on my side, and how it interacts with npm releases, but otherwise I am open to offering as much flexibility as possible.

I'd like to know whether it is worthwhile continuing to work on this, and whether you'd be interested in accepting the snap upstream when ready?

If you could let me know, even in very general terms, how the process works, that would be very helpful. (I'll also dig up some official documentation to get up to speed.)

@mcphail
Copy link
Author

mcphail commented Sep 25, 2020

Thanks Dan. I've just been chatting to some of the upstream snap team about some of the issues in snapping your application. Let me hack on this a bit.

The end goal, if you're interested, is to add a snapcraft.yaml to your repo and connect this to Canonical's build infrastructure. They should build a snap every time you update the repo and add it to the --edge channel. When you make a stable release you should be able to drag this in the web gui to the --stable channel. The idea is for it all to be automated, and all you'd have to do is promote builds to stable when you want to.

The snap would be available to any Linux users who are running snapd. By default, that would be everyone on an Ubuntu-based distribution (which accounts for the majority of Linux users) and raspberry-pi users on Raspbian. Users of other distributions can add snap support quite easily but some of the support is quite shaky.

Alternatives would be flatpaks or appimages, but I'm much less familiar with those.

I'll let you know if I get something functional then create a pull request to discuss further, if that's OK?

@danburzo
Copy link
Owner

Yes, perfect, thank you! I'd be glad to add it when you sort it out.

@pedrolucasp
Copy link
Contributor

pedrolucasp commented Oct 2, 2020 via email

@yashha
Copy link
Contributor

yashha commented Oct 2, 2020

https://www.reddit.com/r/linux/comments/9n50ba/lets_see_why_flatpak_and_sandboxing_are_awesome/
https://news.ycombinator.com/item?id=24662315
I think issues are being addressed by flathub and flatpak as well as repositories like flathub will improve.
Flatpak is a good solution and is better than snap.

@mcphail
Copy link
Author

mcphail commented Oct 3, 2020

I'd rather this didn't turn into a debate about different package managers, which has been repeated a thousand times before. My experience has been with making and using snaps, and I'm happy to work on making one for this project. If there's a flatpak which gets there first, I'd be happy to use that instead of a snap. I'm not knowledgeable enough about them to make one myself.

What I do know is that no solution is perfect, but any solution would be better than expecting a casual user to wrestle with npm. My proof of concept snap in the edge channel already "works", barring the security issues mentioned above, and is straightforward to install for a huge number of Linux users. But all I want is to be able to use this application easily; if flatpak or appimage does the job first I'm happy to switch.

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

No branches or pull requests

4 participants