super-productivity icon indicating copy to clipboard operation
super-productivity copied to clipboard

[Feature] Flatpak package

Open patriziobruno opened this issue 7 years ago • 53 comments

As a multiple-distribution user, I'd like to have the application packaged using Flatpak, to leverage its sandboxing features.

patriziobruno avatar Nov 21 '17 11:11 patriziobruno

Hey there! I gladly accept Pull Requests for this!

Maybe the implementation is straightforward. Check this for example https://www.npmjs.com/package/electron-installer-flatpak. Ideally it also would be built automatically on travis.

johannesjo avatar Nov 21 '17 15:11 johannesjo

@johannesjo, thanks for the quick reply. The Flatpak could be easily published on super-productivity.com or you can ask to for it to be hosted on flathub.org I'll have a look to a possible solution and if I can come up with something useful I'll send you a PR.

patriziobruno avatar Nov 21 '17 16:11 patriziobruno

Would have been too easy ;)

Did you mean to use electron-packager instead of electron builder?

sh: 1: electron-packager: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] build: `gulp build && electron-packager . superProductivity --platform linux --arch x64 --out dist/`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/travis/.npm/_logs/2017-11-30T00_30_03_419Z-debug.log

See: https://travis-ci.org/johannesjo/super-productivity/jobs/309259690

johannesjo avatar Nov 30 '17 00:11 johannesjo

Yes I wanted to use electron-packager, rather than electron-builder, because the latter doesn't support flatpaks. I'm fixing the issue, is it alright if I push a new PR, once I'm done?

patriziobruno avatar Nov 30 '17 11:11 patriziobruno

Sounds great! :)

Patrizio Bruno [email protected] schrieb am Do., 30. Nov. 2017 um 12:05 Uhr:

Yes I wanted to use electron-packager, rather than electron-builder, because the latter doesn't support flatpaks. I'm fixing the issue, is it alright if I push a new PR, once I'm done?

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/johannesjo/super-productivity/issues/25#issuecomment-348156744, or mute the thread https://github.com/notifications/unsubscribe-auth/ABY4iZyt-V09o95exOgGvZx66-GWUwwYks5s7owHgaJpZM4QlryO .

johannesjo avatar Nov 30 '17 11:11 johannesjo

Closing this due to inactivity. Feel free to reopen!

johannesjo avatar Mar 12 '18 00:03 johannesjo

Actually it would be cool to have such an option. Simply because many distribution will never include electorn (and electron based apps) as a packages and not everyone wants to use both flatpak and (basically ubuntu-specific) snap. I hope, I'm not alone;) However it seems that it's worth to wait till mainstream issue will be resolved

kolya-ay avatar Feb 09 '20 14:02 kolya-ay

@patriziobruno @johannesjo Any progress with this?

Just publish to Flathub. https://github.com/flathub/flathub/wiki/App-Submission#how-to-submit-an-app

kaushalyap avatar Aug 21 '20 07:08 kaushalyap

@kaushalyap thanks for the input! Please upvote the original issue, if you like to see this happening. Maintaining another deployment target requires – speaking from experience – a lot of time. For this reason, I'll only implement support (myself) when there is a huge demand for it as efforts are probably better focussed elsewhere if only a couple of people profit from this.

johannesjo avatar Aug 21 '20 12:08 johannesjo

I upvoted this issue because I would love to see a flatpak implementation. I am using the snap and it works fine. However, flatpak is my preferred package installation method.

kd2flz avatar Sep 24 '20 20:09 kd2flz

Btw. here is a link to the electron builder issue: https://github.com/electron-userland/electron-builder/issues/512

If that get's implemented this should become trivially easy (well maybe not the publishing part, but the flatpak creation hopefully will be).

johannesjo avatar Oct 30 '20 14:10 johannesjo

This issue has not received any updates in 90 days. Please comment, if this still relevant!

github-actions[bot] avatar Feb 01 '21 02:02 github-actions[bot]

Has there been any progress on the electron builder front? It seems like there has been multiple posts on that thread, but it's hard to tell if anything is actually being done there...

kd2flz avatar Feb 01 '21 12:02 kd2flz

@kd2flz doesn't seem like it :(

johannesjo avatar Feb 01 '21 12:02 johannesjo

To bad :frowning_face: Hopefully it gets some :heart: at some point!

kd2flz avatar Feb 01 '21 12:02 kd2flz

There is a PR out now for flatpak support that could use some help testing: https://github.com/electron-userland/electron-builder/issues/512#issuecomment-798986263

johannesjo avatar Mar 15 '21 08:03 johannesjo

I've got this working in Flatpak now, thanks to my friend @spion06

https://github.com/FilBot3/com.superproductivity.SuperProductivity

I just used the .deb file like Element(Riot) does in their https://github.com/flathub/im.riot.Riot

So far it works. Please poke holes.

FilBot3 avatar Mar 20 '21 03:03 FilBot3

So, I would say, continue to export the .deb package for those who like traditional installs, and then use the compiled binaries in the universal formats like Flatpak, Snap, AppImage.

FilBot3 avatar Mar 20 '21 03:03 FilBot3

Thank you @FilBot3 ! That looks like a good solution for now. I hope that they will merge the PR soon and that I can include this in the automated build process.

johannesjo avatar Mar 20 '21 19:03 johannesjo

FYI https://github.com/electron-userland/electron-builder/pull/5711 has been merged.

aripollak avatar Aug 04 '21 22:08 aripollak

Thank you @FilBot3 ! That looks like a good solution for now. I hope that they will merge the PR soon and that I can include this in the automated build process.

Which PR are you talking about?

FilBot3 avatar Sep 10 '21 17:09 FilBot3

Which PR are you talking about?

This one: https://github.com/electron-userland/electron-builder/issues/512#issuecomment-798986263

It's already merged. Not sure if this opens the door for automatic deployments to flathub... Does somebody has some input on this?

johannesjo avatar Sep 10 '21 19:09 johannesjo

Which PR are you talking about?

This one: electron-userland/electron-builder#512 (comment)

It's already merged. Not sure if this opens the door for automatic deployments to flathub... Does somebody has some input on this?

I'd have to go through building Super Productivity a few times to grasp it. When I tried using the electron base, I had difficulties.

FilBot3 avatar Sep 11 '21 01:09 FilBot3

Let me know, if I can help you with this.

I never used flatpak myself so please correct me if I am wrong, but I assume that most people here don't want a flatpak file, but rather this being available on flathub. Is this correct?

johannesjo avatar Sep 11 '21 13:09 johannesjo

Let me know, if I can help you with this.

I never used flatpak myself so please correct me if I am wrong, but I assume that most people here don't want a flatpak file, but rather this being available on flathub. Is this correct?

The only thing I don't know how to do is get a proposed Flatpak added to the https://github.com/flathub organization so that is then available on https://flathub.org . Something I have yet to achieve.

FilBot3 avatar Sep 11 '21 19:09 FilBot3

Let me know, if I can help you with this.

I never used flatpak myself so please correct me if I am wrong, but I assume that most people here don't want a flatpak file, but rather this being available on flathub. Is this correct?

So, there is a process to go through to get an application published to Flathub to be used. First, if you go to Flathub and click on the Publish button in the top right-hand corner, it'll take you to their wiki page.

Others and myself will have to read through the documents here. Depending on how you're wanting to build the flatpak either by compiling the javascript code or just using the .deb or .rpm binary. Then we can look at filling out the .appdata.xml appropriately and fulfilling the other requirements.

FilBot3 avatar Sep 11 '21 19:09 FilBot3

Thanks @FilBot3 ! Personally I am fine either way though I read that non binary releases seem to be "better" for some reason I don't quite understand.

To be very blunt about the subject: For me personally, while I am all for supporting new ways to get the app, I don't want to run into to the same problem as I did with the mac os builds, which costs me several month of work (which sounds stupid, but it really did) to get right and which still need some ongoing care every once in a while.

It still feels like a lot of wasted time, in which I didn't learn or produce anything useful and which I would prefer to have spent on something meaningful for the app. I don't want the same to happen for flathub since there are already a couple of alternate routes to get the linux app. This is why I won't dig too deep into the subject myself. But if somebody provides me with a convenient way to set this up, I will gladly do it.

johannesjo avatar Sep 12 '21 15:09 johannesjo

Thanks @FilBot3 ! Personally I am fine either way though I read that non binary releases seem to be "better" for some reason I don't quite understand.

To be very blunt about the subject: For me personally, while I am all for supporting new ways to get the app, I don't want to run into to the same problem as I did with the mac os builds, which costs me several month of work to get right and which still need some ongoing care every once in a while.

It still feels like a lot of wasted time, in which I didn't learn or produce anything useful and which I would prefer to have spent on something meaningful for the app. I don't want the same to happen for flathub since there are already a couple of alternate routes to get the linux app. This is why I won't dig too deep into the subject myself. But if somebody provides me with a convenient way to set this up, I will gladly do it.

Totally understandable. I will modify my repository to try and build the source version of Super Productivity and get all the fiddly bits in the appdata.xml sorted so you can look it over and give it a blessing. Then it should be fairly easy to keep up to date unless there are major breaking changes.

FilBot3 avatar Sep 12 '21 18:09 FilBot3

This issue has not received any updates in 90 days. Please comment, if this still relevant!

github-actions[bot] avatar Jan 11 '22 01:01 github-actions[bot]

Still help wanted with releasing the app to flathub! :)

johannesjo avatar Jan 11 '22 16:01 johannesjo