Electron-builder: Gnome Flatpak

Created on 16 Jun 2016  Â·  51Comments  Â·  Source: electron-userland/electron-builder

Since everyone seems to be listing Linux distribution tools, I'll add gnome flatpak to the list as well:

http://flatpak.org/

feature help wanted linux

Most helpful comment

As I am going to switch to vanilla gnome Linux from macOS, flatpack will be supported this/next month.

All 51 comments

Do you like flatpack or just report issue ;)?

AppImage, Flatpak and Snappy Apps are the 3 modern solutions at the moment. That's why I created the issue :-)

Moved to backlog to keep issue list clear.

AppImage #504 supported.

Flatpak is taking up in usage recently. It supports some features missing from appimage (support for automatic updates e.g. via proper integration in gnome software, KDE support seems to be coming,...). It could be time to reconsider the "backlog" tag.

I agree. Flatpak is becoming the standard not only in GNOME, but within KDE and probably ElementaryOS environments. Seems also to be a non-centralized way to keep applications reproducible and sandboxed, and seems way more secure than the alternatives. The number of contributors is also bigger than AppImage and Snap. GNOME Apps, Spotify, LibreOffice, Skype and Telegram already have Flatpak builds.

Anyone willing to tackle this? We have deb, rpm, AppImage and Snappy it would be a shame to not have flatpak as well.

Sorry, moved to backlog for now.

Flatpak is the last missing piece for electron-builder to become a trully complete tool for packaging Electron apps. Is it too hard to port electron-forge Flatpak implementation to electron-builder?

A Flatpak version is also something that people frequently ask for in my application, so support for it would be very welcome.

As I am going to switch to vanilla gnome Linux from macOS, flatpack will be supported this/next month.

any updates? thanks for the amazing work!

@develar If you have yet to begin working on it, this is likely of interest: http://docs.flatpak.org/en/latest/electron.html

There is Snap support available (almost all the features from Flatpack, I like it more), but yeah, will be great to have also Flatpack

There is Snap support available (almost all the features from Flatpack, I like it more), but yeah, will be great to have also Flatpack

Snaps do not provide Flatpak’s biggest feature – which is being decentralized. Furthermore, Snaps are just on Ubuntu and it’s derivatives really supported, whereas you will find Flatpak support on way more distributions.

But it’s pretty obivious that not supporting Flatpak is a political decision here, as it’s also the case for Ubuntu.

As I am going to switch to vanilla gnome Linux from macOS, flatpack will be supported this/next month.

@develar Are you still using Gnome (or Linux for that matter)? It's understandable if you went back to macOS.

I'm not sure what's required to support Flatpak, did you get around to attempting it and run into any issues? Would a reference project supporting Flatpak electron builds be of help?

I'm not sure what's required to support Flatpak, did you get around to attempting it and run into any issues? Would a reference project supporting Flatpak electron builds be of help?

So there are two different ways to approach this:

  • Using Flatpak to build an electron app in a sandbox. This is what the linked repo tries to do.
  • Spitting out a .flatpak bundle (or maybe even commit into a repo) from a electron project. This is what this issue would be about.

There is sadly not a ton of overlap in those two tasks.

As someone who have built flatpaks both as repositories, and as .flatpak bundles. And these are basically the same thing, since the .flatpak bundle is just an export of the repository.
//Mattias Eriksson

18 mars 2019 20:26 av [email protected]:

>

I'm not sure what's required to support Flatpak, did you get around to attempting it and run into any issues? Would a reference project supporting Flatpak electron builds be of help?

So there are two different ways to approach this:

Using Flatpak to build an electron app in a sandbox. This is what the linked repo tries to do.
Spitting out a .flatpak bundle (or maybe even commit into a repo) from a electron project. This is what this issue would be about.

There is sadly not a ton of overlap in those two tasks.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, > view it on GitHub https://github.com/electron-userland/electron-builder/issues/512#issuecomment-474065787> , or > mute the thread https://github.com/notifications/unsubscribe-auth/AGH4ny_J2_qCIXMKc0WHK2Ur7FY3b_dZks5vX-h1gaJpZM4I3TBv> .

@snaggen I'm not talking about the format, I'm talking about their usage.

electron-builder has no use for a project like Flathub which builds projects in a sandbox with the flatpak-builder tool.

It instead has use where an upstream project exports to their own infrastructure.

Spitting out a .flatpak bundle (or maybe even commit into a repo) from a electron project. This is what this issue would be about.

Ok, so would you say supporting .flatpak bundle output is difficult for electron-builder to support? Is there any particular issues that can be run into? If you have any idea how much work it'd be to add the support that'd be helpful too.

I'm not familiar with building flatpak apps, but perhaps if there is some guidance/advice in how to go about adding that support, I or someone else might be able to find the time to look into it ourselves and create a PR?

Ok, so would you say supporting .flatpak bundle output is difficult for electron-builder to support? Is there any particular issues that can be run into? If you have any idea how much work it'd be to add the support that'd be helpful too.

No I do not believe it would be that difficult. Just using the flatpak build-* commands to put things in the right place and export it should generally work fine.

See the man pages for flatpak-build-init, flatpak-build, flatpak-build-finish, flatpak-build-export.

Generally .flatpak bundles aren't very user friendly though, users lose out on simple updating. So it might be worth exposing the ability to export to a repository easily.

Hello, Flatpack would be truly awesome! And there is a lot of more hype for it than Snapcraft. I hope it will be soon included. Keep your good work!

@TingPing adding the ability to publish to a repository would get you "publish to Flathub.org" basically for free. Flathub is the de facto standard distro agnostic place to host flatpaks.

There seems to be a lot of interest here for Flatpak. Hope this get's resolved soon.

A bounty of 10 usd was added to this issue. See task on GitPay

A bounty of 10 usd was added to this issue. See task on GitPay

any good news about flatpak support?

@jawadalkassim if there is news about such, it'll be mentioned here.. Just subscribe to the issue like everyone else, optionally pitch in on the bounty on GitPay to show your interest/support (or :+1: the 1st message of the thread like others and hope someone works on it).

Hi @polarathene, I tried to add a bounty to the task on GitPay, but didn't work. I got redirectd to https://gitpay.me/undefined

@patriziobruno which payment method you tried?

A bounty of 200 usd was added to this issue. See task on GitPay

@patriziobruno which payment method you tried?

@alexanmtz PayPal

@patriziobruno which payment method you tried?

@alexanmtz PayPal

Thanks @patriziobruno, we just fixed this issue with Paypal payments, can you try again?

I tried to add a bounty for this issue to GitPay as we'd love to use Flatpak for 1Password but I got this error:

image

I repeated the payment again before realizing that Brave's shields likely tickled the issue. The third payment went through.

Now there are 2 pending bounties that shouldn't be there. I tried to reach out to support but haven't heard back yet. Can those be cancelled?

I'm sorry I didn't capture the console logs. I didn't think of it until later.

I tried to add a bounty for this issue to GitPay as we'd love to use Flatpak for 1Password but I got this error:

image

I repeated the payment again before realizing that Brave's shields likely tickled the issue. The third payment went through.

Now there are 2 pending bounties that shouldn't be there. I tried to reach out to support but haven't heard back yet. Can those be cancelled?

I'm sorry I didn't capture the console logs. I didn't think of it until later.

Thanks for reporting @dteare, they're cancelled, and we're investigating the cause, probably we have a bug for orders created without signup into the platform.

Thank you so much!!

In case it helps you reproduce the issue I was using Brave Version 1.11.104 Chromium: 84.0.4147.105 (Official Build) (64-bit).

Take care! 👋

++dave;

On Aug 5, 2020, at 3:49 AM, Alexandre Magno notifications@github.com wrote:

I tried to add a bounty for this issue to GitPay as we'd love to use Flatpak for 1Password but I got this error:

https://user-images.githubusercontent.com/110676/89346523-3234e100-d677-11ea-8f95-f7def9969df3.png
I repeated the payment again before realizing that Brave's shields likely tickled the issue. The third payment went through.

Now there are 2 pending bounties that shouldn't be there. I tried to reach out to support but haven't heard back yet. Can those be cancelled?

I'm sorry I didn't capture the console logs. I didn't think of it until later.

Thanks for reporting @dteare https://github.com/dteare, they're cancelled, and we're investigating the cause, probably we have a bug for orders created without signup into the platform.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/electron-userland/electron-builder/issues/512#issuecomment-669039800, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA3AVDR7IRX23RLN5XGVXTR7EFJJANCNFSM4CG5GBXQ.

A lot of electron applications aren't discoverable due to the lack of Flatpak applications. Flatpak issues opened to electron applications end up here.

Gnome Software no longer supports Snap's natively. ArchLinux, Fedora, all don't show electron apps due to the lack of FlatPak support.

A bounty is growing on this one. Isn't anyone interested in working on it?

@kallisti5, there is a lot of Electron-based apps published on https://flathub.org/ So it's already quite possible to publish the Electron-based app to the flatpack repository.

@vladimiry Almost none of that apps on Flathub are maintained by their authors. I won't be surprised if your ElectronMail is the only one.

Almost none of that apps on Flathub are maintained by their authors

@gasinvein it doesn't necessarily mean that it's hard to maintain without involving electron-builder.

@vladimiry But still, as we can tell from the issues linked here, many developers see the lack of flatpak output format support in electron-builder as a blocker for publishing flatpaks.

@gasinvein, correct, and I hope it's more clear now that there is no blocker. Additionally, even if the electron-builder will be able to somehow prepare the standalone flatpack installation package it won't make much sense since the flatpak's way is maintaining the app/package-relative repository in https://github.com/flathub.

Either way, the gist of it is that when devs are asked about Flatpak support, which they likely have no experience in, they may look into it and find this issue, have a quick read through and leave it as that as "not presently as easy/possible to support".

If electron-builder can help in someway, the present $420 USD bounty would be for that. Additionally probably some documentation or link to an existing guide that walks a developer through the process of supporting Flatpak (or utilizing Flathub). Once the process is less vague/effort to adopt, this issue could be closed.

Additionally probably some documentation or link to an existing guide that walks a developer through the process of supporting Flatpak (or utilizing Flathub).

Additionally, even if the electron-builder will be able to somehow prepare the standalone flatpack installation package it won't make much sense since the flatpak's way is maintaining the app/package-relative repository in https://github.com/flathub.

Flatpak is decentralized. Flathub is probably the most popular Flatpak repository, but it is just one of them.

electron-builder has support for snap too, which is comparable in this regard.

electron-builder has support for snap too, which is comparable in this regard.

Agree. Here is how to distribute flatpaks in offline/standalone mode https://docs.flatpak.org/en/latest/single-file-bundles.html (I have not tried this in action).

Flatpak is decentralized. Flathub is probably the most popular Flatpak repository, but it is just one of them.

Referencing the related link just in case https://docs.flatpak.org/en/latest/repositories.html.

I would like to reiterate my comment 2 years ago: https://github.com/electron-userland/electron-builder/issues/512#issuecomment-398711781

Is it worth to implement electron-forge's Flatpak packaging capabilities to electron-builder?

Creating a flatpak is not very hard. Creating it for an electron app turned out to be another story. A developer at Endless wrote a post a while ago describing the procedure , which included multiple custom scripts. I now found an flatpak electron installer by endless, which I assume is the result of all that work.
So, is it easy to create electron app, well it might be now if you use the workaround scripts people have been forced to create due to this issue still not being implemented.

Is there some reason that flatpak support is not built? If building flatpaks is so simple as said in previous comments, it should be equally simple to officially support it?

@snaggen There are to different (kind of opposite) approaches to produce a flatpak of electron app: one involves running electron-builder inside the flatpak builder sandbox, and the other involves electron-builder itself calling flatpak build commands to create a bundle (just like it does for deb/rpm/snap). Current apps on Flathub use the former, while this issue is about the later.
See also this post.

while this issue is about the later

I think that's a rare case when that later approach is actually needed (like when you need to assembly a version directly from the sources code, which involves setting up dependencies and compiling stuff, rather than referencing existing linux package). It's a headache for complex apps since it's like turning the flatpak builder into another CI system.

Was this page helpful?
0 / 5 - 0 ratings