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

Flatpak support #570

Closed
fbruetting opened this issue Sep 16, 2017 · 29 comments
Closed

Flatpak support #570

fbruetting opened this issue Sep 16, 2017 · 29 comments
Labels
help wanted level: 1 No knowledge of the existing code required needs: exploration Solution unclear, needs research

Comments

@fbruetting
Copy link

With most free applications moving towards Flatpak, please provide such an image, too!

@finer9
Copy link
Member

finer9 commented Sep 16, 2017

I've heard this request many times from Linux users

@fbruetting
Copy link
Author

I don’t know if Electron can be used in conjunction with Flatpak. But getting rid of Electron would be beneficial for performance, so this would be pretty good. 😎

@tzarebczan
Copy link
Contributor

We've also discussed appimage packaging in the past as well. Not sure how that compares to flatpak.

Getting rid if electron means developing native solutions on each OS, which is not something we want to do at this time.

@fbruetting
Copy link
Author

AppImage is deprecated – Flatpak can do everything what AppImage does and much more!

@tzarebczan
Copy link
Contributor

Good to know, thanks! I'll update that original app image issue and link these.

@fbruetting
Copy link
Author

fbruetting commented Sep 16, 2017

Most programs of the Gnome desktop get ported to Flatpak until 3.28. At the moment a lot is ported already, so this is the way to go (you can even get Steam via Flatpak!). It also is already integrated into the Gnome Appstore (but also runs under other desktop environments like KDE). ;-)
For more information, see:
www.flatpak.org and www.flathub.org

@HoboPrimate
Copy link

Endless people are tackling this issue (flatpaking electron apps):

https://github.com/endlessm/electron-flatpak-base-app
http://blog.manuq.com.ar/posts/building-electron-apps-offline-for-flathub/

@kauffj
Copy link
Member

kauffj commented Sep 19, 2017

Per discussion still happening on #332, it doesn't seem like there is a consensus that Flatpak > AppImage.

I'm open to changing this, but it's unlikely we're adding 2 new ways to package an app on our least popular OS.

@fbruetting
Copy link
Author

Flatpak neither needs root, nor involves complicated commands. It is directly integrated into the Gnome appstore and non-gnome distros will support it too, soon – if they don’t yet provide it already, as e.g. KDE does. With Gnome and KDE you reach >98% of all Linux desktop users – the rest seems to be able installing it via flatpak install --bundle LibreOffice.flatpak, or double-clicking the file. And if Flatpak isn’t shipped with the system already, dnf/apt install flatpak really doesn’t seem to be that hard.

Check out the most used Linux applications and you’ll see that a lot of them are available as flatpak images already (Firefox, Steam, LibreOffice, Slack, Spotify, VLC, Inkscape, Blender, Transmission, Gnome-MPV, Audacity, Corebird, Darktable, FileZilla, FeedReader, Lollypop, Gedit, GnuCash, Builder, Peek and nearly all Gnome core applications). There are many reasons why all their developers have chosen Flatpak over AppImage or Snap. And by the way: There is even EndlessOS, where EVERY single program is flatpaked.

AppImage seems to be a one-way street, because nearly everything at the moment is under way providing Flatpak images. I don’t know a single feature, what is supported via AppImage and not available as Flatpak. I don’t think that custom themes are usable via AppImage, and sandboxing isn’t available at all. See Android – every single user-installed application is sandboxed, what is especially important for applications that have a connection to the internet. You’ll want that on desktop Linux, too!

Snap isn’t decentralized what is the mayor drawback, and many distros and applications don’t support it because of this. Plus, providing a decentralized YouTube alternative via a centralized appstore isn’t reasonable at all.

Here you’ll find more information:
Flatpak presentation
Flatpaking KDE

@kauffj
Copy link
Member

kauffj commented Sep 19, 2017

@HoboPrimate @fbruetting would either of you be interested to add support for flatpak yourselves? We'd be happy to offer commensurate LBC bounty.

@HoboPrimate
Copy link

@kauffj I commented on the thread with the info on current efforts for flatpaking electron apps, but I don't have the skills myself unfortunately. Am just a linux user who came across this application (by mention in one of bryan lunduke's videos) who doesn't run debian/ubuntu.

@fbruetting
Copy link
Author

So yeah, Snap only does work for Ubuntu…

@liamcardenas liamcardenas added needs: exploration Solution unclear, needs research contributor friendly labels Nov 17, 2017
@julianrichen
Copy link

Hello,
I just submitted a Flatpak version of the LBRY app on Flathub: flathub/flathub#175

I'm sure the Flathub team can add some else to the repo once it's created that represents the release team on LBRY. I'll try to keep it updated but I don't use LBRY much. I'm on Fedora and wanted to try it but only saw the deb. I figured I might as well package it for Flatpak so I didn't need to build from source.

It's currently being built with the stable deb file. It'll be changed over to being built from source once the Flatpak/Flathub team can find a better way to ship Electron apps.

@nedrichards
Copy link
Contributor

Just to confirm, Flathub's policy is that the upstream team can absolutely control the app on Flathub, it's there as a service to make things easier for developers - but we allow other people to set up the flatpak and maintain it if there isn't a lot of upstream interest.

As for electron apps, they're absolutely supported! The 'electron native' way to make a flatpak isn't very 'flatpak native', which is a bit annoying, and that's the barrier that we're trying to overcome right now. I'm hoping there'll be some progress on that soon but yes, we'd love if you got your toes wet with an 'extra-data' repackage before moving to a fully native build.

@tzarebczan
Copy link
Contributor

@julianrichen wow, thanks so much for this, I'll have to test it out!
Please see https://lbry.io/faq/tips

@nedrichards thanks for coming by to provide the additional information. I'll look into the process needed to maintain it, but I feel like we would be able to handle it. Not sure what the initial demand will be - at this point a majority of our users are Windows based. I would assume there is a cost to the service you provide.

@nedrichards
Copy link
Contributor

@tzarebczan Nope, no cost. The costs of Flathub are covered by donations from people and organisations keen to see a better app developer experience on Linux. (e.g. my employer Endless helps out because it gets better, more quickly updated apps to our users). We understand that for almost every project there are more users on Windows, Mac OS, Android, anything else - so we want to make stuff as easy as possible!

Let me know github usernames and I'll add you to the repo - the maintenance guidelines are here. But if you've got any questions or need help, just ask.

@tzarebczan
Copy link
Contributor

Sweet, flathub.org has the install file up at https://flathub.org/repo/appstream/io.lbry.lbry-app.flatpakref

Installed successfully on Fedora :)

when I installed it with the built in app manager - it did say "something went wrong" but the app worked. No errors when installing from flatpak command line.

@tzarebczan
Copy link
Contributor

hey @nedrichards, are you a crypto fan? Can we get some LBC (LBRY Credits) over to you for your contributions?

@liamcardenas liamcardenas added help wanted level: 1 No knowledge of the existing code required and removed contributor friendly labels Dec 15, 2017
@liamcardenas
Copy link
Contributor

liamcardenas commented Dec 15, 2017

@tzarebczan is this completely working?

@julianrichen
Copy link

@liamcardenas Yes, install flatpak via your distro's package manager then add the Flathub repo & install io.lbry.lbry-app by:

flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak --user install flathub io.lbry.lbry-app

By adding the Flathub repo you can try out other Flatpak apps on Flathub ;)

This issue could probably be closed now.

@tzarebczan
Copy link
Contributor

Yes, worked on my fedora vm. The working directories are a bit different, so we may want to document that somewhere.

We should definitely add the link to the flathub site in our install / Readme doc.

I think @IGassmann still wanted to check our appimage because of native electron support, but Jeremy said we should go with the one or other.

This definitely fills the gap for non Debian systems, and since Linux accounts for a smaller portion of installs, we shouldn't spend too much time on it.

@IGassmann
Copy link
Contributor

@julianrichen Thanks for what have you done. We appreciate your help.

Concerning app updates. If we release a new version of our app, should we update manually the related flathub repository or is there any way to do it automatically?

@nedrichards
Copy link
Contributor

@IGassmann At the moment you have to manually update the json manifest in the flatpak repo with the new URL, size and sha256 hash. It's not terribly difficult but it is an extra manual step.

fwiw on 'native electron support' that's something that flatpak also has, there just isn't a plugin to electron builder yet (there's tools for electron installer and another way that I can't quite remember off the top of my head). Also, once you create a file that way you still have to run your own repository for updates etc. which is a bit of a hassle and something flathub does for you. But it's totally possible (at Endless we've shipped some apps using this).

The flatpak community is also working on making it easier to build electron apps natively on Flathub or elsewhere (with the advantages of reproducible builds, not needting network connectivity during the build etc.) with tools like flatpak-npm-generator that takes package-lock files and turns that into a flatpak manifest (I'm hoping it'll be extended to yarn.lock files soon as well).

@nedrichards
Copy link
Contributor

@tzarebczan well, I've certainly been testing the app, so always happy to have anything that makes it easier! ;-)

@tzarebczan
Copy link
Contributor

@nedrichards Send me an email at hello@lbry.io with your LBC address (receive tab of the wallet) and I'll get some over to you :)

Thanks again for the support and trying out the app!

@kauffj
Copy link
Member

kauffj commented Dec 15, 2017

@nedrichards if it's possible that we (or you ;) can create a script that our build service (Team City) can run, we can explore automating this and remove that manual step.

@nedrichards
Copy link
Contributor

@kauffj that's a really interesting question and one that I love to hear. I'll file a ticket on Flathub and we'll have a chat. Remote building, or remote triggering has been seen as being a little way away - but if people are asking for it then we can certainly talk! I'll start the discussion and hook you in so you can see and maybe share some of your requirements.

@IGassmann
Copy link
Contributor

Due to these reasons: #332 (comment) AppImage has been chosen as our Linux target package instead of Flatpak.

@knghtbrd
Copy link

For the record, appimages do not tend to support accessibility features, cannot be "installed", require a roll-your-own upgrade solution which introduces privacy and security concerns, will not integrate into desktop environments, and dramatically increase the resource usage required for even hello world in electron from 350 MB of RAM to 500 MB of RAM on my system. As I am legally blind and must have accessibility features, that alone pretty much ensures I won't be using an appimage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted level: 1 No knowledge of the existing code required needs: exploration Solution unclear, needs research
Projects
None yet
Development

No branches or pull requests

10 participants